snotel 0.0.1 → 0.0.2

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: 823cd513e41140e919dc3d39f61565eed0d83784
4
- data.tar.gz: 1df846adf245ac1e03de1d06c34081a71c3c9266
3
+ metadata.gz: 93b31e9e02af13f4e7154730c94cdd8752185c44
4
+ data.tar.gz: bdf7def9ea79fc3cfe9b03cb74046faf2e08928b
5
5
  SHA512:
6
- metadata.gz: b46326e8b1d72c4b93a4465ef5bb7d1d58d8f54fb256f081ca2a3435e97f8c658ef2d9228c4d7a8135db5ab7d8b86bb0c0d9abe631debd42949020526749a500
7
- data.tar.gz: 5f7590ad4ffc3c9b7f565e4a89ad8564f9d80c3615b3d33ca77e7ae0aef8f808ebc253040a7a7fdaa513a1aa5d3b3d7efc45fa55a3574c38aafbc8615f1d877b
6
+ metadata.gz: 8c76c2cd1c48f89a83856fd32b10af0d32209caac92c9b86d346f43183bed1e4e80179065b6ac741be7d0b6cf11702fc471a3d876a31d974066d2d2b16a7861b
7
+ data.tar.gz: db73e704258edfe485d28918b23503ef04f43be3d6d3823a040f7d20228fdf5873a074d055e5b105fa581893fcd33f6f4da2e63bb68f311340a6aa5f8095e20b
data/README.md CHANGED
@@ -38,10 +38,10 @@ Snotel.daily(:snowbird, 7) # => [ ... ]
38
38
 
39
39
  ```ruby
40
40
  # Get the last 24 hours
41
- Snotel.daily(:lookout) # => [ ... ]
41
+ Snotel.hourly(:lookout) # => [ ... ]
42
42
 
43
43
  # Get the last 72 hours
44
- Snotel.daily(:lookout, 72) # => [ ... ]
44
+ Snotel.hourly(:lookout, 72) # => [ ... ]
45
45
  ```
46
46
 
47
47
  ## Acknowledgements
@@ -51,7 +51,7 @@ This gem is essentially an abstraction of the awesome work done by the developer
51
51
 
52
52
  ## Contributing
53
53
 
54
- 1. Fork it ( https://github.com/[my-github-username]/snotel/fork )
54
+ 1. Fork it ( https://github.com/firstchair-io/snotel/fork )
55
55
  2. Create your feature branch (`git checkout -b my-new-feature`)
56
56
  3. Commit your changes (`git commit -am 'Add some feature'`)
57
57
  4. Push to the branch (`git push origin my-new-feature`)
@@ -39,7 +39,12 @@ module Snotel
39
39
 
40
40
  lines = CSV.parse(remove_comments(json))
41
41
 
42
- keys = lines.delete(lines.first).map do |key|
42
+ if lines.empty?
43
+ puts "WARNING: No data found for #{ triplet }."
44
+ return
45
+ end
46
+
47
+ keys = lines.delete(lines.first).map do |key|
43
48
  key.gsub(/[^0-9a-z ]+/i, '').gsub(/ /, '_').downcase.to_sym
44
49
  end
45
50
 
@@ -1,3 +1,3 @@
1
1
  module Snotel
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snotel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Otander
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-13 00:00:00.000000000 Z
11
+ date: 2014-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler