trailblazer-rails 2.1.4 → 2.1.5

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.
@@ -1 +1 @@
1
- 2.4.4
1
+ 2.4.4
@@ -1,16 +1,18 @@
1
- language: ruby
2
- matrix:
3
- include:
4
- - rvm: 2.4.1
5
- env: TEST_SUITE=rails5.0
6
- gemfile: test/rails5.0/Gemfile
7
-
8
- - rvm: 2.4.1
9
- env: TEST_SUITE=rails5.1
10
- gemfile: test/rails5.1/Gemfile
11
-
12
- - rvm: 2.5.1
13
- env: TEST_SUITE=rails5.2
14
- gemfile: test/rails5.2/Gemfile
15
-
16
- script: cd test/$TEST_SUITE && bundle install && bundle exec rake test
1
+ sudo: false
2
+ language: ruby
3
+ cache: bundler
4
+ matrix:
5
+ include:
6
+ - rvm: 2.4.1
7
+ env: TEST_SUITE=rails5.0
8
+ gemfile: test/rails5.0/Gemfile
9
+
10
+ - rvm: 2.4.1
11
+ env: TEST_SUITE=rails5.1
12
+ gemfile: test/rails5.1/Gemfile
13
+
14
+ - rvm: 2.5.1
15
+ env: TEST_SUITE=rails5.2
16
+ gemfile: test/rails5.2/Gemfile
17
+
18
+ script: cd test/$TEST_SUITE && bundle install && bundle exec rake test
data/CHANGES.md CHANGED
@@ -1,141 +1,146 @@
1
- # 2.1.4
2
-
3
- * Remove Gemfile.lock in the test folders to make travis CI to work (this time will work!)
4
-
5
- # 2.1.3
6
-
7
- * Update Gemfile.lock in the test folders to make travis CI to work again
8
-
9
- # 2.1.2
10
-
11
- * `Trailblazer::Rails::Railtie` divided in 2 modules:
12
- * `Loader` -> require_dependecy `concepts`
13
- * `ExtendApplicationController` -> include `run` and `render` in controllers
14
-
15
- # 2.1.1
16
-
17
- * Fixed issue for rails 5.2rc2 when loading model's files
18
- * Rubocop introduced
19
- * Allow enabling tracing when using `run` via `config.trailblazer.enable_tracing = true`
20
-
21
- # 2.1.0
22
-
23
- * Drop deprecated syntax for controller `run`
24
- * Allow disabling of the Trailblazer loader via `config.trailblazer.use_loader = false`
25
-
26
- # 2.0.0
27
-
28
- * Support Trailblazer 2.1.0+
29
- * Drop support for older version of Trailblazer
30
-
31
- # 1.0.9
32
-
33
- * `Trailblazer::Rails::Railtie` divided in 2 modules:
34
- * `Loader` -> require_dependecy `concepts`
35
- * `ExtendApplicationController` -> include `run` and `render` in controllers
36
- * Remove Gemfile.lock in the test folders to make travis CI to work
37
-
38
- # 1.0.8
39
-
40
- * Fixed Circular dependency detected in rails 5.2
41
-
42
- # 1.0.7
43
-
44
- * Fixed typo error in use_loader config flag
45
-
46
- # 1.0.6 (revoked)
47
-
48
- * Introduce use_loader config flag
49
-
50
- # 1.0.5
51
-
52
- * Hook trailblazer application_controller initializer to finisher_hook
53
-
54
- # 1.0.4
55
-
56
- * Make `Railtie::extend_application_controller!` overwriteable via a module.
57
-
58
- # 1.0.3
59
-
60
- * Return the computed application controller constant from `Railtie::extend_application_controller!` to make `compat` code simpler.
61
-
62
- # 1.0.2
63
-
64
- * Allow configuring `ApplicationController` constant via `config.trailblazer.application_controller`.
65
-
66
- # 1.0.1
67
-
68
- * Allow using this gem without `cells,` by loading cells support only when the `cells` gem got detected. Thanks to @promisedlandt.
69
-
70
- # 1.0.0
71
-
72
- * Runs only with >= Trailblazer 2.0.0.
73
- * Removed `Controller#form`, `#present` and `#respond`. The latter is now [replaced with `Endpoint`](https://github.com/trailblazer/trailblazer-endpoint/). The only operation trigger is `Controller#run`.
74
- * Added support for explicit `render cell(Artist::Cell::Index, model)`.
75
- * Autoloading got replaced with explicit requires.
76
-
77
- # 0.4.0
78
-
79
- * Better engines support.
80
- * Fix `Responder#errors` by simply removing it and letting `Operation#errors` return the contract errors.
81
-
82
- # 0.3.2
83
-
84
- * Make it work with Rails 3.x, again.
85
-
86
- # 0.3.1
87
-
88
- * Fix loading of `reform-rails`.
89
-
90
- # 0.3.0
91
-
92
- * Require `reform-rails` as a static dependency. This simplifies the user's setup significantly.
93
- * Run the `Railtie` after `reform.form_extensions` and allow reform-rails to do its setup work, then load concepts.
94
-
95
- # 0.2.4
96
-
97
- * Require `trailblazer-loader-0.0.7`.
98
- * Fix sorting, model files are now always required first.
99
- * Manually include `Operation::Controller` in `ApplicationController` for every reload.
100
-
101
- # 0.2.3
102
-
103
- * Bump to `trailblazer-loader` 0.0.4.
104
-
105
- # 0.2.2
106
-
107
- * Remove cells loading code, this happens via trailblazer-loader now.
108
- * We now load the concept's model file if it exists.
109
-
110
- # 0.2.1
111
-
112
- * Require `trailblazer-loader`.
113
-
114
- # 0.2.0
115
-
116
- * Use `trailblazer-loader` for loading operations and associated files, now. Note that `operations.rb` now is `operation.rb` (hence the minor bump).
117
- * The `Operation::Controller` module is not included into `ApplicationController` automatically.
118
- * Added `Trailblazer::Test::Integration`.
119
-
120
- # 0.1.6
121
-
122
- * Fix `Controller#run`, which now returns the operation instance instead of the `Else` object.
123
-
124
- # 0.1.5
125
-
126
- * Treat all requests as `params` requests unless the operation has a representer mixed in. If you don't want that, you can override using `is_document: false`. This appears to be the smoothest solution for all. Thanks to @Scharrels for discussion.
127
- * In `Controller#form`, the options argument is now passed into `form.prepopulate!(options)`. This allows to use arbitrary options and the `options[:params]` for prepopulation. Thanks @sauy7 for discussion.
128
-
129
- # 0.1.4
130
-
131
- * Treat `:js` requests as non-document, too.
132
- * `Controller#form` now returns the form object and not the operation.
133
- * In `Controller`, `#form`, `#present`, `#run` and `#respond` now all have the same API: `run(constant, options)`. If you want to pass a custom params hash, use `run Comment::Create, params: {..}`.
134
-
135
- # 0.1.3
136
-
137
- * `Operation::contract` works properly with `Operation::ActiveModel` mixed in.
138
-
139
- # 0.1.2
140
-
141
- * First version running with Trailblazer 1.0.0.
1
+ # 2.1.5
2
+
3
+ * Add dependency `activesupport` 5+
4
+ * rename `run` to `run_v21` and alias it to `run` only if it not already defined
5
+
6
+ # 2.1.4
7
+
8
+ * Remove Gemfile.lock in the test folders to make travis CI to work (this time will work!)
9
+
10
+ # 2.1.3
11
+
12
+ * Update Gemfile.lock in the test folders to make travis CI to work again
13
+
14
+ # 2.1.2
15
+
16
+ * `Trailblazer::Rails::Railtie` divided in 2 modules:
17
+ * `Loader` -> require_dependecy `concepts`
18
+ * `ExtendApplicationController` -> include `run` and `render` in controllers
19
+
20
+ # 2.1.1
21
+
22
+ * Fixed issue for rails 5.2rc2 when loading model's files
23
+ * Rubocop introduced
24
+ * Allow enabling tracing when using `run` via `config.trailblazer.enable_tracing = true`
25
+
26
+ # 2.1.0
27
+
28
+ * Drop deprecated syntax for controller `run`
29
+ * Allow disabling of the Trailblazer loader via `config.trailblazer.use_loader = false`
30
+
31
+ # 2.0.0
32
+
33
+ * Support Trailblazer 2.1.0+
34
+ * Drop support for older version of Trailblazer
35
+
36
+ # 1.0.9
37
+
38
+ * `Trailblazer::Rails::Railtie` divided in 2 modules:
39
+ * `Loader` -> require_dependecy `concepts`
40
+ * `ExtendApplicationController` -> include `run` and `render` in controllers
41
+ * Remove Gemfile.lock in the test folders to make travis CI to work
42
+
43
+ # 1.0.8
44
+
45
+ * Fixed Circular dependency detected in rails 5.2
46
+
47
+ # 1.0.7
48
+
49
+ * Fixed typo error in use_loader config flag
50
+
51
+ # 1.0.6 (revoked)
52
+
53
+ * Introduce use_loader config flag
54
+
55
+ # 1.0.5
56
+
57
+ * Hook trailblazer application_controller initializer to finisher_hook
58
+
59
+ # 1.0.4
60
+
61
+ * Make `Railtie::extend_application_controller!` overwriteable via a module.
62
+
63
+ # 1.0.3
64
+
65
+ * Return the computed application controller constant from `Railtie::extend_application_controller!` to make `compat` code simpler.
66
+
67
+ # 1.0.2
68
+
69
+ * Allow configuring `ApplicationController` constant via `config.trailblazer.application_controller`.
70
+
71
+ # 1.0.1
72
+
73
+ * Allow using this gem without `cells,` by loading cells support only when the `cells` gem got detected. Thanks to @promisedlandt.
74
+
75
+ # 1.0.0
76
+
77
+ * Runs only with >= Trailblazer 2.0.0.
78
+ * Removed `Controller#form`, `#present` and `#respond`. The latter is now [replaced with `Endpoint`](https://github.com/trailblazer/trailblazer-endpoint/). The only operation trigger is `Controller#run`.
79
+ * Added support for explicit `render cell(Artist::Cell::Index, model)`.
80
+ * Autoloading got replaced with explicit requires.
81
+
82
+ # 0.4.0
83
+
84
+ * Better engines support.
85
+ * Fix `Responder#errors` by simply removing it and letting `Operation#errors` return the contract errors.
86
+
87
+ # 0.3.2
88
+
89
+ * Make it work with Rails 3.x, again.
90
+
91
+ # 0.3.1
92
+
93
+ * Fix loading of `reform-rails`.
94
+
95
+ # 0.3.0
96
+
97
+ * Require `reform-rails` as a static dependency. This simplifies the user's setup significantly.
98
+ * Run the `Railtie` after `reform.form_extensions` and allow reform-rails to do its setup work, then load concepts.
99
+
100
+ # 0.2.4
101
+
102
+ * Require `trailblazer-loader-0.0.7`.
103
+ * Fix sorting, model files are now always required first.
104
+ * Manually include `Operation::Controller` in `ApplicationController` for every reload.
105
+
106
+ # 0.2.3
107
+
108
+ * Bump to `trailblazer-loader` 0.0.4.
109
+
110
+ # 0.2.2
111
+
112
+ * Remove cells loading code, this happens via trailblazer-loader now.
113
+ * We now load the concept's model file if it exists.
114
+
115
+ # 0.2.1
116
+
117
+ * Require `trailblazer-loader`.
118
+
119
+ # 0.2.0
120
+
121
+ * Use `trailblazer-loader` for loading operations and associated files, now. Note that `operations.rb` now is `operation.rb` (hence the minor bump).
122
+ * The `Operation::Controller` module is not included into `ApplicationController` automatically.
123
+ * Added `Trailblazer::Test::Integration`.
124
+
125
+ # 0.1.6
126
+
127
+ * Fix `Controller#run`, which now returns the operation instance instead of the `Else` object.
128
+
129
+ # 0.1.5
130
+
131
+ * Treat all requests as `params` requests unless the operation has a representer mixed in. If you don't want that, you can override using `is_document: false`. This appears to be the smoothest solution for all. Thanks to @Scharrels for discussion.
132
+ * In `Controller#form`, the options argument is now passed into `form.prepopulate!(options)`. This allows to use arbitrary options and the `options[:params]` for prepopulation. Thanks @sauy7 for discussion.
133
+
134
+ # 0.1.4
135
+
136
+ * Treat `:js` requests as non-document, too.
137
+ * `Controller#form` now returns the form object and not the operation.
138
+ * In `Controller`, `#form`, `#present`, `#run` and `#respond` now all have the same API: `run(constant, options)`. If you want to pass a custom params hash, use `run Comment::Create, params: {..}`.
139
+
140
+ # 0.1.3
141
+
142
+ * `Operation::contract` works properly with `Operation::ActiveModel` mixed in.
143
+
144
+ # 0.1.2
145
+
146
+ * First version running with Trailblazer 1.0.0.
data/Gemfile CHANGED
@@ -3,7 +3,28 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in trailblazer-rails.gemspec
4
4
  gemspec
5
5
 
6
- # gem "trailblazer", path: "../trailblazer"
7
- # gem "trailblazer", github: "apotonick/trailblazer"
8
- # gem "trailblazer-loader", github: "trailblazer/trailblazer-loader"
9
- # gem "trailblazer-loader", path: "../trailblazer-loader"
6
+ case ENV['GEMS_SOURCE']
7
+ when 'local'
8
+ gem "reform-rails", path: "../reform-rails"
9
+ gem "trailblazer", path: "../trailblazer"
10
+ gem "trailblazer-loader", path: "../trailblazer-loader"
11
+ gem "trailblazer-cells", path: "../trailblazer-cells"
12
+ gem "cells-rails", path: "../cells-rails"
13
+ gem "cells-erb", path: "../cells-erb"
14
+ when 'github'
15
+ gem "reform-rails", github: "trailblazer/reform-rails"
16
+ gem "trailblazer", github: "trailblazer/trailblazer"
17
+ gem "trailblazer-loader", github: "trailblazer/trailblazer-loader"
18
+ gem "trailblazer-cells", github: "trailblazer/trailblazer-cells"
19
+ gem "cells-rails", github: "trailblazer/cells-rails"
20
+ gem "cells-erb", github: "trailblazer/cells-erb"
21
+ when 'custom'
22
+ eval_gemfile('GemfileCustom')
23
+ else # use rubygems releases
24
+ gem "reform-rails"
25
+ gem "trailblazer"
26
+ gem "trailblazer-loader"
27
+ gem "trailblazer-cells"
28
+ gem "cells-rails"
29
+ gem "cells-erb"
30
+ end
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015-2018 Nick Sutterer
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all 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,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-2018 Nick Sutterer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all 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,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,39 +1,39 @@
1
- # Trailblazer::Rails
2
-
3
- *Trailblazer in your Rails controllers.*
4
-
5
- [![Gitter Chat](https://badges.gitter.im/trailblazer/chat.svg)](https://gitter.im/trailblazer/chat)
6
- [![TRB Newsletter](https://img.shields.io/badge/TRB-newsletter-lightgrey.svg)](http://trailblazer.to/newsletter/)
7
- [![Build
8
- Status](https://travis-ci.org/trailblazer/trailblazer-rails.svg)](https://travis-ci.org/trailblazer/trailblazer-rails)
9
- [![Gem Version](https://badge.fury.io/rb/trailblazer-rails.svg)](http://badge.fury.io/rb/trailblazer-rails)
10
-
11
- ## Overview
12
-
13
- `trailblazer-rails` helps you with the following.
14
-
15
- * Running operations in your controller actions.
16
- * Minimalistic integration tests ("smoke tests") to test controller/operation wiring.
17
- * Rendering cells instead of an ActionView in a controller action.
18
-
19
- Please refer to the [full documentation for more](http://trailblazer.to/gems/trailblazer/2.0/rails.html).
20
-
21
- ## Installation
22
-
23
- Add this line to your application's Gemfile:
24
-
25
- ```ruby
26
- gem 'trailblazer-rails'
27
- ```
28
-
29
- Note that the 2.x version only runs with TRB >= 2.1.0.
30
-
31
- ## Setting flags
32
-
33
- * `config.trailblazer.use_loader = false` to disable Trailblazer loader (default TRUE)
34
- * `config.trailblazer.enable_tracing = true` to enable tracing when using `run` (default FALSE)
35
-
36
- ## License
37
-
38
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
39
-
1
+ # Trailblazer::Rails
2
+
3
+ *Trailblazer in your Rails controllers.*
4
+
5
+ [![Gitter Chat](https://badges.gitter.im/trailblazer/chat.svg)](https://gitter.im/trailblazer/chat)
6
+ [![TRB Newsletter](https://img.shields.io/badge/TRB-newsletter-lightgrey.svg)](http://trailblazer.to/newsletter/)
7
+ [![Build
8
+ Status](https://travis-ci.org/trailblazer/trailblazer-rails.svg)](https://travis-ci.org/trailblazer/trailblazer-rails)
9
+ [![Gem Version](https://badge.fury.io/rb/trailblazer-rails.svg)](http://badge.fury.io/rb/trailblazer-rails)
10
+
11
+ ## Overview
12
+
13
+ `trailblazer-rails` helps you with the following.
14
+
15
+ * Running operations in your controller actions.
16
+ * Minimalistic integration tests ("smoke tests") to test controller/operation wiring.
17
+ * Rendering cells instead of an ActionView in a controller action.
18
+
19
+ Please refer to the [full documentation for more](http://trailblazer.to/gems/trailblazer/2.0/rails.html).
20
+
21
+ ## Installation
22
+
23
+ Add this line to your application's Gemfile:
24
+
25
+ ```ruby
26
+ gem 'trailblazer-rails'
27
+ ```
28
+
29
+ Note that the 2.x version only runs with TRB >= 2.1.0.
30
+
31
+ ## Setting flags
32
+
33
+ * `config.trailblazer.use_loader = false` to disable Trailblazer loader (default TRUE)
34
+ * `config.trailblazer.enable_tracing = true` to enable tracing when using `run` (default FALSE)
35
+
36
+ ## License
37
+
38
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
39
+