Renaming dapps repos. Updating dapps (#1142)
* Renaming dapps repos. Updating dapps * Skipping legacy options for compatibility. Fixing tabs * Fixing CLI options
This commit is contained in:
parent
3a5e7fc2ed
commit
cc1a334ba7
@ -33,7 +33,7 @@ env:
|
||||
global:
|
||||
# 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 ethash -p ethcore-util -p ethcore -p ethsync -p ethcore-rpc -p parity -p ethminer -p ethjson -p ethcore-webapp"
|
||||
- TARGETS="-p ethash -p ethcore-util -p ethcore -p ethsync -p ethcore-rpc -p parity -p ethminer -p ethjson -p ethcore-dapps"
|
||||
- ARCHIVE_SUFFIX="-${TRAVIS_OS_NAME}-${TRAVIS_TAG}"
|
||||
- KCOV_FEATURES=""
|
||||
- KCOV_CMD="./kcov-master/tmp/usr/local/bin/kcov --exclude-pattern /usr/,/.cargo,/root/.multirust,src/tests,util/json-tests,util/src/network/tests,sync/src/tests,ethcore/src/tests,ethcore/src/evm/tests target/kcov"
|
||||
@ -70,7 +70,7 @@ after_success: |
|
||||
$KCOV_CMD target/debug/deps/ethcore-* &&
|
||||
$KCOV_CMD target/debug/deps/ethsync-* &&
|
||||
$KCOV_CMD target/debug/deps/ethcore_rpc-* &&
|
||||
$KCOV_CMD target/debug/deps/ethcore_webapp-* &&
|
||||
$KCOV_CMD target/debug/deps/ethcore_dapps-* &&
|
||||
$KCOV_CMD target/debug/deps/ethminer-* &&
|
||||
$KCOV_CMD target/debug/deps/ethjson-* &&
|
||||
$KCOV_CMD target/debug/parity-* &&
|
||||
|
166
Cargo.lock
generated
166
Cargo.lock
generated
@ -9,13 +9,13 @@ dependencies = [
|
||||
"docopt 0.6.80 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore 1.2.0",
|
||||
"ethcore-dapps 1.2.0",
|
||||
"ethcore-devtools 1.2.0",
|
||||
"ethcore-ipc 1.2.0",
|
||||
"ethcore-ipc-codegen 1.2.0",
|
||||
"ethcore-ipc-nano 1.2.0",
|
||||
"ethcore-rpc 1.2.0",
|
||||
"ethcore-util 1.2.0",
|
||||
"ethcore-webapp 1.2.0",
|
||||
"ethminer 1.2.0",
|
||||
"ethsync 1.2.0",
|
||||
"fdlimit 0.1.0",
|
||||
@ -255,6 +255,31 @@ dependencies = [
|
||||
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ethcore-dapps"
|
||||
version = "1.2.0"
|
||||
dependencies = [
|
||||
"clippy 0.0.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore-rpc 1.2.0",
|
||||
"ethcore-util 1.2.0",
|
||||
"hyper 0.9.3 (git+https://github.com/ethcore/hyper)",
|
||||
"jsonrpc-core 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"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)",
|
||||
"parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-dapps-rs.git)",
|
||||
"parity-dapps-builtins 0.5.0 (git+https://github.com/ethcore/parity-dapps-builtins-rs.git)",
|
||||
"parity-dapps-dao 0.3.0 (git+https://github.com/ethcore/parity-dapps-dao-rs.git)",
|
||||
"parity-dapps-makerotc 0.2.0 (git+https://github.com/ethcore/parity-dapps-makerotc-rs.git)",
|
||||
"parity-dapps-status 0.5.0 (git+https://github.com/ethcore/parity-dapps-status-rs.git)",
|
||||
"parity-dapps-wallet 0.5.0 (git+https://github.com/ethcore/parity-dapps-wallet-rs.git)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_codegen 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syntex 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ethcore-devtools"
|
||||
version = "1.2.0"
|
||||
@ -351,31 +376,6 @@ dependencies = [
|
||||
"vergen 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ethcore-webapp"
|
||||
version = "1.2.0"
|
||||
dependencies = [
|
||||
"clippy 0.0.69 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ethcore-rpc 1.2.0",
|
||||
"ethcore-util 1.2.0",
|
||||
"hyper 0.9.3 (git+https://github.com/ethcore/hyper)",
|
||||
"jsonrpc-core 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"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)",
|
||||
"parity-daodapp 0.2.1 (git+https://github.com/ethcore/parity-daodapp-rs.git)",
|
||||
"parity-idmanager 0.3.2 (git+https://github.com/ethcore/parity-idmanager-rs.git)",
|
||||
"parity-makerotc 0.1.3 (git+https://github.com/ethcore/parity-makerotc-rs.git)",
|
||||
"parity-status 0.4.3 (git+https://github.com/ethcore/parity-status.git)",
|
||||
"parity-wallet 0.4.1 (git+https://github.com/ethcore/parity-wallet.git)",
|
||||
"parity-webapp 0.2.0 (git+https://github.com/ethcore/parity-webapp.git)",
|
||||
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_codegen 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_json 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syntex 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ethjson"
|
||||
version = "0.1.0"
|
||||
@ -676,6 +676,17 @@ dependencies = [
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mime_guess"
|
||||
version = "1.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_codegen 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mio"
|
||||
version = "0.5.1"
|
||||
@ -843,49 +854,92 @@ version = "0.2.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "parity-daodapp"
|
||||
version = "0.2.1"
|
||||
source = "git+https://github.com/ethcore/parity-daodapp-rs.git#333478fac5b0dfa3c17a740316eda51e5305fc42"
|
||||
name = "parity-dapps"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/ethcore/parity-dapps-rs.git#01ff8c2a3e61ea436f0d47acbbb8ac4bea4cd234"
|
||||
dependencies = [
|
||||
"parity-webapp 0.2.0 (git+https://github.com/ethcore/parity-webapp.git)",
|
||||
"aster 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mime_guess 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quasi 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"quasi_codegen 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syntex 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"syntex_syntax 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parity-idmanager"
|
||||
version = "0.3.2"
|
||||
source = "git+https://github.com/ethcore/parity-idmanager-rs.git#5bc85d456455f7b9f6f257021dab9394de9e66b4"
|
||||
name = "parity-dapps-builtins"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/ethcore/parity-dapps-builtins-rs.git#eb86a2954f04d3aa5547a8c4bb77ae7aad09bf55"
|
||||
dependencies = [
|
||||
"parity-webapp 0.2.0 (git+https://github.com/ethcore/parity-webapp.git)",
|
||||
"parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-dapps-rs.git)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parity-makerotc"
|
||||
version = "0.1.3"
|
||||
source = "git+https://github.com/ethcore/parity-makerotc-rs.git#5fec743658e82b365e1db739a966a69e557b5873"
|
||||
name = "parity-dapps-dao"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/ethcore/parity-dapps-dao-rs.git#5723ccc5b93010caa8f4aee248d89ae13401389b"
|
||||
dependencies = [
|
||||
"parity-webapp 0.2.0 (git+https://github.com/ethcore/parity-webapp.git)",
|
||||
"parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-dapps-rs.git)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parity-status"
|
||||
version = "0.4.3"
|
||||
source = "git+https://github.com/ethcore/parity-status.git#606dfe6d272792f2fdb90909318f2439d58330a5"
|
||||
dependencies = [
|
||||
"parity-webapp 0.2.0 (git+https://github.com/ethcore/parity-webapp.git)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parity-wallet"
|
||||
version = "0.4.1"
|
||||
source = "git+https://github.com/ethcore/parity-wallet.git#6e714a31cdc26cc86f0edb14fd1ae1dc7d496d1e"
|
||||
dependencies = [
|
||||
"parity-webapp 0.2.0 (git+https://github.com/ethcore/parity-webapp.git)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parity-webapp"
|
||||
name = "parity-dapps-makerotc"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/ethcore/parity-webapp.git#f31681af69631bcadfbef89a7e60dcc49552f7c6"
|
||||
source = "git+https://github.com/ethcore/parity-dapps-makerotc-rs.git#39e654469ab659dc5570ba1ec94ca0f943aaff16"
|
||||
dependencies = [
|
||||
"parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-dapps-rs.git)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parity-dapps-status"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/ethcore/parity-dapps-status-rs.git#e1caeeacf4b29da586572798881974521e6e8caf"
|
||||
dependencies = [
|
||||
"parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-dapps-rs.git)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parity-dapps-wallet"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/ethcore/parity-dapps-wallet-rs.git#37b1691d74ad9bdabc64f58684d9d0a6d1aeef66"
|
||||
dependencies = [
|
||||
"parity-dapps 0.3.0 (git+https://github.com/ethcore/parity-dapps-rs.git)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf"
|
||||
version = "0.7.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"phf_shared 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_codegen"
|
||||
version = "0.7.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"phf_generator 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_shared 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_generator"
|
||||
version = "0.7.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"phf_shared 0.7.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf_shared"
|
||||
version = "0.7.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "primal"
|
||||
|
@ -30,7 +30,7 @@ ethsync = { path = "sync" }
|
||||
ethminer = { path = "miner" }
|
||||
ethcore-devtools = { path = "devtools" }
|
||||
ethcore-rpc = { path = "rpc", optional = true }
|
||||
ethcore-webapp = { path = "webapp", optional = true }
|
||||
ethcore-dapps = { path = "dapps", optional = true }
|
||||
semver = "0.2"
|
||||
ethcore-ipc-nano = { path = "ipc/nano" }
|
||||
ethcore-ipc = { path = "ipc/rpc" }
|
||||
@ -42,11 +42,11 @@ version = "0.8"
|
||||
default-features = false
|
||||
|
||||
[features]
|
||||
default = ["rpc", "webapp"]
|
||||
default = ["rpc", "dapps"]
|
||||
rpc = ["ethcore-rpc"]
|
||||
webapp = ["ethcore-webapp"]
|
||||
dapps = ["ethcore-dapps"]
|
||||
dev = ["clippy", "ethcore/dev", "ethcore-util/dev", "ethsync/dev", "ethcore-rpc/dev", "ethminer/dev",
|
||||
"ethcore-webapp/dev"]
|
||||
"ethcore-dapps/dev"]
|
||||
travis-beta = ["ethcore/json-tests"]
|
||||
travis-nightly = ["ethcore/json-tests", "dev"]
|
||||
|
||||
|
4
cov.sh
4
cov.sh
@ -23,7 +23,7 @@ cargo test \
|
||||
-p ethcore-rpc \
|
||||
-p parity \
|
||||
-p ethminer \
|
||||
-p ethcore-webapp \
|
||||
-p ethcore-dapps \
|
||||
--no-run || exit $?
|
||||
rm -rf target/coverage
|
||||
mkdir -p target/coverage
|
||||
@ -34,6 +34,6 @@ kcov --exclude-pattern $EXCLUDE --include-pattern src --verify target/coverage t
|
||||
kcov --exclude-pattern $EXCLUDE --include-pattern src --verify target/coverage target/debug/deps/ethcore_util-*
|
||||
kcov --exclude-pattern $EXCLUDE --include-pattern src --verify target/coverage target/debug/deps/ethsync-*
|
||||
kcov --exclude-pattern $EXCLUDE --include-pattern src --verify target/coverage target/debug/deps/ethcore_rpc-*
|
||||
kcov --exclude-pattern $EXCLUDE --include-pattern src --verify target/coverage target/debug/deps/ethcore_webapp-*
|
||||
kcov --exclude-pattern $EXCLUDE --include-pattern src --verify target/coverage target/debug/deps/ethcore_dapps-*
|
||||
kcov --exclude-pattern $EXCLUDE --include-pattern src --verify target/coverage target/debug/deps/ethminer-*
|
||||
xdg-open target/coverage/index.html
|
||||
|
40
dapps/Cargo.toml
Normal file
40
dapps/Cargo.toml
Normal file
@ -0,0 +1,40 @@
|
||||
[package]
|
||||
description = "Parity Dapps crate"
|
||||
name = "ethcore-dapps"
|
||||
version = "1.2.0"
|
||||
license = "GPL-3.0"
|
||||
authors = ["Ethcore <admin@ethcore.io"]
|
||||
build = "build.rs"
|
||||
|
||||
[lib]
|
||||
|
||||
[dependencies]
|
||||
log = "0.3"
|
||||
jsonrpc-core = "2.0"
|
||||
jsonrpc-http-server = { git = "https://github.com/ethcore/jsonrpc-http-server.git" }
|
||||
hyper = { default-features = false, git = "https://github.com/ethcore/hyper" }
|
||||
url = "1.0"
|
||||
rustc-serialize = "0.3"
|
||||
serde = "0.7.0"
|
||||
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" }
|
||||
# List of apps
|
||||
parity-dapps-status = { git = "https://github.com/ethcore/parity-dapps-status-rs.git", version = "0.5.0" }
|
||||
parity-dapps-builtins = { git = "https://github.com/ethcore/parity-dapps-builtins-rs.git", version = "0.5.0" }
|
||||
parity-dapps-wallet = { git = "https://github.com/ethcore/parity-dapps-wallet-rs.git", version = "0.5.0", optional = true }
|
||||
parity-dapps-dao = { git = "https://github.com/ethcore/parity-dapps-dao-rs.git", version = "0.3.0", optional = true }
|
||||
parity-dapps-makerotc = { git = "https://github.com/ethcore/parity-dapps-makerotc-rs.git", version = "0.2.0", optional = true }
|
||||
clippy = { version = "0.0.69", optional = true}
|
||||
|
||||
[build-dependencies]
|
||||
serde_codegen = { version = "0.7.0", optional = true }
|
||||
syntex = "0.32.0"
|
||||
|
||||
[features]
|
||||
default = ["serde_codegen", "extra-dapps"]
|
||||
extra-dapps = ["parity-dapps-wallet", "parity-dapps-dao", "parity-dapps-makerotc"]
|
||||
nightly = ["serde_macros"]
|
||||
dev = ["clippy", "ethcore-rpc/dev", "ethcore-util/dev"]
|
@ -45,11 +45,11 @@ impl RestApi {
|
||||
self.endpoints.iter().filter_map(|(ref k, ref e)| {
|
||||
e.info().map(|ref info| App {
|
||||
id: k.to_owned().clone(),
|
||||
name: info.name.clone(),
|
||||
description: info.description.clone(),
|
||||
version: info.version.clone(),
|
||||
author: info.author.clone(),
|
||||
icon_url: info.icon_url.clone(),
|
||||
name: info.name.to_owned(),
|
||||
description: info.description.to_owned(),
|
||||
version: info.version.to_owned(),
|
||||
author: info.author.to_owned(),
|
||||
icon_url: info.icon_url.to_owned(),
|
||||
})
|
||||
}).collect()
|
||||
}
|
@ -17,10 +17,10 @@
|
||||
use endpoint::{Endpoints, Endpoint};
|
||||
use page::PageEndpoint;
|
||||
use proxypac::ProxyPac;
|
||||
use parity_webapp::WebApp;
|
||||
use parity_dapps::WebApp;
|
||||
|
||||
extern crate parity_status;
|
||||
extern crate parity_idmanager;
|
||||
extern crate parity_dapps_status;
|
||||
extern crate parity_dapps_builtins;
|
||||
|
||||
|
||||
pub const DAPPS_DOMAIN : &'static str = ".parity";
|
||||
@ -33,16 +33,16 @@ pub fn main_page() -> &'static str {
|
||||
}
|
||||
|
||||
pub fn utils() -> Box<Endpoint> {
|
||||
Box::new(PageEndpoint::with_prefix(parity_idmanager::App::default(), UTILS_PATH.to_owned()))
|
||||
Box::new(PageEndpoint::with_prefix(parity_dapps_builtins::App::default(), UTILS_PATH.to_owned()))
|
||||
}
|
||||
|
||||
pub fn all_endpoints() -> Endpoints {
|
||||
let mut pages = Endpoints::new();
|
||||
pages.insert("proxy".to_owned(), ProxyPac::boxed());
|
||||
|
||||
insert::<parity_status::App>(&mut pages, "status");
|
||||
insert::<parity_status::App>(&mut pages, "parity");
|
||||
insert::<parity_idmanager::App>(&mut pages, "home");
|
||||
insert::<parity_dapps_status::App>(&mut pages, "status");
|
||||
insert::<parity_dapps_status::App>(&mut pages, "parity");
|
||||
insert::<parity_dapps_builtins::App>(&mut pages, "home");
|
||||
|
||||
wallet_page(&mut pages);
|
||||
daodapp_page(&mut pages);
|
||||
@ -50,28 +50,28 @@ pub fn all_endpoints() -> Endpoints {
|
||||
pages
|
||||
}
|
||||
|
||||
#[cfg(feature = "parity-wallet")]
|
||||
#[cfg(feature = "parity-dapps-wallet")]
|
||||
fn wallet_page(pages: &mut Endpoints) {
|
||||
extern crate parity_wallet;
|
||||
insert::<parity_wallet::App>(pages, "wallet");
|
||||
extern crate parity_dapps_wallet;
|
||||
insert::<parity_dapps_wallet::App>(pages, "wallet");
|
||||
}
|
||||
#[cfg(not(feature = "parity-wallet"))]
|
||||
#[cfg(not(feature = "parity-dapps-wallet"))]
|
||||
fn wallet_page(_pages: &mut Endpoints) {}
|
||||
|
||||
#[cfg(feature = "parity-daodapp")]
|
||||
#[cfg(feature = "parity-dapps-daodapp")]
|
||||
fn daodapp_page(pages: &mut Endpoints) {
|
||||
extern crate parity_daodapp;
|
||||
insert::<parity_daodapp::App>(pages, "dao");
|
||||
extern crate parity_dapps_daodapp;
|
||||
insert::<parity_dapps_daodapp::App>(pages, "dao");
|
||||
}
|
||||
#[cfg(not(feature = "parity-daodapp"))]
|
||||
#[cfg(not(feature = "parity-dapps-daodapp"))]
|
||||
fn daodapp_page(_pages: &mut Endpoints) {}
|
||||
|
||||
#[cfg(feature = "parity-makerotc")]
|
||||
#[cfg(feature = "parity-dapps-makerotc")]
|
||||
fn makerotc_page(pages: &mut Endpoints) {
|
||||
extern crate parity_makerotc;
|
||||
insert::<parity_makerotc::App>(pages, "makerotc");
|
||||
extern crate parity_dapps_makerotc;
|
||||
insert::<parity_dapps_makerotc::App>(pages, "makerotc");
|
||||
}
|
||||
#[cfg(not(feature = "parity-makerotc"))]
|
||||
#[cfg(not(feature = "parity-dapps-makerotc"))]
|
||||
fn makerotc_page(_pages: &mut Endpoints) {}
|
||||
|
||||
fn insert<T : WebApp + Default + 'static>(pages: &mut Endpoints, id: &str) {
|
@ -32,11 +32,11 @@ pub struct EndpointPath {
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct EndpointInfo {
|
||||
pub name: String,
|
||||
pub description: String,
|
||||
pub version: String,
|
||||
pub author: String,
|
||||
pub icon_url: String,
|
||||
pub name: &'static str,
|
||||
pub description: &'static str,
|
||||
pub version: &'static str,
|
||||
pub author: &'static str,
|
||||
pub icon_url: &'static str,
|
||||
}
|
||||
|
||||
pub trait Endpoint : Send + Sync {
|
@ -17,11 +17,11 @@
|
||||
//! Ethcore Webapplications for Parity
|
||||
//! ```
|
||||
//! extern crate jsonrpc_core;
|
||||
//! extern crate ethcore_webapp;
|
||||
//! extern crate ethcore_dapps;
|
||||
//!
|
||||
//! use std::sync::Arc;
|
||||
//! use jsonrpc_core::IoHandler;
|
||||
//! use ethcore_webapp::*;
|
||||
//! use ethcore_dapps::*;
|
||||
//!
|
||||
//! struct SayHello;
|
||||
//! impl MethodCommand for SayHello {
|
||||
@ -51,7 +51,7 @@ extern crate serde;
|
||||
extern crate serde_json;
|
||||
extern crate jsonrpc_core;
|
||||
extern crate jsonrpc_http_server;
|
||||
extern crate parity_webapp;
|
||||
extern crate parity_dapps;
|
||||
|
||||
mod endpoint;
|
||||
mod apps;
|
||||
@ -75,7 +75,7 @@ pub struct ServerBuilder {
|
||||
}
|
||||
|
||||
impl ServerBuilder {
|
||||
/// Construct new webapps
|
||||
/// Construct new dapps server
|
||||
pub fn new() -> Self {
|
||||
ServerBuilder {
|
||||
handler: Arc::new(IoHandler::new())
|
@ -23,7 +23,7 @@ use hyper::status::StatusCode;
|
||||
use hyper::net::HttpStream;
|
||||
use hyper::{Decoder, Encoder, Next};
|
||||
use endpoint::{Endpoint, EndpointInfo, EndpointPath};
|
||||
use parity_webapp::{WebApp, Info};
|
||||
use parity_dapps::{WebApp, Info};
|
||||
|
||||
pub struct PageEndpoint<T : WebApp + 'static> {
|
||||
/// Content of the files
|
||||
@ -159,7 +159,7 @@ impl<T: WebApp + 'static> server::Handler<HttpStream> for PageHandler<T> {
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
use parity_webapp::File;
|
||||
use parity_dapps::File;
|
||||
|
||||
#[cfg(test)]
|
||||
#[derive(Default)]
|
2
doc.sh
2
doc.sh
@ -7,6 +7,6 @@ cargo doc --no-deps --verbose \
|
||||
-p ethcore \
|
||||
-p ethsync \
|
||||
-p ethcore-rpc \
|
||||
-p ethcore-webapp \
|
||||
-p ethcore-dapps \
|
||||
-p parity \
|
||||
-p ethminer
|
||||
|
2
fmt.sh
2
fmt.sh
@ -9,7 +9,7 @@ $RUSTFMT ./json/src/lib.rs
|
||||
$RUSTFMT ./miner/src/lib.rs
|
||||
$RUSTFMT ./parity/main.rs
|
||||
$RUSTFMT ./rpc/src/lib.rs
|
||||
$RUSTFMT ./webapp/src/lib.rs
|
||||
$RUSTFMT ./dapps/src/lib.rs
|
||||
$RUSTFMT ./sync/src/lib.rs
|
||||
$RUSTFMT ./util/src/lib.rs
|
||||
|
||||
|
2
hook.sh
2
hook.sh
@ -7,6 +7,6 @@ echo "set -e" >> $FILE
|
||||
echo "cargo build --features dev" >> $FILE
|
||||
# Build tests
|
||||
echo "cargo test --no-run --features dev \\" >> $FILE
|
||||
echo " -p ethash -p ethcore-util -p ethcore -p ethsync -p ethcore-rpc -p parity -p ethminer -p ethcore-webapp" >> $FILE
|
||||
echo " -p ethash -p ethcore-util -p ethcore -p ethsync -p ethcore-rpc -p parity -p ethminer -p ethcore-dapps" >> $FILE
|
||||
echo "" >> $FILE
|
||||
chmod +x $FILE
|
||||
|
@ -84,19 +84,18 @@ API and Console Options:
|
||||
--ipc-apis APIS Specify custom API set available via JSON-RPC over
|
||||
IPC [default: web3,eth,net,personal,ethcore].
|
||||
|
||||
--webapp-off Disable the web applications server (e.g. status
|
||||
page).
|
||||
--webapp-port PORT Specify the port portion of the WebApps server
|
||||
--dapps-off Disable the Dapps server (e.g. status page).
|
||||
--dapps-port PORT Specify the port portion of the Dapps server
|
||||
[default: 8080].
|
||||
--webapp-interface IP Specify the hostname portion of the WebApps
|
||||
--dapps-interface IP Specify the hostname portion of the Dapps
|
||||
server, IP should be an interface's IP address, or
|
||||
all (all interfaces) or local [default: local].
|
||||
--webapp-user USERNAME Specify username for WebApps server. It will be
|
||||
--dapps-user USERNAME Specify username for Dapps server. It will be
|
||||
used in HTTP Basic Authentication Scheme.
|
||||
If --webapp-pass is not specified you will be
|
||||
If --dapps-pass is not specified you will be
|
||||
asked for password on startup.
|
||||
--webapp-pass PASSWORD Specify password for WebApps server. Use only in
|
||||
conjunction with --webapp-user.
|
||||
--dapps-pass PASSWORD Specify password for Dapps server. Use only in
|
||||
conjunction with --dapps-user.
|
||||
|
||||
Sealing/Mining Options:
|
||||
--force-sealing Force the node to author new blocks as if it were
|
||||
@ -168,7 +167,7 @@ Legacy Options:
|
||||
--nodekey KEY Equivalent to --node-key KEY.
|
||||
--nodiscover Equivalent to --no-discovery.
|
||||
-j --jsonrpc Does nothing; JSON-RPC is on by default now.
|
||||
-w --webapp Does nothing; web app server is on by default now.
|
||||
-w --webapp Does nothing; dapps server is on by default now.
|
||||
--rpc Does nothing; JSON-RPC is on by default now.
|
||||
--rpcaddr IP Equivalent to --jsonrpc-interface IP.
|
||||
--rpcport PORT Equivalent to --jsonrpc-port PORT.
|
||||
@ -230,11 +229,11 @@ pub struct Args {
|
||||
pub flag_ipc_off: bool,
|
||||
pub flag_ipc_path: String,
|
||||
pub flag_ipc_apis: String,
|
||||
pub flag_webapp_off: bool,
|
||||
pub flag_webapp_port: u16,
|
||||
pub flag_webapp_interface: String,
|
||||
pub flag_webapp_user: Option<String>,
|
||||
pub flag_webapp_pass: Option<String>,
|
||||
pub flag_dapps_off: bool,
|
||||
pub flag_dapps_port: u16,
|
||||
pub flag_dapps_interface: String,
|
||||
pub flag_dapps_user: Option<String>,
|
||||
pub flag_dapps_pass: Option<String>,
|
||||
pub flag_force_sealing: bool,
|
||||
pub flag_author: String,
|
||||
pub flag_usd_per_tx: String,
|
||||
|
@ -26,9 +26,9 @@ use util::keys::store::{AccountService};
|
||||
use util::network_settings::NetworkSettings;
|
||||
use die::*;
|
||||
|
||||
#[cfg(feature = "webapp")]
|
||||
pub use ethcore_webapp::Server as WebappServer;
|
||||
#[cfg(not(feature = "webapp"))]
|
||||
#[cfg(feature = "dapps")]
|
||||
pub use ethcore_dapps::Server as WebappServer;
|
||||
#[cfg(not(feature = "dapps"))]
|
||||
pub struct WebappServer;
|
||||
|
||||
pub struct Configuration {
|
||||
@ -74,11 +74,11 @@ pub fn new(configuration: Configuration, deps: Dependencies) -> Option<WebappSer
|
||||
(username.to_owned(), password)
|
||||
});
|
||||
|
||||
Some(setup_webapp_server(deps, &addr, auth))
|
||||
Some(setup_dapps_server(deps, &addr, auth))
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "webapp"))]
|
||||
pub fn setup_webapp_server(
|
||||
#[cfg(not(feature = "dapps"))]
|
||||
pub fn setup_dapps_server(
|
||||
_deps: Dependencies,
|
||||
_url: &SocketAddr,
|
||||
_auth: Option<(String, String)>,
|
||||
@ -86,16 +86,16 @@ pub fn setup_webapp_server(
|
||||
die!("Your Parity version has been compiled without WebApps support.")
|
||||
}
|
||||
|
||||
#[cfg(feature = "webapp")]
|
||||
pub fn setup_webapp_server(
|
||||
#[cfg(feature = "dapps")]
|
||||
pub fn setup_dapps_server(
|
||||
deps: Dependencies,
|
||||
url: &SocketAddr,
|
||||
auth: Option<(String, String)>
|
||||
) -> WebappServer {
|
||||
use ethcore_rpc::v1::*;
|
||||
use ethcore_webapp as webapp;
|
||||
use ethcore_dapps as dapps;
|
||||
|
||||
let server = webapp::ServerBuilder::new();
|
||||
let server = dapps::ServerBuilder::new();
|
||||
server.add_delegate(Web3Client::new().to_delegate());
|
||||
server.add_delegate(NetClient::new(&deps.sync).to_delegate());
|
||||
server.add_delegate(EthClient::new(&deps.client, &deps.sync, &deps.secret_store, &deps.miner, &deps.external_miner).to_delegate());
|
||||
@ -113,7 +113,7 @@ pub fn setup_webapp_server(
|
||||
};
|
||||
|
||||
match start_result {
|
||||
Err(webapp::ServerError::IoError(err)) => die_with_io_error("WebApps", err),
|
||||
Err(dapps::ServerError::IoError(err)) => die_with_io_error("WebApps", err),
|
||||
Err(e) => die!("WebApps: {:?}", e),
|
||||
Ok(server) => {
|
||||
server.set_panic_handler(move || {
|
@ -47,8 +47,8 @@ extern crate json_ipc_server as jsonipc;
|
||||
#[cfg(feature = "rpc")]
|
||||
extern crate ethcore_rpc;
|
||||
|
||||
#[cfg(feature = "webapp")]
|
||||
extern crate ethcore_webapp;
|
||||
#[cfg(feature = "dapps")]
|
||||
extern crate ethcore_dapps;
|
||||
|
||||
#[macro_use]
|
||||
mod die;
|
||||
@ -57,7 +57,7 @@ mod upgrade;
|
||||
mod hypervisor;
|
||||
mod setup_log;
|
||||
mod rpc;
|
||||
mod webapp;
|
||||
mod dapps;
|
||||
mod informant;
|
||||
mod io_handler;
|
||||
mod cli;
|
||||
@ -81,7 +81,7 @@ use informant::Informant;
|
||||
use die::*;
|
||||
use cli::print_version;
|
||||
use rpc::RpcServer;
|
||||
use webapp::WebappServer;
|
||||
use dapps::WebappServer;
|
||||
use io_handler::ClientIoHandler;
|
||||
use configuration::Configuration;
|
||||
|
||||
@ -198,14 +198,14 @@ fn execute_client(conf: Configuration) {
|
||||
// setup ipc rpc
|
||||
let _ipc_server = rpc::new_ipc(conf.ipc_settings(), &dependencies);
|
||||
|
||||
if conf.args.flag_webapp { println!("WARNING: Flag -w/--webapp is deprecated. Web app server is now on by default. Ignoring."); }
|
||||
let webapp_server = webapp::new(webapp::Configuration {
|
||||
enabled: !conf.args.flag_webapp_off,
|
||||
interface: conf.args.flag_webapp_interface.clone(),
|
||||
port: conf.args.flag_webapp_port,
|
||||
user: conf.args.flag_webapp_user.clone(),
|
||||
pass: conf.args.flag_webapp_pass.clone(),
|
||||
}, webapp::Dependencies {
|
||||
if conf.args.flag_webapp { println!("WARNING: Flag -w/--webapp is deprecated. Dapps server is now on by default. Ignoring."); }
|
||||
let dapps_server = dapps::new(dapps::Configuration {
|
||||
enabled: !conf.args.flag_dapps_off,
|
||||
interface: conf.args.flag_dapps_interface.clone(),
|
||||
port: conf.args.flag_dapps_port,
|
||||
user: conf.args.flag_dapps_user.clone(),
|
||||
pass: conf.args.flag_dapps_pass.clone(),
|
||||
}, dapps::Dependencies {
|
||||
panic_handler: panic_handler.clone(),
|
||||
client: client.clone(),
|
||||
sync: sync.clone(),
|
||||
@ -226,7 +226,7 @@ fn execute_client(conf: Configuration) {
|
||||
service.io().register_handler(io_handler).expect("Error registering IO handler");
|
||||
|
||||
// Handle exit
|
||||
wait_for_exit(panic_handler, rpc_server, webapp_server);
|
||||
wait_for_exit(panic_handler, rpc_server, dapps_server);
|
||||
}
|
||||
|
||||
fn flush_stdout() {
|
||||
@ -438,7 +438,7 @@ fn execute_account_cli(conf: Configuration) {
|
||||
}
|
||||
}
|
||||
|
||||
fn wait_for_exit(panic_handler: Arc<PanicHandler>, _rpc_server: Option<RpcServer>, _webapp_server: Option<WebappServer>) {
|
||||
fn wait_for_exit(panic_handler: Arc<PanicHandler>, _rpc_server: Option<RpcServer>, _dapps_server: Option<WebappServer>) {
|
||||
let exit = Arc::new(Condvar::new());
|
||||
|
||||
// Handle possible exits
|
||||
|
2
test.sh
2
test.sh
@ -7,7 +7,7 @@ cargo test --features ethcore/json-tests $1 \
|
||||
-p ethcore \
|
||||
-p ethsync \
|
||||
-p ethcore-rpc \
|
||||
-p ethcore-webapp \
|
||||
-p ethcore-dapps \
|
||||
-p parity \
|
||||
-p ethminer \
|
||||
-p bigint
|
||||
|
@ -1,39 +0,0 @@
|
||||
[package]
|
||||
description = "Parity WebApplications crate"
|
||||
name = "ethcore-webapp"
|
||||
version = "1.2.0"
|
||||
license = "GPL-3.0"
|
||||
authors = ["Ethcore <admin@ethcore.io"]
|
||||
build = "build.rs"
|
||||
|
||||
[lib]
|
||||
|
||||
[dependencies]
|
||||
log = "0.3"
|
||||
jsonrpc-core = "2.0"
|
||||
jsonrpc-http-server = { git = "https://github.com/ethcore/jsonrpc-http-server.git" }
|
||||
hyper = { default-features = false, git = "https://github.com/ethcore/hyper" }
|
||||
url = "1.0"
|
||||
rustc-serialize = "0.3"
|
||||
serde = "0.7.0"
|
||||
serde_json = "0.7.0"
|
||||
serde_macros = { version = "0.7.0", optional = true }
|
||||
ethcore-rpc = { path = "../rpc" }
|
||||
ethcore-util = { path = "../util" }
|
||||
parity-webapp = { git = "https://github.com/ethcore/parity-webapp.git", version = "0.2" }
|
||||
# List of apps
|
||||
parity-status = { git = "https://github.com/ethcore/parity-status.git", version = "0.4.3" }
|
||||
parity-idmanager = { git = "https://github.com/ethcore/parity-idmanager-rs.git", version = "0.3.2" }
|
||||
parity-wallet = { git = "https://github.com/ethcore/parity-wallet.git", version = "0.4.1", optional = true }
|
||||
parity-daodapp = { git = "https://github.com/ethcore/parity-daodapp-rs.git", version = "0.2.1", optional = true }
|
||||
parity-makerotc = { git = "https://github.com/ethcore/parity-makerotc-rs.git", version = "0.1.3", optional = true }
|
||||
clippy = { version = "0.0.69", optional = true}
|
||||
|
||||
[build-dependencies]
|
||||
serde_codegen = { version = "0.7.0", optional = true }
|
||||
syntex = "0.32.0"
|
||||
|
||||
[features]
|
||||
default = ["parity-wallet", "serde_codegen", "parity-daodapp", "parity-makerotc"]
|
||||
nightly = ["serde_macros"]
|
||||
dev = ["clippy", "ethcore-rpc/dev", "ethcore-util/dev"]
|
Loading…
Reference in New Issue
Block a user