Module: RailsEnvSwitcher::Switcher::CopycopterClient
- Defined in:
- lib/rails-env-switcher/switcher/copycopter_client.rb
Class Method Summary collapse
Class Method Details
.setup ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rails-env-switcher/switcher/copycopter_client.rb', line 6 def self.setup conf = ::CopycopterClient.configuration def conf.environment_name ::Rails.env end ::CopycopterClient::RequestSync.class_eval do def call(env) @app.call(env) end end end |
.switch_env(old_env, env, options = {}) ⇒ Object
2 3 4 |
# File 'lib/rails-env-switcher/switcher/copycopter_client.rb', line 2 def self.switch_env(old_env, env, ={}) ::CopycopterClient::Rails.initialize end |