Class: Naifa::Plugins::S3::CLI
- Inherits:
-
Thor
- Object
- Thor
- Naifa::Plugins::S3::CLI
- Defined in:
- lib/naifa/plugins/s3/cli.rb
Class Attribute Summary collapse
-
.settings_key ⇒ Object
readonly
Returns the value of attribute settings_key.
Instance Method Summary collapse
Class Attribute Details
.settings_key ⇒ Object (readonly)
Returns the value of attribute settings_key.
9 10 11 |
# File 'lib/naifa/plugins/s3/cli.rb', line 9 def settings_key @settings_key end |
Instance Method Details
#sync(from = nil, to = nil) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/naifa/plugins/s3/cli.rb', line 13 def sync(from=nil, to=nil) config = Naifa::Config.settings[settings_key] || {} = {sync: {}} [:sync][:origin] = from unless from.nil? [:sync][:destination] = to unless to.nil? S3.sync(config.fetch(:settings,{}).deep_merge()) end |