<commit_before>{%- from "diaspora/map.jinja" import diaspora with context %}
{%- set environment = diaspora.configuration.server.rails_environment %}

include:
  - diaspora.config

diaspora_dependencies:
  pkg.installed:
    - pkgs: {{ diaspora.dependencies|json }}
    - require:
      - pkg: diaspora_database_dependency

diaspora_database_dependency:
  pkg.installed:
  {%- if diaspora.database.type == "mysql" %}
    - name: {{ diaspora.mysql_package }}
  {%- else %}
    - name: {{ diaspora.postgresql_package }}
  {%- endif %}

{%- if diaspora.install_redis %}
redis_package:
  pkg.installed:
    - name: {{ diaspora.redis_package }}

redis_service:
  service.running:
    - name: {{ diaspora.redis_service }}
{%- endif %}

diaspora_user:
  user.present:
    - name: {{ diaspora.user.username }}
  {%- if 'shell' in diaspora.user %}
    - shell: {{ diaspora.user.shell }}
  {%- endif %}
  {%- if 'home' in diaspora.user %}
    - home: {{ diaspora.user.home }}
  {%- endif %}

diaspora_rvm_gpg_key:
  cmd.run:
    - name: gpg2 --keyserver hkp://keys.gnupg.net --recv-keys <KEY>
    - unless: gpg --list-keys <KEY>
    - runas: {{ diaspora.user.username }}
    - require:
      - user: diaspora_user

diaspora_rvm_ruby:
  rvm.installed:
    - name: ruby-{{ diaspora.ruby_version }}
    - user: {{ diaspora.user.username }}<commit_msg>Use 'gpg' instead of 'gpg2'<commit_after>{%- from "diaspora/map.jinja" import diaspora with context %}
{%- set environment = diaspora.configuration.server.rails_environment %}

include:
  - diaspora.config

diaspora_dependencies:
  pkg.installed:
    - pkgs: {{ diaspora.dependencies|json }}
    - require:
      - pkg: diaspora_database_dependency

diaspora_database_dependency:
  pkg.installed:
  {%- if diaspora.database.type == "mysql" %}
    - name: {{ diaspora.mysql_package }}
  {%- else %}
    - name: {{ diaspora.postgresql_package }}
  {%- endif %}

{%- if diaspora.install_redis %}
redis_package:
  pkg.installed:
    - name: {{ diaspora.redis_package }}

redis_service:
  service.running:
    - name: {{ diaspora.redis_service }}
{%- endif %}

diaspora_user:
  user.present:
    - name: {{ diaspora.user.username }}
  {%- if 'shell' in diaspora.user %}
    - shell: {{ diaspora.user.shell }}
  {%- endif %}
  {%- if 'home' in diaspora.user %}
    - home: {{ diaspora.user.home }}
  {%- endif %}

diaspora_rvm_gpg_key:
  cmd.run:
    - name: gpg --keyserver hkp://keys.gnupg.net --recv-keys <KEY>
    - unless: gpg --list-keys <KEY>
    - runas: {{ diaspora.user.username }}
    - require:
      - user: diaspora_user

diaspora_rvm_ruby:
  rvm.installed:
    - name: ruby-{{ diaspora.ruby_version }}
    - user: {{ diaspora.user.username }}
{'fraction_non_alphanumeric': 0.1621420602454444, 'fraction_numerical': 0.0007437709185570844, 'mean_word_length': 3.045112781954887, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3057705', 'n_tokens_mistral': 1133, 'n_tokens_neox': 992, 'n_words': 170}