sequelize-rails 0.4.0 → 0.4.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/CHANGELOG.md +4 -0
- data/Gemfile.lock +74 -73
- data/lib/sequel/rails/railtie.rb +1 -1
- data/lib/sequel/rails/version.rb +1 -1
- data/lib/sequel/rails.rb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f1b95356822be96711195c7cb2756d2c84d3f1e8d1db2d9bdc1e4e7defee16d5
|
|
4
|
+
data.tar.gz: e1261347c5eb6b75c3e5fcd7407cea9d17cc3deb451c7c0847cbf0316863c6ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5152e52462ee0e45700ab0650a3ea61cff498c8bd8022769db5f712785e4d123db5910b6c19b9cd0ffd8a489af6dcd9f8b5ae8f50bfe3030e47e6cfe928576dd
|
|
7
|
+
data.tar.gz: 9ffb4fe02077f5b269ed43124da05e9e48db8fae102e4ea7f00b624d4dcc1566d7efa7f0d1d2f7e0e5f73e2d8a1a4b517375d01ec7a6740365f061ff60461bd3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.4.1] - 2023-08-16
|
|
4
|
+
|
|
5
|
+
- Adds a `Rails.application.config.sequel.after_connect` hook that is called after each connection is established. This hook can be used to add plugins and extensions to the database connection once established.
|
|
6
|
+
|
|
3
7
|
## [0.4.0] - 2023-08-16
|
|
4
8
|
|
|
5
9
|
- Rake tasks will no longer attempt a database connection by default
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
sequelize-rails (0.
|
|
4
|
+
sequelize-rails (0.4.1)
|
|
5
5
|
activerecord (>= 6.0.0)
|
|
6
6
|
rails (>= 6.0.0)
|
|
7
7
|
sequel (>= 5.0.0)
|
|
@@ -9,67 +9,67 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
actioncable (7.0.
|
|
13
|
-
actionpack (= 7.0.
|
|
14
|
-
activesupport (= 7.0.
|
|
12
|
+
actioncable (7.0.7)
|
|
13
|
+
actionpack (= 7.0.7)
|
|
14
|
+
activesupport (= 7.0.7)
|
|
15
15
|
nio4r (~> 2.0)
|
|
16
16
|
websocket-driver (>= 0.6.1)
|
|
17
|
-
actionmailbox (7.0.
|
|
18
|
-
actionpack (= 7.0.
|
|
19
|
-
activejob (= 7.0.
|
|
20
|
-
activerecord (= 7.0.
|
|
21
|
-
activestorage (= 7.0.
|
|
22
|
-
activesupport (= 7.0.
|
|
17
|
+
actionmailbox (7.0.7)
|
|
18
|
+
actionpack (= 7.0.7)
|
|
19
|
+
activejob (= 7.0.7)
|
|
20
|
+
activerecord (= 7.0.7)
|
|
21
|
+
activestorage (= 7.0.7)
|
|
22
|
+
activesupport (= 7.0.7)
|
|
23
23
|
mail (>= 2.7.1)
|
|
24
24
|
net-imap
|
|
25
25
|
net-pop
|
|
26
26
|
net-smtp
|
|
27
|
-
actionmailer (7.0.
|
|
28
|
-
actionpack (= 7.0.
|
|
29
|
-
actionview (= 7.0.
|
|
30
|
-
activejob (= 7.0.
|
|
31
|
-
activesupport (= 7.0.
|
|
27
|
+
actionmailer (7.0.7)
|
|
28
|
+
actionpack (= 7.0.7)
|
|
29
|
+
actionview (= 7.0.7)
|
|
30
|
+
activejob (= 7.0.7)
|
|
31
|
+
activesupport (= 7.0.7)
|
|
32
32
|
mail (~> 2.5, >= 2.5.4)
|
|
33
33
|
net-imap
|
|
34
34
|
net-pop
|
|
35
35
|
net-smtp
|
|
36
36
|
rails-dom-testing (~> 2.0)
|
|
37
|
-
actionpack (7.0.
|
|
38
|
-
actionview (= 7.0.
|
|
39
|
-
activesupport (= 7.0.
|
|
40
|
-
rack (~> 2.0, >= 2.2.
|
|
37
|
+
actionpack (7.0.7)
|
|
38
|
+
actionview (= 7.0.7)
|
|
39
|
+
activesupport (= 7.0.7)
|
|
40
|
+
rack (~> 2.0, >= 2.2.4)
|
|
41
41
|
rack-test (>= 0.6.3)
|
|
42
42
|
rails-dom-testing (~> 2.0)
|
|
43
43
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
44
|
-
actiontext (7.0.
|
|
45
|
-
actionpack (= 7.0.
|
|
46
|
-
activerecord (= 7.0.
|
|
47
|
-
activestorage (= 7.0.
|
|
48
|
-
activesupport (= 7.0.
|
|
44
|
+
actiontext (7.0.7)
|
|
45
|
+
actionpack (= 7.0.7)
|
|
46
|
+
activerecord (= 7.0.7)
|
|
47
|
+
activestorage (= 7.0.7)
|
|
48
|
+
activesupport (= 7.0.7)
|
|
49
49
|
globalid (>= 0.6.0)
|
|
50
50
|
nokogiri (>= 1.8.5)
|
|
51
|
-
actionview (7.0.
|
|
52
|
-
activesupport (= 7.0.
|
|
51
|
+
actionview (7.0.7)
|
|
52
|
+
activesupport (= 7.0.7)
|
|
53
53
|
builder (~> 3.1)
|
|
54
54
|
erubi (~> 1.4)
|
|
55
55
|
rails-dom-testing (~> 2.0)
|
|
56
56
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
57
|
-
activejob (7.0.
|
|
58
|
-
activesupport (= 7.0.
|
|
57
|
+
activejob (7.0.7)
|
|
58
|
+
activesupport (= 7.0.7)
|
|
59
59
|
globalid (>= 0.3.6)
|
|
60
|
-
activemodel (7.0.
|
|
61
|
-
activesupport (= 7.0.
|
|
62
|
-
activerecord (7.0.
|
|
63
|
-
activemodel (= 7.0.
|
|
64
|
-
activesupport (= 7.0.
|
|
65
|
-
activestorage (7.0.
|
|
66
|
-
actionpack (= 7.0.
|
|
67
|
-
activejob (= 7.0.
|
|
68
|
-
activerecord (= 7.0.
|
|
69
|
-
activesupport (= 7.0.
|
|
60
|
+
activemodel (7.0.7)
|
|
61
|
+
activesupport (= 7.0.7)
|
|
62
|
+
activerecord (7.0.7)
|
|
63
|
+
activemodel (= 7.0.7)
|
|
64
|
+
activesupport (= 7.0.7)
|
|
65
|
+
activestorage (7.0.7)
|
|
66
|
+
actionpack (= 7.0.7)
|
|
67
|
+
activejob (= 7.0.7)
|
|
68
|
+
activerecord (= 7.0.7)
|
|
69
|
+
activesupport (= 7.0.7)
|
|
70
70
|
marcel (~> 1.0)
|
|
71
71
|
mini_mime (>= 1.1.0)
|
|
72
|
-
activesupport (7.0.
|
|
72
|
+
activesupport (7.0.7)
|
|
73
73
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
74
74
|
i18n (>= 1.6, < 2)
|
|
75
75
|
minitest (>= 5.1)
|
|
@@ -88,13 +88,13 @@ GEM
|
|
|
88
88
|
erubi (1.12.0)
|
|
89
89
|
globalid (1.1.0)
|
|
90
90
|
activesupport (>= 5.0)
|
|
91
|
-
i18n (1.
|
|
91
|
+
i18n (1.14.1)
|
|
92
92
|
concurrent-ruby (~> 1.0)
|
|
93
93
|
json (2.6.3)
|
|
94
94
|
language_server-protocol (3.17.0.3)
|
|
95
|
-
loofah (2.
|
|
95
|
+
loofah (2.21.3)
|
|
96
96
|
crass (~> 1.0.2)
|
|
97
|
-
nokogiri (>= 1.
|
|
97
|
+
nokogiri (>= 1.12.0)
|
|
98
98
|
mail (2.8.1)
|
|
99
99
|
mini_mime (>= 0.1.1)
|
|
100
100
|
net-imap
|
|
@@ -102,7 +102,7 @@ GEM
|
|
|
102
102
|
net-smtp
|
|
103
103
|
marcel (1.0.2)
|
|
104
104
|
method_source (1.0.0)
|
|
105
|
-
mini_mime (1.1.
|
|
105
|
+
mini_mime (1.1.5)
|
|
106
106
|
mini_portile2 (2.8.1)
|
|
107
107
|
minitest (5.18.0)
|
|
108
108
|
minitest-reporters (1.6.0)
|
|
@@ -110,7 +110,7 @@ GEM
|
|
|
110
110
|
builder
|
|
111
111
|
minitest (>= 5.0)
|
|
112
112
|
ruby-progressbar
|
|
113
|
-
net-imap (0.3.
|
|
113
|
+
net-imap (0.3.7)
|
|
114
114
|
date
|
|
115
115
|
net-protocol
|
|
116
116
|
net-pop (0.1.2)
|
|
@@ -119,9 +119,8 @@ GEM
|
|
|
119
119
|
timeout
|
|
120
120
|
net-smtp (0.3.3)
|
|
121
121
|
net-protocol
|
|
122
|
-
nio4r (2.5.
|
|
123
|
-
nokogiri (1.
|
|
124
|
-
mini_portile2 (~> 2.8.0)
|
|
122
|
+
nio4r (2.5.9)
|
|
123
|
+
nokogiri (1.15.4-arm64-darwin)
|
|
125
124
|
racc (~> 1.4)
|
|
126
125
|
parallel (1.22.1)
|
|
127
126
|
parser (3.2.1.1)
|
|
@@ -130,32 +129,34 @@ GEM
|
|
|
130
129
|
pry (0.14.2)
|
|
131
130
|
coderay (~> 1.1)
|
|
132
131
|
method_source (~> 1.0)
|
|
133
|
-
racc (1.
|
|
134
|
-
rack (2.2.
|
|
132
|
+
racc (1.7.1)
|
|
133
|
+
rack (2.2.8)
|
|
135
134
|
rack-test (2.1.0)
|
|
136
135
|
rack (>= 1.3)
|
|
137
|
-
rails (7.0.
|
|
138
|
-
actioncable (= 7.0.
|
|
139
|
-
actionmailbox (= 7.0.
|
|
140
|
-
actionmailer (= 7.0.
|
|
141
|
-
actionpack (= 7.0.
|
|
142
|
-
actiontext (= 7.0.
|
|
143
|
-
actionview (= 7.0.
|
|
144
|
-
activejob (= 7.0.
|
|
145
|
-
activemodel (= 7.0.
|
|
146
|
-
activerecord (= 7.0.
|
|
147
|
-
activestorage (= 7.0.
|
|
148
|
-
activesupport (= 7.0.
|
|
136
|
+
rails (7.0.7)
|
|
137
|
+
actioncable (= 7.0.7)
|
|
138
|
+
actionmailbox (= 7.0.7)
|
|
139
|
+
actionmailer (= 7.0.7)
|
|
140
|
+
actionpack (= 7.0.7)
|
|
141
|
+
actiontext (= 7.0.7)
|
|
142
|
+
actionview (= 7.0.7)
|
|
143
|
+
activejob (= 7.0.7)
|
|
144
|
+
activemodel (= 7.0.7)
|
|
145
|
+
activerecord (= 7.0.7)
|
|
146
|
+
activestorage (= 7.0.7)
|
|
147
|
+
activesupport (= 7.0.7)
|
|
149
148
|
bundler (>= 1.15.0)
|
|
150
|
-
railties (= 7.0.
|
|
151
|
-
rails-dom-testing (2.0
|
|
152
|
-
activesupport (>=
|
|
149
|
+
railties (= 7.0.7)
|
|
150
|
+
rails-dom-testing (2.2.0)
|
|
151
|
+
activesupport (>= 5.0.0)
|
|
152
|
+
minitest
|
|
153
153
|
nokogiri (>= 1.6)
|
|
154
|
-
rails-html-sanitizer (1.
|
|
155
|
-
loofah (~> 2.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
rails-html-sanitizer (1.6.0)
|
|
155
|
+
loofah (~> 2.21)
|
|
156
|
+
nokogiri (~> 1.14)
|
|
157
|
+
railties (7.0.7)
|
|
158
|
+
actionpack (= 7.0.7)
|
|
159
|
+
activesupport (= 7.0.7)
|
|
159
160
|
method_source
|
|
160
161
|
rake (>= 12.2)
|
|
161
162
|
thor (~> 1.0)
|
|
@@ -180,7 +181,7 @@ GEM
|
|
|
180
181
|
rubocop (>= 1.7.0, < 2.0)
|
|
181
182
|
rubocop-ast (>= 0.4.0)
|
|
182
183
|
ruby-progressbar (1.13.0)
|
|
183
|
-
sequel (5.
|
|
184
|
+
sequel (5.71.0)
|
|
184
185
|
sqlite3 (1.6.1)
|
|
185
186
|
mini_portile2 (~> 2.8.0)
|
|
186
187
|
standard (1.25.3)
|
|
@@ -188,14 +189,14 @@ GEM
|
|
|
188
189
|
rubocop (~> 1.48.1)
|
|
189
190
|
rubocop-performance (~> 1.16.0)
|
|
190
191
|
thor (1.2.1)
|
|
191
|
-
timeout (0.
|
|
192
|
+
timeout (0.4.0)
|
|
192
193
|
tzinfo (2.0.6)
|
|
193
194
|
concurrent-ruby (~> 1.0)
|
|
194
195
|
unicode-display_width (2.4.2)
|
|
195
|
-
websocket-driver (0.7.
|
|
196
|
+
websocket-driver (0.7.6)
|
|
196
197
|
websocket-extensions (>= 0.1.0)
|
|
197
198
|
websocket-extensions (0.1.5)
|
|
198
|
-
zeitwerk (2.6.
|
|
199
|
+
zeitwerk (2.6.11)
|
|
199
200
|
|
|
200
201
|
PLATFORMS
|
|
201
202
|
ruby
|
data/lib/sequel/rails/railtie.rb
CHANGED
|
@@ -51,7 +51,7 @@ module Sequel
|
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
initializer "sequel.connection" do
|
|
54
|
-
in_rake = Rails.const_defined?(
|
|
54
|
+
in_rake = Rails.const_defined?(:Rake) && Rake.application.top_level_tasks.length > 0
|
|
55
55
|
::Sequel::Rails.connect_to :primary unless in_rake
|
|
56
56
|
end
|
|
57
57
|
|
data/lib/sequel/rails/version.rb
CHANGED
data/lib/sequel/rails.rb
CHANGED
|
@@ -32,6 +32,9 @@ module Sequel
|
|
|
32
32
|
config[:pool_timeout] ||= config.delete(:timeout) / 1000 if config[:timeout]
|
|
33
33
|
Dir.chdir ::Rails.root do
|
|
34
34
|
::Sequel.connect config, opts
|
|
35
|
+
end.tap do |db|
|
|
36
|
+
callback = ::Rails.application.config.sequel.after_connect
|
|
37
|
+
callback.call(db) if callback.respond_to?(:call)
|
|
35
38
|
end
|
|
36
39
|
end
|
|
37
40
|
end
|