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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c889fade648cffc3bfe73e8a168b4e5353f3eb1fe652fa1b1839f9733c630bc8
4
- data.tar.gz: c02957f5bc40cb4d8a3dc18d5c078540f5395118ade25df55379c6399c264d03
3
+ metadata.gz: 729dee0799d356e7a109e5ed3e5ac6cf07d322e9c136e3fc55477581e6457953
4
+ data.tar.gz: 398f30816941076c3ca6320526aa630875ebdae12a6274f3c0419e37db55f271
5
5
  SHA512:
6
- metadata.gz: 97e57a81e839aaafcd83921d258ab2a95d9b7671120ef9c72a0df742c2ddfd4a84bb2d92a1b5fc426979910aea82e1b192226e1dfaddac218a057791ca892012
7
- data.tar.gz: 1d89d4153ec4cd0b1604f2a8e4a735d00606d45111f9ad1db92b302968a510fbedfd6a588022ab1120fac4ed9413e7aac3e0694b6cd4200e65cfcf162ed2375e
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.5.638'
4
+ VERSION = '0.5.639'
5
5
  end
@@ -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
- doc = File.read(doc_path)
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 = File.read(File.join(repo_root, 'bin/pwn'))
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(File.read(path)).to match(/pwn[ _]setup|PWN::Setup/),
97
- "#{f} does not delegate to `pwn setup` — doc claims it does"
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(File.read(File.join(repo_root, 'bin/pwn_setup')))
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.638
4
+ version: 0.5.639
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.