gruf 2.21.1 → 2.22.0

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: 0bd7ab055cde1666c63a704faa4daf2b0f9fcc1c75bb7c356a48b430f370760a
4
- data.tar.gz: 0d8a0f0568a8d0c69d46b4712ea58145067389f429e4824bc76e16552572a7c8
3
+ metadata.gz: 7eebb37750be566b321a569b40e2d237d79df969e9eccdddd17dd6bd16228e05
4
+ data.tar.gz: a813a9b6f3ab760074f5a849a3cd40bb6d5055b23689b36b66d86f2a2181d2b7
5
5
  SHA512:
6
- metadata.gz: bdc8a4fd0cdba2adbd0b68a98df59cd14ac0739d1d7c3fb75db8f14e88a6cd5cde7401394a44d8f00de8cf777bbced1afdb6856eaab25cea400632029bdbdc17
7
- data.tar.gz: afe884659c424ec25b67cdf65470e7aa104b83357df403632101d0cc1d79f1fc97bb748d7db8b730a3dfbb6b77f87b33199c31f991c1e04aa84c3998556b1646
6
+ metadata.gz: 7a912b5bed1d8bd19168543b129e5ea3e01e0574113f2110651ff20fcacd160e3cebfabd1507a9bd94dfc8b63f8386deefd70af9ae397a77bfb376f8e2f58150
7
+ data.tar.gz: 73a407c21e577f9a480be54a9dbed1394f0b9ece77e355a6fcbb3fea2048537e69caad31000d84aed8cbca2672b12e4dd022f585ed09285f9a103e85af439e7d
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@ Changelog for the gruf gem. This includes internal history before the gem was ma
2
2
 
3
3
  ### Pending release
4
4
 
5
+ ### 2.22.0
6
+
7
+ * Add support for Ruby 4.x
8
+
9
+ ### 2.21.2
10
+
11
+ * [#225] Only replace `.service` as a suffix in `service_key`
12
+ * [#220] Fix runtime warnings in Ruby 3.4+
13
+ * [#217] Fix clear_active_connections! with no argument deprecation warning
14
+
5
15
  ### 2.21.1
6
16
 
7
17
  * [#230] Add fix for load order issues with reloader in some non-Rails environments
@@ -16,8 +26,8 @@ Changelog for the gruf gem. This includes internal history before the gem was ma
16
26
 
17
27
  ### 2.20.0
18
28
 
19
- * [#190] Remove unsued `e2mmap` and `thwait` gems from `runtime_dependency`.
20
- * [#194] Add interceptor to reload Rails app code accross requests
29
+ * [#190] Remove unused `e2mmap` and `thwait` gems from `runtime_dependency`.
30
+ * [#194] Add interceptor to reload Rails app code across requests
21
31
  * [#209] Removes manual `establish_connection` and active connection check for each request from `Gruf::Interceptors::ActiveRecord::ConnectionReset`.
22
32
 
23
33
  ### 2.19.0
data/README.md CHANGED
@@ -17,7 +17,7 @@ up fast and efficiently at scale. Some of its features include:
17
17
  still preserving gRPC BadStatus codes
18
18
  * Server and client execution timings in responses
19
19
 
20
- gruf currently has active support for gRPC 1.10.x+. gruf is compatible and tested with Ruby 3.0-3.4.
20
+ gruf currently has active support for gRPC 1.10.x+. gruf is compatible and tested with Ruby 3.x-4.0.
21
21
  gruf is also not [Rails](https://github.com/rails/rails)-specific, and can be used in any Ruby framework
22
22
  (such as [Grape](https://github.com/ruby-grape/grape) or [dry-rb](https://dry-rb.org/), for instance).
23
23
 
data/gruf.gemspec CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
36
36
  # supported by grpc gem before bumping the maximum Ruby major version that this gem officially supports.
37
37
  # grpc gem has a history of lagging behind the latest Ruby version support post-new-year every year.
38
38
  # See: https://github.com/bigcommerce/gruf/pull/221#issuecomment-2573428792
39
- spec.required_ruby_version = '>= 3.0', '< 3.5'
39
+ spec.required_ruby_version = '>= 3.0', '< 5.0'
40
40
 
41
41
  spec.metadata = {
42
42
  'bug_tracker_uri' => 'https://github.com/bigcommerce/gruf/issues',
@@ -87,7 +87,7 @@ module Gruf
87
87
  # @return [String] The mapped service key
88
88
  #
89
89
  def service_key
90
- @service.name.to_s.underscore.tr('/', '.').gsub('.service', '')
90
+ @service.name.to_s.underscore.tr('/', '.').delete_suffix('.service')
91
91
  end
92
92
 
93
93
  ##
@@ -29,7 +29,11 @@ module Gruf
29
29
  def call
30
30
  yield
31
31
  ensure
32
- target_classes.each { |klass| klass.connection_handler.clear_active_connections! } if enabled?
32
+ if enabled?
33
+ target_classes.each do |klass|
34
+ klass.connection_handler.clear_active_connections!(::ActiveRecord::Base.current_role)
35
+ end
36
+ end
33
37
  end
34
38
 
35
39
  private
data/lib/gruf/version.rb CHANGED
@@ -16,5 +16,5 @@
16
16
  # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17
17
  #
18
18
  module Gruf
19
- VERSION = '2.21.1'
19
+ VERSION = '2.22.0'
20
20
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gruf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.21.1
4
+ version: 2.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shaun McCormick
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-06-25 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activesupport
@@ -179,7 +178,6 @@ metadata:
179
178
  rubygems_mfa_required: 'true'
180
179
  source_code_uri: https://github.com/bigcommerce/gruf
181
180
  wiki_uri: https://github.com/bigcommerce/gruf/wiki
182
- post_install_message:
183
181
  rdoc_options: []
184
182
  require_paths:
185
183
  - lib
@@ -190,15 +188,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
190
188
  version: '3.0'
191
189
  - - "<"
192
190
  - !ruby/object:Gem::Version
193
- version: '3.5'
191
+ version: '5.0'
194
192
  required_rubygems_version: !ruby/object:Gem::Requirement
195
193
  requirements:
196
194
  - - ">="
197
195
  - !ruby/object:Gem::Version
198
196
  version: '0'
199
197
  requirements: []
200
- rubygems_version: 3.5.22
201
- signing_key:
198
+ rubygems_version: 3.6.7
202
199
  specification_version: 4
203
200
  summary: gRPC Ruby Framework
204
201
  test_files: []