Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for platform windows #112

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/bundix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def groups(spec, dep_cache)
"mingw" => [{engine: "mingw"}],
"truffleruby" => [{engine: "ruby"}],
"x64_mingw" => [{engine: "mingw"}],
"windows" => [{engine: "mswin"}, {engine: "mswin64"}, {engine: "mingw"}],
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't 100% sure what engines to list here, but basically took the list from Gem::Platform::WINDOWS as defined here

https://github.com/rubygems/rubygems/blob/8c98dbf1b1f6005b4e0343999d7fd556428fa0c2/bundler/lib/bundler/rubygems_ext.rb#L208

}.each do |name, list|
PLATFORM_MAPPING[name] = list
%w(1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6).each do |version|
Expand All @@ -80,7 +81,7 @@ def groups(spec, dep_cache)
def platforms(spec, dep_cache)
# c.f. Bundler::CurrentRuby
platforms = dep_cache.fetch(spec.name).platforms.map do |platform_name|
PLATFORM_MAPPING[platform_name.to_s]
PLATFORM_MAPPING.fetch platform_name.to_s
end.flatten

{platforms: platforms}
Expand Down