rom 3.3.3 → 4.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (241) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +2 -599
  3. data/lib/rom/version.rb +1 -1
  4. data/lib/rom.rb +3 -44
  5. metadata +19 -295
  6. data/.gitignore +0 -24
  7. data/.rspec +0 -3
  8. data/.rubocop.yml +0 -87
  9. data/.rubocop_todo.yml +0 -46
  10. data/.travis.yml +0 -24
  11. data/.yardopts +0 -2
  12. data/CODE_OF_CONDUCT.md +0 -13
  13. data/CONTRIBUTING.md +0 -1
  14. data/Gemfile +0 -54
  15. data/Guardfile +0 -24
  16. data/Rakefile +0 -28
  17. data/lib/rom/array_dataset.rb +0 -44
  18. data/lib/rom/association_set.rb +0 -49
  19. data/lib/rom/auto_curry.rb +0 -55
  20. data/lib/rom/command.rb +0 -494
  21. data/lib/rom/command_registry.rb +0 -148
  22. data/lib/rom/commands/class_interface.rb +0 -270
  23. data/lib/rom/commands/composite.rb +0 -53
  24. data/lib/rom/commands/create.rb +0 -13
  25. data/lib/rom/commands/delete.rb +0 -14
  26. data/lib/rom/commands/graph/builder.rb +0 -176
  27. data/lib/rom/commands/graph/class_interface.rb +0 -62
  28. data/lib/rom/commands/graph/input_evaluator.rb +0 -62
  29. data/lib/rom/commands/graph.rb +0 -95
  30. data/lib/rom/commands/lazy/create.rb +0 -23
  31. data/lib/rom/commands/lazy/delete.rb +0 -27
  32. data/lib/rom/commands/lazy/update.rb +0 -34
  33. data/lib/rom/commands/lazy.rb +0 -99
  34. data/lib/rom/commands/result.rb +0 -96
  35. data/lib/rom/commands/update.rb +0 -14
  36. data/lib/rom/commands.rb +0 -3
  37. data/lib/rom/configuration.rb +0 -90
  38. data/lib/rom/configuration_dsl/command.rb +0 -41
  39. data/lib/rom/configuration_dsl/command_dsl.rb +0 -35
  40. data/lib/rom/configuration_dsl/mapper.rb +0 -36
  41. data/lib/rom/configuration_dsl/mapper_dsl.rb +0 -43
  42. data/lib/rom/configuration_dsl/relation.rb +0 -26
  43. data/lib/rom/configuration_dsl.rb +0 -107
  44. data/lib/rom/configuration_plugin.rb +0 -17
  45. data/lib/rom/constants.rb +0 -36
  46. data/lib/rom/container.rb +0 -233
  47. data/lib/rom/create_container.rb +0 -60
  48. data/lib/rom/data_proxy.rb +0 -94
  49. data/lib/rom/enumerable_dataset.rb +0 -68
  50. data/lib/rom/environment.rb +0 -70
  51. data/lib/rom/gateway.rb +0 -196
  52. data/lib/rom/global/plugin_dsl.rb +0 -47
  53. data/lib/rom/global.rb +0 -58
  54. data/lib/rom/initializer.rb +0 -26
  55. data/lib/rom/lint/enumerable_dataset.rb +0 -54
  56. data/lib/rom/lint/gateway.rb +0 -120
  57. data/lib/rom/lint/linter.rb +0 -78
  58. data/lib/rom/lint/spec.rb +0 -20
  59. data/lib/rom/lint/test.rb +0 -98
  60. data/lib/rom/mapper_registry.rb +0 -35
  61. data/lib/rom/memory/commands.rb +0 -56
  62. data/lib/rom/memory/dataset.rb +0 -97
  63. data/lib/rom/memory/gateway.rb +0 -64
  64. data/lib/rom/memory/relation.rb +0 -62
  65. data/lib/rom/memory/schema.rb +0 -13
  66. data/lib/rom/memory/storage.rb +0 -59
  67. data/lib/rom/memory/types.rb +0 -9
  68. data/lib/rom/memory.rb +0 -4
  69. data/lib/rom/pipeline.rb +0 -122
  70. data/lib/rom/plugin.rb +0 -20
  71. data/lib/rom/plugin_base.rb +0 -40
  72. data/lib/rom/plugin_registry.rb +0 -173
  73. data/lib/rom/plugins/command/schema.rb +0 -37
  74. data/lib/rom/plugins/configuration/configuration_dsl.rb +0 -21
  75. data/lib/rom/plugins/relation/instrumentation.rb +0 -51
  76. data/lib/rom/plugins/relation/key_inference.rb +0 -48
  77. data/lib/rom/plugins/relation/registry_reader.rb +0 -33
  78. data/lib/rom/registry.rb +0 -50
  79. data/lib/rom/relation/class_interface.rb +0 -356
  80. data/lib/rom/relation/composite.rb +0 -46
  81. data/lib/rom/relation/curried.rb +0 -109
  82. data/lib/rom/relation/graph.rb +0 -125
  83. data/lib/rom/relation/loaded.rb +0 -127
  84. data/lib/rom/relation/materializable.rb +0 -66
  85. data/lib/rom/relation/name.rb +0 -102
  86. data/lib/rom/relation/view_dsl.rb +0 -64
  87. data/lib/rom/relation.rb +0 -250
  88. data/lib/rom/relation_registry.rb +0 -9
  89. data/lib/rom/schema/attribute.rb +0 -390
  90. data/lib/rom/schema/dsl.rb +0 -67
  91. data/lib/rom/schema.rb +0 -407
  92. data/lib/rom/setup/auto_registration.rb +0 -74
  93. data/lib/rom/setup/auto_registration_strategies/base.rb +0 -16
  94. data/lib/rom/setup/auto_registration_strategies/custom_namespace.rb +0 -63
  95. data/lib/rom/setup/auto_registration_strategies/no_namespace.rb +0 -20
  96. data/lib/rom/setup/auto_registration_strategies/with_namespace.rb +0 -18
  97. data/lib/rom/setup/finalize/finalize_commands.rb +0 -47
  98. data/lib/rom/setup/finalize/finalize_mappers.rb +0 -36
  99. data/lib/rom/setup/finalize/finalize_relations.rb +0 -83
  100. data/lib/rom/setup/finalize.rb +0 -152
  101. data/lib/rom/setup.rb +0 -65
  102. data/lib/rom/support/configurable.rb +0 -85
  103. data/lib/rom/transaction.rb +0 -24
  104. data/lib/rom/types.rb +0 -49
  105. data/log/.gitkeep +0 -0
  106. data/rakelib/benchmark.rake +0 -15
  107. data/rakelib/mutant.rake +0 -19
  108. data/rakelib/rubocop.rake +0 -18
  109. data/rom.gemspec +0 -25
  110. data/spec/fixtures/app/commands/create_user.rb +0 -2
  111. data/spec/fixtures/app/mappers/user_list.rb +0 -2
  112. data/spec/fixtures/app/my_commands/create_user.rb +0 -2
  113. data/spec/fixtures/app/my_mappers/user_list.rb +0 -2
  114. data/spec/fixtures/app/my_relations/users.rb +0 -2
  115. data/spec/fixtures/app/relations/users.rb +0 -2
  116. data/spec/fixtures/custom/commands/create_user.rb +0 -6
  117. data/spec/fixtures/custom/mappers/user_list.rb +0 -6
  118. data/spec/fixtures/custom/relations/users.rb +0 -6
  119. data/spec/fixtures/custom_namespace/commands/create_customer.rb +0 -8
  120. data/spec/fixtures/custom_namespace/mappers/customer_list.rb +0 -8
  121. data/spec/fixtures/custom_namespace/relations/customers.rb +0 -8
  122. data/spec/fixtures/lib/persistence/commands/create_user.rb +0 -6
  123. data/spec/fixtures/lib/persistence/mappers/user_list.rb +0 -6
  124. data/spec/fixtures/lib/persistence/my_commands/create_user.rb +0 -6
  125. data/spec/fixtures/lib/persistence/my_mappers/user_list.rb +0 -6
  126. data/spec/fixtures/lib/persistence/my_relations/users.rb +0 -6
  127. data/spec/fixtures/lib/persistence/relations/users.rb +0 -6
  128. data/spec/fixtures/wrong/commands/create_customer.rb +0 -8
  129. data/spec/fixtures/wrong/mappers/customer_list.rb +0 -8
  130. data/spec/fixtures/wrong/relations/customers.rb +0 -8
  131. data/spec/integration/command_registry_spec.rb +0 -47
  132. data/spec/integration/commands/create_spec.rb +0 -157
  133. data/spec/integration/commands/delete_spec.rb +0 -67
  134. data/spec/integration/commands/error_handling_spec.rb +0 -25
  135. data/spec/integration/commands/graph_builder_spec.rb +0 -213
  136. data/spec/integration/commands/graph_spec.rb +0 -294
  137. data/spec/integration/commands/update_spec.rb +0 -86
  138. data/spec/integration/commands_spec.rb +0 -67
  139. data/spec/integration/gateways/extending_relations_spec.rb +0 -58
  140. data/spec/integration/gateways/setting_logger_spec.rb +0 -34
  141. data/spec/integration/mappers/combine_spec.rb +0 -117
  142. data/spec/integration/mappers/deep_embedded_spec.rb +0 -44
  143. data/spec/integration/mappers/definition_dsl_spec.rb +0 -206
  144. data/spec/integration/mappers/embedded_spec.rb +0 -62
  145. data/spec/integration/mappers/exclude_spec.rb +0 -27
  146. data/spec/integration/mappers/fold_spec.rb +0 -71
  147. data/spec/integration/mappers/group_spec.rb +0 -163
  148. data/spec/integration/mappers/overwrite_attributes_value_spec.rb +0 -51
  149. data/spec/integration/mappers/prefix_separator_spec.rb +0 -52
  150. data/spec/integration/mappers/prefix_spec.rb +0 -48
  151. data/spec/integration/mappers/prefixing_attributes_spec.rb +0 -37
  152. data/spec/integration/mappers/registering_custom_mappers_spec.rb +0 -28
  153. data/spec/integration/mappers/renaming_attributes_spec.rb +0 -125
  154. data/spec/integration/mappers/reusing_mappers_spec.rb +0 -43
  155. data/spec/integration/mappers/step_spec.rb +0 -119
  156. data/spec/integration/mappers/symbolizing_attributes_spec.rb +0 -77
  157. data/spec/integration/mappers/unfold_spec.rb +0 -92
  158. data/spec/integration/mappers/ungroup_spec.rb +0 -126
  159. data/spec/integration/mappers/unwrap_spec.rb +0 -93
  160. data/spec/integration/mappers/wrap_spec.rb +0 -155
  161. data/spec/integration/memory/commands/create_spec.rb +0 -23
  162. data/spec/integration/memory/commands/delete_spec.rb +0 -23
  163. data/spec/integration/memory/commands/update_spec.rb +0 -23
  164. data/spec/integration/multi_env_spec.rb +0 -69
  165. data/spec/integration/multi_repo_spec.rb +0 -46
  166. data/spec/integration/relations/default_dataset_spec.rb +0 -38
  167. data/spec/integration/relations/inheritance_spec.rb +0 -37
  168. data/spec/integration/relations/reading_spec.rb +0 -169
  169. data/spec/integration/relations/registry_dsl_spec.rb +0 -45
  170. data/spec/integration/setup_spec.rb +0 -193
  171. data/spec/shared/command_behavior.rb +0 -28
  172. data/spec/shared/command_graph.rb +0 -54
  173. data/spec/shared/container.rb +0 -9
  174. data/spec/shared/enumerable_dataset.rb +0 -52
  175. data/spec/shared/gateway_only.rb +0 -6
  176. data/spec/shared/materializable.rb +0 -36
  177. data/spec/shared/no_container.rb +0 -16
  178. data/spec/shared/one_behavior.rb +0 -26
  179. data/spec/shared/proxy.rb +0 -0
  180. data/spec/shared/users_and_tasks.rb +0 -10
  181. data/spec/spec_helper.rb +0 -59
  182. data/spec/support/constant_leak_finder.rb +0 -14
  183. data/spec/support/mutant.rb +0 -10
  184. data/spec/support/schema.rb +0 -14
  185. data/spec/support/types.rb +0 -5
  186. data/spec/test/memory_repository_lint_test.rb +0 -27
  187. data/spec/unit/rom/array_dataset_spec.rb +0 -59
  188. data/spec/unit/rom/association_set_spec.rb +0 -48
  189. data/spec/unit/rom/auto_curry_spec.rb +0 -71
  190. data/spec/unit/rom/commands/graph_spec.rb +0 -192
  191. data/spec/unit/rom/commands/lazy_spec.rb +0 -310
  192. data/spec/unit/rom/commands/pre_and_post_processors_spec.rb +0 -343
  193. data/spec/unit/rom/commands/result_spec.rb +0 -70
  194. data/spec/unit/rom/commands_spec.rb +0 -188
  195. data/spec/unit/rom/configurable_spec.rb +0 -49
  196. data/spec/unit/rom/configuration_spec.rb +0 -61
  197. data/spec/unit/rom/container_spec.rb +0 -109
  198. data/spec/unit/rom/create_container_spec.rb +0 -151
  199. data/spec/unit/rom/enumerable_dataset_spec.rb +0 -15
  200. data/spec/unit/rom/environment_spec.rb +0 -123
  201. data/spec/unit/rom/gateway_spec.rb +0 -146
  202. data/spec/unit/rom/mapper_registry_spec.rb +0 -25
  203. data/spec/unit/rom/memory/commands_spec.rb +0 -43
  204. data/spec/unit/rom/memory/dataset_spec.rb +0 -31
  205. data/spec/unit/rom/memory/gateway_spec.rb +0 -12
  206. data/spec/unit/rom/memory/inheritance_spec.rb +0 -32
  207. data/spec/unit/rom/memory/relation_spec.rb +0 -121
  208. data/spec/unit/rom/memory/storage_spec.rb +0 -45
  209. data/spec/unit/rom/plugin_spec.rb +0 -150
  210. data/spec/unit/rom/plugins/command/schema_spec.rb +0 -66
  211. data/spec/unit/rom/plugins/relation/instrumentation_spec.rb +0 -44
  212. data/spec/unit/rom/plugins/relation/key_inference_spec.rb +0 -85
  213. data/spec/unit/rom/registry_spec.rb +0 -86
  214. data/spec/unit/rom/relation/attribute_reader_spec.rb +0 -17
  215. data/spec/unit/rom/relation/call_spec.rb +0 -51
  216. data/spec/unit/rom/relation/composite_spec.rb +0 -106
  217. data/spec/unit/rom/relation/curried_spec.rb +0 -67
  218. data/spec/unit/rom/relation/graph_spec.rb +0 -106
  219. data/spec/unit/rom/relation/lazy/combine_spec.rb +0 -165
  220. data/spec/unit/rom/relation/lazy/graph_spec.rb +0 -165
  221. data/spec/unit/rom/relation/lazy_spec.rb +0 -214
  222. data/spec/unit/rom/relation/loaded_spec.rb +0 -53
  223. data/spec/unit/rom/relation/name_spec.rb +0 -58
  224. data/spec/unit/rom/relation/output_schema_spec.rb +0 -28
  225. data/spec/unit/rom/relation/schema_spec.rb +0 -259
  226. data/spec/unit/rom/relation/view_spec.rb +0 -158
  227. data/spec/unit/rom/relation_spec.rb +0 -252
  228. data/spec/unit/rom/schema/accessing_attributes_spec.rb +0 -52
  229. data/spec/unit/rom/schema/append_spec.rb +0 -17
  230. data/spec/unit/rom/schema/exclude_spec.rb +0 -15
  231. data/spec/unit/rom/schema/finalize_spec.rb +0 -59
  232. data/spec/unit/rom/schema/key_predicate_spec.rb +0 -15
  233. data/spec/unit/rom/schema/merge_spec.rb +0 -17
  234. data/spec/unit/rom/schema/prefix_spec.rb +0 -16
  235. data/spec/unit/rom/schema/project_spec.rb +0 -15
  236. data/spec/unit/rom/schema/rename_spec.rb +0 -22
  237. data/spec/unit/rom/schema/type_spec.rb +0 -49
  238. data/spec/unit/rom/schema/uniq_spec.rb +0 -21
  239. data/spec/unit/rom/schema/wrap_spec.rb +0 -18
  240. data/spec/unit/rom/schema_spec.rb +0 -10
  241. data/spec/unit/rom/setup/auto_registration_spec.rb +0 -214
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6668c7efb86e5ea164b03271cedf244574e9bde7
4
- data.tar.gz: 2a7403db878177957d12db58803a0e8acda09fea
3
+ metadata.gz: 304e3537705e77485f4f27c58c27698057461759
4
+ data.tar.gz: 8a4bcd904982f455a99449acdef956924b564375
5
5
  SHA512:
6
- metadata.gz: 4dc7c86d402ca351d91da62a1c4b2d24ce2f0b9203ed021ebe5a80943e9c0ad145b85502ec3b787d99f98793ba9488a726586f9523b9cbc0d7ec84e40e81450d
7
- data.tar.gz: 6effb40c6e224f3a9eb398bff9a984b521559dbbb3103b3d3c7f389d367e3e8b45f0f68657a546fcc98ce09ba2fe63de59cd11e0172a92dac49ce4dcf7140856
6
+ metadata.gz: 60487759bd9bc6efb078b8effa92347be83fd1e4de7e89c35c7b686e46b6be85a2288d2c2e0cc644cca3dbd191876a8b31f1a852b1e2a996c488f7ec2894bed2
7
+ data.tar.gz: 6da1684c51c9ade0d97df4c285ec88bea58261eb627c2da8ca05163428b4dcb0008bafa560d552d4dd086a5010489c47c82e796d2714286dd620afd6b352345b
data/CHANGELOG.md CHANGED
@@ -1,600 +1,3 @@
1
- # v3.3.3 2017-10-19
1
+ # 4.0.0 to-be-released
2
2
 
3
- ### Fixed
4
-
5
- * Fix warnings issued by redefining JSON types (graywolf)
6
-
7
- [Compare v3.3.2...v3.3.3](https://github.com/rom-rb/rom/compare/v3.3.2...v3.3.3)
8
-
9
- # v3.3.2 2017-10-14
10
-
11
- ### Fixed
12
-
13
- * Delegate private method calls in composite relations (flash-gordon)
14
-
15
- [Compare v3.3.1...v3.3.2](https://github.com/rom-rb/rom/compare/v3.3.1...v3.3.2)
16
-
17
- # v3.3.1 2017-07-09
18
-
19
- ### Fixed
20
-
21
- * `Relation#map_with` works with custom mappers (solnic)
22
-
23
- [Compare v3.3.0...v3.3.1](https://github.com/rom-rb/rom/compare/v3.3.0...v3.3.1)
24
-
25
- # v3.3.0 2017-07-05
26
-
27
- This release only adds deprecation warnings in preparation for rom 4.0 release.
28
-
29
- [Compare v3.2.3...v3.3.0](https://github.com/rom-rb/rom/compare/v3.2.3...v3.3.0)
30
-
31
- # v3.2.3 2017-05-31
32
-
33
- ## Added
34
-
35
- * auto-registration was improved with better handling of custom namespaces (Krule)
36
-
37
- ## Changed
38
-
39
- * `Relation#combine` was deprecated in favor of `Relation#graph` (solnic)
40
-
41
- [Compare v3.2.2...v3.2.3](https://github.com/rom-rb/rom/compare/v3.2.2...v3.2.3)
42
-
43
- # v3.2.2 2017-05-05
44
-
45
- ## Changed
46
-
47
- * [internal] Compatibility with `dry-core` v0.3.0 (flash-gordon)
48
-
49
- [Compare v3.2.1...v3.2.2](https://github.com/rom-rb/rom/compare/v3.2.1...v3.2.2)
50
-
51
- # v3.2.1 2017-05-02
52
-
53
- ## Changed
54
-
55
- * [internal] `ROM::Schema::Attribute` uses `Initializer` now (flash-gordon)
56
-
57
- [Compare v3.2.0...v3.2.1](https://github.com/rom-rb/rom/compare/v3.2.0...v3.2.1)
58
-
59
- # v3.2.0 2017-03-25
60
-
61
- ## Changed
62
-
63
- * `dry-initializer` was updated to `1.3`, this is a minor change, but leads to some incompatibilities with existing adapters, hence `3.2.0` shall be released (flash-gordon)
64
-
65
- [Compare v3.1.0...v3.2.0](https://github.com/rom-rb/rom/compare/v3.1.0...v3.2.0)
66
-
67
- # v3.1.0 2017-03-01
68
-
69
- ## Added
70
-
71
- * New configuration DSL for configuring plugins (solnic)
72
- * Instrumentation plugin for relations (solnic)
73
- * New `ROM::Relation::Loaded#empty?` method (solnic)
74
- * New `ROM::Relation::Graph#with_nodes` which returns a new graph with new nodes (solnic)
75
- * New `ROM::Schema#empty` which returns an empty schema (solnic)
76
-
77
- [Compare v3.0.3...v3.1.0](https://github.com/rom-rb/rom/compare/v3.0.3...v3.1.0)
78
-
79
- # v3.0.3 2017-02-24
80
-
81
- ## Fixed
82
-
83
- * Curried relations when called without args while having some args filled in will return itself (solnic)
84
-
85
- [Compare v3.0.2...v3.0.3](https://github.com/rom-rb/rom/compare/v3.0.2...v3.0.3)
86
-
87
- # v3.0.2 2017-02-24
88
-
89
- ## Added
90
-
91
- * `Schema::Attribute#key` which returns tuple key name, either alias or canonical name (solnic)
92
-
93
- ## Fixed
94
-
95
- * Fix output_schema to use Attribute#key rather than canonical names (solnic)
96
- * Fix the error message for missing association (flash-gordon)
97
- * Curried relation called without any arguments will raise an ArgumentError (solnic)
98
-
99
- [Compare v3.0.1...v3.0.2](https://github.com/rom-rb/rom/compare/v3.0.1...v3.0.2)
100
-
101
- # v3.0.1 2017-02-01
102
-
103
- ## Fixed
104
-
105
- * ViewDSL exposes schemas that have access to all relations (solnic)
106
-
107
- [Compare v3.0.0...v3.0.1](https://github.com/rom-rb/rom/compare/v3.0.0...v3.0.1)
108
-
109
- # v3.0.0 2017-01-29
110
-
111
- ## Added
112
-
113
- * Support for schemas in view definitions via `schema do ... end` block (evaluated in the context of the canonical schema) (solnic)
114
- * Schemas have their own types with adapter-specific APIs (solnic)
115
- * Schema attributes include meta properties `source` and `target` (for FKs) (solnic)
116
- * Inferred schemas can have explicit attribute definitions for cases where inference didn't work (solnic)
117
- * New schema APIs: `#project`, `#rename`, `#exclude`, `#prefix`, `#wrap`, `#merge`, `#append` and `#uniq` (solnic)
118
- * New schema attribute APIs: `#name`, `#aliased`, `#aliased?`, `#prefixed`, `#prefixed?`, `#wrapped`, `#wrapped?`, `#source`, `#target`, `#primary_key?`, `#foreign_key?` (solnic)
119
- * Schemas are coercible to arrays that include all attribute types (solnic)
120
- * Automatic relation view projection via `Schema#call` (abstract method for adapters) (solnic)
121
- * `Relation#new(dataset, new_opts)` interface (solnic)
122
- * `Relation#[]` interface for convenient access to schema attributes (solnic)
123
- * `Command` has now support for `before` and `after` hooks (solnic)
124
- * Support for `read` types in schemas, these are used when relation loads its tuples (solnic)
125
- * New `Command#before` method for creating a command with before hook(s) at run-time (solnic)
126
- * New `Command#after` method for creating a command with after hook(s) at run-time (solnic)
127
- * New `Gateway#transaction` method runs code inside a transaction (flash-gordon)
128
-
129
- ## Changed
130
-
131
- * [BREAKING] All relations have schemas now, empty by default (solnic)
132
- * [BREAKING] `view` DSL is now part of the core relation API (solnic)
133
- * [BREAKING] `view` DSL is based on schemas now, `header` was replaced with `schema` (solnic)
134
- * [BREAKING] Deprecated `Command.validator` was removed (solnic)
135
- * [internal] Renamed `relation` => `target` meta property in FK types (solnic)
136
- * [internal] Use deprecations API from dry-core (flash-gordon)
137
- * [internal] Use common constants from dry-core (EMPTY_HASH, EMPTY_ARRAY etc.) (flash-gordon)
138
- * [internal] Internal ROM modules (array_dataset, enumerable_dataset, auto_curry, and data_proxy) were moved from rom-support to ROM itself (flash-gordon)
139
- * [internal] rom-support dependency was removed (flash-gordon)
140
-
141
- [Compare v2.0.2...v3.0.0](https://github.com/rom-rb/rom/compare/v2.0.2...v3.0.0)
142
-
143
- # v2.0.2 2016-11-11
144
-
145
- ## Added
146
-
147
- * API docs for `ROM::Container` (solnic)
148
-
149
- ## Fixed
150
-
151
- * Custom command input function is no longer overridden by schema hash (solnic)
152
- * `Relation::Name#to_s` returns a string properly when there is no alias (solnic)
153
-
154
- [Compare v2.0.1...v2.0.2](https://github.com/rom-rb/rom/compare/v2.0.1...v2.0.2)
155
-
156
- # v2.0.1 2016-09-30
157
-
158
- ### Added
159
-
160
- - Support for different auto-registration strategies (janjiss)
161
- - Support for custom component dir names in auto-registration (AMHOL)
162
-
163
- ### Fixed
164
-
165
- - Finalizing schema that is already finalized no longer crashes (flash-gordon)
166
-
167
- [Compare v2.0.0...v2.0.1](https://github.com/rom-rb/rom/compare/v2.0.0...v2.0.1)
168
-
169
- # v2.0.0 2016-07-27
170
-
171
- ### Added
172
-
173
- - Extendible `schema` DSL for relations with attribute and type definitions (solnic)
174
- - New command plugin `:schema` which will set up an input handler from schema definition (solnic)
175
- - New command option `restrictible` for commands that can use a restricted relation (solnic)
176
- - More meaningful exception is raised when trying to access a non-existant command (thiagoa)
177
- - `Relation::Name` class that contains both relation and dataset names (flash-gordon)
178
- - `Relation::Loaded#pluck` returning values under specified key (solnic)
179
- - `Relation::Loaded#primary_keys` returning a list of primary keys from a materialized relation (solnic)
180
-
181
- #### New low-level APIs
182
-
183
- - `Command.create_class` for building a command class dynamically (solnic)
184
- - `Command.extend_for_relation` for extending a command with relation view interface (solnic)
185
-
186
- ### Fixed
187
-
188
- - [BREAKING] command graphs return materialized results (a hash or an array) (solnic)
189
- - `Container#disconnect` properly delegates to gateways (endash)
190
- - `Relation#with` properly carries original options (solnic)
191
- - Command pipeline will stop processing if result was `nil` or an empty array (solnic)
192
-
193
- ### Changed
194
-
195
- - [BREAKING] `ROM.env` **is gone** (solnic)
196
- - [BREAKING] `Update` and `Delete` no longer calls `assert_tuple_count` [more info](https://github.com/rom-rb/rom/commit/bec2c4c1dce370670c90f529feb1b4db0e6e4bd9) (solnic)
197
- - [BREAKING] `Relation#name` and `Command#name` now returns `Relation::Name` instance (flash-gordon)
198
- - `Command.validator` is now deprecated [more info](https://github.com/rom-rb/rom/commit/80bb8411bd411f05d9c51106ae026ad412a2f25f) (solnic)
199
- - `Relation.dataset` yields a relation class when block was passed (solnic)
200
- - `Relation#attributes` can return attributes explicitly passed via options (solnic)
201
- - Relation `:key_inference` plugin supports schema information from other relations (solnic)
202
- - `auto_registration` coerces its directory to a pathname now (adz)
203
- - `macros` are now enabled by default in in-line setup block (endash)
204
-
205
- [Compare v1.0.0...v2.0.0](https://github.com/rom-rb/rom/compare/v1.0.0...v2.0.0)
206
-
207
- # v1.0.0 2016-01-06
208
-
209
- ### Added
210
-
211
- - Command graph DSL (endash + solnic)
212
- - Command graph now supports update and delete commands (cflipse + solnic)
213
- - `Gateway.adapter` setting and a corresponding `Gateway#adapter` reader. Both are
214
- necessary to access a migrator (nepalez)
215
- - `ROM::Commands::Result#{success?,failure?}` interface (Snuff)
216
- - Imported relation plugins from `rom-repository`:
217
- - `view` for explicit relation view definitions
218
- - `key_inference` for inferring `foreign_key` of a relation
219
-
220
- ### Changed
221
-
222
- - **REMOVED** all deprecated APIs (solnic)
223
- - [fixed #306] Inheriting from a misconfigured adapter relation will raise a
224
- meaningful error (solnic)
225
- - Command graph will raise `ROM::KeyMissing` command error when a key is missing
226
- in the input (solnic)
227
- - Command graph no longer rescues from any exception (solnic)
228
-
229
- ### Fixed
230
-
231
- - `Relation.register_as` properly overrides inherited value (solnic)
232
-
233
- [Compare v0.9.1...v1.0.0](https://github.com/rom-rb/rom/compare/v0.9.1...v1.0.0)
234
-
235
- # v0.9.1 2015-08-21
236
-
237
- This is a small bug-fix release which addresses a couple of issues for inline
238
- setup DSL and multi-environments.
239
-
240
- ### Fixed
241
-
242
- - Multi-env setup for adapters with schema-inferration support won't crash (solnic)
243
- - Default adapter is set correctly when many adapters are configured and one is
244
- registered under `:default` name (solnic)
245
- - When defining a relation using inline DSL with custom dataset name the relation
246
- name will be correctly set as `register_as` setting (solnic)
247
-
248
- ### Changed
249
-
250
- - When using inline-setup for env the auto_registration mechanism will be turned
251
- on by default (solnic)
252
-
253
- [Compare v0.9.0...v0.9.1](https://github.com/rom-rb/rom/compare/v0.9.0...v0.9.1)
254
-
255
- # v0.9.0 2015-08-19
256
-
257
- ### Added
258
-
259
- * Configuration API for gateways supporting following options:
260
- - `infer_relations` either `true` or `false` - if disabled schema inference
261
- won't be used to automatically set up relations for you
262
- - `inferrable_relations` a list of allowed relations that should be inferred
263
- - `not_inferrable_relations` a list of relations that should not be inferred
264
-
265
- ### Changed
266
-
267
- * Global setup with auto-registration ported to the `:auto_registration` environment plugin (AMHOL)
268
- * Multi-environment setup possible now via `ROM::Environment` object (AMHOL)
269
- * All relations are now lazy with auto-currying enabled (solnic)
270
- * Low-level query DSL provided by adapters is now public but using it directly in
271
- application layer is discouraged (solnic)
272
- * `ROM::Mapper` component extracted into standalone `rom-mapper` gem (solnic)
273
- * Support libraries extracted to `rom-support` gem (solnic)
274
-
275
- ## Fixed
276
-
277
- * `register_as` is now properly inferred for relations and their descendants (solnic)
278
- * Adapter-specific interface is properly included in relation descendants (solnic)
279
- * Combined commands (aka command graph) properly rejects keys from nested input
280
- prior sending the input to individual commands (solnic)
281
- * Composite relation materializes correctly when another composite on the right
282
- side became materialized (ie piping relation through a composite relation will
283
- work correctly) (solnic)
284
-
285
- [Compare v0.8.1...v0.9.0](https://github.com/rom-rb/rom/compare/v0.8.1...v0.9.0)
286
-
287
- # v0.8.1 2015-07-12
288
-
289
- ### Fixed
290
-
291
- * `ROM::CommandError` properly sets original error and backtrace (solnic)
292
-
293
- ### Changed
294
-
295
- * Internal transproc processor has been updated to the new API (solnic)
296
-
297
- [Compare v0.8.0...v0.8.1](https://github.com/rom-rb/rom/compare/v0.8.0...v0.8.1)
298
-
299
- # v0.8.0 2015-06-22
300
-
301
- ### Added
302
-
303
- * Commands can be combined into a single command that can work with a nested input (solnic)
304
- * New `step` mapper operation that allows multistep transformations inside a single mapper (dekz)
305
- * New `ungroup` and `unfold` mapper operations inverse `group` and `fold` (nepalez)
306
- * Support deep nesting of `unwrap` mapper operations (nepalez)
307
- * Support usage of `exclude` in a root of the mapper (nepalez)
308
- * Support usage of `prefix` and `prefix_separator` mapper operations inside blocks (nepalez)
309
- * Support renaming of the rest of an attribute after `unwrap` (nepalez)
310
-
311
- ### Changed
312
-
313
- * `Repository` class has been renamed to `Gateway` with proper deprecation
314
- warnings (cflipse)
315
- * `combine` in mapper can be used without a block (kwando)
316
- * `wrap` and `group` in mapper will raise error if `:mapper` is set along with
317
- block or options (vrish88)
318
-
319
- ### Fixed
320
-
321
- * `order` memory repository operation sorts tuples containing empty values (nepalez)
322
- * `Mapper::AttributeDSL#embedded` now honors `option[:type]` when used
323
- with `option[:mapper]` (c0)
324
-
325
- [Compare v0.7.1...v0.8.0](https://github.com/rom-rb/rom/compare/v0.7.1...v0.8.0)
326
-
327
- # v0.7.1 2015-05-22
328
-
329
- ### Added
330
-
331
- * Support for passing a block for custom coercion to `attribute` (gotar)
332
- * `fold` mapping operation which groups keys from input tuples to array
333
- of values from the first of listed keys (nepalez)
334
- * Adapter `Relation` and command classes can specify `adapter` identifier
335
- which allows using adapter-specific plugins w/o the need to specify adapter
336
- when calling `use` (solnic)
337
-
338
- ### Changed
339
-
340
- * [rom/memory] `restrict` operation supports array as a value (gotar)
341
- * [rom/memory] `restrict` operation supports regexp as a value (gotar)
342
-
343
- [Compare v0.7.0...v0.7.1](https://github.com/rom-rb/rom/compare/v0.7.0...v0.7.1)
344
-
345
- # v0.7.0 2015-05-17
346
-
347
- ### Added
348
-
349
- * `combine` interface in Relation and Mapper which allows simple and explicit
350
- eager-loading that works with all adapters (solnic)
351
- * `reject_keys` option in mapper which will filter out unspecified keys from
352
- input tuples (solnic)
353
- * `unwrap` mapping operation (aflatter)
354
- * Arbitrary objects can be registered as mappers via `register` in mapping DSL (solnic)
355
- * Ability to reuse existing mappers in `group`, `wrap` and `embedded` mappings (solnic)
356
- * Plugin interface for Relation, Mapper and Command (cflipse)
357
- * `Memory::Dataset` accepts options hash now which makes it more flexible for
358
- any adapter that wants to subclass it (solnic)
359
- * `ROM::Memory::Relation#take` (solnic)
360
-
361
- ### Changed
362
-
363
- * [BREAKING] `Command#call` applies curried args first (solnic)
364
- * `Commands::Update#set` was deprecated in favor of `call` (solnic)
365
- * `group` mapping reject empty tuples (solnic)
366
-
367
- ### Fixed
368
-
369
- * `Command` respond to missing properly now (solnic)
370
- * `Mapper::DSL` respond to missing properly now (solnic)
371
-
372
- ### Internal
373
-
374
- * Fixed all the warnings \o/ (splattael)
375
- * Introduced `Deprecations` helper module (solnic)
376
-
377
- [Compare v0.6.2...v0.7.0](https://github.com/rom-rb/rom/compare/v0.6.2...v0.7.0)
378
-
379
- # v0.6.2 2015-04-14
380
-
381
- ### Changed
382
-
383
- * Updated to transproc 0.2.0 (solnic)
384
-
385
- ### Fixed
386
-
387
- * `CommandRegistry#respond_to_missing?` behavior (hecrj)
388
-
389
- [Compare v0.6.1...v0.6.2](https://github.com/rom-rb/rom/compare/v0.6.1...v0.6.2)
390
-
391
- # v0.6.1 2015-04-04
392
-
393
- ### Added
394
-
395
- * Ability to auto-map command result via `rom.command(:rel_name).as(:mapper_name)` (solnic)
396
-
397
- ### Changed
398
-
399
- * gemspec no longer specifies required_ruby_version so that rom can be installed on jruby (solnic)
400
- * Obsolete `Env#readers` was removed (splattael)
401
-
402
- [Compare v0.6.0...v0.6.1](https://github.com/rom-rb/rom/compare/v0.6.0...v0.6.1)
403
-
404
- # v0.6.0 2015-03-22
405
-
406
- ### Added
407
-
408
- * It is now possible to define custom relation, mapper and command classes during setup (solnic)
409
- * New `Env#relation` interface for reading and mapping relations which supports:
410
- * `Relation::Lazy` with auto-currying, mapping and composition features (solnic)
411
- * `Relation::Composite` allowing data-pipelining with arbitrary objects (solnic)
412
- * Passing a block which yields relation with adapter query DSL available (solnic)
413
- * Relations can be extended with plugins using Options API (solnic)
414
- * Commands are now composable via `>>` operator (solnic)
415
- * Mappers support `prefix_separator` option (solnic)
416
- * Mappers can be registered under custom names (solnic)
417
- * Relation `dataset` name is inferred from the class name by default (gotar)
418
- * Relation can be registered under a custom name via `register_as` option (mcls)
419
- * Adapters can use helper modules for datasets: `ArrayDataset` and `EnumerableDataset` (solnic)
420
- * Adapter interface can now be tested via a lint test (elskwid + solnic + splattael)
421
- * `tuple_count` interface in AbstractCommand which can be overridden by adapter (solnic)
422
- * Custom Inflector API that auto-detects a specific inflection engine (mjtko)
423
-
424
- ### Changed
425
-
426
- * [BREAKING] Schema DSL was **removed** - attributes can be specified only in mapper DSL
427
- * [BREAKING] Reader was **removed** in favor of relation interface with explicit mapping (solnic)
428
- * [BREAKING] Command API was simplified - commands should be accessed directly in `.try` block
429
- and default repository can be changed when defining a relation (solnic)
430
- * `.setup` interface requires either an adapter identifier or can accept a repository
431
- instance (aflatter)
432
- * Adapter interface no longer requires specific constructor to be defined (aflatter)
433
- * Adapters no longer need to handle connection URIs (aflatter)
434
- * Adapter/Repository has been collapsed to *just* `Repository` (solnic)
435
- * Relation no longer needs a header object and only operates on an adapters dataset (solnic)
436
- * Relation no longer uses on Charlatan with method_missing magic (solnic)
437
- * Adapter's dataset no longer requires header (solnic)
438
- * Make storage in memory adapter thread-safe #110 (splattael)
439
- * An Adapter can provide its own Relation subclass with custom behavior (solnic)
440
- * Relation provides its "public interface" using method_added hook (splattael + solnic)
441
- * ROM no longer depends on charlatan, concord and inflecto gems (mjtko + solnic)
442
-
443
- [Compare v0.5.0...v0.6.0](https://github.com/rom-rb/rom/compare/v0.5.0...v0.6.0)
444
-
445
- # v0.5.0 2014-12-31
446
-
447
- ### Added
448
-
449
- * Mapper DSL supports `embedded` interface for nested tuples (solnic)
450
- * Support for nested `group` mapping (solnic)
451
- * Support for nested `wrap` mapping (solnic)
452
- * Support for primitive type coercions (:to_string, :to_integer etc.) (solnic)
453
- * Support for top-level `:prefix` option in mapping DSL (solnic)
454
- * Support for top-level `:symbolize_keys` option in mapping DSL (solnic)
455
- * Support for `:prefix` option in wrap/group mapping DSL (solnic)
456
- * Interface for registering data mapping processors (solnic)
457
- * Remaining relations are automatically setup from the schema (solnic)
458
- * Each relation has now access to other relations (previously they only had
459
- access to raw datasets) (solnic)
460
- * `ROM.setup` supports passing in *just an uri* which will setup a default repository (solnic)
461
- * `ROM.setup` supports passing in conventional database connection hash (solnic)
462
- * Adapters support extra options in addition to the base connection URI (solnic)
463
-
464
- ### Changed
465
-
466
- * Mapping backend replaced by integration with transproc (solnic)
467
- * Readers no longer expose adapter query DSL (solnic)
468
- * Registry objects raise `ROM::Registry::ElementNotFoundError` when missing
469
- element is referenced (rather than raw KeyError) (solnic)
470
- * Performance improvements in Reader (solnic)
471
- * `ROM::RA` was merged into in-memory adapter as this fits there perfectly (solnic)
472
- * It is no longer needed to explicitly execute a delete command in try block (solnic)
473
-
474
- ### Fixed
475
-
476
- * Wrap/group skips empty tuples now (solnic)
477
- * Readers raise a meaningful error when relation is missing (solnic)
478
-
479
- ## Internal
480
-
481
- * Massive code clean-up and rubocop integration (chastell)
482
- * Refactored `Reader` and mapper-specific logic into `MapperRegistry` (solnic)
483
-
484
- [Compare v0.4.2...v0.5.0](https://github.com/rom-rb/rom/compare/v0.4.2...v0.5.0)
485
-
486
- # v0.4.2 2014-12-19
487
-
488
- ### Added
489
-
490
- * Mappers support tuple transformation using wrap and group operations (solnic)
491
- * PORO model builder supports namespaced constants via `name: 'MyApp:Entities::User` (solnic)
492
-
493
- ### Changed
494
-
495
- * `ROM::RA` interface is no longer mixed into relations by default (solnic)
496
- * ~2.5 x speed up in aggregate mapping (solnic)
497
- * PORO model builder only defines attribute readers now (no writers!) (solnic)
498
- * Registry objects in Env will now raise `KeyError` when unknown name is referenced (solnic)
499
-
500
- [Compare v0.4.1...v0.4.2](https://github.com/rom-rb/rom/compare/v0.4.1...v0.4.2)
501
-
502
- # v0.4.1 2014-12-15
503
-
504
- ### Added
505
-
506
- * Adapter can now implement `Adapter#dataset(name, header)` to return a dataset (solnic)
507
- * For multi-step setup the DSL is available in `ROM` too (solnic)
508
- * Global environment can be stored via `ROM.finalize` and accessible via `ROM.env` (solnic)
509
- * Mapper won't infer attributes from the header if `:inherit_header` option is set to false (solnic)
510
-
511
- ### Changed
512
-
513
- * Schema can be defined in multiple steps (solnic)
514
- * Setting model in mapper DSL is no longer required and defaults to `Hash` (solnic)
515
- * Adapter datasets no longer have to return headers when they are provided by schema (solnic)
516
-
517
- [Compare v0.4.0...v0.4.1](https://github.com/rom-rb/rom/compare/v0.4.0...v0.4.1)
518
-
519
- # v0.4.0 2014-12-06
520
-
521
- ### Added
522
-
523
- * Command API (solnic)
524
- * Setup DSL is now available within the `ROM.setup` block (solnic)
525
- * Support for setting up a logger for an adapter (solnic)
526
- * New `Adapter#dataset?(name)` which every adapter must implement (solnic)
527
-
528
- ### Fixed
529
-
530
- * method-missing in `Repository` and `Env` kindly calls `super` (solnic)
531
-
532
- ### Changed
533
-
534
- * Abstract `Adapter` defines `:connection` reader so it doesn't have to be
535
- defined in adapter descendants (solnic)
536
-
537
- [Compare v0.3.1...v0.4.0](https://github.com/rom-rb/rom/compare/v0.3.1...v0.4.0)
538
-
539
- # v0.3.1 2014-11-25
540
-
541
- ### Added
542
-
543
- * attributes for `group` mapping operation can be specified without options (solnic)
544
- * attributes for `wrap` mapping operation can be specified without options (solnic)
545
- * `Env` uses Equalizer (solnic)
546
- * boot dsl methods return self (solnic)
547
-
548
- ### Fixed
549
-
550
- * when schema is missing booting will gracefuly skip building relations and mappers (solnic)
551
- * in-memory join handles one-to-many and many-to-one correctly (solnic)
552
-
553
- [Compare v0.3.0...v0.3.1](https://github.com/rom-rb/rom/compare/v0.3.0...v0.3.1)
554
-
555
- # v0.3.0 2014-11-24
556
-
557
- This version is a rewrite that introduces a new, simplified architecture based
558
- on a new adapter interface.
559
-
560
- [Compare v0.2.0...v0.3.0](https://github.com/rom-rb/rom/compare/v0.2.0...v0.3.0)
561
-
562
- # v0.2.0 2014-04-06
563
-
564
- ### Added
565
-
566
- * [feature] added :rename option to schema attribute DSL (solnic)
567
- * [feature] added support for join, group, wrap, project and rename operations (solnic)
568
- * [feature] added support for setting domain object loading strategy (solnic)
569
- * [feature] Environment.setup can be used with a block to define schema and mapping (solnic)
570
- * [feature] added public interface for building mappers (see Mapper.build) (solnic)
571
- * [feature] added support for mapping embedded objects using wrap/group (solnic)
572
- * [feature] environment exposes mapper registry via Environment#mappers (solnic)
573
-
574
- ### Changed
575
-
576
- * [BREAKING] rom-relation, rom-mapper and rom-session were merged into rom project (solnic)
577
- * [BREAKING] changed mapping DSL (users do...end => relation(:users) do...end) (solnic)
578
- * [BREAKING] added :from option to mapping DSL which replaced :to (solnic)
579
- * [internal] mappers are now backed by [morpher](https://github.com/mbj/morpher) (solnic)
580
- * [internal] renaming and optimizing relations happens on the schema level now (solnic)
581
- * [internal] environment will raise if unknown relation is referenced via `Environment#[]` (solnic)
582
-
583
- [Compare v0.1.2...v0.2.0](https://github.com/rom-rb/rom/compare/v0.1.2...v0.2.0)
584
-
585
- # v0.1.2 2013-09-02
586
-
587
- * [updated] [rom-relation](https://github.com/rom-rb/rom-relation/blob/v0.1.2/Changelog.md#v012-2013-09-02)
588
-
589
- [Compare v0.1.1...v0.1.2](https://github.com/rom-rb/rom/compare/v0.1.1...v0.1.2)
590
-
591
- # v0.1.1 2013-08-30
592
-
593
- * [updated] [rom-relation](https://github.com/rom-rb/rom-relation/blob/v0.1.1/Changelog.md#v011-2013-08-30)
594
- * [updated] [rom-session](https://github.com/rom-rb/rom-session/blob/v0.1.1/Changelog.md#v011-2013-08-30)
595
-
596
- [Compare v0.1.0...v0.1.1](https://github.com/rom-rb/rom/compare/v0.1.0...v0.1.1)
597
-
598
- # v0.1.0 2013-08-23
599
-
600
- First public release
3
+ This release turns `rom` gem into a meta gem which depends on `rom-core`, `rom-mapper` and `rom-repository`
data/lib/rom/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ROM
2
- VERSION = '3.3.3'.freeze
2
+ VERSION = '4.0.0.beta1'.freeze
3
3
  end
data/lib/rom.rb CHANGED
@@ -1,45 +1,4 @@
1
- require 'dry-equalizer'
2
- require 'dry/core/constants'
3
-
4
- require 'rom/version'
5
- require 'rom/constants'
6
-
7
- module ROM
8
- include Dry::Core::Constants
9
- end
10
-
11
- # core parts
12
- require 'rom/configuration_plugin'
13
- require 'rom/plugin'
14
- require 'rom/relation'
1
+ require 'rom-core'
15
2
  require 'rom-mapper'
16
- require 'rom/commands'
17
-
18
- # rom Global
19
- require 'rom/global'
20
-
21
- # rom configurations
22
- require 'rom/configuration'
23
-
24
- # container with registries
25
- require 'rom/container'
26
-
27
- # container factory
28
- require 'rom/create_container'
29
-
30
- # register core plugins
31
- require 'rom/plugins/configuration/configuration_dsl'
32
- require 'rom/plugins/relation/registry_reader'
33
- require 'rom/plugins/relation/instrumentation'
34
- require 'rom/plugins/command/schema'
35
-
36
- module ROM
37
- extend Global
38
-
39
- plugins do
40
- register :macros, ROM::ConfigurationPlugins::ConfigurationDSL, type: :configuration
41
- register :registry_reader, ROM::Plugins::Relation::RegistryReader, type: :relation
42
- register :instrumentation, ROM::Plugins::Relation::Instrumentation, type: :relation
43
- register :schema, ROM::Plugins::Command::Schema, type: :command
44
- end
45
- end
3
+ require 'rom-repository'
4
+ require 'rom-changeset'