Module: RubyRabbitmqJanus::Tools::ConfigGem
- Included in:
- Config
- Defined in:
- lib/rrj/tools/gem/config/gem.rb
Overview
Subclass for Config
Options about Gem
Instance Method Summary collapse
-
#cluster ⇒ Boolean
Read option file for a janus cluster section.
-
#environment ⇒ String
(also: #env)
Environment gem executed.
-
#listener_path ⇒ String
Get path to classes in project calling this gem.
-
#log_level ⇒ Symbol
Read configuration for log level used in this gem.
-
#log_option ⇒ String
Read configuration for log option.
-
#log_type ⇒ Symbol
Read level to log.
-
#object_relational_mapping ⇒ String
(also: #orm)
Get orm used (mongoid or active_record).
-
#program_name ⇒ String
(also: #pg)
Get program name or GEM_NAME.
-
#rspec_response ⇒ String
Get path for json files contains a Janus response.
Instance Method Details
#cluster ⇒ Boolean
Returns Read option file for a janus cluster section.
12 13 14 |
# File 'lib/rrj/tools/gem/config/gem.rb', line 12 def cluster ['gem']['cluster']['enabled'].to_s.match?('true') ? true : false end |
#environment ⇒ String Also known as: env
Returns Environment gem executed.
39 40 41 |
# File 'lib/rrj/tools/gem/config/gem.rb', line 39 def environment ['gem']['environment'].to_s || 'development' end |
#listener_path ⇒ String
Returns Get path to classes in project calling this gem.
33 34 35 36 |
# File 'lib/rrj/tools/gem/config/gem.rb', line 33 def listener_path ['gem']['listener']['path'].to_s || 'app/ruby_rabbitmq_janus/action_events' end |
#log_level ⇒ Symbol
Returns read configuration for log level used in this gem.
17 18 19 |
# File 'lib/rrj/tools/gem/config/gem.rb', line 17 def log_level ['gem']['log']['level'].upcase.to_sym || :INFO end |
#log_option ⇒ String
Returns read configuration for log option.
27 28 29 30 |
# File 'lib/rrj/tools/gem/config/gem.rb', line 27 def log_option option = ['gem']['log']['option'] option.empty? ? nil : option end |
#log_type ⇒ Symbol
Returns Read level to log.
22 23 24 |
# File 'lib/rrj/tools/gem/config/gem.rb', line 22 def log_type ['gem']['log']['type'].downcase.to_sym || :stdout end |
#object_relational_mapping ⇒ String Also known as: orm
Returns Get orm used (mongoid or active_record).
44 45 46 |
# File 'lib/rrj/tools/gem/config/gem.rb', line 44 def object_relational_mapping ['gem']['orm'].to_s || 'mongoid' end |
#program_name ⇒ String Also known as: pg
Returns Get program name or GEM_NAME.
49 50 51 |
# File 'lib/rrj/tools/gem/config/gem.rb', line 49 def program_name ['gem']['program_name'].to_s || RubyRabbitmqJanus::GEM_NAME end |
#rspec_response ⇒ String
Returns Get path for json files contains a Janus response.
54 55 56 |
# File 'lib/rrj/tools/gem/config/gem.rb', line 54 def rspec_response ['gem']['response_path'] || 'spec/responses' end |