nezu 0.5.9 → 0.5.10

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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/nezu/runtime.rb +10 -3
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.9
1
+ 0.5.10
data/lib/nezu/runtime.rb CHANGED
@@ -15,16 +15,23 @@ module Nezu
15
15
  raise
16
16
  end
17
17
 
18
- if configatron.database.present?
18
+ if configatron.database.present? && !Class.const_defined?(:Rails)
19
19
  ActiveRecord::Base.establish_connection(configatron.database.to_hash)
20
20
  ActiveRecord::Base.logger = Logger.new(File.expand_path(File.join('log/', 'database.log')))
21
21
  end
22
- require 'nezu/runtime'
23
- (Dir.glob(Nezu.root.join('app', '**', '*.rb')) + Dir.glob(Nezu.root.join('lib', '**', '*.rb'))).each do |file_name|
22
+
23
+ req_files = Dir.glob(Nezu.root.join('app', 'consumers', '*.rb'))
24
+ req_files += Dir.glob(Nezu.root.join('app', 'producers', '*.rb'))
25
+ unless Class.const_defined?(:Rails)
26
+ req_files += Dir.glob(Nezu.root.join('app', 'models', '*.rb'))
27
+ req_files += Dir.glob(Nezu.root.join('lib', '**', '*.rb'))
28
+ end
29
+ req_files.each do |file_name|
24
30
  require file_name #Autoload is not thread-safe :(
25
31
  end
26
32
  Nezu.try {require "config/nezu"}
27
33
  Nezu.logger.debug("[Nezu Runner] config loaded")
34
+ Nezu.logger.debug(configatron.amqp)
28
35
  end
29
36
 
30
37
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nezu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9
4
+ version: 0.5.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: