Skip to content

Commit

Permalink
Preperation for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhalldor committed May 4, 2009
1 parent cfbdfa9 commit 1fcdf09
Show file tree
Hide file tree
Showing 1,484 changed files with 186,763 additions and 26 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Expand Up @@ -2,8 +2,4 @@
log/*.log
tmp/**/*
db/*.sqlite3
encodings.xml
misc.xml
modules.xml
profiles_settings.xml
coverage/*
3 changes: 3 additions & 0 deletions Capfile
@@ -0,0 +1,3 @@
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy'
9 changes: 2 additions & 7 deletions Rakefile
@@ -1,15 +1,10 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
# for example lib/tasks/capistrano.rake, and they will automatically be availab$

require(File.join(File.dirname(__FILE__), 'config', 'boot'))

require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

require 'tasks/rails'

require 'rubygems'
gem 'ci_reporter'
require 'ci/reporter/rake/test_unit'
#require 'ci/reporter/rake/rspec'
require 'tasks/rails'
File renamed without changes.
4 changes: 2 additions & 2 deletions app/views/users/edit.html.erb
Expand Up @@ -13,11 +13,11 @@
</p>
<p>
<%= f.label :password %><br />
<%= f.text_field :password %>
<%= f.password_field :password %>
</p>
<p>
<%= f.label :user_password_confirmation %><br />
<%= f.text_field :password_confirmation %>
<%= f.password_field :password_confirmation %>
</p>
<p>
<%= f.submit "Update" %>
Expand Down
10 changes: 0 additions & 10 deletions app/views/users/show.html.erb
Expand Up @@ -8,15 +8,5 @@
<%=h @user.email %>
</p>

<p>
<b>Hashed password:</b>
<%=h @user.hashed_password %>
</p>

<p>
<b>Salt:</b>
<%=h @user.salt %>
</p>

<%= link_to 'Edit', edit_user_path(@user) %> |
<%= link_to 'Back', users_path %>
1 change: 1 addition & 0 deletions config/boot.rb
Expand Up @@ -44,6 +44,7 @@ class VendorBoot < Boot
def load_initializer
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
Rails::Initializer.run(:install_gem_spec_stubs)
Rails::GemDependency.add_frozen_gem_path
end
end

Expand Down
48 changes: 48 additions & 0 deletions config/deploy.rb
@@ -0,0 +1,48 @@
# be sure to change these
set :user, 'davidhalldor'
set :domain, 'davidhalldor.com'
set :application, 'rskrif'

# file paths
set :repository, "git://github.com/davidhalldor/rskrif.git"
# set :repository, "dabbi@adsl-13-196.simnet.is:git/#{application}.git"
set :deploy_to, "/home/#{user}/Sites/#{domain}"

# distribute your applications across servers (the instructions below put them
# all on the same server, defined above as 'domain', adjust as necessary)
role :app, domain
role :web, domain
role :db, domain, :primary => true

# you might need to set this if you aren't seeing password prompts
# default_run_options[:pty] = true

# As Capistrano executes in a non-interactive mode and therefore doesn't cause
# any of your shell profile scripts to be run, the following might be needed
# if (for example) you have locally installed gems or applications. Note:
# this needs to contain the full values for the variables set, not simply
# the deltas.
# default_environment['PATH']='<your paths>:/usr/local/bin:/usr/bin:/bin'
# default_environment['GEM_PATH']='<your paths>:/usr/lib/ruby/gems/1.8'

# miscellaneous options
set :deploy_via, :remote_cache
set :scm, 'git'
set :branch, 'master'
set :scm_verbose, true
set :use_sudo, false

# task which causes Passenger to initiate a restart
namespace :deploy do
task :restart do
run "touch #{current_path}/tmp/restart.txt"
end
end

# optional task to reconfigure databases
after "deploy:update_code", :configure_database
desc "copy database.yml into the current release path"
task :configure_database, :roles => :app do
db_config = "#{deploy_to}/config/database.yml"
run "cp #{db_config} #{release_path}/config/database.yml"
end
2 changes: 1 addition & 1 deletion config/environment.rb
Expand Up @@ -5,7 +5,7 @@
# ENV['RAILS_ENV'] ||= 'production'

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION

# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
Expand Down
16 changes: 15 additions & 1 deletion public/index.html
Expand Up @@ -2,9 +2,23 @@
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="verify-v1" content="L/vBOu9CUXLqFa8tBPAh94uoUWr1Ucf6lhEJ4pQagaU="/>
<title>www.davidhalldor.com</title>
</head>
<body>
<p>In development...</p>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8424202-1");
pageTracker._trackPageview();
} catch(err) {
}</script>
<p>This site is currently in development</p>
<a href="http://twitter.com/davidhalldor">Twitter</a>
<a href="http://www.linkedin.com/in/davidhalldor">Linkedin</a>

</body>
</html>

0 comments on commit 1fcdf09

Please sign in to comment.