pokerstats 2.0.17 → 2.0.18

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.17
1
+ 2.0.18
@@ -109,42 +109,36 @@ module Pokerstats
109
109
 
110
110
  def parse(line)
111
111
  case line
112
- when /PokerStars Game #([0-9]+): Tournament #([0-9]+), (#{CASH})\+(#{CASH}) Hold'em No Limit - Level ([IVXL]+) \((#{CASH})\/(#{CASH})\) - (.*)$/
113
- @stats.update_hand :name => "PS#{$1}", :description=> "#{$2}, #{$3}+#{$4} Hold'em No Limit", :tournament=> $2,
114
- :sb=> $6.to_d, :bb=> $7.to_d, :ante => "0.0".to_d,
115
- :played_at=> PokerstarsTimeStringConverter.new($8).as_utc_datetime,
112
+ when /PokerStars Game #([0-9]+): Tournament #([0-9]+), (#{CASH})\+(#{CASH}) Hold'em (Pot |No |)Limit - Level ([IVXL]+) \((#{CASH})\/(#{CASH})\) - (.*)$/
113
+ @stats.update_hand :name => "PS#{$1}", :description=> "#{$2}, #{$3}+#{$4} Hold'em #{$5}Limit", :tournament=> $2,
114
+ :sb=> $7.to_d, :bb=> $8.to_d, :ante => "0.0".to_d,
115
+ :played_at=> PokerstarsTimeStringConverter.new($9).as_utc_datetime,
116
116
  :street => :prelude, :board => "", :max_players => 0, :number_players => 0, :table_name => "",
117
- :game_type => "Hold'em", :limit_type => "No Limit", :stakes_type => cash_to_d($3)
118
- # when /PokerStars Game #([0-9]+): Tournament #([0-9]+), (#{CASH})\+(#{CASH}) USD Hold'em No Limit - Level ([IVXL]+) \((#{CASH})\/(#{CASH})\) - (.*)$/
119
- # @stats.update_hand :name => "PS#{$1}", :description=> "#{$2}, #{$3}+#{$4} Hold'em No Limit", :tournament=> $2,
120
- # :sb=> $6.to_d, :bb=> $7.to_d, :ante => "0.0".to_d,
121
- # :played_at=> PokerstarsTimeStringConverter.new($8).as_utc_datetime,
122
- # :street => :prelude, :board => "", :max_players => 0, :number_players => 0, :table_name => "",
123
- # :game_type => "Hold'em", :limit_type => "No Limit", :stakes_type => cash_to_d($3)
124
- when /PokerStars Game #([0-9]+): Tournament #([0-9]+), (Freeroll|(#{CASH})\+(#{CASH}) *(USD)?) +Hold'em No Limit -.*Level ([IVXL]+) \((#{CASH})\/(#{CASH})\) - (.*)$/
125
- @stats.update_hand :name => "PS#{$1}", :description=> "#{$2}, #{$3} Hold'em No Limit", :tournament=> $2,
126
- :sb=> $8.to_d, :bb=> $9.to_d, :ante => "0.0".to_d,
127
- :played_at=> PokerstarsTimeStringConverter.new($10).as_utc_datetime,
117
+ :game_type => "Hold'em", :limit_type => "#{$5}Limit", :stakes_type => cash_to_d($3)
118
+ when /PokerStars Game #([0-9]+): Tournament #([0-9]+), (Freeroll|(#{CASH})\+(#{CASH}) *(USD)?) +Hold'em (Pot |No |)Limit -.*Level ([IVXL]+) \((#{CASH})\/(#{CASH})\) - (.*)$/
119
+ @stats.update_hand :name => "PS#{$1}", :description=> "#{$2}, #{$3} Hold'em #{$7}Limit", :tournament=> $2,
120
+ :sb=> $9.to_d, :bb=> $10.to_d, :ante => "0.0".to_d,
121
+ :played_at=> PokerstarsTimeStringConverter.new($11).as_utc_datetime,
128
122
  :street => :prelude, :board => "", :max_players => 0, :number_players => 0, :table_name => "",
129
- :game_type => "Hold'em", :limit_type => "No Limit", :stakes_type => cash_to_d($4)
130
- when /PokerStars Game #([0-9]+): Tournament #([0-9]+), (Freeroll|(#{CASH}).*(FPP)) *(USD)? +Hold'em No Limit -.*Level ([IVXL]+) \((#{CASH})\/(#{CASH})\) - (.*)$/
131
- @stats.update_hand :name => "PS#{$1}", :description=> "#{$2}, #{$3} Hold'em No Limit", :tournament=> $2,
132
- :sb=> $8.to_d, :bb=> $9.to_d, :ante => "0.0".to_d,
133
- :played_at=> PokerstarsTimeStringConverter.new($10).as_utc_datetime,
123
+ :game_type => "Hold'em", :limit_type => "#{$7}Limit", :stakes_type => cash_to_d($4)
124
+ when /PokerStars Game #([0-9]+): Tournament #([0-9]+), (Freeroll|(#{CASH}).*(FPP)) *(USD)? +Hold'em (Pot |No |)Limit -.*Level ([IVXL]+) \((#{CASH})\/(#{CASH})\) - (.*)$/
125
+ @stats.update_hand :name => "PS#{$1}", :description=> "#{$2}, #{$3} Hold'em #{$7}Limit", :tournament=> $2,
126
+ :sb=> $9.to_d, :bb=> $10.to_d, :ante => "0.0".to_d,
127
+ :played_at=> PokerstarsTimeStringConverter.new($11).as_utc_datetime,
134
128
  :street => :prelude, :board => "", :max_players => 0, :number_players => 0, :table_name => "",
135
- :game_type => "Hold'em", :limit_type => "No Limit", :stakes_type => "0".to_d
136
- when /PokerStars Game #([0-9]+): +([^(]*)Hold'em No Limit \((#{CASH})\/(#{CASH})\) - (.*)$/
137
- @stats.update_hand :name => "PS#{$1}", :description=> "#{$2}Hold'em No Limit (#{$3}/#{$4})", :tournament=> nil,
138
- :sb=> cash_to_d($3), :bb=> cash_to_d($4), :ante => "0.0".to_d,
139
- :played_at=> PokerstarsTimeStringConverter.new($5).as_utc_datetime,
129
+ :game_type => "Hold'em", :limit_type => "#{$7}Limit", :stakes_type => "0".to_d
130
+ when /PokerStars Game #([0-9]+): +([^(]*)Hold'em (No |Pot |)Limit \((#{CASH})\/(#{CASH})\) - (.*)$/
131
+ @stats.update_hand :name => "PS#{$1}", :description=> "#{$2}Hold'em #{$3}Limit (#{$4}/#{$5})", :tournament=> nil,
132
+ :sb=> cash_to_d($4), :bb=> cash_to_d($5), :ante => "0.0".to_d,
133
+ :played_at=> PokerstarsTimeStringConverter.new($6).as_utc_datetime,
140
134
  :street => :prelude, :board => "", :max_players => 0, :number_players => 0, :table_name => "",
141
- :game_type => "Hold'em", :limit_type => "No Limit", :stakes_type => cash_to_d($4)
142
- when /PokerStars Game #([0-9]+): +([^(]*)Hold'em No Limit \((#{CASH})\/(#{CASH}) USD\) - (.*)$/
143
- @stats.update_hand :name => "PS#{$1}", :description=> "#{$2}Hold'em No LImit (#{$3}/#{$4})", :tournament=> nil,
144
- :sb=> cash_to_d($3), :bb=> cash_to_d($4), :ante => "0.0".to_d,
145
- :played_at=> PokerstarsTimeStringConverter.new($5).as_utc_datetime,
135
+ :game_type => "Hold'em", :limit_type => "#{$3}Limit", :stakes_type => cash_to_d($5)
136
+ when /PokerStars Game #([0-9]+): +([^(]*)Hold'em (No |Pot |)Limit \((#{CASH})\/(#{CASH}) USD\) - (.*)$/
137
+ @stats.update_hand :name => "PS#{$1}", :description=> "#{$2}Hold'em #{$3}LImit (#{$4}/#{$5})", :tournament=> nil,
138
+ :sb=> cash_to_d($4), :bb=> cash_to_d($5), :ante => "0.0".to_d,
139
+ :played_at=> PokerstarsTimeStringConverter.new($6).as_utc_datetime,
146
140
  :street => :prelude, :board => "", :max_players => 0, :number_players => 0, :table_name => "",
147
- :game_type => "Hold'em", :limit_type => "No Limit", :stakes_type => cash_to_d($4)
141
+ :game_type => "Hold'em", :limit_type => "#{$3}Limit", :stakes_type => cash_to_d($5)
148
142
  when /PokerStars Game #([0-9]+):/
149
143
  raise HandHistoryParseError, "invalid hand record: #{line}"
150
144
  when /\*\*\* HOLE CARDS \*\*\*/
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pokerstats}
8
- s.version = "2.0.17"
8
+ s.version = "2.0.18"
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-11-21}
12
+ s.date = %q{2009-11-23}
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}
@@ -74,122 +74,234 @@ describe PokerstarsHandHistoryParser, "when parsing structural matter" do
74
74
  @stats = HandStatistics.new
75
75
  @parser = PokerstarsHandHistoryParser.new(@stats)
76
76
  end
77
+
78
+ context "for tournaments" do
79
+ before(:each) do
80
+ @valid_tournament_headers = [
81
+ @old_style_tournament_header = "PokerStars Game #21650436825: Tournament #117620218, $10+$1 Hold'em No Limit - Level I (10/20) - 2008/10/31 17:25:42 ET",
82
+ @new_style_tournament_header = "PokerStars Game #33566683789: Tournament #199550385, $10+$1 USD Hold'em No Limit - Level XVIII (2000/4000) - 2009/10/02 22:00:29 ET",
83
+ @pot_limit_tournament_header = "PokerStars Game #33566683789: Tournament #199550385, $10+$1 USD Hold'em Pot Limit - Level XVIII (2000/4000) - 2009/10/02 22:00:29 ET",
84
+ @limit_tournament_header = "PokerStars Game #33566683789: Tournament #199550385, $10+$1 USD Hold'em Limit - Level XVIII (2000/4000) - 2009/10/02 22:00:29 ET",
85
+ @freeroll_tournament_header = "PokerStars Game #24703545200: Tournament #137653257, Freeroll Hold'em No Limit - Level I (10/20) - 2009/02/07 19:24:12 ET",
86
+ @fpp_tournament_header = "PokerStars Game #27572086902: Tournament #158153393, 5125FPP Hold'em No Limit - Level I (10/20) - 2009/04/27 22:19:46 ET"
87
+ ]
88
+ end
77
89
 
78
- it "should parse a tournament header" do
79
- @stats.should_receive(:update_hand).with(
80
- :name => "PS21650436825",
81
- :description => "117620218, $10+$1 Hold'em No Limit",
82
- :ante => "0.0".to_d,
83
- :table_name => "",
84
- :max_players => 0,
85
- :number_players => 0,
86
- :sb => "10".to_d,
87
- :bb => "20".to_d,
88
- :played_at => DateTime.parse("2008/10/31 17:25:42 EDT"),
89
- :tournament => "117620218",
90
- :street => :prelude,
91
- :board => "",
92
- :game_type => "Hold'em",
93
- :stakes_type => "10".to_d,
94
- :limit_type => "No Limit"
95
- )
96
- @parser.parse("PokerStars Game #21650436825: Tournament #117620218, $10+$1 Hold'em No Limit - Level I (10/20) - 2008/10/31 17:25:42 ET")
97
- end
98
-
99
- it "should recognize a valid tournament hand history" do
100
- @stats.should_receive(:update_hand).with(
101
- :name => "PS33566683789",
102
- :description => "199550385, $10+$1 USD Hold'em No Limit",
103
- :ante => "0.0".to_d,
104
- :table_name => "",
105
- :max_players => 0,
106
- :number_players => 0,
107
- :sb => "2000".to_d,
108
- :bb => "4000".to_d,
109
- :played_at => DateTime.parse("2009/10/03 02:00:29 UDT"),
110
- :tournament => "199550385",
111
- :street => :prelude,
112
- :board => "",
113
- :game_type => "Hold'em",
114
- :stakes_type => "10".to_d,
115
- :limit_type => "No Limit"
116
- )
117
- @parser.parse("PokerStars Game #33566683789: Tournament #199550385, $10+$1 USD Hold'em No Limit - Level XVIII (2000/4000) - 2009/10/02 22:00:29 ET")
118
- end
90
+ it "should parse an old style tournament header" do
91
+ @stats.should_receive(:update_hand).with(
92
+ :name => "PS21650436825",
93
+ :description => "117620218, $10+$1 Hold'em No Limit",
94
+ :ante => "0.0".to_d,
95
+ :table_name => "",
96
+ :max_players => 0,
97
+ :number_players => 0,
98
+ :sb => "10".to_d,
99
+ :bb => "20".to_d,
100
+ :played_at => DateTime.parse("2008/10/31 17:25:42 EDT"),
101
+ :tournament => "117620218",
102
+ :street => :prelude,
103
+ :board => "",
104
+ :game_type => "Hold'em",
105
+ :stakes_type => "10".to_d,
106
+ :limit_type => "No Limit"
107
+ )
108
+ @parser.parse(@old_style_tournament_header)
109
+ end
119
110
 
120
- it "should recognize a freeroll tournament hand history" do
121
- @stats.should_receive(:update_hand).with(
122
- :name => "PS24703545200",
123
- :description => "137653257, Freeroll Hold'em No Limit",
124
- :ante => "0.0".to_d,
125
- :table_name => "",
126
- :max_players => 0,
127
- :number_players => 0,
128
- :sb => "10".to_d,
129
- :bb => "20".to_d,
130
- :played_at => DateTime.parse("Sun, 08 Feb 2009 00:24:12 +0000"),
131
- :tournament => "137653257",
132
- :street => :prelude,
133
- :board => "",
134
- :game_type => "Hold'em",
135
- :stakes_type => "0".to_d,
136
- :limit_type => "No Limit"
137
- )
138
- @parser.parse("PokerStars Game #24703545200: Tournament #137653257, Freeroll Hold'em No Limit - Level I (10/20) - 2009/02/07 19:24:12 ET")
139
- end
111
+ it "should recognize a new style tournament hand history" do
112
+ @stats.should_receive(:update_hand).with(
113
+ :name => "PS33566683789",
114
+ :description => "199550385, $10+$1 USD Hold'em No Limit",
115
+ :ante => "0.0".to_d,
116
+ :table_name => "",
117
+ :max_players => 0,
118
+ :number_players => 0,
119
+ :sb => "2000".to_d,
120
+ :bb => "4000".to_d,
121
+ :played_at => DateTime.parse("2009/10/03 02:00:29 UDT"),
122
+ :tournament => "199550385",
123
+ :street => :prelude,
124
+ :board => "",
125
+ :game_type => "Hold'em",
126
+ :stakes_type => "10".to_d,
127
+ :limit_type => "No Limit"
128
+ )
129
+ @parser.parse(@new_style_tournament_header)
130
+ end
131
+
132
+ it "should recognize a limit tournament hand history" do
133
+ @stats.should_receive(:update_hand).with(
134
+ :name => "PS33566683789",
135
+ :description => "199550385, $10+$1 USD Hold'em Limit",
136
+ :ante => "0.0".to_d,
137
+ :table_name => "",
138
+ :max_players => 0,
139
+ :number_players => 0,
140
+ :sb => "2000".to_d,
141
+ :bb => "4000".to_d,
142
+ :played_at => DateTime.parse("2009/10/03 02:00:29 UDT"),
143
+ :tournament => "199550385",
144
+ :street => :prelude,
145
+ :board => "",
146
+ :game_type => "Hold'em",
147
+ :stakes_type => "10".to_d,
148
+ :limit_type => "Limit"
149
+ )
150
+ @parser.parse(@limit_tournament_header)
151
+ end
152
+
153
+ it "should recognize a pot limit tournament hand history" do
154
+ @stats.should_receive(:update_hand).with(
155
+ :name => "PS33566683789",
156
+ :description => "199550385, $10+$1 USD Hold'em Pot Limit",
157
+ :ante => "0.0".to_d,
158
+ :table_name => "",
159
+ :max_players => 0,
160
+ :number_players => 0,
161
+ :sb => "2000".to_d,
162
+ :bb => "4000".to_d,
163
+ :played_at => DateTime.parse("2009/10/03 02:00:29 UDT"),
164
+ :tournament => "199550385",
165
+ :street => :prelude,
166
+ :board => "",
167
+ :game_type => "Hold'em",
168
+ :stakes_type => "10".to_d,
169
+ :limit_type => "Pot Limit"
170
+ )
171
+ @parser.parse(@pot_limit_tournament_header)
172
+ end
173
+
174
+ it "should recognize a freeroll tournament hand history" do
175
+ @stats.should_receive(:update_hand).with(
176
+ :name => "PS24703545200",
177
+ :description => "137653257, Freeroll Hold'em No Limit",
178
+ :ante => "0.0".to_d,
179
+ :table_name => "",
180
+ :max_players => 0,
181
+ :number_players => 0,
182
+ :sb => "10".to_d,
183
+ :bb => "20".to_d,
184
+ :played_at => DateTime.parse("Sun, 08 Feb 2009 00:24:12 +0000"),
185
+ :tournament => "137653257",
186
+ :street => :prelude,
187
+ :board => "",
188
+ :game_type => "Hold'em",
189
+ :stakes_type => "0".to_d,
190
+ :limit_type => "No Limit"
191
+ )
192
+ @parser.parse(@freeroll_tournament_header)
193
+ end
140
194
 
141
- it "should recognize a freeroll tournament hand history" do
142
- @stats.should_receive(:update_hand).with(
143
- :name => "PS27572086902",
144
- :description => "158153393, 5125FPP Hold'em No Limit",
145
- :ante => "0.0".to_d,
146
- :table_name => "",
147
- :max_players => 0,
148
- :number_players => 0,
149
- :sb => "10".to_d,
150
- :bb => "20".to_d,
151
- :played_at => DateTime.parse("2009/04/27 22:19:46 EDT"),
152
- :tournament => "158153393",
153
- :street => :prelude,
154
- :board => "",
155
- :game_type => "Hold'em",
156
- :stakes_type => "0".to_d,
157
- :limit_type => "No Limit"
158
- )
159
- @parser.parse("PokerStars Game #27572086902: Tournament #158153393, 5125FPP Hold'em No Limit - Level I (10/20) - 2009/04/27 22:19:46 ET")
160
- end
195
+ it "should recognize a tournament hand history paid for with FPP" do
196
+ @stats.should_receive(:update_hand).with(
197
+ :name => "PS27572086902",
198
+ :description => "158153393, 5125FPP Hold'em No Limit",
199
+ :ante => "0.0".to_d,
200
+ :table_name => "",
201
+ :max_players => 0,
202
+ :number_players => 0,
203
+ :sb => "10".to_d,
204
+ :bb => "20".to_d,
205
+ :played_at => DateTime.parse("2009/04/27 22:19:46 EDT"),
206
+ :tournament => "158153393",
207
+ :street => :prelude,
208
+ :board => "",
209
+ :game_type => "Hold'em",
210
+ :stakes_type => "0".to_d,
211
+ :limit_type => "No Limit"
212
+ )
213
+ @parser.parse(@fpp_tournament_header)
214
+ end
161
215
 
162
- it "should recognize a tournament header" do
163
- PokerstarsHandHistoryParser.should have_valid_header("PokerStars Game #21650436825: Tournament #117620218, $10+$1 Hold'em No Limit - Level I (10/20) - 2008/10/31 17:25:42 ET\nsnuggles\n")
216
+ it "should recognize a tournament header" do
217
+ @valid_tournament_headers.each do |header|
218
+ PokerstarsHandHistoryParser.should have_valid_header(header)
219
+ end
220
+ PokerstarsHandHistoryParser.should have_valid_header("PokerStars Game #21650436825: Tournament #117620218, $10+$1 Hold'em No Limit - Level I (10/20) - 2008/10/31 17:25:42 ET\nsnuggles\n")
221
+ end
164
222
  end
165
223
 
166
- it "should parse a cash game header" do
167
- @stats.should_receive(:update_hand).with(
168
- :name => 'PS21650146783',
169
- :description => "Hold'em No Limit ($0.25/$0.50)",
170
- :ante => "0.00".to_d,
171
- :table_name => "",
172
- :max_players => 0,
173
- :number_players => 0,
174
- :sb => "0.25".to_d,
175
- :bb => "0.50".to_d,
176
- :played_at => DateTime.parse("2008/10/31 17:14:44 EDT"),
177
- :tournament => nil,
178
- :street => :prelude,
179
- :board => "", # due to pokerstars hand history bug
180
- :game_type => "Hold'em",
181
- :stakes_type => "0.5".to_d,
182
- :limit_type => "No Limit"
183
- )
184
- @parser.parse("PokerStars Game #21650146783: Hold'em No Limit ($0.25/$0.50) - 2008/10/31 17:14:44 ET")
185
- end
224
+ context "for cash games" do
225
+ before(:each) do
226
+ @valid_cash_game_headers = [
227
+ @no_limit_cash_game_header = "PokerStars Game #21650146783: Hold'em No Limit ($0.25/$0.50) - 2008/10/31 17:14:44 ET",
228
+ @pot_limit_cash_game_header = "PokerStars Game #21650146783: Hold'em Pot Limit ($0.25/$0.50) - 2008/10/31 17:14:44 ET",
229
+ @limit_cash_game_header = "PokerStars Game #21650146783: Hold'em Limit ($0.25/$0.50) - 2008/10/31 17:14:44 ET"
230
+ ]
231
+ end
186
232
 
187
- it "should recognize a cash game header" do
188
- PokerstarsHandHistoryParser.should have_valid_header("PokerStars Game #21650146783: Hold'em No Limit ($0.25/$0.50) - 2008/10/31 17:14:44 ET\nsnuggles\n")
189
- end
233
+ it "should parse a cash game no limit header" do
234
+ @stats.should_receive(:update_hand).with(
235
+ :name => 'PS21650146783',
236
+ :description => "Hold'em No Limit ($0.25/$0.50)",
237
+ :ante => "0.00".to_d,
238
+ :table_name => "",
239
+ :max_players => 0,
240
+ :number_players => 0,
241
+ :sb => "0.25".to_d,
242
+ :bb => "0.50".to_d,
243
+ :played_at => DateTime.parse("2008/10/31 17:14:44 EDT"),
244
+ :tournament => nil,
245
+ :street => :prelude,
246
+ :board => "", # due to pokerstars hand history bug
247
+ :game_type => "Hold'em",
248
+ :stakes_type => "0.5".to_d,
249
+ :limit_type => "No Limit"
250
+ )
251
+ @parser.parse(@no_limit_cash_game_header)
252
+ end
253
+
254
+ it "should recognize cash game pot limit header" do
255
+ @stats.should_receive(:update_hand).with(
256
+ :name => 'PS21650146783',
257
+ :description => "Hold'em Pot Limit ($0.25/$0.50)",
258
+ :ante => "0.00".to_d,
259
+ :table_name => "",
260
+ :max_players => 0,
261
+ :number_players => 0,
262
+ :sb => "0.25".to_d,
263
+ :bb => "0.50".to_d,
264
+ :played_at => DateTime.parse("2008/10/31 17:14:44 EDT"),
265
+ :tournament => nil,
266
+ :street => :prelude,
267
+ :board => "", # due to pokerstars hand history bug
268
+ :game_type => "Hold'em",
269
+ :stakes_type => "0.5".to_d,
270
+ :limit_type => "Pot Limit"
271
+ )
272
+ @parser.parse(@pot_limit_cash_game_header)
273
+ end
274
+
275
+ it "should recognize cash game limit header" do
276
+ @stats.should_receive(:update_hand).with(
277
+ :name => 'PS21650146783',
278
+ :description => "Hold'em Limit ($0.25/$0.50)",
279
+ :ante => "0.00".to_d,
280
+ :table_name => "",
281
+ :max_players => 0,
282
+ :number_players => 0,
283
+ :sb => "0.25".to_d,
284
+ :bb => "0.50".to_d,
285
+ :played_at => DateTime.parse("2008/10/31 17:14:44 EDT"),
286
+ :tournament => nil,
287
+ :street => :prelude,
288
+ :board => "", # due to pokerstars hand history bug
289
+ :game_type => "Hold'em",
290
+ :stakes_type => "0.5".to_d,
291
+ :limit_type => "Limit"
292
+ )
293
+ @parser.parse(@limit_cash_game_header)
294
+ end
295
+
296
+ it "should recognize all cash game headers" do
297
+ @valid_cash_game_headers.each do |header|
298
+ PokerstarsHandHistoryParser.should have_valid_header(header)
299
+ end
300
+ end
190
301
 
191
- it "should not recognize an invalid header" do
192
- PokerstarsHandHistoryParser.should_not have_valid_header("I will love you to the end of the earth\nNow and Forever\nEver Always,\nYour Andrew")
302
+ it "should not recognize an invalid header" do
303
+ PokerstarsHandHistoryParser.should_not have_valid_header("I will love you to the end of the earth\nNow and Forever\nEver Always,\nYour Andrew")
304
+ end
193
305
  end
194
306
 
195
307
  it "should parse a hole card header" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pokerstats
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.17
4
+ version: 2.0.18
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-11-21 00:00:00 -08:00
12
+ date: 2009-11-23 00:00:00 -08:00
13
13
  default_executable: checkps
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency