figjam 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/figjam/application.rb +15 -2
- data/lib/figjam/rails.rb +1 -1
- data/lib/figjam/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0ed678f68603cf0ac2b6a695ae0c0516626c229964edc3e1b8175e2a306e210
|
4
|
+
data.tar.gz: 46b53becca0e9b613496b1c5699fc7ba4d486d3a95ac841751eafaa9c2fbd91b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8e492711470e7b4aaa1a999d00d2feedfb9e116d4f93a1393183ad9e4ff4f6c65283150d3ff3d0539b199be45c819db85f4b4f4132caac138ff69b5cd58d828
|
7
|
+
data.tar.gz: 96f49716a0ba722587c3553b2f2463ed9fa239c5bf498a4e82dd1642ada3a3c7d3e4ab55f9fb57136ca7f041c1fa59d1726c9d696a9ed71444feb50c98c09343
|
data/lib/figjam/application.rb
CHANGED
@@ -5,6 +5,10 @@ require "figjam/figaro_alias"
|
|
5
5
|
module Figjam
|
6
6
|
class Application
|
7
7
|
FIGARO_ENV_PREFIX = "_FIGARO_"
|
8
|
+
SILENCE_STRING_WARNINGS_KEYS = %i[
|
9
|
+
FIGARO_SILENCE_STRING_WARNINGS
|
10
|
+
FIGJAM_SILENCE_STRING_WARNINGS
|
11
|
+
]
|
8
12
|
|
9
13
|
include Enumerable
|
10
14
|
|
@@ -70,8 +74,10 @@ module Figjam
|
|
70
74
|
end
|
71
75
|
|
72
76
|
def set(key, value)
|
73
|
-
|
74
|
-
|
77
|
+
unless non_string_warnings_silenced?
|
78
|
+
non_string_configuration!(key) unless key.is_a?(String)
|
79
|
+
non_string_configuration!(value) unless value.is_a?(String) || value.nil?
|
80
|
+
end
|
75
81
|
|
76
82
|
::ENV[key.to_s] = value.nil? ? nil : value.to_s
|
77
83
|
::ENV[FIGARO_ENV_PREFIX + key.to_s] = value.nil? ? nil: value.to_s
|
@@ -81,6 +87,13 @@ module Figjam
|
|
81
87
|
::ENV.key?(key.to_s) && !::ENV.key?(FIGARO_ENV_PREFIX + key.to_s)
|
82
88
|
end
|
83
89
|
|
90
|
+
def non_string_warnings_silenced?
|
91
|
+
SILENCE_STRING_WARNINGS_KEYS.any? { |key|
|
92
|
+
# Allow the silence configuration itself to use non-string keys/values.
|
93
|
+
configuration.values_at(key.to_s, key).any? { |cv| cv.to_s == 'true' }
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
84
97
|
def non_string_configuration!(value)
|
85
98
|
warn "WARNING: Use strings for Figjam configuration. #{value.inspect} was converted to #{value.to_s.inspect}."
|
86
99
|
end
|
data/lib/figjam/rails.rb
CHANGED
data/lib/figjam/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: figjam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harry Lascelles
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -72,6 +72,20 @@ dependencies:
|
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: combustion
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
75
89
|
- !ruby/object:Gem::Dependency
|
76
90
|
name: fasterer
|
77
91
|
requirement: !ruby/object:Gem::Requirement
|