webget_ruby_colorful 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE.txt ADDED
@@ -0,0 +1,12 @@
1
+ LICENSE
2
+
3
+ You may choose any of these licenses:
4
+
5
+ - CreativeCommons License, Non-commercial Share Alike
6
+ - LGPL, GNU Lesser General Public License
7
+ - MIT License
8
+ - Ruby License
9
+
10
+ THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
11
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
12
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
data/README.rdoc ADDED
@@ -0,0 +1,16 @@
1
+
2
+ = WebGet Ruby Gem: Colorful
3
+
4
+ Author:: Joel Parker Henderson, joelparkerhenderson@gmail.com
5
+ Copyright:: Copyright (c) 2006-2010 Joel Parker Henderson
6
+ License:: CreativeCommons License, Non-commercial Share Alike
7
+ License:: LGPL, GNU Lesser General Public License
8
+
9
+ Color names and shades that we use
10
+ to generate simple random color names.
11
+
12
+ Examples:
13
+ Colorful.choice => 'Light Red'
14
+ Colorful.colors.choice => 'Red'
15
+ Colorful.shades.choice => 'Light'
16
+
@@ -0,0 +1,56 @@
1
+ =begin rdoc
2
+
3
+ = WebGet Ruby Gem: Colorful
4
+
5
+ Author:: Joel Parker Henderson, joelparkerhenderson@gmail.com
6
+ Copyright:: Copyright (c) 2006-2010 Joel Parker Henderson
7
+ License:: CreativeCommons License, Non-commercial Share Alike
8
+ License:: LGPL, GNU Lesser General Public License
9
+
10
+ Color names and shades that we use
11
+ to generate simple random color names.
12
+
13
+ Examples:
14
+ Colorful.choice => 'Light Red'
15
+ Colorful.colors.choice => 'Red'
16
+ Colorful.shades.choice => 'Light'
17
+
18
+ =end
19
+
20
+
21
+ class Colorful
22
+
23
+ # These color names are good examples because they are:
24
+ # - one word
25
+ # - definitely a color (cf. "rose" is also a flower)
26
+ # - not white or black
27
+
28
+ COLORS = [
29
+ 'Red','Orange','Yellow','Green','Blue','Indigo','Violet',
30
+ 'Cyan','Magenta','Pink','Purple','Brown',
31
+ 'Gold','Silver','Bronze','Copper','Platinum',
32
+ 'Aquamarine','Azure','Beige','Cerulean',
33
+ 'Chartreuse','Crimson','Fucshia','Khaki',
34
+ 'Maroon','Mauve','Scarlet','Sepia',
35
+ 'Sienna','Tan','Teal','Turquoise'
36
+ ]
37
+
38
+ # These shade names are good examples because they are:
39
+ # - one word
40
+ # - independent of whatever color word is chosen
41
+
42
+ SHADES = ['Light','Dark','Pale','Bright','Vivid']
43
+
44
+ def self.colors
45
+ COLORS
46
+ end
47
+
48
+ def self.shades
49
+ SHADES
50
+ end
51
+
52
+ def self.choice
53
+ SHADES[rand*SHADES.length] + ' ' + COLORS[rand*COLORS.length]
54
+ end
55
+
56
+ end
@@ -0,0 +1,20 @@
1
+ require 'test/unit'
2
+ require 'webget_ruby_colorful'
3
+
4
+ class ColorfulTest < Test::Unit::TestCase
5
+
6
+ def test_colors
7
+ assert(Colorful.colors.size>0,'Colorful.colors array')
8
+ end
9
+
10
+ def test_shades
11
+ assert(Colorful.shades.size>0,'Colorful.shades array')
12
+ end
13
+
14
+ def test_choice
15
+ s=Colorful.choice
16
+ assert(s=~/^\w+ \w+$/,"Colorful.choice is #{s}")
17
+ end
18
+
19
+ end
20
+
data.tar.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ 2%��~���^N.�"ѽ�9����W�����W)�;93�l��3�,0���|���zfoϧ�����Z�蔞�V.�;8��湦�z��"� ���(Q?��<�o��/DM�$$�@�|�
2
+ �r$�`�uU�
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: webget_ruby_colorful
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.6
5
+ platform: ruby
6
+ authors:
7
+ - WebGet
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDvDCCAyWgAwIBAgIJAI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mNvbTEgMB4GCSqGSIb3DQEJ
29
+ ARYRd2ViZ2V0QHdlYmdldC5jb22CCQCJUqhJA0GmSDAMBgNVHRMEBTADAQH/MA0G
30
+ CSqGSIb3DQEBBQUAA4GBADzVXlwuff0/w3yK4LflGKKhtC3oChIrwmSyP6tk628N
31
+ BHokpc4Kz63xSXqzYTnBS7rFBwlYThtNalQeWmoUjGh3Z0ZR0JlhU0ln8899LuJ3
32
+ DXnLFY0cVuBnNDMOOFl8vk1qIcZjcTovhzgcixpG6Uk5qmUsKHRLQf4oQJx7TfLK
33
+ -----END CERTIFICATE-----
34
+
35
+ date: 2010-02-18 00:00:00 -08:00
36
+ default_executable:
37
+ dependencies: []
38
+
39
+ description:
40
+ email: webget@webget.com
41
+ executables: []
42
+
43
+ extensions: []
44
+
45
+ extra_rdoc_files: []
46
+
47
+ files:
48
+ - README.rdoc
49
+ - LICENSE.txt
50
+ - lib/webget_ruby_colorful.rb
51
+ has_rdoc: true
52
+ homepage: http://webget.com/
53
+ licenses: []
54
+
55
+ post_install_message:
56
+ rdoc_options: []
57
+
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: "0"
65
+ version:
66
+ required_rubygems_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: "0"
71
+ version:
72
+ requirements: []
73
+
74
+ rubyforge_project:
75
+ rubygems_version: 1.3.5
76
+ signing_key:
77
+ specification_version: 3
78
+ summary: "WebGet Ruby Gem: color settings"
79
+ test_files:
80
+ - test/webget_ruby_colorful_test.rb
metadata.gz.sig ADDED
Binary file