deployer 0.1.1 → 0.1.2

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/deployer.gemspec DELETED
@@ -1,64 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{deployer}
8
- s.version = "0.1.1"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Michael van Rooijen"]
12
- s.date = %q{2010-01-12}
13
- s.default_executable = %q{enhancify}
14
- s.description = %q{Deployer is a deployment engine (Ruby Gem) that enhances Capistrano with a set of useful automated deployment tasks. It favors convention over configuration, and it simplifies Rails Application Deployment with Capistrano.}
15
- s.email = %q{meskyanichi@gmail.com}
16
- s.executables = ["enhancify"]
17
- s.extra_rdoc_files = [
18
- "LICENSE",
19
- "README.textile"
20
- ]
21
- s.files = [
22
- ".document",
23
- ".gitignore",
24
- "LICENSE",
25
- "README.textile",
26
- "Rakefile",
27
- "VERSION",
28
- "bin/enhancify",
29
- "deployer.gemspec",
30
- "lib/deployer.rb",
31
- "lib/deployer/helpers.rb",
32
- "lib/deployer/initializer.rb",
33
- "lib/deployer/tasks/deployer.rake",
34
- "lib/tasks/apache.rb",
35
- "lib/tasks/commands.rb",
36
- "lib/tasks/db.rb",
37
- "lib/tasks/environment.rb",
38
- "lib/tasks/gems.rb",
39
- "lib/tasks/global.rb",
40
- "lib/tasks/nginx.rb",
41
- "lib/tasks/passenger.rb",
42
- "lib/tasks/plugin.rb",
43
- "lib/tasks/repository.rb",
44
- "setup/deploy.rb"
45
- ]
46
- s.rdoc_options = ["--charset=UTF-8"]
47
- s.require_paths = ["lib"]
48
- s.rubygems_version = %q{1.3.5}
49
- s.summary = %q{Deployer is a deployment engine (Ruby Gem) that enhances Capistrano with a set of useful automated deployment tasks. It favors convention over configuration, and it simplifies Rails Application Deployment with Capistrano.}
50
-
51
- if s.respond_to? :specification_version then
52
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
53
- s.specification_version = 3
54
-
55
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
56
- s.add_runtime_dependency(%q<capistrano>, [">= 2.5.13"])
57
- else
58
- s.add_dependency(%q<capistrano>, [">= 2.5.13"])
59
- end
60
- else
61
- s.add_dependency(%q<capistrano>, [">= 2.5.13"])
62
- end
63
- end
64
-
@@ -1,18 +0,0 @@
1
- namespace :deployer_gems do
2
-
3
- task :base do
4
- begin
5
- $gems_rake_task = true
6
- require 'rubygems'
7
- require 'rubygems/gem_runner'
8
- Rake::Task[:environment].invoke
9
- rescue
10
- end
11
- end
12
-
13
- desc "Installs all required gems."
14
- task :install => :base do
15
- current_gems.each { |gem| gem.install }
16
- end
17
-
18
- end
data/lib/tasks/apache.rb DELETED
@@ -1,49 +0,0 @@
1
- # apache_initialize_utility_path
2
- # apache_sites_available_path
3
-
4
- namespace :deploy do
5
- namespace :apache do
6
-
7
- desc "Adds Apache2 configuration and enables it."
8
- task :create do
9
- log "Adding Apache2 Virtual Host for #{domain}"
10
- config = <<-CONFIG
11
- <VirtualHost *:80>
12
- ServerName #{domain}
13
- #{unless subdomain then "ServerAlias www.#{domain}" end}
14
- DocumentRoot #{File.join(deploy_to, 'current', 'public')}
15
- </VirtualHost>
16
- CONFIG
17
-
18
- system 'mkdir tmp'
19
- file = File.new("tmp/#{domain}", "w")
20
- file << config
21
- file.close
22
- system "rsync -vr tmp/#{domain} #{user}@#{application}:#{File.join(apache_sites_available_path, domain)}"
23
- File.delete("tmp/#{domain}")
24
- run "sudo a2ensite #{domain}"
25
- run "sudo #{apache_initialize_utility_path} restart"
26
- end
27
-
28
- desc "Restarts Apache2."
29
- task :restart do
30
- run "sudo #{apache_initialize_utility_path} restart"
31
- end
32
-
33
- desc "Removes Apache2 configuration and disables it."
34
- task :destroy do
35
- log "Removing Apache2 Virtual Host for #{domain}"
36
- begin run("a2dissite #{domain}"); rescue; end
37
- begin run("sudo rm #{File.join(apache_sites_available_path, domain)}"); rescue; end
38
- run("sudo #{apache_initialize_utility_path} restart")
39
- end
40
-
41
- desc "Destroys Git Repository, Rails Environment and Apache2 Configuration."
42
- task :destroy_all do
43
- system "cap deploy:repository:destroy"
44
- run "rm -rf #{deploy_to}"
45
- system "cap deploy:apache:destroy"
46
- end
47
-
48
- end
49
- end
data/lib/tasks/nginx.rb DELETED
@@ -1,47 +0,0 @@
1
- namespace :deploy do
2
- namespace :nginx do
3
-
4
- desc "Adds NginX configuration and enables it."
5
- task :create do
6
- log "Adding NginX Virtual Host for #{domain}"
7
- config = <<-CONFIG
8
- server {
9
- listen 80;
10
- server_name #{unless subdomain then "www.#{domain} #{domain}" else domain end};
11
- root #{File.join(deploy_to, 'current', 'public')};
12
- passenger_enabled on;
13
- }
14
- CONFIG
15
-
16
- create_tmp_file(config)
17
- run "mkdir -p #{nginx_sites_enabled_path}"
18
- system "rsync -vr tmp/#{domain} #{user}@#{application}:#{File.join(nginx_sites_enabled_path, domain)}"
19
- File.delete("tmp/#{domain}")
20
- system 'cap deploy:nginx:restart'
21
- end
22
-
23
- desc "Restarts NginX."
24
- task :restart do
25
- Net::SSH.start(application, user) {|ssh| ssh.exec "#{nginx_initialize_utility_path} stop"}
26
- Net::SSH.start(application, user) {|ssh| ssh.exec "#{nginx_initialize_utility_path} start"}
27
- end
28
-
29
- desc "Removes NginX configuration and disables it."
30
- task :destroy do
31
- log "Removing NginX Virtual Host for #{domain}"
32
- begin
33
- run("rm #{File.join(nginx_sites_enabled_path, domain)}")
34
- ensure
35
- system 'cap deploy:nginx:restart'
36
- end
37
- end
38
-
39
- desc "Destroys Git Repository, Rails Environment and Nginx Configuration."
40
- task :destroy_all do
41
- system "cap deploy:repository:destroy"
42
- run "rm -rf #{deploy_to}"
43
- system "cap deploy:nginx:destroy"
44
- end
45
-
46
- end
47
- end