rubybooty 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,10 +1,7 @@
1
1
  source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
2
 
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
3
+ gem "highline"
4
+
8
5
  group :development do
9
6
  gem "rspec", "~> 2.3.0"
10
7
  gem "yard", "~> 0.6.0"
data/Gemfile.lock CHANGED
@@ -3,6 +3,7 @@ GEM
3
3
  specs:
4
4
  diff-lcs (1.1.2)
5
5
  git (1.2.5)
6
+ highline (1.6.1)
6
7
  jeweler (1.6.0)
7
8
  bundler (~> 1.0.0)
8
9
  git (>= 1.2.5)
@@ -24,6 +25,7 @@ PLATFORMS
24
25
 
25
26
  DEPENDENCIES
26
27
  bundler (~> 1.0.0)
28
+ highline
27
29
  jeweler (~> 1.6.0)
28
30
  rcov
29
31
  rspec (~> 2.3.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.0
1
+ 0.0.1
data/bin/rubybooty ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "rubygems"
4
+ $:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
5
+ require "rubybooty"
6
+
7
+ Rubybooty.run
data/lib/rubybooty.rb CHANGED
@@ -1,5 +1,28 @@
1
+ require "highline/import"
2
+
1
3
  module Rubybooty
2
- def self.say_something
3
- "AARRR!"
4
+ class Array
5
+ def shuffle!
6
+ size.downto(1) { |n| push delete_at(rand(n)) }
7
+ self
8
+ end
9
+ end
10
+
11
+ def self.run
12
+ entrants = {}
13
+
14
+ while true
15
+ name = ask("Entrants Name: ")
16
+ break if name.downcase == "done"
17
+ entries = ask("Number of Entries: ", Integer)
18
+ entrants[name] = entries
19
+ end
20
+
21
+ agree("Run Now? ")
22
+
23
+ entries = []
24
+ entrants.each { |k,v| v.times { entries << k }}
25
+
26
+ puts entries.shuffle!.first + " is the winner! AARRR!"
4
27
  end
5
28
  end
data/rubybooty.gemspec CHANGED
@@ -5,13 +5,15 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rubybooty}
8
- s.version = "0.0.0"
8
+ s.version = "0.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Russ Smith"]
12
- s.date = %q{2011-05-04}
12
+ s.date = %q{2011-05-10}
13
+ s.default_executable = %q{rubybooty}
13
14
  s.description = %q{Rubybooty}
14
15
  s.email = %q{russ@bashme.org}
16
+ s.executables = ["rubybooty"]
15
17
  s.extra_rdoc_files = [
16
18
  "LICENSE.txt",
17
19
  "README.rdoc"
@@ -25,6 +27,7 @@ Gem::Specification.new do |s|
25
27
  "README.rdoc",
26
28
  "Rakefile",
27
29
  "VERSION",
30
+ "bin/rubybooty",
28
31
  "lib/rubybooty.rb",
29
32
  "rubybooty.gemspec",
30
33
  "spec/rubybooty_spec.rb",
@@ -40,12 +43,14 @@ Gem::Specification.new do |s|
40
43
  s.specification_version = 3
41
44
 
42
45
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
46
+ s.add_runtime_dependency(%q<highline>, [">= 0"])
43
47
  s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
44
48
  s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
45
49
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
46
50
  s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
47
51
  s.add_development_dependency(%q<rcov>, [">= 0"])
48
52
  else
53
+ s.add_dependency(%q<highline>, [">= 0"])
49
54
  s.add_dependency(%q<rspec>, ["~> 2.3.0"])
50
55
  s.add_dependency(%q<yard>, ["~> 0.6.0"])
51
56
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -53,6 +58,7 @@ Gem::Specification.new do |s|
53
58
  s.add_dependency(%q<rcov>, [">= 0"])
54
59
  end
55
60
  else
61
+ s.add_dependency(%q<highline>, [">= 0"])
56
62
  s.add_dependency(%q<rspec>, ["~> 2.3.0"])
57
63
  s.add_dependency(%q<yard>, ["~> 0.6.0"])
58
64
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rubybooty
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.0
5
+ version: 0.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Russ Smith
@@ -10,12 +10,23 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-04 00:00:00 -07:00
14
- default_executable:
13
+ date: 2011-05-10 00:00:00 -07:00
14
+ default_executable: rubybooty
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: rspec
17
+ name: highline
18
18
  requirement: &id001 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ type: :runtime
25
+ prerelease: false
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: &id002 !ruby/object:Gem::Requirement
19
30
  none: false
20
31
  requirements:
21
32
  - - ~>
@@ -23,10 +34,10 @@ dependencies:
23
34
  version: 2.3.0
24
35
  type: :development
25
36
  prerelease: false
26
- version_requirements: *id001
37
+ version_requirements: *id002
27
38
  - !ruby/object:Gem::Dependency
28
39
  name: yard
29
- requirement: &id002 !ruby/object:Gem::Requirement
40
+ requirement: &id003 !ruby/object:Gem::Requirement
30
41
  none: false
31
42
  requirements:
32
43
  - - ~>
@@ -34,10 +45,10 @@ dependencies:
34
45
  version: 0.6.0
35
46
  type: :development
36
47
  prerelease: false
37
- version_requirements: *id002
48
+ version_requirements: *id003
38
49
  - !ruby/object:Gem::Dependency
39
50
  name: bundler
40
- requirement: &id003 !ruby/object:Gem::Requirement
51
+ requirement: &id004 !ruby/object:Gem::Requirement
41
52
  none: false
42
53
  requirements:
43
54
  - - ~>
@@ -45,10 +56,10 @@ dependencies:
45
56
  version: 1.0.0
46
57
  type: :development
47
58
  prerelease: false
48
- version_requirements: *id003
59
+ version_requirements: *id004
49
60
  - !ruby/object:Gem::Dependency
50
61
  name: jeweler
51
- requirement: &id004 !ruby/object:Gem::Requirement
62
+ requirement: &id005 !ruby/object:Gem::Requirement
52
63
  none: false
53
64
  requirements:
54
65
  - - ~>
@@ -56,10 +67,10 @@ dependencies:
56
67
  version: 1.6.0
57
68
  type: :development
58
69
  prerelease: false
59
- version_requirements: *id004
70
+ version_requirements: *id005
60
71
  - !ruby/object:Gem::Dependency
61
72
  name: rcov
62
- requirement: &id005 !ruby/object:Gem::Requirement
73
+ requirement: &id006 !ruby/object:Gem::Requirement
63
74
  none: false
64
75
  requirements:
65
76
  - - ">="
@@ -67,11 +78,11 @@ dependencies:
67
78
  version: "0"
68
79
  type: :development
69
80
  prerelease: false
70
- version_requirements: *id005
81
+ version_requirements: *id006
71
82
  description: Rubybooty
72
83
  email: russ@bashme.org
73
- executables: []
74
-
84
+ executables:
85
+ - rubybooty
75
86
  extensions: []
76
87
 
77
88
  extra_rdoc_files:
@@ -86,6 +97,7 @@ files:
86
97
  - README.rdoc
87
98
  - Rakefile
88
99
  - VERSION
100
+ - bin/rubybooty
89
101
  - lib/rubybooty.rb
90
102
  - rubybooty.gemspec
91
103
  - spec/rubybooty_spec.rb
@@ -104,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
116
  requirements:
105
117
  - - ">="
106
118
  - !ruby/object:Gem::Version
107
- hash: -1523085561355767130
119
+ hash: -81276610123237984
108
120
  segments:
109
121
  - 0
110
122
  version: "0"