diff --git a/lib/moonshine/manifest/rails/rails.rb b/lib/moonshine/manifest/rails/rails.rb index 0172639d..00cb45b7 100644 --- a/lib/moonshine/manifest/rails/rails.rb +++ b/lib/moonshine/manifest/rails/rails.rb @@ -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',