From 6645ed7d0613b98bb3d8424b7f60c96c77fdeffe Mon Sep 17 00:00:00 2001 From: Eito Katagiri Date: Tue, 7 Aug 2012 16:53:46 +0900 Subject: [PATCH] depend on slop 3.0 or above --- bin/earthquake | 8 +++++++- earthquake.gemspec | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/earthquake b/bin/earthquake index 40514af..c0d6ce8 100755 --- a/bin/earthquake +++ b/bin/earthquake @@ -1,5 +1,4 @@ #!/usr/bin/env ruby -gem 'slop', '~> 2.0' require 'slop' argv = ARGV.dup @@ -16,6 +15,13 @@ rescue => e exit! end options = slop.to_hash + +# XXX: work around slop's feature (bug?) +options.each do |key, val| + val = val.nil? ? nil : true if key.to_s =~ /^no-/ + options[key] = val +end + options.delete(:help) options[:dir] = argv.shift unless argv.empty? diff --git a/earthquake.gemspec b/earthquake.gemspec index 869d617..67f518c 100644 --- a/earthquake.gemspec +++ b/earthquake.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency "launchy" s.add_runtime_dependency "oauth" s.add_runtime_dependency "twitter_oauth", "= 0.4.3" - s.add_runtime_dependency "slop", "~> 2.0" + s.add_runtime_dependency "slop", "~> 3.0" s.add_development_dependency "rspec", "~> 2.0" s.add_development_dependency "bundler"