golfscrape 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/golfscrape/client.rb +9 -3
- data/lib/golfscrape/version.rb +1 -1
- metadata +4 -4
data/lib/golfscrape/client.rb
CHANGED
@@ -17,9 +17,15 @@ module Golfscrape
|
|
17
17
|
@third = player.css('td')[4].children.last.content.gsub("\n", "")
|
18
18
|
@fourth = player.css('td')[5].children.last.content.gsub("\n", "")
|
19
19
|
@today = player.css('td')[6].children.last.content.gsub("\n", "")
|
20
|
-
@thru = player.css('td')[7].children.last.content.gsub("\n", "")
|
21
|
-
@total = player.css('td')
|
22
|
-
|
20
|
+
@thru = player.css('td')[7].children.last.content.gsub("\n", "") unless player.css('td')[7].attributes["class"].value.match(/total/)
|
21
|
+
@total = player.css('td.total').children.last.content.gsub("\n", "")
|
22
|
+
|
23
|
+
if player.css('td.earnings')
|
24
|
+
@strokes = player.css('td')[8].children.last.content.gsub("\n", "")
|
25
|
+
else
|
26
|
+
@strokes = player.css('td')[9].children.last.content.gsub("\n", "")
|
27
|
+
end
|
28
|
+
|
23
29
|
rescue
|
24
30
|
end
|
25
31
|
|
data/lib/golfscrape/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: golfscrape
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Johnny Khai Nguyen
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-07-
|
18
|
+
date: 2011-07-17 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|