From 78ce107ebf0700cedde3dd957409788debe9b411 Mon Sep 17 00:00:00 2001 From: JJ Asghar Date: Sun, 13 Sep 2015 23:09:57 -0500 Subject: [PATCH] Fix for issue 96 - Added the {} to the json file to resolve issue #96 --- CHANGELOG.md | 1 + lib/kitchen/driver/openstack.rb | 4 ++-- lib/kitchen/driver/openstack_version.rb | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0de0bc4f..7b6d8841 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Re-written for the new test-kitchen underlying framework * Windows and WinRM support * Stole some code from PR [#80][] - from [@jmahowald][] +* Resolve for issue [#96][] # 1.8.1 / 2015-07-22 diff --git a/lib/kitchen/driver/openstack.rb b/lib/kitchen/driver/openstack.rb index 53f4ac54..c5c4db87 100644 --- a/lib/kitchen/driver/openstack.rb +++ b/lib/kitchen/driver/openstack.rb @@ -322,14 +322,14 @@ def add_ohai_hint(state) if bourne_shell? info 'Adding OpenStack hint for ohai' mkdir_cmd = "sudo mkdir -p #{hints_path}" - touch_cmd = "sudo touch #{hints_path}/openstack.json" + touch_cmd = "sudo cat '{}' >> #{hints_path}/openstack.json" instance.transport.connection(state).execute( "#{mkdir_cmd} && #{touch_cmd}" ) elsif windows_os? info 'Adding OpenStack hint for ohai' mkdir_cmd = "mkdir #{hints_path}" - touch_cmd = "'' > #{hints_path}\\openstack.json" + touch_cmd = "'{}' > #{hints_path}\\openstack.json" instance.transport.connection(state).execute( "#{mkdir_cmd} && #{touch_cmd}" ) diff --git a/lib/kitchen/driver/openstack_version.rb b/lib/kitchen/driver/openstack_version.rb index 2a70cc1b..b89f6fe4 100644 --- a/lib/kitchen/driver/openstack_version.rb +++ b/lib/kitchen/driver/openstack_version.rb @@ -21,6 +21,6 @@ module Kitchen # # @author Jonathan Hartman module Driver - OPENSTACK_VERSION = '2.0.0.dev.1' + OPENSTACK_VERSION = '2.0.0.dev.2' end end