buildkite-builder 1.0.0 → 1.1.0

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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +118 -14
  3. data/VERSION +1 -1
  4. data/lib/buildkite/builder.rb +12 -14
  5. data/lib/buildkite/builder/commands/abstract.rb +1 -1
  6. data/lib/buildkite/builder/commands/preview.rb +10 -8
  7. data/lib/buildkite/builder/commands/run.rb +11 -1
  8. data/lib/buildkite/builder/context.rb +70 -0
  9. data/lib/buildkite/builder/loaders/abstract.rb +6 -10
  10. data/lib/buildkite/builder/loaders/manifests.rb +1 -1
  11. data/lib/buildkite/builder/loaders/processors.rb +2 -2
  12. data/lib/buildkite/builder/loaders/templates.rb +1 -1
  13. data/lib/buildkite/builder/manifest.rb +1 -1
  14. data/lib/buildkite/builder/processors/abstract.rb +7 -7
  15. data/lib/buildkite/builder/rainbow.rb +1 -1
  16. data/lib/buildkite/builder/runner.rb +25 -63
  17. data/lib/buildkite/pipelines.rb +1 -0
  18. data/lib/buildkite/pipelines/pipeline.rb +20 -9
  19. data/lib/buildkite/pipelines/step_context.rb +23 -0
  20. data/lib/buildkite/pipelines/steps/abstract.rb +4 -3
  21. data/lib/buildkite/pipelines/steps/block.rb +1 -0
  22. metadata +104 -21
  23. data/lib/vendor/rainbow/Changelog.md +0 -101
  24. data/lib/vendor/rainbow/Gemfile +0 -30
  25. data/lib/vendor/rainbow/LICENSE +0 -20
  26. data/lib/vendor/rainbow/README.markdown +0 -225
  27. data/lib/vendor/rainbow/Rakefile +0 -11
  28. data/lib/vendor/rainbow/lib/rainbow.rb +0 -13
  29. data/lib/vendor/rainbow/lib/rainbow/color.rb +0 -150
  30. data/lib/vendor/rainbow/lib/rainbow/ext/string.rb +0 -64
  31. data/lib/vendor/rainbow/lib/rainbow/global.rb +0 -25
  32. data/lib/vendor/rainbow/lib/rainbow/null_presenter.rb +0 -100
  33. data/lib/vendor/rainbow/lib/rainbow/presenter.rb +0 -144
  34. data/lib/vendor/rainbow/lib/rainbow/refinement.rb +0 -14
  35. data/lib/vendor/rainbow/lib/rainbow/string_utils.rb +0 -22
  36. data/lib/vendor/rainbow/lib/rainbow/version.rb +0 -5
  37. data/lib/vendor/rainbow/lib/rainbow/wrapper.rb +0 -22
  38. data/lib/vendor/rainbow/lib/rainbow/x11_color_names.rb +0 -153
  39. data/lib/vendor/rainbow/rainbow.gemspec +0 -23
@@ -1,101 +0,0 @@
1
- # Rainbow changelog
2
-
3
- ## 3.1.0 (2020-08-26)
4
-
5
- - added `cross_out` aka `strike`
6
- - hexadecimal color names supported better, see #83
7
- - gemspec: list files using a Ruby expression, avoiding git
8
-
9
- ## 3.0.0 (2017-11-29)
10
-
11
- * added String refinement
12
- * added new `Rainbow.uncolor` method
13
- * dropped MRI 1.9.3 compatibility
14
- * dropped MRI 2.0 compatibility
15
- * removed Rake dependency
16
-
17
- ## 2.2.2 (2017-04-21)
18
-
19
- * added explicit rake dependency to fix installation issue
20
-
21
- ## 2.2.1 (2016-12-28)
22
-
23
- * fixed gem installation (2.2.0 was a broken release)
24
-
25
- ## 2.2.0 (2016-12-27)
26
-
27
- * improved Windows support
28
- * added Ruby 2.4 support
29
- * added `bold` alias method for `bright`
30
-
31
- ## 2.1.0 (2016-01-24)
32
-
33
- * added X11 color support
34
- * fixed `require` issue when rainbow is used as a dependency in another gem
35
- * improved Windows support
36
-
37
- ## 2.0.0 (2014-01-24)
38
-
39
- * disable string mixin by default
40
-
41
- ## 1.99.2 (2014-01-24)
42
-
43
- * bring back ruby 1.8 support
44
-
45
- ## 1.99.1 (2013-12-28)
46
-
47
- * drop support for ruby 1.8
48
- * `require "rainbow/string"` -> `require "rainbow/ext/string"`
49
- * custom rainbow wrapper instances (with separate enabled/disabled state)
50
- * shortcut methods for changing text color (`Rainbow("foo").red`)
51
-
52
- ## 1.99.0 (2013-12-26)
53
-
54
- * preparation for dropping String monkey patching
55
- * `require "rainbow/string"` if you want to use monkey patched String
56
- * introduction of Rainbow() wrapper
57
- * support for MRI 1.8.7, 1.9.2, 1.9.3, 2.0 and 2.1, JRuby and Rubinius
58
- * deprecation of Sickill::Rainbow namespace (use Rainbow.enabled = true instead)
59
-
60
- ## 1.1.4 (2012-4-28)
61
-
62
- * option for forcing coloring even when STDOUT is not a TTY (CLICOLOR_FORCE env var)
63
- * fix for frozen strings
64
-
65
- ## 1.1.3 (2011-12-6)
66
-
67
- * improved compatibility with MRI 1.8.7
68
- * fix for regression with regards to original string mutation
69
-
70
- ## 1.1.2 (2011-11-13)
71
-
72
- * improved compatibility with MRI 1.9.3
73
-
74
- ## 1.1.1 (2011-2-7)
75
-
76
- * improved Windows support
77
-
78
- ## 1.1 (2010-6-7)
79
-
80
- * option for enabling/disabling of escape code wrapping
81
- * auto-disabling when STDOUT is not a TTY
82
-
83
- ## 1.0.4 (2009-11-27)
84
-
85
- * support for 256 colors
86
-
87
- ## 1.0.3 (2009-7-26)
88
-
89
- * rainbow methods don't mutate the original string object anymore
90
-
91
- ## 1.0.2 (2009-5-15)
92
-
93
- * improved support for ruby 1.8.6 and 1.9.1
94
-
95
- ## 1.0.1 (2009-3-19)
96
-
97
- * Windows support
98
-
99
- ## 1.0.0 (2008-7-21)
100
-
101
- * initial version
@@ -1,30 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec
6
-
7
- gem 'rake'
8
-
9
- group :test do
10
- gem 'coveralls', require: false
11
- gem 'rspec'
12
- end
13
-
14
- group :development do
15
- gem 'mutant-rspec'
16
- end
17
-
18
- group :test, :development do
19
- gem 'rubocop', '0.81.0', require: false # This version supports Ruby 2.3
20
- end
21
-
22
- group :guard do
23
- gem 'guard'
24
- gem 'guard-rspec'
25
- end
26
-
27
- platform :rbx do
28
- gem 'json'
29
- gem 'rubysl'
30
- end
@@ -1,20 +0,0 @@
1
- Copyright (c) Marcin Kulik
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,225 +0,0 @@
1
- # Rainbow
2
-
3
- [![Gem Version](https://badge.fury.io/rb/rainbow.svg)](https://rubygems.org/gems/rainbow)
4
- [![Build Status](https://travis-ci.org/sickill/rainbow.svg?branch=master)](https://travis-ci.org/sickill/rainbow)
5
- [![Build status](https://ci.appveyor.com/api/projects/status/vq4acb2c38642s5q?svg=true)](https://ci.appveyor.com/project/sickill/rainbow)
6
- [![Code Climate](https://codeclimate.com/github/sickill/rainbow.svg)](https://codeclimate.com/github/sickill/rainbow)
7
- [![Coverage Status](https://coveralls.io/repos/sickill/rainbow/badge.svg)](https://coveralls.io/r/sickill/rainbow)
8
-
9
- Rainbow is a ruby gem for colorizing printed text on ANSI terminals.
10
-
11
- It provides a string presenter object, which adds several methods to your
12
- strings for wrapping them in [ANSI escape
13
- codes](http://en.wikipedia.org/wiki/ANSI_escape_code). These codes when printed
14
- in a terminal change text attributes like text color, background color,
15
- intensity etc.
16
-
17
- ## Usage
18
-
19
- To make your string colored wrap it with `Rainbow()` presenter and call
20
- `.color(<color name>)` on it.
21
-
22
- ### Example
23
-
24
- ```ruby
25
- require 'rainbow'
26
-
27
- puts Rainbow("this is red").red + " and " + Rainbow("this on yellow bg").bg(:yellow) + " and " + Rainbow("even bright underlined!").underline.bright
28
-
29
- # => "\e[31mthis is red\e[0m and \e[43mthis on yellow bg\e[0m and \e[4m\e[1meven bright underlined!\e[0m"
30
- ```
31
-
32
- Or, [watch this video example](https://asciinema.org/a/J928KpHoUQ0sl54ulOSOLE71E?rows=20&speed=2.5)
33
-
34
- ### Rainbow presenter API
35
-
36
- Rainbow presenter adds the following methods to presented string:
37
-
38
- * `color(c)` (with `foreground`, and `fg` aliases)
39
- * `background(c)` (with `bg` alias)
40
- * `bright`
41
- * `underline`
42
- * `blink`
43
- * `inverse`
44
- * `hide`
45
- * `faint` (not well supported by terminal emulators)
46
- * `italic` (not well supported by terminal emulators)
47
- * `cross_out`, `strike`
48
-
49
- Text color can also be changed by calling a method named by a color:
50
-
51
- * `black`
52
- * `red`
53
- * `green`
54
- * `yellow`
55
- * `blue`
56
- * `magenta`
57
- * `cyan`
58
- * `white`
59
- * `aqua`
60
- * `silver`
61
- * `aliceblue`
62
- * `indianred`
63
-
64
- All of the methods return `self` (the presenter object) so you can chain method
65
- calls:
66
-
67
- ```ruby
68
- Rainbow("hola!").blue.bright.underline
69
- ```
70
-
71
- ### Refinement
72
-
73
- If you want to use the Refinements version, you can:
74
-
75
- ```ruby
76
- require 'rainbow/refinement'
77
- using Rainbow
78
- puts "Hi!".green
79
- ```
80
-
81
- Here's an IRB session example:
82
-
83
- ```
84
- >> 'Hello, World!'.blue.bright.underline
85
- NoMethodError: undefined method `blue' for "Hello, World!":String
86
- (ripl):1:in `<main>'
87
- >> using Rainbow
88
- => main
89
- >> 'Hello, World!'.blue.bright.underline
90
- => "\e[34m\e[1m\e[4mHello, World!\e[0m"
91
- ```
92
-
93
- ### Color specification
94
-
95
- Both `color` and `background` accept color specified in any
96
- of the following ways:
97
-
98
- * ANSI color number (where 0 is black, 1 is red, 2 is green and so on):
99
- `Rainbow("hello").color(1)`
100
-
101
- * [ANSI color](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) name or [X11 color](https://en.wikipedia.org/wiki/X11_color_names) name as a symbol:
102
- `Rainbow("hello").color(:yellow)`.
103
- This can be simplified to `Rainbow("hello").yellow`
104
-
105
- See [Color list](#user-content-color-list) for all available color names.
106
- Note that ANSI colors can be changed in accordance with terminal setting.
107
- But X11 color is just a syntax sugar for RGB triplet. So you always see what you specified.
108
-
109
- * RGB triplet as separate values in the range 0-255:
110
- `Rainbow("hello").color(115, 23, 98)`
111
-
112
- * RGB triplet as a hex string:
113
- `Rainbow("hello").color("FFC482")` or `Rainbow("hello").color("#FFC482")`
114
-
115
- When you specify a color with a RGB triplet rainbow finds the nearest match
116
- from 256 colors palette. Note that it requires a 256-colors capable terminal to
117
- display correctly.
118
-
119
- #### Example: Choose a random color
120
-
121
- You can pick a random color with Rainbow, it's a one-liner:
122
-
123
- ```ruby
124
- colors = Range.new(0,7).to_a
125
- "whoop dee doop".chars.map { |char| Rainbow(char).color(colors.sample) }.join
126
- # => "\e[36mw\e[0m\e[37mh\e[0m\e[34mo\e[0m\e[34mo\e[0m\e[37mp\e[0m\e[34m \e[0m\e[36md\e[0m\e[33me\e[0m\e[34me\e[0m\e[37m \e[0m\e[32md\e[0m\e[35mo\e[0m\e[33mo\e[0m\e[36mp\e[0m"
127
-
128
- colors = [:aliceblue, :antiquewhite, :aqua, :aquamarine, :azure, :beige, :bisque, :blanchedalmond, :blueviolet]
129
- "whoop dee doop".chars.map { |char| Rainbow(char).color(colors.sample) }.join
130
- # => "\e[38;5;135mw\e[0m\e[38;5;230mh\e[0m\e[38;5;231mo\e[0m\e[38;5;135mo\e[0m\e[38;5;231mp\e[0m\e[38;5;231m \e[0m\e[38;5;122md\e[0m\e[38;5;231me\e[0m\e[38;5;231me\e[0m\e[38;5;230m \e[0m\e[38;5;122md\e[0m\e[38;5;51mo\e[0m\e[38;5;51mo\e[0m\e[38;5;51mp\e[0m"
131
- ```
132
-
133
- ### Configuration
134
-
135
- Rainbow can be enabled/disabled globally by setting:
136
-
137
- ```ruby
138
- Rainbow.enabled = true/false
139
- ```
140
-
141
- When disabled all the methods return an unmodified string
142
- (`Rainbow("hello").red == "hello"`).
143
-
144
- It's enabled by default, unless STDOUT/STDERR is not a TTY or a terminal is
145
- dumb.
146
-
147
- ### Advanced usage
148
-
149
- `Rainbow()` and `Rainbow.enabled` operate on the global Rainbow wrapper
150
- instance. If you would like to selectively enable/disable coloring in separate
151
- parts of your application you can get a new Rainbow wrapper instance for each
152
- of them and control the state of coloring during the runtime.
153
-
154
- ```ruby
155
- rainbow_one = Rainbow.new
156
- rainbow_two = Rainbow.new
157
-
158
- rainbow_one.enabled = false
159
-
160
- Rainbow("hello").red # => "\e[31mhello\e[0m" ("hello" if not on TTY)
161
- rainbow_one.wrap("hello").red # => "hello"
162
- rainbow_two.wrap("hello").red # => "\e[31mhello\e[0m" ("hello" if not on TTY)
163
- ```
164
-
165
- By default each new instance inherits enabled/disabled state from the global
166
- `Rainbow.enabled`.
167
-
168
- This feature comes handy for example when you have multiple output formatters
169
- in your application and some of them print to a terminal but others write to a
170
- file. Normally rainbow would detect that STDIN/STDERR is a TTY and would
171
- colorize all the strings, even the ones that go through file writing
172
- formatters. You can easily solve that by disabling coloring for the Rainbow
173
- instances that are used by formatters with file output.
174
-
175
- ## Installation
176
-
177
- Add it to your Gemfile:
178
-
179
- ```ruby
180
- gem 'rainbow'
181
- ```
182
-
183
- Or just install it via rubygems:
184
-
185
- ```ruby
186
- gem install rainbow
187
- ```
188
-
189
- ## Color list
190
-
191
- ### ANSI colors
192
-
193
- `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`
194
-
195
- ### X11 colors
196
-
197
- `aliceblue`, `antiquewhite`, `aqua`, `aquamarine`, `azure`, `beige`, `bisque`,
198
- `blanchedalmond`, `blueviolet`, `brown`, `burlywood`, `cadetblue`, `chartreuse`,
199
- `chocolate`, `coral`, `cornflower`, `cornsilk`, `crimson`, `darkblue`,
200
- `darkcyan`, `darkgoldenrod`, `darkgray`, `darkgreen`, `darkkhaki`,
201
- `darkmagenta`, `darkolivegreen`, `darkorange`, `darkorchid`, `darkred`,
202
- `darksalmon`, `darkseagreen`, `darkslateblue`, `darkslategray`, `darkturquoise`,
203
- `darkviolet`, `deeppink`, `deepskyblue`, `dimgray`, `dodgerblue`, `firebrick`,
204
- `floralwhite`, `forestgreen`, `fuchsia`, `gainsboro`, `ghostwhite`, `gold`,
205
- `goldenrod`, `gray`, `greenyellow`, `honeydew`, `hotpink`, `indianred`,
206
- `indigo`, `ivory`, `khaki`, `lavender`, `lavenderblush`, `lawngreen`,
207
- `lemonchiffon`, `lightblue`, `lightcoral`, `lightcyan`, `lightgoldenrod`,
208
- `lightgray`, `lightgreen`, `lightpink`, `lightsalmon`, `lightseagreen`,
209
- `lightskyblue`, `lightslategray`, `lightsteelblue`, `lightyellow`, `lime`,
210
- `limegreen`, `linen`, `maroon`, `mediumaquamarine`, `mediumblue`,
211
- `mediumorchid`, `mediumpurple`, `mediumseagreen`, `mediumslateblue`,
212
- `mediumspringgreen`, `mediumturquoise`, `mediumvioletred`, `midnightblue`,
213
- `mintcream`, `mistyrose`, `moccasin`, `navajowhite`, `navyblue`, `oldlace`,
214
- `olive`, `olivedrab`, `orange`, `orangered`, `orchid`, `palegoldenrod`,
215
- `palegreen`, `paleturquoise`, `palevioletred`, `papayawhip`, `peachpuff`,
216
- `peru`, `pink`, `plum`, `powderblue`, `purple`, `rebeccapurple`, `rosybrown`,
217
- `royalblue`, `saddlebrown`, `salmon`, `sandybrown`, `seagreen`, `seashell`,
218
- `sienna`, `silver`, `skyblue`, `slateblue`, `slategray`, `snow`, `springgreen`,
219
- `steelblue`, `tan`, `teal`, `thistle`, `tomato`, `turquoise`, `violet`,
220
- `webgray`, `webgreen`, `webmaroon`, `webpurple`, `wheat`, `whitesmoke`,
221
- `yellowgreen`
222
-
223
- ## Authors
224
-
225
- [Marcin Kulik](http://ku1ik.com/) and [great open-source contributors](https://github.com/sickill/rainbow/graphs/contributors).
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
-
5
- require 'rspec/core/rake_task'
6
- RSpec::Core::RakeTask.new
7
-
8
- require 'rubocop/rake_task'
9
- RuboCop::RakeTask.new
10
-
11
- task default: %i[spec rubocop]
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'rainbow/global'
4
-
5
- module Rainbow
6
- def self.new
7
- Wrapper.new(global.enabled)
8
- end
9
-
10
- self.enabled = false unless STDOUT.tty? && STDERR.tty?
11
- self.enabled = false if ENV['TERM'] == 'dumb'
12
- self.enabled = true if ENV['CLICOLOR_FORCE'] == '1'
13
- end
@@ -1,150 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Rainbow
4
- class Color
5
- attr_reader :ground
6
-
7
- def self.build(ground, values)
8
- unless [1, 3].include?(values.size)
9
- raise ArgumentError,
10
- "Wrong number of arguments for color definition, should be 1 or 3"
11
- end
12
-
13
- color = values.size == 1 ? values.first : values
14
-
15
- case color
16
- # NOTE: Properly handle versions before/after Ruby 2.4.0.
17
- # Ruby 2.4+ unifies Fixnum & Bignum into Integer.
18
- # However previous versions would still use Fixnum.
19
- # To avoid missing `Fixnum` input, call `0.class` which would
20
- # return either `Integer` or `Fixnum`.
21
- when 0.class
22
- Indexed.new(ground, color)
23
- when Symbol
24
- if Named.color_names.include?(color)
25
- Named.new(ground, color)
26
- elsif X11Named.color_names.include?(color)
27
- X11Named.new(ground, color)
28
- else
29
- raise ArgumentError,
30
- "Unknown color name, valid names: " +
31
- (Named.color_names + X11Named.color_names).join(', ')
32
- end
33
- when Array
34
- RGB.new(ground, *color)
35
- when String
36
- RGB.new(ground, *parse_hex_color(color))
37
- end
38
- end
39
-
40
- def self.parse_hex_color(hex)
41
- unless hex =~ /^#?[a-f0-9]{6}/i
42
- raise ArgumentError,
43
- "Invalid hexadecimal RGB triplet. Valid format: /^#?[a-f0-9]{6}/i"
44
- end
45
-
46
- hex = hex.sub(/^#/, '')
47
- r = hex[0..1].to_i(16)
48
- g = hex[2..3].to_i(16)
49
- b = hex[4..5].to_i(16)
50
-
51
- [r, g, b]
52
- end
53
-
54
- class Indexed < Color
55
- attr_reader :num
56
-
57
- def initialize(ground, num)
58
- @ground = ground
59
- @num = num
60
- end
61
-
62
- def codes
63
- code = num + (ground == :foreground ? 30 : 40)
64
-
65
- [code]
66
- end
67
- end
68
-
69
- class Named < Indexed
70
- NAMES = {
71
- black: 0,
72
- red: 1,
73
- green: 2,
74
- yellow: 3,
75
- blue: 4,
76
- magenta: 5,
77
- cyan: 6,
78
- white: 7,
79
- default: 9
80
- }.freeze
81
-
82
- def self.color_names
83
- NAMES.keys
84
- end
85
-
86
- def self.valid_names
87
- color_names.join(', ')
88
- end
89
-
90
- def initialize(ground, name)
91
- unless Named.color_names.include?(name)
92
- raise ArgumentError,
93
- "Unknown color name, valid names: #{self.class.valid_names}"
94
- end
95
-
96
- super(ground, NAMES[name])
97
- end
98
- end
99
-
100
- class RGB < Indexed
101
- attr_reader :r, :g, :b
102
-
103
- def self.to_ansi_domain(value)
104
- (6 * (value / 256.0)).to_i
105
- end
106
-
107
- def initialize(ground, *values)
108
- if values.min.negative? || values.max > 255
109
- raise ArgumentError, "RGB value outside 0-255 range"
110
- end
111
-
112
- super(ground, 8)
113
- @r, @g, @b = values
114
- end
115
-
116
- def codes
117
- super + [5, code_from_rgb]
118
- end
119
-
120
- private
121
-
122
- def code_from_rgb
123
- 16 + self.class.to_ansi_domain(r) * 36 +
124
- self.class.to_ansi_domain(g) * 6 +
125
- self.class.to_ansi_domain(b)
126
- end
127
- end
128
-
129
- class X11Named < RGB
130
- include X11ColorNames
131
-
132
- def self.color_names
133
- NAMES.keys
134
- end
135
-
136
- def self.valid_names
137
- color_names.join(', ')
138
- end
139
-
140
- def initialize(ground, name)
141
- unless X11Named.color_names.include?(name)
142
- raise ArgumentError,
143
- "Unknown color name, valid names: #{self.class.valid_names}"
144
- end
145
-
146
- super(ground, *NAMES[name])
147
- end
148
- end
149
- end
150
- end