SnowWeather 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ec0fa80b59a7bd392d0b11f583921a7fd451dcf
4
- data.tar.gz: 66a7766529d4cffc65b4770e913c58d430d4752a
3
+ metadata.gz: 7af7d63025c85c0e5381ffb332f544ee480abc04
4
+ data.tar.gz: 0f0d79d4b7a3d46f3b6ca56b00aa084ef7c294a1
5
5
  SHA512:
6
- metadata.gz: 39577de59eb60118cc5a6d04995411e3429ba34c366d14775db298cf6e170def23b1f54bd007a1a1b1f760ecb08f12d28357e80fe8bd6179037b8c7d542c2179
7
- data.tar.gz: 58cb08e0c6a7a819a9ffa26a54434a4d476b3b6c8e9751b95c8b7e6239f379b38b34d5362838fe23b1785553758e73c4db4d96c318531abbc84be6956ff5ccf9
6
+ metadata.gz: 930b6bc237ff47543de79419b65ca13866a8ca4f778c5acc85b53dd2b9f5e04ac3cd8ed2f609a77b159feb1833056f1c8bc5016f445c059c3f98eba4ee4359c7
7
+ data.tar.gz: 564f59aca5790cb1dc5a07a3a8ce89333e1d052758e8ba70aeec8aaa4338d08dd013bef19428b74931439ef818b5af886402f1b32ea5647c076d870e78174537
data/README.md CHANGED
@@ -29,10 +29,10 @@ Or install it yourself as:
29
29
  ## Usage
30
30
 
31
31
 
32
- Set the api_key whithin in a model or controller
32
+ Install the configuration file please change the api key to your api key from Weather Underground.
33
33
 
34
34
  ```ruby
35
- SnowWeather.api_key(<'123456789123456789'>)
35
+ rails g snow_weather:config
36
36
  ```
37
37
 
38
38
 
@@ -0,0 +1,75 @@
1
+ # SnowWeather
2
+
3
+ SnowWeather is a simple Gem to interface with Weather Undergounds API
4
+
5
+ ## Gem Status
6
+ <a href="https://travis-ci.org/Jrsnow8921"><img src="https://travis-ci.org/Jrsnow8921/SnowWeatherGem.svg?branch=master" height="18"></a>
7
+
8
+ ## Travis CI Build Status
9
+
10
+ <a href="
11
+ https://travis-ci.org/Jrsnow8921/SnowWeatherGem.svg?branch=master
12
+
13
+ ## Installation
14
+
15
+ Add this line to your application's Gemfile:
16
+
17
+ ```ruby
18
+ gem 'SnowWeather'
19
+ ```
20
+
21
+ And then execute:
22
+
23
+ $ bundle
24
+
25
+ Or install it yourself as:
26
+
27
+ $ gem install SnowWeather
28
+
29
+ ## Usage
30
+
31
+
32
+ Set the api_key whithin in a model or controller
33
+
34
+ ```ruby
35
+ SnowWeather.api_key(<'123456789123456789'>)
36
+ ```
37
+
38
+
39
+ Get current conditions
40
+
41
+
42
+ ```ruby
43
+ SnowWeather::Conditions.getConditions(<'state'>, <'city'>)
44
+ ```
45
+
46
+ Example
47
+
48
+ ```ruby
49
+ SnowWeather.api_key(<'123456789123456789'>)
50
+
51
+ @data = SnowWeather::Conditions.getConditions('PA', 'Pittsburgh')
52
+ #gets the current temp in F
53
+ @temp = @data['current_observation']['temp_f']
54
+ #gets the current weather condition
55
+ @weather = @data['current_observation']['weather']
56
+
57
+ puts "The current weather is #{@weather} with a temperature of #{@temp}°F"
58
+
59
+
60
+ ```
61
+ Result
62
+
63
+ The current weather is cloudy with a temperature of 60°F
64
+
65
+
66
+ Data is returned in JSON format.
67
+
68
+
69
+ ## Contributing
70
+
71
+ 1. Fork it ( https://github.com/Jrsnow8921/SnowWeatherGem/fork )
72
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
73
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
74
+ 4. Push to the branch (`git push origin my-new-feature`)
75
+ 5. Create a new Pull Request
@@ -1,3 +1,3 @@
1
1
  module SnowWeather
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -0,0 +1,5 @@
1
+ Description:
2
+ Creates a config file for the SnowWeather gem with a key to access Weather Underground Api
3
+
4
+ Example:
5
+ rails g snow_weather:config
@@ -0,0 +1,13 @@
1
+ module SnowWeather
2
+ module Generators
3
+
4
+ class ConfigGenerator < ::Rails::Generators::Base
5
+ source_root File.expand_path('../templates', __FILE__)
6
+
7
+ def generate_config
8
+ template "config.rb.erb", "config/initializers/snow_weather.rb"
9
+ end
10
+ end
11
+ end
12
+ end
13
+
@@ -0,0 +1 @@
1
+ SnowWeather.api_key('your_api_key_goes_here')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SnowWeather
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Snow
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-02 00:00:00.000000000 Z
11
+ date: 2016-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,6 +108,7 @@ files:
108
108
  - Gemfile
109
109
  - LICENSE.txt
110
110
  - README.md
111
+ - README.md.save
111
112
  - Rakefile
112
113
  - SnowWeather.gemspec
113
114
  - bin/console
@@ -115,6 +116,9 @@ files:
115
116
  - lib/SnowWeather.rb
116
117
  - lib/SnowWeather/conditions.rb
117
118
  - lib/SnowWeather/version.rb
119
+ - lib/generators/snow_weather/config/USAGE
120
+ - lib/generators/snow_weather/config/config_generator.rb
121
+ - lib/generators/snow_weather/config/templates/config.rb.erb
118
122
  - t_build.sh
119
123
  homepage: https://github.com/Jrsnow8921/SnowWeatherGem.git
120
124
  licenses: