Skip to content

Commit d8a6ec9

Browse files
committed
Replace bundle install --path with bundle config set path
1 parent ea69b52 commit d8a6ec9

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
shipit-engine (0.43.0)
4+
shipit-engine (0.43.1)
55
active_model_serializers (~> 0.9.3)
66
ansi_stream (~> 0.0.6)
77
autoprefixer-rails (~> 6.4.1)

app/models/shipit/deploy_spec/bundler_discovery.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,20 @@ def discover_machine_env
2626
end
2727

2828
def bundle_install
29-
install_command = %(bundle install --jobs 4 --path #{bundle_path} --retry 2)
29+
install_command = %(bundle install --jobs 4 --retry 2)
3030
install_command += " --without=#{bundler_without.join(':')}" unless bundler_without.empty?
3131
[
3232
remove_ruby_version_from_gemfile,
3333
(bundle_config_frozen if frozen_mode?),
34+
bundle_config_path,
3435
install_command
3536
].compact
3637
end
3738

39+
def bundle_config_path
40+
"bundle config set --local path #{bundle_path}"
41+
end
42+
3843
def remove_ruby_version_from_gemfile
3944
# Heroku apps often specify a ruby version.
4045
if /darwin/i.match?(RUBY_PLATFORM)

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 config set path /tmp/bundler && (bundle check || bundle install --frozen --retry=2 --without=default:production:development:test:staging:benchmark:debug)"
5757
]
5858
},
5959
"fetch": [

test/models/deploy_spec_test.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@ 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
74+
config_command = "bundle config set --local path #{@spec.bundle_path}"
75+
7576
assert_equal command, @spec.bundle_install.last
77+
assert @spec.bundle_install.include?(config_command)
7678
end
7779

7880
test '#bundle_install use `dependencies.bundler.without` if present to build the --without argument' do
@@ -81,7 +83,6 @@ class DeploySpecTest < ActiveSupport::TestCase
8183
command = %(
8284
bundle install
8385
--jobs 4
84-
--path #{DeploySpec.bundle_path}
8586
--retry 2
8687
--without=some:custom:groups
8788
).gsub(/\s+/, ' ').strip

0 commit comments

Comments
 (0)