Skip to content
This repository has been archived by the owner on Mar 21, 2020. It is now read-only.

Commit

Permalink
Remove Slack webhooks (#282)
Browse files Browse the repository at this point in the history
* Remove Slack webhooks

* 👮
  • Loading branch information
coreyja authored Mar 10, 2019
1 parent 8cc6f88 commit 178836a
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 85 deletions.
53 changes: 0 additions & 53 deletions app/models/easypost_tracker_slack_poster.rb

This file was deleted.

9 changes: 1 addition & 8 deletions app/models/package_tracker_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ def initialize(package, tracker)
def perform!
package.transaction do
package.update! tracker.to_package_attrs
if send_notification?
send_slack_update!
send_push_notifications!
end
send_push_notifications! if send_notification?
process_tracking_updates!
end
end
Expand All @@ -29,10 +26,6 @@ def process_tracking_updates!
end
end

def send_slack_update!
EasypostTrackerSlackPoster.new(package, tracker).post
end

def send_push_notifications!
PackageUpdatePushNotificationJob.perform_later(package)
end
Expand Down
2 changes: 0 additions & 2 deletions config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
default: &default
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
easypost_api_key: <%= ENV["EASYPOST_API_KEY"] %>
slack_url: <%= ENV['SLACK_POST_URL'] %>
vapid_public_key: <%= ENV['VAPID_PUBLIC_KEY'] %>
vapid_private_key: <%= ENV['VAPID_PRIVATE_KEY'] %>

Expand All @@ -25,7 +24,6 @@ test:
<<: *default
secret_key_base: 45b0d2c5517864d753ad9a90f52680fc7a85eff9a854d5e6e1a86a8377628c820bde32ffc0ff404b85378860b994b2ce3819429ed98fbe9023b725b6e67b7442
easypost_api_key: TEST_EASYPOST_API_KEY
slack_url: "https://hooks.slack.com/services/random/other_rando/more_chars"

# Do not keep production secrets in the repository,
# instead read values from the environment.
Expand Down
1 change: 0 additions & 1 deletion config/webvalve.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
#
# WebValve.whitelist_url 'https://example.com'
WebValve.register FakeEasyPost, url: 'https://api.easypost.com'
WebValve.register FakeSlackWebhooks, url: 'https://hooks.slack.com'

WebValve.whitelist_url 'https://fcm.googleapis.com'
21 changes: 0 additions & 21 deletions webvalve/fake_slack_webhooks.rb

This file was deleted.

0 comments on commit 178836a

Please sign in to comment.