wizardwerdna-pokerstats 1.0.2 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/bin/checkps +1 -1
- data/generators/foo/USAGE +1 -0
- data/generators/foo/foo_generator.rb +9 -0
- data/generators/foo/templates/hand_statistics.rhtml +4 -0
- data/generators/foo/templates/player_statistics.rhtml +4 -0
- data/lib/pokerstats/hand_statistics.rb +13 -1
- data/lib/pokerstats/hand_statistics_api.rb +7 -1
- data/pokerstats.gemspec +6 -2
- metadata +6 -2
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.5
|
data/bin/checkps
CHANGED
|
@@ -178,7 +178,7 @@ opts.each do |opt, arg|
|
|
|
178
178
|
when "--help", "--usage"
|
|
179
179
|
print "#{$0} playername {--user username} {--player playername} {--help } {--version}\n"
|
|
180
180
|
when "--version"
|
|
181
|
-
print "Pokerstars version
|
|
181
|
+
print "Pokerstars version #{File.read(version_file).chop}\n"
|
|
182
182
|
when "--user"
|
|
183
183
|
user = arg unless arg.empty?
|
|
184
184
|
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
foo bie doobie
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
class FooGenerator < Rails::Generator::Base
|
|
2
|
+
def manifest
|
|
3
|
+
record do |m|
|
|
4
|
+
m.directory "db/migration"
|
|
5
|
+
m.template "hand_statistics.rhtml", "db/migration/create_hand_statistics"
|
|
6
|
+
m.template "player_statistics.rhtml", "db/migration/create_player_statistics"
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
end
|
|
@@ -195,10 +195,16 @@ class HandStatistics
|
|
|
195
195
|
@hand_information
|
|
196
196
|
end
|
|
197
197
|
|
|
198
|
+
def self.rails_generator_command_line_for_player_data
|
|
199
|
+
plugin_factory.inject("hand_statistics_id:integer ") do |string, each|
|
|
200
|
+
string + each.rails_generator_command_line_for_player_data + " "
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
198
204
|
def self.rails_migration_for_player_data
|
|
199
205
|
prefix = <<-PREFIX
|
|
200
206
|
class AddHandStatisticsForPlayer < ActiveRecord::Migration
|
|
201
|
-
def self.
|
|
207
|
+
def self.ups
|
|
202
208
|
create_table :hand_statistics_for_player do |t|
|
|
203
209
|
t.integer :hand_statistics_id
|
|
204
210
|
PREFIX
|
|
@@ -236,6 +242,12 @@ class HandStatistics
|
|
|
236
242
|
return prefix + middle + suffix
|
|
237
243
|
end
|
|
238
244
|
|
|
245
|
+
def self.rails_generator_command_line_for_hand_data
|
|
246
|
+
HAND_REPORT_SPECIFICATION.inject("") do |string, each|
|
|
247
|
+
string + "#{each[0]}:#{each[1]} "
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
|
|
239
251
|
def self.rails_migration_data
|
|
240
252
|
rails_migration_for_hand_data + "\n\n" +
|
|
241
253
|
rails_migration_for_player_data
|
|
@@ -48,8 +48,14 @@ module HandStatisticsAPI
|
|
|
48
48
|
end
|
|
49
49
|
result += "\n"
|
|
50
50
|
end
|
|
51
|
+
|
|
52
|
+
def rails_generator_command_line_for_player_data
|
|
53
|
+
report_specification.inject("") do |string, each|
|
|
54
|
+
string + "#{each[0]}:#{each[1]} "
|
|
55
|
+
end
|
|
56
|
+
end
|
|
51
57
|
end
|
|
52
|
-
|
|
58
|
+
|
|
53
59
|
def self.included(klass)
|
|
54
60
|
klass.extend ClassMethods
|
|
55
61
|
end
|
data/pokerstats.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{pokerstats}
|
|
8
|
-
s.version = "1.0.
|
|
8
|
+
s.version = "1.0.5"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Andrew C. Greenberg"]
|
|
12
|
-
s.date = %q{2009-08-
|
|
12
|
+
s.date = %q{2009-08-29}
|
|
13
13
|
s.default_executable = %q{checkps}
|
|
14
14
|
s.description = %q{a library for extracting, computing and reporting statistics of poker hands parsed from hand history files}
|
|
15
15
|
s.email = %q{wizardwerdna@gmail.com}
|
|
@@ -26,6 +26,10 @@ Gem::Specification.new do |s|
|
|
|
26
26
|
"Rakefile",
|
|
27
27
|
"VERSION",
|
|
28
28
|
"bin/checkps",
|
|
29
|
+
"generators/foo/USAGE",
|
|
30
|
+
"generators/foo/foo_generator.rb",
|
|
31
|
+
"generators/foo/templates/hand_statistics.rhtml",
|
|
32
|
+
"generators/foo/templates/player_statistics.rhtml",
|
|
29
33
|
"lib/pokerstats.rb",
|
|
30
34
|
"lib/pokerstats/.gitignore",
|
|
31
35
|
"lib/pokerstats/hand_constants.rb",
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wizardwerdna-pokerstats
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew C. Greenberg
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-08-
|
|
12
|
+
date: 2009-08-29 00:00:00 -07:00
|
|
13
13
|
default_executable: checkps
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -59,6 +59,10 @@ files:
|
|
|
59
59
|
- Rakefile
|
|
60
60
|
- VERSION
|
|
61
61
|
- bin/checkps
|
|
62
|
+
- generators/foo/USAGE
|
|
63
|
+
- generators/foo/foo_generator.rb
|
|
64
|
+
- generators/foo/templates/hand_statistics.rhtml
|
|
65
|
+
- generators/foo/templates/player_statistics.rhtml
|
|
62
66
|
- lib/pokerstats.rb
|
|
63
67
|
- lib/pokerstats/.gitignore
|
|
64
68
|
- lib/pokerstats/hand_constants.rb
|