pwn 0.5.638 → 0.5.639
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 +4 -4
- data/.github/workflows/install-matrix.yml +14 -0
- data/lib/pwn/version.rb +1 -1
- data/spec/documentation/installation_md_spec.rb +10 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 729dee0799d356e7a109e5ed3e5ac6cf07d322e9c136e3fc55477581e6457953
|
|
4
|
+
data.tar.gz: 398f30816941076c3ca6320526aa630875ebdae12a6274f3c0419e37db55f271
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 390144f0551778087a3621784b56cadbedffcad2635811ef6141425a6879b555363254b1ed3e6047e6df7256f81d3e781681b9cfa10f3e8274ed3876b2058329
|
|
7
|
+
data.tar.gz: 4b653649d86a5669480dad3051b38f055955680f1882e746bacfc1624a6128bf47d5990c7fe9904c9f3d6879a473a86bf58f845deb360992962571a968579645
|
|
@@ -92,6 +92,13 @@ jobs:
|
|
|
92
92
|
{ sed -i '/--user-install/d' /etc/gemrc || true; }
|
|
93
93
|
env:
|
|
94
94
|
DEBIAN_FRONTEND: noninteractive
|
|
95
|
+
# Minimal debian/ubuntu/fedora containers ship with no LANG →
|
|
96
|
+
# Encoding.default_external == US-ASCII → any regex over the
|
|
97
|
+
# UTF-8 doc/bin files raises `invalid byte sequence in US-ASCII`
|
|
98
|
+
# (kali/arch already default to UTF-8, which is why only 6/12
|
|
99
|
+
# legs failed). C.UTF-8 exists on every glibc ≥ 2.35 image.
|
|
100
|
+
LANG: C.UTF-8
|
|
101
|
+
LC_ALL: C.UTF-8
|
|
95
102
|
PWN_FRESH_INSTALL: '1'
|
|
96
103
|
PWN_EXPECTED_PM: ${{ matrix.pm }}
|
|
97
104
|
PWN_PROFILE: ${{ matrix.profile }}
|
|
@@ -183,6 +190,13 @@ jobs:
|
|
|
183
190
|
image: kalilinux/kali-rolling
|
|
184
191
|
env:
|
|
185
192
|
DEBIAN_FRONTEND: noninteractive
|
|
193
|
+
# Minimal debian/ubuntu/fedora containers ship with no LANG →
|
|
194
|
+
# Encoding.default_external == US-ASCII → any regex over the
|
|
195
|
+
# UTF-8 doc/bin files raises `invalid byte sequence in US-ASCII`
|
|
196
|
+
# (kali/arch already default to UTF-8, which is why only 6/12
|
|
197
|
+
# legs failed). C.UTF-8 exists on every glibc ≥ 2.35 image.
|
|
198
|
+
LANG: C.UTF-8
|
|
199
|
+
LC_ALL: C.UTF-8
|
|
186
200
|
PWN_FRESH_INSTALL: '1'
|
|
187
201
|
PWN_EXPECTED_PM: apt
|
|
188
202
|
PWN_PROFILE: core
|
data/lib/pwn/version.rb
CHANGED
|
@@ -22,7 +22,12 @@ require 'pwn/setup'
|
|
|
22
22
|
RSpec.describe 'documentation/Installation.md' do
|
|
23
23
|
repo_root = File.expand_path('../..', __dir__)
|
|
24
24
|
doc_path = File.join(repo_root, 'documentation', 'Installation.md')
|
|
25
|
-
|
|
25
|
+
# File.read must force UTF-8: minimal Debian/Ubuntu/Fedora containers ship
|
|
26
|
+
# with no LANG (Encoding.default_external == US-ASCII) so any regex on the
|
|
27
|
+
# UTF-8 doc/bin files below raises `invalid byte sequence in US-ASCII`.
|
|
28
|
+
# See .github/workflows/install-matrix.yml — this spec must be locale-proof.
|
|
29
|
+
read_utf8 = ->(p) { File.read(p, encoding: 'UTF-8') }
|
|
30
|
+
doc = read_utf8.call(doc_path)
|
|
26
31
|
|
|
27
32
|
# ------------------------------------------------------------------
|
|
28
33
|
# Layer 1 — static doc ↔ code introspection
|
|
@@ -76,7 +81,7 @@ RSpec.describe 'documentation/Installation.md' do
|
|
|
76
81
|
end
|
|
77
82
|
|
|
78
83
|
it 'all three invocation spellings are wired in bin/pwn' do
|
|
79
|
-
pwn_bin =
|
|
84
|
+
pwn_bin = read_utf8.call(File.join(repo_root, 'bin/pwn'))
|
|
80
85
|
expect(pwn_bin).to match(/ARGV\.first == 'setup'/) # `pwn setup ...`
|
|
81
86
|
expect(pwn_bin).to include('pwn_setup') # → bin/pwn_setup
|
|
82
87
|
expect(pwn_bin).to match(/--setup\[?=/) # `pwn --setup[=PROFILE]`
|
|
@@ -93,8 +98,8 @@ RSpec.describe 'documentation/Installation.md' do
|
|
|
93
98
|
path = File.join(repo_root, f)
|
|
94
99
|
next unless File.exist?(path)
|
|
95
100
|
|
|
96
|
-
expect(
|
|
97
|
-
|
|
101
|
+
expect(read_utf8.call(path)).to match(/pwn[ _]setup|PWN::Setup/),
|
|
102
|
+
"#{f} does not delegate to `pwn setup` — doc claims it does"
|
|
98
103
|
end
|
|
99
104
|
end
|
|
100
105
|
|
|
@@ -162,7 +167,7 @@ RSpec.describe 'documentation/Installation.md' do
|
|
|
162
167
|
r = PWN::Setup.check(io: StringIO.new)
|
|
163
168
|
expect([true, false]).to include(r[:ok])
|
|
164
169
|
# bin/pwn_setup: `exit 1 unless r[:ok]` — assert that line still exists
|
|
165
|
-
expect(
|
|
170
|
+
expect(read_utf8.call(File.join(repo_root, 'bin/pwn_setup')))
|
|
166
171
|
.to match(/exit 1 unless r\[:ok\]/)
|
|
167
172
|
end
|
|
168
173
|
|