searchable-by 0.7.0 → 0.7.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 +4 -1
- data/.rubocop.yml +1 -1
- data/Gemfile.lock +35 -38
- data/Gemfile.rails6 +4 -0
- data/Gemfile.rails6.lock +91 -0
- data/searchable-by.gemspec +5 -2
- data/spec/searchable_by_spec.rb +1 -0
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a91aa1b24f6ea20f4568629c1d6cc4010c2a6754932ad1251500a702c2f79165
|
4
|
+
data.tar.gz: bbe553d775212b8bb0c076fac08fe10ed7912931a150b3c93c6becd7fa298e7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 958e8ebc7f8ee60f4531f75fdf5780f667986985f0392af3a303ad0f82f3a810e2bd8aa23171b25ee9d906a111cc4be8cd95a83b9c302f3fe55390e95112835d
|
7
|
+
data.tar.gz: 393536f83f00c301b2a2bcf9ae10a158f6ddd9cb642170c893e68d9d1c8bb967131de058c48414f20111c1a5cecf7c0eb98240028e9858a2c788918e38fd3642
|
data/.github/workflows/test.yml
CHANGED
@@ -11,7 +11,10 @@ jobs:
|
|
11
11
|
runs-on: ubuntu-latest
|
12
12
|
strategy:
|
13
13
|
matrix:
|
14
|
-
ruby-version: ["2.
|
14
|
+
ruby-version: ["2.7", "3.0", "3.1"]
|
15
|
+
gemfiles: ["Gemfile", "Gemfile.rails6"]
|
16
|
+
env:
|
17
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
15
18
|
steps:
|
16
19
|
- uses: actions/checkout@v2
|
17
20
|
- uses: ruby/setup-ruby@v1
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,79 +1,76 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
searchable-by (0.7.
|
4
|
+
searchable-by (0.7.1)
|
5
5
|
activerecord
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activemodel (
|
11
|
-
activesupport (=
|
12
|
-
activerecord (
|
13
|
-
activemodel (=
|
14
|
-
activesupport (=
|
15
|
-
activesupport (
|
10
|
+
activemodel (7.0.2.3)
|
11
|
+
activesupport (= 7.0.2.3)
|
12
|
+
activerecord (7.0.2.3)
|
13
|
+
activemodel (= 7.0.2.3)
|
14
|
+
activesupport (= 7.0.2.3)
|
15
|
+
activesupport (7.0.2.3)
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
17
|
i18n (>= 1.6, < 2)
|
18
18
|
minitest (>= 5.1)
|
19
19
|
tzinfo (~> 2.0)
|
20
|
-
zeitwerk (~> 2.3)
|
21
20
|
ast (2.4.2)
|
22
21
|
concurrent-ruby (1.1.9)
|
23
|
-
diff-lcs (1.
|
24
|
-
i18n (1.
|
22
|
+
diff-lcs (1.5.0)
|
23
|
+
i18n (1.10.0)
|
25
24
|
concurrent-ruby (~> 1.0)
|
26
|
-
minitest (5.
|
27
|
-
parallel (1.
|
28
|
-
parser (3.
|
25
|
+
minitest (5.15.0)
|
26
|
+
parallel (1.21.0)
|
27
|
+
parser (3.1.1.0)
|
29
28
|
ast (~> 2.4.1)
|
30
|
-
rainbow (3.
|
29
|
+
rainbow (3.1.1)
|
31
30
|
rake (13.0.6)
|
32
|
-
regexp_parser (2.
|
31
|
+
regexp_parser (2.2.1)
|
33
32
|
rexml (3.2.5)
|
34
|
-
rspec (3.
|
35
|
-
rspec-core (~> 3.
|
36
|
-
rspec-expectations (~> 3.
|
37
|
-
rspec-mocks (~> 3.
|
38
|
-
rspec-core (3.
|
39
|
-
rspec-support (~> 3.
|
40
|
-
rspec-expectations (3.
|
33
|
+
rspec (3.11.0)
|
34
|
+
rspec-core (~> 3.11.0)
|
35
|
+
rspec-expectations (~> 3.11.0)
|
36
|
+
rspec-mocks (~> 3.11.0)
|
37
|
+
rspec-core (3.11.0)
|
38
|
+
rspec-support (~> 3.11.0)
|
39
|
+
rspec-expectations (3.11.0)
|
41
40
|
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
-
rspec-support (~> 3.
|
43
|
-
rspec-mocks (3.
|
41
|
+
rspec-support (~> 3.11.0)
|
42
|
+
rspec-mocks (3.11.0)
|
44
43
|
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
-
rspec-support (~> 3.
|
46
|
-
rspec-support (3.
|
47
|
-
rubocop (1.
|
44
|
+
rspec-support (~> 3.11.0)
|
45
|
+
rspec-support (3.11.0)
|
46
|
+
rubocop (1.26.0)
|
48
47
|
parallel (~> 1.10)
|
49
|
-
parser (>= 3.
|
48
|
+
parser (>= 3.1.0.0)
|
50
49
|
rainbow (>= 2.2.2, < 4.0)
|
51
50
|
regexp_parser (>= 1.8, < 3.0)
|
52
51
|
rexml
|
53
|
-
rubocop-ast (>= 1.
|
52
|
+
rubocop-ast (>= 1.16.0, < 2.0)
|
54
53
|
ruby-progressbar (~> 1.7)
|
55
54
|
unicode-display_width (>= 1.4.0, < 3.0)
|
56
|
-
rubocop-ast (1.
|
57
|
-
parser (>= 3.
|
55
|
+
rubocop-ast (1.16.0)
|
56
|
+
parser (>= 3.1.1.0)
|
58
57
|
rubocop-bsm (0.6.0)
|
59
58
|
rubocop (~> 1.0)
|
60
59
|
rubocop-performance
|
61
60
|
rubocop-rake
|
62
61
|
rubocop-rspec
|
63
|
-
rubocop-performance (1.
|
62
|
+
rubocop-performance (1.13.3)
|
64
63
|
rubocop (>= 1.7.0, < 2.0)
|
65
64
|
rubocop-ast (>= 0.4.0)
|
66
65
|
rubocop-rake (0.6.0)
|
67
66
|
rubocop (~> 1.0)
|
68
|
-
rubocop-rspec (2.
|
69
|
-
rubocop (~> 1.
|
70
|
-
rubocop-ast (>= 1.1.0)
|
67
|
+
rubocop-rspec (2.9.0)
|
68
|
+
rubocop (~> 1.19)
|
71
69
|
ruby-progressbar (1.11.0)
|
72
70
|
sqlite3 (1.4.2)
|
73
71
|
tzinfo (2.0.4)
|
74
72
|
concurrent-ruby (~> 1.0)
|
75
|
-
unicode-display_width (2.
|
76
|
-
zeitwerk (2.4.2)
|
73
|
+
unicode-display_width (2.1.0)
|
77
74
|
|
78
75
|
PLATFORMS
|
79
76
|
ruby
|
@@ -88,4 +85,4 @@ DEPENDENCIES
|
|
88
85
|
sqlite3
|
89
86
|
|
90
87
|
BUNDLED WITH
|
91
|
-
2.
|
88
|
+
2.3.9
|
data/Gemfile.rails6
ADDED
data/Gemfile.rails6.lock
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
searchable-by (0.7.1)
|
5
|
+
activerecord
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (6.1.4.7)
|
11
|
+
activesupport (= 6.1.4.7)
|
12
|
+
activerecord (6.1.4.7)
|
13
|
+
activemodel (= 6.1.4.7)
|
14
|
+
activesupport (= 6.1.4.7)
|
15
|
+
activesupport (6.1.4.7)
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
|
+
i18n (>= 1.6, < 2)
|
18
|
+
minitest (>= 5.1)
|
19
|
+
tzinfo (~> 2.0)
|
20
|
+
zeitwerk (~> 2.3)
|
21
|
+
ast (2.4.2)
|
22
|
+
concurrent-ruby (1.1.9)
|
23
|
+
diff-lcs (1.5.0)
|
24
|
+
i18n (1.10.0)
|
25
|
+
concurrent-ruby (~> 1.0)
|
26
|
+
minitest (5.15.0)
|
27
|
+
parallel (1.21.0)
|
28
|
+
parser (3.1.1.0)
|
29
|
+
ast (~> 2.4.1)
|
30
|
+
rainbow (3.1.1)
|
31
|
+
rake (13.0.6)
|
32
|
+
regexp_parser (2.2.1)
|
33
|
+
rexml (3.2.5)
|
34
|
+
rspec (3.11.0)
|
35
|
+
rspec-core (~> 3.11.0)
|
36
|
+
rspec-expectations (~> 3.11.0)
|
37
|
+
rspec-mocks (~> 3.11.0)
|
38
|
+
rspec-core (3.11.0)
|
39
|
+
rspec-support (~> 3.11.0)
|
40
|
+
rspec-expectations (3.11.0)
|
41
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
+
rspec-support (~> 3.11.0)
|
43
|
+
rspec-mocks (3.11.0)
|
44
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
+
rspec-support (~> 3.11.0)
|
46
|
+
rspec-support (3.11.0)
|
47
|
+
rubocop (1.26.0)
|
48
|
+
parallel (~> 1.10)
|
49
|
+
parser (>= 3.1.0.0)
|
50
|
+
rainbow (>= 2.2.2, < 4.0)
|
51
|
+
regexp_parser (>= 1.8, < 3.0)
|
52
|
+
rexml
|
53
|
+
rubocop-ast (>= 1.16.0, < 2.0)
|
54
|
+
ruby-progressbar (~> 1.7)
|
55
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
56
|
+
rubocop-ast (1.16.0)
|
57
|
+
parser (>= 3.1.1.0)
|
58
|
+
rubocop-bsm (0.6.0)
|
59
|
+
rubocop (~> 1.0)
|
60
|
+
rubocop-performance
|
61
|
+
rubocop-rake
|
62
|
+
rubocop-rspec
|
63
|
+
rubocop-performance (1.13.3)
|
64
|
+
rubocop (>= 1.7.0, < 2.0)
|
65
|
+
rubocop-ast (>= 0.4.0)
|
66
|
+
rubocop-rake (0.6.0)
|
67
|
+
rubocop (~> 1.0)
|
68
|
+
rubocop-rspec (2.9.0)
|
69
|
+
rubocop (~> 1.19)
|
70
|
+
ruby-progressbar (1.11.0)
|
71
|
+
sqlite3 (1.4.2)
|
72
|
+
tzinfo (2.0.4)
|
73
|
+
concurrent-ruby (~> 1.0)
|
74
|
+
unicode-display_width (2.1.0)
|
75
|
+
zeitwerk (2.5.4)
|
76
|
+
|
77
|
+
PLATFORMS
|
78
|
+
x86_64-linux
|
79
|
+
|
80
|
+
DEPENDENCIES
|
81
|
+
activerecord (~> 6.1)
|
82
|
+
bundler
|
83
|
+
rake
|
84
|
+
rspec
|
85
|
+
rubocop
|
86
|
+
rubocop-bsm
|
87
|
+
searchable-by!
|
88
|
+
sqlite3
|
89
|
+
|
90
|
+
BUNDLED WITH
|
91
|
+
2.3.9
|
data/searchable-by.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'searchable-by'
|
3
|
-
s.version = '0.7.
|
3
|
+
s.version = '0.7.1'
|
4
4
|
s.authors = ['Dimitrij Denissenko']
|
5
5
|
s.email = ['dimitrij@blacksquaremedia.com']
|
6
6
|
s.summary = 'Generate search scopes'
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.files = `git ls-files -z`.split("\x0").reject {|f| f.start_with?('spec/') }
|
12
12
|
s.test_files = `git ls-files -z -- spec/*`.split("\x0")
|
13
13
|
s.require_paths = ['lib']
|
14
|
-
s.required_ruby_version = '>= 2.
|
14
|
+
s.required_ruby_version = '>= 2.7'
|
15
15
|
|
16
16
|
s.add_dependency 'activerecord'
|
17
17
|
s.add_development_dependency 'bundler'
|
@@ -20,4 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_development_dependency 'rubocop'
|
21
21
|
s.add_development_dependency 'rubocop-bsm'
|
22
22
|
s.add_development_dependency 'sqlite3'
|
23
|
+
s.metadata = {
|
24
|
+
'rubygems_mfa_required' => 'true',
|
25
|
+
}
|
23
26
|
end
|
data/spec/searchable_by_spec.rb
CHANGED
@@ -9,6 +9,7 @@ describe SearchableBy do
|
|
9
9
|
it 'configures correctly' do
|
10
10
|
expect(AbstractModel._searchable_by_profiles[:default].columns.size).to eq(1)
|
11
11
|
expect(Post._searchable_by_profiles[:default].columns.size).to eq(6)
|
12
|
+
expect(User._searchable_by_profiles[:default].min_length).to eq(3)
|
12
13
|
end
|
13
14
|
|
14
15
|
it 'generates SQL' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: searchable-by
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitrij Denissenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -120,6 +120,8 @@ files:
|
|
120
120
|
- ".rubocop.yml"
|
121
121
|
- Gemfile
|
122
122
|
- Gemfile.lock
|
123
|
+
- Gemfile.rails6
|
124
|
+
- Gemfile.rails6.lock
|
123
125
|
- LICENSE
|
124
126
|
- README.md
|
125
127
|
- Rakefile
|
@@ -137,7 +139,8 @@ files:
|
|
137
139
|
homepage: https://github.com/bsm/sortable-by
|
138
140
|
licenses:
|
139
141
|
- Apache-2.0
|
140
|
-
metadata:
|
142
|
+
metadata:
|
143
|
+
rubygems_mfa_required: 'true'
|
141
144
|
post_install_message:
|
142
145
|
rdoc_options: []
|
143
146
|
require_paths:
|
@@ -146,14 +149,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
146
149
|
requirements:
|
147
150
|
- - ">="
|
148
151
|
- !ruby/object:Gem::Version
|
149
|
-
version: '2.
|
152
|
+
version: '2.7'
|
150
153
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
154
|
requirements:
|
152
155
|
- - ">="
|
153
156
|
- !ruby/object:Gem::Version
|
154
157
|
version: '0'
|
155
158
|
requirements: []
|
156
|
-
rubygems_version: 3.
|
159
|
+
rubygems_version: 3.3.3
|
157
160
|
signing_key:
|
158
161
|
specification_version: 4
|
159
162
|
summary: Generate search scopes
|