Skip to content

Commit

Permalink
fix(macro): use $crate variable instead of ::mock
Browse files Browse the repository at this point in the history
That way, it will actually work if the crate-name of `yup-hyper-mock`
is not changed to mock.

Closes #2
  • Loading branch information
Byron committed May 4, 2015
1 parent e624b3b commit b520fa7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
28 changes: 17 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
language: rust
after_success: |
[ $TRAVIS_BRANCH = master ] &&
[ $TRAVIS_PULL_REQUEST = false ] &&
cargo doc &&
echo '<meta http-equiv=refresh content=0;url=yup-hyper-mock/index.html>' > target/doc/index.html &&
git shortlog -s -n | cut -c 8- > target/doc/humans.txt &&
sudo pip install ghp-import &&
ghp-import -n target/doc &&
git push -fq https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
sudo: required

rust:
- nightly
- beta
before_script:
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
script:
- |
travis-cargo build &&
travis-cargo test &&
travis-cargo doc
after_success:
- travis-cargo doc-upload
- travis-cargo coveralls

env:
global:
secure: xsWR1FHBIJRYOv17p0o6RrwHPDE4spcqzsIj/wmPdWDbslplvCp9HiLyMNy7IAkCehhvXlgNerOByyw+VY52cYEQ+rzKeU8NMgI2tzg0If2KRoEKQd/MWN1avOwH511x4Qrtwh32jL1X553UVFnLcPWvdaWcByYJHfprw7IbPmo=
secure: R2TjgAkb9vgibslocKKMQ1fterul/nJJ/Srv8mxbzA/z569ZKFeR8gFlM0bxUkQVeJpGkHKkR6dcNuk6xtafRkm2W5Q04FUqF7/eEzvzMpf0a1kPOld44dZgYbncmk3bend40+fOwDpubozTtuLoimDIIxqdNp39d7w5h0a+s1U=
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ macro_rules! mock_connector (
let key = format!("{}://{}", scheme, host);
// ignore port for now
match map.get(&*key) {
Some(res) => Ok(::mock::MockStream {
Some(res) => Ok($crate::MockStream {
write: vec![],
read: Cursor::new(res.to_string().into_bytes()),
}),
Expand Down

0 comments on commit b520fa7

Please # to comment.