asset_id 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/asset_id.rb +4 -2
  2. metadata +3 -3
data/lib/asset_id.rb CHANGED
@@ -105,8 +105,8 @@ module AssetID
105
105
  def self.upload(options={})
106
106
  connect_to_s3
107
107
  assets.each do |asset|
108
- puts "Uploading #{asset} as #{fingerprint(asset)}"
109
- mime_type = MIME::Types.of(asset).first
108
+ puts "asset_id: Uploading #{asset} as #{fingerprint(asset)}" if options[:debug]
109
+ mime_type = MIME::Types.of(asset).first.to_s
110
110
 
111
111
  headers = {
112
112
  :content_type => mime_type,
@@ -120,6 +120,8 @@ module AssetID
120
120
  data = File.read(asset)
121
121
  end
122
122
 
123
+ puts "asset_id: headers: #{headers.inspect}" if options[:debug]
124
+
123
125
  AWS::S3::S3Object.store(
124
126
  fingerprint(asset),
125
127
  data,
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asset_id
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Taylor