Skip to content

Commit 24a4e7f

Browse files
committed
update publisher and check integrations
1 parent 47e4736 commit 24a4e7f

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

demo/rsn_events_bot/publish.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@
1313

1414
publishers.each do |publisher|
1515
puts publisher.post(message, image) ? "x" : "."
16-
end
16+
end
17+
18+
puts "Publishing finished"

demo/rsn_events_bot/publishers/bluesky.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
BSKY_USER = ENV["BSKY_USER"]
66
BSKY_PASS = ENV["BSKY_PASS"]
77

8-
return false unless BSKY_USER && BSKY_PASS
8+
exit unless BSKY_USER && BSKY_PASS
99

1010
TEXT = <<~TEXT
1111
📅 Upcoming Ruby events around the world

demo/rsn_events_bot/publishers/discord.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Discord
66
def post(text, image_path)
77
webhook = ENV["DISCORD_WEBHOOK"]
88

9-
return false unless webhook
9+
exit unless webhook
1010

1111
uri = URI(webhook)
1212
req = Net::HTTP::Post.new(uri)

demo/rsn_events_bot/publishers/mastodon.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def post(text, image_path)
77
instance = ENV["MASTODON_INSTANCE"]
88
token = ENV["MASTODON_TOKEN"]
99

10-
return unless instance && token
10+
exit unless instance && token
1111

1212
abort "Image not found" unless File.exist?(image_path)
1313

0 commit comments

Comments
 (0)