rubybooty 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/VERSION +1 -1
- data/lib/rubybooty.rb +17 -8
- data/rubybooty.gemspec +11 -12
- metadata +59 -66
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -18,7 +18,7 @@ GEM
|
|
18
18
|
rspec-expectations (2.3.0)
|
19
19
|
diff-lcs (~> 1.1.2)
|
20
20
|
rspec-mocks (2.3.0)
|
21
|
-
yard (0.
|
21
|
+
yard (0.7.3)
|
22
22
|
|
23
23
|
PLATFORMS
|
24
24
|
ruby
|
@@ -29,4 +29,4 @@ DEPENDENCIES
|
|
29
29
|
jeweler (~> 1.6.0)
|
30
30
|
rcov
|
31
31
|
rspec (~> 2.3.0)
|
32
|
-
yard (~> 0.
|
32
|
+
yard (~> 0.7.0)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
data/lib/rubybooty.rb
CHANGED
@@ -12,17 +12,26 @@ module Rubybooty
|
|
12
12
|
entrants = {}
|
13
13
|
|
14
14
|
while true
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
while true
|
16
|
+
name = ask("Entrants name (enter 'done' to finish): ")
|
17
|
+
break if name.downcase == "done"
|
18
|
+
entries = ask("Number of entries: (integer only)", Integer)
|
19
|
+
entrants[name] = entries
|
20
|
+
end
|
21
|
+
|
22
|
+
sum = entrants.values.inject(0,&:+)
|
23
|
+
if agree("Total entries: #{sum}\nRun now? (yes/no)")
|
24
|
+
break
|
25
|
+
end
|
19
26
|
end
|
20
27
|
|
21
|
-
agree("Run Now? (yes/no)")
|
22
|
-
|
23
28
|
entries = []
|
24
29
|
entrants.each { |k,v| v.times { entries << k }}
|
25
|
-
|
26
|
-
|
30
|
+
winner = entries.shuffle!.first
|
31
|
+
if winner
|
32
|
+
puts "#{winner} is the winner! AARRR!"
|
33
|
+
else
|
34
|
+
puts "No winner."
|
35
|
+
end
|
27
36
|
end
|
28
37
|
end
|
data/rubybooty.gemspec
CHANGED
@@ -4,15 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.0
|
7
|
+
s.name = "rubybooty"
|
8
|
+
s.version = "0.1.0"
|
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 =
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
s.email = %q{russ@bashme.org}
|
12
|
+
s.date = "2011-12-01"
|
13
|
+
s.description = "Rubybooty"
|
14
|
+
s.email = "russ@bashme.org"
|
16
15
|
s.executables = ["rubybooty"]
|
17
16
|
s.extra_rdoc_files = [
|
18
17
|
"LICENSE.txt",
|
@@ -33,11 +32,11 @@ Gem::Specification.new do |s|
|
|
33
32
|
"spec/rubybooty_spec.rb",
|
34
33
|
"spec/spec_helper.rb"
|
35
34
|
]
|
36
|
-
s.homepage =
|
35
|
+
s.homepage = "http://github.com/russ/rubybooty"
|
37
36
|
s.licenses = ["MIT"]
|
38
37
|
s.require_paths = ["lib"]
|
39
|
-
s.rubygems_version =
|
40
|
-
s.summary =
|
38
|
+
s.rubygems_version = "1.8.10"
|
39
|
+
s.summary = "Rubybooty"
|
41
40
|
|
42
41
|
if s.respond_to? :specification_version then
|
43
42
|
s.specification_version = 3
|
@@ -45,14 +44,14 @@ Gem::Specification.new do |s|
|
|
45
44
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
46
45
|
s.add_runtime_dependency(%q<highline>, [">= 0"])
|
47
46
|
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
48
|
-
s.add_development_dependency(%q<yard>, ["~> 0.
|
47
|
+
s.add_development_dependency(%q<yard>, ["~> 0.7.0"])
|
49
48
|
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
50
49
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
|
51
50
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
52
51
|
else
|
53
52
|
s.add_dependency(%q<highline>, [">= 0"])
|
54
53
|
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
55
|
-
s.add_dependency(%q<yard>, ["~> 0.
|
54
|
+
s.add_dependency(%q<yard>, ["~> 0.7.0"])
|
56
55
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
57
56
|
s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
|
58
57
|
s.add_dependency(%q<rcov>, [">= 0"])
|
@@ -60,7 +59,7 @@ Gem::Specification.new do |s|
|
|
60
59
|
else
|
61
60
|
s.add_dependency(%q<highline>, [">= 0"])
|
62
61
|
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
63
|
-
s.add_dependency(%q<yard>, ["~> 0.
|
62
|
+
s.add_dependency(%q<yard>, ["~> 0.7.0"])
|
64
63
|
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
65
64
|
s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
|
66
65
|
s.add_dependency(%q<rcov>, [">= 0"])
|
metadata
CHANGED
@@ -1,94 +1,91 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubybooty
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.2
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Russ Smith
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-12-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: highline
|
18
|
-
requirement: &
|
16
|
+
requirement: &70342714571520 !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version:
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
24
22
|
type: :runtime
|
25
23
|
prerelease: false
|
26
|
-
version_requirements: *
|
27
|
-
- !ruby/object:Gem::Dependency
|
24
|
+
version_requirements: *70342714571520
|
25
|
+
- !ruby/object:Gem::Dependency
|
28
26
|
name: rspec
|
29
|
-
requirement: &
|
27
|
+
requirement: &70342714569340 !ruby/object:Gem::Requirement
|
30
28
|
none: false
|
31
|
-
requirements:
|
29
|
+
requirements:
|
32
30
|
- - ~>
|
33
|
-
- !ruby/object:Gem::Version
|
31
|
+
- !ruby/object:Gem::Version
|
34
32
|
version: 2.3.0
|
35
33
|
type: :development
|
36
34
|
prerelease: false
|
37
|
-
version_requirements: *
|
38
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *70342714569340
|
36
|
+
- !ruby/object:Gem::Dependency
|
39
37
|
name: yard
|
40
|
-
requirement: &
|
38
|
+
requirement: &70342714558400 !ruby/object:Gem::Requirement
|
41
39
|
none: false
|
42
|
-
requirements:
|
40
|
+
requirements:
|
43
41
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: 0.
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 0.7.0
|
46
44
|
type: :development
|
47
45
|
prerelease: false
|
48
|
-
version_requirements: *
|
49
|
-
- !ruby/object:Gem::Dependency
|
46
|
+
version_requirements: *70342714558400
|
47
|
+
- !ruby/object:Gem::Dependency
|
50
48
|
name: bundler
|
51
|
-
requirement: &
|
49
|
+
requirement: &70342714793720 !ruby/object:Gem::Requirement
|
52
50
|
none: false
|
53
|
-
requirements:
|
51
|
+
requirements:
|
54
52
|
- - ~>
|
55
|
-
- !ruby/object:Gem::Version
|
53
|
+
- !ruby/object:Gem::Version
|
56
54
|
version: 1.0.0
|
57
55
|
type: :development
|
58
56
|
prerelease: false
|
59
|
-
version_requirements: *
|
60
|
-
- !ruby/object:Gem::Dependency
|
57
|
+
version_requirements: *70342714793720
|
58
|
+
- !ruby/object:Gem::Dependency
|
61
59
|
name: jeweler
|
62
|
-
requirement: &
|
60
|
+
requirement: &70342714790140 !ruby/object:Gem::Requirement
|
63
61
|
none: false
|
64
|
-
requirements:
|
62
|
+
requirements:
|
65
63
|
- - ~>
|
66
|
-
- !ruby/object:Gem::Version
|
64
|
+
- !ruby/object:Gem::Version
|
67
65
|
version: 1.6.0
|
68
66
|
type: :development
|
69
67
|
prerelease: false
|
70
|
-
version_requirements: *
|
71
|
-
- !ruby/object:Gem::Dependency
|
68
|
+
version_requirements: *70342714790140
|
69
|
+
- !ruby/object:Gem::Dependency
|
72
70
|
name: rcov
|
73
|
-
requirement: &
|
71
|
+
requirement: &70342714783740 !ruby/object:Gem::Requirement
|
74
72
|
none: false
|
75
|
-
requirements:
|
76
|
-
- -
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version:
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
79
77
|
type: :development
|
80
78
|
prerelease: false
|
81
|
-
version_requirements: *
|
79
|
+
version_requirements: *70342714783740
|
82
80
|
description: Rubybooty
|
83
81
|
email: russ@bashme.org
|
84
|
-
executables:
|
82
|
+
executables:
|
85
83
|
- rubybooty
|
86
84
|
extensions: []
|
87
|
-
|
88
|
-
extra_rdoc_files:
|
85
|
+
extra_rdoc_files:
|
89
86
|
- LICENSE.txt
|
90
87
|
- README.rdoc
|
91
|
-
files:
|
88
|
+
files:
|
92
89
|
- .document
|
93
90
|
- .rspec
|
94
91
|
- Gemfile
|
@@ -102,36 +99,32 @@ files:
|
|
102
99
|
- rubybooty.gemspec
|
103
100
|
- spec/rubybooty_spec.rb
|
104
101
|
- spec/spec_helper.rb
|
105
|
-
has_rdoc: true
|
106
102
|
homepage: http://github.com/russ/rubybooty
|
107
|
-
licenses:
|
103
|
+
licenses:
|
108
104
|
- MIT
|
109
105
|
post_install_message:
|
110
106
|
rdoc_options: []
|
111
|
-
|
112
|
-
require_paths:
|
107
|
+
require_paths:
|
113
108
|
- lib
|
114
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
110
|
none: false
|
116
|
-
requirements:
|
117
|
-
- -
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
|
120
|
-
segments:
|
111
|
+
requirements:
|
112
|
+
- - ! '>='
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
115
|
+
segments:
|
121
116
|
- 0
|
122
|
-
|
123
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
|
+
hash: -851321118349090078
|
118
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
119
|
none: false
|
125
|
-
requirements:
|
126
|
-
- -
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version:
|
120
|
+
requirements:
|
121
|
+
- - ! '>='
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
129
124
|
requirements: []
|
130
|
-
|
131
125
|
rubyforge_project:
|
132
|
-
rubygems_version: 1.
|
126
|
+
rubygems_version: 1.8.10
|
133
127
|
signing_key:
|
134
128
|
specification_version: 3
|
135
129
|
summary: Rubybooty
|
136
130
|
test_files: []
|
137
|
-
|