ex_aequo 0.2.3 → 0.2.5

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: 93c6e147aed9d019eca15bd2ef01eca0a963865edc3836b62ade5ac56a33ac78
4
- data.tar.gz: f3ada2a623e9f50109f64ca3e6c711e394ccbf7ef3b5f135ff8ece55fc832081
3
+ metadata.gz: c6b01e509cb74f6f5082dab85a74484caab9cc5cf7b36c93fce837f262dc947f
4
+ data.tar.gz: 6e24bdda3f88cdb57c82796b300139e33e7a0fa41db8443e7fb1644d8ceef8c7
5
5
  SHA512:
6
- metadata.gz: 9a74c191b8f1a45e81536e64c715611a2629a9a0a4c79418bdf1ab5f56c20fee4cadb6a4486c81888c8fafac68ec1b8a79f020eae7efc7c28d42a2897685cba0
7
- data.tar.gz: c857b6f53336633ae930a6d0f0d2616bfae956baaa8353107ce1d00564261ebb1eb196f9f683cfc50d953ec72955dcd21b6986e99f53f0939287f0577aea4546
6
+ metadata.gz: 75f600153b4b90bc5851259db66741785a388bde1c25975cd73c294c19e4b7fdbcfab2061a10b88a090a83ba2bdf3829ec8a80cc62c3504acf8ea56854eb0b6a
7
+ data.tar.gz: 036fd48fcfbbc5cc18c2749f0024cb76e4a2ff597b384b47269066c723bcfe5b3e20a07699f3e67e68265be88845fc6ebd358e92b0a60ac67b886972bb939466
@@ -1,9 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative '../color'
3
4
  module ExAequo
4
5
  module Color
6
+
5
7
  module Text extend self
6
-
8
+ Specials = {
9
+ reset: ExAequo::Color.reset,
10
+ eol: "\n"
11
+ }
12
+
7
13
  def put_col(*segments, to: $stdout)
8
14
  to.puts(colorized_text(segments))
9
15
  end
@@ -33,11 +39,7 @@ module ExAequo
33
39
  def _colorize(color)
34
40
  case ExAequo::Color::Ansi::AnsiColorEscape[color]
35
41
  when nil
36
- if color == :reset
37
- ExAequo::Color.reset
38
- else
39
- raise ArgumentError, "#{color} not yet implemented"
40
- end
42
+ Special.fetch(color) { raise ArgumentError, "#{color} not yet implemented" }
41
43
  else
42
44
  ExAequo::Color::Ansi.ansi(color)
43
45
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module ExAequo
4
4
  module Version
5
- VERSION = '0.2.3'
5
+ VERSION = '0.2.5'
6
6
  end
7
7
  end
8
8
  # SPDX-License-Identifier: Apache-2.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ex_aequo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Dober