trailblazer-rails 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7bf10b78c1fcf973a62ffa500b0008dfe73f1cc2
4
- data.tar.gz: f729f62ecac32f615119f651109a2e6de4cf0bc0
3
+ metadata.gz: b3671c119c25e9f9f72575090dcdb7398d5c5d9f
4
+ data.tar.gz: 444bdd9e5f4737406451a8d9b65f3b99ab36cacf
5
5
  SHA512:
6
- metadata.gz: a467dce46aa9e21f6824ba09db844ad0363bfa0f47dbd31e2988275401b5d5f763f2c05be5d8cc8a79bdd693d9579a64833b9ff2b9deb14010dde882c86c80e3
7
- data.tar.gz: 0ee7f00cce0d332f93166e4613c6cfa869b3f10b2837fe7ee6d8eb1be09255d468c68da2dfcf71379c3ac1f93d2a49474c8f2ea6f3226e0302334caa413bb663
6
+ metadata.gz: 39551d7596d3b73ceba16c4ca20eec455c5c1256ee91f6db0f2634ea3a3cb62dc3ef93696b2ef3a395683906b3e4d8882d32346e010f3139206024b5ae0abad0
7
+ data.tar.gz: 539c4660b17247ddfcf9f190b886ef504fddc13d3a3d069492f0314aba9e70869964aa49daa62241d6dda6a5dc8109653b6813a02a6ccdb38d9af748c5d3f257
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
+ .idea
2
+ .rakeTasks
1
3
  /.bundle/
2
4
  /.yardoc
3
5
  /Gemfile.lock
@@ -8,4 +10,5 @@
8
10
  /spec/reports/
9
11
  /tmp/
10
12
  test/**/*.log
11
- *.iml
13
+ *.iml
14
+ *.sqlite3
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 2.1.0
2
+
3
+ * Drop deprecated syntax for controller `run`
4
+ * Allow disabling of the Trailblazer loader via `config.trailblazer.use_loader = false`
5
+
1
6
  # 2.0.0
2
7
 
3
8
  * Support Trailblazer 2.1.0+
@@ -1,7 +1,7 @@
1
1
  module Trailblazer::Rails
2
2
  module Controller
3
- def run(operation, params=self.params, *dependencies)
4
- result = operation.({params: _run_params(params) }.merge(*_run_runtime_options(*dependencies)))
3
+ def run(operation, *dependencies)
4
+ result = operation.({params: _run_params(self.params) }.merge(*_run_runtime_options(*dependencies)))
5
5
 
6
6
  @model = result[:model]
7
7
  @form = Trailblazer::Rails::Form.new( result[ "contract.default" ], @model.class )
@@ -19,14 +19,14 @@ module Trailblazer::Rails
19
19
  end
20
20
 
21
21
  # This is where we can inject Dry.RB containers and the like via dependencies.
22
- def _run_runtime_options(options={}, *dependencies)
23
- [_run_options(options), *dependencies]
22
+ def _run_runtime_options(ctx={}, *dependencies)
23
+ [_run_options(ctx), *dependencies]
24
24
  end
25
25
 
26
26
  # Override this to inject dependencies such as "current_user"
27
27
  # into the runtime options.
28
- def _run_options(options)
29
- options
28
+ def _run_options(ctx)
29
+ ctx
30
30
  end
31
31
 
32
32
  module Result
@@ -1,5 +1,5 @@
1
1
  module Trailblazer
2
2
  module Rails
3
- VERSION = "2.0.0"
3
+ VERSION = "2.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer