capriza-aws 0.0.12 → 0.0.13

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.rb CHANGED
@@ -83,27 +83,27 @@ module Capriza
83
83
  end
84
84
 
85
85
  end
86
+ class S3upload
87
+ def initialize(bucket, folder_name, config, make_public = false)
88
+ S3connect.new(config)
89
+ s3 = AWS::S3.new()
86
90
 
87
- end
88
-
89
- class S3upload
90
- def initialize(bucket, folder_name, config, make_public = false)
91
- S3connect.new(config)
92
- s3 = AWS::S3.new()
91
+ b = s3.buckets[bucket_name]
93
92
 
94
- b = s3.buckets[bucket_name]
93
+ Dir.foreach(folder_name) do |item|
94
+ next if item == '.' or item == '..'
95
95
 
96
- Dir.foreach(folder_name) do |item|
97
- next if item == '.' or item == '..'
96
+ basename = File.basename(item)
97
+ o = b.objects[basename]
98
+ o.write(:file => item)
99
+ o.acl = :public_read if make_public
100
+ puts item
98
101
 
99
- basename = File.basename(item)
100
- o = b.objects[basename]
101
- o.write(:file => item)
102
- o.acl = :public_read if make_public
103
- puts item
102
+ end
104
103
 
105
104
  end
106
-
107
105
  end
106
+
108
107
  end
108
+
109
109
  end
@@ -1,5 +1,5 @@
1
1
  module Capriza
2
2
  module Aws
3
- VERSION = "0.0.12"
3
+ VERSION = "0.0.13"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capriza-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: