unified_settings 0.2.1 → 0.2.2

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: 4aadb20f7ae9d5b03d0df3b78ce532cc9e7deb4193471097c0835e7509b6eec4
4
- data.tar.gz: ea98f51bb20b3169505161702b044d3271d5f60829dba57ce64c57b4b908976f
3
+ metadata.gz: 5d897734e735f41188db95e41e35b0d756de0368c300d805515e6135b31bd45e
4
+ data.tar.gz: 2a807b9e87356e0768dc4258eaac9682d9e1ab144af5c0e72d2a4927a4b87a24
5
5
  SHA512:
6
- metadata.gz: b52847cae5fe4a75d8b78902663b1f8f045c8eb89e8a239d0f9e4f8fd185959793c9b5d7b76f8b878744efd3678347196f7647d1db259b9ebdafae8b4e756e58
7
- data.tar.gz: 4cb168caf88aebda8c2613475b4e66a418ee274cf3d22c8bc805cba0c02f65697d95f242a547b17339ad874ac8d8341b91300cb2d0a54077ad585691fac0a1ce
6
+ metadata.gz: 5703898c82a5473e47a5450a330fa547fee31ea33e2c3df97834ffa871fb33614edec7dd29e47027ad78c353c2aab06ebad212ea306be216bfdeddc712bd938a
7
+ data.tar.gz: 92704cc58d63aeadec87ec9ffc72071fbb37f030df8f810f27f379fa1d9bbe01dde47f0eae285711ee7389bc13a41f20c96a1cff545c4e8bf3c690e3ec78e6db
data/Gemfile CHANGED
@@ -21,7 +21,7 @@ gem 'ruby_audit', '>= 0'
21
21
  ##
22
22
 
23
23
  # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
24
- gem 'rails', '~> 8.0.0'
24
+ gem 'rails', '~> 8.1.2'
25
25
 
26
26
  # The modern asset pipeline for Rails
27
27
  # https://github.com/rails/propshaft
@@ -29,7 +29,7 @@ gem 'propshaft'
29
29
 
30
30
  # Use the Puma web server
31
31
  # [https://github.com/puma/puma]
32
- gem 'puma', '~> 6.0'
32
+ gem 'puma', '~> 7.2'
33
33
 
34
34
  # Build JSON APIs with ease
35
35
  # [https://github.com/rails/jbuilder]
data/Gemfile.lock CHANGED
@@ -1,36 +1,38 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unified_settings (0.2.1)
4
+ unified_settings (0.2.2)
5
5
  activerecord (> 4.2.0)
6
6
  activesupport (> 4.2.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (8.0.4)
12
- actionpack (= 8.0.4)
13
- activesupport (= 8.0.4)
11
+ action_text-trix (2.1.16)
12
+ railties
13
+ actioncable (8.1.2)
14
+ actionpack (= 8.1.2)
15
+ activesupport (= 8.1.2)
14
16
  nio4r (~> 2.0)
15
17
  websocket-driver (>= 0.6.1)
16
18
  zeitwerk (~> 2.6)
17
- actionmailbox (8.0.4)
18
- actionpack (= 8.0.4)
19
- activejob (= 8.0.4)
20
- activerecord (= 8.0.4)
21
- activestorage (= 8.0.4)
22
- activesupport (= 8.0.4)
19
+ actionmailbox (8.1.2)
20
+ actionpack (= 8.1.2)
21
+ activejob (= 8.1.2)
22
+ activerecord (= 8.1.2)
23
+ activestorage (= 8.1.2)
24
+ activesupport (= 8.1.2)
23
25
  mail (>= 2.8.0)
24
- actionmailer (8.0.4)
25
- actionpack (= 8.0.4)
26
- actionview (= 8.0.4)
27
- activejob (= 8.0.4)
28
- activesupport (= 8.0.4)
26
+ actionmailer (8.1.2)
27
+ actionpack (= 8.1.2)
28
+ actionview (= 8.1.2)
29
+ activejob (= 8.1.2)
30
+ activesupport (= 8.1.2)
29
31
  mail (>= 2.8.0)
30
32
  rails-dom-testing (~> 2.2)
31
- actionpack (8.0.4)
32
- actionview (= 8.0.4)
33
- activesupport (= 8.0.4)
33
+ actionpack (8.1.2)
34
+ actionview (= 8.1.2)
35
+ activesupport (= 8.1.2)
34
36
  nokogiri (>= 1.8.5)
35
37
  rack (>= 2.2.4)
36
38
  rack-session (>= 1.0.1)
@@ -38,42 +40,43 @@ GEM
38
40
  rails-dom-testing (~> 2.2)
39
41
  rails-html-sanitizer (~> 1.6)
40
42
  useragent (~> 0.16)
41
- actiontext (8.0.4)
42
- actionpack (= 8.0.4)
43
- activerecord (= 8.0.4)
44
- activestorage (= 8.0.4)
45
- activesupport (= 8.0.4)
43
+ actiontext (8.1.2)
44
+ action_text-trix (~> 2.1.15)
45
+ actionpack (= 8.1.2)
46
+ activerecord (= 8.1.2)
47
+ activestorage (= 8.1.2)
48
+ activesupport (= 8.1.2)
46
49
  globalid (>= 0.6.0)
47
50
  nokogiri (>= 1.8.5)
48
- actionview (8.0.4)
49
- activesupport (= 8.0.4)
51
+ actionview (8.1.2)
52
+ activesupport (= 8.1.2)
50
53
  builder (~> 3.1)
51
54
  erubi (~> 1.11)
52
55
  rails-dom-testing (~> 2.2)
53
56
  rails-html-sanitizer (~> 1.6)
54
- activejob (8.0.4)
55
- activesupport (= 8.0.4)
57
+ activejob (8.1.2)
58
+ activesupport (= 8.1.2)
56
59
  globalid (>= 0.3.6)
57
- activemodel (8.0.4)
58
- activesupport (= 8.0.4)
59
- activerecord (8.0.4)
60
- activemodel (= 8.0.4)
61
- activesupport (= 8.0.4)
60
+ activemodel (8.1.2)
61
+ activesupport (= 8.1.2)
62
+ activerecord (8.1.2)
63
+ activemodel (= 8.1.2)
64
+ activesupport (= 8.1.2)
62
65
  timeout (>= 0.4.0)
63
- activestorage (8.0.4)
64
- actionpack (= 8.0.4)
65
- activejob (= 8.0.4)
66
- activerecord (= 8.0.4)
67
- activesupport (= 8.0.4)
66
+ activestorage (8.1.2)
67
+ actionpack (= 8.1.2)
68
+ activejob (= 8.1.2)
69
+ activerecord (= 8.1.2)
70
+ activesupport (= 8.1.2)
68
71
  marcel (~> 1.0)
69
- activesupport (8.0.4)
72
+ activesupport (8.1.2)
70
73
  base64
71
- benchmark (>= 0.3)
72
74
  bigdecimal
73
75
  concurrent-ruby (~> 1.0, >= 1.3.1)
74
76
  connection_pool (>= 2.2.5)
75
77
  drb
76
78
  i18n (>= 1.6, < 2)
79
+ json
77
80
  logger (>= 1.4.2)
78
81
  minitest (>= 5.1)
79
82
  securerandom (>= 0.3)
@@ -83,7 +86,6 @@ GEM
83
86
  public_suffix (>= 2.0.2, < 8.0)
84
87
  ast (2.4.3)
85
88
  base64 (0.3.0)
86
- benchmark (0.5.0)
87
89
  bigdecimal (4.0.1)
88
90
  bootsnap (1.21.1)
89
91
  msgpack (~> 1.2)
@@ -187,7 +189,7 @@ GEM
187
189
  date
188
190
  stringio
189
191
  public_suffix (7.0.2)
190
- puma (6.6.1)
192
+ puma (7.2.0)
191
193
  nio4r (~> 2.0)
192
194
  racc (1.8.1)
193
195
  rack (3.2.4)
@@ -198,20 +200,20 @@ GEM
198
200
  rack (>= 1.3)
199
201
  rackup (2.3.1)
200
202
  rack (>= 3)
201
- rails (8.0.4)
202
- actioncable (= 8.0.4)
203
- actionmailbox (= 8.0.4)
204
- actionmailer (= 8.0.4)
205
- actionpack (= 8.0.4)
206
- actiontext (= 8.0.4)
207
- actionview (= 8.0.4)
208
- activejob (= 8.0.4)
209
- activemodel (= 8.0.4)
210
- activerecord (= 8.0.4)
211
- activestorage (= 8.0.4)
212
- activesupport (= 8.0.4)
203
+ rails (8.1.2)
204
+ actioncable (= 8.1.2)
205
+ actionmailbox (= 8.1.2)
206
+ actionmailer (= 8.1.2)
207
+ actionpack (= 8.1.2)
208
+ actiontext (= 8.1.2)
209
+ actionview (= 8.1.2)
210
+ activejob (= 8.1.2)
211
+ activemodel (= 8.1.2)
212
+ activerecord (= 8.1.2)
213
+ activestorage (= 8.1.2)
214
+ activesupport (= 8.1.2)
213
215
  bundler (>= 1.15.0)
214
- railties (= 8.0.4)
216
+ railties (= 8.1.2)
215
217
  rails-dom-testing (2.3.0)
216
218
  activesupport (>= 5.0.0)
217
219
  minitest
@@ -219,9 +221,9 @@ GEM
219
221
  rails-html-sanitizer (1.6.2)
220
222
  loofah (~> 2.21)
221
223
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
222
- railties (8.0.4)
223
- actionpack (= 8.0.4)
224
- activesupport (= 8.0.4)
224
+ railties (8.1.2)
225
+ actionpack (= 8.1.2)
226
+ activesupport (= 8.1.2)
225
227
  irb (~> 1.13)
226
228
  rackup (>= 1.0.0)
227
229
  rake (>= 12.2)
@@ -321,8 +323,8 @@ DEPENDENCIES
321
323
  debug
322
324
  minitest (~> 5.0)
323
325
  propshaft
324
- puma (~> 6.0)
325
- rails (~> 8.0.0)
326
+ puma (~> 7.2)
327
+ rails (~> 8.1.2)
326
328
  rake (~> 13.0)
327
329
  rubocop (~> 1.21)
328
330
  rubocop-minitest
@@ -4,23 +4,33 @@ require 'logger'
4
4
 
5
5
  # Unified way to get settings
6
6
  module UnifiedSettings
7
- include ActiveSupport::Configurable
7
+ # Config object to emulate ActiveSupport::Configurable behavior that is
8
+ # deprecated in Rails 8.2
9
+ class Config
10
+ attr_accessor :handlers, :default_value, :case_sensitive, :on_missing_key,
11
+ :coercions, :coerce_arrays, :coerce_array_separator
12
+
13
+ def initialize
14
+ @handlers = [
15
+ Handlers::Env, Handlers::Credentials, Handlers::Constants
16
+ ]
17
+ @default_value = nil
18
+ @case_sensitive = false
19
+ @on_missing_key = [:log_error]
20
+ @coercions = %i[nil boolean integer float]
21
+ @coerce_arrays = true
22
+ @coerce_array_separator = ','
23
+ end
24
+ end
8
25
 
9
26
  NO_DEFAULT = :no_default
10
27
 
28
+ def self.config
29
+ @config ||= Config.new
30
+ end
31
+
11
32
  def self.configure
12
- # Set the defaults
13
- config.handlers = [
14
- Handlers::Env, Handlers::Credentials, Handlers::Constants
15
- ]
16
- config.default_value = nil
17
- config.case_sensitive = false
18
- config.on_missing_key = [:log_error]
19
- config.coercions = %i[nil boolean integer float]
20
- config.coerce_arrays = true
21
- config.coerce_array_separator = ','
22
-
23
- super
33
+ yield config if block_given?
24
34
 
25
35
  # Create an instance of the settings that can be used
26
36
  @settings = Settings.new
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UnifiedSettings
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unified_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick R. Schmid