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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 634127411bf1043e3037679e77220ba9568891bf023f1575f539c99400416932
4
- data.tar.gz: d398be1d57d6b7a80dc7452f8cfc7b5ea2cac78ffe419823a783b8786eede3f3
3
+ metadata.gz: b8dc208bf375514e2fffab43b1962eacf2e19ad625e653355fc3cf8f3bfa4f76
4
+ data.tar.gz: 71563843cf0d1e531075f7479525368edac19dbc4aba25cc0509423938f5bfb4
5
5
  SHA512:
6
- metadata.gz: 31f24110c6154116043ef79befad447b4d2631f254317bee059c629f6f091d6d9349d78006ba4a22c166152d84dc5b7464d9ee5fec0a0b73e2e1d2ee44ba50e3
7
- data.tar.gz: 480eebede7384849cc0aba4e8fc8a76c3bc402d7f0d545bb903c4d2851e7e841312a266803d04bd507e6ce22780407d708c1e34fdb4c6a7b2c812286299f277a
6
+ metadata.gz: f28309e0d978eab7260f0ee155e4f845248c3a7d999455b4fe9c842ed17a4fad16e3f9f8f2da2564242a9d6c62072c0518519b807ecc13d890735a612ff873ce
7
+ data.tar.gz: 01eddc50ab9c859da347e79dd90e213912023a9e827fec8eb8470a18c43d715bc1be00c27f0c37529b0ba8aeddcd4c11e45c240ad1ee8e561734ecf31182a771
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ .env
@@ -1,4 +1,6 @@
1
1
  example_id | status | run_time |
2
2
  -------------------------------------------- | ------ | --------------- |
3
- ./spec/aralyne_owm/forecast_spec.rb[1:1:1:1] | passed | 0.00941 seconds |
4
- ./spec/aralyne_owm/forecast_spec.rb[1:1:2:1] | passed | 0.00421 seconds |
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 |
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aralyne_owm (0.1.0)
4
+ aralyne_owm (0.1.5)
5
5
  httparty (>= 0.18.1)
6
6
  json (>= 1)
7
7
  pry (>= 0.13.1)
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative "aralyne_owm/version"
4
4
  require "aralyne_owm/forecast"
5
+ require "aralyne_owm/current"
5
6
 
6
7
  module AralyneOwm
7
8
  class Error < StandardError; end
@@ -1,8 +1,8 @@
1
1
  require 'httparty'
2
2
 
3
3
  class AralyneOwm::Config
4
- def initialize(city_id, endpoint)
5
- @api_key = 'e88c1515be1de476a1469d4bdb9cb1eb'
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
@@ -1,9 +1,10 @@
1
1
  require "aralyne_owm/config"
2
2
 
3
3
  class AralyneOwm::Forecast
4
- def initialize(params)
5
- @params = params
6
- @api = AralyneOwm::Config.new(city_id, endpoint).call
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AralyneOwm
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.6"
5
5
  end
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.0
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-07 00:00:00.000000000 Z
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