config_reader 2.0.3 → 3.0.0

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: 78fbec26257c57d41e0e8969f2ec3ffb6ae73736134d6f3d885a4f44af401041
4
- data.tar.gz: 5b224c74ab1a851277239b562d45b9411b94f5c40b56208303e0b62b73897448
3
+ metadata.gz: 2737e810595affa2baee1814d8d0291e25be7748f40eb215634b52401677c533
4
+ data.tar.gz: c55a5f5a2bce2d866cdc93c8a1fc6b4e004d7fc693d4d26b1cb7c2fb96e11038
5
5
  SHA512:
6
- metadata.gz: ebd13bac5a7341da8fa7cc8f367aa4bbbaf66a705e9c54f18ab76f5cfa85c93448bb99883372033d98b63f8bc7da6b0d92cb70d60bd5b2dbf17302de62cb4855
7
- data.tar.gz: 36e99fa9848a53c5d10f640801f60ddb865ac4ab1aa6b84bd239a7abf8dd04e144e2334740d906ea0b056694654e1d2c668206352685eb6d7ee0845810fd255e
6
+ metadata.gz: bb4d11127268cd8dd236cb51c2237f9b6f8ee77174491ed406e788072a5ac92376eb91e7d7f4f20596f5378870426727c95eb8f38c31a079d14b6880c93953c4
7
+ data.tar.gz: 14c4bff99f6ed3ca2e75186dc019e7380af414143edcb588e494b2069083125e9371d3b704597368a590c269b1e279cfe3bc7cdd8a9a53f9b5745dc58a1fbef7
data/CHANGELOG.md CHANGED
@@ -1,63 +1,79 @@
1
- ### 2.0.2 2023-03-11
1
+ # Changelog
2
+
3
+ ## 3.0.0 2024-12-12
4
+
5
+ Update to latest Sekrets (1.14.0)
6
+ Explicitly require abbrev gem
7
+ Expose all environment configs at the Config.envs Hash
8
+
9
+ ## 2.0.4 2024-05-17
10
+
11
+ - [update rexml](https://github.com/UnderpantsGnome/config_reader-gem/pull/5)
12
+
13
+ ## 2.0.3 2024-05-10
14
+
15
+ - add dig method to be able to extract nested values programmatically
16
+
17
+ ## 2.0.2 2023-03-11
2
18
 
3
19
  - remove deep-merge dependency
4
20
 
5
- ### 2.0.1 2010-03-19
21
+ ## 2.0.1 2010-03-19
6
22
 
7
23
  - update dependencies
8
24
 
9
- ### 1.0.5 2018-02-01
25
+ ## 1.0.5 2018-02-01
10
26
 
11
27
  - pass ignore_missing_keys to nested hashes during conversion
12
28
 
13
- ### 1.0.4 2018-02-01
29
+ ## 1.0.4 2018-02-01
14
30
 
15
31
  - add a config option for Key Error behavior
16
32
 
17
- ### 1.0.3 2017-06-20
33
+ ## 1.0.3 2017-06-20
18
34
 
19
35
  - add the deep_merge gem so all keys don't need to be duplicated across env sections
20
36
 
21
- ### 0.0.9 2012-02-03
37
+ ## 0.0.9 2012-02-03
22
38
 
23
39
  - Stop abusing Hash, it's not nice
24
40
  - convert all keys to symbols internally
25
41
  - move to a bundler style gem
26
42
 
27
- ### 0.0.8 2011-05-12
43
+ ## 0.0.8 2011-05-12
28
44
 
29
45
  - Silence RAILS_ENV deprecation, thanks jeanmartin
30
46
 
31
- ### 0.0.7 2010-02-14
47
+ ## 0.0.7 2010-02-14
32
48
 
33
49
  - moved to jeweler
34
50
  - removed the annoying post install message
35
51
  - updated specs
36
52
 
37
- ### 0.0.6 2009-04-02
53
+ ## 0.0.6 2009-04-02
38
54
 
39
55
  - handle keys as ['foo'], [:foo] and .foo for real this time
40
56
  - return nil on non-existent key instead of error
41
57
 
42
- ### 0.0.5 2009-01-29
58
+ ## 0.0.5 2009-01-29
43
59
 
44
60
  - handle keys as ['foo'], [:foo] and .foo
45
61
  - return nil on non-existent key instead of error
46
62
 
47
- ### 0.0.4 2008-12-08
63
+ ## 0.0.4 2008-12-08
48
64
 
49
65
  - fix the environment merging issue, for real this time
50
66
 
51
- ### 0.0.3 2008-12-02
67
+ ## 0.0.3 2008-12-02
52
68
 
53
69
  - fix the environment merging issue
54
70
 
55
- ### 0.0.2 2008-09-10
71
+ ## 0.0.2 2008-09-10
56
72
 
57
73
  - have find_config return the file if it exists instead of looking in . and
58
74
  ./config
59
75
 
60
- ### 0.0.1 2008-08-06
76
+ ## 0.0.1 2008-08-06
61
77
 
62
78
  - 1 major enhancement:
63
79
  - Initial release
data/README.md CHANGED
@@ -20,16 +20,6 @@ Example config file:
20
20
  production:
21
21
  site_url: http://example.com
22
22
 
23
- ## Ruby 3.1 and 3.2
24
-
25
- If you want to use Sekrets with these versions of Ruby you need to use this version until upstream gets updated.
26
-
27
- ```ruby
28
- gem "sekrets",
29
- github: "UnderpantsGnome/sekrets",
30
- branch: "ruby-3-2-support"
31
- ```
32
-
33
23
  ## Sekrets
34
24
 
35
25
  Includes Sekrets integration. See <https://github.com/ahoward/sekrets> for more
@@ -42,8 +32,8 @@ The format of the sekrets file is the same as the regular file.
42
32
  class MyConfig < ConfigReader
43
33
  configure do |config|
44
34
  config.environment = Rails.env # (set this however you access the env in your app)
45
- config.config_file = 'config/my_config.yml'
46
- config.sekrets_file = 'config/my_config.yml.enc' # (default nil)
35
+ config.config_file = "config/my_config.yml"
36
+ config.sekrets_file = "config/my_config.yml.enc" # (default nil)
47
37
  config.ignore_missing_keys = true # (default false, raises KeyError)
48
38
  end
49
39
  end
@@ -52,13 +42,13 @@ The format of the sekrets file is the same as the regular file.
52
42
 
53
43
  MyConfig.mail_from #=> noreply@example.com
54
44
  MyConfig[:mail_from] #=> noreply@example.com
55
- MyConfig['mail_from'] #=> noreply@example.com
45
+ MyConfig["mail_from"] #=> noreply@example.com
56
46
 
57
47
  ## Note on Patches/Pull Requests
58
48
 
59
49
  * Fork the project.
60
50
  * Make your feature addition or bug fix.
61
- * Add tests for it. This is important so I don't break it in a future
51
+ * Add tests for it. This is important so I don"t break it in a future
62
52
  version unintentionally.
63
53
  * Commit, do not mess with rakefile, version, or history. (if you want to
64
54
  have your own version, that is fine but bump version in a commit by itself
@@ -1,20 +1,20 @@
1
1
  class ConfigReader
2
- class MagicHash < Hash
2
+ class ConfigHash < Hash
3
3
  attr_accessor :ignore_missing_keys
4
4
 
5
5
  def self.convert_hash(hash, ignore_missing_keys = false)
6
- magic_hash = new
7
- magic_hash.ignore_missing_keys = ignore_missing_keys
6
+ config_hash = new
7
+ config_hash.ignore_missing_keys = ignore_missing_keys
8
8
 
9
9
  hash.each_pair do |key, value|
10
- magic_hash[key.to_sym] = if value.is_a?(Hash)
10
+ config_hash[key.to_sym] = if value.is_a?(Hash)
11
11
  convert_hash(value, ignore_missing_keys)
12
12
  else
13
13
  value
14
14
  end
15
15
  end
16
16
 
17
- magic_hash
17
+ config_hash
18
18
  end
19
19
 
20
20
  def [](key)
@@ -25,7 +25,7 @@ class ConfigReader
25
25
 
26
26
  def method_missing(key, *args, &block)
27
27
  key?(key) ? fetch(key) : super
28
- rescue KeyError, NoMethodError => e
28
+ rescue KeyError, NoMethodError => e # skipcq: RB-P1001
29
29
  raise e unless ignore_missing_keys
30
30
  end
31
31
 
@@ -1,3 +1,3 @@
1
1
  class ConfigReader
2
- VERSION = "2.0.3"
2
+ VERSION = "3.0.0"
3
3
  end
data/lib/config_reader.rb CHANGED
@@ -1,34 +1,49 @@
1
1
  require "config_reader/version"
2
- require "config_reader/magic_hash"
3
- require "yaml"
2
+ require "config_reader/config_hash"
3
+ require "psych"
4
4
 
5
5
  begin
6
6
  require "erb"
7
7
  rescue LoadError
8
- puts "ERB not found, you won't be able to use ERB in your config"
8
+ warn "ERB not found, you won't be able to use ERB in your config"
9
9
  end
10
10
 
11
11
  class ConfigReader
12
12
  class << self
13
- attr_reader :configuration
13
+ attr_reader :envs
14
+
15
+ def [](key)
16
+ config[key.to_sym]
17
+ end
14
18
 
15
19
  def config
16
20
  @config = nil unless defined?(@config)
17
21
  @config ||= reload
18
22
  end
19
23
 
20
- def dig(*args)
21
- args.map!(&:to_sym) if args.respond_to?(:map!)
24
+ def configuration
25
+ @configuration ||= Configuration.new
26
+ end
22
27
 
23
- config.dig(*args)
28
+ def configure
29
+ self.configuration ||= Configuration.new
30
+ yield(configuration)
24
31
  end
25
32
 
26
- def reload
27
- merge_configs(load_config, load_sekrets)
33
+ def deep_merge(hash, other_hash)
34
+ hash.merge!(other_hash) do |_key, this_val, other_val|
35
+ if this_val.is_a?(Hash) && other_val.is_a?(Hash)
36
+ deep_merge(this_val, other_val)
37
+ else
38
+ other_val
39
+ end
40
+ end
28
41
  end
29
42
 
30
- def [](key)
31
- config[key.to_sym]
43
+ def dig(*args)
44
+ args.map!(&:to_sym) if args.respond_to?(:map!)
45
+
46
+ config.dig(*args)
32
47
  end
33
48
 
34
49
  def find_config
@@ -42,18 +57,6 @@ class ConfigReader
42
57
  nil
43
58
  end
44
59
 
45
- def method_missing(key, *args, &block)
46
- if key.to_s.end_with?("=")
47
- raise ArgumentError.new("ConfigReader is immutable")
48
- end
49
-
50
- config[key] || nil
51
- end
52
-
53
- def respond_to_missing?(m, *)
54
- config.key?(m)
55
- end
56
-
57
60
  def inspect
58
61
  puts config.inspect
59
62
  end
@@ -63,9 +66,17 @@ class ConfigReader
63
66
 
64
67
  conf =
65
68
  if defined?(ERB)
66
- YAML.load(ERB.new(File.read(find_config)).result)
69
+ Psych.safe_load(
70
+ ERB.new(File.read(find_config)).result,
71
+ aliases: true,
72
+ permitted_classes: configuration.permitted_classes.to_a + [Symbol]
73
+ )
67
74
  else
68
- YAML.load_file(File.read(find_config))
75
+ Psych.safe_load_file(
76
+ File.read(find_config),
77
+ aliases: true,
78
+ permitted_classes: configuration.permitted_classes.to_a + [Symbol]
79
+ )
69
80
  end
70
81
 
71
82
  raise "No config found" unless conf
@@ -90,51 +101,59 @@ class ConfigReader
90
101
  end
91
102
 
92
103
  def merge_configs(conf, sekrets)
104
+ @envs = {}
105
+ env_keys = conf.keys - ["defaults"]
93
106
  env = configuration.environment
94
107
 
95
108
  defaults = conf["defaults"]
96
109
 
97
110
  if sekrets && sekrets["defaults"]
98
- deep_merge!(defaults, sekrets["defaults"])
111
+ defaults = deep_merge(defaults, sekrets["defaults"])
99
112
  end
100
113
 
101
- deep_merge!(defaults, conf[env]) if conf[env]
102
- deep_merge!(defaults, sekrets[env]) if sekrets && sekrets[env]
114
+ env_keys.each do |key|
115
+ key_hash = deep_merge(defaults, conf[key]) if conf[key]
116
+ key_hash = deep_merge(defaults, sekrets[key]) if sekrets && sekrets[key]
117
+
118
+ @envs[key] = ConfigHash.convert_hash(
119
+ key_hash,
120
+ configuration.ignore_missing_keys
121
+ )
122
+ end
103
123
 
104
- MagicHash.convert_hash(defaults, configuration.ignore_missing_keys)
124
+ @envs[env]
105
125
  end
106
126
 
107
- def configure
108
- self.configuration ||= Configuration.new
109
- yield(configuration)
127
+ def method_missing(key, *_args, &_block)
128
+ if key.to_s.end_with?("=")
129
+ raise ArgumentError.new("ConfigReader is immutable")
130
+ end
131
+
132
+ config[key] || nil
110
133
  end
111
134
 
112
- def configuration
113
- @configuration ||= Configuration.new
135
+ def reload
136
+ merge_configs(load_config, load_sekrets)
114
137
  end
115
138
 
116
- def deep_merge!(hash, other_hash)
117
- hash.merge!(other_hash) do |key, this_val, other_val|
118
- if this_val.is_a?(Hash) && other_val.is_a?(Hash)
119
- deep_merge!(this_val, other_val)
120
- else
121
- other_val
122
- end
123
- end
139
+ def respond_to_missing?(m, *)
140
+ config.key?(m)
124
141
  end
125
142
  end
126
143
 
127
144
  class Configuration
128
145
  attr_accessor :config_file,
129
- :sekrets_file,
146
+ :environment,
130
147
  :ignore_missing_keys,
131
- :environment
148
+ :permitted_classes,
149
+ :sekrets_file
132
150
 
133
151
  def initialize
134
152
  @config_file = nil
135
- @sekrets_file = nil
136
- @ignore_missing_keys = false
137
153
  @environment = nil
154
+ @ignore_missing_keys = false
155
+ @permitted_classes = []
156
+ @sekrets_file = nil
138
157
  end
139
158
  end
140
159
  end
@@ -31,6 +31,17 @@ describe "ConfigReader" do
31
31
  end
32
32
  end
33
33
 
34
+ describe "all envs available" do
35
+ it "should have all envs available" do
36
+ expect(TestConfig.envs.keys).to eq(%w[test not_test])
37
+ end
38
+
39
+ it "should have ConfigHash for all envs" do
40
+ expect(TestConfig.envs["test"].app_name).to eq("test_app")
41
+ expect(TestConfig.envs["not_test"].app_name).to eq("not_test_app")
42
+ end
43
+ end
44
+
34
45
  describe "#dig" do
35
46
  it "finds values as symbols" do
36
47
  expect(TestConfig.dig(*%i[nested_key value])).to eq("test")
@@ -1,10 +1,5 @@
1
1
  class SekretsConfig < ConfigReader
2
- secret_file =
3
- if RUBY_VERSION > "3.0"
4
- "spec/sekrets_ruby_3_2.yml.enc"
5
- else
6
- "spec/sekrets_config.yml.enc"
7
- end
2
+ secret_file = "spec/sekrets_config.yml.enc"
8
3
 
9
4
  configure do |config|
10
5
  config.environment = "test"
Binary file
data/spec/spec_helper.rb CHANGED
@@ -7,4 +7,4 @@ require "sekrets_config"
7
7
  require "no_key_no_error_config"
8
8
 
9
9
  ENV["RACK_ENV"] = "test"
10
- ENV["SEKRETS_KEY"] = "ruby2.4_needs_longer_keys"
10
+ ENV["SEKRETS_KEY"] = "bb9e65113e80605f1f7c"
data/spec/test_config.yml CHANGED
@@ -8,3 +8,6 @@ test:
8
8
  app_name: test_app
9
9
  nested_key:
10
10
  only_in_test_env: true
11
+
12
+ not_test:
13
+ app_name: not_test_app
metadata CHANGED
@@ -1,15 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config_reader
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Moen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-10 00:00:00.000000000 Z
11
+ date: 2024-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: abbrev
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: psych
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.2'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 5.2.1
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '5.2'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 5.2.1
13
47
  - !ruby/object:Gem::Dependency
14
48
  name: rake
15
49
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +78,14 @@ dependencies:
44
78
  requirements:
45
79
  - - "~>"
46
80
  - !ruby/object:Gem::Version
47
- version: '1'
81
+ version: '1.14'
48
82
  type: :development
49
83
  prerelease: false
50
84
  version_requirements: !ruby/object:Gem::Requirement
51
85
  requirements:
52
86
  - - "~>"
53
87
  - !ruby/object:Gem::Version
54
- version: '1'
88
+ version: '1.14'
55
89
  - !ruby/object:Gem::Dependency
56
90
  name: pry
57
91
  requirement: !ruby/object:Gem::Requirement
@@ -73,42 +107,26 @@ executables: []
73
107
  extensions: []
74
108
  extra_rdoc_files: []
75
109
  files:
76
- - ".deepsource.toml"
77
- - ".github/workflows/ruby.yml"
78
- - ".gitignore"
79
- - ".nvmrc"
80
- - ".prettierrc"
81
- - ".rubocop.yml"
82
- - ".standard.yml"
83
- - ".travis.yml"
84
- - ".vscode/settings.json"
85
110
  - CHANGELOG.md
86
- - Gemfile
87
- - Gemfile.lock
88
- - License.txt
89
111
  - README.md
90
- - Rakefile
91
- - checksums/config_reader-2.0.2.gem.sha512
92
- - config_reader.gemspec
93
112
  - lib/config_reader.rb
94
- - lib/config_reader/magic_hash.rb
113
+ - lib/config_reader/config_hash.rb
95
114
  - lib/config_reader/version.rb
96
- - package.json
97
115
  - spec/config_reader_spec.rb
98
116
  - spec/no_key_no_error_config.rb
99
117
  - spec/sekrets_config.rb
100
118
  - spec/sekrets_config.yml.enc
101
- - spec/sekrets_ruby_3_2.yml
102
- - spec/sekrets_ruby_3_2.yml.enc
103
119
  - spec/spec_helper.rb
104
120
  - spec/test_config.rb
105
121
  - spec/test_config.yml
106
- - yarn.lock
107
122
  homepage: https://github.com/UnderpantsGnome/config_reader-gem
108
123
  licenses: []
109
- metadata: {}
110
- post_install_message: If you are are upgrading from a pre 2.x version, please see
111
- the configuration changes in the README https://github.com/UnderpantsGnome/config_reader-gem/blob/master/README.rdoc
124
+ metadata:
125
+ rubygems_mfa_required: 'true'
126
+ post_install_message: |
127
+ If you are are upgrading from a pre 2.x version,
128
+ please see the configuration changes in the
129
+ README https://github.com/UnderpantsGnome/config_reader-gem/blob/master/README.rdoc
112
130
  rdoc_options: []
113
131
  require_paths:
114
132
  - lib
@@ -123,17 +141,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
141
  - !ruby/object:Gem::Version
124
142
  version: '0'
125
143
  requirements: []
126
- rubygems_version: 3.3.26
144
+ rubygems_version: 3.5.11
127
145
  signing_key:
128
146
  specification_version: 4
129
147
  summary: Provides a way to manage environment specific configuration settings.
130
- test_files:
131
- - spec/config_reader_spec.rb
132
- - spec/no_key_no_error_config.rb
133
- - spec/sekrets_config.rb
134
- - spec/sekrets_config.yml.enc
135
- - spec/sekrets_ruby_3_2.yml
136
- - spec/sekrets_ruby_3_2.yml.enc
137
- - spec/spec_helper.rb
138
- - spec/test_config.rb
139
- - spec/test_config.yml
148
+ test_files: []
data/.deepsource.toml DELETED
@@ -1,4 +0,0 @@
1
- version = 1
2
-
3
- [[analyzers]]
4
- name = "ruby"
@@ -1,31 +0,0 @@
1
- name: Specs
2
-
3
- on:
4
- push:
5
- branches: [ "main" ]
6
- pull_request:
7
- branches: [ "main" ]
8
-
9
- permissions:
10
- contents: read
11
-
12
- jobs:
13
- test:
14
-
15
- runs-on: ubuntu-latest
16
- strategy:
17
- matrix:
18
- ruby-version: ['3.0', '3.1', '3.2']
19
-
20
- steps:
21
- - uses: actions/checkout@v3
22
- - name: Set up Ruby
23
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
24
- # change this to (see https://github.com/ruby/setup-ruby#versioning):
25
- # uses: ruby/setup-ruby@v1
26
- uses: ruby/setup-ruby@v1
27
- with:
28
- ruby-version: ${{ matrix.ruby-version }}
29
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
30
- - name: Run tests
31
- run: bundle exec rspec
data/.gitignore DELETED
@@ -1,3 +0,0 @@
1
- .bundle
2
- pkg
3
- *.gem
data/.nvmrc DELETED
@@ -1 +0,0 @@
1
- lts/Hydrogen
data/.prettierrc DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "plugins": ["@prettier/plugin-ruby"],
3
- "editor.tabSize": 2,
4
- "editor.useTabStops": true,
5
- "files.trimTrailingWhitespace": true
6
- }
data/.rubocop.yml DELETED
@@ -1,64 +0,0 @@
1
- # https://docs.rubocop.org/en/latest/cops_layout/
2
-
3
- require: rubocop-rspec
4
-
5
- AllCops:
6
- Exclude:
7
- - "app/controllers/graphql_controller.rb"
8
- - "app/graphql/vivo_point_schema.rb"
9
- - "bin/**/*"
10
- - "config/**/*"
11
- - "db/**/*"
12
- - "lib/util.rb"
13
- - "node_modules/**/*"
14
- - "script/**/*"
15
- - "spec/**/*"
16
- TargetRubyVersion: 2.6
17
-
18
- Rails/UnknownEnv:
19
- Environments:
20
- - development
21
- - test
22
- - staging
23
- - uat
24
- - production
25
-
26
- Layout/MultilineMethodCallIndentation:
27
- EnforcedStyle: indented
28
-
29
- Metrics/AbcSize:
30
- Max: 20
31
-
32
- Metrics/BlockLength:
33
- ExcludedMethods:
34
- - "generate_jwt!"
35
- - "guard"
36
- - "included"
37
- - "namespace"
38
-
39
- Metrics/MethodLength:
40
- ExcludedMethods:
41
- - "generate_jwt!"
42
- - "add_resource_roles_to_user"
43
- Max: 15
44
-
45
- Style/StringLiterals:
46
- EnforcedStyle: double_quotes
47
-
48
- Style/AndOr:
49
- Enabled: false
50
-
51
- Style/Documentation:
52
- Enabled: false
53
-
54
- Style/MultilineMemoization:
55
- EnforcedStyle: braces
56
-
57
- Style/StringLiteralsInInterpolation:
58
- EnforcedStyle: double_quotes
59
-
60
- Style/FrozenStringLiteralComment:
61
- Enabled: false
62
-
63
- Style/YodaCondition:
64
- EnforcedStyle: require_for_equality_operators_only
data/.standard.yml DELETED
@@ -1,23 +0,0 @@
1
- default_ignores: false
2
- fix: true
3
- format: progress
4
- parallel: true
5
-
6
- ignore:
7
- - "db/schema.rb"
8
- - "vendor/**/*"
9
- - "test/**/*":
10
- - Layout/AlignHash
11
- - "**/*":
12
- - Layout/ArgumentAlignment
13
- - Layout/ArrayAlignment
14
- - Layout/BlockAlignment
15
- - Layout/ClosingHeredocIndentation
16
- - Layout/FirstArgumentIndentation
17
- - Layout/MultilineMethodCallIndentation
18
- - Layout/MultilineOperationIndentation
19
- - Layout/SpaceInsideHashLiteralBraces
20
- - Lint/AssignmentInCondition
21
- - Lint/ShadowedException
22
- - Style/MultilineMemoization
23
- - Style/RescueStandardError
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - "2.3.8"
4
- - "2.4.5"
5
- - "2.5.3"
6
- - "2.6.1"
@@ -1,3 +0,0 @@
1
- {
2
- "cSpell.words": ["sekrets"]
3
- }
data/Gemfile DELETED
@@ -1,13 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- git_source(:github) { |repo| "https://github.com/#{repo}.git" }
4
-
5
- # Specify your gem's dependencies in config_reader.gemspec
6
- gemspec
7
-
8
- gem "sekrets", github: "UnderpantsGnome/sekrets", branch: "ruby-3-2-support"
9
-
10
- group :development do
11
- gem "prettier", "~> 4.0"
12
- gem "standard", "~> 1.29"
13
- end
data/Gemfile.lock DELETED
@@ -1,134 +0,0 @@
1
- GIT
2
- remote: https://github.com/UnderpantsGnome/sekrets.git
3
- revision: 9f939c7789e2ed03902db9534b9df5cc8030c365
4
- branch: ruby-3-2-support
5
- specs:
6
- sekrets (1.13.0)
7
- coerce (~> 0.0.3)
8
- fattr (~> 2.2)
9
- highline (~> 1.6)
10
- main (~> 6.1)
11
- map (~> 6.3)
12
-
13
- PATH
14
- remote: .
15
- specs:
16
- config_reader (2.0.3)
17
-
18
- GEM
19
- remote: http://rubygems.org/
20
- specs:
21
- abbrev (0.1.2)
22
- arrayfields (4.9.2)
23
- ast (2.4.2)
24
- chronic (0.10.2)
25
- coderay (1.1.3)
26
- coerce (0.0.8)
27
- chronic (>= 0.6.2)
28
- diff-lcs (1.5.0)
29
- fattr (2.4.0)
30
- haml (6.3.0)
31
- temple (>= 0.8.2)
32
- thor
33
- tilt
34
- highline (1.7.10)
35
- json (2.7.2)
36
- language_server-protocol (3.17.0.3)
37
- lint_roller (1.1.0)
38
- main (6.3.0)
39
- arrayfields (~> 4.9, >= 4.9.2)
40
- chronic (~> 0.10, >= 0.10.2)
41
- fattr (~> 2.4, >= 2.4.0)
42
- map (~> 6.6, >= 6.6.0)
43
- map (6.6.0)
44
- method_source (1.0.0)
45
- parallel (1.24.0)
46
- parser (3.3.1.0)
47
- ast (~> 2.4.1)
48
- racc
49
- prettier (4.0.4)
50
- syntax_tree (>= 4.0.1)
51
- syntax_tree-haml (>= 2.0.0)
52
- syntax_tree-rbs (>= 0.2.0)
53
- prettier_print (1.2.1)
54
- pry (0.14.2)
55
- coderay (~> 1.1)
56
- method_source (~> 1.0)
57
- racc (1.7.3)
58
- rainbow (3.1.1)
59
- rake (13.0.6)
60
- rbs (3.4.4)
61
- abbrev
62
- regexp_parser (2.9.0)
63
- rexml (3.2.6)
64
- rspec (3.12.0)
65
- rspec-core (~> 3.12.0)
66
- rspec-expectations (~> 3.12.0)
67
- rspec-mocks (~> 3.12.0)
68
- rspec-core (3.12.1)
69
- rspec-support (~> 3.12.0)
70
- rspec-expectations (3.12.2)
71
- diff-lcs (>= 1.2.0, < 2.0)
72
- rspec-support (~> 3.12.0)
73
- rspec-mocks (3.12.3)
74
- diff-lcs (>= 1.2.0, < 2.0)
75
- rspec-support (~> 3.12.0)
76
- rspec-support (3.12.0)
77
- rubocop (1.62.1)
78
- json (~> 2.3)
79
- language_server-protocol (>= 3.17.0)
80
- parallel (~> 1.10)
81
- parser (>= 3.3.0.2)
82
- rainbow (>= 2.2.2, < 4.0)
83
- regexp_parser (>= 1.8, < 3.0)
84
- rexml (>= 3.2.5, < 4.0)
85
- rubocop-ast (>= 1.31.1, < 2.0)
86
- ruby-progressbar (~> 1.7)
87
- unicode-display_width (>= 2.4.0, < 3.0)
88
- rubocop-ast (1.31.3)
89
- parser (>= 3.3.1.0)
90
- rubocop-performance (1.20.2)
91
- rubocop (>= 1.48.1, < 2.0)
92
- rubocop-ast (>= 1.30.0, < 2.0)
93
- ruby-progressbar (1.13.0)
94
- standard (1.35.1)
95
- language_server-protocol (~> 3.17.0.2)
96
- lint_roller (~> 1.0)
97
- rubocop (~> 1.62.0)
98
- standard-custom (~> 1.0.0)
99
- standard-performance (~> 1.3)
100
- standard-custom (1.0.2)
101
- lint_roller (~> 1.0)
102
- rubocop (~> 1.50)
103
- standard-performance (1.3.1)
104
- lint_roller (~> 1.1)
105
- rubocop-performance (~> 1.20.2)
106
- syntax_tree (6.2.0)
107
- prettier_print (>= 1.2.0)
108
- syntax_tree-haml (4.0.3)
109
- haml (>= 5.2)
110
- prettier_print (>= 1.2.1)
111
- syntax_tree (>= 6.0.0)
112
- syntax_tree-rbs (1.0.0)
113
- prettier_print
114
- rbs
115
- syntax_tree (>= 2.0.1)
116
- temple (0.10.3)
117
- thor (1.3.1)
118
- tilt (2.3.0)
119
- unicode-display_width (2.5.0)
120
-
121
- PLATFORMS
122
- ruby
123
-
124
- DEPENDENCIES
125
- config_reader!
126
- prettier (~> 4.0)
127
- pry
128
- rake
129
- rspec (~> 3.9)
130
- sekrets!
131
- standard (~> 1.29)
132
-
133
- BUNDLED WITH
134
- 2.3.13
data/License.txt DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2008 Michael Moen
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile DELETED
@@ -1,3 +0,0 @@
1
- require 'bundler/gem_tasks'
2
-
3
- task :default => :spec
@@ -1 +0,0 @@
1
- ecd65abf0eef2de025cf028a84de56bddeb3f6fae18c78565e8f647a3bc79eec777b542c5de26bb74c1c5f7b5cf2ad6eaf71e8061f3729141ac6d38e48367aa7
@@ -1,25 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path('../lib', __FILE__)
3
- require 'config_reader/version'
4
-
5
- Gem::Specification.new do |s|
6
- s.name = 'config_reader'
7
- s.version = ConfigReader::VERSION
8
- s.authors = ['Michael Moen']
9
- s.email = ['michael@underpantsgnome.com']
10
- s.homepage = 'https://github.com/UnderpantsGnome/config_reader-gem'
11
- s.summary = %q{Provides a way to manage environment specific configuration settings.}
12
- s.description = %q{Provides a way to manage environment specific configuration settings.}
13
-
14
- s.files = `git ls-files`.split("\n")
15
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
- s.require_paths = ['lib']
18
-
19
- s.add_development_dependency 'rake'
20
- s.add_development_dependency 'rspec', '~> 3.9'
21
- s.add_development_dependency 'sekrets', '~> 1'
22
- s.add_development_dependency 'pry'
23
-
24
- s.post_install_message = "If you are are upgrading from a pre 2.x version, please see the configuration changes in the README https://github.com/UnderpantsGnome/config_reader-gem/blob/master/README.rdoc"
25
- end
data/package.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "devDependencies": {
3
- "@prettier/plugin-ruby": "^4.0.4",
4
- "prettier": "^3.2.5"
5
- }
6
- }
@@ -1,9 +0,0 @@
1
- ---
2
- defaults:
3
- app_name: default_app_sekret
4
- sekret_only: yup
5
- nested_key:
6
- value: test_sekret
7
-
8
- test:
9
- app_name: test_app_sekret
@@ -1,2 +0,0 @@
1
- Ϧ3W|dvd�؂�����Q�Div�ň5p2vr3,��֛��mLC:Ϣ��F�M��Wn�c׿j+�<�%�]��hg�`4�� �ޣ�K%������)8�%Pee>�g���~
2
- %�U\�(���+THDx�͇�2�
data/yarn.lock DELETED
@@ -1,13 +0,0 @@
1
- # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
- # yarn lockfile v1
3
-
4
-
5
- "@prettier/plugin-ruby@^4.0.4":
6
- version "4.0.4"
7
- resolved "https://registry.yarnpkg.com/@prettier/plugin-ruby/-/plugin-ruby-4.0.4.tgz#73d85fc2a1731a3f62b57ac3116cf1c234027cb6"
8
- integrity sha512-lCpvfS/dQU5WrwN3AQ5vR8qrvj2h5gE41X08NNzAAXvHdM4zwwGRcP2sHSxfu6n6No+ljWCVx95NvJPFTTjCTg==
9
-
10
- prettier@^3.2.5:
11
- version "3.2.5"
12
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368"
13
- integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==