Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
shipit-engine (0.43.1)
shipit-engine (0.43.2)
active_model_serializers (~> 0.9.3)
ansi_stream (~> 0.0.6)
autoprefixer-rails (~> 6.4.1)
Expand Down
6 changes: 5 additions & 1 deletion app/models/shipit/deploy_spec/bundler_discovery.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ def discover_machine_env

def bundle_install
install_command = %(bundle install --jobs 4 --retry 2)
install_command += " --without=#{bundler_without.join(':')}" unless bundler_without.empty?
[
remove_ruby_version_from_gemfile,
(bundle_config_frozen if frozen_mode?),
bundle_config_path,
(bundle_without_groups unless bundler_without.empty?),
install_command
].compact
end
Expand All @@ -54,6 +54,10 @@ def bundle_config_frozen
'bundle config set --local frozen true'
end

def bundle_without_groups
"bundle config set without '#{bundler_without.join(':')}'"
end

def frozen_mode?
return false unless gemfile_lock_exists?

Expand Down
2 changes: 1 addition & 1 deletion lib/shipit/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Shipit
VERSION = '0.43.1'
VERSION = '0.43.2'
end
2 changes: 1 addition & 1 deletion test/dummy/db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module Shipit
]
},
"override": [
"bundle config set path /tmp/bundler && (bundle check || bundle install --frozen --retry=2 --without=default:production:development:test:staging:benchmark:debug)"
"bundle config set path /tmp/bundler && (bundle check || bundle config set without 'default:production:development:test:staging:benchmark:debug' || bundle install --frozen --retry=2)"
]
},
"fetch": [
Expand Down
6 changes: 4 additions & 2 deletions test/models/deploy_spec_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ class DeploySpecTest < ActiveSupport::TestCase
bundle install
--jobs 4
--retry 2
--without=default:production:development:test:staging:benchmark:debug
).gsub(/\s+/, ' ').strip
config_command = "bundle config set --local path #{@spec.bundle_path}"
without_command = "bundle config set without 'default:production:development:test:staging:benchmark:debug'"

assert_equal command, @spec.bundle_install.last
assert @spec.bundle_install.include?(config_command)
assert @spec.bundle_install.include?(without_command)
end

test '#bundle_install use `dependencies.bundler.without` if present to build the --without argument' do
Expand All @@ -84,9 +85,10 @@ class DeploySpecTest < ActiveSupport::TestCase
bundle install
--jobs 4
--retry 2
--without=some:custom:groups
).gsub(/\s+/, ' ').strip
assert_equal command, @spec.bundle_install.last
without_command = "bundle config set without 'some:custom:groups'"
assert @spec.bundle_install.include?(without_command)
end

test '#bundle_install configures frozen mode if Gemfile.lock is present' do
Expand Down