tomorrowio_rb 0.0.1 → 0.0.2

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
  SHA256:
3
- metadata.gz: fb80619cdd8fb1802e47a1b94fc525c579b051a595ede4b7e33b5e297a4c6205
4
- data.tar.gz: 12395f9419111238bc4c1f796e43aa1482b7c54660aacc6db38d3dcbb127ecf5
3
+ metadata.gz: 4a91cddf8a66a8d63b37ad6a199c2d494755b05c85640e3c34e79739f3469208
4
+ data.tar.gz: 6f50f4ede3d86a55381db2974efe64c40ae7dd8444779bcf4538c92e7e4e7a55
5
5
  SHA512:
6
- metadata.gz: 3e926fa92dd16811df3303042b8428de341430a20848e7f0cccb70f981e339151181c51655474113e059bec32e69c82688f6fc7283bb3ed269cfbf8853425bde
7
- data.tar.gz: e8a3e47cc2107af05eb088f07e8b78cf9ed928f8f81314cd5427a58ae98c5a98317aa64f4774656293f1cfe2dd10537cd9741a176d4faac0a891580210ca8b26
6
+ metadata.gz: 00c66a047772b6db156be94bf549469172ae8f45e946725f8f2f87fece6d300ef587a71b2bec1fb3655ec024e5967825953b1ee236e1b4a418ae894f16f5c669
7
+ data.tar.gz: fb5a0a3f5ebc161b75ba10b867bc4db08510dc9a399758953a583c39988dcca7e5435f737c37dd45176d651fee65bb75a618a0b7c97a9b270628843a6291e70e
@@ -0,0 +1,27 @@
1
+ module Tomorrowiorb
2
+ module Configuration
3
+ DEFAULT_API_ENDPOINT = 'https://api.tomorrow.io/v4'
4
+
5
+ attr_writer :api_endpoint
6
+ attr_writer :api_key
7
+
8
+ # Yield self to be able to configure Tomorrowiorb with block-style configuration.
9
+ #
10
+ # Example:
11
+ #
12
+ # Tomorrowiorb.configure do |configuration|
13
+ # configuration.api_key = 'this-is-your-api-key'
14
+ # end
15
+ def configure
16
+ yield self
17
+ end
18
+
19
+ def api_endpoint
20
+ @api_endpoint ||= DEFAULT_API_ENDPOINT
21
+ end
22
+
23
+ def api_key
24
+ @api_key
25
+ end
26
+ end
27
+ end
data/lib/tomorrowio_rb.rb CHANGED
@@ -1,4 +1,4 @@
1
- require_relative 'configuration.rb'
1
+ require 'configuration.rb'
2
2
  require 'faraday'
3
3
  require 'json'
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tomorrowio_rb
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
  - Cedric Wille
@@ -17,6 +17,7 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - lib/configuration.rb
20
21
  - lib/tomorrowio_rb.rb
21
22
  homepage: https://github.com/cwille97/tomorrowio_rb
22
23
  licenses: