flipper-notifications 0.1.1 → 0.1.3

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: fac8c375a1f9e69c790e85c4bdb7d6baf53327e6fcd3db9cbafb69a69bc235ed
4
- data.tar.gz: ae854c74b8a3e62e1c23701566fabbc3fef1d81e49be3d377e16855e312022a2
3
+ metadata.gz: 9db443638a0bb326a2745056bb60049ba4b5cc0b50f7ea09d7cc52ed78530f8b
4
+ data.tar.gz: 497ccf40f17452ad964b1cca63e511d01357548ea754bd5c3b1fc750efc91445
5
5
  SHA512:
6
- metadata.gz: 4a565d1fb16d6c66c3a5900e4e278088bbefc0c05639398928d87539eb60571e9bcc09c761fd0a6624785f8b5f9a19db73097a73696eff9a928d7da3eee827d2
7
- data.tar.gz: 54bc9009ecf98dcdddd8b6c830b130041aee4a93f1dcb41178f8c6910672d8b05b3fe392eaa6c0ead2ecf5167a739abccedcc90012f333348b2f9b31d6150bcb
6
+ metadata.gz: 1e654897ad9fb19bf484dba8fade646d7bdd70cb6e43b9337169777115a198ff9ff17e683ada6738cdaad3642f89b9adbbbe74a4047fcc5cdea8b1635b3fdb33
7
+ data.tar.gz: a7e279442bbdf7982ee7169e49f61311b99c395908b18b01762659b9747a8c24ef222d56d04e270ef656b02d2afb16bb2be6c1e80d8206249c349d9e607f4796
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- flipper-notifications (0.1.1)
4
+ flipper-notifications (0.1.3)
5
5
  activesupport (~> 7.0)
6
6
  flipper (~> 0.24)
7
7
  httparty (~> 0.17)
@@ -29,13 +29,13 @@ GEM
29
29
  reline (>= 0.3.1)
30
30
  diff-lcs (1.5.0)
31
31
  docile (1.4.0)
32
- flipper (0.26.0)
32
+ flipper (0.28.3)
33
33
  concurrent-ruby (< 2)
34
34
  globalid (1.0.0)
35
35
  activesupport (>= 5.0)
36
36
  hashdiff (1.0.1)
37
- httparty (0.20.0)
38
- mime-types (~> 3.0)
37
+ httparty (0.21.0)
38
+ mini_mime (>= 1.0.0)
39
39
  multi_xml (>= 0.5.2)
40
40
  i18n (1.12.0)
41
41
  concurrent-ruby (~> 1.0)
@@ -43,9 +43,7 @@ GEM
43
43
  irb (1.6.2)
44
44
  reline (>= 0.3.0)
45
45
  json (2.6.3)
46
- mime-types (3.4.1)
47
- mime-types-data (~> 3.2015)
48
- mime-types-data (3.2022.0105)
46
+ mini_mime (1.1.5)
49
47
  minitest (5.16.3)
50
48
  multi_xml (0.6.0)
51
49
  parallel (1.22.1)
data/README.md CHANGED
@@ -48,7 +48,7 @@ Flipper::Notifications.configure do |config|
48
48
  slack_webhook = Flipper::Notifications::Webhooks::Slack.new(url: ENV.fetch("SLACK_WEBHOOK_URL"))
49
49
 
50
50
  config.notifiers = [
51
- Flipper::Notifications::Notifiers::WebhookNotifier.new(webhook: webhook)
51
+ Flipper::Notifications::Notifiers::WebhookNotifier.new(webhook: slack_webhook)
52
52
  ]
53
53
  end
54
54
  ```
@@ -7,13 +7,17 @@ module Flipper
7
7
  module Notifications
8
8
  class WebhookNotificationJob < ActiveJob::Base
9
9
 
10
+ def self.disable_sidekiq_retries
11
+ sidekiq_options(retry: 0) if respond_to?(:sidekiq_options)
12
+ end
13
+
10
14
  # TODO: Pull queue from configuration?
11
15
  # queue_as :low
12
16
 
13
17
  retry_on Webhooks::NetworkError,
14
18
  Webhooks::ServerError,
15
19
  attempts: 3,
16
- wait: :exponentially_longer
20
+ wait: ActiveJob.version < "7.1" ? :exponentially_longer : :polynomially_longer
17
21
 
18
22
  def perform(webhook:, **webhook_args)
19
23
  webhook.notify(**webhook_args)
@@ -17,6 +17,10 @@ module Flipper
17
17
  ]
18
18
  end
19
19
 
20
+ config.after_initialize do
21
+ WebhookNotificationJob.disable_sidekiq_retries
22
+ end
23
+
20
24
  end
21
25
  end
22
26
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Flipper
4
4
  module Notifications
5
- VERSION = "0.1.1"
5
+ VERSION = "0.1.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper-notifications
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Lubrano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-30 00:00:00.000000000 Z
11
+ date: 2024-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport