Class: Gitjour::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/conspire/gitjour_exts.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.init(path) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/conspire/gitjour_exts.rb', line 6

def init(path)
  abort "Repository already exists: #{path}" if File.exist? path + '/.git'
  
  `mkdir -p #{path} && cd #{path} && git init`
  FileUtils.touch ["#{path}/.git/git-daemon-export-ok", "#{path}/.conspire"]
  `cd #{path}; git add .conspire; git commit -m "initial"`

  at_exit { FileUtils.rm_rf [path + '/.git', path + '/.conspire'] } unless ENV['KEEP']
end

Instance Method Details

#puts(*args) ⇒ Object



16
# File 'lib/conspire/gitjour_exts.rb', line 16

def puts(*args); end