gruf 2.20.1 → 2.21.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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/gruf.gemspec +5 -1
- data/lib/gruf/autoloaders.rb +4 -4
- data/lib/gruf/controllers/base.rb +2 -2
- data/lib/gruf/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b50741eb3c556637beb4f7561de27d922e69ef71e7730e956651efe397fbb4cc
|
4
|
+
data.tar.gz: a2628665295d095507f7043ac996ae5aa054d3f12b94e40e27bb235ef4f8506e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73a86e76db1a1287adb45eb1b5b05d7be83a79d8c26ca43618814f3e6641fd5bdc42f396e5f6721e831573bc0c4bc4784912cab5db3960dd0dcde7cc09b356ca
|
7
|
+
data.tar.gz: 7623b6481b4ad01f57bf1f088bad8af8d5ff44b54edf03b3140a64dd96d6639e2dbcc54e72200828209d926c3976cf8ddb234eea672cfe0b675035407bdf9a66
|
data/CHANGELOG.md
CHANGED
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.
|
20
|
+
gruf currently has active support for gRPC 1.10.x+. gruf is compatible and tested with Ruby 3.0-3.4.
|
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
@@ -32,7 +32,11 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.executables << 'gruf'
|
33
33
|
spec.require_paths = ['lib']
|
34
34
|
|
35
|
-
|
35
|
+
# The range of supported Ruby major versions is intentionally capped to ensure that the latest Ruby major version is
|
36
|
+
# supported by grpc gem before bumping the maximum Ruby major version that this gem officially supports.
|
37
|
+
# grpc gem has a history of lagging behind the latest Ruby version support post-new-year every year.
|
38
|
+
# See: https://github.com/bigcommerce/gruf/pull/221#issuecomment-2573428792
|
39
|
+
spec.required_ruby_version = '>= 3.0', '< 3.5'
|
36
40
|
|
37
41
|
spec.metadata = {
|
38
42
|
'bug_tracker_uri' => 'https://github.com/bigcommerce/gruf/issues',
|
data/lib/gruf/autoloaders.rb
CHANGED
@@ -51,18 +51,18 @@ module Gruf
|
|
51
51
|
#
|
52
52
|
# @return [::Gruf::Controllers::Autoloader]
|
53
53
|
#
|
54
|
-
# rubocop:disable ThreadSafety/
|
54
|
+
# rubocop:disable ThreadSafety/ClassInstanceVariable
|
55
55
|
def controllers(controllers_path: nil)
|
56
56
|
controllers_mutex do
|
57
57
|
@controllers ||= ::Gruf::Controllers::Autoloader.new(path: controllers_path || ::Gruf.controllers_path)
|
58
58
|
end
|
59
59
|
end
|
60
|
-
# rubocop:enable ThreadSafety/
|
60
|
+
# rubocop:enable ThreadSafety/ClassInstanceVariable
|
61
61
|
|
62
62
|
##
|
63
63
|
# Handle mutations to the controllers autoloader in a thread-safe manner
|
64
64
|
#
|
65
|
-
# rubocop:disable ThreadSafety/
|
65
|
+
# rubocop:disable ThreadSafety/ClassInstanceVariable
|
66
66
|
def controllers_mutex(&block)
|
67
67
|
@controllers_mutex ||= begin
|
68
68
|
require 'monitor'
|
@@ -70,7 +70,7 @@ module Gruf
|
|
70
70
|
end
|
71
71
|
@controllers_mutex.synchronize(&block)
|
72
72
|
end
|
73
|
-
# rubocop:enable ThreadSafety/
|
73
|
+
# rubocop:enable ThreadSafety/ClassInstanceVariable
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
@@ -66,9 +66,9 @@ module Gruf
|
|
66
66
|
service_class = service.name.constantize
|
67
67
|
::Gruf.logger.debug "[gruf] Binding #{service_class} to #{name}"
|
68
68
|
::Gruf.services << service_class
|
69
|
-
# rubocop:disable ThreadSafety/
|
69
|
+
# rubocop:disable ThreadSafety/ClassInstanceVariable
|
70
70
|
@bound_service = service_class
|
71
|
-
# rubocop:enable ThreadSafety/
|
71
|
+
# rubocop:enable ThreadSafety/ClassInstanceVariable
|
72
72
|
ServiceBinder.bind!(service: service_class, controller: self)
|
73
73
|
end
|
74
74
|
|
data/lib/gruf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gruf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shaun McCormick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -190,7 +190,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: '3.0'
|
191
191
|
- - "<"
|
192
192
|
- !ruby/object:Gem::Version
|
193
|
-
version: '3.
|
193
|
+
version: '3.5'
|
194
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
195
|
requirements:
|
196
196
|
- - ">="
|