wizardwerdna-pokerstats 1.0.12 → 1.0.13
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.13
|
|
@@ -11,7 +11,7 @@ class CreatePokerstats < ActiveRecord::Migration
|
|
|
11
11
|
end
|
|
12
12
|
create_table :player_statistics do |t|
|
|
13
13
|
t.integer :hand_statistics_id
|
|
14
|
-
<%= HandStatistics.
|
|
14
|
+
<%= HandStatistics.player_statistics_migration_data -%>
|
|
15
15
|
t.timestamps
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -195,53 +195,6 @@ 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
|
-
|
|
204
|
-
def self.rails_migration_for_player_data
|
|
205
|
-
prefix = <<-PREFIX
|
|
206
|
-
class AddHandStatisticsForPlayer < ActiveRecord::Migration
|
|
207
|
-
def self.ups
|
|
208
|
-
create_table :hand_statistics_for_player do |t|
|
|
209
|
-
t.integer :hand_statistics_id
|
|
210
|
-
PREFIX
|
|
211
|
-
middle = plugin_factory.inject(""){|string, each| string + each.rails_migration_segment_for_player_data}
|
|
212
|
-
suffix = <<-SUFFIX
|
|
213
|
-
end
|
|
214
|
-
end
|
|
215
|
-
def self.down
|
|
216
|
-
drop_table :hand_statistics_for_player
|
|
217
|
-
end
|
|
218
|
-
end
|
|
219
|
-
SUFFIX
|
|
220
|
-
return prefix + middle + suffix
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
def self.rails_migration_segment_for_hand_data key, sql_type
|
|
224
|
-
"\t\tt.#{sql_type}\t#{key.inspect}\n"
|
|
225
|
-
end
|
|
226
|
-
|
|
227
|
-
def self.rails_migration_for_hand_data
|
|
228
|
-
prefix = <<-PREFIX
|
|
229
|
-
class AddHandStatistics < ActiveRecord::Migration
|
|
230
|
-
def self.up
|
|
231
|
-
create_table :hand_statistics do |t|
|
|
232
|
-
PREFIX
|
|
233
|
-
middle = HAND_REPORT_SPECIFICATION.inject(""){|string, each| string + rails_migration_segment_for_hand_data(*each)}
|
|
234
|
-
suffix = <<-SUFFIX
|
|
235
|
-
end
|
|
236
|
-
end
|
|
237
|
-
def self.down
|
|
238
|
-
drop_table :hand_statistics
|
|
239
|
-
end
|
|
240
|
-
end
|
|
241
|
-
SUFFIX
|
|
242
|
-
return prefix + middle + suffix
|
|
243
|
-
end
|
|
244
|
-
|
|
245
198
|
def self.hand_statistics_migration_data
|
|
246
199
|
HAND_REPORT_SPECIFICATION.inject("") do |string, each|
|
|
247
200
|
string + "t.#{each[1]}\t#{each[0].inspect}\n"
|
|
@@ -249,30 +202,14 @@ class HandStatistics
|
|
|
249
202
|
end
|
|
250
203
|
|
|
251
204
|
def self.player_statistics_migration_data
|
|
252
|
-
plugin_factory.inject("") do |
|
|
253
|
-
|
|
254
|
-
each_plugin.report_specification do |each_datum|
|
|
255
|
-
|
|
205
|
+
plugin_factory.inject("") do |str, each_plugin|
|
|
206
|
+
tstr = "# from #{each_plugin.inspect}\n"
|
|
207
|
+
each_plugin.report_specification.each do |each_datum|
|
|
208
|
+
tstr += "t.#{each_datum[1]}\t#{each_datum[0].inspect}\n"
|
|
256
209
|
end
|
|
210
|
+
str = str + tstr
|
|
257
211
|
end
|
|
258
212
|
end
|
|
259
|
-
|
|
260
|
-
def self.player_statistics_migration_data
|
|
261
|
-
HAND_REPORT_SPECIFICATION.inject("") do |string, each|
|
|
262
|
-
string + "t.#{each[1]}\t#{each[0].inspect}\n"
|
|
263
|
-
end
|
|
264
|
-
end
|
|
265
|
-
|
|
266
|
-
def self.rails_generator_command_line_for_hand_data
|
|
267
|
-
HAND_REPORT_SPECIFICATION.inject("") do |string, each|
|
|
268
|
-
string + "#{each[0]}:#{each[1]} "
|
|
269
|
-
end
|
|
270
|
-
end
|
|
271
|
-
|
|
272
|
-
def self.rails_migration_data
|
|
273
|
-
rails_migration_for_hand_data + "\n\n" +
|
|
274
|
-
rails_migration_for_player_data
|
|
275
|
-
end
|
|
276
213
|
private
|
|
277
214
|
def method_missing symbol, *args
|
|
278
215
|
plugins.send symbol, *args
|
|
@@ -283,4 +220,4 @@ Dir[File.dirname(__FILE__) + "/plugins/*_statistics.rb"].each {|filename| requir
|
|
|
283
220
|
HandStatistics.delegate_plugin_public_methods_except HandStatisticsAPI.public_methods
|
|
284
221
|
|
|
285
222
|
# # puts HandStatistics.rails_migration_data
|
|
286
|
-
|
|
223
|
+
puts HandStatistics.player_statistics_migration_data
|
data/pokerstats.gemspec
CHANGED
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.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew C. Greenberg
|
|
@@ -90,7 +90,6 @@ files:
|
|
|
90
90
|
- spec/zpokerstars_hand_history_parser_integration.txt
|
|
91
91
|
has_rdoc: false
|
|
92
92
|
homepage: http://github.com/wizardwerdna/pokerstats
|
|
93
|
-
licenses:
|
|
94
93
|
post_install_message:
|
|
95
94
|
rdoc_options:
|
|
96
95
|
- --charset=UTF-8
|
|
@@ -111,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
111
110
|
requirements: []
|
|
112
111
|
|
|
113
112
|
rubyforge_project:
|
|
114
|
-
rubygems_version: 1.
|
|
113
|
+
rubygems_version: 1.2.0
|
|
115
114
|
signing_key:
|
|
116
115
|
specification_version: 3
|
|
117
116
|
summary: poker hand history statistics library
|