Skip to content
Browse files

Add mingw_18 and mingw19 as platform for mingw with 1.8 or 1.9 RUBY v…

…ersion.

Closes #845
  • Loading branch information...
1 parent 4139386 commit 279c51585c218d3fb89692acaebe356d28dbf3bf @net1957 net1957 committed with indirect Nov 13, 2010
Showing with 29 additions and 9 deletions.
  1. +3 −0 .gitignore
  2. +20 −9 lib/bundler/dependency.rb
  3. +6 −0 man/gemfile.5.ronn
View
3 .gitignore
@@ -17,3 +17,6 @@ lib/bundler/man
# output from ci_reporter
spec/reports
+
+# Netbeans
+nbproject
View
29 lib/bundler/dependency.rb
@@ -9,15 +9,17 @@ class Dependency < Gem::Dependency
attr_reader :platforms
PLATFORM_MAP = {
- :ruby => Gem::Platform::RUBY,
- :ruby_18 => Gem::Platform::RUBY,
- :ruby_19 => Gem::Platform::RUBY,
- :mri => Gem::Platform::RUBY,
- :mri_18 => Gem::Platform::RUBY,
- :mri_19 => Gem::Platform::RUBY,
- :jruby => Gem::Platform::JAVA,
- :mswin => Gem::Platform::MSWIN,
- :mingw => Gem::Platform::MINGW
+ :ruby => Gem::Platform::RUBY,
+ :ruby_18 => Gem::Platform::RUBY,
+ :ruby_19 => Gem::Platform::RUBY,
+ :mri => Gem::Platform::RUBY,
+ :mri_18 => Gem::Platform::RUBY,
+ :mri_19 => 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
}.freeze
def initialize(name, version, options = {}, &blk)
@@ -115,5 +117,14 @@ def mswin?
def mingw?
Bundler::WINDOWS && Gem::Platform.local.os == "mingw32"
end
+
+ def mingw_18?
+ mingw? && RUBY_VERSION < "1.9"
+ end
+
+ def mingw_19?
+ mingw? && RUBY_VERSION >= "1.9"
+ end
+
end
end
View
6 man/gemfile.5.ronn
@@ -124,6 +124,12 @@ There are a number of `Gemfile` platforms:
JRuby
* `mswin`:
Windows
+ * `mingw`:
+ Windows 'mingw32' platform (aka RubyInstaller)
+ * `mingw_18`:
+ _mingw_ `AND` version 1.8
+ * `mingw_19`:
+ _mingw_ `AND` version 1.9
As with groups, you can specify one or more platforms:

0 comments on commit 279c515

Please sign in to comment.
Something went wrong with that request. Please try again.