Module: Bananajour::Commands

Defined in:
lib/bigbananajour/bananajour/commands.rb

Instance Method Summary collapse

Instance Method Details

#advertise!Object



15
16
17
18
# File 'lib/bigbananajour/bananajour/commands.rb', line 15

def advertise!
  pid = fork { Bananajour::Bonjour::Advertiser.new.go! }
  pid
end

#eat_me_some_bananas!Object



20
21
22
23
# File 'lib/bigbananajour/bananajour/commands.rb', line 20

def eat_me_some_bananas!
  pid = fork { Bananajour::Eater.new.go! }
  pid
end

#serve_git!Object



9
10
11
12
13
# File 'lib/bigbananajour/bananajour/commands.rb', line 9

def serve_git!
  pid = fork { exec "git daemon --base-path=#{repositories_path} --export-all --port=#{git_port}" }
  puts "* Started " + "#{git_uri}".foreground(:yellow)
  pid
end

#serve_web!Object



3
4
5
6
7
# File 'lib/bigbananajour/bananajour/commands.rb', line 3

def serve_web!
  pid = fork { exec "/usr/bin/env ruby #{File.dirname(__FILE__)}/../../../sinatra/app.rb -p #{web_port} -e production" }
  puts "* Started " + web_uri.foreground(:yellow)
  pid
end