snowreports 0.4.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/snowreports/builder.rb +5 -0
- data/lib/snowreports/fetcher.rb +1 -1
- data/lib/snowreports/snowreport.rb +6 -1
- data/lib/snowreports/version.rb +1 -1
- data/snowreports.gemspec +4 -4
- metadata +15 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 161d3d4e6cd4f1b7316045f17a8b2f9a80f608a50dce5791b18187e6f16a81b4
|
4
|
+
data.tar.gz: edcb5767ef7d39d24a3feda491588bd7d5d6772f43b194ba5ed6dd050b072301
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '091774a074dc2abc4f6e76c923c1498aacbdc458bd3e70436f2023a5f7415a3ff4412459e378904cadd00a7c8968eba8b99f6e73460c3fcea3f8bf2e436fc98c'
|
7
|
+
data.tar.gz: 5de91c3a4802288ad0bf768c15740d5f7ce8ae4998d15fab2d6833903556915797dc89665b736dd6ee339766aaef2ed82cc06d878fe9ecd4e624d3d6b996ae1e
|
data/README.md
CHANGED
@@ -26,6 +26,6 @@ Snowreports.fetch(:turoa)
|
|
26
26
|
|
27
27
|
```
|
28
28
|
|
29
|
-
See [endpoints class](https://github.com/snowpool/snowreports/blob/
|
29
|
+
See [endpoints class](https://github.com/snowpool/snowreports/blob/master/lib/snowreports/endpoint.rb) for the various field names you can pass in.
|
30
30
|
|
31
31
|
PR's welcome.
|
data/lib/snowreports/builder.rb
CHANGED
@@ -34,8 +34,13 @@ module Snowreports
|
|
34
34
|
snow_min: snow_min,
|
35
35
|
snow_base: snow_base,
|
36
36
|
information: information,
|
37
|
+
mountain_info: parsed.at_xpath("//field[@name='mountain-info']")&.content,
|
38
|
+
snow_comment: parsed.at_xpath("//field[@name='snow-comment']")&.content,
|
39
|
+
weather_comment: parsed.at_xpath("//field[@name='weather-comment']")&.content,
|
40
|
+
last_snowfall_amount: parsed.at_xpath("//field[@name='last-snowfall-amount']")&.content,
|
37
41
|
field_id: field_id,
|
38
42
|
mountain_status: mountain_status,
|
43
|
+
raw_data: parsed
|
39
44
|
)
|
40
45
|
end
|
41
46
|
end
|
data/lib/snowreports/fetcher.rb
CHANGED
data/lib/snowreports/version.rb
CHANGED
data/snowreports.gemspec
CHANGED
@@ -21,12 +21,12 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.add_runtime_dependency "faraday", "~> 0
|
24
|
+
spec.add_runtime_dependency "faraday", "~> 2.0"
|
25
25
|
spec.add_runtime_dependency "nokogiri", "~> 1.8"
|
26
26
|
|
27
27
|
|
28
|
-
spec.add_development_dependency "bundler", "~>
|
29
|
-
spec.add_development_dependency "rake"
|
28
|
+
spec.add_development_dependency "bundler", "~> 2"
|
29
|
+
spec.add_development_dependency "rake"
|
30
30
|
spec.add_development_dependency "rspec", "~> 3.0"
|
31
|
-
spec.add_development_dependency "pry"
|
31
|
+
spec.add_development_dependency "pry"
|
32
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snowreports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Davey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
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: 0
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,28 +44,28 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2'
|
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: '
|
54
|
+
version: '2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
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: '
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,16 +84,16 @@ dependencies:
|
|
84
84
|
name: pry
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0
|
89
|
+
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0
|
96
|
+
version: '0'
|
97
97
|
description: Fetches are parses reports from snowreports.co.nz
|
98
98
|
email:
|
99
99
|
- patrick.davey@gmail.com
|
@@ -136,8 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
- !ruby/object:Gem::Version
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
|
-
|
140
|
-
rubygems_version: 2.7.9
|
139
|
+
rubygems_version: 3.2.33
|
141
140
|
signing_key:
|
142
141
|
specification_version: 4
|
143
142
|
summary: Fetches and parses reports from snowreports.co.nz
|