upyun-rb 0.0.3 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 758e7248f1c16a10d4523e670d04cecb95df9c62
4
- data.tar.gz: dc5c57ad4c598fbb4618fdde338a05bfbf2753ec
3
+ metadata.gz: e2716eff47a7192d560465a6aa4b8562ae62955d
4
+ data.tar.gz: 52bbb468289632bd39c2af4df851637bcd05b047
5
5
  SHA512:
6
- metadata.gz: 5496801182081878bbda25b3dc9a0a8863b5a0d4fd525894ec5752f6b1d2ee0622ef6a1f8112a7b2809ad04327d99c9758353113e9c06832fcb2d7fcbe09a9f6
7
- data.tar.gz: d3510a846ca0a608faf6e5803d59c002eb9da39c1307bd34edcfdadd97974293ac43b0876224180e550d99ba6bde85300adbb0ed449b39767d76d6776e83bb36
6
+ metadata.gz: 0be002248b5e3c5c39016965bdadedd7f1639813f9fb3614762fcddeb492576d7f539ea766c2e618721d0c1fead812e4037606719bbec3431261a0496a3f0396
7
+ data.tar.gz: 3c4becece2ef2ec296497ff6515d6baf4e39bee168e964681acb9cb6ab2227eedffaff990d7fe3870cfc6741212a92fac285c64c6753e8c0fec9c0966f1ec51d
data/LICENSE CHANGED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 Larry Zhao
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -0,0 +1,4 @@
1
+ upyun-rb
2
+ ========
3
+
4
+ upyun client
@@ -18,14 +18,14 @@ module Upyun
18
18
  date = Upyun::Util.current_date
19
19
  mime_type = `file -Ib #{file}`.gsub(/\n/,"").split(';')[0]
20
20
  file_size = file.nil? ? 0 : File.size(file)
21
- sign = Digest::MD5.hexdigest("#{method}&#{uri}&#{date}&#{filesize}&#{@signed_password}")
21
+ sign = Digest::MD5.hexdigest("PUT&#{path}&#{date}&#{file_size}&#{@signed_password}")
22
22
 
23
23
  @connection.put do |req|
24
24
  req.url path
25
- req.body = Faraday::UploadIO.new(file, mimetype)
25
+ req.body = Faraday::UploadIO.new(file, mime_type)
26
26
  req.headers['Content-Type'] = mime_type
27
27
  req.headers['Content-Length'] = file_size.to_s
28
- req.headers['Authorization'] = "UpYun #{user}:#{sign}"
28
+ req.headers['Authorization'] = "UpYun #{@operator}:#{sign}"
29
29
  req.headers['Date'] = date
30
30
  req.headers['Expect'] = ''
31
31
  end
@@ -1,3 +1,3 @@
1
1
  module Upyun
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upyun-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Larry Zhao