Fix deploy. Redo main group route. Refs #263

This commit is contained in:
Pavel Chipiga 2012-05-03 19:48:22 +03:00
parent 45cb90463a
commit b1b5363972
5 changed files with 14 additions and 11 deletions

View File

@ -70,6 +70,7 @@ group :development do
gem 'shotgun' gem 'shotgun'
# deploy # deploy
gem 'capistrano', :require => false gem 'capistrano', :require => false
gem 'rvm-capistrano', :require => false
gem 'cape', :require => false gem 'cape', :require => false
gem 'capistrano_colors', :require => false gem 'capistrano_colors', :require => false
end end

View File

@ -255,6 +255,8 @@ GEM
ruby-openid (2.1.8) ruby-openid (2.1.8)
russian (0.6.0) russian (0.6.0)
i18n (>= 0.5.0) i18n (>= 0.5.0)
rvm-capistrano (1.1.0)
capistrano (>= 2.0.0)
sanitize (2.0.3) sanitize (2.0.3)
nokogiri (>= 1.4.4, < 1.6) nokogiri (>= 1.4.4, < 1.6)
sass (3.1.16) sass (3.1.16)
@ -358,6 +360,7 @@ DEPENDENCIES
rspec-rails (~> 2.9.0) rspec-rails (~> 2.9.0)
ruby-haml-js (~> 0.0.3) ruby-haml-js (~> 0.0.3)
russian (~> 0.6.0) russian (~> 0.6.0)
rvm-capistrano
sass-rails (~> 3.2.5) sass-rails (~> 3.2.5)
shotgun shotgun
shoulda shoulda

View File

@ -1,5 +1,5 @@
-set_meta_tags :title => [title_object(@group), t('layout.groups.edit')] -set_meta_tags :title => [title_object(@group), t('layout.groups.edit')]
= form_for @group do |f| = form_for @group, :url => profile_group_path(@group) do |f|
= render "form", :f => f = render "form", :f => f
.hr .hr
@ -9,7 +9,7 @@
.hr .hr
.leftside= t("layout.groups.delete_warning") .leftside= t("layout.groups.delete_warning")
.rightside .rightside
= link_to t("layout.delete"), group_path(@group), :method => :delete, :confirm => t("layout.groups.confirm_delete"), :class => 'button' if can? :destroy, @group = link_to t("layout.delete"), profile_group_path(@group), :method => :delete, :confirm => t("layout.groups.confirm_delete"), :class => 'button' if can? :destroy, @group
.both .both
- content_for :sidebar, render('sidebar') - content_for :sidebar, render('sidebar')

View File

@ -1,7 +1,6 @@
# -*- encoding : utf-8 -*- # -*- encoding : utf-8 -*-
$:.unshift File.expand_path('.') require 'cape'
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) require 'capistrano_colors'
set :rvm_type, :user
set :default_environment, { set :default_environment, {
'LANG' => 'en_US.UTF-8' 'LANG' => 'en_US.UTF-8'
@ -34,10 +33,10 @@ set :scm, :git
set :repository, "git@github.com:warpc/rosa-build.git" set :repository, "git@github.com:warpc/rosa-build.git"
set :deploy_via, :remote_cache set :deploy_via, :remote_cache
require 'lib/recipes/nginx' require './lib/recipes/nginx'
require 'lib/recipes/unicorn' require './lib/recipes/unicorn'
require 'lib/recipes/bluepill' require './lib/recipes/bluepill'
require 'lib/recipes/delayed_job' require './lib/recipes/delayed_job'
namespace :deploy do namespace :deploy do
task :stub_xml_rpc do task :stub_xml_rpc do
@ -92,7 +91,6 @@ after "deploy:restart", "delayed_job:restart"
after "deploy:restart", "deploy:cleanup" after "deploy:restart", "deploy:cleanup"
require 'cape'
namespace :rake_tasks do namespace :rake_tasks do
Cape do Cape do
mirror_rake_tasks 'db:seeds' mirror_rake_tasks 'db:seeds'

View File

@ -82,6 +82,7 @@ Rosa::Application.routes.draw do
scope :module => 'groups' do scope :module => 'groups' do
resources :groups, :controller => 'profile' do resources :groups, :controller => 'profile' do
get '/' => 'groups/profile#show', :as => :profile, :on => :member
get :autocomplete_group_uname, :on => :collection get :autocomplete_group_uname, :on => :collection
delete :remove_user, :on => :member delete :remove_user, :on => :member
resources :members, :only => [:index] do resources :members, :only => [:index] do
@ -120,7 +121,7 @@ Rosa::Application.routes.draw do
get '/' => 'users/profile#show', :as => :user get '/' => 'users/profile#show', :as => :user
end end
constraints OwnerConstraint.new(Group, true) do constraints OwnerConstraint.new(Group, true) do
get '/' => 'groups/profile#show', :as => :group_profile get '/' => 'groups/profile#show', :as => :group
end end
scope ':project_name', :as => 'project', :module => 'projects' do scope ':project_name', :as => 'project', :module => 'projects' do
resources :wiki do resources :wiki do