diff --git a/examples/unify_api.rb b/examples/unify_api.rb index 855b5d6..8328875 100644 --- a/examples/unify_api.rb +++ b/examples/unify_api.rb @@ -9,8 +9,6 @@ abort 'BUNDLEUP_CONNECTION_ID is required for unify example' if connection_id.nil? || connection_id.empty? -chat = BundleUp::Unify::Chat.new(api_key, connection_id) -git = BundleUp::Unify::Git.new(api_key, connection_id) ticketing = BundleUp::Unify::Ticketing.new(api_key, connection_id) client = BundleUp::Client.new(api_key) unify = client.unify(connection_id) diff --git a/lib/bundleup/unify/chat.rb b/lib/bundleup/unify/chat.rb index b913ae0..be8c748 100644 --- a/lib/bundleup/unify/chat.rb +++ b/lib/bundleup/unify/chat.rb @@ -34,9 +34,7 @@ def message(channel_id, text) response = connection.post("chat/channels/#{encoded_channel_id}/message", { text: text }.to_json) - unless response.success? - raise "Failed to post chat/channels/#{encoded_channel_id}/message: #{response.status}" - end + raise "Failed to post chat/channels/#{encoded_channel_id}/message: #{response.status}" unless response.success? response.body end