rig 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,7 @@ module Rig
33
33
  def execute
34
34
  dir = File.expand_path(ENV['RIG_CONFIG'] ? ENV['RIG_CONFIG'] : directory)
35
35
  back = "#{dir}.bak.#{Time.now.to_i}"
36
- conf = File.expand_path("../../../../conf", __FILE__)
36
+ conf = File.expand_path("../../../conf", __FILE__)
37
37
 
38
38
  files = %w{
39
39
  config.yml
@@ -9,7 +9,7 @@ module Rig
9
9
 
10
10
  def data
11
11
  @data ||= begin
12
- c = YAML::load_file("#{dir}/config.yml")
12
+ c = File.exists?("#{dir}/config.yml") ? YAML::load_file("#{dir}/config.yml") : {}
13
13
 
14
14
  Rig::Log.load(c[:logging])
15
15
 
@@ -12,7 +12,8 @@ module Rig
12
12
  @loggers = []
13
13
 
14
14
  class << self
15
- def load(logging={ })
15
+ def load(logging)
16
+ logging ||= {}
16
17
  begin
17
18
  logging.each do |name, data|
18
19
  level = data[:level]
@@ -3,7 +3,7 @@ module Rig
3
3
  class Account
4
4
  class << self
5
5
  def load(name)
6
- YAML::load_file("#{dir}/#{name}.yml")
6
+ File.exists?("#{dir}/#{name}.yml") ? YAML::load_file("#{dir}/#{name}.yml") : {}
7
7
  end
8
8
 
9
9
  def list
@@ -3,7 +3,7 @@ unless defined?(Rig::Version)
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 5
6
- TINY = 1
6
+ TINY = 2
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: