bellboy 0.3.3 → 0.3.4
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.
- data/lib/bellboy/cli.rb +7 -0
- data/lib/bellboy/errors.rb +11 -0
- metadata +1 -1
data/lib/bellboy/cli.rb
CHANGED
@@ -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,
|
data/lib/bellboy/errors.rb
CHANGED
@@ -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
|