nesquena-cap-recipes 0.2.20 → 0.2.21

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.
data/README.textile CHANGED
@@ -1,17 +1,9 @@
1
1
  h1. cap-recipes
2
2
 
3
- h2. INSTALLATION
4
-
5
- * gem sources -a http://gems.github.com/
6
- * sudo gem install nesquena-cap-recipes
7
-
8
- h2. DESCRIPTION
3
+ A collection of useful capistrano recipes.
4
+ Best suited for ruby projects which deploy using Phusion Passenger.
9
5
 
10
- This is a collection of capistrano recipes which will grow to encompass many useful recipes.
11
- The intended use for these recipes is for a ruby project which deploys using Phusion Passenger and caches using memcached.
12
- In addition, recipes for the management of various daemon processes will be included as needed.
13
6
  Feel free to contribute to this and make it better!
14
- Any of the recipes can be used on their own (TODO).
15
7
 
16
8
  Currently included:
17
9
 
@@ -20,31 +12,35 @@ Currently included:
20
12
  * Memcache Process
21
13
  * Juggernaut Daemon
22
14
  * Backgroundrb Server
23
-
24
- h2. SYNOPSIS
25
-
26
- To include any of these into your deploy.rb configuration file for Capistrano:
27
-
28
- require 'cap_recipes/tasks/passenger'
29
- require 'cap_recipes/tasks/rails'
30
- require 'cap_recipes/tasks/apache'
31
- require 'cap_recipes/tasks/backgroundrb'
32
- require 'cap_recipes/tasks/juggernaut'
33
- require 'cap_recipes/tasks/memcache'
34
-
35
- Or to include and activate all of them:
36
15
 
37
- require 'cap_recipes'
38
-
39
- By default, these recipes will include both tasks for managing (start/stop/restart) as well as tasks for installing when available.
40
- The recipes also include hooks which tie all the recipes into the deployment process as appropriate.
16
+ h2. INSTALLATION
41
17
 
42
- If you wish to cherry-pick specific tasks, you can also include the management tasks, installation tasks and deploy hooks seperately.
18
+ sudo gem install nesquena-cap-recipes -s http://gems.github.com/
43
19
 
44
- require 'cap_recipes/tasks/memcache/install.rb' # memcache installation tasks
45
- require 'cap_recipes/tasks/memcache/manage.rb' # memcache daemon management tasks
46
- require 'cap_recipes/tasks/memcache/hooks.rb' # memcache deployment hooks
20
+ Include into your deploy.rb configuration file for Capistrano:
47
21
 
22
+ <pre>
23
+ <code>
24
+ # use the complete deployment process
25
+ require 'cap_recipes'
26
+
27
+ # OR
28
+ # use a single slice of the deployment process
29
+ # (use hooks which tie all the recipes into the deployment process,
30
+ # tasks for managing and tasks for installing):
31
+ # substitude memcache with: passenger, rails, apache, backgroundrb, juggernaut
32
+ require 'cap_recipes/tasks/memcache'
33
+
34
+ # OR
35
+ # only use managing tasks:
36
+ require 'cap_recipes/tasks/memcache/manage'
37
+
38
+ # OR
39
+ #only use install tasks:
40
+ require 'cap_recipes/tasks/memcache/install'
41
+ </code>
42
+ </pre>
43
+
48
44
  h2. USAGE
49
45
 
50
46
  h3. Apache
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 20
2
+ :patch: 21
3
3
  :major: 0
4
4
  :minor: 2
@@ -0,0 +1,2 @@
1
+ require File.join(File.dirname(__FILE__),'..','helper')
2
+ require 'cap_recipes'
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH << File.join(File.dirname(__FILE__),'..','..','lib')
2
+ def current_path;end
@@ -0,0 +1,13 @@
1
+ require File.expand_path("spec_helper", File.dirname(__FILE__))
2
+
3
+ describe 'loading everything' do
4
+ def run_cap(folder,task)
5
+ folder = File.join(File.dirname(__FILE__),'cap',folder)
6
+ `cd #{folder} && #{task}`
7
+ end
8
+
9
+ it "finds all tasks" do
10
+ tasks = run_cap 'all', 'cap -T'
11
+ tasks.split("\n").size.should >= 20
12
+ end
13
+ end
@@ -0,0 +1,16 @@
1
+ # ---- requirements
2
+ require 'rubygems'
3
+ require 'spec'
4
+
5
+ $LOAD_PATH << File.expand_path("../lib", File.dirname(__FILE__))
6
+
7
+ # ---- bugfix
8
+ #`exit?': undefined method `run?' for Test::Unit:Module (NoMethodError)
9
+ #can be solved with require test/unit but this will result in extra test-output
10
+ module Test
11
+ module Unit
12
+ def self.run?
13
+ true
14
+ end
15
+ end
16
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nesquena-cap-recipes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.20
4
+ version: 0.2.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Esquenazi
@@ -53,8 +53,12 @@ files:
53
53
  - lib/cap_recipes/tasks/rails.rb
54
54
  - lib/cap_recipes/tasks/with_scope.rb
55
55
  - lib/cap_recipes.rb
56
- - test/cap_recipes_test.rb
57
- - test/test_helper.rb
56
+ - spec/cap
57
+ - spec/cap/all
58
+ - spec/cap/all/Capfile
59
+ - spec/cap/helper.rb
60
+ - spec/cap_recipes_spec.rb
61
+ - spec/spec_helper.rb
58
62
  has_rdoc: true
59
63
  homepage: http://github.com/nesquena/cap-recipes
60
64
  post_install_message:
@@ -1,5 +0,0 @@
1
- require File.dirname(__FILE__) + '/test_helper'
2
-
3
- class CapRecipesTest < Test::Unit::TestCase
4
-
5
- end
data/test/test_helper.rb DELETED
@@ -1,10 +0,0 @@
1
- require 'rubygems'
2
- require 'test/unit'
3
- require 'shoulda'
4
- require 'mocha'
5
-
6
- $LOAD_PATH.unshift(File.dirname(__FILE__))
7
- require 'cap_recipes'
8
-
9
- class Test::Unit::TestCase
10
- end