appydays 0.3.2 → 0.4.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 +4 -4
- data/lib/appydays/configurable.rb +4 -1
- data/lib/appydays/loggable/sequel_logger.rb +2 -1
- data/lib/appydays/version.rb +1 -1
- 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: fa853f6dccbb995b590e7a13204f7e02f7c8bb992630fa19344a15e751149bcf
|
4
|
+
data.tar.gz: 235896b58a7e3a1fac6fa742cf01dfd8d129a54182d09ae1dfb65ad31b60448c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 931e7d037f44b697864b519f3efe6577a02f9923e814c2201f4c1ab1aea9430416f3cfc6dd63b26f116916b32ba08d608b03919cb7be52f173b11514e73d860a
|
7
|
+
data.tar.gz: 161d5c8a250623e558426ee6be2dae1135717c6599de90d4ff38e2276f2d5b2b65de729eaf16443ae18e92f6bb923771762d9c92ab8c2bec33731c7ed154645d
|
@@ -86,6 +86,8 @@ module Appydays::Configurable
|
|
86
86
|
# If convert is passed, that is used as the converter so the default value can be any type.
|
87
87
|
# key: The key to lookup the config value from the environment.
|
88
88
|
# If nil, use an auto-generated combo of the configuration key and method name.
|
89
|
+
# If key is an array, look up each (string) value as a key.
|
90
|
+
# The first non-nil (ie, `ENV.fetch(x, nil)`) value will be used.
|
89
91
|
# convert: If provided, call it with the string value so it can be parsed.
|
90
92
|
# For example, you can parse a string JSON value here.
|
91
93
|
# Convert will not be called with the default value.
|
@@ -106,7 +108,8 @@ module Appydays::Configurable
|
|
106
108
|
end
|
107
109
|
|
108
110
|
key ||= "#{@group_key}_#{name}".upcase
|
109
|
-
|
111
|
+
keys = Array(key)
|
112
|
+
env_value = keys.filter_map { |k| ENV.fetch(k, nil) }.first
|
110
113
|
converter = self._converter(default, convert)
|
111
114
|
value = env_value.nil? ? default : converter[env_value]
|
112
115
|
value = installer._set_value(name, value, side_effect)
|
@@ -5,8 +5,9 @@ require "sequel/database/logging"
|
|
5
5
|
|
6
6
|
class Sequel::Database
|
7
7
|
def log_exception(exception, message)
|
8
|
+
level = message.match?(/^SELECT NULL AS "?nil"? FROM .* LIMIT 1$/i) ? :debug : :error
|
8
9
|
log_each(
|
9
|
-
|
10
|
+
level,
|
10
11
|
proc { "#{exception.class}: #{exception.message.strip if exception.message}: #{message}" },
|
11
12
|
proc { ["sequel_exception", {sequel_message: message}, exception] },
|
12
13
|
)
|
data/lib/appydays/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appydays
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lithic Tech
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|