Permalink
Browse files

fixes

  • Loading branch information...
1 parent 2d09f22 commit 38ea3a94d6c8182c03436a47257a0c0fad12c009 @pghodgman committed Aug 19, 2013
View
@@ -1,5 +1,4 @@
class HomeController < ApplicationController
def index
- reset_session
end
end
@@ -1,7 +1,6 @@
class SessionsController < ApplicationController
def create
- reset_session
auth = request.env["omniauth.auth"]
user = User.find_by_provider_and_uid(auth["provider"], auth["uid"]) || User.create_with_omniauth(auth)
session[:user_id] = user.id
@@ -10,6 +9,7 @@ def create
def destroy
session[:user_id] = nil
+ reset_session
redirect_to root_url, :notice => "Signed out!"
end
@@ -3,6 +3,4 @@
<%= link_to "Sign Out", signout_path %>
<% else %>
<%= link_to "Sign in with google", "/auth/google" %>
- <br></br>
- <%= link_to "Sign in with autodesk", "/auth/autodesk" %>
<% end %>
View
@@ -6,11 +6,11 @@
set :scm, :git
set :rails_env, 'development'
-set :deploy_to, "/var/www/apps/#{application}"
+set :deploy_to, "/home/ec2-user/apps/#{application}"
# The address of the remote host on EC2 (the Public DNS address)
-set :location, "ec2-23-22-160-105.compute-1.amazonaws.com"
+set :location, "ec2-184-72-69-129.compute-1.amazonaws.com"
# setup some Capistrano roles
role :app, location
role :web, location
@@ -20,9 +20,19 @@
set :user, "ec2-user"
ssh_options[:keys] = [File.join(ENV["HOME"], "pubkeys", "aws-ec2.pem")]
+
namespace :deploy do
- task :start do
- run "cd #{ current_path } && rvmsudo rails s -p 80"
+ task :start, :roles => :app do
+ run "touch #{current_release}/tmp/restart.txt"
+ end
+
+ task :stop, :roles => :app do
+ # Do nothing.
+ end
+
+ desc "Restart Application"
+ task :restart, :roles => :app do
+ run "touch #{current_release}/tmp/restart.txt"
end
end

0 comments on commit 38ea3a9

Please sign in to comment.