malsh 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '04893527ed6c71386b40145b68b31ae4bacce444e5d3edce147327789b18349b'
4
- data.tar.gz: 1ef47a2b0df230ca310900b2036c3ea63ca8ce4f4058e572f9c3154069142563
3
+ metadata.gz: f7f1081b9a67afe8ff4e228f5070dcf491a507b2165ac51490a17817640a1712
4
+ data.tar.gz: 6bb4a33106d0c9847b2d2073dfe2e30c2b65542885e9c30a133ebba78581635b
5
5
  SHA512:
6
- metadata.gz: ea062a8de9ff0d9b425b042b7aff1bb1bbaf43bc4aad3c9f020a936496f07cece395ccb1d0fd4c15fb90789437c95933d0d5287a34f897e43c4339978d394d1c
7
- data.tar.gz: 7fbc8dc08cee0e942531086f53640653ca4cf27b7a66b0e836fa19396ae6a53cb20d1466f50ca5c6cb2725031b7541f430b2b2c00d5efd1b08d7acb4e551d021
6
+ metadata.gz: 135c8b2509f0fb9b3738469cb7f5bb19d357faa71b7b1f5c36c27a2202872f58d824f68303bb846f7dcd5bcdbf9133fc7fea876cfa3463294676144de7d934f6
7
+ data.tar.gz: c32b5fe8280c1bd682cb361bf61eee792bb865ea9e3eb44ed34bd00b8d143370522761a8df93ac9cb01cbe5b887b0444edd74e08be8c555be965d2ff94bd26db
@@ -1,8 +1,10 @@
1
1
  module Malsh::Notification
2
2
  class Base
3
3
  def self.notify_host(subject, hosts)
4
- names = hosts.map(&:name)
5
- puts "#{subject}: \n#{names.join("\n")}" if names.size > 0 && doit?
4
+ puts "#{subject}:"
5
+ hosts.map do |h|
6
+ puts "#{h.name}(#{h.roles.keys.join(",")})"
7
+ end if doit?
6
8
  end
7
9
 
8
10
  def self.notify_alert(subject, alerts)
@@ -5,7 +5,7 @@ module Malsh::Notification
5
5
  return unless doit?
6
6
  lists = if Malsh.options[:org]
7
7
  hosts.map do |h|
8
- "<https://mackerel.io/orgs/#{Malsh.options[:org]}/hosts/#{h.id}/-/setting|#{h.name}>"
8
+ "<https://mackerel.io/orgs/#{Malsh.options[:org]}/hosts/#{h.id}/-/setting|#{h.name}(#{h.roles.keys.join(",")})>"
9
9
  end
10
10
  else
11
11
  hosts.map(&:name)
@@ -1,3 +1,3 @@
1
1
  module Malsh
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: malsh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kazuhiko yamahsita
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-15 00:00:00.000000000 Z
11
+ date: 2020-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor