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'
# deploy
gem 'capistrano', :require => false
gem 'rvm-capistrano', :require => false
gem 'cape', :require => false
gem 'capistrano_colors', :require => false
end

View File

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

View File

@ -1,5 +1,5 @@
-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
.hr
@ -9,7 +9,7 @@
.hr
.leftside= t("layout.groups.delete_warning")
.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
- content_for :sidebar, render('sidebar')

View File

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

View File

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