color 1.4.1 → 1.8

Sign up to get free protection for your applications and to get access to all the features.
data/test/test_yiq.rb CHANGED
@@ -1,22 +1,10 @@
1
- #!/usr/bin/env ruby
2
- #--
3
- # Color
4
- # Colour management with Ruby
5
- # http://rubyforge.org/projects/color
6
- # Version 1.5.0
7
- #
8
- # Licensed under a MIT-style licence. See Licence.txt in the main
9
- # distribution for full licensing information.
10
- #
11
- # Copyright (c) 2005 - 2010 Austin Ziegler and Matt Lyon
12
- #++
1
+ # -*- ruby encoding: utf-8 -*-
13
2
 
14
- $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") if __FILE__ == $0
15
- require 'test/unit'
16
3
  require 'color'
4
+ require 'minitest_helper'
17
5
 
18
6
  module TestColor
19
- class TestYIQ < Test::Unit::TestCase
7
+ class TestYIQ < Minitest::Test
20
8
  def setup
21
9
  @yiq = Color::YIQ.from_fraction(0.1, 0.2, 0.3)
22
10
  end
@@ -28,22 +16,22 @@ module TestColor
28
16
  def test_i
29
17
  assert_in_delta(0.2, @yiq.i, Color::COLOR_TOLERANCE)
30
18
  assert_in_delta(0.2, @yiq.i, Color::COLOR_TOLERANCE)
31
- assert_nothing_raised { @yiq.i = 0.5 }
19
+ @yiq.i = 0.5
32
20
  assert_in_delta(0.5, @yiq.i, Color::COLOR_TOLERANCE)
33
- assert_nothing_raised { @yiq.i = 5 }
21
+ @yiq.i = 5
34
22
  assert_in_delta(1.0, @yiq.i, Color::COLOR_TOLERANCE)
35
- assert_nothing_raised { @yiq.i = -5 }
23
+ @yiq.i = -5
36
24
  assert_in_delta(0.0, @yiq.i, Color::COLOR_TOLERANCE)
37
25
  end
38
26
 
39
27
  def test_q
40
28
  assert_in_delta(0.3, @yiq.q, Color::COLOR_TOLERANCE)
41
29
  assert_in_delta(0.3, @yiq.q, Color::COLOR_TOLERANCE)
42
- assert_nothing_raised { @yiq.q = 0.5 }
30
+ @yiq.q = 0.5
43
31
  assert_in_delta(0.5, @yiq.q, Color::COLOR_TOLERANCE)
44
- assert_nothing_raised { @yiq.q = 5 }
32
+ @yiq.q = 5
45
33
  assert_in_delta(1.0, @yiq.q, Color::COLOR_TOLERANCE)
46
- assert_nothing_raised { @yiq.q = -5 }
34
+ @yiq.q = -5
47
35
  assert_in_delta(0.0, @yiq.q, Color::COLOR_TOLERANCE)
48
36
  end
49
37
 
@@ -58,11 +46,11 @@ module TestColor
58
46
  def test_y
59
47
  assert_in_delta(0.1, @yiq.y, Color::COLOR_TOLERANCE)
60
48
  assert_in_delta(0.1, @yiq.y, Color::COLOR_TOLERANCE)
61
- assert_nothing_raised { @yiq.y = 0.5 }
49
+ @yiq.y = 0.5
62
50
  assert_in_delta(0.5, @yiq.y, Color::COLOR_TOLERANCE)
63
- assert_nothing_raised { @yiq.y = 5 }
51
+ @yiq.y = 5
64
52
  assert_in_delta(1.0, @yiq.y, Color::COLOR_TOLERANCE)
65
- assert_nothing_raised { @yiq.y = -5 }
53
+ @yiq.y = -5
66
54
  assert_in_delta(0.0, @yiq.y, Color::COLOR_TOLERANCE)
67
55
  end
68
56
 
metadata CHANGED
@@ -1,106 +1,274 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: color
3
- version: !ruby/object:Gem::Version
4
- version: 1.4.1
3
+ version: !ruby/object:Gem::Version
4
+ version: '1.8'
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Austin Ziegler
8
8
  - Matt Lyon
9
9
  autorequire:
10
10
  bindir: bin
11
- cert_chain:
12
- - |
13
- -----BEGIN CERTIFICATE-----
14
- MIIDNjCCAh6gAwIBAgIBADANBgkqhkiG9w0BAQUFADBBMQ8wDQYDVQQDDAZhdXN0
15
- aW4xGTAXBgoJkiaJk/IsZAEZFglydWJ5Zm9yZ2UxEzARBgoJkiaJk/IsZAEZFgNv
16
- cmcwHhcNMDcxMTMwMDE0OTAwWhcNMDgxMTI5MDE0OTAwWjBBMQ8wDQYDVQQDDAZh
17
- dXN0aW4xGTAXBgoJkiaJk/IsZAEZFglydWJ5Zm9yZ2UxEzARBgoJkiaJk/IsZAEZ
18
- FgNvcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDOSg1riVV22ord
19
- q0t4YVx57GDPMqdjlnQ5M7D9iBnnW0c8pifegbb0dm+mC9hJSuPtcJS53+YPTy9F
20
- wlZbjI2cN+P0QLUUTOlZus2sHq7Pr9jz2nJf8hCT7t5Vlopv1N/xlKtXqpcyEkhJ
21
- JHTrxe1avGwuq8DIAIN01moQJ+hJlgrnR2eRJRazTGiXKBLGAFXDl/Agn78MHx6w
22
- pzZ2APydo6Nuk7Ktq1MvCHzLzCACbOlYawFk3/9dbsmHhVjsi6YW+CpEJ2BnTy8X
23
- JBXlyNTk1JxDmcs3RzNr+9AmDQh3u4LcmJnWxtLJo9e7UBxH/bwVORJyf8dAOmOm
24
- HO6bFTLvAgMBAAGjOTA3MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
25
- BBT9e1+pFfcV1LxVxILANqLtZzI/XTANBgkqhkiG9w0BAQUFAAOCAQEAhg42pvrL
26
- uVlqAaHqV88KqgnW2ymCWm0ePohicFTcyiS5Yj5cN3OXLsPV2x12zqvLCFsfpA4u
27
- D/85rngKFHITSW0h9e/CIT/pwQA6Uuqkbr0ypkoU6mlNIDS10PlK7aXXFTCP9X3f
28
- IndAajiNRgKwb67nj+zpQwHa6dmooyRQIRRijrMKTgY6ebaCCrm7J3BLLTJAyxOW
29
- +1nD0cuTkBEKIuSVK06E19Ml+xWt2bdtS9Wz/8jHivJ0SvUpbmhKVzh1rBslwm65
30
- JpQgg3SsV23vF4qkCa2dt1FL+FeWJyCdj23DV3598X72RYiK3D6muWURck16jqeA
31
- BRvUFuFHOwa/yA==
32
- -----END CERTIFICATE-----
33
-
34
- date: 2010-02-07 00:00:00 -05:00
35
- default_executable:
36
- dependencies:
37
- - !ruby/object:Gem::Dependency
38
- name: rubyforge
11
+ cert_chain: []
12
+ date: 2015-10-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: minitest
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '5.8'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '5.8'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rdoc
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '4.0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '4.0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: hoe-doofus
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '1.0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '1.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: hoe-gemspec2
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '1.1'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.1'
70
+ - !ruby/object:Gem::Dependency
71
+ name: hoe-git
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '1.6'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '1.6'
84
+ - !ruby/object:Gem::Dependency
85
+ name: hoe-travis
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '1.2'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '1.2'
98
+ - !ruby/object:Gem::Dependency
99
+ name: minitest-around
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '0.3'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '0.3'
112
+ - !ruby/object:Gem::Dependency
113
+ name: minitest-autotest
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '1.0'
39
119
  type: :development
40
- version_requirement:
41
- version_requirements: !ruby/object:Gem::Requirement
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: 2.0.3
46
- version:
47
- - !ruby/object:Gem::Dependency
48
- name: gemcutter
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '1.0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: minitest-bisect
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '1.2'
49
133
  type: :development
50
- version_requirement:
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: 0.3.0
56
- version:
57
- - !ruby/object:Gem::Dependency
58
- name: archive-tar-minitar
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '1.2'
140
+ - !ruby/object:Gem::Dependency
141
+ name: minitest-focus
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: '1.1'
59
147
  type: :development
60
- version_requirement:
61
- version_requirements: !ruby/object:Gem::Requirement
62
- requirements:
63
- - - ~>
64
- - !ruby/object:Gem::Version
65
- version: 0.5.1
66
- version:
67
- - !ruby/object:Gem::Dependency
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: '1.1'
154
+ - !ruby/object:Gem::Dependency
155
+ name: minitest-moar
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - "~>"
159
+ - !ruby/object:Gem::Version
160
+ version: '0.0'
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - "~>"
166
+ - !ruby/object:Gem::Version
167
+ version: '0.0'
168
+ - !ruby/object:Gem::Dependency
169
+ name: minitest-pretty_diff
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - "~>"
173
+ - !ruby/object:Gem::Version
174
+ version: '0.1'
175
+ type: :development
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - "~>"
180
+ - !ruby/object:Gem::Version
181
+ version: '0.1'
182
+ - !ruby/object:Gem::Dependency
183
+ name: rake
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - "~>"
187
+ - !ruby/object:Gem::Version
188
+ version: '10.0'
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - "~>"
194
+ - !ruby/object:Gem::Version
195
+ version: '10.0'
196
+ - !ruby/object:Gem::Dependency
197
+ name: simplecov
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - "~>"
201
+ - !ruby/object:Gem::Version
202
+ version: '0.7'
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - "~>"
208
+ - !ruby/object:Gem::Version
209
+ version: '0.7'
210
+ - !ruby/object:Gem::Dependency
68
211
  name: hoe
212
+ requirement: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - "~>"
215
+ - !ruby/object:Gem::Version
216
+ version: '3.14'
69
217
  type: :development
70
- version_requirement:
71
- version_requirements: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: 2.5.0
76
- version:
218
+ prerelease: false
219
+ version_requirements: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - "~>"
222
+ - !ruby/object:Gem::Version
223
+ version: '3.14'
77
224
  description: |-
78
- The capabilities of the Color library are limited to pure mathematical
79
- manipulation of the colours based on colour theory without reference to colour
80
- profiles (such as sRGB or Adobe RGB). For most purposes, when working with the
81
- RGB and HSL colours, this won't matter. However, some colour models (like CIE
82
- L*a*b*) are not supported because Color does not yet support colour profiles,
83
- giving no meaningful way to convert colours in absolute colour spaces (like
84
- L*a*b*, XYZ) to non-absolute colour spaces (like RGB).
85
- email:
86
- - austin@rubyforge.org
225
+ Color is a Ruby library to provide basic RGB, CMYK, HSL, and other colourspace
226
+ manipulation support to applications that require it. It also provides 152
227
+ named RGB colours (184 with spelling variations) that are commonly supported in
228
+ HTML, SVG, and X11 applications. A technique for generating monochromatic
229
+ contrasting palettes is also included.
230
+
231
+ The Color library performs purely mathematical manipulation of the colours
232
+ based on colour theory without reference to colour profiles (such as sRGB or
233
+ Adobe RGB). For most purposes, when working with RGB and HSL colour spaces,
234
+ this won't matter. Absolute colour spaces (like CIE L*a*b* and XYZ) and cannot
235
+ be reliably converted to relative colour spaces (like RGB) without colour
236
+ profiles.
237
+
238
+ Color 1.8 adds an alpha parameter to all <tt>#css_rgba</tt> calls, fixes a bug
239
+ exposed by new constant lookup semantics in Ruby 2, and ensures that
240
+ <tt>Color.equivalent?</tt> can only be called on Color instances.
241
+
242
+ Barring bugs introduced in this release, this (really) is the last version of
243
+ color that supports Ruby 1.8, so make sure that your gem specification is set
244
+ properly (to <tt>~> 1.8</tt>) if that matters for your application. This
245
+ version will no longer be supported one year after the release of color 2.0.
246
+ email:
247
+ - halostatue@gmail.com
87
248
  - matt@postsomnia.com
88
249
  executables: []
89
-
90
250
  extensions: []
91
-
92
- extra_rdoc_files:
93
- - History.txt
94
- - Install.txt
95
- - Licence.txt
251
+ extra_rdoc_files:
252
+ - Code-of-Conduct.rdoc
253
+ - Contributing.rdoc
254
+ - History.rdoc
255
+ - Licence.rdoc
96
256
  - Manifest.txt
97
- - README.txt
98
- files:
99
- - History.txt
100
- - Install.txt
101
- - Licence.txt
257
+ - README.rdoc
258
+ files:
259
+ - ".autotest"
260
+ - ".coveralls.yml"
261
+ - ".gemtest"
262
+ - ".hoerc"
263
+ - ".minitest.rb"
264
+ - ".travis.yml"
265
+ - Code-of-Conduct.rdoc
266
+ - Contributing.rdoc
267
+ - Gemfile
268
+ - History.rdoc
269
+ - Licence.rdoc
102
270
  - Manifest.txt
103
- - README.txt
271
+ - README.rdoc
104
272
  - Rakefile
105
273
  - lib/color.rb
106
274
  - lib/color/cmyk.rb
@@ -111,13 +279,13 @@ files:
111
279
  - lib/color/palette/adobecolor.rb
112
280
  - lib/color/palette/gimp.rb
113
281
  - lib/color/palette/monocontrast.rb
114
- - lib/color/rgb-colors.rb
115
282
  - lib/color/rgb.rb
283
+ - lib/color/rgb/colors.rb
284
+ - lib/color/rgb/contrast.rb
116
285
  - lib/color/rgb/metallic.rb
117
286
  - lib/color/yiq.rb
118
- - setup.rb
287
+ - test/minitest_helper.rb
119
288
  - test/test_adobecolor.rb
120
- - test/test_all.rb
121
289
  - test/test_cmyk.rb
122
290
  - test/test_color.rb
123
291
  - test/test_css.rb
@@ -127,44 +295,31 @@ files:
127
295
  - test/test_monocontrast.rb
128
296
  - test/test_rgb.rb
129
297
  - test/test_yiq.rb
130
- has_rdoc: true
131
- homepage: http://color.rubyforge.org/
132
- licenses: []
133
-
298
+ homepage: https://github.com/halostatue/color
299
+ licenses:
300
+ - MIT
301
+ metadata: {}
134
302
  post_install_message:
135
- rdoc_options:
136
- - --main
137
- - README.txt
138
- require_paths:
303
+ rdoc_options:
304
+ - "--main"
305
+ - README.rdoc
306
+ require_paths:
139
307
  - lib
140
- required_ruby_version: !ruby/object:Gem::Requirement
141
- requirements:
308
+ required_ruby_version: !ruby/object:Gem::Requirement
309
+ requirements:
142
310
  - - ">="
143
- - !ruby/object:Gem::Version
144
- version: "0"
145
- version:
146
- required_rubygems_version: !ruby/object:Gem::Requirement
147
- requirements:
311
+ - !ruby/object:Gem::Version
312
+ version: '0'
313
+ required_rubygems_version: !ruby/object:Gem::Requirement
314
+ requirements:
148
315
  - - ">="
149
- - !ruby/object:Gem::Version
150
- version: "0"
151
- version:
316
+ - !ruby/object:Gem::Version
317
+ version: '0'
152
318
  requirements: []
153
-
154
- rubyforge_project: color
155
- rubygems_version: 1.3.5
319
+ rubyforge_project:
320
+ rubygems_version: 2.4.8
156
321
  signing_key:
157
- specification_version: 3
158
- summary: Colour management with Ruby
159
- test_files:
160
- - test/test_adobecolor.rb
161
- - test/test_all.rb
162
- - test/test_cmyk.rb
163
- - test/test_color.rb
164
- - test/test_css.rb
165
- - test/test_gimp.rb
166
- - test/test_grayscale.rb
167
- - test/test_hsl.rb
168
- - test/test_monocontrast.rb
169
- - test/test_rgb.rb
170
- - test/test_yiq.rb
322
+ specification_version: 4
323
+ summary: Color is a Ruby library to provide basic RGB, CMYK, HSL, and other colourspace
324
+ manipulation support to applications that require it
325
+ test_files: []