tb_heavy_control 0.0.1 → 0.0.2

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: a54ae4567638a77de15d4cc8f98a30b1d7876cfa
4
- data.tar.gz: 498f1fda13c24131e900a03486b3a118ecfb80a5
3
+ metadata.gz: 04f8fb089af5d1427bb581e7c0d773761427e21d
4
+ data.tar.gz: f6f59ba22fed750192e3a7f0a45550724c3f4480
5
5
  SHA512:
6
- metadata.gz: e648b9921f00750eb394ab91362f9dcdf7feeaf8d90a274b1898a0452990018deeccc5fea61f194f2cd48c864dd63530a630bc9811a94dc1ac52d84cd6b5f1a2
7
- data.tar.gz: a99c26d484770f5adac5f5ec5ecae2c237ae0ae52e3e417645f93954180cf49566372ce79bc011b8e1c7c9284133ec8c337ac09761316c3c91447c3e91be461d
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'
@@ -1,3 +1,3 @@
1
1
  module TbHeavyControl
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
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.1
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-07 00:00:00.000000000 Z
11
+ date: 2016-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails