-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enable consumers to provide custom Environment values (#439)
Consumers may want to create custom enviornments, e.g. `gamma` or `staging`. Add a `Environment::Custom` enum variant. The custom value is contained in a String in the variant. Note: A future release may remove the `From<Environment> for &'static str` and `From<&Environment> for &'static str` implementations because it's not possible to convert `Environment::Custom` to a static str. It's kept for now because it was implemented before we added the `Environment::Custom` variant. Closes #438
- Loading branch information
1 parent
0f378e3
commit 8d3e8a1
Showing
33 changed files
with
364 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[email] | ||
from = "[email protected]" | ||
|
||
[email.smtp.connection] | ||
# The `smtps` scheme should be used in production | ||
uri = "smtp://localhost:1025" | ||
|
||
[email.sendgrid] | ||
api-key = "api-key" | ||
sandbox = true |
2 changes: 1 addition & 1 deletion
2
src/api/cli/snapshots/roadster__api__cli__tests__parse_cli@case_1.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
source: src/cli/mod.rs | ||
source: src/api/cli/mod.rs | ||
expression: roadster_cli | ||
--- | ||
skip_validate_config = false | ||
|
2 changes: 1 addition & 1 deletion
2
src/api/cli/snapshots/roadster__api__cli__tests__parse_cli@case_2.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
source: src/cli/mod.rs | ||
source: src/api/cli/mod.rs | ||
expression: roadster_cli | ||
--- | ||
environment = 'test' | ||
|
2 changes: 1 addition & 1 deletion
2
src/api/cli/snapshots/roadster__api__cli__tests__parse_cli@case_3.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
source: src/cli/mod.rs | ||
source: src/api/cli/mod.rs | ||
expression: roadster_cli | ||
--- | ||
skip_validate_config = true | ||
|
2 changes: 1 addition & 1 deletion
2
src/api/cli/snapshots/roadster__api__cli__tests__parse_cli@case_4.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
source: src/cli/mod.rs | ||
source: src/api/cli/mod.rs | ||
expression: roadster_cli | ||
--- | ||
skip_validate_config = false | ||
|
2 changes: 1 addition & 1 deletion
2
src/api/cli/snapshots/roadster__api__cli__tests__parse_cli@list_routes.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
source: src/cli/mod.rs | ||
source: src/api/cli/mod.rs | ||
expression: roadster_cli | ||
--- | ||
skip_validate_config = false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
source: src/cli/mod.rs | ||
source: src/api/cli/mod.rs | ||
expression: roadster_cli | ||
--- | ||
skip_validate_config = false | ||
|
2 changes: 1 addition & 1 deletion
2
src/api/cli/snapshots/roadster__api__cli__tests__parse_cli@open_api.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
source: src/cli/mod.rs | ||
source: src/api/cli/mod.rs | ||
expression: roadster_cli | ||
--- | ||
skip_validate_config = false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/config/snapshots/roadster__config__environment__tests__environment_from_str@case_01.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: src/config/environment.rs | ||
expression: env | ||
--- | ||
Development |
5 changes: 5 additions & 0 deletions
5
src/config/snapshots/roadster__config__environment__tests__environment_from_str@case_02.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: src/config/environment.rs | ||
expression: env | ||
--- | ||
Development |
5 changes: 5 additions & 0 deletions
5
src/config/snapshots/roadster__config__environment__tests__environment_from_str@case_03.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: src/config/environment.rs | ||
expression: env | ||
--- | ||
Test |
5 changes: 5 additions & 0 deletions
5
src/config/snapshots/roadster__config__environment__tests__environment_from_str@case_04.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: src/config/environment.rs | ||
expression: env | ||
--- | ||
Production |
5 changes: 5 additions & 0 deletions
5
src/config/snapshots/roadster__config__environment__tests__environment_from_str@case_05.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: src/config/environment.rs | ||
expression: env | ||
--- | ||
Production |
7 changes: 7 additions & 0 deletions
7
src/config/snapshots/roadster__config__environment__tests__environment_from_str@case_06.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
source: src/config/environment.rs | ||
expression: env | ||
--- | ||
Custom( | ||
"custom-environment", | ||
) |
5 changes: 5 additions & 0 deletions
5
src/config/snapshots/roadster__config__environment__tests__environment_from_str@case_07.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: src/config/environment.rs | ||
expression: env | ||
--- | ||
Development |
5 changes: 5 additions & 0 deletions
5
src/config/snapshots/roadster__config__environment__tests__environment_from_str@case_08.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: src/config/environment.rs | ||
expression: env | ||
--- | ||
Test |
5 changes: 5 additions & 0 deletions
5
src/config/snapshots/roadster__config__environment__tests__environment_from_str@case_09.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: src/config/environment.rs | ||
expression: env | ||
--- | ||
Production |
7 changes: 7 additions & 0 deletions
7
src/config/snapshots/roadster__config__environment__tests__environment_from_str@case_10.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
source: src/config/environment.rs | ||
expression: env | ||
--- | ||
Custom( | ||
"CUSTOM-ENVIRONMENT", | ||
) |
Oops, something went wrong.