Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
573 additions
and
762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
class BuildsController < ApplicationController | ||
# GET /builds | ||
# GET /builds.xml | ||
def index | ||
@builds = Build.find(:all) | ||
|
||
respond_to do |format| | ||
format.html # index.html.erb | ||
format.xml { render :xml => @builds } | ||
end | ||
end | ||
|
||
# GET /builds/1 | ||
# GET /builds/1.xml | ||
def show | ||
@build = Build.find(params[:id]) | ||
|
||
respond_to do |format| | ||
format.html # show.html.erb | ||
format.xml { render :xml => @build } | ||
end | ||
end | ||
|
||
# GET /builds/new | ||
# GET /builds/new.xml | ||
def new | ||
@build = Build.new | ||
|
||
respond_to do |format| | ||
format.html # new.html.erb | ||
format.xml { render :xml => @build } | ||
end | ||
end | ||
|
||
# GET /builds/1/edit | ||
def edit | ||
@build = Build.find(params[:id]) | ||
end | ||
|
||
# POST /builds | ||
# POST /builds.xml | ||
def create | ||
@build = Build.new(params[:build]) | ||
|
||
respond_to do |format| | ||
if @build.save | ||
flash[:notice] = 'Build was successfully created.' | ||
format.html { redirect_to(@build) } | ||
format.xml { render :xml => @build, :status => :created, :location => @build } | ||
else | ||
format.html { render :action => "new" } | ||
format.xml { render :xml => @build.errors, :status => :unprocessable_entity } | ||
end | ||
end | ||
end | ||
|
||
# PUT /builds/1 | ||
# PUT /builds/1.xml | ||
def update | ||
@build = Build.find(params[:id]) | ||
|
||
respond_to do |format| | ||
if @build.update_attributes(params[:build]) | ||
flash[:notice] = 'Build was successfully updated.' | ||
format.html { redirect_to(@build) } | ||
format.xml { head :ok } | ||
else | ||
format.html { render :action => "edit" } | ||
format.xml { render :xml => @build.errors, :status => :unprocessable_entity } | ||
end | ||
end | ||
end | ||
|
||
# DELETE /builds/1 | ||
# DELETE /builds/1.xml | ||
def destroy | ||
@build = Build.find(params[:id]) | ||
@build.destroy | ||
|
||
respond_to do |format| | ||
format.html { redirect_to(builds_url) } | ||
format.xml { head :ok } | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module BuildsHelper | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
class Build < ActiveRecord::Base | ||
belongs_to :repo, :counter_cache => true | ||
belongs_to :user, :counter_cache => true | ||
belongs_to :pkg, :counter_cache => true | ||
|
||
validates_presence_of :repo | ||
validates_presence_of :pkg | ||
|
||
end | ||
|
||
# == Schema Info | ||
# Schema version: 20081122103124 | ||
# | ||
# Table name: builds | ||
# | ||
# id :integer not null, primary key | ||
# pkg_id :integer not null | ||
# repo_id :integer not null | ||
# user_id :integer | ||
# code :boolean not null | ||
# created_at :datetime | ||
# updated_at :datetime |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.