super_settings 2.1.1 → 2.1.2
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 +6 -0
- data/README.md +0 -2
- data/VERSION +1 -1
- data/lib/super_settings/storage/active_record_storage.rb +11 -3
- 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: ecd3fc92a5668536f7d1300641505730c603b2c539dc069469e8559b1fbda7c2
|
4
|
+
data.tar.gz: c654d8ff805fda401c43b2df65a4f853330f5182398f7462f3d8954af4ae47e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b97bc579ecce698c0080dab893456d36d5c3a7144695f07a13a03df1c1fb23df182c61155001066befc03922cbc945e35b43198d1d6e8fb0636faedc540bd2ce
|
7
|
+
data.tar.gz: 690abe15783bb18ca0e71494140c9d554f6ae532542a734d3027911fe771e4e93b1fde67dde18558872885e5e9b9edca96bda6587ca351847674d725e544b3c7
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## 2.1.2
|
8
|
+
|
9
|
+
### Fixed
|
10
|
+
|
11
|
+
- Fixed ActiveRecord code ensure there are connections to the database before attempting to checkout a connection to avoid errors when the database is not available.
|
12
|
+
|
7
13
|
## 2.1.1
|
8
14
|
|
9
15
|
### Fixed
|
data/README.md
CHANGED
@@ -393,12 +393,10 @@ bundle exec rackup
|
|
393
393
|
|
394
394
|
By default this will use Redis for storage using the default Redis URL. You can change the storage engine with the `STORAGE` environment variable.
|
395
395
|
|
396
|
-
- `active_record` - Use the ActiveRecord storage engine.
|
397
396
|
- `redis` - Use the Redis storage engine. The Redis URL can be set with the `REDIS_URL` environment variable.
|
398
397
|
- `http` - Use the HTTP storage engine. The URL for the REST API can be set with the `REST_API_URL` environment variable.
|
399
398
|
- `s3` - Use the S3 storage engine. The S3 URL can be set with the `S3_URL` environment variable.
|
400
399
|
- `mongodb` - Use the MongoDB storage engine. The MongoDB URL can be set with the `MONGODB_URL` environment variable.
|
401
|
-
- `null` - Use the null storage engine. This storage engine does not store settings at all.
|
402
400
|
|
403
401
|
You can bring up all of these storage engines locally with the included docker-compose configuration.
|
404
402
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.2
|
@@ -57,15 +57,23 @@ module SuperSettings
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def with_connection(&block)
|
60
|
-
Model.
|
60
|
+
if Model.available?
|
61
|
+
Model.connection_pool.with_connection(&block)
|
62
|
+
else
|
63
|
+
yield
|
64
|
+
end
|
61
65
|
end
|
62
66
|
|
63
67
|
def transaction(&block)
|
64
|
-
Model.
|
68
|
+
if Model.available?
|
69
|
+
Model.transaction(&block)
|
70
|
+
else
|
71
|
+
yield
|
72
|
+
end
|
65
73
|
end
|
66
74
|
|
67
75
|
def destroy_all
|
68
|
-
|
76
|
+
Model.transaction do
|
69
77
|
Model.delete_all
|
70
78
|
HistoryModel.delete_all
|
71
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: super_settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Durand
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|