<commit_before>require 'spec_helper'

describe 'etherpad' do
  context 'supported operating systems' do
    on_supported_os.each do |os, facts|
      context "on #{os}" do
        let(:facts) do
          facts
        end

        context "etherpad class without any parameters" do
          it { is_expected.to compile.with_all_deps }

          it { is_expected.to contain_vcsrepo('/opt/etherpad') }
          it { is_expected.to contain_file('/opt/etherpad/settings.json') }
          it { is_expected.to contain_service('etherpad') }
        end
      end
    end
  end

  context 'supported operating systems' do
    on_supported_os.each do |os, facts|
      context "on #{os}" do
        let(:facts) do
          facts
        end

        context "etherpad class with all parameters set" do
          let(:params) do
            {
              ensure: 'present',
              service_name: 'etherpad',
              service_ensure: 'running',
              service_provider: facts[:service_provider],
              manage_user: true,
              manage_abiword: false,
              abiword_path: '/usr/bin/abiword',
              manage_tidy: false,
              tidy_path: '/usr/bin/tidy',
              user: 'etherpad',
              group: 'etherpad',
              root_dir: '/opt/etherpad',
              source: 'https://github.com/ether/etherpad-lite.git',

              # Db
              database_type: 'dirty',
              database_host: 'localhost',
              database_user: 'etherpad',
              database_name: 'etherpad',
              database_password: '<PASSWORD>',

              # Network
              ip: '*',
              port: 9001,
              trust_proxy: false,

              # Performance
              max_age: 21_600,
              minify: true,

              # Config
              require_session: false,
              edit_only: false,
              require_authentication: false,
              require_authorization: false,
              pad_title: :undef,
              default_pad_text: 'Welcome to etherpad!'
            }
          end

          it { is_expected.to compile.with_all_deps }
        end
      end
    end
  end
end
<commit_msg>rubocop: fix Style/StringLiterals<commit_after>require 'spec_helper'

describe 'etherpad' do
  context 'supported operating systems' do
    on_supported_os.each do |os, facts|
      context "on #{os}" do
        let(:facts) do
          facts
        end

        context 'etherpad class without any parameters' do
          it { is_expected.to compile.with_all_deps }

          it { is_expected.to contain_vcsrepo('/opt/etherpad') }
          it { is_expected.to contain_file('/opt/etherpad/settings.json') }
          it { is_expected.to contain_service('etherpad') }
        end
      end
    end
  end

  context 'supported operating systems' do
    on_supported_os.each do |os, facts|
      context "on #{os}" do
        let(:facts) do
          facts
        end

        context 'etherpad class with all parameters set' do
          let(:params) do
            {
              ensure: 'present',
              service_name: 'etherpad',
              service_ensure: 'running',
              service_provider: facts[:service_provider],
              manage_user: true,
              manage_abiword: false,
              abiword_path: '/usr/bin/abiword',
              manage_tidy: false,
              tidy_path: '/usr/bin/tidy',
              user: 'etherpad',
              group: 'etherpad',
              root_dir: '/opt/etherpad',
              source: 'https://github.com/ether/etherpad-lite.git',

              # Db
              database_type: 'dirty',
              database_host: 'localhost',
              database_user: 'etherpad',
              database_name: 'etherpad',
              database_password: '<PASSWORD>',

              # Network
              ip: '*',
              port: 9001,
              trust_proxy: false,

              # Performance
              max_age: 21_600,
              minify: true,

              # Config
              require_session: false,
              edit_only: false,
              require_authentication: false,
              require_authorization: false,
              pad_title: :undef,
              default_pad_text: 'Welcome to etherpad!'
            }
          end

          it { is_expected.to compile.with_all_deps }
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.08873873873873873, 'fraction_numerical': 0.004054054054054054, 'mean_word_length': 1.4921436588103254, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '3371080', 'n_tokens_mistral': 1221, 'n_tokens_neox': 1171, 'n_words': 290}