secupdater 0.2.0alpha2 → 0.2.0alpha3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9370b2774586510cf198499d82567825da267bb6c616ebcbfe5a97b0f2df17b6
4
- data.tar.gz: 17b9536a5abdb0f73f18e76a3d91dca0d0921560e14468d98cb6c7b611808ab2
3
+ metadata.gz: 5c31a79bbf3e3c98290cf8348360817d012933c0a98cd08fb8bd5c07bbcf99e2
4
+ data.tar.gz: ea54a58239e29f22f52a2f13419b2103b4e3a099cd33f01c7b0c21ed9f596153
5
5
  SHA512:
6
- metadata.gz: 06345b62279096ca6cf5226a16b67da136ea4a300dba9d9b573f6500dca9d3201cc427738be31ba20bb6f1a756c97affc40e22fe2a3194051f752f92914a3d01
7
- data.tar.gz: 326e8beccaa4ea2fbb74fb3d388a94e0dd8ec61d765c0a14701440b12faa6671ecdde8ec7c4bad5e2db452d529880877d60fc241ffb97faa5e3e48f3102b6ec2
6
+ metadata.gz: 25f5e35f6d2c818f6a288d59401d7a8268e796954f94c3e307f6b15362e0134ed2932cded0e4e4d3d4080d50c41f002e42a56630a18be25e26a322cbc77c4570
7
+ data.tar.gz: 1713808b35241ec4b36edf3d0e7290b015ebd61db4ac792f36cd3608fac08c546a99167e5c06dabfae5e967f039ef3a044b898dd01487c1f7061213d0ca1004e
@@ -32,15 +32,15 @@ module Secupdater
32
32
  end
33
33
 
34
34
  def run_update(names, level)
35
- output, status = Open3.capture2e({ "BUNDLE_FROZEN" => "false" }, "bundle", "update", *Array(names), "--conservative", "--#{level}", "--strict")
35
+ output, status = Open3.capture2e({ "BUNDLE_FROZEN" => "false" }, "bundle", "lock", "--update", *Array(names), "--conservative", "--#{level}", "--strict")
36
36
 
37
37
  if status.exitstatus == FROZEN_EXIT_CODE
38
- raise Secupdater::Error, "bundle update can't change Gemfile.lock (is BUNDLE_DEPLOYMENT set?)\n#{output}"
38
+ raise Secupdater::Error, "bundle lock can't change Gemfile.lock (is BUNDLE_DEPLOYMENT set?)\n#{output}"
39
39
  end
40
40
 
41
41
  unless status.success?
42
42
  raise Secupdater::UpdateCommandFailed.new(
43
- "bundle update command returned #{status.exitstatus}",
43
+ "bundle lock command returned #{status.exitstatus}",
44
44
  status.exitstatus,
45
45
  output
46
46
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Secupdater
4
- VERSION = "0.2.0alpha2"
4
+ VERSION = "0.2.0alpha3"
5
5
  end
@@ -109,7 +109,7 @@ RSpec.describe "secupdater end to end" do
109
109
  end
110
110
  end
111
111
 
112
- context "real bundle update --local against fixture vendor/cache gems", :integration do
112
+ context "real bundle lock --update --local against fixture vendor/cache gems", :integration do
113
113
  it "bumps the gem in Gemfile.lock"
114
114
  end
115
115
  end
@@ -137,10 +137,10 @@ RSpec.describe Secupdater::Ecosystem::Rubygems do
137
137
  end
138
138
  end
139
139
 
140
- it "runs a strict, conservative, unfrozen bundle update at the given level" do
140
+ it "runs a strict, conservative, unfrozen bundle lock --update at the given level" do
141
141
  rubygems.try_update("css_parser", level: :minor)
142
142
 
143
- expect(Open3).to have_received(:capture2e).with({ "BUNDLE_FROZEN" => "false" }, "bundle", "update", "css_parser", "--conservative", "--minor", "--strict")
143
+ expect(Open3).to have_received(:capture2e).with({ "BUNDLE_FROZEN" => "false" }, "bundle", "lock", "--update", "css_parser", "--conservative", "--minor", "--strict")
144
144
  end
145
145
 
146
146
  it "returns the lockfile change with its new and original content" do
@@ -164,7 +164,7 @@ RSpec.describe Secupdater::Ecosystem::Rubygems do
164
164
  it "passes it as a single argument without going through a shell" do
165
165
  rubygems.try_update("css_parser; touch pwned", level: :patch)
166
166
 
167
- expect(Open3).to have_received(:capture2e).with({ "BUNDLE_FROZEN" => "false" }, "bundle", "update", "css_parser; touch pwned", "--conservative", "--patch", "--strict")
167
+ expect(Open3).to have_received(:capture2e).with({ "BUNDLE_FROZEN" => "false" }, "bundle", "lock", "--update", "css_parser; touch pwned", "--conservative", "--patch", "--strict")
168
168
  end
169
169
  end
170
170
 
@@ -39,7 +39,7 @@ module UpdateSpec
39
39
 
40
40
  case outcome
41
41
  when :fail
42
- raise Secupdater::UpdateCommandFailed.new("bundle update failed", 1, "could not resolve #{name}")
42
+ raise Secupdater::UpdateCommandFailed.new("bundle lock failed", 1, "could not resolve #{name}")
43
43
  when :abort
44
44
  raise Secupdater::Error, "lockfile is frozen"
45
45
  when :unchanged
@@ -134,7 +134,7 @@ RSpec.describe Secupdater::Update do
134
134
  end
135
135
  end
136
136
 
137
- context "bundle update fails for the first gem" do
137
+ context "bundle lock fails for the first gem" do
138
138
  let(:outcomes) { { "rack" => :fail, "nokogiri" => "2.0" } }
139
139
 
140
140
  it "records the failure and continues to the next gem" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: secupdater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0alpha2
4
+ version: 0.2.0alpha3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Anderson