Class: Rstreet::Uploader
- Inherits:
-
Object
- Object
- Rstreet::Uploader
- Defined in:
- lib/rstreet.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ Uploader
constructor
A new instance of Uploader.
- #run ⇒ Object
Constructor Details
#initialize(options) ⇒ Uploader
Returns a new instance of Uploader.
10 11 12 13 14 15 |
# File 'lib/rstreet.rb', line 10 def initialize() @options = load_env if should_load_env? config_aws end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rstreet.rb', line 17 def run collector = UploadableCollector.new(@options.src) uploadables = collector.collect bucket_communicator = BucketCommunicator.new(@options.s3_bucket, @options.dry_run) old_manifest = bucket_communicator.pull_manifest(collector.manifest_uploadable) current_manifest_builder = collector.manifest_builder diff = current_manifest_builder.diff(old_manifest) to_upload = collector.find_uploadables(diff) bucket_communicator.upload(to_upload) end |