trailblazer-rails 1.0.1 → 1.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1313bd4f72d3a94c54b3565eb18fa509b1ba16a
|
4
|
+
data.tar.gz: 01c119ddb120184b4f27c5eaf3faa8f2e3452ada
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bd3394a4eb34d70973f4056027a80400dcc98a76401a813b311cac8b094b66eee32aaf8ac83c4d002df1af54043ae083dcf581ca64bf1c03335bef2dbb4b517
|
7
|
+
data.tar.gz: 007045af867c51efe9b0941ed81a8407238711374dfa9ea4cd4f7d01a0586397284fd836c7c0e7961b3232b7622b74cb2bf7c4242d00d0e1b05ff0ab4f1e5f5d
|
data/CHANGES.md
CHANGED
data/lib/trailblazer/rails.rb
CHANGED
File without changes
|
@@ -3,6 +3,9 @@ require "trailblazer/loader"
|
|
3
3
|
|
4
4
|
module Trailblazer
|
5
5
|
class Railtie < ::Rails::Railtie
|
6
|
+
config.trailblazer = ActiveSupport::OrderedOptions.new
|
7
|
+
config.trailblazer.application_controller ||= :ApplicationController
|
8
|
+
|
6
9
|
def self.load_concepts(app)
|
7
10
|
# Loader.new.(insert: [ModelFile, before: Loader::AddConceptFiles]) { |file| require_dependency("#{app.root}/#{file}") }
|
8
11
|
load_for(app)
|
@@ -29,14 +32,9 @@ module Trailblazer
|
|
29
32
|
end
|
30
33
|
end
|
31
34
|
|
32
|
-
|
33
|
-
# require "trailblazer/rails/roar" #if Object.const_defined?(:Roar)
|
34
|
-
# end
|
35
|
-
|
36
|
-
initializer "trailblazer.application_controller" do
|
35
|
+
initializer "trailblazer.application_controller" do |app|
|
37
36
|
reloader_class.to_prepare do
|
38
|
-
|
39
|
-
ApplicationController.send :include, Trailblazer::Rails::Controller::Cell if defined?(::Cell)
|
37
|
+
Trailblazer::Railtie.extend_application_controller!(app)
|
40
38
|
end
|
41
39
|
end
|
42
40
|
|
@@ -63,5 +61,12 @@ module Trailblazer
|
|
63
61
|
ActionDispatch::Reloader
|
64
62
|
end
|
65
63
|
end
|
64
|
+
|
65
|
+
def self.extend_application_controller!(app)
|
66
|
+
application_controller = app.config.trailblazer.application_controller.to_s.constantize
|
67
|
+
|
68
|
+
application_controller.send :include, Trailblazer::Rails::Controller
|
69
|
+
application_controller.send :include, Trailblazer::Rails::Controller::Cell if defined?(::Cell)
|
70
|
+
end
|
66
71
|
end
|
67
72
|
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: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
@@ -164,8 +164,8 @@ files:
|
|
164
164
|
- Rakefile
|
165
165
|
- lib/trailblazer/operation/responder.rb
|
166
166
|
- lib/trailblazer/rails.rb
|
167
|
+
- lib/trailblazer/rails/cell.rb
|
167
168
|
- lib/trailblazer/rails/controller.rb
|
168
|
-
- lib/trailblazer/rails/controller/cell.rb
|
169
169
|
- lib/trailblazer/rails/form.rb
|
170
170
|
- lib/trailblazer/rails/railtie.rb
|
171
171
|
- lib/trailblazer/rails/test/integration.rb
|