Skip to content

Commit

Permalink
chore(docs): remove extra config examples
Browse files Browse the repository at this point in the history
  • Loading branch information
its-danny committed May 1, 2022
1 parent 0b4d689 commit 1ddbe21
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 108 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Config files are prioritized in the following order:
- Passed in via `--config`
- `.koji.toml` in the working directory
- `~/.config/koji/config.toml`
- The [default](https://github.com/its-danny/koji/blob/main/meta/config/koji-default.toml) config
- The [default](https://github.com/its-danny/koji/blob/main/meta/config/default.toml) config
### Options
Expand All @@ -127,7 +127,7 @@ autocomplete = true
- Type: `Vec<CommitType>`
- Optional: `true`
- Description: A list of commit types to use instead of the [default](https://github.com/its-danny/koji/blob/main/meta/config/koji-default.toml).
- Description: A list of commit types to use instead of the [default](https://github.com/its-danny/koji/blob/main/meta/config/default.toml).
```toml
[[commit_types]]
name = "feat"
Expand Down
File renamed without changes.
54 changes: 0 additions & 54 deletions meta/config/koji-gitmoji.toml

This file was deleted.

43 changes: 0 additions & 43 deletions meta/config/koji-no-emoji.toml

This file was deleted.

10 changes: 1 addition & 9 deletions src/lib/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct Config {
/// Find a config and load it.
pub fn load_config(path: Option<String>) -> Result<Config> {
// Get the default config
let default_str = include_str!("../../meta/config/koji-default.toml");
let default_str = include_str!("../../meta/config/default.toml");
let default_config: Config =
toml::from_str(default_str).context("could not parse config file")?;

Expand Down Expand Up @@ -69,12 +69,4 @@ mod tests {

assert_eq!(first.description, "A new feature");
}

#[test]
fn test_load_config_with_arg() {
let config = load_config(Some("./meta/config/koji-no-emoji.toml".into())).unwrap();
let first = config.commit_types.get(0).unwrap();

assert_eq!(first.emoji, None);
}
}

0 comments on commit 1ddbe21

Please sign in to comment.