去掉publish/unpublish接口的封装函数。

This commit is contained in:
Liang Tao
2014-04-18 16:50:18 +08:00
parent a86786b76c
commit a031645e3c
7 changed files with 6 additions and 61 deletions
+4
View File
@@ -1,5 +1,9 @@
## CHANGE LOG
### v3.4.9
- 去掉publish和unpublish接口的封装函数。 (#8143)
### v3.4.8
- 修复断点续上传功能中一直重试上传出错片的Bug。[https://github.com/qiniu/ruby-sdk/pull/87](https://github.com/qiniu/ruby-sdk/pull/87) (#7205)
+1 -1
View File
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
qiniu-rs (3.4.8)
qiniu-rs (3.4.9)
json (~> 1.7)
mime-types (~> 1.19)
rest-client (~> 1.6)
-10
View File
@@ -204,16 +204,6 @@ module Qiniu
code == StatusOK ? data : false
end
def publish(domain, bucket)
code, data = RS.publish(domain, bucket)
code == StatusOK
end
def unpublish(domain)
code, data = RS.unpublish(domain)
code == StatusOK
end
def drop(bucket)
code, data = RS.drop(bucket)
code == StatusOK
-10
View File
@@ -40,16 +40,6 @@ module Qiniu
Auth.request Config.settings[:rs_host] + '/delete/' + encode_entry_uri(bucket, key)
end
def publish(domain, bucket)
encoded_domain = Utils.urlsafe_base64_encode(domain)
Auth.request Config.settings[:rs_host] + "/publish/#{encoded_domain}/from/#{bucket}"
end
def unpublish(domain)
encoded_domain = Utils.urlsafe_base64_encode(domain)
Auth.request Config.settings[:rs_host] + "/unpublish/#{encoded_domain}"
end
def drop(bucket)
Auth.request Config.settings[:rs_host] + "/drop/#{bucket}"
end
+1 -1
View File
@@ -5,7 +5,7 @@ module Qiniu
module Version
MAJOR = 3
MINOR = 4
PATCH = 8
PATCH = 9
# Returns a version string by joining <tt>MAJOR</tt>, <tt>MINOR</tt>, and <tt>PATCH</tt> with <tt>'.'</tt>
#
# Example
-18
View File
@@ -123,24 +123,6 @@ module Qiniu
end
end
=begin
context ".publish" do
it "should works" do
code, data = Qiniu::RS::RS.publish(@domain, @bucket)
code.should == 200
puts data.inspect
end
end
context ".unpublish" do
it "should works" do
code, data = Qiniu::RS::RS.unpublish(@domain)
code.should == 200
puts data.inspect
end
end
=end
context ".move" do
it "should works" do
code, data = Qiniu::RS::RS.move(@bucket, @key, @bucket, @key2)
-21
View File
@@ -32,9 +32,6 @@ module Qiniu
end
after :all do
#result = Qiniu::RS.unpublish(@domain)
#result.should_not be_false
result1 = Qiniu::RS.drop(@bucket)
puts result1.inspect
result1.should_not be_false
@@ -278,24 +275,6 @@ module Qiniu
end
end
=begin
context ".publish" do
it "should works" do
result = Qiniu::RS.publish(@domain, @bucket)
result.should_not be_false
end
end
=end
=begin
context ".unpublish" do
it "should works" do
result = Qiniu::RS.unpublish(@domain)
result.should_not be_false
end
end
=end
context ".batch_copy" do
it "should works" do
result = Qiniu::RS.batch_copy @bucket, @key, @bucket, @key2