README.md in nightcrawler_swift-0.7.0 vs README.md in nightcrawler_swift-0.8.0
- old
+ new
@@ -72,10 +72,13 @@
config.nightcrawler_swift.ssl_client_key =
OpenSSL::PKey::RSA.new(File.read("key.pem"), "passphrase, if any")
# default: nil
config.nightcrawler_swift.ssl_ca_file = "ca_certificate.pem"
+
+#default: nil
+config.nightcrawler_swift.ssl_version = "SSLv23"
```
By default it will use ```Rails.logger``` as logger, to change that use a different logger in configurations, like:
```ruby
@@ -210,10 +213,23 @@
$ nswift delete <swift_path> # nswift delete assets/robots.txt
```
```sh
$ nswift url-for <swift_path> # nswift url-for assets/robots.txt
```
+```sh
+$ nswift metadata <swift_path>
+# {
+# "date": "Tue, 31 Mar 2015 02:10:40 GMT",
+# "content_type": "text/css",
+# "content_length": "50013",
+# "last_modified": "Wed, 15 Oct 2014 13:38:56 GMT",
+# "etag": "e13839c545f32be23b942a41f3ea7724",
+# "x_timestamp": "1413380335.38118",
+# "cache_control": "public, max-age=604800",
+# "x_trans_id": "tx824d632ef9e54685a7563-005519f838"
+# }
+```
For any commands you could provide a different configuration file through the _-c_/_--config_ switch, as:
```sh
$ nswift list -c /dir/my-nswift-rc
@@ -271,9 +287,40 @@
```ruby
list = NightcrawlerSwift::List.new
list.execute prefix: '/some/path'
# [{"hash": "...", "name": "/some/path/with/my_file_path.txt"}, {}, {}, ...]
+```
+
+### Metadata
+
+```ruby
+metadata = NightcrawlerSwift::Metadata.new
+metadata.execute "my_file.css"
+# {
+# :date=>"Tue, 31 Mar 2015 01:46:10 GMT",
+# :content_type=>"text/css",
+# :content_length=>"50013",
+# :last_modified=>"Wed, 15 Oct 2014 13:38:56 GMT",
+# :etag=>"e13839c545f32be23b942a41f3ea7724",
+# :x_timestamp=>"1413380335.38118",
+# :cache_control=>"public, max-age=604800",
+# :x_trans_id=>"tx92ca1becd1a74fa3ae1f2-005519fc62"
+# }
+
+# Consulting the bucket/container metadata
+metadata.execute
+# {
+# :date=>"Tue, 31 Mar 2015 01:41:25 GMT",
+# :content_type=>"application/xml; charset=utf-8",
+# :content_length=>"98171",
+# :x_container_object_count=>"374",
+# :x_storage_policy=>"default-3x",
+# :x_container_read=>".r:*",
+# :x_container_bytes_used=>"7171468",
+# :x_timestamp=>"1409750420.36261",
+# :x_trans_id=>"tx17d8c66ab746436b8b7b6-005519fb40"
+# }
```
### Delete
```ruby