bin/flapjack-populator in flapjack-0.6.38 vs bin/flapjack-populator in flapjack-0.6.39
- old
+ new
@@ -1,11 +1,11 @@
#!/usr/bin/env ruby
-require 'yajl/json_gem'
-require 'redis'
require 'optparse'
require 'ostruct'
+require 'yajl/json_gem'
+require 'redis'
# add lib to the default include path
unless $:.include?(File.dirname(__FILE__) + '/../lib/')
$: << File.dirname(__FILE__) + '/../lib'
end
@@ -42,9 +42,14 @@
end.parse!(ARGV)
FLAPJACK_ENV = ENV['FLAPJACK_ENV'] || 'development'
config_env = Flapjack::Configuration.new.load(options.config)
+
+if config_env.nil? || config_env.empty?
+ puts "No config data for environment '#{FLAPJACK_ENV}' found in '#{options.config}'"
+ exit(false)
+end
if options.from
filename = options.from
file = File.new(filename)
end