trailblazer-rails 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/lib/trailblazer/rails/railtie.rb +9 -10
- data/lib/trailblazer/rails/version.rb +1 -1
- data/trailblazer-rails.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4163602857c7fccc8c5b5020b2e158bfc9ef7180
|
4
|
+
data.tar.gz: b241c68e7bcf9e150c44ce7f1b76e2da0fa590a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e4cce8c6b4019ee469846df195cc6e026b2c92a1db171d3949ab38c83a272e604f5f881d2e959977ec8f0fb304b025611f1fcf95d241c3d1620a228878e4ac2
|
7
|
+
data.tar.gz: afa31ea710f3e707f672aa524d717ce9fb58a7399931031ad160a760f01148ab2b8a258594acc225799451092838e3de64cdd6143dd7f87333cfdf073cf265f3
|
data/CHANGES.md
CHANGED
@@ -3,14 +3,8 @@ require "trailblazer/loader"
|
|
3
3
|
|
4
4
|
module Trailblazer
|
5
5
|
class Railtie < ::Rails::Railtie
|
6
|
-
def self.
|
7
|
-
Loader.new.(
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.autoload_cells(app)
|
11
|
-
Dir.glob("app/concepts/**/*cell.rb") do |f|
|
12
|
-
require_dependency "#{app.root}/#{f}" # load app/concepts/{concept}/cell.rb.
|
13
|
-
end
|
6
|
+
def self.load_concepts(app)
|
7
|
+
Loader.new.(insert: [ModelFile, before: Loader::ConceptFiles]) { |file| require_dependency("#{app.root}/#{file}") }
|
14
8
|
end
|
15
9
|
|
16
10
|
# This is to autoload Operation::Dispatch, etc. I'm simply assuming people find this helpful in Rails.
|
@@ -23,8 +17,7 @@ module Trailblazer
|
|
23
17
|
# the trb autoloading has to be run after initializers have been loaded, so we can tweak inclusion of features in
|
24
18
|
# initializers.
|
25
19
|
ActionDispatch::Reloader.to_prepare do
|
26
|
-
Trailblazer::Railtie.
|
27
|
-
Trailblazer::Railtie.autoload_cells(app)
|
20
|
+
Trailblazer::Railtie.load_concepts(app)
|
28
21
|
end
|
29
22
|
end
|
30
23
|
|
@@ -35,5 +28,11 @@ module Trailblazer
|
|
35
28
|
initializer "trailblazer.application_controller" do
|
36
29
|
require "trailblazer/rails/application_controller"
|
37
30
|
end
|
31
|
+
|
32
|
+
# Prepend model file, before the concept files like operation.rb get loaded.
|
33
|
+
ModelFile = ->(input, options) do
|
34
|
+
model = "app/models/#{options[:name]}.rb"
|
35
|
+
File.exist?(model) ? [model]+input : input
|
36
|
+
end
|
38
37
|
end
|
39
38
|
end
|
data/trailblazer-rails.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
spec.add_dependency "trailblazer", ">= 1.0.4"
|
21
|
-
spec.add_dependency "trailblazer-loader", ">= 0.0.
|
21
|
+
spec.add_dependency "trailblazer-loader", ">= 0.0.2"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.10"
|
24
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
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: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trailblazer
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0.
|
33
|
+
version: 0.0.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0.
|
40
|
+
version: 0.0.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|