summaryrefslogtreecommitdiffstats
path: root/lib/puppet/rails/rails_resource.rb
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-05-26 13:32:11 -0700
committerNick Lewis <nick@puppetlabs.com>2011-05-26 13:32:11 -0700
commit9f6dec267467334dcc5e1157b9dce57a325cbb73 (patch)
tree23e0e0ea83e11b7a0abf34855a9754407ca2bd40 /lib/puppet/rails/rails_resource.rb
parent76ad2bb2ea14a915344acd19da2c8a1edb3067b0 (diff)
downloadpuppet-9f6dec267467334dcc5e1157b9dce57a325cbb73.tar.gz
puppet-9f6dec267467334dcc5e1157b9dce57a325cbb73.tar.xz
puppet-9f6dec267467334dcc5e1157b9dce57a325cbb73.zip
(#7681) Allow array variables as resource references
The commit df088c9ba16dce50c17a79920c1ac186db67b9e9 introduced a regression where $files = ["/tmp/one", "/tmp/two"] file { "/tmp/one": content => "one", } file { "/tmp/two": content => "two", } file { "/tmp/three": content => "three", require => File[$files], } no longer worked. File[$files] was concatenating the elements of $files to create a single title, instead of expanding to multiple File dependencies. Since resource reference titles are implicitly wrapped in an array, if one of the elements of that array is a variable containing an array, the list of titles is a nested array. Prior to the change causing the regression, we would flatten arrays when evaluating them, under certain circumstances. We no longer ever flatten AST arrays when evaluating them, so anywhere that we really do need a flattened array, we have to manually flatten it. ResourceReference expects its list of titles to be a single, flat list of titles, so we have to make it so. Paired-with: Jacob Helwig <jacob@puppetlabs.com>
Diffstat (limited to 'lib/puppet/rails/rails_resource.rb')
0 files changed, 0 insertions, 0 deletions