cap-recipes 0.3.38 → 0.3.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  ---
2
+ :patch: 39
2
3
  :major: 0
3
- :minor: 3
4
- :patch: 38
5
4
  :build:
5
+ :minor: 3
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = "cap-recipes"
8
- s.version = "0.3.38"
7
+ s.name = %q{cap-recipes}
8
+ s.version = "0.3.39"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nathan Esquenazi"]
12
- s.date = "2012-01-09"
13
- s.description = "Battle-tested capistrano recipes for debian, passenger, apache, delayed_job, juggernaut, rubygems, backgroundrb, rails and more"
14
- s.email = "nesquena@gmail.com"
12
+ s.date = %q{2012-01-14}
13
+ s.description = %q{Battle-tested capistrano recipes for debian, passenger, apache, delayed_job, juggernaut, rubygems, backgroundrb, rails and more}
14
+ s.email = %q{nesquena@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
17
  "README.textile"
@@ -74,11 +74,11 @@ Gem::Specification.new do |s|
74
74
  "spec/cap_recipes_spec.rb",
75
75
  "spec/spec_helper.rb"
76
76
  ]
77
- s.homepage = "http://github.com/nesquena/cap-recipes"
77
+ s.homepage = %q{http://github.com/nesquena/cap-recipes}
78
78
  s.require_paths = ["lib"]
79
- s.rubyforge_project = "cap-recipes"
80
- s.rubygems_version = "1.8.12"
81
- s.summary = "Battle-tested capistrano recipes for passenger, delayed_job, and more"
79
+ s.rubyforge_project = %q{cap-recipes}
80
+ s.rubygems_version = %q{1.6.2}
81
+ s.summary = %q{Battle-tested capistrano recipes for passenger, delayed_job, and more}
82
82
 
83
83
  if s.respond_to? :specification_version then
84
84
  s.specification_version = 3
@@ -1,6 +1,6 @@
1
1
  Capistrano::Configuration.instance(true).load do
2
2
  namespace :deploy do
3
-
3
+
4
4
  desc "Stops the phusion passenger server"
5
5
  task :stop, :roles => :web do
6
6
  puts "Stopping rails web server"
@@ -18,6 +18,38 @@ Capistrano::Configuration.instance(true).load do
18
18
  puts "Restarting passenger by touching restart.txt"
19
19
  run "touch #{current_path}/tmp/restart.txt"
20
20
  end
21
-
21
+
22
+ end
23
+
24
+ namespace :passenger do
25
+
26
+ desc "Standalone mode for passenger"
27
+ namespace :standalone do
28
+
29
+ desc "Starts the standalone passenger server"
30
+ task :start do
31
+ run "cd #{current_path} && passenger start -a 127.0.0.1 -p 3000 -d -e #{stage_or_production}"
32
+ end
33
+
34
+ desc "Stops the standalone passenger server"
35
+ task :stop do
36
+ run "cd #{current_path} && passenger stop"
37
+ end
38
+
39
+ desc "Restarts the standalone passenger server"
40
+ task :restart, :roles => :app, :except => { :no_release => true } do
41
+ run "cd #{current_path} && passenger stop"
42
+ run "cd #{current_path} && passenger start -a 127.0.0.1 -p 3000 -d -e #{stage_or_production}"
43
+ end
44
+
45
+ end
46
+
47
+ end
48
+
49
+ # ===============================================================
50
+ # Support for capistrano-ext
51
+ # ===============================================================
52
+ def stage_or_production
53
+ exists?(:stage) ? stage : "production"
22
54
  end
23
55
  end
@@ -22,7 +22,7 @@ Capistrano::Configuration.instance(true).load do
22
22
 
23
23
  desc "Displays the production log from the server locally"
24
24
  task :tail, :roles => :app do
25
- stream "tail -f #{shared_path}/log/production.log"
25
+ stream "tail -f #{shared_path}/log/#{stage_or_production}.log"
26
26
  end
27
27
 
28
28
  desc "Pings localhost to startup server"
@@ -30,7 +30,7 @@ Capistrano::Configuration.instance(true).load do
30
30
  puts "Pinging the web server to start it"
31
31
  run "wget -O /dev/null #{local_ping_path} 2>/dev/null"
32
32
  end
33
-
33
+
34
34
  # ===============================================================
35
35
  # MAINTENANCE TASKS
36
36
  # ===============================================================
@@ -38,14 +38,21 @@ Capistrano::Configuration.instance(true).load do
38
38
  desc "Clear file-based fragment and action caching"
39
39
  task :log, :roles => :app do
40
40
  puts "Sweeping all the log files"
41
- run "cd #{current_path} && #{try_sudo} bundle exec rake log:clear RAILS_ENV=production"
41
+ run "cd #{current_path} && #{try_sudo} bundle exec rake log:clear RAILS_ENV=#{stage_or_production}"
42
42
  end
43
43
 
44
44
  desc "Clear file-based fragment and action caching"
45
45
  task :cache, :roles => :app do
46
46
  puts "Sweeping the fragment and action cache stores"
47
- run "cd #{release_path} && #{try_sudo} bundle exec rake tmp:cache:clear RAILS_ENV=production"
47
+ run "cd #{release_path} && #{try_sudo} bundle exec rake tmp:cache:clear RAILS_ENV=#{stage_or_production}"
48
48
  end
49
49
  end
50
50
  end
51
- end
51
+
52
+ # ===============================================================
53
+ # Support for capistrano-ext
54
+ # ===============================================================
55
+ def stage_or_production
56
+ exists?(:stage) ? stage : "production"
57
+ end
58
+ end
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cap-recipes
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 93
4
5
  prerelease:
5
- version: 0.3.38
6
+ segments:
7
+ - 0
8
+ - 3
9
+ - 39
10
+ version: 0.3.39
6
11
  platform: ruby
7
12
  authors:
8
13
  - Nathan Esquenazi
@@ -10,7 +15,8 @@ autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2012-01-09 00:00:00 Z
18
+ date: 2012-01-14 00:00:00 -08:00
19
+ default_executable:
14
20
  dependencies: []
15
21
 
16
22
  description: Battle-tested capistrano recipes for debian, passenger, apache, delayed_job, juggernaut, rubygems, backgroundrb, rails and more
@@ -79,6 +85,7 @@ files:
79
85
  - spec/cap/helper.rb
80
86
  - spec/cap_recipes_spec.rb
81
87
  - spec/spec_helper.rb
88
+ has_rdoc: true
82
89
  homepage: http://github.com/nesquena/cap-recipes
83
90
  licenses: []
84
91
 
@@ -92,17 +99,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
99
  requirements:
93
100
  - - ">="
94
101
  - !ruby/object:Gem::Version
102
+ hash: 3
103
+ segments:
104
+ - 0
95
105
  version: "0"
96
106
  required_rubygems_version: !ruby/object:Gem::Requirement
97
107
  none: false
98
108
  requirements:
99
109
  - - ">="
100
110
  - !ruby/object:Gem::Version
111
+ hash: 3
112
+ segments:
113
+ - 0
101
114
  version: "0"
102
115
  requirements: []
103
116
 
104
117
  rubyforge_project: cap-recipes
105
- rubygems_version: 1.8.12
118
+ rubygems_version: 1.6.2
106
119
  signing_key:
107
120
  specification_version: 3
108
121
  summary: Battle-tested capistrano recipes for passenger, delayed_job, and more