Class: Shart::DSL
- Inherits:
-
Object
- Object
- Shart::DSL
- Defined in:
- lib/shart.rb
Overview
Process info a Shartfile
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.shartfile(filename) ⇒ Object
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/shart.rb', line 65 def self.shartfile(filename) sync = new.tap { |dsl| dsl.instance_eval(File.read(filename), filename) }.sync puts "Sharting from #{sync.source.root.to_s.inspect} to #{sync.target.directory_name.inspect}" sync.upload do |file, object| puts "#{file.path} → #{object.public_url}" end sync.clean do |object| puts "✗ #{object.public_url}" end end |