capistrano-hivequeen 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  ## If your rubyforge_project name is different, then edit it and comment out
7
7
  ## the sub! line in the Rakefile
8
8
  s.name = 'capistrano-hivequeen'
9
- s.version = '0.3.0'
9
+ s.version = '0.4.0'
10
10
  s.date = '2011-10-04'
11
11
 
12
12
  ## Make sure your summary is short. The description may be as long
@@ -19,6 +19,8 @@ Capistrano::Configuration.instance(:must_exist).load do
19
19
  # Load capistrano multi-stage extension
20
20
  require 'fileutils' # required until https://github.com/capistrano/capistrano-ext/commit/930ca840a0b4adad0ec53546790b3f5ffe726538 is released
21
21
  require 'capistrano/ext/multistage'
22
+ require 'capistrano/hivequeen/setup'
23
+ require 'capistrano/hivequeen/deploy'
22
24
 
23
25
  # Redefine stage tasks from multistage extension
24
26
  HiveQueen.environments.each do |env|
@@ -0,0 +1,24 @@
1
+ # Symlink shared config files
2
+ after "deploy:update_code", "deploy:symlink_shared_config"
3
+ namespace :deploy do
4
+ desc "[internal] Symlink shared config files to current release"
5
+ task :symlink_shared_config do
6
+ run "ln -nfs #{shared_path}/config/* #{latest_release}/config"
7
+ end
8
+ end
9
+
10
+ desc "Deploy without migrations"
11
+ task(:hotfix) { deploy.default }
12
+
13
+ namespace :deploy do
14
+ desc "[internal] Original Capistrano task. Don't run this."
15
+ task :cold do
16
+ # Nothing. Use :cold task below
17
+ end
18
+ end
19
+
20
+ desc "Deploy for the first time. Runs setup and deploy:migrations"
21
+ task :cold do
22
+ setup
23
+ deploy.migrations
24
+ end
@@ -0,0 +1,19 @@
1
+ # Capistrano tasks for Chef
2
+ namespace :deploy do
3
+ desc "[internal] Original Capistrano task. Don't run this."
4
+ task(:setup) do
5
+ # Nothing, run setup task below
6
+ end
7
+ end
8
+
9
+ desc "Run chef-client on all servers"
10
+ task :setup do
11
+ logger.trace "Using the current user account"
12
+ orig_user = user
13
+ set :user, nil # Use current user account
14
+ sudo "chef-client"
15
+
16
+ # Reset user
17
+ logger.trace "Resetting user to #{orig_user}"
18
+ set :user, orig_user
19
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-hivequeen
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
8
+ - 4
9
9
  - 0
10
- version: 0.3.0
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Aaron Suggs
@@ -72,7 +72,9 @@ files:
72
72
  - README.rdoc
73
73
  - capistrano-hivequeen.gemspec
74
74
  - lib/capistrano/hivequeen.rb
75
+ - lib/capistrano/hivequeen/deploy.rb
75
76
  - lib/capistrano/hivequeen/server.rb
77
+ - lib/capistrano/hivequeen/setup.rb
76
78
  has_rdoc: true
77
79
  homepage: http://github.com/kickstarter/capistrano-hivequeen
78
80
  licenses: []