term-ansicolor 1.10.0 → 1.10.1

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: 1b4b022358ec0c08c813fd02b38a04f434d49fcd75db660e25b8fe99a7b1e847
4
- data.tar.gz: a829c2406f9a20c5738297253bcf3e3dc46f497fbb0c3433bef01fa488cd9c10
3
+ metadata.gz: 768db698164c4d6226839c11932c868d2a6e93e2c6d6db03e5fbee3422b8ecf7
4
+ data.tar.gz: 025abdbb49d4c589a00e70c7f467612d24748cc7b43db3901ca7b9bde909e906
5
5
  SHA512:
6
- metadata.gz: 1ee33e17663543ec540ae88b5e84ff8ea6651394d62fe71086258f1294e556180c3255a3f2615dba39f54ab712927b5d862607995e41e7a86cbd43e3ffc89230
7
- data.tar.gz: b17b3b732562f3132f478d01c6ba8b96ae9c158d50ad0ca147c722ddc232125301d911574996e023a4e25696ef574bfce986df05b5a487bd43fb5d82fb6ba4ae
6
+ metadata.gz: ea842c5808c77941ba10f1599cda75bd8a32c07317c126298b4000b7340111f83a0dc6c7b79862d8e708860f5b4e0f2ede10e82d7a7e678fb9cf3f7122473266
7
+ data.tar.gz: 2edff8a89a38ad47f54f9110923ae2a809e9196f8222d9da6ba82513bdd650eff66623baeacfb075cccc03e7b21728c1a3a58a6d759aceb61336f271a6a15add
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.10.0
1
+ 1.10.1
@@ -4,7 +4,7 @@ module Term
4
4
  class Color256
5
5
  Attribute.set :color0, 0, html: '#000000'
6
6
  Attribute.set :color1, 1, html: '#800000'
7
- Attribute.set :color2, 2, html: '#808000'
7
+ Attribute.set :color2, 2, html: '#008000'
8
8
  Attribute.set :color3, 3, html: '#808000'
9
9
  Attribute.set :color4, 4, html: '#000080'
10
10
  Attribute.set :color5, 5, html: '#800080'
@@ -2,23 +2,23 @@ module Term
2
2
  module ANSIColor
3
3
  class Attribute
4
4
  class Color8
5
- Attribute.set :black, 30, color8: '#000000'
6
- Attribute.set :red, 31, color8: '#800000'
7
- Attribute.set :green, 32, color8: '#008000'
8
- Attribute.set :yellow, 33, color8: '#808000'
9
- Attribute.set :blue, 34, color8: '#000080'
10
- Attribute.set :magenta, 35, color8: '#800080'
11
- Attribute.set :cyan, 36, color8: '#008080'
12
- Attribute.set :white, 37, color8: '#c0c0c0'
5
+ Attribute.set :black, 30, direct: '#000000'
6
+ Attribute.set :red, 31, direct: '#800000'
7
+ Attribute.set :green, 32, direct: '#008000'
8
+ Attribute.set :yellow, 33, direct: '#808000'
9
+ Attribute.set :blue, 34, direct: '#000080'
10
+ Attribute.set :magenta, 35, direct: '#800080'
11
+ Attribute.set :cyan, 36, direct: '#008080'
12
+ Attribute.set :white, 37, direct: '#c0c0c0'
13
13
 
14
- Attribute.set :on_black, 40, color8: '#000000'
15
- Attribute.set :on_red, 41, color8: '#800000'
16
- Attribute.set :on_green, 42, color8: '#008000'
17
- Attribute.set :on_yellow, 43, color8: '#808000'
18
- Attribute.set :on_blue, 44, color8: '#000080'
19
- Attribute.set :on_magenta, 45, color8: '#800080'
20
- Attribute.set :on_cyan, 46, color8: '#008080'
21
- Attribute.set :on_white, 47, color8: '#808080'
14
+ Attribute.set :on_black, 40, direct: '#000000'
15
+ Attribute.set :on_red, 41, direct: '#800000'
16
+ Attribute.set :on_green, 42, direct: '#008000'
17
+ Attribute.set :on_yellow, 43, direct: '#808000'
18
+ Attribute.set :on_blue, 44, direct: '#000080'
19
+ Attribute.set :on_magenta, 45, direct: '#800080'
20
+ Attribute.set :on_cyan, 46, direct: '#008080'
21
+ Attribute.set :on_white, 47, direct: '#808080'
22
22
  end
23
23
  end
24
24
  end
@@ -2,41 +2,39 @@ module Term
2
2
  module ANSIColor
3
3
  class Attribute
4
4
  class IntenseColor8
5
- # High intensity, aixterm (works in OS X)
6
- Attribute.set :intense_black, 90
7
- Attribute.set :bright_black, 90
8
- Attribute.set :intense_red, 91
9
- Attribute.set :bright_red, 91
10
- Attribute.set :intense_green, 92
11
- Attribute.set :bright_green, 92
12
- Attribute.set :intense_yellow, 93
13
- Attribute.set :bright_yellow, 93
14
- Attribute.set :intense_blue, 94
15
- Attribute.set :bright_blue, 94
16
- Attribute.set :intense_magenta, 95
17
- Attribute.set :bright_magenta, 95
18
- Attribute.set :intense_cyan, 96
19
- Attribute.set :bright_cyan, 96
20
- Attribute.set :intense_white, 97
21
- Attribute.set :bright_white, 97
5
+ Attribute.set :intense_black, 90, direct: '#808080'
6
+ Attribute.set :bright_black, 90, direct: '#808080'
7
+ Attribute.set :intense_red, 91, direct: '#ff0000'
8
+ Attribute.set :bright_red, 91, direct: '#ff0000'
9
+ Attribute.set :intense_green, 92, direct: '#00ff00'
10
+ Attribute.set :bright_green, 92, direct: '#00ff00'
11
+ Attribute.set :intense_yellow, 93, direct: '#ffff00'
12
+ Attribute.set :bright_yellow, 93, direct: '#ffff00'
13
+ Attribute.set :intense_blue, 94, direct: '#0000ff'
14
+ Attribute.set :bright_blue, 94, direct: '#0000ff'
15
+ Attribute.set :intense_magenta, 95, direct: '#ff00ff'
16
+ Attribute.set :bright_magenta, 95, direct: '#ff00ff'
17
+ Attribute.set :intense_cyan, 96, direct: '#00ffff'
18
+ Attribute.set :bright_cyan, 96, direct: '#00ffff'
19
+ Attribute.set :intense_white, 97, direct: '#ffffff'
20
+ Attribute.set :bright_white, 97, direct: '#ffffff'
22
21
 
23
- # High intensity background, aixterm (works in OS X)
24
- Attribute.set :on_intense_black, 100
25
- Attribute.set :on_bright_black, 100
26
- Attribute.set :on_intense_red, 101
27
- Attribute.set :on_bright_red, 101
28
- Attribute.set :on_intense_green, 102
29
- Attribute.set :on_bright_green, 102
30
- Attribute.set :on_intense_yellow, 103
31
- Attribute.set :on_bright_yellow, 103
32
- Attribute.set :on_intense_blue, 104
33
- Attribute.set :on_bright_blue, 104
34
- Attribute.set :on_intense_magenta, 105
35
- Attribute.set :on_bright_magenta, 105
36
- Attribute.set :on_intense_cyan, 106
37
- Attribute.set :on_bright_cyan, 106
38
- Attribute.set :on_intense_white, 107
39
- Attribute.set :on_bright_white, 107
22
+ Attribute.set :on_intense_black, 100, direct: '#808080'
23
+ Attribute.set :on_bright_black, 100, direct: '#808080'
24
+ Attribute.set :on_intense_red, 101, direct: '#ff0000'
25
+ Attribute.set :on_bright_red, 101, direct: '#ff0000'
26
+ Attribute.set :on_intense_green, 102, direct: '#00ff00'
27
+ Attribute.set :on_bright_green, 102, direct: '#00ff00'
28
+ Attribute.set :on_intense_yellow, 103, direct: '#ffff00'
29
+ Attribute.set :on_bright_yellow, 103, direct: '#ffff00'
30
+ Attribute.set :on_intense_blue, 104, direct: '#0000ff'
31
+ Attribute.set :on_bright_blue, 104, direct: '#0000ff'
32
+ Attribute.set :on_intense_magenta, 105, direct: '#ff00ff'
33
+ Attribute.set :on_bright_magenta, 105, direct: '#ff00ff'
34
+ Attribute.set :on_intense_cyan, 106, direct: '#00ffff'
35
+ Attribute.set :on_bright_cyan, 106, direct: '#00ffff'
36
+ Attribute.set :on_intense_white, 107, direct: '#ffffff'
37
+ Attribute.set :on_bright_white, 107, direct: '#ffffff'
40
38
  end
41
39
  end
42
40
  end
@@ -17,7 +17,7 @@ module Term
17
17
  if color
18
18
  a = Term::ANSIColor::Attribute[color]
19
19
  color_code =
20
- if a.true_color? || a.rgb_color? || a.color8?
20
+ if a.true_color? || a.rgb_color? || a.direct?
21
21
  color_code = "\e[58;2;#{a.rgb.to_a * ?;}"
22
22
  else
23
23
  raise ArgumentError, "invalid color #{a.name.inspect}"
@@ -91,8 +91,8 @@ module Term
91
91
  if rgb = options[:true_color]
92
92
  @true_color = true
93
93
  @rgb = rgb
94
- elsif rgb = options[:color8]
95
- @color8 = true
94
+ elsif rgb = options[:direct]
95
+ @direct = true
96
96
  @rgb = RGBTriple.from_html(rgb)
97
97
  elsif html = options[:html]
98
98
  @rgb = RGBTriple.from_html(html)
@@ -110,7 +110,7 @@ module Term
110
110
  background? ? "48;2;#{@rgb.to_a * ?;}" : "38;2;#{@rgb.to_a * ?;}"
111
111
  elsif rgb_color?
112
112
  background? ? "48;5;#{@code}" : "38;5;#{@code}"
113
- elsif color8?
113
+ elsif direct?
114
114
  background? ? (@code.to_i + 10).to_s : @code
115
115
  else
116
116
  @code
@@ -125,8 +125,8 @@ module Term
125
125
  !!@background
126
126
  end
127
127
 
128
- def color8?
129
- !!@color8
128
+ def direct?
129
+ !!@direct
130
130
  end
131
131
 
132
132
  attr_writer :background
@@ -134,7 +134,7 @@ module Term
134
134
  attr_reader :rgb
135
135
 
136
136
  def rgb_color?
137
- !!@rgb && !@true_color && !@color8
137
+ !!@rgb && !@true_color && !@direct
138
138
  end
139
139
 
140
140
  def true_color?
@@ -1,6 +1,6 @@
1
1
  module Term::ANSIColor
2
2
  # Term::ANSIColor version
3
- VERSION = '1.10.0'
3
+ VERSION = '1.10.1'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: term-ansicolor 1.10.0 ruby lib
2
+ # stub: term-ansicolor 1.10.1 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "term-ansicolor".freeze
6
- s.version = "1.10.0".freeze
6
+ s.version = "1.10.1".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: term-ansicolor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank