trailblazer-rails 0.1.6 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d7750991cea8018446d6e02d6da91b188b688891
4
- data.tar.gz: cda8142b5ac93130d865f1a8f211ea10a9e33e51
3
+ metadata.gz: 67b66b38caa7865052bc90f97de4f49aba626616
4
+ data.tar.gz: 89c1fe8c19b1cf7ceed3690e4807e7c9785efdc6
5
5
  SHA512:
6
- metadata.gz: 1c914bfd24e691f30bca649a25158d242962490d743a252db9f022396ee42c0ae14f3010dbc71e73b5b985a65fae7d33bc98271d0684ab637be39f5b78bce740
7
- data.tar.gz: 9061812ca549b7d67e268a0a01e2deee7fee09e2d8243d485ca593916870ea95076729905858f84fac5fba8fef86a9ce24ecc2be6d30c4a37b48fc3423dde50a
6
+ metadata.gz: 7cd11282fb7101a0f7f2c9be90bb0ccf6e14898d5871f90ba4bf026646fc998b12882b080e5a687c904818f2005296e60ca8e4e01e46c0d3f02a5103f1a5edbb
7
+ data.tar.gz: fcf9a0d0ac5d872d1500513684837c9c3c226d35322c3c2ce9f2266a73d82ba75df19b199fc66fd2224e5adf32e8791ed8db9b366968ccb71bee515718b323dc
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.2.0
2
+
3
+ * Use `trailblazer-loader` for loading operations and associated files, now. Note that `operations.rb` now is `operation.rb` (hence the minor bump).
4
+ * The `Operation::Controller` module is not included into `ApplicationController` automatically.
5
+
1
6
  # 0.1.6
2
7
 
3
8
  * Fix `Controller#run`, which now returns the operation instance instead of the `Else` object.
data/Gemfile CHANGED
@@ -3,5 +3,6 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in trailblazer-rails.gemspec
4
4
  gemspec
5
5
 
6
- gem "trailblazer", path: "../trailblazer"
7
- # gem "trailblazer", github: "apotonick/trailblazer"
6
+ # gem "trailblazer", path: "../trailblazer"
7
+ gem "trailblazer", github: "apotonick/trailblazer"
8
+ gem "trailblazer-loader", github: "trailblazer/trailblazer-loader"
@@ -0,0 +1,3 @@
1
+ ApplicationController.class_eval do
2
+ include Trailblazer::Operation::Controller
3
+ end
@@ -3,13 +3,7 @@ require "rails/railtie"
3
3
  module Trailblazer
4
4
  class Railtie < ::Rails::Railtie
5
5
  def self.autoload_operations(app)
6
- Dir.glob("app/concepts/**/crud.rb") do |f|
7
- path = f.sub("app/concepts/", "")
8
- model = path.sub("/crud.rb", "")
9
-
10
- require_dependency "#{app.root}/app/models/#{model}" # load the model file, first (thing.rb).
11
- require_dependency "#{app.root}/#{f}" # load app/concepts/{concept}/crud.rb (Thing::Create, Thing::Update, and so on).
12
- end
6
+ Loader.new.(app.root) { |file| require_dependency(file) }
13
7
  end
14
8
 
15
9
  def self.autoload_cells(app)
@@ -32,5 +26,13 @@ module Trailblazer
32
26
  Trailblazer::Railtie.autoload_cells(app)
33
27
  end
34
28
  end
29
+
30
+ # initializer "trailblazer.roar" do
31
+ # require "trailblazer/rails/roar" #if Object.const_defined?(:Roar)
32
+ # end
33
+
34
+ initializer "trailblazer.application_controller" do
35
+ require "trailblazer/rails/application_controller"
36
+ end
35
37
  end
36
38
  end
@@ -0,0 +1,6 @@
1
+ require "minitest/rails/capybara" # loads Capybara, etc.
2
+
3
+ module Trailblazer::Test
4
+ class Integration < Capybara::Rails::TestCase
5
+ end
6
+ end
@@ -1,5 +1,5 @@
1
1
  module Trailblazer
2
2
  module Rails
3
- VERSION = "0.1.6"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["apotonick@gmail.com"]
11
11
 
12
12
  spec.summary = %q{Convenient Rails support for Trailblazer.}
13
- spec.homepage = "http://trailblazerb.org"
13
+ spec.homepage = "http://trailblazer.to"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -18,6 +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.1"
21
22
 
22
23
  spec.add_development_dependency "bundler", "~> 1.10"
23
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.1.6
4
+ version: 0.2.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: 2015-10-22 00:00:00.000000000 Z
11
+ date: 2015-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trailblazer
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.0.4
27
+ - !ruby/object:Gem::Dependency
28
+ name: trailblazer-loader
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.0.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.0.1
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -183,11 +197,13 @@ files:
183
197
  - lib/trailblazer/operation/responder.rb
184
198
  - lib/trailblazer/operation/worker.rb
185
199
  - lib/trailblazer/rails.rb
200
+ - lib/trailblazer/rails/application_controller.rb
186
201
  - lib/trailblazer/rails/autoloading.rb
187
202
  - lib/trailblazer/rails/railtie.rb
203
+ - lib/trailblazer/rails/test/integration.rb
188
204
  - lib/trailblazer/rails/version.rb
189
205
  - trailblazer-rails.gemspec
190
- homepage: http://trailblazerb.org
206
+ homepage: http://trailblazer.to
191
207
  licenses:
192
208
  - MIT
193
209
  metadata: {}