rex-text 0.2.37 → 0.2.40
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/workflows/verify.yml +26 -2
- data/lib/rex/text/version.rb +1 -1
- data/lib/rex/text/wrapped_table.rb +6 -7
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6aa8880ab44795dde36fab9173dcfbbe2f2ad0afecb1574dad0620d57f3b7d70
|
4
|
+
data.tar.gz: 404c7abc28c4cde12fe46a1de4a3ceff55b96faf1734d3d913690977e4895f5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3719c96add95b2694c20572562674e1ba5de06ecab52d43e2e7921b71d790acaf197d416326674c3ae276d9fcffb0cc3dc601ea74be6bd2b3cf67d111df7125
|
7
|
+
data.tar.gz: 4c114558bae64642e567c73a43ca8462cae5df391a469b9017ef18672238dbf04097ace28b6bad24758836f078a6a99f8d098cc43a330f131487fe5281ad8f93
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -1,5 +1,21 @@
|
|
1
1
|
name: Verify
|
2
2
|
|
3
|
+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
|
4
|
+
permissions:
|
5
|
+
actions: none
|
6
|
+
checks: none
|
7
|
+
contents: none
|
8
|
+
deployments: none
|
9
|
+
id-token: none
|
10
|
+
issues: none
|
11
|
+
discussions: none
|
12
|
+
packages: none
|
13
|
+
pages: none
|
14
|
+
pull-requests: none
|
15
|
+
repository-projects: none
|
16
|
+
security-events: none
|
17
|
+
statuses: none
|
18
|
+
|
3
19
|
on:
|
4
20
|
push:
|
5
21
|
branches:
|
@@ -10,7 +26,7 @@ on:
|
|
10
26
|
|
11
27
|
jobs:
|
12
28
|
test:
|
13
|
-
runs-on:
|
29
|
+
runs-on: ${{ matrix.os }}
|
14
30
|
timeout-minutes: 40
|
15
31
|
|
16
32
|
strategy:
|
@@ -18,13 +34,21 @@ jobs:
|
|
18
34
|
matrix:
|
19
35
|
ruby:
|
20
36
|
- 2.7
|
37
|
+
- 3.0
|
38
|
+
- 3.1
|
39
|
+
os:
|
40
|
+
- ubuntu-20.04
|
41
|
+
- ubuntu-latest
|
42
|
+
exclude:
|
43
|
+
- { os: ubuntu-latest, ruby: 2.7 }
|
44
|
+
- { os: ubuntu-latest, ruby: 3.0 }
|
21
45
|
test_cmd:
|
22
46
|
- bundle exec rspec
|
23
47
|
|
24
48
|
env:
|
25
49
|
RAILS_ENV: test
|
26
50
|
|
27
|
-
name: Ruby ${{ matrix.ruby }} - ${{ matrix.test_cmd }}
|
51
|
+
name: ${{ matrix.os }} - Ruby ${{ matrix.ruby }} - ${{ matrix.test_cmd }}
|
28
52
|
steps:
|
29
53
|
- name: Checkout code
|
30
54
|
uses: actions/checkout@v2
|
data/lib/rex/text/version.rb
CHANGED
@@ -183,12 +183,11 @@ class WrappedTable
|
|
183
183
|
raise RuntimeError, 'Invalid number of columns!'
|
184
184
|
end
|
185
185
|
formatted_fields = fields.map.with_index { |field, idx|
|
186
|
-
|
187
|
-
field = format_table_field(field.to_s.strip, idx)
|
186
|
+
field = format_table_field(field, idx)
|
188
187
|
|
189
|
-
if (colprops[idx]['MaxWidth'] < display_width(field
|
188
|
+
if (colprops[idx]['MaxWidth'] < display_width(field))
|
190
189
|
old = colprops[idx]['MaxWidth']
|
191
|
-
colprops[idx]['MaxWidth'] = display_width(field
|
190
|
+
colprops[idx]['MaxWidth'] = display_width(field)
|
192
191
|
end
|
193
192
|
|
194
193
|
field
|
@@ -410,7 +409,7 @@ protected
|
|
410
409
|
values_as_chunks = values.each_with_index.map do |value, idx|
|
411
410
|
column_width = optimal_widths[idx]
|
412
411
|
value
|
413
|
-
.
|
412
|
+
.chars
|
414
413
|
.each_slice(column_width)
|
415
414
|
.map(&:join)
|
416
415
|
end
|
@@ -511,13 +510,13 @@ protected
|
|
511
510
|
end
|
512
511
|
|
513
512
|
def format_table_field(str, idx)
|
514
|
-
str_cp = str.
|
513
|
+
str_cp = str.to_s.encode('UTF-8', invalid: :replace, undef: :replace).strip
|
515
514
|
|
516
515
|
colprops[idx]['Formatters'].each do |f|
|
517
516
|
str_cp = f.format(str_cp)
|
518
517
|
end
|
519
518
|
|
520
|
-
str_cp
|
519
|
+
str_cp
|
521
520
|
end
|
522
521
|
|
523
522
|
def style_table_field(str, _idx)
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rex-text
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.40
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Metasploit Hackers
|
@@ -93,7 +93,7 @@ cert_chain:
|
|
93
93
|
EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
|
94
94
|
9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
|
95
95
|
-----END CERTIFICATE-----
|
96
|
-
date:
|
96
|
+
date: 2022-08-31 00:00:00.000000000 Z
|
97
97
|
dependencies:
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: rake
|
metadata.gz.sig
CHANGED
Binary file
|