rex-text 0.2.38 → 0.2.41

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: bf931b9b53daa1391f3410fa721235e01375a64f8e7d06919af5f6e69f30b5c0
4
- data.tar.gz: ca35cab4eeefe5ef8df4d17cfae63c5c58047b5a56daf402dcff34ce378d923c
3
+ metadata.gz: 99760857150edd0c9d0c3147b6529fa51244895878cf8aabb265cc17054931ed
4
+ data.tar.gz: 0bf2431de8fbdd5618a65925972e09e768f1e5b3c960a63cd4764d4bbc1252e5
5
5
  SHA512:
6
- metadata.gz: eea968a9e08f2f54b666ce99e0cd8767541eb9560d6c2d6f5cee01d005c1c92f72772be0ae9a4807bc1ec82e526d903f1f79df82108c9f742b5269a3d0516489
7
- data.tar.gz: 78ac55937b82a2ef55fc4e926b6afd4c9726fbefa63c8699e954499da83f54ebc28443caa985d401d93902e1233e9406d332f06e26eddd80cd7320fb9b064caa
6
+ metadata.gz: 10dc8566dc93c40022a13b03cb0f2e4ebde49e1bba0a7133d7048512635be71a084e54c4e68e39a7b3b36f44da57a81db6896c9cd739b314b49133cce4d9bcb3
7
+ data.tar.gz: 92daf4cf40ba727164f354be16b7193b0c84dc2bf87f89f4dd59ea2d6ac1172ac58993ad12dc30216a9e490d24f1c8aaad7083d75f01033f461fe0628cd0c6c8
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: ubuntu-18.04
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/lang.rb CHANGED
@@ -38,6 +38,28 @@ module Rex
38
38
  ret << " };\n"
39
39
  end
40
40
 
41
+ #
42
+ # Converts to a golang style array of bytes
43
+ #
44
+ def self.to_golang(str, wrap = DefaultWrap, name = "buf")
45
+ ret = "#{name} := []byte{"
46
+ i = -1;
47
+ while (i += 1) < str.length
48
+ ret << "\n" if i%(wrap/4) == 0
49
+ ret << "0x" << str[i].unpack("H*")[0] << ", "
50
+ end
51
+ ret = ret[0..ret.length-3] #cut off last comma
52
+ ret << " }\n"
53
+
54
+ end
55
+
56
+ #
57
+ # Creates a golang style comment
58
+ #
59
+ def self.to_golang_comment(str, wrap = DefaultWrap)
60
+ return "/*\n" + wordwrap(str, 0, wrap, '', '') + "*/\n"
61
+ end
62
+
41
63
  #
42
64
  # Creates a c-style comment
43
65
  #
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module Text
3
- VERSION = "0.2.38"
3
+ VERSION = "0.2.41"
4
4
  end
5
5
  end
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.38
4
+ version: 0.2.41
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: 2022-06-29 00:00:00.000000000 Z
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