[Pkg-puppet-devel] [facter] 228/352: (FACT-321) Remove deprecated interpreter from resolution
Stig Sandbeck Mathisen
ssm at debian.org
Sun Apr 6 22:21:48 UTC 2014
This is an automated email from the git hooks/post-receive script.
ssm pushed a commit to branch master
in repository facter.
commit 3d11d4e42750f918136b1a5fa98dcecd38c0073e
Author: Adrien Thebo <git at somethingsinistral.net>
Date: Thu Feb 6 10:52:57 2014 -0800
(FACT-321) Remove deprecated interpreter from resolution
---
lib/facter/util/resolution.rb | 1 -
spec/unit/util/resolution_spec.rb | 22 ----------------------
2 files changed, 23 deletions(-)
diff --git a/lib/facter/util/resolution.rb b/lib/facter/util/resolution.rb
index 8dee32f..1607f1f 100644
--- a/lib/facter/util/resolution.rb
+++ b/lib/facter/util/resolution.rb
@@ -98,7 +98,6 @@ class Facter::Util::Resolution
def setcode(string = nil, &block)
if string
@code = string
- @interpreter = interp || INTERPRETER
else
unless block_given?
raise ArgumentError, "You must pass either code or a block"
diff --git a/spec/unit/util/resolution_spec.rb b/spec/unit/util/resolution_spec.rb
index 4e4b3f9..17e0688 100755
--- a/spec/unit/util/resolution_spec.rb
+++ b/spec/unit/util/resolution_spec.rb
@@ -24,34 +24,12 @@ describe Facter::Util::Resolution do
Facter::Util::Resolution.new("yay").code.should be_nil
end
- it "should default to nil for interpreter" do
- Facter.expects(:warnonce).with("The 'Facter::Util::Resolution.interpreter' method is deprecated and will be removed in a future version.")
- Facter::Util::Resolution.new("yay").interpreter.should be_nil
- end
-
describe "when setting the code" do
before do
Facter.stubs(:warnonce)
@resolve = Facter::Util::Resolution.new("yay")
end
- it "should deprecate the interpreter argument to 'setcode'" do
- Facter.expects(:warnonce).with("The interpreter parameter to 'setcode' is deprecated and will be removed in a future version.")
- @resolve.setcode "foo", "bar"
- @resolve.interpreter.should == "bar"
- end
-
- it "should deprecate the interpreter= method" do
- Facter.expects(:warnonce).with("The 'Facter::Util::Resolution.interpreter=' method is deprecated and will be removed in a future version.")
- @resolve.interpreter = "baz"
- @resolve.interpreter.should == "baz"
- end
-
- it "should deprecate the interpreter method" do
- Facter.expects(:warnonce).with("The 'Facter::Util::Resolution.interpreter' method is deprecated and will be removed in a future version.")
- @resolve.interpreter
- end
-
it "should set the code to any provided string" do
@resolve.setcode "foo"
@resolve.code.should == "foo"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git
More information about the Pkg-puppet-devel
mailing list