tb_heavy_control 0.0.1 → 0.0.2
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 +4 -4
- data/lib/tb_heavy_control/configurable.rb +9 -0
- data/lib/tb_heavy_control/railtie.rb +1 -1
- data/lib/tb_heavy_control/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04f8fb089af5d1427bb581e7c0d773761427e21d
|
4
|
+
data.tar.gz: f6f59ba22fed750192e3a7f0a45550724c3f4480
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce574aa433f3eb001bc56a6e0f1facbcc6538006c2d34e3622892b7ed1a737f6f5041e08e4ef9ea52f299fdd4efd3cc2891887c2550ef91eb186a532e3964f3d
|
7
|
+
data.tar.gz: 69e9a80f20a894126f16ef33f88e62ddb6080be78fce06056cccdf3c3ddf49a574f844155a63a919267c3e4397a888457455e5b7cd8000c55480a5eb08abd94f
|
@@ -47,6 +47,7 @@ module TbHeavyControl
|
|
47
47
|
raise "#{folder} isn't a directory" unless folder.directory?
|
48
48
|
|
49
49
|
rb_files = folder.children.select { |pn| pn.extname == '.rb' }
|
50
|
+
load_operations(folder)
|
50
51
|
check_constant_for(folder) if rb_files.any?
|
51
52
|
rb_files.each { |file| getrb file }
|
52
53
|
end
|
@@ -68,6 +69,14 @@ module TbHeavyControl
|
|
68
69
|
|
69
70
|
# Helper methods
|
70
71
|
|
72
|
+
def load_operations(folder)
|
73
|
+
if folder.entries.include?(Pathname.new('operations'))
|
74
|
+
context folder.basename do
|
75
|
+
folder 'operations'
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
71
80
|
def check_constant_for(folder) # rubocop:disable Metrics/AbcSize (15.5)
|
72
81
|
return if CONST_CHECK_SKIP.include? folder.basename.to_s
|
73
82
|
|
@@ -13,7 +13,7 @@ module TbHeavyControl
|
|
13
13
|
# end
|
14
14
|
|
15
15
|
# this initializer is a copy from trailblazer-rails gem
|
16
|
-
initializer 'tb_heavy_control.trailblazer-rails_stuff' do
|
16
|
+
initializer 'tb_heavy_control.trailblazer-rails_stuff', before: :load_config_initializers do
|
17
17
|
require 'trailblazer/autoloading'
|
18
18
|
|
19
19
|
require 'trailblazer/operation/model'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tb_heavy_control
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roman Kolesnev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|