Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/tests #66

Merged
merged 4 commits into from
Jul 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dist: trusty
language: rust
services: docker
sudo: required
group: edge

# TODO This is the Rust channel that build jobs will use by default but can be
# overridden on a case by case basis down below
Expand Down
6 changes: 3 additions & 3 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -ex

# TODO This is the "test phase", tweak it as you see fit
main() {

ci/most_recent_commit.sh

# cross build --target $TARGET
Expand All @@ -14,7 +14,7 @@ main() {
return
fi

# cross test --target $TARGET
cross test --target $TARGET
# cross test --target $TARGET --release

# cross run --target $TARGET
Expand All @@ -24,4 +24,4 @@ main() {
# we don't run the "test phase" when doing deploys
if [ -z $TRAVIS_TAG ]; then
main
fi
fi
15 changes: 11 additions & 4 deletions examples/asciiic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,25 @@ extern crate asciii;
use std::env;
use std::path::Path;

use asciii::storage::Storable;
use asciii::project::Project;

fn main() {
asciii::util::setup_log();

let project_file = env::args().nth(1);
if let Some(project_file) = env::args().nth(1) {

let project = Project::open_file(&project_file);
let project = Project::open_file(Path::new(&project_file));
let output= Path::new("./foo.pdf");

debug!("project_file {:?}", project_file);
debug!("{:?} -> {:?}", project_file, output.display());

let output= Path::new("./foo.pdf");
unimplemented!();


} else {
error!("please pass in a projectfile");
}

}

2 changes: 1 addition & 1 deletion examples/calendar.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extern crate asciii;

use std::error::Error;
use asciii::actions::calendar;
use asciii::actions::calendar_and_tasks as calendar;
use asciii::storage::StorageDir;


Expand Down
3 changes: 0 additions & 3 deletions examples/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ extern crate asciii;
extern crate serde;
extern crate serde_json;

use asciii::storage::{self,StorageDir};
use asciii::project::Project;
use asciii::project::export::*;


fn json_serde(project: &Project) -> String {
Expand Down
3 changes: 0 additions & 3 deletions examples/spec.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
extern crate asciii;
extern crate yaml_rust as yaml;
use std::path::Path;

use asciii::project::spec::*;
Expand All @@ -10,7 +9,6 @@ fn main() {
for project in [Project::open_file(Path::new("./examples/current.yml")).unwrap(),
Project::open_file(Path::new("./examples/old.yml")).unwrap()]
.iter() {
let yaml = project.yaml();
println!("Index: {:?}", project.index());
println!("Canceled {:?}", project.canceled());
println!("Date: {:?}", project.event_date());
Expand All @@ -34,5 +32,4 @@ fn main() {
println!("\n\n\n");
}

// println!("Products: {:#?}", spec::products::all(new_project.yaml()));
}
3 changes: 0 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@ fn simple_reading(){
assert!(ConfigReader::path_home().exists());
let config = ConfigReader::new().unwrap();

assert_eq!(config.get("user/name").unwrap().as_str().unwrap(),
config.get_str("user/name"));

assert_eq!(config.get("list/colors").unwrap().as_bool().unwrap(),
config.get_bool("list/colors"));

Expand Down