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 +16 -5
- data/lib/unboxed/capistrano/recipes.rb +2 -0
- data/lib/unboxed/capistrano/recipes/configuration.rb +14 -0
- data/lib/unboxed/capistrano/recipes/deploy/passenger.rb +13 -0
- data/lib/unboxed/capistrano/recipes/deploy/revision.rb +1 -4
- data/lib/unboxed/capistrano/recipes/version.rb +1 -1
- metadata +6 -4
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
41
|
-
cap deploy:revision
|
52
|
+
require 'unboxed/capistrano/recipes/deploy/passenger'
|
42
53
|
```
|
43
54
|
|
44
55
|
## Contributing
|
@@ -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
|
-
|
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
|
|
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.
|
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-
|
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:
|
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:
|
104
|
+
hash: 2340782585832187237
|
103
105
|
requirements: []
|
104
106
|
rubyforge_project:
|
105
107
|
rubygems_version: 1.8.23
|