capistrano-helpers 0.5.7 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.markdown +6 -0
- data/README.rdoc +5 -13
- data/Rakefile +3 -1
- data/VERSION +1 -1
- data/capistrano-helpers.gemspec +11 -5
- data/lib/capistrano-helpers/bundler.rb +1 -0
- data/lib/capistrano-helpers/campfire.rb +14 -18
- metadata +36 -8
data/CHANGELOG.markdown
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Capistrano-Helpers Changelog
|
2
2
|
|
3
|
+
Fixed:
|
4
|
+
|
5
|
+
* Campfire notifications were broken. Updated for new API, use git names for announcements.
|
6
|
+
* Force a chown of vendor/bundler, since building gems sometimes doesn't preserve group permissions.
|
7
|
+
Hopefully there will be a fix for this someday so we can avoid this workaround.
|
8
|
+
|
3
9
|
## 0.5.7
|
4
10
|
|
5
11
|
Changed:
|
data/README.rdoc
CHANGED
@@ -46,15 +46,14 @@ After the application has been deployed, this helper will post a message to
|
|
46
46
|
the given campfire room stating the username, the application, the branch/tag,
|
47
47
|
and the environment. E.g.:
|
48
48
|
|
49
|
-
|
49
|
+
Scott Woods just deployed myapp v0.5.4 to staging
|
50
50
|
|
51
|
-
This helper expects to find a configuration file config/campfire.yml
|
52
|
-
following format:
|
51
|
+
This helper expects to find a configuration file config/campfire.yml or ~/.campfire.yml
|
52
|
+
with the following format:
|
53
53
|
|
54
54
|
# Configuration for posting to campfire.
|
55
|
-
|
56
|
-
|
57
|
-
password: 's3kret!'
|
55
|
+
subdomain: mycompany
|
56
|
+
token: abcd1234567890
|
58
57
|
room: Chatter
|
59
58
|
|
60
59
|
You can override the location of the configuration file by setting the
|
@@ -62,13 +61,6 @@ You can override the location of the configuration file by setting the
|
|
62
61
|
|
63
62
|
set :campfire_config, 'somewhere/else.yml'
|
64
63
|
|
65
|
-
This helper requires that the "tinder" gem is installed on the machine that
|
66
|
-
you run the "cap" command from. It doesn't need to be installed on any of the
|
67
|
-
servers. You can install the tinder gem using the following command on linux
|
68
|
-
or mac:
|
69
|
-
|
70
|
-
sudo gem install tinder
|
71
|
-
|
72
64
|
=== features
|
73
65
|
|
74
66
|
Before the app is deployed, this helper checks out the branch/tag that is
|
data/Rakefile
CHANGED
@@ -10,7 +10,9 @@ begin
|
|
10
10
|
gem.email = "scott@westarete.com"
|
11
11
|
gem.homepage = "http://github.com/westarete/capistrano-helpers"
|
12
12
|
gem.authors = ["Scott Woods"]
|
13
|
-
gem.add_dependency('capistrano', '
|
13
|
+
gem.add_dependency('capistrano', '2.5.19')
|
14
|
+
gem.add_dependency('git', '1.2.5')
|
15
|
+
gem.add_dependency('tinder', '1.4.3')
|
14
16
|
end
|
15
17
|
|
16
18
|
rescue LoadError
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6.0
|
data/capistrano-helpers.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{capistrano-helpers}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.6.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Scott Woods"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-12-11}
|
13
13
|
s.description = %q{A set of optional extensions to capistrano to make common tasks easier.}
|
14
14
|
s.email = %q{scott@westarete.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -57,12 +57,18 @@ Gem::Specification.new do |s|
|
|
57
57
|
s.specification_version = 3
|
58
58
|
|
59
59
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
60
|
-
s.add_runtime_dependency(%q<capistrano>, ["
|
60
|
+
s.add_runtime_dependency(%q<capistrano>, ["= 2.5.19"])
|
61
|
+
s.add_runtime_dependency(%q<git>, ["= 1.2.5"])
|
62
|
+
s.add_runtime_dependency(%q<tinder>, ["= 1.4.3"])
|
61
63
|
else
|
62
|
-
s.add_dependency(%q<capistrano>, ["
|
64
|
+
s.add_dependency(%q<capistrano>, ["= 2.5.19"])
|
65
|
+
s.add_dependency(%q<git>, ["= 1.2.5"])
|
66
|
+
s.add_dependency(%q<tinder>, ["= 1.4.3"])
|
63
67
|
end
|
64
68
|
else
|
65
|
-
s.add_dependency(%q<capistrano>, ["
|
69
|
+
s.add_dependency(%q<capistrano>, ["= 2.5.19"])
|
70
|
+
s.add_dependency(%q<git>, ["= 1.2.5"])
|
71
|
+
s.add_dependency(%q<tinder>, ["= 1.4.3"])
|
66
72
|
end
|
67
73
|
end
|
68
74
|
|
@@ -5,6 +5,7 @@ CapistranoHelpers.with_configuration do
|
|
5
5
|
namespace :deploy do
|
6
6
|
desc "Install gems on the remote server using Bundler."
|
7
7
|
task :bundler do
|
8
|
+
run "sudo chown -Rh `whoami` #{shared_path}/vendor/bundler"
|
8
9
|
run "cd #{release_path} && bundle install --deployment --local --path #{shared_path}/vendor/bundler --without development test"
|
9
10
|
end
|
10
11
|
end
|
@@ -1,35 +1,31 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../capistrano-helpers' if ! defined?(CapistranoHelpers)
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
gem 'tinder', '>= 1.4.0'
|
6
|
-
require 'tinder'
|
7
|
-
rescue LoadError
|
8
|
-
abort "The campfire helper requires the tinder gem. Install it with: sudo gem install tinder"
|
9
|
-
end
|
3
|
+
require 'tinder'
|
4
|
+
require 'git'
|
10
5
|
|
11
6
|
CapistranoHelpers.with_configuration do
|
12
7
|
|
13
8
|
namespace :deploy do
|
14
9
|
desc 'Make a post to campfire to tell everyone about this deployment.'
|
15
10
|
task :post_to_campfire do
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
config_file = [fetch(:campfire_config, 'config/campfire.yml'), "#{ENV['HOME']}/.campfire.yml"].detect { |f| File.readable?(f) }
|
12
|
+
if config_file.nil?
|
13
|
+
puts "Could not find a campfire configuration. Skipping campfire notification."
|
14
|
+
else
|
15
|
+
if ! exists?(:application)
|
16
|
+
puts "You should set :application to the name of this app."
|
17
|
+
end
|
18
|
+
git_config = Git.open('.').config rescue {}
|
19
|
+
someone = ENV['GIT_AUTHOR_NAME'] || git_config['user.name'] || `whoami`.strip
|
22
20
|
config = YAML::load_file(config_file)
|
23
|
-
campfire = Tinder::Campfire.new(config['
|
21
|
+
campfire = Tinder::Campfire.new(config['subdomain'], :token => config['token'])
|
24
22
|
room = campfire.find_room_by_name(config['room'])
|
25
|
-
|
23
|
+
stage ||= 'production'
|
24
|
+
room.speak("#{someone} just deployed #{application} #{branch} to #{stage}")
|
26
25
|
room.leave
|
27
|
-
rescue Errno::ENOENT
|
28
|
-
puts "Could not open config/campfire.yml. Skipping campfire notification."
|
29
26
|
end
|
30
27
|
end
|
31
28
|
end
|
32
|
-
|
33
29
|
after "deploy:restart", "deploy:post_to_campfire"
|
34
30
|
|
35
31
|
end
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
-
|
9
|
-
version: 0.
|
7
|
+
- 6
|
8
|
+
- 0
|
9
|
+
version: 0.6.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Scott Woods
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-12-11 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -22,15 +22,43 @@ dependencies:
|
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - "="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
segments:
|
28
28
|
- 2
|
29
|
-
-
|
30
|
-
-
|
31
|
-
version: 2.
|
29
|
+
- 5
|
30
|
+
- 19
|
31
|
+
version: 2.5.19
|
32
32
|
type: :runtime
|
33
33
|
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: git
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 1
|
43
|
+
- 2
|
44
|
+
- 5
|
45
|
+
version: 1.2.5
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: tinder
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
segments:
|
56
|
+
- 1
|
57
|
+
- 4
|
58
|
+
- 3
|
59
|
+
version: 1.4.3
|
60
|
+
type: :runtime
|
61
|
+
version_requirements: *id003
|
34
62
|
description: A set of optional extensions to capistrano to make common tasks easier.
|
35
63
|
email: scott@westarete.com
|
36
64
|
executables: []
|