containable 0.0.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -2
- data/README.adoc +1 -1
- data/containable.gemspec +2 -2
- data/lib/containable/{vault.rb → builder.rb} +3 -1
- data/lib/containable/test.rb +1 -1
- data/lib/containable.rb +3 -3
- data.tar.gz.sig +0 -0
- metadata +5 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1e298c787a7b1af3ec410a5a32d51ec1216746399332cbffc9d9001c83a6b47
|
4
|
+
data.tar.gz: b6f38a2cd98b8f5a4ee4b9878d24757caa79ce5bef706504123a77b69526af80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9d282dd36d6062d4b38704170c0867148e86928f5d11a9c636ce6d703d4f9edc0ece5423a460659affc7e3958cfd2e00064563a9d45a10e51a2915dff4f97de
|
7
|
+
data.tar.gz: 5dc4a5db810937e870d6749893626593908f58fe0eba64b60edc8a17c436a7ccb736e7a59b310ff5a8a870132a63bccb2544c840941ee0e12caf47d325b4f280
|
checksums.yaml.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
�
|
1
|
+
/K��QK�u�e��~En�8و�?Cw4�1gS�����>�D�K��������!�{��=�;/>��>O�:L�Б.�I�Y.�d^X�ف=�f8f3�W/�b��з��U�S��X�o��dl݄�:^WA����%TQyM���H�BTn����u�����g�����9.��9���lj~�醠f�5>�Gl̉�|�އ}��2
|
2
|
+
��xb^Xt�U�>���*�-�#����q#b��h&�C �U���8i�VtPH�<��i/��lL�L���kȃ�a`*#�F<���E@�0�En؟�?n�B�V�E[zw�d��r�VzλXoXtc�~���yV��.�T��-g P<):�ت�#O�(����0����Uu��l
|
data/README.adoc
CHANGED
@@ -32,7 +32,7 @@ To install _with_ security, run:
|
|
32
32
|
[source,bash]
|
33
33
|
----
|
34
34
|
# 💡 Skip this line if you already have the public certificate installed.
|
35
|
-
gem cert --add <(curl --compressed --location https://alchemists.io/
|
35
|
+
gem cert --add <(curl --compressed --location https://alchemists.io/gems.pem)
|
36
36
|
gem install containable --trust-policy HighSecurity
|
37
37
|
----
|
38
38
|
|
data/containable.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "containable"
|
5
|
-
spec.version = "0.
|
5
|
+
spec.version = "0.2.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/containable"
|
9
|
-
spec.summary = "A thread-safe
|
9
|
+
spec.summary = "A thread-safe dependency injection container."
|
10
10
|
spec.license = "Hippocratic-2.1"
|
11
11
|
|
12
12
|
spec.metadata = {
|
@@ -4,7 +4,7 @@ require "concurrent/hash"
|
|
4
4
|
|
5
5
|
module Containable
|
6
6
|
# Provides safe registration and resolution of dependencies.
|
7
|
-
class
|
7
|
+
class Builder < Module
|
8
8
|
def initialize dependencies = Concurrent::Hash.new, register: Register, resolver: Resolver
|
9
9
|
super()
|
10
10
|
|
@@ -16,6 +16,8 @@ module Containable
|
|
16
16
|
|
17
17
|
alias_method :[]=, :register
|
18
18
|
alias_method :[], :resolve
|
19
|
+
|
20
|
+
freeze
|
19
21
|
end
|
20
22
|
|
21
23
|
def extended descendant
|
data/lib/containable/test.rb
CHANGED
data/lib/containable.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "containable/builder"
|
3
4
|
require "containable/register"
|
4
5
|
require "containable/resolver"
|
5
|
-
require "containable/vault"
|
6
6
|
|
7
7
|
# Main namespace.
|
8
8
|
module Containable
|
9
9
|
def self.extended descendant
|
10
10
|
super
|
11
|
-
descendant.extend
|
11
|
+
descendant.extend Builder.new
|
12
12
|
end
|
13
13
|
|
14
|
-
def self.[](register: Register, resolver: Resolver) =
|
14
|
+
def self.[](register: Register, resolver: Resolver) = Builder.new(register:, resolver:)
|
15
15
|
|
16
16
|
def stub!(**)
|
17
17
|
require "containable/test"
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: containable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2024-
|
38
|
+
date: 2024-05-31 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: concurrent-ruby
|
@@ -64,10 +64,10 @@ files:
|
|
64
64
|
- README.adoc
|
65
65
|
- containable.gemspec
|
66
66
|
- lib/containable.rb
|
67
|
+
- lib/containable/builder.rb
|
67
68
|
- lib/containable/register.rb
|
68
69
|
- lib/containable/resolver.rb
|
69
70
|
- lib/containable/test.rb
|
70
|
-
- lib/containable/vault.rb
|
71
71
|
homepage: https://alchemists.io/projects/containable
|
72
72
|
licenses:
|
73
73
|
- Hippocratic-2.1
|
@@ -94,8 +94,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
|
-
rubygems_version: 3.5.
|
97
|
+
rubygems_version: 3.5.11
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
|
-
summary: A thread-safe
|
100
|
+
summary: A thread-safe dependency injection container.
|
101
101
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|