selfsdk 0.0.152 → 0.0.153

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a53bfe6e8d01f07c4dc0451d04c28a9da40be48fd809483150cf3d2b7d115423
4
- data.tar.gz: 972c46f44419f15cb07e1c9d6132505820b0f65f31d7508c0e989f36373b5b6b
3
+ metadata.gz: c0c8f286f380ceb7e9ac8e066789832d4b9f197751505b940fd8cf746bde8428
4
+ data.tar.gz: 49256177edb72bc4eb166ae7cd2d3310f60f9dab6b0a1c0380eb779adf05cf63
5
5
  SHA512:
6
- metadata.gz: bf502cb8121b5b78c1c718ecb3570498a48424cb8bb1a05d170e16001a6aae85cf4499c3025344990b1ea40382a83dde394d2209af0156099d48cc0f81a6f5c2
7
- data.tar.gz: 4e9862d8ce70588e5c1a2258b24e40c4d007c29fffcf0538a26cc5358a744202139dddf77ed8b39702b660a1555ef06a1ff14a9ca960a3b22beb7e9cf330b674
6
+ metadata.gz: 814615b35b65af67cbde61330523aa3ec43122b52b0048078ebe6a6ac895e5518ecb8dde154017a15e0190cdb3c9ad32a74ed09627824d49208cdf98748c79f5
7
+ data.tar.gz: 3b37174d96dd2b6d4c050d496dd338a4ae0e1b9c36ef0b7d27b81c36f9cc1f74c58ce536e46e08a9e7c27a3449e1aab680b666f6e4ebbb1c8e2120df41ad4d55
@@ -21,9 +21,9 @@ module SelfSDK
21
21
  msgs = []
22
22
  devices.each do |d|
23
23
  msgs << proto(d)
24
+ SelfSDK.logger.info "synchronously messaging to #{@to}:#{d}"
24
25
  end
25
26
  res = @messaging.send_and_wait_for_response(msgs, self)
26
- SelfSDK.logger.info "synchronously messaging to #{@to}:#{@d}"
27
27
  res
28
28
  end
29
29
 
@@ -32,7 +32,7 @@ module SelfSDK
32
32
  res = []
33
33
  devices.each do |d|
34
34
  res << @messaging.send_message(proto(d))
35
- SelfSDK.logger.info "asynchronously requested information to #{@to}:#{@d}"
35
+ SelfSDK.logger.info "asynchronously requested information to #{@to}:#{d}"
36
36
  end
37
37
  res.first
38
38
  end
@@ -40,13 +40,13 @@ module SelfSDK
40
40
  # @param app_id [string] the app id.
41
41
  # @param app_key [string] the app api key provided by developer portal.
42
42
  # @param storage_key [string] the key to be used to encrypt persisted data.
43
+ # @param storage_dir [String] The folder where encryption sessions and settings will be stored
43
44
  # @param [Hash] opts the options to authenticate.
44
45
  # @option opts [String] :base_url The self provider url.
45
46
  # @option opts [String] :messaging_url The messaging self provider url.
46
47
  # @option opts [Bool] :auto_reconnect Automatically reconnects to websocket if connection is lost (defaults to true).
47
48
  # @option opts [Symbol] :env The environment to be used, defaults to ":production".
48
- # @option opts [String] :storage_dir The folder where encryption sessions and settings will be stored
49
- def initialize(app_id, app_key, storage_key, opts = {})
49
+ def initialize(app_id, app_key, storage_key, storage_dir, opts = {})
50
50
  SelfSDK.logger.debug "syncing ntp times #{SelfSDK::Time.now}"
51
51
  env = opts.fetch(:env, "")
52
52
 
@@ -56,7 +56,7 @@ module SelfSDK
56
56
  @messaging_client = MessagingClient.new(messaging_url,
57
57
  @client,
58
58
  storage_key,
59
- storage_dir: opts.fetch(:storage_dir, MessagingClient::DEFAULT_STORAGE_DIR),
59
+ storage_dir: storage_dir,
60
60
  auto_reconnect: opts.fetch(:auto_reconnect, MessagingClient::DEFAULT_AUTO_RECONNECT),
61
61
  device_id: opts.fetch(:device_id, MessagingClient::DEFAULT_DEVICE))
62
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selfsdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.152
4
+ version: 0.0.153
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aldgate Ventures