Skip to content

Commit

Permalink
Really protect against Ruby 2.0 gems
Browse files Browse the repository at this point in the history
  • Loading branch information
halostatue committed Nov 11, 2015
1 parent fed0d97 commit 5c7f7de
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec = Hoe.spec 'mime-types' do
extra_dev_deps << ['fivemat', '~> 1.3' ]
extra_dev_deps << ['minitest-rg', '~> 5.2']

if RUBY_VERSION >= '2.0'
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.0')
extra_dev_deps << ['simplecov', '~> 0.7']
extra_dev_deps << ['coveralls', '~> 0.8']
end
Expand Down Expand Up @@ -97,7 +97,7 @@ namespace :benchmark do
end
end

if RUBY_VERSION >= '2.0'
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.0')
namespace :test do
task :coveralls do
spec.test_prelude = [
Expand Down
18 changes: 12 additions & 6 deletions mime-types.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q<minitest-autotest>, ["~> 1.0"])
s.add_development_dependency(%q<minitest-focus>, ["~> 1.0"])
s.add_development_dependency(%q<rake>, ["~> 10.0"])
s.add_development_dependency(%q<simplecov>, ["~> 0.7"])
s.add_development_dependency(%q<coveralls>, ["~> 0.8"])
s.add_development_dependency(%q<fivemat>, ["~> 1.3"])
s.add_development_dependency(%q<minitest-rg>, ["~> 5.2"])
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.0')
s.add_development_dependency(%q<simplecov>, ["~> 0.7"])
s.add_development_dependency(%q<coveralls>, ["~> 0.8"])
end
s.add_development_dependency(%q<hoe>, ["~> 3.14"])
else
s.add_dependency(%q<minitest>, ["~> 5.8"])
Expand All @@ -50,10 +52,12 @@ Gem::Specification.new do |s|
s.add_dependency(%q<minitest-autotest>, ["~> 1.0"])
s.add_dependency(%q<minitest-focus>, ["~> 1.0"])
s.add_dependency(%q<rake>, ["~> 10.0"])
s.add_dependency(%q<simplecov>, ["~> 0.7"])
s.add_dependency(%q<coveralls>, ["~> 0.8"])
s.add_dependency(%q<fivemat>, ["~> 1.3"])
s.add_dependency(%q<minitest-rg>, ["~> 5.2"])
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.0')
s.add_dependency(%q<simplecov>, ["~> 0.7"])
s.add_dependency(%q<coveralls>, ["~> 0.8"])
end
s.add_dependency(%q<hoe>, ["~> 3.14"])
end
else
Expand All @@ -67,10 +71,12 @@ Gem::Specification.new do |s|
s.add_dependency(%q<minitest-autotest>, ["~> 1.0"])
s.add_dependency(%q<minitest-focus>, ["~> 1.0"])
s.add_dependency(%q<rake>, ["~> 10.0"])
s.add_dependency(%q<simplecov>, ["~> 0.7"])
s.add_dependency(%q<coveralls>, ["~> 0.8"])
s.add_dependency(%q<fivemat>, ["~> 1.3"])
s.add_dependency(%q<minitest-rg>, ["~> 5.2"])
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.0')
s.add_dependency(%q<simplecov>, ["~> 0.7"])
s.add_dependency(%q<coveralls>, ["~> 0.8"])
end
s.add_dependency(%q<hoe>, ["~> 3.14"])
end
end

0 comments on commit 5c7f7de

Please sign in to comment.