relation 0.3.1 → 0.3.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/.gitignore +10 -13
- data/.ruby-version +1 -1
- data/.travis.yml +10 -9
- data/Appraisals +8 -8
- data/Gemfile +7 -1
- data/Gemfile.lock +59 -60
- data/MIT-LICENSE +1 -1
- data/README.md +10 -4
- data/gemfiles/rails_5.2.gemfile +5 -0
- data/lib/relation/version.rb +3 -2
- metadata +3 -6
- data/gemfiles/rails_5.0.gemfile +0 -7
- data/gemfiles/rails_5.1.gemfile +0 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6af933150f769ef1b3ea7ebcabd92d9849daff067c609b7035641fe07f8a3405
|
|
4
|
+
data.tar.gz: b19581aea5a5570d839e2ff05e156f2f8e8b72f30a504824c7db9a07120b71d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d5ffa2ff55b51d48a8c8b7dc33cfd977ad922be836af587cfb5b9e6912f2684267a1dc2db71929a3f3e1406cc43e87e7cf4f677197f45ccff15a7e633795637f
|
|
7
|
+
data.tar.gz: 61851fc597c04808de3dabb5ac05b4299cf2928763879bd92e6fbdc8cb2f07abcd993a7ea1ddb369ef6e6064f23aa4c1ee798da8d338b08386b276cd8cef2466
|
data/.gitignore
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Gemfile.lock
|
|
4
|
-
gemfiles/*.lock
|
|
5
|
-
coverage/*
|
|
6
|
-
pkg/*
|
|
7
|
-
|
|
8
|
-
# Ignore the default SQLite database.
|
|
9
|
-
/db/*.sqlite3
|
|
10
|
-
/db/*.sqlite3-journal
|
|
1
|
+
.bundle/
|
|
2
|
+
coverage/
|
|
11
3
|
|
|
12
|
-
|
|
13
|
-
log
|
|
14
|
-
|
|
4
|
+
*.gem
|
|
5
|
+
*.log
|
|
6
|
+
*.lock
|
|
7
|
+
*.sqlite3
|
|
8
|
+
**/*.gem
|
|
9
|
+
**/*.log
|
|
10
|
+
**/*.lock
|
|
11
|
+
**/*.sqlite3
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ruby-2.
|
|
1
|
+
ruby-2.6.1
|
data/.travis.yml
CHANGED
|
@@ -13,8 +13,9 @@ bundler_args: --without production
|
|
|
13
13
|
#bundler_args: --without development
|
|
14
14
|
|
|
15
15
|
rvm:
|
|
16
|
-
- 2.
|
|
17
|
-
- 2.5.
|
|
16
|
+
- 2.6.1 # 2019-03-05
|
|
17
|
+
# - 2.5.1 # 2018-04-27
|
|
18
|
+
# - 2.5.0 # 2018-02-22
|
|
18
19
|
# - 2.4.1 # tested: working for Rails 5
|
|
19
20
|
# - 2.3.1 # tested: working for Rails 5
|
|
20
21
|
# - 2.2.7 # tested: working for Rails 5
|
|
@@ -22,16 +23,16 @@ rvm:
|
|
|
22
23
|
|
|
23
24
|
gemfile:
|
|
24
25
|
- gemfiles/rails_5.2.gemfile
|
|
25
|
-
- gemfiles/rails_5.1.gemfile
|
|
26
|
-
- gemfiles/rails_5.0.gemfile
|
|
26
|
+
# - gemfiles/rails_5.1.gemfile
|
|
27
|
+
# - gemfiles/rails_5.0.gemfile
|
|
27
28
|
# - gemfiles/rails_4.gemfile
|
|
28
29
|
|
|
29
30
|
notifications:
|
|
30
31
|
email: false
|
|
31
32
|
|
|
32
33
|
matrix:
|
|
33
|
-
allow_failures:
|
|
34
|
-
- gemfile: gemfiles/rails_5.0.gemfile
|
|
35
|
-
rvm: 2.2.0
|
|
36
|
-
- gemfile: gemfiles/rails_5.1.gemfile
|
|
37
|
-
rvm: 2.2.0
|
|
34
|
+
# allow_failures:
|
|
35
|
+
# - gemfile: gemfiles/rails_5.0.gemfile
|
|
36
|
+
# rvm: 2.2.0
|
|
37
|
+
# - gemfile: gemfiles/rails_5.1.gemfile
|
|
38
|
+
# rvm: 2.2.0
|
data/Appraisals
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
appraise 'rails-5.0' do
|
|
2
|
-
gem 'rails', '~> 5.0.0'
|
|
3
|
-
end
|
|
4
|
-
|
|
5
|
-
appraise 'rails-5.1' do
|
|
6
|
-
gem 'rails', '~> 5.1'
|
|
7
|
-
end
|
|
8
|
-
|
|
9
1
|
appraise 'rails-5.2' do
|
|
10
2
|
gem 'rails', '~> 5.2.0'
|
|
11
3
|
end
|
|
4
|
+
|
|
5
|
+
#appraise 'rails-5.0' do
|
|
6
|
+
# gem 'rails', '~> 5.0.0'
|
|
7
|
+
#end
|
|
8
|
+
#
|
|
9
|
+
#appraise 'rails-5.1' do
|
|
10
|
+
# gem 'rails', '~> 5.1'
|
|
11
|
+
#end
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
relation (0.3.
|
|
4
|
+
relation (0.3.2)
|
|
5
5
|
activerecord (~> 5)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
actioncable (5.2.
|
|
11
|
-
actionpack (= 5.2.
|
|
10
|
+
actioncable (5.2.2)
|
|
11
|
+
actionpack (= 5.2.2)
|
|
12
12
|
nio4r (~> 2.0)
|
|
13
13
|
websocket-driver (>= 0.6.1)
|
|
14
|
-
actionmailer (5.2.
|
|
15
|
-
actionpack (= 5.2.
|
|
16
|
-
actionview (= 5.2.
|
|
17
|
-
activejob (= 5.2.
|
|
14
|
+
actionmailer (5.2.2)
|
|
15
|
+
actionpack (= 5.2.2)
|
|
16
|
+
actionview (= 5.2.2)
|
|
17
|
+
activejob (= 5.2.2)
|
|
18
18
|
mail (~> 2.5, >= 2.5.4)
|
|
19
19
|
rails-dom-testing (~> 2.0)
|
|
20
|
-
actionpack (5.2.
|
|
21
|
-
actionview (= 5.2.
|
|
22
|
-
activesupport (= 5.2.
|
|
20
|
+
actionpack (5.2.2)
|
|
21
|
+
actionview (= 5.2.2)
|
|
22
|
+
activesupport (= 5.2.2)
|
|
23
23
|
rack (~> 2.0)
|
|
24
24
|
rack-test (>= 0.6.3)
|
|
25
25
|
rails-dom-testing (~> 2.0)
|
|
26
26
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
|
27
|
-
actionview (5.2.
|
|
28
|
-
activesupport (= 5.2.
|
|
27
|
+
actionview (5.2.2)
|
|
28
|
+
activesupport (= 5.2.2)
|
|
29
29
|
builder (~> 3.1)
|
|
30
30
|
erubi (~> 1.4)
|
|
31
31
|
rails-dom-testing (~> 2.0)
|
|
32
32
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
|
33
|
-
activejob (5.2.
|
|
34
|
-
activesupport (= 5.2.
|
|
33
|
+
activejob (5.2.2)
|
|
34
|
+
activesupport (= 5.2.2)
|
|
35
35
|
globalid (>= 0.3.6)
|
|
36
|
-
activemodel (5.2.
|
|
37
|
-
activesupport (= 5.2.
|
|
38
|
-
activerecord (5.2.
|
|
39
|
-
activemodel (= 5.2.
|
|
40
|
-
activesupport (= 5.2.
|
|
36
|
+
activemodel (5.2.2)
|
|
37
|
+
activesupport (= 5.2.2)
|
|
38
|
+
activerecord (5.2.2)
|
|
39
|
+
activemodel (= 5.2.2)
|
|
40
|
+
activesupport (= 5.2.2)
|
|
41
41
|
arel (>= 9.0)
|
|
42
|
-
activestorage (5.2.
|
|
43
|
-
actionpack (= 5.2.
|
|
44
|
-
activerecord (= 5.2.
|
|
42
|
+
activestorage (5.2.2)
|
|
43
|
+
actionpack (= 5.2.2)
|
|
44
|
+
activerecord (= 5.2.2)
|
|
45
45
|
marcel (~> 0.3.1)
|
|
46
|
-
activesupport (5.2.
|
|
46
|
+
activesupport (5.2.2)
|
|
47
47
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
48
48
|
i18n (>= 0.7, < 2)
|
|
49
49
|
minitest (~> 5.1)
|
|
@@ -54,58 +54,59 @@ GEM
|
|
|
54
54
|
thor (>= 0.14.0)
|
|
55
55
|
arel (9.0.0)
|
|
56
56
|
builder (3.2.3)
|
|
57
|
-
concurrent-ruby (1.
|
|
57
|
+
concurrent-ruby (1.1.4)
|
|
58
58
|
crass (1.0.4)
|
|
59
59
|
docile (1.3.1)
|
|
60
|
-
erubi (1.
|
|
61
|
-
globalid (0.4.
|
|
60
|
+
erubi (1.8.0)
|
|
61
|
+
globalid (0.4.2)
|
|
62
62
|
activesupport (>= 4.2.0)
|
|
63
|
-
i18n (1.0
|
|
63
|
+
i18n (1.6.0)
|
|
64
64
|
concurrent-ruby (~> 1.0)
|
|
65
|
-
json (2.
|
|
66
|
-
loofah (2.2.
|
|
65
|
+
json (2.2.0)
|
|
66
|
+
loofah (2.2.3)
|
|
67
67
|
crass (~> 1.0.2)
|
|
68
68
|
nokogiri (>= 1.5.9)
|
|
69
|
-
mail (2.7.
|
|
69
|
+
mail (2.7.1)
|
|
70
70
|
mini_mime (>= 0.1.1)
|
|
71
|
-
marcel (0.3.
|
|
71
|
+
marcel (0.3.3)
|
|
72
72
|
mimemagic (~> 0.3.2)
|
|
73
|
-
method_source (0.9.
|
|
74
|
-
mimemagic (0.3.
|
|
75
|
-
mini_mime (1.0.
|
|
76
|
-
mini_portile2 (2.
|
|
73
|
+
method_source (0.9.2)
|
|
74
|
+
mimemagic (0.3.3)
|
|
75
|
+
mini_mime (1.0.1)
|
|
76
|
+
mini_portile2 (2.4.0)
|
|
77
77
|
minitest (5.11.3)
|
|
78
78
|
nio4r (2.3.1)
|
|
79
|
-
nokogiri (1.
|
|
80
|
-
mini_portile2 (~> 2.
|
|
81
|
-
|
|
79
|
+
nokogiri (1.10.1)
|
|
80
|
+
mini_portile2 (~> 2.4.0)
|
|
81
|
+
observr (1.0.5)
|
|
82
|
+
rack (2.0.6)
|
|
82
83
|
rack-test (1.1.0)
|
|
83
84
|
rack (>= 1.0, < 3)
|
|
84
|
-
rails (5.2.
|
|
85
|
-
actioncable (= 5.2.
|
|
86
|
-
actionmailer (= 5.2.
|
|
87
|
-
actionpack (= 5.2.
|
|
88
|
-
actionview (= 5.2.
|
|
89
|
-
activejob (= 5.2.
|
|
90
|
-
activemodel (= 5.2.
|
|
91
|
-
activerecord (= 5.2.
|
|
92
|
-
activestorage (= 5.2.
|
|
93
|
-
activesupport (= 5.2.
|
|
85
|
+
rails (5.2.2)
|
|
86
|
+
actioncable (= 5.2.2)
|
|
87
|
+
actionmailer (= 5.2.2)
|
|
88
|
+
actionpack (= 5.2.2)
|
|
89
|
+
actionview (= 5.2.2)
|
|
90
|
+
activejob (= 5.2.2)
|
|
91
|
+
activemodel (= 5.2.2)
|
|
92
|
+
activerecord (= 5.2.2)
|
|
93
|
+
activestorage (= 5.2.2)
|
|
94
|
+
activesupport (= 5.2.2)
|
|
94
95
|
bundler (>= 1.3.0)
|
|
95
|
-
railties (= 5.2.
|
|
96
|
+
railties (= 5.2.2)
|
|
96
97
|
sprockets-rails (>= 2.0.0)
|
|
97
98
|
rails-dom-testing (2.0.3)
|
|
98
99
|
activesupport (>= 4.2.0)
|
|
99
100
|
nokogiri (>= 1.6)
|
|
100
101
|
rails-html-sanitizer (1.0.4)
|
|
101
102
|
loofah (~> 2.2, >= 2.2.2)
|
|
102
|
-
railties (5.2.
|
|
103
|
-
actionpack (= 5.2.
|
|
104
|
-
activesupport (= 5.2.
|
|
103
|
+
railties (5.2.2)
|
|
104
|
+
actionpack (= 5.2.2)
|
|
105
|
+
activesupport (= 5.2.2)
|
|
105
106
|
method_source
|
|
106
107
|
rake (>= 0.8.7)
|
|
107
|
-
thor (>= 0.
|
|
108
|
-
rake (12.3.
|
|
108
|
+
thor (>= 0.19.0, < 2.0)
|
|
109
|
+
rake (12.3.2)
|
|
109
110
|
simplecov (0.16.1)
|
|
110
111
|
docile (~> 1.1)
|
|
111
112
|
json (>= 1.8, < 3)
|
|
@@ -119,7 +120,7 @@ GEM
|
|
|
119
120
|
activesupport (>= 4.0)
|
|
120
121
|
sprockets (>= 3.0.0)
|
|
121
122
|
sqlite3 (1.3.13)
|
|
122
|
-
thor (0.20.
|
|
123
|
+
thor (0.20.3)
|
|
123
124
|
thread_safe (0.3.6)
|
|
124
125
|
tzinfo (1.2.5)
|
|
125
126
|
thread_safe (~> 0.1)
|
|
@@ -134,14 +135,12 @@ DEPENDENCIES
|
|
|
134
135
|
appraisal
|
|
135
136
|
bundler
|
|
136
137
|
minitest
|
|
138
|
+
observr
|
|
137
139
|
rails
|
|
138
140
|
rake
|
|
139
141
|
relation!
|
|
140
142
|
simplecov
|
|
141
|
-
sqlite3
|
|
142
|
-
|
|
143
|
-
RUBY VERSION
|
|
144
|
-
ruby 2.5.1p57
|
|
143
|
+
sqlite3 (!= 1.4.0)
|
|
145
144
|
|
|
146
145
|
BUNDLED WITH
|
|
147
|
-
1.
|
|
146
|
+
1.17.2
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
[](http://badge.fury.io/rb/relation)
|
|
3
3
|
[](https://travis-ci.org/matique/relation)
|
|
4
4
|
|
|
5
|
-
Relation
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
AFAIK, Relation can replace all kind of relationships in a Rails database.
|
|
6
|
+
The gem stores the relationships in a additional table (named
|
|
7
|
+
"relations") containing
|
|
8
|
+
triples (name of relationship, from:id, to_id).
|
|
9
|
+
No additional column/field is required in a particular tables.
|
|
10
|
+
Adding/removing a relationship do not required a migration.
|
|
11
|
+
|
|
12
|
+
Is it recommendable? Well, you should know.
|
|
13
|
+
In particular, the automagic of Rails associations is not available
|
|
14
|
+
for this gem.
|
|
9
15
|
|
|
10
16
|
A habtm (has and belong to many) association of Rails requires an
|
|
11
17
|
additional table containing the id's of the associated records.
|
data/gemfiles/rails_5.2.gemfile
CHANGED
data/lib/relation/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dittmar Krall
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-03-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -131,8 +131,6 @@ files:
|
|
|
131
131
|
- app/models/relation.rb
|
|
132
132
|
- app/models/relation_ext.rb
|
|
133
133
|
- db/migrate/20150810152808_relation.rb
|
|
134
|
-
- gemfiles/rails_5.0.gemfile
|
|
135
|
-
- gemfiles/rails_5.1.gemfile
|
|
136
134
|
- gemfiles/rails_5.2.gemfile
|
|
137
135
|
- lib/relation.rb
|
|
138
136
|
- lib/relation/engine.rb
|
|
@@ -163,8 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
163
161
|
- !ruby/object:Gem::Version
|
|
164
162
|
version: '0'
|
|
165
163
|
requirements: []
|
|
166
|
-
|
|
167
|
-
rubygems_version: 2.7.6
|
|
164
|
+
rubygems_version: 3.0.1
|
|
168
165
|
signing_key:
|
|
169
166
|
specification_version: 4
|
|
170
167
|
summary: Provides a simple directed relationship between active_record models.
|
data/gemfiles/rails_5.0.gemfile
DELETED