Class: JekyllAndHyde::Github
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
#check_uncommited_files ⇒ Object
9
10
11
12
|
# File 'lib/jekyll_and_hyde/tasks/github.rb', line 9
def check_uncommited_files
output = run_command 'git status', :capture => true
raise Error, "There are uncommited changes. Please commit them first." unless output.include?("nothing to commit")
end
|
#create_github_page_branch ⇒ Object
14
15
16
17
18
19
|
# File 'lib/jekyll_and_hyde/tasks/github.rb', line 14
def create_github_page_branch
run_command 'git checkout -b gh-pages'
run_command 'git branch -d master'
say_status :create, 'branch "gh-pages" for GitHub project page, details in http://pages.github.com/.'
say
end
|
#print_next_steps ⇒ Object
21
22
23
24
25
26
27
28
|
# File 'lib/jekyll_and_hyde/tasks/github.rb', line 21
def print_next_steps
next_step_string = "Next steps:"
say set_color(next_step_string, :blue, true)
say "-" * next_step_string.size
say 'git remote add origin [email protected]:your_github_username/your_git_repo.git'
say 'git push origin gh-pages'
say
end
|
#validate_current_installation ⇒ Object
5
6
7
|
# File 'lib/jekyll_and_hyde/tasks/github.rb', line 5
def validate_current_installation
validate_installation
end
|