nezu 0.5.21 → 0.5.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Gemfile.lock +3 -3
  2. data/VERSION +1 -1
  3. data/lib/nezu/runtime.rb +16 -4
  4. metadata +2 -2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nezu (0.5.21)
4
+ nezu (0.5.22)
5
5
  activerecord (~> 3.2.11)
6
6
  activesupport (~> 3.2.11)
7
7
  amqp
@@ -34,7 +34,7 @@ GEM
34
34
  eventmachine
35
35
  arel (3.0.2)
36
36
  builder (3.0.4)
37
- bunny (0.9.0.pre8)
37
+ bunny (0.9.0.pre9)
38
38
  amq-protocol (>= 1.2.0)
39
39
  columnize (0.3.6)
40
40
  configatron (2.10.0)
@@ -66,7 +66,7 @@ GEM
66
66
  sdoc (0.3.20)
67
67
  json (>= 1.1.3)
68
68
  rdoc (~> 3.10)
69
- term-ansicolor (1.1.4)
69
+ term-ansicolor (1.1.5)
70
70
  tzinfo (0.3.37)
71
71
  yamler (0.1.0)
72
72
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.21
1
+ 0.5.22
data/lib/nezu/runtime.rb CHANGED
@@ -6,7 +6,7 @@ module Nezu
6
6
  module Runtime
7
7
  # load everything needed to run the app
8
8
  def self.load_config
9
- Nezu.try(true) { configure_from_yaml('database.yml') }
9
+ configure_from_yaml('database.yml')
10
10
 
11
11
  begin
12
12
  configure_from_yaml('amqp.yml')
@@ -29,7 +29,14 @@ module Nezu
29
29
  req_files.each do |file_name|
30
30
  require file_name #Autoload is not thread-safe :(
31
31
  end
32
- Nezu.try {require Nezu.root.join('config', 'nezu')}
32
+
33
+ app_config=Nezu.root.join('config', 'nezu.rb')
34
+ if File.exist?(app_config)
35
+ require app_config
36
+ else
37
+ Nezu.logger.info("#{app_config} doesn`t exist. I`m skipping it")
38
+ end
39
+
33
40
  Nezu.logger.debug("[Nezu Runner] config loaded")
34
41
  Nezu.logger.debug(configatron.amqp)
35
42
  end
@@ -67,8 +74,13 @@ module Nezu
67
74
  private
68
75
 
69
76
  def self.configure_from_yaml(yaml_file) #:nodoc:
70
- yaml = YAML.load_file(Nezu.root.join('config', yaml_file))
71
- configatron.configure_from_hash(File.basename(yaml_file.sub(/.yml/, '')) => yaml)
77
+ config_file = Nezu.root.join('config', yaml_file)
78
+ if File.exist?(config_file)
79
+ yaml = YAML.load_file(config_file)
80
+ configatron.configure_from_hash(File.basename(yaml_file.sub(/.yml/, '')) => yaml)
81
+ else
82
+ Nezu.logger.info("#{config_file} doesn`t exist. I`m skipping it")
83
+ end
72
84
  end
73
85
  end
74
86
  end
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.21
4
+ version: 0.5.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-04-16 00:00:00.000000000 Z
13
+ date: 2013-04-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: amqp