lakes 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lakes.rb +1 -1
- data/lib/lakes/texas.rb +4 -6
- data/lib/lakes/texas/fishing_report_parser.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c93fdbed9e13716ece122e66258c8b39cb4c6c92
|
4
|
+
data.tar.gz: 105ecf2053e825ff3d012620754c0f1b509b62c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea80d45796d0b5d9f354798619278e8539b127fb405c4fe761eb0ea0cedd168ca40d72379a6b1ad3183a04193fa51308c87e2f3f1a3802525c6b8298277a0808
|
7
|
+
data.tar.gz: bf88e6243e61ff780820dfc8e094b5753c787ff570061b37a17a510d43238f6ea2f95bc2ccc529ecb21c1bd1e36b7733d8f55209f579d5540d7e86ee43a47ef7
|
data/lib/lakes.rb
CHANGED
data/lib/lakes/texas.rb
CHANGED
@@ -215,12 +215,10 @@ module Lakes
|
|
215
215
|
|
216
216
|
content = http_get(lake_data[:current_fishing_report_uri])
|
217
217
|
report_parser = FishingReportParser.new(content)
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
report = cleanup_data(current_fishing_report_dl.xpath('dd').text)
|
223
|
-
{date: date, report: report}
|
218
|
+
{
|
219
|
+
date: report_parser.date,
|
220
|
+
report: report_parser.report
|
221
|
+
}
|
224
222
|
end
|
225
223
|
|
226
224
|
lake_data[:current_fishing_report] = fishing_report
|
@@ -11,6 +11,9 @@ module Lakes
|
|
11
11
|
|
12
12
|
def initialize(text)
|
13
13
|
@raw_text = text
|
14
|
+
@raw_date = nil
|
15
|
+
@date = nil
|
16
|
+
@report = nil
|
14
17
|
parse
|
15
18
|
end
|
16
19
|
|
@@ -22,6 +25,8 @@ module Lakes
|
|
22
25
|
date_text = current_fishing_report_dl.at('dt span.title').try(:text)
|
23
26
|
@raw_date = cleanup_data(date_text) unless date_text.nil?
|
24
27
|
|
28
|
+
@date = Date.parse(@raw_date) rescue nil
|
29
|
+
|
25
30
|
report_text = current_fishing_report_dl.xpath('dd').try(:text)
|
26
31
|
@report = cleanup_data(report_text) unless report_text.nil?
|
27
32
|
end
|