disposable 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +7 -0
- data/Gemfile +1 -1
- data/lib/disposable/twin/property/unnest.rb +9 -7
- data/lib/disposable/twin.rb +4 -0
- data/lib/disposable/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 503eaa80c2c7e5c2808e22cfff709fa359fc3c582b8db5c7917800c406ec55db
|
4
|
+
data.tar.gz: 28b2091c2f06ff81e5ee2bbed56a496b91421753afd97782f3a2e3f298dbc53b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ddecb0c8eaa4d66162d059c23fb2f495658fd67e5bc35aaf568cdf39bb9d21b4816703577a732daac330e279876b06cfec6a624eeb7c7a6da724d764e224c27
|
7
|
+
data.tar.gz: 9728842db88f5794ccf1e4729801d28badf5389cabdd0bda11c5391283ab41317275a5fe0aefa3cb259e2b63026de5174aba51e38bf6a87b06c968b0e50a6c22
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# 0.6.2
|
2
|
+
|
3
|
+
* Remove `Forwardable` from `Unnest` and refrain from including it into the `Twin` class.
|
4
|
+
This may overwrite the same-named `ActiveSupport::delegate` method and breaks things.
|
5
|
+
Instead, do manual delegation and plan for 2023 to allow using `Forwardable.delegate(target, what, where)`.
|
6
|
+
|
7
|
+
|
1
8
|
# 0.6.1
|
2
9
|
|
3
10
|
* Remove `**options` argument from `#property` as it's inconsistent with underlying gems.
|
data/Gemfile
CHANGED
@@ -7,6 +7,6 @@ gem "minitest-line"
|
|
7
7
|
gem gem_name, dependency
|
8
8
|
end
|
9
9
|
|
10
|
-
gem "sqlite3", ENV.fetch('ACTIVERECORD', '5.2').to_f >= 6 ? '~> 1.4' : '~> 1.3.0'
|
10
|
+
gem "sqlite3", '~> 1.4' # => , ENV.fetch('ACTIVERECORD', '5.2').to_f >= 6 ? '~> 1.4' : '~> 1.3.0'
|
11
11
|
|
12
12
|
# gem "declarative-builder"
|
@@ -1,12 +1,6 @@
|
|
1
|
-
require "forwardable"
|
2
|
-
|
3
1
|
module Disposable::Twin::Property
|
4
2
|
module Unnest
|
5
|
-
extend Forwardable
|
6
3
|
# TODO: test that nested properties options are "unnested", too, e.g. populator.
|
7
|
-
def self.included(includer)
|
8
|
-
includer.send(:include, Forwardable)
|
9
|
-
end
|
10
4
|
|
11
5
|
def unnest(name, options)
|
12
6
|
from = options.delete(:from)
|
@@ -16,7 +10,15 @@ module Disposable::Twin::Property
|
|
16
10
|
options = options.merge(virtual: true, _inherited: true, private_name: nil)
|
17
11
|
|
18
12
|
property(name, options)
|
19
|
-
def_delegators from, name, "#{name}="
|
13
|
+
# def_delegators from, name, "#{name}=" # FIXME: this overwrites ActiveSupport#delegate in some cases.
|
14
|
+
|
15
|
+
define_method name do
|
16
|
+
send(from).send(name) # TODO: fix Forwardable in Ruby.
|
17
|
+
end
|
18
|
+
|
19
|
+
define_method "#{name}=" do |value|
|
20
|
+
send(from).send("#{name}=", value)
|
21
|
+
end
|
20
22
|
end
|
21
23
|
end
|
22
24
|
end
|
data/lib/disposable/twin.rb
CHANGED
data/lib/disposable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: disposable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: declarative
|
@@ -218,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
218
|
- !ruby/object:Gem::Version
|
219
219
|
version: '0'
|
220
220
|
requirements: []
|
221
|
-
rubygems_version: 3.
|
221
|
+
rubygems_version: 3.2.3
|
222
222
|
signing_key:
|
223
223
|
specification_version: 4
|
224
224
|
summary: Decorators on top of your ORM layer with change tracking, collection semantics
|