Skip to content

Commit

Permalink
Taplytics 1.0.1 Release
Browse files Browse the repository at this point in the history
- added test_experiments option to test experiment/varation combinations.
  • Loading branch information
jonathannorris committed May 5, 2016
1 parent e1eb002 commit dd407a3
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
6 changes: 5 additions & 1 deletion app/api/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ var session = require('../lib/session');
exports.get = function(next) {
var sessionAttrs = session.getSessionAttributes();
sessionAttrs.auid = session.getAppUserID();
if (sessionAttrs.prms) sessionAttrs.prms = JSON.stringify(sessionAttrs.prms);
if (sessionAttrs.prms)
sessionAttrs.prms = JSON.stringify(sessionAttrs.prms);

if (session.test_experiments)
sessionAttrs.uev = JSON.stringify(session.test_experiments);

log.log("config_get", sessionAttrs, log.DEBUG);
request.get("config", sessionAttrs, function(err, response) {
Expand Down
2 changes: 1 addition & 1 deletion app/functions/__tests__/reset_test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jest.dontMock('../reset');

describe("Taplytics.reset - uninitialized app", function() {
it("should error on if app is not initialized", function() {
it("should error on if app is not initialized", function() {
var TaplyticsUninitialized = require('../../../test/helpers/uninitialized_app');
var logger = require('../../lib/logger');

Expand Down
3 changes: 3 additions & 0 deletions app/functions/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ module.exports = function(token, options) {

if (options.env)
this.env = options.env;

if (options.test_experiments)
session.test_experiments = options.test_experiments;
}

/* Initialization */
Expand Down
2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports.obj = function() {

config.functionFlushQueueTimeout = 500;

config.sdkVersion = "1.0";
config.sdkVersion = "1.0.1";

return config;
};
Expand Down
4 changes: 2 additions & 2 deletions dist/taplytics.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "taplytics-js",
"version": "1.0",
"version": "1.0.1",
"description": "Taplytics JS SDK",
"main": "app/index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/initialized_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jest.dontMock('../../app/functions/isReady.js');

module.exports = function() {
var app = require('../../app/app.js');
app = app.init("33d4d4330f2a056c1898d7cd1112f63b526c6794", {log_level: 0, env: 'dev'});
app = app.init("33d4d4330f2a056c1898d7cd1112f63b526c6794", {log_level: 3, env: 'dev'});
return app;
}();

0 comments on commit dd407a3

Please sign in to comment.