paperclip-elvfs 0.0.5.1 → 0.0.5.2

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.
@@ -1,5 +1,5 @@
1
1
  module Paperclip
2
2
  module Elvfs
3
- VERSION = "0.0.5.1"
3
+ VERSION = "0.0.5.2"
4
4
  end
5
5
  end
@@ -56,6 +56,7 @@ module Paperclip
56
56
  def upload_file(path, file)
57
57
  curl = Curl::Easy.new(storage_url("#{File.dirname(path)}?cmd=upload&target=#{directory_target(path)}")) do |curl|
58
58
  curl.multipart_form_post = true
59
+ curl.on_failure{|curl| raise "Cann't upload file #{File.basename(path)}"}
59
60
  curl.on_success{|response| instance.update_column "#{name}_url", JSON.parse(response.body_str)['added'].first['url'] }
60
61
  end
61
62
  curl.http_post(Curl::PostField.file('upload[]', file.path, File.basename(path)))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip-elvfs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.1
4
+ version: 0.0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-24 00:00:00.000000000 Z
12
+ date: 2013-01-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: curb
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  segments:
93
93
  - 0
94
- hash: -2872529872179675857
94
+ hash: 3508464681236357403
95
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  segments:
102
102
  - 0
103
- hash: -2872529872179675857
103
+ hash: 3508464681236357403
104
104
  requirements: []
105
105
  rubyforge_project:
106
106
  rubygems_version: 1.8.24