-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
36 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- "0.12" | ||
|
||
before_install: | ||
- curl -s -L https://www.arangodb.com/repositories/travisCI/setup_arangodb_2.8.11.sh -o setup_arangodb.sh | ||
- chmod +x setup_arangodb.sh | ||
- ./setup_arangodb.sh | ||
|
||
install: | ||
- npm install | ||
|
||
script: | ||
- npm test | ||
#- npm run build-test-debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# loopback-connector-arangodb | ||
|
||
[![Build Status](https://travis-ci.org/mrbatista/loopback-connector-arangodb.svg)](https://travis-ci.org/mrbatista/loopback-connector-arangodb) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
module.exports = require('should'); | ||
|
||
# define global method getDataSource/getSchema, callable with a custom config, falling back to a config that was defined in a .loopbackrc file | ||
global.getDataSource = global.getSchema = (customConfig) -> | ||
DataSource = require('loopback-datasource-juggler').DataSource; | ||
DataSource = require('loopback-datasource-juggler').DataSource | ||
|
||
# get fallback config from .loopbackrc | ||
rc_defaults = | ||
test: | ||
arangodb: | ||
host: "127.0.0.1" | ||
port: 8529 | ||
db: '_system' | ||
TEST_ENV = process.env.TEST_ENV || 'test' | ||
config = require('rc')('loopback', { test: { arangodb: {}}})[TEST_ENV].arangodb; | ||
|
||
global.config = config; | ||
|
||
config = require('rc')('loopback', rc_defaults).test.arangodb | ||
if process.env.CI | ||
config = | ||
host: process.env.ARANGODB_HOST or 'localhost' | ||
port: process.env.ARANGODB_PORT or 8529 | ||
database: '_system' | ||
#database: 'lb-ds-arangodb-test-' + ( | ||
#process.env.TRAVIS_BUILD_NUMBER or process.env.BUILD_NUMBER or '1'), | ||
|
||
global.getDataSource = global.getSchema = (customConfig) -> | ||
db = new DataSource(require('../'), customConfig || config); | ||
|
||
db.log = (msg) -> console.log msg | ||
|
||
return db |