flipper-notifications 0.1.6 → 0.1.7
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 +4 -4
- data/.github/workflows/rails-tests.yml +2 -0
- data/.github/workflows/ruby-tests.yml +5 -3
- data/Gemfile.lock +8 -4
- data/lib/flipper/notifications/jobs/webhook_notification_job.rb +1 -1
- data/lib/flipper/notifications/version.rb +1 -1
- data/lib/flipper/notifications.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a8ce126ceed2dd7235c5b72f9807ac44e12af134903a425f3666ab1231c78b6
|
4
|
+
data.tar.gz: b49ee4f6ca51f364f668ceb2aacd1ea60c17af0f0e77b8e43dbf28a3f27466e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd30cd7340992af0e8a17af0af7bc0ad20e3fe82de8ce11831bf62953c293d85eee5232ee1c1a48e79449745c2d08050861f277b9d236299e81010a08f93bc8e
|
7
|
+
data.tar.gz: 57cec50317d8453564be41513dc91ab11088f07797e3dc817990cd076b13b50ff1784a8e6fdde7d7303043c7ee7ab77dd13e24fe4d4da794ae7622bc10893e6d
|
@@ -7,6 +7,8 @@ on:
|
|
7
7
|
pull_request:
|
8
8
|
branches:
|
9
9
|
- '*'
|
10
|
+
schedule:
|
11
|
+
- cron: "0 6 * * *" # 6 A.M.
|
10
12
|
|
11
13
|
jobs:
|
12
14
|
test:
|
@@ -14,9 +16,9 @@ jobs:
|
|
14
16
|
strategy:
|
15
17
|
matrix:
|
16
18
|
ruby_version:
|
17
|
-
- 3.0
|
18
|
-
- 3.1
|
19
|
-
- 3.2
|
19
|
+
- '3.0'
|
20
|
+
- '3.1'
|
21
|
+
- '3.2'
|
20
22
|
steps:
|
21
23
|
- uses: actions/checkout@v2
|
22
24
|
- name: Set up Ruby
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
flipper-notifications (0.1.
|
4
|
+
flipper-notifications (0.1.7)
|
5
5
|
activesupport (>= 7, < 8.1)
|
6
6
|
flipper (>= 0.24, < 2.0)
|
7
7
|
httparty (~> 0.17)
|
@@ -20,21 +20,24 @@ GEM
|
|
20
20
|
addressable (2.8.1)
|
21
21
|
public_suffix (>= 2.0.2, < 6.0)
|
22
22
|
ast (2.4.2)
|
23
|
+
bigdecimal (3.1.9)
|
23
24
|
bundler-gem_version_tasks (0.2.1)
|
24
25
|
concurrent-ruby (1.2.3)
|
25
26
|
crack (0.4.5)
|
26
27
|
rexml
|
28
|
+
csv (3.3.2)
|
27
29
|
debug (1.7.1)
|
28
30
|
irb (>= 1.5.0)
|
29
31
|
reline (>= 0.3.1)
|
30
32
|
diff-lcs (1.5.0)
|
31
33
|
docile (1.4.0)
|
32
|
-
flipper (1.3.
|
34
|
+
flipper (1.3.2)
|
33
35
|
concurrent-ruby (< 2)
|
34
36
|
globalid (1.0.0)
|
35
37
|
activesupport (>= 5.0)
|
36
38
|
hashdiff (1.0.1)
|
37
|
-
httparty (0.
|
39
|
+
httparty (0.22.0)
|
40
|
+
csv
|
38
41
|
mini_mime (>= 1.0.0)
|
39
42
|
multi_xml (>= 0.5.2)
|
40
43
|
i18n (1.14.4)
|
@@ -45,7 +48,8 @@ GEM
|
|
45
48
|
json (2.6.3)
|
46
49
|
mini_mime (1.1.5)
|
47
50
|
minitest (5.22.3)
|
48
|
-
multi_xml (0.
|
51
|
+
multi_xml (0.7.1)
|
52
|
+
bigdecimal (~> 3.1)
|
49
53
|
parallel (1.22.1)
|
50
54
|
parser (3.1.3.0)
|
51
55
|
ast (~> 2.4.1)
|
@@ -17,7 +17,7 @@ module Flipper
|
|
17
17
|
retry_on Webhooks::NetworkError,
|
18
18
|
Webhooks::ServerError,
|
19
19
|
attempts: 3,
|
20
|
-
wait: ActiveJob.version < "7.1" ? :exponentially_longer : :polynomially_longer
|
20
|
+
wait: ActiveJob.version < Gem::Version.new("7.1") ? :exponentially_longer : :polynomially_longer
|
21
21
|
|
22
22
|
def perform(webhook:, **webhook_args)
|
23
23
|
webhook.notify(**webhook_args)
|
@@ -38,6 +38,15 @@ module Flipper
|
|
38
38
|
def unsubscribe!
|
39
39
|
ActiveSupport::Notifications.unsubscribe(@subscriber)
|
40
40
|
end
|
41
|
+
|
42
|
+
# WARNING: this implementation is not thread-safe
|
43
|
+
def disabled
|
44
|
+
previous_value = configuration.enabled
|
45
|
+
configuration.enabled = false
|
46
|
+
yield
|
47
|
+
ensure
|
48
|
+
configuration.enabled = previous_value
|
49
|
+
end
|
41
50
|
end
|
42
51
|
end
|
43
52
|
|
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.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Lubrano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|