flipper-notifications 0.1.11 → 0.2.1
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 +1 -1
- data/.github/workflows/ruby-tests.yml +3 -2
- data/.github/workflows/style-check.yml +0 -2
- data/.ruby-version +1 -1
- data/Gemfile.lock +54 -28
- data/README.md +2 -1
- data/flipper-notifications.gemspec +2 -0
- data/lib/flipper/notifications/feature_event.rb +1 -1
- data/lib/flipper/notifications/features_subscriber.rb +2 -2
- data/lib/flipper/notifications/version.rb +1 -1
- data/lib/flipper/notifications.rb +8 -5
- metadata +4 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d71f8cd3a306fbef08e6cd9eb35ca8a41903f52876898d1fe065d7e0cda1a713
|
|
4
|
+
data.tar.gz: 61f15eba21ab89df1caac305664ccd0508bea783f235e1c2d195bad30b7b330c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1ce720f62f8cf42c9fade0adb00e582fe414877b9ae6f67bf1dde91f0bf70e3416401868552e44582b0864979b92eada019e446fc2ed387c2681f3c433f4142b
|
|
7
|
+
data.tar.gz: 7df8b20384d70b8ef4b34bdf21afaba0fd6b939014c112e6612b2b1f1daa7a51cba977532e15ca6e7875c77c115fe51c5e9fe1fb272bd70fafe20d752ed6e9ae
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.4.13
|
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.2.1)
|
|
5
5
|
activesupport (>= 7, < 8.2)
|
|
6
6
|
flipper (>= 0.24, < 2.0)
|
|
7
7
|
httparty (~> 0.17)
|
|
@@ -9,21 +9,31 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
activejob (7.0.
|
|
13
|
-
activesupport (= 7.0.
|
|
12
|
+
activejob (7.0.10)
|
|
13
|
+
activesupport (= 7.0.10)
|
|
14
14
|
globalid (>= 0.3.6)
|
|
15
|
-
activesupport (7.0.
|
|
15
|
+
activesupport (7.0.10)
|
|
16
|
+
base64
|
|
17
|
+
benchmark (>= 0.3)
|
|
18
|
+
bigdecimal
|
|
16
19
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
20
|
+
drb
|
|
17
21
|
i18n (>= 1.6, < 2)
|
|
22
|
+
logger (>= 1.4.2)
|
|
18
23
|
minitest (>= 5.1)
|
|
24
|
+
mutex_m
|
|
25
|
+
securerandom (>= 0.3)
|
|
19
26
|
tzinfo (~> 2.0)
|
|
20
|
-
addressable (2.
|
|
21
|
-
public_suffix (>= 2.0.2, <
|
|
22
|
-
ast (2.4.
|
|
27
|
+
addressable (2.9.2)
|
|
28
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
29
|
+
ast (2.4.3)
|
|
30
|
+
base64 (0.3.0)
|
|
31
|
+
benchmark (0.5.0)
|
|
23
32
|
bigdecimal (3.1.9)
|
|
24
33
|
bundler-gem_version_tasks (0.2.1)
|
|
25
34
|
concurrent-ruby (1.2.3)
|
|
26
|
-
crack (0.
|
|
35
|
+
crack (1.0.1)
|
|
36
|
+
bigdecimal
|
|
27
37
|
rexml
|
|
28
38
|
csv (3.3.2)
|
|
29
39
|
debug (1.7.1)
|
|
@@ -31,11 +41,12 @@ GEM
|
|
|
31
41
|
reline (>= 0.3.1)
|
|
32
42
|
diff-lcs (1.5.0)
|
|
33
43
|
docile (1.4.0)
|
|
44
|
+
drb (2.2.3)
|
|
34
45
|
flipper (1.3.2)
|
|
35
46
|
concurrent-ruby (< 2)
|
|
36
47
|
globalid (1.0.0)
|
|
37
48
|
activesupport (>= 5.0)
|
|
38
|
-
hashdiff (1.
|
|
49
|
+
hashdiff (1.2.2)
|
|
39
50
|
httparty (0.22.0)
|
|
40
51
|
csv
|
|
41
52
|
mini_mime (>= 1.0.0)
|
|
@@ -45,21 +56,29 @@ GEM
|
|
|
45
56
|
io-console (0.6.0)
|
|
46
57
|
irb (1.6.2)
|
|
47
58
|
reline (>= 0.3.0)
|
|
48
|
-
json (
|
|
59
|
+
json (3.1.0)
|
|
60
|
+
language_server-protocol (3.17.0.6)
|
|
61
|
+
lint_roller (1.1.0)
|
|
62
|
+
logger (1.7.0)
|
|
49
63
|
mini_mime (1.1.5)
|
|
50
64
|
minitest (5.22.3)
|
|
51
65
|
multi_xml (0.7.1)
|
|
52
66
|
bigdecimal (~> 3.1)
|
|
53
|
-
|
|
54
|
-
|
|
67
|
+
mutex_m (0.3.0)
|
|
68
|
+
parallel (2.3.0)
|
|
69
|
+
parser (3.3.14.0)
|
|
55
70
|
ast (~> 2.4.1)
|
|
56
|
-
|
|
71
|
+
racc
|
|
72
|
+
prism (2.1.0-arm64-darwin)
|
|
73
|
+
prism (2.1.0-x86_64-linux-gnu)
|
|
74
|
+
public_suffix (7.0.5)
|
|
75
|
+
racc (1.8.1)
|
|
57
76
|
rainbow (3.1.1)
|
|
58
77
|
rake (13.0.6)
|
|
59
|
-
regexp_parser (2.
|
|
78
|
+
regexp_parser (2.13.4)
|
|
60
79
|
reline (0.3.2)
|
|
61
80
|
io-console (~> 0.5)
|
|
62
|
-
rexml (3.
|
|
81
|
+
rexml (3.4.4)
|
|
63
82
|
rspec (3.12.0)
|
|
64
83
|
rspec-core (~> 3.12.0)
|
|
65
84
|
rspec-expectations (~> 3.12.0)
|
|
@@ -73,19 +92,24 @@ GEM
|
|
|
73
92
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
74
93
|
rspec-support (~> 3.12.0)
|
|
75
94
|
rspec-support (3.12.0)
|
|
76
|
-
rubocop (1.
|
|
77
|
-
json (
|
|
78
|
-
|
|
79
|
-
|
|
95
|
+
rubocop (1.92.3)
|
|
96
|
+
json (>= 2.3)
|
|
97
|
+
language_server-protocol (~> 3.17.0.2)
|
|
98
|
+
lint_roller (~> 1.1.0)
|
|
99
|
+
parallel (>= 1.10)
|
|
100
|
+
parser (>= 3.3.0.2)
|
|
80
101
|
rainbow (>= 2.2.2, < 4.0)
|
|
81
|
-
regexp_parser (>=
|
|
82
|
-
|
|
83
|
-
rubocop-ast (>= 1.23.0, < 2.0)
|
|
102
|
+
regexp_parser (>= 2.11.3, < 3.0)
|
|
103
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
84
104
|
ruby-progressbar (~> 1.7)
|
|
85
|
-
unicode-display_width (>=
|
|
86
|
-
rubocop-ast (1.
|
|
87
|
-
|
|
88
|
-
|
|
105
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
106
|
+
rubocop-ast (1.53.0)
|
|
107
|
+
ast (~> 2.4)
|
|
108
|
+
parser (>= 3.3.7.2)
|
|
109
|
+
prism (>= 1.7)
|
|
110
|
+
racc
|
|
111
|
+
ruby-progressbar (1.13.0)
|
|
112
|
+
securerandom (0.4.1)
|
|
89
113
|
simplecov (0.21.2)
|
|
90
114
|
docile (~> 1.1)
|
|
91
115
|
simplecov-html (~> 0.11)
|
|
@@ -94,8 +118,10 @@ GEM
|
|
|
94
118
|
simplecov_json_formatter (0.1.4)
|
|
95
119
|
tzinfo (2.0.6)
|
|
96
120
|
concurrent-ruby (~> 1.0)
|
|
97
|
-
unicode-display_width (
|
|
98
|
-
|
|
121
|
+
unicode-display_width (3.3.0)
|
|
122
|
+
unicode-emoji (~> 4.3)
|
|
123
|
+
unicode-emoji (4.3.0)
|
|
124
|
+
webmock (3.35.0)
|
|
99
125
|
addressable (>= 2.8.0)
|
|
100
126
|
crack (>= 0.3.2)
|
|
101
127
|
hashdiff (>= 0.4.0, < 2.0.0)
|
data/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Or install it yourself as:
|
|
|
23
23
|
|
|
24
24
|
## Dependencies
|
|
25
25
|
|
|
26
|
-
* Ruby 3
|
|
26
|
+
* Ruby 3.3+
|
|
27
27
|
* ActiveSupport 7+
|
|
28
28
|
|
|
29
29
|
This gem is designed to work within a Rails app. At the very least, you will
|
|
@@ -190,6 +190,7 @@ git checkout main
|
|
|
190
190
|
git pull
|
|
191
191
|
bundle exec rake version:bump:<major, minor, or patch>
|
|
192
192
|
bundle exec rubocop -a
|
|
193
|
+
bundle install --gemfile=spec/rails/defaults/Gemfile
|
|
193
194
|
git commit -a --amend --no-edit
|
|
194
195
|
bundle exec rake release
|
|
195
196
|
```
|
|
@@ -14,6 +14,8 @@ Gem::Specification.new do |spec|
|
|
|
14
14
|
spec.homepage = "https://github.com/wrapbook/flipper-notifications"
|
|
15
15
|
spec.license = "MIT"
|
|
16
16
|
|
|
17
|
+
spec.required_ruby_version = ">= 3.3"
|
|
18
|
+
|
|
17
19
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
18
20
|
spec.metadata["source_code_uri"] = spec.homepage
|
|
19
21
|
spec.metadata["changelog_uri"] = "#{spec.homepage}/releases"
|
|
@@ -27,7 +27,7 @@ module Flipper
|
|
|
27
27
|
attr_reader :feature, :operation
|
|
28
28
|
|
|
29
29
|
def summary_markdown
|
|
30
|
-
msg =
|
|
30
|
+
msg = "Feature *#{feature.name}* was #{action_taken}."
|
|
31
31
|
|
|
32
32
|
if include_state?
|
|
33
33
|
msg << " The feature is now *fully enabled.*" if feature.on?
|
|
@@ -7,10 +7,10 @@ module Flipper
|
|
|
7
7
|
module Notifications
|
|
8
8
|
class FeaturesSubscriber
|
|
9
9
|
|
|
10
|
-
def call(*
|
|
10
|
+
def call(*)
|
|
11
11
|
return unless enabled?
|
|
12
12
|
|
|
13
|
-
event = FeatureEvent.from_active_support(event: ActiveSupport::Notifications::Event.new(*
|
|
13
|
+
event = FeatureEvent.from_active_support(event: ActiveSupport::Notifications::Event.new(*))
|
|
14
14
|
Flipper::Notifications.notify(event: event) if event.noteworthy?
|
|
15
15
|
end
|
|
16
16
|
|
|
@@ -41,11 +41,14 @@ module Flipper
|
|
|
41
41
|
|
|
42
42
|
# WARNING: this implementation is not thread-safe
|
|
43
43
|
def disabled
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
return yield unless configuration.enabled?
|
|
45
|
+
|
|
46
|
+
begin
|
|
47
|
+
configuration.enabled = false
|
|
48
|
+
yield
|
|
49
|
+
ensure
|
|
50
|
+
configuration.enabled = true
|
|
51
|
+
end
|
|
49
52
|
end
|
|
50
53
|
end
|
|
51
54
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
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.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joel Lubrano
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activesupport
|
|
@@ -196,7 +195,6 @@ dependencies:
|
|
|
196
195
|
- - "<"
|
|
197
196
|
- !ruby/object:Gem::Version
|
|
198
197
|
version: '8.2'
|
|
199
|
-
description:
|
|
200
198
|
email:
|
|
201
199
|
- jlubrano@wrapbook.com
|
|
202
200
|
executables: []
|
|
@@ -241,7 +239,6 @@ metadata:
|
|
|
241
239
|
homepage_uri: https://github.com/wrapbook/flipper-notifications
|
|
242
240
|
source_code_uri: https://github.com/wrapbook/flipper-notifications
|
|
243
241
|
changelog_uri: https://github.com/wrapbook/flipper-notifications/releases
|
|
244
|
-
post_install_message:
|
|
245
242
|
rdoc_options: []
|
|
246
243
|
require_paths:
|
|
247
244
|
- lib
|
|
@@ -249,15 +246,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
249
246
|
requirements:
|
|
250
247
|
- - ">="
|
|
251
248
|
- !ruby/object:Gem::Version
|
|
252
|
-
version: '
|
|
249
|
+
version: '3.3'
|
|
253
250
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
251
|
requirements:
|
|
255
252
|
- - ">="
|
|
256
253
|
- !ruby/object:Gem::Version
|
|
257
254
|
version: '0'
|
|
258
255
|
requirements: []
|
|
259
|
-
rubygems_version: 3.
|
|
260
|
-
signing_key:
|
|
256
|
+
rubygems_version: 3.6.9
|
|
261
257
|
specification_version: 4
|
|
262
258
|
summary: Rails-compatible Slack notifications for Flipper feature flags
|
|
263
259
|
test_files: []
|