minidusen 0.9 → 0.10
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/.github/workflows/test.yml +96 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +20 -0
- data/Gemfile.4.2.mysql2 +1 -1
- data/Gemfile.4.2.mysql2.lock +7 -7
- data/Gemfile.4.2.pg.lock +5 -5
- data/Gemfile.5.2.mysql2.lock +5 -5
- data/Gemfile.5.2.pg.lock +5 -5
- data/Gemfile.6.0.mysql2 +1 -1
- data/Gemfile.6.0.mysql2.lock +17 -17
- data/Gemfile.6.0.pg +1 -1
- data/Gemfile.6.0.pg.lock +17 -17
- data/{Gemfile.3.2.mysql2 → Gemfile.6.1.mysql2} +3 -4
- data/Gemfile.6.1.mysql2.lock +71 -0
- data/Gemfile.6.1.pg +15 -0
- data/Gemfile.6.1.pg.lock +71 -0
- data/README.md +43 -7
- data/lib/minidusen/version.rb +1 -1
- data/spec/support/database.github.yml +13 -0
- metadata +9 -7
- data/.travis.yml +0 -67
- data/Gemfile.3.2.mysql2.lock +0 -65
- data/spec/support/database.travis.yml +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae10acf35f7691ee887031d0dcccc455925315768b876a7eea142b4c84bc423b
|
|
4
|
+
data.tar.gz: '061389e69fadb5cc996ca2e35ccf891c9bc31a8abb70296e05f11d9a4cb0a428'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e9f51c132887a664558f78deac9c029395bc7f4078bbba3c3f714fef4ce073963febeab68335235b18a0b97ea0ed39af33b539c9cbaf6dc2ebe2a57adea2b66
|
|
7
|
+
data.tar.gz: d9451548713b09f93cf80e97b9cfaa47b519b3763cf1c0442e48a289cef85a81b43f5a7808083abe96577b87f6b4f6740a5b8729b658d812856c43f5e27bd8ea
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
matrix:
|
|
25
|
+
include:
|
|
26
|
+
- ruby: 2.5.8
|
|
27
|
+
gemfile: Gemfile.4.2.mysql2
|
|
28
|
+
- ruby: 2.5.8
|
|
29
|
+
gemfile: Gemfile.5.2.mysql2
|
|
30
|
+
- ruby: 2.5.8
|
|
31
|
+
gemfile: Gemfile.6.0.mysql2
|
|
32
|
+
- ruby: 2.5.8
|
|
33
|
+
gemfile: Gemfile.6.1.mysql2
|
|
34
|
+
- ruby: 3.0.0
|
|
35
|
+
gemfile: Gemfile.6.1.mysql2
|
|
36
|
+
env:
|
|
37
|
+
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v2
|
|
40
|
+
- name: Install ruby
|
|
41
|
+
uses: ruby/setup-ruby@v1
|
|
42
|
+
with:
|
|
43
|
+
ruby-version: "${{ matrix.ruby }}"
|
|
44
|
+
- name: Setup database
|
|
45
|
+
run: |
|
|
46
|
+
sudo apt-get install -y mysql-client libmariadbclient-dev
|
|
47
|
+
mysql -e 'create database IF NOT EXISTS test;' -u root --password=password -P 3306 -h 127.0.0.1
|
|
48
|
+
- name: Bundle
|
|
49
|
+
run: |
|
|
50
|
+
gem install bundler:1.17.3
|
|
51
|
+
bundle install --no-deployment
|
|
52
|
+
- name: Run tests
|
|
53
|
+
run: bundle exec rspec
|
|
54
|
+
test_pg:
|
|
55
|
+
runs-on: ubuntu-20.04
|
|
56
|
+
services:
|
|
57
|
+
postgres:
|
|
58
|
+
image: postgres
|
|
59
|
+
env:
|
|
60
|
+
POSTGRES_PASSWORD: postgres
|
|
61
|
+
options: "--health-cmd pg_isready --health-interval 10s --health-timeout 5s
|
|
62
|
+
--health-retries 5"
|
|
63
|
+
ports:
|
|
64
|
+
- 5432:5432
|
|
65
|
+
strategy:
|
|
66
|
+
fail-fast: false
|
|
67
|
+
matrix:
|
|
68
|
+
include:
|
|
69
|
+
- ruby: 2.5.8
|
|
70
|
+
gemfile: Gemfile.4.2.pg
|
|
71
|
+
- ruby: 2.5.8
|
|
72
|
+
gemfile: Gemfile.5.2.pg
|
|
73
|
+
- ruby: 2.5.8
|
|
74
|
+
gemfile: Gemfile.6.0.pg
|
|
75
|
+
- ruby: 2.5.8
|
|
76
|
+
gemfile: Gemfile.6.1.pg
|
|
77
|
+
- ruby: 3.0.0
|
|
78
|
+
gemfile: Gemfile.6.1.pg
|
|
79
|
+
env:
|
|
80
|
+
BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
|
|
81
|
+
steps:
|
|
82
|
+
- uses: actions/checkout@v2
|
|
83
|
+
- name: Install ruby
|
|
84
|
+
uses: ruby/setup-ruby@v1
|
|
85
|
+
with:
|
|
86
|
+
ruby-version: "${{ matrix.ruby }}"
|
|
87
|
+
- name: Setup database
|
|
88
|
+
run: |
|
|
89
|
+
sudo apt-get install -y postgresql-client
|
|
90
|
+
PGPASSWORD=postgres psql -c 'create database test;' -U postgres -p 5432 -h localhost
|
|
91
|
+
- name: Bundle
|
|
92
|
+
run: |
|
|
93
|
+
gem install bundler:1.17.3
|
|
94
|
+
bundle install --no-deployment
|
|
95
|
+
- name: Run tests
|
|
96
|
+
run: bundle exec rspec
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.5.8
|
data/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,26 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
|
12
12
|
|
|
13
13
|
### Compatible changes
|
|
14
14
|
|
|
15
|
+
|
|
16
|
+
## 0.10.0 2021-08-11
|
|
17
|
+
|
|
18
|
+
### Breaking changes
|
|
19
|
+
|
|
20
|
+
-
|
|
21
|
+
|
|
22
|
+
### Compatible changes
|
|
23
|
+
|
|
24
|
+
- Remove Rails 3.2 and Ruby < 2.5 from test matrix
|
|
25
|
+
- Add Rails 6.1 and Ruby 3.0 to test matrix
|
|
26
|
+
|
|
27
|
+
## 0.9.0 2019-06-12
|
|
28
|
+
|
|
29
|
+
### Breaking changes
|
|
30
|
+
|
|
31
|
+
-
|
|
32
|
+
|
|
33
|
+
### Compatible changes
|
|
34
|
+
|
|
15
35
|
- CHANGELOG to satisfy [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) format.
|
|
16
36
|
- Use Rails 5.2 for tests instead of Rails 5.0
|
|
17
37
|
- Added Ruby 2.5.3 to test matrix
|
data/Gemfile.4.2.mysql2
CHANGED
data/Gemfile.4.2.mysql2.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
minidusen (0.
|
|
4
|
+
minidusen (0.10)
|
|
5
5
|
activerecord (>= 3.2)
|
|
6
6
|
activesupport (>= 3.2)
|
|
7
7
|
edge_rider (>= 0.2.5)
|
|
@@ -27,13 +27,13 @@ GEM
|
|
|
27
27
|
byebug (9.0.5)
|
|
28
28
|
database_cleaner (1.5.3)
|
|
29
29
|
diff-lcs (1.2.5)
|
|
30
|
-
edge_rider (1.
|
|
31
|
-
activerecord
|
|
32
|
-
gemika (0.
|
|
30
|
+
edge_rider (1.1.0)
|
|
31
|
+
activerecord (>= 3.2)
|
|
32
|
+
gemika (0.5.0)
|
|
33
33
|
i18n (0.7.0)
|
|
34
|
-
json (1.8.
|
|
34
|
+
json (1.8.6)
|
|
35
35
|
minitest (5.9.0)
|
|
36
|
-
mysql2 (0.
|
|
36
|
+
mysql2 (0.4.10)
|
|
37
37
|
rake (11.3.0)
|
|
38
38
|
rspec (3.5.0)
|
|
39
39
|
rspec-core (~> 3.5.0)
|
|
@@ -61,7 +61,7 @@ DEPENDENCIES
|
|
|
61
61
|
database_cleaner
|
|
62
62
|
gemika
|
|
63
63
|
minidusen!
|
|
64
|
-
mysql2 (~> 0.
|
|
64
|
+
mysql2 (~> 0.4.10)
|
|
65
65
|
rake
|
|
66
66
|
rspec (~> 3.4)
|
|
67
67
|
|
data/Gemfile.4.2.pg.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
minidusen (0.
|
|
4
|
+
minidusen (0.10)
|
|
5
5
|
activerecord (>= 3.2)
|
|
6
6
|
activesupport (>= 3.2)
|
|
7
7
|
edge_rider (>= 0.2.5)
|
|
@@ -27,11 +27,11 @@ GEM
|
|
|
27
27
|
byebug (9.0.5)
|
|
28
28
|
database_cleaner (1.5.3)
|
|
29
29
|
diff-lcs (1.2.5)
|
|
30
|
-
edge_rider (1.
|
|
31
|
-
activerecord
|
|
32
|
-
gemika (0.
|
|
30
|
+
edge_rider (1.1.0)
|
|
31
|
+
activerecord (>= 3.2)
|
|
32
|
+
gemika (0.5.0)
|
|
33
33
|
i18n (0.7.0)
|
|
34
|
-
json (1.8.
|
|
34
|
+
json (1.8.6)
|
|
35
35
|
minitest (5.9.0)
|
|
36
36
|
pg (0.19.0)
|
|
37
37
|
rake (11.3.0)
|
data/Gemfile.5.2.mysql2.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
minidusen (0.
|
|
4
|
+
minidusen (0.10)
|
|
5
5
|
activerecord (>= 3.2)
|
|
6
6
|
activesupport (>= 3.2)
|
|
7
7
|
edge_rider (>= 0.2.5)
|
|
@@ -25,13 +25,13 @@ GEM
|
|
|
25
25
|
concurrent-ruby (1.1.5)
|
|
26
26
|
database_cleaner (1.7.0)
|
|
27
27
|
diff-lcs (1.2.5)
|
|
28
|
-
edge_rider (1.
|
|
29
|
-
activerecord
|
|
30
|
-
gemika (0.
|
|
28
|
+
edge_rider (1.1.0)
|
|
29
|
+
activerecord (>= 3.2)
|
|
30
|
+
gemika (0.5.0)
|
|
31
31
|
i18n (1.5.1)
|
|
32
32
|
concurrent-ruby (~> 1.0)
|
|
33
33
|
minitest (5.11.3)
|
|
34
|
-
mysql2 (0.4.
|
|
34
|
+
mysql2 (0.4.10)
|
|
35
35
|
rake (11.3.0)
|
|
36
36
|
rspec (3.5.0)
|
|
37
37
|
rspec-core (~> 3.5.0)
|
data/Gemfile.5.2.pg.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
minidusen (0.
|
|
4
|
+
minidusen (0.10)
|
|
5
5
|
activerecord (>= 3.2)
|
|
6
6
|
activesupport (>= 3.2)
|
|
7
7
|
edge_rider (>= 0.2.5)
|
|
@@ -25,9 +25,9 @@ GEM
|
|
|
25
25
|
concurrent-ruby (1.1.5)
|
|
26
26
|
database_cleaner (1.7.0)
|
|
27
27
|
diff-lcs (1.2.5)
|
|
28
|
-
edge_rider (1.
|
|
29
|
-
activerecord
|
|
30
|
-
gemika (0.
|
|
28
|
+
edge_rider (1.1.0)
|
|
29
|
+
activerecord (>= 3.2)
|
|
30
|
+
gemika (0.5.0)
|
|
31
31
|
i18n (1.5.1)
|
|
32
32
|
concurrent-ruby (~> 1.0)
|
|
33
33
|
minitest (5.11.3)
|
|
@@ -65,4 +65,4 @@ DEPENDENCIES
|
|
|
65
65
|
rspec (~> 3.5)
|
|
66
66
|
|
|
67
67
|
BUNDLED WITH
|
|
68
|
-
|
|
68
|
+
2.2.3
|
data/Gemfile.6.0.mysql2
CHANGED
data/Gemfile.6.0.mysql2.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
minidusen (0.
|
|
4
|
+
minidusen (0.10)
|
|
5
5
|
activerecord (>= 3.2)
|
|
6
6
|
activesupport (>= 3.2)
|
|
7
7
|
edge_rider (>= 0.2.5)
|
|
@@ -9,27 +9,27 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
activemodel (6.0.
|
|
13
|
-
activesupport (= 6.0.
|
|
14
|
-
activerecord (6.0.
|
|
15
|
-
activemodel (= 6.0.
|
|
16
|
-
activesupport (= 6.0.
|
|
17
|
-
activesupport (6.0.
|
|
12
|
+
activemodel (6.0.3.4)
|
|
13
|
+
activesupport (= 6.0.3.4)
|
|
14
|
+
activerecord (6.0.3.4)
|
|
15
|
+
activemodel (= 6.0.3.4)
|
|
16
|
+
activesupport (= 6.0.3.4)
|
|
17
|
+
activesupport (6.0.3.4)
|
|
18
18
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
19
19
|
i18n (>= 0.7, < 2)
|
|
20
20
|
minitest (~> 5.1)
|
|
21
21
|
tzinfo (~> 1.1)
|
|
22
|
-
zeitwerk (~> 2.
|
|
22
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
|
23
23
|
byebug (11.0.1)
|
|
24
|
-
concurrent-ruby (1.1.
|
|
24
|
+
concurrent-ruby (1.1.7)
|
|
25
25
|
database_cleaner (1.7.0)
|
|
26
26
|
diff-lcs (1.3)
|
|
27
|
-
edge_rider (1.
|
|
28
|
-
activerecord
|
|
29
|
-
gemika (0.
|
|
30
|
-
i18n (1.
|
|
27
|
+
edge_rider (1.1.0)
|
|
28
|
+
activerecord (>= 3.2)
|
|
29
|
+
gemika (0.5.0)
|
|
30
|
+
i18n (1.8.5)
|
|
31
31
|
concurrent-ruby (~> 1.0)
|
|
32
|
-
minitest (5.
|
|
32
|
+
minitest (5.14.2)
|
|
33
33
|
mysql2 (0.4.10)
|
|
34
34
|
rake (12.3.2)
|
|
35
35
|
rspec (3.8.0)
|
|
@@ -46,15 +46,15 @@ GEM
|
|
|
46
46
|
rspec-support (~> 3.8.0)
|
|
47
47
|
rspec-support (3.8.0)
|
|
48
48
|
thread_safe (0.3.6)
|
|
49
|
-
tzinfo (1.2.
|
|
49
|
+
tzinfo (1.2.7)
|
|
50
50
|
thread_safe (~> 0.1)
|
|
51
|
-
zeitwerk (2.
|
|
51
|
+
zeitwerk (2.4.0)
|
|
52
52
|
|
|
53
53
|
PLATFORMS
|
|
54
54
|
ruby
|
|
55
55
|
|
|
56
56
|
DEPENDENCIES
|
|
57
|
-
activerecord (~> 6.0.0
|
|
57
|
+
activerecord (~> 6.0.0)
|
|
58
58
|
byebug
|
|
59
59
|
database_cleaner
|
|
60
60
|
gemika
|
data/Gemfile.6.0.pg
CHANGED
data/Gemfile.6.0.pg.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
minidusen (0.
|
|
4
|
+
minidusen (0.10)
|
|
5
5
|
activerecord (>= 3.2)
|
|
6
6
|
activesupport (>= 3.2)
|
|
7
7
|
edge_rider (>= 0.2.5)
|
|
@@ -9,27 +9,27 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
activemodel (6.0.
|
|
13
|
-
activesupport (= 6.0.
|
|
14
|
-
activerecord (6.0.
|
|
15
|
-
activemodel (= 6.0.
|
|
16
|
-
activesupport (= 6.0.
|
|
17
|
-
activesupport (6.0.
|
|
12
|
+
activemodel (6.0.3.4)
|
|
13
|
+
activesupport (= 6.0.3.4)
|
|
14
|
+
activerecord (6.0.3.4)
|
|
15
|
+
activemodel (= 6.0.3.4)
|
|
16
|
+
activesupport (= 6.0.3.4)
|
|
17
|
+
activesupport (6.0.3.4)
|
|
18
18
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
19
19
|
i18n (>= 0.7, < 2)
|
|
20
20
|
minitest (~> 5.1)
|
|
21
21
|
tzinfo (~> 1.1)
|
|
22
|
-
zeitwerk (~> 2.
|
|
22
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
|
23
23
|
byebug (11.0.1)
|
|
24
|
-
concurrent-ruby (1.1.
|
|
24
|
+
concurrent-ruby (1.1.7)
|
|
25
25
|
database_cleaner (1.7.0)
|
|
26
26
|
diff-lcs (1.3)
|
|
27
|
-
edge_rider (1.
|
|
28
|
-
activerecord
|
|
29
|
-
gemika (0.
|
|
30
|
-
i18n (1.
|
|
27
|
+
edge_rider (1.1.0)
|
|
28
|
+
activerecord (>= 3.2)
|
|
29
|
+
gemika (0.5.0)
|
|
30
|
+
i18n (1.8.5)
|
|
31
31
|
concurrent-ruby (~> 1.0)
|
|
32
|
-
minitest (5.
|
|
32
|
+
minitest (5.14.2)
|
|
33
33
|
pg (0.18.4)
|
|
34
34
|
rake (12.3.2)
|
|
35
35
|
rspec (3.8.0)
|
|
@@ -46,15 +46,15 @@ GEM
|
|
|
46
46
|
rspec-support (~> 3.8.0)
|
|
47
47
|
rspec-support (3.8.0)
|
|
48
48
|
thread_safe (0.3.6)
|
|
49
|
-
tzinfo (1.2.
|
|
49
|
+
tzinfo (1.2.7)
|
|
50
50
|
thread_safe (~> 0.1)
|
|
51
|
-
zeitwerk (2.
|
|
51
|
+
zeitwerk (2.4.0)
|
|
52
52
|
|
|
53
53
|
PLATFORMS
|
|
54
54
|
ruby
|
|
55
55
|
|
|
56
56
|
DEPENDENCIES
|
|
57
|
-
activerecord (~> 6.0.0
|
|
57
|
+
activerecord (~> 6.0.0)
|
|
58
58
|
byebug
|
|
59
59
|
database_cleaner
|
|
60
60
|
gemika
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
2
|
|
|
3
3
|
# Runtime dependencies
|
|
4
|
-
gem 'activerecord', '
|
|
5
|
-
gem 'mysql2', '
|
|
6
|
-
gem 'i18n', '=0.6.11' # 0.7 no longer builds for Ruby 1.8.7
|
|
4
|
+
gem 'activerecord', '~>6.1.0'
|
|
5
|
+
gem 'mysql2', '~>0.5'
|
|
7
6
|
|
|
8
7
|
# Development dependencies
|
|
9
8
|
gem 'rake'
|
|
10
9
|
gem 'database_cleaner'
|
|
11
|
-
gem 'rspec', '~>
|
|
10
|
+
gem 'rspec', '~>3.5'
|
|
12
11
|
gem 'byebug'
|
|
13
12
|
gem 'gemika'
|
|
14
13
|
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
minidusen (0.10)
|
|
5
|
+
activerecord (>= 3.2)
|
|
6
|
+
activesupport (>= 3.2)
|
|
7
|
+
edge_rider (>= 0.2.5)
|
|
8
|
+
|
|
9
|
+
GEM
|
|
10
|
+
remote: https://rubygems.org/
|
|
11
|
+
specs:
|
|
12
|
+
activemodel (6.1.3)
|
|
13
|
+
activesupport (= 6.1.3)
|
|
14
|
+
activerecord (6.1.3)
|
|
15
|
+
activemodel (= 6.1.3)
|
|
16
|
+
activesupport (= 6.1.3)
|
|
17
|
+
activesupport (6.1.3)
|
|
18
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
19
|
+
i18n (>= 1.6, < 2)
|
|
20
|
+
minitest (>= 5.1)
|
|
21
|
+
tzinfo (~> 2.0)
|
|
22
|
+
zeitwerk (~> 2.3)
|
|
23
|
+
byebug (11.1.3)
|
|
24
|
+
concurrent-ruby (1.1.8)
|
|
25
|
+
database_cleaner (2.0.1)
|
|
26
|
+
database_cleaner-active_record (~> 2.0.0)
|
|
27
|
+
database_cleaner-active_record (2.0.0)
|
|
28
|
+
activerecord (>= 5.a)
|
|
29
|
+
database_cleaner-core (~> 2.0.0)
|
|
30
|
+
database_cleaner-core (2.0.1)
|
|
31
|
+
diff-lcs (1.4.4)
|
|
32
|
+
edge_rider (1.1.0)
|
|
33
|
+
activerecord (>= 3.2)
|
|
34
|
+
gemika (0.5.0)
|
|
35
|
+
i18n (1.8.9)
|
|
36
|
+
concurrent-ruby (~> 1.0)
|
|
37
|
+
minitest (5.14.4)
|
|
38
|
+
mysql2 (0.5.3)
|
|
39
|
+
rake (13.0.3)
|
|
40
|
+
rspec (3.10.0)
|
|
41
|
+
rspec-core (~> 3.10.0)
|
|
42
|
+
rspec-expectations (~> 3.10.0)
|
|
43
|
+
rspec-mocks (~> 3.10.0)
|
|
44
|
+
rspec-core (3.10.1)
|
|
45
|
+
rspec-support (~> 3.10.0)
|
|
46
|
+
rspec-expectations (3.10.1)
|
|
47
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
48
|
+
rspec-support (~> 3.10.0)
|
|
49
|
+
rspec-mocks (3.10.2)
|
|
50
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
51
|
+
rspec-support (~> 3.10.0)
|
|
52
|
+
rspec-support (3.10.2)
|
|
53
|
+
tzinfo (2.0.4)
|
|
54
|
+
concurrent-ruby (~> 1.0)
|
|
55
|
+
zeitwerk (2.4.2)
|
|
56
|
+
|
|
57
|
+
PLATFORMS
|
|
58
|
+
x86_64-linux
|
|
59
|
+
|
|
60
|
+
DEPENDENCIES
|
|
61
|
+
activerecord (~> 6.1.0)
|
|
62
|
+
byebug
|
|
63
|
+
database_cleaner
|
|
64
|
+
gemika
|
|
65
|
+
minidusen!
|
|
66
|
+
mysql2 (~> 0.5)
|
|
67
|
+
rake
|
|
68
|
+
rspec (~> 3.5)
|
|
69
|
+
|
|
70
|
+
BUNDLED WITH
|
|
71
|
+
2.2.24
|
data/Gemfile.6.1.pg
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
# Runtime dependencies
|
|
4
|
+
gem 'activerecord', '~>6.1.0'
|
|
5
|
+
gem 'pg', '~>1.1'
|
|
6
|
+
|
|
7
|
+
# Development dependendcies
|
|
8
|
+
gem 'rake'
|
|
9
|
+
gem 'database_cleaner'
|
|
10
|
+
gem 'rspec', '~>3.5'
|
|
11
|
+
gem 'byebug'
|
|
12
|
+
gem 'gemika'
|
|
13
|
+
|
|
14
|
+
# Gem under test
|
|
15
|
+
gem 'minidusen', :path => '.'
|
data/Gemfile.6.1.pg.lock
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
minidusen (0.10)
|
|
5
|
+
activerecord (>= 3.2)
|
|
6
|
+
activesupport (>= 3.2)
|
|
7
|
+
edge_rider (>= 0.2.5)
|
|
8
|
+
|
|
9
|
+
GEM
|
|
10
|
+
remote: https://rubygems.org/
|
|
11
|
+
specs:
|
|
12
|
+
activemodel (6.1.3)
|
|
13
|
+
activesupport (= 6.1.3)
|
|
14
|
+
activerecord (6.1.3)
|
|
15
|
+
activemodel (= 6.1.3)
|
|
16
|
+
activesupport (= 6.1.3)
|
|
17
|
+
activesupport (6.1.3)
|
|
18
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
19
|
+
i18n (>= 1.6, < 2)
|
|
20
|
+
minitest (>= 5.1)
|
|
21
|
+
tzinfo (~> 2.0)
|
|
22
|
+
zeitwerk (~> 2.3)
|
|
23
|
+
byebug (11.1.3)
|
|
24
|
+
concurrent-ruby (1.1.8)
|
|
25
|
+
database_cleaner (2.0.1)
|
|
26
|
+
database_cleaner-active_record (~> 2.0.0)
|
|
27
|
+
database_cleaner-active_record (2.0.0)
|
|
28
|
+
activerecord (>= 5.a)
|
|
29
|
+
database_cleaner-core (~> 2.0.0)
|
|
30
|
+
database_cleaner-core (2.0.1)
|
|
31
|
+
diff-lcs (1.4.4)
|
|
32
|
+
edge_rider (1.1.0)
|
|
33
|
+
activerecord (>= 3.2)
|
|
34
|
+
gemika (0.5.0)
|
|
35
|
+
i18n (1.8.9)
|
|
36
|
+
concurrent-ruby (~> 1.0)
|
|
37
|
+
minitest (5.14.4)
|
|
38
|
+
pg (1.2.3)
|
|
39
|
+
rake (13.0.3)
|
|
40
|
+
rspec (3.10.0)
|
|
41
|
+
rspec-core (~> 3.10.0)
|
|
42
|
+
rspec-expectations (~> 3.10.0)
|
|
43
|
+
rspec-mocks (~> 3.10.0)
|
|
44
|
+
rspec-core (3.10.1)
|
|
45
|
+
rspec-support (~> 3.10.0)
|
|
46
|
+
rspec-expectations (3.10.1)
|
|
47
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
48
|
+
rspec-support (~> 3.10.0)
|
|
49
|
+
rspec-mocks (3.10.2)
|
|
50
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
51
|
+
rspec-support (~> 3.10.0)
|
|
52
|
+
rspec-support (3.10.2)
|
|
53
|
+
tzinfo (2.0.4)
|
|
54
|
+
concurrent-ruby (~> 1.0)
|
|
55
|
+
zeitwerk (2.4.2)
|
|
56
|
+
|
|
57
|
+
PLATFORMS
|
|
58
|
+
x86_64-linux
|
|
59
|
+
|
|
60
|
+
DEPENDENCIES
|
|
61
|
+
activerecord (~> 6.1.0)
|
|
62
|
+
byebug
|
|
63
|
+
database_cleaner
|
|
64
|
+
gemika
|
|
65
|
+
minidusen!
|
|
66
|
+
pg (~> 1.1)
|
|
67
|
+
rake
|
|
68
|
+
rspec (~> 3.5)
|
|
69
|
+
|
|
70
|
+
BUNDLED WITH
|
|
71
|
+
2.2.24
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Minidusen [](https://github.com/makandra/minidusen/actions)
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
4
|
Low-tech search solution for ActiveRecord with MySQL or PostgreSQL
|
|
@@ -53,7 +53,7 @@ Basic Usage
|
|
|
53
53
|
Our example will be a simple address book:
|
|
54
54
|
|
|
55
55
|
```ruby
|
|
56
|
-
class Contact <
|
|
56
|
+
class Contact < ApplicationRecord
|
|
57
57
|
validates_presence_of :name, :street, :city, :email
|
|
58
58
|
end
|
|
59
59
|
```
|
|
@@ -68,7 +68,6 @@ class ContactFilter
|
|
|
68
68
|
columns = [:name, :email]
|
|
69
69
|
scope.where_like(columns => phrases)
|
|
70
70
|
end
|
|
71
|
-
|
|
72
71
|
end
|
|
73
72
|
```
|
|
74
73
|
|
|
@@ -136,8 +135,45 @@ You can also use `where_like` to find all the records *not* matching some phrase
|
|
|
136
135
|
Contact.where_like(name: 'foo', negate: true)
|
|
137
136
|
```
|
|
138
137
|
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
Filtering associated records
|
|
139
|
+
----------------------------
|
|
140
|
+
|
|
141
|
+
Minidusen lets you find text in associated records.
|
|
142
|
+
|
|
143
|
+
Assume the following model where a `Contact` record may be associated with a `Group` record:
|
|
144
|
+
|
|
145
|
+
```ruby
|
|
146
|
+
class Contact < ApplicationRecord
|
|
147
|
+
belongs_to :group
|
|
148
|
+
|
|
149
|
+
validates_presence_of :name, :street, :city, :email
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
class Group < ApplicationRecord
|
|
153
|
+
has_many :contacts
|
|
154
|
+
|
|
155
|
+
validates_presence_of :name
|
|
156
|
+
end
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
We can filter contacts by their group name by joining the `groups` table and filtering on a joined column.
|
|
160
|
+
Note how the joined column is qualified as `groups.name` (rather than just `name`):
|
|
161
|
+
|
|
162
|
+
```ruby
|
|
163
|
+
class ContactFilter
|
|
164
|
+
include Minidusen::Filter
|
|
165
|
+
|
|
166
|
+
filter :text do |scope, phrases|
|
|
167
|
+
columns = [:name, :email, 'groups.name']
|
|
168
|
+
scope.includes(:group).where_like(columns => phrases)
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
Supporting qualified field syntax
|
|
176
|
+
---------------------------------
|
|
141
177
|
|
|
142
178
|
Google supports queries like `filetype:pdf` that filters records by some criteria without performing a full text search. Minidusen gives you a simple way to support such search syntax.
|
|
143
179
|
|
|
@@ -183,10 +219,10 @@ Supported Rails versions
|
|
|
183
219
|
|
|
184
220
|
Minidusen is tested on:
|
|
185
221
|
|
|
186
|
-
- Rails 3.2
|
|
187
222
|
- Rails 4.2
|
|
188
223
|
- Rails 5.2
|
|
189
224
|
- Rails 6.0
|
|
225
|
+
- Rails 6.1
|
|
190
226
|
- MySQL 5.6
|
|
191
227
|
- PostgreSQL
|
|
192
228
|
|
|
@@ -197,7 +233,7 @@ Development
|
|
|
197
233
|
-----------
|
|
198
234
|
|
|
199
235
|
- There are tests in `spec`. We only accept PRs with tests.
|
|
200
|
-
- We currently develop using Ruby
|
|
236
|
+
- We currently develop using the Ruby version in `.ruby-version`. It is required to change the Ruby Version to cover all Rails version or just use Gitlab CI.
|
|
201
237
|
- Put your database credentials into `spec/support/database.yml`. There's a `database.sample.yml` you can use as a template.
|
|
202
238
|
- Create a database `minidusen_test` in both MySQL and PostgreSQL.
|
|
203
239
|
- There are gem bundles in the project root for each combination of ActiveRecord version and database type that we support.
|
data/lib/minidusen/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: minidusen
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '0.
|
|
4
|
+
version: '0.10'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Henning Koch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-08-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -58,13 +58,11 @@ executables: []
|
|
|
58
58
|
extensions: []
|
|
59
59
|
extra_rdoc_files: []
|
|
60
60
|
files:
|
|
61
|
+
- ".github/workflows/test.yml"
|
|
61
62
|
- ".gitignore"
|
|
62
63
|
- ".rspec"
|
|
63
64
|
- ".ruby-version"
|
|
64
|
-
- ".travis.yml"
|
|
65
65
|
- CHANGELOG.md
|
|
66
|
-
- Gemfile.3.2.mysql2
|
|
67
|
-
- Gemfile.3.2.mysql2.lock
|
|
68
66
|
- Gemfile.4.2.mysql2
|
|
69
67
|
- Gemfile.4.2.mysql2.lock
|
|
70
68
|
- Gemfile.4.2.pg
|
|
@@ -77,6 +75,10 @@ files:
|
|
|
77
75
|
- Gemfile.6.0.mysql2.lock
|
|
78
76
|
- Gemfile.6.0.pg
|
|
79
77
|
- Gemfile.6.0.pg.lock
|
|
78
|
+
- Gemfile.6.1.mysql2
|
|
79
|
+
- Gemfile.6.1.mysql2.lock
|
|
80
|
+
- Gemfile.6.1.pg
|
|
81
|
+
- Gemfile.6.1.pg.lock
|
|
80
82
|
- LICENSE
|
|
81
83
|
- README.md
|
|
82
84
|
- Rakefile
|
|
@@ -97,9 +99,9 @@ files:
|
|
|
97
99
|
- spec/minidusen/query_spec.rb
|
|
98
100
|
- spec/minidusen/util_spec.rb
|
|
99
101
|
- spec/spec_helper.rb
|
|
102
|
+
- spec/support/database.github.yml
|
|
100
103
|
- spec/support/database.rb
|
|
101
104
|
- spec/support/database.sample.yml
|
|
102
|
-
- spec/support/database.travis.yml
|
|
103
105
|
- spec/support/models.rb
|
|
104
106
|
homepage: https://github.com/makandra/minidusen
|
|
105
107
|
licenses:
|
|
@@ -120,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
120
122
|
- !ruby/object:Gem::Version
|
|
121
123
|
version: '0'
|
|
122
124
|
requirements: []
|
|
123
|
-
rubygems_version: 3.
|
|
125
|
+
rubygems_version: 3.2.3
|
|
124
126
|
signing_key:
|
|
125
127
|
specification_version: 4
|
|
126
128
|
summary: Low-tech search for ActiveRecord with MySQL or PostgreSQL
|
data/.travis.yml
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
|
|
3
|
-
rvm:
|
|
4
|
-
- 2.1.8
|
|
5
|
-
- 2.2.4
|
|
6
|
-
- 2.3.1
|
|
7
|
-
- 2.5.3
|
|
8
|
-
|
|
9
|
-
gemfile:
|
|
10
|
-
- Gemfile.3.2.mysql2
|
|
11
|
-
- Gemfile.4.2.mysql2
|
|
12
|
-
- Gemfile.4.2.pg
|
|
13
|
-
- Gemfile.5.2.mysql2
|
|
14
|
-
- Gemfile.5.2.pg
|
|
15
|
-
- Gemfile.6.0.mysql2
|
|
16
|
-
- Gemfile.6.0.pg
|
|
17
|
-
|
|
18
|
-
before_script:
|
|
19
|
-
- psql -c 'create database minidusen_test;' -U postgres
|
|
20
|
-
- mysql -e 'create database IF NOT EXISTS minidusen_test;'
|
|
21
|
-
|
|
22
|
-
script: bundle exec rspec spec
|
|
23
|
-
|
|
24
|
-
sudo: false
|
|
25
|
-
|
|
26
|
-
cache: bundler
|
|
27
|
-
|
|
28
|
-
notifications:
|
|
29
|
-
email:
|
|
30
|
-
- fail@makandra.de
|
|
31
|
-
|
|
32
|
-
install:
|
|
33
|
-
# Replace default Travis CI bundler script with a version that doesn't
|
|
34
|
-
# explode when lockfile doesn't match recently bumped version
|
|
35
|
-
- bundle install --no-deployment --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|
|
36
|
-
|
|
37
|
-
addons:
|
|
38
|
-
postgresql: 9.3
|
|
39
|
-
|
|
40
|
-
matrix:
|
|
41
|
-
exclude:
|
|
42
|
-
# Rails 3.2
|
|
43
|
-
- rvm: 2.5.3
|
|
44
|
-
gemfile: Gemfile.3.2.mysql2
|
|
45
|
-
# Rails 4.2
|
|
46
|
-
- rvm: 2.5.3
|
|
47
|
-
gemfile: Gemfile.4.2.mysql2
|
|
48
|
-
- rvm: 2.5.3
|
|
49
|
-
gemfile: Gemfile.4.2.pg
|
|
50
|
-
# Rails 5.2
|
|
51
|
-
- rvm: 2.1.8
|
|
52
|
-
gemfile: Gemfile.5.2.mysql2
|
|
53
|
-
- rvm: 2.1.8
|
|
54
|
-
gemfile: Gemfile.5.2.pg
|
|
55
|
-
# Rails 6.0
|
|
56
|
-
- rvm: 2.1.8
|
|
57
|
-
gemfile: Gemfile.6.0.mysql2
|
|
58
|
-
- rvm: 2.1.8
|
|
59
|
-
gemfile: Gemfile.6.0.pg
|
|
60
|
-
- rvm: 2.2.4
|
|
61
|
-
gemfile: Gemfile.6.0.mysql2
|
|
62
|
-
- rvm: 2.2.4
|
|
63
|
-
gemfile: Gemfile.6.0.pg
|
|
64
|
-
- rvm: 2.3.1
|
|
65
|
-
gemfile: Gemfile.6.0.mysql2
|
|
66
|
-
- rvm: 2.3.1
|
|
67
|
-
gemfile: Gemfile.6.0.pg
|
data/Gemfile.3.2.mysql2.lock
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
minidusen (0.9)
|
|
5
|
-
activerecord (>= 3.2)
|
|
6
|
-
activesupport (>= 3.2)
|
|
7
|
-
edge_rider (>= 0.2.5)
|
|
8
|
-
|
|
9
|
-
GEM
|
|
10
|
-
remote: https://rubygems.org/
|
|
11
|
-
specs:
|
|
12
|
-
activemodel (3.2.22)
|
|
13
|
-
activesupport (= 3.2.22)
|
|
14
|
-
builder (~> 3.0.0)
|
|
15
|
-
activerecord (3.2.22)
|
|
16
|
-
activemodel (= 3.2.22)
|
|
17
|
-
activesupport (= 3.2.22)
|
|
18
|
-
arel (~> 3.0.2)
|
|
19
|
-
tzinfo (~> 0.3.29)
|
|
20
|
-
activesupport (3.2.22)
|
|
21
|
-
i18n (~> 0.6, >= 0.6.4)
|
|
22
|
-
multi_json (~> 1.0)
|
|
23
|
-
arel (3.0.3)
|
|
24
|
-
builder (3.0.4)
|
|
25
|
-
byebug (9.0.5)
|
|
26
|
-
database_cleaner (1.5.3)
|
|
27
|
-
diff-lcs (1.2.5)
|
|
28
|
-
edge_rider (1.0.0)
|
|
29
|
-
activerecord
|
|
30
|
-
gemika (0.3.2)
|
|
31
|
-
i18n (0.6.11)
|
|
32
|
-
multi_json (1.12.1)
|
|
33
|
-
mysql2 (0.3.17)
|
|
34
|
-
rake (11.3.0)
|
|
35
|
-
rspec (3.5.0)
|
|
36
|
-
rspec-core (~> 3.5.0)
|
|
37
|
-
rspec-expectations (~> 3.5.0)
|
|
38
|
-
rspec-mocks (~> 3.5.0)
|
|
39
|
-
rspec-core (3.5.3)
|
|
40
|
-
rspec-support (~> 3.5.0)
|
|
41
|
-
rspec-expectations (3.5.0)
|
|
42
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
43
|
-
rspec-support (~> 3.5.0)
|
|
44
|
-
rspec-mocks (3.5.0)
|
|
45
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
46
|
-
rspec-support (~> 3.5.0)
|
|
47
|
-
rspec-support (3.5.0)
|
|
48
|
-
tzinfo (0.3.51)
|
|
49
|
-
|
|
50
|
-
PLATFORMS
|
|
51
|
-
ruby
|
|
52
|
-
|
|
53
|
-
DEPENDENCIES
|
|
54
|
-
activerecord (= 3.2.22)
|
|
55
|
-
byebug
|
|
56
|
-
database_cleaner
|
|
57
|
-
gemika
|
|
58
|
-
i18n (= 0.6.11)
|
|
59
|
-
minidusen!
|
|
60
|
-
mysql2 (= 0.3.17)
|
|
61
|
-
rake
|
|
62
|
-
rspec (~> 3.4)
|
|
63
|
-
|
|
64
|
-
BUNDLED WITH
|
|
65
|
-
1.17.3
|