Skip to content

Commit

Permalink
a couple small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jescalan committed Dec 15, 2016
1 parent 2db2371 commit 307deea
Show file tree
Hide file tree
Showing 5 changed files with 4,046 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ test
.travis.yml
Makefile
contributing.md

yarn.lock
3 changes: 2 additions & 1 deletion lib/analytics.coffee
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Keen = require 'keen.io'
global_config = require './global_config'
node = require 'when/node'
W = require('when')

# Yes, you can write analytics to our project. Please don't do this though.
# Roots is an open source project. We're over here working hard to bring you
Expand All @@ -24,4 +25,4 @@ global.__track = (category, e) ->
if enabled
return node.call(client.addEvent.bind(client), category, e).catch(->)
else
return false
return W.resolve(false)
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"mocha-lcov-reporter": "^1.2.0",
"mockery": "^2.0.0",
"roots-util": "^0.2.0",
"selenium-webdriver": "^3.0.1",
"sinon": "^1.17.4",
"sinon-chai": "2.x"
},
Expand Down
2 changes: 1 addition & 1 deletion test/analytics.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe 'analytics', ->

it 'should be able to disable analytics through the api', ->
Roots.analytics(disable: true)
__track('test', { wow: 'such test' }).should.be.false
__track('test', { wow: 'such test' }).should.eventually.be.false

it 'should be able to enable analytics through the api', ->
Roots.analytics(enable: true)
Expand Down
Loading

0 comments on commit 307deea

Please sign in to comment.