Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magnum #466

Merged
merged 18 commits into from
Mar 20, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.Gemfile*
.bundle
.rvmrc
public/assets
Expand Down
18 changes: 10 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
source :rubygems

gem 'rails', '~> 3.2.1'
gem 'rake', '~> 0.9.2.2'
# see https://gist.github.com/2063855
base ||= 'git://github.com/travis-ci'
type = base[0, 2] == '..' ? :path : :git

gem 'travis-support', :git => 'git://github.com/travis-ci/travis-support.git'
gem 'travis-core', :git => 'git://github.com/travis-ci/travis-core.git', :require => 'travis_core/engine'
gem 'travis-core', type => "#{base}/travis-core", :ref => 'magnum', :require => 'travis/engine', :ref => 'magnum'

This comment was marked as spam.

gem 'travis-support', type => "#{base}/travis-support"

gem 'metriks', :git => 'git://github.com/mattmatt/metriks.git', :ref => 'source'
gem 'metriks', git: 'git://github.com/mattmatt/metriks', ref: 'source'

gem 'rails', '~> 3.2.1'
gem 'rake', '~> 0.9.2.2'
gem 'amqp', '~> 0.9.0'

# app
Expand All @@ -20,7 +23,7 @@ gem 'unobtrusive_flash', '~> 0.0.2'
gem 'json', '~> 1.6.3'
gem 'yajl-ruby', '~> 1.1.0'
gem 'rabl', '~> 0.5.1'
gem 'rack-contrib', :git => 'git://github.com/rack/rack-contrib.git', :require => 'rack/contrib'
gem 'rack-contrib', git: 'git://github.com/rack/rack-contrib.git', require: 'rack/contrib'

# db
gem 'pg', '~> 0.13.2'
Expand Down Expand Up @@ -54,7 +57,6 @@ end

group :development do
gem 'foreman', '~> 0.36.0'
gem 'data_migrations', '~> 0.0.1'

unless RUBY_VERSION == '1.9.3' && RUBY_PLATFORM !~ /darwin/
# will need to install ruby-debug19 manually:
Expand All @@ -64,7 +66,7 @@ group :development do
end

group :test do
gem 'jasmine', :git => "git://github.com/pivotal/jasmine-gem.git", :submodules => true
gem 'jasmine', git: 'git://github.com/pivotal/jasmine-gem.git', submodules: true
gem 'capybara', '~> 1.1.2'
gem 'database_cleaner', '~> 0.7.0'
gem 'mocha', '~> 0.10.0'
Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ GIT
json (~> 1.6.5)

GIT
remote: git://github.com/mattmatt/metriks.git
remote: git://github.com/mattmatt/metriks
revision: 23482212ec6676bfde20dae70760f80778bf6e77
ref: source
specs:
Expand All @@ -33,8 +33,9 @@ GIT
rack (>= 0.9.1)

GIT
remote: git://github.com/travis-ci/travis-core.git
revision: 8f515aadcd016fe8c2a6fc957f2570ba93203d4b
remote: git://github.com/travis-ci/travis-core
revision: 4831b956bc4d9829688c253287fcb3f7a0fa0b40
ref: magnum
specs:
travis-core (0.0.1)
actionmailer (~> 3.2.1)
Expand All @@ -54,8 +55,8 @@ GIT
thor (~> 0.14.6)

GIT
remote: git://github.com/travis-ci/travis-support.git
revision: a073badfd7018e532e502792a065924cf68539b0
remote: git://github.com/travis-ci/travis-support
revision: 474686c452d21a46e503b537ef052405dad76649
specs:
travis-support (0.0.1)

Expand Down Expand Up @@ -285,7 +286,7 @@ GEM
archive-tar-minitar (>= 0.5.2)
rubyzip (0.9.6.1)
sass (3.1.15)
sass-rails (3.2.4)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
Expand Down Expand Up @@ -340,7 +341,6 @@ DEPENDENCIES
capybara (~> 1.1.2)
coffee-rails (~> 3.2.2)
compass (= 0.12.alpha.4)
data_migrations (~> 0.0.1)
database_cleaner (~> 0.7.0)
devise (~> 1.5.0)
factory_girl (~> 2.4.0)
Expand Down
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

require File.expand_path('../config/application', __FILE__)

ENV['SCHEMA'] = "#{Gem.loaded_specs['travis-core'].full_gem_path}/db/schema.rb"

module ::TravisCi
class Application
include Rake::DSL
Expand Down
5 changes: 1 addition & 4 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
class ApplicationController < ActionController::Base
rescue_from ActiveRecord::RecordNotFound, :with => :not_found


prepend_view_path 'app/views/v1/default'
prepend_view_path File.expand_path('../../views/v1/default', __FILE__)

protect_from_forgery

Expand Down Expand Up @@ -66,6 +65,4 @@ def mobile_device?
def prepare_for_mobile
session[:mobile_param] = params[:mobile] if params[:mobile]
end


end
2 changes: 1 addition & 1 deletion app/views/v1/default/job/configure.rabl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ object @job

attributes :id, :repository_id, :number, :state, :started_at, :finished_at, :config, :allowed_failure

node(:parent_id) { @job.owner_id }
node(:parent_id) { @job.source_id }
node(:started_at) { @job.started_at } if @job.started?
node(:finished_at) { @job.finished_at } if @job.finished?

Expand Down
2 changes: 1 addition & 1 deletion app/views/v1/default/job/test.rabl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ attributes :id, :repository_id, :number, :state, :started_at, :finished_at, :con

node(:log) { @job.log.try(:content) || '' } unless params[:bare]
node(:result) { @job.status }
node(:build_id) { @job.owner_id }
node(:build_id) { @job.source_id }
node(:started_at) { @job.started_at } if @job.started?
node(:finished_at) { @job.finished_at } if @job.finished?
node(:allow_failure) { @job.allow_failure } if @job.allow_failure
Expand Down
22 changes: 12 additions & 10 deletions config/initializers/devise.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
require 'travis'

# Hmm, do we actually use this?
require 'devise/api_token_authenticatable'

# override this for rails admin
class CustomFailure < Devise::FailureApp
def redirect_url
root_url
end
protected :redirect_url
end
# # override this for rails admin
# class CustomFailure < Devise::FailureApp
# def redirect_url
# root_url
# end
# protected :redirect_url
# end

Devise.setup do |c|
require 'devise/orm/active_record'

c.warden do |manager|
manager.failure_app = CustomFailure
end
# c.warden do |manager|
# manager.failure_app = CustomFailure
# end

c.http_authenticatable = true

Expand Down
15 changes: 0 additions & 15 deletions db/migrate/20101126174706_create_repositories.rb

This file was deleted.

26 changes: 0 additions & 26 deletions db/migrate/20101126174715_create_builds.rb

This file was deleted.

16 changes: 0 additions & 16 deletions db/migrate/20110109130532_devise_create_users.rb

This file was deleted.

13 changes: 0 additions & 13 deletions db/migrate/20110116155100_repositories_add_username.rb

This file was deleted.

13 changes: 0 additions & 13 deletions db/migrate/20110130102621_create_tokens.rb

This file was deleted.

22 changes: 0 additions & 22 deletions db/migrate/20110301071656_add_build_parent_id_and_configuration.rb

This file was deleted.

This file was deleted.

This file was deleted.