Update gems. Redo exception catch for BuildServer.get_status. Write specs. Experiments with large file uploads. Refs #2261
This commit is contained in:
parent
96d4886f49
commit
d7c9452efa
6
Gemfile
6
Gemfile
|
@ -5,7 +5,7 @@ gem 'rails', '3.0.11' #, :git => 'git://github.com/rails/rails.git'
|
|||
gem 'pg', '~> 0.11.0'
|
||||
gem 'silent-postgres', '~> 0.1.1'
|
||||
|
||||
gem 'devise', '~> 1.5.1'
|
||||
gem 'devise', '~> 1.5.2'
|
||||
gem 'omniauth', '~> 1.0.1'
|
||||
gem 'omniauth-openid', '~> 1.0.1'
|
||||
gem 'cancan', '~> 1.6.7'
|
||||
|
@ -15,6 +15,7 @@ gem "haml-rails", '~> 0.3.4'
|
|||
gem "compass", '~> 0.11.5'
|
||||
gem 'jammit'
|
||||
gem "yui-compressor", "0.9.5" # Higher versions depends on Platform gem which conflicts with Platform model
|
||||
gem 'rails3-jquery-autocomplete'
|
||||
|
||||
gem 'ancestry', '~> 1.2.4'
|
||||
gem 'paperclip', "~> 2.3"
|
||||
|
@ -32,7 +33,8 @@ gem 'delayed_job'
|
|||
# gem 'actionwebservice' #, :git => 'git://github.com/ywen/actionwebservice.git'
|
||||
gem "rails-xmlrpc", '~> 0.3.6' # :git => 'git://github.com/chipiga/rails-xmlrpc.git'
|
||||
|
||||
gem 'rails3-jquery-autocomplete'
|
||||
gem 'passenger', '~> 3.0.11'
|
||||
gem 'unicorn', '~> 4.1.1'
|
||||
|
||||
group :production do
|
||||
gem "airbrake", '~> 3.0.5'
|
||||
|
|
33
Gemfile.lock
33
Gemfile.lock
|
@ -60,27 +60,29 @@ GEM
|
|||
chunky_png (~> 1.2)
|
||||
fssm (>= 0.2.7)
|
||||
sass (~> 3.1)
|
||||
daemon_controller (0.2.6)
|
||||
daemons (1.1.4)
|
||||
delayed_job (2.1.4)
|
||||
activesupport (~> 3.0)
|
||||
daemons
|
||||
devise (1.5.1)
|
||||
devise (1.5.2)
|
||||
bcrypt-ruby (~> 3.0)
|
||||
orm_adapter (~> 0.0.3)
|
||||
warden (~> 1.1)
|
||||
diff-lcs (1.1.3)
|
||||
erubis (2.6.6)
|
||||
abstract (>= 1.0.0)
|
||||
factory_girl (2.3.1)
|
||||
factory_girl (2.3.2)
|
||||
activesupport
|
||||
factory_girl_rails (1.4.0)
|
||||
factory_girl (~> 2.3.0)
|
||||
railties (>= 3.0.0)
|
||||
fastthread (1.0.7)
|
||||
fssm (0.2.7)
|
||||
grit (2.4.1)
|
||||
diff-lcs (~> 1.1)
|
||||
mime-types (~> 1.15)
|
||||
haml (3.1.3)
|
||||
haml (3.1.4)
|
||||
haml-rails (0.3.4)
|
||||
actionpack (~> 3.0)
|
||||
activesupport (~> 3.0)
|
||||
|
@ -88,12 +90,13 @@ GEM
|
|||
railties (~> 3.0)
|
||||
hashie (1.2.0)
|
||||
highline (1.6.8)
|
||||
hirb (0.5.0)
|
||||
hpricot (0.8.4)
|
||||
hirb (0.6.0)
|
||||
hpricot (0.8.5)
|
||||
i18n (0.5.0)
|
||||
jammit (0.6.3)
|
||||
jammit (0.6.5)
|
||||
yui-compressor (>= 0.9.3)
|
||||
json (1.6.1)
|
||||
json (1.6.3)
|
||||
kgio (2.6.0)
|
||||
linecache (0.46)
|
||||
rbx-require-relative (> 0.0.4)
|
||||
mail (2.2.19)
|
||||
|
@ -124,6 +127,11 @@ GEM
|
|||
activesupport (>= 2.3.2)
|
||||
cocaine (>= 0.0.2)
|
||||
mime-types
|
||||
passenger (3.0.11)
|
||||
daemon_controller (>= 0.2.5)
|
||||
fastthread (>= 1.0.1)
|
||||
rack
|
||||
rake (>= 0.8.1)
|
||||
pg (0.11.0)
|
||||
polyglot (0.3.3)
|
||||
rack (1.2.4)
|
||||
|
@ -153,6 +161,7 @@ GEM
|
|||
rake (>= 0.8.7)
|
||||
rdoc (~> 3.4)
|
||||
thor (~> 0.14.4)
|
||||
raindrops (0.8.0)
|
||||
rake (0.9.2.2)
|
||||
rbx-require-relative (0.0.5)
|
||||
rdoc (3.11)
|
||||
|
@ -181,7 +190,7 @@ GEM
|
|||
sexp_processor (~> 3.0)
|
||||
russian (0.6.0)
|
||||
i18n (>= 0.5.0)
|
||||
sass (3.1.10)
|
||||
sass (3.1.11)
|
||||
sexp_processor (3.0.8)
|
||||
silent-postgres (0.1.1)
|
||||
thor (0.14.6)
|
||||
|
@ -189,6 +198,10 @@ GEM
|
|||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
tzinfo (0.3.31)
|
||||
unicorn (4.1.1)
|
||||
kgio (~> 2.4)
|
||||
rack
|
||||
raindrops (~> 0.6)
|
||||
warden (1.1.0)
|
||||
rack (>= 1.0)
|
||||
web-app-theme (0.7.0)
|
||||
|
@ -210,7 +223,7 @@ DEPENDENCIES
|
|||
capistrano_colors
|
||||
compass (~> 0.11.5)
|
||||
delayed_job
|
||||
devise (~> 1.5.1)
|
||||
devise (~> 1.5.2)
|
||||
factory_girl_rails (~> 1.4.0)
|
||||
grack!
|
||||
grit
|
||||
|
@ -223,6 +236,7 @@ DEPENDENCIES
|
|||
omniauth (~> 1.0.1)
|
||||
omniauth-openid (~> 1.0.1)
|
||||
paperclip (~> 2.3)
|
||||
passenger (~> 3.0.11)
|
||||
pg (~> 0.11.0)
|
||||
rails (= 3.0.11)
|
||||
rails-xmlrpc (~> 0.3.6)
|
||||
|
@ -234,6 +248,7 @@ DEPENDENCIES
|
|||
ruby_parser
|
||||
russian
|
||||
silent-postgres (~> 0.1.1)
|
||||
unicorn (~> 4.1.1)
|
||||
web-app-theme
|
||||
whenever
|
||||
will_paginate (~> 3.0.2)
|
||||
|
|
|
@ -19,9 +19,13 @@ class BuildListsController < ApplicationController
|
|||
@build_lists = BuildList.recent.paginate :page => params[:page]
|
||||
end
|
||||
@action_url = all_build_lists_path
|
||||
|
||||
@build_server_status = BuildServer.get_status rescue {}
|
||||
|
||||
|
||||
@build_server_status = begin
|
||||
BuildServer.get_status
|
||||
rescue Exception # Timeout::Error
|
||||
{}
|
||||
end
|
||||
|
||||
render :action => 'index'
|
||||
end
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ end
|
|||
# # raise args.inspect
|
||||
# case
|
||||
# when args.first == 'get_status'
|
||||
# {:client_count => '1', :count_new_task => '2', :count_build_task => 3}
|
||||
# {'client_count' => 1, 'count_new_task' => 2, 'count_build_task' => 3}
|
||||
# else; 0
|
||||
# end
|
||||
# end
|
||||
|
|
|
@ -43,9 +43,10 @@ module XMLRPC
|
|||
# raise args.inspect
|
||||
case
|
||||
when args.first == 'get_status'
|
||||
{:client_count => '1', :count_new_task => '2', :count_build_task => 3}
|
||||
raise Timeout::Error
|
||||
else; 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe BuildListsController do
|
||||
context 'crud' do
|
||||
# let(:build_list) { Factory(:build_list) }
|
||||
|
||||
context 'for guest' do
|
||||
it 'should not be able to perform all action' do
|
||||
get :all
|
||||
response.should redirect_to(new_user_session_path)
|
||||
end
|
||||
end
|
||||
|
||||
context 'for user' do
|
||||
before(:each) { set_session_for Factory(:user) }
|
||||
|
||||
it 'should not be able to perform all action' do
|
||||
get :all
|
||||
response.should redirect_to(forbidden_url)
|
||||
end
|
||||
end
|
||||
|
||||
context 'for admin' do
|
||||
before(:each) { set_session_for Factory(:admin) }
|
||||
|
||||
it "should be able to perform all action without exception" do
|
||||
get :all
|
||||
assigns[:build_server_status].should == {}
|
||||
response.should be_success
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'callbacks' do
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue