Did stuff
This commit is contained in:
1560
Cargo.lock
generated
1560
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
14
Cargo.toml
14
Cargo.toml
@@ -8,19 +8,19 @@ edition = "2018"
|
|||||||
bincode = "1.1"
|
bincode = "1.1"
|
||||||
chrono = { version = "0.4", features = ["serde"] }
|
chrono = { version = "0.4", features = ["serde"] }
|
||||||
chrono-tz = "0.5"
|
chrono-tz = "0.5"
|
||||||
directories = "1.0"
|
directories = "2.0"
|
||||||
fern = { version = "0.5", features = ["colored"] }
|
fern = { version = "0.5", features = ["colored"] }
|
||||||
htmlescape = "0.3"
|
htmlescape = "0.3"
|
||||||
lazy_static = "1.3"
|
lazy_static = "1.4"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
regex = "1.1"
|
regex = "1.3"
|
||||||
reqwest = "0.9"
|
reqwest = "0.9"
|
||||||
scraper = "0.9"
|
scraper = "0.10"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
structopt = "0.2"
|
structopt = "0.3"
|
||||||
tinytemplate = "1.0"
|
tinytemplate = "1.0"
|
||||||
toml = "0.4"
|
toml = "0.5"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
insta = "0.7"
|
insta = "0.11"
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ impl Probe for Hitta {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use insta::assert_yaml_snapshot_matches;
|
use insta::assert_yaml_snapshot;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ mod tests {
|
|||||||
fn test_0104754350() {
|
fn test_0104754350() {
|
||||||
let document = include_str!("../../fixtures/hitta/0104754350.html");
|
let document = include_str!("../../fixtures/hitta/0104754350.html");
|
||||||
|
|
||||||
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
|
assert_yaml_snapshot!(from_html(&document), @r###"---
|
||||||
Ok:
|
Ok:
|
||||||
messages: []
|
messages: []
|
||||||
history:
|
history:
|
||||||
@@ -246,14 +246,14 @@ Ok:
|
|||||||
- datetime:
|
- datetime:
|
||||||
DateTime: "2018-06-26T12:59:33Z"
|
DateTime: "2018-06-26T12:59:33Z"
|
||||||
title: ~
|
title: ~
|
||||||
message: Säljare Folksam"###;
|
message: Säljare Folksam"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_0313908905() {
|
fn test_0313908905() {
|
||||||
let document = include_str!("../../fixtures/hitta/0313908905.html");
|
let document = include_str!("../../fixtures/hitta/0313908905.html");
|
||||||
|
|
||||||
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
|
assert_yaml_snapshot!(from_html(&document), @r###"---
|
||||||
Ok:
|
Ok:
|
||||||
messages: []
|
messages: []
|
||||||
history: []
|
history: []
|
||||||
@@ -264,7 +264,7 @@ Ok:
|
|||||||
fn test_0702269893() {
|
fn test_0702269893() {
|
||||||
let document = include_str!("../../fixtures/hitta/0702269893.html");
|
let document = include_str!("../../fixtures/hitta/0702269893.html");
|
||||||
|
|
||||||
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
|
assert_yaml_snapshot!(from_html(&document), @r###"---
|
||||||
Ok:
|
Ok:
|
||||||
messages: []
|
messages: []
|
||||||
history:
|
history:
|
||||||
@@ -276,7 +276,7 @@ Ok:
|
|||||||
fn test_0726443387() {
|
fn test_0726443387() {
|
||||||
let document = include_str!("../../fixtures/hitta/0726443387.html");
|
let document = include_str!("../../fixtures/hitta/0726443387.html");
|
||||||
|
|
||||||
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
|
assert_yaml_snapshot!(from_html(&document), @r###"---
|
||||||
Ok:
|
Ok:
|
||||||
messages: []
|
messages: []
|
||||||
history:
|
history:
|
||||||
@@ -288,7 +288,7 @@ Ok:
|
|||||||
fn test_0751793426() {
|
fn test_0751793426() {
|
||||||
let document = include_str!("../../fixtures/hitta/0751793426.html");
|
let document = include_str!("../../fixtures/hitta/0751793426.html");
|
||||||
|
|
||||||
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
|
assert_yaml_snapshot!(from_html(&document), @r###"---
|
||||||
Ok:
|
Ok:
|
||||||
messages: []
|
messages: []
|
||||||
history: []
|
history: []
|
||||||
@@ -299,7 +299,7 @@ Ok:
|
|||||||
fn test_0751793483() {
|
fn test_0751793483() {
|
||||||
let document = include_str!("../../fixtures/hitta/0751793483.html");
|
let document = include_str!("../../fixtures/hitta/0751793483.html");
|
||||||
|
|
||||||
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
|
assert_yaml_snapshot!(from_html(&document), @r###"---
|
||||||
Ok:
|
Ok:
|
||||||
messages: []
|
messages: []
|
||||||
history: []
|
history: []
|
||||||
@@ -310,7 +310,7 @@ Ok:
|
|||||||
fn test_0751793499() {
|
fn test_0751793499() {
|
||||||
let document = include_str!("../../fixtures/hitta/0751793499.html");
|
let document = include_str!("../../fixtures/hitta/0751793499.html");
|
||||||
|
|
||||||
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
|
assert_yaml_snapshot!(from_html(&document), @r###"---
|
||||||
Ok:
|
Ok:
|
||||||
messages: []
|
messages: []
|
||||||
history: []
|
history: []
|
||||||
@@ -321,7 +321,7 @@ Ok:
|
|||||||
fn test_0701807618() {
|
fn test_0701807618() {
|
||||||
let document = include_str!("../../fixtures/hitta/0701807618.html");
|
let document = include_str!("../../fixtures/hitta/0701807618.html");
|
||||||
|
|
||||||
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
|
assert_yaml_snapshot!(from_html(&document), @r###"---
|
||||||
Err: ~"###);
|
Err: ~"###);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ Err: ~"###);
|
|||||||
fn test_0546780862() {
|
fn test_0546780862() {
|
||||||
let document = include_str!("../../fixtures/hitta/0546780862.html");
|
let document = include_str!("../../fixtures/hitta/0546780862.html");
|
||||||
|
|
||||||
assert_yaml_snapshot_matches!(from_html(&document), @r###"---
|
assert_yaml_snapshot!(from_html(&document), @r###"---
|
||||||
Err: ~"###);
|
Err: ~"###);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user