<commit_before>##
# CSS compiling tools.
#
- name: CSS | Install rubygems package
  yum: pkg=rubygems state=installed
  tags: css

- name: RUBY | Install Bundler
  shell: gem install bundler

- name: Development packages
  yum: pkg={{ item }} state=installed
  with_items:
    - "{{ development_packages }}"

- name: PHP | XDebug
  yum: pkg={{ php_package }}-pecl-xdebug state=installed
  tags: ntp

- name: PHP | Add section to the xdebug.ini file if it is missing
  lineinfile: dest=/etc/php.d/15-xdebug.ini
    regexp='^[XDebug]'
    insertbefore=BOF
    line='[XDebug]'

- name: PHP | Set up xdebug.ini
  ini_file: dest=/etc/php.d/15-xdebug.ini
    section={{ item.0.section }}
    option={{ item.1.key }}
    value={{ item.1.val }}
    backup=yes
  with_subelements:
    - "{{ xdebug }}"
    - options
  notify:
    - restart php-fpm

- name: MAILCATCHER | Install specific version of "tilt" gem because mailcatcher is picky
  gem: name="tilt" state=present user_install=no version=1.3.4

- name: MAILCATCHER | Install specific version of "mime-types" gem because mailcatcher is really picky
  gem: name="mime-types" state=present user_install=no version=1.25.1

- name: MAILCATCHER | Install mailcatcher gem
  gem: name="mailcatcher" state=latest user_install=no

- name: MAILCATCHER | Kill mailcatcher if it's running
  command: pkill mailcatcher
  ignore_errors: yes

- name: MAILCATCHER | Launch mailcatcher
  command: mailcatcher --ip=0.0.0.0

- name: MAILCATCHER | Add sendmail_path setting to {{ php_ini_file }}
  ini_file: dest={{ php_ini_file }}
    section="{{ item.0.section }}"
    option="{{ item.1.key }}"
    value="{{ item.1.val }}"
    backup=yes
  with_subelements:
    - "{{ php }}"
    - options
  notify:
    - restart php-fpm

- name: MAILCATCHER | Add mailcatcher command to rc.local to have it executed at startup
  lineinfile: dest=/etc/rc.d/rc.local
    regexp='^mailcatcher --http-ip=0\.0\.0\.0'
    insertbefore=BOF
    line='mailcatcher --http-ip=0.0.0.0'


<commit_msg>Install fixed version of i18n for mailcathcer.<commit_after>##
# CSS compiling tools.
#
- name: CSS | Install rubygems package
  yum: pkg=rubygems state=installed
  tags: css

- name: RUBY | Install Bundler
  shell: gem install bundler

- name: Development packages
  yum: pkg={{ item }} state=installed
  with_items:
    - "{{ development_packages }}"

- name: PHP | XDebug
  yum: pkg={{ php_package }}-pecl-xdebug state=installed
  tags: ntp

- name: PHP | Add section to the xdebug.ini file if it is missing
  lineinfile: dest=/etc/php.d/15-xdebug.ini
    regexp='^[XDebug]'
    insertbefore=BOF
    line='[XDebug]'

- name: PHP | Set up xdebug.ini
  ini_file: dest=/etc/php.d/15-xdebug.ini
    section={{ item.0.section }}
    option={{ item.1.key }}
    value={{ item.1.val }}
    backup=yes
  with_subelements:
    - "{{ xdebug }}"
    - options
  notify:
    - restart php-fpm

- name: MAILCATCHER | Install specific version of "tilt" gem because mailcatcher is picky
  gem: name="tilt" state=present user_install=no version=1.3.4

- name: MAILCATCHER | Install specific version of "mime-types" gem because mailcatcher is really picky
  gem: name="mime-types" state=present user_install=no version=1.25.1

- name: MAILCATCHER | Install specific version of "i18n" gem because mailcatcher is really really picky
  gem: name="i18n" state=present user_install=no version=0.6.9

- name: MAILCATCHER | Install mailcatcher gem
  gem: name="mailcatcher" state=latest user_install=no

- name: MAILCATCHER | Kill mailcatcher if it's running
  command: pkill mailcatcher
  ignore_errors: yes

- name: MAILCATCHER | Launch mailcatcher
  command: mailcatcher --ip=0.0.0.0

- name: MAILCATCHER | Add sendmail_path setting to {{ php_ini_file }}
  ini_file: dest={{ php_ini_file }}
    section="{{ item.0.section }}"
    option="{{ item.1.key }}"
    value="{{ item.1.val }}"
    backup=yes
  with_subelements:
    - "{{ php }}"
    - options
  notify:
    - restart php-fpm

- name: MAILCATCHER | Add mailcatcher command to rc.local to have it executed at startup
  lineinfile: dest=/etc/rc.d/rc.local
    regexp='^mailcatcher --http-ip=0\.0\.0\.0'
    insertbefore=BOF
    line='mailcatcher --http-ip=0.0.0.0'



{'fraction_non_alphanumeric': 0.12853409360893323, 'fraction_numerical': 0.015918270373010215, 'mean_word_length': 3.4362486828240253, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '4814919', 'n_tokens_mistral': 1550, 'n_tokens_neox': 1491, 'n_words': 393}