dry-transaction 0.13.0 → 0.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +308 -0
  3. data/LICENSE +20 -0
  4. data/README.md +15 -41
  5. data/dry-transaction.gemspec +35 -0
  6. data/lib/dry-transaction.rb +2 -0
  7. data/lib/dry/transaction.rb +2 -0
  8. data/lib/dry/transaction/builder.rb +6 -4
  9. data/lib/dry/transaction/callable.rb +5 -0
  10. data/lib/dry/transaction/dsl.rb +2 -0
  11. data/lib/dry/transaction/errors.rb +2 -0
  12. data/lib/dry/transaction/instance_methods.rb +6 -4
  13. data/lib/dry/transaction/operation.rb +5 -3
  14. data/lib/dry/transaction/operation_resolver.rb +2 -0
  15. data/lib/dry/transaction/result_matcher.rb +3 -1
  16. data/lib/dry/transaction/stack.rb +2 -0
  17. data/lib/dry/transaction/step.rb +6 -4
  18. data/lib/dry/transaction/step_adapter.rb +6 -4
  19. data/lib/dry/transaction/step_adapters.rb +9 -7
  20. data/lib/dry/transaction/step_adapters/around.rb +4 -2
  21. data/lib/dry/transaction/step_adapters/check.rb +2 -0
  22. data/lib/dry/transaction/step_adapters/map.rb +2 -0
  23. data/lib/dry/transaction/step_adapters/raw.rb +5 -3
  24. data/lib/dry/transaction/step_adapters/tee.rb +2 -0
  25. data/lib/dry/transaction/step_adapters/try.rb +3 -1
  26. data/lib/dry/transaction/step_failure.rb +2 -0
  27. data/lib/dry/transaction/version.rb +3 -1
  28. metadata +14 -110
  29. data/Gemfile +0 -15
  30. data/Gemfile.lock +0 -97
  31. data/LICENSE.md +0 -9
  32. data/Rakefile +0 -6
  33. data/spec/examples.txt +0 -88
  34. data/spec/integration/around_spec.rb +0 -120
  35. data/spec/integration/auto_injection_spec.rb +0 -32
  36. data/spec/integration/custom_step_adapters_spec.rb +0 -41
  37. data/spec/integration/operation_spec.rb +0 -30
  38. data/spec/integration/passing_step_arguments_spec.rb +0 -51
  39. data/spec/integration/publishing_step_events_spec.rb +0 -119
  40. data/spec/integration/transaction_spec.rb +0 -573
  41. data/spec/integration/transaction_without_steps_spec.rb +0 -101
  42. data/spec/spec_helper.rb +0 -116
  43. data/spec/support/container.rb +0 -10
  44. data/spec/support/database.rb +0 -12
  45. data/spec/support/db_transactions.rb +0 -45
  46. data/spec/support/result_mixin.rb +0 -3
  47. data/spec/support/test_module_constants.rb +0 -11
  48. data/spec/unit/step_adapters/around_spec.rb +0 -46
  49. data/spec/unit/step_adapters/check_spec.rb +0 -43
  50. data/spec/unit/step_adapters/map_spec.rb +0 -16
  51. data/spec/unit/step_adapters/raw_spec.rb +0 -36
  52. data/spec/unit/step_adapters/tee_spec.rb +0 -17
  53. data/spec/unit/step_adapters/try_spec.rb +0 -89
  54. data/spec/unit/step_spec.rb +0 -139
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 901e6ca3954acdc46da017a77ceb17014e0c5728d216fbf80b97995d9be03164
4
- data.tar.gz: 501e37cccc173d5be0f654f5e4606c9d2db4e4737c0e004c569bab1bbadd04bd
3
+ metadata.gz: 6f40f750adc631d8bf596eaa4a2e1f57cdc0e5787104f23bab03888bff071aed
4
+ data.tar.gz: 1ae8d029a3f723e114cdf10b7e06b2f71ab899ff8c75b6bb48f5a42b259053b1
5
5
  SHA512:
6
- metadata.gz: bcad8d5346e432e465310eeba9d79c32c2d2df024baf8d752ef5d2ad054685652f1851e3e55ec42d3937563dbaec2b93acd4f6a93e5e40d6cadee66332c6f80d
7
- data.tar.gz: 6ff93e764b43ff80a578c2bb775a9a2d1db41a86b617ad2e62ffbcddef4bde69ba95bb8387824a2c96150d4729f0b7c80ab5464e87b4b29f2717ed05d383c246
6
+ metadata.gz: 591876e98732125f3f800958c3885f7458b9866e3346a5f322194bd0c3b697cd1ae42994614f9065f64dd5e2014a937195254863e2075ff538bc874176fd4f77
7
+ data.tar.gz: 287958b3d8ae478163ac45a4a6e17f4a7fa3d5e57fd778a710b5b5a1482b31e2c50690a43e63a843f4b56819bd693478ec40a05e3a1315c72ae03b095c860a79
@@ -0,0 +1,308 @@
1
+ <!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
2
+
3
+ ## 0.13.0 2018-06-13
4
+
5
+
6
+ ### Changed
7
+
8
+ - Internal step operations (steps backed by instance methods) can now be replaced via constructor arguments. Using instance methods to wrap external step operations now only works if the step is defined using the `with:` option (timriley in [#109][pr109])
9
+
10
+ [Compare v0.12.1...v0.13.0](https://github.com/dry-rb/dry-transaction/compare/v0.12.1...v0.13.0)
11
+
12
+ ## 0.12.1 2018-06-05
13
+
14
+
15
+ ### Fixed
16
+
17
+ - Support result matching on step failures nested within around steps (flash-gordon in [#106][pr106])
18
+
19
+
20
+ [Compare v0.12.0...v0.12.1](https://github.com/dry-rb/dry-transaction/compare/v0.12.0...v0.12.1)
21
+
22
+ ## 0.12.0 2018-05-16
23
+
24
+
25
+ ### Changed
26
+
27
+ - Switch to `Dry::Monads::Result` API (away from `Either` API deprecated in dry-monads 1.0 betas) (Morozzzko in [#104][pr104])
28
+
29
+ [Compare v0.11.2...v0.12.0](https://github.com/dry-rb/dry-transaction/compare/v0.11.2...v0.12.0)
30
+
31
+ ## 0.11.2 2018-05-15
32
+
33
+
34
+ ### Changed
35
+
36
+ - Use `Dry::Monads::Result` instead of the deprecated `Dry::Monads::Either` in the `check` step adapter (PavelTkachenko in [#103][pr103])
37
+
38
+ [Compare v0.11.1...v0.11.2](https://github.com/dry-rb/dry-transaction/compare/v0.11.1...v0.11.2)
39
+
40
+ ## 0.11.1 2018-03-15
41
+
42
+
43
+ ### Added
44
+
45
+ - Include `operation_name:` in options passed to step adapters. This is helpful for 3rd party step adapters that need the operation's name to fetch it from the container again later. (timriley in [#94][pr94])
46
+
47
+
48
+ [Compare v0.11.0...v0.11.1](https://github.com/dry-rb/dry-transaction/compare/v0.11.0...v0.11.1)
49
+
50
+ ## 0.11.0 2018-02-19
51
+
52
+
53
+ ### Added
54
+
55
+ - Around steps, which allow control of the execution of subsequently called steps. If you know how middleware works in rack or how around callbacks can be used in RSpec, it's the same. A typical example of usage would be for DB transactions (now first class support!) or controlling side effects: rolling back the changes, cleaning garbage produced by a failed transaction, etc. See a more detailed explanation of how this works [in the PR][pr85] (flash-gordon in [#85][pr85])
56
+ - Broadcast when a step has started by sending the event `step_called` (mihairadulescu in [#82][pr82])
57
+ - Add new step `check` that returns `Success` or `Failure` base on conditions (semenovDL in [#84][pr84])
58
+ - Support for transaction steps without input values (GustavoCaso and timriley in [#69][pr69])
59
+
60
+ ### Fixed
61
+
62
+ - Pass arguments to a step with keyword arguments with default values (flash-gordon in [#74][pr74])
63
+ - Steps can be wrapped with private methods (semenovDL in [#70][pr70])
64
+ - Improved error message on missing transaction step (Morozzzko in [#79][pr79])
65
+
66
+ ### Changed
67
+
68
+ - [BREAKING] Steps no longer broadcast events with their step name followed by `_success` or `_failure`. Now, more generic names are used for the broadcast events. Before each step runs, a `step` event is broadcast, with the step name and its arguments. After a step runs, a `step_succeeded` or `step_failed` event is broadcast, also with the step name, the arguments and the return value (GustavoCaso in [#83][pr83])
69
+ - [BREAKING] Pub/sub support is now handled using [dry-events][dry-events] instead of wisper. Subscriber objects should now respond to `#on_step`, `#on_step_succeeded`, or `#on_step_failed` to receive broadcast events (GustavoCaso in [#90][pr90])
70
+ - [BREAKING] The step adapter API has been changed in order to support around steps, although, the changes are not significant. Previously, an adapter received a `step` and a list of arguments for calling the operation. The list was passed as `*args` then you were needed to call `call_operation` on `step` and provide the list. From now on an adapter gets an `operation`, its `options`, and `args` (_without_ `*`). `operation` is an ordinary callable object so a typical call is as simple as `operation.(*args)`, that's it. If you want to turn your adapter into an around-like one you need to add `&block` parameter to the list of `call` arguments (e.g. `def call(operation, options, args, &block)`). `block` is responsible for calling the subsequent steps thus you can check or transform the return value and make some decisions based on it. Note capturing the block in the list of arguments is mandatory, a simple `yield` won't work, there are reasons, believe us. Check out the sources of [`around.rb`](https://github.com/dry-rb/dry-transaction/blob/master/lib/dry/transaction/step_adapters/around.rb) for reference, it's dead simple (flash-gordon in [#85][pr85])
71
+ - Usages of the `Either` monad was updated with `Result` and its constructors. See [the changes](https://github.com/dry-rb/dry-monads/blob/master/CHANGELOG.md#v040-2017-11-11) in `dry-monads` for more details (flash-gordon in [#81][pr81])
72
+ - Minimal Ruby version is 2.2 (flash-gordon in [#72][pr72])
73
+
74
+ [Compare v0.10.2...v0.11.0](https://github.com/dry-rb/dry-transaction/compare/v0.10.2...v0.11.0)
75
+
76
+ ## 0.10.2 2017-07-10
77
+
78
+
79
+ ### Fixed
80
+
81
+ - Only resolve an operation object from the container if the container reports that the key is present. This prevents exceptions from being raised when using dry-container and defining a transaction that includes steps both container-based and local method steps (jonolsson in [#64][pr64])
82
+
83
+
84
+ [Compare v0.10.1...v0.10.2](https://github.com/dry-rb/dry-transaction/compare/v0.10.1...v0.10.2)
85
+
86
+ ## 0.10.1 2017-06-30
87
+
88
+
89
+ ### Fixed
90
+
91
+ - Preserve step notification listeners when calling a transaction after passing extra step arguments (jcmfernandes in [#65](https://github.com/dry-rb/dry-transaction/pull/65))
92
+
93
+
94
+ [Compare v0.10.0...v0.10.1](https://github.com/dry-rb/dry-transaction/compare/v0.10.0...v0.10.1)
95
+
96
+ ## 0.10.0 2017-06-15
97
+
98
+ This release makes major changes to the dry-transaction API: transactions are now defined within your own class, support instance methods for defining or wrapping steps, and operation containers are now optional.
99
+
100
+ ### Added
101
+
102
+ - Added `Dry::Transaction::Operation` convenience mixin. This gives easy access to `Right` and `Left` result builders within your operation objects, and also enables dry-matcher's block-based result matching API for when the operations are called individually. (timriley in [#58](https://github.com/dry-rb/dry-transaction/pull/58))
103
+
104
+ ```ruby
105
+ class MyOperation
106
+ include Dry::Transaction::Operation
107
+
108
+ def call(input)
109
+ Right(input)
110
+ end
111
+ end
112
+
113
+ my_op = MyOperation.new
114
+ my_op.("hello") do |m|
115
+ m.success do |v|
116
+ "Success: #{v}
117
+ end
118
+ m.failure do |v|
119
+ "Failure: #{v}"
120
+ end
121
+ end
122
+ # => "Success: hello"
123
+
124
+ ### Changed
125
+
126
+ - [BREAKING] Transactions are now defined within your own classes using a mixin & class-level API for step definitions (GustavoCaso & timriley in [#58](https://github.com/dry-rb/dry-transaction/pull/58))
127
+
128
+ ```ruby
129
+ class CreateUser
130
+ include Dry::Transaction(container: Container)
131
+
132
+ step :process, with: "operations.process"
133
+ step :validate, with: "operations.validate"
134
+ step :persist, with: "operations.persist"
135
+ end
136
+
137
+ create_user = CreateUser.new
138
+ create_user.call("name" => "Jane Doe")
139
+ ```
140
+
141
+ Instance methods can wrap operations by calling `super`:
142
+
143
+ ```ruby
144
+ class CreateUser
145
+ include Dry::Transaction(container: Container)
146
+
147
+ step :process, with: "operations.process"
148
+ step :validate, with: "operations.validate"
149
+ step :persist, with: "operations.persist"
150
+
151
+ def process(input)
152
+ adjusted_input = do_something_with(input)
153
+ super(adjusted_input)
154
+ end
155
+ end
156
+ ```
157
+
158
+ Substitute operations can be injected when initializing objects (helpful for testing):
159
+
160
+ ```ruby
161
+ create_user = CreateUser.new(process: substitute_process_operation)
162
+ ```
163
+ - Transactions can be defined without an operations container, using instance methods only.
164
+
165
+ ```ruby
166
+ class CreateUser
167
+ include Dry::Transaction
168
+
169
+ step :process
170
+ step :validate
171
+
172
+ def process(input)
173
+ input = do_something_with(input)
174
+ Right(input)
175
+ end
176
+
177
+ def validate(input)
178
+ if input[:email].include?("@")
179
+ Right(input)
180
+ else
181
+ Left(:not_valid)
182
+ end
183
+ end
184
+ end
185
+ ```
186
+ - [BREAKING] You can no longer extend existing transactions with `#prepend`, `#append`, `#insert`, or `#remove`. Since transactions will now be instances of your own classes, with their own different behaviors, there’s no predictable way to combine the behaviors of two different classes. If you need the ability to add or remove steps, you can create separate transactions for the different behaviours you need to offer, or build into your own transaction class a way to skip steps based on input or step arguments.
187
+ - [BREAKING] Blocks in step definitions are no longer accepted. If you want to wrap a step with some local behavior, wrap it with an instance method (see above).
188
+ - [BREAKING] There is no longer an option for configuring the result matcher block API - we now use `Dry::Transaction::ResultMatcher` by default. If you want to provide your own matcher, you can do this by overriding `#call` in your transaction classes and using your own matcher when a block is given.
189
+
190
+ [Compare v0.9.0...v0.10.0](https://github.com/dry-rb/dry-transaction/compare/v0.9.0...v0.10.0)
191
+
192
+ ## 0.9.0 2016-12-19
193
+
194
+
195
+ ### Added
196
+
197
+ - Procs (or any callable objects) can be passed as a step's `with:` option instead of a container identifier string (AMHOL in [#44](https://github.com/dry-rb/dry-transaction/pull/44))
198
+
199
+ ```ruby
200
+ Dry.Transaction(container: MyContainer) do
201
+ step :some_step, with: "operations.some_thing"
202
+ step :another, with: -> input {
203
+ # your code here
204
+ }
205
+ end
206
+ ```
207
+ - Support for passing blocks to step adapters (am-kantox in [#36](https://github.com/dry-rb/dry-transaction/pull/36))
208
+
209
+ ```ruby
210
+ Dry.Transaction(container: MyContainer) do
211
+ my_custom_step :some_step do
212
+ # this code is captured as a block and passed to the step adapter
213
+ end
214
+ end
215
+ ```
216
+
217
+ ### Changed
218
+
219
+ - Whole step object is passed to `StepFailure` upon failure, which provides more information to custom matchers (mrbongiolo in [#35](https://github.com/dry-rb/dry-transaction/pull/35))
220
+ - `#call` argument order for step operations is now `#call(input, *args)`, not `#call(*args, input)` (timriley in [#48](https://github.com/dry-rb/dry-transaction/pull/48))
221
+ - `Dry::Transaction::Sequence` renamed to `Dry::Transaction` (timriley in [#49](https://github.com/dry-rb/dry-transaction/pull/49))
222
+
223
+ [Compare v0.8.0...v0.9.0](https://github.com/dry-rb/dry-transaction/compare/v0.8.0...v0.9.0)
224
+
225
+ ## 0.8.0 2016-07-06
226
+
227
+
228
+ ### Added
229
+
230
+ - Provide your own matcher object via a `matcher:` option passed to `Dry.Transaction` (timriley)
231
+
232
+ ### Changed
233
+
234
+ - Match block API is now provided by `dry-matcher` gem (timriley)
235
+ - Matching behaviour is clearer: match cases are run in order, the first match case “wins” and is executed, and all subsequent cases are ignored. This ensures a single, deterministic return value from the match block - the output of the single “winning” match case. (timriley)
236
+
237
+ [Compare v0.7.0...v0.8.0](https://github.com/dry-rb/dry-transaction/compare/v0.7.0...v0.8.0)
238
+
239
+ ## 0.7.0 2016-06-06
240
+
241
+
242
+ ### Added
243
+
244
+ - `try` steps support a `:raise` option, so a caught exception can be re-raised as a different (more domain-specific) exception (mrbongiolo)
245
+
246
+ ### Fixed
247
+
248
+ - Add `#respond_to_missing?` to `StepFailure` wrapper class so it can more faithfully represent the failure object it wraps (flash-gordon)
249
+ - Stop the DSL processing from conflicting with ActiveSupport's `Object#try` monkey-patch (joevandyk)
250
+
251
+ ### Changed
252
+
253
+ - Use dry-monads (e.g. `Dry::Monads::Either::Right`) instead of kleisli (`Kleisli::Either::Right`) (flash-gordon)
254
+
255
+ [Compare v0.6.0...v0.7.0](https://github.com/dry-rb/dry-transaction/compare/v0.6.0...v0.7.0)
256
+
257
+ ## 0.6.0 2016-04-06
258
+
259
+
260
+ ### Added
261
+
262
+ - Allow custom step adapters to be supplied via a container of adapters being passed as a `step_adapters:` option to `Dry.Transaction` (timriley)
263
+ - Raise a meaningful error if a `step` step returns a non-`Either` object (davidpelaez)
264
+ - ## Internal
265
+ - Change the step adapter API so more step-related information remains available at the time of the step being called (timriley)
266
+
267
+
268
+ [Compare v0.5.0...v0.6.0](https://github.com/dry-rb/dry-transaction/compare/v0.5.0...v0.6.0)
269
+
270
+ ## 0.5.0 2016-03-16
271
+
272
+
273
+
274
+ [Compare v0.4.0...v0.5.0](https://github.com/dry-rb/dry-transaction/compare/v0.4.0...v0.5.0)
275
+
276
+ ## 0.4.0 2015-12-26
277
+
278
+
279
+
280
+ [Compare v0.3.2...v0.4.0](https://github.com/dry-rb/dry-transaction/compare/v0.3.2...v0.4.0)
281
+
282
+ ## 0.3.2 2015-11-13
283
+
284
+
285
+
286
+ [Compare v0.3.1...v0.3.2](https://github.com/dry-rb/dry-transaction/compare/v0.3.1...v0.3.2)
287
+
288
+ ## 0.3.1 2015-11-12
289
+
290
+
291
+
292
+ [Compare v0.3.0...v0.3.1](https://github.com/dry-rb/dry-transaction/compare/v0.3.0...v0.3.1)
293
+
294
+ ## 0.3.0 2015-11-11
295
+
296
+
297
+
298
+ [Compare v0.2.0...v0.3.0](https://github.com/dry-rb/dry-transaction/compare/v0.2.0...v0.3.0)
299
+
300
+ ## 0.2.0 2015-11-02
301
+
302
+
303
+
304
+ [Compare v0.1.0...v0.2.0](https://github.com/dry-rb/dry-transaction/compare/v0.1.0...v0.2.0)
305
+
306
+ ## 0.1.0 2015-10-28
307
+
308
+ Initial release.
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-2021 dry-rb team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,55 +1,29 @@
1
- [gitter]: https://gitter.im/dry-rb/chat
2
- [gem]: https://img.shields.io/gem/v/dry-transaction.svg]
3
- [travis]: https://travis-ci.org/dry-rb/dry-transaction
4
- [codeclimate]: https://codeclimate.com/github/dry-rb/dry-transaction
5
- [coveralls]: https://coveralls.io/r/dry-rb/dry-transaction
1
+ [gem]: https://rubygems.org/gems/dry-transaction
2
+ [actions]: https://github.com/dry-rb/dry-transaction/actions
3
+ [codacy]: https://www.codacy.com/gh/dry-rb/dry-transaction
4
+ [chat]: https://dry-rb.zulipchat.com
6
5
  [inchpages]: http://inch-ci.org/github/dry-rb/dry-transaction
7
6
 
8
- # dry-transaction [![Join the chat at https://gitter.im/dry-rb/chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dry-rb/chat)
7
+ # dry-transaction [![Join the chat at https://dry-rb.zulipchat.com](https://img.shields.io/badge/dry--rb-join%20chat-%23346b7a.svg)][chat]
9
8
 
10
9
  [![Gem Version](https://badge.fury.io/rb/dry-transaction.svg)][gem]
11
- [![Build Status](https://travis-ci.org/dry-rb/dry-transaction.svg?branch=master)][travis]
12
- [![Code Climate](https://codeclimate.com/github/dry-rb/dry-transaction/badges/gpa.svg)][codeclimate]
13
- [![Test Coverage](https://codeclimate.com/github/dry-rb/dry-transaction/badges/coverage.svg)][codeclimate]
10
+ [![CI Status](https://github.com/dry-rb/dry-transaction/workflows/ci/badge.svg)][actions]
11
+ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/f2c8f3f2e96a477faee00109cfb2090d)][codacy]
12
+ [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/f2c8f3f2e96a477faee00109cfb2090d)][codacy]
14
13
  [![Inline docs](http://inch-ci.org/github/dry-rb/dry-transaction.svg?branch=master)][inchpages]
15
14
 
16
- dry-transaction is a business transaction DSL. It provides a simple way to define a complex business transaction that includes processing by many different objects.
17
-
18
- ## Installation
19
-
20
- Add this line to your application's Gemfile:
21
-
22
- ```ruby
23
- gem 'dry-transaction'
24
- ```
25
-
26
- And then execute:
27
-
28
- ```sh
29
- $ bundle
30
- ```
31
-
32
- Or install it yourself as:
33
-
34
- ```sh
35
- $ gem install dry-transaction
36
- ```
37
-
38
15
  ## Links
39
16
 
40
- * [Documentation](http://dry-rb.org/gems/dry-transaction)
41
- * [API documentation](http://www.rubydoc.info/github/dry-rb/dry-transaction)
42
-
43
- ## Development
17
+ * [User documentation](http://dry-rb.org/gems/dry-transaction)
18
+ * [API documentation](http://rubydoc.info/gems/dry-transaction)
44
19
 
45
- After checking out the repo, run `bundle install` to install dependencies. Then, run
46
- `rake spec` to run the tests. You can also run `bin/console` for an interactive
47
- prompt that will allow you to experiment.
20
+ ## Supported Ruby versions
48
21
 
49
- ## Contributing
22
+ This library officially supports the following Ruby versions:
50
23
 
51
- Bug reports and pull requests are welcome on GitHub at <https://github.com/dry-rb/dry-transaction>.
24
+ * MRI >= `2.5`
25
+ * jruby >= `9.2`
52
26
 
53
27
  ## License
54
28
 
55
- Copyright © 2015-2016 [Icelab](http://icelab.com.au/). dry-transaction is free software, and may be redistributed under the terms specified in the [license](LICENSE.md).
29
+ See `LICENSE` file.
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+ # this file is managed by dry-rb/devtools project
3
+
4
+ lib = File.expand_path('lib', __dir__)
5
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
+ require 'dry/transaction/version'
7
+
8
+ Gem::Specification.new do |spec|
9
+ spec.name = 'dry-transaction'
10
+ spec.authors = ["Tim Riley"]
11
+ spec.email = ["tim@icelab.com.au"]
12
+ spec.license = 'MIT'
13
+ spec.version = Dry::Transaction::VERSION.dup
14
+
15
+ spec.summary = "Business Transaction Flow DSL"
16
+ spec.description = spec.summary
17
+ spec.homepage = 'https://dry-rb.org/gems/dry-transaction'
18
+ spec.files = Dir["CHANGELOG.md", "LICENSE", "README.md", "dry-transaction.gemspec", "lib/**/*"]
19
+ spec.bindir = 'bin'
20
+ spec.executables = []
21
+ spec.require_paths = ['lib']
22
+
23
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
24
+ spec.metadata['changelog_uri'] = 'https://github.com/dry-rb/dry-transaction/blob/master/CHANGELOG.md'
25
+ spec.metadata['source_code_uri'] = 'https://github.com/dry-rb/dry-transaction'
26
+ spec.metadata['bug_tracker_uri'] = 'https://github.com/dry-rb/dry-transaction/issues'
27
+
28
+ spec.required_ruby_version = ">= 2.5.0"
29
+
30
+ # to update dependencies edit project.yml
31
+ spec.add_runtime_dependency "dry-container", ">= 0.2.8"
32
+ spec.add_runtime_dependency "dry-events", ">= 0.1.0"
33
+ spec.add_runtime_dependency "dry-matcher", ">= 0.7.0"
34
+ spec.add_runtime_dependency "dry-monads", ">= 0.4.0"
35
+ end
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "dry/transaction"