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

Update to recent bundler #107

Open
wants to merge 1 commit 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
6 changes: 4 additions & 2 deletions bin/ocra
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,9 @@ EOF
end

ENV['BUNDLE_GEMFILE'] = Ocra.gemfile
Bundler.load.specs.each do |spec|
bundler_definition = Bundler::Definition.build(Bundler::SharedHelpers.default_gemfile, Bundler::SharedHelpers.default_lockfile, nil)

bundler_definition.specs_for([:default]).each do |spec|
Ocra.verbose_msg "From Gemfile, adding gem #{spec.full_name}"
gems[spec.name] ||= spec
end
Expand All @@ -579,7 +581,7 @@ EOF

if defined?(Gem)
# Include Gems that are loaded
Gem.loaded_specs.each { |gemname, spec| gems[gemname] ||= spec }
Gem.loaded_specs.each { |gemname, spec| gems[gemname] ||= spec } unless Ocra.gemfile
# Fall back to gem detection (loaded_specs are not population on
# all Ruby versions)
features.each do |feature|
Expand Down