summaryrefslogtreecommitdiff
path: root/lib/bundler/dependency.rb
diff options
context:
space:
mode:
authorMike Virata-Stone <mjstone@on-site.com>2015-12-15 20:22:09 -0800
committerMike Virata-Stone <mjstone@on-site.com>2015-12-15 20:22:09 -0800
commit0a8ca4879e0b79aa4109a0dc424940b079ef38d0 (patch)
tree13ba364b173519d07f956309d613e7374fe27b32 /lib/bundler/dependency.rb
parente7cdd952366990b9ad5bb4627add0df1536a9c2c (diff)
downloadbundler-0a8ca4879e0b79aa4109a0dc424940b079ef38d0.tar.gz
Revert "Revert "When loading a gem from a gemspec, restrict to the platforms defined in the gemspec""
This reverts commit 812fd738412997a6815eac1be8cb6696d38718b0.
Diffstat (limited to 'lib/bundler/dependency.rb')
-rw-r--r--lib/bundler/dependency.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bundler/dependency.rb b/lib/bundler/dependency.rb
index 153f363de5..a62808d23c 100644
--- a/lib/bundler/dependency.rb
+++ b/lib/bundler/dependency.rb
@@ -54,6 +54,15 @@ module Bundler
:x64_mingw_23 => Gem::Platform::X64_MINGW
}.freeze
+ REVERSE_PLATFORM_MAP = {}.tap do |reverse_platform_map|
+ PLATFORM_MAP.each do |key, value|
+ reverse_platform_map[value] ||= []
+ reverse_platform_map[value] << key
+ end
+
+ reverse_platform_map.each {|_, platforms| platforms.freeze }
+ end.freeze
+
def initialize(name, version, options = {}, &blk)
type = options["type"] || :runtime
super(name, version, type)