flipper-notifications 0.1.5 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62456284f907b8c5a8066d851ad95b713c20c73e2c93ba781500f287a05269e9
4
- data.tar.gz: 56f0fb0f98b7598a6f1642113291f7a5aadba58c490eae07ca1c6432f787f2b8
3
+ metadata.gz: 3a8ce126ceed2dd7235c5b72f9807ac44e12af134903a425f3666ab1231c78b6
4
+ data.tar.gz: b49ee4f6ca51f364f668ceb2aacd1ea60c17af0f0e77b8e43dbf28a3f27466e8
5
5
  SHA512:
6
- metadata.gz: 5af9595e93f3278574931c1dff05777af211deb73a150df864d30d27d2c0df84c87914d67043886459160c343e29bacd6251f3f42587dfab96d2ae8f739ec4db
7
- data.tar.gz: af4152928e0a371fa114498ee7f773a4bf29affc283f39a2c1c7bb238d0101a60630d9fbe58da6a132fa99ef6ccc2af714fd2de4cc3660d854a700646b89c9f5
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,7 +16,7 @@ jobs:
14
16
  strategy:
15
17
  matrix:
16
18
  ruby_version:
17
- - 3.1
19
+ - 3.2
18
20
  steps:
19
21
  - uses: actions/checkout@v2
20
22
  - name: Set up Ruby
@@ -25,7 +27,7 @@ jobs:
25
27
  run: ruby -v
26
28
  - name: Install dependencies
27
29
  working-directory: spec/rails/defaults
28
- run: bundle install
30
+ run: bundle install && bundle exec appraisal install
29
31
  - name: Run tests
30
32
  working-directory: spec/rails/defaults
31
- run: bin/rails test
33
+ run: bundle exec appraisal rails test
@@ -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/.gitignore CHANGED
@@ -12,3 +12,5 @@
12
12
 
13
13
  # rspec failure tracking
14
14
  .rspec_status
15
+
16
+ spec/rails/defaults/gemfiles/*.lock
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.2
1
+ 3.2.2
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- flipper-notifications (0.1.5)
5
- activesupport (~> 7.0)
4
+ flipper-notifications (0.1.7)
5
+ activesupport (>= 7, < 8.1)
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.0)
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.21.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.6.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)
@@ -101,7 +105,7 @@ PLATFORMS
101
105
  arm64-darwin-23
102
106
 
103
107
  DEPENDENCIES
104
- activejob (~> 7.0)
108
+ activejob (>= 7, < 8.1)
105
109
  bundler
106
110
  bundler-gem_version_tasks
107
111
  debug
data/README.md CHANGED
@@ -122,6 +122,16 @@ interactive prompt that will allow you to experiment.
122
122
 
123
123
  To install this gem onto your local machine, run `bundle exec rake install`.
124
124
 
125
+ This gem tests against several versions of Rails using the [Appraisal gem](https://github.com/thoughtbot/appraisal).
126
+ In order to run those tests locally you can do the following:
127
+
128
+ ```
129
+ cd spec/rails/defaults
130
+ bundle install
131
+ bundle exec appraisal install
132
+ bundle exec appraisal rails test
133
+ ```
134
+
125
135
  ## Releasing
126
136
 
127
137
  After merging in the new functionality to the main branch, you can run the following
@@ -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.0"
31
+ spec.add_runtime_dependency "activesupport", ">= 7", "< 8.1"
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.0"
44
+ spec.add_development_dependency "activejob", ">= 7", "< 8.1"
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)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Flipper
4
4
  module Notifications
5
- VERSION = "0.1.5"
5
+ VERSION = "0.1.7"
6
6
  end
7
7
  end
@@ -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,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flipper-notifications
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
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: 2024-11-05 00:00:00.000000000 Z
11
+ date: 2025-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '7'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '7.0'
22
+ version: '8.1'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '7'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '7.0'
32
+ version: '8.1'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: flipper
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -174,16 +180,22 @@ dependencies:
174
180
  name: activejob
175
181
  requirement: !ruby/object:Gem::Requirement
176
182
  requirements:
177
- - - "~>"
183
+ - - ">="
184
+ - !ruby/object:Gem::Version
185
+ version: '7'
186
+ - - "<"
178
187
  - !ruby/object:Gem::Version
179
- version: '7.0'
188
+ version: '8.1'
180
189
  type: :development
181
190
  prerelease: false
182
191
  version_requirements: !ruby/object:Gem::Requirement
183
192
  requirements:
184
- - - "~>"
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '7'
196
+ - - "<"
185
197
  - !ruby/object:Gem::Version
186
- version: '7.0'
198
+ version: '8.1'
187
199
  description:
188
200
  email:
189
201
  - jlubrano@wrapbook.com
@@ -244,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
256
  - !ruby/object:Gem::Version
245
257
  version: '0'
246
258
  requirements: []
247
- rubygems_version: 3.3.7
259
+ rubygems_version: 3.5.9
248
260
  signing_key:
249
261
  specification_version: 4
250
262
  summary: Rails-compatible Slack notifications for Flipper feature flags