Class: JekyllAndHyde::New

Inherits:
GroupTask
  • Object
show all
Defined in:
lib/jekyll_and_hyde/tasks/new.rb

Constant Summary collapse

JEKYLL_AND_HYDE_TEMPLATE_GIT_REPO =
'git://github.com/jingweno/jekyll_and_hyde_template.git'
SLIPPY_GIT_REPO =
'git://github.com/jingweno/slippy.git'

Instance Method Summary collapse

Methods inherited from GroupTask

self_task

Methods included from Actions

#run_command, #say_status, #set_color, #validate_installation

Instance Method Details

#add_slippy_git_submoduleObject



29
30
31
32
33
# File 'lib/jekyll_and_hyde/tasks/new.rb', line 29

def add_slippy_git_submodule
  inside_app_path do
    run_command "git submodule add #{SLIPPY_GIT_REPO}"
  end
end

#create_git_hub_pageObject



41
42
43
44
45
46
47
48
49
# File 'lib/jekyll_and_hyde/tasks/new.rb', line 41

def create_git_hub_page
  if options.github?
    inside_app_path do
      # Commit all changes
      run_command 'git commit -am "Template files generated by jekyll_and_hyde."'
      invoke_github_task
    end
  end
end

#git_add_allObject



35
36
37
38
39
# File 'lib/jekyll_and_hyde/tasks/new.rb', line 35

def git_add_all
  inside_app_path do
    run_command "git add ."
  end
end

#git_clone_templateObject

TODO: pass in the url as parameter



16
17
18
19
20
21
# File 'lib/jekyll_and_hyde/tasks/new.rb', line 16

def git_clone_template
  inside_app_path do
    run_command "git clone #{options[:template]} ."
    remove_file('.git')
  end
end

#git_initObject



23
24
25
26
27
# File 'lib/jekyll_and_hyde/tasks/new.rb', line 23

def git_init
  inside_app_path do
    run_command "git init"
  end
end

#make_app_path_dirObject



11
12
13
# File 'lib/jekyll_and_hyde/tasks/new.rb', line 11

def make_app_path_dir
  empty_directory app_path
end