dark-capistrano-recipes 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- :patch: 4
2
+ :patch: 5
3
3
  :major: 0
4
4
  :build:
5
5
  :minor: 6
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dark-capistrano-recipes}
8
- s.version = "0.6.4"
8
+ s.version = "0.6.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Phil Misiowiec", "Leonardo Bighetti"]
@@ -2,24 +2,24 @@ Capistrano::Configuration.instance(:must_exist).load do
2
2
  set :shared_children, %w(system log pids config)
3
3
 
4
4
  after "deploy:setup" do
5
- db.create_yaml if Capistrano::CLI.ui.agree("Create database.yml in app's shared path?")
5
+ db.create_yaml if Capistrano::CLI.ui.agree("Create database.yml in app's shared path? [Yn]")
6
6
  end
7
7
 
8
8
 
9
9
  namespace :deploy do
10
10
  desc "Deploy it, github-style."
11
- task :default do
11
+ task :default, :roles => :app, :except => { :no_release => true } do
12
12
  update
13
13
  restart
14
14
  end
15
15
 
16
16
  desc "[Seppuku] Destroy everything"
17
- task :seppuku do
17
+ task :seppuku, :roles => :app, :except => { :no_release => true } do
18
18
  run "rm -rf #{current_path}; rm -rf #{shared_path}"
19
19
  rubycas.seppuku
20
20
  end
21
21
 
22
- task :setup_dirs, :except => { :no_release => true } do
22
+ task :setup_dirs, :roles => :app, :except => { :no_release => true } do
23
23
  commands = shared_dirs.map do |path|
24
24
  "mkdir -p #{shared_path}/#{path}"
25
25
  end
@@ -27,35 +27,35 @@ Capistrano::Configuration.instance(:must_exist).load do
27
27
  end
28
28
 
29
29
  desc "Uploads your local config.yml to the server"
30
- task :configure, :except => { :no_release => true } do
30
+ task :configure, :roles => :app, :except => { :no_release => true } do
31
31
  generate_config('config/config.yml', "#{shared_path}/config/config.yml")
32
32
  end
33
33
 
34
34
  desc "Setup a GitHub-style deployment."
35
- task :setup, :except => { :no_release => true } do
35
+ task :setup, :roles => :app, :except => { :no_release => true } do
36
36
  run "rm -rf #{current_path}"
37
37
  setup_dirs
38
38
  run "git clone #{repository} #{current_path}"
39
39
  end
40
40
 
41
41
  desc "Update the deployed code."
42
- task :update_code, :except => { :no_release => true } do
42
+ task :update_code, :roles => :app, :except => { :no_release => true } do
43
43
  run "cd #{current_path}; git fetch origin; git reset --hard #{branch}"
44
44
  end
45
45
 
46
- task :symlink, :except => { :no_release => true } do
46
+ task :symlink, :roles => :app, :except => { :no_release => true } do
47
47
  symlinks.make
48
48
  end
49
49
 
50
50
  desc "[Obsolete] Nothing to cleanup when using reset --hard on git"
51
- task :cleanup, :except => { :no_release => true } do
51
+ task :cleanup, :roles => :app, :except => { :no_release => true } do
52
52
  #nothing to cleanup, we're not working with 'releases'
53
53
  puts "Nothing to cleanup, yay!"
54
54
  end
55
55
 
56
56
  namespace :rollback do
57
- desc "Rollback a single commit."
58
- task :default, :except => { :no_release => true } do
57
+ desc "Rollback , :except => { :no_release => true }a single commit."
58
+ task :default, :roles => :app, :except => { :no_release => true } do
59
59
  set :branch, "HEAD^"
60
60
  deploy.default
61
61
  end
data/lib/recipes/nginx.rb CHANGED
@@ -17,32 +17,32 @@ Capistrano::Configuration.instance(:must_exist).load do
17
17
  namespace :nginx do
18
18
 
19
19
  desc "Parses and uploads nginx configuration for this app."
20
- task :setup do
20
+ task :setup, :roles => :app , :except => { :no_release => true } do
21
21
  generate_config(nginx_local_config, nginx_remote_config)
22
22
  end
23
23
 
24
24
  # [internal] Parses config file and outputs it to STDOUT
25
- task :parse do
25
+ task :parse, :roles => :app , :except => { :no_release => true } do
26
26
  puts parse_config(nginx_local_config)
27
27
  end
28
28
 
29
29
  desc "Restart nginx"
30
- task :restart do
30
+ task :restart, :roles => :app , :except => { :no_release => true } do
31
31
  sudo "service nginx restart"
32
32
  end
33
33
 
34
34
  desc "Stop nginx"
35
- task :stop do
35
+ task :stop, :roles => :app , :except => { :no_release => true } do
36
36
  sudo "service nginx stop"
37
37
  end
38
38
 
39
39
  desc "Start nginx"
40
- task :start do
40
+ task :start, :roles => :app , :except => { :no_release => true } do
41
41
  sudo "service nginx start"
42
42
  end
43
43
 
44
44
  desc "Show nginx status"
45
- task :status do
45
+ task :status, :roles => :app , :except => { :no_release => true } do
46
46
  sudo "service nginx status"
47
47
  end
48
48
 
@@ -69,7 +69,7 @@ Capistrano::Configuration.instance(:must_exist).load do
69
69
  uploads the result to #{unicorn_remote_config}, to be loaded by whoever is booting \
70
70
  up the unicorn.
71
71
  EOF
72
- task :setup do
72
+ task :setup, :roles => :app , :except => { :no_release => true } do
73
73
  # TODO: refactor this to a more generic setup task once we have more socket tasks.
74
74
  sudo "mkdir -p #{sockets_path}"
75
75
  sudo "chown #{user}:#{group} #{sockets_path} -R"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dark-capistrano-recipes
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 4
10
- version: 0.6.4
9
+ - 5
10
+ version: 0.6.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Phil Misiowiec