trailblazer 2.0.7 → 2.1.0

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.
Files changed (72) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.rubocop-https---raw-githubusercontent-com-trailblazer-meta-master-rubocop-yml +101 -0
  4. data/.rubocop.yml +20 -0
  5. data/.rubocop_todo.yml +556 -0
  6. data/.travis.yml +6 -10
  7. data/CHANGES.md +83 -1
  8. data/COMM-LICENSE +46 -75
  9. data/CONTRIBUTING.md +179 -0
  10. data/Gemfile +0 -27
  11. data/{LICENSE.txt → LICENSE} +4 -4
  12. data/README.md +39 -138
  13. data/Rakefile +2 -19
  14. data/lib/trailblazer.rb +3 -17
  15. data/lib/trailblazer/version.rb +3 -1
  16. data/test/test_helper.rb +12 -3
  17. data/trailblazer.gemspec +10 -14
  18. metadata +22 -147
  19. data/doc/Trb-The-Stack.png +0 -0
  20. data/doc/operation-2017.png +0 -0
  21. data/doc/trb.jpg +0 -0
  22. data/lib/trailblazer/dsl.rb +0 -47
  23. data/lib/trailblazer/operation/auto_inject.rb +0 -47
  24. data/lib/trailblazer/operation/callback.rb +0 -35
  25. data/lib/trailblazer/operation/contract.rb +0 -46
  26. data/lib/trailblazer/operation/guard.rb +0 -18
  27. data/lib/trailblazer/operation/model.rb +0 -60
  28. data/lib/trailblazer/operation/module.rb +0 -29
  29. data/lib/trailblazer/operation/nested.rb +0 -113
  30. data/lib/trailblazer/operation/persist.rb +0 -10
  31. data/lib/trailblazer/operation/policy.rb +0 -35
  32. data/lib/trailblazer/operation/procedural/contract.rb +0 -15
  33. data/lib/trailblazer/operation/procedural/validate.rb +0 -22
  34. data/lib/trailblazer/operation/pundit.rb +0 -38
  35. data/lib/trailblazer/operation/representer.rb +0 -31
  36. data/lib/trailblazer/operation/rescue.rb +0 -21
  37. data/lib/trailblazer/operation/test.rb +0 -17
  38. data/lib/trailblazer/operation/validate.rb +0 -68
  39. data/lib/trailblazer/operation/wrap.rb +0 -25
  40. data/test/docs/auto_inject_test.rb +0 -30
  41. data/test/docs/contract_test.rb +0 -525
  42. data/test/docs/dry_test.rb +0 -31
  43. data/test/docs/fast_test.rb +0 -164
  44. data/test/docs/guard_test.rb +0 -169
  45. data/test/docs/macro_test.rb +0 -36
  46. data/test/docs/model_test.rb +0 -75
  47. data/test/docs/nested_test.rb +0 -334
  48. data/test/docs/operation_test.rb +0 -408
  49. data/test/docs/policy_test.rb +0 -2
  50. data/test/docs/pundit_test.rb +0 -133
  51. data/test/docs/representer_test.rb +0 -268
  52. data/test/docs/rescue_test.rb +0 -154
  53. data/test/docs/wrap_test.rb +0 -183
  54. data/test/gemfiles/Gemfile.ruby-1.9 +0 -3
  55. data/test/gemfiles/Gemfile.ruby-2.0 +0 -12
  56. data/test/gemfiles/Gemfile.ruby-2.3 +0 -12
  57. data/test/module_test.rb +0 -100
  58. data/test/operation/callback_test.rb +0 -70
  59. data/test/operation/contract_test.rb +0 -420
  60. data/test/operation/dsl/callback_test.rb +0 -106
  61. data/test/operation/dsl/contract_test.rb +0 -294
  62. data/test/operation/dsl/representer_test.rb +0 -169
  63. data/test/operation/model_test.rb +0 -60
  64. data/test/operation/params_test.rb +0 -36
  65. data/test/operation/persist_test.rb +0 -44
  66. data/test/operation/pipedream_test.rb +0 -59
  67. data/test/operation/pipetree_test.rb +0 -104
  68. data/test/operation/present_test.rb +0 -24
  69. data/test/operation/pundit_test.rb +0 -104
  70. data/test/operation/representer_test.rb +0 -254
  71. data/test/operation/resolver_test.rb +0 -47
  72. data/test/operation_test.rb +0 -143
@@ -1,9 +1,9 @@
1
- Copyright (c) Nick Sutterer
1
+ Copyright (c) 2018 Trailblazer GmbH
2
2
 
3
3
  Trailblazer is an Open Source project licensed under the terms of
4
4
  the LGPLv3 license. Please see <http://www.gnu.org/licenses/lgpl-3.0.html>
5
5
  for license text.
6
6
 
7
- Trailblazer Enterprise has a commercial-friendly license allowing private forks
8
- and modifications of Trailblazer. Please see http://trailblazer.to/enterprise/ for
9
- more detail. You can find the commercial license terms in COMM-LICENSE.
7
+ Trailblazer PRO has a commercial-friendly license allowing private forks
8
+ and modifications of Trailblazer. Please see http://trailblazer.to/pro for
9
+ more detail.
data/README.md CHANGED
@@ -1,22 +1,30 @@
1
1
  # Trailblazer
2
2
 
3
- _Trailblazer provides new high-level abstractions for Ruby frameworks. It gently enforces encapsulation, an intuitive code structure and gives you an object-oriented architecture._
3
+ _Trailblazer provides new high-level abstractions for Ruby frameworks. It gently enforces encapsulation, an intuitive code structure and approaches the modeling of complex business workflows with a functional mind-set._
4
4
 
5
5
  [![Gitter Chat](https://badges.gitter.im/trailblazer/chat.svg)](https://gitter.im/trailblazer/chat)
6
6
  [![TRB Newsletter](https://img.shields.io/badge/TRB-newsletter-lightgrey.svg)](http://trailblazer.to/newsletter/)
7
7
  [![Gem Version](https://badge.fury.io/rb/trailblazer.svg)](http://badge.fury.io/rb/trailblazer)
8
+ [![Open Source Helpers](https://www.codetriage.com/trailblazer/trailblazer/badges/users.svg)](https://www.codetriage.com/trailblazer/trailblazer)
8
9
 
9
- **This document discusses Trailblazer 2.0. The [1.x documentation is here](http://trailblazer.to/gems/operation/1.1/).**
10
+ ## Documentation
11
+
12
+ **This document discusses Trailblazer 2.1.** An overview about the additions are [on our website](http://2019.trailblazer.to/2.1/docs/trailblazer.html#trailblazer-2-1-migration).
13
+
14
+ We're working on several new example applications!
15
+
16
+ * *Refactoring to Trailblazer* discusses how the cfp-app is converted into a TRB app.
17
+ * *BPMN and workflows* shows in-detail how the new 2.1 features in Trailblazer are used.
18
+
19
+ The [1.x documentation is here](http://trailblazer.to/gems/operation/1.1/).
10
20
 
11
21
  ## Trailblazer In A Nutshell
12
22
 
13
23
  1. All business logic is encapsulated in [operations](#operation) (service objects).
14
- * Optional [validation objects](#validation) (Reform and/or Dry-validation) in the operation deserialize and validate input. The form object can also be used for rendering.
15
- * An optional [policy](#policies) object blocks unauthorized users from running the operation.
16
- * Optional [callback](#callbacks) objects allow declaring post-processing logic.
17
24
  3. [Controllers](#controllers) instantly delegate to an operation. No business code in controllers, only HTTP-specific logic.
18
25
  4. [Models](#models) are persistence-only and solely define associations and scopes. No business code is to be found here. No validations, no callbacks.
19
26
  5. The presentation layer offers optional [view models](#views) (Cells) and [representers](#representers) for document APIs.
27
+ 6. More complex business flows and life-cycles are modeled using workflows.
20
28
 
21
29
  Trailblazer is designed to handle different contexts like user roles by applying [inheritance](#inheritance) between and [composing](#composing) of operations, form objects, policies, representers and callbacks.
22
30
 
@@ -39,7 +47,7 @@ Trailblazer offers you a new, more intuitive file layout in applications.
39
47
  ```
40
48
  app
41
49
  ├── concepts
42
- │ ├── comment
50
+ │ ├── song
43
51
  │ │ ├── operation
44
52
  │ │ │ ├── create.rb
45
53
  │ │ │ ├── update.rb
@@ -52,17 +60,13 @@ app
52
60
  │ │ ├── view
53
61
  │ │ │ ├── show.haml
54
62
  │ │ │ ├── index.rb
55
- │ │ │ ├── comment.css.sass
63
+ │ │ │ ├── song.css.sass
56
64
  ```
57
65
 
58
66
  Instead of grouping by technology, classes and views are structured by *concept*, and then by technology. A concept can relate to a model, or can be a completely abstract concern such as `invoicing`.
59
67
 
60
68
  Within a concept, you can have any level of nesting. For example, `invoicing/pdf/` could be one.
61
69
 
62
- The file structure is implemented by the [`trailblazer-loader` gem](https://github.com/trailblazer/trailblazer-loader).
63
-
64
- [Learn more.](http://trailblazer.to/gems/trailblazer/loader.html)
65
-
66
70
 
67
71
  ## Architecture
68
72
 
@@ -78,7 +82,7 @@ Trailblazer uses Rails routing to map URLs to controllers, because it works.
78
82
 
79
83
  ```ruby
80
84
  Rails.application.routes.draw do
81
- resources :comments
85
+ resources :songs
82
86
  end
83
87
  ```
84
88
 
@@ -87,9 +91,9 @@ end
87
91
  Controllers are lean endpoints for HTTP. They do not contain any business logic. Actions immediately dispatch to an operation.
88
92
 
89
93
  ```ruby
90
- class CommentsController < ApplicationController
94
+ class SongsController < ApplicationController
91
95
  def create
92
- run Comment::Create # Comment::Create is an operation class.
96
+ run Song::Create # Song::Create is an operation class.
93
97
  end
94
98
  end
95
99
  ```
@@ -97,10 +101,10 @@ end
97
101
  The `#run` method invokes the operation. It allows you to run a conditional block of logic if the operation was successful.
98
102
 
99
103
  ```ruby
100
- class CommentsController < ApplicationController
104
+ class SongsController < ApplicationController
101
105
  def create
102
- run Comment::Create do |op|
103
- return redirect_to(comment_path op.model) # success!
106
+ run Song::Create do |op|
107
+ return redirect_to(song_path op.model) # success!
104
108
  end
105
109
 
106
110
  render :new # invalid. re-render form.
@@ -123,59 +127,33 @@ Operations don't know about HTTP or the environment. You could use an operation
123
127
  An operation is not just a monolithic replacement for your business code. It's a simple orchestrator between the form objects, models, your business code and all other layers needed to get the job done.
124
128
 
125
129
  ```ruby
126
- class Comment::Create < Trailblazer::Operation
127
- step :process!
130
+ class Song::Create < Trailblazer::Operation
131
+ step :model
132
+ step :validate
128
133
 
129
- def process!(options)
134
+ def model(ctx, **)
130
135
  # do whatever you feel like.
136
+ ctx[:model] = Song.new
137
+ end
138
+
139
+ def validate(ctx, params:, **)
140
+ # ..
131
141
  end
132
142
  end
133
143
  ```
134
144
 
135
- Operations only need to define and implement steps, like the `#process!` steps. Those steps receive the arguments from the caller.
145
+ Operations define the flow of their logic using the DSL and implement the particular steps with pure Ruby.
136
146
 
137
147
  You cannot instantiate them per design. The only way to invoke them is `call`.
138
148
 
139
149
  ```ruby
140
- Comment::Create.call(whatever: "goes", in: "here")
141
- # same as
142
- Comment::Create.(whatever: "goes", in: "here")
150
+ Song::Create.(params: {whatever: "goes", in: "here"})
143
151
  ```
144
152
 
145
153
  Their high degree of encapsulation makes them a [replacement for test factories](#test), too.
146
154
 
147
155
  [Learn more.](http://trailblazer.to/gems/operation)
148
156
 
149
- ## Validation
150
-
151
- In Trailblazer, an operation (usually) has a form object which is simply a `Reform::Form` class. All the [API documented in Reform](https://github.com/apotonick/reform) can be applied and used.
152
-
153
- Validations can also be implemented in pure Dry-validation.
154
-
155
- The operation makes use of the form object using the `#validate` method.
156
-
157
- ```ruby
158
- class Comment::Create < Trailblazer::Operation
159
- extend Contract::DSL
160
-
161
- contract do
162
- # this is a Reform::Form class!
163
- property :body, validates: {presence: true}
164
- end
165
-
166
- step Model( Comment, :new )
167
- step Contract::Build()
168
- step Contract::Validate( key: :comment )
169
- step Contract::Persist( )
170
- end
171
- ```
172
-
173
- The contract (aka _form_) is defined in the `::contract` block. You can implement nested forms, default values, validations, and everything else Reform provides.
174
-
175
- In the `#process` method you can define your business logic.
176
-
177
- [Learn more.](http://trailblazer.to/gems/operation/2.0/contract.html)
178
-
179
157
  ## Models
180
158
 
181
159
  Models for persistence can be implemented using any ORM you fancy, for instance [ActiveRecord](https://github.com/rails/rails/tree/master/activerecord#active-record--object-relational-mapping-in-rails) or [Datamapper](http://datamapper.org/).
@@ -183,7 +161,7 @@ Models for persistence can be implemented using any ORM you fancy, for instance
183
161
  In Trailblazer, models are completely empty. They solely contain associations and finders. No business logic is allowed in models.
184
162
 
185
163
  ```ruby
186
- class Comment < ActiveRecord::Base
164
+ class Song < ActiveRecord::Base
187
165
  belongs_to :thing
188
166
 
189
167
  scope :latest, lambda { all.limit(9).order("id DESC") }
@@ -192,80 +170,6 @@ end
192
170
 
193
171
  Only operations and views/cells can access models directly.
194
172
 
195
- ## Policies
196
-
197
- You can abort running an operation using a policy. "[Pundit](https://github.com/elabs/pundit)-style" policy classes define the rules.
198
-
199
- ```ruby
200
- class Comment::Policy
201
- def initialize(user, comment)
202
- @user, @comment = user, comment
203
- end
204
-
205
- def create?
206
- @user.admin?
207
- end
208
- end
209
- ```
210
-
211
- The rule is enabled via the `::policy` call.
212
-
213
- ```ruby
214
- class Comment::Create < Trailblazer::Operation
215
- step Policy( Comment::Policy, :create? )
216
- end
217
- ```
218
-
219
- The policy is evaluated in `#setup!`, raises an exception if `false` and suppresses running `#process`.
220
-
221
- [Learn more.](http://trailblazer.to/gems/operation/policy.html)
222
-
223
-
224
- ## Views
225
-
226
- View rendering can happen using the controller as known from Rails. This is absolutely fine for simple views.
227
-
228
- More complex UI logic happens in _View Models_ as found in [Cells](https://github.com/apotonick/cells). View models also replace helpers.
229
-
230
- The operation's form object can be rendered in views, too.
231
-
232
- ```ruby
233
- class CommentsController < ApplicationController
234
- def new
235
- form Comment::Create # will assign the form object to @form.
236
- end
237
- end
238
- ```
239
-
240
- Since Reform objects can be passed to form builders, you can use the operation to render and process the form!
241
-
242
- ```haml
243
- = simple_form_for @form do |f|
244
- = f.input :body
245
- ```
246
-
247
-
248
- ## Representers
249
-
250
- Operations can use representers from [Roar](https://github.com/apotonick/roar) to serialize and parse JSON and XML documents for APIs.
251
-
252
- Representers can be inferred automatically from your contract, then may be refined, e.g. with hypermedia or a format like `JSON-API`.
253
-
254
- ```ruby
255
- class Comment::Create < Trailblazer::Operation
256
- representer do
257
- # inherited :body
258
- include Roar::JSON::HAL
259
-
260
- link(:self) { comment_path(represented.id) }
261
- end
262
- end
263
- ```
264
-
265
- The operation can then parse incoming JSON documents in `validate` and render a document via `to_json`.
266
-
267
- [Learn more.](http://trailblazer.to/gems/operation/2.0/representer.html)
268
-
269
173
  ## Tests
270
174
 
271
175
  In Trailblazer, you only have operation unit tests and integration smoke tests to test the operation/controller wiring.
@@ -273,20 +177,18 @@ In Trailblazer, you only have operation unit tests and integration smoke tests t
273
177
  Operations completely replace the need for leaky factories.
274
178
 
275
179
  ```ruby
276
- describe Comment::Update do
277
- let(:comment) { Comment::Create.(comment: {body: "[That](http://trailblazer.to)!"}) }
180
+ describe Song::Update do
181
+ let(:song) { Song::Create.(song: {body: "[That](http://trailblazer.to)!"}) }
278
182
  end
279
183
  ```
280
184
 
281
- ## More
185
+ ## Workflows
282
186
 
283
- Trailblazer has many more architectural features such as
187
+ Operations are a great way to clean up controllers and models. However, Trailblazer goes further and provides an approach to model entire life-cycles of business objects, such as "a song" or "the root user".
284
188
 
285
- * Polymorphic builders and operations
286
- * Inheritance and composition support
287
- * Polymorphic views
189
+ Those workflows dramatically reduce the usage of control flow logic in your code and allow for visually designing and discussing flows.
288
190
 
289
- Check the project website and the book.
191
+ Learn more about BPMN and workflows [on our website](https://2019.trailblazer.to/docs/workflow).
290
192
 
291
193
  ## Installation
292
194
 
@@ -299,4 +201,3 @@ gem "trailblazer-cells"
299
201
  ```
300
202
 
301
203
  Cells is _not_ required per default! Add it if you use it, which is highly recommended.
302
-
data/Rakefile CHANGED
@@ -1,27 +1,10 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rake/testtask"
3
3
 
4
- task :default => [:test]
4
+ task :default => %i[test]
5
5
 
6
6
  Rake::TestTask.new(:test) do |test|
7
7
  test.libs << 'test'
8
- # test.test_files = FileList['test/**/*_test.rb']
9
- test_files = FileList[%w{
10
- test/operation/pundit_test.rb
11
- test/operation/model_test.rb
12
- test/operation/contract_test.rb
13
- test/operation/persist_test.rb
14
- test/operation/callback_test.rb
15
- test/operation/resolver_test.rb
16
- test/operation/dsl/contract_test.rb
17
-
18
- test/docs/*_test.rb
19
- }]
20
-
21
- if RUBY_VERSION == "1.9.3"
22
- test_files = test_files - %w{test/docs/dry_test.rb test/docs/auto_inject_test.rb}
23
- end
24
-
25
- test.test_files = test_files #- ["test/docs/rescue_test.rb"]
8
+ test.test_files = FileList['test/**/*_test.rb'] - FileList["test/deprecation/*_test.rb"]
26
9
  test.verbose = true
27
10
  end
@@ -1,18 +1,4 @@
1
- require "trailblazer/operation"
2
- require "trailblazer/operation/pipetree"
3
-
4
- require "trailblazer/dsl"
5
1
  require "trailblazer/version"
6
-
7
- require "trailblazer/operation/model"
8
- require "trailblazer/operation/contract"
9
- require "trailblazer/operation/validate"
10
- require "trailblazer/operation/representer"
11
- require "trailblazer/operation/policy"
12
- require "trailblazer/operation/pundit"
13
- require "trailblazer/operation/guard"
14
- require "trailblazer/operation/persist"
15
- # require "trailblazer/operation/callback"
16
- require "trailblazer/operation/nested"
17
- require "trailblazer/operation/wrap"
18
- require "trailblazer/operation/rescue"
2
+ require "trailblazer/operation"
3
+ require "trailblazer/macro"
4
+ require "trailblazer/macro/contract"
@@ -1,3 +1,5 @@
1
1
  module Trailblazer
2
- VERSION = "2.0.7"
2
+ module Version
3
+ VERSION = "2.1.0"
4
+ end
3
5
  end
@@ -1,3 +1,5 @@
1
+ require "pp"
2
+ require "delegate"
1
3
  require "trailblazer"
2
4
  require "minitest/autorun"
3
5
 
@@ -7,9 +9,7 @@ require "reform/form/active_model/validations"
7
9
  Reform::Form.class_eval do
8
10
  include Reform::Form::ActiveModel::Validations
9
11
  end
10
-
11
- require "trailblazer/operation/callback"
12
- require "trailblazer/operation/procedural/validate"
12
+ # require "trailblazer/deprecation/context.rb"
13
13
 
14
14
  module Mock
15
15
  class Result
@@ -27,3 +27,12 @@ module Test
27
27
  end
28
28
  ReturnResult = ->(last, input, options) { input }
29
29
  end
30
+
31
+ Minitest::Spec::Operation = Trailblazer::Operation
32
+
33
+ Memo = Struct.new(:id, :body) do
34
+ def self.find(id)
35
+ return new(id, "Yo!") if id
36
+ nil
37
+ end
38
+ end
@@ -4,31 +4,27 @@ require 'trailblazer/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "trailblazer"
7
- spec.version = Trailblazer::VERSION
7
+ spec.version = Trailblazer::Version::VERSION
8
8
  spec.authors = ["Nick Sutterer"]
9
9
  spec.email = ["apotonick@gmail.com"]
10
- spec.description = %q{A high-level architecture for Ruby introducing new abstractions such as operations, form objects or policies.}
10
+ spec.description = %q{A high-level architecture introducing new abstractions such as operations and control flow, form objects and policies.}
11
11
  spec.summary = %q{A high-level architecture for Ruby and Rails.}
12
12
  spec.homepage = "http://trailblazer.to"
13
13
  spec.license = "LGPL-3.0"
14
14
 
15
- spec.files = `git ls-files`.split($/)
16
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
16
+ f.match(%r{^(test|doc)/})
17
+ end
18
+ spec.test_files = `git ls-files -z test`.split("\x0")
18
19
  spec.require_paths = ["lib"]
19
20
 
20
- spec.add_dependency "trailblazer-operation", ">= 0.0.12", "< 0.1.0"
21
- spec.add_dependency "reform", ">= 2.2.0", "< 3.0.0"
22
- spec.add_dependency "declarative"
23
-
24
- spec.add_development_dependency "activemodel" # for Reform::AM::V
21
+ spec.add_dependency "trailblazer-macro", ">= 2.1.0", "< 2.2.0"
22
+ spec.add_dependency "trailblazer-macro-contract", ">= 2.1.0", "< 2.2.0"
23
+ spec.add_dependency "trailblazer-operation" # TODO: why do we need this here?
25
24
 
26
25
  spec.add_development_dependency "bundler"
27
26
  spec.add_development_dependency "rake"
28
27
  spec.add_development_dependency "minitest"
29
- spec.add_development_dependency "nokogiri"
30
28
 
31
- spec.add_development_dependency "roar"
32
- # spec.required_ruby_version = '>= 1.9.3'
33
- spec.required_ruby_version = '>= 2.0.0'
29
+ spec.required_ruby_version = '>= 2.1.0'
34
30
  end
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.7
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-08 00:00:00.000000000 Z
11
+ date: 2019-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: trailblazer-operation
14
+ name: trailblazer-macro
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.0.12
19
+ version: 2.1.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: 0.1.0
22
+ version: 2.2.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.0.12
29
+ version: 2.1.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: 0.1.0
32
+ version: 2.2.0
33
33
  - !ruby/object:Gem::Dependency
34
- name: reform
34
+ name: trailblazer-macro-contract
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 2.2.0
39
+ version: 2.1.0
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: 3.0.0
42
+ version: 2.2.0
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 2.2.0
49
+ version: 2.1.0
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: 3.0.0
52
+ version: 2.2.0
53
53
  - !ruby/object:Gem::Dependency
54
- name: declarative
54
+ name: trailblazer-operation
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - ">="
@@ -64,20 +64,6 @@ dependencies:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
- - !ruby/object:Gem::Dependency
68
- name: activemodel
69
- requirement: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- version: '0'
74
- type: :development
75
- prerelease: false
76
- version_requirements: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - ">="
79
- - !ruby/object:Gem::Version
80
- version: '0'
81
67
  - !ruby/object:Gem::Dependency
82
68
  name: bundler
83
69
  requirement: !ruby/object:Gem::Requirement
@@ -120,36 +106,8 @@ dependencies:
120
106
  - - ">="
121
107
  - !ruby/object:Gem::Version
122
108
  version: '0'
123
- - !ruby/object:Gem::Dependency
124
- name: nokogiri
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: roar
139
- requirement: !ruby/object:Gem::Requirement
140
- requirements:
141
- - - ">="
142
- - !ruby/object:Gem::Version
143
- version: '0'
144
- type: :development
145
- prerelease: false
146
- version_requirements: !ruby/object:Gem::Requirement
147
- requirements:
148
- - - ">="
149
- - !ruby/object:Gem::Version
150
- version: '0'
151
- description: A high-level architecture for Ruby introducing new abstractions such
152
- as operations, form objects or policies.
109
+ description: A high-level architecture introducing new abstractions such as operations
110
+ and control flow, form objects and policies.
153
111
  email:
154
112
  - apotonick@gmail.com
155
113
  executables: []
@@ -157,70 +115,20 @@ extensions: []
157
115
  extra_rdoc_files: []
158
116
  files:
159
117
  - ".gitignore"
118
+ - ".rubocop-https---raw-githubusercontent-com-trailblazer-meta-master-rubocop-yml"
119
+ - ".rubocop.yml"
120
+ - ".rubocop_todo.yml"
160
121
  - ".travis.yml"
161
122
  - CHANGES.md
162
123
  - COMM-LICENSE
124
+ - CONTRIBUTING.md
163
125
  - Gemfile
164
- - LICENSE.txt
126
+ - LICENSE
165
127
  - README.md
166
128
  - Rakefile
167
129
  - THOUGHTS
168
- - doc/Trb-The-Stack.png
169
- - doc/operation-2017.png
170
- - doc/trb.jpg
171
130
  - lib/trailblazer.rb
172
- - lib/trailblazer/dsl.rb
173
- - lib/trailblazer/operation/auto_inject.rb
174
- - lib/trailblazer/operation/callback.rb
175
- - lib/trailblazer/operation/contract.rb
176
- - lib/trailblazer/operation/guard.rb
177
- - lib/trailblazer/operation/model.rb
178
- - lib/trailblazer/operation/module.rb
179
- - lib/trailblazer/operation/nested.rb
180
- - lib/trailblazer/operation/persist.rb
181
- - lib/trailblazer/operation/policy.rb
182
- - lib/trailblazer/operation/procedural/contract.rb
183
- - lib/trailblazer/operation/procedural/validate.rb
184
- - lib/trailblazer/operation/pundit.rb
185
- - lib/trailblazer/operation/representer.rb
186
- - lib/trailblazer/operation/rescue.rb
187
- - lib/trailblazer/operation/test.rb
188
- - lib/trailblazer/operation/validate.rb
189
- - lib/trailblazer/operation/wrap.rb
190
131
  - lib/trailblazer/version.rb
191
- - test/docs/auto_inject_test.rb
192
- - test/docs/contract_test.rb
193
- - test/docs/dry_test.rb
194
- - test/docs/fast_test.rb
195
- - test/docs/guard_test.rb
196
- - test/docs/macro_test.rb
197
- - test/docs/model_test.rb
198
- - test/docs/nested_test.rb
199
- - test/docs/operation_test.rb
200
- - test/docs/policy_test.rb
201
- - test/docs/pundit_test.rb
202
- - test/docs/representer_test.rb
203
- - test/docs/rescue_test.rb
204
- - test/docs/wrap_test.rb
205
- - test/gemfiles/Gemfile.ruby-1.9
206
- - test/gemfiles/Gemfile.ruby-2.0
207
- - test/gemfiles/Gemfile.ruby-2.3
208
- - test/module_test.rb
209
- - test/operation/callback_test.rb
210
- - test/operation/contract_test.rb
211
- - test/operation/dsl/callback_test.rb
212
- - test/operation/dsl/contract_test.rb
213
- - test/operation/dsl/representer_test.rb
214
- - test/operation/model_test.rb
215
- - test/operation/params_test.rb
216
- - test/operation/persist_test.rb
217
- - test/operation/pipedream_test.rb
218
- - test/operation/pipetree_test.rb
219
- - test/operation/present_test.rb
220
- - test/operation/pundit_test.rb
221
- - test/operation/representer_test.rb
222
- - test/operation/resolver_test.rb
223
- - test/operation_test.rb
224
132
  - test/test_helper.rb
225
133
  - trailblazer.gemspec
226
134
  homepage: http://trailblazer.to
@@ -235,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
235
143
  requirements:
236
144
  - - ">="
237
145
  - !ruby/object:Gem::Version
238
- version: 2.0.0
146
+ version: 2.1.0
239
147
  required_rubygems_version: !ruby/object:Gem::Requirement
240
148
  requirements:
241
149
  - - ">="
@@ -243,42 +151,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
151
  version: '0'
244
152
  requirements: []
245
153
  rubyforge_project:
246
- rubygems_version: 2.6.8
154
+ rubygems_version: 2.7.6
247
155
  signing_key:
248
156
  specification_version: 4
249
157
  summary: A high-level architecture for Ruby and Rails.
250
158
  test_files:
251
- - test/docs/auto_inject_test.rb
252
- - test/docs/contract_test.rb
253
- - test/docs/dry_test.rb
254
- - test/docs/fast_test.rb
255
- - test/docs/guard_test.rb
256
- - test/docs/macro_test.rb
257
- - test/docs/model_test.rb
258
- - test/docs/nested_test.rb
259
- - test/docs/operation_test.rb
260
- - test/docs/policy_test.rb
261
- - test/docs/pundit_test.rb
262
- - test/docs/representer_test.rb
263
- - test/docs/rescue_test.rb
264
- - test/docs/wrap_test.rb
265
- - test/gemfiles/Gemfile.ruby-1.9
266
- - test/gemfiles/Gemfile.ruby-2.0
267
- - test/gemfiles/Gemfile.ruby-2.3
268
- - test/module_test.rb
269
- - test/operation/callback_test.rb
270
- - test/operation/contract_test.rb
271
- - test/operation/dsl/callback_test.rb
272
- - test/operation/dsl/contract_test.rb
273
- - test/operation/dsl/representer_test.rb
274
- - test/operation/model_test.rb
275
- - test/operation/params_test.rb
276
- - test/operation/persist_test.rb
277
- - test/operation/pipedream_test.rb
278
- - test/operation/pipetree_test.rb
279
- - test/operation/present_test.rb
280
- - test/operation/pundit_test.rb
281
- - test/operation/representer_test.rb
282
- - test/operation/resolver_test.rb
283
- - test/operation_test.rb
284
159
  - test/test_helper.rb