Skip to content

Commit

Permalink
Auto merge of #3888 - ehiggs:revert-template-until-after-rfc-1.17.0, …
Browse files Browse the repository at this point in the history
…r=alexcrichton

Revert template until after rfc 1.17.0

As in #3878, remove templates until an RFC has passed.
  • Loading branch information
bors committed Apr 1, 2017
2 parents d8d0940 + b6bcba9 commit 2e31571
Show file tree
Hide file tree
Showing 16 changed files with 285 additions and 978 deletions.
400 changes: 189 additions & 211 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ name = "cargo"
path = "src/cargo/lib.rs"

[dependencies]
chrono = "0.2.25"
crates-io = { path = "src/crates-io", version = "0.7" }
crossbeam = "0.2"
curl = "0.4.6"
Expand All @@ -28,7 +29,6 @@ fs2 = "0.4"
git2 = "0.6"
git2-curl = "0.7"
glob = "0.2"
handlebars = { version = "0.25", features = ["serde_type", "partial4"], default-features = false }
libc = "0.2"
libgit2-sys = "0.6"
log = "0.3"
Expand All @@ -43,7 +43,6 @@ shell-escape = "0.1"
tar = { version = "0.4", default-features = false }
tempdir = "0.3"
term = "0.4.4"
time = "0.1.36"
toml = "0.3"
url = "1.1"

Expand Down
16 changes: 2 additions & 14 deletions src/bin/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ pub struct Options {
flag_lib: bool,
arg_path: Option<String>,
flag_name: Option<String>,
flag_template_subdir: Option<String>,
flag_template: Option<String>,
flag_vcs: Option<ops::VersionControl>,
flag_frozen: bool,
flag_locked: bool,
Expand All @@ -34,8 +32,6 @@ Options:
--bin Use a binary (application) template
--lib Use a library template
--name NAME Set the resulting package name
--template <repository> Use a specified template repository
--template-subdir <template> Use a specified template within a template repository
-v, --verbose ... Use verbose output (-vv very verbose/build.rs output)
-q, --quiet No output printed to stdout
--color WHEN Coloring: auto, always, never
Expand All @@ -51,22 +47,14 @@ pub fn execute(options: Options, config: &Config) -> CliResult {
options.flag_frozen,
options.flag_locked)?;

let Options {
flag_bin, flag_lib,
arg_path, flag_name,
flag_vcs,
flag_template_subdir, flag_template,
..
} = options;
let Options { flag_bin, flag_lib, arg_path, flag_name, flag_vcs, .. } = options;

let tmp = &arg_path.unwrap_or(format!("."));
let opts = ops::NewOptions::new(flag_vcs,
flag_bin,
flag_lib,
tmp,
flag_name.as_ref().map(|s| s.as_ref()),
flag_template_subdir.as_ref().map(|s| s.as_ref()),
flag_template.as_ref().map(|s| s.as_ref()));
flag_name.as_ref().map(|s| s.as_ref()));

let opts_lib = opts.lib;
ops::init(opts, config)?;
Expand Down
16 changes: 2 additions & 14 deletions src/bin/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ pub struct Options {
flag_lib: bool,
arg_path: String,
flag_name: Option<String>,
flag_template_subdir: Option<String>,
flag_template: Option<String>,
flag_vcs: Option<ops::VersionControl>,
flag_frozen: bool,
flag_locked: bool,
Expand All @@ -34,8 +32,6 @@ Options:
--bin Use a binary (application) template
--lib Use a library template
--name NAME Set the resulting package name, defaults to the value of <path>
--template <repository> Use a specified template repository
--template-subdir <template-subdir> Use a specified template within a template repository
-v, --verbose ... Use verbose output (-vv very verbose/build.rs output)
-q, --quiet No output printed to stdout
--color WHEN Coloring: auto, always, never
Expand All @@ -51,21 +47,13 @@ pub fn execute(options: Options, config: &Config) -> CliResult {
options.flag_frozen,
options.flag_locked)?;

let Options {
flag_bin, flag_lib,
arg_path, flag_name,
flag_vcs,
flag_template_subdir, flag_template,
..
} = options;
let Options { flag_bin, flag_lib, arg_path, flag_name, flag_vcs, .. } = options;

let opts = ops::NewOptions::new(flag_vcs,
flag_bin,
flag_lib,
&arg_path,
flag_name.as_ref().map(|s| s.as_ref()),
flag_template_subdir.as_ref().map(|s| s.as_ref()),
flag_template.as_ref().map(|s| s.as_ref()));
flag_name.as_ref().map(|s| s.as_ref()));

let opts_lib = opts.lib;
ops::new(opts, config)?;
Expand Down
3 changes: 1 addition & 2 deletions src/cargo/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#[macro_use] extern crate log;
#[macro_use] extern crate serde_derive;
#[macro_use] extern crate serde_json;
extern crate chrono;
extern crate crates_io as registry;
extern crate crossbeam;
extern crate curl;
Expand All @@ -14,7 +15,6 @@ extern crate flate2;
extern crate fs2;
extern crate git2;
extern crate glob;
extern crate handlebars;
extern crate libc;
extern crate libgit2_sys;
extern crate num_cpus;
Expand All @@ -26,7 +26,6 @@ extern crate shell_escape;
extern crate tar;
extern crate tempdir;
extern crate term;
extern crate time;
extern crate toml;
extern crate url;

Expand Down
Loading

0 comments on commit 2e31571

Please sign in to comment.