Skip to content

Commit

Permalink
Update default config for v0.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
nevans committed Jun 23, 2024
1 parent d4a8c54 commit 687ceb5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
19 changes: 11 additions & 8 deletions lib/net/imap/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -311,25 +311,28 @@ def defaults_hash

@global = default.new

version_defaults[0.4] = Config[default.send(:defaults_hash)]
version_defaults[:default] = Config[default.send(:defaults_hash)]
version_defaults[:current] = Config[:default]

version_defaults[0] = Config[0.4].dup.update(
version_defaults[0] = Config[:current].dup.update(
sasl_ir: false,
responses_without_block: :silence_deprecation_warning,
).freeze
version_defaults[0.0] = Config[0]
version_defaults[0.1] = Config[0]
version_defaults[0.2] = Config[0]
version_defaults[0.3] = Config[0]

version_defaults[0.5] = Config[0.4].dup.update(
responses_without_block: :warn,
version_defaults[0.4] = Config[0.3].dup.update(
sasl_ir: true,
).freeze

version_defaults[:default] = Config[0.4]
version_defaults[:current] = Config[0.4]
version_defaults[:next] = Config[0.5]
version_defaults[0.5] = Config[:current]

version_defaults[0.6] = Config[0.5]
version_defaults[:next] = Config[0.6]

version_defaults[:future] = Config[0.5].dup.update(
version_defaults[:future] = Config[0.6].dup.update(
responses_without_block: :raise,
).freeze

Expand Down
6 changes: 3 additions & 3 deletions test/net/imap/test_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ class ConfigTest < Test::Unit::TestCase
end

test ".[] with symbol names" do
assert_same Config[0.4], Config[:current]
assert_same Config[0.4], Config[:default]
assert_same Config[0.5], Config[:next]
assert_same Config[0.5], Config[:current]
assert_same Config[0.5], Config[:default]
assert_same Config[0.6], Config[:next]
assert_kind_of Config, Config[:future]
end

Expand Down

0 comments on commit 687ceb5

Please sign in to comment.