tone 1.7.0 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/tone/decoder.rb +4 -4
- data/tone.gemspec +3 -3
- data.tar.gz.sig +0 -0
- metadata +7 -7
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0bb58481472e0277583b03e9f762ddf7002eae6037664fa0361693899bf0514
|
4
|
+
data.tar.gz: 45bbc6ab3a79fabc4aec9b87e35e2e839fac993402b82c004070eec5f13a5832
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d455e9c8a27ddcd56e6102789a97a9a8495e081b9561a4d9cd9665fe0aefb7e9a8ed866999899cc748c4c9a1c52fcb7ac398600c0ae392c214d63cab95578ae
|
7
|
+
data.tar.gz: fd11aaeeeff5a2cf5cfce9d0dd6963e8c77ccdcbe9dac9f3156110310af5c752258ad49fecec3c52a52e90a51238c84c8ba8bd79c4878660ae5d7af2acc9ef50
|
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
|
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(
|
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
|
-
|
31
|
+
match = scanner.scan_until pattern
|
32
32
|
|
33
|
-
return collection.append [scanner.string[scanner.rest]] unless
|
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.
|
5
|
+
spec.version = "1.9.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/tone"
|
@@ -23,8 +23,8 @@ 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.
|
27
|
-
spec.add_dependency "zeitwerk", "~> 2.
|
26
|
+
spec.add_dependency "refinements", "~> 12.10"
|
27
|
+
spec.add_dependency "zeitwerk", "~> 2.7"
|
28
28
|
|
29
29
|
spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
|
30
30
|
spec.files = Dir["*.gemspec", "lib/**/*"]
|
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.
|
4
|
+
version: 1.9.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-
|
38
|
+
date: 2024-10-28 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: refinements
|
@@ -43,28 +43,28 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '12.
|
46
|
+
version: '12.10'
|
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.
|
53
|
+
version: '12.10'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: zeitwerk
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '2.
|
60
|
+
version: '2.7'
|
61
61
|
type: :runtime
|
62
62
|
prerelease: false
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '2.
|
67
|
+
version: '2.7'
|
68
68
|
description:
|
69
69
|
email:
|
70
70
|
- brooke@alchemists.io
|
@@ -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.
|
118
|
+
rubygems_version: 3.5.22
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: A customizable ANSI text terminal colorizer.
|
metadata.gz.sig
CHANGED
Binary file
|