Class: Juici::Server

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/juici/server.rb

Constant Summary collapse

@@juici =
nil

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.rack_start(project_path) ⇒ Object



27
28
29
# File 'lib/juici/server.rb', line 27

def self.rack_start(project_path)
  self.new
end

.start(host, port) ⇒ Object



21
22
23
24
25
# File 'lib/juici/server.rb', line 21

def self.start(host, port)
  Database.initialize!
  @@juici = App.new
  Juici::Server.run! :host => host, :port => port
end

Instance Method Details

#juiciObject



9
10
11
# File 'lib/juici/server.rb', line 9

def juici
  @@juici
end

#list_builds(params) ⇒ Object



64
65
66
# File 'lib/juici/server.rb', line 64

def list_builds(params)
  erb(:"builds/list", {}, :juici => juici, :project => params[:project])
end

#show_build(params) ⇒ Object



81
82
83
# File 'lib/juici/server.rb', line 81

def show_build(params)
  erb(:"builds/show", {}, :juici => juici, :project => params[:project], :id => params[:id])
end