Skip to content

Commit 77d83d3

Browse files
committed
Replace --path flag with bundle config set path and bump version to 0.43.1
1 parent ea69b52 commit 77d83d3

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

app/models/shipit/deploy_spec/bundler_discovery.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ def discover_machine_env
2626
end
2727

2828
def bundle_install
29-
install_command = %(bundle install --jobs 4 --path #{bundle_path} --retry 2)
29+
path_config_command = %(bundle config set path #{bundle_path})
30+
install_command = %(bundle install --jobs 4 --retry 2)
3031
install_command += " --without=#{bundler_without.join(':')}" unless bundler_without.empty?
3132
[
3233
remove_ruby_version_from_gemfile,
3334
(bundle_config_frozen if frozen_mode?),
35+
path_config_command,
3436
install_command
3537
].compact
3638
end

lib/shipit/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Shipit
4-
VERSION = '0.43.0'
4+
VERSION = '0.43.1'
55
end

test/dummy/db/seeds.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ module Shipit
5353
]
5454
},
5555
"override": [
56-
"bundle check --path=/tmp/bundler || bundle install --frozen --path=/tmp/bundler --retry=2 --without=default:production:development:test:staging:benchmark:debug"
56+
"bundle check --path=/tmp/bundler || bundle config set path /tmp/bundler || bundle config set frozen true || bundle install --retry=2 --without=default:production:development:test:staging:benchmark:debug"
5757
]
5858
},
5959
"fetch": [

test/models/deploy_spec_test.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ class DeploySpecTest < ActiveSupport::TestCase
6868
command = %(
6969
bundle install
7070
--jobs 4
71-
--path #{DeploySpec.bundle_path}
7271
--retry 2
7372
--without=default:production:development:test:staging:benchmark:debug
7473
).gsub(/\s+/, ' ').strip
@@ -81,13 +80,18 @@ class DeploySpecTest < ActiveSupport::TestCase
8180
command = %(
8281
bundle install
8382
--jobs 4
84-
--path #{DeploySpec.bundle_path}
8583
--retry 2
8684
--without=some:custom:groups
8785
).gsub(/\s+/, ' ').strip
8886
assert_equal command, @spec.bundle_install.last
8987
end
9088

89+
test '#bundle_install configures path' do
90+
@spec.stubs(:load_config).returns('dependencies' => { 'bundler' => { 'without' => %w[some custom groups] } })
91+
@spec.stubs(:gemfile_lock_exists?).returns(true)
92+
assert @spec.bundle_install.include?("bundle config set path #{DeploySpec.bundle_path}")
93+
end
94+
9195
test '#bundle_install configures frozen mode if Gemfile.lock is present' do
9296
@spec.stubs(:load_config).returns('dependencies' => { 'bundler' => { 'without' => %w[some custom groups] } })
9397
@spec.stubs(:gemfile_lock_exists?).returns(true)

0 commit comments

Comments
 (0)