lib/rivet/client.rb in rivet-1.0.8 vs lib/rivet/client.rb in rivet-1.1.0

- old
+ new

@@ -4,14 +4,21 @@ end def run(options) AwsUtils.set_aws_credentials(options[:profile]) Rivet::Log.level(options[:log_level]) - Rivet::Utils.ensure_minimum_setup - group_def = Rivet::Utils.get_definition(options[:group]) + unless Dir.exists?(options[:definitions_directory]) + Rivet::Utils.die("The autoscale definitions directory doesn't exist") + end - Rivet::Utils.die "The #{options[:group]} definition doesn't exist" unless group_def + group_def = Rivet::Utils.get_definition( + options[:group], + options[:definitions_directory]) + + unless group_def + Rivet::Utils.die "The #{options[:group]} definition doesn't exist" + end Rivet::Log.info("Checking #{options[:group]} autoscaling definition") autoscale_def = Rivet::Autoscale.new(options[:group],group_def) autoscale_def.show_differences