crushserver 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/Rakefile +1 -1
- data/VERSION.yml +1 -1
- data/crushserver.gemspec +12 -15
- data/lib/crushserver/recipes.rb +30 -23
- metadata +11 -8
- data/.gitignore +0 -2
data/LICENSE
CHANGED
data/Rakefile
CHANGED
@@ -10,5 +10,5 @@ begin
|
|
10
10
|
gemspec.add_dependency "tinder", ">= 1.4.0"
|
11
11
|
end
|
12
12
|
rescue LoadError
|
13
|
-
puts "Jeweler not available. Install it with:
|
13
|
+
puts "Jeweler not available. Install it with: gem install jeweler"
|
14
14
|
end
|
data/VERSION.yml
CHANGED
data/crushserver.gemspec
CHANGED
@@ -1,39 +1,36 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{crushserver}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["PJ Kelly", "Mason Browne"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-04-26}
|
13
13
|
s.description = %q{A collection of capistrano tasks frequently used at Crush + Lovely.}
|
14
14
|
s.email = %q{pj@crushlovely.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
|
17
|
+
"README"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
|
-
"
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
"lib/crushserver/recipes.rb"
|
20
|
+
"LICENSE",
|
21
|
+
"README",
|
22
|
+
"Rakefile",
|
23
|
+
"VERSION",
|
24
|
+
"VERSION.yml",
|
25
|
+
"crushserver.gemspec",
|
26
|
+
"lib/crushserver/recipes.rb"
|
28
27
|
]
|
29
28
|
s.homepage = %q{http://github.com/crushlovely/crushserver}
|
30
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
31
29
|
s.require_paths = ["lib"]
|
32
|
-
s.rubygems_version = %q{1.
|
30
|
+
s.rubygems_version = %q{1.4.0}
|
33
31
|
s.summary = %q{A collection of capistrano tasks frequently used at Crush + Lovely.}
|
34
32
|
|
35
33
|
if s.respond_to? :specification_version then
|
36
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
37
34
|
s.specification_version = 3
|
38
35
|
|
39
36
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
data/lib/crushserver/recipes.rb
CHANGED
@@ -1,10 +1,4 @@
|
|
1
|
-
begin
|
2
|
-
require 'fileutils'
|
3
|
-
rescue
|
4
|
-
end
|
5
|
-
|
6
1
|
require 'tinder'
|
7
|
-
|
8
2
|
Capistrano::Configuration.instance(:must_exist).load do
|
9
3
|
namespace :sync do
|
10
4
|
desc "Sync both database and attachments to local machine. Requires awesome-backup plugin."
|
@@ -72,37 +66,50 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
72
66
|
end
|
73
67
|
end
|
74
68
|
|
75
|
-
# desc "Send a message to the campfire chat room about the deploy start"
|
76
|
-
# task :snitch_begin do
|
77
|
-
# set :snitch_message, "BEGIN DEPLOY [#{stage.to_s.upcase}]: #{ENV['USER']}, #{branch}/#{real_revision[0, 7]} to #{deploy_to}"
|
78
|
-
# snitch
|
79
|
-
# end
|
80
|
-
|
81
69
|
desc "Send a message to the campfire chat room about the deploy end"
|
82
70
|
task :snitch_end do
|
83
71
|
# set :snitch_message, "END DEPLOY [#{stage.to_s.upcase}]: #{ENV['USER']}, #{branch}/#{real_revision[0, 7]} to #{deploy_to}"
|
84
72
|
set :snitch_message, "#{application.upcase} was deployed to #{stage.to_s.upcase} by #{ENV['USER'].upcase} (#{branch}/#{real_revision[0, 7]})"
|
85
73
|
snitch
|
86
74
|
end
|
75
|
+
end
|
87
76
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
77
|
+
desc "Show currently deployed revision on server."
|
78
|
+
task :revisions, :roles => :app do
|
79
|
+
begin
|
80
|
+
current, previous, latest = current_revision[0,7], previous_revision[0,7], real_revision[0,7]
|
81
|
+
puts "\n" << "-"*63
|
82
|
+
puts "===== Master Revision: \033[1;33m#{latest}\033[0m\n\n"
|
83
|
+
puts "===== [ \033[1;36m#{application} - #{stage}\033[0m ]"
|
84
|
+
puts "=== Deployed Revision: \033[1;32m#{current}\033[0m"
|
85
|
+
puts "=== Previous Revision: \033[1;32m#{previous}\033[0m\n\n"
|
86
|
+
|
87
|
+
# If deployed and master are the same, show the difference between the last 2 deployments.
|
88
|
+
base_label, new_label, base_rev, new_rev = latest != current ? \
|
89
|
+
["deployed", "master", current, latest] : \
|
90
|
+
["previous", "deployed", previous, current]
|
91
|
+
|
92
|
+
# Show difference between master and deployed revisions.
|
93
|
+
if (diff = `git log #{base_rev}..#{new_rev} --oneline`) != ""
|
94
|
+
# Colorize refs
|
95
|
+
diff.gsub!(/^([a-f0-9]+) /, "\033[1;32m\\1\033[0m - ")
|
96
|
+
diff = " " << diff.gsub("\n", "\n ") << "\n"
|
97
|
+
# Indent commit messages nicely, max 80 chars per line, line has to end with space.
|
98
|
+
diff = diff.split("\n").map{|l|l.scan(/.{1,120}/).join("\n"<<" "*14).gsub(/([^ ]*)\n {14}/m,"\n"<<" "*14<<"\\1")}.join("\n")
|
99
|
+
puts "=== Difference between #{base_label} revision and #{new_label} revision:\n\n"
|
100
|
+
puts diff
|
101
|
+
end
|
102
|
+
rescue
|
103
|
+
puts "=== Revisions Task Failed!"
|
104
|
+
end
|
93
105
|
end
|
94
106
|
|
95
107
|
#############################################################
|
96
108
|
# Hooks
|
97
109
|
#############################################################
|
98
110
|
|
99
|
-
# before :deploy do
|
100
|
-
# campfire.snitch_begin unless ENV['QUIET'].to_i > 0
|
101
|
-
# end
|
102
|
-
|
103
111
|
after :deploy do
|
104
112
|
campfire.snitch_end unless ENV['QUIET'].to_i > 0
|
113
|
+
revisions
|
105
114
|
end
|
106
|
-
|
107
|
-
# before 'deploy:rollback', 'campfire:snitch_rollback'
|
108
115
|
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crushserver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 21
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- PJ Kelly
|
@@ -15,7 +16,7 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date:
|
19
|
+
date: 2011-04-26 00:00:00 -07:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
@@ -26,6 +27,7 @@ dependencies:
|
|
26
27
|
requirements:
|
27
28
|
- - ">="
|
28
29
|
- !ruby/object:Gem::Version
|
30
|
+
hash: 7
|
29
31
|
segments:
|
30
32
|
- 1
|
31
33
|
- 4
|
@@ -43,7 +45,6 @@ extra_rdoc_files:
|
|
43
45
|
- LICENSE
|
44
46
|
- README
|
45
47
|
files:
|
46
|
-
- .gitignore
|
47
48
|
- LICENSE
|
48
49
|
- README
|
49
50
|
- Rakefile
|
@@ -56,8 +57,8 @@ homepage: http://github.com/crushlovely/crushserver
|
|
56
57
|
licenses: []
|
57
58
|
|
58
59
|
post_install_message:
|
59
|
-
rdoc_options:
|
60
|
-
|
60
|
+
rdoc_options: []
|
61
|
+
|
61
62
|
require_paths:
|
62
63
|
- lib
|
63
64
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -65,6 +66,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
66
|
requirements:
|
66
67
|
- - ">="
|
67
68
|
- !ruby/object:Gem::Version
|
69
|
+
hash: 3
|
68
70
|
segments:
|
69
71
|
- 0
|
70
72
|
version: "0"
|
@@ -73,13 +75,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
75
|
requirements:
|
74
76
|
- - ">="
|
75
77
|
- !ruby/object:Gem::Version
|
78
|
+
hash: 3
|
76
79
|
segments:
|
77
80
|
- 0
|
78
81
|
version: "0"
|
79
82
|
requirements: []
|
80
83
|
|
81
84
|
rubyforge_project:
|
82
|
-
rubygems_version: 1.
|
85
|
+
rubygems_version: 1.4.0
|
83
86
|
signing_key:
|
84
87
|
specification_version: 3
|
85
88
|
summary: A collection of capistrano tasks frequently used at Crush + Lovely.
|
data/.gitignore
DELETED