Skip to content
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
22 changes: 14 additions & 8 deletions lib/moonshine/manifest/rails/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,21 @@ def rails_gems
end
end

bundle_install_without_groups = configuration[:bundler] && configuration[:bundler][:install_without_groups] || "development test"
bundle_install_options = [
'--deployment',
"--path #{configuration[:deploy_to]}/shared/bundle",
"--without '#{bundle_install_without_groups}'"
]
bundler_defaults = {
:install_as_deployment => true,
:install_to_path => "#{configuration[:deploy_to]}/shared/bundle",
:install_without_groups => 'development test',
:disable_binstubs => false
}

bundler_options = bundler_defaults.with_indifferent_access
.merge(configuration[:bundler] || {})

unless configuration[:bundler][:disable_binstubs]
bundle_install_options << '--binstubs'
bundle_install_options = [].tap do |options|
options << '--deployment' if bundler_options[:install_as_deployment]
options << "--path #{configuration[:deploy_to]}/shared/bundle" if bundler_options[:install_to_path].present?
options << "--without '#{bundler_options[:install_without_groups]}'" if bundler_options[:install_without_groups].present?
options << '--binstubs' unless configuration[:bundler][:disable_binstubs]
end

exec 'accept github key',
Expand Down