diff options
| author | Markus Roberts <Markus@reality.com> | 2010-07-09 18:07:15 -0700 |
|---|---|---|
| committer | Markus Roberts <Markus@reality.com> | 2010-07-09 18:07:15 -0700 |
| commit | 543225970225de5697734bfaf0a6eee996802c04 (patch) | |
| tree | ecc6f639c43cf1812e64f9c6ce7eacc0922b57ff /spec/unit/parser/functions | |
| parent | 8f15707251cdb58d53e82c4bbd332a38c2d31b4c (diff) | |
Code smell: Avoid needless decorations
* Replaced 704 occurances of (.*)\b([a-z_]+)\(\) with \1\2
3 Examples:
The code:
ctx = OpenSSL::SSL::SSLContext.new()
becomes:
ctx = OpenSSL::SSL::SSLContext.new
The code:
skip()
becomes:
skip
The code:
path = tempfile()
becomes:
path = tempfile
* Replaced 31 occurances of ^( *)end *#.* with \1end
3 Examples:
The code:
becomes:
The code:
end # Dir.foreach
becomes:
end
The code:
end # def
becomes:
end
Diffstat (limited to 'spec/unit/parser/functions')
| -rw-r--r-- | spec/unit/parser/functions/fqdn_rand_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/generate_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/inline_template_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/realize_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/regsubst_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/require_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/shellquote_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/split_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/sprintf_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/tag_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/template_spec.rb | 2 | ||||
| -rwxr-xr-x | spec/unit/parser/functions/versioncmp_spec.rb | 2 |
12 files changed, 12 insertions, 12 deletions
diff --git a/spec/unit/parser/functions/fqdn_rand_spec.rb b/spec/unit/parser/functions/fqdn_rand_spec.rb index cde899eef..07390ed42 100644 --- a/spec/unit/parser/functions/fqdn_rand_spec.rb +++ b/spec/unit/parser/functions/fqdn_rand_spec.rb @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' describe "the fqdn_rand function" do before :each do - @scope = Puppet::Parser::Scope.new() + @scope = Puppet::Parser::Scope.new end it "should exist" do diff --git a/spec/unit/parser/functions/generate_spec.rb b/spec/unit/parser/functions/generate_spec.rb index 75a5d6dac..27a11aabf 100755 --- a/spec/unit/parser/functions/generate_spec.rb +++ b/spec/unit/parser/functions/generate_spec.rb @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' describe "the generate function" do before :each do - @scope = Puppet::Parser::Scope.new() + @scope = Puppet::Parser::Scope.new end it "should exist" do diff --git a/spec/unit/parser/functions/inline_template_spec.rb b/spec/unit/parser/functions/inline_template_spec.rb index 19e1a3b2a..1da85513a 100755 --- a/spec/unit/parser/functions/inline_template_spec.rb +++ b/spec/unit/parser/functions/inline_template_spec.rb @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' describe "the inline_template function" do before :each do - @scope = Puppet::Parser::Scope.new() + @scope = Puppet::Parser::Scope.new end it "should exist" do diff --git a/spec/unit/parser/functions/realize_spec.rb b/spec/unit/parser/functions/realize_spec.rb index d9c94b143..4a55ad417 100755 --- a/spec/unit/parser/functions/realize_spec.rb +++ b/spec/unit/parser/functions/realize_spec.rb @@ -6,7 +6,7 @@ describe "the realize function" do before :each do @collector = stub_everything 'collector' - @scope = Puppet::Parser::Scope.new() + @scope = Puppet::Parser::Scope.new @compiler = stub 'compiler' @compiler.stubs(:add_collection).with(@collector) @scope.stubs(:compiler).returns(@compiler) diff --git a/spec/unit/parser/functions/regsubst_spec.rb b/spec/unit/parser/functions/regsubst_spec.rb index 6ff619f8d..d87b4d9ab 100755 --- a/spec/unit/parser/functions/regsubst_spec.rb +++ b/spec/unit/parser/functions/regsubst_spec.rb @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' describe "the regsubst function" do before :each do - @scope = Puppet::Parser::Scope.new() + @scope = Puppet::Parser::Scope.new end it "should exist" do diff --git a/spec/unit/parser/functions/require_spec.rb b/spec/unit/parser/functions/require_spec.rb index 45769ccbe..48769d16c 100755 --- a/spec/unit/parser/functions/require_spec.rb +++ b/spec/unit/parser/functions/require_spec.rb @@ -8,7 +8,7 @@ describe "the require function" do @catalog = stub 'catalog' @compiler = stub 'compiler', :catalog => @catalog - @scope = Puppet::Parser::Scope.new() + @scope = Puppet::Parser::Scope.new @scope.stubs(:findresource) @scope.stubs(:compiler).returns(@compiler) @klass = stub 'class', :name => "myclass" diff --git a/spec/unit/parser/functions/shellquote_spec.rb b/spec/unit/parser/functions/shellquote_spec.rb index 8286be32e..e4eeaeba8 100755 --- a/spec/unit/parser/functions/shellquote_spec.rb +++ b/spec/unit/parser/functions/shellquote_spec.rb @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' describe "the shellquote function" do before :each do - @scope = Puppet::Parser::Scope.new() + @scope = Puppet::Parser::Scope.new end it "should exist" do diff --git a/spec/unit/parser/functions/split_spec.rb b/spec/unit/parser/functions/split_spec.rb index 3d0240af4..d76c253b0 100755 --- a/spec/unit/parser/functions/split_spec.rb +++ b/spec/unit/parser/functions/split_spec.rb @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' describe "the split function" do before :each do - @scope = Puppet::Parser::Scope.new() + @scope = Puppet::Parser::Scope.new end it "should exist" do diff --git a/spec/unit/parser/functions/sprintf_spec.rb b/spec/unit/parser/functions/sprintf_spec.rb index 71921e0e0..3795479e4 100755 --- a/spec/unit/parser/functions/sprintf_spec.rb +++ b/spec/unit/parser/functions/sprintf_spec.rb @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' describe "the sprintf function" do before :each do - @scope = Puppet::Parser::Scope.new() + @scope = Puppet::Parser::Scope.new end it "should exist" do diff --git a/spec/unit/parser/functions/tag_spec.rb b/spec/unit/parser/functions/tag_spec.rb index 5fb467e59..4f08afedf 100755 --- a/spec/unit/parser/functions/tag_spec.rb +++ b/spec/unit/parser/functions/tag_spec.rb @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' describe "the 'tag' function" do before :each do - @scope = Puppet::Parser::Scope.new() + @scope = Puppet::Parser::Scope.new end it "should exist" do diff --git a/spec/unit/parser/functions/template_spec.rb b/spec/unit/parser/functions/template_spec.rb index 8fc64d0c3..87c7d5d24 100755 --- a/spec/unit/parser/functions/template_spec.rb +++ b/spec/unit/parser/functions/template_spec.rb @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' describe "the template function" do before :each do - @scope = Puppet::Parser::Scope.new() + @scope = Puppet::Parser::Scope.new end it "should exist" do diff --git a/spec/unit/parser/functions/versioncmp_spec.rb b/spec/unit/parser/functions/versioncmp_spec.rb index 0595f8711..d57ea57ad 100755 --- a/spec/unit/parser/functions/versioncmp_spec.rb +++ b/spec/unit/parser/functions/versioncmp_spec.rb @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' describe "the versioncmp function" do before :each do - @scope = Puppet::Parser::Scope.new() + @scope = Puppet::Parser::Scope.new end it "should exist" do |
