tanker-core 2.11.0.beta.2 → 2.12.1.beta.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c76bc227a9a3ff2398143c676c94ea0b3f99aeca28e2ac10931976edf123f907
4
- data.tar.gz: e6ef5a2ef547bbaa1f482ebd60d9d3d37293759058bc7e42bde2e57502303a36
3
+ metadata.gz: 6bd4f18770e5f9299a1a5b1be55000b28c645e8a51bd3ab372e357d4beea76e9
4
+ data.tar.gz: d61e61f71337407244ec0ad31671145589add283e8292797fd056577a9678c58
5
5
  SHA512:
6
- metadata.gz: fa8a8b276d3f505941bfd1ec2ea3222a1beefc50da8b89451ff81b565a4b30347fa52dfb79f77747eaeed3e0f45f55e06f19249bc4cfd9eaa2a450450650c979
7
- data.tar.gz: be5318d557edc044776bc7cf6d59a1cbe1d08d05c5b8483f407b8ca313ca3417400d4a57e498c8c4da57a5567698cf04b030909321bdf8ddd07dc83b7eb3b1cf
6
+ metadata.gz: 26eecff6d8a461574651ab0b73d72166286f043de5e9441ae3f909a38b5f015e889cb2ad7835cb15142f94ab33af145df68552774ebeff92ac9e603812439e8d
7
+ data.tar.gz: 9bc8439e3089adc455ebbc5210e968b7615ed7ff7ea5003b9ec8c808b29b8888a2c428141f727b4a4fa55b4a17043ef839e0bf09d652c6ad058ec96fb7eb85a7
@@ -13,7 +13,7 @@ module Tanker
13
13
  ffi_lib Tanker::CTanker.get_path('tanker_admin-c')
14
14
  typedef :pointer, :admin_pointer
15
15
 
16
- # Note: We use those CFutures with the tanker_future_* functions exposed by CTanker,
16
+ # NOTE: We use those CFutures with the tanker_future_* functions exposed by CTanker,
17
17
  # this is safe because we only do simple synchronous blocking calls, without using tanker_future_then.
18
18
 
19
19
  attach_function :tanker_admin_connect, [:string, :string], CTanker::CFuture
@@ -7,6 +7,7 @@ module Tanker
7
7
  class Admin
8
8
  class AppUpdateOptions < FFI::Struct
9
9
  def initialize(oidc_client_id: nil, oidc_client_provider: nil, session_certificates: nil)
10
+ super()
10
11
  self[:version] = 1
11
12
  unless oidc_client_id.nil?
12
13
  @oidc_client_id = CTanker.new_cstring oidc_client_id
@@ -7,7 +7,7 @@ module Tanker::CTanker
7
7
  # you can't just assign a string literal to a cstring.
8
8
  # They'd rather not handle allocations transparently (lifetimes are tricky),
9
9
  # so we have to take care of allocations and lifetimes ourselves.
10
- def self.new_cstring(str_or_nil, manual = false)
10
+ def self.new_cstring(str_or_nil, manual = false) # rubocop:disable Style/OptionalBooleanParameter
11
11
  return nil if str_or_nil.nil?
12
12
 
13
13
  cstr = FFI::MemoryPointer.from_string(str_or_nil)
@@ -12,7 +12,9 @@ module Tanker
12
12
  :verification_code, :pointer
13
13
 
14
14
  def initialize(email, verification_code)
15
- # Note: Instance variables are required to keep the CStrings alive
15
+ super()
16
+
17
+ # NOTE: Instance variables are required to keep the CStrings alive
16
18
  @email = CTanker.new_cstring email
17
19
  @verification_code = CTanker.new_cstring verification_code
18
20
 
@@ -36,11 +38,13 @@ module Tanker
36
38
  TYPE_OIDC_ID_TOKEN = 4
37
39
 
38
40
  def initialize(verification)
41
+ super()
42
+
39
43
  unless verification.is_a? Tanker::Verification
40
44
  raise TypeError, 'Verification argument is not a Tanker::Verification'
41
45
  end
42
46
 
43
- # Note: Instance variables are required to keep the CStrings alive
47
+ # NOTE: Instance variables are required to keep the CStrings alive
44
48
  case verification
45
49
  when Tanker::EmailVerification
46
50
  self[:type] = TYPE_EMAIL
@@ -31,7 +31,7 @@ module Tanker
31
31
  CTanker.tanker_init
32
32
 
33
33
  # Do not spam the console of our users.
34
- self.class.set_log_handler { |_| } unless self.class.test_and_set_log_handler == 1
34
+ self.class.set_log_handler { |_| } unless self.class.test_and_set_log_handler == 1 # rubocop:disable Lint/EmptyBlock
35
35
 
36
36
  @revoke_event_handlers = Set.new
37
37
  @ctanker = CTanker.tanker_create(options).get
@@ -17,7 +17,9 @@ module Tanker
17
17
  SDK_VERSION = CTanker.new_cstring Core::VERSION
18
18
 
19
19
  def initialize(app_id:, url: nil, sdk_type: SDK_TYPE, writable_path: nil)
20
- # Note: Instance variables are required to keep the CStrings alive
20
+ super()
21
+
22
+ # NOTE: Instance variables are required to keep the CStrings alive
21
23
  @app_id = CTanker.new_cstring app_id
22
24
  @url = CTanker.new_cstring url
23
25
  @writable_path = CTanker.new_cstring writable_path
@@ -4,12 +4,14 @@ require 'ffi'
4
4
  require 'tanker/c_tanker/c_string'
5
5
 
6
6
  module Tanker
7
- class Verification; end
7
+ class Verification; end # rubocop:disable Lint/EmptyClass
8
8
 
9
9
  class EmailVerification < Verification
10
10
  attr_reader :email, :verification_code
11
11
 
12
12
  def initialize(email, verif_code)
13
+ super()
14
+
13
15
  ASSERT_UTF8.call(email)
14
16
  ASSERT_UTF8.call(verif_code)
15
17
 
@@ -22,6 +24,8 @@ module Tanker
22
24
  attr_reader :passphrase
23
25
 
24
26
  def initialize(passphrase)
27
+ super()
28
+
25
29
  ASSERT_UTF8.call(passphrase)
26
30
 
27
31
  @passphrase = passphrase
@@ -32,6 +36,8 @@ module Tanker
32
36
  attr_reader :verification_key
33
37
 
34
38
  def initialize(verif_key)
39
+ super()
40
+
35
41
  ASSERT_UTF8.call(verif_key)
36
42
 
37
43
  @verification_key = verif_key
@@ -42,6 +48,8 @@ module Tanker
42
48
  attr_reader :oidc_id_token
43
49
 
44
50
  def initialize(oidc_id_token)
51
+ super()
52
+
45
53
  ASSERT_UTF8.call(oidc_id_token)
46
54
 
47
55
  @oidc_id_token = oidc_id_token
@@ -17,6 +17,7 @@ module Tanker
17
17
  attr_reader :email
18
18
 
19
19
  def initialize(email)
20
+ super()
20
21
  @email = email
21
22
  end
22
23
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Tanker
4
4
  class Core
5
- VERSION = '2.11.0.beta.2'
5
+ VERSION = '2.12.1.beta.5'
6
6
 
7
7
  def self.native_version
8
8
  CTanker.tanker_version_string
@@ -7,6 +7,8 @@ module Tanker
7
7
  # Options that can be given when encrypting data
8
8
  class EncryptionOptions < FFI::Struct
9
9
  def initialize(share_with_users: [], share_with_groups: [], share_with_self: true)
10
+ super()
11
+
10
12
  @users_objs = share_with_users.map { |id| CTanker.new_cstring id }
11
13
  users = FFI::MemoryPointer.new(:pointer, share_with_users.length)
12
14
  users.write_array_of_pointer(@users_objs)
@@ -7,6 +7,8 @@ module Tanker
7
7
  # Options that can be given when sharing data
8
8
  class SharingOptions < FFI::Struct
9
9
  def initialize(share_with_users: [], share_with_groups: [])
10
+ super()
11
+
10
12
  @users_objs = share_with_users.map { |id| CTanker.new_cstring id }
11
13
  users = FFI::MemoryPointer.new(:pointer, share_with_users.length)
12
14
  users.write_array_of_pointer(@users_objs)
@@ -6,6 +6,8 @@ module Tanker
6
6
  # Options that can be given when using a verification method
7
7
  class VerificationOptions < FFI::Struct
8
8
  def initialize(with_session_token: false)
9
+ super()
10
+
9
11
  self[:version] = 1
10
12
  self[:with_session_token] = with_session_token ? 1 : 0
11
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tanker-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.0.beta.2
4
+ version: 2.12.1.beta.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanker team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-31 00:00:00.000000000 Z
11
+ date: 2021-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.85.1
89
+ version: '1.13'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.85.1
96
+ version: '1.13'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rubygems-tasks
99
99
  requirement: !ruby/object:Gem::Requirement