infisical-sdk 2.2.8 → 2.3.0

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: 986817964fb0b5f657d03af717af6d4da2dc8d9ee5722d949021d752a4effbae
4
- data.tar.gz: 27a492a43b847195d1d02c7c1647e83c1d21f4b1545f46ca02b6672380072116
3
+ metadata.gz: 631a8d8f205037d27e93e742be97f1f26f6be52b7bb3f033329f684cbe841603
4
+ data.tar.gz: ff0bfcd3d7f95575ff2f1bf5f2cc15da52b78cbf972e687856600009103f00cd
5
5
  SHA512:
6
- metadata.gz: 658ecc8539851acba9739356457e972b5566c91924868556da985acc1040e738a1e53d1c37a48caf3c96541ff2b25b8eaeb1ab77023423d2bccda719de4fc1ad
7
- data.tar.gz: 37edae03fe720006fef87fe5832c97469297aecad70df0ba67d8a32c6c0bbc31039c9e7b3d7c1ded3e57fa4b76265eefddbc29604360dff096f0e6bdc9525529
6
+ metadata.gz: f3300ea068deb6069a4e048207aeb35d431c8391d09c249c561522392939158175be8e6d78d3ef17e6d39f25fea3af77d21f2c648f65a9618e2798abd3d3c424
7
+ data.tar.gz: e3667b1d1d86b27d23312edf236ed9e484615a460dd302444d3d0683fdc538343f8de355ace58b310ba70c044e51106256af248528c71b131563cbbe0ec6ebd1
@@ -11,7 +11,7 @@ require_relative '../extended_schemas/schemas'
11
11
 
12
12
  module InfisicalSDK
13
13
  # Perform encryption
14
- class EncryptionClient
14
+ class CryptographyClient
15
15
  def initialize(command_runner)
16
16
  @command_runner = command_runner
17
17
  end
data/lib/infisical-sdk.rb CHANGED
@@ -10,11 +10,11 @@ require_relative 'infisical_error'
10
10
  require_relative 'command_runner'
11
11
  require_relative 'clients/secrets'
12
12
  require_relative 'clients/auth'
13
- require_relative 'clients/encryption'
13
+ require_relative 'clients/cryptography'
14
14
 
15
15
  module InfisicalSDK
16
16
  class InfisicalClient
17
- attr_reader :infisical, :command_runner, :secrets, :auth, :encryption
17
+ attr_reader :infisical, :command_runner, :secrets, :auth, :cryptography
18
18
 
19
19
  def initialize(site_url = nil, cache_ttl = 300)
20
20
  settings = ClientSettings.new(
@@ -34,7 +34,7 @@ module InfisicalSDK
34
34
  @command_runner = CommandRunner.new(@infisical, @handle)
35
35
  @secrets = SecretsClient.new(@command_runner)
36
36
  @auth = AuthClient.new(@command_runner)
37
- @encryption = EncryptionClient.new(@command_runner)
37
+ @cryptography = CryptographyClient.new(@command_runner)
38
38
  end
39
39
 
40
40
  def free_mem
Binary file
Binary file
Binary file
Binary file
data/lib/schemas.rb CHANGED
@@ -300,18 +300,25 @@ class ClientSettings < Dry::Struct
300
300
  # The URL of the site to connect to. Defaults to "https://app.infisical.com".
301
301
  attribute :site_url, Types::String.optional.optional
302
302
 
303
+ # The SSL certificate path is an optional field that allows you to specify a custom SSL
304
+ # certificate to use for requests made to Infisical.
305
+ # This option can be substituted with the `INFISICAL_SSL_CERTIFICATE` environment variable,
306
+ # which should contain the certificate as a string, not the path.
307
+ attribute :ssl_certificate_path, Types::String.optional.optional
308
+
303
309
  attribute :user_agent, Types::String.optional.optional
304
310
 
305
311
  def self.from_dynamic!(d)
306
312
  d = Types::Hash[d]
307
313
  new(
308
- access_token: d["accessToken"],
309
- auth: d["auth"] ? AuthenticationOptions.from_dynamic!(d["auth"]) : nil,
310
- cache_ttl: d["cacheTtl"],
311
- client_id: d["clientId"],
312
- client_secret: d["clientSecret"],
313
- site_url: d["siteUrl"],
314
- user_agent: d["userAgent"],
314
+ access_token: d["accessToken"],
315
+ auth: d["auth"] ? AuthenticationOptions.from_dynamic!(d["auth"]) : nil,
316
+ cache_ttl: d["cacheTtl"],
317
+ client_id: d["clientId"],
318
+ client_secret: d["clientSecret"],
319
+ site_url: d["siteUrl"],
320
+ ssl_certificate_path: d["sslCertificatePath"],
321
+ user_agent: d["userAgent"],
315
322
  )
316
323
  end
317
324
 
@@ -321,13 +328,14 @@ class ClientSettings < Dry::Struct
321
328
 
322
329
  def to_dynamic
323
330
  {
324
- "accessToken" => access_token,
325
- "auth" => auth&.to_dynamic,
326
- "cacheTtl" => cache_ttl,
327
- "clientId" => client_id,
328
- "clientSecret" => client_secret,
329
- "siteUrl" => site_url,
330
- "userAgent" => user_agent,
331
+ "accessToken" => access_token,
332
+ "auth" => auth&.to_dynamic,
333
+ "cacheTtl" => cache_ttl,
334
+ "clientId" => client_id,
335
+ "clientSecret" => client_secret,
336
+ "siteUrl" => site_url,
337
+ "sslCertificatePath" => ssl_certificate_path,
338
+ "userAgent" => user_agent,
331
339
  }
332
340
  end
333
341
 
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InfisicalSDK
4
- VERSION = '2.2.8'
4
+ VERSION = '2.3.0'
5
5
  end
Binary file
@@ -1,5 +1,5 @@
1
1
  module InfisicalSDK
2
- class EncryptionClient
2
+ class CryptographyClient
3
3
  @command_runner: CommandRunner
4
4
  def initialize: (CommandRunner) -> void
5
5
 
@@ -10,7 +10,7 @@ module InfisicalSDK
10
10
  attr_reader infisical: InfisicalModule
11
11
 
12
12
  attr_reader auth: AuthClient
13
- attr_reader encryption: EncryptionClient
13
+ attr_reader cryptography: CryptographyClient
14
14
  attr_reader secrets: SecretsClient
15
15
 
16
16
  def initialize: (String?, Integer?) -> untyped
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infisical-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.8
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Infisical Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-23 00:00:00.000000000 Z
11
+ date: 2024-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct
@@ -105,7 +105,7 @@ files:
105
105
  - Steepfile
106
106
  - infisical-sdk.gemspec
107
107
  - lib/clients/auth.rb
108
- - lib/clients/encryption.rb
108
+ - lib/clients/cryptography.rb
109
109
  - lib/clients/secrets.rb
110
110
  - lib/command_runner.rb
111
111
  - lib/infisical-sdk.rb
@@ -120,7 +120,7 @@ files:
120
120
  - lib/windows-x64/infisical_c.dll
121
121
  - sig/infisical_sdk/auth_client.rbs
122
122
  - sig/infisical_sdk/command_runner.rbs
123
- - sig/infisical_sdk/encryption_client.rbs
123
+ - sig/infisical_sdk/cryptography_client.rbs
124
124
  - sig/infisical_sdk/infisical_client.rbs
125
125
  - sig/infisical_sdk/infisical_lib.rbs
126
126
  - sig/infisical_sdk/sdk.rbs