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

Updete dependencies #144

Merged
merged 2 commits into from
Mar 1, 2021
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [Unreleased]

### Added

- [Added `SplitWhitespace` variant to `Match`](https://github.com/qryxip/cargo-compete#matchsplitwhitespace--splitwhitespace). ([qryxip/snowchains#136](https://github.com/qryxip/snowchains/pull/136))

## [0.8.7] - 2021-02-26Z

### Changed
Expand Down
79 changes: 34 additions & 45 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ indexmap = { version = "1.6.1", features = ["serde-1"] }
indicatif = "0.15.0"
itertools = "0.10.0"
krates = "0.6.0"
liquid = "0.21.5"
liquid-core = "0.21.3"
liquid-derive = "0.21.1"
liquid = "0.22.0"
liquid-core = "0.22.0"
liquid-derive = "0.22.0"
maplit = "1.0.2"
opener = "0.4.1"
percent-encoding = "2.1.0"
Expand All @@ -45,11 +45,11 @@ rpassword = "5.0.1"
rprompt = "1.0.5"
serde = { version = "1.0.123", features = ["derive"] }
serde_ignored = "0.1.2"
serde_json = "1.0.63"
serde_json = "1.0.64"
serde_with = "1.6.4"
serde_yaml = "0.8.17"
shell-escape = "0.1.5"
snowchains_core = "0.11.1"
snowchains_core = "0.12.0"
structopt = "0.3.21"
strum = { version = "0.20.0", features = ["derive"] }
tempfile = "3.2.0"
Expand All @@ -64,6 +64,6 @@ which = "4.0.2"
term_size = "=1.0.0-beta.2"

[dev-dependencies]
insta = { version = "1.6.3", features = ["redactions"] }
insta = { version = "1.7.0", features = ["redactions"] }
once_cell = "1.7.0"
regex = "1.4.3"
5 changes: 5 additions & 0 deletions README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ extend:
[untaggedなADT](https://serde.rs/enum-representations.html#untagged)です。

- [`Match::Exact`](#matchexact--exact)
- [`Match::SplitWhitespace`](#matchsplitwhitespace--splitwhitespace)
- [`Match::Lines`](#matchlines--lines)
- [`Match::Float`](#matchfloat)
- [`Match::Checker`](#matchchecker)
Expand All @@ -601,6 +602,10 @@ extend:

文字列全体の一致で判定します。

### `Match::SplitWhiteSpace` = `"SplitWhitespace"`

[空白区切りでの単語](https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_whitespace)の一致で判定します。

### `Match::Lines` = `"Lines"`

[各行](https://doc.rust-lang.org/stable/std/primitive.str.html#method.lines)の一致で判定します。
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ A string that can parsed with [`humantime::format_duration`](https://docs.rs/hum
An [untagged ADT](https://serde.rs/enum-representations.html#untagged).

- [`Match::Exact`](#matchexact--exact)
- [`Match::SplitWhitespace`](#matchsplitwhitespace--splitwhitespace)
- [`Match::Lines`](#matchlines--lines)
- [`Match::Float`](#matchfloat)
- [`Match::Checker`](#matchchecker)
Expand All @@ -593,6 +594,10 @@ An [untagged ADT](https://serde.rs/enum-representations.html#untagged).

Compares whole strings.

### `Match::SplitWhiteSpace` = `"SplitWhitespace"`

Compares [words splitted by whitespace](https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_whitespace).

### `Match::Lines` = `"Lines"`

Compares [lines](https://doc.rust-lang.org/stable/std/primitive.str.html#method.lines).
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ fn liquid_template_with_custom_filter(text: &str) -> Result<liquid::Template, St
struct KebabcaseFilter;

impl Filter for KebabcaseFilter {
fn evaluate(&self, input: &dyn ValueView, _: &Runtime<'_>) -> liquid_core::Result<Value> {
fn evaluate(&self, input: &dyn ValueView, _: &dyn Runtime) -> liquid_core::Result<Value> {
Ok(Value::scalar(input.to_kstr().to_kebab_case()))
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/web/retrieve_testcases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub(crate) fn dl_only_system_test_cases(
credentials: AtcoderRetrieveSampleTestCasesCredentials {
username_and_password,
},
default_match: Match::Lines,
full: Some(RetrieveFullTestCases {
credentials: AtcoderRetrieveFullTestCasesCredentials {
dropbox_access_token: credentials::dropbox_access_token()?,
Expand All @@ -66,6 +67,7 @@ pub(crate) fn dl_only_system_test_cases(
Some("yukicoder.me") => take(Yukicoder::exec(RetrieveTestCases {
targets: YukicoderRetrieveTestCasesTargets::Urls(btreeset!(url.clone())),
credentials: (),
default_match: Match::Lines,
full: Some(RetrieveFullTestCases {
credentials: YukicoderRetrieveFullTestCasesCredentials {
api_key: credentials::yukicoder_api_key(shell)?,
Expand Down Expand Up @@ -227,6 +229,7 @@ pub(crate) fn dl_from_atcoder(
Atcoder::exec(RetrieveTestCases {
targets,
credentials,
default_match: Match::Lines,
full,
cookie_storage,
timeout: crate::web::TIMEOUT,
Expand Down Expand Up @@ -255,6 +258,7 @@ pub(crate) fn dl_from_codeforces(
Codeforces::exec(RetrieveTestCases {
targets,
credentials,
default_match: Match::Lines,
full: None,
cookie_storage,
timeout: crate::web::TIMEOUT,
Expand Down Expand Up @@ -283,6 +287,7 @@ pub(crate) fn dl_from_yukicoder(
Yukicoder::exec(RetrieveTestCases {
targets,
credentials: (),
default_match: Match::Lines,
full,
cookie_storage: (),
timeout: crate::web::TIMEOUT,
Expand Down