From 9acced47ad14e1eb50946bd403fc2d335778cd5f Mon Sep 17 00:00:00 2001 From: Pat Allan Date: Fri, 28 Apr 2017 16:50:54 +1000 Subject: [PATCH 1/2] Allow installations via Ruby 2.4.x --- bin/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/install b/bin/install index 717a2337..11c68560 100755 --- a/bin/install +++ b/bin/install @@ -77,7 +77,7 @@ To use a HTTP proxy, specify --proxy followed by the proxy server defined by http://hostname:port This install script needs Ruby version 2.x installed as a prerequisite. -Currently recommanded Ruby versions are 2.0.0, 2.1.8, 2.2.4 and 2.3.0. +Currently recommanded Ruby versions are 2.0.0, 2.1.8, 2.2.4, 2.3.0 and 2.4.0. If multiple Ruby versions are installed, the default ruby version will be used. If the default ruby version does not satisfy reqirement, the newest version will be used. If you do not have a supported Ruby version installed, please install one of them first. @@ -86,7 +86,7 @@ EOF end def supported_ruby_versions - ['2.3', '2.2', '2.1', '2.0'] + ['2.4', '2.3', '2.2', '2.1', '2.0'] end # check ruby version, only version 2.x works @@ -163,7 +163,7 @@ EOF # change interpreter when symlink /usr/bin/ruby2.x exists, but running with non-supported ruby version actual_ruby_version = RUBY_VERSION.split('.').map{|s|s.to_i} left_bound = '2.0.0'.split('.').map{|s|s.to_i} - right_bound = '2.3.1'.split('.').map{|s|s.to_i} + right_bound = '2.4.1'.split('.').map{|s|s.to_i} if (actual_ruby_version <=> left_bound) < 0 if(!@reexeced) @log.info("The current Ruby version is not 2.x! Restarting the installer with #{ruby_interpreter_path}") From 90d6e9ab62b191e59d6d94614dae9dff764d0fd1 Mon Sep 17 00:00:00 2001 From: Pat Allan Date: Fri, 28 Apr 2017 17:14:41 +1000 Subject: [PATCH 2/2] Update tests to run with ActiveSupport 5.1.0. --- test/instance_agent/agent/base_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/instance_agent/agent/base_test.rb b/test/instance_agent/agent/base_test.rb index 620092d5..e5f871ee 100644 --- a/test/instance_agent/agent/base_test.rb +++ b/test/instance_agent/agent/base_test.rb @@ -48,7 +48,7 @@ class InstanceAgentBaseTest < InstanceAgentTestCase @base.expects(:log).with { |v1, v2| v1.eql?(:error) && v2 =~ /Error during perform/ } assert_nothing_raised { @base.run } end - + should 'back off on repeated exceptions' do @base.stubs(:perform).raises Exception @base.expects(:sleep).with(any_of(9, 10))