ucloud_storage 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/ucloud_storage/ucloud_storage.rb +3 -2
- data/lib/ucloud_storage/version.rb +1 -1
- metadata +69 -30
data/Gemfile.lock
CHANGED
@@ -6,7 +6,7 @@ module UcloudStorage
|
|
6
6
|
class NotAuthorized < StandardError; end
|
7
7
|
|
8
8
|
class UcloudStorage
|
9
|
-
attr_accessor :user, :pass, :storage_url, :auth_token
|
9
|
+
attr_accessor :user, :pass, :storage_url, :auth_token, :code
|
10
10
|
|
11
11
|
def authorize
|
12
12
|
response = HTTParty.get("https://api.ucloudbiz.olleh.com/storage/v1/auth/",
|
@@ -33,7 +33,8 @@ module UcloudStorage
|
|
33
33
|
"Content-Type" => contenttype,
|
34
34
|
"Content-Length" => file.size.to_s },
|
35
35
|
body: file.read)
|
36
|
-
|
36
|
+
self.code = response.code
|
37
|
+
case self.code
|
37
38
|
when 201 then
|
38
39
|
true
|
39
40
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ucloud_storage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-04-
|
13
|
+
date: 2013-04-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
17
|
-
requirement:
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,15 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
|
-
version_requirements:
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
26
31
|
- !ruby/object:Gem::Dependency
|
27
32
|
name: vcr
|
28
|
-
requirement:
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
29
34
|
none: false
|
30
35
|
requirements:
|
31
36
|
- - ! '>='
|
@@ -33,10 +38,15 @@ dependencies:
|
|
33
38
|
version: '0'
|
34
39
|
type: :development
|
35
40
|
prerelease: false
|
36
|
-
version_requirements:
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
37
47
|
- !ruby/object:Gem::Dependency
|
38
48
|
name: webmock
|
39
|
-
requirement:
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
40
50
|
none: false
|
41
51
|
requirements:
|
42
52
|
- - ! '>='
|
@@ -44,10 +54,15 @@ dependencies:
|
|
44
54
|
version: '0'
|
45
55
|
type: :development
|
46
56
|
prerelease: false
|
47
|
-
version_requirements:
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
48
63
|
- !ruby/object:Gem::Dependency
|
49
64
|
name: httparty
|
50
|
-
requirement:
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
51
66
|
none: false
|
52
67
|
requirements:
|
53
68
|
- - ! '>='
|
@@ -55,7 +70,12 @@ dependencies:
|
|
55
70
|
version: '0'
|
56
71
|
type: :runtime
|
57
72
|
prerelease: false
|
58
|
-
version_requirements:
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
59
79
|
description: ucloud storage API
|
60
80
|
email:
|
61
81
|
- wangsy@wangsy.com
|
@@ -64,21 +84,36 @@ executables: []
|
|
64
84
|
extensions: []
|
65
85
|
extra_rdoc_files: []
|
66
86
|
files:
|
67
|
-
-
|
68
|
-
|
69
|
-
-
|
70
|
-
|
71
|
-
-
|
72
|
-
|
73
|
-
-
|
74
|
-
|
75
|
-
-
|
76
|
-
|
77
|
-
-
|
78
|
-
|
79
|
-
-
|
80
|
-
|
81
|
-
-
|
87
|
+
- !binary |-
|
88
|
+
LmdpdGlnbm9yZQ==
|
89
|
+
- !binary |-
|
90
|
+
Q0hBTkdFTE9H
|
91
|
+
- !binary |-
|
92
|
+
R2VtZmlsZQ==
|
93
|
+
- !binary |-
|
94
|
+
R2VtZmlsZS5sb2Nr
|
95
|
+
- !binary |-
|
96
|
+
TElDRU5TRQ==
|
97
|
+
- !binary |-
|
98
|
+
UkVBRE1FLm1k
|
99
|
+
- !binary |-
|
100
|
+
UmFrZWZpbGU=
|
101
|
+
- !binary |-
|
102
|
+
bGliL3VjbG91ZF9zdG9yYWdlLnJi
|
103
|
+
- !binary |-
|
104
|
+
bGliL3VjbG91ZF9zdG9yYWdlL3VjbG91ZF9zdG9yYWdlLnJi
|
105
|
+
- !binary |-
|
106
|
+
bGliL3VjbG91ZF9zdG9yYWdlL3ZlcnNpb24ucmI=
|
107
|
+
- !binary |-
|
108
|
+
c3BlYy9maXh0dXJlcy9zYW1wbGVfZmlsZS50eHQ=
|
109
|
+
- !binary |-
|
110
|
+
c3BlYy9zdXBwb3J0L2F1dGhfaW5mby5zYW1wbGUueW1s
|
111
|
+
- !binary |-
|
112
|
+
c3BlYy9zdXBwb3J0L3Zjci5yYg==
|
113
|
+
- !binary |-
|
114
|
+
c3BlYy91Y2xvdWRfc3RvcmFnZV9zcGVjLnJi
|
115
|
+
- !binary |-
|
116
|
+
dWNsb3VkX3N0b3JhZ2UuZ2Vtc3BlYw==
|
82
117
|
homepage: https://github.com/wangsy/ucloud-storage
|
83
118
|
licenses: []
|
84
119
|
post_install_message:
|
@@ -99,12 +134,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
134
|
version: '0'
|
100
135
|
requirements: []
|
101
136
|
rubyforge_project: ucloudstorage
|
102
|
-
rubygems_version: 1.8.
|
137
|
+
rubygems_version: 1.8.24
|
103
138
|
signing_key:
|
104
139
|
specification_version: 3
|
105
140
|
summary: simple API for authorize, upload files
|
106
141
|
test_files:
|
107
|
-
-
|
108
|
-
|
109
|
-
-
|
110
|
-
|
142
|
+
- !binary |-
|
143
|
+
c3BlYy9maXh0dXJlcy9zYW1wbGVfZmlsZS50eHQ=
|
144
|
+
- !binary |-
|
145
|
+
c3BlYy9zdXBwb3J0L2F1dGhfaW5mby5zYW1wbGUueW1s
|
146
|
+
- !binary |-
|
147
|
+
c3BlYy9zdXBwb3J0L3Zjci5yYg==
|
148
|
+
- !binary |-
|
149
|
+
c3BlYy91Y2xvdWRfc3RvcmFnZV9zcGVjLnJi
|