crapshoot 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,12 +1,10 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gemspec
3
+ # gemspec
4
+ gem 'activesupport', '~> 3.0'
4
5
 
5
6
  group :development do
6
- gem "shoulda", ">= 0"
7
- gem "bundler", "~> 1.0.0"
8
- gem "jeweler", "~> 1.5.2"
9
- gem "rcov", ">= 0"
7
+ gem 'jeweler', '~> 1.5.2'
10
8
  gem 'guard-test', '~> 0.1.4'
11
- gem 'treetop', '~> 1.4.9'
9
+ gem "shoulda", "~> 2.11.3"
12
10
  end
data/Gemfile.lock CHANGED
@@ -1,9 +1,3 @@
1
- PATH
2
- remote: .
3
- specs:
4
- crapshoot (0.0.0)
5
- activesupport (~> 3.0)
6
-
7
1
  GEM
8
2
  remote: http://rubygems.org/
9
3
  specs:
@@ -25,24 +19,16 @@ GEM
25
19
  rake (>= 0.8.1)
26
20
  open_gem (1.4.2)
27
21
  launchy (~> 0.3.5)
28
- polyglot (0.3.1)
29
22
  rake (0.8.7)
30
- rcov (0.9.9)
31
23
  shoulda (2.11.3)
32
24
  test-unit (2.1.2)
33
25
  thor (0.14.6)
34
- treetop (1.4.9)
35
- polyglot (>= 0.3.1)
36
26
 
37
27
  PLATFORMS
38
28
  ruby
39
29
 
40
30
  DEPENDENCIES
41
31
  activesupport (~> 3.0)
42
- bundler (~> 1.0.0)
43
- crapshoot!
44
32
  guard-test (~> 0.1.4)
45
33
  jeweler (~> 1.5.2)
46
- rcov
47
- shoulda
48
- treetop (~> 1.4.9)
34
+ shoulda (~> 2.11.3)
data/README.rdoc CHANGED
@@ -1,6 +1,28 @@
1
1
  = crapshoot
2
2
 
3
- Description goes here.
3
+ The alpha and omega of rolling dice.
4
+
5
+ == Why
6
+
7
+ Sometimes you want to roll four six-sided dice, drop the lowest, add three four-sided dice, and subtract seventeen.
8
+
9
+ Crapshoot.roll '4d6v + 3d4 - 17'
10
+
11
+ You might otherwise want to roll three twenty-sided dice and drop the highest, and then add six:
12
+
13
+ Crapshoot.roll '3d20^+6'
14
+
15
+ Or you might just want nine:
16
+
17
+ Crapshoot.roll '9'
18
+
19
+ == Developing with Ragel
20
+
21
+ I used the "Ragel" state machine compiler to generate the parser for this library. If you're changing the parser, you will need to install Ragel.
22
+
23
+ I've had good luck with the macports and homebrew packages for Ragel; I don't anticipate any problems with any packaging of it.
24
+
25
+ If you are modifying the parser, you may want to generate a Graphviz .dot or PDF document of the state machine produced by the scanner. The "rake scanner:pdf" task will generate this PDF, provided your installation of Graphviz allows it. If you're developing on Mac OS X, you can get a PDF-capable copy of Graphviz from http://www.graphviz.org/Download_macos.php .
4
26
 
5
27
  == Contributing to crapshoot
6
28
 
@@ -8,9 +30,9 @@ Description goes here.
8
30
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
31
  * Fork the project
10
32
  * Start a feature/bugfix branch
33
+ * Write tests for your feature
11
34
  * Commit and push until you are happy with your contribution
12
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
35
+ * Send me a pull request
14
36
 
15
37
  == Copyright
16
38
 
data/Rakefile CHANGED
@@ -22,8 +22,9 @@ Jeweler::Tasks.new do |gem|
22
22
  # Include your dependencies below. Runtime dependencies are required when using your gem,
23
23
  # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
24
  gem.add_runtime_dependency 'activesupport', '~> 3.0'
25
- # gem.add_runtime_dependency 'jabber4r', '> 0.1'
26
- # gem.add_development_dependency 'rspec', '> 1.2.3'
25
+ gem.add_development_dependency 'shoulda', '~> 2.11.3'
26
+ gem.add_development_dependency 'bundler', '~> 1.0.7'
27
+ gem.add_development_dependency 'jeweler', '~> 1.5.2'
27
28
  end
28
29
  Jeweler::RubygemsDotOrgTasks.new
29
30
 
@@ -57,13 +58,6 @@ end
57
58
 
58
59
  directory 'doc'
59
60
 
60
- require 'rcov/rcovtask'
61
- Rcov::RcovTask.new do |test|
62
- test.libs << 'test'
63
- test.pattern = 'test/**/test_*.rb'
64
- test.verbose = true
65
- end
66
-
67
61
  task :default => :test
68
62
 
69
63
  require 'rake/rdoctask'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/crapshoot.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{crapshoot}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Bryce Kerley"]
@@ -60,54 +60,33 @@ Gem::Specification.new do |s|
60
60
  s.specification_version = 3
61
61
 
62
62
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
63
- s.add_runtime_dependency(%q<crapshoot>, [">= 0"])
64
63
  s.add_runtime_dependency(%q<activesupport>, ["~> 3.0"])
65
- s.add_development_dependency(%q<shoulda>, [">= 0"])
66
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
67
64
  s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
68
- s.add_development_dependency(%q<rcov>, [">= 0"])
69
65
  s.add_development_dependency(%q<guard-test>, ["~> 0.1.4"])
70
- s.add_development_dependency(%q<treetop>, ["~> 1.4.9"])
71
- s.add_development_dependency(%q<shoulda>, [">= 0"])
72
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
73
- s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
74
- s.add_development_dependency(%q<rcov>, [">= 0"])
75
- s.add_development_dependency(%q<guard-test>, ["~> 0.1.4"])
76
- s.add_development_dependency(%q<treetop>, ["~> 1.4.9"])
66
+ s.add_development_dependency(%q<shoulda>, ["~> 2.11.3"])
77
67
  s.add_runtime_dependency(%q<activesupport>, ["~> 3.0"])
68
+ s.add_development_dependency(%q<shoulda>, ["~> 2.11.3"])
69
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.7"])
70
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
78
71
  else
79
- s.add_dependency(%q<crapshoot>, [">= 0"])
80
72
  s.add_dependency(%q<activesupport>, ["~> 3.0"])
81
- s.add_dependency(%q<shoulda>, [">= 0"])
82
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
83
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
84
- s.add_dependency(%q<rcov>, [">= 0"])
85
- s.add_dependency(%q<guard-test>, ["~> 0.1.4"])
86
- s.add_dependency(%q<treetop>, ["~> 1.4.9"])
87
- s.add_dependency(%q<shoulda>, [">= 0"])
88
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
89
73
  s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
90
- s.add_dependency(%q<rcov>, [">= 0"])
91
74
  s.add_dependency(%q<guard-test>, ["~> 0.1.4"])
92
- s.add_dependency(%q<treetop>, ["~> 1.4.9"])
75
+ s.add_dependency(%q<shoulda>, ["~> 2.11.3"])
93
76
  s.add_dependency(%q<activesupport>, ["~> 3.0"])
77
+ s.add_dependency(%q<shoulda>, ["~> 2.11.3"])
78
+ s.add_dependency(%q<bundler>, ["~> 1.0.7"])
79
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
94
80
  end
95
81
  else
96
- s.add_dependency(%q<crapshoot>, [">= 0"])
97
82
  s.add_dependency(%q<activesupport>, ["~> 3.0"])
98
- s.add_dependency(%q<shoulda>, [">= 0"])
99
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
100
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
101
- s.add_dependency(%q<rcov>, [">= 0"])
102
- s.add_dependency(%q<guard-test>, ["~> 0.1.4"])
103
- s.add_dependency(%q<treetop>, ["~> 1.4.9"])
104
- s.add_dependency(%q<shoulda>, [">= 0"])
105
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
106
83
  s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
107
- s.add_dependency(%q<rcov>, [">= 0"])
108
84
  s.add_dependency(%q<guard-test>, ["~> 0.1.4"])
109
- s.add_dependency(%q<treetop>, ["~> 1.4.9"])
85
+ s.add_dependency(%q<shoulda>, ["~> 2.11.3"])
110
86
  s.add_dependency(%q<activesupport>, ["~> 3.0"])
87
+ s.add_dependency(%q<shoulda>, ["~> 2.11.3"])
88
+ s.add_dependency(%q<bundler>, ["~> 1.0.7"])
89
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
111
90
  end
112
91
  end
113
92
 
data/lib/crapshoot.rb CHANGED
@@ -1,4 +1,3 @@
1
- require 'treetop'
2
1
  require 'active_support'
3
2
  %w{ scanner postfixer evaluator }.each do |f|
4
3
  require File.join(File.dirname(__FILE__), 'crapshoot', f)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Bryce Kerley
@@ -17,22 +17,9 @@ cert_chain: []
17
17
  date: 2010-12-28 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: crapshoot
22
- requirement: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- version: "0"
30
- type: :runtime
31
- prerelease: false
32
- version_requirements: *id001
33
20
  - !ruby/object:Gem::Dependency
34
21
  name: activesupport
35
- requirement: &id002 !ruby/object:Gem::Requirement
22
+ requirement: &id001 !ruby/object:Gem::Requirement
36
23
  none: false
37
24
  requirements:
38
25
  - - ~>
@@ -43,38 +30,10 @@ dependencies:
43
30
  version: "3.0"
44
31
  type: :runtime
45
32
  prerelease: false
46
- version_requirements: *id002
47
- - !ruby/object:Gem::Dependency
48
- name: shoulda
49
- requirement: &id003 !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- segments:
55
- - 0
56
- version: "0"
57
- type: :development
58
- prerelease: false
59
- version_requirements: *id003
60
- - !ruby/object:Gem::Dependency
61
- name: bundler
62
- requirement: &id004 !ruby/object:Gem::Requirement
63
- none: false
64
- requirements:
65
- - - ~>
66
- - !ruby/object:Gem::Version
67
- segments:
68
- - 1
69
- - 0
70
- - 0
71
- version: 1.0.0
72
- type: :development
73
- prerelease: false
74
- version_requirements: *id004
33
+ version_requirements: *id001
75
34
  - !ruby/object:Gem::Dependency
76
35
  name: jeweler
77
- requirement: &id005 !ruby/object:Gem::Requirement
36
+ requirement: &id002 !ruby/object:Gem::Requirement
78
37
  none: false
79
38
  requirements:
80
39
  - - ~>
@@ -86,23 +45,10 @@ dependencies:
86
45
  version: 1.5.2
87
46
  type: :development
88
47
  prerelease: false
89
- version_requirements: *id005
90
- - !ruby/object:Gem::Dependency
91
- name: rcov
92
- requirement: &id006 !ruby/object:Gem::Requirement
93
- none: false
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- segments:
98
- - 0
99
- version: "0"
100
- type: :development
101
- prerelease: false
102
- version_requirements: *id006
48
+ version_requirements: *id002
103
49
  - !ruby/object:Gem::Dependency
104
50
  name: guard-test
105
- requirement: &id007 !ruby/object:Gem::Requirement
51
+ requirement: &id003 !ruby/object:Gem::Requirement
106
52
  none: false
107
53
  requirements:
108
54
  - - ~>
@@ -114,122 +60,81 @@ dependencies:
114
60
  version: 0.1.4
115
61
  type: :development
116
62
  prerelease: false
117
- version_requirements: *id007
118
- - !ruby/object:Gem::Dependency
119
- name: treetop
120
- requirement: &id008 !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ~>
124
- - !ruby/object:Gem::Version
125
- segments:
126
- - 1
127
- - 4
128
- - 9
129
- version: 1.4.9
130
- type: :development
131
- prerelease: false
132
- version_requirements: *id008
63
+ version_requirements: *id003
133
64
  - !ruby/object:Gem::Dependency
134
65
  name: shoulda
135
- requirement: &id009 !ruby/object:Gem::Requirement
66
+ requirement: &id004 !ruby/object:Gem::Requirement
136
67
  none: false
137
68
  requirements:
138
- - - ">="
69
+ - - ~>
139
70
  - !ruby/object:Gem::Version
140
71
  segments:
141
- - 0
142
- version: "0"
72
+ - 2
73
+ - 11
74
+ - 3
75
+ version: 2.11.3
143
76
  type: :development
144
77
  prerelease: false
145
- version_requirements: *id009
78
+ version_requirements: *id004
146
79
  - !ruby/object:Gem::Dependency
147
- name: bundler
148
- requirement: &id010 !ruby/object:Gem::Requirement
80
+ name: activesupport
81
+ requirement: &id005 !ruby/object:Gem::Requirement
149
82
  none: false
150
83
  requirements:
151
84
  - - ~>
152
85
  - !ruby/object:Gem::Version
153
86
  segments:
154
- - 1
155
- - 0
87
+ - 3
156
88
  - 0
157
- version: 1.0.0
158
- type: :development
89
+ version: "3.0"
90
+ type: :runtime
159
91
  prerelease: false
160
- version_requirements: *id010
92
+ version_requirements: *id005
161
93
  - !ruby/object:Gem::Dependency
162
- name: jeweler
163
- requirement: &id011 !ruby/object:Gem::Requirement
94
+ name: shoulda
95
+ requirement: &id006 !ruby/object:Gem::Requirement
164
96
  none: false
165
97
  requirements:
166
98
  - - ~>
167
99
  - !ruby/object:Gem::Version
168
100
  segments:
169
- - 1
170
- - 5
171
101
  - 2
172
- version: 1.5.2
173
- type: :development
174
- prerelease: false
175
- version_requirements: *id011
176
- - !ruby/object:Gem::Dependency
177
- name: rcov
178
- requirement: &id012 !ruby/object:Gem::Requirement
179
- none: false
180
- requirements:
181
- - - ">="
182
- - !ruby/object:Gem::Version
183
- segments:
184
- - 0
185
- version: "0"
102
+ - 11
103
+ - 3
104
+ version: 2.11.3
186
105
  type: :development
187
106
  prerelease: false
188
- version_requirements: *id012
107
+ version_requirements: *id006
189
108
  - !ruby/object:Gem::Dependency
190
- name: guard-test
191
- requirement: &id013 !ruby/object:Gem::Requirement
109
+ name: bundler
110
+ requirement: &id007 !ruby/object:Gem::Requirement
192
111
  none: false
193
112
  requirements:
194
113
  - - ~>
195
114
  - !ruby/object:Gem::Version
196
115
  segments:
197
- - 0
198
116
  - 1
199
- - 4
200
- version: 0.1.4
117
+ - 0
118
+ - 7
119
+ version: 1.0.7
201
120
  type: :development
202
121
  prerelease: false
203
- version_requirements: *id013
122
+ version_requirements: *id007
204
123
  - !ruby/object:Gem::Dependency
205
- name: treetop
206
- requirement: &id014 !ruby/object:Gem::Requirement
124
+ name: jeweler
125
+ requirement: &id008 !ruby/object:Gem::Requirement
207
126
  none: false
208
127
  requirements:
209
128
  - - ~>
210
129
  - !ruby/object:Gem::Version
211
130
  segments:
212
131
  - 1
213
- - 4
214
- - 9
215
- version: 1.4.9
132
+ - 5
133
+ - 2
134
+ version: 1.5.2
216
135
  type: :development
217
136
  prerelease: false
218
- version_requirements: *id014
219
- - !ruby/object:Gem::Dependency
220
- name: activesupport
221
- requirement: &id015 !ruby/object:Gem::Requirement
222
- none: false
223
- requirements:
224
- - - ~>
225
- - !ruby/object:Gem::Version
226
- segments:
227
- - 3
228
- - 0
229
- version: "3.0"
230
- type: :runtime
231
- prerelease: false
232
- version_requirements: *id015
137
+ version_requirements: *id008
233
138
  description: Crapshoot is a dice-rolling gem that parses complicated notation for most of your pen-and-paper gaming needs.
234
139
  email: bkerley@brycekerley.net
235
140
  executables: []
@@ -278,7 +183,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
278
183
  requirements:
279
184
  - - ">="
280
185
  - !ruby/object:Gem::Version
281
- hash: -352312256047208438
186
+ hash: -2401645687353954734
282
187
  segments:
283
188
  - 0
284
189
  version: "0"