trailblazer-rails 0.3.2 → 0.4.0
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/operation/responder.rb +0 -5
- data/lib/trailblazer/rails/railtie.rb +15 -1
- data/lib/trailblazer/rails/version.rb +1 -1
- data/trailblazer-rails.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c434809f9717c0abdb110d4027883ec53ec0668d
|
4
|
+
data.tar.gz: 55108603787411cd497a0261c525008bcac8d627
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb5c793ad95a77ecc2d744eee573df819617204f50369e54b1eb27d6ec4d70b9149852a0e2f1688232422a7b1d5626734369bf1ff43aecdeb086ac3202bc0a39
|
7
|
+
data.tar.gz: d07ffb10ca139fd95e7c8a7e64415a1817d1d730bd96fc64b33e429d28ecdc4e842a566c08b9c5664f6f8dde9b43b48505b422b68f10cd8ba2de34a118eaa9c8
|
data/CHANGES.md
CHANGED
@@ -4,7 +4,16 @@ require "trailblazer/loader"
|
|
4
4
|
module Trailblazer
|
5
5
|
class Railtie < ::Rails::Railtie
|
6
6
|
def self.load_concepts(app)
|
7
|
-
Loader.new.(insert: [ModelFile, before: Loader::AddConceptFiles]) { |file| require_dependency("#{app.root}/#{file}") }
|
7
|
+
# Loader.new.(insert: [ModelFile, before: Loader::AddConceptFiles]) { |file| require_dependency("#{app.root}/#{file}") }
|
8
|
+
load_for(app)
|
9
|
+
|
10
|
+
::Rails.application.railties.find_all { |tie| tie.is_a?(::Rails::Engine) }.each do |engine|
|
11
|
+
load_for(engine)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.load_for(app)
|
16
|
+
Loader.new.(prepend: AllModelFiles, root: app.root) { |file| require_dependency(file) }
|
8
17
|
end
|
9
18
|
|
10
19
|
# This is to autoload Operation::Dispatch, etc. I'm simply assuming people find this helpful in Rails.
|
@@ -37,6 +46,11 @@ module Trailblazer
|
|
37
46
|
File.exist?(model) ? [model]+input : input
|
38
47
|
end
|
39
48
|
|
49
|
+
# Load all model files before any TRB files.
|
50
|
+
AllModelFiles = ->(input, options) do
|
51
|
+
Dir.glob("#{options[:root]}/app/models/**/*.rb") + input
|
52
|
+
end
|
53
|
+
|
40
54
|
private
|
41
55
|
|
42
56
|
def reloader_class
|
data/trailblazer-rails.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
19
|
spec.add_dependency "trailblazer", ">= 1.0.4"
|
20
|
-
spec.add_dependency "trailblazer-loader", ">= 0.0
|
20
|
+
spec.add_dependency "trailblazer-loader", ">= 0.1.0"
|
21
21
|
spec.add_dependency "reform-rails", ">= 0.1.4"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.10"
|
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.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-01 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.1.0
|
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.1.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: reform-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -236,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
236
236
|
version: '0'
|
237
237
|
requirements: []
|
238
238
|
rubyforge_project:
|
239
|
-
rubygems_version: 2.
|
239
|
+
rubygems_version: 2.6.3
|
240
240
|
signing_key:
|
241
241
|
specification_version: 4
|
242
242
|
summary: Convenient Rails support for Trailblazer.
|