lib/awestruct/cli/deploy.rb in awestruct-0.4.2.x5 vs lib/awestruct/cli/deploy.rb in awestruct-0.4.2.x6

- old
+ new

@@ -10,11 +10,11 @@ attr_accessor :deploy_config def initialize(site_config, deploy_config) @site_config = site_config @deploy_config = deploy_config - deploy_config[:type] ||= (deploy_config[:host] == :github_pages ? :github_pages : :rsync) + deploy_config[:type] ||= (is_github? ? :github_pages : :rsync) end def deploy_type deploy_config[:type] end @@ -27,9 +27,14 @@ return end deployer = deployer_class.new( site_config, deploy_config ) deployer.run + end + + private + def is_github? + deploy_config[:host].to_s == :github_pages.to_s || deploy_config['host'].to_s == :github_pages.to_s end end end end