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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d584a50dddf9598f98f03fdc3c1b904f7b9c917
4
- data.tar.gz: ae1261caff4253b4a5a9834b7f94700bcf4e62fe
3
+ metadata.gz: 5174498a4489c5b45736dd5a928110e5aaf08273
4
+ data.tar.gz: e867de87f5101112dfcee02856d39a326ca02bac
5
5
  SHA512:
6
- metadata.gz: 2a5e850b52476e81d99b872126d5bb11fa36ad73717742f6565bb228a42b7139c6ea0818b20ad6f3957ffb8e358dbb69a4396c998aaa54e5b6429f5a1c15fb04
7
- data.tar.gz: 42e1b888e787cf67fe293b803385ef57dd24fe7d2e9ccc50dc6946de3161fc362c75cc9a3cd4a72c7bbfa4eb6e75336cfde538c8be064b7adaeb1bf15124fdf5
6
+ metadata.gz: f1c4a27706f3f210d1f41e554e4a6527736b9069895ceb3abab53fefe1ddf868bd6916d6b713344d1a73a901014ce55419a6731d625bf0eb6100e75c520662ce
7
+ data.tar.gz: 0f2a6650532331d0a131784067c0c31ab69779da6cef9091d341f37bef5448da130fa18ae0d6ac6c241453717dec6d6f1da6b41c50cba180570e4db9fa85b388
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  /.bundle/
2
+ /builds/
2
3
  /.yardoc
3
4
  /Gemfile.lock
4
5
  /_yardoc/
@@ -6,4 +7,4 @@
6
7
  /doc/
7
8
  /pkg/
8
9
  /spec/reports/
9
- /tmp/
10
+ /tmp/
@@ -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", "~> 3.1", ">= 3.1"
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
@@ -1,7 +1,7 @@
1
1
  module Capistrano
2
2
  module Rocket
3
3
  module Chat
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.4"
5
5
  end
6
6
  end
7
7
  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}: deployment branch '#{config[:branch]}' to #{config[:stage]}"
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.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-13 00:00:00.000000000 Z
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'