aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-support/puppet/puppet/maint-Change-spec-test-to-pass-on-ruby-2.2.patch
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2015-08-20 16:14:01 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2015-08-20 22:55:18 -0400
commit2b9a979b624eeb2fa9efdc64ebe5670498b044d7 (patch)
tree73d2226d6d0a78efcdbf7e0770271017b9f78540 /recipes-support/puppet/puppet/maint-Change-spec-test-to-pass-on-ruby-2.2.patch
parentdcb148f4ccfa5896ebffaf4eb8b76a9999173faa (diff)
downloadmeta-cloud-services-2b9a979b624eeb2fa9efdc64ebe5670498b044d7.tar.gz
meta-cloud-services-2b9a979b624eeb2fa9efdc64ebe5670498b044d7.tar.bz2
meta-cloud-services-2b9a979b624eeb2fa9efdc64ebe5670498b044d7.zip
puppet: back-port some patches to fix issues with Ruby >= 2.0.0
We should uprev puppet at some point but for the sake of stabilizing first the following set of patches will allow puppet to work with the newer version of Ruby that we are using. The first two are upstream commits and the third is a commit which borrows a fix found in various puppet forks (repos which people host to stabalize older versions of puppet). With these patches puppet can now execute commands like 'help' and 'apply' without falling over. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-support/puppet/puppet/maint-Change-spec-test-to-pass-on-ruby-2.2.patch')
-rw-r--r--recipes-support/puppet/puppet/maint-Change-spec-test-to-pass-on-ruby-2.2.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes-support/puppet/puppet/maint-Change-spec-test-to-pass-on-ruby-2.2.patch b/recipes-support/puppet/puppet/maint-Change-spec-test-to-pass-on-ruby-2.2.patch
new file mode 100644
index 0000000..73e1769
--- /dev/null
+++ b/recipes-support/puppet/puppet/maint-Change-spec-test-to-pass-on-ruby-2.2.patch
@@ -0,0 +1,37 @@
+From d183826136ca77847da5f3e460f2e460faabc5be Mon Sep 17 00:00:00 2001
+From: Kylo Ginsberg <kylo@puppetlabs.com>
+Date: Mon, 22 Dec 2014 10:11:38 -0800
+Subject: [PATCH] (maint) Change spec test to pass on ruby 2.2
+
+commit d183826136ca77847da5f3e460f2e460faabc5be from
+https://github.com/puppetlabs/puppet.git
+
+Prior to this change, this spec test failed on ruby 2.2.0-rc1 with:
+
+ Failure/Error: Time.stubs(:now).returns(Time.parse("2011-01-06 12:00:00 UTC"))
+ NoMethodError:
+ undefined method `utc_offset' for nil:NilClass
+
+I didn't track down the root cause of this failure, but just
+normalized this stub to use Time.utc, which (along with Time.local)
+is the more common way of stubbing Time objects in the codebase.
+---
+ spec/unit/reports/store_spec.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/spec/unit/reports/store_spec.rb b/spec/unit/reports/store_spec.rb
+index 7f94f7d..f56eccd 100755
+--- a/spec/unit/reports/store_spec.rb
++++ b/spec/unit/reports/store_spec.rb
+@@ -24,7 +24,7 @@ describe processor do
+ end
+
+ it "should write the report to the file in YAML" do
+- Time.stubs(:now).returns(Time.parse("2011-01-06 12:00:00 UTC"))
++ Time.stubs(:now).returns(Time.utc(2011,01,06,12,00,00))
+ @report.process
+
+ File.read(File.join(Puppet[:reportdir], @report.host, "201101061200.yaml")).should == @report.to_yaml
+--
+2.1.4
+