memorb 0.2.1 → 0.2.2
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/memorb/integration.rb +3 -5
- data/lib/memorb/version.rb +1 -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: 3fe5e1a6bc44b93a7276cf081536f909ce91a727b942dbbe8aefa5c586f9c74b
|
4
|
+
data.tar.gz: 68a6ddd4d56e192dfac2226d42fdc42d09f359965fa885d48cd45ecf6dc85065
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a4a9c79562e040ace89efdf5db2c93466363bf5c296f4955935e784d6bfeb67b41fbc796390b83e1cabda7f452d657a9b7e83925c7bc0d399e27aad7ef6a4ec
|
7
|
+
data.tar.gz: 8ffd8395daf04f88f664893e63fc2bf6e4cb3478d05e91643d47c9899e34f60c1759e139adb18537facf515d8e6a8a6ae5fe8dfc516749609cd60d0120a793d2
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.2.2] - 2022-11-03
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
|
14
|
+
- Avoid overriding `#initialize` of integrator instances (resolves [#1](https://github.com/pjrebsch/memorb/issues/1))
|
15
|
+
- Change reported `::name` of integration module from `Memorb:___` to `Memorb::Integration[___]`
|
16
|
+
|
10
17
|
## [0.2.1] - 2021-05-13
|
11
18
|
|
12
19
|
### 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
@@ -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.2
|
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
|