Module: Replicate
- Defined in:
- lib/replicate.rb,
lib/replicate/dumper.rb,
lib/replicate/loader.rb,
lib/replicate/object.rb,
lib/replicate/status.rb,
lib/replicate/emitter.rb,
lib/replicate/active_record.rb
Defined Under Namespace
Modules: AR Classes: Dumper, Emitter, Loader, Object, Status
Class Method Summary collapse
-
.production_environment? ⇒ Boolean
Determine if this is a production looking environment.
Class Method Details
.production_environment? ⇒ Boolean
Determine if this is a production looking environment. Used in bin/replicate to safeguard against loading in production.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/replicate.rb', line 11 def self.production_environment? if defined?(Rails) && Rails.respond_to?(:env) Rails.env.to_s == 'production' elsif defined?(RAILS_ENV) RAILS_ENV == 'production' elsif ENV['RAILS_ENV'] ENV['RAILS_ENV'] == 'production' elsif ENV['RACK_ENV'] ENV['RAILS_ENV'] == 'production' end end |