diff --git a/lib/puppet/provider/package/gem.rb b/lib/puppet/provider/package/gem.rb index f30507b769a..a13bbf35f00 100755 --- a/lib/puppet/provider/package/gem.rb +++ b/lib/puppet/provider/package/gem.rb @@ -72,8 +72,6 @@ def self.instances(justme = false) def install(useversion = true) command = [command(:gemcmd), "install"] command << "-v" << resource[:ensure] if (! resource[:ensure].is_a? Symbol) and useversion - # Always include dependencies - command << "--include-dependencies" if source = resource[:source] begin diff --git a/spec/unit/provider/package/gem_spec.rb b/spec/unit/provider/package/gem_spec.rb index 6f79b806fc9..02cb2cabdcb 100755 --- a/spec/unit/provider/package/gem_spec.rb +++ b/spec/unit/provider/package/gem_spec.rb @@ -29,23 +29,18 @@ provider.install end - it "should specify that dependencies should be included" do - provider.expects(:execute).with { |args| args[2] == "--include-dependencies" }.returns "" - provider.install - end - it "should specify that documentation should not be included" do - provider.expects(:execute).with { |args| args[3] == "--no-rdoc" }.returns "" + provider.expects(:execute).with { |args| args[2] == "--no-rdoc" }.returns "" provider.install end it "should specify that RI should not be included" do - provider.expects(:execute).with { |args| args[4] == "--no-ri" }.returns "" + provider.expects(:execute).with { |args| args[3] == "--no-ri" }.returns "" provider.install end it "should specify the package name" do - provider.expects(:execute).with { |args| args[5] == "myresource" }.returns "" + provider.expects(:execute).with { |args| args[4] == "myresource" }.returns "" provider.install end @@ -53,14 +48,14 @@ describe "as a normal file" do it "should use the file name instead of the gem name" do resource[:source] = "/my/file" - provider.expects(:execute).with { |args| args[3] == "/my/file" }.returns "" + provider.expects(:execute).with { |args| args[2] == "/my/file" }.returns "" provider.install end end describe "as a file url" do it "should use the file name instead of the gem name" do resource[:source] = "file:///my/file" - provider.expects(:execute).with { |args| args[3] == "/my/file" }.returns "" + provider.expects(:execute).with { |args| args[2] == "/my/file" }.returns "" provider.install end end @@ -73,7 +68,7 @@ describe "as a non-file and non-puppet url" do it "should treat the source as a gem repository" do resource[:source] = "http://host/my/file" - provider.expects(:execute).with { |args| args[3..5] == ["--source", "http://host/my/file", "myresource"] }.returns "" + provider.expects(:execute).with { |args| args[2..4] == ["--source", "http://host/my/file", "myresource"] }.returns "" provider.install end end