fog-k5 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +6 -0
- data/fog-k5.gemspec +1 -1
- data/lib/fog/k5/shared.rb +1 -1
- data/lib/fog/k5/version.rb +1 -1
- data/lib/fog/storage/k5/requests/delete_object.rb +3 -2
- data/lib/fog/storage/k5/requests/get_object.rb +3 -2
- data/lib/fog/storage/k5/requests/list_containers.rb +3 -2
- data/lib/fog/storage/k5/requests/list_objects.rb +3 -2
- data/lib/fog/storage/k5/requests/put_object.rb +3 -2
- data/lib/fog/storage/k5/utils.rb +8 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c593584d55d83577e53c4cc244b74b6314544528b2377bb72d882ad4fa0e625
|
4
|
+
data.tar.gz: 93a88324000f99c9b9f1c232ae057f50edc652da935faed9fcb6cc3bb338a177
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8d32d67418d671e22270479173fff9f8eedb125dcb487d2e8642b41c229a05b599753711dc0df2817bf0d45d4af8208fd45481a9d23116badc885c0a0d5c7dd
|
7
|
+
data.tar.gz: 9970618c0b35bf80e239c0f0f6f2de8a146490dd575e79c50c26190f5cbb07215aa335724abf624bf322415076501d94811187efb315bb7a0e0bd2fa48777ebc
|
data/.codeclimate.yml
ADDED
data/fog-k5.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency 'fog-json'
|
26
26
|
|
27
27
|
spec.add_development_dependency 'bundler', '~> 1.16'
|
28
|
-
spec.add_development_dependency 'rake', '~>
|
28
|
+
spec.add_development_dependency 'rake', '~> 12.3'
|
29
29
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
30
30
|
spec.add_development_dependency 'simplecov', '~> 0.13'
|
31
31
|
|
data/lib/fog/k5/shared.rb
CHANGED
data/lib/fog/k5/version.rb
CHANGED
@@ -5,8 +5,9 @@ module Fog
|
|
5
5
|
def put_object(container, object, data, _options = {})
|
6
6
|
data = Fog::Storage.parse_data(data)
|
7
7
|
params = {
|
8
|
-
method:
|
9
|
-
path:
|
8
|
+
method: :PUT,
|
9
|
+
path: "#{container}/#{object}",
|
10
|
+
expects: 201,
|
10
11
|
}
|
11
12
|
|
12
13
|
request(params.merge(data))
|
data/lib/fog/storage/k5/utils.rb
CHANGED
@@ -3,11 +3,18 @@ module Fog
|
|
3
3
|
class K5
|
4
4
|
module Utils
|
5
5
|
def request(params)
|
6
|
-
|
6
|
+
escaped_params = escape(params)
|
7
|
+
parse(@connection.request(escaped_params))
|
7
8
|
end
|
8
9
|
|
9
10
|
private
|
10
11
|
|
12
|
+
def escape(params)
|
13
|
+
middlewares = Excon.defaults[:middlewares] +
|
14
|
+
[Excon::Middleware::EscapePath]
|
15
|
+
params.merge(middlewares: middlewares)
|
16
|
+
end
|
17
|
+
|
11
18
|
def parse(response)
|
12
19
|
return response if response.body.empty?
|
13
20
|
return response unless json?(response)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-k5
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- blooper05
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '12.3'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '12.3'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -116,6 +116,7 @@ executables: []
|
|
116
116
|
extensions: []
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
|
+
- ".codeclimate.yml"
|
119
120
|
- ".gitignore"
|
120
121
|
- ".rspec"
|
121
122
|
- ".rubocop.yml"
|