rabbit_swift 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb0877b2ef8643894f363f9f293834f372e67f4d
4
- data.tar.gz: 4387901e648b5cc7776006c11225510bdbb2ce2f
3
+ metadata.gz: 035fedf43cf73dbc804705aafadae8649d917a11
4
+ data.tar.gz: 079027e4a94d462bf065ff78f39f01dcafdf98e9
5
5
  SHA512:
6
- metadata.gz: fea5b73bc0c641d725d3ec1702dd99ac009f1c7a772868ae1f8189024f37c479ef57c3477144ca65dc98f8f9154d2c3de2f024de2e8db0a01cbfbad120d59bd0
7
- data.tar.gz: 0236f44c78c686f834a97915f36ac0a389ef38fdd15320acb3bef7702e4173c9ec56c6498ce21efcbb2e2d724341587655ae9f8c4f4fba2d7406518b681607ef
6
+ metadata.gz: 6364d9adb01df7a69fbcdd5a6cc6607e8b01d0aaf01c275dd267d5ae7fe1368811d0aed061e49cd3bf71c34599003bef8987f98e7618a3e99ed15e82b97088a7
7
+ data.tar.gz: 719b5cb324b99b261294369198315a5cf6cdee2fd5291becdae7cb69cf734067de41a6c3504fa9d8df0518b2ed15ad8d290afc1381c7a85b7d36f47daaac1f5e
data/README.md CHANGED
@@ -22,7 +22,7 @@ Or install it yourself as:
22
22
 
23
23
  ### Set server information
24
24
 
25
- ```ruby
25
+ ```
26
26
  swift_conf = {
27
27
  auth_url: "https://ident-r1nd9999.cnode.jp/v2.0/tokens",
28
28
  tenantName: "1234567",
@@ -38,7 +38,7 @@ Or install it yourself as:
38
38
 
39
39
  ### Upload File or Folder
40
40
 
41
- //dest_url = ex) https://objectstore-r1nd1111.cnode.jp/v1/XXXXXXXXXXX/container_name
41
+ dest_url = "https://objectstore-r1nd1111.cnode.jp/v1/XXXXXXXXXXX/container_name"
42
42
  status = rabbit_swift_client.upload(token, dest_url, src_file_path)
43
43
 
44
44
  ### Check Result
@@ -18,6 +18,7 @@ module RabbitSwift
18
18
  @password = opt['password']
19
19
  @send_timeout = opt['send_timeout'];
20
20
  @web_mode = opt['web_mode'];
21
+ @web_file_listing = opt['web_file_listing'];
21
22
  end
22
23
 
23
24
  #curl -i 'https://********.jp/v2.0/tokens' -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{"auth": {"tenantName": "1234567", "passwordCredentials": {"username": "1234567", "password": "************"}}}'
@@ -53,9 +54,13 @@ module RabbitSwift
53
54
  if File::ftype(file_path) == 'directory'
54
55
  auth_header['Content-Length'] = 0
55
56
  auth_header['Content-Type'] = 'application/directory'
56
- if @web_mode
57
- auth_header['X-Container-Read'] = '.r:*' + ',.rlistings'
58
- auth_header['X-Container-Meta-Web-Index'] = 'index.html'
57
+ if @web_mode
58
+ if @web_file_listing
59
+ auth_header['X-Container-Read'] = '.r:*' + ',.rlistings'
60
+ auth_header['X-Container-Meta-Web-Index'] = 'index.html'
61
+ else
62
+ auth_header['X-Container-Read'] = '.r:*'
63
+ end
59
64
  #auth_header['X-Container-Meta-Web-Listings'] = 'true'
60
65
  #auth_header['X-Container-Meta-Web-Listings-CSS'] = 'listing.css'
61
66
  end
@@ -1,3 +1,3 @@
1
1
  module RabbitSwift
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
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.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - AKB428
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-21 00:00:00.000000000 Z
11
+ date: 2014-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler