lakes 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lakes.gemspec +4 -4
- data/lib/lakes.rb +1 -1
- data/lib/lakes/texas.rb +3 -3
- data/lib/lakes/texas/water_data_parser.rb +2 -1
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f597194858084bb20304f2bd2c5b341d0dbd2449
|
4
|
+
data.tar.gz: fff886dcc159996c8d035fd959e418196dc5ec20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e219445907985cfbe3942e33d5ab58f221bd8ac2cc84d7b112804a0e3d2fdebffd647e94d5d619897542ce21e58961f6fca790e58f59ed38dd1f4df2ff89b599
|
7
|
+
data.tar.gz: a674b853d26daa5bbe0248ab4eac73e8db80f4356ea734d7fcd002a7bbc32aed247ca9b42302439c0bd412f5155d91573b6bf3ba784938b27310fb5b4acfdb55
|
data/lakes.gemspec
CHANGED
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.
|
22
|
-
spec.add_development_dependency "rake", "~> 12.
|
23
|
-
spec.add_development_dependency "minitest", "~> 5.
|
24
|
-
spec.
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
22
|
+
spec.add_development_dependency "rake", "~> 12.3"
|
23
|
+
spec.add_development_dependency "minitest", "~> 5.11"
|
24
|
+
spec.add_dependency 'nokogiri', "~> 1.8"
|
25
25
|
end
|
data/lib/lakes.rb
CHANGED
data/lib/lakes/texas.rb
CHANGED
@@ -25,7 +25,7 @@ module Lakes
|
|
25
25
|
def list
|
26
26
|
return @lake_data.keys unless @lake_data.empty?
|
27
27
|
|
28
|
-
base_url = '
|
28
|
+
base_url = 'https://tpwd.texas.gov/fishboat/fish/recreational/lakes/'
|
29
29
|
content = http_get("#{base_url}lakelist.phtml")
|
30
30
|
html_doc = Nokogiri::HTML(content)
|
31
31
|
|
@@ -177,7 +177,7 @@ module Lakes
|
|
177
177
|
|
178
178
|
def parse_lake_surveys(main_div, lake_data)
|
179
179
|
link = main_div.xpath('p/a[contains(text(), "Latest Survey Report")]').first
|
180
|
-
|
180
|
+
if link.nil?
|
181
181
|
nil
|
182
182
|
else
|
183
183
|
uri = link['href']
|
@@ -187,7 +187,7 @@ module Lakes
|
|
187
187
|
|
188
188
|
def parse_stocking_history(main_div, lake_data)
|
189
189
|
link = main_div.xpath('p/a[contains(text(), "Stocking History")]').first
|
190
|
-
|
190
|
+
if link.nil?
|
191
191
|
nil
|
192
192
|
else
|
193
193
|
uri = link['href']
|
@@ -20,9 +20,10 @@ module Lakes
|
|
20
20
|
cons_pool_elevation_header_element = html_doc.xpath('//td[contains(text(), "Conservation pool elevation")]').first
|
21
21
|
cons_pool_elevation_root = cons_pool_elevation_header_element.try(:next_element)
|
22
22
|
@conservation_pool_elevation_in_ft_msl = cleanup_raw_text(cons_pool_elevation_root.try(:text))
|
23
|
-
.try(:match, /([0-9
|
23
|
+
.try(:match, /([0-9,\.]+)/)
|
24
24
|
.try(:captures)
|
25
25
|
.try(:first)
|
26
|
+
.try(:gsub, ',', '')
|
26
27
|
.try(:to_f)
|
27
28
|
|
28
29
|
percentage_full_element = cleanup_raw_text(html_doc.css('div.page-title h2 small').try(:text))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lakes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Sherman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,56 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.15'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.15'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '12.
|
33
|
+
version: '12.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '12.
|
40
|
+
version: '12.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '5.
|
47
|
+
version: '5.11'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '5.
|
54
|
+
version: '5.11'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: nokogiri
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
62
|
-
type: :
|
61
|
+
version: '1.8'
|
62
|
+
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.8'
|
69
69
|
description: I wrote this gem to originally parse texas lake data
|
70
70
|
email:
|
71
71
|
- shane.sherman@gmail.com
|
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.6.
|
113
|
+
rubygems_version: 2.6.13
|
114
114
|
signing_key:
|
115
115
|
specification_version: 4
|
116
116
|
summary: This gem parses lake details from various government websites
|