dependency: bump anyway_config from 2.1.0 to 2.2.1
Bumps anyway_config from 2.1.0 to 2.2.1.
Release notes
Sourced from anyway_config's releases.
2.2.0 "Types and types again"
Features
- Add type coercion support.
Example:
class CoolConfig < Anyway::Config attr_config :port, :user coerce_types port: :string, user: {dob: :date} end ENV["COOL_USER__DOB"] = "1989-07-01" config = CoolConfig.new({port: 8080}) config.port == "8080" #=> true config.user["dob"] == Date.new(1989, 7, 1) #=> true
You can also add
.disable_auto_cast!
to your config class to disable automatic conversion.
- Add RBS signatures and generator.
Anyway Config now ships with the basic RBS support. To use config types with Steep, add
library "anyway_config"
to your Steepfile.We also provide an API to generate a signature for you config class:
MyConfig.to_rbs
. You can use this method to generate a scaffold for your config class.
Changelog
Sourced from anyway_config's changelog.
2.2.1 (2020-09-28)
- Minor fixes to the prev release.
2.2.0
⛓️ (2020-09-28)
- Add RBS signatures and generator. ([
@palkan
][])Anyway Config now ships with the basic RBS support. To use config types with Steep, add
library "anyway_config"
to your Steepfile.We also provide an API to generate a signature for you config class:
MyConfig.to_rbs
. You can use this method to generate a scaffold for your config class.
- Add type coercion support. ([
@palkan
][])Example:
class CoolConfig < Anyway::Config attr_config :port, :user coerce_types port: :string, user: {dob: :date} end ENV["COOL_USER__DOB"] = "1989-07-01" config = CoolConfig.new({port: 8080}) config.port == "8080" #=> true config.user["dob"] == Date.new(1989, 7, 1) #=> true
You can also add
.disable_auto_cast!
to your config class to disable automatic conversion.Warning Now values from all sources are coerced (e.g., YAML files). That could lead to a different behaviour.
Do not dup modules/classes passed as configuration values. ([
@palkan
][])Handle loading empty YAML config files. ([
@micahlee
][])
Commits
-
2fe3bde
Bump 2.2.1 -
085c4a4
refactor: upd nil type implementation to support ruby 2.5 -
505968d
fix: relax ruby-next dependency -
afbd695
fix: do not coerce nils; improve date/datetime/uri casters -
a5d4611
feat: add type:nil support -
bf7d563
fix: handle nil array values -
8eca414
Bump 2.2.0 -
4cb83c1
ci: use bundler-cache from setup-ruby -
3a36e0d
fix: remove right-hand assignment -
8e17046
feat: RBS support - Additional commits viewable in compare view
Dependabot commands
You can trigger Dependabot actions by commenting on this MR
-
@dependabot-bot rebase
will rebase this MR -
@dependabot-bot recreate
will recreate this MR rewriting all the manual changes and resolving conflicts