ransack 1.8.3 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +3 -0
  3. data/.travis.yml +26 -63
  4. data/CHANGELOG.md +187 -24
  5. data/CONTRIBUTING.md +9 -0
  6. data/Gemfile +5 -20
  7. data/README.md +163 -40
  8. data/Rakefile +1 -22
  9. data/lib/ransack/adapters/active_record/base.rb +11 -2
  10. data/lib/ransack/adapters/active_record/context.rb +178 -168
  11. data/lib/ransack/adapters/active_record/ransack/constants.rb +6 -3
  12. data/lib/ransack/adapters/active_record/ransack/context.rb +10 -16
  13. data/lib/ransack/adapters/active_record/ransack/nodes/condition.rb +3 -3
  14. data/lib/ransack/adapters/active_record/ransack/translate.rb +1 -5
  15. data/lib/ransack/adapters/active_record/ransack/visitor.rb +23 -0
  16. data/lib/ransack/adapters/active_record.rb +0 -9
  17. data/lib/ransack/adapters.rb +2 -0
  18. data/lib/ransack/configuration.rb +30 -4
  19. data/lib/ransack/constants.rb +4 -1
  20. data/lib/ransack/context.rb +29 -24
  21. data/lib/ransack/helpers/form_builder.rb +15 -3
  22. data/lib/ransack/helpers/form_helper.rb +8 -3
  23. data/lib/ransack/locale/ar.yml +70 -0
  24. data/lib/ransack/locale/az.yml +70 -0
  25. data/lib/ransack/locale/bg.yml +70 -0
  26. data/lib/ransack/locale/ca.yml +70 -0
  27. data/lib/ransack/locale/el.yml +70 -0
  28. data/lib/ransack/locale/es.yml +22 -22
  29. data/lib/ransack/locale/fa.yml +70 -0
  30. data/lib/ransack/locale/fi.yml +71 -0
  31. data/lib/ransack/locale/it.yml +70 -0
  32. data/lib/ransack/locale/nl.yml +4 -4
  33. data/lib/ransack/locale/ru.yml +70 -0
  34. data/lib/ransack/locale/tr.yml +70 -0
  35. data/lib/ransack/locale/zh-CN.yml +12 -12
  36. data/lib/ransack/nodes/attribute.rb +1 -1
  37. data/lib/ransack/nodes/grouping.rb +2 -7
  38. data/lib/ransack/nodes/value.rb +74 -68
  39. data/lib/ransack/predicate.rb +11 -19
  40. data/lib/ransack/search.rb +1 -1
  41. data/lib/ransack/translate.rb +115 -115
  42. data/lib/ransack/version.rb +1 -1
  43. data/lib/ransack/visitor.rb +1 -12
  44. data/lib/ransack.rb +5 -2
  45. data/logo/ransack-h.png +0 -0
  46. data/logo/ransack-h.svg +34 -0
  47. data/logo/ransack-v.png +0 -0
  48. data/logo/ransack-v.svg +34 -0
  49. data/logo/ransack.png +0 -0
  50. data/logo/ransack.svg +21 -0
  51. data/polyamorous/lib/polyamorous/activerecord_5.0_ruby_2/join_association.rb +2 -0
  52. data/polyamorous/lib/polyamorous/activerecord_5.0_ruby_2/join_dependency.rb +2 -0
  53. data/polyamorous/lib/polyamorous/activerecord_5.1_ruby_2/join_association.rb +31 -0
  54. data/polyamorous/lib/polyamorous/activerecord_5.1_ruby_2/join_dependency.rb +112 -0
  55. data/polyamorous/lib/polyamorous/activerecord_5.2.0_ruby_2/join_association.rb +31 -0
  56. data/polyamorous/lib/polyamorous/activerecord_5.2.0_ruby_2/join_dependency.rb +112 -0
  57. data/polyamorous/lib/polyamorous/activerecord_5.2.0_ruby_2/reflection.rb +12 -0
  58. data/polyamorous/lib/polyamorous/activerecord_5.2.1_ruby_2/join_association.rb +22 -0
  59. data/polyamorous/lib/polyamorous/activerecord_5.2.1_ruby_2/join_dependency.rb +81 -0
  60. data/polyamorous/lib/polyamorous/activerecord_5.2.1_ruby_2/reflection.rb +2 -0
  61. data/polyamorous/lib/polyamorous/activerecord_6.0_ruby_2/join_association.rb +2 -0
  62. data/polyamorous/lib/polyamorous/activerecord_6.0_ruby_2/join_dependency.rb +81 -0
  63. data/polyamorous/lib/polyamorous/activerecord_6.0_ruby_2/reflection.rb +2 -0
  64. data/polyamorous/lib/polyamorous/activerecord_6.1_ruby_2/join_association.rb +2 -0
  65. data/polyamorous/lib/polyamorous/activerecord_6.1_ruby_2/join_dependency.rb +2 -0
  66. data/polyamorous/lib/polyamorous/activerecord_6.1_ruby_2/reflection.rb +2 -0
  67. data/polyamorous/lib/polyamorous/join.rb +70 -0
  68. data/polyamorous/lib/polyamorous/swapping_reflection_class.rb +11 -0
  69. data/polyamorous/lib/polyamorous/tree_node.rb +7 -0
  70. data/polyamorous/lib/polyamorous/version.rb +3 -0
  71. data/polyamorous/lib/polyamorous.rb +29 -0
  72. data/polyamorous/polyamorous.gemspec +35 -0
  73. data/ransack.gemspec +9 -10
  74. data/spec/helpers/polyamorous_helper.rb +28 -0
  75. data/spec/ransack/adapters/active_record/base_spec.rb +74 -0
  76. data/spec/ransack/adapters/active_record/context_spec.rb +44 -6
  77. data/spec/ransack/configuration_spec.rb +17 -2
  78. data/spec/ransack/helpers/form_builder_spec.rb +3 -15
  79. data/spec/ransack/helpers/form_helper_spec.rb +88 -151
  80. data/spec/ransack/join_association_spec.rb +28 -0
  81. data/spec/ransack/join_dependency_spec.rb +97 -0
  82. data/spec/ransack/join_spec.rb +19 -0
  83. data/spec/ransack/predicate_spec.rb +16 -2
  84. data/spec/ransack/search_spec.rb +32 -3
  85. data/spec/spec_helper.rb +5 -0
  86. data/spec/support/schema.rb +45 -21
  87. metadata +81 -67
  88. data/lib/ransack/adapters/active_record/3.0/compat.rb +0 -179
  89. data/lib/ransack/adapters/active_record/3.0/context.rb +0 -203
  90. data/lib/ransack/adapters/active_record/3.1/context.rb +0 -212
  91. data/lib/ransack/adapters/active_record/3.2/context.rb +0 -44
  92. data/lib/ransack/adapters/active_record/compat.rb +0 -14
  93. data/lib/ransack/adapters/mongoid/3.2/.gitkeep +0 -0
  94. data/lib/ransack/adapters/mongoid/attributes/attribute.rb +0 -37
  95. data/lib/ransack/adapters/mongoid/attributes/order_predications.rb +0 -17
  96. data/lib/ransack/adapters/mongoid/attributes/predications.rb +0 -141
  97. data/lib/ransack/adapters/mongoid/base.rb +0 -134
  98. data/lib/ransack/adapters/mongoid/context.rb +0 -212
  99. data/lib/ransack/adapters/mongoid/inquiry_hash.rb +0 -23
  100. data/lib/ransack/adapters/mongoid/ransack/constants.rb +0 -88
  101. data/lib/ransack/adapters/mongoid/ransack/context.rb +0 -60
  102. data/lib/ransack/adapters/mongoid/ransack/nodes/condition.rb +0 -27
  103. data/lib/ransack/adapters/mongoid/ransack/translate.rb +0 -13
  104. data/lib/ransack/adapters/mongoid/ransack/visitor.rb +0 -24
  105. data/lib/ransack/adapters/mongoid/table.rb +0 -35
  106. data/lib/ransack/adapters/mongoid.rb +0 -15
  107. data/spec/mongoid/adapters/mongoid/base_spec.rb +0 -314
  108. data/spec/mongoid/adapters/mongoid/context_spec.rb +0 -56
  109. data/spec/mongoid/configuration_spec.rb +0 -162
  110. data/spec/mongoid/dependencies_spec.rb +0 -8
  111. data/spec/mongoid/helpers/ransack_helper.rb +0 -11
  112. data/spec/mongoid/nodes/condition_spec.rb +0 -49
  113. data/spec/mongoid/nodes/grouping_spec.rb +0 -13
  114. data/spec/mongoid/predicate_spec.rb +0 -155
  115. data/spec/mongoid/search_spec.rb +0 -445
  116. data/spec/mongoid/support/mongoid.yml +0 -11
  117. data/spec/mongoid/support/schema.rb +0 -135
  118. data/spec/mongoid/translate_spec.rb +0 -14
  119. data/spec/mongoid_spec_helper.rb +0 -63
  120. data/spec/ransack/dependencies_spec.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d068e0ef0efe6ce1a4afdb11cc36361f94bbcf68
4
- data.tar.gz: 2ab905dd3037f405cfc262e2440cbfa557c5a799
2
+ SHA256:
3
+ metadata.gz: be6fda6bbab697d2f125847b2761df81991190d8d9799b5480ac2044441978a0
4
+ data.tar.gz: 9f39f157e148aa2c4638b8e9c7ab5a8b14221f315e880c04e5f76f3db2a1b473
5
5
  SHA512:
6
- metadata.gz: 354a8a5fc605f5efb7da6d1b78544f93780293418ac9a4578ae395fb608dbd69d301d5a129fbc6cf20c46427427fbeba04b0f7ea040b54771aaecbd31cf174ac
7
- data.tar.gz: 388a7b733a5460acd980703c6d918077fc27e4777f8acf0b2f3c72b696664c1ef9997c477de74a772ea776eb56521d65cda03bb7f190441575801a4d65b479d6
6
+ metadata.gz: 2fc2082431692f609ddb39171876ade4e1eb4ce715ad917f196db6714a1f55872852c61dec20a047bf48b31f9cab812417fb94f1e9ae9786771320cbd6bc54a4
7
+ data.tar.gz: ea1ed1a393fe699432f7012facf66e01b48725d73eb7c8956f17435b447ce745fb65c235425cc28079ba1b1c74d64ba758710f25793f738ea92a49f5409abb68
data/.gitignore CHANGED
@@ -2,3 +2,6 @@
2
2
  .bundle
3
3
  Gemfile.lock
4
4
  pkg/*
5
+ coverage/*
6
+ .DS_Store
7
+ .byebug_history
data/.travis.yml CHANGED
@@ -3,79 +3,41 @@ language: ruby
3
3
  sudo: false
4
4
 
5
5
  rvm:
6
- - 2.3.3
7
- - 2.2.6
8
- - 2.1.10
9
- - 2.0
6
+ - 2.6.0
7
+
8
+ services:
9
+ - mysql
10
10
 
11
11
  env:
12
- - RAILS=5-0-stable DB=sqlite3
13
- - RAILS=5-0-stable DB=mysql
14
- - RAILS=5-0-stable DB=postgres
12
+ - RAILS=6-0-stable DB=sqlite3
13
+ - RAILS=6-0-stable DB=mysql
14
+ - RAILS=6-0-stable DB=postgres
15
15
 
16
- - RAILS=4-2-stable DB=sqlite3
17
- - RAILS=4-2-stable DB=mysql
18
- - RAILS=4-2-stable DB=postgres
16
+ - RAILS=v6.0.0 DB=sqlite3
17
+ - RAILS=v6.0.0 DB=mysql
18
+ - RAILS=v6.0.0 DB=postgres
19
19
 
20
- - RAILS=4-1-stable DB=sqlite3
21
- - RAILS=4-1-stable DB=mysql
22
- - RAILS=4-1-stable DB=postgres
20
+ - RAILS=5-2-stable DB=sqlite3
21
+ - RAILS=5-2-stable DB=mysql
22
+ - RAILS=5-2-stable DB=postgres
23
23
 
24
- - RAILS=4-0-stable DB=sqlite3
25
- - RAILS=4-0-stable DB=mysql
26
- - RAILS=4-0-stable DB=postgres
24
+ - RAILS=v5.2.1 DB=sqlite3
25
+ - RAILS=v5.2.1 DB=mysql
26
+ - RAILS=v5.2.1 DB=postgres
27
27
 
28
- - RAILS=3-2-stable DB=sqlite
29
- - RAILS=3-2-stable DB=mysql
30
- - RAILS=3-2-stable DB=postgres
28
+ - RAILS=v5.2.0 DB=sqlite3
29
+ - RAILS=v5.2.0 DB=mysql
30
+ - RAILS=v5.2.0 DB=postgres
31
31
 
32
- - RAILS=3-1-stable DB=sqlite
33
- - RAILS=3-1-stable DB=mysql
34
- - RAILS=3-1-stable DB=postgres
32
+ - RAILS=5-1-stable DB=sqlite3
33
+ - RAILS=5-1-stable DB=mysql
34
+ - RAILS=5-1-stable DB=postgres
35
35
 
36
36
  matrix:
37
- exclude:
38
- - rvm: 2.1.10
39
- env: RAILS=5-0-stable DB=sqlite3
40
- - rvm: 2.1.10
41
- env: RAILS=5-0-stable DB=mysql
42
- - rvm: 2.1.10
43
- env: RAILS=5-0-stable DB=postgres
44
-
45
- - rvm: 2.0
46
- env: RAILS=5-0-stable DB=sqlite3
47
- - rvm: 2.0
48
- env: RAILS=5-0-stable DB=mysql
49
- - rvm: 2.0
50
- env: RAILS=5-0-stable DB=postgres
51
-
52
- - rvm: 2.0
53
- env: RAILS=4-2-stable DB=sqlite3
54
- - rvm: 2.0
55
- env: RAILS=4-2-stable DB=mysql
56
- - rvm: 2.0
57
- env: RAILS=4-2-stable DB=postgres
58
-
59
- include:
60
- - rvm: 2.3.3
61
- env: RAILS=master DB=sqlite3
62
- - rvm: 2.3.3
63
- env: RAILS=master DB=mysql
64
- - rvm: 2.3.3
65
- env: RAILS=master DB=postgres
66
-
67
- - rvm: 2.2.6
68
- env: RAILS=master DB=sqlite3
69
- - rvm: 2.2.6
70
- env: RAILS=master DB=mysql
71
- - rvm: 2.2.6
72
- env: RAILS=master DB=postgres
73
-
74
37
  allow_failures:
75
- - env: RAILS=master DB=sqlite3
76
- - env: RAILS=master DB=mysql
77
- - env: RAILS=master DB=postgres
78
-
38
+ - env: RAILS=5-2-stable DB=sqlite3
39
+ - env: RAILS=5-2-stable DB=mysql
40
+ - env: RAILS=5-2-stable DB=postgres
79
41
  before_script:
80
42
  - mysql -e 'create database ransack collate utf8_general_ci;'
81
43
  - mysql -e 'use ransack;show variables like "%character%";show variables like "%collation%";'
@@ -84,3 +46,4 @@ before_script:
84
46
  addons:
85
47
  code_climate:
86
48
  repo_token: 8b701c4364d51a0217105e08c06922d600cec3d9e60d546a89e3ddfe46e0664e
49
+ postgresql: "9.6"
data/CHANGELOG.md CHANGED
@@ -2,6 +2,182 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2.3.0 - 2019-08-18
6
+
7
+ * Arabic translations PR [979](https://github.com/activerecord-hackery/ransack/pull/979)
8
+
9
+ * Rails 6 PR [1027](https://github.com/activerecord-hackery/ransack/pull/1027)
10
+ *vrodokanakis*
11
+
12
+ * Make polyamorous a separate gem PR [1002](https://github.com/activerecord-hackery/ransack/pull/1002)
13
+
14
+ * Catalan translations PR[1007](https://github.com/activerecord-hackery/ransack/pull/1007)
15
+ *roslavych*
16
+
17
+ * Don't escape period characters with wildcard searches in mysql2 PR [1013](https://github.com/activerecord-hackery/ransack/pull/1013)
18
+ *daflip*
19
+
20
+ * Farsi translations PR [1030](https://github.com/activerecord-hackery/ransack/pull/1030)
21
+
22
+ * Finnish translations PR [1049](https://github.com/activerecord-hackery/ransack/pull/1049)
23
+
24
+ * Fix wrong table alias when using nested join. for ActiveRecord >= 5.2
25
+ PR [374](https://github.com/activerecord-hackery/ransack/pull/374)
26
+
27
+ *hiichan*
28
+
29
+ ## Version 2.1.1 - 2018-12-05
30
+
31
+ * Add `arabic` translation
32
+ https://github.com/activerecord-hackery/ransack/pull/979
33
+
34
+ * Deprecate #search
35
+ PR [975](https://github.com/activerecord-hackery/ransack/pull/975)
36
+
37
+ ## Version 2.1.0 - 2018-10-26
38
+
39
+ * Add support for sorting by scopes
40
+ PR [973](https://github.com/activerecord-hackery/ransack/pull/973)
41
+
42
+ *Diego Borges*
43
+
44
+ * Added a new logo for Ransack
45
+ PR [972](https://github.com/activerecord-hackery/ransack/pull/972)
46
+
47
+ *Anıl Kılıç*, *Greg Molnar*
48
+
49
+ * Greek translations
50
+ PR [971](https://github.com/activerecord-hackery/ransack/pull/971)
51
+ PR [960](https://github.com/activerecord-hackery/ransack/pull/960)
52
+
53
+ *Sean Carroll*, *Greg Molnar*
54
+
55
+ * README improvements
56
+ PR [963](https://github.com/activerecord-hackery/ransack/pull/963)
57
+
58
+ *tommaso1*
59
+
60
+ * Bulgarian translations
61
+ PR [961](https://github.com/activerecord-hackery/ransack/pull/961)
62
+
63
+ *Sean Carroll*
64
+
65
+ * README improvements
66
+ PR [956](https://github.com/activerecord-hackery/ransack/pull/956)
67
+
68
+ *Alex Konoval*
69
+
70
+ * Remove lib/ransack/adapters/active_record/compat.rb
71
+ PR [954](https://github.com/activerecord-hackery/ransack/pull/954)
72
+
73
+ *Ryuta Kamizono*
74
+
75
+ * Remove unused aliases
76
+ PR [953](https://github.com/activerecord-hackery/ransack/pull/953)
77
+
78
+ *Ryuta Kamizono*
79
+
80
+ ## Version 2.0.1 - 2018-08-18
81
+
82
+ * Don't return association if table is nil
83
+ PR [952](https://github.com/activerecord-hackery/ransack/pull/952)
84
+
85
+ *Christian Gregg*
86
+
87
+ ## Version 2.0.0 - 2018-08-09
88
+
89
+ * Add support for Active Record 5.2.1
90
+ PR [#938](https://github.com/activerecord-hackery/ransack/pull/938)
91
+
92
+ * Fix sort with joins on existing association
93
+ PR [#937](https://github.com/activerecord-hackery/ransack/pull/937)
94
+
95
+ * Add the ability to skip arg sanitization on a per scope basis. Using
96
+ `ransackable_scopes_skip_sanitize_args`, users can define a list of
97
+ scopes which will bypass parameter sanitization. This allows passing 0,
98
+ 1, t, f, etc. to a scope as an actual parameter.
99
+ PR [#933](https://github.com/activerecord-hackery/ransack/pull/933)
100
+
101
+ * Drop support for Active Record < 5.0.
102
+ PR [#929](https://github.com/activerecord-hackery/ransack/pull/929)
103
+
104
+ * Extract mongoid support to a separate gem.
105
+ PR [#928](https://github.com/activerecord-hackery/ransack/pull/928)
106
+
107
+ * Absorb polyamorous
108
+ PR [#927](https://github.com/activerecord-hackery/ransack/pull/927)
109
+
110
+ * Fix broken monkey patch of #form_with
111
+ PR [#922](https://github.com/activerecord-hackery/ransack/pull/922)
112
+
113
+ ## Version 1.8.8 - 2018-03-16
114
+ * Fix multiple database support
115
+ PR [#893](https://github.com/activerecord-hackery/ransack/pull/893)
116
+
117
+ * Updated Dutch translations
118
+ PR [#887](https://github.com/activerecord-hackery/ransack/pull/887)
119
+
120
+ * Fixed no method error 'asc' for Rails 4.2
121
+ PR [#885](https://github.com/activerecord-hackery/ransack/pull/885)
122
+
123
+
124
+ ## Version 1.8.7 - 2018-02-05
125
+
126
+ * Rails 5.2 support
127
+ PR [#868](https://github.com/activerecord-hackery/ransack/pull/868)
128
+
129
+ * Lock pg gem to 0.21 to support older releases
130
+
131
+ * Warnings cleanup
132
+ PR [#867](https://github.com/activerecord-hackery/ransack/pull/867)
133
+
134
+ * Wildcard escaping
135
+ PR [#866]
136
+
137
+ ## Version 1.8.6 - 2018-01-23
138
+
139
+ ### Added
140
+
141
+ * Improve memory usage
142
+ PR [#820](https://github.com/activerecord-hackery/ransack/pull/820)
143
+
144
+ * Bump Polyamorous version to 1.3.2
145
+ PR [#858](https://github.com/activerecord-hackery/ransack/pull/858)
146
+
147
+ ## Version 1.8.5
148
+
149
+ ### Added
150
+
151
+ * Added Turkish Translations
152
+ PR [#835](https://github.com/activerecord-hackery/ransack/issues/835).
153
+
154
+ ## Version 1.8.4 - 2017-10-09
155
+
156
+ ### Added
157
+
158
+ * Added italian translations.
159
+ PR [#833](https://github.com/activerecord-hackery/ransack/pull/833).
160
+
161
+ * Add an optional default arrow for unsorted fields.
162
+ PR [#816](https://github.com/activerecord-hackery/ransack/pull/816/files).
163
+
164
+ ### Fixed
165
+
166
+ * Cast Postgres money type to float.
167
+ PR [#823](https://github.com/activerecord-hackery/ransack/pull/823).
168
+
169
+ * Fix the bug in sort_link, which causes the multiple fields option to be
170
+ ignored when block parameter is specified.
171
+ PR [#818](https://github.com/activerecord-hackery/ransack/pull/818).
172
+
173
+ * No need pass some arugments to JoinAssociation#join_constraints in Rails 5.1.
174
+ PR [#814](https://github.com/activerecord-hackery/ransack/pull/814).
175
+ Fixes [#807](https://github.com/activerecord-hackery/ransack/issues/807).
176
+ Reference [rails/rails#28267](https://github.com/rails/rails/pull/28267)
177
+ and [rails/rails#27851](https://github.com/rails/rails/pull/27851).
178
+
179
+ ## Version 1.8.3 - 2017-06-15
180
+
5
181
  ### Added
6
182
 
7
183
  * Add a config option to customize the up and down arrows used for direction
@@ -141,30 +317,17 @@
141
317
 
142
318
  *Marcel Eeken*
143
319
 
144
- * Add Taiwanese Hokkien/Mandarin i18n locale file (`zh-TW.yml`). PR
145
- [#674](https://github.com/activerecord-hackery/ransack/pull/674).
146
-
147
- *Sibevin Wang*
148
-
149
- * Add Danish i18n locale file (`da.yml`). PR
150
- [#663](https://github.com/activerecord-hackery/ransack/pull/663).
151
-
152
- *Kasper Johansen*
153
-
154
- * Add Brazilian Portuguese i18n locale file (`pt-BR.yml`). PR
155
- [#581](https://github.com/activerecord-hackery/ransack/pull/581).
156
-
157
- *Diego Henrique Domingues*
158
-
159
- * Add Indonesian (Bahasa) i18n locale file (`id.yml`). PR
160
- [#612](https://github.com/activerecord-hackery/ransack/pull/612).
161
-
162
- *Adam Pahlevi Baihaqi*
163
-
164
- * Add Japanese i18n locale file (`ja.yml`). PR
165
- [#622](https://github.com/activerecord-hackery/ransack/pull/622).
166
-
167
- *Masanobu Mizutani*
320
+ * Add i18n locale files:
321
+ * Taiwanese Hokkien/Mandarin (`zh-TW.yml`). PR
322
+ [#674](https://github.com/activerecord-hackery/ransack/pull/674). *Sibevin Wang*
323
+ * Danish (`da.yml`). PR
324
+ [#663](https://github.com/activerecord-hackery/ransack/pull/663). *Kasper Johansen*
325
+ * Brazilian Portuguese (`pt-BR.yml`). PR
326
+ [#581](https://github.com/activerecord-hackery/ransack/pull/581). *Diego Henrique Domingues*
327
+ * Indonesian (Bahasa) (`id.yml`). PR
328
+ [#612](https://github.com/activerecord-hackery/ransack/pull/612). *Adam Pahlevi Baihaqi*
329
+ * Japanese (`ja.yml`). PR
330
+ [#622](https://github.com/activerecord-hackery/ransack/pull/622). *Masanobu Mizutani*
168
331
 
169
332
  ### Fixed
170
333
 
data/CONTRIBUTING.md CHANGED
@@ -75,6 +75,15 @@ Here's a quick guide:
75
75
  $ DB=pg bundle exec rake spec (`DB=postgres` & `DB=postgresql` work too)
76
76
  $ DB=mysql bundle exec rake spec
77
77
 
78
+ For Postgres and MySQL, databases are expected to exist, called 'ransack'. To create use these commands (assuming OS X and Homebrew):
79
+
80
+ ### Postgres
81
+ $ createdb ransack
82
+
83
+ ### MySQL
84
+ $ mysql -u root
85
+ mysql> create database ransack;
86
+
78
87
  To run only the tests in a particular file: `rspec <path/to/filename>`
79
88
 
80
89
  $ rspec spec/ransack/search_spec.rb
data/Gemfile CHANGED
@@ -3,13 +3,7 @@ gemspec
3
3
 
4
4
  gem 'rake'
5
5
 
6
- rails = ENV['RAILS'] || '5-0-stable'
7
-
8
- if rails == 'master'
9
- gem 'polyamorous', github: 'activerecord-hackery/polyamorous'
10
- else
11
- gem 'polyamorous', '~> 1.3'
12
- end
6
+ rails = ENV['RAILS'] || '6-0-stable'
13
7
 
14
8
  gem 'pry'
15
9
 
@@ -22,33 +16,24 @@ when /\// # A path
22
16
  gem 'activerecord', path: "#{rails}/activerecord", require: false
23
17
  gem 'actionpack', path: "#{rails}/actionpack"
24
18
  when /^v/ # A tagged version
25
- git 'git://github.com/rails/rails.git', :tag => rails do
19
+ git 'https://github.com/rails/rails.git', :tag => rails do
26
20
  gem 'activesupport'
27
21
  gem 'activemodel'
28
22
  gem 'activerecord', require: false
29
23
  gem 'actionpack'
30
24
  end
31
25
  else
32
- git 'git://github.com/rails/rails.git', :branch => rails do
26
+ git 'https://github.com/rails/rails.git', :branch => rails do
33
27
  gem 'activesupport'
34
28
  gem 'activemodel'
35
29
  gem 'activerecord', require: false
36
30
  gem 'actionpack'
37
31
  end
38
- if rails == '3-0-stable'
39
- gem 'mysql2', '< 0.3'
40
- end
41
- end
42
-
43
- if ENV['DB'] =~ /mongoid4/
44
- gem 'mongoid', '~> 4.0.0', require: false
45
- end
46
-
47
- if ENV['DB'] =~ /mongoid5/
48
- gem 'mongoid', '~> 5.0.0', require: false
49
32
  end
33
+ gem 'mysql2', '~> 0.5.2'
50
34
 
51
35
  group :test do
52
36
  # TestUnit was removed from Ruby 2.2 but still needed for testing Rails 3.x.
53
37
  gem 'test-unit', '~> 3.0' if RUBY_VERSION >= '2.2'
38
+ gem 'simplecov', :require => false
54
39
  end