diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..bc4abe86 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.3.8 diff --git a/bin/install b/bin/install index 83f9913a..43a21270 100755 --- a/bin/install +++ b/bin/install @@ -14,6 +14,17 @@ class Proxy @targets = targets end + def path + @targets.map do |target| + if target.respond_to?(:path) + target.__send__(:path) + else + # default to to_s since it's just used as a label for log statements. + target.__send__(:to_s) + end + end + end + protected def method_missing(name, *args, &block) diff --git a/bin/update b/bin/update index 7bc0ef13..3d9cc6aa 100755 --- a/bin/update +++ b/bin/update @@ -14,6 +14,17 @@ class Proxy @targets = targets end + def path + @targets.map do |target| + if target.respond_to?(:path) + target.__send__(:path) + else + # default to to_s since it's just used as a label for log statements. + target.__send__(:to_s) + end + end + end + protected def method_missing(name, *args, &block) diff --git a/codedeploy_agent.gemspec b/codedeploy_agent.gemspec index 7d178dad..c0d7b67b 100644 --- a/codedeploy_agent.gemspec +++ b/codedeploy_agent.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |spec| spec.name = 'aws_codedeploy_agent' - spec.version = '1.3.1' + spec.version = '1.3.2' spec.summary = 'Packages AWS CodeDeploy agent libraries' spec.description = 'AWS CodeDeploy agent is responsible for doing the actual work of deploying software on an individual EC2 instance' spec.author = 'Amazon Web Services' diff --git a/lib/instance_agent/platform/linux_util.rb b/lib/instance_agent/platform/linux_util.rb index 6708f39f..08b1c933 100644 --- a/lib/instance_agent/platform/linux_util.rb +++ b/lib/instance_agent/platform/linux_util.rb @@ -51,11 +51,8 @@ def self.extract_tar(bundle_file, dst) def self.extract_zip(bundle_file, dst) log(:debug, "extract_zip - dst : #{dst}") FileUtils.mkdir_p(dst) - working_dir = FileUtils.pwd() absolute_bundle_path = File.expand_path(bundle_file) - FileUtils.cd(dst) - execute_zip_command("unzip -qo #{absolute_bundle_path}") - FileUtils.cd(working_dir) + execute_zip_command("unzip -qo #{absolute_bundle_path} -d #{dst}") end def self.extract_tgz(bundle_file, dst) diff --git a/lib/instance_agent/plugins/codedeploy/command_executor.rb b/lib/instance_agent/plugins/codedeploy/command_executor.rb index 9a09a37d..253f5076 100644 --- a/lib/instance_agent/plugins/codedeploy/command_executor.rb +++ b/lib/instance_agent/plugins/codedeploy/command_executor.rb @@ -528,4 +528,4 @@ def log(severity, message) end end end -end +end \ No newline at end of file diff --git a/test/instance_agent/plugins/codedeploy/command_executor_test.rb b/test/instance_agent/plugins/codedeploy/command_executor_test.rb index bd2ce6e8..c6f8f5e7 100644 --- a/test/instance_agent/plugins/codedeploy/command_executor_test.rb +++ b/test/instance_agent/plugins/codedeploy/command_executor_test.rb @@ -405,8 +405,7 @@ def generate_signed_message_for(map) end context "when creating S3 options" do - - should "use right signature version" do + should "use right signature version" do assert_equal 'v4', @command_executor.s3_options[:signature_version] end