flipper-notifications 0.1.6 → 0.1.8
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 -5
- data/Gemfile.lock +13 -7
- data/README.md +1 -1
- data/flipper-notifications.gemspec +2 -2
- data/lib/flipper/notifications/event_serializer.rb +4 -0
- data/lib/flipper/notifications/jobs/webhook_notification_job.rb +1 -1
- data/lib/flipper/notifications/railtie.rb +4 -2
- data/lib/flipper/notifications/version.rb +1 -1
- data/lib/flipper/notifications/webhooks/serializer.rb +4 -0
- data/lib/flipper/notifications.rb +9 -0
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ff442c70503428b1f63823b188f1abb61827b32bd3b673d7c390435340617629
|
|
4
|
+
data.tar.gz: 8f3565b25fe5c4749d4fc1dc39677e95d6f59cc30beea1af1a3c7e78b82f5c91
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa218d4174f1a466de4769628005e82b0d0bb5451883906b8334ba311b7abc409aee3bea89a2fac6765b524e71d09420d155ae00d9970dd3b7a573aee6859037
|
|
7
|
+
data.tar.gz: 7c92da7a2936914cd47cc4c6a52d7254b1d4b7193dfc7b130f885b7f3d0be5c6d769d1d8a41dba82883ceece127242d997fcc4ead40698d43bb0e4d461513197
|
|
@@ -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,18 +16,16 @@ jobs:
|
|
|
14
16
|
strategy:
|
|
15
17
|
matrix:
|
|
16
18
|
ruby_version:
|
|
17
|
-
- 3.
|
|
18
|
-
- 3.
|
|
19
|
-
- 3.2
|
|
19
|
+
- '3.1'
|
|
20
|
+
- '3.2'
|
|
20
21
|
steps:
|
|
21
22
|
- uses: actions/checkout@v2
|
|
22
23
|
- name: Set up Ruby
|
|
23
24
|
uses: ruby/setup-ruby@v1
|
|
24
25
|
with:
|
|
25
26
|
ruby-version: ${{ matrix.ruby_version }}
|
|
27
|
+
bundler-cache: true
|
|
26
28
|
- name: Ruby version
|
|
27
29
|
run: ruby -v
|
|
28
|
-
- name: Install dependencies
|
|
29
|
-
run: bundle install
|
|
30
30
|
- name: Run tests
|
|
31
31
|
run: bundle exec rspec
|
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
flipper-notifications (0.1.
|
|
5
|
-
activesupport (>= 7, < 8.
|
|
4
|
+
flipper-notifications (0.1.8)
|
|
5
|
+
activesupport (>= 7, < 8.2)
|
|
6
6
|
flipper (>= 0.24, < 2.0)
|
|
7
7
|
httparty (~> 0.17)
|
|
8
8
|
|
|
@@ -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)
|
|
@@ -99,9 +103,11 @@ GEM
|
|
|
99
103
|
PLATFORMS
|
|
100
104
|
arm64-darwin-21
|
|
101
105
|
arm64-darwin-23
|
|
106
|
+
arm64-darwin-24
|
|
107
|
+
x86_64-linux
|
|
102
108
|
|
|
103
109
|
DEPENDENCIES
|
|
104
|
-
activejob (>= 7, < 8.
|
|
110
|
+
activejob (>= 7, < 8.2)
|
|
105
111
|
bundler
|
|
106
112
|
bundler-gem_version_tasks
|
|
107
113
|
debug
|
|
@@ -113,4 +119,4 @@ DEPENDENCIES
|
|
|
113
119
|
webmock
|
|
114
120
|
|
|
115
121
|
BUNDLED WITH
|
|
116
|
-
2.
|
|
122
|
+
2.6.9
|
data/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Or install it yourself as:
|
|
|
24
24
|
## Dependencies
|
|
25
25
|
|
|
26
26
|
* Ruby 3
|
|
27
|
-
* ActiveSupport 7
|
|
27
|
+
* ActiveSupport 7+
|
|
28
28
|
|
|
29
29
|
This gem is designed to work within a Rails app. At the very least, you will
|
|
30
30
|
need `activesupport` since that library drives instrumentation from Flipper
|
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.executables = []
|
|
29
29
|
spec.require_paths = ["lib"]
|
|
30
30
|
|
|
31
|
-
spec.add_runtime_dependency "activesupport", ">= 7", "< 8.
|
|
31
|
+
spec.add_runtime_dependency "activesupport", ">= 7", "< 8.2"
|
|
32
32
|
spec.add_runtime_dependency "flipper", ">= 0.24", "< 2.0"
|
|
33
33
|
spec.add_runtime_dependency "httparty", "~> 0.17"
|
|
34
34
|
|
|
@@ -41,5 +41,5 @@ Gem::Specification.new do |spec|
|
|
|
41
41
|
spec.add_development_dependency "simplecov"
|
|
42
42
|
spec.add_development_dependency "webmock"
|
|
43
43
|
|
|
44
|
-
spec.add_development_dependency "activejob", ">= 7", "< 8.
|
|
44
|
+
spec.add_development_dependency "activejob", ">= 7", "< 8.2"
|
|
45
45
|
end
|
|
@@ -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)
|
|
@@ -10,11 +10,13 @@ module Flipper
|
|
|
10
10
|
|
|
11
11
|
initializer "flipper-notifications.configure_rails_initialization" do
|
|
12
12
|
Flipper::Notifications.subscribe!
|
|
13
|
+
end
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
config.to_prepare do
|
|
16
|
+
ActiveJob::Serializers.add_serializers(
|
|
15
17
|
EventSerializer,
|
|
16
18
|
Webhooks::Serializer
|
|
17
|
-
|
|
19
|
+
)
|
|
18
20
|
end
|
|
19
21
|
|
|
20
22
|
config.after_initialize do
|
|
@@ -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.8
|
|
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-10-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -19,7 +19,7 @@ dependencies:
|
|
|
19
19
|
version: '7'
|
|
20
20
|
- - "<"
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '8.
|
|
22
|
+
version: '8.2'
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -29,7 +29,7 @@ dependencies:
|
|
|
29
29
|
version: '7'
|
|
30
30
|
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '8.
|
|
32
|
+
version: '8.2'
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
|
34
34
|
name: flipper
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -185,7 +185,7 @@ dependencies:
|
|
|
185
185
|
version: '7'
|
|
186
186
|
- - "<"
|
|
187
187
|
- !ruby/object:Gem::Version
|
|
188
|
-
version: '8.
|
|
188
|
+
version: '8.2'
|
|
189
189
|
type: :development
|
|
190
190
|
prerelease: false
|
|
191
191
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -195,7 +195,7 @@ dependencies:
|
|
|
195
195
|
version: '7'
|
|
196
196
|
- - "<"
|
|
197
197
|
- !ruby/object:Gem::Version
|
|
198
|
-
version: '8.
|
|
198
|
+
version: '8.2'
|
|
199
199
|
description:
|
|
200
200
|
email:
|
|
201
201
|
- jlubrano@wrapbook.com
|