trailblazer-loader 0.1.0 → 0.1.1

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: f975435027b00685780102cadeb527eec303f687
4
- data.tar.gz: d9b1808f03432b5cf0536d20aed9eb3ddc5be540
3
+ metadata.gz: 20c4c46dd9bee3e1ab0b12477f7e2651d00d274c
4
+ data.tar.gz: 1f42235044cb73cb2330bd709b912cffa9c5d981
5
5
  SHA512:
6
- metadata.gz: cee8af018a6c130d725394e0cf3c52c9813c5afeb45b572c58546d4bb9d2ee20287af170dede5597065416deed6ce93fd09b7a4e5cfe6ade93bcf3c6bf12a32e
7
- data.tar.gz: b1aab9bc12f494e23c311b8e2364b979091519630e63ce337bc547c0fcb6ed8de6f3e427563017e9795b44a4ae062741ef9c091f7b310141ed390e39e9a9f45f
6
+ metadata.gz: b05ecf6f5740c88c8bd25d5c1c96277925ea74ce27ada23daca37432d510d01262961745889a25b18f013c8ff12c9acdb2a52fa198cff61ca6f656360d0e0917
7
+ data.tar.gz: f3462722ac620c13c4b77970de2b14492db64cb33b9d22d6199a191e3468d2668efe45fc060c03e927cd9a6f699a4c7e6c911fd2a165cb28de098d13a917b335
@@ -1,4 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.4
4
- before_install: gem install bundler -v 1.10.6
3
+ - 2.3.1
4
+ os:
5
+ - linux
6
+ - osx
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.1.1
2
+
3
+ * The loading order on OSX is now identical to Linux. Thanks to @pnikolov.
4
+
1
5
  # 0.1.0
2
6
 
3
7
  * New option `:root` to allow using loader for sources other than the current directory, e.g. for gems or Rails engines.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Nick Sutterer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -190,7 +190,7 @@ You do not need this step should you use one of the following binding gems.
190
190
  ## API
191
191
 
192
192
  ```ruby
193
- Trailblazer::Loader.new.() { |file| require_dependency(File.join(Rails.app.root, file)) }
193
+ Trailblazer::Loader.new.() { |file| require_dependency(File.join(Rails.application.root, file)) }
194
194
  ```
195
195
 
196
196
  Per default, Trailblazer-loader will use `app/concepts` as the root path for the file search. Change that with the `:concepts_root` option.
@@ -266,3 +266,6 @@ Instead of painfully reconfiguring, require explicitly and save yourself a lot o
266
266
 
267
267
  Trailblazer-loader allows you to inject your own sorting and filtering logic, should you refuse to go mainstream.
268
268
 
269
+ ## License
270
+
271
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -63,7 +63,7 @@ module Trailblazer
63
63
  end
64
64
 
65
65
  # operation files should be loaded after callbacks, policies, and the like: [callback.rb, contract.rb, policy.rb, operation.rb]
66
- SortOperationLast = ->(input, options) { input.sort { |a, b| a =~ /operation/ && b !~ /operation/ ? 1 : a !~ /operation/ && b =~ /operation/ ? 0 : a <=> b } }
66
+ SortOperationLast = ->(input, options) { input.sort { |a, b| a =~ /operation/ && b !~ /operation/ ? 1 : a !~ /operation/ && b =~ /operation/ ? -1 : a <=> b } }
67
67
  SortCreateFirst = ->(input, options) { input.sort }
68
68
  AddConceptFiles = ->(input, options) { input }
69
69
 
@@ -1,5 +1,5 @@
1
1
  module Trailblazer
2
2
  class Loader
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -8,10 +8,11 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Trailblazer::Loader::VERSION
9
9
  spec.authors = ["Nick Sutterer"]
10
10
  spec.email = ["apotonick@gmail.com"]
11
+ spec.license = "MIT"
11
12
 
12
- spec.summary = %q{bla}
13
- spec.description = %q{TOD: Write a longer description or delete this line.}
14
- spec.homepage = "http://trailblazer.to/"
13
+ spec.summary = %q{Loads all concepts files.}
14
+ spec.description = %q{Loads all Trailblazer concepts files at startup.}
15
+ spec.homepage = "http://trailblazer.to/gems/trailblazer/loader.html"
15
16
 
16
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
18
  spec.bindir = "exe"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-loader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-16 00:00:00.000000000 Z
11
+ date: 2017-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: 'TOD: Write a longer description or delete this line.'
55
+ description: Loads all Trailblazer concepts files at startup.
56
56
  email:
57
57
  - apotonick@gmail.com
58
58
  executables: []
@@ -63,16 +63,17 @@ files:
63
63
  - ".travis.yml"
64
64
  - CHANGES.md
65
65
  - Gemfile
66
+ - LICENSE.txt
66
67
  - README.md
67
68
  - Rakefile
68
- - call_sheet-notes.md
69
69
  - lib/trailblazer-loader.rb
70
70
  - lib/trailblazer/loader.rb
71
71
  - lib/trailblazer/loader/pipeline.rb
72
72
  - lib/trailblazer/loader/version.rb
73
73
  - trailblazer-loader.gemspec
74
- homepage: http://trailblazer.to/
75
- licenses: []
74
+ homepage: http://trailblazer.to/gems/trailblazer/loader.html
75
+ licenses:
76
+ - MIT
76
77
  metadata: {}
77
78
  post_install_message:
78
79
  rdoc_options: []
@@ -90,8 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
91
  version: '0'
91
92
  requirements: []
92
93
  rubyforge_project:
93
- rubygems_version: 2.4.8
94
+ rubygems_version: 2.6.3
94
95
  signing_key:
95
96
  specification_version: 4
96
- summary: bla
97
+ summary: Loads all concepts files.
97
98
  test_files: []
@@ -1,22 +0,0 @@
1
-
2
- ```ruby
3
- container = {
4
- find_concepts: FindConcepts,
5
- sort_concepts: SortConcepts,
6
- set_name: ConceptName,
7
- concept_files: ConceptFiles,
8
- }
9
-
10
- require "call_sheet"
11
- sheet = CallSheet(container: container) do
12
- map :find_concepts
13
- map :sort_concepts
14
- end
15
-
16
- require "pp"
17
- options[:files] = []
18
- pp sheet.(options, all: [1])
19
- ```
20
-
21
- * how to include step at certain position? e.g. from trailblazer-rails
22
- * pass options to all steps