sequel_polymorphic 0.3.1 → 0.4.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24f401afafb33d285fb0b2008fe2d4620f0147a7
|
4
|
+
data.tar.gz: 8f342a1e1506642da11015bcaa81eeb043649900
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52f09f38901b1fc534b3b849fdcc92c057f31583de6a7b89d76445a84f18ad4aa9585e49fdecf5607ba8ca15bf1f54063fd251b5a8c62153bb2fac8e36b75ec9
|
7
|
+
data.tar.gz: 26d5d0f09533e8c5c539119f8b6115248293fdd36e15715257f403805541191d76f44e68ce7371464a2faecad891d5ebf80f0d57737d0915910241a181a5e260
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,38 @@
|
|
1
|
-
# 0.
|
1
|
+
# 0.4.0 (2017-10-25)
|
2
|
+
|
3
|
+
* **Enhancements**: *migrate to new Sequel's plugins tree schema.*
|
4
|
+
|
5
|
+
This step is required for Sequel 5 compatibility.
|
6
|
+
|
7
|
+
See [#27](https://github.com/jackdempsey/sequel_polymorphic/pull/27).
|
8
|
+
Thanks to [@jnylen](https://github.com/jnylen).
|
9
|
+
|
10
|
+
* **Enhancements**: *get rid of `schema` Sequel's plugin*.
|
11
|
+
|
12
|
+
This step is required for Sequel 5 compatibility.
|
13
|
+
|
14
|
+
See [#23](https://github.com/jackdempsey/sequel_polymorphic/pull/23).
|
15
|
+
Thanks to [@jnylen](https://github.com/jnylen).
|
16
|
+
|
17
|
+
* **Fix**: *`one_to_one` association tries to add an adder, remover and clearer methods*.
|
18
|
+
|
19
|
+
It's not correct and dues to an error in Sequel 5.
|
20
|
+
|
21
|
+
See [#26](https://github.com/jackdempsey/sequel_polymorphic/pull/26).
|
22
|
+
Thanks to [@jnylen](https://github.com/jnylen).
|
23
|
+
|
24
|
+
* **Feature**: *make this gem compatible with Sequel 5.x.x versions*.
|
25
|
+
|
26
|
+
See previous changes in this version.
|
27
|
+
|
28
|
+
# 0.3.1 (2017-01-05)
|
2
29
|
|
3
30
|
* **Fix**: *blocks are not passed to `associate`*.
|
4
31
|
|
5
|
-
|
6
|
-
|
32
|
+
See [#21](https://github.com/jackdempsey/sequel_polymorphic/pull/21).
|
33
|
+
Thanks to [@shioyama](https://github.com/shioyama).
|
7
34
|
|
8
|
-
# 0.3.0 (2016-12-12)
|
35
|
+
# 0.3.0 (2016-12-12)
|
9
36
|
|
10
37
|
* **Feature**: *add one-to-one polymorphic associations support*.
|
11
38
|
|
data/README.md
CHANGED
@@ -140,9 +140,10 @@ module Sequel
|
|
140
140
|
:reciprocal => able,
|
141
141
|
:reciprocal_type => :one_to_one,
|
142
142
|
:conditions => {able_type => self.to_s},
|
143
|
-
:
|
144
|
-
|
145
|
-
|
143
|
+
:setter => (proc do |able_instance|
|
144
|
+
self[:"#{able}_id"] = (able_instance.pk if able_instance)
|
145
|
+
self[:"#{able}_type"] = (able_instance.class.name if able_instance)
|
146
|
+
end)
|
146
147
|
}.merge(options)
|
147
148
|
associate(:one_to_one, collection_name, association_options, &block)
|
148
149
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel_polymorphic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Dempsey
|
@@ -10,22 +10,28 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-10-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sequel
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - "
|
19
|
+
- - ">="
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 4.0.0
|
22
|
+
- - "<"
|
20
23
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
24
|
+
version: '6'
|
22
25
|
type: :runtime
|
23
26
|
prerelease: false
|
24
27
|
version_requirements: !ruby/object:Gem::Requirement
|
25
28
|
requirements:
|
26
|
-
- - "
|
29
|
+
- - ">="
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
version: 4.0.0
|
32
|
+
- - "<"
|
27
33
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
34
|
+
version: '6'
|
29
35
|
- !ruby/object:Gem::Dependency
|
30
36
|
name: minitest
|
31
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -111,9 +117,8 @@ files:
|
|
111
117
|
- CHANGELOG.md
|
112
118
|
- LICENSE
|
113
119
|
- README.md
|
114
|
-
- lib/
|
115
|
-
- lib/
|
116
|
-
- lib/sequel_polymorphic/version.rb
|
120
|
+
- lib/sequel/plugins/polymorphic.rb
|
121
|
+
- lib/sequel/plugins/polymorphic/version.rb
|
117
122
|
homepage: https://github.com/jackdempsey/sequel_polymorphic
|
118
123
|
licenses:
|
119
124
|
- MIT
|
@@ -134,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
139
|
version: '0'
|
135
140
|
requirements: []
|
136
141
|
rubyforge_project:
|
137
|
-
rubygems_version: 2.5.2
|
142
|
+
rubygems_version: 2.5.2.1
|
138
143
|
signing_key:
|
139
144
|
specification_version: 4
|
140
145
|
summary: A gem that provides Sequel::Models with polymorphic association capabilities
|
data/lib/sequel_polymorphic.rb
DELETED