<commit_before>language: php

services:
  - elasticsearch

php:
  - 5.4
  - 5.5

env:
  - CAKE_VERSION=2.3.10
  - CAKE_VERSION=2.4.1
  - CAKE_VERSION=master

before_script:
  - mysql -e 'create database elastic_test;'
  - git clone git://github.com/cakephp/cakephp ../cakephp && cd ../cakephp && git checkout $CAKE_VERSION
  - cp -R ../CakePHP-ElasticsearchSource-Datasource plugins/ElasticsearchSource
  - git clone --recursive git://github.com/imsamurai/cakephp-httpsource-datasource plugins/HttpSource
  - chmod -R 777 ../cakephp/app/tmp
  - set +H
  - echo "CakePlugin::load('HttpSource', array('bootstrap' => true, 'routes' => false));" >> ../cakephp/app/Config/bootstrap.php
   - echo "<?php
    class DATABASE_CONFIG {
    private \$test = array(
        'datasource' => 'Database/Mysql',
        'host' => '127.0.0.1',
        'login' => 'travis',
        'database' => 'elastic_test',
        'prefix' => '',
        'encoding' => 'utf8'
    );

    }" > ../cakephp/app/Config/database.php


script:
  - ./lib/Cake/Console/cake test ElasticsearchSource AllElasticsearchSource --stderr<commit_msg>fix build script<commit_after>language: php

services:
  - elasticsearch

php:
  - 5.4
  - 5.5

env:
  - CAKE_VERSION=2.3.10
  - CAKE_VERSION=2.4.1
  - CAKE_VERSION=master

before_script:
  - mysql -e 'create database elastic_test;'
  - git clone git://github.com/cakephp/cakephp ../cakephp && cd ../cakephp && git checkout $CAKE_VERSION
  - cp -R ../CakePHP-ElasticsearchSource-Datasource plugins/ElasticsearchSource
  - git clone --recursive git://github.com/imsamurai/cakephp-httpsource-datasource plugins/HttpSource
  - chmod -R 777 ../cakephp/app/tmp
  - set +H
  - echo "CakePlugin::load('HttpSource', array('bootstrap' => true, 'routes' => false));" >> ../cakephp/app/Config/bootstrap.php
  - echo "<?php
    class DATABASE_CONFIG {
    private \$test = array(
        'datasource' => 'Database/Mysql',
        'host' => '127.0.0.1',
        'login' => 'travis',
        'database' => 'elastic_test',
        'prefix' => '',
        'encoding' => 'utf8'
    );

    }" > ../cakephp/app/Config/database.php


script:
  - ./lib/Cake/Console/cake test ElasticsearchSource AllElasticsearchSource --stderr
{'fraction_non_alphanumeric': 0.15835520559930008, 'fraction_numerical': 0.01837270341207349, 'mean_word_length': 2.5076687116564416, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '283759', 'n_tokens_mistral': 873, 'n_tokens_neox': 768, 'n_words': 147}