Permalink
Browse files

object to hash

  • Loading branch information...
1 parent 19593be commit 921b1ac41cc299f8e56c7337f6cb78a279b3ba23 @3ancho 3ancho committed Jul 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/chef/jenkins.rb
View
@@ -170,7 +170,7 @@ def save_environment_file(env_to=Chef::Config[:jenkins][:env_to])
Chef::Log.info("Saving environmnent #{env_to} to #{env_to}.json")
dir = Chef::Config[:jenkins][:repo_dir]
- envto = Chef::Environment.load(env_to)
+ envto = Chef::Environment.load(env_to).to_hash
File.open(File.join(dir, "environments/#{envto}.json"), "w") do |env_file|
envto['cookbook_versions'] = Hash[envto['cookbook_versions'].sort]
env_file.print(JSON.pretty_generate(envto))

0 comments on commit 921b1ac

Please sign in to comment.