aralyne_owm 0.1.0 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rspec_status +4 -2
- data/Gemfile.lock +1 -1
- data/aralyne_owm-0.1.0.gem +0 -0
- data/aralyne_owm-0.1.1.gem +0 -0
- data/aralyne_owm-0.1.2.gem +0 -0
- data/aralyne_owm-0.1.3.gem +0 -0
- data/aralyne_owm-0.1.4.gem +0 -0
- data/lib/aralyne_owm.rb +1 -0
- data/lib/aralyne_owm/config.rb +2 -2
- data/lib/aralyne_owm/current.rb +19 -0
- data/lib/aralyne_owm/forecast.rb +4 -7
- data/lib/aralyne_owm/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8dc208bf375514e2fffab43b1962eacf2e19ad625e653355fc3cf8f3bfa4f76
|
4
|
+
data.tar.gz: 71563843cf0d1e531075f7479525368edac19dbc4aba25cc0509423938f5bfb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f28309e0d978eab7260f0ee155e4f845248c3a7d999455b4fe9c842ed17a4fad16e3f9f8f2da2564242a9d6c62072c0518519b807ecc13d890735a612ff873ce
|
7
|
+
data.tar.gz: 01eddc50ab9c859da347e79dd90e213912023a9e827fec8eb8470a18c43d715bc1be00c27f0c37529b0ba8aeddcd4c11e45c240ad1ee8e561734ecf31182a771
|
data/.gitignore
CHANGED
data/.rspec_status
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
example_id | status | run_time |
|
2
2
|
-------------------------------------------- | ------ | --------------- |
|
3
|
-
./spec/aralyne_owm/
|
4
|
-
./spec/aralyne_owm/
|
3
|
+
./spec/aralyne_owm/current_spec.rb[1:1:1:1] | passed | 0.0082 seconds |
|
4
|
+
./spec/aralyne_owm/current_spec.rb[1:1:2:1] | passed | 0.00463 seconds |
|
5
|
+
./spec/aralyne_owm/forecast_spec.rb[1:1:1:1] | passed | 0.00474 seconds |
|
6
|
+
./spec/aralyne_owm/forecast_spec.rb[1:1:2:1] | passed | 0.00759 seconds |
|
data/Gemfile.lock
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/aralyne_owm.rb
CHANGED
data/lib/aralyne_owm/config.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'httparty'
|
2
2
|
|
3
3
|
class AralyneOwm::Config
|
4
|
-
def initialize(city_id, endpoint)
|
5
|
-
@api_key =
|
4
|
+
def initialize(city_id, endpoint, api_key)
|
5
|
+
@api_key = api_key
|
6
6
|
@city_id = city_id
|
7
7
|
@endpoint = endpoint
|
8
8
|
@api_response = HTTParty.get(uri)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "aralyne_owm/config"
|
2
|
+
|
3
|
+
class AralyneOwm::Current
|
4
|
+
def initialize(city_id, api_key)
|
5
|
+
@city_id = city_id
|
6
|
+
@api_key = api_key
|
7
|
+
@api = AralyneOwm::Config.new(@city_id, endpoint, api_key).call
|
8
|
+
end
|
9
|
+
|
10
|
+
def call
|
11
|
+
@api
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def endpoint
|
17
|
+
'weather'
|
18
|
+
end
|
19
|
+
end
|
data/lib/aralyne_owm/forecast.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
require "aralyne_owm/config"
|
2
2
|
|
3
3
|
class AralyneOwm::Forecast
|
4
|
-
def initialize(
|
5
|
-
@
|
6
|
-
@
|
4
|
+
def initialize(city_id, api_key)
|
5
|
+
@city_id = city_id
|
6
|
+
@api_key = api_key
|
7
|
+
@api = AralyneOwm::Config.new(@city_id, endpoint, api_key).call
|
7
8
|
end
|
8
9
|
|
9
10
|
def call
|
@@ -15,8 +16,4 @@ class AralyneOwm::Forecast
|
|
15
16
|
def endpoint
|
16
17
|
'forecast'
|
17
18
|
end
|
18
|
-
|
19
|
-
def city_id
|
20
|
-
@params[:city_id]
|
21
|
-
end
|
22
19
|
end
|
data/lib/aralyne_owm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aralyne_owm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aralyne Gonçalves
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -137,11 +137,17 @@ files:
|
|
137
137
|
- Gemfile.lock
|
138
138
|
- README.md
|
139
139
|
- Rakefile
|
140
|
+
- aralyne_owm-0.1.0.gem
|
141
|
+
- aralyne_owm-0.1.1.gem
|
142
|
+
- aralyne_owm-0.1.2.gem
|
143
|
+
- aralyne_owm-0.1.3.gem
|
144
|
+
- aralyne_owm-0.1.4.gem
|
140
145
|
- aralyne_owm.gemspec
|
141
146
|
- bin/console
|
142
147
|
- bin/setup
|
143
148
|
- lib/aralyne_owm.rb
|
144
149
|
- lib/aralyne_owm/config.rb
|
150
|
+
- lib/aralyne_owm/current.rb
|
145
151
|
- lib/aralyne_owm/forecast.rb
|
146
152
|
- lib/aralyne_owm/version.rb
|
147
153
|
homepage: https://github.com/aralyne/aralyne_owm
|