<commit_before># Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/ruby:2.3.8-stretch
        environment:
          - PGHOST: 127.0.0.1
          - PGUSER: postgres
          - RAILS_ENV: test
          - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/
      - image: xcgd/libreoffice
      - image: redis
      - image: mdillon/postgis:9.6
        environment:
          - POSTGRES_USER: postgres
          - PGUSER: postgres
          - POSTGRES_DB: ekylibre_test
          - POSTGRES_PASSWORD=

    working_directory: ~/repo

    steps:
      - checkout

      # Packages dependencies TODO: move to docker image?
      - run: sudo apt-get install openjdk-8-jdk
      - run: sudo apt-get install libproj-dev libgeos-dev
      - run: sudo apt-get install pdftk
      - run: sudo apt-get install graphicsmagick
      - run: sudo apt-get install tesseract-ocr-fra tesseract-ocr-eng tesseract-ocr-spa poppler-utils poppler-data
      - run: sudo apt-get install qt5-default libqt5webkit5-dev gstreamer1.0-x gstreamer1.0-tools gstreamer1.0-plugins-base

      # Install postgres extensions
      - run: sudo apt install -y postgresql-client || true
      - run: psql -U postgres -d ekylibre_test -c 'CREATE SCHEMA IF NOT EXISTS postgis;'
      - run: psql -U postgres -d ekylibre_test -c 'CREATE EXTENSION IF NOT EXISTS postgis SCHEMA postgis;'
      - run: psql -U postgres -d ekylibre_test -c 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp" SCHEMA postgis;'
      - run: psql -U postgres -d ekylibre_test -c 'CREATE EXTENSION IF NOT EXISTS "unaccent" SCHEMA postgis;'


      # Set test database.yml config
      - run: cp -f test/ci/database.yml config/database.yml

      # Download and cache dependencies
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "Gemfile.lock" }}
            # fallback to using the latest cache if no exact match is found
            - v1-dependencies-<commit_msg>Added missing dependency and splitted them for easier readability.<commit_after># Ruby CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/ruby:2.3.8-stretch
        environment:
          - PGHOST: 127.0.0.1
          - PGUSER: postgres
          - RAILS_ENV: test
          - JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/
      - image: xcgd/libreoffice
      - image: redis
      - image: mdillon/postgis:9.6
        environment:
          - POSTGRES_USER: postgres
          - PGUSER: postgres
          - POSTGRES_DB: ekylibre_test
          - POSTGRES_PASSWORD=

    working_directory: ~/repo

    steps:
      - checkout

      # Packages dependencies TODO: move to docker image?
      - run: sudo apt-get install openjdk-8-jdk
      - run: sudo apt-get install libproj-dev libgeos-dev
      - run: sudo apt-get install pdftk
      - run: sudo apt-get install graphicsmagick
      - run: sudo apt-get install tesseract-ocr tesseract-ocr-fra tesseract-ocr-eng tesseract-ocr-spa
      - run: sudo apt-get install poppler-utils poppler-data
      - run: sudo apt-get install qt5-default libqt5webkit5-dev gstreamer1.0-x gstreamer1.0-tools gstreamer1.0-plugins-base

      # Install postgres extensions
      - run: sudo apt install -y postgresql-client || true
      - run: psql -U postgres -d ekylibre_test -c 'CREATE SCHEMA IF NOT EXISTS postgis;'
      - run: psql -U postgres -d ekylibre_test -c 'CREATE EXTENSION IF NOT EXISTS postgis SCHEMA postgis;'
      - run: psql -U postgres -d ekylibre_test -c 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp" SCHEMA postgis;'
      - run: psql -U postgres -d ekylibre_test -c 'CREATE EXTENSION IF NOT EXISTS "unaccent" SCHEMA postgis;'


      # Set test database.yml config
      - run: cp -f test/ci/database.yml config/database.yml

      # Download and cache dependencies
      - restore_cache:
          keys:
            - v1-dependencies-{{ checksum "Gemfile.lock" }}
            # fallback to using the latest cache if no exact match is found
            - v1-dependencies-
{'fraction_non_alphanumeric': 0.08916452141352679, 'fraction_numerical': 0.014509712146033232, 'mean_word_length': 2.2452543659832953, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3351656', 'n_tokens_mistral': 1495, 'n_tokens_neox': 1416, 'n_words': 404}