rex-text 0.2.28 → 0.2.33

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: ed0a3f361cc220f42bd061edb39b914add50ad3a52f196f1d02bce1e3e56254a
4
- data.tar.gz: b9317aea70870fc37394cf4d60c53b12b314e0c0f5da7ed949e0af658f54a2de
3
+ metadata.gz: 3121a348aed99e006e8413ec63eadbb4de00ed5a8be4c0b11446757d414aa99e
4
+ data.tar.gz: 33de5bb9deb6958ce55e64a089613380ec700924e010659fdb1b3292c8917cb7
5
5
  SHA512:
6
- metadata.gz: 984bc5972b4ac1abe5dbd98dbe651bcdc785724b61062062ee1c0aa5811cbd78d54c45bef34f5103e191b878b42fd341ebe37ad0bd482b7e99959b558f5aba4f
7
- data.tar.gz: f21d06b23911998f4d178c081d420e18e1692e41855cf67d44c0d15509501efdc6745c592fbd3d5681171921c71a67c3e686004bf48e6c7bafdd4aa8747f2ad8
6
+ metadata.gz: bce961c3e20f2e646101565c44c3b31fa8bc636e474cc9f07e24b26bd9fbf3a6d7fe14a03a92bce97ef8afc15440f575d22d625ba5262127af8f0f7c9bf4aa33
7
+ data.tar.gz: c4804270646f5d5bca45d0f029295b0fbf25e13b486af66a0f69563d8007029cdf892733a207a225a8accf5744ae36fc01ded65fe304c17548bfa7cdd6bc4763
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -0,0 +1,57 @@
1
+ name: Verify
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - '*'
7
+ pull_request:
8
+ branches:
9
+ - '*'
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-16.04
14
+ timeout-minutes: 40
15
+
16
+ strategy:
17
+ fail-fast: true
18
+ matrix:
19
+ ruby:
20
+ - 2.7
21
+ test_cmd:
22
+ - bundle exec rspec
23
+
24
+ env:
25
+ RAILS_ENV: test
26
+
27
+ name: Ruby ${{ matrix.ruby }} - ${{ matrix.test_cmd }}
28
+ steps:
29
+ - name: Checkout code
30
+ uses: actions/checkout@v2
31
+
32
+ - uses: actions/setup-ruby@v1
33
+ with:
34
+ ruby-version: ${{ matrix.ruby }}
35
+
36
+ - name: Setup bundler
37
+ run: |
38
+ gem install bundler
39
+
40
+ - uses: actions/cache@v2
41
+ with:
42
+ path: vendor/bundle
43
+ key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
44
+ restore-keys: |
45
+ ${{ runner.os }}-gems-
46
+
47
+ - name: Bundle install
48
+ run: |
49
+ bundle config path vendor/bundle
50
+ bundle install --jobs 4 --retry 3
51
+
52
+ - name: ${{ matrix.test_cmd }}
53
+ run: |
54
+ echo "${CMD}"
55
+ bash -c "${CMD}"
56
+ env:
57
+ CMD: ${{ matrix.test_cmd }}
data/.travis.yml CHANGED
@@ -3,8 +3,4 @@ group: stable
3
3
  cache: bundler
4
4
  language: ruby
5
5
  rvm:
6
- - 2.5.1
7
- before_script:
8
- # https://github.com/travis-ci/travis-ci/issues/8978
9
- - gem update --system
10
- - gem install bundler
6
+ - 2.7.2
@@ -21,15 +21,22 @@ class Table
21
21
  # To enforce all tables to be wrapped to the terminal's current width, call `Table.wrap_tables!`
22
22
  # before invoking `Table.new` as normal.
23
23
  def self.new(*args, &block)
24
- if wrap_tables?
25
- table_options = args[0]
24
+ if wrap_table?(args)
25
+ table_options = args.first
26
26
  return ::Rex::Text::WrappedTable.new(table_options)
27
27
  end
28
28
  return super(*args, &block)
29
29
  end
30
30
 
31
- def self.wrap_tables?
32
- @@wrapped_tables_enabled ||= false
31
+ def self.wrap_table?(args)
32
+ return false unless wrapped_tables?
33
+
34
+ table_options = args.first
35
+ if table_options&.key?('WordWrap')
36
+ return table_options['WordWrap']
37
+ end
38
+
39
+ wrapped_tables?
33
40
  end
34
41
 
35
42
  def self.wrap_tables!
@@ -40,6 +47,10 @@ class Table
40
47
  @@wrapped_tables_enabled = false
41
48
  end
42
49
 
50
+ def self.wrapped_tables?
51
+ @@wrapped_tables_enabled ||= false
52
+ end
53
+
43
54
  #
44
55
  # Initializes a text table instance using the supplied properties. The
45
56
  # Table class supports the following hash attributes:
@@ -220,7 +220,7 @@ module Rex
220
220
  # @return [String] a UTF-8 equivalent
221
221
  # @note This method will discard invalid characters
222
222
  def self.to_utf8(str)
223
- str.encode('utf-8', { :invalid => :replace, :undef => :replace, :replace => '' })
223
+ str.encode('utf-8', **{ :invalid => :replace, :undef => :replace, :replace => '' })
224
224
  end
225
225
 
226
226
  #
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module Text
3
- VERSION = "0.2.28"
3
+ VERSION = "0.2.33"
4
4
  end
5
5
  end
@@ -1,6 +1,7 @@
1
1
  # -*- coding: binary -*-
2
2
  require 'ipaddr'
3
3
  require 'io/console'
4
+ require 'bigdecimal'
4
5
 
5
6
  module Rex
6
7
  module Text
@@ -70,8 +71,7 @@ class WrappedTable
70
71
  # updated below if we got a "Rows" option
71
72
  self.rows = []
72
73
 
73
- # TODO: Discuss a cleaner way to handle this information
74
- self.width = opts['Width'] || ::IO.console.winsize[1]
74
+ self.width = opts['Width'] || ::IO.console&.winsize&.[](1) || ::BigDecimal::INFINITY
75
75
  self.indent = opts['Indent'] || 0
76
76
  self.cellpad = opts['CellPad'] || 2
77
77
  self.prefix = opts['Prefix'] || ''
data/rex-text.gemspec CHANGED
@@ -6,8 +6,8 @@ require 'rex/text/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "rex-text"
8
8
  spec.version = Rex::Text::VERSION
9
- spec.authors = ["David 'thelightcosine' Maloney"]
10
- spec.email = ["DMaloney@rapid7.com"]
9
+ spec.authors = ['Metasploit Hackers']
10
+ spec.email = ['msfdev@metasploit.com']
11
11
 
12
12
  spec.summary = %q{Provides Text Manipulation Methods for Exploitation}
13
13
  spec.description = %q{This Gem contains all of the Ruby Exploitation(Rex) methods for text manipulation and generation}
@@ -18,9 +18,8 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.required_ruby_version = '>= 2.2.0'
21
+ spec.required_ruby_version = '>= 2.4.0'
22
22
 
23
- spec.add_development_dependency "bundler"
24
23
  spec.add_development_dependency "rake"
25
24
  spec.add_development_dependency "rspec"
26
25
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rex-text
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.28
4
+ version: 0.2.33
5
5
  platform: ruby
6
6
  authors:
7
- - David 'thelightcosine' Maloney
7
+ - Metasploit Hackers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain:
@@ -64,20 +64,20 @@ cert_chain:
64
64
  -----END CERTIFICATE-----
65
65
  - |
66
66
  -----BEGIN CERTIFICATE-----
67
- MIIFIzCCBAugAwIBAgIQDX9ZkVJ2eNVTlibR5ALyJTANBgkqhkiG9w0BAQsFADBy
67
+ MIIFIzCCBAugAwIBAgIQCMePMbkSxvnPeJhYXIfaxzANBgkqhkiG9w0BAQsFADBy
68
68
  MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
69
69
  d3cuZGlnaWNlcnQuY29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEyIEFzc3VyZWQg
70
- SUQgQ29kZSBTaWduaW5nIENBMB4XDTE5MTAxNjAwMDAwMFoXDTIwMTAxOTEyMDAw
70
+ SUQgQ29kZSBTaWduaW5nIENBMB4XDTIwMTAwNzAwMDAwMFoXDTIzMTEwNjEyMDAw
71
71
  MFowYDELMAkGA1UEBhMCVVMxFjAUBgNVBAgTDU1hc3NhY2h1c2V0dHMxDzANBgNV
72
72
  BAcTBkJvc3RvbjETMBEGA1UEChMKUmFwaWQ3IExMQzETMBEGA1UEAxMKUmFwaWQ3
73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
+ dxxQKWGOQy0m4fBrkyjAyH9Djjn81RbQrqYgPuhd5nD0HjN3VUQLhQbIJrk9TVs0
93
+ EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
94
+ 9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
95
95
  -----END CERTIFICATE-----
96
- date: 2020-08-07 00:00:00.000000000 Z
96
+ date: 2021-02-24 00:00:00.000000000 Z
97
97
  dependencies:
98
- - !ruby/object:Gem::Dependency
99
- name: bundler
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: '0'
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: '0'
112
98
  - !ruby/object:Gem::Dependency
113
99
  name: rake
114
100
  requirement: !ruby/object:Gem::Requirement
@@ -140,11 +126,12 @@ dependencies:
140
126
  description: This Gem contains all of the Ruby Exploitation(Rex) methods for text
141
127
  manipulation and generation
142
128
  email:
143
- - DMaloney@rapid7.com
129
+ - msfdev@metasploit.com
144
130
  executables: []
145
131
  extensions: []
146
132
  extra_rdoc_files: []
147
133
  files:
134
+ - ".github/workflows/verify.yml"
148
135
  - ".gitignore"
149
136
  - ".rspec"
150
137
  - ".ruby-version"
@@ -191,7 +178,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
191
178
  requirements:
192
179
  - - ">="
193
180
  - !ruby/object:Gem::Version
194
- version: 2.2.0
181
+ version: 2.4.0
195
182
  required_rubygems_version: !ruby/object:Gem::Requirement
196
183
  requirements:
197
184
  - - ">="
metadata.gz.sig CHANGED
Binary file