From 0467bfc9edc682f2ee628b65e4dbf823cf259736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 8 Jul 2016 13:35:25 +0200 Subject: [PATCH] Using parity-ui repository for builds --- .travis.yml | 4 ++++ Cargo.lock | 39 ++++++++++++++++++--------------- dapps/Cargo.toml | 10 ++++----- dapps/src/apps/mod.rs | 24 +++----------------- signer/Cargo.toml | 2 +- signer/src/lib.rs | 2 +- signer/src/ws_server/session.rs | 4 ++-- 7 files changed, 36 insertions(+), 49 deletions(-) diff --git a/.travis.yml b/.travis.yml index d051971bc..d9ed3c980 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,7 @@ matrix: env: FEATURES="--features travis-nightly" RUN_TESTS="true" env: global: + - TRAVIS_NODE_VERSION="5" # GH_TOKEN - secure: bumJASbZSU8bxJ0EyPUJmu16AiV9EXOpyOj86Jlq/Ty9CfwGqsSXt96uDyE+OUJf34RUFQMsw0nk37/zC4lcn6kqk2wpuH3N/o85Zo/cVZY/NusBWLQqtT5VbYWsV+u2Ua4Tmmsw8yVYQhYwU2ZOejNpflL+Cs9XGgORp1L+/gMRMC2y5Se6ZhwnKPQlRJ8LGsG1dzjQULxzADIt3/zuspNBS8a2urJwlHfGMkvHDoUWCviP/GXoSqw3TZR7FmKyxE19I8n9+iSvm9+oZZquvcgfUxMHn8Gq/b44UbPvjtFOg2yam4xdWXF/RyWCHdc/R9EHorSABeCbefIsm+zcUF3/YQxwpSxM4IZEeH2rTiC7dcrsKw3XsO16xFQz5YI5Bay+CT/wTdMmJd7DdYz7Dyf+pOvcM9WOf/zorxYWSBOMYy0uzbusU2iyIghQ82s7E/Ahg+WARtPgkuTLSB5aL1oCTBKHqQscMr7lo5Ti6RpWLxEdTQMBznc+bMr+6dEtkEcG9zqc6cE9XX+ox3wTU6+HVMfQ1ltCntJ4UKcw3A6INEbw9wgocQa812CIASQ2fE+SCAbz6JxBjIAlFUnD1lUB7S8PdMPwn9plfQgKQ2A5YZqg6FnBdf0rQXIJYxQWKHXj/rBHSUCT0tHACDlzTA+EwWggvkP5AGIxRxm8jhw= - TARGETS="-p ethkey -p ethstore -p ethash -p ethcore-util -p ethcore -p ethsync -p ethcore-rpc -p parity -p ethjson -p ethcore-dapps -p ethcore-signer -p bigint" @@ -54,6 +55,9 @@ addons: - libelf-dev - libdw-dev +install: + - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION + script: - if [ "$RUN_TESTS" = "true" ]; then cargo test --release --verbose ${FEATURES} ${TARGETS}; fi - if [ "$RUN_BENCHES" = "true" ]; then cargo bench --no-run ${FEATURES} ${TARGETS}; fi diff --git a/Cargo.lock b/Cargo.lock index eae4823f6..d1c1363c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -274,10 +274,10 @@ dependencies = [ "jsonrpc-http-server 5.1.0 (git+https://github.com/ethcore/jsonrpc-http-server.git)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-dapps-rs.git)", - "parity-dapps-builtins 0.5.2 (git+https://github.com/ethcore/parity-dapps-builtins-rs.git)", - "parity-dapps-status 0.5.1 (git+https://github.com/ethcore/parity-dapps-status-rs.git)", - "parity-dapps-wallet 0.6.1 (git+https://github.com/ethcore/parity-dapps-wallet-rs.git)", + "parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-ui.git)", + "parity-dapps-home 0.5.2 (git+https://github.com/ethcore/parity-ui.git)", + "parity-dapps-status 0.5.1 (git+https://github.com/ethcore/parity-ui.git)", + "parity-dapps-wallet 0.6.1 (git+https://github.com/ethcore/parity-ui.git)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", "serde_codegen 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -359,7 +359,7 @@ dependencies = [ "ethcore-util 1.3.0", "jsonrpc-core 2.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parity-minimal-sysui 0.2.0 (git+https://github.com/ethcore/parity-dapps-minimal-sysui-rs.git)", + "parity-dapps-signer 0.2.0 (git+https://github.com/ethcore/parity-ui.git)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "ws 0.5.0 (git+https://github.com/ethcore/ws-rs.git?branch=stable)", @@ -848,7 +848,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "parity-dapps" version = "0.3.0" -source = "git+https://github.com/ethcore/parity-dapps-rs.git#8ce18c014d8b69fa31fb203b68ff240091d77a23" +source = "git+https://github.com/ethcore/parity-ui.git#b0c1fa6cbe5e72d7e6542b547e886b37f7cf86de" dependencies = [ "aster 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -860,34 +860,37 @@ dependencies = [ ] [[package]] -name = "parity-dapps-builtins" +name = "parity-dapps-home" version = "0.5.2" -source = "git+https://github.com/ethcore/parity-dapps-builtins-rs.git#01af2091d5d70dfe0aecbfd96308f0ae79fc61e6" +source = "git+https://github.com/ethcore/parity-ui.git#b0c1fa6cbe5e72d7e6542b547e886b37f7cf86de" dependencies = [ - "parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-dapps-rs.git)", + "parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-ui.git)", +] + +[[package]] +name = "parity-dapps-signer" +version = "0.2.0" +source = "git+https://github.com/ethcore/parity-ui.git#b0c1fa6cbe5e72d7e6542b547e886b37f7cf86de" +dependencies = [ + "parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-ui.git)", ] [[package]] name = "parity-dapps-status" version = "0.5.1" -source = "git+https://github.com/ethcore/parity-dapps-status-rs.git#110ef2e66142ec8dc15fc40b8ddda5ed3bcfc1fb" +source = "git+https://github.com/ethcore/parity-ui.git#b0c1fa6cbe5e72d7e6542b547e886b37f7cf86de" dependencies = [ - "parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-dapps-rs.git)", + "parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-ui.git)", ] [[package]] name = "parity-dapps-wallet" version = "0.6.1" -source = "git+https://github.com/ethcore/parity-dapps-wallet-rs.git#867994fe25038f000f1cc09cd024a83700a03930" +source = "git+https://github.com/ethcore/parity-ui.git#b0c1fa6cbe5e72d7e6542b547e886b37f7cf86de" dependencies = [ - "parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-dapps-rs.git)", + "parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-ui.git)", ] -[[package]] -name = "parity-minimal-sysui" -version = "0.2.0" -source = "git+https://github.com/ethcore/parity-dapps-minimal-sysui-rs.git#996c9f3f0ebedc727aecb4ece191154e956ae292" - [[package]] name = "phf" version = "0.7.14" diff --git a/dapps/Cargo.toml b/dapps/Cargo.toml index c42ed8eff..051e4addf 100644 --- a/dapps/Cargo.toml +++ b/dapps/Cargo.toml @@ -21,13 +21,11 @@ serde_json = "0.7.0" serde_macros = { version = "0.7.0", optional = true } ethcore-rpc = { path = "../rpc" } ethcore-util = { path = "../util" } -parity-dapps = { git = "https://github.com/ethcore/parity-dapps-rs.git", version = "0.3" } +parity-dapps = { git = "https://github.com/ethcore/parity-ui.git", version = "0.3" } # List of apps -parity-dapps-status = { git = "https://github.com/ethcore/parity-dapps-status-rs.git", version = "0.5.1" } -parity-dapps-builtins = { git = "https://github.com/ethcore/parity-dapps-builtins-rs.git", version = "0.5.2" } -parity-dapps-wallet = { git = "https://github.com/ethcore/parity-dapps-wallet-rs.git", version = "0.6.0", optional = true } -parity-dapps-dao = { git = "https://github.com/ethcore/parity-dapps-dao-rs.git", version = "0.4.0", optional = true } -parity-dapps-makerotc = { git = "https://github.com/ethcore/parity-dapps-makerotc-rs.git", version = "0.3.0", optional = true } +parity-dapps-status = { git = "https://github.com/ethcore/parity-ui.git", version = "0.5.1" } +parity-dapps-home = { git = "https://github.com/ethcore/parity-ui.git", version = "0.5.2" } +parity-dapps-wallet = { git = "https://github.com/ethcore/parity-ui.git", version = "0.6.0", optional = true } mime_guess = { version = "1.6.1" } clippy = { version = "0.0.78", optional = true} diff --git a/dapps/src/apps/mod.rs b/dapps/src/apps/mod.rs index 9f6a5c745..50bdd2073 100644 --- a/dapps/src/apps/mod.rs +++ b/dapps/src/apps/mod.rs @@ -22,7 +22,7 @@ use parity_dapps::WebApp; mod fs; extern crate parity_dapps_status; -extern crate parity_dapps_builtins; +extern crate parity_dapps_home; pub const DAPPS_DOMAIN : &'static str = ".parity"; pub const RPC_PATH : &'static str = "rpc"; @@ -34,7 +34,7 @@ pub fn main_page() -> &'static str { } pub fn utils() -> Box { - Box::new(PageEndpoint::with_prefix(parity_dapps_builtins::App::default(), UTILS_PATH.to_owned())) + Box::new(PageEndpoint::with_prefix(parity_dapps_home::App::default(), UTILS_PATH.to_owned())) } pub fn all_endpoints(dapps_path: String) -> Endpoints { @@ -44,7 +44,7 @@ pub fn all_endpoints(dapps_path: String) -> Endpoints { // because we use Cross-Origin LocalStorage. // TODO [ToDr] Account naming should be moved to parity. pages.insert("home".into(), Box::new( - PageEndpoint::new_safe_to_embed(parity_dapps_builtins::App::default()) + PageEndpoint::new_safe_to_embed(parity_dapps_home::App::default()) )); pages.insert("proxy".into(), ProxyPac::boxed()); insert::(&mut pages, "parity"); @@ -52,8 +52,6 @@ pub fn all_endpoints(dapps_path: String) -> Endpoints { // Optional dapps wallet_page(&mut pages); - daodapp_page(&mut pages); - makerotc_page(&mut pages); pages } @@ -66,22 +64,6 @@ fn wallet_page(pages: &mut Endpoints) { #[cfg(not(feature = "parity-dapps-wallet"))] fn wallet_page(_pages: &mut Endpoints) {} -#[cfg(feature = "parity-dapps-dao")] -fn daodapp_page(pages: &mut Endpoints) { - extern crate parity_dapps_dao; - insert::(pages, "dao"); -} -#[cfg(not(feature = "parity-dapps-dao"))] -fn daodapp_page(_pages: &mut Endpoints) {} - -#[cfg(feature = "parity-dapps-makerotc")] -fn makerotc_page(pages: &mut Endpoints) { - extern crate parity_dapps_makerotc; - insert::(pages, "makerotc"); -} -#[cfg(not(feature = "parity-dapps-makerotc"))] -fn makerotc_page(_pages: &mut Endpoints) {} - fn insert(pages: &mut Endpoints, id: &str) { pages.insert(id.to_owned(), Box::new(PageEndpoint::new(T::default()))); } diff --git a/signer/Cargo.toml b/signer/Cargo.toml index 5e59d04a7..8f9746ae7 100644 --- a/signer/Cargo.toml +++ b/signer/Cargo.toml @@ -18,7 +18,7 @@ env_logger = "0.3" ws = { git = "https://github.com/ethcore/ws-rs.git", branch = "stable" } ethcore-util = { path = "../util" } ethcore-rpc = { path = "../rpc" } -parity-minimal-sysui = { git = "https://github.com/ethcore/parity-dapps-minimal-sysui-rs.git", version = "0.2.0" } +parity-dapps-signer = { git = "https://github.com/ethcore/parity-ui.git", version = "0.2.0" } clippy = { version = "0.0.78", optional = true} diff --git a/signer/src/lib.rs b/signer/src/lib.rs index 3aaed8bcf..bf7de3e53 100644 --- a/signer/src/lib.rs +++ b/signer/src/lib.rs @@ -51,7 +51,7 @@ extern crate ethcore_util as util; extern crate ethcore_rpc as rpc; extern crate jsonrpc_core; extern crate ws; -extern crate parity_minimal_sysui as sysui; +extern crate parity_dapps_signer as signer; mod authcode_store; mod ws_server; diff --git a/signer/src/ws_server/session.rs b/signer/src/ws_server/session.rs index 4b2eb808c..38931ddd5 100644 --- a/signer/src/ws_server/session.rs +++ b/signer/src/ws_server/session.rs @@ -17,7 +17,7 @@ //! Session handlers factory. use ws; -use sysui; +use signer; use authcode_store::AuthCodes; use std::path::{PathBuf, Path}; use std::sync::Arc; @@ -111,7 +111,7 @@ impl ws::Handler for Session { } // Otherwise try to serve a page. - Ok(sysui::handle(req.resource()) + Ok(signer::handle(req.resource()) .map_or_else( // return 404 not found || add_headers(ws::Response::not_found("Not found".into()), "text/plain"),