diff options
author | Luke Kanies <luke@madstop.com> | 2007-11-28 16:06:45 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-11-28 16:06:45 -0600 |
commit | 421b3fce66db7ff69052bd666d20e746952bc52b (patch) | |
tree | bb3ca879f704ac22c3868e79118f97a636d5d4a4 | |
parent | 11ae473e3852adcc382a3efea2329586d2e4bcb3 (diff) | |
download | puppet-421b3fce66db7ff69052bd666d20e746952bc52b.tar.gz puppet-421b3fce66db7ff69052bd666d20e746952bc52b.tar.xz puppet-421b3fce66db7ff69052bd666d20e746952bc52b.zip |
Another backward compatibility patch, this time helping with a new server and old client
-rw-r--r-- | lib/puppet/transportable.rb | 2 | ||||
-rwxr-xr-x | spec/unit/other/transobject.rb | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/puppet/transportable.rb b/lib/puppet/transportable.rb index a448e28a5..cf92a3937 100644 --- a/lib/puppet/transportable.rb +++ b/lib/puppet/transportable.rb @@ -24,7 +24,7 @@ module Puppet end def initialize(name,type) - @type = type + @type = type.to_s.downcase @name = name @params = {} @tags = [] diff --git a/spec/unit/other/transobject.rb b/spec/unit/other/transobject.rb index 830d4923d..07ffdf8bd 100755 --- a/spec/unit/other/transobject.rb +++ b/spec/unit/other/transobject.rb @@ -9,6 +9,11 @@ describe Puppet::TransObject do resource = Puppet::TransObject.new("me", "foo::bar") resource.ref.should == 'Foo::Bar[me]' end + + it "should lower-case resource types for backward compatibility with 0.23.2" do + resource = Puppet::TransObject.new("me", "Foo") + resource.type.should == 'foo' + end end describe Puppet::TransObject, " when serializing" do @@ -63,7 +68,7 @@ describe Puppet::TransObject, " when converting to a RAL component instance" do end it "should use a new TransObject whose name is a resource reference of the type and title of the original TransObject" do - Puppet::Type::Component.expects(:create).with { |resource| resource.type == :component and resource.name == "One::Two[/my/file]" }.returns(:yay) + Puppet::Type::Component.expects(:create).with { |resource| resource.type == "component" and resource.name == "One::Two[/my/file]" }.returns(:yay) @resource.to_component.should == :yay end |