Skip to content

Commit

Permalink
replace-gitcafe-with-coding
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisyer committed Mar 20, 2017
1 parent 83fc0df commit 3a3ebed
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ deploy:
message: [message]
repo:
github: <repository url>,[branch]
gitcafe: <repository url>,[branch]
coding: <repository url>,[branch]
extend_dirs:
- [extend directory]
- [another extend directory]
Expand Down
4 changes: 2 additions & 2 deletions lib/parse_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ function parseRepo(repo) {

if (host === 'github.com') {
branch = rGithubPage.test(path) ? 'master' : 'gh-pages';
} else if (host === 'gitcafe.com') {
branch = 'gitcafe-pages';
} else if (host === 'coding.net') {
branch = 'coding-pages';
}
}

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"mocha": "^2.5.3"
},
"dependencies": {
"bluebird": "^3.4.1",
"bluebird": "^3.5.0",
"chalk": "^1.1.3",
"hexo-fs": "^0.1.6",
"hexo-util": "^0.6.0",
"moment": "^2.13.0",
"moment": "^2.18.0",
"swig": "^1.4.2"
}
}
}
18 changes: 9 additions & 9 deletions test/parse_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,26 @@ describe('parse config', function() {
})[0].branch.should.eql('site');
});

it('gitcafe repo, gitcafe-pages branch', function() {
it('coding repo, coding-pages branch', function() {
// https
parseConfig({
repo: 'https://gitcafe.com/hexojs/hexojs.git'
})[0].branch.should.eql('gitcafe-pages');
repo: 'https://coding.net/hexojs/hexojs.git'
})[0].branch.should.eql('coding-pages');

// git
parseConfig({
repo: 'git://gitcafe.com/hexojs/hexojs.git'
})[0].branch.should.eql('gitcafe-pages');
repo: 'git://coding.net/hexojs/hexojs.git'
})[0].branch.should.eql('coding-pages');

// ssh
parseConfig({
repo: 'git@gitcafe.com/hexojs/hexojs.git'
})[0].branch.should.eql('gitcafe-pages');
repo: 'git@coding.net/hexojs/hexojs.git'
})[0].branch.should.eql('coding-pages');
});

it('gitcafe repo, custom branch', function() {
it('coding, custom branch', function() {
parseConfig({
repo: 'https://gitcafe.com/hexojs/hexojs.git',
repo: 'https://coding.net/hexojs/hexojs.git',
branch: 'site'
})[0].branch.should.eql('site');
});
Expand Down

0 comments on commit 3a3ebed

Please sign in to comment.