trailblazer-macro-contract 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop-https---raw-githubusercontent-com-trailblazer-meta-master-rubocop-yml +6 -15
- data/CHANGES.md +4 -0
- data/Gemfile +1 -0
- data/lib/trailblazer/macro/contract.rb +19 -5
- data/lib/trailblazer/{operation/contract.rb → macro/contract/build.rb} +7 -4
- data/lib/trailblazer/{operation → macro/contract}/persist.rb +1 -1
- data/lib/trailblazer/{operation → macro/contract}/validate.rb +8 -5
- data/lib/trailblazer/macro/contract/version.rb +1 -1
- data/test/docs/contract_test.rb +61 -15
- data/test/docs/dry_test.rb +27 -27
- data/test/operation/contract_test.rb +2 -0
- data/test/test_helper.rb +4 -2
- data/trailblazer-macro-contract.gemspec +8 -4
- metadata +62 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 523435b29f2464a1677f6b430e8285b62841e4b24f4ebfdf19bcab531239ba70
|
4
|
+
data.tar.gz: 30cda42970110b3d8b280d002b785ada64445cb8212b1a6040432df5218f8fa4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9922fdf9cfac45598fe3d1d4672e708bacf54e41779b38d35e28dbfbee78de92eafe29bdabcda01369bbcf96265917129d0cdc0d8abcc85b1bf3cb2c3c4bbf3
|
7
|
+
data.tar.gz: bb8f91f57343237ac0995fa8f2516558ccabf799c9b0bf64c0c6024bae6a61285ba867bb97e1d10d2b99fc8e510ad611a6a523bf439d2df01f9ced40c6eeefa7
|
@@ -26,8 +26,6 @@ Style/AndOr:
|
|
26
26
|
EnforcedStyle: conditionals
|
27
27
|
Style/AutoResourceCleanup:
|
28
28
|
Enabled: true
|
29
|
-
Style/CollectionMethods:
|
30
|
-
Enabled: true
|
31
29
|
Style/Documentation:
|
32
30
|
Enabled: false
|
33
31
|
Style/EmptyLiteral:
|
@@ -49,13 +47,6 @@ Style/NumericLiterals:
|
|
49
47
|
Enabled: false
|
50
48
|
Style/OptionHash:
|
51
49
|
Enabled: true
|
52
|
-
Style/PercentLiteralDelimiters:
|
53
|
-
PreferredDelimiters:
|
54
|
-
"%w": "[]"
|
55
|
-
"%W": "[]"
|
56
|
-
"%i": "[]"
|
57
|
-
"%I": "[]"
|
58
|
-
"%r": "()"
|
59
50
|
Style/ReturnNil:
|
60
51
|
Enabled: true
|
61
52
|
Style/SafeNavigation:
|
@@ -94,27 +85,24 @@ Lint/UnreachableCode:
|
|
94
85
|
Enabled: false
|
95
86
|
Lint/Void:
|
96
87
|
Enabled: false
|
97
|
-
Layout/AlignHash:
|
98
|
-
EnforcedLastArgumentHashStyle: ignore_implicit
|
99
88
|
Metrics/AbcSize:
|
100
89
|
Max: 25
|
101
90
|
Style/LambdaCall:
|
102
91
|
Enabled: false
|
103
92
|
Style/Semicolon:
|
104
93
|
Enabled: false
|
105
|
-
Naming/
|
94
|
+
Naming/MethodParameterName:
|
106
95
|
Enabled: false
|
107
96
|
Style/ClassAndModuleChildren:
|
108
97
|
Enabled: false
|
109
98
|
Layout/LeadingCommentSpace:
|
110
99
|
Exclude:
|
111
100
|
- 'test/docs/**/*'
|
112
|
-
Layout/
|
101
|
+
Layout/HashAlignment:
|
113
102
|
EnforcedHashRocketStyle: table
|
103
|
+
EnforcedColonStyle: table
|
114
104
|
Style/FrozenStringLiteralComment:
|
115
105
|
Enabled: false
|
116
|
-
Layout/AlignHash:
|
117
|
-
EnforcedColonStyle: table
|
118
106
|
SingleLineMethods:
|
119
107
|
Enabled: false
|
120
108
|
Style/Lambda:
|
@@ -132,5 +120,8 @@ Style/PercentLiteralDelimiters:
|
|
132
120
|
"%r": '{}'
|
133
121
|
"%w": '[]'
|
134
122
|
"%": '{}'
|
123
|
+
"%W": '[]'
|
124
|
+
"%i": '[]'
|
125
|
+
"%I": '[]'
|
135
126
|
Style/HashSyntax:
|
136
127
|
Enabled: false
|
data/CHANGES.md
CHANGED
data/Gemfile
CHANGED
@@ -9,6 +9,7 @@ gem "dry-matcher"
|
|
9
9
|
# gem "trailblazer-macro", path: "../trailblazer-macro"
|
10
10
|
# gem "trailblazer-activity", path: "../trailblazer-activity"
|
11
11
|
# gem "trailblazer-activity-dsl-linear", path: "../trailblazer-activity-dsl-linear"
|
12
|
+
# gem "reform", path: "../reform"
|
12
13
|
|
13
14
|
gem "minitest-line"
|
14
15
|
|
@@ -1,5 +1,19 @@
|
|
1
|
-
require "
|
2
|
-
require "trailblazer/
|
3
|
-
|
4
|
-
require "trailblazer/
|
5
|
-
require "trailblazer/
|
1
|
+
require "trailblazer/activity"
|
2
|
+
require "trailblazer/activity/dsl/linear"
|
3
|
+
|
4
|
+
require "trailblazer/macro/contract/build"
|
5
|
+
require "trailblazer/macro/contract/validate"
|
6
|
+
require "trailblazer/macro/contract/persist"
|
7
|
+
|
8
|
+
module Trailblazer
|
9
|
+
module Macro
|
10
|
+
module Contract
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# All macros sit in the {Trailblazer::Macro::Contract} namespace, where we forward calls from
|
15
|
+
# operations and activities to.
|
16
|
+
module Activity::DSL::Linear::Helper
|
17
|
+
Contract = Macro::Contract
|
18
|
+
end
|
19
|
+
end
|
@@ -1,5 +1,7 @@
|
|
1
|
+
require "reform"
|
2
|
+
|
1
3
|
module Trailblazer
|
2
|
-
|
4
|
+
module Macro
|
3
5
|
module Contract
|
4
6
|
def self.Build(name: "default", constant: nil, builder: nil)
|
5
7
|
task = lambda do |(options, flow_options), **circuit_options|
|
@@ -27,12 +29,13 @@ module Trailblazer
|
|
27
29
|
end
|
28
30
|
end
|
29
31
|
|
30
|
-
def self.call_builder(
|
31
|
-
tmp_options =
|
32
|
+
def self.call_builder(ctx, circuit_options, builder: raise, constant: raise, name: raise)
|
33
|
+
tmp_options = ctx.to_hash.merge(
|
32
34
|
constant: constant,
|
33
35
|
name: name
|
34
36
|
)
|
35
|
-
|
37
|
+
|
38
|
+
Trailblazer::Option(builder).(ctx, keyword_arguments: tmp_options, **circuit_options) # TODO: why can't we build the {builder} at compile time?
|
36
39
|
end
|
37
40
|
end
|
38
41
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module Trailblazer
|
2
|
-
|
2
|
+
module Macro
|
3
3
|
module Contract
|
4
4
|
# result.contract = {..}
|
5
5
|
# result.contract.errors = {..}
|
6
6
|
# Deviate to left track if optional key is not found in params.
|
7
7
|
# Deviate to left if validation result falsey.
|
8
|
-
def self.Validate(skip_extract: false, name: "default", representer: false, key: nil, constant: nil) # DISCUSS: should we introduce something like Validate::Deserializer?
|
8
|
+
def self.Validate(skip_extract: false, name: "default", representer: false, key: nil, constant: nil, invalid_data_terminus: false) # DISCUSS: should we introduce something like Validate::Deserializer?
|
9
9
|
params_path = :"contract.#{name}.params" # extract_params! save extracted params here.
|
10
10
|
|
11
11
|
extract = Validate::Extract.new(key: key, params_path: params_path).freeze
|
@@ -23,6 +23,9 @@ module Trailblazer
|
|
23
23
|
# Deviate End.extract_failure to the standard failure track as a default. This can be changed from the user side.
|
24
24
|
options = options.merge(activity.Output(:extract_failure) => activity.Track(:failure)) unless skip_extract
|
25
25
|
|
26
|
+
# Halt failure track to End with {contract.name.invalid}.
|
27
|
+
options = options.merge(activity.Output(:failure) => activity.End(:invalid_data)) if invalid_data_terminus
|
28
|
+
|
26
29
|
options
|
27
30
|
end
|
28
31
|
|
@@ -33,7 +36,7 @@ module Trailblazer
|
|
33
36
|
@key, @params_path = key, params_path
|
34
37
|
end
|
35
38
|
|
36
|
-
def call(ctx, params
|
39
|
+
def call(ctx, params: {}, **)
|
37
40
|
ctx[@params_path] = @key ? params[@key] : params
|
38
41
|
end
|
39
42
|
end
|
@@ -46,7 +49,7 @@ module Trailblazer
|
|
46
49
|
def call(ctx, **)
|
47
50
|
validate!(
|
48
51
|
ctx,
|
49
|
-
representer: ctx["representer.#{@name}.class"] ||= @representer, # FIXME: maybe @representer should use DI.
|
52
|
+
representer: ctx[:"representer.#{@name}.class"] ||= @representer, # FIXME: maybe @representer should use DI.
|
50
53
|
params_path: @params_path
|
51
54
|
)
|
52
55
|
end
|
@@ -71,5 +74,5 @@ module Trailblazer
|
|
71
74
|
end
|
72
75
|
end
|
73
76
|
end
|
74
|
-
end #
|
77
|
+
end # Macro
|
75
78
|
end
|
data/test/docs/contract_test.rb
CHANGED
@@ -57,15 +57,15 @@ class DocsContractOverviewTest < Minitest::Spec
|
|
57
57
|
it "shows 2-level tracing" do
|
58
58
|
result = Create.trace( params: { length: "A" } )
|
59
59
|
result.wtf.gsub(/0x\w+/, "").must_equal %{`-- DocsContractOverviewTest::Create
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
60
|
+
|-- Start.default
|
61
|
+
|-- model.build
|
62
|
+
|-- contract.build
|
63
|
+
|-- contract.default.validate
|
64
|
+
| |-- Start.default
|
65
|
+
| |-- contract.default.params_extract
|
66
|
+
| |-- contract.default.call
|
67
|
+
| `-- End.failure
|
68
|
+
`-- End.failure}
|
69
69
|
end
|
70
70
|
end
|
71
71
|
#---
|
@@ -297,6 +297,46 @@ class DocsContractKeyWithOutputTest < Minitest::Spec
|
|
297
297
|
end
|
298
298
|
end
|
299
299
|
|
300
|
+
#---
|
301
|
+
#- Validate( name: "default", invalid_data_terminus: true )
|
302
|
+
class DocsContractInvalidEndTest < Minitest::Spec
|
303
|
+
Song = Class.new(ContractConstantTest::Song)
|
304
|
+
|
305
|
+
module Song::Contract
|
306
|
+
Create = ContractConstantTest::Song::Contract::Create
|
307
|
+
end
|
308
|
+
|
309
|
+
#:invalid-end
|
310
|
+
class Song::Create < Trailblazer::Operation
|
311
|
+
step Model( Song, :new )
|
312
|
+
step Contract::Build( constant: Song::Contract::Create )
|
313
|
+
step Contract::Validate( key: :song, invalid_data_terminus: true )
|
314
|
+
step Contract::Persist( )
|
315
|
+
end
|
316
|
+
#:invalid-end end
|
317
|
+
|
318
|
+
it do
|
319
|
+
result = Song::Create.(params: {song: { title: nil, length: nil }})
|
320
|
+
result.event.inspect.must_equal %{#<Trailblazer::Activity::End semantic=:invalid_data>}
|
321
|
+
end
|
322
|
+
|
323
|
+
it { Song::Create.(params: {song: { title: "SVG", length: 13 }}).inspect(:model).must_equal %{<Result:true [#<struct DocsContractInvalidEndTest::Song title=\"SVG\", length=13>] >} }
|
324
|
+
|
325
|
+
it do
|
326
|
+
#:invalid-end-res
|
327
|
+
result = Song::Create.(params: { title: "Rising Force", length: 13 })
|
328
|
+
result.success? #=> false
|
329
|
+
result.event #=> #<Trailblazer::Activity::End semantic=:"contract.default.invalid">
|
330
|
+
#:invalid-end-res end
|
331
|
+
|
332
|
+
#:invalid-end-res-false
|
333
|
+
result = Song::Create.(params: { "song" => { title: "Rising Force", length: 13 } })
|
334
|
+
result.success? #=> true
|
335
|
+
#:invalid-end-res-false end
|
336
|
+
end
|
337
|
+
end
|
338
|
+
|
339
|
+
|
300
340
|
#- Contract::Build[ constant: XXX, name: AAA ]
|
301
341
|
class ContractNamedConstantTest < Minitest::Spec
|
302
342
|
Song = Class.new(ContractConstantTest::Song)
|
@@ -367,16 +407,20 @@ class DryValidationContractTest < Minitest::Spec
|
|
367
407
|
class Create < Trailblazer::Operation
|
368
408
|
# contract to verify params formally.
|
369
409
|
class MyContract < Reform::Form
|
370
|
-
feature
|
410
|
+
feature Dry
|
371
411
|
property :id
|
372
412
|
property :title
|
373
413
|
|
374
414
|
validation name: :default do
|
375
|
-
|
415
|
+
params do
|
416
|
+
required(:id).filled
|
417
|
+
end
|
376
418
|
end
|
377
419
|
|
378
420
|
validation name: :extra, if: :default do
|
379
|
-
|
421
|
+
params do
|
422
|
+
required(:title).filled(min_size?: 2)
|
423
|
+
end
|
380
424
|
end
|
381
425
|
end
|
382
426
|
#~form end
|
@@ -405,8 +449,10 @@ class DryValidationContractTest < Minitest::Spec
|
|
405
449
|
#---
|
406
450
|
# Contract::Validate(constant: DrySchema)
|
407
451
|
class OpWithSchema < Trailblazer::Operation
|
408
|
-
Schema = Dry::Validation.
|
409
|
-
|
452
|
+
Schema = Dry::Validation.Contract do
|
453
|
+
params do
|
454
|
+
required(:title).filled
|
455
|
+
end
|
410
456
|
end
|
411
457
|
|
412
458
|
step Model( Song, :new ) # FIXME.
|
@@ -420,7 +466,7 @@ class DryValidationContractTest < Minitest::Spec
|
|
420
466
|
it "shows error messages" do
|
421
467
|
result = OpWithSchema.(params: {song: { title: nil }})
|
422
468
|
|
423
|
-
result[:"result.contract.default"].errors.must_equal
|
469
|
+
result[:"result.contract.default"].errors.inspect.must_equal %{#<Dry::Validation::MessageSet messages=[#<Dry::Schema::Message text=\"must be filled\" path=[:title] predicate=:filled? input=nil>] options={:source=>[#<Dry::Schema::Message text=\"must be filled\" path=[:title] predicate=:filled? input=nil>], :hints=>false}>}
|
424
470
|
end
|
425
471
|
# key not found
|
426
472
|
it { OpWithSchema.(params: {}).success?.must_equal false }
|
data/test/docs/dry_test.rb
CHANGED
@@ -1,33 +1,33 @@
|
|
1
|
-
require "test_helper"
|
2
|
-
require "dry/container"
|
1
|
+
# require "test_helper"
|
2
|
+
# require "dry/container"
|
3
3
|
|
4
|
-
class DryContainerTest < Minitest::Spec
|
5
|
-
|
4
|
+
# class DryContainerTest < Minitest::Spec
|
5
|
+
# Song = Struct.new(:id, :title)
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
# class MyContract < Reform::Form
|
8
|
+
# property :title
|
9
|
+
# validates :title, length: 2..33
|
10
|
+
# end
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
# my_container = Dry::Container.new
|
13
|
+
# my_container.register("contract.default.class", MyContract)
|
14
|
+
# # my_container.namespace("contract") do
|
15
|
+
# # register("create") { Array }
|
16
|
+
# # end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
# #---
|
19
|
+
# #- dependency injection
|
20
|
+
# #- with Dry-container
|
21
|
+
# class Create < Trailblazer::Operation
|
22
|
+
# extend Trailblazer::Operation::Container
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
24
|
+
# step Model(Song, :new)
|
25
|
+
# step Contract::Build()
|
26
|
+
# step Contract::Validate()
|
27
|
+
# step Contract::Persist(method: :sync)
|
28
|
+
# end
|
29
|
+
# #:key end
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
end
|
31
|
+
# it { Create.({params: {title: "A" } }, my_container).inspect(:model).must_equal %{<Result:false [#<struct DryContainerTest::Song id=nil, title=nil>] >} }
|
32
|
+
# it { Create.({params: {title: "Anthony's Song" } }, my_container).inspect(:model).must_equal %{<Result:true [#<struct DryContainerTest::Song id=nil, title="Anthony's Song">] >} }
|
33
|
+
# end
|
@@ -59,6 +59,8 @@ class ContractTest < Minitest::Spec
|
|
59
59
|
it { Upsert.(params: {song: { title: nil }}).success?.must_equal false }
|
60
60
|
# key not found
|
61
61
|
it { Upsert.(params: {}).success?.must_equal false }
|
62
|
+
# no params passed
|
63
|
+
it { Upsert.().success?.must_equal false }
|
62
64
|
|
63
65
|
#---
|
64
66
|
# contract.default.params gets set (TODO: change in 2.1)
|
data/test/test_helper.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
2
|
+
require "trailblazer-macro-contract"
|
3
|
+
|
1
4
|
require "pp"
|
2
5
|
require 'delegate'
|
6
|
+
require "trailblazer/operation"
|
3
7
|
require "trailblazer/developer"
|
4
8
|
require "trailblazer/macro"
|
5
|
-
require "trailblazer-macro-contract"
|
6
|
-
require "trailblazer/developer/render/linear"
|
7
9
|
require "minitest/autorun"
|
8
10
|
|
9
11
|
# TODO: convert tests to non-rails.
|
@@ -7,8 +7,8 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.version = Trailblazer::Version::Macro::Contract::VERSION
|
8
8
|
spec.authors = ["Nick Sutterer"]
|
9
9
|
spec.email = ["apotonick@gmail.com"]
|
10
|
-
spec.description = '
|
11
|
-
spec.summary = 'Macros for form
|
10
|
+
spec.description = 'Operation macros for form objects'
|
11
|
+
spec.summary = 'Macros for form objects: Build, Validate, Persist'
|
12
12
|
spec.homepage = "http://trailblazer.to"
|
13
13
|
spec.license = "LGPL-3.0"
|
14
14
|
|
@@ -21,13 +21,17 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency "reform", ">= 2.2.0", "< 3.0.0"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler"
|
24
|
-
spec.add_development_dependency "dry-validation"
|
24
|
+
spec.add_development_dependency "dry-validation"
|
25
25
|
spec.add_development_dependency "reform-rails", "~> 0.2.0.rc2"
|
26
|
-
spec.add_development_dependency "trailblazer-
|
26
|
+
spec.add_development_dependency "trailblazer-operation", ">= 0.6.2"
|
27
|
+
spec.add_development_dependency "trailblazer-macro", ">= 2.1.5"
|
27
28
|
spec.add_development_dependency "trailblazer-developer"
|
29
|
+
spec.add_development_dependency "activemodel", "~> 6.0.0" # FIXME: we still don't support the Rails 6.1 errors object.
|
28
30
|
|
29
31
|
spec.add_development_dependency "minitest"
|
30
32
|
spec.add_development_dependency "rake"
|
31
33
|
|
34
|
+
spec.add_dependency "trailblazer-activity-dsl-linear", ">= 0.4.0", "< 0.5.0"
|
35
|
+
|
32
36
|
spec.required_ruby_version = ">= 2.0.0"
|
33
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailblazer-macro-contract
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: reform
|
@@ -48,16 +48,16 @@ dependencies:
|
|
48
48
|
name: dry-validation
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0
|
53
|
+
version: '0'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- -
|
58
|
+
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 0
|
60
|
+
version: '0'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: reform-rails
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,25 +73,33 @@ dependencies:
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: 0.2.0.rc2
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
|
-
name: trailblazer-
|
76
|
+
name: trailblazer-operation
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - ">="
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version:
|
82
|
-
- - "<"
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
version: 2.2.0
|
81
|
+
version: 0.6.2
|
85
82
|
type: :development
|
86
83
|
prerelease: false
|
87
84
|
version_requirements: !ruby/object:Gem::Requirement
|
88
85
|
requirements:
|
89
86
|
- - ">="
|
90
87
|
- !ruby/object:Gem::Version
|
91
|
-
version:
|
92
|
-
|
88
|
+
version: 0.6.2
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: trailblazer-macro
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
93
94
|
- !ruby/object:Gem::Version
|
94
|
-
version: 2.
|
95
|
+
version: 2.1.5
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 2.1.5
|
95
103
|
- !ruby/object:Gem::Dependency
|
96
104
|
name: trailblazer-developer
|
97
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,6 +114,20 @@ dependencies:
|
|
106
114
|
- - ">="
|
107
115
|
- !ruby/object:Gem::Version
|
108
116
|
version: '0'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: activemodel
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 6.0.0
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: 6.0.0
|
109
131
|
- !ruby/object:Gem::Dependency
|
110
132
|
name: minitest
|
111
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,7 +156,27 @@ dependencies:
|
|
134
156
|
- - ">="
|
135
157
|
- !ruby/object:Gem::Version
|
136
158
|
version: '0'
|
137
|
-
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: trailblazer-activity-dsl-linear
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: 0.4.0
|
166
|
+
- - "<"
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: 0.5.0
|
169
|
+
type: :runtime
|
170
|
+
prerelease: false
|
171
|
+
version_requirements: !ruby/object:Gem::Requirement
|
172
|
+
requirements:
|
173
|
+
- - ">="
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
version: 0.4.0
|
176
|
+
- - "<"
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: 0.5.0
|
179
|
+
description: Operation macros for form objects
|
138
180
|
email:
|
139
181
|
- apotonick@gmail.com
|
140
182
|
executables: []
|
@@ -154,10 +196,10 @@ files:
|
|
154
196
|
- Rakefile
|
155
197
|
- lib/trailblazer-macro-contract.rb
|
156
198
|
- lib/trailblazer/macro/contract.rb
|
199
|
+
- lib/trailblazer/macro/contract/build.rb
|
200
|
+
- lib/trailblazer/macro/contract/persist.rb
|
201
|
+
- lib/trailblazer/macro/contract/validate.rb
|
157
202
|
- lib/trailblazer/macro/contract/version.rb
|
158
|
-
- lib/trailblazer/operation/contract.rb
|
159
|
-
- lib/trailblazer/operation/persist.rb
|
160
|
-
- lib/trailblazer/operation/validate.rb
|
161
203
|
- test/docs/contract_test.rb
|
162
204
|
- test/docs/dry_test.rb
|
163
205
|
- test/operation/contract_test.rb
|
@@ -183,11 +225,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
225
|
- !ruby/object:Gem::Version
|
184
226
|
version: '0'
|
185
227
|
requirements: []
|
186
|
-
|
187
|
-
rubygems_version: 2.7.6
|
228
|
+
rubygems_version: 3.2.3
|
188
229
|
signing_key:
|
189
230
|
specification_version: 4
|
190
|
-
summary: 'Macros for form
|
231
|
+
summary: 'Macros for form objects: Build, Validate, Persist'
|
191
232
|
test_files:
|
192
233
|
- test/docs/contract_test.rb
|
193
234
|
- test/docs/dry_test.rb
|