Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release environment_helpers 1.5.0 #31

Merged
merged 3 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## Release 1.5.0

* Add rbs/steep, and enforce types in CI (.rbs file is exported as part
of the gem) (#28, resolves #21)
* Support env-based customization of the truthy/falsey strings used by
`ENV.boolean` (#29, resolves #27)
* Update github workflows to use checkout@v4 (which should have no real
impact on us, aside from staying current). (#30)
* Update README to explain `ENV.array`

## Release 1.4.0

* Drop support for ruby 2.6
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ ENV.integer("MAX_THREAD_COUNT", default: 5)
ENV.file_path("FILE_PATH", default: "/some/path", required: true)
ENV.date("SCHEDULED_DATE", required: true, format: "%Y-%m-%d")
ENV.date_time("RUN_AT", required: true, default: DateTime.now)
ENV.array("QUEUE_NAMES", of: :strings, required: false, default: ["high", "low"])
```

Each of the supplied methods takes a positional parameter for the name of the
Expand Down Expand Up @@ -83,3 +84,17 @@ The available methods added to `ENV`:
as a strptime format string (the `:unix` format is equivalent to the format
string `"%s"`). It handles invalid or unparseable values like `ENV.date` does,
in that they are treated as if not supplied.
* `array` - produces an array of strings, symbols, or integers, depending on the
value of the `of` parameter. You can specify the delimiter using a `delimiter`
parameter (it defaults to a comma).

## Configuration

If you want to specify your own list of truthy/falsey strings, you can do that
by setting either or both of these environment variables, supplying comma-
separated (whitespace-free) strings:

* `ENVIRONMENT_HELPERS_TRUTHY_STRINGS` - the default value used is
`true,yes,on,enabled,enable,allow,t,y,1,ok,okay`
* `ENVIRONMENT_HELPERS_FALSEY_STRINGS` - the default value used is
`false,no,off,disabled,disable,deny,f,n,0,nope`
2 changes: 1 addition & 1 deletion lib/environment_helpers/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module EnvironmentHelpers
VERSION = "1.4.0"
VERSION = "1.5.0"
end