memorb 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 587af622bcdad85efe2f2e7aa788195d358919189b14e77bb458dba14f1a2b51
4
- data.tar.gz: c3afbe2b309029b1b4f282eb9f5a0594b6ee646cae541675208ffe46018173ee
3
+ metadata.gz: 3fe5e1a6bc44b93a7276cf081536f909ce91a727b942dbbe8aefa5c586f9c74b
4
+ data.tar.gz: 68a6ddd4d56e192dfac2226d42fdc42d09f359965fa885d48cd45ecf6dc85065
5
5
  SHA512:
6
- metadata.gz: 384c4747fe3262a9a16d48c303e2579fbf469c95b4db78e53ed75b417414dfbce74862e9811d08a742b7b79ba3d6cbd9b7ab6357c5fb67da22e53a2c4bbfb246
7
- data.tar.gz: fc7f79883d471ba2ed27c9f6ddbaec768375b6dadbf3f653cd1d17b8adcdc8ddde7a5cd6acae85a2d200c21d2b906ca4cb13b5461f2b134c3d81862f3c3a8b1e
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
@@ -32,10 +32,8 @@ module Memorb
32
32
 
33
33
  def new(integrator)
34
34
  mixin = ::Module.new do
35
- def initialize(*)
36
- agent = Integration[self.class].create_agent(self)
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:#{ base_name }" if base_name
116
+ return "Memorb::Integration[#{ base_name }]" if base_name
119
117
  end
120
118
  end
121
119
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Memorb
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
@@ -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:#{ name }"
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:#{ integrator.inspect }"
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:#{ integrator.object_id }"
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.1
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: 2021-05-13 00:00:00.000000000 Z
11
+ date: 2022-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler