unboxed-capistrano-recipes 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -26,19 +26,30 @@ Allow Capistrano to load recipes via Rubygems. Add the following to the top of y
26
26
  require 'rubygems'
27
27
  ```
28
28
 
29
- Load the recipes from the gem by adding the require statement in `deploy.rb`:
29
+ # Usage
30
+
31
+ This gem provides some base recipes that are automatically loaded when Capistrano initialises. Other recipes and tasks will have to be loaded explicitly in order to avoid recipe conflicts and to keep `deploy.rb` readable and explicit.
32
+
33
+ ### Base recipes
34
+
35
+ Load the base recipes from the gem by adding the require statement in `deploy.rb`:
30
36
 
31
37
  ```ruby
32
38
  require 'unboxed/capistrano/recipes'
33
39
  ```
34
40
 
35
- ## Usage
41
+ The following tasks will be loaded:
42
+
43
+ | Task | Description |
44
+ | --------------- | ------------------------------------------ |
45
+ | deploy:revision | Show currently deployed revision on server |
46
+
47
+ ### Passenger deployment
36
48
 
37
- This gem provides a set of Capistrano recipes:
49
+ In order to deploy via [Passenger](http://www.phusionpassenger.com/) (mod_rails) you will have to load the tasks explicity in `deploy.rb`:
38
50
 
39
51
  ```ruby
40
- # Show currently deployed revision on server
41
- cap deploy:revision
52
+ require 'unboxed/capistrano/recipes/deploy/passenger'
42
53
  ```
43
54
 
44
55
  ## Contributing
@@ -1,2 +1,4 @@
1
+ require 'capistrano'
1
2
  require 'unboxed/capistrano/recipes/version'
3
+ require 'unboxed/capistrano/recipes/configuration'
2
4
  require 'unboxed/capistrano/recipes/deploy/revision'
@@ -0,0 +1,14 @@
1
+ module Unboxed
2
+ module Capistrano
3
+ module Recipes
4
+ class Configuration
5
+
6
+ CONFIGURATION = ::Capistrano::Configuration.respond_to?(:instance) ? ::Capistrano::Configuration.instance(:must_exist) : ::Capistrano.configuration(:must_exist)
7
+
8
+ def self.load(&block)
9
+ CONFIGURATION.load(&block)
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ Unboxed::Capistrano::Recipes::Configuration.load do
2
+ namespace :deploy do
3
+ desc "Start the application via Passenger (has no effect)"
4
+ task :start do ; end
5
+ desc "Stop the application via Passenger (has no effect)"
6
+ task :stop do ; end
7
+ desc "Restart the Passenger application server"
8
+ task :restart, :roles => :app, :except => { :no_release => true } do
9
+ run "touch #{File.join(current_path, 'tmp' ,'restart.txt')}"
10
+ end
11
+ end
12
+ end
13
+
@@ -1,7 +1,4 @@
1
- configuration = Capistrano::Configuration.respond_to?(:instance) ? Capistrano::Configuration.instance(:must_exist) : Capistrano.configuration(:must_exist)
2
-
3
- configuration.load do
4
-
1
+ Unboxed::Capistrano::Recipes::Configuration.load do
5
2
  after "deploy", "deploy:revision"
6
3
  after "deploy:migrations", "deploy:revision"
7
4
 
@@ -1,7 +1,7 @@
1
1
  module Unboxed
2
2
  module Capistrano
3
3
  module Recipes
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unboxed-capistrano-recipes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-16 00:00:00.000000000 Z
12
+ date: 2013-03-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -72,6 +72,8 @@ files:
72
72
  - README.md
73
73
  - Rakefile
74
74
  - lib/unboxed/capistrano/recipes.rb
75
+ - lib/unboxed/capistrano/recipes/configuration.rb
76
+ - lib/unboxed/capistrano/recipes/deploy/passenger.rb
75
77
  - lib/unboxed/capistrano/recipes/deploy/revision.rb
76
78
  - lib/unboxed/capistrano/recipes/version.rb
77
79
  - unboxed-capistrano-recipes.gemspec
@@ -90,7 +92,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
90
92
  version: '0'
91
93
  segments:
92
94
  - 0
93
- hash: 2581447159036150591
95
+ hash: 2340782585832187237
94
96
  required_rubygems_version: !ruby/object:Gem::Requirement
95
97
  none: false
96
98
  requirements:
@@ -99,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
101
  version: '0'
100
102
  segments:
101
103
  - 0
102
- hash: 2581447159036150591
104
+ hash: 2340782585832187237
103
105
  requirements: []
104
106
  rubyforge_project:
105
107
  rubygems_version: 1.8.23