osakana 0.2.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: 4a36b2afaaeb73fd437d075f95903bacf4e28ed927422a95cf87f7c98cb216f2
4
- data.tar.gz: 52395094710b52e1dde84e68ce074b224d179e8446b7a01c81b2f04641926432
3
+ metadata.gz: 21f7bc97c893c14d7c702ab8867c7ce63144f5c4cdb54f019e9c8fa99393e3b8
4
+ data.tar.gz: 3d41bfebf99474b4e9176b8dd2218e3febfa3a106ab70fb1e287de3650683733
5
5
  SHA512:
6
- metadata.gz: 265bf8082b7a6c47d892b010632c607099e90fa6388969a958ac9163b74aa5c7ddfdf68aeb809b4533036aa496899cb9a742a5f49bc69bcd39ac3340f1359481
7
- data.tar.gz: 2ac1a0f3fb6dcd958fe0d92f758e43503f946bd305aed8e81d1f290ebabaeaf449867704d2c1a3a237237cc701d178de20a9c987c70a2fc0041fc5451b4af356
6
+ metadata.gz: 7582cf02d5e62690d0b5db05aaf2eacc3360b6f9f53380ff4eec99701a00069bc673d0f4a65bfd0eb93fb759237ac820ec3bb576e0ade9362357d9a620f935be
7
+ data.tar.gz: 3c5d87e8746db988fcc29d67ee72c1907b982f714e8895080b1a0883c7d80f8913e653bd28db3955a0aa0f3aa785ddfa65e7a76bd11ff0ecfc180053d56122fd
@@ -5,6 +5,8 @@ require "slack/incoming/webhooks"
5
5
  module Osakana
6
6
  class Notifier
7
7
  def notifiy(title, attachments = [])
8
+ attachments << { title: "N/A" } if attachments.empty?
9
+
8
10
  if slack_webhook_url?
9
11
  slack = Slack::Incoming::Webhooks.new(slack_webhook_url, channel: slack_channel)
10
12
  slack.post title, attachments: attachments
@@ -28,8 +30,8 @@ module Osakana
28
30
  ENV.key? "SLACK_WEBHOOK_URL"
29
31
  end
30
32
 
31
- def self.notify(title, text)
32
- new.notifiy(title, text)
33
+ def self.notify(title, attachments)
34
+ new.notifiy(title, attachments)
33
35
  end
34
36
  end
35
37
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Osakana
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osakana
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manabu Niseki