summaryrefslogtreecommitdiffstats
path: root/lib/puppet/indirector
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-02-02 16:18:22 -0800
committerMatt Robinson <matt@puppetlabs.com>2011-02-02 16:18:22 -0800
commit876d0503dd93329a73e7f335c10a47330d745293 (patch)
treee8055300f7d3ac1d3b3a04aed1fab18dbba8789e /lib/puppet/indirector
parent517c6794606e9adde7f2912d3b949cfcc18a446a (diff)
parent2a94c61e6c94b1167ea7b858dc184f9f77a7bfc5 (diff)
downloadpuppet-876d0503dd93329a73e7f335c10a47330d745293.tar.gz
puppet-876d0503dd93329a73e7f335c10a47330d745293.tar.xz
puppet-876d0503dd93329a73e7f335c10a47330d745293.zip
Merge branch '2.6.next' into 2.6.x
* 2.6.next: (46 commits) Augmentation of tests for prior commit Fix to fix for #5755 -- backref serialization issues in zaml Fixed #5564 - Added some more fqdn_rand documentation Fixed #4968 - Updated list of options turned on by --test in documentation (#5061) - allow special hostclass/define variables to be evaluated as defaults. (#6107) Fix an error when auditing a file with empty content Remove already initialized constant warning from file_spec.rb tests (#5566) Treat source only File checksums as syntax errors when used with content Rename variable used in File type validation to be more clear Remove invalid "timestamp" and "time", and add missing "ctime" File checksum types. Remove order dependency when specifying source and checksum on File type Bug #5755 -- ZAML generates extra newline in some hash backreferences. bug #5681 -- code fix to handle AIX mount output Bug #5681 -- parse AIX mount command output. Spec for #5681 to allow parsing of AIX mount output in mount provider Fixed #6091 - Changed POSIX path matching to allow multiple leading slashes Bug #6091 -- test leading double-slash in filenames are allowed. Fixed #6071 - Fixed typo and improved exec path error message Fixed #6061 - Allowed -1 as password min/max age Bug #6061 -- verify that negative {min,max}_password_age are accepted. ...
Diffstat (limited to 'lib/puppet/indirector')
-rw-r--r--lib/puppet/indirector/resource/ral.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/puppet/indirector/resource/ral.rb b/lib/puppet/indirector/resource/ral.rb
index 1c2ab14ae..bc41d14ae 100644
--- a/lib/puppet/indirector/resource/ral.rb
+++ b/lib/puppet/indirector/resource/ral.rb
@@ -34,12 +34,17 @@ class Puppet::Resource::Ral < Puppet::Indirector::Code
private
+ # {type,resource}_name: the resource name may contain slashes:
+ # File["/etc/hosts"]. To handle, assume the type name does
+ # _not_ have any slashes in it, and split only on the first.
+
def type_name( request )
- request.key.split('/')[0]
+ request.key.split('/', 2)[0]
end
def resource_name( request )
- request.key.split('/')[1]
+ name = request.key.split('/', 2)[1]
+ name unless name == ""
end
def type( request )