tty_string 2.0.0 → 2.0.1

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
  SHA256:
3
- metadata.gz: 73cc746b842f0d06ee1999b3f489a6ff01dc369dab4541bc35b095fe48e040ca
4
- data.tar.gz: 5e4ab9ee53fc27904a98e59c8f264fe14618ed324e9fc2097dd408da9614ff9d
3
+ metadata.gz: '09c75d4e226fcdb40060ba61420acdbd45496ba321ab76e63e6f3cfaff6c1769'
4
+ data.tar.gz: 12cdd2deb8a45550bc3225aafdd02982039d2293ea90e9f82063809512306f2b
5
5
  SHA512:
6
- metadata.gz: df7fa737a041d1593609f342e060c5a92a78c17fb8b7df8658c72c803d9f8ca72a6c8137ccda4ecdfadd9f042a9652c6ec33c554ad090edc9d2aad7eef1deb03
7
- data.tar.gz: bd1246abfe031c1206d932e30a724b64e14455c99e9d7298774dbf8c76157ec365de312f32173b0adcfed11f906100bee7ded4151c82699332255d4b0d4cdd54
6
+ metadata.gz: d01fea8ea93629dc0467ecfb4d37d28a23f53cb4fa3e61843ae1a189e5f1391778d2d79efaacee59dc9855678fda48f1d0434d6bcf6c43f120881399eaed0835
7
+ data.tar.gz: 3b06c7653d84ec1bf2864007daee5a958b968ef30a75c0b9463cf22f04aab0ac0d0b24560b9282dcda3c065424503d224324ae7d5b067afc0bec85a22def3b24
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v2.0.1
2
+ - Fix warning
3
+
1
4
  # v2.0.0
2
5
  - TTYString is now a module not a class.
3
6
  - Address the issue where preserved styles and unknown codes would cause the cursor to be misaligned when moving, and potentially overwriting styles unexpectedly:
@@ -27,11 +27,14 @@ module TTYString
27
27
  @re ||= /\e\[#{args_re}#{char}/
28
28
  end
29
29
 
30
- def args_re
30
+ def args_re # rubocop:disable Metrics/MethodLength
31
31
  case max_args
32
- when 0, 1 then /(?:[0-:<-?]*){0,#{max_args}}/
32
+ # :nocov:
33
+ when 0 then nil
34
+ # :nocov:
35
+ when 1 then /[0-:<-?]*/
33
36
  when -1 then %r{[0-?]*[ -/]*}
34
- else /(?:(?:[0-:<-?]*)?(?:;(?:[0-:<-?]*)?){0,#{max_args - 1}})?/
37
+ else /(?:(?:[0-:<-?]*)(?:;(?:[0-:<-?]*)){0,#{max_args - 1}})?/
35
38
  end
36
39
  end
37
40
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TTYString
4
- VERSION = '2.0.0'
4
+ VERSION = '2.0.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tty_string
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dana Sherson