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 <top (required)>'
This commit is contained in:
Sergio Rubio
2012-09-24 20:07:51 +02:00
parent 05d44d8e78
commit b1192564ea

View File

@@ -1,3 +1,3 @@
[filter:cache]
use = egg:swift#memcache
memcache_servers = <%= memcache_servers.to_a.join(',') %>
memcache_servers = <%= [memcache_servers].flatten.join(',') %>