sourced_config 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7dfe40bcfa6018fed56ca0031fc925a621f7efefac5c840fd403a0b87a0fb546
4
- data.tar.gz: b1ab2ef0c2d10068aedefd39c236c9c5012952896333977180775b7953f5d0ab
3
+ metadata.gz: 50363af2f60bac3d001b53d6cd543b2811b34c00f8ecba3244414276440f7c99
4
+ data.tar.gz: 4896301d15eb303a5b82edae28b4f09c72dfb19b597cdccd181ddc4af11559d8
5
5
  SHA512:
6
- metadata.gz: 5315cacb05c9f4fd5e4d937820fa5b3cc7eb35e2a457fd39df08cba91eb06ea0a306095f6f9bc188eb98d81a0ef95b72053a23d2fe5fae8992af2d0c8706b338
7
- data.tar.gz: 36e2f37091f40b74adb0173a89012a35e7a126bafa7caeee37a74b44b0fccf6d68acca9b9ea753645ca64d4421979f85b0a937d5433011f250fba96dc9ad9df7
6
+ metadata.gz: fc24f7bb912ca82d250b78d03eabde24cdcc92d757a64d40fcfff41c4963ce4cbe0273019d1d9542f28180160f825a40511d654efac8173064cc07e0e9f75f5c
7
+ data.tar.gz: 48edcddc0b10715ecbdee59f52956748afda5426f5becd608d75d7f7a54f6c8a56d68083f0e37e7e1b06c5c973f20b42eb58b93f9f3c7254a0d4ff85e45248b4
@@ -12,7 +12,7 @@ module SourcedConfig
12
12
  def copy_tasks
13
13
  template "templates/sourced_config.rb", "config/initializers/sourced_config.rb"
14
14
 
15
- append_to_file 'config/application.rb' do
15
+ application do
16
16
  <<RUBY
17
17
  # Initialise watch of application configuration
18
18
  config.after_initialize { |app| ::SourcedConfig.setup(app) }
@@ -1,26 +1,29 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- SourcedConfig.configure do |config|
4
- # This is the class that will be used to validate the configuration. The default is the minimum configuration
5
- # required, `SourcedConfig::ConfigContract` but you should create your own class that inherits from it and define
6
- # your own configuration schema as needed.
7
- # config.config_schema_klass = SourcedConfig::ConfigContract
3
+ # Configure after autoloading of constants so schema class can be specified
4
+ Rails.application.config.to_prepare do
5
+ SourcedConfig.configure do |config|
6
+ # This is the class that will be used to validate the configuration. The default is the minimum configuration
7
+ # required, `SourcedConfig::ConfigContract` but you should create your own class that inherits from it and define
8
+ # your own configuration schema as needed.
9
+ # config.config_schema_klass = SourcedConfig::ConfigContract
8
10
 
9
- # The base configuration file path. This is always required and loaded first. It can be an ERB file.
10
- # config.base_configuration_file_path = Rails.root.join("config/config.yml.erb")
11
+ # The base configuration file path. This is always required and loaded first. It can be an ERB file.
12
+ # config.base_configuration_file_path = Rails.root.join("config/config.yml.erb")
11
13
 
12
- # The type of configuration source to use. If not specified the configuration is loaded only from the default source
13
- # in `base_configuration_file_path`. Can be one of:
14
- # `SourcedConfig::ConfigManager::SOURCE_TYPE_LOCAL_FILE`
15
- # `SourcedConfig::ConfigManager::SOURCE_TYPE_S3_CONFIG_BUCKET`
16
- # config.config_type = SourcedConfig::ConfigManager::SOURCE_TYPE_LOCAL_FILE
14
+ # The type of configuration source to use. If not specified the configuration is loaded only from the default source
15
+ # in `base_configuration_file_path`. Can be one of:
16
+ # `SourcedConfig::ConfigManager::SOURCE_TYPE_LOCAL_FILE`
17
+ # `SourcedConfig::ConfigManager::SOURCE_TYPE_S3_CONFIG_BUCKET`
18
+ # config.config_type = SourcedConfig::ConfigManager::SOURCE_TYPE_LOCAL_FILE
17
19
 
18
- # The path to the configuration file if loading a local file. It *cannot* be an ERB file.
19
- # config.configuration_file_path = Rails.root.join("custom_config/config.yml")
20
+ # The path to the configuration file if loading a local file. It *cannot* be an ERB file.
21
+ # config.configuration_file_path = Rails.root.join("custom_config/config.yml")
20
22
 
21
- # If the remote configuration source is an S3 bucket, the bucket name of said bucket.
22
- # config.configuration_bucket = "my-bucket-name"
23
+ # If the remote configuration source is an S3 bucket, the bucket name of said bucket.
24
+ # config.configuration_bucket = "my-bucket-name"
23
25
 
24
- # If the remote configuration source is an S3 bucket, the region of said bucket.
25
- # config.configuration_bucket_region = "us-east-1"
26
+ # If the remote configuration source is an S3 bucket, the region of said bucket.
27
+ # config.configuration_bucket_region = "us-east-1"
28
+ end
26
29
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SourcedConfig
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sourced_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Ierodiaconou