rails-settings-cached 2.9.0 → 2.9.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: 4f2fb5c3b8b6bd86c138a0650c9d0462df1bede6e446600d6fdfe7064c9d1d2c
4
- data.tar.gz: ac5d5ab2b3f26bbdc92a3b5dbe7a879d8feb11d5a0bd664ce9e6cae87b79d336
3
+ metadata.gz: 39d71006c4cd637ddb495d703487eda60b7fb1c6ef7faebcf52154f69073a59b
4
+ data.tar.gz: 40520bb31ea809e805ad568a653b0c4f5cfbb80de54473c9aa8d55d8279f3b38
5
5
  SHA512:
6
- metadata.gz: 91aa31a22a69142164d52ee13792a6622b9a9088cd353ef9dd310919e60bbecf2be4a9c1ecd4a6729684fdd850cc1862988090143e78860ab46574d9573969b9
7
- data.tar.gz: a2f5b013f134246ecb8f1a64a2ba0a3a947ae2fb6af1c06ad6b3d8f050d6de4fc05b7526fcc36ef72099095cde3975ef1e80e1fd11232dddfc1e29e5f14b5240
6
+ metadata.gz: f95ff5d1b2833238b81c44aa326c4a137bd02e303d31df40bbcd85a8bdce178bdd2d9261d12b8ce0d67d75678c461f61de9ab79093b289194401f755aad0eef7
7
+ data.tar.gz: '0689d816a85358374c654f1f996ea1b6930b47fd9099333d25484276ebb326c332d4f594574b67d822961e04d4ecd55c4da8c80bd29266b751861b7960931502'
@@ -22,8 +22,10 @@ module RailsSettings
22
22
  return parent.send(:_all_settings)[key] if table_exists?
23
23
 
24
24
  # Fallback to default value if table was not ready (before migrate)
25
- puts "WARNING: table: \"#{parent.table_name}\" does not exist or not database connection, `#{parent.name}.#{key}` fallback to returns the default value."
26
- nil
25
+ puts(
26
+ "WARNING: table: \"#{parent.table_name}\" does not exist or not database connection, `#{parent.name}.#{key}` fallback to returns the default value."
27
+ )
28
+ nil
27
29
  end
28
30
 
29
31
  def default_value
@@ -62,8 +64,12 @@ module RailsSettings
62
64
  private
63
65
 
64
66
  def fetch_field_class(type)
65
- field_class_name = type.to_s.split('_').map(&:capitalize).join('')
66
- const_get("::RailsSettings::Fields::#{field_class_name}")
67
+ field_class_name = type.to_s.split("_").map(&:capitalize).join("")
68
+ begin
69
+ const_get("::RailsSettings::Fields::#{field_class_name}")
70
+ rescue StandardError
71
+ ::RailsSettings::Fields::String
72
+ end
67
73
  end
68
74
  end
69
75
  end
@@ -3,7 +3,7 @@
3
3
  module RailsSettings
4
4
  class << self
5
5
  def version
6
- "2.9.0"
6
+ "2.9.1"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-settings-cached
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-29 00:00:00.000000000 Z
11
+ date: 2023-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties