Skip to content

Commit

Permalink
Edition 2018
Browse files Browse the repository at this point in the history
  • Loading branch information
Keats committed Dec 12, 2019
1 parent 8dff544 commit fe6f43e
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
include:
- build: pinned
os: ubuntu-18.04
rust: 1.36.0
rust: 1.37.0
- build: stable
os: ubuntu-18.04
rust: stable
Expand Down
12 changes: 7 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "kickstart"
version = "0.1.8"
version = "1.0.0"
description = "A simple way to get started with a project"
authors = ["Vincent Prouillet <prouillet.vincent@gmail.com>"]
authors = ["Vincent Prouillet <hello@vincentprouillet.com>"]
license = "MIT"
edition = "2018"

[dependencies]
clap = "2"
tera = "1.0.0-beta.21"
tera = "1"
walkdir = "2"
serde_derive = "1"
serde = "1"
serde = { version = "1", features = ["derive"] }
toml = "0.5"
memchr = "2"
glob = "0.3"
Expand Down
6 changes: 1 addition & 5 deletions src/bin/kickstart.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#[macro_use]
extern crate clap;
extern crate kickstart;

use std::env;
use std::path::Path;
use std::error::Error;

use clap::{App, Arg, SubCommand, AppSettings};
use clap::{App, Arg, SubCommand, AppSettings, crate_authors, crate_version, crate_description};

use kickstart::terminal;
use kickstart::generation::Template;
Expand Down
5 changes: 3 additions & 2 deletions src/definition.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use std::collections::HashMap;

use toml::Value;
use serde::{Deserialize};

use prompt::{ask_string, ask_bool, ask_choices, ask_integer};
use errors::{Result, ErrorKind, new_error};
use crate::prompt::{ask_string, ask_bool, ask_choices, ask_integer};
use crate::errors::{Result, ErrorKind, new_error};


/// A condition for a question to be asked
Expand Down
7 changes: 3 additions & 4 deletions src/generation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ use tera::{Tera, Context};
use walkdir::WalkDir;
use glob::Pattern;

use errors::{Result, ErrorKind, new_error};
use utils::{Source, get_source, read_file, write_file, create_directory};
use utils::{is_vcs, is_binary};
use definition::TemplateDefinition;
use crate::errors::{Result, ErrorKind, new_error};
use crate::utils::{Source, get_source, read_file, write_file, create_directory, is_binary, is_vcs};
use crate::definition::TemplateDefinition;


/// The current template being generated
Expand Down
13 changes: 0 additions & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@
//! See the [kickstart binary](https://github.com/Keats/kickstart/blob/master/src/bin/kickstart.rs)
//! for an example on how to use it.
extern crate tera;
extern crate walkdir;
extern crate toml;
#[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate memchr;
extern crate glob;
extern crate regex;
extern crate term;
#[cfg(test)]
extern crate tempfile;

mod definition;
mod prompt;
mod utils;
Expand Down
4 changes: 2 additions & 2 deletions src/prompt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::io::{self, Write, BufRead};
use regex::Regex;
use toml;

use errors::{Result, new_error, ErrorKind};
use terminal;
use crate::errors::{Result, new_error, ErrorKind};
use crate::terminal;

/// Wait for user input and return what they typed
fn read_line() -> Result<String> {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::path::{Path, PathBuf};
use walkdir::DirEntry;
use memchr::memchr;

use errors::{Result, ErrorKind, new_error};
use crate::errors::{Result, ErrorKind, new_error};


#[derive(Debug, Clone, Eq, PartialEq)]
Expand Down
6 changes: 3 additions & 3 deletions src/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use std::path::Path;
use regex::Regex;
use toml::{self, Value};

use errors::{Result, ErrorKind, new_error};
use definition::TemplateDefinition;
use utils::read_file;
use crate::errors::{Result, ErrorKind, new_error};
use crate::definition::TemplateDefinition;
use crate::utils::read_file;


/// Validate that the struct doesn't have bad data in it
Expand Down

0 comments on commit fe6f43e

Please sign in to comment.