selfsdk 0.0.204 → 0.0.205
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/selfsdk.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aefa2c3a38cd8b027fb2095affee9bd67b74c1e1c417ffa9e028f656a3d28e34
|
|
4
|
+
data.tar.gz: 7969b31c5f519a2d9c4a8a098d8862119dbdf4e0aba6dfa71b39dfb7e2d2d437
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f15414f199e776fb0bf7578226c00c8f9c649940fd9ac74d40b177e50a3acca0a48204c8e638a1bf15bc5c09e35a868c60f3833bfd778e8fe13161263d25b11d
|
|
7
|
+
data.tar.gz: 5e6f46cad290c73094aa2697b63b154a79cd1f54610c7b8051a6b8ebf14e604432fb86ba6b45884aec90ad51c54cb1545bfe5fcb04012c8e6f8160caf7afc44e
|
data/lib/selfsdk.rb
CHANGED
|
@@ -51,6 +51,8 @@ module SelfSDK
|
|
|
51
51
|
# @option opts [Bool] :auto_reconnect Automatically reconnects to websocket if connection is lost (defaults to true).
|
|
52
52
|
# @option opts [Symbol] :env The environment to be used, defaults to ":production".
|
|
53
53
|
def initialize(app_id, app_key, storage_key, storage_dir, opts = {})
|
|
54
|
+
app_key = cleanup_key(app_key)
|
|
55
|
+
|
|
54
56
|
SelfSDK.logger.debug "syncing ntp times #{SelfSDK::Time.now}"
|
|
55
57
|
env = opts.fetch(:env, "")
|
|
56
58
|
|
|
@@ -132,5 +134,11 @@ module SelfSDK
|
|
|
132
134
|
MESSAGING_URL
|
|
133
135
|
end
|
|
134
136
|
|
|
137
|
+
def cleanup_key(key)
|
|
138
|
+
return key unless key.include? '_'
|
|
139
|
+
|
|
140
|
+
key.split('_').last
|
|
141
|
+
end
|
|
142
|
+
|
|
135
143
|
end
|
|
136
144
|
end
|