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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5c31a79bbf3e3c98290cf8348360817d012933c0a98cd08fb8bd5c07bbcf99e2
|
|
4
|
+
data.tar.gz: ea54a58239e29f22f52a2f13419b2103b4e3a099cd33f01c7b0c21ed9f596153
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
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
|
|
43
|
+
"bundle lock command returned #{status.exitstatus}",
|
|
44
44
|
status.exitstatus,
|
|
45
45
|
output
|
|
46
46
|
)
|
data/lib/secupdater/version.rb
CHANGED
data/spec/e2e/secupdater_spec.rb
CHANGED
|
@@ -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
|
|
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
|
|
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
|