tone 1.7.0 → 1.8.0

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: 18c48ad0ec9e43c6ea2194e2e8dcf5101886dee25b5d38593c0dde8d0bb360de
4
- data.tar.gz: 18685ded49f7d78ac0b5ea3546d1dc5eac49fd3251e62648a15108ebd93bd465
3
+ metadata.gz: 48788c9aa501191dca33fcfe73a0796ec20b36231f3aa1ecf931f73e9ba23bfd
4
+ data.tar.gz: 6684b4726c8998d59ed03e530466606960dea13ad3e2c9be9d6d5a6d6c3dc2dc
5
5
  SHA512:
6
- metadata.gz: 6ab723211d86539624453f2a30378b8dcebf8e499948c5cb8937151661754dcfe3608b6718ffb69a7daa3dc5de8ec8de502cb12340118d556218db040ebd99a3
7
- data.tar.gz: 93090a8c8ae2c6231d5e5b4f1f8524a281a1cb2cff1d9bf14c751ba4ab70d917199774527cd01bcf78475772c0a21a0ae1a2c743af0a63b2388164a153486be0
6
+ metadata.gz: 9368f63103e2bf0992c39d1edc73e5e46e9f417ba3d4bc1dbc7d11b7b9fd03c22c4440ce3dc9e0c7b4a594d81960c5d8c5c56a538322de870e71d152ff7b8d78
7
+ data.tar.gz: 8877c76af58d219a3c0f23fdbb09ef250b4e8ff4839a6650370c9943250f87928fac4d376f1e8ae65ae34e3aecc14ab06e49c26f1b580187e33219204d1e11e5
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/tone/decoder.rb CHANGED
@@ -6,7 +6,7 @@ module Tone
6
6
  # Decodes color encoded text into metadata (hash).
7
7
  class Decoder
8
8
  PATTERN = /
9
- \e\[ # Start prefix.
9
+ \e\[ # Start.
10
10
  (?<codes>[\d;]+) # Style codes.
11
11
  m # Start suffix.
12
12
  (?<text>.+?) # Lazy text.
@@ -20,7 +20,7 @@ module Tone
20
20
  @prefix_pattern = /.*#{pattern}/m
21
21
  end
22
22
 
23
- def call(text) = scan client.new(String(text))
23
+ def call(text) = scan client.new(text.to_s)
24
24
 
25
25
  private
26
26
 
@@ -28,9 +28,9 @@ module Tone
28
28
 
29
29
  def scan scanner, collection: []
30
30
  until scanner.eos?
31
- result = scanner.scan_until pattern
31
+ match = scanner.scan_until pattern
32
32
 
33
- return collection.append [scanner.string[scanner.rest]] unless result
33
+ return collection.append [scanner.string[scanner.rest]] unless match
34
34
 
35
35
  normal = scanner.pre_match.sub prefix_pattern, ""
36
36
 
data/tone.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "tone"
5
- spec.version = "1.7.0"
5
+ spec.version = "1.8.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/tone"
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.cert_chain = [Gem.default_cert_path]
24
24
 
25
25
  spec.required_ruby_version = ">= 3.3", "<= 3.4"
26
- spec.add_dependency "refinements", "~> 12.8"
26
+ spec.add_dependency "refinements", "~> 12.9"
27
27
  spec.add_dependency "zeitwerk", "~> 2.6"
28
28
 
29
29
  spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -35,7 +35,7 @@ cert_chain:
35
35
  3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
36
36
  gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
37
37
  -----END CERTIFICATE-----
38
- date: 2024-09-01 00:00:00.000000000 Z
38
+ date: 2024-10-07 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: refinements
@@ -43,14 +43,14 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '12.8'
46
+ version: '12.9'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '12.8'
53
+ version: '12.9'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: zeitwerk
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  requirements: []
118
- rubygems_version: 3.5.18
118
+ rubygems_version: 3.5.21
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: A customizable ANSI text terminal colorizer.
metadata.gz.sig CHANGED
Binary file