Skip to content

Commit 5a5419c

Browse files
authored
Fix typos in the tests and documentation (#359)
1 parent fb280e6 commit 5a5419c

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
* Rails versions `< 5.2` are no longer supported ([#316](https://github.com/rubyconfig/config/pull/316))
5757
* Ruby versions `< 2.6` are no longer supported ([#316](https://github.com/rubyconfig/config/pull/316))
5858
* Support `HashSource` and `EnvSource` instances in `Config.load_files` and `Config.load_and_set_settings`. ([#315](https://github.com/rubyconfig/config/pull/315)). There are a few subtle breaking changes:
59-
* Previously, `Config.load_files` (called from `Config.load_and_set_settings`) would call `.to_s` on each of its arguments. Now, this responsibility is defered to YAMLSource. In effect, if your application passes String or Pathname objects to `Config.load_files`, no changes are necessary, but if you were somehow relying on the `.to_s` call for some other type of object, you'll now need to call `.to_s` on that object before passing it to `Config`.
59+
* Previously, `Config.load_files` (called from `Config.load_and_set_settings`) would call `.to_s` on each of its arguments. Now, this responsibility is deferred to YAMLSource. In effect, if your application passes String or Pathname objects to `Config.load_files`, no changes are necessary, but if you were somehow relying on the `.to_s` call for some other type of object, you'll now need to call `.to_s` on that object before passing it to `Config`.
6060
* Before this change, `Config.load_files` would call `uniq` on its argument array. This call has been removed, so duplicate file paths are not removed before further processing. In some cases, this can cause differences in behavior since later config files override the values in earlier ones. In most cases, it's best to ensure that duplicate paths are not passed to `Config.load_files`.
6161

6262
## 3.1.1

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ ENV['Settings.section.server'] = 'google.com'
428428

429429
It won't work with arrays, though.
430430

431-
It is considered an error to use environment variables to simutaneously assign a "flat" value and a multi-level value to a key.
431+
It is considered an error to use environment variables to simultaneously assign a "flat" value and a multi-level value to a key.
432432

433433
```ruby
434434
# Raises an error when settings are loaded

spec/config_env_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
expect(config.world.countries.europe).to eq(0)
167167
end
168168

169-
it 'should ignore variables wit default separator' do
169+
it 'should ignore variables with default separator' do
170170
ENV['Settings.new_var'] = 'value'
171171

172172
expect(config.new_var).to eq(nil)

spec/fixtures/unsafe_load.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ test:
77
database: myapp_test
88
pool: *pool # Psych::BadAlias: Unknown alias
99
others:
10-
regex: !ruby/regexp '/https?:\/\/.*exmaple\.com/' # Tried to load unspecified class: Regexp (Psych::DisallowedClass)
10+
regex: !ruby/regexp '/https?:\/\/.*example\.com/' # Tried to load unspecified class: Regexp (Psych::DisallowedClass)
1111
date: 2021-08-03 # Tried to load unspecified class: Date (Psych::DisallowedClass)
1212
time: 2001-12-14T21:59:43.10-05:00 # Tried to load unspecified class: Time (Psych::DisallowedClass)

spec/options_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
it 'should allow to access them via object member notation' do
7171
expect(config.select).to be_nil
7272
expect(config.table).to be_nil
73-
expect(config.exit!).to be_nil
73+
expect(config.exit!).to be_nil
7474
end
7575

7676
it 'should allow to access them using [] operator' do
@@ -167,7 +167,7 @@
167167
config.reload!
168168
end
169169

170-
it 'should be overwriten by the following values' do
170+
it 'should be overwritten by the following values' do
171171
expect(config['tvrage']['service_url']).to eq('http://services.tvrage.com')
172172
end
173173

0 commit comments

Comments
 (0)