Class: Lampwick::Runner
- Inherits:
-
Object
- Object
- Lampwick::Runner
- Defined in:
- lib/lampwick/runner.rb
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
-
.named ⇒ Object
Returns the value of attribute named.
-
.purge ⇒ Object
Returns the value of attribute purge.
Class Method Summary collapse
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
3 4 5 |
# File 'lib/lampwick/runner.rb', line 3 def config @config end |
.named ⇒ Object
Returns the value of attribute named.
3 4 5 |
# File 'lib/lampwick/runner.rb', line 3 def named @named end |
.purge ⇒ Object
Returns the value of attribute purge.
3 4 5 |
# File 'lib/lampwick/runner.rb', line 3 def purge @purge end |
Class Method Details
.run! ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/lampwick/runner.rb', line 7 def self.run! raise ArgumentError, "Need to have a config" if @config.empty? f = File.open(@config) config = YAML::load(f) git = Lampwick::Git.new(config) if @purge and !git.config.target.nil? puts "Purging #{git.config.target}" Dir.chdir git.config.target do FileUtils.rm_rf(".", :secure => true) end end git.update_or_clone git.populate_environments git.named_directories if @named and git.config.target end |