semian 0.22.0 → 0.22.1

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: 27fa3d35b047fbe54483763821e246e2ce6f1403d8b3354d5759c4bdf1b43b2b
4
- data.tar.gz: '06303901cc95e293dee76cd712283a4a7db1536771133e83563c969a6f3598e5'
3
+ metadata.gz: cdc3f7ce1f123bfc666e600050ee264cd4398e4e607f4f2dc1b91b008b7d6f3d
4
+ data.tar.gz: 5f8b87e92a43267aa10158cd27a7e3e931bb4a51a6ef301d8a9af9d0ddcbabd5
5
5
  SHA512:
6
- metadata.gz: 31e47dcea63ba9fc861272d9b8c2d591eb5f2d0783b1d8cde667812ba1cc4307ea52b533f8dc3542d011fb98c770ed011ff3a84c3e1ee7239635b01c0717b1ad
7
- data.tar.gz: e32d7f17f6d73c95418fe6b80f1dce3423271423d61c8acd1fda356dab02aac41c24637d9a0939d39e5ade7cb015a2e47182361ea5c9187b1b39d93d59058510
6
+ metadata.gz: b2bc7b89dde896156164abbac527ccdc242d635ccfa78190afc48a30f07b8b2fb89c5660fffe6ea35d1accfe132fa23c50550f633777d6879d8d077f2554e985
7
+ data.tar.gz: 7c2fdf0a5c4db2c3d7b141279cb330c6cc612c55932fa54e628d9da919a2de8174c115eec67886fe40ce3cf6aac8feedca5870a0c767a84459e42d99b64fe8b7
@@ -29,7 +29,7 @@ module Semian
29
29
  ResourceBusyError = ::ActiveRecord::ConnectionAdapters::TrilogyAdapter::ResourceBusyError
30
30
  CircuitOpenError = ::ActiveRecord::ConnectionAdapters::TrilogyAdapter::CircuitOpenError
31
31
 
32
- QUERY_ALLOWLIST = %r{\A(?:/\*.*?\*/)?\s*(ROLLBACK|COMMIT|RELEASE\s+SAVEPOINT)}i
32
+ QUERY_ALLOWLIST = %r{\A(?:/\*.*?\*/)?\s*(ROLLBACK|COMMIT|RELEASE\s+SAVEPOINT)}i.freeze
33
33
 
34
34
  # The common case here is NOT to have transaction management statements, therefore
35
35
  # we are exploiting the fact that Active Record will use COMMIT/ROLLBACK as
data/lib/semian/grpc.rb CHANGED
@@ -36,10 +36,11 @@ module Semian
36
36
  end
37
37
 
38
38
  class << self
39
- attr_accessor :exceptions
40
39
  attr_reader :semian_configuration
41
40
 
41
+ # rubocop:disable ThreadSafety/ClassInstanceVariable
42
42
  def semian_configuration=(configuration)
43
+ # Only allow setting the configuration once in boot time
43
44
  raise Semian::GRPC::SemianConfigurationChangedError unless @semian_configuration.nil?
44
45
 
45
46
  @semian_configuration = configuration
@@ -48,6 +49,7 @@ module Semian
48
49
  def retrieve_semian_configuration(host)
49
50
  @semian_configuration.call(host) if @semian_configuration.respond_to?(:call)
50
51
  end
52
+ # rubocop:enable ThreadSafety/ClassInstanceVariable
51
53
  end
52
54
 
53
55
  def raw_semian_options
data/lib/semian/mysql2.rb CHANGED
@@ -39,7 +39,7 @@ module Semian
39
39
  DEFAULT_HOST = "localhost"
40
40
  DEFAULT_PORT = 3306
41
41
 
42
- QUERY_ALLOWLIST = %r{\A(?:/\*.*?\*/)?\s*(ROLLBACK|COMMIT|RELEASE\s+SAVEPOINT)}i
42
+ QUERY_ALLOWLIST = %r{\A(?:/\*.*?\*/)?\s*(ROLLBACK|COMMIT|RELEASE\s+SAVEPOINT)}i.freeze
43
43
 
44
44
  class << self
45
45
  # The naked methods are exposed as `raw_query` and `raw_connect` for instrumentation purpose
@@ -55,10 +55,12 @@ module Semian
55
55
  end
56
56
 
57
57
  class << self
58
- attr_accessor :exceptions
58
+ attr_accessor :exceptions # rubocop:disable ThreadSafety/ClassAndModuleAttributes
59
59
  attr_reader :semian_configuration
60
60
 
61
+ # rubocop:disable ThreadSafety/ClassInstanceVariable
61
62
  def semian_configuration=(configuration)
63
+ # Only allow setting the configuration once in boot time
62
64
  raise Semian::NetHTTP::SemianConfigurationChangedError unless @semian_configuration.nil?
63
65
 
64
66
  @semian_configuration = configuration
@@ -67,6 +69,7 @@ module Semian
67
69
  def retrieve_semian_configuration(host, port)
68
70
  @semian_configuration.call(host, port) if @semian_configuration.respond_to?(:call)
69
71
  end
72
+ # rubocop:enable ThreadSafety/ClassInstanceVariable
70
73
 
71
74
  def reset_exceptions
72
75
  self.exceptions = Semian::NetHTTP::DEFAULT_ERRORS.dup
@@ -94,7 +94,7 @@ module Semian
94
94
  end
95
95
 
96
96
  module RedisClient
97
- EXCEPTIONS = [::RedisClient::ConnectionError, ::RedisClient::OutOfMemoryError]
97
+ EXCEPTIONS = [::RedisClient::ConnectionError, ::RedisClient::OutOfMemoryError].freeze
98
98
 
99
99
  include Semian::Adapter
100
100
  include RedisClientCommon
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Semian
4
- VERSION = "0.22.0"
4
+ VERSION = "0.22.1"
5
5
  end
metadata CHANGED
@@ -1,16 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semian
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.22.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Francis
8
8
  - Simon Eskildsen
9
9
  - Dale Hamel
10
- autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2024-11-05 00:00:00.000000000 Z
12
+ date: 2025-02-10 00:00:00.000000000 Z
14
13
  dependencies: []
15
14
  description: |2
16
15
  A Ruby C extention that is used to control access to shared resources
@@ -64,7 +63,6 @@ metadata:
64
63
  documentation_uri: https://github.com/Shopify/semian
65
64
  homepage_uri: https://github.com/Shopify/semian
66
65
  source_code_uri: https://github.com/Shopify/semian
67
- post_install_message:
68
66
  rdoc_options: []
69
67
  require_paths:
70
68
  - lib
@@ -79,8 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
77
  - !ruby/object:Gem::Version
80
78
  version: '0'
81
79
  requirements: []
82
- rubygems_version: 3.5.22
83
- signing_key:
80
+ rubygems_version: 3.6.3
84
81
  specification_version: 4
85
82
  summary: Bulkheading for Ruby with SysV semaphores
86
83
  test_files: []