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 +4 -4
- data/README.md +3 -3
- data/lib/snotel.rb +6 -1
- data/lib/snotel/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: 93b31e9e02af13f4e7154730c94cdd8752185c44
|
4
|
+
data.tar.gz: bdf7def9ea79fc3cfe9b03cb74046faf2e08928b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
41
|
+
Snotel.hourly(:lookout) # => [ ... ]
|
42
42
|
|
43
43
|
# Get the last 72 hours
|
44
|
-
Snotel.
|
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/
|
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`)
|
data/lib/snotel.rb
CHANGED
@@ -39,7 +39,12 @@ module Snotel
|
|
39
39
|
|
40
40
|
lines = CSV.parse(remove_comments(json))
|
41
41
|
|
42
|
-
|
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
|
|
data/lib/snotel/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|