figjam 1.4.0 → 1.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63193ca4ccdc6bd4f2ef6176e38a4ffc60a9dbd3443f72f7115eafbea7d824e2
4
- data.tar.gz: 79a43ae8ab92ebb0b96b87a774fd8960e773fa86d37b6e55b189135c1c4dd23d
3
+ metadata.gz: a0ed678f68603cf0ac2b6a695ae0c0516626c229964edc3e1b8175e2a306e210
4
+ data.tar.gz: 46b53becca0e9b613496b1c5699fc7ba4d486d3a95ac841751eafaa9c2fbd91b
5
5
  SHA512:
6
- metadata.gz: f2f5091a1abcdf7907f0e4fd7afb02505d00fb250a59d3c340d02bf73e93375bd4b2e7d74c5d7b28f9eda7131496fdbf4f93c0a3da086225eda06cb5d5238215
7
- data.tar.gz: be33071b27c9053afd3ace0d8d9767b140ee79bbe1e35ff742372a5965509ff809b266f5241d5278792f76d52cd126d10bde80c3ddd420b004fe8d070587e1b2
6
+ metadata.gz: f8e492711470e7b4aaa1a999d00d2feedfb9e116d4f93a1393183ad9e4ff4f6c65283150d3ff3d0539b199be45c819db85f4b4f4132caac138ff69b5cd58d828
7
+ data.tar.gz: 96f49716a0ba722587c3553b2f2463ed9fa239c5bf498a4e82dd1642ada3a3c7d3e4ab55f9fb57136ca7f041c1fa59d1726c9d696a9ed71444feb50c98c09343
@@ -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
- non_string_configuration!(key) unless key.is_a?(String)
74
- non_string_configuration!(value) unless value.is_a?(String) || value.nil?
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
@@ -5,8 +5,8 @@ begin
5
5
  rescue LoadError
6
6
  else
7
7
  require "figjam/rails/application"
8
- require "figjam/rails/railtie"
9
8
 
10
9
  Figjam.adapter = Figjam::Rails::Application
10
+ require "figjam/rails/railtie"
11
11
  end
12
12
 
@@ -1,3 +1,3 @@
1
1
  module Figjam
2
- VERSION = "1.4.0"
2
+ VERSION = "1.5.0"
3
3
  end
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.0
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-14 00:00:00.000000000 Z
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