snowreports 0.1.0 → 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/README.md +15 -23
- data/lib/snowreports/endpoint.rb +1 -1
- data/lib/snowreports/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5597d78fa89ff21aa3906b0a8fb777d15f07b9ac
|
4
|
+
data.tar.gz: 8b428b5ed3157e00eb9c61f5608d075ae0c9af7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77cbc9b850e8c4a83ddc86c6f7f07a97b41cf6f37881ab126002b7fd1edf0f1fb7af0b677b2ed6df48dd6ad712e44c5b9cc7fdbb47f8aa2012036417bce360ad
|
7
|
+
data.tar.gz: 2d50ff271c6344661a951a9899e59cd02a87c897e0ed8e532590362223fdca833afd806973531f0f9961feb30e9842bacf897d2192b71300eeff37bdaabca116
|
data/README.md
CHANGED
@@ -1,39 +1,31 @@
|
|
1
1
|
# Snowreports
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This gem is a simple wrapper around [snowhq](https://www.snowhq.com/) . It allows pulling in of the snow data and exposes just a few of the fields.
|
6
4
|
|
7
5
|
## Installation
|
6
|
+
gem install snowreports
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'snowreports'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
8
|
+
## Usage
|
16
9
|
|
17
|
-
|
10
|
+
1. obtain api credentials from snowhq
|
18
11
|
|
19
|
-
|
12
|
+
```ruby
|
20
13
|
|
21
|
-
|
14
|
+
# configure it. You can either set a username and password like below
|
15
|
+
Snowreports::Fetcher.user = username
|
16
|
+
Snowreports::Fetcher.pass = password
|
22
17
|
|
23
|
-
|
18
|
+
# or, ENV["SNOW_USER"] and ENV["SNOW_PASS"] can be used.
|
24
19
|
|
25
|
-
TODO: Write usage instructions here
|
26
20
|
|
27
|
-
|
21
|
+
Snowreports.all
|
28
22
|
|
29
|
-
|
23
|
+
#or
|
30
24
|
|
31
|
-
|
25
|
+
Snowreports.fetch(:turoa)
|
32
26
|
|
33
|
-
|
34
|
-
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/snowreports.
|
27
|
+
```
|
36
28
|
|
37
|
-
|
29
|
+
See [endpoints class](https://github.com/snowpool/snowreports/blob/f3a4787e816d5b6cf80adc0de0f8897d6cf62fdd/lib/snowreports/endpoint.rb#L7-L28) for the various field names you can pass in.
|
38
30
|
|
39
|
-
|
31
|
+
PR's welcome.
|
data/lib/snowreports/endpoint.rb
CHANGED
@@ -4,7 +4,7 @@ module Snowreports
|
|
4
4
|
|
5
5
|
def self.all
|
6
6
|
@all ||= {
|
7
|
-
turoa: SnowpoolWrapper.new(
|
7
|
+
turoa: SnowpoolWrapper.new(22, "/nz/mt-ruapehu-and-manganui/turoa/turoa-snow-report"),
|
8
8
|
whakapapa: SnowpoolWrapper.new(21, "/nz/mt-ruapehu-and-manganui/whakapapa/whakapapa-snow-report"),
|
9
9
|
cardrona: SnowpoolWrapper.new(15, "/nz/queenstown-and-wanaka/cardrona/cardrona-snow-report"),
|
10
10
|
treble_cone: SnowpoolWrapper.new(7, "/nz/queenstown-and-wanaka/treble-cone/treble-cone-snow-report"),
|
data/lib/snowreports/version.rb
CHANGED
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.2.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: 2017-07-
|
11
|
+
date: 2017-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|