Sha256: 9ea42710e9817da3489d19cbde8540fcfee061b260d01ca2f380b44311d280f3
Contents?: true
Size: 794 Bytes
Versions: 18
Compression:
Stored size: 794 Bytes
Contents
command 'view amazon setup' do |c| c.syntax = 'datapimp view amazon setup' c.description = 'view the amazon (s3 + cloudfront) setup' Datapimp::Cli.accepts_keys_for(c, :amazon) c.action do |args, options| bucket = Datapimp::Sync::S3Bucket.new(remote: args.first) cloudfront = bucket.cloudfront require 'terminal-table' rows = [] rows << ["Bucket Name", bucket.remote] rows << ["Website Hostname", bucket.website_hostname] rows << ["Website URL", bucket.website_url] rows << ["Cloudfront Hostname", cloudfront.domain] rows << ["Cloudfront ID", cloudfront.id] rows << ["Cloudfront Domains", cloudfront.cname && cloudfront.cname.join(",")] table = Terminal::Table.new :rows => rows, :headings => %w(Setting Value) puts table end end
Version data entries
18 entries across 18 versions & 1 rubygems