microkit-ruby-sdk 0.1.3 → 0.1.5
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/microkit/microkit.rb +5 -2
- data/lib/microkit/version.rb +1 -1
- data/lib/microkit.rb +0 -1
- 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: 0fb1b2186392311d972a4be683e13b982dbd3f7dda470d6485fe495b4792a032
|
4
|
+
data.tar.gz: 7b7badad92635c740f3eb002c3396113406cfe004ada29b1fe957625506f456d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13d33bbecf1eada156b8f944906363e720d644e083e22be3d8368ab355f49714639addd0508b8080ad852b5dab599168eb744d9fe5b7be40357574da34ee0a5d
|
7
|
+
data.tar.gz: 36a0c649901738dcca3f1c3716d46c4b6b78c635df39e6ec338175ccdf20e8d84aed0f9aca6559c18ca19b6d12abe70d61e971c63a9a4a04c62b28ad8d0c47c4
|
data/lib/microkit/microkit.rb
CHANGED
@@ -18,7 +18,7 @@ module Microkit
|
|
18
18
|
# Microkit.instance.features_kit = Group('features', res["features"] if 'features' in res and type(res["features"]) == dict else {})
|
19
19
|
res = NetworkController.instance.get_latest_data('init')
|
20
20
|
res = JSON.parse(res)
|
21
|
-
config = JSON.parse(self.decrypt(clean_base64_padding(res["config"], secret)))
|
21
|
+
config = JSON.parse(self.decrypt(self.clean_base64_padding(res["config"], secret)))
|
22
22
|
Config.instance.set("key_vars_values", res["key_vars_values"])
|
23
23
|
Microkit.instance.instance_variable_set("@config_kit", Group.new("config", config))
|
24
24
|
Microkit.instance.instance_variable_set("@features_kit", Group.new("features", res["features"]))
|
@@ -59,6 +59,10 @@ module Microkit
|
|
59
59
|
decrypted = cipher.update(encrypted) + cipher.final
|
60
60
|
return decrypted
|
61
61
|
end
|
62
|
+
|
63
|
+
def self.clean_base64_padding(base64_string)
|
64
|
+
base64_string.end_with?("==") ? base64_string[0..-3] : base64_string
|
65
|
+
end
|
62
66
|
class Microkit
|
63
67
|
include Singleton
|
64
68
|
attr_accessor :subscription
|
@@ -76,6 +80,5 @@ module Microkit
|
|
76
80
|
@subscription = nil
|
77
81
|
end
|
78
82
|
end
|
79
|
-
|
80
83
|
end
|
81
84
|
end
|
data/lib/microkit/version.rb
CHANGED
data/lib/microkit.rb
CHANGED