Sha256: 0223c0a7dd3ac4d053b60cde97820ac459572eca4c405711e3417e41ccac3fe0
Contents?: true
Size: 611 Bytes
Versions: 12
Compression:
Stored size: 611 Bytes
Contents
require_relative "./test_app/config/environment" Rails.env = "production" Shakapacker.instance = ::Shakapacker::Instance.new def reloaded_config Shakapacker.instance.instance_variable_set(:@env, nil) Shakapacker.instance.instance_variable_set(:@config, nil) Shakapacker.instance.instance_variable_set(:@dev_server, nil) Shakapacker.env Shakapacker.config Shakapacker.dev_server end def with_rails_env(env) original = Rails.env Rails.env = ActiveSupport::StringInquirer.new(env) reloaded_config yield ensure Rails.env = ActiveSupport::StringInquirer.new(original) reloaded_config end
Version data entries
12 entries across 12 versions & 1 rubygems