ransack 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +12 -4
- data/CONTRIBUTING.md +10 -4
- data/Gemfile +12 -9
- data/README.md +46 -11
- data/lib/ransack.rb +4 -2
- data/lib/ransack/adapters/active_record.rb +1 -1
- data/lib/ransack/adapters/active_record/3.0/compat.rb +16 -6
- data/lib/ransack/adapters/active_record/3.0/context.rb +32 -16
- data/lib/ransack/adapters/active_record/3.1/context.rb +32 -15
- data/lib/ransack/adapters/active_record/3.2/context.rb +1 -1
- data/lib/ransack/adapters/active_record/base.rb +9 -6
- data/lib/ransack/adapters/active_record/context.rb +193 -2
- data/lib/ransack/configuration.rb +4 -4
- data/lib/ransack/constants.rb +81 -18
- data/lib/ransack/context.rb +27 -12
- data/lib/ransack/helpers/form_builder.rb +126 -91
- data/lib/ransack/helpers/form_helper.rb +34 -12
- data/lib/ransack/naming.rb +2 -1
- data/lib/ransack/nodes/attribute.rb +6 -4
- data/lib/ransack/nodes/bindable.rb +3 -1
- data/lib/ransack/nodes/condition.rb +40 -27
- data/lib/ransack/nodes/grouping.rb +19 -13
- data/lib/ransack/nodes/node.rb +3 -3
- data/lib/ransack/nodes/sort.rb +5 -3
- data/lib/ransack/nodes/value.rb +2 -2
- data/lib/ransack/predicate.rb +18 -9
- data/lib/ransack/ransacker.rb +4 -4
- data/lib/ransack/search.rb +9 -12
- data/lib/ransack/translate.rb +42 -21
- data/lib/ransack/version.rb +1 -1
- data/lib/ransack/visitor.rb +4 -4
- data/ransack.gemspec +17 -7
- data/spec/blueprints/notes.rb +2 -0
- data/spec/blueprints/people.rb +4 -1
- data/spec/console.rb +3 -3
- data/spec/ransack/adapters/active_record/base_spec.rb +149 -22
- data/spec/ransack/adapters/active_record/context_spec.rb +5 -5
- data/spec/ransack/configuration_spec.rb +17 -8
- data/spec/ransack/dependencies_spec.rb +8 -0
- data/spec/ransack/helpers/form_builder_spec.rb +37 -14
- data/spec/ransack/helpers/form_helper_spec.rb +5 -5
- data/spec/ransack/predicate_spec.rb +6 -3
- data/spec/ransack/search_spec.rb +95 -73
- data/spec/ransack/translate_spec.rb +14 -0
- data/spec/spec_helper.rb +14 -8
- data/spec/support/en.yml +6 -0
- data/spec/support/schema.rb +76 -31
- metadata +48 -29
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ransack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ernie Miller
|
@@ -9,104 +9,118 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-04-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: actionpack
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '3.0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '3.0'
|
14
28
|
- !ruby/object:Gem::Dependency
|
15
29
|
name: activerecord
|
16
30
|
requirement: !ruby/object:Gem::Requirement
|
17
31
|
requirements:
|
18
|
-
- -
|
32
|
+
- - ">="
|
19
33
|
- !ruby/object:Gem::Version
|
20
34
|
version: '3.0'
|
21
35
|
type: :runtime
|
22
36
|
prerelease: false
|
23
37
|
version_requirements: !ruby/object:Gem::Requirement
|
24
38
|
requirements:
|
25
|
-
- -
|
39
|
+
- - ">="
|
26
40
|
- !ruby/object:Gem::Version
|
27
41
|
version: '3.0'
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
43
|
+
name: activesupport
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
31
45
|
requirements:
|
32
|
-
- -
|
46
|
+
- - ">="
|
33
47
|
- !ruby/object:Gem::Version
|
34
48
|
version: '3.0'
|
35
49
|
type: :runtime
|
36
50
|
prerelease: false
|
37
51
|
version_requirements: !ruby/object:Gem::Requirement
|
38
52
|
requirements:
|
39
|
-
- -
|
53
|
+
- - ">="
|
40
54
|
- !ruby/object:Gem::Version
|
41
55
|
version: '3.0'
|
42
56
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
57
|
+
name: i18n
|
44
58
|
requirement: !ruby/object:Gem::Requirement
|
45
59
|
requirements:
|
46
|
-
- -
|
60
|
+
- - ">="
|
47
61
|
- !ruby/object:Gem::Version
|
48
|
-
version: 0
|
62
|
+
version: '0'
|
49
63
|
type: :runtime
|
50
64
|
prerelease: false
|
51
65
|
version_requirements: !ruby/object:Gem::Requirement
|
52
66
|
requirements:
|
53
|
-
- -
|
67
|
+
- - ">="
|
54
68
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0
|
69
|
+
version: '0'
|
56
70
|
- !ruby/object:Gem::Dependency
|
57
71
|
name: rspec
|
58
72
|
requirement: !ruby/object:Gem::Requirement
|
59
73
|
requirements:
|
60
|
-
- - ~>
|
74
|
+
- - "~>"
|
61
75
|
- !ruby/object:Gem::Version
|
62
76
|
version: 2.8.0
|
63
77
|
type: :development
|
64
78
|
prerelease: false
|
65
79
|
version_requirements: !ruby/object:Gem::Requirement
|
66
80
|
requirements:
|
67
|
-
- - ~>
|
81
|
+
- - "~>"
|
68
82
|
- !ruby/object:Gem::Version
|
69
83
|
version: 2.8.0
|
70
84
|
- !ruby/object:Gem::Dependency
|
71
85
|
name: machinist
|
72
86
|
requirement: !ruby/object:Gem::Requirement
|
73
87
|
requirements:
|
74
|
-
- - ~>
|
88
|
+
- - "~>"
|
75
89
|
- !ruby/object:Gem::Version
|
76
90
|
version: 1.0.6
|
77
91
|
type: :development
|
78
92
|
prerelease: false
|
79
93
|
version_requirements: !ruby/object:Gem::Requirement
|
80
94
|
requirements:
|
81
|
-
- - ~>
|
95
|
+
- - "~>"
|
82
96
|
- !ruby/object:Gem::Version
|
83
97
|
version: 1.0.6
|
84
98
|
- !ruby/object:Gem::Dependency
|
85
99
|
name: faker
|
86
100
|
requirement: !ruby/object:Gem::Requirement
|
87
101
|
requirements:
|
88
|
-
- - ~>
|
102
|
+
- - "~>"
|
89
103
|
- !ruby/object:Gem::Version
|
90
104
|
version: 0.9.5
|
91
105
|
type: :development
|
92
106
|
prerelease: false
|
93
107
|
version_requirements: !ruby/object:Gem::Requirement
|
94
108
|
requirements:
|
95
|
-
- - ~>
|
109
|
+
- - "~>"
|
96
110
|
- !ruby/object:Gem::Version
|
97
111
|
version: 0.9.5
|
98
112
|
- !ruby/object:Gem::Dependency
|
99
113
|
name: sqlite3
|
100
114
|
requirement: !ruby/object:Gem::Requirement
|
101
115
|
requirements:
|
102
|
-
- - ~>
|
116
|
+
- - "~>"
|
103
117
|
- !ruby/object:Gem::Version
|
104
118
|
version: 1.3.3
|
105
119
|
type: :development
|
106
120
|
prerelease: false
|
107
121
|
version_requirements: !ruby/object:Gem::Requirement
|
108
122
|
requirements:
|
109
|
-
- - ~>
|
123
|
+
- - "~>"
|
110
124
|
- !ruby/object:Gem::Version
|
111
125
|
version: 1.3.3
|
112
126
|
- !ruby/object:Gem::Dependency
|
@@ -129,14 +143,14 @@ dependencies:
|
|
129
143
|
requirements:
|
130
144
|
- - '='
|
131
145
|
- !ruby/object:Gem::Version
|
132
|
-
version: 0.3.
|
146
|
+
version: 0.3.14
|
133
147
|
type: :development
|
134
148
|
prerelease: false
|
135
149
|
version_requirements: !ruby/object:Gem::Requirement
|
136
150
|
requirements:
|
137
151
|
- - '='
|
138
152
|
- !ruby/object:Gem::Version
|
139
|
-
version: 0.3.
|
153
|
+
version: 0.3.14
|
140
154
|
- !ruby/object:Gem::Dependency
|
141
155
|
name: pry
|
142
156
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,8 +174,8 @@ executables: []
|
|
160
174
|
extensions: []
|
161
175
|
extra_rdoc_files: []
|
162
176
|
files:
|
163
|
-
- .gitignore
|
164
|
-
- .travis.yml
|
177
|
+
- ".gitignore"
|
178
|
+
- ".travis.yml"
|
165
179
|
- CONTRIBUTING.md
|
166
180
|
- Gemfile
|
167
181
|
- LICENSE
|
@@ -209,17 +223,20 @@ files:
|
|
209
223
|
- spec/ransack/adapters/active_record/base_spec.rb
|
210
224
|
- spec/ransack/adapters/active_record/context_spec.rb
|
211
225
|
- spec/ransack/configuration_spec.rb
|
226
|
+
- spec/ransack/dependencies_spec.rb
|
212
227
|
- spec/ransack/helpers/form_builder_spec.rb
|
213
228
|
- spec/ransack/helpers/form_helper_spec.rb
|
214
229
|
- spec/ransack/nodes/condition_spec.rb
|
215
230
|
- spec/ransack/nodes/grouping_spec.rb
|
216
231
|
- spec/ransack/predicate_spec.rb
|
217
232
|
- spec/ransack/search_spec.rb
|
233
|
+
- spec/ransack/translate_spec.rb
|
218
234
|
- spec/spec_helper.rb
|
219
235
|
- spec/support/en.yml
|
220
236
|
- spec/support/schema.rb
|
221
|
-
homepage: https://github.com/
|
222
|
-
licenses:
|
237
|
+
homepage: https://github.com/activerecord-hackery/ransack
|
238
|
+
licenses:
|
239
|
+
- MIT
|
223
240
|
metadata: {}
|
224
241
|
post_install_message:
|
225
242
|
rdoc_options: []
|
@@ -227,17 +244,17 @@ require_paths:
|
|
227
244
|
- lib
|
228
245
|
required_ruby_version: !ruby/object:Gem::Requirement
|
229
246
|
requirements:
|
230
|
-
- -
|
247
|
+
- - ">="
|
231
248
|
- !ruby/object:Gem::Version
|
232
249
|
version: '0'
|
233
250
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
234
251
|
requirements:
|
235
|
-
- -
|
252
|
+
- - ">="
|
236
253
|
- !ruby/object:Gem::Version
|
237
254
|
version: '0'
|
238
255
|
requirements: []
|
239
256
|
rubyforge_project: ransack
|
240
|
-
rubygems_version: 2.
|
257
|
+
rubygems_version: 2.2.0
|
241
258
|
signing_key:
|
242
259
|
specification_version: 4
|
243
260
|
summary: Object-based searching for ActiveRecord (currently).
|
@@ -252,12 +269,14 @@ test_files:
|
|
252
269
|
- spec/ransack/adapters/active_record/base_spec.rb
|
253
270
|
- spec/ransack/adapters/active_record/context_spec.rb
|
254
271
|
- spec/ransack/configuration_spec.rb
|
272
|
+
- spec/ransack/dependencies_spec.rb
|
255
273
|
- spec/ransack/helpers/form_builder_spec.rb
|
256
274
|
- spec/ransack/helpers/form_helper_spec.rb
|
257
275
|
- spec/ransack/nodes/condition_spec.rb
|
258
276
|
- spec/ransack/nodes/grouping_spec.rb
|
259
277
|
- spec/ransack/predicate_spec.rb
|
260
278
|
- spec/ransack/search_spec.rb
|
279
|
+
- spec/ransack/translate_spec.rb
|
261
280
|
- spec/spec_helper.rb
|
262
281
|
- spec/support/en.yml
|
263
282
|
- spec/support/schema.rb
|