Class: Itrigga::Config::Configuration
- Inherits:
-
Object
- Object
- Itrigga::Config::Configuration
- Includes:
- Macros, Singleton
- Defined in:
- lib/itrigga/config/configuration.rb
Instance Method Summary collapse
- #environment ⇒ Object
- #environment_type ⇒ Object
- #exchange_config(name) ⇒ Object
- #is_development? ⇒ Boolean
- #is_production? ⇒ Boolean
- #is_test? ⇒ Boolean
-
#rabbit_mq ⇒ Object
Aliases TODO: refactor refs to these.
- #scheduled_job_submitter ⇒ Object
- #web_service_term_extractor ⇒ Object
Methods included from Macros
Instance Method Details
#environment ⇒ Object
202 203 204 |
# File 'lib/itrigga/config/configuration.rb', line 202 def environment RAILS_ENV end |
#environment_type ⇒ Object
206 207 208 209 210 211 212 |
# File 'lib/itrigga/config/configuration.rb', line 206 def environment_type case environment when /test/ then 'test' when /development/ then 'development' else 'production' end end |
#exchange_config(name) ⇒ Object
218 219 220 |
# File 'lib/itrigga/config/configuration.rb', line 218 def exchange_config(name) @rabbit_mq[:exchanges].find{ |e| e[:name] == name } end |
#is_development? ⇒ Boolean
216 |
# File 'lib/itrigga/config/configuration.rb', line 216 def is_development?; environment_type == 'development'; end |
#is_production? ⇒ Boolean
215 |
# File 'lib/itrigga/config/configuration.rb', line 215 def is_production?; environment_type == 'production'; end |
#is_test? ⇒ Boolean
214 |
# File 'lib/itrigga/config/configuration.rb', line 214 def is_test?; environment_type == 'test'; end |
#rabbit_mq ⇒ Object
Aliases TODO: refactor refs to these
198 |
# File 'lib/itrigga/config/configuration.rb', line 198 def rabbit_mq; processes[:broker]; end |
#scheduled_job_submitter ⇒ Object
200 |
# File 'lib/itrigga/config/configuration.rb', line 200 def scheduled_job_submitter; processes[:job_resubmitter]; end |
#web_service_term_extractor ⇒ Object
199 |
# File 'lib/itrigga/config/configuration.rb', line 199 def web_service_term_extractor; processes[:term_extractor]; end |