super_settings 2.1.1 → 2.1.2

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: c245924ff453f5cd0bde098003e6dc05d54b21aba4a42ddaf7c614c63233a542
4
- data.tar.gz: fb8672624d5c688794f8492be263534ed4e46ac49684f76d9bbf3bd120b62579
3
+ metadata.gz: ecd3fc92a5668536f7d1300641505730c603b2c539dc069469e8559b1fbda7c2
4
+ data.tar.gz: c654d8ff805fda401c43b2df65a4f853330f5182398f7462f3d8954af4ae47e0
5
5
  SHA512:
6
- metadata.gz: 605db9f00bbd1865203caaf7515c3d5f1ad83911653dd9410c69344dda0b21b8e58167806186969a6d2b27d4867a61d97b29333715c3f139741f16a3d3b0a635
7
- data.tar.gz: b1565e3ace970a26a8d126ec27e3bee6786b5da85e33e25bbde5a947af12e8067a23d143870b7012dd449b86ab5658fbeb99fb365bc8f738276cf8672ffc318d
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
1
+ 2.1.2
@@ -57,15 +57,23 @@ module SuperSettings
57
57
  end
58
58
 
59
59
  def with_connection(&block)
60
- Model.connection_pool.with_connection(&block)
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.transaction(&block)
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
- ApplicationRecord.transaction do
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.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-02 00:00:00.000000000 Z
11
+ date: 2024-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler