mirror of
https://github.com/deps-rs/deps.rs.git
synced 2024-11-25 03:26:30 +00:00
update maud versions
This commit is contained in:
parent
3e3e9eea9d
commit
6b98cf4252
7 changed files with 54 additions and 58 deletions
20
Cargo.lock
generated
20
Cargo.lock
generated
|
@ -476,11 +476,6 @@ name = "linked-hash-map"
|
|||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "literalext"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.3.4"
|
||||
|
@ -525,11 +520,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "maud"
|
||||
version = "0.17.5"
|
||||
version = "0.22.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"maud_htmlescape 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"maud_macros 0.17.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"maud_macros 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -539,12 +534,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "maud_macros"
|
||||
version = "0.17.5"
|
||||
version = "0.22.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"literalext 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"maud_htmlescape 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syn 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1121,7 +1116,7 @@ dependencies = [
|
|||
"indexmap 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"maud 0.17.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"maud 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"relative-path 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"route-recognizer 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustsec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1681,16 +1676,15 @@ dependencies = [
|
|||
"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
"checksum libc 0.2.77 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f96b10ec2560088a8e76961b00d47107b3a625fecb76dedb29ee7ccbf98235"
|
||||
"checksum linked-hash-map 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a"
|
||||
"checksum literalext 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2f42dd699527975a1e0d722e0707998671188a0125f2051d2d192fc201184a81"
|
||||
"checksum lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75"
|
||||
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
|
||||
"checksum log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b"
|
||||
"checksum lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c"
|
||||
"checksum maplit 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
|
||||
"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
|
||||
"checksum maud 0.17.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d5748999a85d57da07827b71fee13a712fe12f9125f2751c819fd6bc7e421fd3"
|
||||
"checksum maud 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "84613702fc079d2e22a2d39b9a1b80a8da9e82b13fb5fe7abcd488928ea75fdb"
|
||||
"checksum maud_htmlescape 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0fb85bccffc42302ad1e1ed8679f6a39d1317f775a37fbc3f79bdfbe054bfb7"
|
||||
"checksum maud_macros 0.17.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21c60f53353e8eeb2c34824264e99cc7d7c9ddfd5e9ebb3447ccae93f2164908"
|
||||
"checksum maud_macros 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5eb626dcc05fdacb1796b5efae3ea50ca1213713925093e2febb7d33ba5c9bcd"
|
||||
"checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
|
||||
"checksum memoffset 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa"
|
||||
"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0"
|
||||
|
|
|
@ -10,6 +10,8 @@ members = [
|
|||
]
|
||||
|
||||
[dependencies]
|
||||
badge = { path = "./libs/badge" }
|
||||
|
||||
cadence = "0.13.1"
|
||||
failure = "0.1.1"
|
||||
futures = "0.1.18"
|
||||
|
@ -18,7 +20,7 @@ hyper-tls = "0.1.2"
|
|||
indexmap = { version = "1.0.0", features = ["serde-1"] }
|
||||
lazy_static = "1.0.0"
|
||||
lru-cache = "0.1.1"
|
||||
maud = "0.17.2"
|
||||
maud = "0.22"
|
||||
relative-path = { version = "0.3.7", features = ["serde"] }
|
||||
route-recognizer = "0.1.12"
|
||||
rustsec = "0.6.0"
|
||||
|
@ -34,9 +36,6 @@ tokio-service = "0.1.0"
|
|||
toml = "0.4.5"
|
||||
try_future = "0.1.1"
|
||||
|
||||
[dependencies.badge]
|
||||
version = "0.2.0"
|
||||
path = "libs/badge"
|
||||
|
||||
[build-dependencies]
|
||||
sass-rs = "0.2.1"
|
||||
sass-rs = "0.2"
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
#![feature(ip_constructors)]
|
||||
#![feature(proc_macro)]
|
||||
|
||||
#![allow(bare_trait_objects)]
|
||||
|
||||
|
||||
extern crate badge;
|
||||
extern crate cadence;
|
||||
#[macro_use] extern crate failure;
|
||||
|
@ -81,7 +84,7 @@ fn main() {
|
|||
let port = env::var("PORT").unwrap_or_else(|_| "8080".to_string()).parse()
|
||||
.expect("could not read port");
|
||||
|
||||
let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::unspecified()), port);
|
||||
let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), port);
|
||||
|
||||
let http = Http::new();
|
||||
|
||||
|
|
|
@ -4,13 +4,13 @@ use maud::html;
|
|||
pub fn render(title: &str, descr: &str) -> Response {
|
||||
super::render_html(title, html! {
|
||||
section class="hero is-light" {
|
||||
div class="hero-head" (super::render_navbar())
|
||||
div class="hero-head" { (super::render_navbar()) }
|
||||
}
|
||||
section class="section" {
|
||||
div class="container" {
|
||||
div class="notification is-danger" {
|
||||
p class="title is-3" (title)
|
||||
p (descr)
|
||||
p class="title is-3" { (title) }
|
||||
p { (descr) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,13 +8,13 @@ fn popular_table(popular_repos: Vec<Repository>, popular_crates: Vec<CratePath>)
|
|||
html! {
|
||||
div class="columns" {
|
||||
div class="column" {
|
||||
h2 class="title is-3" "Popular Repositories"
|
||||
h2 class="title is-3" { "Popular Repositories" }
|
||||
|
||||
table class="table is-fullwidth is-striped is-hoverable" {
|
||||
thead {
|
||||
tr {
|
||||
th "Repository"
|
||||
th class="has-text-right" "Status"
|
||||
th { "Repository" }
|
||||
th class="has-text-right" { "Status" }
|
||||
}
|
||||
}
|
||||
tbody {
|
||||
|
@ -34,13 +34,13 @@ fn popular_table(popular_repos: Vec<Repository>, popular_crates: Vec<CratePath>)
|
|||
}
|
||||
}
|
||||
div class="column" {
|
||||
h2 class="title is-3" "Popular Crates"
|
||||
h2 class="title is-3" { "Popular Crates" }
|
||||
|
||||
table class="table is-fullwidth is-striped is-hoverable" {
|
||||
thead {
|
||||
tr {
|
||||
th "Crate"
|
||||
th class="has-text-right" "Status"
|
||||
th { "Crate" }
|
||||
th class="has-text-right" { "Status" }
|
||||
}
|
||||
}
|
||||
tbody {
|
||||
|
@ -66,20 +66,20 @@ fn popular_table(popular_repos: Vec<Repository>, popular_crates: Vec<CratePath>)
|
|||
pub fn render(popular_repos: Vec<Repository>, popular_crates: Vec<CratePath>) -> Response {
|
||||
super::render_html("Keep your dependencies up-to-date", html! {
|
||||
section class="hero is-light" {
|
||||
div class="hero-head" (super::render_navbar())
|
||||
div class="hero-head" { (super::render_navbar()) }
|
||||
div class="hero-body" {
|
||||
div class="container" {
|
||||
p class="title is-1" "Keep your dependencies up-to-date"
|
||||
p class="title is-1" { "Keep your dependencies up-to-date" }
|
||||
p {
|
||||
"Deps.rs uses semantic versioning to detect outdated or insecure dependencies in your project's"
|
||||
code "Cargo.toml"
|
||||
code { "Cargo.toml" }
|
||||
"."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
section class="section" {
|
||||
div class="container" (popular_table(popular_repos, popular_crates))
|
||||
div class="container" { (popular_table(popular_repos, popular_crates)) }
|
||||
}
|
||||
(super::render_footer(None))
|
||||
})
|
||||
|
|
|
@ -16,14 +16,14 @@ fn render_html<B: Render>(title: &str, body: B) -> Response {
|
|||
head {
|
||||
meta charset="utf-8";
|
||||
meta name="viewport" content="width=device-width, initial-scale=1";
|
||||
title (format!("{} - Deps.rs", title))
|
||||
title { (format!("{} - Deps.rs", title)) }
|
||||
link rel="icon" type="image/png" href="/static/favicon.png";
|
||||
link rel="stylesheet" type="text/css" href="/static/style.css";
|
||||
link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,600";
|
||||
link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Source+Code+Pro";
|
||||
link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css";
|
||||
}
|
||||
body (body)
|
||||
body { (body) }
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -38,7 +38,7 @@ fn render_navbar() -> Markup {
|
|||
div class="container" {
|
||||
div class="navbar-brand" {
|
||||
a class="navbar-item is-dark" href=(SELF_BASE_URL) {
|
||||
h1 class="title is-3" "Deps.rs"
|
||||
h1 class="title is-3" { "Deps.rs" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,18 +54,18 @@ fn render_footer(duration: Option<Duration>) -> Markup {
|
|||
div class="container" {
|
||||
div class="content has-text-centered" {
|
||||
p {
|
||||
strong "Deps.rs"
|
||||
strong { "Deps.rs" }
|
||||
" is a service for the Rust community. It is open source on "
|
||||
a href="https://github.com/srijs/deps.rs" "GitHub"
|
||||
a href="https://github.com/srijs/deps.rs" { "GitHub" }
|
||||
"."
|
||||
}
|
||||
p {
|
||||
"Please report any issues on the "
|
||||
a href="https://github.com/srijs/deps.rs/issues" "issue tracker"
|
||||
a href="https://github.com/srijs/deps.rs/issues" { "issue tracker" }
|
||||
"."
|
||||
}
|
||||
@if let Some(millis) = duration_millis {
|
||||
p class="has-text-grey is-size-7" (format!("(rendered in {} ms)", millis))
|
||||
p class="has-text-grey is-size-7" { (format!("(rendered in {} ms)", millis)) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,11 +13,11 @@ fn dependency_tables(crate_name: CrateName, deps: AnalyzedDependencies) -> Marku
|
|||
html! {
|
||||
h2 class="title is-3" {
|
||||
"Crate "
|
||||
code (crate_name.as_ref())
|
||||
code { (crate_name.as_ref()) }
|
||||
}
|
||||
|
||||
@if deps.main.is_empty() && deps.dev.is_empty() && deps.build.is_empty() {
|
||||
p class="notification has-text-centered" "No external dependencies! 🙌"
|
||||
p class="notification has-text-centered" { "No external dependencies! 🙌" }
|
||||
}
|
||||
|
||||
@if !deps.main.is_empty() {
|
||||
|
@ -40,7 +40,7 @@ fn dependency_table(title: &str, deps: IndexMap<CrateName, AnalyzedDependency>)
|
|||
let count_outdated = deps.iter().filter(|&(_, dep)| dep.is_outdated()).count();
|
||||
|
||||
html! {
|
||||
h3 class="title is-4" (title)
|
||||
h3 class="title is-4" { (title) }
|
||||
p class="subtitle is-5" {
|
||||
@if count_insecure > 0 {
|
||||
(format!(" ({} total, {} insecure)", count_total, count_insecure))
|
||||
|
@ -54,33 +54,33 @@ fn dependency_table(title: &str, deps: IndexMap<CrateName, AnalyzedDependency>)
|
|||
table class="table is-fullwidth is-striped is-hoverable" {
|
||||
thead {
|
||||
tr {
|
||||
th "Crate"
|
||||
th class="has-text-right" "Required"
|
||||
th class="has-text-right" "Latest"
|
||||
th class="has-text-right" "Status"
|
||||
th { "Crate" }
|
||||
th class="has-text-right" { "Required" }
|
||||
th class="has-text-right" { "Latest" }
|
||||
th class="has-text-right" { "Status" }
|
||||
}
|
||||
}
|
||||
tbody {
|
||||
@for (name, dep) in deps {
|
||||
tr {
|
||||
td {
|
||||
a href=(format!("https://crates.io/crates/{}", name.as_ref())) (name.as_ref())
|
||||
a href=(format!("https://crates.io/crates/{}", name.as_ref())) { (name.as_ref()) }
|
||||
}
|
||||
td class="has-text-right" code (dep.required.to_string())
|
||||
td class="has-text-right" { code { (dep.required.to_string()) } }
|
||||
td class="has-text-right" {
|
||||
@if let Some(ref latest) = dep.latest {
|
||||
code (latest.to_string())
|
||||
code { (latest.to_string()) }
|
||||
} @else {
|
||||
"N/A"
|
||||
}
|
||||
}
|
||||
td class="has-text-right" {
|
||||
@if dep.insecure {
|
||||
span class="tag is-danger" "insecure"
|
||||
span class="tag is-danger" { "insecure" }
|
||||
} @else if dep.is_outdated() {
|
||||
span class="tag is-warning" "out of date"
|
||||
span class="tag is-warning" { "out of date" }
|
||||
} @else {
|
||||
span class="tag is-success" "up to date"
|
||||
span class="tag is-success" { "up to date" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ fn render_title(subject_path: &SubjectPath) -> Markup {
|
|||
let site_icon = get_site_icon(&repo_path.site);
|
||||
html! {
|
||||
a href=(format!("{}/{}/{}", repo_path.site.to_base_uri(), repo_path.qual.as_ref(), repo_path.name.as_ref())) {
|
||||
i class=(format!("fa {}", site_icon)) ""
|
||||
i class=(format!("fa {}", site_icon)) { "" }
|
||||
(format!(" {} / {}", repo_path.qual.as_ref(), repo_path.name.as_ref()))
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ fn render_title(subject_path: &SubjectPath) -> Markup {
|
|||
SubjectPath::Crate(ref crate_path) => {
|
||||
html! {
|
||||
a href=(format!("https://crates.io/crates/{}/{}", crate_path.name.as_ref(), crate_path.version)) {
|
||||
i class="fa fa-cube" ""
|
||||
i class="fa fa-cube" { "" }
|
||||
(format!(" {} {}", crate_path.name.as_ref(), crate_path.version))
|
||||
}
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ fn render_title(subject_path: &SubjectPath) -> Markup {
|
|||
fn render_failure(subject_path: SubjectPath) -> Markup {
|
||||
html! {
|
||||
section class="hero is-light" {
|
||||
div class="hero-head" (super::render_navbar())
|
||||
div class="hero-head" { (super::render_navbar()) }
|
||||
div class="hero-body" {
|
||||
div class="container" {
|
||||
h1 class="title is-1" {
|
||||
|
@ -135,8 +135,8 @@ fn render_failure(subject_path: SubjectPath) -> Markup {
|
|||
section class="section" {
|
||||
div class="container" {
|
||||
div class="notification is-danger" {
|
||||
h2 class="title is-3" "Failed to analyze repository"
|
||||
p "The repository you requested might be structured in an uncommon way that is not yet supported."
|
||||
h2 class="title is-3" { "Failed to analyze repository" }
|
||||
p { "The repository you requested might be structured in an uncommon way that is not yet supported." }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ fn render_success(analysis_outcome: AnalyzeDependenciesOutcome, subject_path: Su
|
|||
|
||||
html! {
|
||||
section class=(format!("hero {}", hero_class)) {
|
||||
div class="hero-head" (super::render_navbar())
|
||||
div class="hero-head" { (super::render_navbar()) }
|
||||
div class="hero-body" {
|
||||
div class="container" {
|
||||
h1 class="title is-1" {
|
||||
|
|
Loading…
Reference in a new issue