activerecord-pg-extensions 0.5.3 → 0.6.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4afe6f86c7d6e70fbe8bf563f3a1a936f037e95843d0a28f40c4cf0116063d09
|
4
|
+
data.tar.gz: f698a408ffd364bed38e9b481106f3d585c0b211732d0f200962ffa25abcb13d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c1edbd6eaeb219958aad2e9c10313c74597f91d47c088f151d2b5aa716fbfa02d13a37196b93fc1f01a20861ba6bc4dc461b9437cbee950aa98d4647c4273c9
|
7
|
+
data.tar.gz: 3362f3d6025a904b697793182e83135eca5c667af94dceeefad5039ebb582f8fe1524791f26ce01f8324fd25f7da63d8cad4a019e324e98b9a00c5ad5706136c
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -16,14 +16,13 @@ See individual classes for available methods.
|
|
16
16
|
|
17
17
|
## Development
|
18
18
|
|
19
|
-
|
20
|
-
as described at https://www.postgresql.org/docs/current/libpq-envars.html to configure it. The database will be created automatically.
|
19
|
+
Development requires Docker. After checking out the repo, run `docker compose build` to install dependencies.
|
21
20
|
|
22
|
-
`rake` will run both tests and Rubocop.
|
21
|
+
`docker compose run --rm app rake` will run both tests and Rubocop.
|
23
22
|
|
24
|
-
|
23
|
+
If using Visual Studio Code, simply click "Reopen in Container" when it pops up.
|
25
24
|
|
26
|
-
To
|
25
|
+
To release a new version, update the version number in `version.rb`, and then run `rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
27
26
|
|
28
27
|
## Contributing
|
29
28
|
|
@@ -112,9 +112,10 @@ module ActiveRecord
|
|
112
112
|
else
|
113
113
|
old_search_path = schema_search_path
|
114
114
|
manual_rollback = false
|
115
|
+
result = nil
|
115
116
|
transaction(requires_new: true) do
|
116
117
|
self.schema_search_path += ",#{schema}"
|
117
|
-
yield
|
118
|
+
result = yield
|
118
119
|
self.schema_search_path = old_search_path
|
119
120
|
rescue ActiveRecord::StatementInvalid, ActiveRecord::Rollback => e
|
120
121
|
# the transaction rolling back will revert the search path change;
|
@@ -126,6 +127,8 @@ module ActiveRecord
|
|
126
127
|
# the transaction call will swallow ActiveRecord::Rollback,
|
127
128
|
# but we want it this method to be transparent
|
128
129
|
raise manual_rollback if manual_rollback
|
130
|
+
|
131
|
+
result
|
129
132
|
end
|
130
133
|
end
|
131
134
|
|
@@ -15,6 +15,9 @@ module ActiveRecord
|
|
15
15
|
return if @#{kind} == timeout
|
16
16
|
|
17
17
|
@#{kind} = timeout
|
18
|
+
# If we have set an explicit timeout, the transaction has state that must be materialized
|
19
|
+
# separately from any other transaction, so it cannot be `restartable`
|
20
|
+
dirty! unless ::Rails.version < '7.1'
|
18
21
|
return unless materialized?
|
19
22
|
connection.set(#{kind.inspect}, "\#{(timeout * 1000).to_i}ms", local: true)
|
20
23
|
end
|
metadata
CHANGED
@@ -1,71 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-pg-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '7.0'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: '8.1'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: 7.0
|
29
|
+
version: '7.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '8.1'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: railties
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - "
|
37
|
+
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: 7.0
|
39
|
+
version: '7.0'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '8.1'
|
34
43
|
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
|
-
- - "
|
47
|
+
- - ">="
|
39
48
|
- !ruby/object:Gem::Version
|
40
|
-
version: 7.0
|
41
|
-
-
|
42
|
-
name: appraisal
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '2.4'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
49
|
+
version: '7.0'
|
50
|
+
- - "<"
|
53
51
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
52
|
+
version: '8.1'
|
55
53
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
54
|
+
name: debug
|
57
55
|
requirement: !ruby/object:Gem::Requirement
|
58
56
|
requirements:
|
59
57
|
- - "~>"
|
60
58
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
59
|
+
version: '1.8'
|
62
60
|
type: :development
|
63
61
|
prerelease: false
|
64
62
|
version_requirements: !ruby/object:Gem::Requirement
|
65
63
|
requirements:
|
66
64
|
- - "~>"
|
67
65
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
66
|
+
version: '1.8'
|
69
67
|
- !ruby/object:Gem::Dependency
|
70
68
|
name: pg
|
71
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -191,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
189
|
- !ruby/object:Gem::Version
|
192
190
|
version: '0'
|
193
191
|
requirements: []
|
194
|
-
rubygems_version: 3.4.
|
192
|
+
rubygems_version: 3.4.10
|
195
193
|
signing_key:
|
196
194
|
specification_version: 4
|
197
195
|
summary: Several extensions to ActiveRecord's PostgreSQLAdapter.
|