spec/support/git_helpers.rb in git_presenter-1.1.0 vs spec/support/git_helpers.rb in git_presenter-1.2.0
- old
+ new
@@ -69,15 +69,20 @@
yield(commits, yaml) if block_given?
end
commits
end
- def start_presentation(commands=[])
+ def start_presentation(commands=[], start_slide=0)
commits = initialise_presentation({:delay => true})
Dir.chdir(@presentation_dir) do
add_commands(commands) unless commands.empty?
+ if start_slide != 0
+ `git checkout -q #{commits[start_slide]}`
+ end
presenter = GitPresenter.new('.', false)
- presenter = presenter.execute('start')
+ if start_slide == 0
+ presenter = presenter.execute('start')
+ end
yield(commits, presenter) if block_given?
end
end
def update_presentation