Skip to content

Commit

Permalink
Updating to latest standards
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserf committed Jun 15, 2016
1 parent 25dc4c1 commit 4c9b06f
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 117 deletions.
36 changes: 21 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
language: node_js

env:
global:
- CXX=g++-4.8
- MEMCACHED_URL=54.93.77.53:11211

# Do not insert any code under here without making sures it's in publishingtest first
language: node_js

plugins:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8

node_js:
- "stable"
- "4.4.5"
Expand All @@ -15,13 +23,10 @@ matrix:
os: osx

script:
- npm test

after_script:
- "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"

before_deploy:
- chmod 555 scripts/package.sh && scripts/package.sh
- npm run test
- curl -o package.sh -L https://raw.githubusercontent.com/deepstreamIO/deepstream.io-connector-publishingtest/master/scripts/package.sh
- chmod 555 package.sh
- ./package.sh

deploy:
- provider: s3
Expand All @@ -45,9 +50,10 @@ deploy:
on:
tags: true

plugins:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
after_deploy:
- curl -o test.sh -L https://raw.githubusercontent.com/deepstreamIO/deepstream.io-connector-publishingtest/master/scripts/test.sh
- chmod 555 test.sh
- ./test.sh

after_script:
- "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ A [deepstream.io](http://deepstream.io/) cache connector for [memcached](http://
This connector uses [the npm memcached package](https://www.npmjs.com/package/memcached). Please have a look there for detailed options.

##Basic Setup
```yaml
plugins:
cache:
name: memcached
options:
serverLocation: ${MEMCACHED_URL}
```
```javascript
var Deepstream = require( 'deepstream.io' ),
MemcachedConnector = require( 'deepstream.io-cache-memcached' ),
Expand Down
20 changes: 12 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
environment:
MEMCACHED_URL: 54.93.77.53:11211

# Do not insert any code under here without making sures it's in publishingtest first
os:
- Visual Studio 2015

Expand All @@ -12,22 +16,17 @@ test_script:
- node --version
- npm --version
- npm test
- bash scripts\package.sh
- curl -o package.sh -L https://raw.githubusercontent.com/deepstreamIO/deepstream.io-connector-publishingtest/master/scripts/package.sh
- bash package.sh
- For /d %%d in ( build\** ) do MOVE %%d %cd%
- For %%d in ( build\** ) do MOVE %%d %cd%

environment:
MEMCACHED_URL: 54.93.77.53:11211

artifacts:
- path: 'build\*.zip'
name: 'deepstream.io-connector'

- path: '**\*.zip'
- path: '*.zip'

deploy:

- provider: S3
access_key_id:
secure: cq7lgQP04314hwXwM2l0yiUKRcOkwHeKkDHFULrThxE=
Expand All @@ -44,8 +43,13 @@ deploy:
auth_token:
secure: tZHuiZVCwkXRYMihVyoNrmDxAm6xPbXyop7Plg5uUWIIqA1EoUCrTYd/V+0D1I+Y
artifact: 'deepstream.io-connector'
draft: true
draft: false
on:
appveyor_repo_tag: true

after_deploy:
- curl -o test.sh -L https://raw.githubusercontent.com/deepstreamIO/deepstream.io-connector-publishingtest/master/scripts/test.sh
- chmod 555 test.sh
- bash test.sh

build: off
5 changes: 5 additions & 0 deletions example-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
plugins:
cache:
name: memcached
options:
serverLocation: ${MEMCACHED_URL}
11 changes: 0 additions & 11 deletions jasmine.json

This file was deleted.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "src/connector.js",
"scripts": {
"test": "mocha",
"coverage": "istanbul cover _mocha",
"coverage": "istanbul cover node_modules/mocha/bin/_mocha",
"lint": "eslint \"src/**/*.js\" \"test/**/*.js\"",
"ci": "npm run coverage && npm run lint"
},
Expand All @@ -14,7 +14,7 @@
"url": "https://github.com/deepstreamIO/deepstream.io-cache-memcached.git"
},
"author": "deepstreamHub GmbH",
"license": "Apache License, Version 2.0",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/deepstreamIO/deepstream.io-cache-memcached/issues"
},
Expand All @@ -25,10 +25,8 @@
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^2.11.9",
"eslint": "^1.10.3",
"eslint": "^2.11.1",
"eslint-config-airbnb": "^3.1.0",
"grunt": "~1.0.1",
"grunt-release": "0.13.1",
"istanbul": "^0.4.3",
"mocha": "^2.5.2"
}
Expand Down
1 change: 0 additions & 1 deletion scripts/release.sh → release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ fi
echo 'Starting release'

npm version $1
echo "Version now: $( node scripts/details.js VERSION )"

echo 'Pushing to github'
git push --follow-tags
Expand Down
13 changes: 0 additions & 13 deletions scripts/details.js

This file was deleted.

60 changes: 0 additions & 60 deletions scripts/package.sh

This file was deleted.

3 changes: 0 additions & 3 deletions src/connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ const pckg = require('../package.json')
*
* lifetime is the default lifetime for objects in seconds (defaults to 1000)
*
* @author Wolfram Hempel
* @copyright 2015 Hoxton One Ltd.
*
* @param {Object} options { serverLocation: <mixed>, [lifetime]: <Number>, [memcachedOptions]: <Object> }
*
* @constructor
Expand Down
2 changes: 1 addition & 1 deletion test/cache-connectorSpec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global describe, it, beforeEach */
'use strict'
/* global describe, it, beforeEach */

const expect = require('chai').expect
const CacheConnector = require('../src/connector')
Expand Down

0 comments on commit 4c9b06f

Please sign in to comment.