Class: Itrigga::Config::Configuration

Inherits:
Object
  • Object
show all
Includes:
Macros, Singleton
Defined in:
lib/itrigga/config/configuration.rb

Instance Method Summary collapse

Methods included from Macros

included

Instance Method Details

#environmentObject



202
203
204
# File 'lib/itrigga/config/configuration.rb', line 202

def environment
  RAILS_ENV
end

#environment_typeObject



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

Returns:

  • (Boolean)


216
# File 'lib/itrigga/config/configuration.rb', line 216

def is_development?; environment_type == 'development'; end

#is_production?Boolean

Returns:

  • (Boolean)


215
# File 'lib/itrigga/config/configuration.rb', line 215

def is_production?; environment_type == 'production'; end

#is_test?Boolean

Returns:

  • (Boolean)


214
# File 'lib/itrigga/config/configuration.rb', line 214

def is_test?; environment_type == 'test'; end

#rabbit_mqObject

Aliases TODO: refactor refs to these



198
# File 'lib/itrigga/config/configuration.rb', line 198

def rabbit_mq; processes[:broker]; end

#scheduled_job_submitterObject



200
# File 'lib/itrigga/config/configuration.rb', line 200

def scheduled_job_submitter; processes[:job_resubmitter]; end

#web_service_term_extractorObject



199
# File 'lib/itrigga/config/configuration.rb', line 199

def web_service_term_extractor; processes[:term_extractor]; end