trailblazer-rails 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/lib/trailblazer/rails/railtie.rb +12 -9
- data/lib/trailblazer/rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60d8e312cc34a8cf86ba6d4adf0fb5d3a4d178a8
|
4
|
+
data.tar.gz: f601570b5823b9b46dd07962a89785d0bff8508e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53124f47f70adc69246da35cb2a1c9aabd32ec8f1064aa1f1c397b5356282399e0dd06bde285d6437db6b64bc598d39c01e98bd61bbc17433494c378fe5dc39a
|
7
|
+
data.tar.gz: 426612868af63cc5b2949b18493ae4d3fb2f4f8155b4aea3ed7d61524cff1b80bbeaccfd2d7a1b56204356d8734cae005e42e4e3d9a5e406c1743e6bcf572544
|
data/CHANGES.md
CHANGED
@@ -4,7 +4,8 @@ require "trailblazer/loader"
|
|
4
4
|
module Trailblazer
|
5
5
|
class Railtie < ::Rails::Railtie
|
6
6
|
config.trailblazer = ActiveSupport::OrderedOptions.new
|
7
|
-
|
7
|
+
## Accept also an Array of controllers
|
8
|
+
config.trailblazer.application_controller ||= 'ActionController::Base'
|
8
9
|
|
9
10
|
def self.load_concepts(app)
|
10
11
|
# Loader.new.(insert: [ModelFile, before: Loader::AddConceptFiles]) { |file| require_dependency("#{app.root}/#{file}") }
|
@@ -38,9 +39,11 @@ module Trailblazer
|
|
38
39
|
end
|
39
40
|
end
|
40
41
|
|
41
|
-
initializer "trailblazer.application_controller" do |app|
|
42
|
+
initializer "trailblazer.application_controller", before: "finisher_hook" do |app|
|
42
43
|
reloader_class.to_prepare do
|
43
|
-
|
44
|
+
ActiveSupport.on_load(:action_controller) do |app|
|
45
|
+
Trailblazer::Railtie.extend_application_controller!(app)
|
46
|
+
end
|
44
47
|
end
|
45
48
|
end
|
46
49
|
|
@@ -70,12 +73,12 @@ module Trailblazer
|
|
70
73
|
|
71
74
|
module ExtendApplicationController
|
72
75
|
def extend_application_controller!(app)
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
controllers = Array(::Rails.application.config.trailblazer.application_controller).map{ |x| x.to_s }
|
77
|
+
if controllers.include? app.to_s
|
78
|
+
app.send :include, Trailblazer::Rails::Controller
|
79
|
+
app.send :include, Trailblazer::Rails::Controller::Cell if defined?(::Cell)
|
80
|
+
end
|
81
|
+
app
|
79
82
|
end
|
80
83
|
end
|
81
84
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailblazer-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trailblazer
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
version: '0'
|
193
193
|
requirements: []
|
194
194
|
rubyforge_project:
|
195
|
-
rubygems_version: 2.6.
|
195
|
+
rubygems_version: 2.6.11
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: Convenient Rails support for Trailblazer.
|