wizardwerdna-pokerstats 1.0.10 → 1.0.11

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.10
1
+ 1.0.11
@@ -1,9 +1,7 @@
1
- class PokerstatsGenerator < Rails::Generator::Base
1
+ class PokerstatsGenerator < Rails::Generator::Base
2
2
  def manifest
3
3
  record do |m|
4
- m.directory "db/migration"
5
- m.template "hand_statistics.rhtml", "db/migration/create_hand_statistics.migration"
6
- m.template "player_statistics.rhtml", "db/migration/create_player_statistics.migration"
4
+ m.migration_template "create_pokerstats.rhtml", "db/migrate", :migration_file_name => "create_pokerstats"
7
5
  end
8
6
  end
9
7
  end
@@ -0,0 +1,23 @@
1
+ <%
2
+ require 'rubygems'
3
+ require 'pokerstats/hand_statistics'
4
+ %>
5
+
6
+ class CreatePokerstats < ActiveRecord::Migration
7
+ def self.up
8
+ create_table :hand_statistics do |t|
9
+ <%= HandStatistics.hand_statistics_migration_data -%>
10
+ t.timestamps
11
+ end
12
+ create_table :player_statistics do |t|
13
+ t.integer :hand_statistics_id
14
+ <%= HandStatistics.hand_statistics_migration_data -%>
15
+ t.timestamps
16
+ end
17
+ end
18
+
19
+ def self.down
20
+ drop_table :player_statistics
21
+ drop_table :hand_statistics
22
+ end
23
+ end
@@ -243,7 +243,7 @@ class HandStatistics
243
243
  end
244
244
 
245
245
  def self.hand_statistics_migration_data
246
- HAND_REPORT_SPECIFICATION.inject do |string, each|
246
+ HAND_REPORT_SPECIFICATION.inject("" ) do |string, each|
247
247
  string + "t.#{each[1]}\t#{each[0].inspect}\n"
248
248
  end
249
249
  end
@@ -283,3 +283,4 @@ Dir[File.dirname(__FILE__) + "/plugins/*_statistics.rb"].each {|filename| requir
283
283
  HandStatistics.delegate_plugin_public_methods_except HandStatisticsAPI.public_methods
284
284
 
285
285
  # puts HandStatistics.rails_migration_data
286
+ puts HandStatistics.hand_statistics_migration_data
data/pokerstats.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pokerstats}
8
- s.version = "1.0.10"
8
+ s.version = "1.0.11"
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"]
@@ -28,8 +28,7 @@ Gem::Specification.new do |s|
28
28
  "bin/checkps",
29
29
  "generators/pokerstats/USAGE",
30
30
  "generators/pokerstats/pokerstats_generator.rb",
31
- "generators/pokerstats/templates/hand_statistics.rhtml",
32
- "generators/pokerstats/templates/player_statistics.rhtml",
31
+ "generators/pokerstats/templates/create_pokerstats.rhtml",
33
32
  "lib/pokerstats.rb",
34
33
  "lib/pokerstats/.gitignore",
35
34
  "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.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew C. Greenberg
@@ -61,8 +61,7 @@ files:
61
61
  - bin/checkps
62
62
  - generators/pokerstats/USAGE
63
63
  - generators/pokerstats/pokerstats_generator.rb
64
- - generators/pokerstats/templates/hand_statistics.rhtml
65
- - generators/pokerstats/templates/player_statistics.rhtml
64
+ - generators/pokerstats/templates/create_pokerstats.rhtml
66
65
  - lib/pokerstats.rb
67
66
  - lib/pokerstats/.gitignore
68
67
  - lib/pokerstats/hand_constants.rb
@@ -91,6 +90,7 @@ files:
91
90
  - spec/zpokerstars_hand_history_parser_integration.txt
92
91
  has_rdoc: false
93
92
  homepage: http://github.com/wizardwerdna/pokerstats
93
+ licenses:
94
94
  post_install_message:
95
95
  rdoc_options:
96
96
  - --charset=UTF-8
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  requirements: []
112
112
 
113
113
  rubyforge_project:
114
- rubygems_version: 1.2.0
114
+ rubygems_version: 1.3.5
115
115
  signing_key:
116
116
  specification_version: 3
117
117
  summary: poker hand history statistics library
@@ -1,4 +0,0 @@
1
- <%=
2
- require 'pokerstats/hand_statistics'
3
- HandStatistics.rails_migration_for_hand_data
4
- %>
@@ -1,4 +0,0 @@
1
- <%=
2
- require 'pokerstats/hand_statistics'
3
- HandStatistics.rails_migration_for_player_data
4
- %>