Module: NightcrawlerSwift
- Defined in:
- lib/nightcrawler_swift.rb,
lib/nightcrawler_swift/cli.rb,
lib/nightcrawler_swift/command.rb,
lib/nightcrawler_swift/gateway.rb,
lib/nightcrawler_swift/options.rb,
lib/nightcrawler_swift/railtie.rb,
lib/nightcrawler_swift/version.rb,
lib/nightcrawler_swift/ext/hash.rb,
lib/nightcrawler_swift/connection.rb,
lib/nightcrawler_swift/exceptions.rb,
lib/nightcrawler_swift/commands/list.rb,
lib/nightcrawler_swift/commands/sync.rb,
lib/nightcrawler_swift/ext/nil_class.rb,
lib/nightcrawler_swift/commands/delete.rb,
lib/nightcrawler_swift/commands/upload.rb,
lib/nightcrawler_swift/ext/open_struct.rb,
lib/nightcrawler_swift/commands/download.rb,
lib/nightcrawler_swift/commands/metadata.rb,
lib/nightcrawler_swift/commands/multithread_sync.rb
Defined Under Namespace
Modules: CLI, Exceptions, Ext Classes: Command, Connection, Delete, Download, Gateway, List, Metadata, MultithreadSync, Options, Railtie, Sync, Upload
Constant Summary collapse
- VERSION =
"1.0.0"
Class Attribute Summary collapse
-
.connection ⇒ Object
readonly
Returns the value of attribute connection.
- .logger ⇒ Object
-
.options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
-
.configure(opts = {}) ⇒ Object
Hash with: - bucket - tenant_name - username - password - auth_url.
- .sync(dir_path) ⇒ Object
Class Attribute Details
.connection ⇒ Object (readonly)
Returns the value of attribute connection.
30 31 32 |
# File 'lib/nightcrawler_swift.rb', line 30 def connection @connection end |
.logger ⇒ Object
32 33 34 |
# File 'lib/nightcrawler_swift.rb', line 32 def logger @logger ||= Logger.new(STDOUT).tap {|l| l.level = Logger::INFO} end |
.options ⇒ Object (readonly)
Returns the value of attribute options.
30 31 32 |
# File 'lib/nightcrawler_swift.rb', line 30 def @options end |
Class Method Details
.configure(opts = {}) ⇒ Object
Hash with:
-
bucket
-
tenant_name
-
username
-
password
-
auth_url
-
max_age (optional, default: nil)
-
timeout (in seconds. Optional, default: nil)
-
retries (default: 3)
-
max_retry_time (in seconds, default: 30)
-
verify_ssl (optional, default: false)
-
ssl_client_cert (optional, default: nil)
-
ssl_client_key (optional, default: nil)
-
ssl_ca_file (optional, default: nil)
54 55 56 57 58 |
# File 'lib/nightcrawler_swift.rb', line 54 def configure opts = {} opts.symbolize_keys! @options = Options.new opts @connection = Connection.new end |