semian 0.22.0 → 0.22.1
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/lib/semian/activerecord_trilogy_adapter.rb +1 -1
- data/lib/semian/grpc.rb +3 -1
- data/lib/semian/mysql2.rb +1 -1
- data/lib/semian/net_http.rb +4 -1
- data/lib/semian/redis_client.rb +1 -1
- data/lib/semian/version.rb +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdc3f7ce1f123bfc666e600050ee264cd4398e4e607f4f2dc1b91b008b7d6f3d
|
4
|
+
data.tar.gz: 5f8b87e92a43267aa10158cd27a7e3e931bb4a51a6ef301d8a9af9d0ddcbabd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/semian/net_http.rb
CHANGED
@@ -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
|
data/lib/semian/redis_client.rb
CHANGED
@@ -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
|
data/lib/semian/version.rb
CHANGED
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.
|
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:
|
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.
|
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: []
|