refinerycms-s3assets 0.0.4 → 0.0.5

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.
@@ -27,16 +27,16 @@ module Refinery
27
27
 
28
28
  puts "There are #{Image.count} images in the #{s3_bucket} bucket"
29
29
  Image.all.each do |image|
30
- object = AWS::S3::S3Object.find image.image_uid,s3_bucket
31
- dest = File.join(output_path,"images",object.key)
32
- copy_s3_object(object,dest)
30
+ s3_object = AWS::S3::S3Object.find image.image_uid,s3_bucket
31
+ dest = File.join(output_path,"images",s3_object.key)
32
+ copy_s3_object(s3_object,dest)
33
33
  end
34
34
 
35
35
  puts "\n\nThere are #{Resource.count} resources in the #{s3_bucket} bucket"
36
36
  Resource.all.each do |resource|
37
- object = AWS::S3::S3Object.find resource.file_uid,s3_bucket
38
- dest = File.join(output_path,"resources",object.key)
39
- copy_s3_object(object,dest)
37
+ s3_object = AWS::S3::S3Object.find resource.file_uid,s3_bucket
38
+ dest = File.join(output_path,"resources",s3_object.key)
39
+ copy_s3_object(s3_object,dest)
40
40
  end
41
41
 
42
42
  end
@@ -49,10 +49,10 @@ module Refinery
49
49
 
50
50
  bar = ProgressBar.new(filesize, :percentage, :counter)
51
51
 
52
- open(to, 'w') do |f|
52
+ open(to, 'wb') do |f|
53
53
  s3_object.value do |chunk|
54
54
  bar.increment! chunk.size
55
- f.puts chunk
55
+ f.write chunk
56
56
  end
57
57
  end
58
58
 
@@ -1,5 +1,5 @@
1
1
  module Refinery
2
2
  module S3assets
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-s3assets
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Francois Harbec
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-03 00:00:00 -07:00
18
+ date: 2011-05-05 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency