filterable-by 0.4.7 → 0.5.0
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 +1 -0
- data/.rubocop.yml +6 -0
- data/.travis.yml +2 -3
- data/Gemfile.lock +34 -34
- data/LICENSE +20 -0
- data/filterable-by.gemspec +3 -4
- data/lib/filterable_by.rb +1 -1
- data/spec/spec_helper.rb +6 -6
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1369751aa86d400aa27ab43ad4cdbbcc92ff06a2ca19162582f8c95914882814
|
|
4
|
+
data.tar.gz: ca8d93901d61b20377196045430f22e63bf622e05abdab58ec4f85a578526458
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e487f8f1e5337faaaf0a25c009ded133b78f21a89c07b49b4d81ead360b6cbfb1a21acb4787ff96b2e5d35931ed126f42c1d1acdfa6b23b8d8ad190da260a41
|
|
7
|
+
data.tar.gz: e68b17a74b428364b6bb46bf92da38f18b0fda824eef32823af567b336f172ef011c2dd15a904e41accad29ea0e0c103f078e8949a30dedd08c7a6b96407152b
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
filterable-by (0.
|
|
4
|
+
filterable-by (0.5.0)
|
|
5
5
|
activerecord
|
|
6
6
|
activesupport
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: http://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
activemodel (
|
|
12
|
-
activesupport (=
|
|
13
|
-
activerecord (
|
|
14
|
-
activemodel (=
|
|
15
|
-
activesupport (=
|
|
16
|
-
|
|
17
|
-
activesupport (5.2.0)
|
|
11
|
+
activemodel (6.0.0)
|
|
12
|
+
activesupport (= 6.0.0)
|
|
13
|
+
activerecord (6.0.0)
|
|
14
|
+
activemodel (= 6.0.0)
|
|
15
|
+
activesupport (= 6.0.0)
|
|
16
|
+
activesupport (6.0.0)
|
|
18
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
19
18
|
i18n (>= 0.7, < 2)
|
|
20
19
|
minitest (~> 5.1)
|
|
21
20
|
tzinfo (~> 1.1)
|
|
22
|
-
|
|
21
|
+
zeitwerk (~> 2.1, >= 2.1.8)
|
|
23
22
|
ast (2.4.0)
|
|
24
|
-
concurrent-ruby (1.
|
|
23
|
+
concurrent-ruby (1.1.5)
|
|
25
24
|
diff-lcs (1.3)
|
|
26
|
-
i18n (1.0
|
|
25
|
+
i18n (1.6.0)
|
|
27
26
|
concurrent-ruby (~> 1.0)
|
|
27
|
+
jaro_winkler (1.5.3)
|
|
28
28
|
minitest (5.11.3)
|
|
29
|
-
parallel (1.
|
|
30
|
-
parser (2.
|
|
29
|
+
parallel (1.17.0)
|
|
30
|
+
parser (2.6.3.0)
|
|
31
31
|
ast (~> 2.4.0)
|
|
32
|
-
powerpack (0.1.1)
|
|
33
32
|
rainbow (3.0.0)
|
|
34
|
-
rake (12.3.
|
|
35
|
-
rspec (3.
|
|
36
|
-
rspec-core (~> 3.
|
|
37
|
-
rspec-expectations (~> 3.
|
|
38
|
-
rspec-mocks (~> 3.
|
|
39
|
-
rspec-core (3.
|
|
40
|
-
rspec-support (~> 3.
|
|
41
|
-
rspec-expectations (3.
|
|
33
|
+
rake (12.3.3)
|
|
34
|
+
rspec (3.8.0)
|
|
35
|
+
rspec-core (~> 3.8.0)
|
|
36
|
+
rspec-expectations (~> 3.8.0)
|
|
37
|
+
rspec-mocks (~> 3.8.0)
|
|
38
|
+
rspec-core (3.8.2)
|
|
39
|
+
rspec-support (~> 3.8.0)
|
|
40
|
+
rspec-expectations (3.8.4)
|
|
42
41
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
43
|
-
rspec-support (~> 3.
|
|
44
|
-
rspec-mocks (3.
|
|
42
|
+
rspec-support (~> 3.8.0)
|
|
43
|
+
rspec-mocks (3.8.1)
|
|
45
44
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
46
|
-
rspec-support (~> 3.
|
|
47
|
-
rspec-support (3.
|
|
48
|
-
rubocop (0.
|
|
45
|
+
rspec-support (~> 3.8.0)
|
|
46
|
+
rspec-support (3.8.2)
|
|
47
|
+
rubocop (0.74.0)
|
|
48
|
+
jaro_winkler (~> 1.5.1)
|
|
49
49
|
parallel (~> 1.10)
|
|
50
|
-
parser (>= 2.
|
|
51
|
-
powerpack (~> 0.1)
|
|
50
|
+
parser (>= 2.6)
|
|
52
51
|
rainbow (>= 2.2.2, < 4.0)
|
|
53
52
|
ruby-progressbar (~> 1.7)
|
|
54
|
-
unicode-display_width (
|
|
55
|
-
ruby-progressbar (1.
|
|
56
|
-
sqlite3 (1.
|
|
53
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
|
54
|
+
ruby-progressbar (1.10.1)
|
|
55
|
+
sqlite3 (1.4.1)
|
|
57
56
|
thread_safe (0.3.6)
|
|
58
57
|
tzinfo (1.2.5)
|
|
59
58
|
thread_safe (~> 0.1)
|
|
60
|
-
unicode-display_width (1.
|
|
59
|
+
unicode-display_width (1.6.0)
|
|
60
|
+
zeitwerk (2.1.9)
|
|
61
61
|
|
|
62
62
|
PLATFORMS
|
|
63
63
|
ruby
|
|
@@ -71,4 +71,4 @@ DEPENDENCIES
|
|
|
71
71
|
sqlite3
|
|
72
72
|
|
|
73
73
|
BUNDLED WITH
|
|
74
|
-
|
|
74
|
+
2.0.2
|
data/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright (c) 2015-2018 Black Square Media
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/filterable-by.gemspec
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
1
|
Gem::Specification.new do |s|
|
|
3
2
|
s.name = 'filterable-by'
|
|
4
|
-
s.version = '0.
|
|
3
|
+
s.version = '0.5.0'
|
|
5
4
|
s.authors = ['Dimitrij Denissenko']
|
|
6
5
|
s.email = ['dimitrij@blacksquaremedia.com']
|
|
7
6
|
s.summary = 'Generate white-listed filter scopes from URL parameter values'
|
|
@@ -9,10 +8,10 @@ Gem::Specification.new do |s|
|
|
|
9
8
|
s.homepage = 'https://github.com/bsm/filterable-by'
|
|
10
9
|
s.license = 'MIT'
|
|
11
10
|
|
|
12
|
-
s.files = `git ls-files -z`.split("\x0").reject {
|
|
11
|
+
s.files = `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^spec/}) }
|
|
13
12
|
s.test_files = `git ls-files -z -- spec/*`.split("\x0")
|
|
14
13
|
s.require_paths = ['lib']
|
|
15
|
-
s.required_ruby_version = '>= 2.
|
|
14
|
+
s.required_ruby_version = '>= 2.5'
|
|
16
15
|
|
|
17
16
|
s.add_dependency 'activerecord'
|
|
18
17
|
s.add_dependency 'activesupport'
|
data/lib/filterable_by.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
|
@@ -47,18 +47,18 @@ end
|
|
|
47
47
|
|
|
48
48
|
AUTHORS = {
|
|
49
49
|
alice: Author.create!,
|
|
50
|
-
bob:
|
|
50
|
+
bob: Author.create!,
|
|
51
51
|
}.freeze
|
|
52
52
|
|
|
53
53
|
POSTS = {
|
|
54
54
|
alices: Post.create!(author_id: AUTHORS[:alice].id),
|
|
55
|
-
bobs:
|
|
55
|
+
bobs: Post.create!(author_id: AUTHORS[:bob].id),
|
|
56
56
|
}.freeze
|
|
57
57
|
|
|
58
58
|
COMMENTS = {
|
|
59
59
|
alice_on_alice: Comment.create!(title: 'AA', post_id: POSTS[:alices].id, author_id: AUTHORS[:alice].id),
|
|
60
|
-
bob_on_alice:
|
|
61
|
-
alice_on_bob:
|
|
62
|
-
bob_on_bob:
|
|
63
|
-
boa_rating:
|
|
60
|
+
bob_on_alice: Comment.create!(title: 'BA', post_id: POSTS[:alices].id, author_id: AUTHORS[:bob].id),
|
|
61
|
+
alice_on_bob: Comment.create!(title: 'AB', post_id: POSTS[:bobs].id, author_id: AUTHORS[:alice].id),
|
|
62
|
+
bob_on_bob: Comment.create!(title: 'BB', post_id: POSTS[:bobs].id, author_id: AUTHORS[:bob].id),
|
|
63
|
+
boa_rating: Rating.create!(stars: 5, post_id: POSTS[:alices].id, author_id: AUTHORS[:bob].id),
|
|
64
64
|
}.freeze
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: filterable-by
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
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: 2019-08-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -116,9 +116,11 @@ extensions: []
|
|
|
116
116
|
extra_rdoc_files: []
|
|
117
117
|
files:
|
|
118
118
|
- ".gitignore"
|
|
119
|
+
- ".rubocop.yml"
|
|
119
120
|
- ".travis.yml"
|
|
120
121
|
- Gemfile
|
|
121
122
|
- Gemfile.lock
|
|
123
|
+
- LICENSE
|
|
122
124
|
- README.md
|
|
123
125
|
- Rakefile
|
|
124
126
|
- filterable-by.gemspec
|
|
@@ -138,15 +140,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
138
140
|
requirements:
|
|
139
141
|
- - ">="
|
|
140
142
|
- !ruby/object:Gem::Version
|
|
141
|
-
version: '2.
|
|
143
|
+
version: '2.5'
|
|
142
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
145
|
requirements:
|
|
144
146
|
- - ">="
|
|
145
147
|
- !ruby/object:Gem::Version
|
|
146
148
|
version: '0'
|
|
147
149
|
requirements: []
|
|
148
|
-
|
|
149
|
-
rubygems_version: 2.7.3
|
|
150
|
+
rubygems_version: 3.0.3
|
|
150
151
|
signing_key:
|
|
151
152
|
specification_version: 4
|
|
152
153
|
summary: Generate white-listed filter scopes from URL parameter values
|