lib/soloist/chef_config_generator.rb in soloist-0.0.6 vs lib/soloist/chef_config_generator.rb in soloist-0.0.7
- old
+ new
@@ -40,6 +40,19 @@
end
def json_file
json_hash.to_json
end
+
+ def preserved_environment_variables
+ always_passed = %w{PATH BUNDLE_PATH GEM_HOME GEM_PATH RAILS_ENV RACK_ENV}
+ always_passed += @hash["env_variable_switches"].keys if @hash["env_variable_switches"]
+ always_passed
+ end
+
+ def preserved_environment_variables_string
+ variable_array = []
+ preserved_environment_variables.map do |env_variable|
+ "#{env_variable}=#{ENV[env_variable]}" unless ENV[env_variable].nil?
+ end.compact.join(" ")
+ end
end
\ No newline at end of file