README.md in nightcrawler_swift-0.2.3 vs README.md in nightcrawler_swift-0.3.0

- old
+ new

@@ -1,7 +1,8 @@ [![Code Climate](https://codeclimate.com/github/tulios/nightcrawler_swift/badges/gpa.svg)](https://codeclimate.com/github/tulios/nightcrawler_swift) - +[![Travis](https://api.travis-ci.org/tulios/nightcrawler_swift.svg?branch=master)](https://travis-ci.org/tulios/nightcrawler_swift) +[![Gem Version](https://badge.fury.io/rb/nightcrawler_swift.svg)](http://badge.fury.io/rb/nightcrawler_swift) # Nightcrawler Swift Like the X-Men nightcrawler this gem teleports your assets to a OpenStack Swift bucket/container. It was designed to sync your assets with OpenStack Swift and allow some operations with your buckets/containers. ## Installation @@ -19,21 +20,23 @@ $ gem install nightcrawler_swift ## Usage ### With Rails -#### 1) Configure your swift credentials +#### 1) Configure your swift credentials and options _In config/application.rb_ or _config/environments/*.rb_ ```ruby config.nightcrawler_swift.bucket = "rogue" -config.nightcrawler_swift.tenent_name = "nightcrawler" +config.nightcrawler_swift.tenant_name = "nightcrawler" config.nightcrawler_swift.username = "my_username1" config.nightcrawler_swift.password = "my_password1" config.nightcrawler_swift.auth_url = "https://auth.url.com:123/v2.0/tokens" +config.nightcrawler_swift.max_age = 3600 #optional ``` +**max_age** will be used to define *Cache-Control:max-age=<value>* header. It's not required. By default it will use ```Rails.logger``` as logger, to change that use a different logger in configurations, like: ```ruby config.nightcrawler_swift.logger = Logger.new(STDOUT) @@ -47,18 +50,19 @@ It will invoke ```rake assets:precompile``` and will copy your public directory to swift bucket/container. ### Programatically -#### 1) Configure your swift credentials +#### 1) Configure your swift credentials and options ```ruby NightcrawlerSwift.configure({ bucket: "rogue", tenant_name: "nightcrawler" username: "my_username1", password: "my_password1", - auth_url: "https://auth.url.com:123/v2.0/tokens" + auth_url: "https://auth.url.com:123/v2.0/tokens", + max_age: 3600 #optional }) ``` By default it will use ```Logger.new(STDOUT)``` as logger, to change that use: