Class: DebugSecretConfig
- Inherits:
-
Object
- Object
- DebugSecretConfig
- Defined in:
- lib/apollo_commons_ruby/SecretConfig.rb
Instance Attribute Summary collapse
-
#authToken ⇒ Object
readonly
Returns the value of attribute authToken.
-
#domainId ⇒ Object
readonly
Returns the value of attribute domainId.
-
#templateDirectory ⇒ Object
readonly
Returns the value of attribute templateDirectory.
-
#userId ⇒ Object
readonly
Returns the value of attribute userId.
Instance Method Summary collapse
-
#initialize(environment) ⇒ DebugSecretConfig
constructor
A new instance of DebugSecretConfig.
Constructor Details
#initialize(environment) ⇒ DebugSecretConfig
Returns a new instance of DebugSecretConfig.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/apollo_commons_ruby/SecretConfig.rb', line 44 def initialize(environment) if(File.exist? ("./environments/#{environment}/userInfo.json")) conf_file = File.read("./environments/#{environment}/userInfo.json"); conf = JSON.parse conf_file @authToken = conf["authToken"] @userId = conf["userId"] @domainId = conf["domainId"] else puts "Please Provide userInfo path in /environments=>#{environment}=>userInfo.json file".red return nil end if(File.exist? ("./environments/config.json")) templateDirectory_json = File.read("./environments/config.json") templateDirectory_json = JSON.parse templateDirectory_json @templateDirectory = templateDirectory_json["templateDirectory"] else puts "Please Provide templateDirectory path in environments => config.json file".red return nil end end |
Instance Attribute Details
#authToken ⇒ Object (readonly)
Returns the value of attribute authToken.
39 40 41 |
# File 'lib/apollo_commons_ruby/SecretConfig.rb', line 39 def authToken @authToken end |
#domainId ⇒ Object (readonly)
Returns the value of attribute domainId.
41 42 43 |
# File 'lib/apollo_commons_ruby/SecretConfig.rb', line 41 def domainId @domainId end |
#templateDirectory ⇒ Object (readonly)
Returns the value of attribute templateDirectory.
42 43 44 |
# File 'lib/apollo_commons_ruby/SecretConfig.rb', line 42 def templateDirectory @templateDirectory end |
#userId ⇒ Object (readonly)
Returns the value of attribute userId.
40 41 42 |
# File 'lib/apollo_commons_ruby/SecretConfig.rb', line 40 def userId @userId end |