wizardwerdna-pokerstats 1.0.22 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2.0.0
|
@@ -12,7 +12,7 @@ module Pokerstats
|
|
12
12
|
|
13
13
|
def self.has_valid_header?(lines)
|
14
14
|
lines.lstrip!
|
15
|
-
case lines[/^[^\n\r]*/]
|
15
|
+
case lines[/^[^\n\r]*/]
|
16
16
|
when /PokerStars Game #([0-9]+): Tournament #([0-9]+), (\$[0-9+$]+) ([^\-]*) - Level ([IVXL]+) \((#{CASH})\/(#{CASH})\) - (.*)$/
|
17
17
|
true
|
18
18
|
when /PokerStars Game #([0-9]+): +([^(]*) \((#{CASH})\/(#{CASH})\) - (.*)$/
|
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 = "
|
8
|
+
s.version = "2.0.0"
|
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"]
|
@@ -52,7 +52,7 @@ Gem::Specification.new do |s|
|
|
52
52
|
"spec/hand_statistics_spec_helper.rb",
|
53
53
|
"spec/player_statistics_spec.rb",
|
54
54
|
"spec/pokerstars_file_spec.rb",
|
55
|
-
"spec/
|
55
|
+
"spec/pokerstars_hand_history_parser_spec.rb",
|
56
56
|
"spec/spec_helper.rb",
|
57
57
|
"spec/zpokerstars_hand_history_parser_integration.rb.txt"
|
58
58
|
]
|
@@ -66,7 +66,7 @@ Gem::Specification.new do |s|
|
|
66
66
|
"spec/hand_statistics_spec_helper.rb",
|
67
67
|
"spec/player_statistics_spec.rb",
|
68
68
|
"spec/pokerstars_file_spec.rb",
|
69
|
-
"spec/
|
69
|
+
"spec/pokerstars_hand_history_parser_spec.rb",
|
70
70
|
"spec/spec_helper.rb"
|
71
71
|
]
|
72
72
|
|
@@ -31,6 +31,10 @@ describe PokerstarsHandHistoryParser, "when parsing structural matter" do
|
|
31
31
|
puts @stats.report_hand_information
|
32
32
|
end
|
33
33
|
|
34
|
+
it "should recognize a tournament header" do
|
35
|
+
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")
|
36
|
+
end
|
37
|
+
|
34
38
|
it "should parse a cash game header" do
|
35
39
|
@stats.should_receive(:update_hand).with(
|
36
40
|
:name => 'PS21650146783',
|
@@ -44,6 +48,14 @@ describe PokerstarsHandHistoryParser, "when parsing structural matter" do
|
|
44
48
|
@parser.parse("PokerStars Game #21650146783: Hold'em No Limit ($0.25/$0.50) - 2008/10/31 17:14:44 ET")
|
45
49
|
end
|
46
50
|
|
51
|
+
it "should recognize a cash game header" do
|
52
|
+
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")
|
53
|
+
end
|
54
|
+
|
55
|
+
it "should not recognize an invalid header" do
|
56
|
+
PokerstarsHandHistoryParser.should_not have_valid_header("I will love you to the end of the earth\nNow and Forever\nEver Always,\nYour Andrew")
|
57
|
+
end
|
58
|
+
|
47
59
|
it "should parse a hole card header" do
|
48
60
|
@stats.should_receive(:update_hand).with(:street => :preflop)
|
49
61
|
@parser.parse("*** HOLE CARDS ***")
|
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew C. Greenberg
|
@@ -85,7 +85,7 @@ files:
|
|
85
85
|
- spec/hand_statistics_spec_helper.rb
|
86
86
|
- spec/player_statistics_spec.rb
|
87
87
|
- spec/pokerstars_file_spec.rb
|
88
|
-
- spec/
|
88
|
+
- spec/pokerstars_hand_history_parser_spec.rb
|
89
89
|
- spec/spec_helper.rb
|
90
90
|
- spec/zpokerstars_hand_history_parser_integration.rb.txt
|
91
91
|
has_rdoc: false
|
@@ -120,5 +120,5 @@ test_files:
|
|
120
120
|
- spec/hand_statistics_spec_helper.rb
|
121
121
|
- spec/player_statistics_spec.rb
|
122
122
|
- spec/pokerstars_file_spec.rb
|
123
|
-
- spec/
|
123
|
+
- spec/pokerstars_hand_history_parser_spec.rb
|
124
124
|
- spec/spec_helper.rb
|