rex-text 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 181bf20065e213ea804a85f21de44e9f1b44982e
4
- data.tar.gz: da78823665c67bdf1843a4738e4ff34fc00666b4
3
+ metadata.gz: 0c27818e326723cec7411336af1822d729eda34b
4
+ data.tar.gz: b1a0bec23fb35bdee52502b8b943fcbe0234820e
5
5
  SHA512:
6
- metadata.gz: a8dad29fe5e79df5a70c34fb5fc2925ebae33ad9ea78754aac5f76b8b6872ef839c1c047a7b426708a09a218318636a57b7cc3920e59615f3507ef59eb0c11b6
7
- data.tar.gz: 59656b234b4c9a02f334b17f84ebb407084c70d5f7e1246770eae8f7ea07004667ca55aee7d97b0fbbc08ac6948fa72fdf6dd7176a6ca49ff932fb371f4ffe49
6
+ metadata.gz: 4097f2e94c8efd357f8ca2773fe57066f547d600167809be138e26ee3dd81dd4720e8d01dda0b0513b0154cd7601e793d4a6f187f3e6391cab5b36217f78c313
7
+ data.tar.gz: fa1442a7548c6dcceb1c69d30696d4e6b8c9fc4a2cf7ec6876cc6690b60d3071d4bdc5c2d09de88629e3b824bcc96de41a33e466e5ff53a472cd4956e1249c73
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -400,7 +400,13 @@ protected
400
400
  # Ensure we pad the minimum required amount
401
401
  max = colprops[colidx]['MaxChar'] || colprops[colidx]['MaxWidth']
402
402
  max = colprops[colidx]['MaxWidth'] if max.to_i > colprops[colidx]['MaxWidth'].to_i
403
- remainder = max - buf.length
403
+ encoding = buf.encoding.name
404
+ if not ["UTF-8", "ASCII-8BIT", "US-ASCII"].include? encoding
405
+ warn '**WARNING** In file ' << __FILE__ << '::' <<\
406
+ __method__.to_s << ': String with unsupported encoding caught!'
407
+ end
408
+ utf8_buf = buf.dup.force_encoding("UTF-8")
409
+ remainder = max - utf8_buf.length
404
410
  remainder = 0 if remainder < 0
405
411
  val = chr * remainder
406
412
 
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module Text
3
- VERSION = "0.2.4"
3
+ VERSION = "0.2.5"
4
4
  end
5
5
  end
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
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - David 'thelightcosine' Maloney
@@ -88,7 +88,7 @@ cert_chain:
88
88
  G+Hmcg1v810agasPdoydE0RTVZgEOOMoQ07qu7JFXVWZ9ZQpHT7qJATWL/b2csFG
89
89
  8mVuTXnyJOKRJA==
90
90
  -----END CERTIFICATE-----
91
- date: 2016-10-14 00:00:00.000000000 Z
91
+ date: 2016-11-14 00:00:00.000000000 Z
92
92
  dependencies:
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: bundler
metadata.gz.sig CHANGED
Binary file