rat_deployer 0.1.12 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3a34ca0a2412e7cf6180f7d7708f17d31759094
4
- data.tar.gz: 0ed7f6722e96927da2ecb663ad0827234a9b28b0
3
+ metadata.gz: 68af30161bf57223e0e17c52c9f8a22312a7b6a9
4
+ data.tar.gz: 4cfa2327a14b25b6aaf32d4778a15f2a2b9c7e7c
5
5
  SHA512:
6
- metadata.gz: d8c88b1943bb041fe61a9ff464bc7bc3fac32811aa90bfcb898dbbd8738af468dca82602aeadee09f59c91bc6356f1e087228e020af55c2aa619629894f42c37
7
- data.tar.gz: 9e36e9bf273102ab126b474be995f4995075b4f7bac63ca9e2b2f0216df2954ce22d7971953fa25594d38bd583a0183accef374896f76ce40c3e94fcb3836c24
6
+ metadata.gz: 07c4d8b7dc68a350d5d6b9735c66d7e5f4729ed49055ba0a195761766d5d3125dca1771761d37ee09ced555a6aec3a202343cf2468d156029e9fe130d10c7817
7
+ data.tar.gz: 04ee51ef35741b3213bed7bfc989237b49765f780fbddf93916a8b33e37396ae14d4ca148b241c437039317621b8bb83f092350b376b1f098a768fd1284b19b8
@@ -24,7 +24,7 @@ Reason:
24
24
  end
25
25
 
26
26
  desc "compose ARGS...", "runs docker-compose command with default flags"
27
- def compose(cmd, *cmd_flags)
27
+ def compose(cmd, *cmd_flags, silent: false)
28
28
  env = RatDeployer::Config.env
29
29
  project_name = RatDeployer::Config.all.fetch('project_name')
30
30
 
@@ -38,7 +38,7 @@ Reason:
38
38
  flags.unshift(RatDeployer::Config.remote_machine_flags)
39
39
  end
40
40
 
41
- cmd = run "docker-compose #{flags.join(' ')} #{cmd} #{cmd_flags.join(" ")}"
41
+ cmd = run "docker-compose #{flags.join(' ')} #{cmd} #{cmd_flags.join(" ")}", silent: silent
42
42
  cmd.fetch(:output)
43
43
  end
44
44
 
@@ -5,7 +5,7 @@ require 'rat_deployer/config'
5
5
  module RatDeployer
6
6
  module Command
7
7
  def run(cmd, silent: false)
8
- if RatDeployer::Config.prompt_enabled?
8
+ if !silent && RatDeployer::Config.prompt_enabled?
9
9
  msg = "||=> Running command ".colorize(:blue) + "`#{cmd.colorize(:white)}`"
10
10
  puts msg
11
11
  end
@@ -16,8 +16,9 @@ module RatDeployer
16
16
  props = get_deploy_properties
17
17
 
18
18
  slack_notifier.post(
19
+ text: title,
19
20
  attachments: [{
20
- title: title,
21
+ title: 'Deploy details',
21
22
  fields: get_deploy_properties.map do |k,v|
22
23
  {
23
24
  title: k.to_s.titleize,
@@ -41,7 +42,7 @@ module RatDeployer
41
42
  begin
42
43
  Slack::Notifier.new(
43
44
  webhook_url,
44
- channel: '#general',
45
+ channel: '#alerts',
45
46
  username: 'rat-deployer'
46
47
  )
47
48
  end
@@ -54,7 +55,7 @@ module RatDeployer
54
55
  def self.get_deploy_properties
55
56
  require 'socket'
56
57
 
57
- docker_config = YAML.load(RatDeployer::Cli.new.compose('config'))
58
+ docker_config = YAML.load(RatDeployer::Cli.new.compose('config', silent: true))
58
59
  images = docker_config['services'].map { |s,c| c['image'] }.uniq.sort
59
60
 
60
61
  {
@@ -1,3 +1,3 @@
1
1
  module RatDeployer
2
- VERSION = "0.1.12"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rat_deployer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Oga
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-15 00:00:00.000000000 Z
11
+ date: 2017-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor