tomorrowio_rb 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/lib/configuration.rb +27 -0
- data/lib/tomorrowio_rb.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a91cddf8a66a8d63b37ad6a199c2d494755b05c85640e3c34e79739f3469208
|
4
|
+
data.tar.gz: 6f50f4ede3d86a55381db2974efe64c40ae7dd8444779bcf4538c92e7e4e7a55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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.
|
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:
|