trailblazer 1.1.2 → 2.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +10 -7
  3. data/CHANGES.md +108 -0
  4. data/COMM-LICENSE +91 -0
  5. data/Gemfile +18 -4
  6. data/LICENSE.txt +7 -20
  7. data/README.md +55 -15
  8. data/Rakefile +21 -2
  9. data/draft-1.2.rb +7 -0
  10. data/lib/trailblazer.rb +17 -4
  11. data/lib/trailblazer/dsl.rb +47 -0
  12. data/lib/trailblazer/operation/auto_inject.rb +47 -0
  13. data/lib/trailblazer/operation/builder.rb +18 -18
  14. data/lib/trailblazer/operation/callback.rb +31 -38
  15. data/lib/trailblazer/operation/contract.rb +46 -0
  16. data/lib/trailblazer/operation/controller.rb +45 -27
  17. data/lib/trailblazer/operation/guard.rb +24 -0
  18. data/lib/trailblazer/operation/model.rb +41 -33
  19. data/lib/trailblazer/operation/nested.rb +43 -0
  20. data/lib/trailblazer/operation/params.rb +13 -0
  21. data/lib/trailblazer/operation/persist.rb +13 -0
  22. data/lib/trailblazer/operation/policy.rb +26 -72
  23. data/lib/trailblazer/operation/present.rb +19 -0
  24. data/lib/trailblazer/operation/procedural/contract.rb +15 -0
  25. data/lib/trailblazer/operation/procedural/validate.rb +22 -0
  26. data/lib/trailblazer/operation/pundit.rb +42 -0
  27. data/lib/trailblazer/operation/representer.rb +25 -92
  28. data/lib/trailblazer/operation/rescue.rb +23 -0
  29. data/lib/trailblazer/operation/resolver.rb +18 -24
  30. data/lib/trailblazer/operation/validate.rb +50 -0
  31. data/lib/trailblazer/operation/wrap.rb +37 -0
  32. data/lib/trailblazer/version.rb +1 -1
  33. data/test/{operation/controller_test.rb → controller_test.rb} +8 -4
  34. data/test/docs/auto_inject_test.rb +30 -0
  35. data/test/docs/contract_test.rb +429 -0
  36. data/test/docs/dry_test.rb +31 -0
  37. data/test/docs/guard_test.rb +143 -0
  38. data/test/docs/nested_test.rb +117 -0
  39. data/test/docs/policy_test.rb +2 -0
  40. data/test/docs/pundit_test.rb +109 -0
  41. data/test/docs/representer_test.rb +268 -0
  42. data/test/docs/rescue_test.rb +153 -0
  43. data/test/docs/wrap_test.rb +174 -0
  44. data/test/gemfiles/Gemfile.ruby-1.9 +3 -0
  45. data/test/gemfiles/Gemfile.ruby-2.0 +12 -0
  46. data/test/gemfiles/Gemfile.ruby-2.3 +12 -0
  47. data/test/module_test.rb +22 -15
  48. data/test/operation/builder_test.rb +66 -18
  49. data/test/operation/callback_test.rb +70 -0
  50. data/test/operation/contract_test.rb +385 -15
  51. data/test/operation/dsl/callback_test.rb +18 -30
  52. data/test/operation/dsl/contract_test.rb +209 -19
  53. data/test/operation/dsl/representer_test.rb +42 -15
  54. data/test/operation/guard_test.rb +1 -147
  55. data/test/operation/model_test.rb +105 -0
  56. data/test/operation/params_test.rb +36 -0
  57. data/test/operation/persist_test.rb +44 -0
  58. data/test/operation/pipedream_test.rb +59 -0
  59. data/test/operation/pipetree_test.rb +104 -0
  60. data/test/operation/present_test.rb +24 -0
  61. data/test/operation/pundit_test.rb +104 -0
  62. data/test/{representer_test.rb → operation/representer_test.rb} +58 -42
  63. data/test/operation/resolver_test.rb +34 -70
  64. data/test/operation_test.rb +57 -189
  65. data/test/test_helper.rb +23 -3
  66. data/trailblazer.gemspec +8 -7
  67. metadata +91 -59
  68. data/gemfiles/Gemfile.rails.lock +0 -130
  69. data/gemfiles/Gemfile.reform-2.0 +0 -6
  70. data/gemfiles/Gemfile.reform-2.1 +0 -7
  71. data/lib/trailblazer/autoloading.rb +0 -15
  72. data/lib/trailblazer/endpoint.rb +0 -31
  73. data/lib/trailblazer/operation.rb +0 -175
  74. data/lib/trailblazer/operation/collection.rb +0 -6
  75. data/lib/trailblazer/operation/dispatch.rb +0 -3
  76. data/lib/trailblazer/operation/model/dsl.rb +0 -29
  77. data/lib/trailblazer/operation/model/external.rb +0 -34
  78. data/lib/trailblazer/operation/policy/guard.rb +0 -35
  79. data/lib/trailblazer/operation/uploaded_file.rb +0 -77
  80. data/test/callback_test.rb +0 -104
  81. data/test/collection_test.rb +0 -57
  82. data/test/model_test.rb +0 -148
  83. data/test/operation/external_model_test.rb +0 -71
  84. data/test/operation/policy_test.rb +0 -97
  85. data/test/operation/reject_test.rb +0 -34
  86. data/test/rollback_test.rb +0 -47
@@ -7,73 +7,18 @@ module Inspect
7
7
  alias_method :to_s, :inspect
8
8
  end
9
9
 
10
- class OperationSetupParamsTest < MiniTest::Spec
11
- class OperationSetupParam < Trailblazer::Operation
12
- def process(params)
13
- @model = params
14
- end
15
-
16
- def setup_params!(params)
17
- params.merge!(garrett: "Rocks!")
18
- end
19
-
20
- include Inspect
21
- end
22
-
23
- # allows you changing params in #setup_params!.
24
- it { OperationSetupParam.run({valid: true}).to_s.must_equal "[true, <OperationSetupParam @model={:valid=>true, :garrett=>\"Rocks!\"}>]" }
25
- end
26
-
27
- class OperationParamsTest < MiniTest::Spec
28
- class Operation < Trailblazer::Operation
29
- def process(params)
30
- @model = "#{params} and #{@params==params}"
31
- end
32
-
33
- def params!(params)
34
- { params: params }
35
- end
36
- end
37
-
38
- # allows you returning new params in #params!.
39
- it { Operation.({valid: true}).model.to_s.must_equal "{:params=>{:valid=>true}} and true" }
40
- end
41
-
42
- # Operation#model.
43
- class OperationModelTest < MiniTest::Spec
44
- class Operation < Trailblazer::Operation
45
- def process(params)
46
- end
47
-
48
- def model!(params)
49
- params
50
- end
51
- end
52
-
53
- # #model.
54
- it { Operation.(Object).model.must_equal Object }
55
- end
56
-
57
- # Operation#model=.
58
- class OperationModelWriterTest < MiniTest::Spec
10
+ class OperationRunTest < MiniTest::Spec
59
11
  class Operation < Trailblazer::Operation
60
- def process(params)
61
- self.model = "#{params}"
62
- end
63
- end
64
12
 
65
- it { Operation.("I can set @model via a private setter").model.to_s.must_equal "I can set @model via a private setter" }
66
- end
13
+ require "trailblazer/operation/contract"
14
+ include Contract::Explicit
67
15
 
68
- class OperationRunTest < MiniTest::Spec
69
- class Operation < Trailblazer::Operation
70
16
  # allow providing your own contract.
71
- self.contract_class = class Contract
17
+ self["contract.default.class"] = class MyContract
72
18
  def initialize(*)
73
19
  end
74
- def validate(params)
75
- return true if params == "yes, true"
76
- false
20
+ def call(params)
21
+ Mock::Result.new(params)
77
22
  end
78
23
 
79
24
  def errors
@@ -84,192 +29,115 @@ class OperationRunTest < MiniTest::Spec
84
29
 
85
30
  def process(params)
86
31
  model = Object
87
- validate(params, model)
32
+ validate(params, model: model)
88
33
  end
89
34
 
90
35
  include Inspect
91
36
  end
92
37
 
93
- # contract is inferred from self::contract_class.
94
- # ::run returns result set when run without block.
95
- it { Operation.run("not true").to_s.must_equal %{[false, <Operation @model=>]} }
96
- it { Operation.run("yes, true").to_s.must_equal %{[true, <Operation @model=>]} }
97
-
98
- # ::call raises exception when invalid.
99
- it do
100
- exception = assert_raises(Trailblazer::Operation::InvalidContract) { Operation.("not true") }
101
- exception.message.must_equal "Op just calls #to_s on Errors!"
102
- end
103
-
104
- # return operation when ::call
105
- it { Operation.("yes, true").to_s.must_equal %{<Operation @model=>} }
106
- # #[] is alias for .()
107
- it { Operation["yes, true"].to_s.must_equal %{<Operation @model=>} }
108
-
109
-
110
- # ::run with block returns operation.
111
- # valid executes block.
112
- it "block" do
113
- outcome = nil
114
- res = Operation.run("yes, true") do
115
- outcome = "true"
116
- end
117
-
118
- outcome.must_equal "true" # block was executed.
119
- res.to_s.must_equal %{<Operation @model=>}
120
- end
121
-
122
- # invalid doesn't execute block.
123
- it "block, invalid" do
124
- outcome = nil
125
- res = Operation.run("no, not true, false") do
126
- outcome = "true"
127
- end
128
-
129
- outcome.must_equal nil # block was _not_ executed.
130
- res.to_s.must_equal %{<Operation @model=>}
131
- end
132
-
133
- # block yields operation
134
- it do
135
- outcome = nil
136
- res = Operation.run("yes, true") do |op|
137
- outcome = op
138
- end
139
-
140
- outcome.to_s.must_equal %{<Operation @model=>} # block was executed.
141
- res.to_s.must_equal %{<Operation @model=>}
142
- end
143
-
144
- # # Operation#contract returns @contract
145
- it { Operation.("yes, true").contract.class.to_s.must_equal "OperationRunTest::Operation::Contract" }
146
-
147
-
148
38
 
39
+ describe "Raise" do
40
+ class Follow < Trailblazer::Operation
41
+ require "trailblazer/operation/raise"
42
+ require "trailblazer/operation/contract"
43
+ include Contract::Explicit
44
+ contract do
45
+ end
149
46
 
150
- describe "::present" do
151
- class NoContractOp < Trailblazer::Operation
152
- self.contract_class = nil
47
+ module Validate
48
+ def validate(is_valid)
49
+ is_valid
50
+ end
51
+ end
52
+ include Validate
53
+ include Contract::Raise
153
54
 
154
- def model!(*)
155
- Object
55
+ def process(params)
56
+ validate(params[:is_valid])
156
57
  end
157
58
  end
158
-
159
- # the operation and model are available, but no contract.
160
- it { NoContractOp.present({}).model.must_equal Object }
161
- # no contract is built.
162
- it { assert_raises(NoMethodError) { NoContractOp.present({}).contract } }
163
- it { assert_raises(NoMethodError) { NoContractOp.run({}) } }
59
+ # #validate raises exception when invalid.
60
+ it do
61
+ exception = assert_raises(Trailblazer::Operation::InvalidContract) { Follow.(is_valid: false) }
62
+ # exception.message.must_equal "Op just calls #to_s on Errors!"
63
+ end
64
+ it { Follow.(is_valid:true).success?.must_equal true }
164
65
  end
165
66
  end
166
67
 
167
68
 
168
69
  class OperationTest < MiniTest::Spec
169
- # test #invalid!
170
- class OperationWithoutValidateCall < Trailblazer::Operation
171
- def process(params)
172
- params || invalid!(params)
173
- end
174
-
175
- include Inspect
176
- end
177
-
178
- # ::run
179
- it { OperationWithoutValidateCall.run(true).to_s.must_equal %{[true, <OperationWithoutValidateCall @model=>]} }
180
- # invalid.
181
- it { OperationWithoutValidateCall.run(false).to_s.must_equal %{[false, <OperationWithoutValidateCall @model=>]} }
182
-
183
-
184
70
  # #validate yields contract when valid
185
71
  class OperationWithValidateBlock < Trailblazer::Operation
186
- self.contract_class = class Contract
72
+ require "trailblazer/operation/contract"
73
+ include Contract::Explicit
74
+ self["contract.default.class"] = class Contract
187
75
  def initialize(*)
188
76
  end
189
77
 
190
- def validate(params)
191
- params
78
+ def call(params)
79
+ Mock::Result.new(params)
192
80
  end
81
+
82
+ attr_reader :errors
193
83
  self
194
84
  end
195
85
 
196
86
  def process(params)
197
- validate(params, Object.new) do |c|
198
- @secret_contract = c.class
87
+ validate(params, model: Object.new) do |c|
88
+ self["secret_contract"] = c.class
199
89
  end
200
90
  end
201
-
202
- attr_reader :secret_contract
203
91
  end
204
92
 
205
- it { OperationWithValidateBlock.run(false).last.secret_contract.must_equal nil }
206
- it { OperationWithValidateBlock.(true).secret_contract.must_equal OperationWithValidateBlock::Contract }
93
+ it { OperationWithValidateBlock.(false)["secret_contract"].must_equal nil }
94
+ it { OperationWithValidateBlock.(true)["secret_contract"].to_s.must_equal "Mock::Result" }
207
95
 
208
96
 
209
97
  # test validate wit if/else
210
98
  class OperationWithValidateAndIf < Trailblazer::Operation
211
- self.contract_class = class Contract
99
+ require "trailblazer/operation/contract"
100
+ include Contract::Explicit
101
+ self["contract.default.class"] = class Contract
212
102
  def initialize(*)
213
103
  end
214
104
 
215
- def validate(params)
216
- params
105
+ def call(params)
106
+ Mock::Result.new(params)
217
107
  end
108
+ attr_reader :errors
218
109
  self
219
110
  end
220
111
 
221
112
  def process(params)
222
- if validate(params, Object.new)
223
- @secret_contract = contract.class
113
+ if validate(params, model: Object.new)
114
+ self["secret_contract"] = contract.class
224
115
  else
225
- @secret_contract = "so wrong!"
116
+ self["secret_contract"] = "so wrong!"
226
117
  end
227
118
  end
228
-
229
- attr_reader :secret_contract
230
- end
231
-
232
- it { OperationWithValidateAndIf.run(false).last.secret_contract.must_equal "so wrong!" }
233
- it { OperationWithValidateAndIf.(true).secret_contract.must_equal OperationWithValidateAndIf::Contract }
234
-
235
-
236
-
237
- # ::present only runs #setup! which runs #model!.
238
- class ContractOnlyOperation < Trailblazer::Operation
239
- self.contract_class = class Contract
240
- def initialize(model)
241
- @_model = model
242
- end
243
- attr_reader :_model
244
- self
245
- end
246
-
247
- def model!(params)
248
- Object
249
- end
250
-
251
- def process(params)
252
- raise "This is not run!"
253
- end
254
119
  end
255
120
 
256
- it { ContractOnlyOperation.present({}).contract._model.must_equal Object }
121
+ it { OperationWithValidateAndIf.(false)["secret_contract"].must_equal "so wrong!" }
122
+ it { OperationWithValidateAndIf.(true)["secret_contract"].must_equal OperationWithValidateAndIf::Contract }
257
123
  end
258
124
 
259
125
 
260
126
  class OperationErrorsTest < MiniTest::Spec
261
127
  class Operation < Trailblazer::Operation
128
+ require "trailblazer/operation/contract"
129
+ include Contract::Explicit
262
130
  contract do
263
- property :title, validates: {presence: true}
131
+ property :title, validates: { presence: true }
264
132
  end
265
133
 
266
134
  def process(params)
267
- validate(params, OpenStruct.new) {}
135
+ validate(params, model: OpenStruct.new) {}
268
136
  end
269
137
  end
270
138
 
271
139
  it do
272
- res, op = Operation.run({})
273
- op.errors.to_s.must_equal "{:title=>[\"can't be blank\"]}"
140
+ result = Operation.({})
141
+ result["errors.contract"].to_s.must_equal "{:title=>[\"can't be blank\"]}"
274
142
  end
275
143
  end
data/test/test_helper.rb CHANGED
@@ -1,9 +1,29 @@
1
- require 'trailblazer'
2
- require 'minitest/autorun'
1
+ require "trailblazer"
2
+ require "minitest/autorun"
3
3
 
4
+ # TODO: convert tests to non-rails.
5
+ require "reform"
4
6
  require "reform/form/active_model/validations"
5
7
  Reform::Form.class_eval do
6
8
  include Reform::Form::ActiveModel::Validations
7
9
  end
8
10
 
9
- require "trailblazer/operation/model"
11
+ require "trailblazer/operation/callback"
12
+ require "trailblazer/operation/procedural/validate"
13
+
14
+ module Mock
15
+ class Result
16
+ def initialize(bool); @bool = bool end
17
+ def success?; @bool end
18
+ def errors; ["hihi"] end
19
+ end
20
+ end
21
+
22
+ module Test
23
+ module ReturnCall
24
+ def self.included(includer)
25
+ includer._insert :_insert, ReturnResult, {replace: Trailblazer::Operation::Result::Build}, ReturnResult, ""
26
+ end
27
+ end
28
+ ReturnResult = ->(last, input, options) { input }
29
+ end
data/trailblazer.gemspec CHANGED
@@ -7,19 +7,19 @@ Gem::Specification.new do |spec|
7
7
  spec.version = Trailblazer::VERSION
8
8
  spec.authors = ["Nick Sutterer"]
9
9
  spec.email = ["apotonick@gmail.com"]
10
- spec.description = %q{A high-level, modular architecture for Ruby framworks with domain and form objects, view models, twin decorators and representers.}
10
+ spec.description = %q{A high-level architecture for Ruby introducing new abstractions such as operations, form objects or policies.}
11
11
  spec.summary = %q{A high-level architecture for Ruby and Rails.}
12
12
  spec.homepage = "http://trailblazer.to"
13
- spec.license = "MIT"
13
+ spec.license = "LGPL-3.0"
14
14
 
15
15
  spec.files = `git ls-files`.split($/)
16
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
19
 
20
-
21
- spec.add_dependency "uber", ">= 0.0.15", "< 0.1.0"
22
- spec.add_dependency "reform", ">= 2.0.0", "< 3.0.0"
20
+ spec.add_dependency "trailblazer-operation"
21
+ spec.add_dependency "uber", ">= 0.1.0", "< 0.2.0"
22
+ spec.add_dependency "reform", ">= 2.2.0", "< 3.0.0"
23
23
  spec.add_dependency "declarative"
24
24
 
25
25
  spec.add_development_dependency "activemodel" # for Reform::AM::V
@@ -27,8 +27,9 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "bundler"
28
28
  spec.add_development_dependency "rake"
29
29
  spec.add_development_dependency "minitest"
30
- spec.add_development_dependency "sqlite3"
31
- spec.add_development_dependency "database_cleaner"
30
+ spec.add_development_dependency "nokogiri"
32
31
 
33
32
  spec.add_development_dependency "roar"
33
+ # spec.required_ruby_version = '>= 1.9.3'
34
+ spec.required_ruby_version = '>= 2.0.0'
34
35
  end
metadata CHANGED
@@ -1,42 +1,56 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 2.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-17 00:00:00.000000000 Z
11
+ date: 2016-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: trailblazer-operation
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: uber
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - ">="
18
32
  - !ruby/object:Gem::Version
19
- version: 0.0.15
33
+ version: 0.1.0
20
34
  - - "<"
21
35
  - !ruby/object:Gem::Version
22
- version: 0.1.0
36
+ version: 0.2.0
23
37
  type: :runtime
24
38
  prerelease: false
25
39
  version_requirements: !ruby/object:Gem::Requirement
26
40
  requirements:
27
41
  - - ">="
28
42
  - !ruby/object:Gem::Version
29
- version: 0.0.15
43
+ version: 0.1.0
30
44
  - - "<"
31
45
  - !ruby/object:Gem::Version
32
- version: 0.1.0
46
+ version: 0.2.0
33
47
  - !ruby/object:Gem::Dependency
34
48
  name: reform
35
49
  requirement: !ruby/object:Gem::Requirement
36
50
  requirements:
37
51
  - - ">="
38
52
  - !ruby/object:Gem::Version
39
- version: 2.0.0
53
+ version: 2.2.0
40
54
  - - "<"
41
55
  - !ruby/object:Gem::Version
42
56
  version: 3.0.0
@@ -46,7 +60,7 @@ dependencies:
46
60
  requirements:
47
61
  - - ">="
48
62
  - !ruby/object:Gem::Version
49
- version: 2.0.0
63
+ version: 2.2.0
50
64
  - - "<"
51
65
  - !ruby/object:Gem::Version
52
66
  version: 3.0.0
@@ -121,21 +135,7 @@ dependencies:
121
135
  - !ruby/object:Gem::Version
122
136
  version: '0'
123
137
  - !ruby/object:Gem::Dependency
124
- name: sqlite3
125
- requirement: !ruby/object:Gem::Requirement
126
- requirements:
127
- - - ">="
128
- - !ruby/object:Gem::Version
129
- version: '0'
130
- type: :development
131
- prerelease: false
132
- version_requirements: !ruby/object:Gem::Requirement
133
- requirements:
134
- - - ">="
135
- - !ruby/object:Gem::Version
136
- version: '0'
137
- - !ruby/object:Gem::Dependency
138
- name: database_cleaner
138
+ name: nokogiri
139
139
  requirement: !ruby/object:Gem::Requirement
140
140
  requirements:
141
141
  - - ">="
@@ -162,8 +162,8 @@ dependencies:
162
162
  - - ">="
163
163
  - !ruby/object:Gem::Version
164
164
  version: '0'
165
- description: A high-level, modular architecture for Ruby framworks with domain and
166
- form objects, view models, twin decorators and representers.
165
+ description: A high-level architecture for Ruby introducing new abstractions such
166
+ as operations, form objects or policies.
167
167
  email:
168
168
  - apotonick@gmail.com
169
169
  executables: []
@@ -173,6 +173,7 @@ files:
173
173
  - ".gitignore"
174
174
  - ".travis.yml"
175
175
  - CHANGES.md
176
+ - COMM-LICENSE
176
177
  - Gemfile
177
178
  - LICENSE.txt
178
179
  - README.md
@@ -181,51 +182,68 @@ files:
181
182
  - TODO.md
182
183
  - doc/Trb-The-Stack.png
183
184
  - doc/trb.jpg
184
- - gemfiles/Gemfile.rails.lock
185
- - gemfiles/Gemfile.reform-2.0
186
- - gemfiles/Gemfile.reform-2.1
185
+ - draft-1.2.rb
187
186
  - lib/trailblazer.rb
188
- - lib/trailblazer/autoloading.rb
189
- - lib/trailblazer/endpoint.rb
190
- - lib/trailblazer/operation.rb
187
+ - lib/trailblazer/dsl.rb
188
+ - lib/trailblazer/operation/auto_inject.rb
191
189
  - lib/trailblazer/operation/builder.rb
192
190
  - lib/trailblazer/operation/callback.rb
193
- - lib/trailblazer/operation/collection.rb
191
+ - lib/trailblazer/operation/contract.rb
194
192
  - lib/trailblazer/operation/controller.rb
195
- - lib/trailblazer/operation/dispatch.rb
193
+ - lib/trailblazer/operation/guard.rb
196
194
  - lib/trailblazer/operation/model.rb
197
- - lib/trailblazer/operation/model/dsl.rb
198
- - lib/trailblazer/operation/model/external.rb
199
195
  - lib/trailblazer/operation/module.rb
196
+ - lib/trailblazer/operation/nested.rb
197
+ - lib/trailblazer/operation/params.rb
198
+ - lib/trailblazer/operation/persist.rb
200
199
  - lib/trailblazer/operation/policy.rb
201
- - lib/trailblazer/operation/policy/guard.rb
200
+ - lib/trailblazer/operation/present.rb
201
+ - lib/trailblazer/operation/procedural/contract.rb
202
+ - lib/trailblazer/operation/procedural/validate.rb
203
+ - lib/trailblazer/operation/pundit.rb
202
204
  - lib/trailblazer/operation/representer.rb
205
+ - lib/trailblazer/operation/rescue.rb
203
206
  - lib/trailblazer/operation/resolver.rb
204
- - lib/trailblazer/operation/uploaded_file.rb
207
+ - lib/trailblazer/operation/validate.rb
208
+ - lib/trailblazer/operation/wrap.rb
205
209
  - lib/trailblazer/version.rb
206
- - test/callback_test.rb
207
- - test/collection_test.rb
208
- - test/model_test.rb
210
+ - test/controller_test.rb
211
+ - test/docs/auto_inject_test.rb
212
+ - test/docs/contract_test.rb
213
+ - test/docs/dry_test.rb
214
+ - test/docs/guard_test.rb
215
+ - test/docs/nested_test.rb
216
+ - test/docs/policy_test.rb
217
+ - test/docs/pundit_test.rb
218
+ - test/docs/representer_test.rb
219
+ - test/docs/rescue_test.rb
220
+ - test/docs/wrap_test.rb
221
+ - test/gemfiles/Gemfile.ruby-1.9
222
+ - test/gemfiles/Gemfile.ruby-2.0
223
+ - test/gemfiles/Gemfile.ruby-2.3
209
224
  - test/module_test.rb
210
225
  - test/operation/builder_test.rb
226
+ - test/operation/callback_test.rb
211
227
  - test/operation/contract_test.rb
212
- - test/operation/controller_test.rb
213
228
  - test/operation/dsl/callback_test.rb
214
229
  - test/operation/dsl/contract_test.rb
215
230
  - test/operation/dsl/representer_test.rb
216
- - test/operation/external_model_test.rb
217
231
  - test/operation/guard_test.rb
218
- - test/operation/policy_test.rb
219
- - test/operation/reject_test.rb
232
+ - test/operation/model_test.rb
233
+ - test/operation/params_test.rb
234
+ - test/operation/persist_test.rb
235
+ - test/operation/pipedream_test.rb
236
+ - test/operation/pipetree_test.rb
237
+ - test/operation/present_test.rb
238
+ - test/operation/pundit_test.rb
239
+ - test/operation/representer_test.rb
220
240
  - test/operation/resolver_test.rb
221
241
  - test/operation_test.rb
222
- - test/representer_test.rb
223
- - test/rollback_test.rb
224
242
  - test/test_helper.rb
225
243
  - trailblazer.gemspec
226
244
  homepage: http://trailblazer.to
227
245
  licenses:
228
- - MIT
246
+ - LGPL-3.0
229
247
  metadata: {}
230
248
  post_install_message:
231
249
  rdoc_options: []
@@ -235,12 +253,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
235
253
  requirements:
236
254
  - - ">="
237
255
  - !ruby/object:Gem::Version
238
- version: '0'
256
+ version: 2.0.0
239
257
  required_rubygems_version: !ruby/object:Gem::Requirement
240
258
  requirements:
241
- - - ">="
259
+ - - ">"
242
260
  - !ruby/object:Gem::Version
243
- version: '0'
261
+ version: 1.3.1
244
262
  requirements: []
245
263
  rubyforge_project:
246
264
  rubygems_version: 2.6.3
@@ -248,22 +266,36 @@ signing_key:
248
266
  specification_version: 4
249
267
  summary: A high-level architecture for Ruby and Rails.
250
268
  test_files:
251
- - test/callback_test.rb
252
- - test/collection_test.rb
253
- - test/model_test.rb
269
+ - test/controller_test.rb
270
+ - test/docs/auto_inject_test.rb
271
+ - test/docs/contract_test.rb
272
+ - test/docs/dry_test.rb
273
+ - test/docs/guard_test.rb
274
+ - test/docs/nested_test.rb
275
+ - test/docs/policy_test.rb
276
+ - test/docs/pundit_test.rb
277
+ - test/docs/representer_test.rb
278
+ - test/docs/rescue_test.rb
279
+ - test/docs/wrap_test.rb
280
+ - test/gemfiles/Gemfile.ruby-1.9
281
+ - test/gemfiles/Gemfile.ruby-2.0
282
+ - test/gemfiles/Gemfile.ruby-2.3
254
283
  - test/module_test.rb
255
284
  - test/operation/builder_test.rb
285
+ - test/operation/callback_test.rb
256
286
  - test/operation/contract_test.rb
257
- - test/operation/controller_test.rb
258
287
  - test/operation/dsl/callback_test.rb
259
288
  - test/operation/dsl/contract_test.rb
260
289
  - test/operation/dsl/representer_test.rb
261
- - test/operation/external_model_test.rb
262
290
  - test/operation/guard_test.rb
263
- - test/operation/policy_test.rb
264
- - test/operation/reject_test.rb
291
+ - test/operation/model_test.rb
292
+ - test/operation/params_test.rb
293
+ - test/operation/persist_test.rb
294
+ - test/operation/pipedream_test.rb
295
+ - test/operation/pipetree_test.rb
296
+ - test/operation/present_test.rb
297
+ - test/operation/pundit_test.rb
298
+ - test/operation/representer_test.rb
265
299
  - test/operation/resolver_test.rb
266
300
  - test/operation_test.rb
267
- - test/representer_test.rb
268
- - test/rollback_test.rb
269
301
  - test/test_helper.rb