From b1192564ea0db05febea6ea9cb25350b9ecc1b77 Mon Sep 17 00:00:00 2001 From: Sergio Rubio Date: Mon, 24 Sep 2012 20:07:51 +0200 Subject: [PATCH] String no longer has '.to_a', fixes compatibility with ruby 1.9, I believe the following patch fixes compat with ruby 1.9 while preserving behaviour. The following test was broken: 1) swift::proxy::cache with overridden memcache server Failure/Error: it { should contain_file(fragment_file).with_content(/memcache_servers = 10\.0\.0\.1:1/) } Puppet::Error: Failed to parse template swift/proxy/cache.conf.erb: Filepath: /tmp/puppetlabs-swift/spec/fixtures/modules/swift/templates/proxy/cache.conf.erb Line: 3 Detail: undefined method `to_a' for "10.0.0.1:1":String at /tmp/puppetlabs-swift/spec/fixtures/modules/swift/manifests/proxy/cache.pp:32 on node blueleaf # ./spec/classes/swift_proxy_cache_spec.rb:39:in `block (3 levels) in ' --- templates/proxy/cache.conf.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/proxy/cache.conf.erb b/templates/proxy/cache.conf.erb index 70c707c6..6348fd02 100644 --- a/templates/proxy/cache.conf.erb +++ b/templates/proxy/cache.conf.erb @@ -1,3 +1,3 @@ [filter:cache] use = egg:swift#memcache -memcache_servers = <%= memcache_servers.to_a.join(',') %> +memcache_servers = <%= [memcache_servers].flatten.join(',') %>