rabbit_swift 0.1.3 → 0.1.4

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: 3a676a287a4eaf53bb1cc51ab0a08236b4d91746
4
- data.tar.gz: 394b0ca8c3f6a2520e5f78ab78db75b19011409a
3
+ metadata.gz: cb0877b2ef8643894f363f9f293834f372e67f4d
4
+ data.tar.gz: 4387901e648b5cc7776006c11225510bdbb2ce2f
5
5
  SHA512:
6
- metadata.gz: 7970902c60adaba8bcbfd4f5e8d112b7a7fd210ea9e946295ff243a334a529d1f1270734c85bcbf18854e9e444faa189cc6a3482a6f4a70589d19f07f9681444
7
- data.tar.gz: bde32b5de4149e1d853d1fe5e20ed6846cbc5d279252f3a214b2f47aa6c489741f09767eedfaf80870595d33372d58dc976dd87683525572515cfa152830590e
6
+ metadata.gz: fea5b73bc0c641d725d3ec1702dd99ac009f1c7a772868ae1f8189024f37c479ef57c3477144ca65dc98f8f9154d2c3de2f024de2e8db0a01cbfbad120d59bd0
7
+ data.tar.gz: 0236f44c78c686f834a97915f36ac0a389ef38fdd15320acb3bef7702e4173c9ec56c6498ce21efcbb2e2d724341587655ae9f8c4f4fba2d7406518b681607ef
@@ -52,20 +52,22 @@ module RabbitSwift
52
52
 
53
53
  if File::ftype(file_path) == 'directory'
54
54
  auth_header['Content-Length'] = 0
55
- if @web_mode
56
- auth_header['X-Container-Read'] = '.r:*,.rlistings'
57
- auth_header['X-Container-Meta-Web-Listings-CSS'] = 'listing.css'
55
+ 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'
59
+ #auth_header['X-Container-Meta-Web-Listings'] = 'true'
60
+ #auth_header['X-Container-Meta-Web-Listings-CSS'] = 'listing.css'
58
61
  end
59
-
62
+ p auth_header
60
63
  @res = http_client.put(URI.parse(URI.encode(target_url)), file_path, auth_header)
61
- p @res
62
64
  if @res.status == UPLOAD_SUCCESS_HTTP_STATUS_CODE
63
65
  Dir::foreach(file_path) {|f|
64
66
  next if (f == '.' || f == '..')
65
67
  begin
66
68
  child_path = path_name_obj.join(f)
67
69
  # 再帰
68
- upload(token, end_point + '/' +File::basename(file_path), child_path)
70
+ upload(token, add_filename_to_url(end_point, File::basename(file_path)), child_path)
69
71
  rescue => e
70
72
  puts e
71
73
  end
@@ -73,7 +75,6 @@ module RabbitSwift
73
75
  end
74
76
  else
75
77
  File.open(file_path) do |file|
76
- p auth_header
77
78
  @res = http_client.put(URI.parse(URI.encode(target_url)), file, auth_header)
78
79
  end
79
80
  end
@@ -1,3 +1,3 @@
1
1
  module RabbitSwift
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbit_swift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - AKB428