sequelize-rails 0.4.0 → 0.4.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: 1d9b36457ef8b9c1cfc36554adb7b76a2c6262ac93fc9e6468a0c5e4eae74a04
4
- data.tar.gz: 46a4e132f2d67a1c2aab16dcf1ec7fa39bb113f1dab39dbf2bb9a0e272af33da
3
+ metadata.gz: f1b95356822be96711195c7cb2756d2c84d3f1e8d1db2d9bdc1e4e7defee16d5
4
+ data.tar.gz: e1261347c5eb6b75c3e5fcd7407cea9d17cc3deb451c7c0847cbf0316863c6ec
5
5
  SHA512:
6
- metadata.gz: 0d4ff60a438337fe2d9f9f440a74da942b8c9aad250c8a127500cab2ef6082dd5de45c15163abaa8f25e1ce26c7c6ad772fb24edf57995ac4c6c29191512bf4c
7
- data.tar.gz: '08f935a29a8f038fc824d407cb8d988f0d1c0745f9465e01dbbfe870c9a4c97f021a251b3750a7b4b74e91865846d4a51121039d6aac2c2a10ddce312e72a697'
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.3.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.4.3)
13
- actionpack (= 7.0.4.3)
14
- activesupport (= 7.0.4.3)
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.4.3)
18
- actionpack (= 7.0.4.3)
19
- activejob (= 7.0.4.3)
20
- activerecord (= 7.0.4.3)
21
- activestorage (= 7.0.4.3)
22
- activesupport (= 7.0.4.3)
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.4.3)
28
- actionpack (= 7.0.4.3)
29
- actionview (= 7.0.4.3)
30
- activejob (= 7.0.4.3)
31
- activesupport (= 7.0.4.3)
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.4.3)
38
- actionview (= 7.0.4.3)
39
- activesupport (= 7.0.4.3)
40
- rack (~> 2.0, >= 2.2.0)
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.4.3)
45
- actionpack (= 7.0.4.3)
46
- activerecord (= 7.0.4.3)
47
- activestorage (= 7.0.4.3)
48
- activesupport (= 7.0.4.3)
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.4.3)
52
- activesupport (= 7.0.4.3)
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.4.3)
58
- activesupport (= 7.0.4.3)
57
+ activejob (7.0.7)
58
+ activesupport (= 7.0.7)
59
59
  globalid (>= 0.3.6)
60
- activemodel (7.0.4.3)
61
- activesupport (= 7.0.4.3)
62
- activerecord (7.0.4.3)
63
- activemodel (= 7.0.4.3)
64
- activesupport (= 7.0.4.3)
65
- activestorage (7.0.4.3)
66
- actionpack (= 7.0.4.3)
67
- activejob (= 7.0.4.3)
68
- activerecord (= 7.0.4.3)
69
- activesupport (= 7.0.4.3)
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.4.3)
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.12.0)
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.19.1)
95
+ loofah (2.21.3)
96
96
  crass (~> 1.0.2)
97
- nokogiri (>= 1.5.9)
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.2)
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.4)
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.8)
123
- nokogiri (1.14.2)
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.6.2)
134
- rack (2.2.6.4)
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.4.3)
138
- actioncable (= 7.0.4.3)
139
- actionmailbox (= 7.0.4.3)
140
- actionmailer (= 7.0.4.3)
141
- actionpack (= 7.0.4.3)
142
- actiontext (= 7.0.4.3)
143
- actionview (= 7.0.4.3)
144
- activejob (= 7.0.4.3)
145
- activemodel (= 7.0.4.3)
146
- activerecord (= 7.0.4.3)
147
- activestorage (= 7.0.4.3)
148
- activesupport (= 7.0.4.3)
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.4.3)
151
- rails-dom-testing (2.0.3)
152
- activesupport (>= 4.2.0)
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.5.0)
155
- loofah (~> 2.19, >= 2.19.1)
156
- railties (7.0.4.3)
157
- actionpack (= 7.0.4.3)
158
- activesupport (= 7.0.4.3)
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.66.0)
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.3.2)
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.5)
196
+ websocket-driver (0.7.6)
196
197
  websocket-extensions (>= 0.1.0)
197
198
  websocket-extensions (0.1.5)
198
- zeitwerk (2.6.7)
199
+ zeitwerk (2.6.11)
199
200
 
200
201
  PLATFORMS
201
202
  ruby
@@ -51,7 +51,7 @@ module Sequel
51
51
  end
52
52
 
53
53
  initializer "sequel.connection" do
54
- in_rake = Rails.const_defined?("Rake") && Rake.application.top_level_tasks.length > 0
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
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sequel
4
4
  module Rails
5
- VERSION = "0.4.0"
5
+ VERSION = "0.4.1"
6
6
  end
7
7
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequelize-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenaniah Cerny