Skip to content

Commit

Permalink
Merge pull request #1 from mguilarducci/travis-ci
Browse files Browse the repository at this point in the history
Configura o travis ci
  • Loading branch information
mguilarducci authored Jul 19, 2016
2 parents d05b12f + 62a6332 commit 638fa19
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ root = true
[*]
indent_style = space
indent_size = 2
end_of_line = crlf
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
Expand Down
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: node_js
node_js:
- '6'
- '6.1'
- '6.2'
after_success:
- npm run coverage
deploy:
provider: npm
email: [email protected]
api_key:
secure: a/9QXR5A1vUFQdO9b7slOjNgyaWvn9CZHm3uirl1R4iW5+8bhcdXFw/2BiDJu6jOw0FeaTBTmI9DtqHyRqA1Ccf5O65BwG/fJqUjOmgPWLItHLyeb+n0AzQuF0Ia4Y+ln4Sri5mvs8tIGSGU0M6gY+XZSo3wGtkqwZ/4x3Bgh6HOQZTIHiGOkm1pQ6Y0K9G9FXYTBaMiiiKwPmnf9IDyGkciDvrvF18cwYS8LpgRE+xnxP1uL7tb2fXxp7+RZTzfrSsc6K49rYyWlySLYd0oXDA3fmBf3kkSj5p09Nusrq+FJMgkmeP+0gJagjZ+Fez0AZ8AcpndsHY6GT3eSOH1B2HqpCt0p3s6+3Yx0yTMgHornUZZcW+UoXihPk9+/AAHjjq40aDEfJRoJN1VyHHewJ+Y2S4LX0iWOyhMm5VBO5laGQ6CXN7qTTEIhsw4aagPx9K8W7qYaLuaZEgSpiluZHipEAlppswpogZFW1hMMvo3H1zlNEHhG2xebKhyI+Y0bQzwAtiC2vqIjLxs/ZYmiKvRktzWuYtDpIp6THJtB88CuD0w4Dwhl+S2tb/9fo5YUZyNMIu4TKo0+PXTjJreHPyNAw0V9LXirZeXyclEuiqLTOyUTlKenQl1abnt0U3ngQM7vUvaICnfHIxvX8N2uEf3UrNx02YxTFME7pDkLpY=
on:
tags: true
repo: mguilarducci/tabeliao-node
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# tabelião node

[![Codeship Build][ci-url-badge-master]][ci-url]
[![Coverage Status][coverage-url-badge-master]][coverage-url]
[![Build Status][ci-image]][ci-url]
[![Coverage Status][coverage-image]][coverage-url]
[![Dependencies][dependencies-image]][dependencies-url]
[![Dev dependencies][dependencies-dev-image]][dependencies-dev-url]

Biblioteca do [tabelião][tabeliao] para nodejs.

Expand Down Expand Up @@ -101,7 +103,11 @@ E o result será:
```

[tabeliao]: https://bitbucket.org/stonepayments/tabeliao/
[ci-url]: https://codeship.com/projects/161445
[ci-url-badge-master]: https://codeship.com/projects/641f9b50-245d-0134-f619-3a36b972b11f/status?branch=master
[coverage-url]: https://coveralls.io/bitbucket/stonepayments/tabeliao-node
[coverage-url-badge-master]: https://coveralls.io/repos/bitbucket/stonepayments/tabeliao-node/badge.svg?branch=master&t=zxE2x8
[ci-url]: https://travis-ci.org/mguilarducci/tabeliao-node
[ci-image]: https://travis-ci.org/mguilarducci/tabeliao-node.svg?branch=master
[coverage-url]: https://coveralls.io/github/mguilarducci/tabeliao-node?branch=master
[coverage-image]: https://coveralls.io/repos/mguilarducci/tabeliao-node/badge.svg?branch=master&service=github
[dependencies-url]: https://david-dm.org/mguilarducci/tabeliao-node
[dependencies-image]: https://david-dm.org/mguilarducci/tabeliao-node.svg
[dependencies-dev-url]: https://david-dm.org/mguilarducci/tabeliao-node#info=devDependencies&view=table
[dependencies-dev-image]: https://david-dm.org/mguilarducci/tabeliao-node/dev-status.svg
6 changes: 3 additions & 3 deletions lib/tabeliao.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ function getServiceId(pkg) {
}

function getPort(options) {
return options && options.port || 3000;
return (options && options.port) || 3000;
}

function getHost(options) {
return options && options.host || 'localhost';
return (options && options.host) || 'localhost';
}

function getProtocol(options) {
Expand Down Expand Up @@ -92,7 +92,7 @@ function register(options, cb) {
function getKeyValue(result, key, cb) {
/* eslint no-param-reassign: 0 */
consul.kv.get(key, function res(err, data) {
var value = !err && data && data.Value || null;
var value = (!err && data && data.Value) || null;
try {
result[key] = JSON.parse(value);
} catch (ex) {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^2.11.9",
"eslint": "^2.13.1",
"eslint-config-airbnb-base": "^3.0.1",
"eslint-plugin-import": "^1.9.2",
"eslint": "^3.1.1",
"eslint-config-airbnb-base": "^4.0.2",
"eslint-plugin-import": "^1.11.0",
"grunt": "^1.0.1",
"grunt-eslint": "^18.1.0",
"grunt-eslint": "^19.0.0",
"grunt-mocha-test": "^0.12.7",
"istanbul": "^0.4.4",
"load-grunt-tasks": "^3.5.0",
Expand Down

0 comments on commit 638fa19

Please sign in to comment.