Permalink
Browse files

add ABI platforms :ruby_20 and :mri_20

closes #2151
  • Loading branch information...
1 parent 691c152 commit add10420298e4faf1e7ed08db88672f8759853d9 @indirect indirect committed Dec 21, 2012
Showing with 25 additions and 3 deletions.
  1. +17 −1 lib/bundler/dependency.rb
  2. +6 −0 man/gemfile.5.ronn
  3. +2 −2 spec/cache/platform_spec.rb
View
@@ -12,15 +12,18 @@ class Dependency < Gem::Dependency
:ruby => Gem::Platform::RUBY,
:ruby_18 => Gem::Platform::RUBY,
:ruby_19 => Gem::Platform::RUBY,
+ :ruby_20 => Gem::Platform::RUBY,
:mri => Gem::Platform::RUBY,
:mri_18 => Gem::Platform::RUBY,
:mri_19 => Gem::Platform::RUBY,
+ :mri_20 => Gem::Platform::RUBY,
:rbx => Gem::Platform::RUBY,
:jruby => Gem::Platform::JAVA,
:mswin => Gem::Platform::MSWIN,
:mingw => Gem::Platform::MINGW,
:mingw_18 => Gem::Platform::MINGW,
- :mingw_19 => Gem::Platform::MINGW
+ :mingw_19 => Gem::Platform::MINGW,
+ :mingw_20 => Gem::Platform::MINGW
}.freeze
def initialize(name, version, options = {}, &blk)
@@ -90,6 +93,10 @@ def ruby_19?
ruby? && RUBY_VERSION >= "1.9"
end
+ def ruby_20?
+ ruby? && RUBY_VERSION >= "2.0"
+ end
+
def mri?
!mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby")
end
@@ -102,6 +109,11 @@ def mri_19?
mri? && RUBY_VERSION >= "1.9"
end
+
+ def mri_20?
+ mri? && RUBY_VERSION >= "2.0"
+ end
+
def rbx?
ruby? && defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
end
@@ -130,5 +142,9 @@ def mingw_19?
mingw? && RUBY_VERSION >= "1.9"
end
+ def mingw_20?
+ mingw? && RUBY_VERSION >= "2.0"
+ end
+
end
end
View
@@ -143,12 +143,16 @@ There are a number of `Gemfile` platforms:
_ruby_ `AND` version 1.8
* `ruby_19`:
_ruby_ `AND` version 1.9
+ * `ruby_20`:
+ _ruby_ `AND` version 2.0
* `mri`:
Same as _ruby_, but not Rubinius
* `mri_18`:
_mri_ `AND` version 1.8
* `mri_19`:
_mri_ `AND` version 1.9
+ * `mri_20`:
+ _mri_ `AND` version 2.0
* `rbx`:
Same as _ruby_, but only Rubinius (not MRI)
* `jruby`:
@@ -161,6 +165,8 @@ There are a number of `Gemfile` platforms:
_mingw_ `AND` version 1.8
* `mingw_19`:
_mingw_ `AND` version 1.9
+ * `mingw_20`:
+ _mingw_ `AND` version 2.0
As with groups, you can specify one or more platforms:
@@ -5,15 +5,15 @@
gemfile <<-G
source "file://#{gem_repo1}"
- platforms :ruby, :ruby_18, :ruby_19 do
+ platforms :ruby, :ruby_18, :ruby_19, :ruby_20 do
gem "rack", "1.0.0"
end
platforms :jruby do
gem "activesupport", "2.3.5"
end
- platforms :mri, :mri_18, :mri_19 do
+ platforms :mri, :mri_18, :mri_19, :mri_20 do
gem "activerecord", "2.3.2"
end
G

0 comments on commit add1042

Please sign in to comment.