containable 0.0.0 → 0.1.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 +0 -0
- data/containable.gemspec +2 -2
- data/lib/containable/{vault.rb → builder.rb} +3 -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: f98fe07ce5bee1f1b8934b19307e76c34f17ff1b03e5b6d1fa267cc91e7251c5
|
4
|
+
data.tar.gz: 82802072c24aadc5f2d9ff6b120c147dab15f09000627576f82409e80b982bf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac3b008e48584a3b1f195debf7ae66da3efcbdeff81b3ad6eb6e407d7debc56f8a7c12e0994aebba306744c0e7498ca5821e1e3bf9f96278b8d6dc36dd0890ff
|
7
|
+
data.tar.gz: 6767c4586666e17e8dc5bacc503bb97452f2962594e3fcf1d9c9871235f35824b9b06a8898b3b0191038f63911b212ca63a122b5b525d06771932893ae71c757
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
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.1.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.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.1.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-04-
|
38
|
+
date: 2024-04-30 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.9
|
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
|