Skip to content

Commit

Permalink
Add mingw_18 and mingw19 as platform for mingw with 1.8 or 1.9 RUBY v…
Browse files Browse the repository at this point in the history
…ersion.

Closes rubygems#845
  • Loading branch information
net1957 authored and indirect committed Nov 14, 2010
1 parent 4139386 commit 279c515
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -17,3 +17,6 @@ lib/bundler/man

# output from ci_reporter
spec/reports

# Netbeans
nbproject
29 changes: 20 additions & 9 deletions lib/bundler/dependency.rb
Expand Up @@ -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)
Expand Down Expand Up @@ -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
6 changes: 6 additions & 0 deletions man/gemfile.5.ronn
Expand Up @@ -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:

Expand Down

0 comments on commit 279c515

Please sign in to comment.