forked from copycopter/copycopter-server
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[copycopter#2] Add username and password to project
* Refactoring, formatting and other preparation for feature. * Whitelist Project attributes * Authorize project-specific actions
- Loading branch information
Dan Croak
committed
Mar 7, 2012
1 parent
b57fc56
commit eac08df
Showing
13 changed files
with
145 additions
and
107 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
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
class LocalesController < ApplicationController | ||
before_filter :authorize | ||
|
||
def new | ||
@project = Project.find(params[:project_id]) | ||
authorize @project | ||
end | ||
end |
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
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<%= form.inputs do %> | ||
<%= form.input :name %> | ||
<%= form.input :username %> | ||
<%= form.input :password %> | ||
<% if project.persisted? -%> | ||
<%= form.input :archived, :hint => t('project.archived.hint', :default => "Archived project don't count against your project total. You cannot create or edit content.") %> | ||
<%= form.input :archived %> | ||
<% end -%> | ||
<% end %> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
require 'spec_helper' | ||
|
||
describe DeployJob, "#perform" do | ||
it "deploys its project" do | ||
project = Factory(:project) | ||
project.stubs(:deploy! => true) | ||
|
||
job = DeployJob.new(project) | ||
project.should_not have_received(:deploy!) | ||
|
||
describe DeployJob, 'perform' do | ||
before do | ||
@project = Factory(:project) | ||
@project.stubs :deploy! => true | ||
job = DeployJob.new(@project) | ||
@project.should_not have_received(:deploy!) | ||
job.perform | ||
project.should have_received(:deploy!) | ||
end | ||
|
||
it 'deploys its project' do | ||
@project.should have_received(:deploy!) | ||
end | ||
end |
Oops, something went wrong.