mobility-ransack 0.2.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/Gemfile +1 -9
- data/Gemfile.lock +130 -113
- data/README.md +15 -14
- data/lib/mobility/plugins/ransack.rb +12 -30
- data/lib/mobility/ransack.rb +50 -0
- data/lib/mobility/ransack/version.rb +1 -1
- metadata +39 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33d4ea8f4ac1590f792f64a125d1a7005f98720c56d4932f41b6f8493912c548
|
4
|
+
data.tar.gz: 569f220a16986e813a89fea0d2b6fd25e99c8b1e1c6874c36f2ca72a5c6a555c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8dfa3e4690f5f3b35833fd7c3fcfbfb762fd6fafe4375804339688e3bd0d451dc19108c8846428b7a4a4b66c965d9635d405dd928742f878c9b00923418967c
|
7
|
+
data.tar.gz: 2d11614d1dec4302221b46b27aff89eebb674db1dee4d7feb99abb76e0e36117e6ab195327160e20bafca0d0052ed61e1aa72888ec047409b2f4a169b3b5e2bd
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,28 @@
|
|
1
1
|
# Mobility Ransack Changelog
|
2
2
|
|
3
|
+
## 1.1
|
4
|
+
|
5
|
+
### 1.1.0
|
6
|
+
- Make MobilityRansack handle associations correctly
|
7
|
+
([#20](https://github.com/shioyama/mobility-ransack/pull/20))
|
8
|
+
|
9
|
+
## 1.0
|
10
|
+
|
11
|
+
### 1.0.1
|
12
|
+
- Update gemspec to support Mobility 1.x
|
13
|
+
([#17](https://github.com/shioyama/mobility-ransack/pull/17))
|
14
|
+
|
15
|
+
### 1.0.0
|
16
|
+
- Enable Mobility 1.x compatibility
|
17
|
+
([#10](https://github.com/shioyama/mobility-ransack/pull/10))
|
18
|
+
|
3
19
|
## 0.2
|
4
20
|
|
21
|
+
### 0.2.2
|
22
|
+
- Remove version pinning for Ransack dependency
|
23
|
+
([#6](https://github.com/shioyama/mobility-ransack/pull/6)), thanks
|
24
|
+
[peterwalker](https://github.com/petewalker)!
|
25
|
+
|
5
26
|
### 0.2.1
|
6
27
|
- Extend ransack search with module
|
7
28
|
([#4](https://github.com/shioyama/mobility-ransack/pull/4))
|
data/Gemfile
CHANGED
@@ -6,15 +6,7 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
|
6
6
|
gemspec
|
7
7
|
|
8
8
|
group :development, :test do
|
9
|
-
|
10
|
-
gem 'rails', '>= 5.1', '< 5.2'
|
11
|
-
elsif ENV['RAILS_VERSION'] == '5.0'
|
12
|
-
gem 'rails', '>= 5.0', '< 5.1'
|
13
|
-
else
|
14
|
-
gem 'rails', '>= 5.2.0.rc2', '< 5.3'
|
15
|
-
# see: https://github.com/activerecord-hackery/ransack/issues/948#issuecomment-412414365
|
16
|
-
gem 'ransack', '~> 2.0.0'
|
17
|
-
end
|
9
|
+
gem 'rails', "~> #{ENV['RAILS_VERSION'] || '6.1'}.0"
|
18
10
|
|
19
11
|
gem 'pry'
|
20
12
|
gem 'pry-byebug'
|
data/Gemfile.lock
CHANGED
@@ -1,168 +1,185 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mobility-ransack (0.
|
5
|
-
mobility (
|
6
|
-
ransack (>= 1.8.0, <
|
4
|
+
mobility-ransack (1.0.1)
|
5
|
+
mobility (>= 1.0.1, < 2.0)
|
6
|
+
ransack (>= 1.8.0, < 3.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actioncable (
|
12
|
-
actionpack (=
|
11
|
+
actioncable (6.1.3.2)
|
12
|
+
actionpack (= 6.1.3.2)
|
13
|
+
activesupport (= 6.1.3.2)
|
13
14
|
nio4r (~> 2.0)
|
14
15
|
websocket-driver (>= 0.6.1)
|
15
|
-
|
16
|
-
actionpack (=
|
17
|
-
|
18
|
-
|
16
|
+
actionmailbox (6.1.3.2)
|
17
|
+
actionpack (= 6.1.3.2)
|
18
|
+
activejob (= 6.1.3.2)
|
19
|
+
activerecord (= 6.1.3.2)
|
20
|
+
activestorage (= 6.1.3.2)
|
21
|
+
activesupport (= 6.1.3.2)
|
22
|
+
mail (>= 2.7.1)
|
23
|
+
actionmailer (6.1.3.2)
|
24
|
+
actionpack (= 6.1.3.2)
|
25
|
+
actionview (= 6.1.3.2)
|
26
|
+
activejob (= 6.1.3.2)
|
27
|
+
activesupport (= 6.1.3.2)
|
19
28
|
mail (~> 2.5, >= 2.5.4)
|
20
29
|
rails-dom-testing (~> 2.0)
|
21
|
-
actionpack (
|
22
|
-
actionview (=
|
23
|
-
activesupport (=
|
24
|
-
rack (~> 2.0)
|
30
|
+
actionpack (6.1.3.2)
|
31
|
+
actionview (= 6.1.3.2)
|
32
|
+
activesupport (= 6.1.3.2)
|
33
|
+
rack (~> 2.0, >= 2.0.9)
|
25
34
|
rack-test (>= 0.6.3)
|
26
35
|
rails-dom-testing (~> 2.0)
|
27
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
28
|
-
|
29
|
-
|
36
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
37
|
+
actiontext (6.1.3.2)
|
38
|
+
actionpack (= 6.1.3.2)
|
39
|
+
activerecord (= 6.1.3.2)
|
40
|
+
activestorage (= 6.1.3.2)
|
41
|
+
activesupport (= 6.1.3.2)
|
42
|
+
nokogiri (>= 1.8.5)
|
43
|
+
actionview (6.1.3.2)
|
44
|
+
activesupport (= 6.1.3.2)
|
30
45
|
builder (~> 3.1)
|
31
46
|
erubi (~> 1.4)
|
32
47
|
rails-dom-testing (~> 2.0)
|
33
|
-
rails-html-sanitizer (~> 1.
|
34
|
-
activejob (
|
35
|
-
activesupport (=
|
48
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
49
|
+
activejob (6.1.3.2)
|
50
|
+
activesupport (= 6.1.3.2)
|
36
51
|
globalid (>= 0.3.6)
|
37
|
-
activemodel (
|
38
|
-
activesupport (=
|
39
|
-
activerecord (
|
40
|
-
activemodel (=
|
41
|
-
activesupport (=
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
activerecord (=
|
46
|
-
|
47
|
-
|
52
|
+
activemodel (6.1.3.2)
|
53
|
+
activesupport (= 6.1.3.2)
|
54
|
+
activerecord (6.1.3.2)
|
55
|
+
activemodel (= 6.1.3.2)
|
56
|
+
activesupport (= 6.1.3.2)
|
57
|
+
activestorage (6.1.3.2)
|
58
|
+
actionpack (= 6.1.3.2)
|
59
|
+
activejob (= 6.1.3.2)
|
60
|
+
activerecord (= 6.1.3.2)
|
61
|
+
activesupport (= 6.1.3.2)
|
62
|
+
marcel (~> 1.0.0)
|
63
|
+
mini_mime (~> 1.0.2)
|
64
|
+
activesupport (6.1.3.2)
|
48
65
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
49
|
-
i18n (>=
|
50
|
-
minitest (
|
51
|
-
tzinfo (~>
|
52
|
-
|
53
|
-
builder (3.2.
|
54
|
-
byebug (
|
66
|
+
i18n (>= 1.6, < 2)
|
67
|
+
minitest (>= 5.1)
|
68
|
+
tzinfo (~> 2.0)
|
69
|
+
zeitwerk (~> 2.3)
|
70
|
+
builder (3.2.4)
|
71
|
+
byebug (11.1.1)
|
55
72
|
coderay (1.1.2)
|
56
|
-
concurrent-ruby (1.
|
57
|
-
crass (1.0.
|
58
|
-
database_cleaner (1.
|
73
|
+
concurrent-ruby (1.1.9)
|
74
|
+
crass (1.0.6)
|
75
|
+
database_cleaner (1.8.4)
|
59
76
|
diff-lcs (1.3)
|
60
|
-
erubi (1.
|
61
|
-
globalid (0.4.
|
77
|
+
erubi (1.10.0)
|
78
|
+
globalid (0.4.2)
|
62
79
|
activesupport (>= 4.2.0)
|
63
|
-
i18n (1.
|
80
|
+
i18n (1.8.10)
|
64
81
|
concurrent-ruby (~> 1.0)
|
65
|
-
loofah (2.
|
82
|
+
loofah (2.10.0)
|
66
83
|
crass (~> 1.0.2)
|
67
84
|
nokogiri (>= 1.5.9)
|
68
|
-
mail (2.7.
|
85
|
+
mail (2.7.1)
|
69
86
|
mini_mime (>= 0.1.1)
|
70
|
-
marcel (0.
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
mobility (0.8.0)
|
78
|
-
i18n (>= 0.6.10, < 1.1)
|
87
|
+
marcel (1.0.1)
|
88
|
+
method_source (1.0.0)
|
89
|
+
mini_mime (1.0.3)
|
90
|
+
mini_portile2 (2.5.3)
|
91
|
+
minitest (5.14.4)
|
92
|
+
mobility (1.1.2)
|
93
|
+
i18n (>= 0.6.10, < 2)
|
79
94
|
request_store (~> 1.0)
|
80
|
-
nio4r (2.
|
81
|
-
nokogiri (1.
|
82
|
-
mini_portile2 (~> 2.
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
95
|
+
nio4r (2.5.7)
|
96
|
+
nokogiri (1.11.7)
|
97
|
+
mini_portile2 (~> 2.5.0)
|
98
|
+
racc (~> 1.4)
|
99
|
+
pry (0.13.0)
|
100
|
+
coderay (~> 1.1)
|
101
|
+
method_source (~> 1.0)
|
102
|
+
pry-byebug (3.9.0)
|
103
|
+
byebug (~> 11.0)
|
104
|
+
pry (~> 0.13.0)
|
105
|
+
racc (1.5.2)
|
106
|
+
rack (2.2.3)
|
90
107
|
rack-test (1.1.0)
|
91
108
|
rack (>= 1.0, < 3)
|
92
|
-
rails (
|
93
|
-
actioncable (=
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
109
|
+
rails (6.1.3.2)
|
110
|
+
actioncable (= 6.1.3.2)
|
111
|
+
actionmailbox (= 6.1.3.2)
|
112
|
+
actionmailer (= 6.1.3.2)
|
113
|
+
actionpack (= 6.1.3.2)
|
114
|
+
actiontext (= 6.1.3.2)
|
115
|
+
actionview (= 6.1.3.2)
|
116
|
+
activejob (= 6.1.3.2)
|
117
|
+
activemodel (= 6.1.3.2)
|
118
|
+
activerecord (= 6.1.3.2)
|
119
|
+
activestorage (= 6.1.3.2)
|
120
|
+
activesupport (= 6.1.3.2)
|
121
|
+
bundler (>= 1.15.0)
|
122
|
+
railties (= 6.1.3.2)
|
104
123
|
sprockets-rails (>= 2.0.0)
|
105
124
|
rails-dom-testing (2.0.3)
|
106
125
|
activesupport (>= 4.2.0)
|
107
126
|
nokogiri (>= 1.6)
|
108
|
-
rails-html-sanitizer (1.0
|
109
|
-
loofah (~> 2.
|
110
|
-
railties (
|
111
|
-
actionpack (=
|
112
|
-
activesupport (=
|
127
|
+
rails-html-sanitizer (1.3.0)
|
128
|
+
loofah (~> 2.3)
|
129
|
+
railties (6.1.3.2)
|
130
|
+
actionpack (= 6.1.3.2)
|
131
|
+
activesupport (= 6.1.3.2)
|
113
132
|
method_source
|
114
133
|
rake (>= 0.8.7)
|
115
|
-
thor (
|
116
|
-
rake (
|
117
|
-
ransack (2.
|
118
|
-
|
119
|
-
|
120
|
-
activesupport (>= 5.0)
|
134
|
+
thor (~> 1.0)
|
135
|
+
rake (13.0.1)
|
136
|
+
ransack (2.4.1)
|
137
|
+
activerecord (>= 5.2.4)
|
138
|
+
activesupport (>= 5.2.4)
|
121
139
|
i18n
|
122
|
-
request_store (1.
|
140
|
+
request_store (1.5.0)
|
123
141
|
rack (>= 1.4)
|
124
|
-
rspec (3.
|
125
|
-
rspec-core (~> 3.
|
126
|
-
rspec-expectations (~> 3.
|
127
|
-
rspec-mocks (~> 3.
|
128
|
-
rspec-core (3.
|
129
|
-
rspec-support (~> 3.
|
130
|
-
rspec-expectations (3.
|
142
|
+
rspec (3.9.0)
|
143
|
+
rspec-core (~> 3.9.0)
|
144
|
+
rspec-expectations (~> 3.9.0)
|
145
|
+
rspec-mocks (~> 3.9.0)
|
146
|
+
rspec-core (3.9.1)
|
147
|
+
rspec-support (~> 3.9.1)
|
148
|
+
rspec-expectations (3.9.1)
|
131
149
|
diff-lcs (>= 1.2.0, < 2.0)
|
132
|
-
rspec-support (~> 3.
|
133
|
-
rspec-mocks (3.
|
150
|
+
rspec-support (~> 3.9.0)
|
151
|
+
rspec-mocks (3.9.1)
|
134
152
|
diff-lcs (>= 1.2.0, < 2.0)
|
135
|
-
rspec-support (~> 3.
|
136
|
-
rspec-support (3.
|
137
|
-
sprockets (
|
153
|
+
rspec-support (~> 3.9.0)
|
154
|
+
rspec-support (3.9.2)
|
155
|
+
sprockets (4.0.2)
|
138
156
|
concurrent-ruby (~> 1.0)
|
139
157
|
rack (> 1, < 3)
|
140
|
-
sprockets-rails (3.2.
|
158
|
+
sprockets-rails (3.2.2)
|
141
159
|
actionpack (>= 4.0)
|
142
160
|
activesupport (>= 4.0)
|
143
161
|
sprockets (>= 3.0.0)
|
144
|
-
sqlite3 (1.
|
145
|
-
thor (
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
websocket-driver (0.7.0)
|
162
|
+
sqlite3 (1.4.2)
|
163
|
+
thor (1.1.0)
|
164
|
+
tzinfo (2.0.4)
|
165
|
+
concurrent-ruby (~> 1.0)
|
166
|
+
websocket-driver (0.7.4)
|
150
167
|
websocket-extensions (>= 0.1.0)
|
151
|
-
websocket-extensions (0.1.
|
168
|
+
websocket-extensions (0.1.5)
|
169
|
+
zeitwerk (2.4.2)
|
152
170
|
|
153
171
|
PLATFORMS
|
154
172
|
ruby
|
155
173
|
|
156
174
|
DEPENDENCIES
|
157
|
-
database_cleaner (~> 1.7.0)
|
175
|
+
database_cleaner (~> 1.7, >= 1.7.0)
|
158
176
|
mobility-ransack!
|
159
177
|
pry
|
160
178
|
pry-byebug
|
161
|
-
rails (
|
162
|
-
rake (
|
163
|
-
ransack (~> 2.0.0)
|
179
|
+
rails (~> 6.1.0)
|
180
|
+
rake (>= 12.3.3)
|
164
181
|
rspec (~> 3.0)
|
165
|
-
sqlite3
|
182
|
+
sqlite3 (~> 1.3, >= 1.3.0)
|
166
183
|
|
167
184
|
BUNDLED WITH
|
168
|
-
|
185
|
+
2.0.2
|
data/README.md
CHANGED
@@ -2,10 +2,12 @@ Mobility Ransack
|
|
2
2
|
================
|
3
3
|
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/mobility-ransack.svg)][gem]
|
5
|
-
[![Build Status](https://
|
5
|
+
[![Build Status](https://github.com/shioyama/mobility-ransack/workflows/CI/badge.svg)][actions]
|
6
|
+
[![Code Climate](https://api.codeclimate.com/v1/badges/2494f02bcd6b65a545fa/maintainability.svg)][codeclimate]
|
6
7
|
|
7
8
|
[gem]: https://rubygems.org/gems/mobility-ransack
|
8
|
-
[
|
9
|
+
[actions]: https://github.com/shioyama/mobility-ransack/actions
|
10
|
+
[codeclimate]: https://codeclimate.com/github/shioyama/mobility-ransack
|
9
11
|
|
10
12
|
Search on translated attributes with
|
11
13
|
[Mobility](https://github.com/shioyama/mobility) and
|
@@ -16,29 +18,28 @@ Search on translated attributes with
|
|
16
18
|
Just add the gem to your Gemfile:
|
17
19
|
|
18
20
|
```ruby
|
19
|
-
gem 'mobility-ransack', '~>
|
21
|
+
gem 'mobility-ransack', '~> 1.1.0'
|
20
22
|
```
|
21
23
|
|
22
|
-
Now enable the `ransack` plugin in Mobility's configuration
|
23
|
-
used, and optionally set the value for the `:ransack` key in `default_options`
|
24
|
-
to `true` to enable it for all translated attributes on all models.
|
24
|
+
Now enable the `ransack` plugin in Mobility's configuration:
|
25
25
|
|
26
26
|
```ruby
|
27
|
-
Mobility.configure do
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
Mobility.configure do
|
28
|
+
plugins do
|
29
|
+
ransack
|
30
|
+
|
31
|
+
# ...
|
32
|
+
end
|
31
33
|
end
|
32
34
|
```
|
33
35
|
|
34
|
-
|
35
|
-
|
36
|
-
`ransack` option, like this:
|
36
|
+
This will enable the ransack plugin for all models. Disable it by passing
|
37
|
+
`false` to the `ransack` option:
|
37
38
|
|
38
39
|
```ruby
|
39
40
|
class Post < ApplicationRecord
|
40
41
|
extend Mobility
|
41
|
-
translates :foo, ransack:
|
42
|
+
translates :foo, ransack: false
|
42
43
|
end
|
43
44
|
```
|
44
45
|
|
@@ -4,42 +4,24 @@ require "mobility"
|
|
4
4
|
module Mobility
|
5
5
|
module Plugins
|
6
6
|
module Ransack
|
7
|
+
extend Plugin
|
8
|
+
|
9
|
+
default true
|
10
|
+
requires :backend, include: :before
|
11
|
+
requires :active_record
|
12
|
+
|
7
13
|
# Applies ransack plugin.
|
8
14
|
# @param [Attributes] attributes
|
9
15
|
# @param [Boolean] option
|
10
|
-
|
11
|
-
if
|
12
|
-
|
13
|
-
|
14
|
-
model_class.ransacker(attr) { backend_class.build_node(attr, Mobility.locale) }
|
15
|
-
end
|
16
|
-
model_class.extend self
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
def ransack(*)
|
21
|
-
super.extend(Search)
|
22
|
-
end
|
23
|
-
|
24
|
-
module Search
|
25
|
-
def result(opts = {})
|
26
|
-
sorted = sorts.inject(super) do |relation, sort|
|
27
|
-
predicate = ::Ransack::Visitor.new.visit_Ransack_Nodes_Sort(sort)
|
28
|
-
apply_mobility_scope(relation, predicate, [sort.attr_name])
|
29
|
-
end
|
30
|
-
conditions.inject(sorted) do |relation, condition|
|
31
|
-
apply_mobility_scope(relation, condition.arel_predicate, condition.attributes.compact.flatten.map(&:name))
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
private
|
36
|
-
|
37
|
-
def apply_mobility_scope(relation, predicate, attributes)
|
38
|
-
(attributes & object.mobility_attributes).inject(relation) do |i18n_rel, attr|
|
39
|
-
object.mobility_backend_class(attr).apply_scope(i18n_rel, predicate)
|
16
|
+
included_hook do |klass, backend_class|
|
17
|
+
if options[:ransack]
|
18
|
+
names.each do |name|
|
19
|
+
klass.ransacker(name) { backend_class.build_node(name, Mobility.locale) }
|
40
20
|
end
|
41
21
|
end
|
42
22
|
end
|
43
23
|
end
|
24
|
+
|
25
|
+
register_plugin(:ransack, Ransack)
|
44
26
|
end
|
45
27
|
end
|
data/lib/mobility/ransack.rb
CHANGED
@@ -1,6 +1,56 @@
|
|
1
1
|
require "mobility/ransack/version"
|
2
|
+
require "mobility/plugins/arel"
|
3
|
+
require "ransack"
|
2
4
|
|
3
5
|
module Mobility
|
4
6
|
module Ransack
|
7
|
+
class Visitor < Mobility::Plugins::Arel::Visitor
|
8
|
+
def initialize
|
9
|
+
super(nil, nil)
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def visit_collection(objects)
|
15
|
+
objects.map(&method(:visit)).sum.uniq
|
16
|
+
end
|
17
|
+
alias :visit_Array :visit_collection
|
18
|
+
alias :visit_Arel_Nodes_Equality :visit_Arel_Nodes_Binary
|
19
|
+
alias :visit_Arel_Nodes_Or :visit_Arel_Nodes_Binary
|
20
|
+
|
21
|
+
def visit_Mobility_Plugins_Arel_Attribute(object)
|
22
|
+
[[object.backend_class, object.locale]]
|
23
|
+
end
|
24
|
+
|
25
|
+
def visit_default(_)
|
26
|
+
[]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
module Search
|
31
|
+
def result(opts = {})
|
32
|
+
sorted = sorts.inject(super) do |relation, sort|
|
33
|
+
predicate = ::Ransack::Visitor.new.visit_Ransack_Nodes_Sort(sort)
|
34
|
+
apply_mobility_scope(relation, predicate, [sort.attr_name])
|
35
|
+
end
|
36
|
+
conditions.inject(sorted) do |relation, condition|
|
37
|
+
apply_mobility_scope(relation, condition.arel_predicate, condition.attributes.compact.flat_map(&:name))
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def apply_mobility_scope(relation, predicate, attributes)
|
44
|
+
visitor.accept(predicate).inject(relation) do |i18n_rel, (backend_class, locale)|
|
45
|
+
backend_class.apply_scope(i18n_rel, predicate, locale)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def visitor
|
50
|
+
@visitor ||= Visitor.new
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
::Ransack::Search.prepend Search
|
5
55
|
end
|
6
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mobility-ransack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Salzberg
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ransack
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 1.8.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '3.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,35 +29,41 @@ dependencies:
|
|
29
29
|
version: 1.8.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '3.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: mobility
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "
|
37
|
+
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0.
|
39
|
+
version: 1.0.1
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '2.0'
|
40
43
|
type: :runtime
|
41
44
|
prerelease: false
|
42
45
|
version_requirements: !ruby/object:Gem::Requirement
|
43
46
|
requirements:
|
44
|
-
- - "
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 1.0.1
|
50
|
+
- - "<"
|
45
51
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
52
|
+
version: '2.0'
|
47
53
|
- !ruby/object:Gem::Dependency
|
48
54
|
name: rake
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
50
56
|
requirements:
|
51
|
-
- - "
|
57
|
+
- - ">="
|
52
58
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
59
|
+
version: 12.3.3
|
54
60
|
type: :development
|
55
61
|
prerelease: false
|
56
62
|
version_requirements: !ruby/object:Gem::Requirement
|
57
63
|
requirements:
|
58
|
-
- - "
|
64
|
+
- - ">="
|
59
65
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
66
|
+
version: 12.3.3
|
61
67
|
- !ruby/object:Gem::Dependency
|
62
68
|
name: rspec
|
63
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,29 +84,41 @@ dependencies:
|
|
78
84
|
requirements:
|
79
85
|
- - ">="
|
80
86
|
- !ruby/object:Gem::Version
|
81
|
-
version:
|
87
|
+
version: 1.3.0
|
88
|
+
- - "~>"
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '1.3'
|
82
91
|
type: :development
|
83
92
|
prerelease: false
|
84
93
|
version_requirements: !ruby/object:Gem::Requirement
|
85
94
|
requirements:
|
86
95
|
- - ">="
|
87
96
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
97
|
+
version: 1.3.0
|
98
|
+
- - "~>"
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '1.3'
|
89
101
|
- !ruby/object:Gem::Dependency
|
90
102
|
name: database_cleaner
|
91
103
|
requirement: !ruby/object:Gem::Requirement
|
92
104
|
requirements:
|
93
|
-
- - "
|
105
|
+
- - ">="
|
94
106
|
- !ruby/object:Gem::Version
|
95
107
|
version: 1.7.0
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.7'
|
96
111
|
type: :development
|
97
112
|
prerelease: false
|
98
113
|
version_requirements: !ruby/object:Gem::Requirement
|
99
114
|
requirements:
|
100
|
-
- - "
|
115
|
+
- - ">="
|
101
116
|
- !ruby/object:Gem::Version
|
102
117
|
version: 1.7.0
|
103
|
-
|
118
|
+
- - "~>"
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '1.7'
|
121
|
+
description:
|
104
122
|
email:
|
105
123
|
- chris@dejimata.com
|
106
124
|
executables: []
|
@@ -120,7 +138,7 @@ homepage: https://github.com/shioyama/mobility-ransack
|
|
120
138
|
licenses:
|
121
139
|
- MIT
|
122
140
|
metadata: {}
|
123
|
-
post_install_message:
|
141
|
+
post_install_message:
|
124
142
|
rdoc_options: []
|
125
143
|
require_paths:
|
126
144
|
- lib
|
@@ -135,9 +153,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
153
|
- !ruby/object:Gem::Version
|
136
154
|
version: '0'
|
137
155
|
requirements: []
|
138
|
-
|
139
|
-
|
140
|
-
signing_key:
|
156
|
+
rubygems_version: 3.0.6
|
157
|
+
signing_key:
|
141
158
|
specification_version: 4
|
142
159
|
summary: Search attributes translated by Mobility with Ransack.
|
143
160
|
test_files: []
|