bellboy 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,6 +25,13 @@ module Bellboy
25
25
  super(*args)
26
26
 
27
27
  Bellboy.logger = Bellboy::Logger.new(options)
28
+
29
+ if @options[:config]
30
+ unless File.exist?(@options[:config])
31
+ raise ConfigNotFound, @options[:config]
32
+ end
33
+ Berkshelf::Config.set_path(@options[:config])
34
+ end
28
35
  end
29
36
 
30
37
  class_option :verbose,
@@ -60,4 +60,15 @@ module Bellboy
60
60
  "Databag API call failed for #{@location}"
61
61
  end
62
62
  end
63
+
64
+ # Invalid configuration file path
65
+ class ConfigNotFound < BellboyError
66
+ def initialize(configpath)
67
+ @configpath = configpath
68
+ end
69
+
70
+ def to_s
71
+ "Config file #{@configpath} does not exist"
72
+ end
73
+ end
63
74
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bellboy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: