capriza-aws 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/capriza-aws/version.rb +1 -1
- data/lib/capriza-aws.rb +10 -1
- metadata +1 -1
data/lib/capriza-aws/version.rb
CHANGED
data/lib/capriza-aws.rb
CHANGED
@@ -95,13 +95,22 @@ module Capriza
|
|
95
95
|
end
|
96
96
|
|
97
97
|
def upload
|
98
|
-
Find.find(@options[:dir]).each
|
98
|
+
Find.find(@options[:dir]).each do |file|
|
99
|
+
puts "starting upload of #{file} to #{@options[:bucket]}"
|
100
|
+
@s3.buckets[@options[:bucket]].objects[file].write(File.read(file), @options[:file_options] || {} ) unless File.directory?(file) || raise("File #{file} cannot be uploaded to bucket #{@options[:bucket]}")
|
101
|
+
puts "completed upload of #{file} to #{@options[:bucket]}"
|
102
|
+
end
|
99
103
|
end
|
100
104
|
|
101
105
|
def delete
|
106
|
+
puts "deleting #{options['dir']}"
|
102
107
|
@s3.buckets[@options[:bucket]].objects.with_prefix(@options[:dir] + '/').delete_all
|
103
108
|
end
|
104
109
|
|
110
|
+
def rename (name)
|
111
|
+
AWS
|
112
|
+
end
|
113
|
+
|
105
114
|
end
|
106
115
|
|
107
116
|
end
|