bells 0.0.3 → 0.0.4

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,3 +1,7 @@
1
+ == 0.0.4 / 2007-7-10
2
+
3
+ * Added deploy and mongrel recipes
4
+
1
5
  == 0.0.3 / 2007-06-23
2
6
 
3
7
  * Created bells directory within lib to put everything.
@@ -6,6 +6,9 @@ bin/ring
6
6
  lib/bells.rb
7
7
  lib/bells/recipes.rb
8
8
  lib/bells/recipes/apache.rb
9
- lib/bells/recipes/tools.rb
9
+ lib/bells/recipes/deploy.rb
10
+ lib/bells/recipes/mint.rb
10
11
  lib/bells/recipes/mongrel.rb
12
+ lib/bells/recipes/php.rb
13
+ lib/bells/recipes/tools.rb
11
14
  test/test_bells.rb
data/README.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  bells
2
- by Pat Nakajima
3
- http://devthatweb.com
2
+ by FIX (your name)
3
+ FIX (url)
4
4
 
5
5
  == DESCRIPTION:
6
6
 
@@ -10,6 +10,9 @@ A collection of recipes for Capistrano 2.
10
10
 
11
11
  Currently contains recipes for:
12
12
  * Apache
13
+ * Ruby on Rails
14
+ * Mint
15
+ * PHP
13
16
  * SSH keys
14
17
  * Aptitude package manager
15
18
  * Subversion
data/Rakefile CHANGED
@@ -5,15 +5,13 @@ require 'hoe'
5
5
  require './lib/bells.rb'
6
6
 
7
7
  Hoe.new('bells', Bells::VERSION) do |p|
8
- p.need_zip = true
9
- p.extra_deps = ['capistrano']
10
8
  p.rubyforge_name = 'bells'
11
9
  p.author = 'Pat Nakajima'
12
- p.email = 'patnakajima@rubyforge.org'
10
+ # p.email = 'pat@devthatweb.com'
13
11
  p.summary = 'A collection of recipes for Capistrano 2'
14
12
  p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
13
+ # p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
15
14
  p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
16
- p.remote_rdoc_dir = '' # Release to root
17
15
  end
18
16
 
19
17
  # vim: syntax=Ruby
@@ -1,6 +1,6 @@
1
+ require 'bells/recipes'
1
2
  class Bells
2
- VERSION = '0.0.3'
3
- require 'capistrano'
3
+ VERSION = '0.0.4'
4
4
  end
5
5
 
6
6
 
@@ -0,0 +1,4 @@
1
+ require 'capistrano'
2
+ require 'bells/recipes/apache'
3
+ require 'bells/recipes/deploy'
4
+ require 'bells/recipes/mongrel'
@@ -0,0 +1,38 @@
1
+ namespace :deploy do
2
+
3
+ desc "Puts config files on remote server."
4
+ task :put_config_files do
5
+ config_files.each do |file|
6
+ put file, "#{file}"
7
+ sudo "mkdir #{shared_path}/config"
8
+ sudo "mv #{file} #{shared_path}/config/"
9
+ end
10
+ sudo "chown -R #{user} #{shared_path}/config"
11
+ sudo "chmod -R 775 #{shared_path}/config"
12
+ end
13
+
14
+ task :restart do
15
+ sudo "mongrel_rails cluster::restart -C #{mongrel_conf}"
16
+ end
17
+
18
+ task :start do
19
+ sudo "mongrel_rails cluster::start -C #{mongrel_conf}"
20
+ end
21
+
22
+ task :stop do
23
+ sudo "mongrel_rails cluster::stop -C #{mongrel_conf}"
24
+ end
25
+
26
+ desc "Shows tail of production log"
27
+ task :tail do
28
+ sudo "tail -f #{current_path}/log/production.log"
29
+ end
30
+
31
+ after "deploy:update_code", "deploy:copy_config_files"
32
+ desc "Copy config files to live app"
33
+ task :copy_config_files do
34
+ config_files.each do |file|
35
+ run "cp #{shared_path}/config/#{file} #{release_path}/config/"
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,47 @@
1
+ # Allows you to deploy Mint from the comfort of your own app. Gobs of
2
+ # code borrowed from Geoff Rosenbach's original Mint deployment recipe.
3
+ namespace :deploy do
4
+ namespace :mint do
5
+
6
+ # Copies Mint variables to Capistrano variables to allow compatibility alongside
7
+ # another application.
8
+ task :set_variables do
9
+ set :domain, mint_domain
10
+ set :repository, mint_repository
11
+ set :deploy_to, mint_deploy_to
12
+ set :deploy_via, mint_deploy_via
13
+ end
14
+
15
+ desc "Configure virtual server on remote app."
16
+ task :setup_conf do
17
+ logger.info "generating .conf file"
18
+ conf = Net::HTTP.get URI.parse('http://svn.nakadev.com/templates/basicvirtualhost.conf')
19
+ require 'erb'
20
+ result = ERB.new(conf).result(binding)
21
+ put result, "#{application}.conf"
22
+ logger.info "putting #{application}.conf on #{domain}"
23
+ put result, "#{application}.conf"
24
+ sudo "mv #{application}.conf #{apache_conf}"
25
+ sudo "chown #{user}:#{group} #{apache_conf}"
26
+ sudo "chmod 775 #{apache_conf}"
27
+ end
28
+
29
+ before :default, :set_variables
30
+ desc "Deploy Mint."
31
+ task :default do
32
+ deploy
33
+ end
34
+
35
+ # This part is borrowed from Geoffrey Grosenbach.
36
+ # Overridden since PHP doesn't have some of the Rails directories
37
+ task :finalize_update, :except => { :no_release => true } do
38
+ # Make directories writeable by the deployment user's group
39
+ run "chmod -R g+w #{release_path}" if fetch(:group_writable, true)
40
+ end
41
+
42
+ task :restart, :roles => :app do
43
+ # Do nothing (I have a different recipe to restart Apache.)
44
+ end
45
+
46
+ end
47
+ end
@@ -0,0 +1,36 @@
1
+ # Capistrano PHP Deployment Recipe
2
+ # Created by Pat Nakajima
3
+ #
4
+ # To use this recipe successfully, you need to do a few things:
5
+ # * Create the folder in which you'd like to deploy the project
6
+ # on the remote server
7
+ namespace :deploy do
8
+
9
+ desc "Setup vhost conf on Apache web server."
10
+ task :setup do
11
+ sudo "mkdir -p #{apache_conf_path}"
12
+ sudo "chown -R #{user}:#{group} #{apache_conf_path} && chmod -R 775 #{apache_conf_path}"
13
+ logger.info "generating .conf file"
14
+ conf = Net::HTTP.get URI.parse('http://svn.nakadev.com/templates/basicvirtualhost.conf')
15
+ require 'erb'
16
+ result = ERB.new(conf).result(binding)
17
+ logger.info "putting #{application}.conf on #{domain}"
18
+ put result, "#{application}.conf"
19
+ run "mv #{application}.conf #{apache_conf_path}/#{apache_conf_file}"
20
+ end
21
+
22
+ # Overwritten to provide flexibility for people who aren't using Rails.
23
+ task :setup, :except => { :no_release => true } do
24
+ dirs = [deploy_to, releases_path, shared_path]
25
+ run "umask 02 && mkdir -p #{dirs.join(' ')}"
26
+ end
27
+
28
+ # Also overwritten to remove Rails-specific code.
29
+ task :finalize_update, :except => { :no_release => true } do
30
+ run "chmod -R g+w #{release_path}" if fetch(:group_writable, true)
31
+ end
32
+
33
+ # Do nothing (To restart apache, run 'cap deploy:apache:restart')
34
+ task :restart do
35
+ end
36
+ end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.2
2
+ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: bells
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.3
7
- date: 2007-06-23 00:00:00 -04:00
6
+ version: 0.0.4
7
+ date: 2007-07-10 00:00:00 -04:00
8
8
  summary: A collection of recipes for Capistrano 2
9
9
  require_paths:
10
10
  - lib
11
- email: patnakajima@rubyforge.org
11
+ email: ryand-ruby@zenspider.com
12
12
  homepage: http://www.zenspider.com/ZSS/Products/bells/
13
13
  rubyforge_project: bells
14
- description: "== FEATURES/PROBLEMS: Currently contains recipes for: * Apache * SSH keys * Aptitude package manager * Subversion * Ruby Gems In development: * (all of the above recipes) * MySQL * (more to come...) == SYNOPSIS: To view the additional tasks that bells brings, run: $ cap bells"
14
+ description: "== FEATURES/PROBLEMS: Currently contains recipes for: * Apache * Ruby on Rails * Mint * PHP * SSH keys * Aptitude package manager * Subversion * Ruby Gems In development: * (all of the above recipes) * MySQL * (more to come...) == SYNOPSIS: To view the additional tasks that bells brings, run: $ cap bells"
15
15
  autorequire:
16
16
  default_executable:
17
17
  bindir: bin
@@ -37,8 +37,11 @@ files:
37
37
  - lib/bells.rb
38
38
  - lib/bells/recipes.rb
39
39
  - lib/bells/recipes/apache.rb
40
- - lib/bells/recipes/tools.rb
40
+ - lib/bells/recipes/deploy.rb
41
+ - lib/bells/recipes/mint.rb
41
42
  - lib/bells/recipes/mongrel.rb
43
+ - lib/bells/recipes/php.rb
44
+ - lib/bells/recipes/tools.rb
42
45
  - test/test_bells.rb
43
46
  test_files:
44
47
  - test/test_bells.rb
@@ -56,15 +59,6 @@ extensions: []
56
59
  requirements: []
57
60
 
58
61
  dependencies:
59
- - !ruby/object:Gem::Dependency
60
- name: capistrano
61
- version_requirement:
62
- version_requirements: !ruby/object:Gem::Version::Requirement
63
- requirements:
64
- - - ">"
65
- - !ruby/object:Gem::Version
66
- version: 0.0.0
67
- version:
68
62
  - !ruby/object:Gem::Dependency
69
63
  name: hoe
70
64
  version_requirement: