Skip to content

Commit

Permalink
shit show
Browse files Browse the repository at this point in the history
  • Loading branch information
davetron5000 committed Aug 22, 2015
1 parent 0609d64 commit 341a883
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions Gemfile
Expand Up @@ -6,16 +6,6 @@ gem "rcov", ">= 0.9.8", :platforms => :mri_18
gem "simplecov", "~> 0.6.4", :platforms => :mri_19
gem "psych", :platforms => :mri_19

#Travis has an ancient bundler I guess?!?!? Sigh.
begin
gem "test-unit", :platforms => :mri_22
rescue => ex
if ex.message =~/mri_22 is not a valid platform/
if RUBY_VERSION =~ /2\.2\./
gem 'test-unit'
end
else
raise ex
end
if RUBY_VERSION =~ /2\.2\./
gem "test-unit"
end

3 comments on commit 341a883

@wconrad
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test-unit was removed from Ruby in version 2.2 and moved into a gem, so the comparison should probably test for a RUBY_VERSION >= 2.2, but I can't think of an easy way to do that comparison.

@davetron5000
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, yeah. I guess I could split up the version string?

I just don't understand what Bundler doesn't provide this. It's silly :platform thingy is super not future proof. I suppose another option would be to move to a test framework not coupled to the platform…

@wconrad
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The best I can think of is if RUBY_VERSION.scan(/\d+/).map(&:to_i) >= [2, 2], but that's not super self explanatory.

Please sign in to comment.