railsmachine 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ setup_rdoc ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc']
15
15
  desc "Does a full compile, test run"
16
16
  task :default => [:test, :package]
17
17
 
18
- version="0.1.0"
18
+ version="0.1.1"
19
19
  name="railsmachine"
20
20
 
21
21
  setup_gem(name, version) do |spec|
@@ -18,10 +18,9 @@ Capistrano.configuration(:must_exist).load do
18
18
  set to true."
19
19
  task :configure_apache, :roles => :web do
20
20
  set_apache_conf
21
- set :apache_server_name, domain unless apache_server_name
22
21
 
23
22
  server_aliases = []
24
- server_aliases << "www.#{domain}"
23
+ server_aliases << "www.#{apache_server_name}"
25
24
  server_aliases.concat apache_server_aliases
26
25
  set :apache_server_aliases_array, server_aliases
27
26
 
@@ -10,6 +10,7 @@ Capistrano.configuration(:must_exist).load do
10
10
  task :setup_servers do
11
11
  setup_db
12
12
  setup_app
13
+ setup_symlinks
13
14
  setup_web
14
15
  end
15
16
 
@@ -38,7 +39,7 @@ Capistrano.configuration(:must_exist).load do
38
39
 
39
40
  desc "Setup web server."
40
41
  task :setup_web, :roles => :web do
41
- set :apache_server_name, domain
42
+ set :apache_server_name, domain unless apache_server_name
42
43
  configure_apache
43
44
  end
44
45
 
@@ -73,6 +74,20 @@ Capistrano.configuration(:must_exist).load do
73
74
  import_svn
74
75
  end
75
76
 
77
+ desc "Setup public symlink directories"
78
+ task :setup_symlinks, :roles => [:app, :web] do
79
+ if app_symlinks
80
+ app_symlinks.each { |link| run "mkdir -p #{shared_path}/public/#{link}" }
81
+ end
82
+ end
83
+
84
+ desc "Link up any public directories."
85
+ task :symlink_public, :roles => [:app, :web] do
86
+ if app_symlinks
87
+ app_symlinks.each { |link| run "ln -nfs #{shared_path}/public/#{link} #{current_path}/public/#{link}" }
88
+ end
89
+ end
90
+
76
91
  desc <<-DESC
77
92
  Restart the processes on the application server by calling restart_app.
78
93
  DESC
@@ -87,18 +102,9 @@ Capistrano.configuration(:must_exist).load do
87
102
  start_app
88
103
  end
89
104
 
90
- desc "Link up any directories."
91
- task :after_symlink, :roles => :app do
92
- if app_symlinks
93
- app_symlinks.each { |link| run "ln -nfs #{shared_path}/public/#{link} #{current_path}/public/#{link}" }
94
- end
95
- end
96
-
97
- desc "Setup symlink dirs"
98
- task :after_setup, :roles => :app do
99
- if app_symlinks
100
- app_symlinks.each { |link| run "mkdir #{shared_path}/#{link}" }
101
- end
105
+ desc "Creates additional symlinks."
106
+ task :after_symlink, :roles => [:app, :web] do
107
+ symlink_public
102
108
  end
103
109
 
104
110
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: railsmachine
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.0
7
- date: 2006-06-19 00:00:00 -04:00
6
+ version: 0.1.1
7
+ date: 2006-06-21 00:00:00 -04:00
8
8
  summary: The Rails Machine task library
9
9
  require_paths:
10
10
  - lib