memorb 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/lib/memorb/integration.rb +3 -5
- data/lib/memorb/version.rb +1 -1
- data/memorb.gemspec +3 -1
- data/spec/memorb/integration_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 395e130b9e6069cdf61bd8862baea9cbbe42a036d93577ff30e284c5db138043
|
4
|
+
data.tar.gz: 9f98890bc1de4bc7c39d5d97299b8dad3c20eefec3f53e611597e2fa65388ff1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1efeb095e499089eaaa9c0b07732549164e41b049315bd39fea01135ca951f1b48397dc246aa3e603b87633209c8043d9c34766c2bc1d8d57e1995abfeafc37f
|
7
|
+
data.tar.gz: 2d9bc222144f129edf293bb13d768b6eaf0245ca5038a084c940396a7c4734b106dc58512b5ee2686c1f11ffc7ca158d9277755b14c6cc86f9f53f918a16d5ad
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.2.3] - 2022-11-04
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
|
14
|
+
- Add gem to `$LOAD_PATH` explicitly.
|
15
|
+
|
16
|
+
## [0.2.2] - 2022-11-03
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
|
20
|
+
- Avoid overriding `#initialize` of integrator instances (resolves [#1](https://github.com/pjrebsch/memorb/issues/1))
|
21
|
+
- Change reported `::name` of integration module from `Memorb:___` to `Memorb::Integration[___]`
|
22
|
+
|
10
23
|
## [0.2.1] - 2021-05-13
|
11
24
|
|
12
25
|
### Changed
|
data/lib/memorb/integration.rb
CHANGED
@@ -32,10 +32,8 @@ module Memorb
|
|
32
32
|
|
33
33
|
def new(integrator)
|
34
34
|
mixin = ::Module.new do
|
35
|
-
def
|
36
|
-
|
37
|
-
define_singleton_method(:memorb) { agent }
|
38
|
-
super
|
35
|
+
def memorb
|
36
|
+
@memorb ||= Integration[self.class].create_agent(self)
|
39
37
|
end
|
40
38
|
|
41
39
|
class << self
|
@@ -115,7 +113,7 @@ module Memorb
|
|
115
113
|
[:name, :inspect, :object_id].each do |m|
|
116
114
|
next unless integrator.respond_to?(m)
|
117
115
|
base_name = integrator.public_send(m)
|
118
|
-
return "Memorb
|
116
|
+
return "Memorb::Integration[#{ base_name }]" if base_name
|
119
117
|
end
|
120
118
|
end
|
121
119
|
|
data/lib/memorb/version.rb
CHANGED
data/memorb.gemspec
CHANGED
@@ -419,14 +419,14 @@ describe ::Memorb::Integration do
|
|
419
419
|
describe '::name' do
|
420
420
|
it 'includes the name of the integrating class' do
|
421
421
|
name = 'IntegratingKlass'
|
422
|
-
expectation = "Memorb
|
422
|
+
expectation = "Memorb::Integration[#{ name }]"
|
423
423
|
::Memorb::RubyCompatibility
|
424
424
|
.define_method(integrator_singleton, :name) { name }
|
425
425
|
expect(subject.name).to eq(expectation)
|
426
426
|
end
|
427
427
|
context 'when integrating class does not have a name' do
|
428
428
|
it 'uses the inspection of the integrating class' do
|
429
|
-
expectation = "Memorb
|
429
|
+
expectation = "Memorb::Integration[#{ integrator.inspect }]"
|
430
430
|
::Memorb::RubyCompatibility
|
431
431
|
.define_method(integrator_singleton, :name) { nil }
|
432
432
|
expect(subject.name).to eq(expectation)
|
@@ -436,7 +436,7 @@ describe ::Memorb::Integration do
|
|
436
436
|
end
|
437
437
|
context 'when integrating class does not have an inspection' do
|
438
438
|
it 'uses the object ID of the integrating class' do
|
439
|
-
expectation = "Memorb
|
439
|
+
expectation = "Memorb::Integration[#{ integrator.object_id }]"
|
440
440
|
::Memorb::RubyCompatibility
|
441
441
|
.define_method(integrator_singleton, :inspect) { nil }
|
442
442
|
expect(subject.name).to eq(expectation)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: memorb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Rebsch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|