rom 2.0.2 → 5.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (203) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +122 -324
  3. data/LICENSE +17 -17
  4. data/README.md +91 -22
  5. data/lib/rom/version.rb +3 -1
  6. data/lib/rom.rb +4 -46
  7. metadata +42 -245
  8. data/.gitignore +0 -24
  9. data/.rspec +0 -3
  10. data/.rubocop.yml +0 -87
  11. data/.rubocop_todo.yml +0 -46
  12. data/.travis.yml +0 -28
  13. data/CODE_OF_CONDUCT.md +0 -13
  14. data/CONTRIBUTING.md +0 -1
  15. data/Gemfile +0 -41
  16. data/Guardfile +0 -24
  17. data/Rakefile +0 -22
  18. data/lib/rom/association_set.rb +0 -26
  19. data/lib/rom/command.rb +0 -173
  20. data/lib/rom/command_registry.rb +0 -153
  21. data/lib/rom/commands/class_interface.rb +0 -148
  22. data/lib/rom/commands/composite.rb +0 -54
  23. data/lib/rom/commands/create.rb +0 -13
  24. data/lib/rom/commands/delete.rb +0 -14
  25. data/lib/rom/commands/graph/builder.rb +0 -176
  26. data/lib/rom/commands/graph/class_interface.rb +0 -62
  27. data/lib/rom/commands/graph/input_evaluator.rb +0 -62
  28. data/lib/rom/commands/graph.rb +0 -103
  29. data/lib/rom/commands/lazy/create.rb +0 -23
  30. data/lib/rom/commands/lazy/delete.rb +0 -27
  31. data/lib/rom/commands/lazy/update.rb +0 -34
  32. data/lib/rom/commands/lazy.rb +0 -99
  33. data/lib/rom/commands/result.rb +0 -96
  34. data/lib/rom/commands/update.rb +0 -14
  35. data/lib/rom/commands.rb +0 -3
  36. data/lib/rom/configuration.rb +0 -88
  37. data/lib/rom/configuration_dsl/command.rb +0 -43
  38. data/lib/rom/configuration_dsl/command_dsl.rb +0 -35
  39. data/lib/rom/configuration_dsl/mapper.rb +0 -37
  40. data/lib/rom/configuration_dsl/mapper_dsl.rb +0 -44
  41. data/lib/rom/configuration_dsl/relation.rb +0 -26
  42. data/lib/rom/configuration_dsl.rb +0 -78
  43. data/lib/rom/configuration_plugin.rb +0 -17
  44. data/lib/rom/constants.rb +0 -30
  45. data/lib/rom/container.rb +0 -231
  46. data/lib/rom/create_container.rb +0 -61
  47. data/lib/rom/environment.rb +0 -70
  48. data/lib/rom/gateway.rb +0 -154
  49. data/lib/rom/global/plugin_dsl.rb +0 -49
  50. data/lib/rom/global.rb +0 -60
  51. data/lib/rom/lint/enumerable_dataset.rb +0 -54
  52. data/lib/rom/lint/gateway.rb +0 -94
  53. data/lib/rom/lint/linter.rb +0 -78
  54. data/lib/rom/lint/spec.rb +0 -20
  55. data/lib/rom/lint/test.rb +0 -98
  56. data/lib/rom/mapper_registry.rb +0 -35
  57. data/lib/rom/memory/commands.rb +0 -58
  58. data/lib/rom/memory/dataset.rb +0 -98
  59. data/lib/rom/memory/gateway.rb +0 -64
  60. data/lib/rom/memory/relation.rb +0 -49
  61. data/lib/rom/memory/storage.rb +0 -59
  62. data/lib/rom/memory/types.rb +0 -9
  63. data/lib/rom/memory.rb +0 -4
  64. data/lib/rom/pipeline.rb +0 -106
  65. data/lib/rom/plugin.rb +0 -17
  66. data/lib/rom/plugin_base.rb +0 -31
  67. data/lib/rom/plugin_registry.rb +0 -173
  68. data/lib/rom/plugins/command/schema.rb +0 -37
  69. data/lib/rom/plugins/configuration/configuration_dsl.rb +0 -17
  70. data/lib/rom/plugins/relation/key_inference.rb +0 -46
  71. data/lib/rom/plugins/relation/registry_reader.rb +0 -32
  72. data/lib/rom/plugins/relation/view/dsl.rb +0 -32
  73. data/lib/rom/plugins/relation/view.rb +0 -95
  74. data/lib/rom/relation/class_interface.rb +0 -230
  75. data/lib/rom/relation/composite.rb +0 -46
  76. data/lib/rom/relation/curried.rb +0 -104
  77. data/lib/rom/relation/graph.rb +0 -115
  78. data/lib/rom/relation/loaded.rb +0 -118
  79. data/lib/rom/relation/materializable.rb +0 -66
  80. data/lib/rom/relation/name.rb +0 -102
  81. data/lib/rom/relation.rb +0 -172
  82. data/lib/rom/relation_registry.rb +0 -9
  83. data/lib/rom/schema/dsl.rb +0 -58
  84. data/lib/rom/schema.rb +0 -89
  85. data/lib/rom/setup/auto_registration.rb +0 -69
  86. data/lib/rom/setup/auto_registration_strategies/base.rb +0 -11
  87. data/lib/rom/setup/auto_registration_strategies/custom_namespace.rb +0 -22
  88. data/lib/rom/setup/auto_registration_strategies/no_namespace.rb +0 -19
  89. data/lib/rom/setup/auto_registration_strategies/with_namespace.rb +0 -18
  90. data/lib/rom/setup/finalize/finalize_commands.rb +0 -47
  91. data/lib/rom/setup/finalize/finalize_mappers.rb +0 -36
  92. data/lib/rom/setup/finalize/finalize_relations.rb +0 -60
  93. data/lib/rom/setup/finalize.rb +0 -146
  94. data/lib/rom/setup.rb +0 -55
  95. data/lib/rom/support/configurable.rb +0 -80
  96. data/lib/rom/types.rb +0 -18
  97. data/log/.gitkeep +0 -0
  98. data/rakelib/benchmark.rake +0 -15
  99. data/rakelib/mutant.rake +0 -19
  100. data/rakelib/rubocop.rake +0 -18
  101. data/rom.gemspec +0 -26
  102. data/spec/fixtures/app/commands/create_user.rb +0 -2
  103. data/spec/fixtures/app/mappers/user_list.rb +0 -2
  104. data/spec/fixtures/app/my_commands/create_user.rb +0 -2
  105. data/spec/fixtures/app/my_mappers/user_list.rb +0 -2
  106. data/spec/fixtures/app/my_relations/users.rb +0 -2
  107. data/spec/fixtures/app/relations/users.rb +0 -2
  108. data/spec/fixtures/custom/commands/create_user.rb +0 -6
  109. data/spec/fixtures/custom/mappers/user_list.rb +0 -6
  110. data/spec/fixtures/custom/relations/users.rb +0 -6
  111. data/spec/fixtures/lib/persistence/commands/create_user.rb +0 -6
  112. data/spec/fixtures/lib/persistence/mappers/user_list.rb +0 -6
  113. data/spec/fixtures/lib/persistence/my_commands/create_user.rb +0 -6
  114. data/spec/fixtures/lib/persistence/my_mappers/user_list.rb +0 -6
  115. data/spec/fixtures/lib/persistence/my_relations/users.rb +0 -6
  116. data/spec/fixtures/lib/persistence/relations/users.rb +0 -6
  117. data/spec/integration/command_registry_spec.rb +0 -60
  118. data/spec/integration/commands/create_spec.rb +0 -177
  119. data/spec/integration/commands/delete_spec.rb +0 -67
  120. data/spec/integration/commands/error_handling_spec.rb +0 -25
  121. data/spec/integration/commands/graph_builder_spec.rb +0 -213
  122. data/spec/integration/commands/graph_spec.rb +0 -288
  123. data/spec/integration/commands/update_spec.rb +0 -109
  124. data/spec/integration/commands_spec.rb +0 -67
  125. data/spec/integration/mappers/combine_spec.rb +0 -117
  126. data/spec/integration/mappers/deep_embedded_spec.rb +0 -44
  127. data/spec/integration/mappers/definition_dsl_spec.rb +0 -206
  128. data/spec/integration/mappers/embedded_spec.rb +0 -62
  129. data/spec/integration/mappers/exclude_spec.rb +0 -27
  130. data/spec/integration/mappers/fold_spec.rb +0 -71
  131. data/spec/integration/mappers/group_spec.rb +0 -163
  132. data/spec/integration/mappers/overwrite_attributes_value_spec.rb +0 -51
  133. data/spec/integration/mappers/prefix_separator_spec.rb +0 -52
  134. data/spec/integration/mappers/prefix_spec.rb +0 -48
  135. data/spec/integration/mappers/prefixing_attributes_spec.rb +0 -37
  136. data/spec/integration/mappers/registering_custom_mappers_spec.rb +0 -28
  137. data/spec/integration/mappers/renaming_attributes_spec.rb +0 -125
  138. data/spec/integration/mappers/reusing_mappers_spec.rb +0 -43
  139. data/spec/integration/mappers/step_spec.rb +0 -119
  140. data/spec/integration/mappers/symbolizing_attributes_spec.rb +0 -77
  141. data/spec/integration/mappers/unfold_spec.rb +0 -92
  142. data/spec/integration/mappers/ungroup_spec.rb +0 -126
  143. data/spec/integration/mappers/unwrap_spec.rb +0 -93
  144. data/spec/integration/mappers/wrap_spec.rb +0 -155
  145. data/spec/integration/memory/commands/create_spec.rb +0 -23
  146. data/spec/integration/memory/commands/delete_spec.rb +0 -23
  147. data/spec/integration/memory/commands/update_spec.rb +0 -23
  148. data/spec/integration/multi_env_spec.rb +0 -69
  149. data/spec/integration/multi_repo_spec.rb +0 -46
  150. data/spec/integration/relations/default_dataset_spec.rb +0 -38
  151. data/spec/integration/relations/inheritance_spec.rb +0 -37
  152. data/spec/integration/relations/reading_spec.rb +0 -169
  153. data/spec/integration/relations/registry_dsl_spec.rb +0 -45
  154. data/spec/integration/repositories/extending_relations_spec.rb +0 -58
  155. data/spec/integration/repositories/setting_logger_spec.rb +0 -34
  156. data/spec/integration/setup_spec.rb +0 -160
  157. data/spec/shared/command_behavior.rb +0 -28
  158. data/spec/shared/command_graph.rb +0 -50
  159. data/spec/shared/container.rb +0 -9
  160. data/spec/shared/enumerable_dataset.rb +0 -52
  161. data/spec/shared/gateway_only.rb +0 -6
  162. data/spec/shared/materializable.rb +0 -36
  163. data/spec/shared/no_container.rb +0 -16
  164. data/spec/shared/one_behavior.rb +0 -26
  165. data/spec/shared/proxy.rb +0 -0
  166. data/spec/shared/users_and_tasks.rb +0 -10
  167. data/spec/spec_helper.rb +0 -52
  168. data/spec/support/constant_leak_finder.rb +0 -14
  169. data/spec/support/mutant.rb +0 -10
  170. data/spec/support/types.rb +0 -5
  171. data/spec/test/memory_repository_lint_test.rb +0 -27
  172. data/spec/unit/rom/association_set_spec.rb +0 -23
  173. data/spec/unit/rom/commands/graph_spec.rb +0 -191
  174. data/spec/unit/rom/commands/lazy_spec.rb +0 -307
  175. data/spec/unit/rom/commands/result_spec.rb +0 -70
  176. data/spec/unit/rom/commands_spec.rb +0 -165
  177. data/spec/unit/rom/configurable_spec.rb +0 -49
  178. data/spec/unit/rom/configuration_spec.rb +0 -61
  179. data/spec/unit/rom/container_spec.rb +0 -99
  180. data/spec/unit/rom/create_container_spec.rb +0 -151
  181. data/spec/unit/rom/environment_spec.rb +0 -123
  182. data/spec/unit/rom/gateway_spec.rb +0 -146
  183. data/spec/unit/rom/mapper_registry_spec.rb +0 -25
  184. data/spec/unit/rom/memory/commands_spec.rb +0 -43
  185. data/spec/unit/rom/memory/dataset_spec.rb +0 -31
  186. data/spec/unit/rom/memory/relation_spec.rb +0 -109
  187. data/spec/unit/rom/memory/repository_spec.rb +0 -12
  188. data/spec/unit/rom/memory/storage_spec.rb +0 -45
  189. data/spec/unit/rom/plugin_spec.rb +0 -150
  190. data/spec/unit/rom/plugins/command/schema_spec.rb +0 -66
  191. data/spec/unit/rom/plugins/relation/key_inference_spec.rb +0 -85
  192. data/spec/unit/rom/plugins/relation/view_spec.rb +0 -51
  193. data/spec/unit/rom/relation/composite_spec.rb +0 -89
  194. data/spec/unit/rom/relation/curried_spec.rb +0 -52
  195. data/spec/unit/rom/relation/graph_spec.rb +0 -92
  196. data/spec/unit/rom/relation/lazy/combine_spec.rb +0 -165
  197. data/spec/unit/rom/relation/lazy_spec.rb +0 -214
  198. data/spec/unit/rom/relation/loaded_spec.rb +0 -53
  199. data/spec/unit/rom/relation/name_spec.rb +0 -58
  200. data/spec/unit/rom/relation/schema_spec.rb +0 -117
  201. data/spec/unit/rom/relation_spec.rb +0 -237
  202. data/spec/unit/rom/schema_spec.rb +0 -10
  203. data/spec/unit/rom/setup/auto_registration_spec.rb +0 -152
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e6dd420bd1787efc67261de110b316f6b5c92ae8
4
- data.tar.gz: e9f8fb3dbc40528ac46f6427d7b7238c162980bd
2
+ SHA256:
3
+ metadata.gz: bc47101293d7a3fc160ffd01bf311ec6252bcc48559f6768648c7e7e1d741387
4
+ data.tar.gz: 20315f7c7ba3b38b8e2f0ecc03c9fe4df035fe15b8958969278bcd0b12af841b
5
5
  SHA512:
6
- metadata.gz: 6a48171fa2e771fec4e68e14b99e4f78cfd31f6d5162ff5f14546f41d6970b44c8522304cfa9546cff203967696853002e3524f714023d7ac0fd5ea086d7ea9f
7
- data.tar.gz: 34e9a0f63fabaf30897d767db9b8d26e1ac92cd0661cff7bdb5b1f27979fe56feb9f6b0c12ae7305f514c623322e270009ecd3ce35e51867bfdac5a199393408
6
+ metadata.gz: a9ab8ed3af4b83aa6f11a4f0e04932ef53ded069287162b3130e2a79db7c9594e27075da4934e3590c65c5c912d2932ff3e85cd04387421ee6c3def8a4a92bd6
7
+ data.tar.gz: dba973b1c48bc47560b933ad7bf4e383420ec2a8682800659d08383472683e7a41e65f8f450c947fc6d224f518c6ef86406c39d49fb888ec40d2be4a29cd7fab
data/CHANGELOG.md CHANGED
@@ -1,458 +1,256 @@
1
- ## v2.0.2 2016-11-11
2
-
3
- ## Added
4
-
5
- * API docs for `ROM::Container` (solnic)
6
-
7
- ## Fixed
8
-
9
- * Custom command input function is no longer overridden by schema hash (solnic)
10
- * `Relation::Name#to_s` returns a string properly when there is no alias (solnic)
11
-
12
- [Compare v2.0.1...v2.0.2](https://github.com/rom-rb/rom/compare/v2.0.0...v2.0.2)
13
-
14
- ## v2.0.1 2016-09-30
15
-
16
- ### Added
17
-
18
- - Support for different auto-registration strategies (janjiss)
19
- - Support for custom component dir names in auto-registration (AMHOL)
1
+ ## 5.2.5 2020-12-30
20
2
 
21
3
  ### Fixed
22
4
 
23
- - Finalizing schema that is already finalized no longer crashes (flash-gordon)
24
-
25
- [Compare v2.0.0...v2.0.1](https://github.com/rom-rb/rom/compare/v2.0.0...v2.0.1)
26
-
27
- ## v2.0.0 2016-07-27
28
-
29
- ### Added
30
-
31
- - Extendible `schema` DSL for relations with attribute and type definitions (solnic)
32
- - New command plugin `:schema` which will set up an input handler from schema definition (solnic)
33
- - New command option `restrictible` for commands that can use a restricted relation (solnic)
34
- - More meaningful exception is raised when trying to access a non-existant command (thiagoa)
35
- - `Relation::Name` class that contains both relation and dataset names (flash-gordon)
36
- - `Relation::Loaded#pluck` returning values under specified key (solnic)
37
- - `Relation::Loaded#primary_keys` returning a list of primary keys from a materialized relation (solnic)
5
+ - [rom-core] auto-registration sorts files now which fixes some (rare) issues with file loading (@v-kolesnikov)
6
+ - [rom-core] configuration values are no longer being frozen during finalization of the setup (@v-kolesnikov)
38
7
 
39
- #### New low-level APIs
8
+ ### Changed
40
9
 
41
- - `Command.create_class` for building a command class dynamically (solnic)
42
- - `Command.extend_for_relation` for extending a command with relation view interface (solnic)
10
+ - [rom] Dependency on `rom-core` was bumped to `>= 5.2.4` (@solnic)
43
11
 
44
- ### Fixed
12
+ [Compare v5.2.4...v5.2.5](https://github.com/rom-rb/rom/compare/v5.2.4...v5.2.5)
45
13
 
46
- - [BREAKING] command graphs return materialized results (a hash or an array) (solnic)
47
- - `Container#disconnect` properly delegates to gateways (endash)
48
- - `Relation#with` properly carries original options (solnic)
49
- - Command pipeline will stop processing if result was `nil` or an empty array (solnic)
14
+ ## 5.2.4 2020-05-08
50
15
 
51
16
  ### Changed
52
17
 
53
- - [BREAKING] `ROM.env` **is gone** (solnic)
54
- - [BREAKING] `Update` and `Delete` no longer calls `assert_tuple_count` [more info](https://github.com/rom-rb/rom/commit/bec2c4c1dce370670c90f529feb1b4db0e6e4bd9) (solnic)
55
- - [BREAKING] `Relation#name` and `Command#name` now returns `Relation::Name` instance (flash-gordon)
56
- - `Command.validator` is now deprecated [more info](https://github.com/rom-rb/rom/commit/80bb8411bd411f05d9c51106ae026ad412a2f25f) (solnic)
57
- - `Relation.dataset` yields a relation class when block was passed (solnic)
58
- - `Relation#attributes` can return attributes explicitly passed via options (solnic)
59
- - Relation `:key_inference` plugin supports schema information from other relations (solnic)
60
- - `auto_registration` coerces its directory to a pathname now (adz)
61
- - `macros` are now enabled by default in in-line setup block (endash)
18
+ - [rom] Dependency on `rom-changeset` was bumped to `>= 5.2.3` (@flash-gordon)
62
19
 
63
- [Compare v1.0.0...v2.0.0](https://github.com/rom-rb/rom/compare/v1.0.0...v2.0.0)
20
+ [Compare v5.2.3...v5.2.4](https://github.com/rom-rb/rom/compare/v5.2.3...v5.2.4)
64
21
 
65
- ## v1.0.0 2016-01-06
22
+ ## 5.2.3 2020-05-07
66
23
 
67
- ### Added
24
+ ### Fixed
68
25
 
69
- - Command graph DSL (endash + solnic)
70
- - Command graph now supports update and delete commands (cflipse + solnic)
71
- - `Gateway.adapter` setting and a corresponding `Gateway#adapter` reader. Both are
72
- necessary to access a migrator (nepalez)
73
- - `ROM::Commands::Result#{success?,failure?}` interface (Snuff)
74
- - Imported relation plugins from `rom-repository`:
75
- - `view` for explicit relation view definitions
76
- - `key_inference` for inferring `foreign_key` of a relation
26
+ - [rom-core] Fix duplicated input processing in update commands (see #594) (@flash-gordon)
27
+ - [rom-changeset] fix binding mapping functions in `Update` changesets (@timriley & @flash-gordon)
77
28
 
78
29
  ### Changed
79
30
 
80
- - **REMOVED** all deprecated APIs (solnic)
81
- - [fixed #306] Inheriting from a misconfigured adapter relation will raise a
82
- meaningful error (solnic)
83
- - Command graph will raise `ROM::KeyMissing` command error when a key is missing
84
- in the input (solnic)
85
- - Command graph no longer rescues from any exception (solnic)
31
+ - [rom] Dependency on `rom-core` was bumped to `>= 5.2.3` (@solnic)
86
32
 
87
- ### Fixed
33
+ [Compare v5.2.2...v5.2.3](https://github.com/rom-rb/rom/compare/v5.2.2...v5.2.3)
88
34
 
89
- - `Relation.register_as` properly overrides inherited value (solnic)
35
+ ## 5.2.2 2020-02-03
90
36
 
91
- [Compare v0.9.1...v1.0.0](https://github.com/rom-rb/rom/compare/v0.9.1...v1.0.0)
92
37
 
93
- ## v0.9.1 2015-08-21
38
+ ### Added
94
39
 
95
- This is a small bug-fix release which addresses a couple of issues for inline
96
- setup DSL and multi-environments.
40
+ - [rom-repository] `Repository#transaction` accepts transaction options now (@ianks)
97
41
 
98
42
  ### Fixed
99
43
 
100
- - Multi-env setup for adapters with schema-inferration support won't crash (solnic)
101
- - Default adapter is set correctly when many adapters are configured and one is
102
- registered under `:default` name (solnic)
103
- - When defining a relation using inline DSL with custom dataset name the relation
104
- name will be correctly set as `register_as` setting (solnic)
44
+ - [rom-core] Constructor types were fired twice when writing data (@flash-gordon)
105
45
 
106
- ### Changed
107
46
 
108
- - When using inline-setup for env the auto_registration mechanism will be turned
109
- on by default (solnic)
47
+ [Compare v5.2.1...v5.2.2](https://github.com/rom-rb/rom/compare/v5.2.1...v5.2.2)
110
48
 
111
- [Compare v0.9.0...v0.9.1](https://github.com/rom-rb/rom/compare/v0.9.0...v0.9.1)
49
+ ## 5.2.1 2020-01-11
112
50
 
113
- ## v0.9.0 2015-08-19
51
+ This release contains keyword fixes reported by Ruby 2.7.
114
52
 
115
- ### Added
116
53
 
117
- * Configuration API for gateways supporting following options:
118
- - `infer_relations` either `true` or `false` - if disabled schema inference
119
- won't be used to automatically set up relations for you
120
- - `inferrable_relations` a list of allowed relations that should be inferred
121
- - `not_inferrable_relations` a list of relations that should not be inferred
54
+ [Compare v5.2.0...v5.2.1](https://github.com/rom-rb/rom/compare/v5.2.0...v5.2.1)
122
55
 
123
- ### Changed
56
+ ## 5.2.0 2020-01-11
124
57
 
125
- * Global setup with auto-registration ported to the `:auto_registration` environment plugin (AMHOL)
126
- * Multi-environment setup possible now via `ROM::Environment` object (AMHOL)
127
- * All relations are now lazy with auto-currying enabled (solnic)
128
- * Low-level query DSL provided by adapters is now public but using it directly in
129
- application layer is discouraged (solnic)
130
- * `ROM::Mapper` component extracted into standalone `rom-mapper` gem (solnic)
131
- * Support libraries extracted to `rom-support` gem (solnic)
58
+ Yanked and republished as 5.2.1
132
59
 
133
- ## Fixed
134
60
 
135
- * `register_as` is now properly inferred for relations and their descendants (solnic)
136
- * Adapter-specific interface is properly included in relation descendants (solnic)
137
- * Combined commands (aka command graph) properly rejects keys from nested input
138
- prior sending the input to individual commands (solnic)
139
- * Composite relation materializes correctly when another composite on the right
140
- side became materialized (ie piping relation through a composite relation will
141
- work correctly) (solnic)
61
+ [Compare v5.1.2...v5.2.0](https://github.com/rom-rb/rom/compare/v5.1.2...v5.2.0)
142
62
 
143
- [Compare v0.8.1...v0.9.0](https://github.com/rom-rb/rom/compare/v0.8.1...v0.9.0)
63
+ ## 5.1.2 2019-08-17
144
64
 
145
- ## v0.8.1 2015-07-12
146
65
 
147
66
  ### Fixed
148
67
 
149
- * `ROM::CommandError` properly sets original error and backtrace (solnic)
68
+ - [rom-core] Filtering out duplicated combine nodes works correctly with aliased nodes (@solnic)
69
+ - [rom-core] Filtering out duplicated combine nodes should no longer cause performance issues (@solnic)
70
+ - [rom-core] Relation names are properly equalized now (@solnic)
71
+ - [rom-core] Inferring class name for auto-structs works correctly with `:statuses` and `:aliases` relation names (@solnic)
150
72
 
151
73
  ### Changed
152
74
 
153
- * Internal transproc processor has been updated to the new API (solnic)
75
+ - [rom] Dependency on `rom-core` was bumped to `>= 5.1.2` (@solnic)
76
+ - [rom-changeset] Dependency on `rom-core` was bumped to `>= 5.1.2` (@solnic)
77
+ - [rom-repository] Dependency on `rom-core` was bumped to `>= 5.1.2` (@solnic)
154
78
 
155
- [Compare v0.8.0...v0.8.1](https://github.com/rom-rb/rom/compare/v0.8.0...v0.8.1)
79
+ [Compare v5.1.1...v5.1.2](https://github.com/rom-rb/rom/compare/v5.1.1...v5.1.2)
156
80
 
157
- ## v0.8.0 2015-06-22
81
+ ## 5.1.1 2019-08-06
158
82
 
159
- ### Added
160
-
161
- * Commands can be combined into a single command that can work with a nested input (solnic)
162
- * New `step` mapper operation that allows multistep transformations inside a single mapper (dekz)
163
- * New `ungroup` and `unfold` mapper operations inverse `group` and `fold` (nepalez)
164
- * Support deep nesting of `unwrap` mapper operations (nepalez)
165
- * Support usage of `exclude` in a root of the mapper (nepalez)
166
- * Support usage of `prefix` and `prefix_separator` mapper operations inside blocks (nepalez)
167
- * Support renaming of the rest of an attribute after `unwrap` (nepalez)
168
83
 
169
84
  ### Changed
170
85
 
171
- * `Repository` class has been renamed to `Gateway` with proper deprecation
172
- warnings (cflipse)
173
- * `combine` in mapper can be used without a block (kwando)
174
- * `wrap` and `group` in mapper will raise error if `:mapper` is set along with
175
- block or options (vrish88)
176
-
177
- ### Fixed
86
+ - [rom-core] Loading the gem no longer crashes in the absence of `rom` gem (issue #560) (@solnic)
87
+ - [rom] Dependency on `rom-core` was bumped to `>= 5.1.1` (@solnic)
88
+ - [rom-changeset] Dependency on `rom-core` was bumped to `>= 5.1.1` (@solnic)
89
+ - [rom-repository] Dependency on `rom-core` was bumped to `>= 5.1.1` (@solnic)
178
90
 
179
- * `order` memory repository operation sorts tuples containing empty values (nepalez)
180
- * `Mapper::AttributeDSL#embedded` now honors `option[:type]` when used
181
- with `option[:mapper]` (c0)
91
+ [Compare v5.1.0...v5.1.1](https://github.com/rom-rb/rom/compare/v5.1.0...v5.1.1)
182
92
 
183
- [Compare v0.7.1...v0.8.0](https://github.com/rom-rb/rom/compare/v0.7.1...v0.8.0)
93
+ ## 5.1.0 2019-07-30
184
94
 
185
- ## v0.7.1 2015-05-22
186
95
 
187
96
  ### Added
188
97
 
189
- * Support for passing a block for custom coercion to `attribute` (gotar)
190
- * `fold` mapping operation which groups keys from input tuples to array
191
- of values from the first of listed keys (nepalez)
192
- * Adapter `Relation` and command classes can specify `adapter` identifier
193
- which allows using adapter-specific plugins w/o the need to specify adapter
194
- when calling `use` (solnic)
195
-
196
- ### Changed
197
-
198
- * [rom/memory] `restrict` operation supports array as a value (gotar)
199
- * [rom/memory] `restrict` operation supports regexp as a value (gotar)
200
-
201
- [Compare v0.7.0...v0.7.1](https://github.com/rom-rb/rom/compare/v0.7.0...v0.7.1)
98
+ - [rom-core] `ROM::Transformer.map` shortcut for defining transformations (@solnic)
99
+ - [rom-core] `ROM::Transformer` supports instance methods as mapping functions now (@solnic)
100
+ - [rom-core] `ROM::Transformer` configuration can be now inlined ie `relation :users, as: :json_serializer` (@solnic)
101
+ - [rom-changeset] Plugin API :tada: (@solnic)
102
+ - [rom-changeset] Support for `command_options` in changesets for providing any additional command options (@solnic)
103
+ - [rom-changeset] Support for `command_plugins` in changesets for enabling command plugins and configuring them (@solnic)
104
+ - [rom-repository] Plugin API :tada: (@flash-gordon)
202
105
 
203
- ## v0.7.0 2015-05-17
204
-
205
- ### Added
106
+ ### Fixed
206
107
 
207
- * `combine` interface in Relation and Mapper which allows simple and explicit
208
- eager-loading that works with all adapters (solnic)
209
- * `reject_keys` option in mapper which will filter out unspecified keys from
210
- input tuples (solnic)
211
- * `unwrap` mapping operation (aflatter)
212
- * Arbitrary objects can be registered as mappers via `register` in mapping DSL (solnic)
213
- * Ability to reuse existing mappers in `group`, `wrap` and `embedded` mappings (solnic)
214
- * Plugin interface for Relation, Mapper and Command (cflipse)
215
- * `Memory::Dataset` accepts options hash now which makes it more flexible for
216
- any adapter that wants to subclass it (solnic)
217
- * `ROM::Memory::Relation#take` (solnic)
108
+ - [rom-core] Combining same relation multiple times no longer crashes auto-mapping (fixes #547) (@solnic)
109
+ - [rom-core] `ROM::Transformer` works correctly with inheritance (@solnic)
110
+ - [rom-core] `CommandCompiler` supports command options correctly now (@solnic)
218
111
 
219
112
  ### Changed
220
113
 
221
- * [BREAKING] `Command#call` applies curried args first (solnic)
222
- * `Commands::Update#set` was deprecated in favor of `call` (solnic)
223
- * `group` mapping reject empty tuples (solnic)
224
-
225
- ### Fixed
114
+ - [rom-core] Plugin API has been generalized to enable arbitrary component plugins (@flash-gordon)
226
115
 
227
- * `Command` respond to missing properly now (solnic)
228
- * `Mapper::DSL` respond to missing properly now (solnic)
116
+ [Compare v5.0.2...v5.1.0](https://github.com/rom-rb/rom/compare/v5.0.2...v5.1.0)
229
117
 
230
- ### Internal
118
+ ## 5.0.2 2019-05-01
231
119
 
232
- * Fixed all the warnings \o/ (splattael)
233
- * Introduced `Deprecations` helper module (solnic)
234
120
 
235
- [Compare v0.6.2...v0.7.0](https://github.com/rom-rb/rom/compare/v0.6.2...v0.7.0)
121
+ ### Fixed
236
122
 
237
- ## v0.6.2 2015-04-14
123
+ - [rom-core] Forwarding to `root` in `Relation::Combined` behaves as expected when another combined relation was returned from the root (issue #525) (solnic)
124
+ - [rom-core] Specifying attribute options as the third argument in `attribute` DSL works again (issue #540) (solnic)
238
125
 
239
126
  ### Changed
240
127
 
241
- * Updated to transproc 0.2.0 (solnic)
242
-
243
- ### Fixed
128
+ - [rom] Dependency on `rom-core` was bumped to `~> 5.0`, `>= 5.0.2` (solnic)
129
+ - [rom] Dependency on `rom-changeset` was bumped to `~> 5.0`, `>= 5.0.1` (solnic)
130
+ - [rom-changeset] `Relation::Combined#changeset` will raise a meaningful `NotImplementedError` now (solnic)
131
+ - [rom-changeset] Passing an array to `Changeset#associate` will raise a meaningful `NotImplementedError` now (solnic)
244
132
 
245
- * `CommandRegistry#respond_to_missing?` behavior (hecrj)
133
+ [Compare v5.0.1...v5.0.2](https://github.com/rom-rb/rom/compare/v5.0.1...v5.0.2)
246
134
 
247
- [Compare v0.6.1...v0.6.2](https://github.com/rom-rb/rom/compare/v0.6.1...v0.6.2)
135
+ ## 5.0.1 2019-04-24
248
136
 
249
- ## v0.6.1 2015-04-04
250
137
 
251
- ### Added
138
+ ### Fixed
252
139
 
253
- * Ability to auto-map command result via `rom.command(:rel_name).as(:mapper_name)` (solnic)
140
+ - [rom-core] Missing dependency on `transproc` was added (solnic)
254
141
 
255
142
  ### Changed
256
143
 
257
- * gemspec no longer specifies required_ruby_version so that rom can be installed on jruby (solnic)
258
- * Obsolete `Env#readers` was removed (splattael)
144
+ - [rom] Dependency on `rom-core` was bumped to `~> 5.0`, `>= 5.0.1` (solnic)
259
145
 
260
- [Compare v0.6.0...v0.6.1](https://github.com/rom-rb/rom/compare/v0.6.0...v0.6.1)
146
+ [Compare v5.0.0...v5.0.1](https://github.com/rom-rb/rom/compare/v5.0.0...v5.0.1)
261
147
 
262
- ## v0.6.0 2015-03-22
263
-
264
- ### Added
148
+ ## 5.0.0 2019-04-24
265
149
 
266
- * It is now possible to define custom relation, mapper and command classes during setup (solnic)
267
- * New `Env#relation` interface for reading and mapping relations which supports:
268
- * `Relation::Lazy` with auto-currying, mapping and composition features (solnic)
269
- * `Relation::Composite` allowing data-pipelining with arbitrary objects (solnic)
270
- * Passing a block which yields relation with adapter query DSL available (solnic)
271
- * Relations can be extended with plugins using Options API (solnic)
272
- * Commands are now composable via `>>` operator (solnic)
273
- * Mappers support `prefix_separator` option (solnic)
274
- * Mappers can be registered under custom names (solnic)
275
- * Relation `dataset` name is inferred from the class name by default (gotar)
276
- * Relation can be registered under a custom name via `register_as` option (mcls)
277
- * Adapters can use helper modules for datasets: `ArrayDataset` and `EnumerableDataset` (solnic)
278
- * Adapter interface can now be tested via a lint test (elskwid + solnic + splattael)
279
- * `tuple_count` interface in AbstractCommand which can be overridden by adapter (solnic)
280
- * Custom Inflector API that auto-detects a specific inflection engine (mjtko)
281
150
 
282
151
  ### Changed
283
152
 
284
- * [BREAKING] Schema DSL was **removed** - attributes can be specified only in mapper DSL
285
- * [BREAKING] Reader was **removed** in favor of relation interface with explicit mapping (solnic)
286
- * [BREAKING] Command API was simplified - commands should be accessed directly in `.try` block
287
- and default repository can be changed when defining a relation (solnic)
288
- * `.setup` interface requires either an adapter identifier or can accept a repository
289
- instance (aflatter)
290
- * Adapter interface no longer requires specific constructor to be defined (aflatter)
291
- * Adapters no longer need to handle connection URIs (aflatter)
292
- * Adapter/Repository has been collapsed to *just* `Repository` (solnic)
293
- * Relation no longer needs a header object and only operates on an adapters dataset (solnic)
294
- * Relation no longer uses on Charlatan with method_missing magic (solnic)
295
- * Adapter's dataset no longer requires header (solnic)
296
- * Make storage in memory adapter thread-safe #110 (splattael)
297
- * An Adapter can provide its own Relation subclass with custom behavior (solnic)
298
- * Relation provides its "public interface" using method_added hook (splattael + solnic)
299
- * ROM no longer depends on charlatan, concord and inflecto gems (mjtko + solnic)
300
-
301
- [Compare v0.5.0...v0.6.0](https://github.com/rom-rb/rom/compare/v0.5.0...v0.6.0)
302
-
303
- ## v0.5.0 2014-12-31
153
+ - `rom-core` bumped to `5.0.0` (solnic)
154
+ - `rom-changeset` bumped to `5.0.0` (solnic)
155
+ - `rom-repository` bumped to `5.0.0` (solnic)
156
+ - `rom-mapper` was moved to `core` under `rom/mapper` so it's no longer a runtime dependency (solnic)
157
+ - [rom-core] [BREAKING] `Types::Int` is now `Types::Integer` (flash-gordon)
158
+ - [rom-core] [BREAKING] Attribute aliases are no longer stored in attribute's type meta (waiting-for-dev)
159
+ - [rom-core] Updated to work with `dry-types 1.0.0` (flash-gordon)
160
+ - [rom-core] Updated to work with `dry-struct 1.0.0` (flash-gordon)
161
+ - [rom-core] Updated to work with `dry-initializer 3.0.0` (solnic)
162
+ - [rom-repository] [BREAKING] Support for ruby <= `2.4` was dropped (flash-gordon)
163
+ - [rom-repository] [BREAKING] `Repository::Root#aggregate` was removed in favor of `Relation#combine` (v-kolesnikov)
304
164
 
305
- ### Added
165
+ [Compare v4.2.1...v5.0.0](https://github.com/rom-rb/rom/compare/v4.2.1...v5.0.0)
166
+
167
+ ## 4.2.1 2018-05-03
306
168
 
307
- * Mapper DSL supports `embedded` interface for nested tuples (solnic)
308
- * Support for nested `group` mapping (solnic)
309
- * Support for nested `wrap` mapping (solnic)
310
- * Support for primitive type coercions (:to_string, :to_integer etc.) (solnic)
311
- * Support for top-level `:prefix` option in mapping DSL (solnic)
312
- * Support for top-level `:symbolize_keys` option in mapping DSL (solnic)
313
- * Support for `:prefix` option in wrap/group mapping DSL (solnic)
314
- * Interface for registering data mapping processors (solnic)
315
- * Remaining relations are automatically setup from the schema (solnic)
316
- * Each relation has now access to other relations (previously they only had
317
- access to raw datasets) (solnic)
318
- * `ROM.setup` supports passing in *just an uri* which will setup a default repository (solnic)
319
- * `ROM.setup` supports passing in conventional database connection hash (solnic)
320
- * Adapters support extra options in addition to the base connection URI (solnic)
321
169
 
322
170
  ### Changed
323
171
 
324
- * Mapping backend replaced by integration with transproc (solnic)
325
- * Readers no longer expose adapter query DSL (solnic)
326
- * Registry objects raise `ROM::Registry::ElementNotFoundError` when missing
327
- element is referenced (rather than raw KeyError) (solnic)
328
- * Performance improvements in Reader (solnic)
329
- * `ROM::RA` was merged into in-memory adapter as this fits there perfectly (solnic)
330
- * It is no longer needed to explicitly execute a delete command in try block (solnic)
172
+ - `rom-core` updated to `['~> 4.2', '>= 4.2.1']`
331
173
 
332
- ### Fixed
174
+ [Compare v4.2.0...v4.2.1](https://github.com/rom-rb/rom/compare/v4.2.0...v4.2.1)
333
175
 
334
- * Wrap/group skips empty tuples now (solnic)
335
- * Readers raise a meaningful error when relation is missing (solnic)
176
+ ## 4.2.0 2018-03-29
336
177
 
337
- ## Internal
338
178
 
339
- * Massive code clean-up and rubocop integration (chastell)
340
- * Refactored `Reader` and mapper-specific logic into `MapperRegistry` (solnic)
179
+ ### Changed
341
180
 
342
- [Compare v0.4.2...v0.5.0](https://github.com/rom-rb/rom/compare/v0.4.2...v0.5.0)
181
+ - [rom] `rom-core` updated to `['~> 4.2', '>= 4.2.0']`
182
+ - [rom] `rom-changeset` updated to `['~> 1.0', '>= 1.0.2']`
343
183
 
344
- ## v0.4.2 2014-12-19
184
+ [Compare v4.1.3...v4.2.0](https://github.com/rom-rb/rom/compare/v4.1.3...v4.2.0)
345
185
 
346
- ### Added
186
+ ## 4.1.3 2018-02-03
347
187
 
348
- * Mappers support tuple transformation using wrap and group operations (solnic)
349
- * PORO model builder supports namespaced constants via `name: 'MyApp:Entities::User` (solnic)
350
188
 
351
189
  ### Changed
352
190
 
353
- * `ROM::RA` interface is no longer mixed into relations by default (solnic)
354
- * ~2.5 x speed up in aggregate mapping (solnic)
355
- * PORO model builder only defines attribute readers now (no writers!) (solnic)
356
- * Registry objects in Env will now raise `KeyError` when unknown name is referenced (solnic)
357
-
358
- [Compare v0.4.1...v0.4.2](https://github.com/rom-rb/rom/compare/v0.4.1...v0.4.2)
191
+ - [rom] `rom-core` updated to `['~> 4.1', '>= 4.1.3']`
359
192
 
360
- ## v0.4.1 2014-12-15
193
+ [Compare v4.1.2...v4.1.3](https://github.com/rom-rb/rom/compare/v4.1.2...v4.1.3)
361
194
 
362
- ### Added
195
+ ## 4.1.2 2018-01-15
363
196
 
364
- * Adapter can now implement `Adapter#dataset(name, header)` to return a dataset (solnic)
365
- * For multi-step setup the DSL is available in `ROM` too (solnic)
366
- * Global environment can be stored via `ROM.finalize` and accessible via `ROM.env` (solnic)
367
- * Mapper won't infer attributes from the header if `:inherit_header` option is set to false (solnic)
368
197
 
369
198
  ### Changed
370
199
 
371
- * Schema can be defined in multiple steps (solnic)
372
- * Setting model in mapper DSL is no longer required and defaults to `Hash` (solnic)
373
- * Adapter datasets no longer have to return headers when they are provided by schema (solnic)
374
-
375
- [Compare v0.4.0...v0.4.1](https://github.com/rom-rb/rom/compare/v0.4.0...v0.4.1)
200
+ - [rom] `rom-core` updated to `['~> 4.1', '>= 4.1.1']`
376
201
 
377
- ## v0.4.0 2014-12-06
202
+ [Compare v4.1.1...v4.1.2](https://github.com/rom-rb/rom/compare/v4.1.1...v4.1.2)
378
203
 
379
- ### Added
380
-
381
- * Command API (solnic)
382
- * Setup DSL is now available within the `ROM.setup` block (solnic)
383
- * Support for setting up a logger for an adapter (solnic)
384
- * New `Adapter#dataset?(name)` which every adapter must implement (solnic)
385
-
386
- ### Fixed
204
+ ## 4.1.1 2017-12-01
387
205
 
388
- * method-missing in `Repository` and `Env` kindly calls `super` (solnic)
389
206
 
390
207
  ### Changed
391
208
 
392
- * Abstract `Adapter` defines `:connection` reader so it doesn't have to be
393
- defined in adapter descendants (solnic)
209
+ - [rom] `rom-repository` updated to `['~> 2.0', '>= 2.0.2']`
394
210
 
395
- [Compare v0.3.1...v0.4.0](https://github.com/rom-rb/rom/compare/v0.3.1...v0.4.0)
211
+ [Compare v4.1.0...v4.1.1](https://github.com/rom-rb/rom/compare/v4.1.0...v4.1.1)
396
212
 
397
- ## v0.3.1 2014-11-25
213
+ ## 4.1.0 2017-11-17
398
214
 
399
- ### Added
400
215
 
401
- * attributes for `group` mapping operation can be specified without options (solnic)
402
- * attributes for `wrap` mapping operation can be specified without options (solnic)
403
- * `Env` uses Equalizer (solnic)
404
- * boot dsl methods return self (solnic)
216
+ ### Changed
405
217
 
406
- ### Fixed
218
+ - [rom] `rom-core` updated to `['~> 4.1']`
219
+ - [rom] `rom-mapper` updated to `'~> 1.1'`
407
220
 
408
- * when schema is missing booting will gracefuly skip building relations and mappers (solnic)
409
- * in-memory join handles one-to-many and many-to-one correctly (solnic)
221
+ [Compare v4.0.3...v4.1.0](https://github.com/rom-rb/rom/compare/v4.0.3...v4.1.0)
410
222
 
411
- [Compare v0.3.0...v0.3.1](https://github.com/rom-rb/rom/compare/v0.3.0...v0.3.1)
223
+ ## 4.0.3 2017-11-14
412
224
 
413
- ## v0.3.0 2014-11-24
414
225
 
415
- This version is a rewrite that introduces a new, simplified architecture based
416
- on a new adapter interface.
226
+ ### Changed
417
227
 
418
- [Compare v0.2.0...v0.3.0](https://github.com/rom-rb/rom/compare/v0.2.0...v0.3.0)
228
+ - [rom] `rom-core` updated to `['~> 4.0', '>= 4.0.3']`
419
229
 
420
- ## v0.2.0 2014-04-06
230
+ [Compare v4.0.2...v4.0.3](https://github.com/rom-rb/rom/compare/v4.0.2...v4.0.3)
421
231
 
422
- ### Added
232
+ ## 4.0.2 2017-11-02
423
233
 
424
- * [feature] added :rename option to schema attribute DSL (solnic)
425
- * [feature] added support for join, group, wrap, project and rename operations (solnic)
426
- * [feature] added support for setting domain object loading strategy (solnic)
427
- * [feature] Environment.setup can be used with a block to define schema and mapping (solnic)
428
- * [feature] added public interface for building mappers (see Mapper.build) (solnic)
429
- * [feature] added support for mapping embedded objects using wrap/group (solnic)
430
- * [feature] environment exposes mapper registry via Environment#mappers (solnic)
431
234
 
432
235
  ### Changed
433
236
 
434
- * [BREAKING] rom-relation, rom-mapper and rom-session were merged into rom project (solnic)
435
- * [BREAKING] changed mapping DSL (users do...end => relation(:users) do...end) (solnic)
436
- * [BREAKING] added :from option to mapping DSL which replaced :to (solnic)
437
- * [internal] mappers are now backed by [morpher](https://github.com/mbj/morpher) (solnic)
438
- * [internal] renaming and optimizing relations happens on the schema level now (solnic)
439
- * [internal] environment will raise if unknown relation is referenced via `Environment#[]` (solnic)
440
-
441
- [Compare v0.1.2...v0.2.0](https://github.com/rom-rb/rom/compare/v0.1.2...v0.2.0)
237
+ - [rom] `rom-core` updated to `['~> 4.0', '>= 4.0.2']`
238
+ - [rom] `rom-mapper` updated to `['~> 1.0', '>= 1.0.2']`
239
+ - [rom] `rom-changeset` updated to `['~> 1.0', '>= 1.0.1']`
240
+ - [rom] `rom-repository` updated to `['~> 2.0', '>= 2.0.1']`
442
241
 
443
- ## v0.1.2 2013-09-02
242
+ [Compare v4.0.1...v4.0.2](https://github.com/rom-rb/rom/compare/v4.0.1...v4.0.2)
444
243
 
445
- * [updated] [rom-relation](https://github.com/rom-rb/rom-relation/blob/v0.1.2/Changelog.md#v012-2013-09-02)
244
+ ## 4.0.1 2017-10-22
446
245
 
447
- [Compare v0.1.1...v0.1.2](https://github.com/rom-rb/rom/compare/v0.1.1...v0.1.2)
448
246
 
449
- ## v0.1.1 2013-08-30
247
+ ### Changed
450
248
 
451
- * [updated] [rom-relation](https://github.com/rom-rb/rom-relation/blob/v0.1.1/Changelog.md#v011-2013-08-30)
452
- * [updated] [rom-session](https://github.com/rom-rb/rom-session/blob/v0.1.1/Changelog.md#v011-2013-08-30)
249
+ - [rom] `rom-core` updated to `['~> 4.0', '>= 4.0.1']`
250
+ - [rom] `rom-mapper` updated to `['~> 1.0', '>= 1.0.1']`
453
251
 
454
- [Compare v0.1.0...v0.1.1](https://github.com/rom-rb/rom/compare/v0.1.0...v0.1.1)
252
+ [Compare v4.0.0...v4.0.1](https://github.com/rom-rb/rom/compare/v4.0.0...v4.0.1)
455
253
 
456
- ## v0.1.0 2013-08-23
254
+ ## 4.0.0 2017-10-18
457
255
 
458
- First public release
256
+ This release turns `rom` gem into a meta gem which depends on `rom-core`, `rom-mapper`, `rom-repository` and `rom-changeset'`. See [CHANGELOG](https://github.com/rom-rb/rom/blob/master/core/CHANGELOG.md#v400-2017-10-18) in core for more information.