trailblazer-rails 2.1.4 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +32 -0
- data/.gitignore +16 -15
- data/Appraisals +18 -0
- data/CHANGES.md +166 -141
- data/Gemfile +11 -5
- data/LICENSE.txt +21 -21
- data/README.md +43 -39
- data/Rakefile +9 -2
- data/gemfiles/rails_5.2.gemfile +17 -0
- data/gemfiles/rails_5.2.gemfile.lock +183 -0
- data/gemfiles/rails_6.0.gemfile +17 -0
- data/gemfiles/rails_6.0.gemfile.lock +183 -0
- data/gemfiles/rails_6.1.gemfile +17 -0
- data/gemfiles/rails_6.1.gemfile.lock +182 -0
- data/gemfiles/rails_7.0.gemfile +17 -0
- data/gemfiles/rails_7.0.gemfile.lock +182 -0
- data/lib/trailblazer/rails/cell.rb +34 -21
- data/lib/trailblazer/rails/controller.rb +69 -55
- data/lib/trailblazer/rails/railtie/extend_application_controller.rb +28 -28
- data/lib/trailblazer/rails/railtie/loader.rb +58 -56
- data/lib/trailblazer/rails/railtie.rb +17 -30
- data/lib/trailblazer/rails/version.rb +5 -5
- data/lib/trailblazer/rails.rb +0 -2
- data/lib/trailblazer-rails.rb +1 -1
- data/trailblazer-rails.gemspec +25 -27
- metadata +37 -53
- data/.rubocop.yml +0 -9
- data/.rubocop_todo.yml +0 -294
- data/.ruby-version +0 -1
- data/.travis.yml +0 -16
- data/lib/trailblazer/rails/test/integration.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 23162999add75f4ab1c7aa0c35c9a724ab782f43aa691f42c39a957efd432ec3
|
4
|
+
data.tar.gz: 83016e2f641215fef72122d2af2310745528ac9f81f82b5f0773318cee2749b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f32d5bf8b70bd0bfde72874d0c5825fe724b1557e4b4adff08db90d5bba11c02b3c5a6697ae5e07ee3d9b95db53f4f922d06fc4f8e7056ff65348e3319c1b09
|
7
|
+
data.tar.gz: 304419bf4c80e9ddd30636c67a2346b6e8a9121b9d1614b6610853bc2f9433a28d7468a5b3ffed78d922e0e97f4be926d5ccabe97663c7771ad7b983c9178360
|
@@ -0,0 +1,32 @@
|
|
1
|
+
name: CI
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
pull_request:
|
7
|
+
branches:
|
8
|
+
- master
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
strategy:
|
12
|
+
fail-fast: false
|
13
|
+
matrix:
|
14
|
+
ruby: [2.7, '3.0']
|
15
|
+
gemfile:
|
16
|
+
- rails_7.0
|
17
|
+
- rails_6.1
|
18
|
+
- rails_6.0
|
19
|
+
- rails_5.2
|
20
|
+
exclude:
|
21
|
+
- ruby: '3.0'
|
22
|
+
gemfile: rails_5.2
|
23
|
+
runs-on: ubuntu-latest
|
24
|
+
env:
|
25
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
26
|
+
steps:
|
27
|
+
- uses: actions/checkout@v2
|
28
|
+
- uses: ruby/setup-ruby@v1
|
29
|
+
with:
|
30
|
+
ruby-version: ${{ matrix.ruby }}
|
31
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
32
|
+
- run: bundle exec rake db:create db:schema:load test
|
data/.gitignore
CHANGED
@@ -1,15 +1,16 @@
|
|
1
|
-
.idea
|
2
|
-
.rakeTasks
|
3
|
-
.bundle/
|
4
|
-
/.yardoc
|
5
|
-
/Gemfile.lock
|
6
|
-
/_yardoc/
|
7
|
-
/coverage/
|
8
|
-
/doc/
|
9
|
-
/pkg/
|
10
|
-
/spec/reports/
|
11
|
-
/tmp/
|
12
|
-
test/**/*.log
|
13
|
-
test/**/Gemfile.lock
|
14
|
-
*.iml
|
15
|
-
*.sqlite3
|
1
|
+
.idea
|
2
|
+
.rakeTasks
|
3
|
+
.bundle/
|
4
|
+
/.yardoc
|
5
|
+
/Gemfile.lock
|
6
|
+
/_yardoc/
|
7
|
+
/coverage/
|
8
|
+
/doc/
|
9
|
+
/pkg/
|
10
|
+
/spec/reports/
|
11
|
+
/tmp/
|
12
|
+
test/**/*.log
|
13
|
+
test/**/Gemfile.lock
|
14
|
+
*.iml
|
15
|
+
*.sqlite3
|
16
|
+
.tool-versions
|
data/Appraisals
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
appraise "rails-6.0" do
|
2
|
+
gem "actionpack", "~> 6.0.0"
|
3
|
+
gem "activerecord", "~> 6.0.0"
|
4
|
+
end
|
5
|
+
appraise "rails-6.1" do
|
6
|
+
gem "actionpack", "~> 6.1.0"
|
7
|
+
gem "activerecord", "~> 6.1.0"
|
8
|
+
end
|
9
|
+
appraise "rails-7.0" do
|
10
|
+
gem "actionpack", "~> 7.0.0.rc1"
|
11
|
+
gem "activerecord", "~> 7.0.0.rc1"
|
12
|
+
end
|
13
|
+
|
14
|
+
appraise "rails-5.2" do
|
15
|
+
gem "actionpack", "~> 5.2.0"
|
16
|
+
gem "activerecord", "~> 5.2.0"
|
17
|
+
gem "sqlite3", "~> 1.3.8"
|
18
|
+
end
|
data/CHANGES.md
CHANGED
@@ -1,141 +1,166 @@
|
|
1
|
-
# 2.
|
2
|
-
|
3
|
-
*
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
*
|
19
|
-
*
|
20
|
-
|
21
|
-
# 2.1.
|
22
|
-
|
23
|
-
*
|
24
|
-
*
|
25
|
-
|
26
|
-
# 2.
|
27
|
-
|
28
|
-
*
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
*
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
*
|
45
|
-
|
46
|
-
# 1.0
|
47
|
-
|
48
|
-
*
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
*
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
*
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
*
|
94
|
-
|
95
|
-
# 0.
|
96
|
-
|
97
|
-
*
|
98
|
-
*
|
99
|
-
*
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
#
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
*
|
118
|
-
*
|
119
|
-
|
120
|
-
# 0.
|
121
|
-
|
122
|
-
*
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
*
|
133
|
-
*
|
134
|
-
|
135
|
-
# 0.1
|
136
|
-
|
137
|
-
*
|
138
|
-
|
139
|
-
# 0.
|
140
|
-
|
141
|
-
*
|
1
|
+
# 2.2.0
|
2
|
+
|
3
|
+
* Allow passing ctx variables to `Controller#run`.
|
4
|
+
* Introduce `Controller#options_for_cell` to customize cell options such as `:layout` on the controller level.
|
5
|
+
|
6
|
+
# 2.1.9
|
7
|
+
|
8
|
+
* Drop support for Rails < 5.2
|
9
|
+
* Add Test for Rails 6.1
|
10
|
+
|
11
|
+
# 2.1.7
|
12
|
+
|
13
|
+
* Bug: Deprecation warning for use_loader always called (fixed)
|
14
|
+
* Run rubocop in travis only for ruby 2.5
|
15
|
+
|
16
|
+
# 2.1.6
|
17
|
+
|
18
|
+
* Dependency for `railties` >= 4.0.0
|
19
|
+
* Config flag use_loader renamed with enable_loader
|
20
|
+
|
21
|
+
# 2.1.5
|
22
|
+
|
23
|
+
* Add dependency `railties` >= 5.0.7
|
24
|
+
* rename `run` to `run_v21` and alias it to `run` only if it not already defined
|
25
|
+
|
26
|
+
# 2.1.4
|
27
|
+
|
28
|
+
* Remove Gemfile.lock in the test folders to make travis CI to work (this time will work!)
|
29
|
+
|
30
|
+
# 2.1.3
|
31
|
+
|
32
|
+
* Update Gemfile.lock in the test folders to make travis CI to work again
|
33
|
+
|
34
|
+
# 2.1.2
|
35
|
+
|
36
|
+
* `Trailblazer::Rails::Railtie` divided in 2 modules:
|
37
|
+
* `Loader` -> require_dependecy `concepts`
|
38
|
+
* `ExtendApplicationController` -> include `run` and `render` in controllers
|
39
|
+
|
40
|
+
# 2.1.1
|
41
|
+
|
42
|
+
* Fixed issue for rails 5.2rc2 when loading model's files
|
43
|
+
* Rubocop introduced
|
44
|
+
* Allow enabling tracing when using `run` via `config.trailblazer.enable_tracing = true`
|
45
|
+
|
46
|
+
# 2.1.0
|
47
|
+
|
48
|
+
* Drop deprecated syntax for controller `run`
|
49
|
+
* Allow disabling of the Trailblazer loader via `config.trailblazer.use_loader = false`
|
50
|
+
|
51
|
+
# 2.0.0
|
52
|
+
|
53
|
+
* Support Trailblazer 2.1.0+
|
54
|
+
* Drop support for older version of Trailblazer
|
55
|
+
|
56
|
+
# 1.0.9
|
57
|
+
|
58
|
+
* `Trailblazer::Rails::Railtie` divided in 2 modules:
|
59
|
+
* `Loader` -> require_dependecy `concepts`
|
60
|
+
* `ExtendApplicationController` -> include `run` and `render` in controllers
|
61
|
+
* Remove Gemfile.lock in the test folders to make travis CI to work
|
62
|
+
|
63
|
+
# 1.0.8
|
64
|
+
|
65
|
+
* Fixed Circular dependency detected in rails 5.2
|
66
|
+
|
67
|
+
# 1.0.7
|
68
|
+
|
69
|
+
* Fixed typo error in use_loader config flag
|
70
|
+
|
71
|
+
# 1.0.6 (revoked)
|
72
|
+
|
73
|
+
* Introduce use_loader config flag
|
74
|
+
|
75
|
+
# 1.0.5
|
76
|
+
|
77
|
+
* Hook trailblazer application_controller initializer to finisher_hook
|
78
|
+
|
79
|
+
# 1.0.4
|
80
|
+
|
81
|
+
* Make `Railtie::extend_application_controller!` overwriteable via a module.
|
82
|
+
|
83
|
+
# 1.0.3
|
84
|
+
|
85
|
+
* Return the computed application controller constant from `Railtie::extend_application_controller!` to make `compat` code simpler.
|
86
|
+
|
87
|
+
# 1.0.2
|
88
|
+
|
89
|
+
* Allow configuring `ApplicationController` constant via `config.trailblazer.application_controller`.
|
90
|
+
|
91
|
+
# 1.0.1
|
92
|
+
|
93
|
+
* Allow using this gem without `cells,` by loading cells support only when the `cells` gem got detected. Thanks to @promisedlandt.
|
94
|
+
|
95
|
+
# 1.0.0
|
96
|
+
|
97
|
+
* Runs only with >= Trailblazer 2.0.0.
|
98
|
+
* 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`.
|
99
|
+
* Added support for explicit `render cell(Artist::Cell::Index, model)`.
|
100
|
+
* Autoloading got replaced with explicit requires.
|
101
|
+
|
102
|
+
# 0.4.0
|
103
|
+
|
104
|
+
* Better engines support.
|
105
|
+
* Fix `Responder#errors` by simply removing it and letting `Operation#errors` return the contract errors.
|
106
|
+
|
107
|
+
# 0.3.2
|
108
|
+
|
109
|
+
* Make it work with Rails 3.x, again.
|
110
|
+
|
111
|
+
# 0.3.1
|
112
|
+
|
113
|
+
* Fix loading of `reform-rails`.
|
114
|
+
|
115
|
+
# 0.3.0
|
116
|
+
|
117
|
+
* Require `reform-rails` as a static dependency. This simplifies the user's setup significantly.
|
118
|
+
* Run the `Railtie` after `reform.form_extensions` and allow reform-rails to do its setup work, then load concepts.
|
119
|
+
|
120
|
+
# 0.2.4
|
121
|
+
|
122
|
+
* Require `trailblazer-loader-0.0.7`.
|
123
|
+
* Fix sorting, model files are now always required first.
|
124
|
+
* Manually include `Operation::Controller` in `ApplicationController` for every reload.
|
125
|
+
|
126
|
+
# 0.2.3
|
127
|
+
|
128
|
+
* Bump to `trailblazer-loader` 0.0.4.
|
129
|
+
|
130
|
+
# 0.2.2
|
131
|
+
|
132
|
+
* Remove cells loading code, this happens via trailblazer-loader now.
|
133
|
+
* We now load the concept's model file if it exists.
|
134
|
+
|
135
|
+
# 0.2.1
|
136
|
+
|
137
|
+
* Require `trailblazer-loader`.
|
138
|
+
|
139
|
+
# 0.2.0
|
140
|
+
|
141
|
+
* Use `trailblazer-loader` for loading operations and associated files, now. Note that `operations.rb` now is `operation.rb` (hence the minor bump).
|
142
|
+
* The `Operation::Controller` module is not included into `ApplicationController` automatically.
|
143
|
+
* Added `Trailblazer::Test::Integration`.
|
144
|
+
|
145
|
+
# 0.1.6
|
146
|
+
|
147
|
+
* Fix `Controller#run`, which now returns the operation instance instead of the `Else` object.
|
148
|
+
|
149
|
+
# 0.1.5
|
150
|
+
|
151
|
+
* 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.
|
152
|
+
* 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.
|
153
|
+
|
154
|
+
# 0.1.4
|
155
|
+
|
156
|
+
* Treat `:js` requests as non-document, too.
|
157
|
+
* `Controller#form` now returns the form object and not the operation.
|
158
|
+
* 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: {..}`.
|
159
|
+
|
160
|
+
# 0.1.3
|
161
|
+
|
162
|
+
* `Operation::contract` works properly with `Operation::ActiveModel` mixed in.
|
163
|
+
|
164
|
+
# 0.1.2
|
165
|
+
|
166
|
+
* First version running with Trailblazer 1.0.0.
|
data/Gemfile
CHANGED
@@ -1,9 +1,15 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
3
|
# Specify your gem's dependencies in trailblazer-rails.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
gem "cells-erb"
|
7
|
+
gem "cells-rails"
|
8
|
+
gem "reform-rails"
|
9
|
+
gem "trailblazer"
|
10
|
+
gem "trailblazer-cells"
|
11
|
+
gem "trailblazer-loader"
|
12
|
+
gem "sqlite3"
|
13
|
+
gem "minitest-capybara"
|
14
|
+
|
15
|
+
gem "appraisal"
|
data/LICENSE.txt
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2015-
|
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-2021 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,43 @@
|
|
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
|
-
##
|
12
|
-
|
13
|
-
`
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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
|
+
## Endpoint
|
12
|
+
|
13
|
+
This gem is slowly being superseded by TRB's [`endpoint` gem](https://trailblazer.to/2.1/docs/endpoint.html). Endpoints are "controller operations" that invoke your business logic operation. They are much easier to use and customize and are explained in part II of the [BUILDALIB book](https://leanpub.com/buildalib).
|
14
|
+
|
15
|
+
## Overview
|
16
|
+
|
17
|
+
`trailblazer-rails` helps you with the following.
|
18
|
+
|
19
|
+
* Running operations in your controller actions.
|
20
|
+
* Minimalistic integration tests ("smoke tests") to test controller/operation wiring.
|
21
|
+
* Rendering cells instead of an ActionView in a controller action.
|
22
|
+
|
23
|
+
Please refer to the [full documentation for more](https://trailblazer.to/2.1/docs/trailblazer.html#trailblazer-rails).
|
24
|
+
|
25
|
+
## Installation
|
26
|
+
|
27
|
+
Add this line to your application's Gemfile:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
gem 'trailblazer-rails'
|
31
|
+
```
|
32
|
+
|
33
|
+
Note that the 2.x version only runs with TRB >= 2.1.0.
|
34
|
+
|
35
|
+
## Setting flags
|
36
|
+
|
37
|
+
* `config.trailblazer.enable_loader = false` to disable Trailblazer loader (default TRUE)
|
38
|
+
* `config.trailblazer.enable_tracing = true` to enable tracing when using `run` (default FALSE)
|
39
|
+
|
40
|
+
## License
|
41
|
+
|
42
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
43
|
+
|
data/Rakefile
CHANGED
@@ -1,10 +1,17 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rake/testtask"
|
3
|
+
ENV["RAILS_ENV"] = "test"
|
3
4
|
|
4
5
|
Rake::TestTask.new(:test) do |t|
|
5
6
|
t.libs << "test"
|
6
7
|
t.libs << "lib"
|
7
|
-
t.test_files = FileList[
|
8
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
8
9
|
end
|
9
10
|
|
10
|
-
|
11
|
+
|
12
|
+
require File.expand_path("test/dummy/config/application", __dir__)
|
13
|
+
|
14
|
+
Rails.application.load_tasks
|
15
|
+
|
16
|
+
desc "Running Tests"
|
17
|
+
task default: :test
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "cells-erb"
|
6
|
+
gem "cells-rails"
|
7
|
+
gem "reform-rails"
|
8
|
+
gem "trailblazer"
|
9
|
+
gem "trailblazer-cells"
|
10
|
+
gem "trailblazer-loader"
|
11
|
+
gem "sqlite3", "~> 1.3.8"
|
12
|
+
gem "minitest-capybara"
|
13
|
+
gem "appraisal"
|
14
|
+
gem "actionpack", "~> 5.2.0"
|
15
|
+
gem "activerecord", "~> 5.2.0"
|
16
|
+
|
17
|
+
gemspec path: "../"
|