edge_rider 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +99 -0
- data/.rspec +1 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +16 -6
- data/Gemfile +1 -0
- data/Gemfile.4.2.mysql2 +2 -2
- data/Gemfile.4.2.mysql2.lock +20 -20
- data/Gemfile.4.2.pg +1 -1
- data/Gemfile.4.2.pg.lock +18 -18
- data/Gemfile.5.2.mysql2 +2 -2
- data/Gemfile.5.2.mysql2.lock +6 -6
- data/Gemfile.5.2.pg +1 -1
- data/Gemfile.5.2.pg.lock +4 -4
- data/{Gemfile.6.0.pg → Gemfile.6.1.pg} +2 -2
- data/Gemfile.6.1.pg.lock +78 -0
- data/Gemfile.lock +1 -0
- data/README.md +84 -60
- data/edge_rider.gemspec +24 -16
- data/lib/edge_rider/util.rb +1 -1
- data/lib/edge_rider/version.rb +1 -1
- metadata +13 -24
- data/.travis.yml +0 -51
- data/Gemfile.3.2.mysql2 +0 -17
- data/Gemfile.3.2.mysql2.lock +0 -72
- data/Gemfile.6.0.pg.lock +0 -74
- data/spec/edge_rider/collect_column_spec.rb +0 -85
- data/spec/edge_rider/collect_ids_spec.rb +0 -108
- data/spec/edge_rider/origin_class_spec.rb +0 -32
- data/spec/edge_rider/preload_associations_spec.rb +0 -31
- data/spec/edge_rider/scoped_spec.rb +0 -53
- data/spec/edge_rider/to_id_query_spec.rb +0 -29
- data/spec/edge_rider/traverse_association_spec.rb +0 -175
- data/spec/edge_rider/util_spec.rb +0 -5
- data/spec/spec_helper.rb +0 -14
- data/spec/support/database.rb +0 -39
- data/spec/support/database.sample.yml +0 -10
- data/spec/support/database.travis.yml +0 -9
- data/spec/support/models.rb +0 -97
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac872c959e9c692146c7091a63248e501f780a8d065b15e65548a1d9a7ac4e46
|
4
|
+
data.tar.gz: '018be393dda77b87b8cf91c6466699af80baced864640e56735ddd86e6a8601b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbf53aff09715db33e03146bdca2f4277f5b89560952a853089e046fd7a1480796c2e31e046f3f4d783be38d92ed9850529c10e822ad04e4faf1b5acac9db782
|
7
|
+
data.tar.gz: b3ea5bfe76ceb8d177107bf306920bf957bda6268f34cfdedbf6e053d18133d67c4d5d51e9a641b537d74333fd576cf557c412b2e5981029dbdb6c8dddc8e664
|
@@ -0,0 +1,99 @@
|
|
1
|
+
---
|
2
|
+
name: Tests
|
3
|
+
'on':
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
jobs:
|
11
|
+
test_mysql:
|
12
|
+
runs-on: ubuntu-20.04
|
13
|
+
services:
|
14
|
+
mysql:
|
15
|
+
image: mysql:5.6
|
16
|
+
env:
|
17
|
+
MYSQL_ROOT_PASSWORD: password
|
18
|
+
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout
|
19
|
+
5s --health-retries 5
|
20
|
+
ports:
|
21
|
+
- 3306:3306
|
22
|
+
strategy:
|
23
|
+
fail-fast: false
|
24
|
+
# Rails 4.2: Ruby 2.5.7
|
25
|
+
# Rails 5.2: Ruby 2.5.7 and 2.7.4
|
26
|
+
matrix:
|
27
|
+
include:
|
28
|
+
- ruby: 2.5.7
|
29
|
+
gemfile: Gemfile.4.2.mysql2
|
30
|
+
- ruby: 2.5.7
|
31
|
+
gemfile: Gemfile.5.2.mysql2
|
32
|
+
- ruby: 2.7.4
|
33
|
+
gemfile: Gemfile.5.2.mysql2
|
34
|
+
env:
|
35
|
+
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
|
36
|
+
steps:
|
37
|
+
- uses: actions/checkout@v2
|
38
|
+
- name: Install ruby
|
39
|
+
uses: ruby/setup-ruby@v1
|
40
|
+
with:
|
41
|
+
ruby-version: "${{ matrix.ruby }}"
|
42
|
+
- name: Setup database
|
43
|
+
run: |
|
44
|
+
sudo apt-get install -y mysql-client libmariadbclient-dev
|
45
|
+
mysql -e 'create database IF NOT EXISTS test;' -u root --password=password -P 3306 -h 127.0.0.1
|
46
|
+
- name: Bundle
|
47
|
+
run: |
|
48
|
+
gem install bundler:2.2.26
|
49
|
+
bundle install --no-deployment
|
50
|
+
- name: Run tests
|
51
|
+
run: bundle exec rspec
|
52
|
+
test_pg:
|
53
|
+
runs-on: ubuntu-20.04
|
54
|
+
services:
|
55
|
+
postgres:
|
56
|
+
image: postgres
|
57
|
+
env:
|
58
|
+
POSTGRES_PASSWORD: postgres
|
59
|
+
options: "--health-cmd pg_isready --health-interval 10s --health-timeout 5s
|
60
|
+
--health-retries 5"
|
61
|
+
ports:
|
62
|
+
- 5432:5432
|
63
|
+
strategy:
|
64
|
+
fail-fast: false
|
65
|
+
# Rails 4.2: Ruby 2.5.7
|
66
|
+
# Rails 5.2: Ruby 2.5.7 and 2.7.4
|
67
|
+
# Rails 6.1: Ruby 2.5.7, 2.7.4 and 3.0.2
|
68
|
+
matrix:
|
69
|
+
include:
|
70
|
+
- ruby: 2.5.7
|
71
|
+
gemfile: Gemfile.4.2.pg
|
72
|
+
- ruby: 2.5.7
|
73
|
+
gemfile: Gemfile.5.2.pg
|
74
|
+
- ruby: 2.5.7
|
75
|
+
gemfile: Gemfile.6.1.pg
|
76
|
+
- ruby: 2.7.4
|
77
|
+
gemfile: Gemfile.5.2.pg
|
78
|
+
- ruby: 2.7.4
|
79
|
+
gemfile: Gemfile.6.1.pg
|
80
|
+
- ruby: 3.0.2
|
81
|
+
gemfile: Gemfile.6.1.pg
|
82
|
+
env:
|
83
|
+
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
|
84
|
+
steps:
|
85
|
+
- uses: actions/checkout@v2
|
86
|
+
- name: Install ruby
|
87
|
+
uses: ruby/setup-ruby@v1
|
88
|
+
with:
|
89
|
+
ruby-version: "${{ matrix.ruby }}"
|
90
|
+
- name: Setup database
|
91
|
+
run: |
|
92
|
+
sudo apt-get install -y postgresql-client
|
93
|
+
PGPASSWORD=postgres psql -c 'create database test;' -U postgres -p 5432 -h localhost
|
94
|
+
- name: Bundle
|
95
|
+
run: |
|
96
|
+
gem install bundler:2.2.26
|
97
|
+
bundle install --no-deployment
|
98
|
+
- name: Run tests
|
99
|
+
run: bundle exec rspec
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.5.
|
1
|
+
2.5.7
|
data/CHANGELOG.md
CHANGED
@@ -6,28 +6,38 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
6
6
|
## Unreleased
|
7
7
|
|
8
8
|
### Breaking changes
|
9
|
-
-
|
10
9
|
|
11
10
|
### Compatible changes
|
12
|
-
-
|
13
11
|
|
14
|
-
|
12
|
+
|
13
|
+
## 1.1.0 - 2021-08-24
|
14
|
+
|
15
|
+
### Breaking changes
|
16
|
+
- Drop support for Ruby < 2.5.0
|
17
|
+
|
18
|
+
### Compatible changes
|
19
|
+
- Add support for Rails 6.1
|
20
|
+
|
21
|
+
|
22
|
+
## 1.1.0 - 2019-12-13
|
15
23
|
|
16
24
|
### Compatible changes
|
17
25
|
- Add `preload_association` at instance level. Example: `user.preload_associations(:posts)`
|
18
26
|
- Add support for polymorphic associations in `traverse_association`.
|
19
27
|
|
20
|
-
|
28
|
+
|
29
|
+
## 1.0.0- 2019-06-12
|
21
30
|
|
22
31
|
### Breaking changes
|
23
|
-
- Remove support for Ruby
|
32
|
+
- Remove support for Ruby 2.2
|
24
33
|
- Remove support for Rails 2.3
|
25
34
|
|
26
35
|
### Compatible changes
|
27
36
|
- Add support for Ruby 2.5.3
|
28
37
|
- Add support for Rails 6.0.0.rc1
|
29
38
|
|
30
|
-
|
39
|
+
|
40
|
+
## 0.3.3 - 2018-08-29
|
31
41
|
|
32
42
|
### Compatible changes
|
33
43
|
|
data/Gemfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Gemfile.6.1.pg
|
data/Gemfile.4.2.mysql2
CHANGED
@@ -2,14 +2,14 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
# Runtime dependencies
|
4
4
|
gem 'activerecord', '~>4.2.0'
|
5
|
-
gem 'mysql2', '~>
|
5
|
+
gem 'mysql2', '~>0.4.10'
|
6
6
|
|
7
7
|
# Development dependencies
|
8
8
|
gem 'rake'
|
9
9
|
gem 'database_cleaner'
|
10
10
|
gem 'has_defaults' # used by test models
|
11
11
|
gem 'rspec'
|
12
|
-
gem 'gemika'
|
12
|
+
gem 'gemika', '>=0.5.0'
|
13
13
|
gem 'pry-byebug'
|
14
14
|
|
15
15
|
# Gem under test
|
data/Gemfile.4.2.mysql2.lock
CHANGED
@@ -1,39 +1,39 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
edge_rider (
|
4
|
+
edge_rider (2.0.0)
|
5
5
|
activerecord (>= 3.2)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (4.2.
|
11
|
-
activesupport (= 4.2.
|
10
|
+
activemodel (4.2.11)
|
11
|
+
activesupport (= 4.2.11)
|
12
12
|
builder (~> 3.1)
|
13
|
-
activerecord (4.2.
|
14
|
-
activemodel (= 4.2.
|
15
|
-
activesupport (= 4.2.
|
13
|
+
activerecord (4.2.11)
|
14
|
+
activemodel (= 4.2.11)
|
15
|
+
activesupport (= 4.2.11)
|
16
16
|
arel (~> 6.0)
|
17
|
-
activesupport (4.2.
|
17
|
+
activesupport (4.2.11)
|
18
18
|
i18n (~> 0.7)
|
19
|
-
json (~> 1.7, >= 1.7.7)
|
20
19
|
minitest (~> 5.1)
|
21
20
|
thread_safe (~> 0.3, >= 0.3.4)
|
22
21
|
tzinfo (~> 1.1)
|
23
|
-
arel (6.0.
|
24
|
-
builder (3.2.
|
22
|
+
arel (6.0.4)
|
23
|
+
builder (3.2.4)
|
25
24
|
byebug (10.0.2)
|
26
25
|
coderay (1.1.2)
|
26
|
+
concurrent-ruby (1.1.9)
|
27
27
|
database_cleaner (1.0.1)
|
28
28
|
diff-lcs (1.2.5)
|
29
|
-
gemika (0.
|
29
|
+
gemika (0.6.1)
|
30
30
|
has_defaults (0.4.4)
|
31
31
|
activerecord
|
32
|
-
i18n (0.
|
33
|
-
|
32
|
+
i18n (0.9.5)
|
33
|
+
concurrent-ruby (~> 1.0)
|
34
34
|
method_source (0.9.2)
|
35
|
-
minitest (5.
|
36
|
-
mysql2 (0.
|
35
|
+
minitest (5.14.4)
|
36
|
+
mysql2 (0.4.10)
|
37
37
|
pry (0.12.2)
|
38
38
|
coderay (~> 1.1.0)
|
39
39
|
method_source (~> 0.9.0)
|
@@ -54,8 +54,8 @@ GEM
|
|
54
54
|
diff-lcs (>= 1.2.0, < 2.0)
|
55
55
|
rspec-support (~> 3.5.0)
|
56
56
|
rspec-support (3.5.0)
|
57
|
-
thread_safe (0.3.
|
58
|
-
tzinfo (1.2.
|
57
|
+
thread_safe (0.3.6)
|
58
|
+
tzinfo (1.2.9)
|
59
59
|
thread_safe (~> 0.1)
|
60
60
|
|
61
61
|
PLATFORMS
|
@@ -65,12 +65,12 @@ DEPENDENCIES
|
|
65
65
|
activerecord (~> 4.2.0)
|
66
66
|
database_cleaner
|
67
67
|
edge_rider!
|
68
|
-
gemika
|
68
|
+
gemika (>= 0.5.0)
|
69
69
|
has_defaults
|
70
|
-
mysql2 (~> 0.
|
70
|
+
mysql2 (~> 0.4.10)
|
71
71
|
pry-byebug
|
72
72
|
rake
|
73
73
|
rspec
|
74
74
|
|
75
75
|
BUNDLED WITH
|
76
|
-
|
76
|
+
2.2.26
|
data/Gemfile.4.2.pg
CHANGED
data/Gemfile.4.2.pg.lock
CHANGED
@@ -1,38 +1,38 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
edge_rider (
|
4
|
+
edge_rider (2.0.0)
|
5
5
|
activerecord (>= 3.2)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (4.2.
|
11
|
-
activesupport (= 4.2.
|
10
|
+
activemodel (4.2.11)
|
11
|
+
activesupport (= 4.2.11)
|
12
12
|
builder (~> 3.1)
|
13
|
-
activerecord (4.2.
|
14
|
-
activemodel (= 4.2.
|
15
|
-
activesupport (= 4.2.
|
13
|
+
activerecord (4.2.11)
|
14
|
+
activemodel (= 4.2.11)
|
15
|
+
activesupport (= 4.2.11)
|
16
16
|
arel (~> 6.0)
|
17
|
-
activesupport (4.2.
|
17
|
+
activesupport (4.2.11)
|
18
18
|
i18n (~> 0.7)
|
19
|
-
json (~> 1.7, >= 1.7.7)
|
20
19
|
minitest (~> 5.1)
|
21
20
|
thread_safe (~> 0.3, >= 0.3.4)
|
22
21
|
tzinfo (~> 1.1)
|
23
|
-
arel (6.0.
|
24
|
-
builder (3.2.
|
22
|
+
arel (6.0.4)
|
23
|
+
builder (3.2.4)
|
25
24
|
byebug (10.0.2)
|
26
25
|
coderay (1.1.2)
|
26
|
+
concurrent-ruby (1.1.9)
|
27
27
|
database_cleaner (1.5.3)
|
28
28
|
diff-lcs (1.2.5)
|
29
|
-
gemika (0.
|
29
|
+
gemika (0.6.1)
|
30
30
|
has_defaults (0.4.4)
|
31
31
|
activerecord
|
32
|
-
i18n (0.
|
33
|
-
|
32
|
+
i18n (0.9.5)
|
33
|
+
concurrent-ruby (~> 1.0)
|
34
34
|
method_source (0.9.2)
|
35
|
-
minitest (5.
|
35
|
+
minitest (5.14.4)
|
36
36
|
pg (0.19.0)
|
37
37
|
pry (0.12.2)
|
38
38
|
coderay (~> 1.1.0)
|
@@ -54,8 +54,8 @@ GEM
|
|
54
54
|
diff-lcs (>= 1.2.0, < 2.0)
|
55
55
|
rspec-support (~> 3.5.0)
|
56
56
|
rspec-support (3.5.0)
|
57
|
-
thread_safe (0.3.
|
58
|
-
tzinfo (1.2.
|
57
|
+
thread_safe (0.3.6)
|
58
|
+
tzinfo (1.2.9)
|
59
59
|
thread_safe (~> 0.1)
|
60
60
|
|
61
61
|
PLATFORMS
|
@@ -65,7 +65,7 @@ DEPENDENCIES
|
|
65
65
|
activerecord (~> 4.2.0)
|
66
66
|
database_cleaner
|
67
67
|
edge_rider!
|
68
|
-
gemika
|
68
|
+
gemika (>= 0.5.0)
|
69
69
|
has_defaults
|
70
70
|
pg
|
71
71
|
pry-byebug
|
@@ -73,4 +73,4 @@ DEPENDENCIES
|
|
73
73
|
rspec
|
74
74
|
|
75
75
|
BUNDLED WITH
|
76
|
-
|
76
|
+
2.2.26
|
data/Gemfile.5.2.mysql2
CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
# Runtime dependencies
|
4
4
|
gem 'activerecord', '~>5.2.3'
|
5
|
-
gem 'mysql2'
|
5
|
+
gem 'mysql2', '~>0.4.10'
|
6
6
|
gem 'i18n', '<=1.5.1' # Required to support tests for Ruby 2.2.x
|
7
7
|
|
8
8
|
# Development dependencies
|
@@ -10,7 +10,7 @@ gem 'rake'
|
|
10
10
|
gem 'database_cleaner'
|
11
11
|
gem 'rspec'
|
12
12
|
gem 'has_defaults' # used by test models
|
13
|
-
gem 'gemika'
|
13
|
+
gem 'gemika', '>=0.5.0'
|
14
14
|
gem 'pry-byebug'
|
15
15
|
|
16
16
|
# Gem under test
|
data/Gemfile.5.2.mysql2.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
edge_rider (
|
4
|
+
edge_rider (2.0.0)
|
5
5
|
activerecord (>= 3.2)
|
6
6
|
|
7
7
|
GEM
|
@@ -24,14 +24,14 @@ GEM
|
|
24
24
|
concurrent-ruby (1.1.5)
|
25
25
|
database_cleaner (1.6.1)
|
26
26
|
diff-lcs (1.3)
|
27
|
-
gemika (0.
|
27
|
+
gemika (0.5.0)
|
28
28
|
has_defaults (0.4.4)
|
29
29
|
activerecord
|
30
30
|
i18n (1.5.1)
|
31
31
|
concurrent-ruby (~> 1.0)
|
32
32
|
method_source (0.9.2)
|
33
33
|
minitest (5.11.3)
|
34
|
-
mysql2 (0.4.
|
34
|
+
mysql2 (0.4.10)
|
35
35
|
pry (0.12.2)
|
36
36
|
coderay (~> 1.1.0)
|
37
37
|
method_source (~> 0.9.0)
|
@@ -63,13 +63,13 @@ DEPENDENCIES
|
|
63
63
|
activerecord (~> 5.2.3)
|
64
64
|
database_cleaner
|
65
65
|
edge_rider!
|
66
|
-
gemika
|
66
|
+
gemika (>= 0.5.0)
|
67
67
|
has_defaults
|
68
68
|
i18n (<= 1.5.1)
|
69
|
-
mysql2
|
69
|
+
mysql2 (~> 0.4.10)
|
70
70
|
pry-byebug
|
71
71
|
rake
|
72
72
|
rspec
|
73
73
|
|
74
74
|
BUNDLED WITH
|
75
|
-
|
75
|
+
2.2.26
|
data/Gemfile.5.2.pg
CHANGED
data/Gemfile.5.2.pg.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
edge_rider (
|
4
|
+
edge_rider (2.0.0)
|
5
5
|
activerecord (>= 3.2)
|
6
6
|
|
7
7
|
GEM
|
@@ -24,7 +24,7 @@ GEM
|
|
24
24
|
concurrent-ruby (1.1.5)
|
25
25
|
database_cleaner (1.6.1)
|
26
26
|
diff-lcs (1.3)
|
27
|
-
gemika (0.
|
27
|
+
gemika (0.5.0)
|
28
28
|
has_defaults (0.4.4)
|
29
29
|
activerecord
|
30
30
|
i18n (1.5.1)
|
@@ -63,7 +63,7 @@ DEPENDENCIES
|
|
63
63
|
activerecord (~> 5.2.3)
|
64
64
|
database_cleaner
|
65
65
|
edge_rider!
|
66
|
-
gemika
|
66
|
+
gemika (>= 0.5.0)
|
67
67
|
has_defaults
|
68
68
|
i18n (<= 1.5.1)
|
69
69
|
pg
|
@@ -72,4 +72,4 @@ DEPENDENCIES
|
|
72
72
|
rspec
|
73
73
|
|
74
74
|
BUNDLED WITH
|
75
|
-
|
75
|
+
2.2.26
|