From c24dc9b10a24cc6c78ebb1f2ccb9a2129dd83a42 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Tue, 27 Jan 2015 01:41:12 -0800 Subject: normalized %-formatted tokens [git-p4: depot-paths = "//src/hoe/dev/": change = 9955] --- lib/hoe.rb | 8 ++++---- lib/hoe/clean.rb | 4 ++-- lib/hoe/newb.rb | 2 +- lib/hoe/publish.rb | 2 +- lib/hoe/test.rb | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/hoe.rb b/lib/hoe.rb index 3fa1f0c..cc22b71 100644 --- a/lib/hoe.rb +++ b/lib/hoe.rb @@ -103,7 +103,7 @@ class Hoe RUBY_DEBUG = ENV["RUBY_DEBUG"] - default_ruby_flags = "-w -I#{%w(lib bin test .).join(File::PATH_SEPARATOR)}" + + default_ruby_flags = "-w -I#{%w[lib bin test .].join(File::PATH_SEPARATOR)}" + (RUBY_DEBUG ? " #{RUBY_DEBUG}" : "") ## @@ -626,7 +626,7 @@ class Hoe self.author = [] self.changes = nil self.description = nil - self.description_sections = %w(description) + self.description_sections = %w[description] self.email = [] self.extra_deps = [] self.extra_dev_deps = [] @@ -850,7 +850,7 @@ class Hoe # Verify that mandatory fields are set. def validate_fields - %w(email author).each do |field| + %w[email author].each do |field| value = self.send(field) abort "Hoe #{field} value not set. aborting" if value.nil? or value.empty? end @@ -889,7 +889,7 @@ class File if r19 then f.read else - f.read.sub %r/\A\xEF\xBB\xBF/, "" + f.read.sub %r%\A\xEF\xBB\xBF%, "" end end end diff --git a/lib/hoe/clean.rb b/lib/hoe/clean.rb index de98bde..32401db 100644 --- a/lib/hoe/clean.rb +++ b/lib/hoe/clean.rb @@ -15,8 +15,8 @@ module Hoe::Clean # Initialize variables for plugin. def initialize_clean - self.clean_globs ||= %w(diff diff.txt TAGS ri deps .source_index - *.gem **/*~ **/.*~ **/*.rbc coverage*) + self.clean_globs ||= %w[diff diff.txt TAGS ri deps .source_index + *.gem **/*~ **/.*~ **/*.rbc coverage*] end ## diff --git a/lib/hoe/newb.rb b/lib/hoe/newb.rb index e731386..bde8ec3 100644 --- a/lib/hoe/newb.rb +++ b/lib/hoe/newb.rb @@ -9,7 +9,7 @@ module Hoe::Newb # define tasks for the newb plugin def define_newb_tasks desc "Install deps, generate docs, run tests/specs." - task :newb => %w(check_extra_deps install_plugins docs default) do + task :newb => %w[check_extra_deps install_plugins docs default] do puts <<-END GOOD TO GO! Tests are passing, docs are generated, diff --git a/lib/hoe/publish.rb b/lib/hoe/publish.rb index e097da5..b855199 100644 --- a/lib/hoe/publish.rb +++ b/lib/hoe/publish.rb @@ -160,7 +160,7 @@ module Hoe::Publish def publish_docs_task # :nodoc: warn "no rdoc_location values" if rdoc_locations.empty? self.rdoc_locations.each do |dest| - sh %{rsync #{rsync_args} #{local_rdoc_dir}/ #{dest}} + sh %(rsync #{rsync_args} #{local_rdoc_dir}/ #{dest}) end end diff --git a/lib/hoe/test.rb b/lib/hoe/test.rb index 880630f..e766b60 100644 --- a/lib/hoe/test.rb +++ b/lib/hoe/test.rb @@ -65,7 +65,7 @@ module Hoe::Test self.multiruby_skip ||= [] self.testlib ||= :minitest self.test_prelude ||= nil - self.rspec_dirs ||= %w(spec lib) + self.rspec_dirs ||= %w[spec lib] self.rspec_options ||= [] end @@ -156,7 +156,7 @@ module Hoe::Test desc "Run ZenTest against the package." task :audit do - libs = %w(lib test ext).join(File::PATH_SEPARATOR) + libs = %w[lib test ext].join(File::PATH_SEPARATOR) sh "zentest -I=#{libs} #{spec.files.grep(/^(lib|test)/).join(' ')}" end end -- cgit v1.2.1