<commit_before>language: ruby

services:
  - postgresql
  - redis-server

rvm:
  - 1.9.3
  - 2.0.0

gemfile:
  - $REDMINE_PATH/Gemfile

env:
  - REDMINE_VER=2.1.6 DB=postgresql
  - REDMINE_VER=2.2.4 DB=postgresql
  - REDMINE_VER=2.3.4 DB=postgresql
  - REDMINE_VER=2.4.7 DB=postgresql
  - REDMINE_VER=2.5.3 DB=postgresql
  - REDMINE_VER=2.6.7 DB=postgresql
  - REDMINE_VER=3.0.5 DB=postgresql
  - REDMINE_VER=3.1.1 DB=postgresql

matrix:
  exclude:
    - rvm: 2.0.0
      env: REDMINE_VER=2.1.6 DB=postgresql
      gemfile: $REDMINE_PATH/Gemfile
    - rvm: 2.0.0
      env: REDMINE_VER=2.2.4 DB=postgresql
      gemfile: $REDMINE_PATH/Gemfile

before_install:
  - export ES_HOME=/usr/share/elasticsearch
  - sudo wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.0.deb
  - sudo service elasticsearch stop
  - sudo dpkg -i elasticsearch-1.1.0.deb
  - sudo $ES_HOME/bin/plugin -install elasticsearch/elasticsearch-mapper-attachments/2.0.0
  - sudo service elasticsearch start
  - sleep 3
  - export PLUGIN_NAME=redmine_elasticsearch
  - export REDMINE_PATH=$HOME/redmine
  - svn co http://svn.redmine.org/redmine/tags/$REDMINE_VER $REDMINE_PATH
  - ln -s $TRAVIS_BUILD_DIR $REDMINE_PATH/plugins/$PLUGIN_NAME
  - cp config/database-$DB-travis.yml $REDMINE_PATH/config/database.yml
  - git clone --depth=1 https://github.com/Undev/redmine_resque.git $REDMINE_PATH/plugins/redmine_resque
  - echo "gem 'iconv'" >> $REDMINE_PATH/Gemfile
  - cd $REDMINE_PATH

before_script:
  - rake db:create
  - rake db:migrate
  - rake redmine:plugins:migrate

script:
  - rake redmine:plugins:test NAME=$PLUGIN_NAME<commit_msg>Added bundle exec to rake task in travis configurtion<commit_after>language: ruby

services:
  - postgresql
  - redis-server

rvm:
  - 1.9.3
  - 2.0.0

gemfile:
  - $REDMINE_PATH/Gemfile

env:
  - REDMINE_VER=2.1.6 DB=postgresql
  - REDMINE_VER=2.2.4 DB=postgresql
  - REDMINE_VER=2.3.4 DB=postgresql
  - REDMINE_VER=2.4.7 DB=postgresql
  - REDMINE_VER=2.5.3 DB=postgresql
  - REDMINE_VER=2.6.7 DB=postgresql
  - REDMINE_VER=3.0.5 DB=postgresql
  - REDMINE_VER=3.1.1 DB=postgresql

matrix:
  exclude:
    - rvm: 2.0.0
      env: REDMINE_VER=2.1.6 DB=postgresql
      gemfile: $REDMINE_PATH/Gemfile
    - rvm: 2.0.0
      env: REDMINE_VER=2.2.4 DB=postgresql
      gemfile: $REDMINE_PATH/Gemfile

before_install:
  - export ES_HOME=/usr/share/elasticsearch
  - sudo wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.0.deb
  - sudo service elasticsearch stop
  - sudo dpkg -i elasticsearch-1.1.0.deb
  - sudo $ES_HOME/bin/plugin -install elasticsearch/elasticsearch-mapper-attachments/2.0.0
  - sudo service elasticsearch start
  - sleep 3
  - export PLUGIN_NAME=redmine_elasticsearch
  - export REDMINE_PATH=$HOME/redmine
  - svn co http://svn.redmine.org/redmine/tags/$REDMINE_VER $REDMINE_PATH
  - ln -s $TRAVIS_BUILD_DIR $REDMINE_PATH/plugins/$PLUGIN_NAME
  - cp config/database-$DB-travis.yml $REDMINE_PATH/config/database.yml
  - git clone --depth=1 https://github.com/Undev/redmine_resque.git $REDMINE_PATH/plugins/redmine_resque
  - echo "gem 'iconv'" >> $REDMINE_PATH/Gemfile
  - cd $REDMINE_PATH

before_script:
  - bundle exec rake db:create
  - bundle exec rake db:migrate
  - bundle exec rake redmine:plugins:migrate

script:
  - bundle exec rake redmine:plugins:test NAME=$PLUGIN_NAME
{'fraction_non_alphanumeric': 0.11729857819905214, 'fraction_numerical': 0.03139810426540284, 'mean_word_length': 3.496671105193076, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '852911', 'n_tokens_mistral': 1437, 'n_tokens_neox': 1398, 'n_words': 223}