sortable-by 0.12.0 → 0.12.1
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/Gemfile.lock +38 -35
- data/lib/sortable_by.rb +3 -3
- data/sortable-by.gemspec +1 -1
- data/spec/spec_helper.rb +5 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7e89dd7025ad14bfd9a012b10d68a70183692121625d14e56feea7e3484d8398
|
|
4
|
+
data.tar.gz: 931017877555f573485ebbaecb5501ba36e5e4c3a2c7d0842ada6ff2f68cd5fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 45ef18f0d53caa91e2e9cb0c8bcbae4bf4cdc3da59b844e1ddae2f5fa16454905d925a7212a31e4355f077fe7436b25303f17422c47f25592a3036cd623caba3
|
|
7
|
+
data.tar.gz: 724fd46c5ea0fd379980dcfe64a58ea579d9d03edab02516862d654ccc5a472d10bc810ccf48a32d4cc96e70ed5608100596425091c7a541dae5f380f8f4a173
|
data/Gemfile.lock
CHANGED
|
@@ -1,63 +1,66 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
sortable-by (0.12.
|
|
4
|
+
sortable-by (0.12.1)
|
|
5
5
|
activerecord
|
|
6
6
|
activesupport
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: http://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
activemodel (6.0.
|
|
12
|
-
activesupport (= 6.0.
|
|
13
|
-
activerecord (6.0.
|
|
14
|
-
activemodel (= 6.0.
|
|
15
|
-
activesupport (= 6.0.
|
|
16
|
-
activesupport (6.0.
|
|
11
|
+
activemodel (6.0.3.1)
|
|
12
|
+
activesupport (= 6.0.3.1)
|
|
13
|
+
activerecord (6.0.3.1)
|
|
14
|
+
activemodel (= 6.0.3.1)
|
|
15
|
+
activesupport (= 6.0.3.1)
|
|
16
|
+
activesupport (6.0.3.1)
|
|
17
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
18
18
|
i18n (>= 0.7, < 2)
|
|
19
19
|
minitest (~> 5.1)
|
|
20
20
|
tzinfo (~> 1.1)
|
|
21
|
-
zeitwerk (~> 2.
|
|
21
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
|
22
22
|
ast (2.4.0)
|
|
23
|
-
concurrent-ruby (1.1.
|
|
23
|
+
concurrent-ruby (1.1.6)
|
|
24
24
|
diff-lcs (1.3)
|
|
25
|
-
i18n (1.
|
|
25
|
+
i18n (1.8.2)
|
|
26
26
|
concurrent-ruby (~> 1.0)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
parser (2.6.3.0)
|
|
27
|
+
minitest (5.14.1)
|
|
28
|
+
parallel (1.19.1)
|
|
29
|
+
parser (2.7.1.3)
|
|
31
30
|
ast (~> 2.4.0)
|
|
32
31
|
rainbow (3.0.0)
|
|
33
|
-
rake (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
rspec-
|
|
37
|
-
rspec-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
rake (13.0.1)
|
|
33
|
+
rexml (3.2.4)
|
|
34
|
+
rspec (3.9.0)
|
|
35
|
+
rspec-core (~> 3.9.0)
|
|
36
|
+
rspec-expectations (~> 3.9.0)
|
|
37
|
+
rspec-mocks (~> 3.9.0)
|
|
38
|
+
rspec-core (3.9.2)
|
|
39
|
+
rspec-support (~> 3.9.3)
|
|
40
|
+
rspec-expectations (3.9.2)
|
|
41
41
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
42
|
-
rspec-support (~> 3.
|
|
43
|
-
rspec-mocks (3.
|
|
42
|
+
rspec-support (~> 3.9.0)
|
|
43
|
+
rspec-mocks (3.9.1)
|
|
44
44
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
45
|
-
rspec-support (~> 3.
|
|
46
|
-
rspec-support (3.
|
|
47
|
-
rubocop (0.
|
|
48
|
-
jaro_winkler (~> 1.5.1)
|
|
45
|
+
rspec-support (~> 3.9.0)
|
|
46
|
+
rspec-support (3.9.3)
|
|
47
|
+
rubocop (0.84.0)
|
|
49
48
|
parallel (~> 1.10)
|
|
50
|
-
parser (>= 2.
|
|
49
|
+
parser (>= 2.7.0.1)
|
|
51
50
|
rainbow (>= 2.2.2, < 4.0)
|
|
51
|
+
rexml
|
|
52
|
+
rubocop-ast (>= 0.0.3)
|
|
52
53
|
ruby-progressbar (~> 1.7)
|
|
53
|
-
unicode-display_width (>= 1.4.0, <
|
|
54
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
|
55
|
+
rubocop-ast (0.0.3)
|
|
56
|
+
parser (>= 2.7.0.1)
|
|
54
57
|
ruby-progressbar (1.10.1)
|
|
55
|
-
sqlite3 (1.4.
|
|
58
|
+
sqlite3 (1.4.2)
|
|
56
59
|
thread_safe (0.3.6)
|
|
57
|
-
tzinfo (1.2.
|
|
60
|
+
tzinfo (1.2.7)
|
|
58
61
|
thread_safe (~> 0.1)
|
|
59
|
-
unicode-display_width (1.
|
|
60
|
-
zeitwerk (2.
|
|
62
|
+
unicode-display_width (1.7.0)
|
|
63
|
+
zeitwerk (2.3.0)
|
|
61
64
|
|
|
62
65
|
PLATFORMS
|
|
63
66
|
ruby
|
|
@@ -71,4 +74,4 @@ DEPENDENCIES
|
|
|
71
74
|
sqlite3
|
|
72
75
|
|
|
73
76
|
BUNDLED WITH
|
|
74
|
-
2.
|
|
77
|
+
2.1.2
|
data/lib/sortable_by.rb
CHANGED
|
@@ -17,7 +17,7 @@ module ActiveRecord # :nodoc:
|
|
|
17
17
|
duplicate
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def field(name, opts={})
|
|
20
|
+
def field(name, opts = {})
|
|
21
21
|
name = name.to_s
|
|
22
22
|
@_fields[name] = Field.new(name, opts)
|
|
23
23
|
@_default ||= name
|
|
@@ -36,7 +36,7 @@ module ActiveRecord # :nodoc:
|
|
|
36
36
|
|
|
37
37
|
protected
|
|
38
38
|
|
|
39
|
-
def order(relation, expr, fallback=true)
|
|
39
|
+
def order(relation, expr, fallback = true)
|
|
40
40
|
matched = false
|
|
41
41
|
expr.to_s.split(',').each do |name|
|
|
42
42
|
name.strip!
|
|
@@ -60,7 +60,7 @@ module ActiveRecord # :nodoc:
|
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
class Field # :nodoc:
|
|
63
|
-
def initialize(name, opts={})
|
|
63
|
+
def initialize(name, opts = {})
|
|
64
64
|
@cols = Array.wrap(opts[:as])
|
|
65
65
|
@eager_load = Array.wrap(opts[:eager_load]).presence
|
|
66
66
|
|
data/sortable-by.gemspec
CHANGED
data/spec/spec_helper.rb
CHANGED
|
@@ -2,9 +2,11 @@ ENV['RACK_ENV'] ||= 'test'
|
|
|
2
2
|
require 'sortable-by'
|
|
3
3
|
require 'rspec'
|
|
4
4
|
|
|
5
|
-
ActiveRecord::Base.configurations
|
|
6
|
-
'
|
|
7
|
-
|
|
5
|
+
ActiveRecord::Base.configurations = {
|
|
6
|
+
'test' => {
|
|
7
|
+
'adapter' => 'sqlite3',
|
|
8
|
+
'database' => ':memory:',
|
|
9
|
+
},
|
|
8
10
|
}
|
|
9
11
|
ActiveRecord::Base.establish_connection :test
|
|
10
12
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sortable-by
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.12.
|
|
4
|
+
version: 0.12.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: 2020-05-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
147
147
|
- !ruby/object:Gem::Version
|
|
148
148
|
version: '0'
|
|
149
149
|
requirements: []
|
|
150
|
-
rubygems_version: 3.
|
|
150
|
+
rubygems_version: 3.1.2
|
|
151
151
|
signing_key:
|
|
152
152
|
specification_version: 4
|
|
153
153
|
summary: Generate white-listed sort scopes from URL parameter values
|