ransack 1.7.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +2 -0
  3. data/.travis.yml +16 -48
  4. data/CHANGELOG.md +409 -26
  5. data/CONTRIBUTING.md +48 -20
  6. data/Gemfile +9 -13
  7. data/README.md +352 -92
  8. data/Rakefile +6 -25
  9. data/lib/polyamorous/activerecord_5.0_ruby_2/join_association.rb +2 -0
  10. data/lib/polyamorous/activerecord_5.0_ruby_2/join_dependency.rb +2 -0
  11. data/lib/polyamorous/activerecord_5.1_ruby_2/join_association.rb +32 -0
  12. data/lib/polyamorous/activerecord_5.1_ruby_2/join_dependency.rb +112 -0
  13. data/lib/polyamorous/activerecord_5.2.0_ruby_2/join_association.rb +32 -0
  14. data/lib/polyamorous/activerecord_5.2.0_ruby_2/join_dependency.rb +113 -0
  15. data/lib/polyamorous/activerecord_5.2.1_ruby_2/join_association.rb +31 -0
  16. data/lib/polyamorous/activerecord_5.2.1_ruby_2/join_dependency.rb +57 -0
  17. data/lib/polyamorous/join.rb +70 -0
  18. data/lib/polyamorous/swapping_reflection_class.rb +11 -0
  19. data/lib/polyamorous/tree_node.rb +7 -0
  20. data/lib/polyamorous.rb +25 -0
  21. data/lib/ransack/adapters/active_record/base.rb +23 -2
  22. data/lib/ransack/adapters/active_record/context.rb +210 -135
  23. data/lib/ransack/adapters/active_record/ransack/constants.rb +53 -53
  24. data/lib/ransack/adapters/active_record/ransack/context.rb +11 -15
  25. data/lib/ransack/adapters/active_record/ransack/nodes/condition.rb +33 -30
  26. data/lib/ransack/adapters/active_record/ransack/translate.rb +1 -5
  27. data/lib/ransack/adapters/active_record/ransack/visitor.rb +23 -0
  28. data/lib/ransack/adapters/active_record.rb +11 -10
  29. data/lib/ransack/adapters.rb +45 -23
  30. data/lib/ransack/configuration.rb +91 -4
  31. data/lib/ransack/constants.rb +14 -26
  32. data/lib/ransack/context.rb +29 -18
  33. data/lib/ransack/helpers/form_builder.rb +27 -12
  34. data/lib/ransack/helpers/form_helper.rb +75 -70
  35. data/lib/ransack/locale/ar.yml +70 -0
  36. data/lib/ransack/locale/az.yml +70 -0
  37. data/lib/ransack/locale/bg.yml +70 -0
  38. data/lib/ransack/locale/da.yml +70 -0
  39. data/lib/ransack/locale/el.yml +70 -0
  40. data/lib/ransack/locale/id.yml +70 -0
  41. data/lib/ransack/locale/it.yml +70 -0
  42. data/lib/ransack/locale/ja.yml +70 -0
  43. data/lib/ransack/locale/nl.yml +4 -4
  44. data/lib/ransack/locale/pt-BR.yml +70 -0
  45. data/lib/ransack/locale/ru.yml +70 -0
  46. data/lib/ransack/locale/tr.yml +70 -0
  47. data/lib/ransack/locale/{zh.yml → zh-CN.yml} +13 -13
  48. data/lib/ransack/locale/zh-TW.yml +70 -0
  49. data/lib/ransack/nodes/attribute.rb +5 -2
  50. data/lib/ransack/nodes/bindable.rb +18 -6
  51. data/lib/ransack/nodes/condition.rb +77 -28
  52. data/lib/ransack/nodes/grouping.rb +16 -10
  53. data/lib/ransack/nodes/sort.rb +9 -5
  54. data/lib/ransack/nodes/value.rb +74 -68
  55. data/lib/ransack/nodes.rb +1 -1
  56. data/lib/ransack/predicate.rb +15 -19
  57. data/lib/ransack/search.rb +14 -7
  58. data/lib/ransack/translate.rb +3 -3
  59. data/lib/ransack/version.rb +1 -1
  60. data/lib/ransack/visitor.rb +1 -12
  61. data/lib/ransack.rb +7 -7
  62. data/logo/ransack-h.png +0 -0
  63. data/logo/ransack-h.svg +34 -0
  64. data/logo/ransack-v.png +0 -0
  65. data/logo/ransack-v.svg +34 -0
  66. data/logo/ransack.png +0 -0
  67. data/logo/ransack.svg +21 -0
  68. data/ransack.gemspec +9 -10
  69. data/spec/console.rb +4 -0
  70. data/spec/helpers/polyamorous_helper.rb +24 -0
  71. data/spec/ransack/adapters/active_record/base_spec.rb +365 -74
  72. data/spec/ransack/adapters/active_record/context_spec.rb +14 -19
  73. data/spec/ransack/configuration_spec.rb +87 -14
  74. data/spec/ransack/helpers/form_builder_spec.rb +2 -11
  75. data/spec/ransack/helpers/form_helper_spec.rb +481 -113
  76. data/spec/ransack/join_association_spec.rb +28 -0
  77. data/spec/ransack/join_dependency_spec.rb +86 -0
  78. data/spec/ransack/join_spec.rb +19 -0
  79. data/spec/ransack/nodes/condition_spec.rb +24 -0
  80. data/spec/ransack/nodes/grouping_spec.rb +56 -0
  81. data/spec/ransack/predicate_spec.rb +27 -5
  82. data/spec/ransack/search_spec.rb +84 -70
  83. data/spec/spec_helper.rb +4 -0
  84. data/spec/support/schema.rb +86 -41
  85. metadata +60 -81
  86. data/lib/ransack/adapters/active_record/3.0/compat.rb +0 -179
  87. data/lib/ransack/adapters/active_record/3.0/context.rb +0 -201
  88. data/lib/ransack/adapters/active_record/3.1/context.rb +0 -215
  89. data/lib/ransack/adapters/active_record/3.2/context.rb +0 -44
  90. data/lib/ransack/adapters/active_record/compat.rb +0 -14
  91. data/lib/ransack/adapters/mongoid/3.2/.gitkeep +0 -0
  92. data/lib/ransack/adapters/mongoid/attributes/attribute.rb +0 -37
  93. data/lib/ransack/adapters/mongoid/attributes/order_predications.rb +0 -17
  94. data/lib/ransack/adapters/mongoid/attributes/predications.rb +0 -141
  95. data/lib/ransack/adapters/mongoid/base.rb +0 -130
  96. data/lib/ransack/adapters/mongoid/context.rb +0 -208
  97. data/lib/ransack/adapters/mongoid/inquiry_hash.rb +0 -23
  98. data/lib/ransack/adapters/mongoid/ransack/constants.rb +0 -88
  99. data/lib/ransack/adapters/mongoid/ransack/context.rb +0 -60
  100. data/lib/ransack/adapters/mongoid/ransack/nodes/condition.rb +0 -27
  101. data/lib/ransack/adapters/mongoid/ransack/translate.rb +0 -13
  102. data/lib/ransack/adapters/mongoid/ransack/visitor.rb +0 -24
  103. data/lib/ransack/adapters/mongoid/table.rb +0 -35
  104. data/lib/ransack/adapters/mongoid.rb +0 -13
  105. data/spec/mongoid/adapters/mongoid/base_spec.rb +0 -276
  106. data/spec/mongoid/adapters/mongoid/context_spec.rb +0 -56
  107. data/spec/mongoid/configuration_spec.rb +0 -102
  108. data/spec/mongoid/dependencies_spec.rb +0 -8
  109. data/spec/mongoid/helpers/ransack_helper.rb +0 -11
  110. data/spec/mongoid/nodes/condition_spec.rb +0 -34
  111. data/spec/mongoid/nodes/grouping_spec.rb +0 -13
  112. data/spec/mongoid/predicate_spec.rb +0 -155
  113. data/spec/mongoid/search_spec.rb +0 -446
  114. data/spec/mongoid/support/mongoid.yml +0 -6
  115. data/spec/mongoid/support/schema.rb +0 -128
  116. data/spec/mongoid/translate_spec.rb +0 -14
  117. data/spec/mongoid_spec_helper.rb +0 -59
  118. data/spec/ransack/dependencies_spec.rb +0 -12
@@ -25,23 +25,16 @@ else
25
25
  end
26
26
 
27
27
  class Person < ActiveRecord::Base
28
- if ActiveRecord::VERSION::MAJOR == 3
29
- default_scope order('id DESC')
30
- else
31
- default_scope { order(id: :desc) }
32
- end
33
- belongs_to :parent, :class_name => 'Person', :foreign_key => :parent_id
34
- has_many :children, :class_name => 'Person', :foreign_key => :parent_id
28
+ default_scope { order(id: :desc) }
29
+ belongs_to :parent, class_name: 'Person', foreign_key: :parent_id
30
+ has_many :children, class_name: 'Person', foreign_key: :parent_id
35
31
  has_many :articles
36
- if ActiveRecord::VERSION::MAJOR == 3
37
- has_many :published_articles, conditions: { published: true }, class_name: "Article"
38
- else
39
- has_many :published_articles, ->{ where(published: true) }, class_name: "Article"
40
- end
32
+ has_many :published_articles, ->{ where(published: true) },
33
+ class_name: "Article"
41
34
  has_many :comments
42
- has_many :authored_article_comments, :through => :articles,
43
- :source => :comments, :foreign_key => :person_id
44
- has_many :notes, :as => :notable
35
+ has_many :authored_article_comments, through: :articles,
36
+ source: :comments, foreign_key: :person_id
37
+ has_many :notes, as: :notable
45
38
 
46
39
  scope :restricted, lambda { where("restricted = 1") }
47
40
  scope :active, lambda { where("active = 1") }
@@ -50,30 +43,53 @@ class Person < ActiveRecord::Base
50
43
  of_age ? where("age >= ?", 18) : where("age < ?", 18)
51
44
  }
52
45
 
53
- ransacker :reversed_name, :formatter => proc { |v| v.reverse } do |parent|
46
+ scope :sort_by_reverse_name_asc, lambda { order(Arel.sql("REVERSE(name) ASC")) }
47
+ scope :sort_by_reverse_name_desc, lambda { order("REVERSE(name) DESC") }
48
+
49
+ alias_attribute :full_name, :name
50
+
51
+ ransack_alias :term, :name_or_email
52
+ ransack_alias :daddy, :parent_name
53
+
54
+ ransacker :reversed_name, formatter: proc { |v| v.reverse } do |parent|
54
55
  parent.table[:name]
55
56
  end
56
57
 
57
- ransacker :array_users,
58
+ ransacker :array_people_ids,
58
59
  formatter: proc { |v| Person.first(2).map(&:id) } do |parent|
59
60
  parent.table[:id]
60
61
  end
61
62
 
62
- ransacker :array_names,
63
+ ransacker :array_where_people_ids,
64
+ formatter: proc { |v| Person.where(id: v).map(&:id) } do |parent|
65
+ parent.table[:id]
66
+ end
67
+
68
+ ransacker :array_people_names,
63
69
  formatter: proc { |v| Person.first(2).map { |p| p.id.to_s } } do |parent|
64
70
  parent.table[:name]
65
71
  end
66
72
 
73
+ ransacker :array_where_people_names,
74
+ formatter: proc { |v| Person.where(id: v).map { |p| p.id.to_s } } do |parent|
75
+ parent.table[:name]
76
+ end
77
+
67
78
  ransacker :doubled_name do |parent|
68
79
  Arel::Nodes::InfixOperation.new(
69
80
  '||', parent.table[:name], parent.table[:name]
70
81
  )
71
82
  end
72
83
 
84
+
73
85
  ransacker :sql_literal_id do
74
86
  Arel.sql('people.id')
75
87
  end
76
88
 
89
+ ransacker :name_case_insensitive, type: :string do
90
+ arel_table[:name].lower
91
+ end
92
+
77
93
  ransacker :with_arguments, args: [:parent, :ransacker_args] do |parent, args|
78
94
  min, max = args
79
95
  query = <<-SQL
@@ -84,14 +100,16 @@ class Person < ActiveRecord::Base
84
100
  GROUP BY articles.person_id
85
101
  )
86
102
  SQL
103
+ .squish
87
104
  Arel.sql(query)
88
105
  end
89
106
 
107
+
90
108
  def self.ransackable_attributes(auth_object = nil)
91
109
  if auth_object == :admin
92
- column_names + _ransackers.keys - ['only_sort']
110
+ super - ['only_sort']
93
111
  else
94
- column_names + _ransackers.keys - ['only_sort', 'only_admin']
112
+ super - ['only_sort', 'only_admin']
95
113
  end
96
114
  end
97
115
 
@@ -102,20 +120,20 @@ class Person < ActiveRecord::Base
102
120
  column_names + _ransackers.keys - ['only_search', 'only_admin']
103
121
  end
104
122
  end
123
+ end
105
124
 
125
+ class Musician < Person
106
126
  end
107
127
 
108
128
  class Article < ActiveRecord::Base
109
129
  belongs_to :person
110
130
  has_many :comments
111
131
  has_and_belongs_to_many :tags
112
- has_many :notes, :as => :notable
132
+ has_many :notes, as: :notable
113
133
 
114
- if ActiveRecord::VERSION::STRING >= '3.1'
115
- default_scope { where("'default_scope' = 'default_scope'") }
116
- else # Rails 3.0 does not accept a block
117
- default_scope where("'default_scope' = 'default_scope'")
118
- end
134
+ alias_attribute :content, :body
135
+
136
+ default_scope { where("'default_scope' = 'default_scope'") }
119
137
  end
120
138
 
121
139
  class Recommendation < ActiveRecord::Base
@@ -146,7 +164,7 @@ class Tag < ActiveRecord::Base
146
164
  end
147
165
 
148
166
  class Note < ActiveRecord::Base
149
- belongs_to :notable, :polymorphic => true
167
+ belongs_to :notable, polymorphic: true
150
168
  end
151
169
 
152
170
  module Schema
@@ -154,7 +172,7 @@ module Schema
154
172
  ActiveRecord::Migration.verbose = false
155
173
 
156
174
  ActiveRecord::Schema.define do
157
- create_table :people, :force => true do |t|
175
+ create_table :people, force: true do |t|
158
176
  t.integer :parent_id
159
177
  t.string :name
160
178
  t.string :email
@@ -171,7 +189,7 @@ module Schema
171
189
  t.timestamps null: false
172
190
  end
173
191
 
174
- create_table :articles, :force => true do |t|
192
+ create_table :articles, force: true do |t|
175
193
  t.integer :person_id
176
194
  t.string :title
177
195
  t.text :subject_header
@@ -179,28 +197,28 @@ module Schema
179
197
  t.boolean :published, default: true
180
198
  end
181
199
 
182
- create_table :comments, :force => true do |t|
200
+ create_table :comments, force: true do |t|
183
201
  t.integer :article_id
184
202
  t.integer :person_id
185
203
  t.text :body
186
204
  end
187
205
 
188
- create_table :tags, :force => true do |t|
206
+ create_table :tags, force: true do |t|
189
207
  t.string :name
190
208
  end
191
209
 
192
- create_table :articles_tags, :force => true, :id => false do |t|
210
+ create_table :articles_tags, force: true, id: false do |t|
193
211
  t.integer :article_id
194
212
  t.integer :tag_id
195
213
  end
196
214
 
197
- create_table :notes, :force => true do |t|
215
+ create_table :notes, force: true do |t|
198
216
  t.integer :notable_id
199
217
  t.string :notable_type
200
218
  t.string :note
201
219
  end
202
220
 
203
- create_table :recommendations, :force => true do |t|
221
+ create_table :recommendations, force: true do |t|
204
222
  t.integer :person_id
205
223
  t.integer :target_person_id
206
224
  t.integer :article_id
@@ -209,22 +227,49 @@ module Schema
209
227
 
210
228
  10.times do
211
229
  person = Person.make
212
- Note.make(:notable => person)
230
+ Note.make(notable: person)
213
231
  3.times do
214
- article = Article.make(:person => person)
232
+ article = Article.make(person: person)
215
233
  3.times do
216
234
  article.tags = [Tag.make, Tag.make, Tag.make]
217
235
  end
218
- Note.make(:notable => article)
236
+ Note.make(notable: article)
219
237
  10.times do
220
- Comment.make(:article => article, :person => person)
238
+ Comment.make(article: article, person: person)
221
239
  end
222
240
  end
223
241
  end
224
242
 
225
243
  Comment.make(
226
- :body => 'First post!',
227
- :article => Article.make(:title => 'Hello, world!')
228
- )
244
+ body: 'First post!',
245
+ article: Article.make(title: 'Hello, world!')
246
+ )
247
+ end
248
+ end
249
+
250
+ module SubDB
251
+ class Base < ActiveRecord::Base
252
+ self.abstract_class = true
253
+ establish_connection(
254
+ adapter: 'sqlite3',
255
+ database: ':memory:'
256
+ )
257
+ end
258
+
259
+ class OperationHistory < Base
260
+ end
261
+
262
+ module Schema
263
+ def self.create
264
+ s = ::ActiveRecord::Schema.new
265
+ s.instance_variable_set(:@connection, SubDB::Base.connection)
266
+ s.verbose = false
267
+ s.define({}) do
268
+ create_table :operation_histories, force: true do |t|
269
+ t.string :operation_type
270
+ t.integer :people_id
271
+ end
272
+ end
273
+ end
229
274
  end
230
275
  end
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ransack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernie Miller
8
8
  - Ryan Bigg
9
9
  - Jon Atack
10
+ - Sean Carroll
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2015-08-20 00:00:00.000000000 Z
14
+ date: 2018-12-05 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: actionpack
@@ -18,42 +19,42 @@ dependencies:
18
19
  requirements:
19
20
  - - ">="
20
21
  - !ruby/object:Gem::Version
21
- version: '3.0'
22
+ version: '5.0'
22
23
  type: :runtime
23
24
  prerelease: false
24
25
  version_requirements: !ruby/object:Gem::Requirement
25
26
  requirements:
26
27
  - - ">="
27
28
  - !ruby/object:Gem::Version
28
- version: '3.0'
29
+ version: '5.0'
29
30
  - !ruby/object:Gem::Dependency
30
31
  name: activerecord
31
32
  requirement: !ruby/object:Gem::Requirement
32
33
  requirements:
33
34
  - - ">="
34
35
  - !ruby/object:Gem::Version
35
- version: '3.0'
36
+ version: '5.0'
36
37
  type: :runtime
37
38
  prerelease: false
38
39
  version_requirements: !ruby/object:Gem::Requirement
39
40
  requirements:
40
41
  - - ">="
41
42
  - !ruby/object:Gem::Version
42
- version: '3.0'
43
+ version: '5.0'
43
44
  - !ruby/object:Gem::Dependency
44
45
  name: activesupport
45
46
  requirement: !ruby/object:Gem::Requirement
46
47
  requirements:
47
48
  - - ">="
48
49
  - !ruby/object:Gem::Version
49
- version: '3.0'
50
+ version: '5.0'
50
51
  type: :runtime
51
52
  prerelease: false
52
53
  version_requirements: !ruby/object:Gem::Requirement
53
54
  requirements:
54
55
  - - ">="
55
56
  - !ruby/object:Gem::Version
56
- version: '3.0'
57
+ version: '5.0'
57
58
  - !ruby/object:Gem::Dependency
58
59
  name: i18n
59
60
  requirement: !ruby/object:Gem::Requirement
@@ -68,34 +69,20 @@ dependencies:
68
69
  - - ">="
69
70
  - !ruby/object:Gem::Version
70
71
  version: '0'
71
- - !ruby/object:Gem::Dependency
72
- name: polyamorous
73
- requirement: !ruby/object:Gem::Requirement
74
- requirements:
75
- - - "~>"
76
- - !ruby/object:Gem::Version
77
- version: '1.2'
78
- type: :runtime
79
- prerelease: false
80
- version_requirements: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - "~>"
83
- - !ruby/object:Gem::Version
84
- version: '1.2'
85
72
  - !ruby/object:Gem::Dependency
86
73
  name: rspec
87
74
  requirement: !ruby/object:Gem::Requirement
88
75
  requirements:
89
76
  - - "~>"
90
77
  - !ruby/object:Gem::Version
91
- version: '2'
78
+ version: '3'
92
79
  type: :development
93
80
  prerelease: false
94
81
  version_requirements: !ruby/object:Gem::Requirement
95
82
  requirements:
96
83
  - - "~>"
97
84
  - !ruby/object:Gem::Version
98
- version: '2'
85
+ version: '3'
99
86
  - !ruby/object:Gem::Dependency
100
87
  name: machinist
101
88
  requirement: !ruby/object:Gem::Requirement
@@ -142,50 +129,51 @@ dependencies:
142
129
  name: pg
143
130
  requirement: !ruby/object:Gem::Requirement
144
131
  requirements:
145
- - - ">="
132
+ - - "~>"
146
133
  - !ruby/object:Gem::Version
147
- version: '0'
134
+ version: '0.21'
148
135
  type: :development
149
136
  prerelease: false
150
137
  version_requirements: !ruby/object:Gem::Requirement
151
138
  requirements:
152
- - - ">="
139
+ - - "~>"
153
140
  - !ruby/object:Gem::Version
154
- version: '0'
141
+ version: '0.21'
155
142
  - !ruby/object:Gem::Dependency
156
143
  name: mysql2
157
144
  requirement: !ruby/object:Gem::Requirement
158
145
  requirements:
159
146
  - - '='
160
147
  - !ruby/object:Gem::Version
161
- version: 0.3.18
148
+ version: 0.3.20
162
149
  type: :development
163
150
  prerelease: false
164
151
  version_requirements: !ruby/object:Gem::Requirement
165
152
  requirements:
166
153
  - - '='
167
154
  - !ruby/object:Gem::Version
168
- version: 0.3.18
155
+ version: 0.3.20
169
156
  - !ruby/object:Gem::Dependency
170
157
  name: pry
171
158
  requirement: !ruby/object:Gem::Requirement
172
159
  requirements:
173
160
  - - '='
174
161
  - !ruby/object:Gem::Version
175
- version: 0.9.12.2
162
+ version: '0.10'
176
163
  type: :development
177
164
  prerelease: false
178
165
  version_requirements: !ruby/object:Gem::Requirement
179
166
  requirements:
180
167
  - - '='
181
168
  - !ruby/object:Gem::Version
182
- version: 0.9.12.2
169
+ version: '0.10'
183
170
  description: Ransack is the successor to the MetaSearch gem. It improves and expands
184
171
  upon MetaSearch's functionality, but does not have a 100%-compatible API.
185
172
  email:
186
173
  - ernie@erniemiller.org
187
174
  - radarlistener@gmail.com
188
175
  - jonnyatack@gmail.com
176
+ - sfcarroll@gmail.com
189
177
  executables: []
190
178
  extensions: []
191
179
  extra_rdoc_files: []
@@ -198,50 +186,55 @@ files:
198
186
  - LICENSE
199
187
  - README.md
200
188
  - Rakefile
189
+ - lib/polyamorous.rb
190
+ - lib/polyamorous/activerecord_5.0_ruby_2/join_association.rb
191
+ - lib/polyamorous/activerecord_5.0_ruby_2/join_dependency.rb
192
+ - lib/polyamorous/activerecord_5.1_ruby_2/join_association.rb
193
+ - lib/polyamorous/activerecord_5.1_ruby_2/join_dependency.rb
194
+ - lib/polyamorous/activerecord_5.2.0_ruby_2/join_association.rb
195
+ - lib/polyamorous/activerecord_5.2.0_ruby_2/join_dependency.rb
196
+ - lib/polyamorous/activerecord_5.2.1_ruby_2/join_association.rb
197
+ - lib/polyamorous/activerecord_5.2.1_ruby_2/join_dependency.rb
198
+ - lib/polyamorous/join.rb
199
+ - lib/polyamorous/swapping_reflection_class.rb
200
+ - lib/polyamorous/tree_node.rb
201
201
  - lib/ransack.rb
202
202
  - lib/ransack/adapters.rb
203
203
  - lib/ransack/adapters/active_record.rb
204
- - lib/ransack/adapters/active_record/3.0/compat.rb
205
- - lib/ransack/adapters/active_record/3.0/context.rb
206
- - lib/ransack/adapters/active_record/3.1/context.rb
207
- - lib/ransack/adapters/active_record/3.2/context.rb
208
204
  - lib/ransack/adapters/active_record/base.rb
209
- - lib/ransack/adapters/active_record/compat.rb
210
205
  - lib/ransack/adapters/active_record/context.rb
211
206
  - lib/ransack/adapters/active_record/ransack/constants.rb
212
207
  - lib/ransack/adapters/active_record/ransack/context.rb
213
208
  - lib/ransack/adapters/active_record/ransack/nodes/condition.rb
214
209
  - lib/ransack/adapters/active_record/ransack/translate.rb
215
210
  - lib/ransack/adapters/active_record/ransack/visitor.rb
216
- - lib/ransack/adapters/mongoid.rb
217
- - lib/ransack/adapters/mongoid/3.2/.gitkeep
218
- - lib/ransack/adapters/mongoid/attributes/attribute.rb
219
- - lib/ransack/adapters/mongoid/attributes/order_predications.rb
220
- - lib/ransack/adapters/mongoid/attributes/predications.rb
221
- - lib/ransack/adapters/mongoid/base.rb
222
- - lib/ransack/adapters/mongoid/context.rb
223
- - lib/ransack/adapters/mongoid/inquiry_hash.rb
224
- - lib/ransack/adapters/mongoid/ransack/constants.rb
225
- - lib/ransack/adapters/mongoid/ransack/context.rb
226
- - lib/ransack/adapters/mongoid/ransack/nodes/condition.rb
227
- - lib/ransack/adapters/mongoid/ransack/translate.rb
228
- - lib/ransack/adapters/mongoid/ransack/visitor.rb
229
- - lib/ransack/adapters/mongoid/table.rb
230
211
  - lib/ransack/configuration.rb
231
212
  - lib/ransack/constants.rb
232
213
  - lib/ransack/context.rb
233
214
  - lib/ransack/helpers.rb
234
215
  - lib/ransack/helpers/form_builder.rb
235
216
  - lib/ransack/helpers/form_helper.rb
217
+ - lib/ransack/locale/ar.yml
218
+ - lib/ransack/locale/az.yml
219
+ - lib/ransack/locale/bg.yml
236
220
  - lib/ransack/locale/cs.yml
221
+ - lib/ransack/locale/da.yml
237
222
  - lib/ransack/locale/de.yml
223
+ - lib/ransack/locale/el.yml
238
224
  - lib/ransack/locale/en.yml
239
225
  - lib/ransack/locale/es.yml
240
226
  - lib/ransack/locale/fr.yml
241
227
  - lib/ransack/locale/hu.yml
228
+ - lib/ransack/locale/id.yml
229
+ - lib/ransack/locale/it.yml
230
+ - lib/ransack/locale/ja.yml
242
231
  - lib/ransack/locale/nl.yml
232
+ - lib/ransack/locale/pt-BR.yml
243
233
  - lib/ransack/locale/ro.yml
244
- - lib/ransack/locale/zh.yml
234
+ - lib/ransack/locale/ru.yml
235
+ - lib/ransack/locale/tr.yml
236
+ - lib/ransack/locale/zh-CN.yml
237
+ - lib/ransack/locale/zh-TW.yml
245
238
  - lib/ransack/naming.rb
246
239
  - lib/ransack/nodes.rb
247
240
  - lib/ransack/nodes/attribute.rb
@@ -257,6 +250,12 @@ files:
257
250
  - lib/ransack/translate.rb
258
251
  - lib/ransack/version.rb
259
252
  - lib/ransack/visitor.rb
253
+ - logo/ransack-h.png
254
+ - logo/ransack-h.svg
255
+ - logo/ransack-v.png
256
+ - logo/ransack-v.svg
257
+ - logo/ransack.png
258
+ - logo/ransack.svg
260
259
  - ransack.gemspec
261
260
  - spec/blueprints/articles.rb
262
261
  - spec/blueprints/comments.rb
@@ -264,26 +263,16 @@ files:
264
263
  - spec/blueprints/people.rb
265
264
  - spec/blueprints/tags.rb
266
265
  - spec/console.rb
266
+ - spec/helpers/polyamorous_helper.rb
267
267
  - spec/helpers/ransack_helper.rb
268
- - spec/mongoid/adapters/mongoid/base_spec.rb
269
- - spec/mongoid/adapters/mongoid/context_spec.rb
270
- - spec/mongoid/configuration_spec.rb
271
- - spec/mongoid/dependencies_spec.rb
272
- - spec/mongoid/helpers/ransack_helper.rb
273
- - spec/mongoid/nodes/condition_spec.rb
274
- - spec/mongoid/nodes/grouping_spec.rb
275
- - spec/mongoid/predicate_spec.rb
276
- - spec/mongoid/search_spec.rb
277
- - spec/mongoid/support/mongoid.yml
278
- - spec/mongoid/support/schema.rb
279
- - spec/mongoid/translate_spec.rb
280
- - spec/mongoid_spec_helper.rb
281
268
  - spec/ransack/adapters/active_record/base_spec.rb
282
269
  - spec/ransack/adapters/active_record/context_spec.rb
283
270
  - spec/ransack/configuration_spec.rb
284
- - spec/ransack/dependencies_spec.rb
285
271
  - spec/ransack/helpers/form_builder_spec.rb
286
272
  - spec/ransack/helpers/form_helper_spec.rb
273
+ - spec/ransack/join_association_spec.rb
274
+ - spec/ransack/join_dependency_spec.rb
275
+ - spec/ransack/join_spec.rb
287
276
  - spec/ransack/nodes/condition_spec.rb
288
277
  - spec/ransack/nodes/grouping_spec.rb
289
278
  - spec/ransack/predicate_spec.rb
@@ -312,7 +301,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
312
301
  version: '0'
313
302
  requirements: []
314
303
  rubyforge_project: ransack
315
- rubygems_version: 2.4.8
304
+ rubygems_version: 2.7.6
316
305
  signing_key:
317
306
  specification_version: 4
318
307
  summary: Object-based searching for Active Record and Mongoid (currently).
@@ -323,26 +312,16 @@ test_files:
323
312
  - spec/blueprints/people.rb
324
313
  - spec/blueprints/tags.rb
325
314
  - spec/console.rb
315
+ - spec/helpers/polyamorous_helper.rb
326
316
  - spec/helpers/ransack_helper.rb
327
- - spec/mongoid/adapters/mongoid/base_spec.rb
328
- - spec/mongoid/adapters/mongoid/context_spec.rb
329
- - spec/mongoid/configuration_spec.rb
330
- - spec/mongoid/dependencies_spec.rb
331
- - spec/mongoid/helpers/ransack_helper.rb
332
- - spec/mongoid/nodes/condition_spec.rb
333
- - spec/mongoid/nodes/grouping_spec.rb
334
- - spec/mongoid/predicate_spec.rb
335
- - spec/mongoid/search_spec.rb
336
- - spec/mongoid/support/mongoid.yml
337
- - spec/mongoid/support/schema.rb
338
- - spec/mongoid/translate_spec.rb
339
- - spec/mongoid_spec_helper.rb
340
317
  - spec/ransack/adapters/active_record/base_spec.rb
341
318
  - spec/ransack/adapters/active_record/context_spec.rb
342
319
  - spec/ransack/configuration_spec.rb
343
- - spec/ransack/dependencies_spec.rb
344
320
  - spec/ransack/helpers/form_builder_spec.rb
345
321
  - spec/ransack/helpers/form_helper_spec.rb
322
+ - spec/ransack/join_association_spec.rb
323
+ - spec/ransack/join_dependency_spec.rb
324
+ - spec/ransack/join_spec.rb
346
325
  - spec/ransack/nodes/condition_spec.rb
347
326
  - spec/ransack/nodes/grouping_spec.rb
348
327
  - spec/ransack/predicate_spec.rb