rabbit_swift 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40453c0bb569cf36739e3e588aa496c8fe592ce4
4
- data.tar.gz: 91c5cf152afa701ba8a9b24061aa56ca458cf943
3
+ metadata.gz: e1e49c09f73b98e10bc709b9cb0db31e84cbefbd
4
+ data.tar.gz: 96aac88508a67ac50ee2f2e7c6ec219b10f8594f
5
5
  SHA512:
6
- metadata.gz: 6897f80baf48d5a1b3280f0869e4aa27f01f65e9f58beae0a1ea80caf6470b11de72edfc3b5a8514b141151545bd74bd8387ed3fab8ee614ff9236073ce1acce
7
- data.tar.gz: 6021a40edede3fdf5478c853a32f1a611be3c49addf9edc44f1551008fb2e1e50aca75315eef7baf9115a8f0bdb4c74f6087fa3c96955ee2d8c089e230bc983e
6
+ metadata.gz: dc0c1041288b70f9ac230706514f484fb9372479dce680789c1349878e59565d3456943d725dd736b37e5b6af202627f41ee083bdfb1f4e853e549f1379619cd
7
+ data.tar.gz: d2246f44b780eacd509780471501570f0ed3be62b8a72ec4e1dd01fda1f74f8368cbfa7be565c776f0fe01301691de41e03ef2499a28782711bf2fbdb17805de
data/README.md CHANGED
@@ -25,7 +25,8 @@ Or install it yourself as:
25
25
  ```
26
26
  swift_conf = {
27
27
  auth_url: "https://ident-r1nd9999.cnode.jp/v2.0/tokens",
28
- tenantName: "1234567",
28
+ tenantName: "1234567", // Conoha Swift V1
29
+ tenantId: "1234567", // Conoha Swift V2
29
30
  username: "chino",
30
31
  password: "password",
31
32
  endPoint: "https://objectstore.node.jp/v1/77777777"
@@ -19,6 +19,7 @@ module RabbitSwift
19
19
  def initialize(opt)
20
20
  @auth_url = opt['auth_url']
21
21
  @tenantName = opt['tenantName']
22
+ @tenantId = opt['tenantId']
22
23
  @username = opt['username']
23
24
  @password = opt['password']
24
25
  @send_timeout = opt['send_timeout'];
@@ -35,6 +36,9 @@ module RabbitSwift
35
36
  body = build_auth_json
36
37
 
37
38
  http_client = HTTPClient.new
39
+
40
+ p @auth_url
41
+ p body
38
42
 
39
43
  response = http_client.post_content(@auth_url, body, 'Content-Type' => 'application/json')
40
44
  response_json_body = JSON.load(response)
@@ -224,14 +228,15 @@ module RabbitSwift
224
228
 
225
229
  def build_auth_json
226
230
  auth_json = {
227
- auth: {
228
- #tenantName: @tenantName,
229
- passwordCredentials: {
230
- username: @username,
231
- password: @password
231
+ 'auth' => {
232
+ 'passwordCredentials' => {
233
+ 'username' => @username,
234
+ 'password' => @password
232
235
  }
233
236
  }
234
237
  }
238
+ auth_json['auth']['tenantName'] = @tenantName unless @tenantName.nil?
239
+ auth_json['auth']['tenantId'] = @tenantId unless @tenantId.nil?
235
240
  JSON.dump(auth_json)
236
241
  end
237
242
 
@@ -1,3 +1,3 @@
1
1
  module RabbitSwift
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbit_swift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - AKB428
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-28 00:00:00.000000000 Z
11
+ date: 2015-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -134,3 +134,4 @@ signing_key:
134
134
  specification_version: 4
135
135
  summary: OpenStack Swift Simple Client
136
136
  test_files: []
137
+ has_rdoc: