microkit-ruby-sdk 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '043697fb1966dc39c7e80a0bb208fa464a678307f354e88b12eb0c26b41e47ef'
4
- data.tar.gz: 618f632ef901bcc95f367ba496e793d95477866a9aacbe4b6c18792068fbfe68
3
+ metadata.gz: 0fb1b2186392311d972a4be683e13b982dbd3f7dda470d6485fe495b4792a032
4
+ data.tar.gz: 7b7badad92635c740f3eb002c3396113406cfe004ada29b1fe957625506f456d
5
5
  SHA512:
6
- metadata.gz: 1b7381ff7442b46bf822a7a70df4370681919ca217f9322713805a8899c0c47076b20f318fc649c6680349ab68b60275abf3431c662912a786873b7844791d44
7
- data.tar.gz: aacd5d9b71f74122640a2e333965229a14b2c25850d25d6eacfbcf7a60fae5d4ac2abc50e87460011f5bd4e061888659ff41e58ba6cdccd7210d46a21255b057
6
+ metadata.gz: 13d33bbecf1eada156b8f944906363e720d644e083e22be3d8368ab355f49714639addd0508b8080ad852b5dab599168eb744d9fe5b7be40357574da34ee0a5d
7
+ data.tar.gz: 36a0c649901738dcca3f1c3716d46c4b6b78c635df39e6ec338175ccdf20e8d84aed0f9aca6559c18ca19b6d12abe70d61e971c63a9a4a04c62b28ad8d0c47c4
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Microkit
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
3
3
  end
data/lib/microkit.rb CHANGED
@@ -8,7 +8,6 @@ require "microkit/config_item"
8
8
  require "microkit/feature_item"
9
9
  require "microkit/network_controller"
10
10
  require "microkit/microkit"
11
- require "microkit/utils"
12
11
 
13
12
  module Microkit
14
13
  class Error < StandardError; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: microkit-ruby-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - chaimvaid