Faidon Liambotis has submitted this change and it was merged.

Change subject: Revert "rubocop: Fixed Style/TrailingWhitespace offense"
......................................................................


Revert "rubocop: Fixed Style/TrailingWhitespace offense"

This is all for third-party code. We don't own this and we
should not unnecessarily deviate from upstream for e.g.
stylistic reasons.

This reverts commit c259aed94be6e91001bafb77efb95c33bf7ac1a3.

Change-Id: I9768145d0ec84d6fd33c9ae4b7e1911dacefb43a
---
M .rubocop_todo.yml
M modules/mysql/spec/defines/mysql_db_spec.rb
M modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb
M modules/stdlib/lib/puppet/parser/functions/abs.rb
M modules/stdlib/lib/puppet/parser/functions/chomp.rb
M modules/stdlib/lib/puppet/parser/functions/chop.rb
M modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb
M modules/stdlib/lib/puppet/parser/functions/parseyaml.rb
M modules/stdlib/lib/puppet/parser/functions/squeeze.rb
M modules/stdlib/lib/puppet/parser/functions/str2bool.rb
M modules/stdlib/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb
11 files changed, 28 insertions(+), 23 deletions(-)

Approvals:
  Faidon Liambotis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 69d68fc..2169a83 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -332,6 +332,11 @@
 Style/TrailingComma:
   Enabled: false
 
+# Offense count: 23
+# Cop supports --auto-correct.
+Style/TrailingWhitespace:
+  Enabled: false
+
 # Offense count: 1
 Style/UnlessElse:
   Enabled: false
diff --git a/modules/mysql/spec/defines/mysql_db_spec.rb 
b/modules/mysql/spec/defines/mysql_db_spec.rb
index 71374f7..55f5d9d 100644
--- a/modules/mysql/spec/defines/mysql_db_spec.rb
+++ b/modules/mysql/spec/defines/mysql_db_spec.rb
@@ -11,7 +11,7 @@
 
   it 'should report an error when ensure is not present or absent' do
     params.merge!({'ensure' => 'invalid_val'})
-    expect { subject }.to raise_error(Puppet::Error,
+    expect { subject }.to raise_error(Puppet::Error, 
       /invalid_val is not supported for ensure\. Allowed values are 'present' 
and 'absent'\./)
   end
 
@@ -33,7 +33,7 @@
     params.merge!({'sql' => 'test_sql', 'enforce_sql' => true})
     should contain_exec('test_db-import').with_refreshonly(false)
   end
-
+  
   it 'should not create database and database user' do
     params.merge!({'ensure' => 'absent', 'host' => 'localhost'})
     should contain_database('test_db').with_ensure('absent')
diff --git 
a/modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb 
b/modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb
index e4cdeb3..3efaf87 100644
--- a/modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb
+++ b/modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb
@@ -20,20 +20,20 @@
   it 'should query privilegess from the database' do
     provider_class.expects(:mysql) 
.with(["--defaults-file=#{root_home}/.my.cnf", 'mysql', '-Be', 'describe 
user']).returns <<-EOT
 Field  Type    Null    Key     Default Extra
-Host   char(60)        NO      PRI
-User   char(16)        NO      PRI
-Password       char(41)        NO
-Select_priv    enum('N','Y')   NO              N
-Insert_priv    enum('N','Y')   NO              N
+Host   char(60)        NO      PRI             
+User   char(16)        NO      PRI             
+Password       char(41)        NO                      
+Select_priv    enum('N','Y')   NO              N       
+Insert_priv    enum('N','Y')   NO              N       
 Update_priv    enum('N','Y')   NO              N
 EOT
     
provider_class.expects(:mysql).with(["--defaults-file=#{root_home}/.my.cnf", 
'mysql', '-Be', 'describe db']).returns <<-EOT
 Field  Type    Null    Key     Default Extra
-Host   char(60)        NO      PRI
-Db     char(64)        NO      PRI
-User   char(16)        NO      PRI
-Select_priv    enum('N','Y')   NO              N
-Insert_priv    enum('N','Y')   NO              N
+Host   char(60)        NO      PRI             
+Db     char(64)        NO      PRI             
+User   char(16)        NO      PRI             
+Select_priv    enum('N','Y')   NO              N       
+Insert_priv    enum('N','Y')   NO              N       
 Update_priv    enum('N','Y')   NO              N
 EOT
     provider_class.user_privs.should == [ 'Select_priv', 'Insert_priv', 
'Update_priv' ]
diff --git a/modules/stdlib/lib/puppet/parser/functions/abs.rb 
b/modules/stdlib/lib/puppet/parser/functions/abs.rb
index 11d2d7f..ade5462 100644
--- a/modules/stdlib/lib/puppet/parser/functions/abs.rb
+++ b/modules/stdlib/lib/puppet/parser/functions/abs.rb
@@ -4,7 +4,7 @@
 
 module Puppet::Parser::Functions
   newfunction(:abs, :type => :rvalue, :doc => <<-EOS
-    Returns the absolute value of a number, for example -34.56 becomes
+    Returns the absolute value of a number, for example -34.56 becomes 
     34.56. Takes a single integer and float value as an argument.
     EOS
   ) do |arguments|
diff --git a/modules/stdlib/lib/puppet/parser/functions/chomp.rb 
b/modules/stdlib/lib/puppet/parser/functions/chomp.rb
index 4564a00..c99d139 100644
--- a/modules/stdlib/lib/puppet/parser/functions/chomp.rb
+++ b/modules/stdlib/lib/puppet/parser/functions/chomp.rb
@@ -4,7 +4,7 @@
 
 module Puppet::Parser::Functions
   newfunction(:chomp, :type => :rvalue, :doc => <<-'EOS'
-    Removes the record separator from the end of a string or an array of
+    Removes the record separator from the end of a string or an array of 
     strings, for example `hello\n` becomes `hello`.
     Requires a single string or array as an input.
     EOS
diff --git a/modules/stdlib/lib/puppet/parser/functions/chop.rb 
b/modules/stdlib/lib/puppet/parser/functions/chop.rb
index f242af3..636b990 100644
--- a/modules/stdlib/lib/puppet/parser/functions/chop.rb
+++ b/modules/stdlib/lib/puppet/parser/functions/chop.rb
@@ -4,9 +4,9 @@
 
 module Puppet::Parser::Functions
   newfunction(:chop, :type => :rvalue, :doc => <<-'EOS'
-    Returns a new string with the last character removed. If the string ends
-    with `\r\n`, both characters are removed. Applying chop to an empty
-    string returns an empty string. If you wish to merely remove record
+    Returns a new string with the last character removed. If the string ends 
+    with `\r\n`, both characters are removed. Applying chop to an empty 
+    string returns an empty string. If you wish to merely remove record 
     separators then you should use the `chomp` function.
     Requires a string or array of strings as input.
     EOS
diff --git a/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb 
b/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb
index a90adab..b4a9a15 100644
--- a/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb
+++ b/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb
@@ -15,7 +15,7 @@
         "given #{arguments.size} for 1")
     end
 
-    begin
+    begin 
       ip = IPAddr.new(arguments[0])
     rescue ArgumentError
       return false
diff --git a/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb 
b/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb
index 53d54fa..e8ac8a4 100644
--- a/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb
+++ b/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb
@@ -4,7 +4,7 @@
 
 module Puppet::Parser::Functions
   newfunction(:parseyaml, :type => :rvalue, :doc => <<-EOS
-This function accepts YAML as a string and converts it into the correct
+This function accepts YAML as a string and converts it into the correct 
 Puppet structure.
     EOS
   ) do |arguments|
diff --git a/modules/stdlib/lib/puppet/parser/functions/squeeze.rb 
b/modules/stdlib/lib/puppet/parser/functions/squeeze.rb
index 81fadfd..65c174a 100644
--- a/modules/stdlib/lib/puppet/parser/functions/squeeze.rb
+++ b/modules/stdlib/lib/puppet/parser/functions/squeeze.rb
@@ -14,9 +14,9 @@
     end
 
     item = arguments[0]
-    squeezeval = arguments[1]
+    squeezeval = arguments[1] 
 
-    if item.is_a?(Array) then
+    if item.is_a?(Array) then  
       if squeezeval then
         item.collect { |i| i.squeeze(squeezeval) }
       else
diff --git a/modules/stdlib/lib/puppet/parser/functions/str2bool.rb 
b/modules/stdlib/lib/puppet/parser/functions/str2bool.rb
index 0509c2b..c320da6 100644
--- a/modules/stdlib/lib/puppet/parser/functions/str2bool.rb
+++ b/modules/stdlib/lib/puppet/parser/functions/str2bool.rb
@@ -4,7 +4,7 @@
 
 module Puppet::Parser::Functions
   newfunction(:str2bool, :type => :rvalue, :doc => <<-EOS
-This converts a string to a boolean. This attempt to convert strings that
+This converts a string to a boolean. This attempt to convert strings that 
 contain things like: y, 1, t, true to 'true' and strings that contain things
 like: 0, f, n, false, no to 'false'.
     EOS
diff --git 
a/modules/stdlib/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb 
b/modules/stdlib/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb
index 2577723..4eb799d 100644
--- a/modules/stdlib/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb
+++ b/modules/stdlib/spec/unit/puppet/parser/functions/fqdn_rotate_spec.rb
@@ -19,7 +19,7 @@
   end
 
   it "should rotate a string to give the same results for one host" do
-    scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.1").twice
+    scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.1").twice 
     scope.function_fqdn_rotate(["abcdefg"]).should 
eql(scope.function_fqdn_rotate(["abcdefg"]))
   end
 

-- 
To view, visit https://gerrit.wikimedia.org/r/226898
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9768145d0ec84d6fd33c9ae4b7e1911dacefb43a
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to