summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRyan Davis <ryand@zenspider.com>2015-01-27 01:24:11 -0800
committerRyan Davis <ryand@zenspider.com>2015-01-27 01:24:11 -0800
commit3c6bdcdbe46426545334762d0b1cd0c6ecb6ecf1 (patch)
treeb71cae0a123ece9a3c4c937a70e2ffc3858c3a1b /lib
parentf01396e8c70c70933b1b24d4e387a40a3daed6b0 (diff)
downloadhoe-3c6bdcdbe46426545334762d0b1cd0c6ecb6ecf1.tar.gz
converted everything to double quoted strings
[git-p4: depot-paths = "//src/hoe/dev/": change = 9954]
Diffstat (limited to 'lib')
-rw-r--r--lib/hoe.rb58
-rw-r--r--lib/hoe/clean.rb2
-rw-r--r--lib/hoe/debug.rb24
-rw-r--r--lib/hoe/deps.rb24
-rw-r--r--lib/hoe/flay.rb2
-rw-r--r--lib/hoe/flog.rb2
-rw-r--r--lib/hoe/gemcutter.rb2
-rw-r--r--lib/hoe/inline.rb14
-rw-r--r--lib/hoe/package.rb22
-rw-r--r--lib/hoe/publish.rb44
-rw-r--r--lib/hoe/racc.rb2
-rw-r--r--lib/hoe/signing.rb20
-rw-r--r--lib/hoe/test.rb22
13 files changed, 119 insertions, 119 deletions
diff --git a/lib/hoe.rb b/lib/hoe.rb
index 609972f..3fa1f0c 100644
--- a/lib/hoe.rb
+++ b/lib/hoe.rb
@@ -1,24 +1,24 @@
# -*- mode: ruby; coding: us-ascii; -*-
-require 'rubygems'
+require "rubygems"
begin
- gem 'rake'
+ gem "rake"
rescue Gem::LoadError
warn "Using the crusty system installed rake... you probably want to upgrade"
end
-require 'rake'
-require 'rake/testtask'
-require 'rbconfig'
+require "rake"
+require "rake/testtask"
+require "rbconfig"
begin
- require 'psych'
+ require "psych"
rescue LoadError
# do nothing
end
-require 'yaml'
+require "yaml"
-require 'hoe/rake'
+require "hoe/rake"
##
# Hoe is a simple rake/rubygems helper for project Rakefiles. It helps
@@ -101,15 +101,15 @@ class Hoe
##
# Used to add extra flags to RUBY_FLAGS.
- RUBY_DEBUG = ENV['RUBY_DEBUG']
+ RUBY_DEBUG = ENV["RUBY_DEBUG"]
default_ruby_flags = "-w -I#{%w(lib bin test .).join(File::PATH_SEPARATOR)}" +
- (RUBY_DEBUG ? " #{RUBY_DEBUG}" : '')
+ (RUBY_DEBUG ? " #{RUBY_DEBUG}" : "")
##
# Used to specify flags to ruby [has smart default].
- RUBY_FLAGS = ENV['RUBY_FLAGS'] || default_ruby_flags
+ RUBY_FLAGS = ENV["RUBY_FLAGS"] || default_ruby_flags
##
# Default configuration values for .hoerc. Plugins should populate
@@ -122,7 +122,7 @@ class Hoe
##
# True if you're a masochistic developer. Used for building commands.
- WINDOZE = RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
+ WINDOZE = RbConfig::CONFIG["host_os"] =~ /mswin|mingw/
##
# *MANDATORY*: The author(s) of the package. (can be array)
@@ -343,11 +343,11 @@ class Hoe
# Test klass names are same as Klass with Test prepended to each part.
def self.normalize_names project # :nodoc:
- project = project.gsub(/([A-Z])/, '_\1').downcase.sub(/^_/, '')
+ project = project.gsub(/([A-Z])/, '_\1').downcase.sub(/^_/, "")
klass = project.gsub(/(?:^|_)([a-z])/) { $1.upcase }
klass = klass. gsub(/(?:^|-)([a-z])/) { "::#{$1.upcase}" }
test_klass = klass. gsub(/(^|::)([A-Z])/) { "#{$1}Test#{$2}" }
- file_name = project.gsub(/-/, '/')
+ file_name = project.gsub(/-/, "/")
return project, file_name, klass, test_klass
end
@@ -396,7 +396,7 @@ class Hoe
def activate_plugins
with_config do |config, _|
- config_plugins = config['plugins']
+ config_plugins = config["plugins"]
break unless config_plugins
Hoe.plugins.concat config_plugins.map { |plugin| plugin.intern }
end
@@ -471,7 +471,7 @@ class Hoe
self.extra_dev_deps = normalize_deps extra_dev_deps
case name
- when 'hoe' then
+ when "hoe" then
dependency "rake", [">= 0.8", "< 11.0"]
else
version = VERSION.split(/\./).first(2).join(".")
@@ -499,7 +499,7 @@ class Hoe
# Returns the proper dependency list for the thingy.
def dependency_target
- self.name == 'hoe' ? extra_deps : extra_dev_deps
+ self.name == "hoe" ? extra_deps : extra_dev_deps
end
##
@@ -507,7 +507,7 @@ class Hoe
def define_spec
self.spec = Gem::Specification.new do |s|
- dirs = Dir['lib']
+ dirs = Dir["lib"]
manifest = read_manifest
@@ -535,7 +535,7 @@ class Hoe
s.executables = s.files.grep(/^bin/) { |f| File.basename(f) }
s.bindir = "bin"
s.require_paths = dirs unless dirs.empty?
- s.rdoc_options = ['--main', readme_file]
+ s.rdoc_options = ["--main", readme_file]
s.post_install_message = post_install_message
missing "Manifest.txt" if s.files.empty?
@@ -638,8 +638,8 @@ class Hoe
self.spec_extras = {}
self.summary = nil
self.summary_sentences = 1
- self.test_globs = ['test/**/{test,spec}_*.rb',
- 'test/**/*_{test,spec}.rb']
+ self.test_globs = ["test/**/{test,spec}_*.rb",
+ "test/**/*_{test,spec}.rb"]
if manifest = read_manifest then
self.readme_file = manifest.grep(/^README\./).first
@@ -657,11 +657,11 @@ class Hoe
def intuit_values
header_re = /^((?:=+|#+) .*)$/
- readme = File.read_utf(readme_file).split(header_re)[1..-1] rescue ''
+ readme = File.read_utf(readme_file).split(header_re)[1..-1] rescue ""
unless readme.empty? then
sections = Hash[*readme.map { |s|
- s =~ /^[=#]/ ? s.strip.downcase.chomp(':').split.last : s.strip
+ s =~ /^[=#]/ ? s.strip.downcase.chomp(":").split.last : s.strip
}]
desc = sections.values_at(*description_sections).join("\n\n")
summ = desc.split(/\.\s+/).first(summary_sentences).join(". ")
@@ -679,7 +679,7 @@ class Hoe
h.split(/^(={2,}|\#{2,})/)[1..2].join.strip
rescue
missing history_file
- ''
+ ""
end
end
@@ -703,7 +703,7 @@ class Hoe
def parse_urls text
- lines = text.gsub(/^\* /, '').delete("<>").split(/\n/).grep(/\S+/)
+ lines = text.gsub(/^\* /, "").delete("<>").split(/\n/).grep(/\S+/)
if lines.first =~ /::/ then
Hash[lines.map { |line| line.split(/\s*::\s*/) }]
@@ -780,7 +780,7 @@ class Hoe
def pluggable!
abort "update rubygems to >= 1.3.1" unless Gem.respond_to? :find_files
- require_rubygems_version '>= 1.3.1'
+ require_rubygems_version ">= 1.3.1"
end
##
@@ -837,7 +837,7 @@ class Hoe
# 12/31 of the current year.
def timebomb n, m, finis = nil, start = nil
- require 'time'
+ require "time"
finis = Time.parse(finis || "#{Time.now.year}-12-31")
start = Time.parse(start || "#{Time.now.year}-01-01")
rest = (finis - Time.now)
@@ -869,7 +869,7 @@ class Hoe
config = config.merge homeconfig
- localrc = File.join Dir.pwd, '.hoerc'
+ localrc = File.join Dir.pwd, ".hoerc"
exists = File.exist? localrc
localconfig = exists ? YAML.load_file(localrc) : {}
@@ -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 1fdeafa..de98bde 100644
--- a/lib/hoe/clean.rb
+++ b/lib/hoe/clean.rb
@@ -23,7 +23,7 @@ module Hoe::Clean
# Define tasks for plugin.
def define_clean_tasks
- desc 'Clean up all the extras.'
+ desc "Clean up all the extras."
task :clean => [ :clobber_docs, :clobber_package ] do
clean_globs.each do |pattern|
files = Dir[pattern]
diff --git a/lib/hoe/debug.rb b/lib/hoe/debug.rb
index 93cea64..8bfdcf1 100644
--- a/lib/hoe/debug.rb
+++ b/lib/hoe/debug.rb
@@ -16,12 +16,12 @@ module Hoe::Debug
# :stopdoc:
DIFF = if Hoe::WINDOZE
- 'diff.exe'
+ "diff.exe"
else
if system("gdiff", __FILE__, __FILE__)
- 'gdiff' # solaris and kin suck
+ "gdiff" # solaris and kin suck
else
- 'diff'
+ "diff"
end
end unless defined? DIFF
@@ -31,31 +31,31 @@ module Hoe::Debug
# Define tasks for plugin.
def define_debug_tasks
- desc 'Create a fresh ~/.hoerc file.'
+ desc "Create a fresh ~/.hoerc file."
task :config_hoe do
with_config do |config, path|
File.open(path, "w") do |f|
YAML.dump(Hoe::DEFAULT_CONFIG.merge(config), f)
end
- editor = ENV['EDITOR'] || 'vi'
- system "#{editor} #{path}" if ENV['SHOW_EDITOR'] != 'no'
+ editor = ENV["EDITOR"] || "vi"
+ system "#{editor} #{path}" if ENV["SHOW_EDITOR"] != "no"
end
end
- desc 'Verify the manifest.'
+ desc "Verify the manifest."
task :check_manifest => :clean do
check_manifest
end
- desc 'Show information about the gem.'
+ desc "Show information about the gem."
task :debug_gem do
puts spec.to_ruby
end
task :isolate # stub
task :irb => :isolate do
- name = spec.name.gsub("-", '/')
+ name = spec.name.gsub("-", "/")
file = (spec.files.grep(/^lib\/#{name}\.rb$/).first ||
spec.files.grep(/^lib\/[^\/]*\.rb$/).first)
@@ -71,12 +71,12 @@ module Hoe::Debug
def check_manifest
f = "Manifest.tmp"
- require 'find'
+ require "find"
files = []
with_config do |config, _|
exclusions = config["exclude"]
- Find.find '.' do |path|
+ Find.find "." do |path|
next unless File.file? path
next if path =~ exclusions
files << path[2..-1]
@@ -84,7 +84,7 @@ module Hoe::Debug
files = files.sort.join "\n"
- File.open f, 'w' do |fp| fp.puts files end
+ File.open f, "w" do |fp| fp.puts files end
verbose = { :verbose => Rake.application.options.verbose }
diff --git a/lib/hoe/deps.rb b/lib/hoe/deps.rb
index e3cd55e..03229e8 100644
--- a/lib/hoe/deps.rb
+++ b/lib/hoe/deps.rb
@@ -1,5 +1,5 @@
-require 'rubygems/remote_fetcher'
-require 'uri'
+require "rubygems/remote_fetcher"
+require "uri"
##
# Deps plugin for hoe.
@@ -15,7 +15,7 @@ module Hoe::Deps
##
# The main rubygems repository.
- GEMURL = URI.parse 'http://rubygems.org'
+ GEMURL = URI.parse "http://rubygems.org"
##
# Define tasks for plugin.
@@ -38,12 +38,12 @@ module Hoe::Deps
end
end
- desc 'Install missing dependencies.'
+ desc "Install missing dependencies."
task :check_extra_deps do
check_extra_deps_task
end
- desc 'Install missing plugins.'
+ desc "Install missing plugins."
task :install_plugins do
install_missing_plugins
end
@@ -92,7 +92,7 @@ module Hoe::Deps
email = email.map { |s| s.split(/,\s*/) }.flatten.sort.uniq
email.map! { |s| # don't you people realize how easy this is?
- s.gsub(/ at | _at_ |\s*(atmark|@nospam@|-at?-|@at?@|<at?>|\[at?\]|\(at?\))\s*/i, '@').gsub(/\s*(dot|\[d(ot)?\]|\.dot\.)\s*/i, '.').gsub(/\s+com$/, '.com')
+ s.gsub(/ at | _at_ |\s*(atmark|@nospam@|-at?-|@at?@|<at?>|\[at?\]|\(at?\))\s*/i, "@").gsub(/\s*(dot|\[d(ot)?\]|\.dot\.)\s*/i, ".").gsub(/\s+com$/, ".com")
}
bad, good = email.partition { |e| e !~ /^[\w.+-]+\@[\w.+-]+$/ }
@@ -122,7 +122,7 @@ module Hoe::Deps
begin
warn "downloading #{full_name}"
Gem::RemoteFetcher.fetcher.download(spec, GEMURL, Dir.pwd)
- FileUtils.mv "cache/#{gem_name}", '.'
+ FileUtils.mv "cache/#{gem_name}", "."
rescue Gem::RemoteFetcher::FetchError
warn " failed"
next
@@ -149,7 +149,7 @@ module Hoe::Deps
return @@index if @@index
- dump = unless File.exist? '.source_index' then
+ dump = unless File.exist? ".source_index" then
warn "Fetching full index and caching. This can take a while."
url = GEMURL + "Marshal.#{Gem.marshal_version}.Z"
dump = Gem::RemoteFetcher.fetcher.fetch_path url
@@ -164,11 +164,11 @@ module Hoe::Deps
dump = Marshal.dump ary
- open '.source_index', 'wb' do |io| io.write dump end
+ open ".source_index", "wb" do |io| io.write dump end
dump
else
- open '.source_index', 'rb' do |io| io.read end
+ open ".source_index", "rb" do |io| io.read end
end
@@index = Marshal.load dump
@@ -194,10 +194,10 @@ module Hoe::Deps
# Installs plugins that aren't currently installed
def install_missing_plugins plugins = Hoe.bad_plugins
- version = '>= 0'
+ version = ">= 0"
plugins.each do |name|
- dash_name = name.to_s.gsub '_', '-'
+ dash_name = name.to_s.gsub "_", "-"
next if have_gem?("hoe-#{name}") or
have_gem?(name) or
diff --git a/lib/hoe/flay.rb b/lib/hoe/flay.rb
index b6bcd33..5cddfe0 100644
--- a/lib/hoe/flay.rb
+++ b/lib/hoe/flay.rb
@@ -23,7 +23,7 @@ module Hoe::Flay
def define_flay_tasks
begin
- require 'flay_task'
+ require "flay_task"
FlayTask.new :flay, self.flay_threshold
rescue Exception
# skip
diff --git a/lib/hoe/flog.rb b/lib/hoe/flog.rb
index 56589f1..a2888cb 100644
--- a/lib/hoe/flog.rb
+++ b/lib/hoe/flog.rb
@@ -29,7 +29,7 @@ module Hoe::Flog
def define_flog_tasks
begin
- require 'flog_task'
+ require "flog_task"
FlogTask.new :flog, self.flog_threshold, nil, self.flog_method
rescue LoadError
# skip
diff --git a/lib/hoe/gemcutter.rb b/lib/hoe/gemcutter.rb
index ea63bd9..08ccbb8 100644
--- a/lib/hoe/gemcutter.rb
+++ b/lib/hoe/gemcutter.rb
@@ -1,4 +1,4 @@
-require 'rake'
+require "rake"
module Hoe::Gemcutter
include Rake::DSL if defined?(Rake::DSL)
diff --git a/lib/hoe/inline.rb b/lib/hoe/inline.rb
index e957aa9..811a0da 100644
--- a/lib/hoe/inline.rb
+++ b/lib/hoe/inline.rb
@@ -1,4 +1,4 @@
-require 'rbconfig'
+require "rbconfig"
##
# Hoe allows bundling of pre-compiled extensions in the +package+ task.
@@ -35,20 +35,20 @@ module Hoe::Inline
def define_inline_tasks
task :test => :clean
- if ENV['INLINE'] then
- s.platform = ENV['FORCE_PLATFORM'] || Gem::Platform::CURRENT
+ if ENV["INLINE"] then
+ s.platform = ENV["FORCE_PLATFORM"] || Gem::Platform::CURRENT
# Try collecting Inline extensions for +name+
if defined?(Inline) then
- directory 'lib/inline'
+ directory "lib/inline"
- dlext = RbConfig::CONFIG['DLEXT']
+ dlext = RbConfig::CONFIG["DLEXT"]
Inline.registered_inline_classes.each do |cls|
- name = cls.name.gsub(/::/, '')
+ name = cls.name.gsub(/::/, "")
# name of the extension is CamelCase
alternate_name = if name =~ /[A-Z]/ then
- name.gsub(/([A-Z])/, '_\1').downcase.sub(/^_/, '')
+ name.gsub(/([A-Z])/, '_\1').downcase.sub(/^_/, "")
elsif name =~ /_/ then
name.capitalize.gsub(/_([a-z])/) { $1.upcase }
end
diff --git a/lib/hoe/package.rb b/lib/hoe/package.rb
index 0718e8e..fb46ac0 100644
--- a/lib/hoe/package.rb
+++ b/lib/hoe/package.rb
@@ -1,8 +1,8 @@
begin
- require 'rubygems/package_task'
+ require "rubygems/package_task"
rescue LoadError
# rake/gempackagetask will go away some day
- require 'rake/gempackagetask'
+ require "rake/gempackagetask"
Gem::PackageTask = Rake::GemPackageTask
end
@@ -46,12 +46,12 @@ module Hoe::Package
pkg.need_zip = @need_zip
end
- desc 'Install the package as a gem. (opt. NOSUDO=1)'
+ desc "Install the package as a gem. (opt. NOSUDO=1)"
task :install_gem => [:clean, :package, :check_extra_deps] do
- install_gem Dir['pkg/*.gem'].first
+ install_gem Dir["pkg/*.gem"].first
end
- desc 'Package and upload; Requires VERSION=x.y.z (optional PRE=a.1)'
+ desc "Package and upload; Requires VERSION=x.y.z (optional PRE=a.1)"
task :release => [:prerelease, :release_to, :postrelease]
# no doco, invisible hook
@@ -69,7 +69,7 @@ module Hoe::Package
task :release_sanity do
v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z"
- pre = ENV['PRERELEASE'] || ENV['PRE']
+ pre = ENV["PRERELEASE"] || ENV["PRE"]
v += ".#{pre}" if pre
abort "Versions don't match #{v} vs #{version}" if v != version
@@ -89,11 +89,11 @@ module Hoe::Package
def install_gem name, version = nil, rdoc=true
should_not_sudo = Hoe::WINDOZE || ENV["NOSUDO"] || File.writable?(Gem.dir)
- null_dev = Hoe::WINDOZE ? '> NUL 2>&1' : '> /dev/null 2>&1'
+ null_dev = Hoe::WINDOZE ? "> NUL 2>&1" : "> /dev/null 2>&1"
- gem_cmd = Gem.default_exec_format % 'gem'
- sudo = 'sudo ' unless should_not_sudo
- local = '--local' unless version
+ gem_cmd = Gem.default_exec_format % "gem"
+ sudo = "sudo " unless should_not_sudo
+ local = "--local" unless version
version = "--version '#{version}'" if version
cmd = "#{sudo}#{gem_cmd} install #{local} #{name} #{version}"
@@ -105,7 +105,7 @@ module Hoe::Package
end
def prerelease_version # :nodoc:
- pre = ENV['PRERELEASE'] || ENV['PRE']
+ pre = ENV["PRERELEASE"] || ENV["PRE"]
if pre then
spec.version.version << "." << pre if pre
diff --git a/lib/hoe/publish.rb b/lib/hoe/publish.rb
index 3eebcc7..e097da5 100644
--- a/lib/hoe/publish.rb
+++ b/lib/hoe/publish.rb
@@ -89,11 +89,11 @@ module Hoe::Publish
def initialize_publish
self.blog_categories ||= [self.name]
- self.local_rdoc_dir ||= 'doc'
+ self.local_rdoc_dir ||= "doc"
self.need_rdoc ||= true
self.rdoc_locations ||= []
self.remote_rdoc_dir ||= self.name
- self.rsync_args ||= '-av -O --delete'
+ self.rsync_args ||= "-av -O --delete"
end
##
@@ -117,7 +117,7 @@ module Hoe::Publish
desc "Generate rdoc coverage report"
task :dcov => :isolate do
- sh(*make_rdoc_cmd('-C'))
+ sh(*make_rdoc_cmd("-C"))
end
desc "Remove RDoc files"
@@ -127,9 +127,9 @@ module Hoe::Publish
task :clobber => :clobber_docs
- desc 'Generate ri locally for testing.'
+ desc "Generate ri locally for testing."
task :ridocs => [:clean, :isolate] do
- ruby(*make_rdoc_cmd('--ri', '-o', 'ri'))
+ ruby(*make_rdoc_cmd("--ri", "-o", "ri"))
end
end
@@ -143,7 +143,7 @@ module Hoe::Publish
publish_on_announce_task
end
- desc 'Generate email announcement file.'
+ desc "Generate email announcement file."
task :debug_email do
puts generate_email
end
@@ -153,7 +153,7 @@ module Hoe::Publish
post_blog_task
end
- desc 'Announce your release.'
+ desc "Announce your release."
task :announce => [:post_blog, :publish_on_announce ]
end
@@ -166,34 +166,34 @@ module Hoe::Publish
def publish_on_announce_task # :nodoc:
with_config do |config, _|
- Rake::Task['publish_docs'].invoke if config["publish_on_announce"]
+ Rake::Task["publish_docs"].invoke if config["publish_on_announce"]
end
end
def post_blog_task # :nodoc:
with_config do |config, path|
- break unless config['blogs']
+ break unless config["blogs"]
- config['blogs'].each do |site|
- if site['path'] then
+ config["blogs"].each do |site|
+ if site["path"] then
msg = "post_blog_#{site['type']}"
send msg, site
system site["cmd"] if site["cmd"]
else
- require 'xmlrpc/client'
+ require "xmlrpc/client"
_, title, body, urls = announcement
body += "\n\n#{urls}"
- server = XMLRPC::Client.new2(site['url'])
- content = site['extra_headers'].merge(:title => title,
+ server = XMLRPC::Client.new2(site["url"])
+ content = site["extra_headers"].merge(:title => title,
:description => body,
:categories => blog_categories)
- server.call('metaWeblog.newPost',
- site['blog_id'],
- site['user'],
- site['password'],
+ server.call("metaWeblog.newPost",
+ site["blog_id"],
+ site["user"],
+ site["password"],
content,
true)
end
@@ -225,7 +225,7 @@ module Hoe::Publish
Dir.chdir File.expand_path dir do
time = Time.at Time.now.to_i # nukes fractions
path = [time.strftime("%Y-%m-%d-"),
- title.sub(/\W+$/, '').gsub(/\W+/, '-'),
+ title.sub(/\W+$/, "").gsub(/\W+/, "-"),
".html.md"].join
header = {
@@ -235,7 +235,7 @@ module Hoe::Publish
}
File.open path, "w" do |f|
- f.puts header.to_yaml.gsub(/\s$/, '')
+ f.puts header.to_yaml.gsub(/\s$/, "")
f.puts "..."
f.puts
f.puts body
@@ -244,7 +244,7 @@ module Hoe::Publish
end
def generate_email full = nil # :nodoc:
- require 'time'
+ require "time"
abort "No email 'to' entry. Run `rake config_hoe` to fix." unless
!full || email_to
@@ -293,6 +293,6 @@ class String
# Very basic munge from rdoc to markdown format.
def rdoc_to_markdown
- self.gsub(/^mailto:/, '').gsub(/^(=+)/) { "#" * $1.size }
+ self.gsub(/^mailto:/, "").gsub(/^(=+)/) { "#" * $1.size }
end
end
diff --git a/lib/hoe/racc.rb b/lib/hoe/racc.rb
index d286006..68a5e62 100644
--- a/lib/hoe/racc.rb
+++ b/lib/hoe/racc.rb
@@ -50,7 +50,7 @@ module Hoe::Racc
# Activate the racc dependencies
def activate_racc_deps
- dependency 'racc', '~> 1.4.6', :development
+ dependency "racc", "~> 1.4.6", :development
end
##
diff --git a/lib/hoe/signing.rb b/lib/hoe/signing.rb
index 5e4443f..823172f 100644
--- a/lib/hoe/signing.rb
+++ b/lib/hoe/signing.rb
@@ -45,7 +45,7 @@ module Hoe::Signing
def define_signing_tasks
set_up_signing
- desc 'Generate a key for signing your gems.'
+ desc "Generate a key for signing your gems."
task :generate_key do
generate_key_task
end
@@ -56,11 +56,11 @@ module Hoe::Signing
cert_chain = []
with_config do |config, path|
- break unless config['signing_key_file'] and config['signing_cert_file']
- key_file = File.expand_path config['signing_key_file'].to_s
+ break unless config["signing_key_file"] and config["signing_cert_file"]
+ key_file = File.expand_path config["signing_key_file"].to_s
signing_key = key_file if File.exist? key_file
- cert_file = File.expand_path config['signing_cert_file'].to_s
+ cert_file = File.expand_path config["signing_cert_file"].to_s
cert_chain << cert_file if File.exist? cert_file
end
@@ -74,15 +74,15 @@ module Hoe::Signing
email = Array(spec.email)
abort "No email in your gemspec" if email.nil? or email.empty?
- key_file = with_config { |config, _| config['signing_key_file'] }
- cert_file = with_config { |config, _| config['signing_cert_file'] }
+ key_file = with_config { |config, _| config["signing_key_file"] }
+ cert_file = with_config { |config, _| config["signing_cert_file"] }
if key_file.nil? or cert_file.nil? then
- ENV['SHOW_EDITOR'] ||= 'no'
- Rake::Task['config_hoe'].invoke
+ ENV["SHOW_EDITOR"] ||= "no"
+ Rake::Task["config_hoe"].invoke
- key_file = with_config { |config, _| config['signing_key_file'] }
- cert_file = with_config { |config, _| config['signing_cert_file'] }
+ key_file = with_config { |config, _| config["signing_key_file"] }
+ cert_file = with_config { |config, _| config["signing_cert_file"] }
end
key_file = File.expand_path key_file
diff --git a/lib/hoe/test.rb b/lib/hoe/test.rb
index 72d6066..880630f 100644
--- a/lib/hoe/test.rb
+++ b/lib/hoe/test.rb
@@ -30,7 +30,7 @@ module Hoe::Test
# this is an unfortunate naming collision. I don't use the CPU (N)
# specifier so it is shifting to "C" inside of Hoe.
ENV.delete "N" if ENV["N"]
- ENV["N"] = ENV['C'] if ENV['C']
+ ENV["N"] = ENV["C"] if ENV["C"]
##
# Optional: Array of incompatible versions for multiruby filtering.
@@ -78,28 +78,28 @@ module Hoe::Test
task :test
if File.directory? "test" then
- desc 'Run the test suite. Use FILTER or TESTOPTS to add flags/args.'
+ desc "Run the test suite. Use FILTER or TESTOPTS to add flags/args."
task :test do
ruby make_test_cmd
end
- desc 'Print out the test command. Good for profiling and other tools.'
+ desc "Print out the test command. Good for profiling and other tools."
task :test_cmd do
puts make_test_cmd
end
- desc 'Run the test suite using multiruby.'
+ desc "Run the test suite using multiruby."
task :multi do
ENV["EXCLUDED_VERSIONS"] = multiruby_skip.join(":")
system "multiruby -S rake"
end
- desc 'Show which test files fail when run alone.'
+ desc "Show which test files fail when run alone."
task :test_deps do
tests = Dir[*self.test_globs].uniq
- paths = ['bin', 'lib', 'test'].join(File::PATH_SEPARATOR)
- null_dev = Hoe::WINDOZE ? '> NUL 2>&1' : '> /dev/null 2>&1'
+ paths = ["bin", "lib", "test"].join(File::PATH_SEPARATOR)
+ null_dev = Hoe::WINDOZE ? "> NUL 2>&1" : "> /dev/null 2>&1"
tests.each do |test|
if not system "ruby -I#{paths} #{test} #{null_dev}" then
@@ -128,7 +128,7 @@ module Hoe::Test
end
end
- desc 'Run the default task(s).'
+ desc "Run the default task(s)."
task :default => default_tasks
unless default_tasks.empty? then
@@ -154,7 +154,7 @@ module Hoe::Test
file "#{pkg}.gem" => turd
end
- desc 'Run ZenTest against the package.'
+ desc "Run ZenTest against the package."
task :audit do
libs = %w(lib test ext).join(File::PATH_SEPARATOR)
sh "zentest -I=#{libs} #{spec.files.grep(/^(lib|test)/).join(' ')}"
@@ -186,7 +186,7 @@ module Hoe::Test
# Attempt to load RSpec 2, returning true if successful
def try_loading_rspec2
- require 'rspec/core/rake_task'
+ require "rspec/core/rake_task"
desc "Run all specifications"
RSpec::Core::RakeTask.new(:spec) do |t|
@@ -205,7 +205,7 @@ module Hoe::Test
# Attempt to load RSpec 1, returning true if successful
def try_loading_rspec1
- require 'spec/rake/spectask'
+ require "spec/rake/spectask"
desc "Run all specifications"
Spec::Rake::SpecTask.new(:spec) do |t|