<commit_before>'use strict';

var fs = require("fs"), 
	vm = require('vm'),
	GitHubApi = require("github"),
	expect = require('expect.js');

// Load adaptive library into the node context
vm.runInThisContext(fs.readFileSync('adaptive.js'));

describe('bower-adaptiveme', function () {

  /**
   * Test to try the current API version of the platform
   */
  it('Check API version', function (done) {
	  
	console.log("TRAVIS_PULL_REQUEST:"+process.env.TRAVIS_PULL_REQUEST);
	console.log("GH_TOKEN_NODE:"+process.env.GH_TOKEN_NODE);
	  
	if (process.env.TRAVIS_PULL_REQUEST) {
		done();
	} else {
		var api_version = Adaptive.AppRegistryBridge.getInstance().getAPIVersion();
		
		var github = new GitHubApi({
			version: "3.0.0"
		});
		
		github.authenticate({
			type: "token",
			token: process.env.GH_TOKEN_NODE
		});
		
		github.repos.getTags({
			user: 'AdaptiveMe',
			repo: 'adaptive-arp-api',
			page: 0,
			per_page: 1
		}, function(error, result){
			if (error) {
				console.log("ERROR: " + error);
			} else {
				expect(result[0].name).to.equal(api_version);
				done();
			}
		});
	}
  });

});
<commit_msg>Final config<commit_after>'use strict';

var fs = require("fs"), 
	vm = require('vm'),
	GitHubApi = require("github"),
	expect = require('expect.js');

// Load adaptive library into the node context
vm.runInThisContext(fs.readFileSync('adaptive.js'));

describe('bower-adaptiveme', function () {

  /**
   * Test to try the current API version of the platform
   */
  it('Check API version', function (done) {
	  
	if (JSON.parse(process.env.TRAVIS_PULL_REQUEST)) {
		done();
	} else {
		var api_version = Adaptive.AppRegistryBridge.getInstance().getAPIVersion();
		
		var github = new GitHubApi({
			version: "3.0.0"
		});
		
		github.authenticate({
			type: "token",
			token: process.env.GH_TOKEN_NODE
		});
		
		github.repos.getTags({
			user: 'AdaptiveMe',
			repo: 'adaptive-arp-api',
			page: 0,
			per_page: 1
		}, function(error, result){
			if (error) {
				console.log("ERROR: " + error);
			} else {
				expect(result[0].name).to.equal(api_version);
				done();
			}
		});
	}
  });

});

{'fraction_non_alphanumeric': 0.16847569608305804, 'fraction_numerical': 0.005663048607833884, 'mean_word_length': 3.5396145610278373, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '449838', 'n_tokens_mistral': 873, 'n_tokens_neox': 743, 'n_words': 147}