snowreports 0.5.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d38a4371bf59ac3bf908a3f2c47b15046052ed0302018f48993489e3daf4b107
4
- data.tar.gz: 6c3b5c50ad4a538a588051b258225d7a23040dc3d4fb84d9b0e0e12a204ef434
3
+ metadata.gz: c113da4f4f221d6b60ed1572c2bd37f6e010974caa24b058a2d25df735bd66b9
4
+ data.tar.gz: a25ed256c09657aa98080aafccc7b9ee2ba775aaf01110ad624667e331fc7c37
5
5
  SHA512:
6
- metadata.gz: 4cfe2f27ad3036f41c4b2f107e3698a5a6e3d8f3b2ceb54c1c00ec3c4959ece7d679fb48518b3c004ed1d1a09a8d920d8c91519ce0b0b459af81e3d7b8638983
7
- data.tar.gz: 12be010d5243912bffde9ff432ff06a2584a7bf6d3c30e5a391239dbfee53fdab8c6b08066a55552f2398c2e2a93e7fa2290d1223796deff6d17c96bf792bb1c
6
+ metadata.gz: 0ae49881be86362d0faddeb2f49dff1e866471df0b1c45aef23263361c4ded2f76617c7091f14071b6a4ddd8f45166c2f28213830f4c6af05b8ae92dbe53983a
7
+ data.tar.gz: 305dbca983867230ae626dfd7fc4b12bea8a560edca39f317e36406169231427747580152fa0cd279bb2feeca197fb9b52b39968d90687af0d3fecbd8e5340c6
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
 
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
+ snowreports*.gem
@@ -14,7 +14,7 @@ module Snowreports
14
14
  snowreports_field_id = parsed.xpath("//skiarea/id").text
15
15
  snowreports_field_name = parsed.xpath("//skiarea/name").text
16
16
  information = parsed.xpath("//information").text
17
- snow_min = parsed.xpath("//snow/mindepth").text
17
+ snow_min = parsed.xpath("//snow/mindepth").text || parsed.xpath("//fields/field[@name='snow-base-lower']").text
18
18
  snow_base = parsed.xpath("//snow/base").text
19
19
  mountain_status = parsed.xpath("//skiarea/status/label").text
20
20
 
@@ -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
@@ -17,6 +17,11 @@ module Snowreports
17
17
  :snow_base,
18
18
  :snow_min,
19
19
  :information,
20
- :field_id
20
+ :field_id,
21
+ :raw_data,
22
+ :mountain_info,
23
+ :snow_comment,
24
+ :weather_comment,
25
+ :last_snowfall_amount
21
26
  )
22
27
  end
@@ -1,3 +1,3 @@
1
1
  module Snowreports
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.1"
3
3
  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.5.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Davey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-07 00:00:00.000000000 Z
11
+ date: 2024-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  requirements: []
139
- rubygems_version: 3.2.22
139
+ rubygems_version: 3.2.33
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: Fetches and parses reports from snowreports.co.nz