minidusen 0.8.3 → 0.10.1
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 +100 -0
- data/.ruby-version +1 -2
- data/CHANGELOG.md +36 -2
- data/{gemfiles/Gemfile.4.2.mysql2 → Gemfile.4.2.mysql2} +2 -2
- data/{gemfiles/Gemfile.4.2.mysql2.lock → Gemfile.4.2.mysql2.lock} +9 -9
- data/{gemfiles/Gemfile.4.2.pg → Gemfile.4.2.pg} +1 -1
- data/{gemfiles/Gemfile.4.2.pg.lock → Gemfile.4.2.pg.lock} +7 -7
- data/Gemfile.5.2.mysql2 +16 -0
- data/{gemfiles/Gemfile.5.0.mysql2.lock → Gemfile.5.2.mysql2.lock} +25 -23
- data/Gemfile.5.2.pg +16 -0
- data/{gemfiles/Gemfile.5.0.pg.lock → Gemfile.5.2.pg.lock} +24 -22
- data/{gemfiles/Gemfile.5.0.mysql2 → Gemfile.6.0.mysql2} +2 -2
- data/Gemfile.6.0.mysql2.lock +67 -0
- data/{gemfiles/Gemfile.5.0.pg → Gemfile.6.0.pg} +2 -2
- data/Gemfile.6.0.pg.lock +67 -0
- data/Gemfile.6.1.mysql2 +15 -0
- data/Gemfile.6.1.mysql2.lock +71 -0
- data/Gemfile.6.1.pg +15 -0
- data/Gemfile.6.1.pg.lock +71 -0
- data/Gemfile.7.0.mysql2 +15 -0
- data/Gemfile.7.0.mysql2.lock +69 -0
- data/Gemfile.7.0.pg +15 -0
- data/Gemfile.7.0.pg.lock +69 -0
- data/README.md +47 -10
- data/lib/minidusen/version.rb +1 -1
- data/minidusen.gemspec +1 -0
- data/spec/minidusen/filter_spec.rb +3 -1
- data/spec/spec_helper.rb +5 -1
- data/spec/support/database.github.yml +13 -0
- metadata +27 -17
- data/.travis.yml +0 -39
- data/gemfiles/Gemfile.3.2.mysql2 +0 -16
- data/gemfiles/Gemfile.3.2.mysql2.lock +0 -65
- data/spec/support/database.travis.yml +0 -9
@@ -0,0 +1,71 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
minidusen (0.10.1)
|
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 (2.1.1)
|
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.1)
|
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 (2.1.1)
|
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/Gemfile.7.0.mysql2
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Runtime dependencies
|
4
|
+
gem 'activerecord', '~>7.0.0'
|
5
|
+
gem 'mysql2', '~>0.5'
|
6
|
+
|
7
|
+
# Development dependencies
|
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 => '.'
|
@@ -0,0 +1,69 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
minidusen (0.10.1)
|
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 (7.0.0)
|
13
|
+
activesupport (= 7.0.0)
|
14
|
+
activerecord (7.0.0)
|
15
|
+
activemodel (= 7.0.0)
|
16
|
+
activesupport (= 7.0.0)
|
17
|
+
activesupport (7.0.0)
|
18
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
19
|
+
i18n (>= 1.6, < 2)
|
20
|
+
minitest (>= 5.1)
|
21
|
+
tzinfo (~> 2.0)
|
22
|
+
byebug (11.1.3)
|
23
|
+
concurrent-ruby (1.1.9)
|
24
|
+
database_cleaner (2.0.1)
|
25
|
+
database_cleaner-active_record (~> 2.0.0)
|
26
|
+
database_cleaner-active_record (2.0.1)
|
27
|
+
activerecord (>= 5.a)
|
28
|
+
database_cleaner-core (~> 2.0.0)
|
29
|
+
database_cleaner-core (2.0.1)
|
30
|
+
diff-lcs (1.5.0)
|
31
|
+
edge_rider (2.1.1)
|
32
|
+
activerecord (>= 3.2)
|
33
|
+
gemika (0.6.1)
|
34
|
+
i18n (1.8.11)
|
35
|
+
concurrent-ruby (~> 1.0)
|
36
|
+
minitest (5.15.0)
|
37
|
+
mysql2 (0.5.3)
|
38
|
+
rake (13.0.6)
|
39
|
+
rspec (3.10.0)
|
40
|
+
rspec-core (~> 3.10.0)
|
41
|
+
rspec-expectations (~> 3.10.0)
|
42
|
+
rspec-mocks (~> 3.10.0)
|
43
|
+
rspec-core (3.10.1)
|
44
|
+
rspec-support (~> 3.10.0)
|
45
|
+
rspec-expectations (3.10.1)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.10.0)
|
48
|
+
rspec-mocks (3.10.2)
|
49
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
+
rspec-support (~> 3.10.0)
|
51
|
+
rspec-support (3.10.3)
|
52
|
+
tzinfo (2.0.4)
|
53
|
+
concurrent-ruby (~> 1.0)
|
54
|
+
|
55
|
+
PLATFORMS
|
56
|
+
x86_64-linux
|
57
|
+
|
58
|
+
DEPENDENCIES
|
59
|
+
activerecord (~> 7.0.0)
|
60
|
+
byebug
|
61
|
+
database_cleaner
|
62
|
+
gemika
|
63
|
+
minidusen!
|
64
|
+
mysql2 (~> 0.5)
|
65
|
+
rake
|
66
|
+
rspec (~> 3.5)
|
67
|
+
|
68
|
+
BUNDLED WITH
|
69
|
+
2.2.3
|
data/Gemfile.7.0.pg
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Runtime dependencies
|
4
|
+
gem 'activerecord', '~>7.0.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.7.0.pg.lock
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
minidusen (0.10.1)
|
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 (7.0.0)
|
13
|
+
activesupport (= 7.0.0)
|
14
|
+
activerecord (7.0.0)
|
15
|
+
activemodel (= 7.0.0)
|
16
|
+
activesupport (= 7.0.0)
|
17
|
+
activesupport (7.0.0)
|
18
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
19
|
+
i18n (>= 1.6, < 2)
|
20
|
+
minitest (>= 5.1)
|
21
|
+
tzinfo (~> 2.0)
|
22
|
+
byebug (11.1.3)
|
23
|
+
concurrent-ruby (1.1.9)
|
24
|
+
database_cleaner (2.0.1)
|
25
|
+
database_cleaner-active_record (~> 2.0.0)
|
26
|
+
database_cleaner-active_record (2.0.1)
|
27
|
+
activerecord (>= 5.a)
|
28
|
+
database_cleaner-core (~> 2.0.0)
|
29
|
+
database_cleaner-core (2.0.1)
|
30
|
+
diff-lcs (1.5.0)
|
31
|
+
edge_rider (2.1.1)
|
32
|
+
activerecord (>= 3.2)
|
33
|
+
gemika (0.6.1)
|
34
|
+
i18n (1.8.11)
|
35
|
+
concurrent-ruby (~> 1.0)
|
36
|
+
minitest (5.15.0)
|
37
|
+
pg (1.2.3)
|
38
|
+
rake (13.0.6)
|
39
|
+
rspec (3.10.0)
|
40
|
+
rspec-core (~> 3.10.0)
|
41
|
+
rspec-expectations (~> 3.10.0)
|
42
|
+
rspec-mocks (~> 3.10.0)
|
43
|
+
rspec-core (3.10.1)
|
44
|
+
rspec-support (~> 3.10.0)
|
45
|
+
rspec-expectations (3.10.1)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.10.0)
|
48
|
+
rspec-mocks (3.10.2)
|
49
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
+
rspec-support (~> 3.10.0)
|
51
|
+
rspec-support (3.10.3)
|
52
|
+
tzinfo (2.0.4)
|
53
|
+
concurrent-ruby (~> 1.0)
|
54
|
+
|
55
|
+
PLATFORMS
|
56
|
+
x86_64-linux
|
57
|
+
|
58
|
+
DEPENDENCIES
|
59
|
+
activerecord (~> 7.0.0)
|
60
|
+
byebug
|
61
|
+
database_cleaner
|
62
|
+
gemika
|
63
|
+
minidusen!
|
64
|
+
pg (~> 1.1)
|
65
|
+
rake
|
66
|
+
rspec (~> 3.5)
|
67
|
+
|
68
|
+
BUNDLED WITH
|
69
|
+
2.2.3
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Minidusen [![
|
1
|
+
Minidusen [![Tests](https://github.com/makandra/minidusen/workflows/Tests/badge.svg)](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
|
|
@@ -151,7 +187,7 @@ class ContactFilter
|
|
151
187
|
include Minidusen::Filter
|
152
188
|
|
153
189
|
filter :email do |scope, email|
|
154
|
-
scope.where(
|
190
|
+
scope.where(email: email)
|
155
191
|
end
|
156
192
|
|
157
193
|
filter :text do |scope, phrases|
|
@@ -183,9 +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
|
-
- Rails 5.
|
223
|
+
- Rails 5.2
|
224
|
+
- Rails 6.0
|
225
|
+
- Rails 6.1
|
189
226
|
- MySQL 5.6
|
190
227
|
- PostgreSQL
|
191
228
|
|
@@ -196,10 +233,10 @@ Development
|
|
196
233
|
-----------
|
197
234
|
|
198
235
|
- There are tests in `spec`. We only accept PRs with tests.
|
199
|
-
- 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.
|
200
237
|
- Put your database credentials into `spec/support/database.yml`. There's a `database.sample.yml` you can use as a template.
|
201
238
|
- Create a database `minidusen_test` in both MySQL and PostgreSQL.
|
202
|
-
- There are gem bundles in
|
239
|
+
- There are gem bundles in the project root for each combination of ActiveRecord version and database type that we support.
|
203
240
|
- You can bundle all test applications by saying `bundle exec rake matrix:install`
|
204
241
|
- You can run specs from the project root by saying `bundle exec rake matrix:spec`. This will run all gemfiles compatible with your current Ruby.
|
205
242
|
|
data/lib/minidusen/version.rb
CHANGED
data/minidusen.gemspec
CHANGED
@@ -10,6 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.summary = 'Low-tech search for ActiveRecord with MySQL or PostgreSQL'
|
11
11
|
s.description = s.summary
|
12
12
|
s.license = 'MIT'
|
13
|
+
s.metadata = { 'rubygems_mfa_required' => 'true' }
|
13
14
|
|
14
15
|
s.files = `git ls-files`.split("\n").reject { |path| File.lstat(path).symlink? }
|
15
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n").reject { |path| File.lstat(path).symlink? }
|
@@ -25,7 +25,9 @@ describe Minidusen::Filter do
|
|
25
25
|
it 'should not find stale text after fields were updated (bugfix)' do
|
26
26
|
match = User.create!(:name => 'Abraham')
|
27
27
|
no_match = User.create!(:name => 'Elizabath')
|
28
|
-
match.
|
28
|
+
match.name = 'Johnny'
|
29
|
+
match.save!
|
30
|
+
|
29
31
|
user_filter.filter(User, 'Abraham').to_a.should be_empty
|
30
32
|
user_filter.filter(User, 'Johnny').to_a.should == [match]
|
31
33
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -4,7 +4,11 @@ require 'minidusen'
|
|
4
4
|
require 'byebug'
|
5
5
|
require 'gemika'
|
6
6
|
|
7
|
-
ActiveRecord::
|
7
|
+
if ActiveRecord::VERSION::MAJOR >= 7
|
8
|
+
ActiveRecord.default_timezone = :local
|
9
|
+
else
|
10
|
+
ActiveRecord::Base.default_timezone = :local
|
11
|
+
end
|
8
12
|
|
9
13
|
Dir["#{File.dirname(__FILE__)}/support/*.rb"].sort.each {|f| require f}
|
10
14
|
Dir["#{File.dirname(__FILE__)}/shared_examples/*.rb"].sort.each {|f| require f}
|
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.1
|
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: 2022-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -58,25 +58,35 @@ 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.4.2.mysql2
|
67
|
+
- Gemfile.4.2.mysql2.lock
|
68
|
+
- Gemfile.4.2.pg
|
69
|
+
- Gemfile.4.2.pg.lock
|
70
|
+
- Gemfile.5.2.mysql2
|
71
|
+
- Gemfile.5.2.mysql2.lock
|
72
|
+
- Gemfile.5.2.pg
|
73
|
+
- Gemfile.5.2.pg.lock
|
74
|
+
- Gemfile.6.0.mysql2
|
75
|
+
- Gemfile.6.0.mysql2.lock
|
76
|
+
- Gemfile.6.0.pg
|
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
|
82
|
+
- Gemfile.7.0.mysql2
|
83
|
+
- Gemfile.7.0.mysql2.lock
|
84
|
+
- Gemfile.7.0.pg
|
85
|
+
- Gemfile.7.0.pg.lock
|
66
86
|
- LICENSE
|
67
87
|
- README.md
|
68
88
|
- Rakefile
|
69
89
|
- doc/filtered_index_view.cropped.png
|
70
|
-
- gemfiles/Gemfile.3.2.mysql2
|
71
|
-
- gemfiles/Gemfile.3.2.mysql2.lock
|
72
|
-
- gemfiles/Gemfile.4.2.mysql2
|
73
|
-
- gemfiles/Gemfile.4.2.mysql2.lock
|
74
|
-
- gemfiles/Gemfile.4.2.pg
|
75
|
-
- gemfiles/Gemfile.4.2.pg.lock
|
76
|
-
- gemfiles/Gemfile.5.0.mysql2
|
77
|
-
- gemfiles/Gemfile.5.0.mysql2.lock
|
78
|
-
- gemfiles/Gemfile.5.0.pg
|
79
|
-
- gemfiles/Gemfile.5.0.pg.lock
|
80
90
|
- lib/minidusen.rb
|
81
91
|
- lib/minidusen/active_record_ext.rb
|
82
92
|
- lib/minidusen/filter.rb
|
@@ -93,14 +103,15 @@ files:
|
|
93
103
|
- spec/minidusen/query_spec.rb
|
94
104
|
- spec/minidusen/util_spec.rb
|
95
105
|
- spec/spec_helper.rb
|
106
|
+
- spec/support/database.github.yml
|
96
107
|
- spec/support/database.rb
|
97
108
|
- spec/support/database.sample.yml
|
98
|
-
- spec/support/database.travis.yml
|
99
109
|
- spec/support/models.rb
|
100
110
|
homepage: https://github.com/makandra/minidusen
|
101
111
|
licenses:
|
102
112
|
- MIT
|
103
|
-
metadata:
|
113
|
+
metadata:
|
114
|
+
rubygems_mfa_required: 'true'
|
104
115
|
post_install_message:
|
105
116
|
rdoc_options: []
|
106
117
|
require_paths:
|
@@ -116,8 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
127
|
- !ruby/object:Gem::Version
|
117
128
|
version: '0'
|
118
129
|
requirements: []
|
119
|
-
|
120
|
-
rubygems_version: 2.7.6
|
130
|
+
rubygems_version: 3.2.28
|
121
131
|
signing_key:
|
122
132
|
specification_version: 4
|
123
133
|
summary: Low-tech search for ActiveRecord with MySQL or PostgreSQL
|
data/.travis.yml
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
rvm:
|
4
|
-
- 2.1.8
|
5
|
-
- 2.2.4
|
6
|
-
- 2.3.1
|
7
|
-
|
8
|
-
gemfile:
|
9
|
-
- gemfiles/Gemfile.3.2.mysql2
|
10
|
-
- gemfiles/Gemfile.4.2.mysql2
|
11
|
-
- gemfiles/Gemfile.4.2.pg
|
12
|
-
- gemfiles/Gemfile.5.0.mysql2
|
13
|
-
- gemfiles/Gemfile.5.0.pg
|
14
|
-
|
15
|
-
before_script:
|
16
|
-
- psql -c 'create database minidusen_test;' -U postgres
|
17
|
-
- mysql -e 'create database IF NOT EXISTS minidusen_test;'
|
18
|
-
|
19
|
-
script: bundle exec rspec spec
|
20
|
-
|
21
|
-
sudo: false
|
22
|
-
|
23
|
-
cache: bundler
|
24
|
-
|
25
|
-
notifications:
|
26
|
-
email:
|
27
|
-
- fail@makandra.de
|
28
|
-
|
29
|
-
install:
|
30
|
-
# Replace default Travis CI bundler script with a version that doesn't
|
31
|
-
# explode when lockfile doesn't match recently bumped version
|
32
|
-
- bundle install --no-deployment --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
|
33
|
-
|
34
|
-
matrix:
|
35
|
-
exclude:
|
36
|
-
- rvm: 2.1.8
|
37
|
-
gemfile: gemfiles/Gemfile.5.0.mysql2
|
38
|
-
- rvm: 2.1.8
|
39
|
-
gemfile: gemfiles/Gemfile.5.0.pg
|
data/gemfiles/Gemfile.3.2.mysql2
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Runtime dependencies
|
4
|
-
gem 'activerecord', '=3.2.22'
|
5
|
-
gem 'mysql2', '= 0.3.17'
|
6
|
-
gem 'i18n', '=0.6.11' # 0.7 no longer builds for Ruby 1.8.7
|
7
|
-
|
8
|
-
# Development dependencies
|
9
|
-
gem 'rake'
|
10
|
-
gem 'database_cleaner'
|
11
|
-
gem 'rspec', '~> 3.4'
|
12
|
-
gem 'byebug'
|
13
|
-
gem 'gemika'
|
14
|
-
|
15
|
-
# Gem under test
|
16
|
-
gem 'minidusen', :path => '..'
|