bin/s3_website in s3_website-1.6.3 vs bin/s3_website in s3_website-1.6.4

- old
+ new

@@ -4,10 +4,12 @@ class Cfg < Thor desc 'create', 'Create a config file with placeholder values' def create S3Website::Tasks.config_create Dir.pwd + rescue Exception => e + puts S3Website.error_report e end desc 'apply', 'Apply the configuration on the AWS services' long_desc <<-LONGDESC `s3_website cfg apply` will apply the configuration the S3 bucket. @@ -17,11 +19,17 @@ If the S3 bucket does not exist, this command will create it and configure it to function as a website. LONGDESC def apply puts 'Applying the configurations in s3_website.yml on the AWS services ...' - system('configure-s3-website --config-file s3_website.yml') + require 'configure-s3-website' + config_source = ConfigureS3Website::FileConfigSource.new 's3_website.yml' + ConfigureS3Website::Runner.run({ + :config_source => config_source + }) + rescue Exception => e + puts S3Website.error_report e end end class Cli < Thor option( @@ -48,9 +56,11 @@ also delete from S3 the files that you no longer have locally. LONGDESC def push site_path = S3Website::Paths.infer_site_path options[:site] S3Website::Tasks.push(options[:config_dir], site_path, options[:headless]) + rescue Exception => e + puts S3Website.error_report e end desc 'cfg SUBCOMMAND ...ARGS', 'Operate on the config file' subcommand 'cfg', Cfg end