activeadmin-mongoid 1.0.0 → 2.0.0

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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/codecheck.yml +18 -0
  3. data/.github/workflows/tests.yml +45 -0
  4. data/.gitignore +2 -0
  5. data/.rubocop.yml +104 -0
  6. data/CHANGELOG.md +28 -0
  7. data/Gemfile +11 -8
  8. data/README.md +17 -3
  9. data/activeadmin-mongoid.gemspec +9 -9
  10. data/lib/active_admin/mongoid/association/relatable.rb +7 -1
  11. data/lib/active_admin/mongoid/controllers/resource_controller.rb +9 -10
  12. data/lib/active_admin/mongoid/criteria.rb +0 -1
  13. data/lib/active_admin/mongoid/csv_builder.rb +11 -6
  14. data/lib/active_admin/mongoid/document.rb +4 -16
  15. data/lib/active_admin/mongoid/filter_form_builder.rb +4 -4
  16. data/lib/active_admin/mongoid/filters/resource_extension.rb +4 -2
  17. data/lib/active_admin/mongoid/helpers/collection.rb +3 -1
  18. data/lib/active_admin/mongoid/inputs/filters/select_input.rb +15 -6
  19. data/lib/active_admin/mongoid/resource/attributes.rb +2 -3
  20. data/lib/active_admin/mongoid/resource.rb +1 -1
  21. data/lib/active_admin/mongoid/version.rb +1 -1
  22. data/lib/activeadmin-mongoid.rb +26 -0
  23. data/lib/meta_search/searches/mongoid.rb +4 -4
  24. data/spec/features/smoke_spec.rb +20 -6
  25. data/spec/lib/active_admin/mongoid/filter_form_builder_spec.rb +5 -7
  26. data/spec/lib/active_admin/mongoid/filters/resource_extension_spec.rb +19 -0
  27. data/spec/spec_helper.rb +3 -3
  28. data/spec/support/capybara.rb +0 -2
  29. data/spec/support/debug.rb +2 -2
  30. data/spec/support/mongoid.rb +2 -2
  31. data/tasks/js.rake +0 -2
  32. data/tasks/test.rake +2 -6
  33. data/test_app/Rakefile +1 -1
  34. data/test_app/app/admin/admin_users.rb +0 -1
  35. data/test_app/app/admin/dashboard.rb +4 -5
  36. data/test_app/app/admin/posts.rb +1 -1
  37. data/test_app/app/assets/config/manifest.js +1 -0
  38. data/test_app/app/models/admin_user.rb +11 -11
  39. data/test_app/app/models/post.rb +2 -0
  40. data/test_app/bin/rails +4 -0
  41. data/test_app/bin/rake +4 -0
  42. data/test_app/bin/setup +25 -0
  43. data/test_app/config/application.rb +1 -1
  44. data/test_app/config/boot.rb +4 -5
  45. data/test_app/config/environment.rb +3 -3
  46. data/test_app/config/environments/development.rb +2 -1
  47. data/test_app/config/environments/production.rb +0 -1
  48. data/test_app/config/environments/test.rb +3 -2
  49. data/test_app/config/initializers/active_admin.rb +0 -13
  50. data/test_app/config/initializers/inflections.rb +6 -5
  51. data/test_app/config/initializers/wrap_parameters.rb +0 -1
  52. data/test_app/config/mongoid.7.yml +2 -3
  53. data/test_app/config/mongoid.8.yml +13 -0
  54. data/test_app/config.ru +1 -1
  55. data/test_app/db/migrate/20130514223107_create_admin_notes.rb +3 -3
  56. data/test_app/db/migrate/20130514223108_move_admin_notes_to_comments.rb +2 -2
  57. data/test_app/script/rails +2 -2
  58. data/test_app/test/test_helper.rb +1 -1
  59. metadata +41 -24
  60. data/.travis.yml +0 -12
  61. data/Gemfile.lock +0 -284
  62. data/test_app/config/mongoid.2.yml +0 -20
  63. data/test_app/config/mongoid.3.yml +0 -96
  64. data/test_app/config/mongoid.4.yml +0 -87
  65. data/test_app/config/mongoid.5.yml +0 -7
  66. data/test_app/config/mongoid.6.yml +0 -7
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-mongoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elia Schito
8
8
  - Nic Boie
9
9
  - JD Guzman
10
10
  - Grzegorz Jakubiak
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2020-02-11 00:00:00.000000000 Z
14
+ date: 2026-12-02 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: mongoid
@@ -19,34 +19,48 @@ dependencies:
19
19
  requirements:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: '6.0'
22
+ version: '7.0'
23
23
  - - "<"
24
24
  - !ruby/object:Gem::Version
25
- version: 8.a
25
+ version: '9'
26
26
  type: :runtime
27
27
  prerelease: false
28
28
  version_requirements: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: '6.0'
32
+ version: '7.0'
33
33
  - - "<"
34
34
  - !ruby/object:Gem::Version
35
- version: 8.a
35
+ version: '9'
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: activeadmin
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '2.0'
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '2.0'
50
+ - !ruby/object:Gem::Dependency
51
+ name: csv
38
52
  requirement: !ruby/object:Gem::Requirement
39
53
  requirements:
40
54
  - - ">="
41
55
  - !ruby/object:Gem::Version
42
- version: 1.4.3
56
+ version: '0'
43
57
  type: :runtime
44
58
  prerelease: false
45
59
  version_requirements: !ruby/object:Gem::Requirement
46
60
  requirements:
47
61
  - - ">="
48
62
  - !ruby/object:Gem::Version
49
- version: 1.4.3
63
+ version: '0'
50
64
  - !ruby/object:Gem::Dependency
51
65
  name: kaminari-mongoid
52
66
  requirement: !ruby/object:Gem::Requirement
@@ -95,14 +109,14 @@ dependencies:
95
109
  requirements:
96
110
  - - "~>"
97
111
  - !ruby/object:Gem::Version
98
- version: '3.6'
112
+ version: '6.1'
99
113
  type: :development
100
114
  prerelease: false
101
115
  version_requirements: !ruby/object:Gem::Requirement
102
116
  requirements:
103
117
  - - "~>"
104
118
  - !ruby/object:Gem::Version
105
- version: '3.6'
119
+ version: '6.1'
106
120
  description: ActiveAdmin hacks to support Mongoid (some ActiveAdmin features are disabled)
107
121
  email:
108
122
  - elia@schito.me
@@ -110,12 +124,14 @@ executables: []
110
124
  extensions: []
111
125
  extra_rdoc_files: []
112
126
  files:
127
+ - ".github/workflows/codecheck.yml"
128
+ - ".github/workflows/tests.yml"
113
129
  - ".gitignore"
114
130
  - ".rspec"
115
- - ".travis.yml"
131
+ - ".rubocop.yml"
132
+ - CHANGELOG.md
116
133
  - CONDUCT.md
117
134
  - Gemfile
118
- - Gemfile.lock
119
135
  - LICENSE
120
136
  - README.md
121
137
  - Rakefile
@@ -142,6 +158,7 @@ files:
142
158
  - lib/tasks/activeadmin-mongoid_tasks.rake
143
159
  - spec/features/smoke_spec.rb
144
160
  - spec/lib/active_admin/mongoid/filter_form_builder_spec.rb
161
+ - spec/lib/active_admin/mongoid/filters/resource_extension_spec.rb
145
162
  - spec/spec_helper.rb
146
163
  - spec/support/capybara.rb
147
164
  - spec/support/debug.rb
@@ -155,6 +172,7 @@ files:
155
172
  - test_app/app/admin/admin_users.rb
156
173
  - test_app/app/admin/dashboard.rb
157
174
  - test_app/app/admin/posts.rb
175
+ - test_app/app/assets/config/manifest.js
158
176
  - test_app/app/assets/images/rails.png
159
177
  - test_app/app/assets/javascripts/active_admin.js
160
178
  - test_app/app/assets/javascripts/application.js
@@ -169,6 +187,9 @@ files:
169
187
  - test_app/app/models/city.rb
170
188
  - test_app/app/models/post.rb
171
189
  - test_app/app/views/layouts/application.html.erb
190
+ - test_app/bin/rails
191
+ - test_app/bin/rake
192
+ - test_app/bin/setup
172
193
  - test_app/config.ru
173
194
  - test_app/config/application.rb
174
195
  - test_app/config/boot.rb
@@ -188,12 +209,8 @@ files:
188
209
  - test_app/config/initializers/wrap_parameters.rb
189
210
  - test_app/config/locales/devise.en.yml
190
211
  - test_app/config/locales/en.yml
191
- - test_app/config/mongoid.2.yml
192
- - test_app/config/mongoid.3.yml
193
- - test_app/config/mongoid.4.yml
194
- - test_app/config/mongoid.5.yml
195
- - test_app/config/mongoid.6.yml
196
212
  - test_app/config/mongoid.7.yml
213
+ - test_app/config/mongoid.8.yml
197
214
  - test_app/config/routes.rb
198
215
  - test_app/db/migrate/20130514223107_create_admin_notes.rb
199
216
  - test_app/db/migrate/20130514223108_move_admin_notes_to_comments.rb
@@ -219,11 +236,11 @@ files:
219
236
  - test_app/vendor/assets/javascripts/.gitkeep
220
237
  - test_app/vendor/assets/stylesheets/.gitkeep
221
238
  - test_app/vendor/plugins/.gitkeep
222
- homepage: ''
239
+ homepage: https://github.com/activeadmin/activeadmin-mongoid
223
240
  licenses:
224
241
  - MIT
225
242
  metadata: {}
226
- post_install_message:
243
+ post_install_message:
227
244
  rdoc_options: []
228
245
  require_paths:
229
246
  - lib
@@ -231,21 +248,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
231
248
  requirements:
232
249
  - - ">="
233
250
  - !ruby/object:Gem::Version
234
- version: '2.4'
251
+ version: '3.1'
235
252
  required_rubygems_version: !ruby/object:Gem::Requirement
236
253
  requirements:
237
254
  - - ">="
238
255
  - !ruby/object:Gem::Version
239
256
  version: '0'
240
257
  requirements: []
241
- rubyforge_project:
242
- rubygems_version: 2.7.6
243
- signing_key:
258
+ rubygems_version: 3.3.26
259
+ signing_key:
244
260
  specification_version: 4
245
261
  summary: ActiveAdmin hacks to support Mongoid
246
262
  test_files:
247
263
  - spec/features/smoke_spec.rb
248
264
  - spec/lib/active_admin/mongoid/filter_form_builder_spec.rb
265
+ - spec/lib/active_admin/mongoid/filters/resource_extension_spec.rb
249
266
  - spec/spec_helper.rb
250
267
  - spec/support/capybara.rb
251
268
  - spec/support/debug.rb
data/.travis.yml DELETED
@@ -1,12 +0,0 @@
1
- language: ruby
2
- services:
3
- - mongodb
4
- before_install:
5
- - gem update --system
6
- - gem install bundler
7
- - bundle update --bundler
8
- rvm:
9
- - 2.4
10
- - 2.5
11
- - 2.6
12
- - 2.7
data/Gemfile.lock DELETED
@@ -1,284 +0,0 @@
1
- GIT
2
- remote: https://github.com/activerecord-hackery/ransack-mongoid
3
- revision: bd1935293d2f285fa7cf33d2c5c90d981bf67338
4
- specs:
5
- ransack-mongoid (0.1.0)
6
-
7
- PATH
8
- remote: .
9
- specs:
10
- activeadmin-mongoid (1.0.0)
11
- activeadmin (>= 1.4.3)
12
- jquery-rails
13
- kaminari-mongoid
14
- mongoid (>= 6.0, < 8.a)
15
- sass-rails (>= 3.1.4)
16
-
17
- GEM
18
- remote: https://rubygems.org/
19
- specs:
20
- actioncable (5.2.3)
21
- actionpack (= 5.2.3)
22
- nio4r (~> 2.0)
23
- websocket-driver (>= 0.6.1)
24
- actionmailer (5.2.3)
25
- actionpack (= 5.2.3)
26
- actionview (= 5.2.3)
27
- activejob (= 5.2.3)
28
- mail (~> 2.5, >= 2.5.4)
29
- rails-dom-testing (~> 2.0)
30
- actionpack (5.2.3)
31
- actionview (= 5.2.3)
32
- activesupport (= 5.2.3)
33
- rack (~> 2.0)
34
- rack-test (>= 0.6.3)
35
- rails-dom-testing (~> 2.0)
36
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
37
- actionview (5.2.3)
38
- activesupport (= 5.2.3)
39
- builder (~> 3.1)
40
- erubi (~> 1.4)
41
- rails-dom-testing (~> 2.0)
42
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
43
- activeadmin (2.6.0)
44
- arbre (~> 1.2, >= 1.2.1)
45
- formtastic (~> 3.1)
46
- formtastic_i18n (~> 0.4)
47
- inherited_resources (~> 1.7)
48
- jquery-rails (~> 4.2)
49
- kaminari (~> 1.0, >= 1.0.1)
50
- railties (>= 5.2, < 6.1)
51
- ransack (~> 2.1, >= 2.1.1)
52
- sassc-rails (~> 2.1)
53
- sprockets (>= 3.0, < 4.1)
54
- activejob (5.2.3)
55
- activesupport (= 5.2.3)
56
- globalid (>= 0.3.6)
57
- activemodel (5.2.3)
58
- activesupport (= 5.2.3)
59
- activerecord (5.2.3)
60
- activemodel (= 5.2.3)
61
- activesupport (= 5.2.3)
62
- arel (>= 9.0)
63
- activestorage (5.2.3)
64
- actionpack (= 5.2.3)
65
- activerecord (= 5.2.3)
66
- marcel (~> 0.3.1)
67
- activesupport (5.2.3)
68
- concurrent-ruby (~> 1.0, >= 1.0.2)
69
- i18n (>= 0.7, < 2)
70
- minitest (~> 5.1)
71
- tzinfo (~> 1.1)
72
- addressable (2.5.2)
73
- public_suffix (>= 2.0.2, < 4.0)
74
- arbre (1.2.1)
75
- activesupport (>= 3.0.0)
76
- arel (9.0.0)
77
- bcrypt (3.1.13)
78
- bson (4.7.1)
79
- builder (3.2.3)
80
- capybara (3.12.0)
81
- addressable
82
- mini_mime (>= 0.1.3)
83
- nokogiri (~> 1.8)
84
- rack (>= 1.6.0)
85
- rack-test (>= 0.6.3)
86
- regexp_parser (~> 1.2)
87
- xpath (~> 3.2)
88
- cliver (0.3.2)
89
- coderay (1.1.2)
90
- concurrent-ruby (1.1.5)
91
- crass (1.0.5)
92
- devise (4.7.1)
93
- bcrypt (~> 3.0)
94
- orm_adapter (~> 0.1)
95
- railties (>= 4.1.0)
96
- responders
97
- warden (~> 1.2.3)
98
- diff-lcs (1.3)
99
- docile (1.3.1)
100
- erubi (1.8.0)
101
- ffi (1.12.1)
102
- formtastic (3.1.5)
103
- actionpack (>= 3.2.13)
104
- formtastic_i18n (0.6.0)
105
- globalid (0.4.2)
106
- activesupport (>= 4.2.0)
107
- has_scope (0.7.2)
108
- actionpack (>= 4.1)
109
- activesupport (>= 4.1)
110
- i18n (1.6.0)
111
- concurrent-ruby (~> 1.0)
112
- inherited_resources (1.11.0)
113
- actionpack (>= 5.0, < 6.1)
114
- has_scope (~> 0.6)
115
- railties (>= 5.0, < 6.1)
116
- responders (>= 2, < 4)
117
- jquery-rails (4.3.3)
118
- rails-dom-testing (>= 1, < 3)
119
- railties (>= 4.2.0)
120
- thor (>= 0.14, < 2.0)
121
- jquery-ui-rails (6.0.1)
122
- railties (>= 3.2.16)
123
- jslint (1.2.0)
124
- json
125
- json (2.1.0)
126
- kaminari (1.1.1)
127
- activesupport (>= 4.1.0)
128
- kaminari-actionview (= 1.1.1)
129
- kaminari-activerecord (= 1.1.1)
130
- kaminari-core (= 1.1.1)
131
- kaminari-actionview (1.1.1)
132
- actionview
133
- kaminari-core (= 1.1.1)
134
- kaminari-activerecord (1.1.1)
135
- activerecord
136
- kaminari-core (= 1.1.1)
137
- kaminari-core (1.1.1)
138
- kaminari-mongoid (1.0.1)
139
- kaminari-core (~> 1.0)
140
- mongoid
141
- launchy (2.4.3)
142
- addressable (~> 2.3)
143
- loofah (2.3.1)
144
- crass (~> 1.0.2)
145
- nokogiri (>= 1.5.9)
146
- mail (2.7.1)
147
- mini_mime (>= 0.1.1)
148
- marcel (0.3.3)
149
- mimemagic (~> 0.3.2)
150
- method_source (0.9.2)
151
- mimemagic (0.3.3)
152
- mini_mime (1.0.1)
153
- mini_portile2 (2.4.0)
154
- minitest (5.11.3)
155
- mongo (2.11.3)
156
- bson (>= 4.4.2, < 5.0.0)
157
- mongoid (7.0.5)
158
- activemodel (>= 5.1, < 6.1)
159
- mongo (>= 2.5.1, < 3.0.0)
160
- nio4r (2.3.1)
161
- nokogiri (1.10.5)
162
- mini_portile2 (~> 2.4.0)
163
- orm_adapter (0.5.0)
164
- poltergeist (1.18.1)
165
- capybara (>= 2.1, < 4)
166
- cliver (~> 0.3.1)
167
- websocket-driver (>= 0.2.0)
168
- polyamorous (2.3.2)
169
- activerecord (>= 5.2.1)
170
- pry (0.12.2)
171
- coderay (~> 1.1.0)
172
- method_source (~> 0.9.0)
173
- pry-rails (0.3.8)
174
- pry (>= 0.10.4)
175
- public_suffix (3.0.3)
176
- rack (2.0.8)
177
- rack-test (1.1.0)
178
- rack (>= 1.0, < 3)
179
- rails (5.2.3)
180
- actioncable (= 5.2.3)
181
- actionmailer (= 5.2.3)
182
- actionpack (= 5.2.3)
183
- actionview (= 5.2.3)
184
- activejob (= 5.2.3)
185
- activemodel (= 5.2.3)
186
- activerecord (= 5.2.3)
187
- activestorage (= 5.2.3)
188
- activesupport (= 5.2.3)
189
- bundler (>= 1.3.0)
190
- railties (= 5.2.3)
191
- sprockets-rails (>= 2.0.0)
192
- rails-dom-testing (2.0.3)
193
- activesupport (>= 4.2.0)
194
- nokogiri (>= 1.6)
195
- rails-html-sanitizer (1.2.0)
196
- loofah (~> 2.2, >= 2.2.2)
197
- railties (5.2.3)
198
- actionpack (= 5.2.3)
199
- activesupport (= 5.2.3)
200
- method_source
201
- rake (>= 0.8.7)
202
- thor (>= 0.19.0, < 2.0)
203
- rake (12.3.3)
204
- ransack (2.3.2)
205
- activerecord (>= 5.2.1)
206
- activesupport (>= 5.2.1)
207
- i18n
208
- polyamorous (= 2.3.2)
209
- regexp_parser (1.3.0)
210
- responders (2.4.1)
211
- actionpack (>= 4.2.0, < 6.0)
212
- railties (>= 4.2.0, < 6.0)
213
- rspec-core (3.8.0)
214
- rspec-support (~> 3.8.0)
215
- rspec-expectations (3.8.2)
216
- diff-lcs (>= 1.2.0, < 2.0)
217
- rspec-support (~> 3.8.0)
218
- rspec-mocks (3.8.0)
219
- diff-lcs (>= 1.2.0, < 2.0)
220
- rspec-support (~> 3.8.0)
221
- rspec-rails (3.8.1)
222
- actionpack (>= 3.0)
223
- activesupport (>= 3.0)
224
- railties (>= 3.0)
225
- rspec-core (~> 3.8.0)
226
- rspec-expectations (~> 3.8.0)
227
- rspec-mocks (~> 3.8.0)
228
- rspec-support (~> 3.8.0)
229
- rspec-support (3.8.0)
230
- sass-rails (6.0.0)
231
- sassc-rails (~> 2.1, >= 2.1.1)
232
- sassc (2.2.1)
233
- ffi (~> 1.9)
234
- sassc-rails (2.1.2)
235
- railties (>= 4.0.0)
236
- sassc (>= 2.0)
237
- sprockets (> 3.0)
238
- sprockets-rails
239
- tilt
240
- simplecov (0.16.1)
241
- docile (~> 1.1)
242
- json (>= 1.8, < 3)
243
- simplecov-html (~> 0.10.0)
244
- simplecov-html (0.10.2)
245
- sprockets (3.7.2)
246
- concurrent-ruby (~> 1.0)
247
- rack (> 1, < 3)
248
- sprockets-rails (3.2.1)
249
- actionpack (>= 4.0)
250
- activesupport (>= 4.0)
251
- sprockets (>= 3.0.0)
252
- thor (0.20.3)
253
- thread_safe (0.3.6)
254
- tilt (2.0.10)
255
- tzinfo (1.2.5)
256
- thread_safe (~> 0.1)
257
- warden (1.2.8)
258
- rack (>= 2.0.6)
259
- websocket-driver (0.7.0)
260
- websocket-extensions (>= 0.1.0)
261
- websocket-extensions (0.1.3)
262
- xpath (3.2.0)
263
- nokogiri (~> 1.8)
264
-
265
- PLATFORMS
266
- ruby
267
-
268
- DEPENDENCIES
269
- activeadmin-mongoid!
270
- capybara
271
- devise
272
- jquery-rails
273
- jquery-ui-rails
274
- jslint
275
- launchy
276
- poltergeist
277
- pry-rails
278
- rails (>= 5.2, < 6.1)
279
- ransack-mongoid!
280
- rspec-rails (~> 3.6)
281
- simplecov
282
-
283
- BUNDLED WITH
284
- 1.17.3
@@ -1,20 +0,0 @@
1
- development:
2
- host: localhost
3
- database: test_app_development
4
-
5
- test:
6
- host: localhost
7
- database: test_app_test
8
-
9
- # set these environment variables on your prod server
10
- production:
11
- host: <%= ENV['MONGOID_HOST'] %>
12
- port: <%= ENV['MONGOID_PORT'] %>
13
- username: <%= ENV['MONGOID_USERNAME'] %>
14
- password: <%= ENV['MONGOID_PASSWORD'] %>
15
- database: <%= ENV['MONGOID_DATABASE'] %>
16
- # slaves:
17
- # - host: slave1.local
18
- # port: 27018
19
- # - host: slave2.local
20
- # port: 27019
@@ -1,96 +0,0 @@
1
- test:
2
- # Configure available database sessions. (required)
3
- sessions:
4
- # Defines the default session. (required)
5
- default:
6
- # Defines the name of the default database that Mongoid can connect to.
7
- # (required).
8
- database: activeadmin_mongoid_test
9
- # Provides the hosts the default session can connect to. Must be an array
10
- # of host:port pairs. (required)
11
- hosts:
12
- - localhost:27017
13
- options:
14
- # Change whether the session persists in safe mode by default.
15
- # (default: false)
16
- # safe: false
17
-
18
- # Change the default consistency model to :eventual or :strong.
19
- # :eventual will send reads to secondaries, :strong sends everything
20
- # to master. (default: :eventual)
21
- # consistency: :eventual
22
-
23
- # How many times Moped should attempt to retry an operation after
24
- # failure. (default: 30)
25
- # max_retries: 30
26
-
27
- # The time in seconds that Moped should wait before retrying an
28
- # operation on failure. (default: 1)
29
- # retry_interval: 1
30
- # Configure Mongoid specific options. (optional)
31
- options: &default_options
32
- # Configuration for whether or not to allow access to fields that do
33
- # not have a field definition on the model. (default: true)
34
- # allow_dynamic_fields: true
35
- allow_dynamic_fields: false
36
-
37
- # Enable the identity map, needed for eager loading. (default: false)
38
- # identity_map_enabled: false
39
- identity_map_enabled: true
40
-
41
- # Includes the root model name in json serialization. (default: false)
42
- # include_root_in_json: false
43
-
44
- # Include the _type field in serializaion. (default: false)
45
- # include_type_for_serialization: false
46
-
47
- # Preload all models in development, needed when models use
48
- # inheritance. (default: false)
49
- # preload_models: false
50
-
51
- # Protect id and type from mass assignment. (default: true)
52
- # protect_sensitive_fields: true
53
-
54
- # Raise an error when performing a #find and the document is not found.
55
- # (default: true)
56
- # raise_not_found_error: true
57
-
58
- # Raise an error when defining a scope with the same name as an
59
- # existing method. (default: false)
60
- scope_overwrite_exception: true
61
-
62
- # Skip the database version check, used when connecting to a db without
63
- # admin access. (default: false)
64
- # skip_version_check: false
65
-
66
- # User Active Support's time zone in conversions. (default: true)
67
- # use_activesupport_time_zone: true
68
-
69
- # Ensure all times are UTC in the app side. (default: false)
70
- # use_utc: false
71
-
72
- # production:
73
- # sessions:
74
- # default:
75
- # uri: <%= ENV['MONGOLAB_URI'] %>
76
- # options:
77
- # skip_version_check: true
78
- # identity_map_enabled: true
79
- # safe: true
80
- # options:
81
- # *default_options
82
- #
83
- # development:
84
- # sessions:
85
- # default:
86
- # database: activeadmin_mongoid_development
87
- # hosts:
88
- # - localhost:27017
89
- # options:
90
- # consistency: :strong
91
- # # In the test environment we lower the retries and retry interval to
92
- # # low amounts for fast failures.
93
- # max_retries: 1
94
- # retry_interval: 0
95
- # options:
96
- # *default_options
@@ -1,87 +0,0 @@
1
- test:
2
- # Configure available database sessions. (required)
3
- sessions:
4
- # Defines the default session. (required)
5
- default:
6
- # Defines the name of the default database that Mongoid can connect to.
7
- # (required).
8
- database: activeadmin_mongoid_test
9
- # Provides the hosts the default session can connect to. Must be an array
10
- # of host:port pairs. (required)
11
- hosts:
12
- - localhost:27017
13
- options:
14
- # Change whether the session persists in safe mode by default.
15
- # (default: false)
16
- # safe: false
17
-
18
- # Change the default consistency model to :eventual or :strong.
19
- # :eventual will send reads to secondaries, :strong sends everything
20
- # to master. (default: :eventual)
21
- # consistency: :eventual
22
-
23
- # How many times Moped should attempt to retry an operation after
24
- # failure. (default: 30)
25
- # max_retries: 30
26
-
27
- # The time in seconds that Moped should wait before retrying an
28
- # operation on failure. (default: 1)
29
- # retry_interval: 1
30
- # Configure Mongoid specific options. (optional)
31
- options: &default_options
32
- # Includes the root model name in json serialization. (default: false)
33
- # include_root_in_json: false
34
-
35
- # Include the _type field in serializaion. (default: false)
36
- # include_type_for_serialization: false
37
-
38
- # Preload all models in development, needed when models use
39
- # inheritance. (default: false)
40
- # preload_models: false
41
-
42
- # Protect id and type from mass assignment. (default: true)
43
- # protect_sensitive_fields: true
44
-
45
- # Raise an error when performing a #find and the document is not found.
46
- # (default: true)
47
- # raise_not_found_error: true
48
-
49
- # Raise an error when defining a scope with the same name as an
50
- # existing method. (default: false)
51
- scope_overwrite_exception: true
52
-
53
- # Skip the database version check, used when connecting to a db without
54
- # admin access. (default: false)
55
- # skip_version_check: false
56
-
57
- # User Active Support's time zone in conversions. (default: true)
58
- # use_activesupport_time_zone: true
59
-
60
- # Ensure all times are UTC in the app side. (default: false)
61
- # use_utc: false
62
-
63
- # production:
64
- # sessions:
65
- # default:
66
- # uri: <%= ENV['MONGOLAB_URI'] %>
67
- # options:
68
- # skip_version_check: true
69
- # identity_map_enabled: true
70
- # safe: true
71
- # options:
72
- # *default_options
73
- #
74
- # development:
75
- # sessions:
76
- # default:
77
- # database: activeadmin_mongoid_development
78
- # hosts:
79
- # - localhost:27017
80
- # options:
81
- # consistency: :strong
82
- # # In the test environment we lower the retries and retry interval to
83
- # # low amounts for fast failures.
84
- # max_retries: 1
85
- # retry_interval: 0
86
- # options:
87
- # *default_options
@@ -1,7 +0,0 @@
1
- test:
2
- clients:
3
- default:
4
- database: activeadmin_mongoid_test
5
- hosts:
6
- - localhost:27017
7
- #scope_overwrite_exception: true
@@ -1,7 +0,0 @@
1
- test:
2
- clients:
3
- default:
4
- database: activeadmin_mongoid_test
5
- hosts:
6
- - localhost:27017
7
- #scope_overwrite_exception: true