fibered_mysql2 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +56 -56
- data/lib/active_record/connection_adapters/fibered_mysql2_adapter.rb +3 -6
- data/lib/fibered_mysql2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cf06a5be94da99bc7d1e0de4b5268ff04a72fd7671e6c4d522186d1ea67dd0b
|
4
|
+
data.tar.gz: 931890052763e7fcf2f1ffb7925848004dc54c4c583f89d24c258cbe1537a67a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42cab06e4e9bccd07df1436db08c8fb0e8038027690bc03cc58a34eab99ecfd6cccedbdde27f63f9607ce391bea3de8d941cc720775deb7c0c7d65134f405bae
|
7
|
+
data.tar.gz: be4a1bd1357e9d51e2e76e48f93ede62f8b7c3cb9cf515a042cf9d10f4d2afe63721349f5afe65a67d2cc9246741aab39a80c7aa903bafde77d95d75c026cd05
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
5
5
|
Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [0.3.1] - 2024-10-30
|
8
|
+
### Fixed
|
9
|
+
- Fixed bug in FiberedMysqlAdapter.new_client that was causing `uninitialized constant` errors.
|
10
|
+
|
7
11
|
## [0.3.0] - 2024-10-23
|
8
12
|
### Added
|
9
13
|
- Support for Rails 7.0.
|
data/Gemfile.lock
CHANGED
@@ -1,74 +1,74 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fibered_mysql2 (0.3.
|
4
|
+
fibered_mysql2 (0.3.1)
|
5
5
|
em-synchrony (~> 1.0)
|
6
6
|
rails (>= 6.1, < 7.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actioncable (7.0.8.
|
12
|
-
actionpack (= 7.0.8.
|
13
|
-
activesupport (= 7.0.8.
|
11
|
+
actioncable (7.0.8.6)
|
12
|
+
actionpack (= 7.0.8.6)
|
13
|
+
activesupport (= 7.0.8.6)
|
14
14
|
nio4r (~> 2.0)
|
15
15
|
websocket-driver (>= 0.6.1)
|
16
|
-
actionmailbox (7.0.8.
|
17
|
-
actionpack (= 7.0.8.
|
18
|
-
activejob (= 7.0.8.
|
19
|
-
activerecord (= 7.0.8.
|
20
|
-
activestorage (= 7.0.8.
|
21
|
-
activesupport (= 7.0.8.
|
16
|
+
actionmailbox (7.0.8.6)
|
17
|
+
actionpack (= 7.0.8.6)
|
18
|
+
activejob (= 7.0.8.6)
|
19
|
+
activerecord (= 7.0.8.6)
|
20
|
+
activestorage (= 7.0.8.6)
|
21
|
+
activesupport (= 7.0.8.6)
|
22
22
|
mail (>= 2.7.1)
|
23
23
|
net-imap
|
24
24
|
net-pop
|
25
25
|
net-smtp
|
26
|
-
actionmailer (7.0.8.
|
27
|
-
actionpack (= 7.0.8.
|
28
|
-
actionview (= 7.0.8.
|
29
|
-
activejob (= 7.0.8.
|
30
|
-
activesupport (= 7.0.8.
|
26
|
+
actionmailer (7.0.8.6)
|
27
|
+
actionpack (= 7.0.8.6)
|
28
|
+
actionview (= 7.0.8.6)
|
29
|
+
activejob (= 7.0.8.6)
|
30
|
+
activesupport (= 7.0.8.6)
|
31
31
|
mail (~> 2.5, >= 2.5.4)
|
32
32
|
net-imap
|
33
33
|
net-pop
|
34
34
|
net-smtp
|
35
35
|
rails-dom-testing (~> 2.0)
|
36
|
-
actionpack (7.0.8.
|
37
|
-
actionview (= 7.0.8.
|
38
|
-
activesupport (= 7.0.8.
|
36
|
+
actionpack (7.0.8.6)
|
37
|
+
actionview (= 7.0.8.6)
|
38
|
+
activesupport (= 7.0.8.6)
|
39
39
|
rack (~> 2.0, >= 2.2.4)
|
40
40
|
rack-test (>= 0.6.3)
|
41
41
|
rails-dom-testing (~> 2.0)
|
42
42
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
43
|
-
actiontext (7.0.8.
|
44
|
-
actionpack (= 7.0.8.
|
45
|
-
activerecord (= 7.0.8.
|
46
|
-
activestorage (= 7.0.8.
|
47
|
-
activesupport (= 7.0.8.
|
43
|
+
actiontext (7.0.8.6)
|
44
|
+
actionpack (= 7.0.8.6)
|
45
|
+
activerecord (= 7.0.8.6)
|
46
|
+
activestorage (= 7.0.8.6)
|
47
|
+
activesupport (= 7.0.8.6)
|
48
48
|
globalid (>= 0.6.0)
|
49
49
|
nokogiri (>= 1.8.5)
|
50
|
-
actionview (7.0.8.
|
51
|
-
activesupport (= 7.0.8.
|
50
|
+
actionview (7.0.8.6)
|
51
|
+
activesupport (= 7.0.8.6)
|
52
52
|
builder (~> 3.1)
|
53
53
|
erubi (~> 1.4)
|
54
54
|
rails-dom-testing (~> 2.0)
|
55
55
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
56
|
-
activejob (7.0.8.
|
57
|
-
activesupport (= 7.0.8.
|
56
|
+
activejob (7.0.8.6)
|
57
|
+
activesupport (= 7.0.8.6)
|
58
58
|
globalid (>= 0.3.6)
|
59
|
-
activemodel (7.0.8.
|
60
|
-
activesupport (= 7.0.8.
|
61
|
-
activerecord (7.0.8.
|
62
|
-
activemodel (= 7.0.8.
|
63
|
-
activesupport (= 7.0.8.
|
64
|
-
activestorage (7.0.8.
|
65
|
-
actionpack (= 7.0.8.
|
66
|
-
activejob (= 7.0.8.
|
67
|
-
activerecord (= 7.0.8.
|
68
|
-
activesupport (= 7.0.8.
|
59
|
+
activemodel (7.0.8.6)
|
60
|
+
activesupport (= 7.0.8.6)
|
61
|
+
activerecord (7.0.8.6)
|
62
|
+
activemodel (= 7.0.8.6)
|
63
|
+
activesupport (= 7.0.8.6)
|
64
|
+
activestorage (7.0.8.6)
|
65
|
+
actionpack (= 7.0.8.6)
|
66
|
+
activejob (= 7.0.8.6)
|
67
|
+
activerecord (= 7.0.8.6)
|
68
|
+
activesupport (= 7.0.8.6)
|
69
69
|
marcel (~> 1.0)
|
70
70
|
mini_mime (>= 1.1.0)
|
71
|
-
activesupport (7.0.8.
|
71
|
+
activesupport (7.0.8.6)
|
72
72
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
73
73
|
i18n (>= 1.6, < 2)
|
74
74
|
minitest (>= 5.1)
|
@@ -103,7 +103,7 @@ GEM
|
|
103
103
|
i18n (1.14.6)
|
104
104
|
concurrent-ruby (~> 1.0)
|
105
105
|
json (2.7.2)
|
106
|
-
loofah (2.
|
106
|
+
loofah (2.23.1)
|
107
107
|
crass (~> 1.0.2)
|
108
108
|
nokogiri (>= 1.12.0)
|
109
109
|
mail (2.8.1)
|
@@ -126,7 +126,7 @@ GEM
|
|
126
126
|
timeout
|
127
127
|
net-smtp (0.5.0)
|
128
128
|
net-protocol
|
129
|
-
nio4r (2.7.
|
129
|
+
nio4r (2.7.4)
|
130
130
|
nokogiri (1.16.7)
|
131
131
|
mini_portile2 (~> 2.8.2)
|
132
132
|
racc (~> 1.4)
|
@@ -140,20 +140,20 @@ GEM
|
|
140
140
|
rack (2.2.10)
|
141
141
|
rack-test (2.1.0)
|
142
142
|
rack (>= 1.3)
|
143
|
-
rails (7.0.8.
|
144
|
-
actioncable (= 7.0.8.
|
145
|
-
actionmailbox (= 7.0.8.
|
146
|
-
actionmailer (= 7.0.8.
|
147
|
-
actionpack (= 7.0.8.
|
148
|
-
actiontext (= 7.0.8.
|
149
|
-
actionview (= 7.0.8.
|
150
|
-
activejob (= 7.0.8.
|
151
|
-
activemodel (= 7.0.8.
|
152
|
-
activerecord (= 7.0.8.
|
153
|
-
activestorage (= 7.0.8.
|
154
|
-
activesupport (= 7.0.8.
|
143
|
+
rails (7.0.8.6)
|
144
|
+
actioncable (= 7.0.8.6)
|
145
|
+
actionmailbox (= 7.0.8.6)
|
146
|
+
actionmailer (= 7.0.8.6)
|
147
|
+
actionpack (= 7.0.8.6)
|
148
|
+
actiontext (= 7.0.8.6)
|
149
|
+
actionview (= 7.0.8.6)
|
150
|
+
activejob (= 7.0.8.6)
|
151
|
+
activemodel (= 7.0.8.6)
|
152
|
+
activerecord (= 7.0.8.6)
|
153
|
+
activestorage (= 7.0.8.6)
|
154
|
+
activesupport (= 7.0.8.6)
|
155
155
|
bundler (>= 1.15.0)
|
156
|
-
railties (= 7.0.8.
|
156
|
+
railties (= 7.0.8.6)
|
157
157
|
rails-dom-testing (2.2.0)
|
158
158
|
activesupport (>= 5.0.0)
|
159
159
|
minitest
|
@@ -161,9 +161,9 @@ GEM
|
|
161
161
|
rails-html-sanitizer (1.6.0)
|
162
162
|
loofah (~> 2.21)
|
163
163
|
nokogiri (~> 1.14)
|
164
|
-
railties (7.0.8.
|
165
|
-
actionpack (= 7.0.8.
|
166
|
-
activesupport (= 7.0.8.
|
164
|
+
railties (7.0.8.6)
|
165
|
+
actionpack (= 7.0.8.6)
|
166
|
+
activesupport (= 7.0.8.6)
|
167
167
|
method_source
|
168
168
|
rake (>= 12.2)
|
169
169
|
thor (~> 1.0)
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'em-synchrony'
|
4
4
|
require 'active_model'
|
5
5
|
require 'active_record/errors'
|
6
|
+
require 'active_record/connection_adapters/mysql2_adapter'
|
6
7
|
require 'active_record/connection_adapters/em_mysql2_adapter'
|
7
8
|
|
8
9
|
module FiberedMysql2
|
@@ -69,12 +70,8 @@ module FiberedMysql2
|
|
69
70
|
def new_client(config)
|
70
71
|
Mysql2::EM::Client.new(config)
|
71
72
|
rescue Mysql2::Error => error
|
72
|
-
if error.error_number ==
|
73
|
-
raise ActiveRecord::NoDatabaseError.
|
74
|
-
elsif error.error_number == ConnectionAdapters::Mysql2Adapter::ER_ACCESS_DENIED_ERROR
|
75
|
-
raise ActiveRecord::DatabaseConnectionError.username_error(config[:username])
|
76
|
-
elsif [ConnectionAdapters::Mysql2Adapter::ER_CONN_HOST_ERROR, ConnectionAdapters::Mysql2Adapter::ER_UNKNOWN_HOST_ERROR].include?(error.error_number)
|
77
|
-
raise ActiveRecord::DatabaseConnectionError.hostname_error(config[:host])
|
73
|
+
if error.error_number == 1049
|
74
|
+
raise ActiveRecord::NoDatabaseError.new, error.message
|
78
75
|
else
|
79
76
|
raise ActiveRecord::ConnectionNotEstablished, error.message
|
80
77
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fibered_mysql2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Invoca Development
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: em-synchrony
|