capistrano-rocket-chat 0.1.1 → 0.1.4
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/.gitignore +2 -1
- data/capistrano-rocket-chat.gemspec +1 -1
- data/lib/capistrano/rocket_chat/version.rb +1 -1
- data/lib/capistrano/tasks/rocket_chat.cap +14 -11
- metadata +2 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5174498a4489c5b45736dd5a928110e5aaf08273
|
|
4
|
+
data.tar.gz: e867de87f5101112dfcee02856d39a326ca02bac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f1c4a27706f3f210d1f41e554e4a6527736b9069895ceb3abab53fefe1ddf868bd6916d6b713344d1a73a901014ce55419a6731d625bf0eb6100e75c520662ce
|
|
7
|
+
data.tar.gz: 0f2a6650532331d0a131784067c0c31ab69779da6cef9091d341f37bef5448da130fa18ae0d6ac6c241453717dec6d6f1da6b41c50cba180570e4db9fa85b388
|
data/.gitignore
CHANGED
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
28
28
|
spec.require_paths = ["lib"]
|
|
29
29
|
|
|
30
|
-
spec.add_dependency "capistrano", "
|
|
30
|
+
spec.add_dependency "capistrano", ">= 3.1"
|
|
31
31
|
spec.add_dependency "httparty", "~> 0.13.7", ">= 0.13.7"
|
|
32
32
|
spec.add_development_dependency "rake", "~> 10.0", '>= 10.0.0'
|
|
33
33
|
end
|
|
@@ -32,29 +32,32 @@ def get_config_vars()
|
|
|
32
32
|
stage: fetch(:stage),
|
|
33
33
|
deploy_to: fetch(:deploy_to),
|
|
34
34
|
rails_env: fetch(:rails_env),
|
|
35
|
+
scm: fetch(:scm),
|
|
36
|
+
log_level: fetch(:log_level),
|
|
37
|
+
local_user: @task.local_user,
|
|
38
|
+
server: {
|
|
39
|
+
name: @host.hostname,
|
|
40
|
+
user: @host.user,
|
|
41
|
+
roles: @host.roles,
|
|
42
|
+
ssh_options: @host.ssh_options
|
|
43
|
+
}
|
|
35
44
|
}
|
|
36
45
|
end
|
|
37
46
|
|
|
38
47
|
def notify(event_hook)
|
|
48
|
+
|
|
39
49
|
config = get_config_vars
|
|
40
50
|
|
|
41
51
|
raise "\n\nERROR::ROCKET-CHAT-TASK: config option 'rocket_chat_webhook_url' is not set\n\n" unless config[:rocket_chat_url]
|
|
42
52
|
|
|
43
|
-
notification_text = "#{event_hook}
|
|
44
|
-
|
|
53
|
+
notification_text = "#{event_hook} deployment to '#{config[:server][:name]}' on branch '#{config[:branch]}' to stage '#{config[:stage]}'"
|
|
54
|
+
|
|
45
55
|
request_body = {
|
|
46
56
|
event: {
|
|
47
57
|
hook: event_hook,
|
|
48
|
-
text: notification_text
|
|
58
|
+
text: notification_text
|
|
49
59
|
},
|
|
50
|
-
attributes:
|
|
51
|
-
application: config[:application],
|
|
52
|
-
branch: config[:branch],
|
|
53
|
-
stage: config[:stage],
|
|
54
|
-
repo_url: config[:repo_url],
|
|
55
|
-
rails_env: config[:rails_env],
|
|
56
|
-
deploy_to: config[:deploy_to]
|
|
57
|
-
}
|
|
60
|
+
attributes: config
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
HTTParty.post("#{config[:rocket_chat_url]}", body: request_body).body
|
metadata
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capistrano-rocket-chat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Christoph Bajohr
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-04-
|
|
11
|
+
date: 2016-04-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: capistrano
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '3.1'
|
|
20
17
|
- - ">="
|
|
21
18
|
- !ruby/object:Gem::Version
|
|
22
19
|
version: '3.1'
|
|
@@ -24,9 +21,6 @@ dependencies:
|
|
|
24
21
|
prerelease: false
|
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
23
|
requirements:
|
|
27
|
-
- - "~>"
|
|
28
|
-
- !ruby/object:Gem::Version
|
|
29
|
-
version: '3.1'
|
|
30
24
|
- - ">="
|
|
31
25
|
- !ruby/object:Gem::Version
|
|
32
26
|
version: '3.1'
|