oss-ruby 1.0.0.beta
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.
- checksums.yaml +7 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +55 -0
- data/LICENSE +13 -0
- data/README.md +92 -0
- data/Rakefile +7 -0
- data/docs/bucket_api.md +100 -0
- data/docs/cors.md +56 -0
- data/docs/multipart_upload.md +116 -0
- data/docs/object_api.md +159 -0
- data/docs/quick_start.md +57 -0
- data/lib/oss.rb +21 -0
- data/lib/oss/base.rb +65 -0
- data/lib/oss/bucket.rb +202 -0
- data/lib/oss/client.rb +97 -0
- data/lib/oss/config.rb +12 -0
- data/lib/oss/error.rb +23 -0
- data/lib/oss/object.rb +141 -0
- data/lib/oss/response.rb +37 -0
- data/lib/oss/service.rb +11 -0
- data/lib/oss/utils.rb +14 -0
- data/lib/oss/version.rb +3 -0
- data/oss-ruby.gemspec +27 -0
- data/spec/fixtures/complete_multi_upload.xml +7 -0
- data/spec/fixtures/get_bucket.xml +33 -0
- data/spec/fixtures/get_bucket_acl.xml +10 -0
- data/spec/fixtures/get_object_acl.xml +10 -0
- data/spec/fixtures/get_service.xml +19 -0
- data/spec/fixtures/init_multi_upload.xml +6 -0
- data/spec/fixtures/list_multi_upload.xml +27 -0
- data/spec/fixtures/list_object_parts.xml +27 -0
- data/spec/fixtures/test.txt +1 -0
- data/spec/fixtures/upload_object_part_copy.xml +5 -0
- data/spec/lib/base_spec.rb +66 -0
- data/spec/lib/bucket_spec.rb +324 -0
- data/spec/lib/client_spec.rb +66 -0
- data/spec/lib/config_spec.rb +23 -0
- data/spec/lib/object_spec.rb +268 -0
- data/spec/lib/oss_spec.rb +13 -0
- data/spec/lib/response_spec.rb +42 -0
- data/spec/spec_helper.rb +4 -0
- metadata +186 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe OSS::Client do
|
4
|
+
before do
|
5
|
+
@endpoint = 'oss-cn-hangzhou.aliyuncs.com'
|
6
|
+
@access_key_id = 'ACCESS_KEY_ID'
|
7
|
+
@access_key_secret = 'ACCESS_KEY_SECRET'
|
8
|
+
config = OSS::Config.new({
|
9
|
+
endpoint: @endpoint,
|
10
|
+
access_key_id: @access_key_id,
|
11
|
+
access_key_secret: @access_key_secret
|
12
|
+
})
|
13
|
+
@client = OSS::Client.new(config)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "respond to run methods" do
|
17
|
+
expect(@client).to respond_to(:run)
|
18
|
+
end
|
19
|
+
|
20
|
+
context "#run" do
|
21
|
+
it "returns instance of OSS::Response when request succeed" do
|
22
|
+
stub_request(:get, @endpoint).to_return(status: 200)
|
23
|
+
expect(@client.run :get, '/').to be_instance_of(OSS::Response)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
context "#sign" do
|
28
|
+
before do
|
29
|
+
allow(@client.config).to receive(:access_key_secret) { "OtxrzxIsfpFjA7SwPzILwy8Bw21TLhquhboDYROV" }
|
30
|
+
end
|
31
|
+
|
32
|
+
it "returns the right signature" do
|
33
|
+
string_to_sign = "PUT\nODBGOERFMDMzQTczRUY3NUE3NzA5QzdFNUYzMDQxNEM=\n" \
|
34
|
+
"text/html\nThu, 17 Nov 2005 18:49:58 GMT\n" \
|
35
|
+
"x-oss-magic:abracadabra\nx-oss-meta-author:foo" \
|
36
|
+
"@bar.com\n/oss-example/nelson"
|
37
|
+
expect(@client.send :sign, string_to_sign).to eq("26NBxoKdsyly4EDv6inkoDft/yA=")
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context "#authorization_string" do
|
42
|
+
before do
|
43
|
+
allow(@client.options).to receive(:[]).with(:resource) { "/oss-example/nelson" }
|
44
|
+
allow(@client.options).to receive(:[]).with(:sub_resource) { nil }
|
45
|
+
allow(@client.config).to receive(:access_key_id) { "44CF9590006BF252F707" }
|
46
|
+
allow(@client.config).to receive(:access_key_secret) { "OtxrzxIsfpFjA7SwPzILwy8Bw21TLhquhboDYROV" }
|
47
|
+
end
|
48
|
+
|
49
|
+
it "returns with authorization_string" do
|
50
|
+
headers = {
|
51
|
+
'Content-MD5' => 'ODBGOERFMDMzQTczRUY3NUE3NzA5QzdFNUYzMDQxNEM=',
|
52
|
+
'Content-Type' => 'text/html',
|
53
|
+
'Date' => 'Thu, 17 Nov 2005 18:49:58 GMT',
|
54
|
+
'x-oss-magic' => 'abracadabra',
|
55
|
+
'x-oss-meta-author' => 'foo@bar.com'
|
56
|
+
}
|
57
|
+
expect(@client.send :authorization_string, :put, headers).to eq("OSS 44CF9590006BF252F707:26NBxoKdsyly4EDv6inkoDft/yA=")
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
context "#connection" do
|
62
|
+
it "returns a instance of Faraday::Connection" do
|
63
|
+
expect(@client.send :connection).to be_instance_of(Faraday::Connection)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe OSS::Config do
|
4
|
+
before do
|
5
|
+
@config = OSS::Config.new({
|
6
|
+
endpoint: 'oss-cn-hangzhou.aliyuncs.com',
|
7
|
+
access_key_id: 'ACCESS_KEY_ID',
|
8
|
+
access_key_secret: 'ACCESS_KEY_SECRET'
|
9
|
+
})
|
10
|
+
end
|
11
|
+
|
12
|
+
it "has methods of endpoint, access_key_id, access_key_secret" do
|
13
|
+
expect(@config).to respond_to(:endpoint)
|
14
|
+
expect(@config).to respond_to(:access_key_id)
|
15
|
+
expect(@config).to respond_to(:access_key_secret)
|
16
|
+
end
|
17
|
+
|
18
|
+
it "use the configuration passed by options" do
|
19
|
+
expect(@config.endpoint).to eq('oss-cn-hangzhou.aliyuncs.com')
|
20
|
+
expect(@config.access_key_id).to eq('ACCESS_KEY_ID')
|
21
|
+
expect(@config.access_key_secret).to eq('ACCESS_KEY_SECRET')
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,268 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Object API" do
|
4
|
+
before :each do
|
5
|
+
@endpoint = 'oss-cn-hangzhou.aliyuncs.com'
|
6
|
+
@access_key_id = 'ACCESS_KEY_ID'
|
7
|
+
@access_key_secret = 'ACCESS_KEY_SECRET'
|
8
|
+
@oss = OSS.new({
|
9
|
+
endpoint: @endpoint,
|
10
|
+
access_key_id: @access_key_id,
|
11
|
+
access_key_secret: @access_key_secret
|
12
|
+
})
|
13
|
+
@bucket_name = 'oss-ruby-sdk-test-bucket'
|
14
|
+
@object_name = 'oss-ruby-sdk-test-object'
|
15
|
+
@non_exist_bucket = 'non-exist-bucket'
|
16
|
+
@non_exist_object = 'non-exist-object'
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "#put_object #put_object_from_file" do
|
20
|
+
before do
|
21
|
+
@body = File.read('spec/fixtures/test.txt')
|
22
|
+
stub_request(:put, "#{@bucket_name}.#{@endpoint}/#{@object_name}")
|
23
|
+
.with(headers: {'Content-Length' => @body.length.to_s}, body: @body)
|
24
|
+
.to_return(status: 200)
|
25
|
+
stub_request(:put, "#{@non_exist_bucket}.#{@endpoint}/#{@object_name}")
|
26
|
+
.with(headers: {'Content-Length' => @body.length.to_s}, body: @body)
|
27
|
+
.to_return(status: 404)
|
28
|
+
end
|
29
|
+
|
30
|
+
it "create object on bucket with file content given" do
|
31
|
+
response = @oss.put_object(@bucket_name, @object_name, File.read('spec/fixtures/test.txt'))
|
32
|
+
expect(response.status).to eq(200)
|
33
|
+
end
|
34
|
+
|
35
|
+
it "create object on bucket with file name specified" do
|
36
|
+
response = @oss.put_object_from_file(@bucket_name, @object_name, 'spec/fixtures/test.txt')
|
37
|
+
expect(response.status).to eq(200)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "create object on non existed bucket will return 404" do
|
41
|
+
response = @oss.put_object(@non_exist_bucket, @object_name, File.read('spec/fixtures/test.txt'))
|
42
|
+
expect(response.status).to eq(404)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "#copy_object" do
|
47
|
+
before do
|
48
|
+
stub_request(:put, "#{@bucket_name}.#{@endpoint}/#{@object_name}")
|
49
|
+
.with(headers: {'x-oss-copy-source' => "/#{@bucket_name}/source-file-name"})
|
50
|
+
.to_return(status: 200)
|
51
|
+
end
|
52
|
+
|
53
|
+
it "copy object on bucket" do
|
54
|
+
response = @oss.copy_object(@bucket_name, 'source-file-name', @bucket_name, @object_name)
|
55
|
+
expect(response.status).to eq(200)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe "#get_object" do
|
60
|
+
before do
|
61
|
+
stub_request(:get, "#{@bucket_name}.#{@endpoint}/#{@object_name}")
|
62
|
+
.to_return(status: 200)
|
63
|
+
end
|
64
|
+
|
65
|
+
it "read object from bucket" do
|
66
|
+
response = @oss.get_object(@bucket_name, @object_name)
|
67
|
+
expect(response.status).to eq(200)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe "#append_object" do
|
72
|
+
before do
|
73
|
+
stub_request(:post, "#{@bucket_name}.#{@endpoint}/#{@object_name}?append&position=0")
|
74
|
+
.with(body: 'append content')
|
75
|
+
.to_return(status: 200, headers: {'x-oss-next-append-position' => '14'})
|
76
|
+
end
|
77
|
+
|
78
|
+
it "append object on bucket" do
|
79
|
+
response = @oss.append_object(@bucket_name, @object_name, 'append content')
|
80
|
+
expect(response.status).to eq(200)
|
81
|
+
expect(response.headers['x-oss-next-append-position']).to eq('14')
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
describe "#delete_object" do
|
86
|
+
before do
|
87
|
+
stub_request(:delete, "#{@bucket_name}.#{@endpoint}/#{@object_name}")
|
88
|
+
.to_return(status: 204)
|
89
|
+
end
|
90
|
+
|
91
|
+
it "delete object from bucket" do
|
92
|
+
response = @oss.delete_object(@bucket_name, @object_name)
|
93
|
+
expect(response.status).to eq(204)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
describe "#delete_multiple_objects" do
|
98
|
+
before do
|
99
|
+
stub_request(:post, "#{@bucket_name}.#{@endpoint}/?delete")
|
100
|
+
.with(
|
101
|
+
body: hash_including(
|
102
|
+
'Delete' => {'Quiet' => 'false', 'Object' => {'Key' => @object_name}}
|
103
|
+
)
|
104
|
+
)
|
105
|
+
.to_return(status: 200)
|
106
|
+
end
|
107
|
+
|
108
|
+
it "delete multiple objects from bucket" do
|
109
|
+
response = @oss.delete_multiple_objects(@bucket_name, [@object_name])
|
110
|
+
expect(response.status).to eq(200)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
describe "#head_object" do
|
115
|
+
before do
|
116
|
+
stub_request(:head, "#{@bucket_name}.#{@endpoint}/#{@object_name}")
|
117
|
+
.to_return(status: 200, headers: {'x-oss-object-type' => 'Normal'})
|
118
|
+
end
|
119
|
+
|
120
|
+
it "read object meta information from bucket" do
|
121
|
+
response = @oss.head_object(@bucket_name, @object_name)
|
122
|
+
expect(response.status).to eq(200)
|
123
|
+
expect(response.headers['x-oss-object-type']).to eq('Normal')
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
describe "#put_object_acl" do
|
128
|
+
before do
|
129
|
+
@permission = 'private'
|
130
|
+
stub_request(:put, "#{@bucket_name}.#{@endpoint}/#{@object_name}?acl")
|
131
|
+
.with(headers: {'x-oss-object-acl' => @permission})
|
132
|
+
.to_return(status: 200)
|
133
|
+
end
|
134
|
+
|
135
|
+
it "modify object ACL on bucket" do
|
136
|
+
response = @oss.put_object_acl(@bucket_name, @object_name, @permission)
|
137
|
+
expect(response.status).to eq(200)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
describe "#get_object_acl" do
|
142
|
+
before do
|
143
|
+
@permission = 'private'
|
144
|
+
stub_request(:get, "#{@bucket_name}.#{@endpoint}/#{@object_name}?acl")
|
145
|
+
.to_return(status: 200, body: File.read('spec/fixtures/get_object_acl.xml'))
|
146
|
+
end
|
147
|
+
|
148
|
+
it "modify object ACL on bucket" do
|
149
|
+
response = @oss.get_object_acl(@bucket_name, @object_name)
|
150
|
+
expect(response.status).to eq(200)
|
151
|
+
expect(response.xpath("//Grant").text).to eq(@permission)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
describe "#init_multi_upload" do
|
156
|
+
before do
|
157
|
+
stub_request(:post, "#{@bucket_name}.#{@endpoint}/#{@object_name}?uploads")
|
158
|
+
.to_return(status: 200, body: File.read('spec/fixtures/init_multi_upload.xml'))
|
159
|
+
end
|
160
|
+
|
161
|
+
it "initialize multipart upload event on bucket" do
|
162
|
+
response = @oss.init_multi_upload(@bucket_name, @object_name)
|
163
|
+
expect(response.status).to eq(200)
|
164
|
+
expect(response.xpath("//UploadId").text).to be_instance_of(String)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
describe "#upload_object_part" do
|
169
|
+
before do
|
170
|
+
@upload_id = '0004B9894A22E5B1888A1E29F8236E2D'
|
171
|
+
stub_request(:put, "#{@bucket_name}.#{@endpoint}/#{@object_name}?partNumber=1&uploadId=#{@upload_id}")
|
172
|
+
.with(body: File.read('spec/fixtures/test.txt'))
|
173
|
+
.to_return(status: 200, headers: {'ETag' => '7265F4D211B56873A381D321F586E4A9'})
|
174
|
+
end
|
175
|
+
|
176
|
+
it "upload object part on bucket" do
|
177
|
+
response = @oss.upload_object_part(@bucket_name, @object_name, File.read('spec/fixtures/test.txt'), @upload_id)
|
178
|
+
expect(response.status).to eq(200)
|
179
|
+
expect(response.headers['ETag']).to be_instance_of(String)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
describe "#upload_object_part_copy" do
|
184
|
+
before do
|
185
|
+
@upload_id = '0004B9894A22E5B1888A1E29F8236E2D'
|
186
|
+
stub_request(:put, "#{@bucket_name}.#{@endpoint}/#{@object_name}?partNumber=1&uploadId=#{@upload_id}")
|
187
|
+
.with(headers: {'x-oss-copy-source' => "/#{@bucket_name}/source-file-name"})
|
188
|
+
.to_return(status: 200, body: File.read('spec/fixtures/upload_object_part_copy.xml'))
|
189
|
+
end
|
190
|
+
|
191
|
+
it "copy upload object part on bucket" do
|
192
|
+
response = @oss.upload_object_part_copy(@bucket_name, 'source-file-name', @bucket_name, @object_name, @upload_id)
|
193
|
+
expect(response.status).to eq(200)
|
194
|
+
expect(response.xpath("//ETag").text).to be_instance_of(String)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
describe "#complete_multi_upload" do
|
199
|
+
before do
|
200
|
+
@upload_id = '0004B9894A22E5B1888A1E29F8236E2D'
|
201
|
+
stub_request(:post, "#{@bucket_name}.#{@endpoint}/#{@object_name}?uploadId=#{@upload_id}")
|
202
|
+
.with(
|
203
|
+
body: hash_including(
|
204
|
+
'CompleteMultipartUpload' => {
|
205
|
+
'Part' => {
|
206
|
+
'PartNumber' => '1',
|
207
|
+
'ETag' => '7265F4D211B56873A381D321F586E4A9'
|
208
|
+
}
|
209
|
+
}
|
210
|
+
)
|
211
|
+
)
|
212
|
+
.to_return(status: 200, body: File.read('spec/fixtures/complete_multi_upload.xml'))
|
213
|
+
end
|
214
|
+
|
215
|
+
it "complete multiple part upload event on bucket" do
|
216
|
+
response = @oss.complete_multi_upload(
|
217
|
+
@bucket_name,
|
218
|
+
@object_name,
|
219
|
+
@upload_id, [{
|
220
|
+
part_number: 1,
|
221
|
+
etag: "7265F4D211B56873A381D321F586E4A9"
|
222
|
+
}]
|
223
|
+
)
|
224
|
+
expect(response.status).to eq(200)
|
225
|
+
expect(response.xpath("//Key").text).to eq(@object_name)
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
describe "#abort_multi_upload" do
|
230
|
+
before do
|
231
|
+
@upload_id = '0004B9894A22E5B1888A1E29F8236E2D'
|
232
|
+
stub_request(:delete, "#{@bucket_name}.#{@endpoint}/#{@object_name}?uploadId=#{@upload_id}")
|
233
|
+
.to_return(status: 204)
|
234
|
+
end
|
235
|
+
|
236
|
+
it "abort multipart upload event on bucket" do
|
237
|
+
response = @oss.abort_multi_upload(@bucket_name, @object_name, @upload_id)
|
238
|
+
expect(response.status).to eq(204)
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
describe "#list_multi_upload" do
|
243
|
+
before do
|
244
|
+
stub_request(:get, "#{@bucket_name}.#{@endpoint}/?uploads")
|
245
|
+
.to_return(status: 200, body: File.read('spec/fixtures/list_multi_upload.xml'))
|
246
|
+
end
|
247
|
+
|
248
|
+
it "list multipart upload events on bucket" do
|
249
|
+
response = @oss.list_multi_upload(@bucket_name)
|
250
|
+
expect(response.status).to eq(200)
|
251
|
+
expect(response.xpath("//Bucket").text).to eq(@bucket_name)
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
describe "#list_object_parts" do
|
256
|
+
before do
|
257
|
+
@upload_id = '0004B9894A22E5B1888A1E29F8236E2D'
|
258
|
+
stub_request(:get, "#{@bucket_name}.#{@endpoint}/#{@object_name}?uploadId=#{@upload_id}")
|
259
|
+
.to_return(status: 200, body: File.read('spec/fixtures/list_object_parts.xml'))
|
260
|
+
end
|
261
|
+
|
262
|
+
it "list multiple upload object parts of specified upload id on bucket" do
|
263
|
+
response = @oss.list_object_parts(@bucket_name, @object_name, @upload_id)
|
264
|
+
expect(response.status).to eq(200)
|
265
|
+
expect(response.xpath("//Bucket").text).to eq(@bucket_name)
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe OSS do
|
4
|
+
it "instantiate an instance" do
|
5
|
+
oss = OSS.new({
|
6
|
+
endpoint: 'oss-cn-hangzhou.aliyuncs.com',
|
7
|
+
access_key_id: 'ACCESS_KEY_ID',
|
8
|
+
access_key_secret: 'ACCESS_KEY_SECRET'
|
9
|
+
})
|
10
|
+
expect(oss).to be_an_instance_of(OSS::Base)
|
11
|
+
expect(oss).to respond_to(:config)
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe OSS::Response do
|
4
|
+
before do
|
5
|
+
response = Faraday::Response.new
|
6
|
+
@response = OSS::Response.new(response)
|
7
|
+
end
|
8
|
+
|
9
|
+
it "respond to methods" do
|
10
|
+
expect(@response).to respond_to(:response)
|
11
|
+
expect(@response).to respond_to(:body)
|
12
|
+
expect(@response).to respond_to(:headers)
|
13
|
+
expect(@response).to respond_to(:status)
|
14
|
+
expect(@response).to respond_to(:doc)
|
15
|
+
expect(@response).to respond_to(:xpath)
|
16
|
+
end
|
17
|
+
|
18
|
+
context "receive an api error" do
|
19
|
+
before do
|
20
|
+
body = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error>\n" \
|
21
|
+
"<Code>NoSuchBucket</Code>\n <Message>The specified bucket " \
|
22
|
+
"does not exist.</Message>\n <RequestId>56482B096078C074024EA8A6" \
|
23
|
+
"</RequestId>\n <HostId>test-bucket-2a.oss-cn-hangzhou.aliyuncs." \
|
24
|
+
"com</HostId>\n <BucketName>test-bucket-2a</BucketName>\n</Error>\n"
|
25
|
+
allow(@response).to receive(:status) { 400 }
|
26
|
+
allow(@response).to receive(:doc) { Nokogiri::XML(body) }
|
27
|
+
end
|
28
|
+
|
29
|
+
it "respond to methods" do
|
30
|
+
expect(@response.error).to be_instance_of(OSS::APIError)
|
31
|
+
expect(@response.error).to respond_to(:code)
|
32
|
+
expect(@response.error).to respond_to(:message)
|
33
|
+
expect(@response.error).to respond_to(:request_id)
|
34
|
+
expect(@response.error).to respond_to(:host_id)
|
35
|
+
end
|
36
|
+
|
37
|
+
it "has error message and code" do
|
38
|
+
expect(@response.error.code).to eq('NoSuchBucket')
|
39
|
+
expect(@response.error.message).to eq('The specified bucket does not exist.')
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,186 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: oss-ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.beta
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Xiaoguang Chen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-11-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.9.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.9.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: nokogiri
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.6.6
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.6.6
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mime-types
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.6'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.6'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.7'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.7'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: Ruby SDK for Aliyun OSS.
|
98
|
+
email:
|
99
|
+
- xg.chen87@gmail.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- Gemfile
|
105
|
+
- Gemfile.lock
|
106
|
+
- LICENSE
|
107
|
+
- README.md
|
108
|
+
- Rakefile
|
109
|
+
- docs/bucket_api.md
|
110
|
+
- docs/cors.md
|
111
|
+
- docs/multipart_upload.md
|
112
|
+
- docs/object_api.md
|
113
|
+
- docs/quick_start.md
|
114
|
+
- lib/oss.rb
|
115
|
+
- lib/oss/base.rb
|
116
|
+
- lib/oss/bucket.rb
|
117
|
+
- lib/oss/client.rb
|
118
|
+
- lib/oss/config.rb
|
119
|
+
- lib/oss/error.rb
|
120
|
+
- lib/oss/object.rb
|
121
|
+
- lib/oss/response.rb
|
122
|
+
- lib/oss/service.rb
|
123
|
+
- lib/oss/utils.rb
|
124
|
+
- lib/oss/version.rb
|
125
|
+
- oss-ruby.gemspec
|
126
|
+
- spec/fixtures/complete_multi_upload.xml
|
127
|
+
- spec/fixtures/get_bucket.xml
|
128
|
+
- spec/fixtures/get_bucket_acl.xml
|
129
|
+
- spec/fixtures/get_object_acl.xml
|
130
|
+
- spec/fixtures/get_service.xml
|
131
|
+
- spec/fixtures/init_multi_upload.xml
|
132
|
+
- spec/fixtures/list_multi_upload.xml
|
133
|
+
- spec/fixtures/list_object_parts.xml
|
134
|
+
- spec/fixtures/test.txt
|
135
|
+
- spec/fixtures/upload_object_part_copy.xml
|
136
|
+
- spec/lib/base_spec.rb
|
137
|
+
- spec/lib/bucket_spec.rb
|
138
|
+
- spec/lib/client_spec.rb
|
139
|
+
- spec/lib/config_spec.rb
|
140
|
+
- spec/lib/object_spec.rb
|
141
|
+
- spec/lib/oss_spec.rb
|
142
|
+
- spec/lib/response_spec.rb
|
143
|
+
- spec/spec_helper.rb
|
144
|
+
homepage: https://github.com/serco-chen/oss-ruby
|
145
|
+
licenses:
|
146
|
+
- Apache-2.0
|
147
|
+
metadata: {}
|
148
|
+
post_install_message:
|
149
|
+
rdoc_options: []
|
150
|
+
require_paths:
|
151
|
+
- lib
|
152
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
|
+
requirements:
|
159
|
+
- - ">"
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: 1.3.1
|
162
|
+
requirements: []
|
163
|
+
rubyforge_project:
|
164
|
+
rubygems_version: 2.4.8
|
165
|
+
signing_key:
|
166
|
+
specification_version: 4
|
167
|
+
summary: Ruby SDK for Aliyun OSS
|
168
|
+
test_files:
|
169
|
+
- spec/fixtures/complete_multi_upload.xml
|
170
|
+
- spec/fixtures/get_bucket.xml
|
171
|
+
- spec/fixtures/get_bucket_acl.xml
|
172
|
+
- spec/fixtures/get_object_acl.xml
|
173
|
+
- spec/fixtures/get_service.xml
|
174
|
+
- spec/fixtures/init_multi_upload.xml
|
175
|
+
- spec/fixtures/list_multi_upload.xml
|
176
|
+
- spec/fixtures/list_object_parts.xml
|
177
|
+
- spec/fixtures/test.txt
|
178
|
+
- spec/fixtures/upload_object_part_copy.xml
|
179
|
+
- spec/lib/base_spec.rb
|
180
|
+
- spec/lib/bucket_spec.rb
|
181
|
+
- spec/lib/client_spec.rb
|
182
|
+
- spec/lib/config_spec.rb
|
183
|
+
- spec/lib/object_spec.rb
|
184
|
+
- spec/lib/oss_spec.rb
|
185
|
+
- spec/lib/response_spec.rb
|
186
|
+
- spec/spec_helper.rb
|