weathermatic 0.0.8 → 0.0.9
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 +4 -4
- data/lib/weathermatic.rb +8 -8
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf93a075a681d5047cd8dc084dd5d11fe9cc0537
|
|
4
|
+
data.tar.gz: ea9a69e2e2492ae082cdc57f138071121c8dee99
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6519e291089ea58aff6cd39b44300478bb19df2e5d8d9f59c6a5862d8e9001f91b34163175a0791ca6fe2cbf3eaf8026f1266bdf2c8b421373ad18a9e1a7d38b
|
|
7
|
+
data.tar.gz: a76f8e044f5bca697416e1f499c7f4056e862268a4c9305035bcb8fd980c4a71a662c949b262bf6484daf3932194576df55c4817d979c87b030d958d448ad972
|
data/lib/weathermatic.rb
CHANGED
|
@@ -12,8 +12,8 @@ class WeatherMatic
|
|
|
12
12
|
def initialize(args)
|
|
13
13
|
@username = args[:username]
|
|
14
14
|
@password = args[:password]
|
|
15
|
-
|
|
16
|
-
@base_uri = 'http://localhost:3000'
|
|
15
|
+
@base_uri = "https://my.smartlinknetwork.com"
|
|
16
|
+
# @base_uri = 'http://localhost:3000'
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
# All requests are essentially the same - the purpose of this note is really just to show the basic authorization header for reference
|
|
@@ -897,8 +897,8 @@ class WeatherMatic
|
|
|
897
897
|
# This is the generic request - it cannot be called directly
|
|
898
898
|
def make_request(uri,request)
|
|
899
899
|
@http = Net::HTTP.new(uri.host, uri.port)
|
|
900
|
-
|
|
901
|
-
|
|
900
|
+
@http.use_ssl = true
|
|
901
|
+
@http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
|
902
902
|
@request = request
|
|
903
903
|
data = @request.method.eql?('GET') ? uri.query : @request.body
|
|
904
904
|
@request["Accept"] = "application/json"
|
|
@@ -926,13 +926,13 @@ class WeatherMatic
|
|
|
926
926
|
end
|
|
927
927
|
|
|
928
928
|
def api_key
|
|
929
|
-
|
|
930
|
-
'998174b6f911b8e95db1c15d1ac59c4f' # This should be an environment variable for best security - this is not a production key
|
|
929
|
+
ENV['SLN_API_KEY']
|
|
930
|
+
# '998174b6f911b8e95db1c15d1ac59c4f' # This should be an environment variable for best security - this is not a production key
|
|
931
931
|
end
|
|
932
932
|
|
|
933
933
|
def secret_api_key
|
|
934
|
-
|
|
935
|
-
'245aa67451c534803dc93e7953ff40b6' # This should be an environment variable for best security - this is not a production key
|
|
934
|
+
ENV['SLN_API_SECRET_KEY']
|
|
935
|
+
# '245aa67451c534803dc93e7953ff40b6' # This should be an environment variable for best security - this is not a production key
|
|
936
936
|
# '245aa67451c534803dc93e7953ffffff'
|
|
937
937
|
end
|
|
938
938
|
|