Class: Ecstatic::Command
- Inherits:
-
Thor
- Object
- Thor
- Ecstatic::Command
- Includes:
- Actions, Thor::Actions
- Defined in:
- lib/ecstatic/command.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Actions
Class Method Details
.source_root ⇒ Object
6 7 8 |
# File 'lib/ecstatic/command.rb', line 6 def self.source_root File.('../templates', __FILE__) end |
Instance Method Details
#deploy ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/ecstatic/command.rb', line 36 def deploy Dir.chdir('gh-pages') do ensure_we_are_on_branch commit_changes_if_necessary && push_changes end end |
#init ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ecstatic/command.rb', line 12 def init init_git_if_not_already directory 'site' copy_file '.gitignore' copy_file 'config.rb' if .ghpages? empty_directory 'gh-pages' init_git_if_not_already('gh-pages') Dir.chdir('gh-pages') do git :checkout => '-b gh-pages' end end end |