bin/ridgepole in ridgepole-0.8.5 vs bin/ridgepole in ridgepole-0.8.6
- old
+ new
@@ -36,10 +36,11 @@
output_file = '-'
split = false
diff_files = nil
diff_with_apply = false
exit_code = 0
+spec_name = ''
options = {
dry_run: false,
debug: false,
color: $stdout.tty?,
@@ -74,10 +75,11 @@
ARGV.options do |opt|
begin
opt.on('-c', '--config CONF_OR_FILE') { |v| config = v }
opt.on('-E', '--env ENVIRONMENT') { |v| env = v }
+ opt.on('-s', '--spec-name SPEC_NAME') { |v| spec_name = v }
opt.on('-a', '--apply') { set_mode[:apply] }
opt.on('-m', '--merge') do
set_mode[:apply]
options[:merge] = true
end
@@ -166,11 +168,11 @@
begin
logger = Ridgepole::Logger.instance
logger.debug = options[:debug]
- client = Ridgepole::Client.new(Ridgepole::Config.load(config, env), options) if config
+ client = Ridgepole::Client.new(Ridgepole::Config.load(config, env, spec_name), options) if config
ActiveRecord::Base.logger = logger
ActiveSupport::LogSubscriber.colorize_logging = options[:color]
case mode
@@ -245,10 +247,10 @@
diff_files = diff_files.map do |diff_file|
if File.exist?(diff_file)
file_ext = File.extname(diff_file)
if %w[.yml .yaml].include?(file_ext)
- Ridgepole::Config.load(diff_file, env)
+ Ridgepole::Config.load(diff_file, env, spec_name)
else
File.open(diff_file)
end
elsif Gem::Version.new(Psych::VERSION) >= Gem::Version.new('3.1.0.pre1') # Ruby 2.6
YAML.safe_load(