qinium 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/qinium/client.rb +1 -12
- data/lib/qinium/host_manager.rb +1 -1
- data/lib/qinium/utils.rb +1 -1
- data/lib/qinium/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 271f6fc00f432d27ac6c9437440fc7e6406d3fcbea3130a717e4f3de8ec9f271
|
4
|
+
data.tar.gz: 3228755d7601c622c4320658a0db8893f882754ff8956babf6ca8ae6939c7ad2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc78e9d948f1602c55cae937ea98f1df63ec8ff2b5a555514fb030c82f23928b999512c529d339bf4fda672b37ba7bed02274a1c1729bf5feff180df53760cd7
|
7
|
+
data.tar.gz: 60b091e1a00504f25539fb6c890782d45cc4a72312952590408fa9880cdc950c30e042b85ba1fd04b708602356e94c6405d335cee71e5ce49bc73ac150e91722
|
data/Gemfile.lock
CHANGED
data/lib/qinium/client.rb
CHANGED
@@ -73,7 +73,7 @@ class Qinium
|
|
73
73
|
end
|
74
74
|
|
75
75
|
logger.debug "POST #{uri}"
|
76
|
-
logger.debug " body: #{req_body[0, 50]}"
|
76
|
+
logger.debug " body: #{req_body[0, 50]}" if req_body.is_a?(String)
|
77
77
|
logger.debug " headers: #{opts.to_json}"
|
78
78
|
|
79
79
|
req = Net::HTTP::Post.new(uri)
|
@@ -123,16 +123,5 @@ class Qinium
|
|
123
123
|
def success?(http_code)
|
124
124
|
self.class.success?(http_code)
|
125
125
|
end
|
126
|
-
|
127
|
-
def self.to_query(params)
|
128
|
-
if params.is_a?(Hash)
|
129
|
-
total_param = params.map do |key, value|
|
130
|
-
%(#{CGI.escape(key.to_s)}=#{CGI.escape(value.to_s).gsub("+", "%20")})
|
131
|
-
end
|
132
|
-
return total_param.join("&")
|
133
|
-
end
|
134
|
-
|
135
|
-
params
|
136
|
-
end
|
137
126
|
end
|
138
127
|
end
|
data/lib/qinium/host_manager.rb
CHANGED
@@ -64,7 +64,7 @@ class Qinium
|
|
64
64
|
raise Error, "bucket is missing" if Utils.blank?(bucket)
|
65
65
|
|
66
66
|
cache.read(access_key, bucket) do
|
67
|
-
query =
|
67
|
+
query = Utils.to_query_string(ak: access_key, bucket: bucket)
|
68
68
|
url = "#{config.uc_host}/v1/query?#{query}"
|
69
69
|
http = Client.new(config)
|
70
70
|
code, body, headers = http.get(url)
|
data/lib/qinium/utils.rb
CHANGED
data/lib/qinium/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qinium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xiaohui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Qiniu Cloud Storage SDK for multi-tenant system, can call API with multiple
|
14
14
|
accounts
|