Skip to content

Commit

Permalink
Merge pull request #293 from chef/components
Browse files Browse the repository at this point in the history
Merged change 1ae30cd0-126f-4e1a-9e74-4e3763989bfe

From review branch components into master

Signed-off-by: adam <[email protected]>
  • Loading branch information
chef-delivery committed Mar 15, 2016
2 parents d1f01cb + 1ff339b commit 9113240
Show file tree
Hide file tree
Showing 87 changed files with 16 additions and 17 deletions.
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@ gpg: ## install gpg keys, only run this in a studio
(cd plans && make gpg)

build: image ## run cargo build
$(run) shell cargo build
$(run) shell cargo build --manifest-path components/bldr/Cargo.toml

shell: image ## start a shell for building packages
$(run) shell

docs-serve: docs ## serve up the documentation
@echo "==> View the docs at:\n\n http://`\
echo ${DOCKER_HOST} | sed -e 's|^tcp://||' -e 's|:[0-9]\{1,\}$$||'`:9633/\n\n"
$(run) -p 9633:9633 shell sh -c 'set -e; cd ./target/doc; python -m SimpleHTTPServer 9633;'
$(run) -p 9633:9633 shell sh -c 'set -e; cd ./components/bldr/target/doc; python -m SimpleHTTPServer 9633;'

test: image ## run `cargo test`
$(run) shell cargo test
$(run) shell cargo test --manifest-path components/bldr/Cargo.toml

unit: image ## run unit tests with cargo
$(run) shell cargo test --lib
$(run) shell cargo test --lib --manifest-path components/bldr/Cargo.toml

functional: image ## run the functional tests
$(run) shell cargo test --test functional
$(run) shell cargo test --test functional --manifest-path components/bldr/Cargo.toml

clean: ## clean up our docker environment
rm -rf target/debug target/release
rm -rf components/bldr/target/debug components/bldr/target/release
$(compose_cmd) stop
$(compose_cmd) rm -f -v
$(docker_cmd) rmi $(dimage) || true
Expand All @@ -61,10 +61,10 @@ image: ## create an image

docs: image ## build the docs
$(run) shell sh -c 'set -ex; \
cargo doc; \
rustdoc --crate-name bldr README.md -o ./target/doc/bldr; \
docco -e .sh -o target/doc/bldr/bldr-build plans/bldr-build; \
cp -r images ./target/doc/bldr; \
echo "<meta http-equiv=refresh content=0;url=bldr/index.html>" > target/doc/index.html;'
cargo doc --manifest-path components/bldr/Cargo.toml; \
rustdoc --crate-name bldr README.md -o ./components/bldr/target/doc/bldr; \
docco -e .sh -o components/bldr/target/doc/bldr/bldr-build plans/bldr-build; \
cp -r images ./components/bldr/target/doc/bldr; \
echo "<meta http-equiv=refresh content=0;url=bldr/index.html>" > components/bldr/target/doc/index.html;'

pkg-shell: shell ## Alias to `make shell` for the "old fingers" crowd
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ read the docs at `http://<DOCKER_HOST>:9633/` (with working JavaScript-based sea

1. Start a new feature branch
1. Open a terminal and run `make shell`
1. Change directory to a component `cd components/bldr`
1. Build with `cargo build` or `cargo test`
1. You can use `cargo run -- foobar` to pass options to the built binary
1. Commit your change
Expand Down Expand Up @@ -269,4 +270,3 @@ $ ./target/debug/bldr start chef/redis

Will work just fine (as will running bldr on other host operating
systems, cause thats all we're up to).

File renamed without changes.
5 changes: 2 additions & 3 deletions Cargo.toml → components/bldr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ exclude = ["plans/**/*","web/**/*"]

[lib]
name = "bldr"
path = "src/bldr/lib.rs"

[[bin]]
name = "bldr"
Expand Down Expand Up @@ -46,14 +45,14 @@ openssl = "*"
walkdir = "*"

[dependencies.wonder]
path = "./vendor/wonder"
path = "../../vendor/wonder"

[dependencies.mustache]
git = "https://github.com/adamhjk/rust-mustache"
branch = "fallback_on_missing_extension"

[dependencies.libarchive]
path = "./vendor/libarchive-rust"
path = "../../vendor/libarchive-rust"

[dependencies.clap]
features = [ "suggestions", "color" ]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/bldr/output.rs → components/bldr/src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ mod tests {
so.verbose = Some(true);
so.color = Some(false);
assert_eq!(format!("{}", so),
"bldr(SOT)[src/bldr/output.rs:1:2]: opeth is amazing");
"bldr(SOT)[components/bldr/src/output.rs:1:2]: opeth is amazing");
}

#[test]
Expand All @@ -192,7 +192,7 @@ mod tests {
format!("{}({})[{}]: opeth is amazing",
Cyan.paint("bldr"),
White.bold().paint("SOT"),
White.underline().paint("src/bldr/output.rs:1:2"),
White.underline().paint("components/bldr/src/output.rs:1:2"),
));
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9113240

Please sign in to comment.