mobility 0.4.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/CHANGELOG.md +11 -0
  5. data/Gemfile.lock +27 -27
  6. data/README.md +8 -8
  7. data/lib/mobility.rb +18 -5
  8. data/lib/mobility/{wrapper.rb → accumulator.rb} +2 -4
  9. data/lib/mobility/active_record.rb +1 -0
  10. data/lib/mobility/active_record/backend_resetter.rb +1 -0
  11. data/lib/mobility/active_record/string_translation.rb +1 -0
  12. data/lib/mobility/active_record/text_translation.rb +1 -0
  13. data/lib/mobility/adapter.rb +19 -0
  14. data/lib/mobility/attributes.rb +2 -1
  15. data/lib/mobility/backend.rb +1 -1
  16. data/lib/mobility/backend/orm_delegator.rb +5 -4
  17. data/lib/mobility/backend_resetter.rb +2 -0
  18. data/lib/mobility/backends/active_record/column.rb +1 -0
  19. data/lib/mobility/backends/active_record/column/query_methods.rb +1 -0
  20. data/lib/mobility/backends/active_record/container.rb +21 -4
  21. data/lib/mobility/backends/active_record/container/json_query_methods.rb +30 -0
  22. data/lib/mobility/backends/active_record/container/{query_methods.rb → jsonb_query_methods.rb} +4 -2
  23. data/lib/mobility/backends/active_record/json.rb +36 -0
  24. data/lib/mobility/backends/active_record/json/query_methods.rb +25 -0
  25. data/lib/mobility/backends/active_record/jsonb.rb +4 -4
  26. data/lib/mobility/backends/active_record/jsonb/query_methods.rb +1 -0
  27. data/lib/mobility/backends/active_record/key_value.rb +2 -2
  28. data/lib/mobility/backends/active_record/key_value/query_methods.rb +1 -0
  29. data/lib/mobility/backends/active_record/pg_hash.rb +1 -0
  30. data/lib/mobility/backends/active_record/pg_query_methods.rb +1 -1
  31. data/lib/mobility/backends/active_record/serialized.rb +1 -0
  32. data/lib/mobility/backends/active_record/serialized/query_methods.rb +1 -0
  33. data/lib/mobility/backends/active_record/table.rb +2 -2
  34. data/lib/mobility/backends/active_record/table/query_methods.rb +1 -0
  35. data/lib/mobility/backends/column.rb +2 -0
  36. data/lib/mobility/backends/json.rb +20 -0
  37. data/lib/mobility/backends/jsonb.rb +0 -1
  38. data/lib/mobility/backends/key_value.rb +1 -0
  39. data/lib/mobility/backends/sequel/column.rb +1 -0
  40. data/lib/mobility/backends/sequel/column/query_methods.rb +1 -0
  41. data/lib/mobility/backends/sequel/container.rb +19 -3
  42. data/lib/mobility/backends/sequel/container/json_query_methods.rb +34 -0
  43. data/lib/mobility/backends/sequel/container/{query_methods.rb → jsonb_query_methods.rb} +2 -1
  44. data/lib/mobility/backends/sequel/hstore/query_methods.rb +1 -0
  45. data/lib/mobility/backends/sequel/json.rb +36 -0
  46. data/lib/mobility/backends/sequel/json/query_methods.rb +27 -0
  47. data/lib/mobility/backends/sequel/jsonb/query_methods.rb +2 -1
  48. data/lib/mobility/backends/sequel/key_value.rb +3 -3
  49. data/lib/mobility/backends/sequel/key_value/query_methods.rb +1 -0
  50. data/lib/mobility/backends/sequel/pg_hash.rb +1 -0
  51. data/lib/mobility/backends/sequel/query_methods.rb +1 -0
  52. data/lib/mobility/backends/sequel/serialized.rb +1 -0
  53. data/lib/mobility/backends/sequel/serialized/query_methods.rb +1 -0
  54. data/lib/mobility/backends/sequel/table.rb +1 -0
  55. data/lib/mobility/backends/sequel/table/query_methods.rb +1 -0
  56. data/lib/mobility/backends/serialized.rb +1 -0
  57. data/lib/mobility/backends/table.rb +1 -0
  58. data/lib/mobility/configuration.rb +3 -5
  59. data/lib/mobility/fallbacks.rb +28 -0
  60. data/lib/mobility/plugins/active_model/dirty.rb +5 -5
  61. data/lib/mobility/plugins/active_record/dirty.rb +1 -1
  62. data/lib/mobility/plugins/cache.rb +1 -0
  63. data/lib/mobility/plugins/default.rb +2 -0
  64. data/lib/mobility/plugins/dirty.rb +1 -0
  65. data/lib/mobility/plugins/fallbacks.rb +3 -1
  66. data/lib/mobility/plugins/fallthrough_accessors.rb +4 -4
  67. data/lib/mobility/plugins/locale_accessors.rb +2 -2
  68. data/lib/mobility/plugins/presence.rb +1 -0
  69. data/lib/mobility/sequel/column_changes.rb +3 -1
  70. data/lib/mobility/sequel/hash_initializer.rb +2 -0
  71. data/lib/mobility/sequel/string_translation.rb +1 -0
  72. data/lib/mobility/sequel/text_translation.rb +1 -0
  73. data/lib/mobility/translates.rb +2 -0
  74. data/lib/mobility/util.rb +3 -1
  75. data/lib/mobility/version.rb +3 -1
  76. data/lib/rails/generators/mobility/active_record_migration_compatibility.rb +1 -0
  77. data/lib/rails/generators/mobility/backend_generators/base.rb +3 -3
  78. data/lib/rails/generators/mobility/generators.rb +1 -0
  79. data/lib/rails/generators/mobility/install_generator.rb +1 -0
  80. data/lib/rails/generators/mobility/templates/initializer.rb +75 -0
  81. data/lib/rails/generators/mobility/translations_generator.rb +3 -3
  82. metadata +14 -5
  83. metadata.gz.sig +0 -0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobility
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Salzberg
@@ -30,7 +30,7 @@ cert_chain:
30
30
  eGDROPZoL5RXwiOnRbexxa7dcAxMrDfGB/hpiunIPWPsi4n5P7K/6OO/sGVMl9xv
31
31
  SZBPXjzrHdyOFLBYXB+PG7s3F/4=
32
32
  -----END CERTIFICATE-----
33
- date: 2018-02-18 00:00:00.000000000 Z
33
+ date: 2018-03-16 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: request_store
@@ -166,6 +166,7 @@ files:
166
166
  - README.md
167
167
  - Rakefile
168
168
  - lib/mobility.rb
169
+ - lib/mobility/accumulator.rb
169
170
  - lib/mobility/active_model.rb
170
171
  - lib/mobility/active_model/backend_resetter.rb
171
172
  - lib/mobility/active_record.rb
@@ -175,6 +176,7 @@ files:
175
176
  - lib/mobility/active_record/text_translation.rb
176
177
  - lib/mobility/active_record/translation.rb
177
178
  - lib/mobility/active_record/uniqueness_validator.rb
179
+ - lib/mobility/adapter.rb
178
180
  - lib/mobility/attributes.rb
179
181
  - lib/mobility/backend.rb
180
182
  - lib/mobility/backend/orm_delegator.rb
@@ -185,9 +187,12 @@ files:
185
187
  - lib/mobility/backends/active_record/column.rb
186
188
  - lib/mobility/backends/active_record/column/query_methods.rb
187
189
  - lib/mobility/backends/active_record/container.rb
188
- - lib/mobility/backends/active_record/container/query_methods.rb
190
+ - lib/mobility/backends/active_record/container/json_query_methods.rb
191
+ - lib/mobility/backends/active_record/container/jsonb_query_methods.rb
189
192
  - lib/mobility/backends/active_record/hstore.rb
190
193
  - lib/mobility/backends/active_record/hstore/query_methods.rb
194
+ - lib/mobility/backends/active_record/json.rb
195
+ - lib/mobility/backends/active_record/json/query_methods.rb
191
196
  - lib/mobility/backends/active_record/jsonb.rb
192
197
  - lib/mobility/backends/active_record/jsonb/query_methods.rb
193
198
  - lib/mobility/backends/active_record/key_value.rb
@@ -203,6 +208,7 @@ files:
203
208
  - lib/mobility/backends/container.rb
204
209
  - lib/mobility/backends/hash_valued.rb
205
210
  - lib/mobility/backends/hstore.rb
211
+ - lib/mobility/backends/json.rb
206
212
  - lib/mobility/backends/jsonb.rb
207
213
  - lib/mobility/backends/key_value.rb
208
214
  - lib/mobility/backends/null.rb
@@ -210,9 +216,12 @@ files:
210
216
  - lib/mobility/backends/sequel/column.rb
211
217
  - lib/mobility/backends/sequel/column/query_methods.rb
212
218
  - lib/mobility/backends/sequel/container.rb
213
- - lib/mobility/backends/sequel/container/query_methods.rb
219
+ - lib/mobility/backends/sequel/container/json_query_methods.rb
220
+ - lib/mobility/backends/sequel/container/jsonb_query_methods.rb
214
221
  - lib/mobility/backends/sequel/hstore.rb
215
222
  - lib/mobility/backends/sequel/hstore/query_methods.rb
223
+ - lib/mobility/backends/sequel/json.rb
224
+ - lib/mobility/backends/sequel/json/query_methods.rb
216
225
  - lib/mobility/backends/sequel/jsonb.rb
217
226
  - lib/mobility/backends/sequel/jsonb/query_methods.rb
218
227
  - lib/mobility/backends/sequel/key_value.rb
@@ -227,6 +236,7 @@ files:
227
236
  - lib/mobility/backends/serialized.rb
228
237
  - lib/mobility/backends/table.rb
229
238
  - lib/mobility/configuration.rb
239
+ - lib/mobility/fallbacks.rb
230
240
  - lib/mobility/loaded.rb
231
241
  - lib/mobility/plugins.rb
232
242
  - lib/mobility/plugins/active_model.rb
@@ -256,7 +266,6 @@ files:
256
266
  - lib/mobility/translates.rb
257
267
  - lib/mobility/util.rb
258
268
  - lib/mobility/version.rb
259
- - lib/mobility/wrapper.rb
260
269
  - lib/rails/generators/mobility/active_record_migration_compatibility.rb
261
270
  - lib/rails/generators/mobility/backend_generators/base.rb
262
271
  - lib/rails/generators/mobility/backend_generators/column_backend.rb
metadata.gz.sig CHANGED
Binary file