Permalink
Browse files

fix(framework): Added missing `deploy_environment` to `null` framework

Even if framework is set to null, at least `RACK_ENV` needs to be set. This gives application the
hint, which environment is currently used - which the app can interpret or not.

Signed-off-by: Igor Rzegocki <igor@rzegocki.pl>
  • Loading branch information...
ajgon committed Sep 30, 2016
1 parent f8856c8 commit 673a21d4945ba80c8cee50cfbce3b3a9d39be8bc
Showing with 7 additions and 2 deletions.
  1. +5 −1 libraries/drivers_framework_null.rb
  2. +2 −1 spec/unit/libraries/drivers_framework_null_spec.rb
@@ -4,7 +4,11 @@ module Framework
class Null < Drivers::Framework::Base
adapter :null
allowed_engines :null
output filter: []
output filter: [:deploy_environment]
def raw_out
super.merge(deploy_environment: { 'RACK_ENV' => globals[:environment] })
end
end
end
end
@@ -11,6 +11,7 @@
end
it 'returns proper out data' do
expect(described_class.new(dummy_context(node), aws_opsworks_app).out).to eq({})
expect(described_class.new(dummy_context(node), aws_opsworks_app).out)
.to eq(deploy_environment: { 'RACK_ENV' => 'staging' })
end
end

0 comments on commit 673a21d

Please sign in to comment.