Sha256: 87d21738e7b96e43d9bdf3e7ee597a8107d6f4ab50a15c88a97815817acc65aa
Contents?: true
Size: 1.09 KB
Versions: 1
Compression:
Stored size: 1.09 KB
Contents
require 'tonic' module Tonic module GhPages class << self private def gh_pages(template = nil) are_you_in_repo? if branch_exists? abort 'You shall no pass. First you should delete gh-pages branch' end # This for run shell commands from needed directory # puts 'Do you really want to create gh-pages branch with tonic? [y/n]' # if gets.chomp =~ /y/i check_status create_branch remove_all_files create template commit_changes # end end end end end describe Tonic do context 'Tonic will' do it "do the right stuff with repo" do unless Dir.pwd =~ /spec\/dummy_git_repo/ exec 'cd spec/dummy_git_repo; rspec ../../' else Tonic.activate [] Dir.glob('*').size.should == 4 c = Tonic::Shell.new('git status -s').run.to_s.should == "" end end if Dir.pwd =~ /spec\/dummy_git_repo/ after :all do `git checkout master; git branch -D gh-pages` exec 'cd ../..' end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tonic-0.0.4 | spec/tonic/tonic_spec.rb |