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

Rename Bldr crates to Habitat crates. #338

Merged
merged 3 commits into from
Mar 31, 2016
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
33 changes: 15 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,37 @@ else
docs_run :=
endif

.PHONY: help all shell docs-serve test unit functional clean image docs gpg
.PHONY: help all shell serve-docs test unit functional clean image docs gpg
.DEFAULT_GOAL := all

all: image ## builds the project's Rust components
$(run) cargo build --manifest-path components/core/Cargo.toml
$(run) cargo build --manifest-path components/bldr/Cargo.toml
$(run) cargo build --manifest-path components/depot-core/Cargo.toml
$(run) cargo build --manifest-path components/sup/Cargo.toml
$(run) cargo build --manifest-path components/depot/Cargo.toml
$(run) cargo build --manifest-path components/depot-client/Cargo.toml

test: image ## tests the project's Rust components
$(run) cargo test --manifest-path components/core/Cargo.toml
$(run) cargo test --manifest-path components/bldr/Cargo.toml
$(run) cargo test --manifest-path components/depot-core/Cargo.toml
$(run) cargo test --manifest-path components/depot/Cargo.toml
$(run) cargo test --manifest-path components/depot-client/Cargo.toml
$(run) cargo test --manifest-path components/sup/Cargo.toml
$(run) cargo test --manifest-path components/depot/Cargo.toml

unit: image ## executes the components' unit test suites
$(run) cargo test --lib --manifest-path components/core/Cargo.toml
$(run) cargo test --lib --manifest-path components/bldr/Cargo.toml
$(run) cargo test --lib --manifest-path components/depot-core/Cargo.toml
$(run) cargo test --lib --manifest-path components/depot/Cargo.toml
$(run) cargo test --lib --manifest-path components/depot-client/Cargo.toml
$(run) cargo test --lib --manifest-path components/sup/Cargo.toml
$(run) cargo test --lib --manifest-path components/depot/Cargo.toml

functional: image ## executes the components' functional test suites
$(run) cargo test --test functional --manifest-path components/bldr/Cargo.toml
$(run) cargo test --test functional --manifest-path components/sup/Cargo.toml
$(run) cargo test --test functional --manifest-path components/depot/Cargo.toml

clean: ## cleans up the project tree
$(run) cargo clean --manifest-path components/core/Cargo.toml
$(run) cargo clean --manifest-path components/bldr/Cargo.toml
$(run) cargo clean --manifest-path components/depot-core/Cargo.toml
$(run) cargo clean --manifest-path components/depot/Cargo.toml
$(run) cargo clean --manifest-path components/depot-client/Cargo.toml
$(run) cargo clean --manifest-path components/sup/Cargo.toml
$(run) cargo clean --manifest-path components/depot/Cargo.toml

help:
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
Expand All @@ -72,7 +69,7 @@ shell: image ## launches a development shell
serve-docs: docs ## serves the project documentation from an HTTP server
@echo "==> View the docs at:\n\n http://`\
echo $(docs_host) | sed -e 's|^tcp://||' -e 's|:[0-9]\{1,\}$$||'`:9633/\n\n"
$(docs_run) sh -c 'set -e; cd ./components/bldr/target/doc; python -m SimpleHTTPServer 9633;'
$(docs_run) sh -c 'set -e; cd ./components/sup/target/doc; python -m SimpleHTTPServer 9633;'

ifneq ($(IN_DOCKER),)
distclean: ## fully cleans up project tree and any associated Docker images and containers
Expand All @@ -97,11 +94,11 @@ endif

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

gpg: ## installs gpg signing keys, only run this in a Studio
(cd plans && make gpg)

This file was deleted.

2 changes: 1 addition & 1 deletion components/core/Cargo.lock

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

2 changes: 1 addition & 1 deletion components/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "bldr_core"
name = "habitat_core"
version = "0.4.0"
authors = ["Adam Jacob <[email protected]>", "Jamie Winsor <[email protected]>", "Fletcher Nichol <[email protected]>", "Joshua Timberman <[email protected]>", "Dave Parfitt <[email protected]>"]

Expand Down
2 changes: 1 addition & 1 deletion components/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub type Result<T> = result::Result<T, Error>;
/// Core error types
#[derive(Debug)]
pub enum Error {
/// Occurs when a `bldr_core::package::PackageArchive` is being read.
/// Occurs when a `habitat_core::package::PackageArchive` is being read.
ArchiveError(libarchive::error::ArchiveError),
/// Occurs when a file that should exist does not or could not be read.
FileNotFound(String),
Expand Down
54 changes: 27 additions & 27 deletions components/depot-client/Cargo.lock

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

6 changes: 3 additions & 3 deletions components/depot-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "bldr_depot_client"
name = "habitat_depot_client"
version = "0.4.0"
authors = ["Adam Jacob <[email protected]>", "Jamie Winsor <[email protected]>", "Fletcher Nichol <[email protected]>", "Joshua Timberman <[email protected]>", "Dave Parfitt <[email protected]>"]

Expand All @@ -8,8 +8,8 @@ hyper = "*"
log = "*"
rustc-serialize = "*"

[dependencies.bldr_core]
[dependencies.habitat_core]
path = "../core"

[dependencies.bldr_depot_core]
[dependencies.habitat_depot_core]
path = "../depot-core"
14 changes: 7 additions & 7 deletions components/depot-client/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ use std::result;

use hyper;

use bldr::{self, package};
use hcore::{self, package};

#[derive(Debug)]
pub enum Error {
BldrCore(bldr::Error),
HabitatCore(hcore::Error),
HTTP(hyper::status::StatusCode),
HyperError(hyper::error::Error),
IO(io::Error),
Expand All @@ -30,7 +30,7 @@ pub type Result<T> = result::Result<T, Error>;
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let msg = match *self {
Error::BldrCore(ref e) => format!("{}", e),
Error::HabitatCore(ref e) => format!("{}", e),
Error::HTTP(ref e) => format!("{}", e),
Error::HyperError(ref err) => format!("{}", err),
Error::IO(ref e) => format!("{}", e),
Expand All @@ -55,7 +55,7 @@ impl fmt::Display for Error {
impl error::Error for Error {
fn description(&self) -> &str {
match *self {
Error::BldrCore(ref err) => err.description(),
Error::HabitatCore(ref err) => err.description(),
Error::HTTP(_) => "Received an HTTP error",
Error::HyperError(ref err) => err.description(),
Error::IO(ref err) => err.description(),
Expand All @@ -67,9 +67,9 @@ impl error::Error for Error {
}
}

impl From<bldr::Error> for Error {
fn from(err: bldr::Error) -> Error {
Error::BldrCore(err)
impl From<hcore::Error> for Error {
fn from(err: hcore::Error) -> Error {
Error::HabitatCore(err)
}
}

Expand Down
11 changes: 4 additions & 7 deletions components/depot-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// this file ("Licensee") apply to Licensee's use of the Software until such time that the Software
// is made available under an open source license such as the Apache 2.0 License.

extern crate bldr_core as bldr;
extern crate bldr_depot_core as depot_core;
extern crate habitat_core as hcore;
extern crate habitat_depot_core as depot_core;
#[macro_use]
extern crate hyper;
#[macro_use]
Expand All @@ -20,7 +20,7 @@ use std::fs::{self, File};
use std::io::{Read, Write, BufWriter, Seek, SeekFrom};
use std::path::{Path, PathBuf};

use bldr::package::{PackageArchive, PackageIdent};
use hcore::package::{PackageArchive, PackageIdent};
use depot_core::{XFileName, data_object};
use hyper::client::{Client, Body};
use hyper::status::StatusCode;
Expand Down Expand Up @@ -50,10 +50,7 @@ pub fn fetch_key(depot: &str, key: &str, path: &str) -> Result<String> {
/// * Package cannot be found
/// * Remote Depot is not available
/// * File cannot be created and written to
pub fn fetch_package(depot: &str,
package: &PackageIdent,
store: &str)
-> Result<PackageArchive> {
pub fn fetch_package(depot: &str, package: &PackageIdent, store: &str) -> Result<PackageArchive> {
let url = format!("{}/pkgs/{}/download", depot, package);
match download(&package.name, &url, store) {
Ok(file) => {
Expand Down
30 changes: 15 additions & 15 deletions components/depot-core/Cargo.lock

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

4 changes: 2 additions & 2 deletions components/depot-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "bldr_depot_core"
name = "habitat_depot_core"
version = "0.4.0"
authors = ["Adam Jacob <[email protected]>", "Jamie Winsor <[email protected]>", "Fletcher Nichol <[email protected]>", "Joshua Timberman <[email protected]>", "Dave Parfitt <[email protected]>"]

Expand All @@ -9,5 +9,5 @@ libc = "*"
lmdb-sys = "*"
rustc-serialize = "*"

[dependencies.bldr_core]
[dependencies.habitat_core]
path = "../core"
2 changes: 1 addition & 1 deletion components/depot-core/src/data_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::fmt;
use std::result;
use std::slice;

use bldr::{package, Error, Result};
use hcore::{package, Error, Result};
use libc::c_void;
use lmdb_sys;
use rustc_serialize::{Encoder, Decoder, Encodable, Decodable};
Expand Down
2 changes: 1 addition & 1 deletion components/depot-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// this file ("Licensee") apply to Licensee's use of the Software until such time that the Software
// is made available under an open source license such as the Apache 2.0 License.

extern crate bldr_core as bldr;
extern crate habitat_core as hcore;
#[macro_use]
extern crate hyper;
extern crate libc;
Expand Down
Loading