gruf 2.5.2 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 161c1f1aeb32e9b80985795573d6c8474719043ced9971e7aa8f711daf46c633
4
- data.tar.gz: 1d320dd2a0973e0889244e4f8fdb949e1b4ef574a1a61af0cbd479881243480d
3
+ metadata.gz: 28c2864213d853958ed8a971e0c713940fff7ffff739a968cfbd179c60e07d4a
4
+ data.tar.gz: 510a33981e2dffb15c9057615c9c818cf5338ee4bd7b99bd44aba095e6f8b9ae
5
5
  SHA512:
6
- metadata.gz: fae96509a53b6e5ed611f1931e3718f2d377b445824de5947d3dd93062a7b07933553c20218297bf66fe83e323192d12fb085acc9adf26963f34377e28f97177
7
- data.tar.gz: d7ab37d15a0d48db8240a028965310f0988e0a3f57c8ccd7701ba129a0dd08d3378de05d9536b5aeb6eb096515fd4dd9491d93632a322c6c4de43bf2d8eec7fd
6
+ metadata.gz: 8471cda11573a443765c8b19a25fd03a4a1f90af0dc827074587bfdc252483d0b1c600ead5725a7e5407c4571eef8de293f169d5ef3de8545f14b5fb456a5629
7
+ data.tar.gz: a207cda25695c69ce3e4c2e824d85c4ba46a868dab93e27b8b671f068b42ace300f6bf565c8a955c8b5f287dbfacb66289387752d3ac9ff201e68745d3568f2b
@@ -2,6 +2,13 @@ Changelog for the gruf gem. This includes internal history before the gem was ma
2
2
 
3
3
  ### Pending release
4
4
 
5
+ ### 2.6.0
6
+
7
+ - Drop Ruby 2.2 support
8
+ - Abstract gruf controller's send to make it usable in filters
9
+ - Adjusts configuration reset into a Railtie for Rails systems to ensure proper OOE
10
+ - Bump rubocop to 0.64, address violations, update activesupport/concurrent-ruby dependencies to have a min version
11
+
5
12
  ### 2.5.2
6
13
 
7
14
  - Log ok/validation responses at DEBUG levels to prevent log stampeding in high-volume environments
@@ -32,13 +32,16 @@ Gem::Specification.new do |spec|
32
32
  spec.executables << 'gruf'
33
33
  spec.require_paths = ['lib']
34
34
 
35
+ spec.required_ruby_version = '~> 2.4'
36
+
35
37
  spec.add_development_dependency 'bundler', '~> 1.11'
36
38
  spec.add_development_dependency 'rake', '~> 10.0'
37
- spec.add_development_dependency 'pry'
39
+ spec.add_development_dependency 'pry', '~> 0.11'
38
40
 
39
41
  spec.add_runtime_dependency 'grpc', '~> 1.10'
40
42
  spec.add_runtime_dependency 'grpc-tools', '~> 1.10'
41
- spec.add_runtime_dependency 'activesupport'
42
- spec.add_runtime_dependency 'concurrent-ruby'
43
+ spec.add_runtime_dependency 'activesupport', '> 4'
44
+
45
+ spec.add_runtime_dependency 'concurrent-ruby', '> 1'
43
46
  spec.add_runtime_dependency 'slop', '~> 4.6'
44
47
  end
@@ -35,6 +35,7 @@ require_relative 'gruf/client'
35
35
  require_relative 'gruf/synchronized_client'
36
36
  require_relative 'gruf/instrumentable_grpc_server'
37
37
  require_relative 'gruf/server'
38
+ require_relative 'gruf/integrations/rails/railtie' if defined?(Rails)
38
39
 
39
40
  ##
40
41
  # Initializes configuration of gruf core module
@@ -38,7 +38,7 @@ module Gruf
38
38
  server.start!
39
39
  rescue StandardError => e
40
40
  msg = "FATAL ERROR: #{e.message} #{e.backtrace.join("\n")}"
41
- logger = Gruf.logger ? Gruf.logger : Logger.new(STDERR)
41
+ logger = Gruf.logger || Logger.new(STDERR)
42
42
  logger.fatal msg
43
43
  end
44
44
 
@@ -68,8 +68,8 @@ module Gruf
68
68
  # Call the client's method with given params
69
69
  #
70
70
  # @param [String|Symbol] request_method The method that is being requested on the service
71
- # @param [Hash] params (Optional) A hash of parameters that will be inserted into the gRPC request message that is required
72
- # for the given above call
71
+ # @param [Hash] params (Optional) A hash of parameters that will be inserted into the gRPC request message that is
72
+ # required for the given above call
73
73
  # @param [Hash] metadata (Optional) A hash of metadata key/values that are transported with the client request
74
74
  # @param [Hash] opts (Optional) A hash of options to send to the gRPC request_response method
75
75
  # @return [Gruf::Response] The response from the server
@@ -82,7 +82,9 @@ module Gruf
82
82
  md = build_metadata(metadata)
83
83
  call_sig = call_signature(request_method)
84
84
 
85
- raise NotImplementedError, "The method #{request_method} has not been implemented in this service." unless call_sig
85
+ unless call_sig
86
+ raise NotImplementedError, "The method #{request_method} has not been implemented in this service."
87
+ end
86
88
 
87
89
  resp, operation = execute(call_sig, req, md, opts, &block)
88
90
 
@@ -31,11 +31,6 @@ module Gruf
31
31
  )
32
32
  @default_class = default_class || Gruf::Client::Errors::Internal
33
33
  @metadata_key = (metadata_key || Gruf.error_metadata_key).to_s
34
- default_serializer = if Gruf.error_serializer
35
- Gruf.error_serializer.is_a?(Class) ? Gruf.error_serializer : Gruf.error_serializer.to_s.constantize
36
- else
37
- Gruf::Serializers::Errors::Json
38
- end
39
34
  @deserializer_class = deserializer_class || default_serializer
40
35
  end
41
36
 
@@ -94,6 +89,15 @@ module Gruf
94
89
  rescue NameError => _
95
90
  @default_class
96
91
  end
92
+
93
+ ##
94
+ # @return [Gruf::Serializers::Errors::Base]
95
+ #
96
+ def default_serializer
97
+ return Gruf::Serializers::Errors::Json unless Gruf.error_serializer
98
+
99
+ Gruf.error_serializer.is_a?(Class) ? Gruf.error_serializer : Gruf.error_serializer.to_s.constantize
100
+ end
97
101
  end
98
102
  end
99
103
  end
@@ -51,13 +51,17 @@ module Gruf
51
51
  }.freeze
52
52
  }.freeze
53
53
 
54
- attr_accessor *VALID_CONFIG_KEYS.keys
54
+ attr_accessor(* VALID_CONFIG_KEYS.keys)
55
55
 
56
56
  ##
57
57
  # Whenever this is extended into a class, setup the defaults
58
58
  #
59
59
  def self.extended(base)
60
- base.reset
60
+ if defined?(Rails)
61
+ Gruf::Integrations::Rails::Railtie.config.before_initialize { base.reset }
62
+ else
63
+ base.reset
64
+ end
61
65
  end
62
66
 
63
67
  ##
@@ -67,6 +67,17 @@ module Gruf
67
67
  ServiceBinder.new(service_class).bind!(self)
68
68
  end
69
69
 
70
+ ##
71
+ # Call a method on this controller.
72
+ # Override this in a subclass to modify the behavior around processing a method
73
+ #
74
+ # @param [Symbol] method_key The name of the gRPC service method being called as a Symbol
75
+ # @param [block] &block The passed block for executing the method
76
+ #
77
+ def process_action(method_key, &block)
78
+ send(method_key, &block)
79
+ end
80
+
70
81
  ##
71
82
  # Call a method on this controller
72
83
  #
@@ -75,7 +86,7 @@ module Gruf
75
86
  #
76
87
  def call(method_key, &block)
77
88
  Interceptors::Context.new(@interceptors).intercept! do
78
- send(method_key, &block)
89
+ process_action(method_key, &block)
79
90
  end
80
91
  rescue GRPC::BadStatus
81
92
  raise # passthrough, to be caught by Gruf::Interceptors::Timer
@@ -58,22 +58,46 @@ module Gruf
58
58
  @service.class_eval do
59
59
  if desc.request_response?
60
60
  define_method(method_key) do |message, active_call|
61
- c = controller.new(method_key: method_key, service: service_ref, message: message, active_call: active_call, rpc_desc: desc)
61
+ c = controller.new(
62
+ method_key: method_key,
63
+ service: service_ref,
64
+ message: message,
65
+ active_call: active_call,
66
+ rpc_desc: desc
67
+ )
62
68
  c.call(method_key)
63
69
  end
64
70
  elsif desc.client_streamer?
65
71
  define_method(method_key) do |active_call|
66
- c = controller.new(method_key: method_key, service: service_ref, message: proc { |&block| active_call.each_remote_read(&block) }, active_call: active_call, rpc_desc: desc)
72
+ c = controller.new(
73
+ method_key: method_key,
74
+ service: service_ref,
75
+ message: proc { |&block| active_call.each_remote_read(&block) },
76
+ active_call: active_call,
77
+ rpc_desc: desc
78
+ )
67
79
  c.call(method_key)
68
80
  end
69
81
  elsif desc.server_streamer?
70
82
  define_method(method_key) do |message, active_call, &block|
71
- c = controller.new(method_key: method_key, service: service_ref, message: message, active_call: active_call, rpc_desc: desc)
83
+ c = controller.new(
84
+ method_key: method_key,
85
+ service: service_ref,
86
+ message: message,
87
+ active_call: active_call,
88
+ rpc_desc: desc
89
+ )
72
90
  c.call(method_key, &block)
73
91
  end
74
92
  else # bidi
75
93
  define_method(method_key) do |messages, active_call, &block|
76
- c = controller.new(method_key: method_key, service: service_ref, message: messages, active_call: active_call, rpc_desc: desc)
94
+ c = controller.new(
95
+ method_key: method_key,
96
+ service: service_ref,
97
+ message: messages,
98
+ active_call: active_call,
99
+ rpc_desc: desc
100
+ )
77
101
  c.call(method_key, &block)
78
102
  end
79
103
  end
@@ -197,7 +197,7 @@ module Gruf
197
197
  # @return [GRPC::BadStatus]
198
198
  #
199
199
  def grpc_error
200
- md = @metadata ? @metadata : {}
200
+ md = @metadata || {}
201
201
  @grpc_error = grpc_class.new(message, **md)
202
202
  end
203
203
 
@@ -37,6 +37,7 @@ module Gruf
37
37
  #
38
38
  def notify(event)
39
39
  return unless @event_listener_proc && @event_listener_proc.respond_to?(:call)
40
+
40
41
  @event_listener_proc.call(event)
41
42
  end
42
43
 
@@ -0,0 +1,8 @@
1
+ module Gruf
2
+ module Integrations
3
+ module Rails
4
+ class Railtie < ::Rails::Railtie
5
+ end
6
+ end
7
+ end
8
+ end
@@ -25,9 +25,8 @@ module Gruf
25
25
  # connection pool, we need to ensure that this is done to properly
26
26
  #
27
27
  def call
28
- if enabled? && !::ActiveRecord::Base.connection.active?
29
- ::ActiveRecord::Base.establish_connection
30
- end
28
+ ::ActiveRecord::Base.establish_connection if enabled? && !::ActiveRecord::Base.connection.active?
29
+
31
30
  yield
32
31
  ensure
33
32
  ::ActiveRecord::Base.clear_active_connections! if enabled?
@@ -22,7 +22,9 @@ module Gruf
22
22
  # Handles basic authentication for gRPC requests
23
23
  #
24
24
  class Basic < Gruf::Interceptors::ServerInterceptor
25
-
25
+ ##
26
+ # Validate authentication
27
+ #
26
28
  def call
27
29
  fail!(:unauthenticated, :unauthenticated) unless bypass? || valid?
28
30
  yield
@@ -63,7 +65,11 @@ module Gruf
63
65
  # @return [String] The decoded request credentials
64
66
  #
65
67
  def request_credentials
66
- credentials = request.active_call.respond_to?(:metadata) ? request.active_call.metadata['authorization'].to_s : ''
68
+ credentials = if request.active_call.respond_to?(:metadata)
69
+ request.active_call.metadata['authorization'].to_s
70
+ else
71
+ ''
72
+ end
67
73
  Base64.decode64(credentials.to_s.gsub('Basic ', '').strip)
68
74
  end
69
75
 
@@ -42,7 +42,13 @@ module Gruf
42
42
  # @return [Object] The response message
43
43
  #
44
44
  def request_response(request: nil, call: nil, method: nil, metadata: nil)
45
- rc = Gruf::Outbound::RequestContext.new(type: :request_response, requests: [request], call: call, method: method, metadata: metadata)
45
+ rc = Gruf::Outbound::RequestContext.new(
46
+ type: :request_response,
47
+ requests: [request],
48
+ call: call,
49
+ method: method,
50
+ metadata: metadata
51
+ )
46
52
  call(request_context: rc) do
47
53
  yield
48
54
  end
@@ -58,7 +64,13 @@ module Gruf
58
64
  # @return [Object] The response message
59
65
  #
60
66
  def client_streamer(requests: nil, call: nil, method: nil, metadata: nil)
61
- rc = Gruf::Outbound::RequestContext.new(type: :client_streamer, requests: requests, call: call, method: method, metadata: metadata)
67
+ rc = Gruf::Outbound::RequestContext.new(
68
+ type: :client_streamer,
69
+ requests: requests,
70
+ call: call,
71
+ method: method,
72
+ metadata: metadata
73
+ )
62
74
  call(request_context: rc) do
63
75
  yield
64
76
  end
@@ -74,7 +86,13 @@ module Gruf
74
86
  # @return [Object] The response message
75
87
  #
76
88
  def server_streamer(request: nil, call: nil, method: nil, metadata: nil)
77
- rc = Gruf::Outbound::RequestContext.new(type: :server_streamer, requests: [request], call: call, method: method, metadata: metadata)
89
+ rc = Gruf::Outbound::RequestContext.new(
90
+ type: :server_streamer,
91
+ requests: [request],
92
+ call: call,
93
+ method: method,
94
+ metadata: metadata
95
+ )
78
96
  call(request_context: rc) do
79
97
  yield
80
98
  end
@@ -89,7 +107,13 @@ module Gruf
89
107
  # @param [Hash] metadata A hash of outgoing metadata
90
108
  #
91
109
  def bidi_streamer(requests: nil, call: nil, method: nil, metadata: nil)
92
- rc = Gruf::Outbound::RequestContext.new(type: :bidi_streamer, requests: requests, call: call, method: method, metadata: metadata)
110
+ rc = Gruf::Outbound::RequestContext.new(
111
+ type: :bidi_streamer,
112
+ requests: requests,
113
+ call: call,
114
+ method: method,
115
+ metadata: metadata
116
+ )
93
117
  call(request_context: rc) do
94
118
  yield
95
119
  end
@@ -34,6 +34,7 @@ module Gruf
34
34
  output_metadata.update(metadata_key => result.elapsed.to_s)
35
35
 
36
36
  raise result.message unless result.successful?
37
+
37
38
  result.message
38
39
  end
39
40
 
@@ -36,7 +36,6 @@ module Gruf
36
36
  # Gruf::Instrumentation::Registry.add(:request_logging, Gruf::Instrumentation::RequestLogging::Hook)
37
37
  #
38
38
  class Interceptor < ::Gruf::Interceptors::ServerInterceptor
39
-
40
39
  # Default mappings of codes to log levels...
41
40
  LOG_LEVEL_MAP = {
42
41
  'GRPC::Ok' => :debug,
@@ -102,6 +101,7 @@ module Gruf
102
101
  logger.send(type, formatter.format(payload))
103
102
 
104
103
  raise result.message unless result.successful?
104
+
105
105
  result.message
106
106
  end
107
107
 
@@ -122,11 +122,9 @@ module Gruf
122
122
  # @return [String] The appropriate message body
123
123
  #
124
124
  def message(request, result)
125
- if result.successful?
126
- "[GRPC::Ok] (#{request.method_name})"
127
- else
128
- "[#{result.message_class_name}] (#{request.method_name}) #{result.message.message}"
129
- end
125
+ return "[GRPC::Ok] (#{request.method_name})" if result.successful?
126
+
127
+ "[#{result.message_class_name}] (#{request.method_name}) #{result.message.message}"
130
128
  end
131
129
 
132
130
  ##
@@ -149,13 +147,14 @@ module Gruf
149
147
  unless @formatter
150
148
  fmt = options.fetch(:formatter, :plain)
151
149
  @formatter = case fmt
152
- when Symbol
153
- klass = "Gruf::Interceptors::Instrumentation::RequestLogging::Formatters::#{fmt.to_s.capitalize}"
154
- fmt = klass.constantize.new
155
- when Class
156
- fmt = fmt.new
157
- else
158
- fmt
150
+ when Symbol
151
+ prefix = 'Gruf::Interceptors::Instrumentation::RequestLogging::Formatters::'
152
+ klass = "#{prefix}#{fmt.to_s.capitalize}"
153
+ fmt = klass.constantize.new
154
+ when Class
155
+ fmt = fmt.new
156
+ else
157
+ fmt
159
158
  end
160
159
  raise InvalidFormatterError unless fmt.is_a?(Formatters::Base)
161
160
  end
@@ -188,7 +187,9 @@ module Gruf
188
187
  #
189
188
  def redact!(parts = [], idx = 0, params = {}, redacted_string = 'REDACTED')
190
189
  return unless parts.is_a?(Array) && params.is_a?(Hash)
190
+
191
191
  return if idx >= parts.size || !params.key?(parts[idx])
192
+
192
193
  if idx == parts.size - 1
193
194
  if params[parts[idx]].is_a? Hash
194
195
  hash_deep_redact!(params[parts[idx]], redacted_string)
@@ -39,6 +39,7 @@ module Gruf
39
39
  client.timing(route_key, result.elapsed)
40
40
 
41
41
  raise result.message unless result.successful?
42
+
42
43
  result.message
43
44
  end
44
45
 
@@ -22,7 +22,7 @@ module Gruf
22
22
  class InterceptorNotFoundError < StandardError; end
23
23
 
24
24
  def initialize
25
- @registry ||= []
25
+ @registry = []
26
26
  end
27
27
 
28
28
  ##
@@ -49,6 +49,7 @@ module Gruf
49
49
  def remove(interceptor_class)
50
50
  pos = @registry.find_index { |opts| opts.fetch(:klass, '') == interceptor_class }
51
51
  raise InterceptorNotFoundError if pos.nil?
52
+
52
53
  @registry.delete_at(pos)
53
54
  end
54
55
 
@@ -64,6 +65,7 @@ module Gruf
64
65
  interceptors_mutex do
65
66
  pos = @registry.find_index { |opts| opts.fetch(:klass, '') == before_class }
66
67
  raise InterceptorNotFoundError if pos.nil?
68
+
67
69
  @registry.insert(
68
70
  pos,
69
71
  klass: interceptor_class,
@@ -84,6 +86,7 @@ module Gruf
84
86
  interceptors_mutex do
85
87
  pos = @registry.find_index { |opts| opts.fetch(:klass, '') == after_class }
86
88
  raise InterceptorNotFoundError if pos.nil?
89
+
87
90
  @registry.insert(
88
91
  (pos + 1),
89
92
  klass: interceptor_class,
@@ -94,6 +94,7 @@ module Gruf
94
94
  stop_server_thread = Thread.new do
95
95
  loop do
96
96
  break if @stop_server
97
+
97
98
  @stop_server_mu.synchronize { @stop_server_cv.wait(@stop_server_mu, 10) }
98
99
  end
99
100
  logger.info { 'Shutting down...' }
@@ -120,6 +121,7 @@ module Gruf
120
121
  #
121
122
  def add_service(klass)
122
123
  raise ServerAlreadyStartedError if @started
124
+
123
125
  @services << klass unless @services.include?(klass)
124
126
  end
125
127
 
@@ -132,6 +134,7 @@ module Gruf
132
134
  #
133
135
  def add_interceptor(klass, opts = {})
134
136
  raise ServerAlreadyStartedError if @started
137
+
135
138
  @interceptors.use(klass, opts)
136
139
  end
137
140
 
@@ -144,6 +147,7 @@ module Gruf
144
147
  #
145
148
  def insert_interceptor_before(before_class, interceptor_class, opts = {})
146
149
  raise ServerAlreadyStartedError if @started
150
+
147
151
  @interceptors.insert_before(before_class, interceptor_class, opts)
148
152
  end
149
153
 
@@ -156,6 +160,7 @@ module Gruf
156
160
  #
157
161
  def insert_interceptor_after(after_class, interceptor_class, opts = {})
158
162
  raise ServerAlreadyStartedError if @started
163
+
159
164
  @interceptors.insert_after(after_class, interceptor_class, opts)
160
165
  end
161
166
 
@@ -175,6 +180,7 @@ module Gruf
175
180
  #
176
181
  def remove_interceptor(klass)
177
182
  raise ServerAlreadyStartedError if @started
183
+
178
184
  @interceptors.remove(klass)
179
185
  end
180
186
 
@@ -183,6 +189,7 @@ module Gruf
183
189
  #
184
190
  def clear_interceptors
185
191
  raise ServerAlreadyStartedError if @started
192
+
186
193
  @interceptors.clear
187
194
  end
188
195
 
@@ -221,10 +228,12 @@ module Gruf
221
228
  # :nocov:
222
229
  def load_controllers
223
230
  return unless File.directory?(controllers_path)
231
+
224
232
  path = File.realpath(controllers_path)
225
233
  $LOAD_PATH.unshift(path)
226
234
  Dir["#{path}/**/*.rb"].each do |f|
227
235
  next if f.include?('_pb') # exclude if people include proto generated files in app/rpc
236
+
228
237
  logger.info "- Loading gRPC service file: #{f}"
229
238
  load File.realpath(f)
230
239
  end
@@ -245,14 +254,12 @@ module Gruf
245
254
  #
246
255
  # :nocov:
247
256
  def ssl_credentials
248
- if options.fetch(:use_ssl, Gruf.use_ssl)
249
- private_key = File.read(options.fetch(:ssl_key_file, Gruf.ssl_key_file))
250
- cert_chain = File.read(options.fetch(:ssl_crt_file, Gruf.ssl_crt_file))
251
- certs = [nil, [{ private_key: private_key, cert_chain: cert_chain }], false]
252
- GRPC::Core::ServerCredentials.new(*certs)
253
- else
254
- :this_port_is_insecure
255
- end
257
+ return :this_port_is_insecure unless options.fetch(:use_ssl, Gruf.use_ssl)
258
+
259
+ private_key = File.read(options.fetch(:ssl_key_file, Gruf.ssl_key_file))
260
+ cert_chain = File.read(options.fetch(:ssl_crt_file, Gruf.ssl_crt_file))
261
+ certs = [nil, [{ private_key: private_key, cert_chain: cert_chain }], false]
262
+ GRPC::Core::ServerCredentials.new(*certs)
256
263
  end
257
264
  # :nocov:
258
265
 
@@ -28,8 +28,10 @@ module Gruf
28
28
  #
29
29
  # @param [Module] service The namespace of the client Stub that is desired to load
30
30
  # @param [Hash] options A hash of options for the client
31
- # @option options [Array] :unsynchronized_methods A list of methods (as symbols) that should be excluded from synchronization
32
- # @option options [Integer] :internal_cache_expiry The length of time to keep results around for other threads to fetch (in seconds)
31
+ # @option options [Array] :unsynchronized_methods A list of methods (as symbols) that
32
+ # should be excluded from synchronization
33
+ # @option options [Integer] :internal_cache_expiry The length of time to keep results
34
+ # around for other threads to fetch (in seconds)
33
35
  # @param [Hash] client_options A hash of options to pass to the gRPC client stub
34
36
  #
35
37
  def initialize(service:, options: {}, client_options: {})
@@ -45,8 +47,8 @@ module Gruf
45
47
  # params, block until the active call is complete. When unblocked, callers will get a copy of the original result.
46
48
  #
47
49
  # @param [String|Symbol] request_method The method that is being requested on the service
48
- # @param [Hash] params (Optional) A hash of parameters that will be inserted into the gRPC request message that is required
49
- # for the given above call
50
+ # @param [Hash] params (Optional) A hash of parameters that will be inserted into the gRPC request
51
+ # message that is required for the given above call
50
52
  # @param [Hash] metadata (Optional) A hash of metadata key/values that are transported with the client request
51
53
  # @param [Hash] opts (Optional) A hash of options to send to the gRPC request_response method
52
54
  # @return [Gruf::Response] The response from the server
@@ -14,5 +14,5 @@
14
14
  # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
15
  #
16
16
  module Gruf
17
- VERSION = '2.5.2'.freeze
17
+ VERSION = '2.6.0'.freeze
18
18
  end
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.5.2
4
+ version: 2.6.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: 2019-02-18 00:00:00.000000000 Z
11
+ date: 2019-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '0.11'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '0.11'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: grpc
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -84,30 +84,30 @@ dependencies:
84
84
  name: activesupport
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - ">"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '4'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - ">"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '4'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: concurrent-ruby
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - ">"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '1'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - ">"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '1'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: slop
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -149,6 +149,7 @@ files:
149
149
  - lib/gruf/errors/field.rb
150
150
  - lib/gruf/errors/helpers.rb
151
151
  - lib/gruf/instrumentable_grpc_server.rb
152
+ - lib/gruf/integrations/rails/railtie.rb
152
153
  - lib/gruf/interceptors/active_record/connection_reset.rb
153
154
  - lib/gruf/interceptors/authentication/basic.rb
154
155
  - lib/gruf/interceptors/base.rb
@@ -183,9 +184,9 @@ require_paths:
183
184
  - lib
184
185
  required_ruby_version: !ruby/object:Gem::Requirement
185
186
  requirements:
186
- - - ">="
187
+ - - "~>"
187
188
  - !ruby/object:Gem::Version
188
- version: '0'
189
+ version: '2.4'
189
190
  required_rubygems_version: !ruby/object:Gem::Requirement
190
191
  requirements:
191
192
  - - ">="