Skip to content

Commit

Permalink
Convert all env values to strings
Browse files Browse the repository at this point in the history
[finishes #154745470]

Signed-off-by: Elena Sharma <esharma@pivotal.io>
  • Loading branch information
vitreuz authored and elenasharma committed Apr 4, 2018
1 parent caf7cb3 commit 6e58728
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/messages/app_manifest_message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def app_update_attribute_mapping

def env_update_attribute_mapping
mapping = {}
if requested?(:env)
mapping[:var] = env
if requested?(:env) && env.is_a?(Hash)
mapping[:var] = env.each { |k, v| env[k] = v.to_s }
end
mapping
end
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/messages/app_manifest_message_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ module VCAP::CloudController
message = AppManifestMessage.create_from_http_request(parsed_yaml)
expect(message).to be_valid
expect(message.app_update_environment_variables_message.var).
to eq({ foo: 'bar', baz: 4.44444444444, qux: false })
to eq({ foo: 'bar', baz: '4.44444444444', qux: 'false' })
end
end
end
Expand Down

0 comments on commit 6e58728

Please sign in to comment.