captainu-chinook 0.1.10 → 0.2.0
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.
- checksums.yaml +4 -4
- data/chinook.gemspec +0 -1
- data/lib/chinook/capistrano.rb +1 -1
- data/lib/chinook/version.rb +1 -1
- data/readme.markdown +0 -18
- metadata +2 -17
- data/lib/chinook/capistrano/campfire.rb +0 -77
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6251c1673db05f5e16ccbedb88e64c6cf5da45d
|
4
|
+
data.tar.gz: 650fd7e413ca4333c9aec1aa4bac108038f5e698
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdb5d57dc841aa3a1bb1d70d881913f58aa4f3b7026a87304dc46758596c66f5e1d72f0dea7b8cf6fe852d87a0adb8bcfba5e4ded0592219454eaf726f91e79b
|
7
|
+
data.tar.gz: 8d96d5c74f314048dc5d56d499fe224a1b78725aa2965939536c122e02fe2b93d8564827741f9f7aadcc12974011d110641d8c768cd6f49e24b9ee2d4dbda1f8
|
data/chinook.gemspec
CHANGED
@@ -18,7 +18,6 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
spec.add_runtime_dependency 'capistrano', '~> 2.15.5'
|
21
|
-
spec.add_runtime_dependency 'tinder', '~> 1.9.4'
|
22
21
|
spec.add_runtime_dependency 'slack-notifier', '~> 0.4.1'
|
23
22
|
spec.add_runtime_dependency 'hipchat', '~> 1.1.0'
|
24
23
|
|
data/lib/chinook/capistrano.rb
CHANGED
data/lib/chinook/version.rb
CHANGED
data/readme.markdown
CHANGED
@@ -38,24 +38,6 @@ set :ping_url, 'http://some-url-to-ping.example.com'
|
|
38
38
|
after 'deploy', 'chinook:some_task'
|
39
39
|
```
|
40
40
|
|
41
|
-
### Campfire notification
|
42
|
-
|
43
|
-
Notifies [Campfire](https://campfirenow.com) when a deploy starts and/or stops. Uses the value of `git config user.name` for identifying the deploying user.
|
44
|
-
|
45
|
-
* Tasks:
|
46
|
-
- `chinook:campfire_start`
|
47
|
-
- `chinook:campfire_fail`
|
48
|
-
- `chinook:campfire_end`
|
49
|
-
* Hooks:
|
50
|
-
- `before 'deploy', 'chinook:campfire_start'`
|
51
|
-
- `after 'deploy:rollback', 'chinook:campfire_rollback'`
|
52
|
-
- `after 'deploy', 'chinook:campfire_end'`
|
53
|
-
* Settings:
|
54
|
-
- `:campfire_room_name`: the room where notifications will be posted.
|
55
|
-
- `:campfire_token`: the API token of the user that this task will post as.
|
56
|
-
- `:campfire_account_name`: the subdomain of your Campfire account (**this-part**.campfirenow.com).
|
57
|
-
- `:project_name`: the name of your project as it will show up in the notifications. *Optional; if not supplied, the value of `:application` will be used.*
|
58
|
-
|
59
41
|
### HipChat notification
|
60
42
|
|
61
43
|
Notifies [HipChat](https://hipchat.com) when a deploy starts and/or stops. Uses the value of `git config user.name` for identifying the deploying user.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: captainu-chinook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Kreeger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.15.5
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: tinder
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.9.4
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 1.9.4
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: slack-notifier
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,7 +93,6 @@ files:
|
|
107
93
|
- chinook.gemspec
|
108
94
|
- lib/chinook.rb
|
109
95
|
- lib/chinook/capistrano.rb
|
110
|
-
- lib/chinook/capistrano/campfire.rb
|
111
96
|
- lib/chinook/capistrano/hipchat.rb
|
112
97
|
- lib/chinook/capistrano/passenger.rb
|
113
98
|
- lib/chinook/capistrano/ping.rb
|
@@ -1,77 +0,0 @@
|
|
1
|
-
# Defines a task that will let a Campfire room know about a deploy.
|
2
|
-
require 'capistrano'
|
3
|
-
require 'tinder'
|
4
|
-
|
5
|
-
module Chinook::Capistrano
|
6
|
-
module Campfire
|
7
|
-
def self.load_into(configuration)
|
8
|
-
configuration.load do
|
9
|
-
namespace :chinook do
|
10
|
-
desc 'Lets a Campfire room know about a deploy that has begun.'
|
11
|
-
task :campfire_start, except: { no_release: true } do
|
12
|
-
unless exists?(:campfire_room_name) && exists?(:campfire_token) && exists?(:campfire_account_name)
|
13
|
-
logger.info 'Cannot notify Campfire without :campfire_room_name, :campfire_token, and :campfire_account_name. Skipping task.'
|
14
|
-
next
|
15
|
-
end
|
16
|
-
|
17
|
-
project_name = fetch(:project_name, application)
|
18
|
-
git_username = `git config user.name`.chomp
|
19
|
-
|
20
|
-
message = "#{git_username} started a deploy of #{project_name} to #{stage} at #{Time.now.strftime('%r %Z')}."
|
21
|
-
room_name = fetch(:campfire_room_name)
|
22
|
-
token = fetch(:campfire_token)
|
23
|
-
account_name = fetch(:campfire_account_name)
|
24
|
-
|
25
|
-
campfire = Tinder::Campfire.new(account_name, token: token)
|
26
|
-
room = campfire.find_room_by_name(room_name)
|
27
|
-
room.speak(message)
|
28
|
-
end
|
29
|
-
|
30
|
-
desc 'Lets a Campfire room know about a deploy that is rolling back.'
|
31
|
-
task :campfire_rollback, except: { no_release: true } do
|
32
|
-
unless exists?(:campfire_room_name) && exists?(:campfire_token) && exists?(:campfire_account_name)
|
33
|
-
logger.info 'Cannot notify Campfire without :campfire_room_name, :campfire_token, and :campfire_account_name. Skipping task.'
|
34
|
-
next
|
35
|
-
end
|
36
|
-
|
37
|
-
project_name = fetch(:project_name, application)
|
38
|
-
git_username = `git config user.name`.chomp
|
39
|
-
|
40
|
-
message = "#{git_username}'s deploy of #{project_name} to #{stage} has been rolled back at #{Time.now.strftime('%r %Z')}."
|
41
|
-
room_name = fetch(:campfire_room_name)
|
42
|
-
token = fetch(:campfire_token)
|
43
|
-
account_name = fetch(:campfire_account_name)
|
44
|
-
|
45
|
-
campfire = Tinder::Campfire.new(account_name, token: token)
|
46
|
-
room = campfire.find_room_by_name(room_name)
|
47
|
-
room.speak(message)
|
48
|
-
end
|
49
|
-
|
50
|
-
desc 'Lets a Campfire room know about a deploy that has finished.'
|
51
|
-
task :campfire_end, except: { no_release: true } do
|
52
|
-
unless exists?(:campfire_room_name) && exists?(:campfire_token) && exists?(:campfire_account_name)
|
53
|
-
logger.info 'Cannot notify Campfire without :campfire_room_name, :campfire_token, and :campfire_account_name. Skipping task.'
|
54
|
-
next
|
55
|
-
end
|
56
|
-
|
57
|
-
project_name = fetch(:project_name, application)
|
58
|
-
git_username = `git config user.name`.chomp
|
59
|
-
|
60
|
-
message = "#{git_username}'s deploy of #{project_name} to #{stage} finished at #{Time.now.strftime('%r %Z')}."
|
61
|
-
room_name = fetch(:campfire_room_name)
|
62
|
-
token = fetch(:campfire_token)
|
63
|
-
account_name = fetch(:campfire_account_name)
|
64
|
-
|
65
|
-
campfire = Tinder::Campfire.new(account_name, token: token)
|
66
|
-
room = campfire.find_room_by_name(room_name)
|
67
|
-
room.speak(message)
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
if Capistrano::Configuration.instance
|
76
|
-
Chinook::Capistrano::Campfire.load_into(Capistrano::Configuration.instance)
|
77
|
-
end
|