filterable-by 0.4.7 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c170888a73dbeca47de324efe3056b63112936dd4b0ebd4b5952b44a48727a0
4
- data.tar.gz: d63ac1513cb002bc12ba106abe5f99c2e90f91c9d5a8696397a52e8f5bf7c732
3
+ metadata.gz: 1369751aa86d400aa27ab43ad4cdbbcc92ff06a2ca19162582f8c95914882814
4
+ data.tar.gz: ca8d93901d61b20377196045430f22e63bf622e05abdab58ec4f85a578526458
5
5
  SHA512:
6
- metadata.gz: 01e287700b6bec04c0a53319de330b113cad3466d9a00288206ed0e60c9fbc35de8cb6089d976590dfe808b7b9e06e344b0d1378a1f60a7fb232de8f9430019b
7
- data.tar.gz: 447d4907f3e7876d878d4fdb8a070214cd6804dfa40c67277639f172ba8a17b067d48f7ae96d1c43d90734d60e0dd8287aab5d1fb52e73de2779f9d4bba72a46
6
+ metadata.gz: 5e487f8f1e5337faaaf0a25c009ded133b78f21a89c07b49b4d81ead360b6cbfb1a21acb4787ff96b2e5d35931ed126f42c1d1acdfa6b23b8d8ad190da260a41
7
+ data.tar.gz: e68b17a74b428364b6bb46bf92da38f18b0fda824eef32823af567b336f172ef011c2dd15a904e41accad29ea0e0c103f078e8949a30dedd08c7a6b96407152b
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  spec/tmp
2
2
  pkg
3
3
  *.gem
4
+ .rubocop-*
data/.rubocop.yml ADDED
@@ -0,0 +1,6 @@
1
+ inherit_from:
2
+ - https://gitlab.com/bsm/misc/raw/master/rubocop/default.yml
3
+ AllCops:
4
+ TargetRubyVersion: "2.5"
5
+ Naming/FileName:
6
+ Exclude: [lib/filterable-by.rb]
data/.travis.yml CHANGED
@@ -1,6 +1,5 @@
1
1
  rvm:
2
- - 1.9.3
3
- - 2.1.2
4
- - 2.2.3
2
+ - 2.5
3
+ - 2.6
5
4
  gemfile:
6
5
  - Gemfile
data/Gemfile.lock CHANGED
@@ -1,63 +1,63 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- filterable-by (0.4.7)
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 (5.2.0)
12
- activesupport (= 5.2.0)
13
- activerecord (5.2.0)
14
- activemodel (= 5.2.0)
15
- activesupport (= 5.2.0)
16
- arel (>= 9.0)
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
- arel (9.0.0)
21
+ zeitwerk (~> 2.1, >= 2.1.8)
23
22
  ast (2.4.0)
24
- concurrent-ruby (1.0.5)
23
+ concurrent-ruby (1.1.5)
25
24
  diff-lcs (1.3)
26
- i18n (1.0.1)
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.12.1)
30
- parser (2.5.1.0)
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.1)
35
- rspec (3.7.0)
36
- rspec-core (~> 3.7.0)
37
- rspec-expectations (~> 3.7.0)
38
- rspec-mocks (~> 3.7.0)
39
- rspec-core (3.7.1)
40
- rspec-support (~> 3.7.0)
41
- rspec-expectations (3.7.0)
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.7.0)
44
- rspec-mocks (3.7.0)
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.7.0)
47
- rspec-support (3.7.1)
48
- rubocop (0.55.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.5)
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 (~> 1.0, >= 1.0.1)
55
- ruby-progressbar (1.9.0)
56
- sqlite3 (1.3.13)
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.3.2)
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
- 1.16.1
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.
@@ -1,7 +1,6 @@
1
-
2
1
  Gem::Specification.new do |s|
3
2
  s.name = 'filterable-by'
4
- s.version = '0.4.7'
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 { |f| f.match(%r{^spec/}) }
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.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
@@ -9,7 +9,7 @@ module ActiveRecord
9
9
  when String, Numeric
10
10
  value
11
11
  when Array
12
- value.select { |v| normalize(v) }
12
+ value.select {|v| normalize(v) }
13
13
  end
14
14
  end
15
15
 
data/spec/spec_helper.rb CHANGED
@@ -47,18 +47,18 @@ end
47
47
 
48
48
  AUTHORS = {
49
49
  alice: Author.create!,
50
- bob: Author.create!,
50
+ bob: Author.create!,
51
51
  }.freeze
52
52
 
53
53
  POSTS = {
54
54
  alices: Post.create!(author_id: AUTHORS[:alice].id),
55
- bobs: Post.create!(author_id: AUTHORS[:bob].id),
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: 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),
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.7
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: 2018-05-10 00:00:00.000000000 Z
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.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
- rubyforge_project:
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