super_settings 2.4.1 → 2.4.3

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: e851110a7e8ebb10348b536a94121aab3c6657ef7c8115f3de6fd7adcd5f1a3b
4
- data.tar.gz: 3aa309b399ee775cf5427d5e14a0b3f143e3ba0b441da4bcf41708f7806e2c17
3
+ metadata.gz: 6383a79b3768e7e5f0740c3c8d6311301376a9228ab9270f6b67b4eb7b99d886
4
+ data.tar.gz: fd6b3704596f693e41bb83a7b9face1ebfcd282ffeabc03eacf6124708bbddc7
5
5
  SHA512:
6
- metadata.gz: 79ba25dcd135459a8a5332aac5c4807fb04a183e573ae761ecd76b4b079d1772895fc2917ac2fe2c26e723193020eb43dbbb50d672dfb4f9d5e89ecd4d3a3c29
7
- data.tar.gz: 6190dca1e68e103c982696ab7075a20e39a32e4ab5cf68d213cb679e552c475feb61d4ed111d151392a1f37010c42e3b69810ebeb7d6de5ee9a46239ca1ffbdf
6
+ metadata.gz: 8c0799047ef89481db3805e1ea017d10e1442c6328fad3ad64548734d8ff35cdab3e2691924937759949e2b87b7bd4da92976c70b225e881edc4e2d875458710
7
+ data.tar.gz: 8beaf6a047e308de38a598772e56b5827353e1b8419dfcf85d5ab86699b76b1c180a93332115acff3752f0ad5b6d7c290aed79908e8933e5c6d999912fb34294
data/CHANGELOG.md CHANGED
@@ -4,6 +4,20 @@ 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.4.3
8
+
9
+ ### Fixed
10
+
11
+ - Model.availability? return false when the connection isn't established or there is no database.
12
+
13
+
14
+ ## 2.4.2
15
+
16
+ ### Fixed
17
+
18
+ - Model.availability? can return false when connection pool connection exists for active record storage
19
+
20
+
7
21
  ## 2.4.1
8
22
 
9
23
  ### Added
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.4.1
1
+ 2.4.3
@@ -15,28 +15,16 @@ module SuperSettings
15
15
 
16
16
  class << self
17
17
  # ActiveRecord storage is only available if the connection pool is connected and the table exists.
18
- def available?
19
- attempt_connection!
20
- connection_pool&.connected? && table_exists?
21
- end
22
-
23
- private
24
-
25
- @connection_attempted = false
26
-
27
- def attempt_connection!
28
- return if @connection_attempted
29
-
30
- @connection_attempted = true
31
- return if connection_pool.nil? || connection_pool.connected?
32
18
 
19
+ def available?
33
20
  begin
34
- connection_pool.with_connection do
35
- # Do nothing, just ensure that the connection is established.
36
- end
37
- rescue ActiveRecord::ConnectionNotEstablished
21
+ # table_exists? will attempt to retrieve a connection from the pool and load the schema_cache
22
+ # which is memoized per connection. If there is no database or connection, it will raise an error.
23
+ table_exists?
24
+ rescue ActiveRecord::NoDatabaseError, ActiveRecord::ConnectionNotEstablished
38
25
  # Ignore errors so the application doesn't break if the database is not available.
39
26
  # Otherwise things like build processes can fail.
27
+ false
40
28
  end
41
29
  end
42
30
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Durand
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-09-12 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: bundler
@@ -24,7 +23,6 @@ dependencies:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
25
  version: '0'
27
- description:
28
26
  email:
29
27
  - bbdurand@gmail.com
30
28
  executables: []
@@ -96,7 +94,6 @@ metadata:
96
94
  homepage_uri: https://github.com/bdurand/super_settings
97
95
  source_code_uri: https://github.com/bdurand/super_settings
98
96
  changelog_uri: https://github.com/bdurand/super_settings/blob/main/CHANGELOG.md
99
- post_install_message:
100
97
  rdoc_options: []
101
98
  require_paths:
102
99
  - lib
@@ -111,8 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
108
  - !ruby/object:Gem::Version
112
109
  version: '0'
113
110
  requirements: []
114
- rubygems_version: 3.4.10
115
- signing_key:
111
+ rubygems_version: 3.6.9
116
112
  specification_version: 4
117
113
  summary: SuperSettings provides a scalable framework for managing dynamic runtime
118
114
  application settings with in-memory caching, strong typing, a built-in web UI, and