Giuseppe Lavagetto has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/359483 )

Change subject: utils/expanderrb.rb: fix Style/SpecialGlobalVars
......................................................................


utils/expanderrb.rb: fix Style/SpecialGlobalVars

Change-Id: I52960ceacad36e5f2d3ced92e7ec67ac3a9d9213
---
M .rubocop_todo.yml
M utils/expanderb.rb
2 files changed, 3 insertions(+), 6 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index c39ac895..03bb06f 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -36,10 +36,6 @@
 Layout/SpaceInsideHashLiteralBraces:
   Enabled: false
 
-Style/SpecialGlobalVars:
-  Exclude:
-    - 'utils/expanderb.rb'
-
 Style/StringLiterals:
   Enabled: false
 
diff --git a/utils/expanderb.rb b/utils/expanderb.rb
index 431c26a..cb2882f 100755
--- a/utils/expanderb.rb
+++ b/utils/expanderb.rb
@@ -12,6 +12,7 @@
 require 'optparse'
 require 'erb'
 require 'ostruct'
+require 'English'
 
 # Filename of the ERB template we are going to expand
 $filename = nil
@@ -41,7 +42,7 @@
   end
 rescue
   # Catch all
-  puts $!.to_s
+  puts $ERROR_INFO.to_s
   puts optparse
   exit
 end
@@ -65,5 +66,5 @@
   puts render_erb(File.read($filename), template_values)
 rescue
   p "Something went wrong, usually because you are missing a variable."
-  p $!.to_s
+  p $ERROR_INFO.to_s
 end

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

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

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

Reply via email to