cadbury 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,8 @@
1
+ require 'rake/testtask'
2
+
3
+ Rake::TestTask.new do |t|
4
+ t.libs << 'test'
5
+ end
6
+
7
+ desc "Run tests"
8
+ task :default => :test
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ require 'cadbury'
3
+ if (ARGV.size > 0)
4
+ puts Cadbury.gems(ARGV[0].to_i)
5
+ else
6
+ puts Cadbury.gems()
7
+ end
8
+
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ #!/usr/bin/env ruby
3
+ require 'colored'
4
+ class Cadbury
5
+ def self.gems(count=10)
6
+ gem="•"
7
+ count.times do
8
+ if RUBY_VERSION =~ /1.9/
9
+ print gem.send(gem.colors.sample)
10
+ else
11
+ print gem.send(gem.colors.choice)
12
+ end
13
+ end
14
+ puts
15
+ end
16
+ end
@@ -0,0 +1,8 @@
1
+ require 'test/unit'
2
+ require 'cadbury'
3
+
4
+ class CadburyTest < Test::Unit::TestCase
5
+ def test_GET_get
6
+ assert_not_nil Cadbury.gems
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cadbury
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 0
10
+ version: 1.0.0
11
+ platform: ruby
12
+ authors:
13
+ - Hemanth.HM
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-05-20 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: colored
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 13
29
+ segments:
30
+ - 1
31
+ - 1
32
+ version: "1.1"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ description: Cadbury.gems() to get colorful gems or on the CLI cadbury <count> :0) inspired by the chocolate cadbury gems.
36
+ email: hemanth.hm@gmail.com
37
+ executables:
38
+ - cadbury
39
+ extensions: []
40
+
41
+ extra_rdoc_files: []
42
+
43
+ files:
44
+ - Rakefile
45
+ - lib/cadbury.rb
46
+ - bin/cadbury
47
+ - test/test_cadbury.rb
48
+ homepage: http://rubygems.org/gems/cadbury
49
+ licenses: []
50
+
51
+ post_install_message:
52
+ rdoc_options: []
53
+
54
+ require_paths:
55
+ - lib
56
+ required_ruby_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ hash: 3
62
+ segments:
63
+ - 0
64
+ version: "0"
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ hash: 3
71
+ segments:
72
+ - 0
73
+ version: "0"
74
+ requirements: []
75
+
76
+ rubyforge_project:
77
+ rubygems_version: 1.8.24
78
+ signing_key:
79
+ specification_version: 3
80
+ summary: Get colorful gems cholocate !
81
+ test_files:
82
+ - test/test_cadbury.rb