provider_kit 0.2.1 → 0.3.0

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: da3e02d32cafa95d8718676ae02a14be2e79d520b90bee3e10f3b3738b75c507
4
- data.tar.gz: 2276650b63b069e3ba4890f171925d903cbe603776355bb6a285194da69a3a83
3
+ metadata.gz: c6979b3d3b18db09e2c3aa08d84a915755f68c16033e10368937a36038423e51
4
+ data.tar.gz: 4c4389aa672cf28230166fe4d3d1e5d948676b7dc4745471af0cb0d196aa84ec
5
5
  SHA512:
6
- metadata.gz: 1dde2f369723133094c1a28c6220713808a459f94d02f1d39ae681327e57e7cc7b86ad54234e0d09cbc24e9a262f0d729efa051f41b7a2550e489d6b35c6089e
7
- data.tar.gz: '0204738efbe20bfa85e55f8ea9a4c48dd145836b822f2c53a047f053b969599486a49c8ce3c2b5f78ab7df905f8461d1e2728858d1da1b25c3326e1e6d025086'
6
+ metadata.gz: 2ea641ad13bf014b6b5b027b0e028ff363eef9b5e66a71052680eeb4c1b5555535de6399d64921495f98757a5a5aa6e9d022d23398e0e1ce0b9fd89d2acac0c3
7
+ data.tar.gz: ac7c46d2452ae8b9ba60975f39eeb099140251257eedfd32819b3d1ac275a0f999d8a8ca4dcd8f29665970cb16e9341cd067a64d13475c9de784d24be68cf230
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ProviderKit
4
+ class Configuration
5
+
6
+ attr_accessor :capability_response_format
7
+ attr_accessor :credentials_key
8
+ attr_accessor :registered_providers
9
+ attr_accessor :type_defaults
10
+
11
+ # default config
12
+ def initialize
13
+ @registered_providers = {}
14
+ @capability_response_format = :object
15
+ @type_defaults = {}
16
+ @credentials_key = nil
17
+ end
18
+
19
+ end
20
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module ProviderKit
4
4
 
5
- VERSION = "0.2.1"
5
+ VERSION = "0.3.0"
6
6
 
7
7
  module Version
8
8
 
data/lib/provider_kit.rb CHANGED
@@ -16,19 +16,8 @@ loader.setup
16
16
  module ProviderKit
17
17
 
18
18
  extend ActiveSupport::Autoload
19
- include ActiveSupport::Configurable
20
19
 
21
20
  ## Config
22
- configure do |config|
23
- config.registered_providers = {}
24
-
25
- # Set to :hash to just return a plain hash
26
- config.capability_response_format = :object
27
-
28
- # Default provider for given type
29
- config.type_defaults = {}
30
- end
31
-
32
21
  eager_autoload do
33
22
  autoload :Buildable
34
23
  autoload :Registerable
@@ -37,6 +26,7 @@ module ProviderKit
37
26
  ## Core
38
27
  autoload :Attribute
39
28
  autoload :Callbacks
29
+ autoload :Configuration
40
30
  autoload :EncryptedSettings
41
31
  autoload :Encryptor
42
32
  autoload :Execution
@@ -60,6 +50,16 @@ module ProviderKit
60
50
  extend Registerable
61
51
  extend Buildable
62
52
 
53
+ ## Config
54
+
55
+ def self.config
56
+ @@config ||= Configuration.new
57
+ end
58
+
59
+ def self.configure(&)
60
+ yield config
61
+ end
62
+
63
63
  # this is just a placeholder for integrations that do not need a custom provider
64
64
  register :null, class_name: "ProviderKit::NullProvider"
65
65
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: provider_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John D. Tornow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-24 00:00:00.000000000 Z
11
+ date: 2026-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -161,6 +161,7 @@ files:
161
161
  - lib/provider_kit/capability.rb
162
162
  - lib/provider_kit/capability_extension.rb
163
163
  - lib/provider_kit/capable.rb
164
+ - lib/provider_kit/configuration.rb
164
165
  - lib/provider_kit/context.rb
165
166
  - lib/provider_kit/encrypted_settings.rb
166
167
  - lib/provider_kit/encryptor.rb