Class: Awss3sync::Awss3sync
- Inherits:
-
Thor
- Object
- Thor
- Awss3sync::Awss3sync
- Includes:
- Thor::Actions
- Defined in:
- lib/awss3sync.rb
Instance Method Summary collapse
Instance Method Details
#list ⇒ Object
28 29 30 31 |
# File 'lib/awss3sync.rb', line 28 def list aws? say list_contents end |
#sync ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/awss3sync.rb', line 45 def sync aws? list_contents.reject{|directory| directory == 'backups/'}.each do |dir| say "Syncing: #{dir} From: #{[:from]} To: #{[:to]}" %x{aws s3 sync #{[:protocol]}#{[:from]}/#{dir} #{[:protocol]}#{[:to]}/#{dir}} end end |