lib/caravan.rb in caravan-0.7.0 vs lib/caravan.rb in caravan-1.0.0.beta1
- old
+ new
@@ -19,11 +19,15 @@
ignores = merged_conf["exclude"]
debug = merged_conf["debug"]
Caravan::Config.pretty_puts(merged_conf)
- deployer = Caravan::Deploy.create_deployer(src_path, target_path, deploy_mode)
+ deployer = Caravan::Deploy.create_deployer(
+ src_path,
+ target_path,
+ deploy_mode
+ )
deployer.debug = true if debug
exit(-1) if deployer.nil?
listener = create_listener(deployer, src_path)
ignores.each do |item|
@@ -60,10 +64,11 @@
# rubocop:disable Lint/NonLocalExitFromIterator
return unless deployer.handle_change(modified, added, removed)
return unless deployer.before_deploy
deployer.run
deployer.after_deploy
+ # rubocop:enable Lint/NonLocalExitFromIterator
end
end
def process_conf(src_path, yaml_name = Caravan::Config.default_conf_name)
Caravan::Message.success("Reading configuration...")
@@ -76,10 +81,13 @@
def sleep_forever
loop { sleep 1000 }
end
def dump_default_conf
- user_config_path = File.join(File.expand_path("."), Caravan::Config.default_conf_name)
+ user_config_path = File.join(
+ File.expand_path("."),
+ Caravan::Config.default_conf_name
+ )
default_conf = Caravan::Config.default_conf
Caravan::Config.dump(user_config_path, default_conf)
end
end