diff options
author | Pan Thomakos <pan.thomakos@gmail.com> | 2015-04-16 23:00:29 -0700 |
---|---|---|
committer | Pan Thomakos <pan.thomakos@gmail.com> | 2015-04-17 08:37:14 -0700 |
commit | 2c8dd13c5617e402caebc0c113abc53cf8f4df58 (patch) | |
tree | 4b66bf34349dd33aecbe4243089e402a5f98a8d5 /lib/bundler/ruby_dsl.rb | |
parent | c7fce7422f467407f7544062661cbbb726b9ef38 (diff) | |
download | bundler-2c8dd13c5617e402caebc0c113abc53cf8f4df58.tar.gz |
Allow fuzzy ruby version requirements.
* Use `Gem::Requirement` and `Gem::Version` to parse and check
ruby version, engine_version and patchlevel requirements.
* Added new class `RubyVersionRequirement` to handle this functionality.
* Added tests that cover the `RubyVersionRequirement` class.
Diffstat (limited to 'lib/bundler/ruby_dsl.rb')
-rw-r--r-- | lib/bundler/ruby_dsl.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/ruby_dsl.rb b/lib/bundler/ruby_dsl.rb index b29fc019..c1f83d3a 100644 --- a/lib/bundler/ruby_dsl.rb +++ b/lib/bundler/ruby_dsl.rb @@ -5,7 +5,7 @@ module Bundler raise GemfileError, "Please define :engine" if options[:engine_version] && options[:engine].nil? raise GemfileError, "ruby_version must match the :engine_version for MRI" if options[:engine] == "ruby" && options[:engine_version] && ruby_version != options[:engine_version] - @ruby_version = RubyVersion.new(ruby_version, options[:patchlevel], options[:engine], options[:engine_version]) + @ruby_version = RubyVersionRequirement.new(ruby_version, options[:patchlevel], options[:engine], options[:engine_version]) end end end |