app_configurable 0.1.0 → 0.1.1

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: 2bbcefb59395aa424d071c1f2122d7f051e87571ff75d62eb56c80c4c3fc6ec4
4
- data.tar.gz: b095757dfcf1351ed5fabe65106dcf8a8a039a7a62744f8b811620dd0ef537f6
3
+ metadata.gz: '008ea1c3e9903d1ade8d43500aee26d9006173f2a51fd94ad20bda97f682a693'
4
+ data.tar.gz: 0d905a63926d10af5b3f660d0e9c9051c4e4f44d190919c1c93e11c7b50cc598
5
5
  SHA512:
6
- metadata.gz: ce77b5158704203937bc2460bf5020d4b34200598c3f85e4e5e832935f5ee29d4c784ed12ded51d159770e820ad64a74dcb9d4c5e004fa2cbc1064282901b805
7
- data.tar.gz: d9335f684c5da7ea160030d0da4d28642f73dd779059508a60a9e9b89240353a79fdaf62313936337506979c2f89b377464d08283e9f94978ab79092545ddd49
6
+ metadata.gz: 5d98d1e7c611cc49a14a3ba0cec6fa1f1785fa9a3bd84b34cf663d1b0a1d4e3b27e4e0285af004565db73ad4a587d7b5e2f5b5f10bb1a40d3bec61204167c21f
7
+ data.tar.gz: a5c238318515ebfe84cb4df741bc50b8be30a183b3f9c41f07e94fe11867743d10ecf67fbe83589f92d8e196d054344ffb67c5e89d75dcf683cdfe42faa8bc62
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_configurable (0.1.0)
4
+ app_configurable (0.1.1)
5
5
  dotenv
6
6
 
7
7
  GEM
@@ -83,7 +83,6 @@ GEM
83
83
  benchmark (0.4.0)
84
84
  bigdecimal (3.1.8)
85
85
  builder (3.3.0)
86
- byebug (11.1.3)
87
86
  concurrent-ruby (1.3.4)
88
87
  connection_pool (2.4.1)
89
88
  crass (1.0.6)
@@ -100,7 +99,7 @@ GEM
100
99
  irb (1.14.1)
101
100
  rdoc (>= 4.0.0)
102
101
  reline (>= 0.4.2)
103
- json (2.7.6)
102
+ json (2.8.2)
104
103
  language_server-protocol (3.17.0.3)
105
104
  logger (1.6.1)
106
105
  loofah (2.23.1)
@@ -124,11 +123,19 @@ GEM
124
123
  net-smtp (0.5.0)
125
124
  net-protocol
126
125
  nio4r (2.7.4)
126
+ nokogiri (1.16.7-aarch64-linux)
127
+ racc (~> 1.4)
128
+ nokogiri (1.16.7-arm-linux)
129
+ racc (~> 1.4)
127
130
  nokogiri (1.16.7-arm64-darwin)
128
131
  racc (~> 1.4)
132
+ nokogiri (1.16.7-x86-linux)
133
+ racc (~> 1.4)
134
+ nokogiri (1.16.7-x86_64-darwin)
135
+ racc (~> 1.4)
129
136
  nokogiri (1.16.7-x86_64-linux)
130
137
  racc (~> 1.4)
131
- parallel (1.24.0)
138
+ parallel (1.26.3)
132
139
  parser (3.3.6.0)
133
140
  ast (~> 2.4.1)
134
141
  racc
@@ -173,7 +180,7 @@ GEM
173
180
  zeitwerk (~> 2.6)
174
181
  rainbow (3.1.1)
175
182
  rake (13.2.1)
176
- rdoc (6.7.0)
183
+ rdoc (6.8.1)
177
184
  psych (>= 4.0.0)
178
185
  regexp_parser (2.9.2)
179
186
  reline (0.5.11)
@@ -231,13 +238,15 @@ GEM
231
238
  zeitwerk (2.6.18)
232
239
 
233
240
  PLATFORMS
234
- arm64-darwin-23
235
- arm64-darwin-24
241
+ aarch64-linux
242
+ arm-linux
243
+ arm64-darwin
244
+ x86-linux
245
+ x86_64-darwin
236
246
  x86_64-linux
237
247
 
238
248
  DEPENDENCIES
239
249
  app_configurable!
240
- byebug
241
250
  rails (> 7.1)
242
251
  rake (~> 13.0)
243
252
  rspec (~> 3.0)
@@ -248,4 +257,4 @@ DEPENDENCIES
248
257
  rubocop-rspec_rails (~> 2.30.0)
249
258
 
250
259
  BUNDLED WITH
251
- 2.4.12
260
+ 2.5.11
data/README.md CHANGED
@@ -46,7 +46,7 @@ Example: `entry :rails_serve_static_files`.
46
46
  2) Gets value from `test` environment attribute.
47
47
  3) Returns `some_super_dummy_#{namespaced_attribute_name}`, ignores specified `default` attribute.
48
48
 
49
- ### Setting the environment
49
+ ### Setting the environment:
50
50
  You could set environment per namespace like so:
51
51
 
52
52
  Given namespace `AppConfig::MyNiceConfigClass` and `.env.staging`
@@ -57,6 +57,18 @@ APPCONFIG_MYNICEMODULE_ENV=staging rspec
57
57
 
58
58
  *`.env.#{RAILS_ENV}` will be read per specific `AppConfig::SomeNiceClass` class.*
59
59
 
60
+ ### Fail on startup:
61
+ Create a new initializer in `config/initializers/_app_config.rb`
62
+
63
+ ```
64
+ # Require your config files
65
+ require './config/app_config' # Root-level configs.
66
+ FileList['./config/app_config/*.rb'].each { |file| require file } # Secondary-level/namespaced configs.
67
+
68
+ missing = AppConfigurable.missing_required_vars
69
+ missing.present? and raise "Missing required ENV variables/encrypted credentials: #{missing.inspect}"
70
+ ```
71
+
60
72
  ### TODO:
61
73
  - Read `Rails.application.credentials`
62
74
  - Make dynamic switch possible, simillar to what we have with `ENV`.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppConfigurable
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_configurable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmytro Pasichnyk
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: byebug
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rails
43
29
  requirement: !ruby/object:Gem::Requirement