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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 587af622bcdad85efe2f2e7aa788195d358919189b14e77bb458dba14f1a2b51
4
- data.tar.gz: c3afbe2b309029b1b4f282eb9f5a0594b6ee646cae541675208ffe46018173ee
3
+ metadata.gz: 395e130b9e6069cdf61bd8862baea9cbbe42a036d93577ff30e284c5db138043
4
+ data.tar.gz: 9f98890bc1de4bc7c39d5d97299b8dad3c20eefec3f53e611597e2fa65388ff1
5
5
  SHA512:
6
- metadata.gz: 384c4747fe3262a9a16d48c303e2579fbf469c95b4db78e53ed75b417414dfbce74862e9811d08a742b7b79ba3d6cbd9b7ab6357c5fb67da22e53a2c4bbfb246
7
- data.tar.gz: fc7f79883d471ba2ed27c9f6ddbaec768375b6dadbf3f653cd1d17b8adcdc8ddde7a5cd6acae85a2d200c21d2b906ca4cb13b5461f2b134c3d81862f3c3a8b1e
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
@@ -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.3'
5
5
  end
data/memorb.gemspec CHANGED
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require File.expand_path('../lib/memorb/version', __FILE__)
3
+ $:.push File.expand_path('../lib', __FILE__)
4
+
5
+ require 'memorb/version'
4
6
 
5
7
  Gem::Specification.new do |s|
6
8
  s.name = 'memorb'
@@ -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.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: 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