pokerstats 2.0.6 → 2.0.7
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.
|
1
|
+
2.0.7
|
@@ -18,7 +18,7 @@ module Pokerstats
|
|
18
18
|
|
19
19
|
def self.game(lines)
|
20
20
|
lines.lstrip!
|
21
|
-
case lines.
|
21
|
+
case lines.[/[^[\n]+/].chomp
|
22
22
|
when /PokerStars Game #([0-9]+): Tournament #([0-9]+), (\$[0-9+$]+) ([^\-]*) - Level ([IVXL]+) \((#{CASH})\/(#{CASH})\) - (.*)$/
|
23
23
|
"PS#{$1}"
|
24
24
|
when /PokerStars Game #([0-9]+): +([^(]*) \((#{CASH})\/(#{CASH})\) - (.*)$/
|
data/pokerstats.gemspec
CHANGED
@@ -49,7 +49,7 @@ describe PokerstarsFile, "when opened on a single-hand file" do
|
|
49
49
|
it "should have an entry, answering to entries, having the correct lines" do
|
50
50
|
@entry = @psfile.entries.first
|
51
51
|
@entry.should have(ONE_HAND_ENTRY_NUMBER_OF_LINES).lines
|
52
|
-
@entry.
|
52
|
+
@entry.[/[^[\n]+/].should == ONE_HAND_ENTRY_FIRST_LINE
|
53
53
|
@entry.lines.last.should == ONE_HAND_ENTRY_LAST_LINE
|
54
54
|
end
|
55
55
|
|
@@ -127,7 +127,7 @@ describe PokerstarsFile, "when opened on a multi-hand file" do
|
|
127
127
|
@psfile.entries #run through the file to see if it resets properly
|
128
128
|
@entry = @psfile.first(TABLE_OF_STARTING_INDICES.first)
|
129
129
|
@entry.should have(FIRST_ENTRY_NUMBER_OF_LINES).lines
|
130
|
-
@entry.
|
130
|
+
@entry.[/[^[\n]+/].should == FIRST_ENTRY_FIRST_LINE
|
131
131
|
@entry.lines.last.should == FIRST_ENTRY_LAST_LINE
|
132
132
|
@psfile.should be_closed
|
133
133
|
end
|
@@ -135,21 +135,21 @@ describe PokerstarsFile, "when opened on a multi-hand file" do
|
|
135
135
|
it "should have a first entry having the correct lines, addresable through #entries" do
|
136
136
|
@entries = @psfile.entries.first
|
137
137
|
@entries.should have(FIRST_ENTRY_NUMBER_OF_LINES).lines
|
138
|
-
@entries.
|
138
|
+
@entries.[/[^[\n]+/].should == FIRST_ENTRY_FIRST_LINE
|
139
139
|
@entries.lines.last.should == FIRST_ENTRY_LAST_LINE
|
140
140
|
end
|
141
141
|
|
142
142
|
it "should have a last entry having the correct lines, addressable through #first" do
|
143
143
|
@entry = @psfile.first(TABLE_OF_STARTING_INDICES.last)
|
144
144
|
@entry.should have(LAST_ENTRY_NUMBER_OF_LINES).lines
|
145
|
-
@entry.
|
145
|
+
@entry.[/[^[\n]+/].should == LAST_ENTRY_FIRST_LINE
|
146
146
|
@entry.lines.last.should == LAST_ENTRY_LAST_LINE
|
147
147
|
end
|
148
148
|
|
149
149
|
it "should have a last entry having the correct lines, addressable through #entries" do
|
150
150
|
@entries = @psfile.entries.last
|
151
151
|
@entries.should have(LAST_ENTRY_NUMBER_OF_LINES).lines
|
152
|
-
@entries.
|
152
|
+
@entries.[/[^[\n]+/].should == LAST_ENTRY_FIRST_LINE
|
153
153
|
@entries.lines.last.should == LAST_ENTRY_LAST_LINE
|
154
154
|
end
|
155
155
|
|
@@ -54,7 +54,7 @@ end
|
|
54
54
|
# @psfile = PokerstarsFile.open(filename).entries.each do |handrecord|
|
55
55
|
# @stats = HandStatistics.new
|
56
56
|
# @parser = PokerstarsHandHistoryParser.new(@stats)
|
57
|
-
# # puts handrecord.
|
57
|
+
# # puts handrecord.[/[^[\n]+/]
|
58
58
|
# printf(".")
|
59
59
|
# handrecord.lines.each do |line|
|
60
60
|
# lambda{@parser.parse(line)}.should_not raise_error
|