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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 278606379eb08260bcd0b038d9c25e8269b81974
4
- data.tar.gz: e809a81d2ab4e10ce130f626f97f3d204f323bcb
3
+ metadata.gz: 5597d78fa89ff21aa3906b0a8fb777d15f07b9ac
4
+ data.tar.gz: 8b428b5ed3157e00eb9c61f5608d075ae0c9af7c
5
5
  SHA512:
6
- metadata.gz: 4ac97b64a4cfdab6e68bbc7d87cead42e0111d7a58da37e26be3a444000a50a0c0ab8fe1d4362cad8718eedd003dd366477562b457f79e22d2ce131fd7ba833b
7
- data.tar.gz: 9638574d7ea61c9f59395a94fdfc21e2796e3d4ae7966f191074c82ddc3466eae2675940aefec339c8c5b062f419f53346e174429cd1fa7d192667a3f1cfd8ee
6
+ metadata.gz: 77cbc9b850e8c4a83ddc86c6f7f07a97b41cf6f37881ab126002b7fd1edf0f1fb7af0b677b2ed6df48dd6ad712e44c5b9cc7fdbb47f8aa2012036417bce360ad
7
+ data.tar.gz: 2d50ff271c6344661a951a9899e59cd02a87c897e0ed8e532590362223fdca833afd806973531f0f9961feb30e9842bacf897d2192b71300eeff37bdaabca116
data/README.md CHANGED
@@ -1,39 +1,31 @@
1
1
  # Snowreports
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/snowreports`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'snowreports'
13
- ```
14
-
15
- And then execute:
8
+ ## Usage
16
9
 
17
- $ bundle
10
+ 1. obtain api credentials from snowhq
18
11
 
19
- Or install it yourself as:
12
+ ```ruby
20
13
 
21
- $ gem install snowreports
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
- ## Usage
18
+ # or, ENV["SNOW_USER"] and ENV["SNOW_PASS"] can be used.
24
19
 
25
- TODO: Write usage instructions here
26
20
 
27
- ## Development
21
+ Snowreports.all
28
22
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
23
+ #or
30
24
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
25
+ Snowreports.fetch(:turoa)
32
26
 
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/snowreports.
27
+ ```
36
28
 
37
- ## License
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
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
31
+ PR's welcome.
@@ -4,7 +4,7 @@ module Snowreports
4
4
 
5
5
  def self.all
6
6
  @all ||= {
7
- turoa: SnowpoolWrapper.new(24, "/nz/mt-ruapehu-and-manganui/turoa/turoa-snow-report"),
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"),
@@ -1,3 +1,3 @@
1
1
  module Snowreports
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
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.1.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-22 00:00:00.000000000 Z
11
+ date: 2017-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday