From e8e996bb6799f2856e7c17f469853978f89f1b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 25 Nov 2015 18:48:16 +0100 Subject: [PATCH 001/383] ansible WIP --- Vagrantfile | 332 +++++------------- resources/ansible/files/authorized_keys | 1 + resources/ansible/inventories/dev | 2 + resources/ansible/playbook-always.yml | 7 + resources/ansible/playbook.yml | 15 + resources/ansible/roles/app/tasks/main.yml | 2 + .../ansible/roles/app_reset/tasks/main.yml | 1 + .../ansible/roles/composer/tasks/main.yml | 2 + .../roles/elasticsearch/defaults/main.yml | 2 + .../roles/elasticsearch/tasks/main.yml | 47 +++ .../ansible/roles/mariadb/tasks/main.yml | 47 +++ .../ansible/roles/nginx/handlers/main.yml | 3 + resources/ansible/roles/nginx/tasks/main.yml | 9 + .../ansible/roles/nginx/templates/default.tpl | 27 ++ resources/ansible/roles/php/handlers/main.yml | 3 + .../ansible/roles/php/tasks/configure.yml | 19 + resources/ansible/roles/php/tasks/main.yml | 21 ++ resources/ansible/roles/php/tasks/mod-php.yml | 10 + resources/ansible/roles/php/tasks/pecl.yml | 26 ++ resources/ansible/roles/php/tasks/php-cli.yml | 10 + resources/ansible/roles/php/tasks/php-fpm.yml | 19 + .../ansible/roles/php/templates/extension.tpl | 2 + resources/ansible/roles/server/tasks/main.yml | 31 ++ .../roles/server/templates/timezone.tpl | 1 + .../roles/vagrant_local/tasks/main.yml | 11 + .../ansible/roles/xdebug/defaults/main.yml | 5 + resources/ansible/roles/xdebug/tasks/main.yml | 4 + resources/ansible/vars/all.yml | 35 ++ resources/ansible/windows.sh | 31 ++ 29 files changed, 485 insertions(+), 240 deletions(-) create mode 100644 resources/ansible/files/authorized_keys create mode 100644 resources/ansible/inventories/dev create mode 100644 resources/ansible/playbook-always.yml create mode 100644 resources/ansible/playbook.yml create mode 100644 resources/ansible/roles/app/tasks/main.yml create mode 100644 resources/ansible/roles/app_reset/tasks/main.yml create mode 100644 resources/ansible/roles/composer/tasks/main.yml create mode 100644 resources/ansible/roles/elasticsearch/defaults/main.yml create mode 100644 resources/ansible/roles/elasticsearch/tasks/main.yml create mode 100755 resources/ansible/roles/mariadb/tasks/main.yml create mode 100644 resources/ansible/roles/nginx/handlers/main.yml create mode 100644 resources/ansible/roles/nginx/tasks/main.yml create mode 100644 resources/ansible/roles/nginx/templates/default.tpl create mode 100644 resources/ansible/roles/php/handlers/main.yml create mode 100644 resources/ansible/roles/php/tasks/configure.yml create mode 100644 resources/ansible/roles/php/tasks/main.yml create mode 100644 resources/ansible/roles/php/tasks/mod-php.yml create mode 100644 resources/ansible/roles/php/tasks/pecl.yml create mode 100644 resources/ansible/roles/php/tasks/php-cli.yml create mode 100644 resources/ansible/roles/php/tasks/php-fpm.yml create mode 100644 resources/ansible/roles/php/templates/extension.tpl create mode 100644 resources/ansible/roles/server/tasks/main.yml create mode 100644 resources/ansible/roles/server/templates/timezone.tpl create mode 100644 resources/ansible/roles/vagrant_local/tasks/main.yml create mode 100644 resources/ansible/roles/xdebug/defaults/main.yml create mode 100644 resources/ansible/roles/xdebug/tasks/main.yml create mode 100644 resources/ansible/vars/all.yml create mode 100644 resources/ansible/windows.sh diff --git a/Vagrantfile b/Vagrantfile index 9d6a908a00..13e86e0675 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,250 +1,102 @@ -require 'yaml' +Vagrant.require_version ">= 1.5" -unless Vagrant.has_plugin?("vagrant-hostsupdater") - raise 'vagrant-hostmanager is not installed! please run "vagrant plugin install vagrant-hostsupdater' +unless Vagrant.has_plugin?('vagrant-hostmanager') + raise "vagrant-hostmanager is not installed! Please run\n vagrant plugin install vagrant-hostmanager\n\n" +end +$root = File.dirname(File.expand_path(__FILE__)) + +# Check to determine whether we're on a windows or linux/os-x host, +# later on we use this to launch ansible in the supported way +# source: https://stackoverflow.com/questions/2108727/which-in-ruby-checking-if-program-exists-in-path-from-ruby +def which(cmd) + exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : [''] + ENV['PATH'].split(File::PATH_SEPARATOR).each do |path| + exts.each { |ext| + exe = File.join(path, "#{cmd}#{ext}") + return exe if File.executable? exe + } + end + return nil end -root = File.dirname(File.expand_path(__FILE__)) +def config_net(config) + # Configure hostmanager + config.hostmanager.enabled = true + config.hostmanager.manage_host = true + config.hostmanager.ignore_private_ip = false + config.hostmanager.include_offline = true + config.hostmanager.aliases = [ + $hostname + ".vb", + "www." + $hostname + ".vb", + "dev." + $hostname + ".vb" + ] -Vagrant.configure("2") do |config| - Dir.glob(root+"/resources/vagrant/vms/**/puphpet/config.yaml").each do|f| - dir = File.dirname(File.expand_path(f+"/..")) - base_path = dir - configValues = YAML.load_file(f) - data = configValues['vagrantfile-local'] + #config.vm.network :public_network, type: "dhcp", bridge: "en0: Ethernet" - # Force vagrant folder in nfs mode. Windows users should comment following line - config.vm.synced_folder ".", "/vagrant", type: "nfs" - - config.vm.define "vm-#{data['name']}" do |node| - node.vm.box = "#{data['vm']['box']}" - node.vm.box_url = "#{data['vm']['box_url']}" - - if data['vm']['hostname'].to_s.strip.length != 0 - node.vm.hostname = "#{data['vm']['hostname']}" - end - - node.vm.provider :virtualbox do |vb| - vb.name = "#{data['name']}" - end - - if data['vm']['network']['private_network'].to_s != '' - node.vm.network :private_network, ip: "#{data['vm']['network']['private_network']}" - end - - data['vm']['network']['forwarded_port'].each do |i, port| - - if port['guest'] != '' && port['host'] != '' - node.vm.network :forwarded_port, guest: port['guest'].to_i, host: port['host'].to_i - end + # Assign static IP if present in network config + if File.file?($root + "/.network.conf") + ipAddress = File.read($root + "/.network.conf") + config.vm.network :private_network, ip: ipAddress + else + # vboxnet0 can be changed to use a specific private_network + config.vm.network :private_network, type: "dhcp" + config.vm.provider "virtualbox" do |vb| + vb.customize ["modifyvm", :id, "--hostonlyadapter2", "vboxnet0"] end - - if Vagrant.has_plugin?('vagrant-hostsupdater') - hosts = Array.new() - - if !configValues['apache']['install'].nil? && - configValues['apache']['install'].to_i == 1 && - configValues['apache']['vhosts'].is_a?(Hash) - configValues['apache']['vhosts'].each do |i, vhost| - hosts.push(vhost['servername']) - - if vhost['serveraliases'].is_a?(Array) - vhost['serveraliases'].each do |vhost_alias| - hosts.push(vhost_alias) - end - end - end - elsif !configValues['nginx']['install'].nil? && - configValues['nginx']['install'].to_i == 1 && - configValues['nginx']['vhosts'].is_a?(Hash) - configValues['nginx']['vhosts'].each do |i, vhost| - hosts.push(vhost['server_name']) - - if vhost['server_aliases'].is_a?(Array) - vhost['server_aliases'].each do |x, vhost_alias| - hosts.push(vhost_alias) - end - end - end - end - - if hosts.any? - contents = File.open("#{dir}/puphpet/shell/hostsupdater-notice.txt", 'r'){ |file| file.read } - puts "\n\033[34m#{contents}\033[0m\n" - - if node.vm.hostname.to_s.strip.length == 0 - node.vm.hostname = 'puphpet-dev-machine' - end - - node.hostsupdater.aliases = hosts - end - end - - data['vm']['synced_folder'].each do |i, folder| - if folder['source'] == '' - folder['source'] = root - end - if folder['source'] != '' && folder['target'] != '' - if folder['sync_type'] == 'nfs' - node.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp', 'fsc'] - elsif folder['sync_type'] == 'smb' - node.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: "smb" - elsif folder['sync_type'] == 'rsync' - rsync_args = !folder['rsync']['args'].nil? ? folder['rsync']['args'] : ["--verbose", "--archive", "--delete", "-z"] - rsync_auto = !folder['rsync']['auto'].nil? ? folder['rsync']['auto'] : true - rsync_exclude = !folder['rsync']['exclude'].nil? ? folder['rsync']['exclude'] : [".vagrant/"] - - node.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", - rsync__args: rsync_args, rsync__exclude: rsync_exclude, rsync__auto: rsync_auto, type: "rsync" - else - node.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", - group: 'www-data', owner: 'www-data', mount_options: ["dmode=775", "fmode=764"] - end - end - end - - node.vm.usable_port_range = (10200..10500) - - if data['vm']['chosen_provider'].empty? || data['vm']['chosen_provider'] == "virtualbox" - ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox' - - node.vm.provider :virtualbox do |virtualbox| - data['vm']['provider']['virtualbox']['modifyvm'].each do |key, value| - if key == "memory" - next - end - - if key == "natdnshostresolver1" - value = value ? "on" : "off" - end - - virtualbox.customize ["modifyvm", :id, "--#{key}", "#{value}"] - end - - virtualbox.customize ["modifyvm", :id, "--memory", "#{data['vm']['memory']}"] - - if data['vm']['hostname'].to_s.strip.length != 0 - virtualbox.customize ["modifyvm", :id, "--name", node.vm.hostname] - end - end - end - - if data['vm']['chosen_provider'] == "vmware_fusion" || data['vm']['chosen_provider'] == "vmware_workstation" - ENV['VAGRANT_DEFAULT_PROVIDER'] = (data['vm']['chosen_provider'] == "vmware_fusion") ? "vmware_fusion" : "vmware_workstation" - - node.vm.provider "vmware_fusion" do |v| - data['vm']['provider']['vmware'].each do |key, value| - if key == "memsize" - next - end - - v.vmx["#{key}"] = "#{value}" - end - - v.vmx["memsize"] = "#{data['vm']['memory']}" - - if data['vm']['hostname'].to_s.strip.length != 0 - v.vmx["displayName"] = node.vm.hostname - end - end - end - - if data['vm']['chosen_provider'] == "parallels" - ENV['VAGRANT_DEFAULT_PROVIDER'] = "parallels" - - node.vm.provider "parallels" do |v| - data['vm']['provider']['parallels'].each do |key, value| - if key == "memsize" - next - end - - v.customize ["set", :id, "--#{key}", "#{value}"] - end - - v.memory = "#{data['vm']['memory']}" - v.cpus = "#{data['vm']['cpus']}" - - if data['vm']['hostname'].to_s.strip.length != 0 - v.name = node.vm.hostname - end - end - end - - ssh_username = !data['ssh']['username'].nil? ? data['ssh']['username'] : "vagrant" - - node.vm.provision "shell" do |s| - s.path = "#{base_path}/puphpet/shell/initial-setup.sh" - s.args = "/vagrant/resources/vagrant/vms/#{data['name']}/puphpet" - end - - node.vm.provision "shell" do |kg| - kg.path = "#{base_path}/puphpet/shell/ssh-keygen.sh" - kg.args = "#{ssh_username}" - end - - node.vm.provision :shell, :path => "#{base_path}/puphpet/shell/update-puppet.sh" - - node.vm.provision :puppet do |puppet| - puppet.facter = { - "ssh_username" => "#{ssh_username}", - "provisioner_type" => ENV['VAGRANT_DEFAULT_PROVIDER'], - "vm_target_key" => 'vagrantfile-local', - } - puppet.manifests_path = "#{data['vm']['provision']['puppet']['manifests_path']}" - puppet.manifest_file = "#{data['vm']['provision']['puppet']['manifest_file']}" - puppet.module_path = "#{data['vm']['provision']['puppet']['module_path']}" - - if !data['vm']['provision']['puppet']['options'].empty? - puppet.options = data['vm']['provision']['puppet']['options'] - end - end - - node.vm.provision :shell do |s| - s.path = "#{base_path}/puphpet/shell/execute-files.sh" - s.args = ["exec-once", "exec-always"] - end - - node.vm.provision :shell, run: "always" do |s| - s.path = "#{base_path}/puphpet/shell/execute-files.sh" - s.args = ["startup-once", "startup-always"] - end - - node.vm.provision :shell, :path => "#{base_path}/puphpet/shell/important-notices.sh" - - if File.file?("#{dir}/puphpet/files/dot/ssh/id_rsa") - node.ssh.private_key_path = [ - "#{dir}/puphpet/files/dot/ssh/id_rsa", - "#{dir}/puphpet/files/dot/ssh/insecure_private_key" - ] - end - - if !data['ssh']['host'].nil? - node.ssh.host = "#{data['ssh']['host']}" - end - if !data['ssh']['port'].nil? - node.ssh.port = "#{data['ssh']['port']}" - end - if !data['ssh']['username'].nil? - node.ssh.username = "#{data['ssh']['username']}" - end - if !data['ssh']['guest_port'].nil? - node.ssh.guest_port = data['ssh']['guest_port'] - end - if !data['ssh']['shell'].nil? - node.ssh.shell = "#{data['ssh']['shell']}" - end - if !data['ssh']['keep_alive'].nil? - node.ssh.keep_alive = data['ssh']['keep_alive'] - end - if !data['ssh']['forward_agent'].nil? - node.ssh.forward_agent = data['ssh']['forward_agent'] - end - if !data['ssh']['forward_x11'].nil? - node.ssh.forward_x11 = data['ssh']['forward_x11'] - end - if !data['vagrant']['host'].nil? - node.vagrant.host = data['vagrant']['host'].gsub(":", "").intern + config.hostmanager.ip_resolver = proc do |vm, resolving_vm| + if vm.id + `VBoxManage guestproperty get #{vm.id} "/VirtualBox/GuestInfo/Net/1/V4/IP"`.split()[1] end end end end + +# By default, the name of the VM is the project's directory name +$hostname = File.basename($root) + +Vagrant.configure("2") do |config| + + config.vm.provider :virtualbox do |v| + v.name = $hostname + v.customize [ + "modifyvm", :id, + "--name", $hostname, + "--memory", 4096, + "--cpus", 2, + ] + end + + config.vm.box = "ubuntu/trusty64" + + config.ssh.forward_agent = true + config_net(config) + + # If ansible is in your path it will provision from your HOST machine + # If ansible is not found in the path it will be instaled in the VM and provisioned from there + if which('ansible-playbook') + config.vm.provision "ansible" do |ansible| + ansible.playbook = "resources/ansible/playbook.yml" + #ansible.inventory_path = "ansible/inventories/dev" + ansible.limit = 'all' + ansible.extra_vars = { + hostname: $hostname, + postfix: { + postfix_domain: $hostname + ".vb" + } + } + end + + config.vm.provision "ansible", run: "always" do |ansible| + ansible.playbook = "resources/ansible/playbook-always.yml" + ansible.limit = 'all' + ansible.extra_vars = { + hostname: $hostname + } + end + else + config.vm.provision :shell, path: "resources/ansible/windows.sh", args: ["default"] + config.vm.provision :shell, run: "always", path: "resources/ansible/windows-always.sh", args: ["default"] + end + + config.vm.synced_folder "./", "/vagrant", type: "nfs" +end diff --git a/resources/ansible/files/authorized_keys b/resources/ansible/files/authorized_keys new file mode 100644 index 0000000000..18a9c00fd5 --- /dev/null +++ b/resources/ansible/files/authorized_keys @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key diff --git a/resources/ansible/inventories/dev b/resources/ansible/inventories/dev new file mode 100644 index 0000000000..98175f2f29 --- /dev/null +++ b/resources/ansible/inventories/dev @@ -0,0 +1,2 @@ +[phansible-web] +192.168.56.101 diff --git a/resources/ansible/playbook-always.yml b/resources/ansible/playbook-always.yml new file mode 100644 index 0000000000..85a0854121 --- /dev/null +++ b/resources/ansible/playbook-always.yml @@ -0,0 +1,7 @@ +--- +- hosts: all + sudo: true + vars_files: + - vars/all.yml + roles: + - app_reset diff --git a/resources/ansible/playbook.yml b/resources/ansible/playbook.yml new file mode 100644 index 0000000000..8e8622baa5 --- /dev/null +++ b/resources/ansible/playbook.yml @@ -0,0 +1,15 @@ +--- +- hosts: all + sudo: true + vars_files: + - vars/all.yml + roles: + - server + - vagrant_local + - nginx + - mariadb + - elasticsearch + - php + - xdebug + - composer + - app diff --git a/resources/ansible/roles/app/tasks/main.yml b/resources/ansible/roles/app/tasks/main.yml new file mode 100644 index 0000000000..79717b4011 --- /dev/null +++ b/resources/ansible/roles/app/tasks/main.yml @@ -0,0 +1,2 @@ +--- +# application tasks to be customized and to run after the main provision diff --git a/resources/ansible/roles/app_reset/tasks/main.yml b/resources/ansible/roles/app_reset/tasks/main.yml new file mode 100644 index 0000000000..ed97d539c0 --- /dev/null +++ b/resources/ansible/roles/app_reset/tasks/main.yml @@ -0,0 +1 @@ +--- diff --git a/resources/ansible/roles/composer/tasks/main.yml b/resources/ansible/roles/composer/tasks/main.yml new file mode 100644 index 0000000000..5eff546b3e --- /dev/null +++ b/resources/ansible/roles/composer/tasks/main.yml @@ -0,0 +1,2 @@ +- name: Install Composer + shell: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer creates=/usr/local/bin/composer diff --git a/resources/ansible/roles/elasticsearch/defaults/main.yml b/resources/ansible/roles/elasticsearch/defaults/main.yml new file mode 100644 index 0000000000..5be3fd70d5 --- /dev/null +++ b/resources/ansible/roles/elasticsearch/defaults/main.yml @@ -0,0 +1,2 @@ +--- +elasticsearch_url: https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-{{ elasticsearch.version }}.deb diff --git a/resources/ansible/roles/elasticsearch/tasks/main.yml b/resources/ansible/roles/elasticsearch/tasks/main.yml new file mode 100644 index 0000000000..5fafe86512 --- /dev/null +++ b/resources/ansible/roles/elasticsearch/tasks/main.yml @@ -0,0 +1,47 @@ +--- +- name: Check Elastic Search installation + shell: apt-cache policy elasticsearch | grep -Po 'Installed:\s(.*)' | cut -d' ' -f 2; + changed_when: false + register: install_status + +- name: Set installed variable + set_fact: is_installed='{{ install_status.stdout == elasticsearch.version }}' + +- name: Add dependencies repository + apt_repository: repo='ppa:webupd8team/java' update_cache=yes + +- name: Set dependencies License + shell: echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections + changed_when: false + +- name: Install Dependencies + apt: pkg=oracle-java8-installer state=latest + +- name: Download + get_url: > + url={{ elasticsearch_url }} + dest=/tmp/elasticsearch-{{ elasticsearch.version }}.deb + when: not is_installed + +- name: Install + apt: deb=/tmp/elasticsearch-{{ elasticsearch.version }}.deb + when: not is_installed + +- name: Set port + replace: > + dest="/etc/elasticsearch/elasticsearch.yml" + regexp='^#?(http\.port\:).*' + replace='\1 {{ elasticsearch.port }}' + +- name: Flush handlers to apply config changes + meta: flush_handlers + +- name: Enable Service + service: name=elasticsearch enabled=yes + +- name: Ensure Elastic Search is started + service: name=elasticsearch state=started + +- name: Remove tmp files + file: path=/tmp/elasticsearch-{{ elasticsearch.version }}.deb state=absent + when: not is_installed diff --git a/resources/ansible/roles/mariadb/tasks/main.yml b/resources/ansible/roles/mariadb/tasks/main.yml new file mode 100755 index 0000000000..9c29cc7d75 --- /dev/null +++ b/resources/ansible/roles/mariadb/tasks/main.yml @@ -0,0 +1,47 @@ +--- +# Retrieve the current hostname, because {{ ansible_hostname }} still contains the old name +- shell: hostname + register: current_hostname + +- name: Add MariaDB-Repository + sudo: yes + apt_repository: repo='deb http://mirror3.layerjet.com/mariadb/repo/10.1/ubuntu {{ ansible_distribution_release }} main' state=present + +- name: Add Key for MariaDB Repository + sudo: yes + apt_key: url=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xcbcb082a1bb943db + +- name: Update apt + sudo: yes + apt: update_cache=yes + +- name: mariadb | Install MariaDB Packages + sudo: yes + apt: pkg={{ item }} state=latest + with_items: + - mariadb-server + - python-mysqldb + +- name: mariadb | Update root password for all root accounts + mysql_user: name=root host={{ item }} check_implicit_admin=yes password={{ mariadb.root_password }} login_user=root login_password={{ mariadb.root_password }} + with_items: + - "{{ current_hostname.stdout | lower }}" + - 127.0.0.1 + - ::1 + - localhost + +- name: mariadb | Ensure anonymous users are not in the database + mysql_user: name='' host={{ item }} state=absent login_user=root login_password={{ mariadb.root_password }} + with_items: + - localhost + - "{{ current_hostname.stdout | lower }}" + +- name: mariadb | Create databases + mysql_db: name={{ mariadb.database }} state=present login_user=root login_password={{ mariadb.root_password }} + +- name: mariadb | Import dump + mysql_db: name={{ mariadb.database }} state=import login_user=root login_password={{ mariadb.root_password }} target=/vagrant/{{ mariadb.dump }} + when: mariadb.dump + +- name: mariadb | Create users + mysql_user: name={{ mariadb.user }} password={{ mariadb.password }} priv={{ mariadb.database }}.*:ALL state=present login_user=root login_password={{ mariadb.root_password }} diff --git a/resources/ansible/roles/nginx/handlers/main.yml b/resources/ansible/roles/nginx/handlers/main.yml new file mode 100644 index 0000000000..1899c9cc09 --- /dev/null +++ b/resources/ansible/roles/nginx/handlers/main.yml @@ -0,0 +1,3 @@ +--- +- name: restart nginx + service: name=nginx enabled=yes state=restarted \ No newline at end of file diff --git a/resources/ansible/roles/nginx/tasks/main.yml b/resources/ansible/roles/nginx/tasks/main.yml new file mode 100644 index 0000000000..b0371dffd8 --- /dev/null +++ b/resources/ansible/roles/nginx/tasks/main.yml @@ -0,0 +1,9 @@ +--- +- name: Install Nginx + sudo: yes + apt: pkg=nginx state=latest + +- name: Change default nginx site + sudo: yes + template: src=default.tpl dest=/etc/nginx/sites-available/default + notify: restart nginx diff --git a/resources/ansible/roles/nginx/templates/default.tpl b/resources/ansible/roles/nginx/templates/default.tpl new file mode 100644 index 0000000000..e96f47334c --- /dev/null +++ b/resources/ansible/roles/nginx/templates/default.tpl @@ -0,0 +1,27 @@ +server { + listen 80; + + root {{ nginx.docroot }}; + index index.html index.php; + + server_name {{ nginx.servername }}; + + location / { + try_files $uri $uri/ /index.php?$query_string; + } + + error_page 404 /404.html; + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/www; + } + + location ~ \.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } +} diff --git a/resources/ansible/roles/php/handlers/main.yml b/resources/ansible/roles/php/handlers/main.yml new file mode 100644 index 0000000000..915cc8a3a9 --- /dev/null +++ b/resources/ansible/roles/php/handlers/main.yml @@ -0,0 +1,3 @@ +--- +- name: restart php5-fpm + service: name=php5-fpm enabled=yes state=restarted diff --git a/resources/ansible/roles/php/tasks/configure.yml b/resources/ansible/roles/php/tasks/configure.yml new file mode 100644 index 0000000000..8683569244 --- /dev/null +++ b/resources/ansible/roles/php/tasks/configure.yml @@ -0,0 +1,19 @@ +--- +- stat: path=/etc/php5/apache2/php.ini + register: modphp + +- stat: path=/etc/php5/fpm/php.ini + register: phpfpm + +- stat: path=/etc/php5/cli/php.ini + register: phpcli + +- include: php-fpm.yml + when: phpfpm.stat.exists + +- include: php-cli.yml + when: phpcli.stat.exists + +- include: mod-php.yml + when: modphp.stat.exists + diff --git a/resources/ansible/roles/php/tasks/main.yml b/resources/ansible/roles/php/tasks/main.yml new file mode 100644 index 0000000000..1896decd4f --- /dev/null +++ b/resources/ansible/roles/php/tasks/main.yml @@ -0,0 +1,21 @@ +--- +- name: Add ppa Repository + sudo: yes + apt_repository: repo=ppa:ondrej/{{ php.ppa }} update_cache=yes + +- name: Install php5 + sudo: yes + apt: pkg=php5 state=latest + +- name: Install php5-fpm + sudo: yes + apt: pkg=php5-fpm state=latest + +- name: Install PHP Packages + sudo: yes + apt: pkg={{ item }} state=latest + with_items: php.packages + when: php.packages is defined + +- include: configure.yml +- include: pecl.yml diff --git a/resources/ansible/roles/php/tasks/mod-php.yml b/resources/ansible/roles/php/tasks/mod-php.yml new file mode 100644 index 0000000000..fc5b367cec --- /dev/null +++ b/resources/ansible/roles/php/tasks/mod-php.yml @@ -0,0 +1,10 @@ +--- +- name: ensure timezone is set in apache2 php.ini + lineinfile: dest=/etc/php5/apache2/php.ini + regexp='date.timezone =' + line='date.timezone = {{ server.timezone }}' + +- name: enabling opcache + lineinfile: dest=/etc/php5/apache2/php.ini + regexp=';?opcache.enable=\d' + line='opcache.enable=1' diff --git a/resources/ansible/roles/php/tasks/pecl.yml b/resources/ansible/roles/php/tasks/pecl.yml new file mode 100644 index 0000000000..fefc6e67a3 --- /dev/null +++ b/resources/ansible/roles/php/tasks/pecl.yml @@ -0,0 +1,26 @@ +- name: Install + apt: pkg="php5-dev" state=present + when: php.pecl_packages is defined + +- name: Install Package + shell: echo "\n\n\n\n\n\n\n\n\n" | pecl install {{ item.package }} + register: pecl_result + changed_when: "'already installed' not in pecl_result.stdout" + failed_when: "pecl_result.stderr or ('ERROR' in pecl_result.stdout)" + with_items: php.pecl_packages + when: php.pecl_packages is defined + +- name: Create extension .ini file + template: > + src="extension.tpl" + dest="/etc/php5/mods-available/{{ item.name }}.ini" + owner="root" + group="root" + mode=0644 + with_items: php.pecl_packages + when: php.pecl_packages is defined + +- name: Enable extension + shell: php5enmod {{ item.name }} + with_items: php.pecl_packages + when: php.pecl_packages is defined diff --git a/resources/ansible/roles/php/tasks/php-cli.yml b/resources/ansible/roles/php/tasks/php-cli.yml new file mode 100644 index 0000000000..8be0b633af --- /dev/null +++ b/resources/ansible/roles/php/tasks/php-cli.yml @@ -0,0 +1,10 @@ +--- +- name: ensure timezone is set in cli php.ini + lineinfile: dest=/etc/php5/cli/php.ini + regexp='date.timezone =' + line='date.timezone = {{ server.timezone }}' + +- name: enabling opcache cli + lineinfile: dest=/etc/php5/cli/php.ini + regexp=';?opcache.enable_cli=\d' + line='opcache.enable_cli=1' diff --git a/resources/ansible/roles/php/tasks/php-fpm.yml b/resources/ansible/roles/php/tasks/php-fpm.yml new file mode 100644 index 0000000000..ca7eac39f5 --- /dev/null +++ b/resources/ansible/roles/php/tasks/php-fpm.yml @@ -0,0 +1,19 @@ +--- +- name: Set permissions on socket - owner + lineinfile: "dest=/etc/php5/fpm/pool.d/www.conf state=present regexp='^;?listen.owner' line='listen.owner = www-data'" + +- name: Set permissions on socket - group + lineinfile: "dest=/etc/php5/fpm/pool.d/www.conf state=present regexp='^;?listen.group' line='listen.group = www-data'" + +- name: Set permissions on socket - mode + lineinfile: "dest=/etc/php5/fpm/pool.d/www.conf state=present regexp='^;?listen.mode' line='listen.mode = 0660'" + notify: restart php5-fpm + +- name: ensure timezone is set in fpm php.ini + lineinfile: dest=/etc/php5/fpm/php.ini + regexp='date.timezone =' + line='date.timezone = {{ server.timezone }}' +- name: enabling opcache + lineinfile: dest=/etc/php5/fpm/php.ini + regexp=';?opcache.enable=\d' + line='opcache.enable=1' diff --git a/resources/ansible/roles/php/templates/extension.tpl b/resources/ansible/roles/php/templates/extension.tpl new file mode 100644 index 0000000000..1b13534767 --- /dev/null +++ b/resources/ansible/roles/php/templates/extension.tpl @@ -0,0 +1,2 @@ +; Configuration for php PECL {{ item }} extension +extension={{ item }}.so diff --git a/resources/ansible/roles/server/tasks/main.yml b/resources/ansible/roles/server/tasks/main.yml new file mode 100644 index 0000000000..f1ffc08660 --- /dev/null +++ b/resources/ansible/roles/server/tasks/main.yml @@ -0,0 +1,31 @@ +--- +- name: Update apt + sudo: yes + apt: update_cache=yes + +- name: Install System Packages + sudo: yes + apt: pkg={{ item }} state=latest + with_items: + - curl + - wget + - python-software-properties + +- name: Install Extra Packages + sudo: yes + apt: pkg={{ item }} state=latest + with_items: server.packages + when: server.packages is defined + +- name: Configure the timezone + sudo: yes + template: src=timezone.tpl dest=/etc/timezone + +- name: More Configure the timezone + sudo: yes + file: src=/usr/share/zoneinfo/{{server.timezone}} dest=/etc/localtime state=link force=yes backup=yes + +- name: Set default system language pack + shell: locale-gen {{server.locale}} + sudo: yes + diff --git a/resources/ansible/roles/server/templates/timezone.tpl b/resources/ansible/roles/server/templates/timezone.tpl new file mode 100644 index 0000000000..cca236521e --- /dev/null +++ b/resources/ansible/roles/server/templates/timezone.tpl @@ -0,0 +1 @@ +{{server.timezone}} diff --git a/resources/ansible/roles/vagrant_local/tasks/main.yml b/resources/ansible/roles/vagrant_local/tasks/main.yml new file mode 100644 index 0000000000..cd53609cff --- /dev/null +++ b/resources/ansible/roles/vagrant_local/tasks/main.yml @@ -0,0 +1,11 @@ +--- +- name: Set the hostname in /etc/hostname + shell: echo {{ vagrant_local.vm.hostname }} > /etc/hostname + when: vagrant_local.vm.hostname is defined + +- name: Set the hostname + shell: hostname {{ vagrant_local.vm.hostname }} + when: vagrant_local.vm.hostname is defined + +- name: Update /etc/hosts + lineinfile: dest=/etc/hosts regexp='^127\.0\.0\.1' line='127.0.0.1 localhost {{ vagrant_local.vm.hostname }}' owner=root group=root mode=0644 diff --git a/resources/ansible/roles/xdebug/defaults/main.yml b/resources/ansible/roles/xdebug/defaults/main.yml new file mode 100644 index 0000000000..091dc57bf0 --- /dev/null +++ b/resources/ansible/roles/xdebug/defaults/main.yml @@ -0,0 +1,5 @@ +--- +xdebug: + settings: + remote_enable: On + remote_connect_back: On diff --git a/resources/ansible/roles/xdebug/tasks/main.yml b/resources/ansible/roles/xdebug/tasks/main.yml new file mode 100644 index 0000000000..e38815d001 --- /dev/null +++ b/resources/ansible/roles/xdebug/tasks/main.yml @@ -0,0 +1,4 @@ +--- +- name: Install xDebug + sudo: yes + apt: pkg=php5-xdebug state=latest diff --git a/resources/ansible/vars/all.yml b/resources/ansible/vars/all.yml new file mode 100644 index 0000000000..687ca0e3cf --- /dev/null +++ b/resources/ansible/vars/all.yml @@ -0,0 +1,35 @@ +--- +server: + install: '1' + packages: [vim, git, imagemagick, htop, nodejs, npm, iotop, pkg-config, libzmq3-dev] + timezone: UTC + locale: fr_FR.UTF-8 +vagrant_local: + install: '1' + vm: { base_box: trusty64, hostname: phraseanet.dev, ip: 192.168.56.101, memory: '4096', sharedfolder: ./, useVagrantCloud: '1', syncType: nfs } +nginx: + install: '1' + docroot: /vagrant + servername: master.phraseanet.vb +mariadb: + install: '1' + root_password: toor + database: ab_master + user: phraseanet + password: phraseanet + dump: '' +elasticsearch: + install: '1' + port: '9200' + version: 1.5.2 +php: + install: '1' + ppa: php5 + packages: [php5-cli, php5-intl, php5-mcrypt, php5-enchant, php5-gd, php5-imagick, php5-memcache, php5-memcached, php5-curl, php5-mysql, php5-sqlite] + pecl_packages: + - {name: zmq, package: zmq-beta} +xdebug: + install: '1' +composer: + install: '1' + diff --git a/resources/ansible/windows.sh b/resources/ansible/windows.sh new file mode 100644 index 0000000000..eab5d9a5bf --- /dev/null +++ b/resources/ansible/windows.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# Update Repositories +sudo apt-get update + +# Determine Ubuntu Version +. /etc/lsb-release + +# Decide on package to install for `add-apt-repository` command +# +# USE_COMMON=1 when using a distribution over 12.04 +# USE_COMMON=0 when using a distribution at 12.04 or older +USE_COMMON=$(echo "$DISTRIB_RELEASE > 12.04" | bc) + +if [ "$USE_COMMON" -eq "1" ]; +then + sudo apt-get install -y software-properties-common +else + sudo apt-get install -y python-software-properties +fi + +# Add Ansible Repository & Install Ansible +sudo add-apt-repository -y ppa:ansible/ansible +sudo apt-get update +sudo apt-get install -y ansible + +# Setup Ansible for Local Use and Run +cp /vagrant/ansible/inventories/dev /etc/ansible/hosts -f +chmod 666 /etc/ansible/hosts +cat /vagrant/ansible/files/authorized_keys >> /home/vagrant/.ssh/authorized_keys +sudo ansible-playbook /vagrant/ansible/playbook.yml -e hostname=$1 --connection=local \ No newline at end of file From f1dccd0632efba38e8bf53347dffa7e84610ad2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 26 Nov 2015 17:26:22 +0100 Subject: [PATCH 002/383] WIP ansible --- Vagrantfile | 17 ++++++----- resources/ansible/inventories/dev | 2 -- resources/ansible/playbook.yml | 1 + .../roles/mailcatcher/defaults/main.yml | 2 ++ .../ansible/roles/mailcatcher/tasks/main.yml | 0 .../ansible/roles/mariadb/tasks/main.yml | 4 ++- resources/ansible/roles/nginx/tasks/main.yml | 2 +- .../templates/{default.tpl => default.j2} | 2 +- .../ansible/roles/php/templates/extension.tpl | 4 +-- resources/ansible/roles/server/tasks/main.yml | 5 ++-- .../templates/{timezone.tpl => timezone.j2} | 0 .../roles/vagrant_local/tasks/main.yml | 3 +- resources/ansible/vars/all.yml | 28 +++++++++++++++---- 13 files changed, 48 insertions(+), 22 deletions(-) delete mode 100644 resources/ansible/inventories/dev create mode 100644 resources/ansible/roles/mailcatcher/defaults/main.yml create mode 100644 resources/ansible/roles/mailcatcher/tasks/main.yml rename resources/ansible/roles/nginx/templates/{default.tpl => default.j2} (93%) rename resources/ansible/roles/server/templates/{timezone.tpl => timezone.j2} (100%) diff --git a/Vagrantfile b/Vagrantfile index 13e86e0675..d0e96206eb 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -20,11 +20,6 @@ def which(cmd) end def config_net(config) - # Configure hostmanager - config.hostmanager.enabled = true - config.hostmanager.manage_host = true - config.hostmanager.ignore_private_ip = false - config.hostmanager.include_offline = true config.hostmanager.aliases = [ $hostname + ".vb", "www." + $hostname + ".vb", @@ -52,10 +47,18 @@ def config_net(config) end # By default, the name of the VM is the project's directory name -$hostname = File.basename($root) +$hostname = File.basename($root).downcase Vagrant.configure("2") do |config| + # Configure hostmanager + config.hostmanager.enabled = true + config.hostmanager.manage_host = true + config.hostmanager.ignore_private_ip = false + config.hostmanager.include_offline = true + + config.vm.hostname = $hostname + config.vm.provider :virtualbox do |v| v.name = $hostname v.customize [ @@ -76,8 +79,8 @@ Vagrant.configure("2") do |config| if which('ansible-playbook') config.vm.provision "ansible" do |ansible| ansible.playbook = "resources/ansible/playbook.yml" - #ansible.inventory_path = "ansible/inventories/dev" ansible.limit = 'all' + ansible.verbose = 'v' ansible.extra_vars = { hostname: $hostname, postfix: { diff --git a/resources/ansible/inventories/dev b/resources/ansible/inventories/dev deleted file mode 100644 index 98175f2f29..0000000000 --- a/resources/ansible/inventories/dev +++ /dev/null @@ -1,2 +0,0 @@ -[phansible-web] -192.168.56.101 diff --git a/resources/ansible/playbook.yml b/resources/ansible/playbook.yml index 8e8622baa5..4c0d445c92 100644 --- a/resources/ansible/playbook.yml +++ b/resources/ansible/playbook.yml @@ -13,3 +13,4 @@ - xdebug - composer - app + - mailcatcher diff --git a/resources/ansible/roles/mailcatcher/defaults/main.yml b/resources/ansible/roles/mailcatcher/defaults/main.yml new file mode 100644 index 0000000000..51a1d6302b --- /dev/null +++ b/resources/ansible/roles/mailcatcher/defaults/main.yml @@ -0,0 +1,2 @@ +--- +mailcatcher_gem: mailcatcher diff --git a/resources/ansible/roles/mailcatcher/tasks/main.yml b/resources/ansible/roles/mailcatcher/tasks/main.yml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/resources/ansible/roles/mariadb/tasks/main.yml b/resources/ansible/roles/mariadb/tasks/main.yml index 9c29cc7d75..d69ae8e10c 100755 --- a/resources/ansible/roles/mariadb/tasks/main.yml +++ b/resources/ansible/roles/mariadb/tasks/main.yml @@ -5,7 +5,8 @@ - name: Add MariaDB-Repository sudo: yes - apt_repository: repo='deb http://mirror3.layerjet.com/mariadb/repo/10.1/ubuntu {{ ansible_distribution_release }} main' state=present + apt_repository: repo='deb http://mirror6.layerjet.com/mariadb/repo/10.1/ubuntu {{ ansible_distribution_release }} main' state=present + register: mariadb_repository - name: Add Key for MariaDB Repository sudo: yes @@ -14,6 +15,7 @@ - name: Update apt sudo: yes apt: update_cache=yes + when: mariadb_repository.changed - name: mariadb | Install MariaDB Packages sudo: yes diff --git a/resources/ansible/roles/nginx/tasks/main.yml b/resources/ansible/roles/nginx/tasks/main.yml index b0371dffd8..f0f27210d1 100644 --- a/resources/ansible/roles/nginx/tasks/main.yml +++ b/resources/ansible/roles/nginx/tasks/main.yml @@ -5,5 +5,5 @@ - name: Change default nginx site sudo: yes - template: src=default.tpl dest=/etc/nginx/sites-available/default + template: src=default.j2 dest=/etc/nginx/sites-available/default notify: restart nginx diff --git a/resources/ansible/roles/nginx/templates/default.tpl b/resources/ansible/roles/nginx/templates/default.j2 similarity index 93% rename from resources/ansible/roles/nginx/templates/default.tpl rename to resources/ansible/roles/nginx/templates/default.j2 index e96f47334c..df4f026d62 100644 --- a/resources/ansible/roles/nginx/templates/default.tpl +++ b/resources/ansible/roles/nginx/templates/default.j2 @@ -4,7 +4,7 @@ server { root {{ nginx.docroot }}; index index.html index.php; - server_name {{ nginx.servername }}; + server_name {{ nginx|to_yaml }}; location / { try_files $uri $uri/ /index.php?$query_string; diff --git a/resources/ansible/roles/php/templates/extension.tpl b/resources/ansible/roles/php/templates/extension.tpl index 1b13534767..69a98af630 100644 --- a/resources/ansible/roles/php/templates/extension.tpl +++ b/resources/ansible/roles/php/templates/extension.tpl @@ -1,2 +1,2 @@ -; Configuration for php PECL {{ item }} extension -extension={{ item }}.so +; Configuration for php PECL {{ item.name }} extension +extension={{ item.name }}.so diff --git a/resources/ansible/roles/server/tasks/main.yml b/resources/ansible/roles/server/tasks/main.yml index f1ffc08660..56d8425377 100644 --- a/resources/ansible/roles/server/tasks/main.yml +++ b/resources/ansible/roles/server/tasks/main.yml @@ -2,6 +2,7 @@ - name: Update apt sudo: yes apt: update_cache=yes + when: server.prevent_update is defined - name: Install System Packages sudo: yes @@ -19,13 +20,13 @@ - name: Configure the timezone sudo: yes - template: src=timezone.tpl dest=/etc/timezone + template: src=timezone.j2 dest=/etc/timezone - name: More Configure the timezone sudo: yes file: src=/usr/share/zoneinfo/{{server.timezone}} dest=/etc/localtime state=link force=yes backup=yes - name: Set default system language pack - shell: locale-gen {{server.locale}} + shell: locale-gen {{server.locales|join(' ')}} sudo: yes diff --git a/resources/ansible/roles/server/templates/timezone.tpl b/resources/ansible/roles/server/templates/timezone.j2 similarity index 100% rename from resources/ansible/roles/server/templates/timezone.tpl rename to resources/ansible/roles/server/templates/timezone.j2 diff --git a/resources/ansible/roles/vagrant_local/tasks/main.yml b/resources/ansible/roles/vagrant_local/tasks/main.yml index cd53609cff..619c3b4260 100644 --- a/resources/ansible/roles/vagrant_local/tasks/main.yml +++ b/resources/ansible/roles/vagrant_local/tasks/main.yml @@ -8,4 +8,5 @@ when: vagrant_local.vm.hostname is defined - name: Update /etc/hosts - lineinfile: dest=/etc/hosts regexp='^127\.0\.0\.1' line='127.0.0.1 localhost {{ vagrant_local.vm.hostname }}' owner=root group=root mode=0644 + lineinfile: dest=/etc/hosts regexp='^127\.0\.0\.1' line='127.0.0.1 localhost {{ vagrant_local.vm.hostname|default('') }}' owner=root group=root mode=0644 + when: vagrant_local.vm.hostname is defined diff --git a/resources/ansible/vars/all.yml b/resources/ansible/vars/all.yml index 687ca0e3cf..527ec6274f 100644 --- a/resources/ansible/vars/all.yml +++ b/resources/ansible/vars/all.yml @@ -1,16 +1,34 @@ --- server: install: '1' - packages: [vim, git, imagemagick, htop, nodejs, npm, iotop, pkg-config, libzmq3-dev] + packages: + - vim + - git + - imagemagick + - htop + - nodejs + - npm + - iotop + - pkg-config + - libzmq3-dev + - supervisor timezone: UTC - locale: fr_FR.UTF-8 + locales: + - en_GB.UTF-8 + - fr_FR.UTF-8 + - de_DE.UTF-8 + - nl_NL.UTF-8 vagrant_local: install: '1' - vm: { base_box: trusty64, hostname: phraseanet.dev, ip: 192.168.56.101, memory: '4096', sharedfolder: ./, useVagrantCloud: '1', syncType: nfs } + vm: + base_box: trusty64 + memory: '4096' + sharedfolder: ./ + useVagrantCloud: '1' + syncType: nfs nginx: install: '1' docroot: /vagrant - servername: master.phraseanet.vb mariadb: install: '1' root_password: toor @@ -21,7 +39,7 @@ mariadb: elasticsearch: install: '1' port: '9200' - version: 1.5.2 + version: '1.7.3' php: install: '1' ppa: php5 From 43997f93729f5381476740f4f82cb94a44e4fd36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Fri, 27 Nov 2015 14:44:55 +0100 Subject: [PATCH 003/383] Add mailcatcher handling --- resources/ansible/playbook.yml | 2 +- .../roles/mailcatcher/defaults/main.yml | 6 +++++ .../roles/mailcatcher/handlers/main.yml | 3 +++ .../ansible/roles/mailcatcher/tasks/main.yml | 14 ++++++++++ .../templates/program_mailcatcher.conf.j2 | 9 +++++++ resources/ansible/vars/all.yml | 26 ++++++++++++------- 6 files changed, 49 insertions(+), 11 deletions(-) create mode 100644 resources/ansible/roles/mailcatcher/handlers/main.yml create mode 100644 resources/ansible/roles/mailcatcher/templates/program_mailcatcher.conf.j2 diff --git a/resources/ansible/playbook.yml b/resources/ansible/playbook.yml index 4c0d445c92..9690635c98 100644 --- a/resources/ansible/playbook.yml +++ b/resources/ansible/playbook.yml @@ -12,5 +12,5 @@ - php - xdebug - composer - - app - mailcatcher + - app diff --git a/resources/ansible/roles/mailcatcher/defaults/main.yml b/resources/ansible/roles/mailcatcher/defaults/main.yml index 51a1d6302b..506313630a 100644 --- a/resources/ansible/roles/mailcatcher/defaults/main.yml +++ b/resources/ansible/roles/mailcatcher/defaults/main.yml @@ -1,2 +1,8 @@ --- mailcatcher_gem: mailcatcher +mailcatcher_user: mailcatcher +mailcatcher_smtp_ip: '0.0.0.0' +mailcatcher_smtp_port: '1025' +mailcatcher_http_ip: '0.0.0.0' +mailcatcher_http_port: '1080' +mailcatcher_log_path: '/var/log/mailcatcher' diff --git a/resources/ansible/roles/mailcatcher/handlers/main.yml b/resources/ansible/roles/mailcatcher/handlers/main.yml new file mode 100644 index 0000000000..7896536693 --- /dev/null +++ b/resources/ansible/roles/mailcatcher/handlers/main.yml @@ -0,0 +1,3 @@ +--- +- name: restart mailcatcher + supervisorctl: name=mailcatcher state=restarted diff --git a/resources/ansible/roles/mailcatcher/tasks/main.yml b/resources/ansible/roles/mailcatcher/tasks/main.yml index e69de29bb2..bfc615e947 100644 --- a/resources/ansible/roles/mailcatcher/tasks/main.yml +++ b/resources/ansible/roles/mailcatcher/tasks/main.yml @@ -0,0 +1,14 @@ +--- +- name: Create mailcatcher user + user: name={{ mailcatcher_user }} comment='Mailcatcher Mock Smtp Service User' home='/var/spool/mailcatcher' shell='/bin/true' + +- name: Create mailcatcher log directory + file: path={{ mailcatcher_log_path }} owner=mailcatcher mode=0755 state=directory + +- name: Install Mailcatcher + gem: name={{ mailcatcher_gem }} user_install=no state=latest + notify: restart mailcatcher + +- name: Install mailcatcher supervisord conf + template: src='program_mailcatcher.conf.j2' dest='/etc/supervisor/conf.d/program_mailcatcher.conf' + notify: restart mailcatcher diff --git a/resources/ansible/roles/mailcatcher/templates/program_mailcatcher.conf.j2 b/resources/ansible/roles/mailcatcher/templates/program_mailcatcher.conf.j2 new file mode 100644 index 0000000000..bc70b6502c --- /dev/null +++ b/resources/ansible/roles/mailcatcher/templates/program_mailcatcher.conf.j2 @@ -0,0 +1,9 @@ +[program:mailcatcher] +command=/usr/local/bin/mailcatcher --http-ip {{ mailcatcher_http_ip }} --http-port {{ mailcatcher_http_port }} --smtp-ip {{ mailcatcher_smtp_ip }} --smtp-port {{ mailcatcher_smtp_port }} -f +priority=100 +autostart=true +autorestart=true +user={{ mailcatcher_user }} +stdout_logfile={{ mailcatcher_log_path }}/program_mailcatcher.log +stderr_logfile={{ mailcatcher_log_path }}/program_mailcatcher.error +environment=PATH='/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin' diff --git a/resources/ansible/vars/all.yml b/resources/ansible/vars/all.yml index 527ec6274f..9caea9f7bd 100644 --- a/resources/ansible/vars/all.yml +++ b/resources/ansible/vars/all.yml @@ -2,16 +2,19 @@ server: install: '1' packages: - - vim - - git - - imagemagick - - htop - - nodejs - - npm - - iotop - - pkg-config - - libzmq3-dev - - supervisor + - vim + - git + - imagemagick + - htop + - nodejs + - npm + - iotop + - pkg-config + - libzmq3-dev + - supervisor + - ruby-dev + - sqlite3 + - libsqlite3-dev timezone: UTC locales: - en_GB.UTF-8 @@ -51,3 +54,6 @@ xdebug: composer: install: '1' +mailcatcher: + install: '1' + From 0cd1fb6117c90f98c8d716bba6be853ae8647cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 1 Dec 2015 11:47:09 +0100 Subject: [PATCH 004/383] Add bower, recess, elasticsearch icu plugin. --- resources/ansible/roles/app/tasks/main.yml | 2 ++ resources/ansible/roles/elasticsearch/tasks/main.yml | 7 +++++++ resources/ansible/vars/all.yml | 3 +++ 3 files changed, 12 insertions(+) diff --git a/resources/ansible/roles/app/tasks/main.yml b/resources/ansible/roles/app/tasks/main.yml index 79717b4011..b9ba605b14 100644 --- a/resources/ansible/roles/app/tasks/main.yml +++ b/resources/ansible/roles/app/tasks/main.yml @@ -1,2 +1,4 @@ --- # application tasks to be customized and to run after the main provision +- name: Install global npm packages + shell: npm install -g bower recess diff --git a/resources/ansible/roles/elasticsearch/tasks/main.yml b/resources/ansible/roles/elasticsearch/tasks/main.yml index 5fafe86512..9651ac6ce9 100644 --- a/resources/ansible/roles/elasticsearch/tasks/main.yml +++ b/resources/ansible/roles/elasticsearch/tasks/main.yml @@ -27,6 +27,13 @@ apt: deb=/tmp/elasticsearch-{{ elasticsearch.version }}.deb when: not is_installed +- name: Install plugins + become: yes + become_user: elasticsearch + shell: /usr/share/elasticsearch/bin/plugin install {{ item.name }}/{{ item.version }} + when: not is_installed + with_items: "{{ elasticsearch.plugins }}" + - name: Set port replace: > dest="/etc/elasticsearch/elasticsearch.yml" diff --git a/resources/ansible/vars/all.yml b/resources/ansible/vars/all.yml index 9caea9f7bd..97991f622b 100644 --- a/resources/ansible/vars/all.yml +++ b/resources/ansible/vars/all.yml @@ -15,6 +15,7 @@ server: - ruby-dev - sqlite3 - libsqlite3-dev + - memcached timezone: UTC locales: - en_GB.UTF-8 @@ -43,6 +44,8 @@ elasticsearch: install: '1' port: '9200' version: '1.7.3' + plugins: + - {name: 'elasticsearch/elasticsearch-analysis-icu', version: '2.6.0'} php: install: '1' ppa: php5 From 05dbeb35ee97edc530674a3dc711ee80dddf1906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 1 Dec 2015 12:49:46 +0100 Subject: [PATCH 005/383] Add session_limiter option --- resources/ansible/roles/php/tasks/mod-php.yml | 5 +++++ resources/ansible/roles/php/tasks/php-cli.yml | 5 +++++ resources/ansible/roles/php/tasks/php-fpm.yml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/resources/ansible/roles/php/tasks/mod-php.yml b/resources/ansible/roles/php/tasks/mod-php.yml index fc5b367cec..9a994cda3b 100644 --- a/resources/ansible/roles/php/tasks/mod-php.yml +++ b/resources/ansible/roles/php/tasks/mod-php.yml @@ -8,3 +8,8 @@ lineinfile: dest=/etc/php5/apache2/php.ini regexp=';?opcache.enable=\d' line='opcache.enable=1' + +- name: Disable PHP cache limiter + lineinfile: dest=/etc/php5/apache2/php.ini + regexp='^\(session.cache_limiter = \).*' + line='session.cache_limiter = ""' diff --git a/resources/ansible/roles/php/tasks/php-cli.yml b/resources/ansible/roles/php/tasks/php-cli.yml index 8be0b633af..dd41e417b4 100644 --- a/resources/ansible/roles/php/tasks/php-cli.yml +++ b/resources/ansible/roles/php/tasks/php-cli.yml @@ -8,3 +8,8 @@ lineinfile: dest=/etc/php5/cli/php.ini regexp=';?opcache.enable_cli=\d' line='opcache.enable_cli=1' + +- name: Disable PHP cache limiter + lineinfile: dest=/etc/php5/cli/php.ini + regexp='^\(session.cache_limiter = \).*' + line='session.cache_limiter = ""' diff --git a/resources/ansible/roles/php/tasks/php-fpm.yml b/resources/ansible/roles/php/tasks/php-fpm.yml index ca7eac39f5..0e48d05c40 100644 --- a/resources/ansible/roles/php/tasks/php-fpm.yml +++ b/resources/ansible/roles/php/tasks/php-fpm.yml @@ -17,3 +17,8 @@ lineinfile: dest=/etc/php5/fpm/php.ini regexp=';?opcache.enable=\d' line='opcache.enable=1' + +- name: Disable PHP cache limiter + lineinfile: dest=/etc/php5/fpm/php.ini + regexp='^\(session.cache_limiter = \).*' + line='session.cache_limiter = ""' From 4d9b975ae288f865b9e49a55460f14f869c0719f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 1 Dec 2015 15:19:19 +0100 Subject: [PATCH 006/383] Change node install method --- resources/ansible/playbook.yml | 1 + resources/ansible/roles/app/tasks/main.yml | 2 +- resources/ansible/roles/node/tasks/main.yml | 6 ++++++ resources/ansible/roles/php/tasks/mod-php.yml | 2 +- resources/ansible/roles/php/tasks/php-cli.yml | 2 +- resources/ansible/roles/php/tasks/php-fpm.yml | 2 +- resources/ansible/vars/all.yml | 4 ++-- 7 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 resources/ansible/roles/node/tasks/main.yml diff --git a/resources/ansible/playbook.yml b/resources/ansible/playbook.yml index 9690635c98..7a8d4d5ce8 100644 --- a/resources/ansible/playbook.yml +++ b/resources/ansible/playbook.yml @@ -13,4 +13,5 @@ - xdebug - composer - mailcatcher + - node - app diff --git a/resources/ansible/roles/app/tasks/main.yml b/resources/ansible/roles/app/tasks/main.yml index b9ba605b14..5b81cc12f0 100644 --- a/resources/ansible/roles/app/tasks/main.yml +++ b/resources/ansible/roles/app/tasks/main.yml @@ -1,4 +1,4 @@ --- # application tasks to be customized and to run after the main provision - name: Install global npm packages - shell: npm install -g bower recess + shell: . /usr/local/nvm/nvm.sh && npm install -g bower recess diff --git a/resources/ansible/roles/node/tasks/main.yml b/resources/ansible/roles/node/tasks/main.yml new file mode 100644 index 0000000000..f9a30ee117 --- /dev/null +++ b/resources/ansible/roles/node/tasks/main.yml @@ -0,0 +1,6 @@ +--- +- name: Install NVM + shell: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | NVM_DIR=/usr/local/nvm /bin/bash creates=/usr/local/nvm + +- name: Install specific nodejs version + shell: . /usr/local/nvm/nvm.sh && nvm install 0.12.0 && nvm alias default 0.12.0 diff --git a/resources/ansible/roles/php/tasks/mod-php.yml b/resources/ansible/roles/php/tasks/mod-php.yml index 9a994cda3b..c7041854f5 100644 --- a/resources/ansible/roles/php/tasks/mod-php.yml +++ b/resources/ansible/roles/php/tasks/mod-php.yml @@ -11,5 +11,5 @@ - name: Disable PHP cache limiter lineinfile: dest=/etc/php5/apache2/php.ini - regexp='^\(session.cache_limiter = \).*' + regexp=';?\s*session.cache_limiter\s*=\s*' line='session.cache_limiter = ""' diff --git a/resources/ansible/roles/php/tasks/php-cli.yml b/resources/ansible/roles/php/tasks/php-cli.yml index dd41e417b4..3d18122eeb 100644 --- a/resources/ansible/roles/php/tasks/php-cli.yml +++ b/resources/ansible/roles/php/tasks/php-cli.yml @@ -11,5 +11,5 @@ - name: Disable PHP cache limiter lineinfile: dest=/etc/php5/cli/php.ini - regexp='^\(session.cache_limiter = \).*' + regexp=';?\s*session.cache_limiter\s*=\s*' line='session.cache_limiter = ""' diff --git a/resources/ansible/roles/php/tasks/php-fpm.yml b/resources/ansible/roles/php/tasks/php-fpm.yml index 0e48d05c40..de9d87dee5 100644 --- a/resources/ansible/roles/php/tasks/php-fpm.yml +++ b/resources/ansible/roles/php/tasks/php-fpm.yml @@ -20,5 +20,5 @@ - name: Disable PHP cache limiter lineinfile: dest=/etc/php5/fpm/php.ini - regexp='^\(session.cache_limiter = \).*' + regexp=';?\s*session.cache_limiter\s*=\s*' line='session.cache_limiter = ""' diff --git a/resources/ansible/vars/all.yml b/resources/ansible/vars/all.yml index 97991f622b..3d82264479 100644 --- a/resources/ansible/vars/all.yml +++ b/resources/ansible/vars/all.yml @@ -6,8 +6,6 @@ server: - git - imagemagick - htop - - nodejs - - npm - iotop - pkg-config - libzmq3-dev @@ -16,6 +14,8 @@ server: - sqlite3 - libsqlite3-dev - memcached + - build-essential + - libssl-dev timezone: UTC locales: - en_GB.UTF-8 From 46e3156cbe68382b3e0a78d8eee0598e93c172d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 1 Dec 2015 16:16:27 +0100 Subject: [PATCH 007/383] Configure nginx and php for phraseanet --- .../ansible/roles/nginx/templates/default.j2 | 25 +++++++++++++------ resources/ansible/roles/php/tasks/mod-php.yml | 15 +++++++++++ resources/ansible/roles/php/tasks/php-cli.yml | 15 +++++++++++ resources/ansible/roles/php/tasks/php-fpm.yml | 15 +++++++++++ 4 files changed, 62 insertions(+), 8 deletions(-) diff --git a/resources/ansible/roles/nginx/templates/default.j2 b/resources/ansible/roles/nginx/templates/default.j2 index df4f026d62..37be89beb0 100644 --- a/resources/ansible/roles/nginx/templates/default.j2 +++ b/resources/ansible/roles/nginx/templates/default.j2 @@ -4,24 +4,33 @@ server { root {{ nginx.docroot }}; index index.html index.php; - server_name {{ nginx|to_yaml }}; + server_name dev.phraseanet.vb; + + location @rewriteapp { + root {{ nginx.docroot }}/www; + index index.html index.htm index.php; + rewrite ^(.*)$ /index.php/$1 last; + } location / { - try_files $uri $uri/ /index.php?$query_string; + root {{ nginx.docroot }}/www; + try_files $uri $uri/ @rewriteapp; } - error_page 404 /404.html; - - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/www; + location /api { + root {{ nginx.docroot }}/www; + rewrite ^(.*)$ /api.php/$1 last; } - location ~ \.php$ { + location ~ ^/(index|index_dev|api)\.php(/|$) { + root {{ nginx.docroot }}/www; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } + + sendfile off; + client_max_body_size 2g; } diff --git a/resources/ansible/roles/php/tasks/mod-php.yml b/resources/ansible/roles/php/tasks/mod-php.yml index c7041854f5..1a53bccf58 100644 --- a/resources/ansible/roles/php/tasks/mod-php.yml +++ b/resources/ansible/roles/php/tasks/mod-php.yml @@ -13,3 +13,18 @@ lineinfile: dest=/etc/php5/apache2/php.ini regexp=';?\s*session.cache_limiter\s*=\s*' line='session.cache_limiter = ""' + +- name: set post_max_size + lineinfile: dest=/etc/php5/apache2/php.ini + regexp=';?post_max_size\s*=\s*' + line='post_max_size = 2G' + +- name: set upload_max_filesize + lineinfile: dest=/etc/php5/apache2/php.ini + regexp=';?upload_max_filesize\s*=\s*' + line='upload_max_filesize = 2G' + +- name: set max_input_vars + lineinfile: dest=/etc/php5/apache2/php.ini + regexp=';?max_input_vars\s*=\s*' + line='max_input_vars = 12000' diff --git a/resources/ansible/roles/php/tasks/php-cli.yml b/resources/ansible/roles/php/tasks/php-cli.yml index 3d18122eeb..5f9a756dfb 100644 --- a/resources/ansible/roles/php/tasks/php-cli.yml +++ b/resources/ansible/roles/php/tasks/php-cli.yml @@ -13,3 +13,18 @@ lineinfile: dest=/etc/php5/cli/php.ini regexp=';?\s*session.cache_limiter\s*=\s*' line='session.cache_limiter = ""' + +- name: set post_max_size + lineinfile: dest=/etc/php5/cli/php.ini + regexp=';?post_max_size\s*=\s*' + line='post_max_size = 2G' + +- name: set upload_max_filesize + lineinfile: dest=/etc/php5/cli/php.ini + regexp=';?upload_max_filesize\s*=\s*' + line='upload_max_filesize = 2G' + +- name: set max_input_vars + lineinfile: dest=/etc/php5/cli/php.ini + regexp=';?max_input_vars\s*=\s*' + line='max_input_vars = 12000' diff --git a/resources/ansible/roles/php/tasks/php-fpm.yml b/resources/ansible/roles/php/tasks/php-fpm.yml index de9d87dee5..adad53e250 100644 --- a/resources/ansible/roles/php/tasks/php-fpm.yml +++ b/resources/ansible/roles/php/tasks/php-fpm.yml @@ -22,3 +22,18 @@ lineinfile: dest=/etc/php5/fpm/php.ini regexp=';?\s*session.cache_limiter\s*=\s*' line='session.cache_limiter = ""' + +- name: set post_max_size + lineinfile: dest=/etc/php5/fpm/php.ini + regexp=';?post_max_size\s*=\s*' + line='post_max_size = 2G' + +- name: set upload_max_filesize + lineinfile: dest=/etc/php5/fpm/php.ini + regexp=';?upload_max_filesize\s*=\s*' + line='upload_max_filesize = 2G' + +- name: set max_input_vars + lineinfile: dest=/etc/php5/fpm/php.ini + regexp=';?max_input_vars\s*=\s*' + line='max_input_vars = 12000' From a9680ae72e9013630680125f2320e6338e545c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 1 Dec 2015 16:27:28 +0100 Subject: [PATCH 008/383] Add www/dev nginx vhosts --- .../ansible/roles/nginx/templates/default.j2 | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/resources/ansible/roles/nginx/templates/default.j2 b/resources/ansible/roles/nginx/templates/default.j2 index 37be89beb0..cfd0d9543d 100644 --- a/resources/ansible/roles/nginx/templates/default.j2 +++ b/resources/ansible/roles/nginx/templates/default.j2 @@ -4,7 +4,44 @@ server { root {{ nginx.docroot }}; index index.html index.php; - server_name dev.phraseanet.vb; + server_name dev.{{ hostname }}.vb; + + location @rewriteapp { + root {{ nginx.docroot }}/www; + index index.html index.htm index.php; + rewrite ^(.*)$ /index_dev.php/$1 last; + } + + location / { + root {{ nginx.docroot }}/www; + try_files $uri $uri/ @rewriteapp; + } + + location /api { + root {{ nginx.docroot }}/www; + rewrite ^(.*)$ /api.php/$1 last; + } + + location ~ ^/(index|index_dev|api)\.php(/|$) { + root {{ nginx.docroot }}/www; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + + sendfile off; + client_max_body_size 2g; +} + +server { + listen 80; + + root {{ nginx.docroot }}; + index index.html index.php; + + server_name www.{{ hostname }}.vb; location @rewriteapp { root {{ nginx.docroot }}/www; From 7675d488e074ae4d0a309819b6d1f00f9c20863d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 1 Dec 2015 17:28:51 +0100 Subject: [PATCH 009/383] Add PATH to nginx configurations --- resources/ansible/roles/nginx/templates/default.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/ansible/roles/nginx/templates/default.j2 b/resources/ansible/roles/nginx/templates/default.j2 index cfd0d9543d..e0d224afc4 100644 --- a/resources/ansible/roles/nginx/templates/default.j2 +++ b/resources/ansible/roles/nginx/templates/default.j2 @@ -28,6 +28,7 @@ server { fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH /usr/local/bin:/usr/bin:/bin; include fastcgi_params; } @@ -65,6 +66,7 @@ server { fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH /usr/local/bin:/usr/bin:/bin; include fastcgi_params; } From 5185ff05d976dc0f9314f9f9e66691b9291b1c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 1 Dec 2015 17:30:46 +0100 Subject: [PATCH 010/383] Remove now useless puphpet files --- .../puphpet/config.yaml | 322 --- .../puphpet/files/dot/.bash_aliases | 55 - .../puphpet/files/dot/.bash_git | 491 ----- .../puphpet/files/dot/.vimrc | 414 ---- .../puphpet/files/dot/ssh/.gitignore | 3 - .../files/dot/ssh/insecure_private_key | 27 - .../puphpet/files/exec-always/.gitkeep | 0 .../puphpet/files/exec-always/setup | 6 - .../puphpet/files/exec-once/.gitkeep | 0 .../puphpet/files/exec-once/setup | 130 -- .../puphpet/files/startup-always/.gitkeep | 0 .../puphpet/files/startup-once/.gitkeep | 0 .../puphpet/puppet/Puppetfile | 27 - .../puphpet/puppet/hiera.yaml | 7 - .../puphpet/puppet/manifest.pp | 1813 --------------- .../puppet/modules/apache/.fixtures.yml | 6 - .../puppet/modules/apache/.nodeset.yml | 31 - .../puppet/modules/apache/.puppet-lint.rc | 5 - .../puphpet/puppet/modules/apache/.travis.yml | 32 - .../puppet/modules/apache/CHANGELOG.md | 246 --- .../puppet/modules/apache/CONTRIBUTING.md | 234 -- .../puphpet/puppet/modules/apache/Gemfile | 26 - .../puphpet/puppet/modules/apache/LICENSE | 15 - .../puphpet/puppet/modules/apache/Modulefile | 12 - .../puphpet/puppet/modules/apache/README.md | 1958 ----------------- .../puppet/modules/apache/README.passenger.md | 278 --- .../puphpet/puppet/modules/apache/Rakefile | 10 - .../puphpet/puppet/modules/apache/files/httpd | 24 - .../apache/lib/puppet/provider/a2mod.rb | 34 - .../apache/lib/puppet/provider/a2mod/a2mod.rb | 35 - .../lib/puppet/provider/a2mod/gentoo.rb | 116 - .../lib/puppet/provider/a2mod/modfix.rb | 12 - .../lib/puppet/provider/a2mod/redhat.rb | 60 - .../modules/apache/lib/puppet/type/a2mod.rb | 30 - .../modules/apache/manifests/balancer.pp | 83 - .../apache/manifests/balancermember.pp | 53 - .../modules/apache/manifests/confd/no_accf.pp | 10 - .../apache/manifests/default_confd_files.pp | 15 - .../modules/apache/manifests/default_mods.pp | 158 -- .../apache/manifests/default_mods/load.pp | 8 - .../puppet/modules/apache/manifests/dev.pp | 11 - .../puppet/modules/apache/manifests/init.pp | 340 --- .../puppet/modules/apache/manifests/listen.pp | 10 - .../puppet/modules/apache/manifests/mod.pp | 130 -- .../modules/apache/manifests/mod/actions.pp | 3 - .../modules/apache/manifests/mod/alias.pp | 19 - .../apache/manifests/mod/auth_basic.pp | 3 - .../modules/apache/manifests/mod/auth_kerb.pp | 5 - .../apache/manifests/mod/authnz_ldap.pp | 19 - .../modules/apache/manifests/mod/autoindex.pp | 12 - .../modules/apache/manifests/mod/cache.pp | 3 - .../modules/apache/manifests/mod/cgi.pp | 4 - .../modules/apache/manifests/mod/cgid.pp | 23 - .../modules/apache/manifests/mod/dav.pp | 3 - .../modules/apache/manifests/mod/dav_fs.pp | 20 - .../modules/apache/manifests/mod/dav_svn.pp | 14 - .../modules/apache/manifests/mod/deflate.pp | 12 - .../modules/apache/manifests/mod/dev.pp | 5 - .../modules/apache/manifests/mod/dir.pp | 21 - .../apache/manifests/mod/disk_cache.pp | 24 - .../modules/apache/manifests/mod/event.pp | 62 - .../modules/apache/manifests/mod/expires.pp | 3 - .../modules/apache/manifests/mod/fastcgi.pp | 24 - .../modules/apache/manifests/mod/fcgid.pp | 16 - .../modules/apache/manifests/mod/headers.pp | 3 - .../modules/apache/manifests/mod/include.pp | 3 - .../modules/apache/manifests/mod/info.pp | 17 - .../modules/apache/manifests/mod/itk.pp | 53 - .../modules/apache/manifests/mod/ldap.pp | 14 - .../modules/apache/manifests/mod/mime.pp | 21 - .../apache/manifests/mod/mime_magic.pp | 14 - .../apache/manifests/mod/negotiation.pp | 12 - .../modules/apache/manifests/mod/nss.pp | 25 - .../modules/apache/manifests/mod/pagespeed.pp | 55 - .../modules/apache/manifests/mod/passenger.pp | 86 - .../modules/apache/manifests/mod/perl.pp | 3 - .../modules/apache/manifests/mod/peruser.pp | 73 - .../modules/apache/manifests/mod/php.pp | 55 - .../modules/apache/manifests/mod/prefork.pp | 70 - .../modules/apache/manifests/mod/proxy.pp | 16 - .../modules/apache/manifests/mod/proxy_ajp.pp | 4 - .../apache/manifests/mod/proxy_balancer.pp | 10 - .../apache/manifests/mod/proxy_html.pp | 37 - .../apache/manifests/mod/proxy_http.pp | 4 - .../modules/apache/manifests/mod/python.pp | 5 - .../apache/manifests/mod/reqtimeout.pp | 12 - .../modules/apache/manifests/mod/rewrite.pp | 4 - .../modules/apache/manifests/mod/rpaf.pp | 20 - .../modules/apache/manifests/mod/setenvif.pp | 12 - .../modules/apache/manifests/mod/speling.pp | 3 - .../modules/apache/manifests/mod/ssl.pp | 56 - .../modules/apache/manifests/mod/status.pp | 43 - .../modules/apache/manifests/mod/suexec.pp | 3 - .../modules/apache/manifests/mod/suphp.pp | 14 - .../modules/apache/manifests/mod/userdir.pp | 18 - .../apache/manifests/mod/vhost_alias.pp | 3 - .../modules/apache/manifests/mod/worker.pp | 74 - .../modules/apache/manifests/mod/wsgi.pp | 21 - .../modules/apache/manifests/mod/xsendfile.pp | 4 - .../puppet/modules/apache/manifests/mpm.pp | 68 - .../apache/manifests/namevirtualhost.pp | 10 - .../modules/apache/manifests/package.pp | 48 - .../puppet/modules/apache/manifests/params.pp | 258 --- .../apache/manifests/peruser/multiplexer.pp | 17 - .../apache/manifests/peruser/processor.pp | 17 - .../puppet/modules/apache/manifests/php.pp | 18 - .../puppet/modules/apache/manifests/proxy.pp | 15 - .../puppet/modules/apache/manifests/python.pp | 18 - .../modules/apache/manifests/service.pp | 44 - .../puppet/modules/apache/manifests/ssl.pp | 18 - .../modules/apache/manifests/version.pp | 35 - .../puppet/modules/apache/manifests/vhost.pp | 560 ----- .../puppet/modules/apache/metadata.json | 65 - .../spec/acceptance/apache_parameters_spec.rb | 446 ---- .../apache/spec/acceptance/apache_ssl_spec.rb | 87 - .../apache/spec/acceptance/basic_spec.rb | 12 - .../apache/spec/acceptance/class_spec.rb | 78 - .../spec/acceptance/default_mods_spec.rb | 120 - .../apache/spec/acceptance/itk_spec.rb | 33 - .../spec/acceptance/mod_dav_svn_spec.rb | 55 - .../spec/acceptance/mod_deflate_spec.rb | 40 - .../apache/spec/acceptance/mod_fcgid_spec.rb | 62 - .../apache/spec/acceptance/mod_mime_spec.rb | 34 - .../spec/acceptance/mod_pagespeed_spec.rb | 85 - .../spec/acceptance/mod_passenger_spec.rb | 294 --- .../apache/spec/acceptance/mod_php_spec.rb | 173 -- .../spec/acceptance/mod_proxy_html_spec.rb | 39 - .../apache/spec/acceptance/mod_suphp_spec.rb | 44 - .../acceptance/nodesets/centos-59-x64.yml | 11 - .../acceptance/nodesets/centos-64-x64-pe.yml | 13 - .../acceptance/nodesets/centos-64-x64.yml | 11 - .../acceptance/nodesets/centos-65-x64.yml | 11 - .../acceptance/nodesets/debian-607-x64.yml | 11 - .../acceptance/nodesets/debian-70rc1-x64.yml | 11 - .../acceptance/nodesets/debian-73-i386.yml | 11 - .../acceptance/nodesets/debian-73-x64.yml | 11 - .../spec/acceptance/nodesets/default.yml | 11 - .../acceptance/nodesets/fedora-18-x64.yml | 11 - .../acceptance/nodesets/sles-11sp1-x64.yml | 11 - .../nodesets/ubuntu-server-10044-x64.yml | 11 - .../nodesets/ubuntu-server-12042-x64.yml | 11 - .../nodesets/ubuntu-server-1310-x64.yml | 11 - .../nodesets/ubuntu-server-1404-x64.yml | 11 - .../spec/acceptance/prefork_worker_spec.rb | 79 - .../apache/spec/acceptance/service_spec.rb | 19 - .../spec/acceptance/unsupported_spec.rb | 13 - .../modules/apache/spec/acceptance/version.rb | 57 - .../apache/spec/acceptance/vhost_spec.rb | 1097 --------- .../apache/spec/classes/apache_spec.rb | 563 ----- .../modules/apache/spec/classes/dev_spec.rb | 42 - .../apache/spec/classes/mod/auth_kerb_spec.rb | 56 - .../spec/classes/mod/authnz_ldap_spec.rb | 76 - .../apache/spec/classes/mod/dav_svn_spec.rb | 56 - .../apache/spec/classes/mod/deflate_spec.rb | 90 - .../apache/spec/classes/mod/dev_spec.rb | 26 - .../apache/spec/classes/mod/dir_spec.rb | 103 - .../apache/spec/classes/mod/event_spec.rb | 103 - .../apache/spec/classes/mod/fastcgi_spec.rb | 43 - .../apache/spec/classes/mod/fcgid_spec.rb | 86 - .../apache/spec/classes/mod/info_spec.rb | 119 - .../apache/spec/classes/mod/itk_spec.rb | 69 - .../spec/classes/mod/mime_magic_spec.rb | 109 - .../apache/spec/classes/mod/mime_spec.rb | 52 - .../apache/spec/classes/mod/pagespeed_spec.rb | 43 - .../apache/spec/classes/mod/passenger_spec.rb | 230 -- .../apache/spec/classes/mod/perl_spec.rb | 56 - .../apache/spec/classes/mod/peruser_spec.rb | 23 - .../apache/spec/classes/mod/php_spec.rb | 224 -- .../apache/spec/classes/mod/prefork_spec.rb | 114 - .../spec/classes/mod/proxy_html_spec.rb | 85 - .../apache/spec/classes/mod/python_spec.rb | 56 - .../apache/spec/classes/mod/rpaf_spec.rb | 88 - .../apache/spec/classes/mod/speling_spec.rb | 37 - .../apache/spec/classes/mod/ssl_spec.rb | 72 - .../apache/spec/classes/mod/status_spec.rb | 198 -- .../apache/spec/classes/mod/suphp_spec.rb | 38 - .../apache/spec/classes/mod/worker_spec.rb | 161 -- .../apache/spec/classes/mod/wsgi_spec.rb | 69 - .../apache/spec/classes/params_spec.rb | 26 - .../apache/spec/classes/service_spec.rb | 127 -- .../modules/apache/spec/defines/mod_spec.rb | 118 - .../modules/apache/spec/defines/vhost_spec.rb | 1469 ------------- .../modules/apache/spec/fixtures/files/spec | 1 - .../site_apache/templates/fake.conf.erb | 1 - .../puppet/modules/apache/spec/spec.opts | 4 - .../puppet/modules/apache/spec/spec_helper.rb | 25 - .../apache/spec/spec_helper_acceptance.rb | 45 - .../spec/unit/provider/a2mod/gentoo_spec.rb | 184 -- .../apache/templates/confd/no-accf.conf.erb | 4 - .../modules/apache/templates/httpd.conf.erb | 109 - .../modules/apache/templates/listen.erb | 6 - .../apache/templates/mod/alias.conf.erb | 13 - .../apache/templates/mod/authnz_ldap.conf.erb | 5 - .../apache/templates/mod/autoindex.conf.erb | 56 - .../apache/templates/mod/cgid.conf.erb | 1 - .../apache/templates/mod/dav_fs.conf.erb | 1 - .../apache/templates/mod/deflate.conf.erb | 8 - .../modules/apache/templates/mod/dir.conf.erb | 1 - .../apache/templates/mod/disk_cache.conf.erb | 8 - .../apache/templates/mod/event.conf.erb | 9 - .../apache/templates/mod/fastcgi.conf.erb | 6 - .../apache/templates/mod/fcgid.conf.erb | 5 - .../apache/templates/mod/info.conf.erb | 10 - .../modules/apache/templates/mod/itk.conf.erb | 8 - .../apache/templates/mod/ldap.conf.erb | 11 - .../modules/apache/templates/mod/load.erb | 7 - .../apache/templates/mod/mime.conf.erb | 36 - .../apache/templates/mod/mime_magic.conf.erb | 1 - .../apache/templates/mod/mpm_event.conf.erb | 9 - .../apache/templates/mod/negotiation.conf.erb | 2 - .../modules/apache/templates/mod/nss.conf.erb | 228 -- .../apache/templates/mod/pagespeed.conf.erb | 98 - .../apache/templates/mod/passenger.conf.erb | 37 - .../apache/templates/mod/peruser.conf.erb | 12 - .../apache/templates/mod/php5.conf.erb | 30 - .../apache/templates/mod/prefork.conf.erb | 8 - .../apache/templates/mod/proxy.conf.erb | 27 - .../apache/templates/mod/proxy_html.conf.erb | 18 - .../apache/templates/mod/reqtimeout.conf.erb | 2 - .../apache/templates/mod/rpaf.conf.erb | 15 - .../apache/templates/mod/setenvif.conf.erb | 34 - .../modules/apache/templates/mod/ssl.conf.erb | 28 - .../apache/templates/mod/status.conf.erb | 16 - .../apache/templates/mod/suphp.conf.erb | 19 - .../apache/templates/mod/userdir.conf.erb | 27 - .../apache/templates/mod/worker.conf.erb | 10 - .../apache/templates/mod/wsgi.conf.erb | 13 - .../apache/templates/namevirtualhost.erb | 8 - .../modules/apache/templates/ports_header.erb | 5 - .../modules/apache/templates/vhost.conf.erb | 66 - .../apache/templates/vhost/_action.erb | 4 - .../apache/templates/vhost/_aliases.erb | 12 - .../modules/apache/templates/vhost/_block.erb | 14 - .../templates/vhost/_custom_fragment.erb | 5 - .../apache/templates/vhost/_directories.erb | 171 -- .../templates/vhost/_error_document.erb | 7 - .../apache/templates/vhost/_fastcgi.erb | 22 - .../apache/templates/vhost/_header.erb | 10 - .../modules/apache/templates/vhost/_itk.erb | 28 - .../apache/templates/vhost/_php_admin.erb | 12 - .../modules/apache/templates/vhost/_proxy.erb | 23 - .../modules/apache/templates/vhost/_rack.erb | 7 - .../apache/templates/vhost/_redirect.erb | 24 - .../apache/templates/vhost/_requestheader.erb | 10 - .../apache/templates/vhost/_rewrite.erb | 43 - .../apache/templates/vhost/_scriptalias.erb | 24 - .../apache/templates/vhost/_serveralias.erb | 7 - .../apache/templates/vhost/_setenv.erb | 12 - .../modules/apache/templates/vhost/_ssl.erb | 41 - .../apache/templates/vhost/_suexec.erb | 4 - .../modules/apache/templates/vhost/_suphp.erb | 11 - .../modules/apache/templates/vhost/_wsgi.erb | 24 - .../puppet/modules/apache/tests/apache.pp | 6 - .../puppet/modules/apache/tests/dev.pp | 1 - .../puppet/modules/apache/tests/init.pp | 1 - .../modules/apache/tests/mod_load_params.pp | 11 - .../puppet/modules/apache/tests/mods.pp | 9 - .../modules/apache/tests/mods_custom.pp | 16 - .../puppet/modules/apache/tests/php.pp | 4 - .../puppet/modules/apache/tests/vhost.pp | 238 -- .../modules/apache/tests/vhost_directories.pp | 44 - .../modules/apache/tests/vhost_ip_based.pp | 25 - .../puppet/modules/apache/tests/vhost_ssl.pp | 23 - .../apache/tests/vhosts_without_listen.pp | 53 - .../puphpet/puppet/modules/apt/.fixtures.yml | 7 - .../puphpet/puppet/modules/apt/.project | 23 - .../puppet/modules/apt/.puppet-lint.rc | 1 - .../puphpet/puppet/modules/apt/.travis.yml | 41 - .../puphpet/puppet/modules/apt/CHANGELOG.md | 222 -- .../puphpet/puppet/modules/apt/Gemfile | 18 - .../puphpet/puppet/modules/apt/LICENSE | 34 - .../puphpet/puppet/modules/apt/Modulefile | 14 - .../puphpet/puppet/modules/apt/README.md | 236 -- .../puphpet/puppet/modules/apt/Rakefile | 4 - .../puppet/modules/apt/manifests/backports.pp | 48 - .../puppet/modules/apt/manifests/builddep.pp | 16 - .../puppet/modules/apt/manifests/conf.pp | 18 - .../modules/apt/manifests/debian/testing.pp | 21 - .../modules/apt/manifests/debian/unstable.pp | 21 - .../puppet/modules/apt/manifests/force.pp | 42 - .../puppet/modules/apt/manifests/init.pp | 121 - .../puppet/modules/apt/manifests/key.pp | 90 - .../puppet/modules/apt/manifests/params.pp | 42 - .../puppet/modules/apt/manifests/pin.pp | 73 - .../puppet/modules/apt/manifests/ppa.pp | 81 - .../puppet/modules/apt/manifests/release.pp | 17 - .../puppet/modules/apt/manifests/source.pp | 87 - .../apt/manifests/unattended_upgrades.pp | 69 - .../puppet/modules/apt/manifests/update.pp | 10 - .../puphpet/puppet/modules/apt/metadata.json | 30 - .../apt/spec/acceptance/apt_builddep_spec.rb | 36 - .../apt/spec/acceptance/apt_key_spec.rb | 200 -- .../apt/spec/acceptance/apt_ppa_spec.rb | 98 - .../apt/spec/acceptance/apt_source_spec.rb | 326 --- .../modules/apt/spec/acceptance/apt_spec.rb | 233 -- .../apt/spec/acceptance/backports_spec.rb | 59 - .../modules/apt/spec/acceptance/class_spec.rb | 17 - .../modules/apt/spec/acceptance/conf_spec.rb | 66 - .../modules/apt/spec/acceptance/force_spec.rb | 76 - .../acceptance/nodesets/debian-70rc1-x64.yml | 10 - .../apt/spec/acceptance/nodesets/default.yml | 10 - .../nodesets/ubuntu-server-10044-x64.yml | 11 - .../nodesets/ubuntu-server-12042-x64.yml | 10 - .../modules/apt/spec/acceptance/pin_spec.rb | 266 --- .../apt/spec/acceptance/release_spec.rb | 26 - .../acceptance/unattended_upgrade_spec.rb | 562 ----- .../apt/spec/acceptance/unsupported_spec.rb | 10 - .../modules/apt/spec/classes/apt_spec.rb | 134 -- .../apt/spec/classes/backports_spec.rb | 71 - .../apt/spec/classes/debian_testing_spec.rb | 15 - .../apt/spec/classes/debian_unstable_spec.rb | 15 - .../modules/apt/spec/classes/params_spec.rb | 14 - .../modules/apt/spec/classes/release_spec.rb | 23 - .../spec/classes/unattended_upgrades_spec.rb | 205 -- .../modules/apt/spec/defines/builddep_spec.rb | 19 - .../modules/apt/spec/defines/conf_spec.rb | 58 - .../modules/apt/spec/defines/force_spec.rb | 58 - .../modules/apt/spec/defines/key_spec.rb | 124 -- .../modules/apt/spec/defines/pin_spec.rb | 102 - .../modules/apt/spec/defines/ppa_spec.rb | 156 -- .../modules/apt/spec/defines/source_spec.rb | 167 -- .../puppet/modules/apt/spec/spec_helper.rb | 1 - .../apt/spec/spec_helper_acceptance.rb | 33 - .../modules/apt/templates/10periodic.erb | 12 - .../apt/templates/50unattended-upgrades.erb | 53 - .../puppet/modules/apt/templates/pin.pref.erb | 22 - .../modules/apt/templates/source.list.erb | 5 - .../puppet/modules/apt/tests/builddep.pp | 2 - .../modules/apt/tests/debian/testing.pp | 2 - .../modules/apt/tests/debian/unstable.pp | 2 - .../puphpet/puppet/modules/apt/tests/force.pp | 17 - .../puphpet/puppet/modules/apt/tests/init.pp | 1 - .../puphpet/puppet/modules/apt/tests/key.pp | 6 - .../puppet/modules/apt/tests/params.pp | 1 - .../puphpet/puppet/modules/apt/tests/pin.pp | 5 - .../puphpet/puppet/modules/apt/tests/ppa.pp | 4 - .../puppet/modules/apt/tests/release.pp | 4 - .../puppet/modules/apt/tests/source.pp | 29 - .../modules/apt/tests/unattended_upgrades.pp | 1 - .../puppet/modules/beanstalkd/.travis.yml | 26 - .../puphpet/puppet/modules/beanstalkd/Gemfile | 12 - .../puppet/modules/beanstalkd/README.md | 68 - .../puppet/modules/beanstalkd/Rakefile | 10 - .../modules/beanstalkd/manifests/init.pp | 124 -- .../puppet/modules/beanstalkd/run-tests.sh | 20 - .../beanstalkd/spec/defines/config_spec.rb | 80 - .../spec/fixtures/manifests/site.pp | 0 .../modules/beanstalkd/manifests/init.pp | 124 -- .../templates/debian/beanstalkd_default.erb | 123 -- .../templates/redhat/beanstalkd_sysconfig.erb | 56 - .../modules/beanstalkd/spec/spec_helper.rb | 8 - .../templates/debian/beanstalkd_default.erb | 123 -- .../templates/redhat/beanstalkd_sysconfig.erb | 56 - .../puppet/modules/composer/.fixtures.yml | 5 - .../puppet/modules/composer/.travis.yml | 13 - .../puppet/modules/composer/CHANGELOG.md | 133 -- .../puphpet/puppet/modules/composer/Gemfile | 17 - .../puphpet/puppet/modules/composer/LICENSE | 21 - .../puppet/modules/composer/Modulefile | 8 - .../puphpet/puppet/modules/composer/README.md | 155 -- .../puphpet/puppet/modules/composer/Rakefile | 2 - .../composer/lib/facter/composer_home.rb | 5 - .../puppet/modules/composer/manifests/exec.pp | 55 - .../puppet/modules/composer/manifests/init.pp | 156 -- .../modules/composer/manifests/params.pp | 53 - .../modules/composer/manifests/project.pp | 96 - .../spec/classes/composer_params_spec.rb | 14 - .../composer/spec/classes/composer_spec.rb | 116 - .../spec/defines/composer_exec_spec.rb | 65 - .../spec/defines/composer_project_spec.rb | 61 - .../composer/spec/fixtures/manifests/site.pp | 8 - .../puppet/modules/composer/spec/spec.opts | 6 - .../modules/composer/spec/spec_helper.rb | 1 - .../modules/composer/templates/exec.erb | 17 - .../puppet/modules/composer/tests/init.pp | 11 - .../puppet/modules/composer/tests/project.pp | 23 - .../puppet/modules/concat/.fixtures.yml | 7 - .../puppet/modules/concat/.gitattributes | 1 - .../puphpet/puppet/modules/concat/.travis.yml | 40 - .../puphpet/puppet/modules/concat/CHANGELOG | 127 -- .../puphpet/puppet/modules/concat/Gemfile | 20 - .../puphpet/puppet/modules/concat/LICENSE | 14 - .../puphpet/puppet/modules/concat/Modulefile | 9 - .../puphpet/puppet/modules/concat/README.md | 441 ---- .../puphpet/puppet/modules/concat/Rakefile | 5 - .../modules/concat/files/concatfragments.rb | 137 -- .../modules/concat/files/concatfragments.sh | 140 -- .../concat/lib/facter/concat_basedir.rb | 11 - .../modules/concat/manifests/fragment.pp | 121 - .../puppet/modules/concat/manifests/init.pp | 232 -- .../puppet/modules/concat/manifests/setup.pp | 58 - .../concat/spec/acceptance/backup_spec.rb | 101 - .../concat/spec/acceptance/concat_spec.rb | 204 -- .../acceptance/deprecation_warnings_spec.rb | 230 -- .../concat/spec/acceptance/empty_spec.rb | 24 - .../spec/acceptance/fragment_source_spec.rb | 134 -- .../concat/spec/acceptance/newline_spec.rb | 57 - .../acceptance/nodesets/aix-71-vcloud.yml | 19 - .../acceptance/nodesets/centos-59-x64.yml | 10 - .../acceptance/nodesets/centos-64-x64-pe.yml | 12 - .../acceptance/nodesets/centos-64-x64.yml | 10 - .../acceptance/nodesets/debian-607-x64.yml | 10 - .../acceptance/nodesets/debian-70rc1-x64.yml | 10 - .../acceptance/nodesets/debian-73-x64.yml | 11 - .../spec/acceptance/nodesets/default.yml | 10 - .../acceptance/nodesets/fedora-18-x64.yml | 10 - .../spec/acceptance/nodesets/sles-11-x64.yml | 10 - .../acceptance/nodesets/sles-11sp1-x64.yml | 10 - .../nodesets/ubuntu-server-10044-x64.yml | 10 - .../nodesets/ubuntu-server-12042-x64.yml | 10 - .../nodesets/ubuntu-server-1404-x64.yml | 11 - .../concat/spec/acceptance/order_spec.rb | 137 -- .../spec/acceptance/quoted_paths_spec.rb | 33 - .../concat/spec/acceptance/replace_spec.rb | 241 -- .../spec/acceptance/symbolic_name_spec.rb | 32 - .../concat/spec/acceptance/warn_spec.rb | 97 - .../puppet/modules/concat/spec/spec_helper.rb | 1 - .../concat/spec/spec_helper_acceptance.rb | 39 - .../spec/unit/classes/concat_setup_spec.rb | 42 - .../spec/unit/defines/concat_fragment_spec.rb | 267 --- .../concat/spec/unit/defines/concat_spec.rb | 380 ---- .../spec/unit/facts/concat_basedir_spec.rb | 18 - .../puppet/modules/concat/tests/fragment.pp | 19 - .../puppet/modules/concat/tests/init.pp | 7 - .../puphpet/puppet/modules/drush/Puppetfile | 6 - .../puphpet/puppet/modules/drush/README | 226 -- .../puppet/modules/drush/manifests/apt.pp | 49 - .../puppet/modules/drush/manifests/dis.pp | 25 - .../puppet/modules/drush/manifests/dl.pp | 48 - .../puppet/modules/drush/manifests/en.pp | 26 - .../puppet/modules/drush/manifests/git.pp | 60 - .../modules/drush/manifests/git/drush.pp | 61 - .../puppet/modules/drush/manifests/init.pp | 33 - .../puppet/modules/drush/manifests/make.pp | 26 - .../puppet/modules/drush/manifests/params.pp | 35 - .../puppet/modules/drush/manifests/run.pp | 57 - .../puppet/modules/drush/manifests/status.pp | 22 - .../puppet/modules/drush/tests/.ci/.module | 1 - .../modules/drush/tests/.ci/Vagrantfile | 11 - .../puppet/modules/drush/tests/.ci/test.sh | 78 - .../modules/drush/tests/.ci/vagrant_test.sh | 5 - .../puphpet/puppet/modules/drush/tests/apt.pp | 4 - .../puppet/modules/drush/tests/defaults.pp | 1 - .../puphpet/puppet/modules/drush/tests/dis.pp | 3 - .../puphpet/puppet/modules/drush/tests/dl.pp | 2 - .../puphpet/puppet/modules/drush/tests/en.pp | 2 - .../puphpet/puppet/modules/drush/tests/git.pp | 4 - .../puppet/modules/drush/tests/git/drush.pp | 1 - .../puppet/modules/drush/tests/init.pp | 1 - .../puppet/modules/drush/tests/make.pp | 4 - .../puphpet/puppet/modules/drush/tests/run.pp | 2 - .../puppet/modules/drush/tests/status.pp | 2 - .../modules/elasticsearch/.fixtures.yml | 5 - .../puppet/modules/elasticsearch/.travis.yml | 33 - .../puppet/modules/elasticsearch/CHANGELOG | 91 - .../modules/elasticsearch/CONTRIBUTING.md | 18 - .../puppet/modules/elasticsearch/CONTRIBUTORS | 20 - .../puppet/modules/elasticsearch/Gemfile | 7 - .../puppet/modules/elasticsearch/LICENSE | 13 - .../puppet/modules/elasticsearch/Modulefile | 9 - .../puppet/modules/elasticsearch/README.md | 203 -- .../puppet/modules/elasticsearch/Rakefile | 7 - .../modules/elasticsearch/manifests/config.pp | 90 - .../modules/elasticsearch/manifests/init.pp | 208 -- .../modules/elasticsearch/manifests/java.pp | 50 - .../elasticsearch/manifests/package.pp | 145 -- .../modules/elasticsearch/manifests/params.pp | 122 - .../modules/elasticsearch/manifests/plugin.pp | 96 - .../modules/elasticsearch/manifests/python.pp | 73 - .../modules/elasticsearch/manifests/ruby.pp | 67 - .../elasticsearch/manifests/service.pp | 43 - .../elasticsearch/manifests/service/init.pp | 132 -- .../elasticsearch/manifests/template.pp | 114 - .../001_elasticsearch_init_debian_spec.rb | 219 -- .../002_elasticsearch_init_redhat_spec.rb | 219 -- .../003_elasticsearch_init_unknown_spec.rb | 18 - .../004_elasticsearch_init_config_spec.rb | 112 - .../classes/005_elasticsearch_java_spec.rb | 120 - .../defines/001_elasticsearch_python_spec.rb | 19 - .../defines/002_elasticsearch_ruby_spec.rb | 19 - .../003_elasticsearch_template_spec.rb | 43 - .../defines/004_elasticsearch_plugin_spec.rb | 29 - .../spec/lib/parser_validate_task.rb | 40 - .../spec/lib/template_check_task.rb | 31 - .../modules/elasticsearch/spec/spec_helper.rb | 2 - .../etc/elasticsearch/elasticsearch.yml.erb | 93 - .../etc/init.d/elasticsearch.Debian.erb | 196 -- .../etc/init.d/elasticsearch.RedHat.erb | 155 -- .../templates/etc/sysconfig/defaults.erb | 5 - .../puphpet/puppet/modules/epel/._Gemfile | Bin 280 -> 0 bytes .../puphpet/puppet/modules/epel/._LICENSE | Bin 280 -> 0 bytes .../puphpet/puppet/modules/epel/._Modulefile | Bin 280 -> 0 bytes .../puphpet/puppet/modules/epel/._README.md | Bin 280 -> 0 bytes .../puphpet/puppet/modules/epel/._Rakefile | Bin 280 -> 0 bytes .../puphpet/puppet/modules/epel/._files | Bin 311 -> 0 bytes .../puphpet/puppet/modules/epel/._lib | Bin 311 -> 0 bytes .../puphpet/puppet/modules/epel/._manifests | Bin 311 -> 0 bytes .../puppet/modules/epel/._metadata.json | Bin 280 -> 0 bytes .../puphpet/puppet/modules/epel/._spec | Bin 311 -> 0 bytes .../puphpet/puppet/modules/epel/._tests | Bin 311 -> 0 bytes .../puphpet/puppet/modules/epel/Gemfile | 15 - .../puphpet/puppet/modules/epel/LICENSE | 13 - .../puphpet/puppet/modules/epel/Modulefile | 8 - .../puphpet/puppet/modules/epel/README.md | 90 - .../puphpet/puppet/modules/epel/Rakefile | 17 - .../modules/epel/files/._RPM-GPG-KEY-EPEL-5 | Bin 280 -> 0 bytes .../modules/epel/files/._RPM-GPG-KEY-EPEL-6 | Bin 280 -> 0 bytes .../modules/epel/files/._RPM-GPG-KEY-EPEL-7 | Bin 280 -> 0 bytes .../modules/epel/files/RPM-GPG-KEY-EPEL-5 | 30 - .../modules/epel/files/RPM-GPG-KEY-EPEL-6 | 29 - .../modules/epel/files/RPM-GPG-KEY-EPEL-7 | 29 - .../puphpet/puppet/modules/epel/lib/._facter | Bin 311 -> 0 bytes .../epel/lib/facter/._os_maj_version.rb | Bin 280 -> 0 bytes .../modules/epel/lib/facter/os_maj_version.rb | 11 - .../puppet/modules/epel/manifests/._init.pp | Bin 280 -> 0 bytes .../puppet/modules/epel/manifests/._params.pp | Bin 280 -> 0 bytes .../modules/epel/manifests/._rpm_gpg_key.pp | Bin 280 -> 0 bytes .../puppet/modules/epel/manifests/init.pp | 135 -- .../puppet/modules/epel/manifests/params.pp | 45 - .../modules/epel/manifests/rpm_gpg_key.pp | 28 - .../puphpet/puppet/modules/epel/metadata.json | 45 - .../puppet/modules/epel/spec/._classes | Bin 311 -> 0 bytes .../puppet/modules/epel/spec/._defines | Bin 311 -> 0 bytes .../puppet/modules/epel/spec/._spec_helper.rb | Bin 280 -> 0 bytes .../modules/epel/spec/._spec_helper_system.rb | Bin 280 -> 0 bytes .../puphpet/puppet/modules/epel/spec/._system | Bin 311 -> 0 bytes .../puphpet/puppet/modules/epel/spec/._unit | Bin 311 -> 0 bytes .../modules/epel/spec/classes/._epel_spec.rb | Bin 280 -> 0 bytes .../epel/spec/classes/._shared_base.rb | Bin 280 -> 0 bytes .../epel/spec/classes/._shared_debuginfo.rb | Bin 280 -> 0 bytes .../epel/spec/classes/._shared_gpgkey.rb | Bin 280 -> 0 bytes .../epel/spec/classes/._shared_source.rb | Bin 280 -> 0 bytes .../epel/spec/classes/._shared_testing.rb | Bin 280 -> 0 bytes .../classes/._shared_testing_debuginfo.rb | Bin 280 -> 0 bytes .../spec/classes/._shared_testing_source.rb | Bin 280 -> 0 bytes .../modules/epel/spec/classes/epel_spec.rb | 80 - .../modules/epel/spec/classes/shared_base.rb | 36 - .../epel/spec/classes/shared_debuginfo.rb | 36 - .../epel/spec/classes/shared_gpgkey.rb | 37 - .../epel/spec/classes/shared_source.rb | 36 - .../epel/spec/classes/shared_testing.rb | 36 - .../spec/classes/shared_testing_debuginfo.rb | 36 - .../spec/classes/shared_testing_source.rb | 36 - .../epel/spec/defines/._rpm_gpg_key_spec.rb | Bin 280 -> 0 bytes .../epel/spec/defines/rpm_gpg_key_spec.rb | 57 - .../puppet/modules/epel/spec/spec_helper.rb | 8 - .../modules/epel/spec/spec_helper_system.rb | 23 - .../modules/epel/spec/system/._basic_spec.rb | Bin 280 -> 0 bytes .../modules/epel/spec/system/._usage_spec.rb | Bin 280 -> 0 bytes .../modules/epel/spec/system/basic_spec.rb | 36 - .../modules/epel/spec/system/usage_spec.rb | 60 - .../puppet/modules/epel/spec/unit/._facter | Bin 311 -> 0 bytes .../spec/unit/facter/._os_maj_version_spec.rb | Bin 280 -> 0 bytes .../spec/unit/facter/os_maj_version_spec.rb | 21 - .../puppet/modules/epel/tests/._init.pp | Bin 280 -> 0 bytes .../puphpet/puppet/modules/epel/tests/init.pp | 3 - .../puppet/modules/erlang/.fixtures.yml | 7 - .../puppet/modules/erlang/.nodeset.yml | 35 - .../puphpet/puppet/modules/erlang/.rspec | 1 - .../puphpet/puppet/modules/erlang/.travis.yml | 23 - .../puphpet/puppet/modules/erlang/Gemfile | 15 - .../puppet/modules/erlang/Gemfile.lock | 94 - .../puphpet/puppet/modules/erlang/LICENSE | 207 -- .../puphpet/puppet/modules/erlang/Modulefile | 10 - .../puphpet/puppet/modules/erlang/README.md | 28 - .../puphpet/puppet/modules/erlang/Rakefile | 35 - .../puppet/modules/erlang/manifests/init.pp | 45 - .../puppet/modules/erlang/manifests/params.pp | 29 - .../modules/erlang/manifests/repo/apt.pp | 41 - .../modules/erlang/manifests/repo/yum.pp | 30 - .../erlang/spec/classes/erlang_spec.rb | 138 -- .../puppet/modules/erlang/spec/spec_helper.rb | 1 - .../modules/erlang/spec/spec_helper_system.rb | 17 - .../modules/erlang/spec/system/erlang_spec.rb | 25 - .../puppet/modules/firewall/.fixtures.yml | 3 - .../puppet/modules/firewall/.nodeset.yml | 31 - .../puppet/modules/firewall/.travis.yml | 29 - .../puppet/modules/firewall/CHANGELOG.md | 432 ---- .../puppet/modules/firewall/CONTRIBUTING.md | 87 - .../puphpet/puppet/modules/firewall/Gemfile | 18 - .../puphpet/puppet/modules/firewall/LICENSE | 25 - .../puppet/modules/firewall/Modulefile | 8 - .../puppet/modules/firewall/README.markdown | 429 ---- .../puphpet/puppet/modules/firewall/Rakefile | 14 - .../firewall/lib/facter/ip6tables_version.rb | 11 - .../lib/facter/iptables_persistent_version.rb | 15 - .../firewall/lib/facter/iptables_version.rb | 11 - .../firewall/lib/puppet/provider/firewall.rb | 34 - .../lib/puppet/provider/firewall/ip6tables.rb | 136 -- .../lib/puppet/provider/firewall/iptables.rb | 501 ----- .../provider/firewallchain/iptables_chain.rb | 178 -- .../firewall/lib/puppet/type/firewall.rb | 1077 --------- .../firewall/lib/puppet/type/firewallchain.rb | 222 -- .../firewall/lib/puppet/util/firewall.rb | 225 -- .../firewall/lib/puppet/util/ipcidr.rb | 42 - .../puppet/modules/firewall/manifests/init.pp | 36 - .../modules/firewall/manifests/linux.pp | 51 - .../firewall/manifests/linux/archlinux.pp | 41 - .../firewall/manifests/linux/debian.pp | 44 - .../firewall/manifests/linux/redhat.pp | 40 - .../puppet/modules/firewall/metadata.json | 64 - .../spec/acceptance/change_source_spec.rb | 77 - .../firewall/spec/acceptance/class_spec.rb | 27 - .../spec/acceptance/connlimit_spec.rb | 55 - .../firewall/spec/acceptance/connmark_spec.rb | 27 - .../firewall/spec/acceptance/firewall_spec.rb | 1618 -------------- .../spec/acceptance/firewallchain_spec.rb | 125 -- .../spec/acceptance/ip6_fragment_spec.rb | 114 - .../spec/acceptance/isfragment_spec.rb | 92 - .../acceptance/nodesets/centos-59-x64-pe.yml | 12 - .../acceptance/nodesets/centos-59-x64.yml | 10 - .../nodesets/centos-64-x64-fusion.yml | 10 - .../acceptance/nodesets/centos-64-x64-pe.yml | 12 - .../acceptance/nodesets/centos-64-x64.yml | 10 - .../acceptance/nodesets/debian-607-x64.yml | 10 - .../acceptance/nodesets/debian-70rc1-x64.yml | 10 - .../spec/acceptance/nodesets/default.yml | 10 - .../acceptance/nodesets/fedora-18-x64.yml | 10 - .../acceptance/nodesets/sles-11sp1-x64.yml | 10 - .../nodesets/ubuntu-server-10044-x64.yml | 10 - .../nodesets/ubuntu-server-12042-x64.yml | 10 - .../nodesets/ubuntu-server-1404-x64.yml | 9 - .../firewall/spec/acceptance/params_spec.rb | 154 -- .../firewall/spec/acceptance/purge_spec.rb | 124 -- .../spec/acceptance/resource_cmd_spec.rb | 93 - .../firewall/spec/acceptance/rules_spec.rb | 252 --- .../firewall/spec/acceptance/socket_spec.rb | 97 - .../spec/acceptance/standard_usage_spec.rb | 55 - .../fixtures/ip6tables/conversion_hash.rb | 107 - .../spec/fixtures/iptables/conversion_hash.rb | 934 -------- .../modules/firewall/spec/spec_helper.rb | 29 - .../firewall/spec/spec_helper_acceptance.rb | 42 - .../classes/firewall_linux_archlinux_spec.rb | 32 - .../classes/firewall_linux_debian_spec.rb | 19 - .../classes/firewall_linux_redhat_spec.rb | 22 - .../spec/unit/classes/firewall_linux_spec.rb | 30 - .../spec/unit/classes/firewall_spec.rb | 25 - .../iptables_persistent_version_spec.rb | 35 - .../spec/unit/facter/iptables_spec.rb | 23 - .../puppet/provider/iptables_chain_spec.rb | 227 -- .../unit/puppet/provider/iptables_spec.rb | 410 ---- .../spec/unit/puppet/type/firewall_spec.rb | 650 ------ .../unit/puppet/type/firewallchain_spec.rb | 185 -- .../spec/unit/puppet/util/firewall_spec.rb | 197 -- .../spec/unit/puppet/util/ipcidr_spec.rb | 67 - .../puphpet/puppet/modules/git/.fixtures.yml | 5 - .../puphpet/puppet/modules/git/CHANGELOG | 2 - .../puphpet/puppet/modules/git/LICENSE | 201 -- .../puphpet/puppet/modules/git/Modulefile | 10 - .../puphpet/puppet/modules/git/README.md | 71 - .../puphpet/puppet/modules/git/Rakefile | 1 - .../git/files/subtree/bash_completion.sh | 25 - .../modules/git/lib/facter/git_exec_path.rb | 4 - .../modules/git/lib/facter/git_version.rb | 4 - .../puppet/modules/git/manifests/gitosis.pp | 13 - .../puppet/modules/git/manifests/init.pp | 17 - .../puppet/modules/git/manifests/subtree.pp | 43 - .../git/spec/classes/git_subtree_spec.rb | 70 - .../puppet/modules/git/spec/spec_helper.rb | 1 - .../puppet/modules/git/tests/gitosis.pp | 1 - .../puphpet/puppet/modules/git/tests/init.pp | 1 - .../puppet/modules/mailcatcher/.fixtures.yml | 5 - .../puppet/modules/mailcatcher/.travis.yml | 31 - .../puppet/modules/mailcatcher/Gemfile | 12 - .../puppet/modules/mailcatcher/Modulefile | 13 - .../puppet/modules/mailcatcher/README.md | 34 - .../puppet/modules/mailcatcher/Rakefile | 6 - .../modules/mailcatcher/manifests/config.pp | 18 - .../modules/mailcatcher/manifests/init.pp | 64 - .../modules/mailcatcher/manifests/package.pp | 17 - .../modules/mailcatcher/manifests/params.pp | 22 - .../spec/classes/mailcatcher_spec.rb | 41 - .../modules/mailcatcher/spec/spec_helper.rb | 1 - .../templates/etc/init/mailcatcher.conf.erb | 16 - .../puppet/modules/mailcatcher/tests/init.pp | 12 - .../puppet/modules/mongodb/.fixtures.yml | 6 - .../puppet/modules/mongodb/.nodeset.yml | 31 - .../puppet/modules/mongodb/.travis.yml | 33 - .../puphpet/puppet/modules/mongodb/CHANGELOG | 74 - .../puphpet/puppet/modules/mongodb/Gemfile | 19 - .../puphpet/puppet/modules/mongodb/LICENSE | 15 - .../puphpet/puppet/modules/mongodb/Modulefile | 12 - .../puphpet/puppet/modules/mongodb/README.md | 515 ----- .../puphpet/puppet/modules/mongodb/Rakefile | 1 - .../parser/functions/mongodb_password.rb | 14 - .../provider/mongodb_database/mongodb.rb | 36 - .../puppet/provider/mongodb_replset/mongo.rb | 232 -- .../puppet/provider/mongodb_user/mongodb.rb | 48 - .../lib/puppet/type/mongodb_database.rb | 27 - .../lib/puppet/type/mongodb_replset.rb | 35 - .../mongodb/lib/puppet/type/mongodb_user.rb | 63 - .../modules/mongodb/manifests/client.pp | 26 - .../mongodb/manifests/client/install.pp | 26 - .../puppet/modules/mongodb/manifests/db.pp | 43 - .../modules/mongodb/manifests/globals.pp | 27 - .../puppet/modules/mongodb/manifests/init.pp | 136 -- .../modules/mongodb/manifests/params.pp | 93 - .../modules/mongodb/manifests/replset.pp | 10 - .../puppet/modules/mongodb/manifests/repo.pp | 31 - .../modules/mongodb/manifests/repo/apt.pp | 25 - .../modules/mongodb/manifests/repo/yum.pp | 20 - .../modules/mongodb/manifests/server.pp | 77 - .../mongodb/manifests/server/config.pp | 92 - .../mongodb/manifests/server/install.pp | 34 - .../mongodb/manifests/server/service.pp | 23 - .../acceptance/nodesets/centos-6-vcloud.yml | 21 - .../acceptance/nodesets/centos-64-x64-pe.yml | 12 - .../acceptance/nodesets/centos-64-x64.yml | 10 - .../spec/acceptance/nodesets/default.yml | 10 - .../acceptance/nodesets/fedora-18-x64.yml | 10 - .../nodesets/multi-centos-6-vcloud.yml | 21 - .../nodesets/multi-centos-64-x64.yml | 10 - .../spec/acceptance/nodesets/sles-11-x64.yml | 10 - .../nodesets/ubuntu-server-10044-x64.yml | 10 - .../nodesets/ubuntu-server-12042-x64.yml | 10 - .../mongodb/spec/acceptance/replset_spec.rb | 69 - .../mongodb/spec/acceptance/server_spec.rb | 122 - .../spec/classes/client_install_spec.rb | 13 - .../modules/mongodb/spec/classes/repo_spec.rb | 32 - .../spec/classes/server_config_spec.rb | 116 - .../spec/classes/server_install_spec.rb | 16 - .../mongodb/spec/classes/server_spec.rb | 23 - .../modules/mongodb/spec/defines/db_spec.rb | 43 - .../modules/mongodb/spec/spec_helper.rb | 1 - .../mongodb/spec/spec_helper_acceptance.rb | 39 - .../mongodb/spec/spec_helper_system.rb | 34 - .../spec/unit/mongodb_password_spec.rb | 27 - .../provider/mongodb_database/mongodb_spec.rb | 35 - .../provider/mongodb_replset/mongodb_spec.rb | 148 -- .../provider/mongodb_user/mongodb_spec.rb | 66 - .../unit/puppet/type/mongodb_database_spec.rb | 24 - .../unit/puppet/type/mongodb_replset_spec.rb | 28 - .../unit/puppet/type/mongodb_user_spec.rb | 67 - .../mongodb/templates/mongodb.conf.erb | 172 -- .../puppet/modules/mongodb/tests/globals.pp | 3 - .../puppet/modules/mongodb/tests/init.pp | 1 - .../modules/mongodb/tests/replicaset.pp | 16 - .../puppet/modules/mongodb/tests/server.pp | 2 - .../puppet/modules/mysql/.fixtures.yml | 5 - .../puphpet/puppet/modules/mysql/.nodeset.yml | 31 - .../puphpet/puppet/modules/mysql/.travis.yml | 34 - .../puphpet/puppet/modules/mysql/CHANGELOG.md | 476 ---- .../puphpet/puppet/modules/mysql/Gemfile | 25 - .../puphpet/puppet/modules/mysql/LICENSE | 201 -- .../puphpet/puppet/modules/mysql/Modulefile | 9 - .../puphpet/puppet/modules/mysql/README.md | 523 ----- .../puphpet/puppet/modules/mysql/Rakefile | 2 - .../puphpet/puppet/modules/mysql/TODO | 8 - .../puppet/modules/mysql/files/mysqltuner.pl | 966 -------- .../parser/functions/mysql_deepmerge.rb | 58 - .../puppet/parser/functions/mysql_password.rb | 15 - .../parser/functions/mysql_strip_hash.rb | 21 - .../lib/puppet/provider/database/mysql.rb | 41 - .../puppet/provider/database_grant/mysql.rb | 199 -- .../puppet/provider/database_user/mysql.rb | 65 - .../mysql/lib/puppet/provider/mysql.rb | 70 - .../puppet/provider/mysql_database/mysql.rb | 68 - .../lib/puppet/provider/mysql_grant/mysql.rb | 120 - .../lib/puppet/provider/mysql_user/mysql.rb | 115 - .../modules/mysql/lib/puppet/type/database.rb | 21 - .../mysql/lib/puppet/type/database_grant.rb | 79 - .../mysql/lib/puppet/type/database_user.rb | 31 - .../mysql/lib/puppet/type/mysql_database.rb | 22 - .../mysql/lib/puppet/type/mysql_grant.rb | 72 - .../mysql/lib/puppet/type/mysql_user.rb | 45 - .../puppet/modules/mysql/manifests/backup.pp | 31 - .../modules/mysql/manifests/bindings.pp | 33 - .../modules/mysql/manifests/bindings/java.pp | 10 - .../modules/mysql/manifests/bindings/perl.pp | 10 - .../modules/mysql/manifests/bindings/php.pp | 10 - .../mysql/manifests/bindings/python.pp | 10 - .../modules/mysql/manifests/bindings/ruby.pp | 10 - .../puppet/modules/mysql/manifests/client.pp | 27 - .../modules/mysql/manifests/client/install.pp | 8 - .../puppet/modules/mysql/manifests/db.pp | 59 - .../puppet/modules/mysql/manifests/init.pp | 100 - .../puppet/modules/mysql/manifests/params.pp | 230 -- .../puppet/modules/mysql/manifests/server.pp | 82 - .../manifests/server/account_security.pp | 22 - .../modules/mysql/manifests/server/backup.pp | 61 - .../modules/mysql/manifests/server/config.pp | 30 - .../modules/mysql/manifests/server/install.pp | 9 - .../modules/mysql/manifests/server/monitor.pp | 24 - .../mysql/manifests/server/mysqltuner.pp | 9 - .../mysql/manifests/server/providers.pp | 8 - .../mysql/manifests/server/root_password.pp | 21 - .../modules/mysql/manifests/server/service.pp | 19 - .../puppet/modules/mysql/metadata.json | 76 - .../acceptance/mysql_account_delete_spec.rb | 25 - .../spec/acceptance/mysql_backup_spec.rb | 64 - .../spec/acceptance/mysql_bindings_spec.rb | 117 - .../mysql/spec/acceptance/mysql_db_spec.rb | 49 - .../acceptance/mysql_server_config_spec.rb | 47 - .../acceptance/mysql_server_monitor_spec.rb | 22 - .../mysql_server_root_password_spec.rb | 71 - .../spec/acceptance/mysql_server_spec.rb | 281 --- .../acceptance/nodesets/centos-64-x64-pe.yml | 12 - .../spec/acceptance/nodesets/default.yml | 10 - .../acceptance/nodesets/fedora-18-x64.yml | 10 - .../spec/acceptance/nodesets/sles-11-x64.yml | 10 - .../nodesets/ubuntu-server-10044-x64.yml | 10 - .../nodesets/ubuntu-server-12042-x64.yml | 10 - .../acceptance/types/mysql_database_spec.rb | 64 - .../spec/acceptance/types/mysql_grant_spec.rb | 308 --- .../spec/acceptance/types/mysql_user_spec.rb | 32 - .../mysql/spec/acceptance/unsupported_spec.rb | 10 - .../mysql/spec/classes/mysql_bindings_spec.rb | 58 - .../mysql/spec/classes/mysql_client_spec.rb | 16 - .../mysql_server_account_security_spec.rb | 41 - .../spec/classes/mysql_server_backup_spec.rb | 183 -- .../spec/classes/mysql_server_monitor_spec.rb | 31 - .../classes/mysql_server_mysqltuner_spec.rb | 5 - .../mysql/spec/classes/mysql_server_spec.rb | 193 -- .../mysql/spec/defines/mysql_db_spec.rb | 51 - .../puppet/modules/mysql/spec/spec.opts | 6 - .../puppet/modules/mysql/spec/spec_helper.rb | 5 - .../mysql/spec/spec_helper_acceptance.rb | 48 - .../modules/mysql/spec/spec_helper_system.rb | 25 - .../spec/system/mysql_account_delete_spec.rb | 35 - .../mysql/spec/system/mysql_backup_spec.rb | 62 - .../mysql/spec/system/mysql_bindings_spec.rb | 90 - .../mysql/spec/system/mysql_db_spec.rb | 61 - .../spec/system/mysql_server_monitor_spec.rb | 30 - .../system/mysql_server_root_password_spec.rb | 71 - .../mysql/spec/system/mysql_server_spec.rb | 106 - .../spec/system/types/mysql_grant_spec.rb | 314 --- .../spec/system/types/mysql_user_spec.rb | 35 - .../mysql/spec/unit/mysql_password_spec.rb | 27 - .../puppet/functions/mysql_deepmerge_spec.rb | 91 - .../puppet/provider/database/mysql_spec.rb | 86 - .../provider/database_grant/mysql_spec.rb | 95 - .../provider/database_user/mysql_spec.rb | 119 - .../provider/mysql_database/mysql_spec.rb | 118 - .../puppet/provider/mysql_user/mysql_spec.rb | 130 -- .../unit/puppet/type/mysql_database_spec.rb | 29 - .../spec/unit/puppet/type/mysql_grant_spec.rb | 44 - .../spec/unit/puppet/type/mysql_user_spec.rb | 30 - .../puppet/modules/mysql/templates/my.cnf.erb | 18 - .../modules/mysql/templates/my.cnf.pass.erb | 7 - .../modules/mysql/templates/my.conf.cnf.erb | 17 - .../mysql/templates/mysqlbackup.sh.erb | 72 - .../puppet/modules/mysql/tests/backup.pp | 8 - .../puppet/modules/mysql/tests/bindings.pp | 3 - .../puppet/modules/mysql/tests/init.pp | 1 - .../puppet/modules/mysql/tests/java.pp | 1 - .../modules/mysql/tests/mysql_database.pp | 12 - .../puppet/modules/mysql/tests/mysql_grant.pp | 5 - .../puppet/modules/mysql/tests/mysql_user.pp | 23 - .../puppet/modules/mysql/tests/perl.pp | 1 - .../puppet/modules/mysql/tests/python.pp | 1 - .../puppet/modules/mysql/tests/ruby.pp | 1 - .../puppet/modules/mysql/tests/server.pp | 3 - .../mysql/tests/server/account_security.pp | 4 - .../modules/mysql/tests/server/config.pp | 11 - .../puppet/modules/nginx/.fixtures.yml | 3 - .../puphpet/puppet/modules/nginx/.nodeset.yml | 31 - .../puphpet/puppet/modules/nginx/.travis.yml | 24 - .../puppet/modules/nginx/.travis/Gemfile | 14 - .../puppet/modules/nginx/.travis/Rakefile | 8 - .../puphpet/puppet/modules/nginx/Gemfile | 13 - .../puphpet/puppet/modules/nginx/LICENSE | 11 - .../puphpet/puppet/modules/nginx/Modulefile | 12 - .../puphpet/puppet/modules/nginx/Puppetfile | 5 - .../puppet/modules/nginx/Puppetfile.lock | 13 - .../puppet/modules/nginx/README.markdown | 240 -- .../puphpet/puppet/modules/nginx/Rakefile | 19 - .../puppet/modules/nginx/composer.json | 14 - .../puppet/modules/nginx/manifests/config.pp | 146 -- .../puppet/modules/nginx/manifests/init.pp | 173 -- .../puppet/modules/nginx/manifests/package.pp | 79 - .../modules/nginx/manifests/package/debian.pp | 73 - .../modules/nginx/manifests/package/redhat.pp | 71 - .../nginx/manifests/package/solaris.pp | 29 - .../modules/nginx/manifests/package/suse.pp | 30 - .../puppet/modules/nginx/manifests/params.pp | 123 -- .../nginx/manifests/resource/location.pp | 299 --- .../nginx/manifests/resource/mailhost.pp | 144 -- .../nginx/manifests/resource/upstream.pp | 68 - .../modules/nginx/manifests/resource/vhost.pp | 511 ----- .../puppet/modules/nginx/manifests/service.pp | 40 - .../modules/nginx/spec/classes/config_spec.rb | 324 --- .../modules/nginx/spec/classes/nginx_spec.rb | 61 - .../nginx/spec/classes/package_spec.rb | 163 -- .../modules/nginx/spec/classes/params_spec.rb | 15 - .../nginx/spec/classes/service_spec.rb | 38 - .../spec/defines/resource_location_spec.rb | 621 ------ .../spec/defines/resource_mailhost_spec.rb | 401 ---- .../spec/defines/resource_upstream_spec.rb | 93 - .../nginx/spec/defines/resource_vhost_spec.rb | 647 ------ .../puppet/modules/nginx/spec/spec_helper.rb | 8 - .../modules/nginx/spec/spec_helper_system.rb | 64 - .../modules/nginx/spec/system/basic_spec.rb | 33 - .../modules/nginx/spec/system/class_spec.rb | 35 - .../nginx/spec/system/nginx_mail_spec.rb | 42 - .../nginx/spec/system/nginx_proxy_spec.rb | 43 - .../nginx/spec/system/nginx_vhost_spec.rb | 100 - .../nginx/templates/conf.d/nginx.conf.erb | 55 - .../nginx/templates/conf.d/proxy.conf.erb | 11 - .../nginx/templates/conf.d/upstream.erb | 15 - .../nginx/templates/mailhost/mailhost.erb | 23 - .../nginx/templates/mailhost/mailhost_ssl.erb | 23 - .../nginx/templates/vhost/fastcgi_params.erb | 27 - .../nginx/templates/vhost/vhost_footer.erb | 25 - .../nginx/templates/vhost/vhost_header.erb | 54 - .../templates/vhost/vhost_location_alias.erb | 47 - .../vhost/vhost_location_directory.erb | 65 - .../templates/vhost/vhost_location_empty.erb | 13 - .../vhost/vhost_location_fastcgi.erb | 66 - .../templates/vhost/vhost_location_proxy.erb | 67 - .../vhost/vhost_location_stub_status.erb | 47 - .../templates/vhost/vhost_ssl_footer.erb | 33 - .../templates/vhost/vhost_ssl_header.erb | 84 - .../puppet/modules/nginx/tests/init.pp | 9 - .../modules/nginx/tests/location_alias.pp | 8 - .../puppet/modules/nginx/tests/upstream.pp | 10 - .../puppet/modules/nginx/tests/vhost.pp | 16 - .../puppet/modules/nginx/tests/vhost_ssl.pp | 17 - .../puphpet/puppet/modules/ntp/.fixtures.yml | 5 - .../puphpet/puppet/modules/ntp/.nodeset.yml | 35 - .../puphpet/puppet/modules/ntp/.travis.yml | 31 - .../puphpet/puppet/modules/ntp/CHANGELOG.md | 152 -- .../puppet/modules/ntp/CONTRIBUTING.md | 9 - .../puphpet/puppet/modules/ntp/Gemfile | 19 - .../puphpet/puppet/modules/ntp/LICENSE | 202 -- .../puphpet/puppet/modules/ntp/Modulefile | 11 - .../puppet/modules/ntp/README.markdown | 227 -- .../puphpet/puppet/modules/ntp/Rakefile | 1 - .../puppet/modules/ntp/manifests/config.pp | 24 - .../puppet/modules/ntp/manifests/init.pp | 56 - .../puppet/modules/ntp/manifests/install.pp | 9 - .../puppet/modules/ntp/manifests/params.pp | 185 -- .../puppet/modules/ntp/manifests/service.pp | 18 - .../puphpet/puppet/modules/ntp/metadata.json | 84 - .../modules/ntp/spec/acceptance/class_spec.rb | 36 - .../acceptance/nodesets/centos-64-x64-pe.yml | 12 - .../acceptance/nodesets/centos-64-x64.yml | 10 - .../acceptance/nodesets/centos-65-x64.yml | 10 - .../ntp/spec/acceptance/nodesets/default.yml | 10 - .../acceptance/nodesets/fedora-18-x64.yml | 10 - .../spec/acceptance/nodesets/sles-11-x64.yml | 10 - .../nodesets/ubuntu-server-10044-x64.yml | 10 - .../nodesets/ubuntu-server-12042-x64.yml | 10 - .../ntp/spec/acceptance/ntp_config_spec.rb | 36 - .../ntp/spec/acceptance/ntp_install_spec.rb | 31 - .../spec/acceptance/ntp_parameters_spec.rb | 165 -- .../ntp/spec/acceptance/ntp_service_spec.rb | 63 - .../spec/acceptance/preferred_servers_spec.rb | 24 - .../ntp/spec/acceptance/restrict_spec.rb | 20 - .../ntp/spec/acceptance/unsupported_spec.rb | 10 - .../modules/ntp/spec/classes/ntp_spec.rb | 272 --- .../modules/my_ntp/templates/ntp.conf.erb | 4 - .../puphpet/puppet/modules/ntp/spec/spec.opts | 6 - .../puppet/modules/ntp/spec/spec_helper.rb | 1 - .../ntp/spec/spec_helper_acceptance.rb | 34 - .../spec/unit/puppet/provider/README.markdown | 4 - .../ntp/spec/unit/puppet/type/README.markdown | 4 - .../puppet/modules/ntp/templates/ntp.conf.erb | 43 - .../puphpet/puppet/modules/ntp/tests/init.pp | 11 - .../puphpet/puppet/modules/php/.fixtures.yml | 10 - .../puphpet/puppet/modules/php/.gemfile | 6 - .../puphpet/puppet/modules/php/.project | 23 - .../puphpet/puppet/modules/php/.travis.yml | 21 - .../puphpet/puppet/modules/php/LICENSE | 17 - .../puphpet/puppet/modules/php/Modulefile | 9 - .../puphpet/puppet/modules/php/README.md | 157 -- .../puphpet/puppet/modules/php/Rakefile | 5 - .../php/lib/facter/php_fact_extension_dir.rb | 5 - .../php/lib/facter/php_fact_version.rb | 5 - .../puppet/modules/php/manifests/augeas.pp | 76 - .../puppet/modules/php/manifests/conf.pp | 112 - .../puppet/modules/php/manifests/devel.pp | 13 - .../puppet/modules/php/manifests/ini.pp | 26 - .../puppet/modules/php/manifests/init.pp | 298 --- .../puppet/modules/php/manifests/module.pp | 85 - .../puppet/modules/php/manifests/params.pp | 108 - .../puppet/modules/php/manifests/pear.pp | 38 - .../modules/php/manifests/pear/config.pp | 19 - .../modules/php/manifests/pear/module.pp | 119 - .../modules/php/manifests/pecl/config.pp | 23 - .../modules/php/manifests/pecl/module.pp | 126 -- .../puppet/modules/php/manifests/spec.pp | 22 - .../modules/php/spec/classes/php_spec.rb | 76 - .../php/spec/defines/php_module_spec.rb | 38 - .../php/spec/defines/php_pear_module_spec.rb | 49 - .../puppet/modules/php/spec/spec_helper.rb | 1 - .../modules/php/templates/extra-ini.erb | 11 - .../puppet/modules/php/templates/spec.erb | 8 - .../puppet/modules/postgresql/.fixtures.yml | 8 - .../puppet/modules/postgresql/.nodeset.yml | 31 - .../puppet/modules/postgresql/.project | 23 - .../puppet/modules/postgresql/.travis.yml | 28 - .../puppet/modules/postgresql/CHANGELOG.md | 550 ----- .../puphpet/puppet/modules/postgresql/Gemfile | 20 - .../puphpet/puppet/modules/postgresql/LICENSE | 202 -- .../puppet/modules/postgresql/Modulefile | 13 - .../puphpet/puppet/modules/postgresql/NOTICE | 14 - .../puppet/modules/postgresql/README.md | 901 -------- .../puppet/modules/postgresql/Rakefile | 11 - .../modules/postgresql/files/RPM-GPG-KEY-PGDG | 30 - .../files/validate_postgresql_connection.sh | 31 - .../postgresql_acls_to_resources_hash.rb | 76 - .../parser/functions/postgresql_escape.rb | 25 - .../parser/functions/postgresql_password.rb | 18 - .../puppet/provider/postgresql_conf/parsed.rb | 37 - .../puppet/provider/postgresql_psql/ruby.rb | 93 - .../lib/puppet/type/postgresql_conf.rb | 31 - .../lib/puppet/type/postgresql_psql.rb | 89 - .../modules/postgresql/manifests/client.pp | 29 - .../modules/postgresql/manifests/globals.pp | 94 - .../modules/postgresql/manifests/lib/devel.pp | 15 - .../modules/postgresql/manifests/lib/java.pp | 15 - .../postgresql/manifests/lib/python.pp | 13 - .../modules/postgresql/manifests/params.pp | 175 -- .../modules/postgresql/manifests/repo.pp | 22 - .../manifests/repo/apt_postgresql_org.pp | 30 - .../manifests/repo/yum_postgresql_org.pp | 38 - .../modules/postgresql/manifests/server.pp | 73 - .../postgresql/manifests/server/config.pp | 108 - .../manifests/server/config_entry.pp | 43 - .../postgresql/manifests/server/contrib.pp | 27 - .../postgresql/manifests/server/database.pp | 76 - .../manifests/server/database_grant.pp | 18 - .../modules/postgresql/manifests/server/db.pp | 38 - .../postgresql/manifests/server/firewall.pp | 21 - .../postgresql/manifests/server/grant.pp | 85 - .../postgresql/manifests/server/initdb.pp | 76 - .../postgresql/manifests/server/install.pp | 49 - .../postgresql/manifests/server/passwd.pp | 35 - .../manifests/server/pg_hba_rule.pp | 52 - .../postgresql/manifests/server/plperl.pp | 27 - .../postgresql/manifests/server/reload.pp | 15 - .../postgresql/manifests/server/role.pp | 85 - .../postgresql/manifests/server/service.pp | 45 - .../manifests/server/table_grant.pp | 20 - .../postgresql/manifests/server/tablespace.pp | 42 - .../manifests/validate_db_connection.pp | 75 - .../puppet/modules/postgresql/metadata.json | 82 - .../postgresql/spec/acceptance/client_spec.rb | 18 - .../spec/acceptance/common_patterns_spec.rb | 47 - .../spec/acceptance/contrib_spec.rb | 28 - .../spec/acceptance/lib/devel_spec.rb | 17 - .../spec/acceptance/lib/java_spec.rb | 20 - .../spec/acceptance/lib/python_spec.rb | 19 - .../acceptance/nodesets/centos-510-x64.yml | 10 - .../acceptance/nodesets/centos-59-x64.yml | 10 - .../acceptance/nodesets/centos-64-x64-pe.yml | 12 - .../acceptance/nodesets/centos-64-x64.yml | 10 - .../acceptance/nodesets/debian-607-x64.yml | 10 - .../acceptance/nodesets/debian-73-x64.yml | 10 - .../spec/acceptance/nodesets/default.yml | 10 - .../nodesets/ubuntu-server-10044-x64.yml | 10 - .../nodesets/ubuntu-server-12042-x64.yml | 10 - .../spec/acceptance/postgresql_psql_spec.rb | 43 - .../acceptance/server/config_entry_spec.rb | 26 - .../acceptance/server/database_grant_spec.rb | 48 - .../spec/acceptance/server/database_spec.rb | 29 - .../spec/acceptance/server/db_spec.rb | 138 -- .../spec/acceptance/server/grant_spec.rb | 49 - .../acceptance/server/pg_hba_rule_spec.rb | 72 - .../spec/acceptance/server/plperl_spec.rb | 25 - .../spec/acceptance/server/role_spec.rb | 88 - .../acceptance/server/table_grant_spec.rb | 124 -- .../spec/acceptance/server/tablespace_spec.rb | 67 - .../postgresql/spec/acceptance/server_spec.rb | 188 -- .../spec/acceptance/unsupported_spec.rb | 16 - .../acceptance/validate_db_connection_spec.rb | 79 - .../modules/postgresql/spec/spec_helper.rb | 30 - .../postgresql/spec/spec_helper_acceptance.rb | 75 - .../spec/unit/classes/client_spec.rb | 36 - .../spec/unit/classes/globals_spec.rb | 29 - .../spec/unit/classes/lib/devel_spec.rb | 12 - .../spec/unit/classes/lib/java_spec.rb | 40 - .../spec/unit/classes/lib/python_spec.rb | 31 - .../spec/unit/classes/params_spec.rb | 12 - .../postgresql/spec/unit/classes/repo_spec.rb | 18 - .../spec/unit/classes/server/contrib_spec.rb | 42 - .../spec/unit/classes/server/initdb_spec.rb | 29 - .../spec/unit/classes/server/plperl_spec.rb | 45 - .../spec/unit/classes/server_spec.rb | 100 - .../unit/defines/server/config_entry_spec.rb | 23 - .../defines/server/database_grant_spec.rb | 26 - .../spec/unit/defines/server/database_spec.rb | 16 - .../spec/unit/defines/server/db_spec.rb | 28 - .../spec/unit/defines/server/grant_spec.rb | 24 - .../unit/defines/server/pg_hba_rule_spec.rb | 161 -- .../spec/unit/defines/server/role_spec.rb | 23 - .../unit/defines/server/table_grant_spec.rb | 27 - .../unit/defines/server/tablespace_spec.rb | 23 - .../defines/validate_db_connection_spec.rb | 35 - .../postgresql_acls_to_resources_hash_spec.rb | 137 -- .../unit/functions/postgresql_escape_spec.rb | 10 - .../functions/postgresql_password_spec.rb | 6 - .../provider/postgresql_conf/parsed_spec.rb | 112 - .../provider/postgresql_psql/ruby_spec.rb | 140 -- .../unit/puppet/type/postgresql_psql_spec.rb | 92 - .../spec/unit/type/postgresql_conf_spec.rb | 50 - .../postgresql/templates/pg_hba_rule.conf | 5 - .../puphpet/puppet/modules/puphpet/LICENSE | 22 - .../puphpet/puppet/modules/puphpet/README.md | 3 - .../puphpet/files/xdebug_cli_alias.erb | 2 - .../parser/functions/hash_key_equals.rb | 36 - .../puppet/parser/functions/hash_key_true.rb | 42 - .../lib/puppet/parser/functions/value_true.rb | 45 - .../modules/puphpet/manifests/adminer.pp | 23 - .../puphpet/manifests/apache/modpagespeed.pp | 50 - .../puphpet/manifests/apache/modspdy.pp | 86 - .../puppet/modules/puphpet/manifests/hhvm.pp | 147 -- .../puppet/modules/puphpet/manifests/ini.pp | 305 --- .../puppet/modules/puphpet/manifests/init.pp | 1 - .../modules/puphpet/manifests/mariadb.pp | 50 - .../puppet/modules/puphpet/manifests/nginx.pp | 38 - .../modules/puphpet/manifests/params.pp | 92 - .../puphpet/manifests/php/extra_repos.pp | 16 - .../modules/puphpet/manifests/php/module.pp | 33 - .../modules/puphpet/manifests/php/pear.pp | 45 - .../modules/puphpet/manifests/php/pecl.pp | 120 - .../modules/puphpet/manifests/phpmyadmin.pp | 46 - .../modules/puphpet/manifests/python/pip.pp | 22 - .../modules/puphpet/manifests/ssl_cert.pp | 36 - .../modules/puphpet/manifests/xdebug.pp | 32 - .../modules/puphpet/manifests/xhprof.pp | 93 - .../templates/apache/custom_fragment.erb | 1 - .../templates/apache/hhvm-httpd.conf.erb | 6 - .../templates/apache/mod/spdy/php-wrapper.erb | 6 - .../templates/apache/mod/spdy/spdy_conf.erb | 8 - .../puphpet/templates/nginx/default_conf.erb | 29 - .../puppet/modules/puppi/.fixtures.yml | 6 - .../puphpet/puppet/modules/puppi/.gemfile | 7 - .../puphpet/puppet/modules/puppi/.project | 23 - .../puphpet/puppet/modules/puppi/.travis.yml | 21 - .../puphpet/puppet/modules/puppi/LICENSE | 17 - .../puphpet/puppet/modules/puppi/Modulefile | 9 - .../puphpet/puppet/modules/puppi/README.md | 257 --- .../puppet/modules/puppi/README_check.md | 67 - .../puppet/modules/puppi/README_deploy.md | 263 --- .../puppet/modules/puppi/README_info.md | 60 - .../puppet/modules/puppi/README_log.md | 44 - .../puphpet/puppet/modules/puppi/Rakefile | 6 - .../puppet/modules/puppi/composer.json | 13 - .../modules/puppi/files/info/readme/readme | 2 - .../puppi/files/info/readme/readme-default | 4 - .../puppet/modules/puppi/files/mailpuppicheck | 72 - .../modules/puppi/files/mcollective/mc-puppi | 65 - .../modules/puppi/files/mcollective/puppi.ddl | 68 - .../modules/puppi/files/mcollective/puppi.rb | 83 - .../puppi/files/mcollective/puppicheck | 22 - .../puppi/files/mcollective/puppideploy | 22 - .../modules/puppi/files/scripts/archive.sh | 168 -- .../puppi/files/scripts/check_project.sh | 45 - .../puppi/files/scripts/checkwardir.sh | 63 - .../puppi/files/scripts/clean_filelist.sh | 35 - .../modules/puppi/files/scripts/database.sh | 96 - .../modules/puppi/files/scripts/delete.sh | 26 - .../modules/puppi/files/scripts/deploy.sh | 59 - .../puppi/files/scripts/deploy_files.sh | 69 - .../modules/puppi/files/scripts/execute.sh | 12 - .../modules/puppi/files/scripts/firewall.sh | 63 - .../modules/puppi/files/scripts/functions | 229 -- .../modules/puppi/files/scripts/get_file.sh | 165 -- .../puppi/files/scripts/get_filesfromlist.sh | 67 - .../puppi/files/scripts/get_maven_files.sh | 99 - .../puppi/files/scripts/get_metadata.sh | 124 -- .../puppet/modules/puppi/files/scripts/git.sh | 176 -- .../puppet/modules/puppi/files/scripts/header | 25 - .../modules/puppi/files/scripts/predeploy.sh | 95 - .../puppi/files/scripts/predeploy_tar.sh | 37 - .../puppi/files/scripts/report_mail.sh | 27 - .../puppi/files/scripts/report_mongo.sh | 112 - .../modules/puppi/files/scripts/service.sh | 42 - .../puppet/modules/puppi/files/scripts/svn.sh | 215 -- .../modules/puppi/files/scripts/wait.sh | 54 - .../modules/puppi/files/scripts/yant.sh | 38 - .../puppet/modules/puppi/files/scripts/yum.sh | 93 - .../modules/puppi/lib/facter/last_run.rb | 7 - .../puppi/lib/facter/puppi_projects.rb | 7 - .../lib/facter/windows_common_appdata.rb | 10 - .../lib/puppet/parser/functions/any2bool.rb | 44 - .../puppet/parser/functions/bool2ensure.rb | 32 - .../puppet/parser/functions/get_class_args.rb | 32 - .../puppet/parser/functions/get_magicvar.rb | 23 - .../parser/functions/get_module_path.rb | 17 - .../lib/puppet/parser/functions/nslookup.rb | 44 - .../puppet/parser/functions/options_lookup.rb | 56 - .../puppet/parser/functions/params_lookup.rb | 77 - .../lib/puppet/parser/functions/url_parse.rb | 44 - .../puppet/modules/puppi/manifests/check.pp | 50 - .../modules/puppi/manifests/configure.pp | 40 - .../modules/puppi/manifests/dependencies.pp | 38 - .../puppet/modules/puppi/manifests/deploy.pp | 40 - .../puppet/modules/puppi/manifests/extras.pp | 208 -- .../puppet/modules/puppi/manifests/helper.pp | 29 - .../puppet/modules/puppi/manifests/helpers.pp | 16 - .../puppet/modules/puppi/manifests/info.pp | 46 - .../modules/puppi/manifests/info/instance.pp | 33 - .../modules/puppi/manifests/info/module.pp | 59 - .../modules/puppi/manifests/info/readme.pp | 69 - .../puppet/modules/puppi/manifests/init.pp | 77 - .../modules/puppi/manifests/initialize.pp | 37 - .../puppi/manifests/install_packages.pp | 83 - .../puppet/modules/puppi/manifests/log.pp | 36 - .../puppi/manifests/mcollective/client.pp | 60 - .../puppi/manifests/mcollective/server.pp | 34 - .../modules/puppi/manifests/netinstall.pp | 169 -- .../puppet/modules/puppi/manifests/one.pp | 31 - .../puppet/modules/puppi/manifests/params.pp | 104 - .../puppet/modules/puppi/manifests/project.pp | 100 - .../modules/puppi/manifests/project/README | 31 - .../puppi/manifests/project/archive.pp | 406 ---- .../puppi/manifests/project/builder.pp | 561 ----- .../modules/puppi/manifests/project/dir.pp | 450 ---- .../modules/puppi/manifests/project/files.pp | 482 ---- .../modules/puppi/manifests/project/git.pp | 418 ---- .../modules/puppi/manifests/project/maven.pp | 814 ------- .../modules/puppi/manifests/project/mysql.pp | 425 ---- .../puppi/manifests/project/service.pp | 352 --- .../modules/puppi/manifests/project/svn.pp | 438 ---- .../modules/puppi/manifests/project/tar.pp | 479 ---- .../modules/puppi/manifests/project/war.pp | 525 ----- .../puppi/manifests/project/y4maven.pp | 723 ------ .../modules/puppi/manifests/project/yum.pp | 347 --- .../puppet/modules/puppi/manifests/report.pp | 38 - .../modules/puppi/manifests/rollback.pp | 36 - .../puppet/modules/puppi/manifests/run.pp | 31 - .../modules/puppi/manifests/runscript.pp | 154 -- .../puppet/modules/puppi/manifests/skel.pp | 184 -- .../puppet/modules/puppi/manifests/todo.pp | 57 - .../puppet/modules/puppi/manifests/two.pp | 13 - .../puppet/modules/puppi/manifests/ze.pp | 35 - .../modules/puppi/spec/classes/puppi_spec.rb | 17 - .../puppi/spec/defines/puppi_check_spec.rb | 26 - .../puppi/spec/defines/puppi_deploy_spec.rb | 25 - .../puppi/spec/defines/puppi_helper_spec.rb | 20 - .../puppi/spec/defines/puppi_info_spec.rb | 24 - .../spec/defines/puppi_initialize_spec.rb | 25 - .../puppi/spec/defines/puppi_log_spec.rb | 22 - .../puppi/spec/defines/puppi_project_spec.rb | 25 - .../puppi/spec/defines/puppi_report_spec.rb | 25 - .../puppi/spec/defines/puppi_rollback_spec.rb | 25 - .../puppi/spec/defines/puppi_run_spec.rb | 17 - .../puppi/spec/defines/puppi_todo_spec.rb | 24 - .../puppi/spec/defines/puppi_ze_spec.rb | 20 - .../puppi/spec/functions/any2bool_spec.rb | 20 - .../puppi/spec/functions/bool2ensure_spec.rb | 20 - .../puppi/spec/functions/url_parse_spec.rb | 43 - .../puppet/modules/puppi/spec/spec_helper.rb | 1 - .../puppi/templates/helpers/standard.yml.erb | 49 - .../puppet/modules/puppi/templates/info.erb | 11 - .../modules/puppi/templates/info/instance.erb | 89 - .../modules/puppi/templates/info/module.erb | 89 - .../modules/puppi/templates/info/puppet.erb | 30 - .../modules/puppi/templates/info/readme.erb | 22 - .../puppi/templates/install_packages.erb | 8 - .../puppet/modules/puppi/templates/log.erb | 2 - .../puppi/templates/project/config.erb | 33 - .../modules/puppi/templates/puppi.conf.erb | 15 - .../puppet/modules/puppi/templates/puppi.erb | 517 ----- .../modules/puppi/templates/puppi_clean.erb | 10 - .../puppet/modules/puppi/templates/todo.erb | 42 - .../puppet/modules/rabbitmq/.fixtures.yml | 9 - .../puppet/modules/rabbitmq/.nodeset.yml | 35 - .../puppet/modules/rabbitmq/.travis.yml | 38 - .../puphpet/puppet/modules/rabbitmq/CHANGELOG | 115 - .../puphpet/puppet/modules/rabbitmq/Gemfile | 26 - .../puphpet/puppet/modules/rabbitmq/LICENSE | 201 -- .../puppet/modules/rabbitmq/Modulefile | 13 - .../puphpet/puppet/modules/rabbitmq/README.md | 394 ---- .../puphpet/puppet/modules/rabbitmq/Rakefile | 10 - .../puphpet/puppet/modules/rabbitmq/TODO | 10 - .../modules/rabbitmq/files/README.markdown | 22 - .../files/plugins/amqp_client-2.3.1.ez | Bin 151912 -> 0 bytes .../files/plugins/rabbit_stomp-2.3.1.ez | Bin 55937 -> 0 bytes .../lib/facter/rabbitmq_erlang_cookie.rb | 16 - .../rabbitmq_exchange/rabbitmqadmin.rb | 89 - .../rabbitmq_plugin/rabbitmqplugins.rb | 47 - .../provider/rabbitmq_user/rabbitmqctl.rb | 98 - .../rabbitmq_user_permissions/rabbitmqctl.rb | 105 - .../provider/rabbitmq_vhost/rabbitmqctl.rb | 35 - .../lib/puppet/type/rabbitmq_exchange.rb | 54 - .../lib/puppet/type/rabbitmq_plugin.rb | 19 - .../rabbitmq/lib/puppet/type/rabbitmq_user.rb | 46 - .../puppet/type/rabbitmq_user_permissions.rb | 59 - .../lib/puppet/type/rabbitmq_vhost.rb | 19 - .../modules/rabbitmq/manifests/config.pp | 121 - .../puppet/modules/rabbitmq/manifests/init.pp | 176 -- .../modules/rabbitmq/manifests/install.pp | 21 - .../manifests/install/rabbitmqadmin.pp | 23 - .../modules/rabbitmq/manifests/management.pp | 19 - .../modules/rabbitmq/manifests/params.pp | 98 - .../modules/rabbitmq/manifests/policy.pp | 15 - .../modules/rabbitmq/manifests/repo/apt.pp | 33 - .../modules/rabbitmq/manifests/repo/rhel.pp | 12 - .../modules/rabbitmq/manifests/server.pp | 100 - .../modules/rabbitmq/manifests/service.pp | 40 - .../modules/rabbitmq/spec/README.markdown | 7 - .../rabbitmq/spec/acceptance/class_spec.rb | 96 - .../spec/acceptance/clustering_spec.rb | 34 - .../spec/acceptance/delete_guest_user_spec.rb | 26 - .../spec/acceptance/nodesets/default.yml | 11 - .../nodesets/ubuntu-server-1310-x64.yml | 11 - .../nodesets/ubuntu-server-1404-x64.yml | 11 - .../spec/acceptance/rabbitmqadmin_spec.rb | 46 - .../rabbitmq/spec/acceptance/server_spec.rb | 96 - .../rabbitmq/spec/classes/rabbitmq_spec.rb | 531 ----- .../puppet/modules/rabbitmq/spec/spec.opts | 6 - .../modules/rabbitmq/spec/spec_helper.rb | 1 - .../rabbitmq/spec/spec_helper_acceptance.rb | 38 - .../unit/facts/rabbitmq_erlang_cookie_spec.rb | 19 - .../rabbitmq_exchange/rabbitmqadmin_spec.rb | 65 - .../rabbitmq_user/rabbitmqctl_spec.rb | 236 -- .../rabbitmqctl_spec.rb | 109 - .../rabbitmq_vhost/rabbitmqctl_spec.rb | 45 - .../puppet/type/rabbitmq_exchange_spec.rb | 54 - .../type/rabbitmq_user_permissions_spec.rb | 55 - .../unit/puppet/type/rabbitmq_user_spec.rb | 42 - .../unit/puppet/type/rabbitmq_vhost_spec.rb | 21 - .../rabbitmq/templates/README.markdown | 23 - .../rabbitmq/templates/rabbitmq-env.conf.erb | 5 - .../rabbitmq/templates/rabbitmq.config.erb | 56 - .../modules/rabbitmq/tests/erlang_deps.pp | 5 - .../puppet/modules/rabbitmq/tests/full.pp | 21 - .../modules/rabbitmq/tests/permissions/add.pp | 9 - .../puppet/modules/rabbitmq/tests/plugin.pp | 11 - .../puppet/modules/rabbitmq/tests/repo/apt.pp | 2 - .../puppet/modules/rabbitmq/tests/server.pp | 5 - .../puppet/modules/rabbitmq/tests/service.pp | 1 - .../puppet/modules/rabbitmq/tests/site.pp | 16 - .../puppet/modules/rabbitmq/tests/user/add.pp | 4 - .../modules/rabbitmq/tests/vhosts/add.pp | 1 - .../puphpet/puppet/modules/redis/.travis.yml | 24 - .../puphpet/puppet/modules/redis/CHANGELOG | 63 - .../puphpet/puppet/modules/redis/Gemfile | 7 - .../puphpet/puppet/modules/redis/LICENSE | 15 - .../puphpet/puppet/modules/redis/Modulefile | 13 - .../puphpet/puppet/modules/redis/README.md | 57 - .../puphpet/puppet/modules/redis/Rakefile | 6 - .../puphpet/puppet/modules/redis/Vagrantfile | 18 - .../puppet/modules/redis/manifests/init.pp | 160 -- .../puppet/modules/redis/manifests/params.pp | 39 - .../puppet/modules/redis/spec/spec_helper.rb | 17 - .../redis/templates/redis.debian.conf.erb | 221 -- .../redis/templates/redis.logrotate.erb | 9 - .../redis/templates/redis.rhel.conf.erb | 549 ----- .../puppet/modules/redis/tests/init.pp | 15 - .../puphpet/puppet/modules/sqlite/Modulefile | 13 - .../puphpet/puppet/modules/sqlite/README.md | 32 - .../puppet/modules/sqlite/manifests/db.pp | 44 - .../puppet/modules/sqlite/manifests/init.pp | 16 - .../puppet/modules/sqlite/metadata.json | 12 - .../puppet/modules/sqlite/spec/spec.opts | 6 - .../puppet/modules/sqlite/spec/spec_helper.rb | 18 - .../puppet/modules/sqlite/tests/init.pp | 1 - .../puppet/modules/staging/.fixtures.yml | 5 - .../puppet/modules/staging/.travis.yml | 22 - .../puphpet/puppet/modules/staging/Gemfile | 25 - .../puphpet/puppet/modules/staging/LICENSE | 11 - .../puphpet/puppet/modules/staging/Modulefile | 10 - .../puphpet/puppet/modules/staging/README.md | 57 - .../puphpet/puppet/modules/staging/Rakefile | 51 - .../puppet/modules/staging/Vagrantfile | 29 - .../puppet/modules/staging/docs/deploy.html | 113 - .../puppet/modules/staging/docs/extract.html | 176 -- .../puppet/modules/staging/docs/file.html | 178 -- .../puppet/modules/staging/docs/init.html | 87 - .../puppet/modules/staging/files/sample | 1 - .../modules/staging/files/sample.tar.bz2 | Bin 27984 -> 0 bytes .../modules/staging/files/sample.tar.gz | Bin 33352 -> 0 bytes .../staging/lib/facter/staging_http_get.rb | 29 - .../staging/lib/facter/staging_windir.rb | 11 - .../puppet/parser/functions/scope_defaults.rb | 17 - .../puppet/parser/functions/staging_parse.rb | 36 - .../modules/staging/manifests/deploy.pp | 42 - .../modules/staging/manifests/extract.pp | 95 - .../puppet/modules/staging/manifests/file.pp | 115 - .../puppet/modules/staging/manifests/init.pp | 28 - .../modules/staging/manifests/params.pp | 26 - .../spec/defines/staging_deploy_spec.rb | 26 - .../spec/defines/staging_extract_spec.rb | 58 - .../staging/spec/defines/staging_file_spec.rb | 157 -- .../modules/staging/spec/fixtures/hiera.yaml | 7 - .../modules/staging/spec/spec_helper.rb | 2 - .../parser/functions/scope_defaults_spec.rb | 45 - .../parser/functions/staging_parse_spec.rb | 51 - .../puppet/modules/staging/tests/deploy.pp | 4 - .../puppet/modules/staging/tests/extract.pp | 25 - .../puppet/modules/staging/tests/file.pp | 17 - .../puppet/modules/staging/tests/init.pp | 1 - .../modules/staging/tests/scope_defaults.pp | 7 - .../modules/staging/tests/staging_parse.pp | 12 - .../puppet/modules/stdlib/CHANGELOG.md | 413 ---- .../puppet/modules/stdlib/CONTRIBUTING.md | 65 - .../puphpet/puppet/modules/stdlib/Gemfile | 33 - .../puppet/modules/stdlib/Gemfile.lock | 174 -- .../puphpet/puppet/modules/stdlib/LICENSE | 19 - .../puphpet/puppet/modules/stdlib/Modulefile | 11 - .../puppet/modules/stdlib/README.markdown | 1304 ----------- .../modules/stdlib/README_DEVELOPER.markdown | 35 - .../modules/stdlib/README_SPECS.markdown | 7 - .../modules/stdlib/RELEASE_PROCESS.markdown | 24 - .../puphpet/puppet/modules/stdlib/Rakefile | 18 - .../modules/stdlib/lib/facter/facter_dot_d.rb | 202 -- .../modules/stdlib/lib/facter/pe_version.rb | 53 - .../stdlib/lib/facter/puppet_vardir.rb | 26 - .../modules/stdlib/lib/facter/root_home.rb | 32 - .../stdlib/lib/facter/util/puppet_settings.rb | 21 - .../stdlib/lib/puppet/parser/functions/abs.rb | 36 - .../lib/puppet/parser/functions/any2array.rb | 33 - .../lib/puppet/parser/functions/base64.rb | 37 - .../lib/puppet/parser/functions/bool2num.rb | 49 - .../lib/puppet/parser/functions/capitalize.rb | 34 - .../lib/puppet/parser/functions/chomp.rb | 35 - .../lib/puppet/parser/functions/chop.rb | 37 - .../lib/puppet/parser/functions/concat.rb | 41 - .../lib/puppet/parser/functions/count.rb | 22 - .../lib/puppet/parser/functions/deep_merge.rb | 44 - .../parser/functions/defined_with_params.rb | 35 - .../lib/puppet/parser/functions/delete.rb | 46 - .../lib/puppet/parser/functions/delete_at.rb | 49 - .../parser/functions/delete_undef_values.rb | 34 - .../puppet/parser/functions/delete_values.rb | 26 - .../lib/puppet/parser/functions/difference.rb | 36 - .../lib/puppet/parser/functions/dirname.rb | 15 - .../lib/puppet/parser/functions/downcase.rb | 33 - .../lib/puppet/parser/functions/empty.rb | 28 - .../parser/functions/ensure_packages.rb | 35 - .../parser/functions/ensure_resource.rb | 45 - .../lib/puppet/parser/functions/flatten.rb | 33 - .../lib/puppet/parser/functions/floor.rb | 25 - .../puppet/parser/functions/fqdn_rotate.rb | 46 - .../parser/functions/get_module_path.rb | 17 - .../lib/puppet/parser/functions/getparam.rb | 35 - .../lib/puppet/parser/functions/getvar.rb | 26 - .../lib/puppet/parser/functions/grep.rb | 33 - .../parser/functions/has_interface_with.rb | 52 - .../puppet/parser/functions/has_ip_address.rb | 25 - .../puppet/parser/functions/has_ip_network.rb | 25 - .../lib/puppet/parser/functions/has_key.rb | 28 - .../lib/puppet/parser/functions/hash.rb | 41 - .../puppet/parser/functions/intersection.rb | 34 - .../lib/puppet/parser/functions/is_array.rb | 22 - .../lib/puppet/parser/functions/is_bool.rb | 22 - .../puppet/parser/functions/is_domain_name.rb | 50 - .../lib/puppet/parser/functions/is_float.rb | 30 - .../parser/functions/is_function_available.rb | 26 - .../lib/puppet/parser/functions/is_hash.rb | 22 - .../lib/puppet/parser/functions/is_integer.rb | 45 - .../puppet/parser/functions/is_ip_address.rb | 32 - .../puppet/parser/functions/is_mac_address.rb | 27 - .../lib/puppet/parser/functions/is_numeric.rb | 75 - .../lib/puppet/parser/functions/is_string.rb | 26 - .../lib/puppet/parser/functions/join.rb | 41 - .../parser/functions/join_keys_to_values.rb | 47 - .../lib/puppet/parser/functions/keys.rb | 26 - .../lib/puppet/parser/functions/loadyaml.rb | 20 - .../lib/puppet/parser/functions/lstrip.rb | 33 - .../stdlib/lib/puppet/parser/functions/max.rb | 21 - .../lib/puppet/parser/functions/member.rb | 44 - .../lib/puppet/parser/functions/merge.rb | 34 - .../stdlib/lib/puppet/parser/functions/min.rb | 21 - .../lib/puppet/parser/functions/num2bool.rb | 43 - .../lib/puppet/parser/functions/parsejson.rb | 24 - .../lib/puppet/parser/functions/parseyaml.rb | 24 - .../lib/puppet/parser/functions/pick.rb | 29 - .../puppet/parser/functions/pick_default.rb | 35 - .../lib/puppet/parser/functions/prefix.rb | 45 - .../lib/puppet/parser/functions/range.rb | 88 - .../lib/puppet/parser/functions/reject.rb | 31 - .../lib/puppet/parser/functions/reverse.rb | 28 - .../lib/puppet/parser/functions/rstrip.rb | 32 - .../lib/puppet/parser/functions/shuffle.rb | 46 - .../lib/puppet/parser/functions/size.rb | 48 - .../lib/puppet/parser/functions/sort.rb | 27 - .../lib/puppet/parser/functions/squeeze.rb | 36 - .../lib/puppet/parser/functions/str2bool.rb | 46 - .../parser/functions/str2saltedsha512.rb | 32 - .../lib/puppet/parser/functions/strftime.rb | 107 - .../lib/puppet/parser/functions/strip.rb | 39 - .../lib/puppet/parser/functions/suffix.rb | 45 - .../lib/puppet/parser/functions/swapcase.rb | 39 - .../lib/puppet/parser/functions/time.rb | 49 - .../lib/puppet/parser/functions/to_bytes.rb | 28 - .../lib/puppet/parser/functions/type.rb | 50 - .../lib/puppet/parser/functions/union.rb | 34 - .../lib/puppet/parser/functions/unique.rb | 51 - .../lib/puppet/parser/functions/upcase.rb | 41 - .../lib/puppet/parser/functions/uriescape.rb | 35 - .../functions/validate_absolute_path.rb | 56 - .../puppet/parser/functions/validate_array.rb | 33 - .../parser/functions/validate_augeas.rb | 81 - .../puppet/parser/functions/validate_bool.rb | 34 - .../puppet/parser/functions/validate_cmd.rb | 48 - .../puppet/parser/functions/validate_hash.rb | 33 - .../parser/functions/validate_ipv4_address.rb | 48 - .../parser/functions/validate_ipv6_address.rb | 49 - .../puppet/parser/functions/validate_re.rb | 40 - .../parser/functions/validate_slength.rb | 71 - .../parser/functions/validate_string.rb | 33 - .../lib/puppet/parser/functions/values.rb | 39 - .../lib/puppet/parser/functions/values_at.rb | 98 - .../stdlib/lib/puppet/parser/functions/zip.rb | 65 - .../lib/puppet/provider/file_line/ruby.rb | 83 - .../modules/stdlib/lib/puppet/type/anchor.rb | 46 - .../stdlib/lib/puppet/type/file_line.rb | 79 - .../puppet/modules/stdlib/manifests/init.pp | 20 - .../puppet/modules/stdlib/manifests/stages.pp | 43 - .../puppet/modules/stdlib/metadata.json | 509 ----- .../stdlib/spec/acceptance/abs_spec.rb | 30 - .../stdlib/spec/acceptance/any2array_spec.rb | 49 - .../stdlib/spec/acceptance/base64_spec.rb | 18 - .../stdlib/spec/acceptance/bool2num_spec.rb | 34 - .../stdlib/spec/acceptance/build_csv.rb | 83 - .../stdlib/spec/acceptance/capitalize_spec.rb | 33 - .../stdlib/spec/acceptance/chomp_spec.rb | 21 - .../stdlib/spec/acceptance/chop_spec.rb | 45 - .../stdlib/spec/acceptance/concat_spec.rb | 18 - .../stdlib/spec/acceptance/count_spec.rb | 30 - .../stdlib/spec/acceptance/deep_merge_spec.rb | 20 - .../acceptance/defined_with_params_spec.rb | 22 - .../stdlib/spec/acceptance/delete_at_spec.rb | 19 - .../stdlib/spec/acceptance/delete_spec.rb | 19 - .../acceptance/delete_undef_values_spec.rb | 19 - .../spec/acceptance/delete_values_spec.rb | 25 - .../stdlib/spec/acceptance/difference_spec.rb | 26 - .../stdlib/spec/acceptance/dirname_spec.rb | 42 - .../stdlib/spec/acceptance/downcase_spec.rb | 39 - .../stdlib/spec/acceptance/empty_spec.rb | 39 - .../spec/acceptance/ensure_packages_spec.rb | 24 - .../spec/acceptance/ensure_resource_spec.rb | 24 - .../stdlib/spec/acceptance/flatten_spec.rb | 39 - .../stdlib/spec/acceptance/floor_spec.rb | 39 - .../spec/acceptance/fqdn_rotate_spec.rb | 33 - .../spec/acceptance/get_module_path_spec.rb | 41 - .../stdlib/spec/acceptance/getparam_spec.rb | 25 - .../stdlib/spec/acceptance/getvar_spec.rb | 26 - .../stdlib/spec/acceptance/grep_spec.rb | 26 - .../acceptance/has_interface_with_spec.rb | 44 - .../spec/acceptance/has_ip_address_spec.rb | 33 - .../spec/acceptance/has_ip_network_spec.rb | 33 - .../stdlib/spec/acceptance/has_key_spec.rb | 41 - .../stdlib/spec/acceptance/hash_spec.rb | 26 - .../spec/acceptance/intersection_spec.rb | 27 - .../stdlib/spec/acceptance/is_array_spec.rb | 67 - .../stdlib/spec/acceptance/is_bool_spec.rb | 81 - .../spec/acceptance/is_domain_name_spec.rb | 83 - .../stdlib/spec/acceptance/is_float_spec.rb | 86 - .../acceptance/is_function_available_spec.rb | 58 - .../stdlib/spec/acceptance/is_hash_spec.rb | 63 - .../stdlib/spec/acceptance/is_integer_spec.rb | 95 - .../spec/acceptance/is_ip_address_spec.rb | 80 - .../spec/acceptance/is_mac_address_spec.rb | 38 - .../stdlib/spec/acceptance/is_numeric_spec.rb | 95 - .../stdlib/spec/acceptance/is_string_spec.rb | 102 - .../acceptance/join_keys_to_values_spec.rb | 24 - .../stdlib/spec/acceptance/join_spec.rb | 26 - .../stdlib/spec/acceptance/keys_spec.rb | 23 - .../stdlib/spec/acceptance/loadyaml_spec.rb | 31 - .../stdlib/spec/acceptance/lstrip_spec.rb | 34 - .../stdlib/spec/acceptance/max_spec.rb | 20 - .../stdlib/spec/acceptance/member_spec.rb | 26 - .../stdlib/spec/acceptance/merge_spec.rb | 23 - .../stdlib/spec/acceptance/min_spec.rb | 20 - .../acceptance/nodesets/centos-6-vcloud.yml | 15 - .../acceptance/nodesets/centos-64-x64-pe.yml | 12 - .../acceptance/nodesets/centos-64-x64.yml | 10 - .../spec/acceptance/nodesets/default.yml | 10 - .../acceptance/nodesets/fedora-18-x64.yml | 10 - .../spec/acceptance/nodesets/sles-11-x64.yml | 10 - .../nodesets/ubuntu-server-10044-x64.yml | 10 - .../nodesets/ubuntu-server-12042-x64.yml | 10 - .../stdlib/spec/acceptance/num2bool_spec.rb | 76 - .../stdlib/spec/acceptance/parsejson_spec.rb | 34 - .../stdlib/spec/acceptance/parseyaml_spec.rb | 35 - .../spec/acceptance/pick_default_spec.rb | 54 - .../stdlib/spec/acceptance/pick_spec.rb | 44 - .../stdlib/spec/acceptance/prefix_spec.rb | 42 - .../stdlib/spec/acceptance/range_spec.rb | 36 - .../stdlib/spec/acceptance/reject_spec.rb | 42 - .../stdlib/spec/acceptance/reverse_spec.rb | 23 - .../stdlib/spec/acceptance/rstrip_spec.rb | 34 - .../stdlib/spec/acceptance/shuffle_spec.rb | 34 - .../stdlib/spec/acceptance/size_spec.rb | 55 - .../stdlib/spec/acceptance/sort_spec.rb | 34 - .../stdlib/spec/acceptance/squeeze_spec.rb | 47 - .../stdlib/spec/acceptance/str2bool_spec.rb | 31 - .../spec/acceptance/str2saltedsha512_spec.rb | 22 - .../stdlib/spec/acceptance/strftime_spec.rb | 22 - .../stdlib/spec/acceptance/strip_spec.rb | 34 - .../stdlib/spec/acceptance/suffix_spec.rb | 42 - .../stdlib/spec/acceptance/swapcase_spec.rb | 22 - .../stdlib/spec/acceptance/time_spec.rb | 36 - .../stdlib/spec/acceptance/to_bytes_spec.rb | 27 - .../stdlib/spec/acceptance/type_spec.rb | 37 - .../stdlib/spec/acceptance/union_spec.rb | 24 - .../stdlib/spec/acceptance/unique_spec.rb | 33 - .../spec/acceptance/unsupported_spec.rb | 11 - .../stdlib/spec/acceptance/upcase_spec.rb | 33 - .../stdlib/spec/acceptance/uriescape_spec.rb | 23 - .../acceptance/validate_absolute_path_spec.rb | 31 - .../spec/acceptance/validate_array_spec.rb | 37 - .../spec/acceptance/validate_augeas_spec.rb | 63 - .../spec/acceptance/validate_bool_spec.rb | 37 - .../spec/acceptance/validate_cmd_spec.rb | 50 - .../spec/acceptance/validate_hash_spec.rb | 37 - .../acceptance/validate_ipv4_address_spec.rb | 31 - .../acceptance/validate_ipv6_address_spec.rb | 31 - .../spec/acceptance/validate_re_spec.rb | 47 - .../spec/acceptance/validate_slength_spec.rb | 72 - .../spec/acceptance/validate_string_spec.rb | 36 - .../stdlib/spec/acceptance/values_at_spec.rb | 73 - .../stdlib/spec/acceptance/values_spec.rb | 31 - .../stdlib/spec/acceptance/zip_spec.rb | 74 - .../stdlib/spec/classes/anchor_spec.rb | 30 - .../stdlib/spec/fixtures/dscacheutil/root | 8 - .../modules/stdlib/spec/functions/abs_spec.rb | 25 - .../stdlib/spec/functions/any2array_spec.rb | 55 - .../stdlib/spec/functions/base64_spec.rb | 34 - .../stdlib/spec/functions/bool2num_spec.rb | 24 - .../stdlib/spec/functions/capitalize_spec.rb | 19 - .../stdlib/spec/functions/chomp_spec.rb | 19 - .../stdlib/spec/functions/chop_spec.rb | 19 - .../stdlib/spec/functions/concat_spec.rb | 30 - .../stdlib/spec/functions/count_spec.rb | 31 - .../stdlib/spec/functions/deep_merge_spec.rb | 105 - .../functions/defined_with_params_spec.rb | 37 - .../stdlib/spec/functions/delete_at_spec.rb | 25 - .../stdlib/spec/functions/delete_spec.rb | 56 - .../functions/delete_undef_values_spec.rb | 41 - .../spec/functions/delete_values_spec.rb | 36 - .../stdlib/spec/functions/difference_spec.rb | 19 - .../stdlib/spec/functions/dirname_spec.rb | 24 - .../stdlib/spec/functions/downcase_spec.rb | 24 - .../stdlib/spec/functions/empty_spec.rb | 23 - .../spec/functions/ensure_packages_spec.rb | 81 - .../spec/functions/ensure_resource_spec.rb | 113 - .../stdlib/spec/functions/flatten_spec.rb | 27 - .../stdlib/spec/functions/floor_spec.rb | 39 - .../stdlib/spec/functions/fqdn_rotate_spec.rb | 33 - .../spec/functions/get_module_path_spec.rb | 46 - .../stdlib/spec/functions/getparam_spec.rb | 76 - .../stdlib/spec/functions/getvar_spec.rb | 37 - .../stdlib/spec/functions/grep_spec.rb | 19 - .../spec/functions/has_interface_with_spec.rb | 64 - .../spec/functions/has_ip_address_spec.rb | 39 - .../spec/functions/has_ip_network_spec.rb | 36 - .../stdlib/spec/functions/has_key_spec.rb | 42 - .../stdlib/spec/functions/hash_spec.rb | 19 - .../spec/functions/intersection_spec.rb | 19 - .../stdlib/spec/functions/is_array_spec.rb | 29 - .../stdlib/spec/functions/is_bool_spec.rb | 44 - .../spec/functions/is_domain_name_spec.rb | 64 - .../stdlib/spec/functions/is_float_spec.rb | 33 - .../spec/functions/is_function_available.rb | 31 - .../stdlib/spec/functions/is_hash_spec.rb | 29 - .../stdlib/spec/functions/is_integer_spec.rb | 69 - .../spec/functions/is_ip_address_spec.rb | 39 - .../spec/functions/is_mac_address_spec.rb | 29 - .../stdlib/spec/functions/is_numeric_spec.rb | 119 - .../stdlib/spec/functions/is_string_spec.rb | 34 - .../functions/join_keys_to_values_spec.rb | 40 - .../stdlib/spec/functions/join_spec.rb | 19 - .../stdlib/spec/functions/keys_spec.rb | 21 - .../stdlib/spec/functions/loadyaml_spec.rb | 25 - .../stdlib/spec/functions/lstrip_spec.rb | 19 - .../modules/stdlib/spec/functions/max_spec.rb | 27 - .../stdlib/spec/functions/member_spec.rb | 24 - .../stdlib/spec/functions/merge_spec.rb | 52 - .../modules/stdlib/spec/functions/min_spec.rb | 27 - .../stdlib/spec/functions/num2bool_spec.rb | 67 - .../stdlib/spec/functions/parsejson_spec.rb | 22 - .../stdlib/spec/functions/parseyaml_spec.rb | 24 - .../spec/functions/pick_default_spec.rb | 58 - .../stdlib/spec/functions/pick_spec.rb | 34 - .../stdlib/spec/functions/prefix_spec.rb | 28 - .../stdlib/spec/functions/range_spec.rb | 70 - .../stdlib/spec/functions/reject_spec.rb | 20 - .../stdlib/spec/functions/reverse_spec.rb | 19 - .../stdlib/spec/functions/rstrip_spec.rb | 24 - .../stdlib/spec/functions/shuffle_spec.rb | 24 - .../stdlib/spec/functions/size_spec.rb | 24 - .../stdlib/spec/functions/sort_spec.rb | 24 - .../stdlib/spec/functions/squeeze_spec.rb | 24 - .../stdlib/spec/functions/str2bool_spec.rb | 31 - .../spec/functions/str2saltedsha512_spec.rb | 45 - .../stdlib/spec/functions/strftime_spec.rb | 29 - .../stdlib/spec/functions/strip_spec.rb | 18 - .../stdlib/spec/functions/suffix_spec.rb | 27 - .../stdlib/spec/functions/swapcase_spec.rb | 19 - .../stdlib/spec/functions/time_spec.rb | 29 - .../stdlib/spec/functions/to_bytes_spec.rb | 58 - .../stdlib/spec/functions/type_spec.rb | 43 - .../stdlib/spec/functions/union_spec.rb | 19 - .../stdlib/spec/functions/unique_spec.rb | 24 - .../stdlib/spec/functions/upcase_spec.rb | 24 - .../stdlib/spec/functions/uriescape_spec.rb | 24 - .../functions/validate_absolute_path_spec.rb | 84 - .../spec/functions/validate_array_spec.rb | 38 - .../spec/functions/validate_augeas_spec.rb | 103 - .../spec/functions/validate_bool_spec.rb | 51 - .../spec/functions/validate_cmd_spec.rb | 48 - .../spec/functions/validate_hash_spec.rb | 43 - .../functions/validate_ipv4_address_spec.rb | 64 - .../functions/validate_ipv6_address_spec.rb | 67 - .../stdlib/spec/functions/validate_re_spec.rb | 77 - .../spec/functions/validate_slength_spec.rb | 67 - .../spec/functions/validate_string_spec.rb | 60 - .../stdlib/spec/functions/values_at_spec.rb | 38 - .../stdlib/spec/functions/values_spec.rb | 31 - .../modules/stdlib/spec/functions/zip_spec.rb | 15 - .../stdlib/spec/lib/puppet_spec/compiler.rb | 47 - .../stdlib/spec/lib/puppet_spec/database.rb | 30 - .../stdlib/spec/lib/puppet_spec/files.rb | 61 - .../stdlib/spec/lib/puppet_spec/fixtures.rb | 29 - .../stdlib/spec/lib/puppet_spec/matchers.rb | 121 - .../stdlib/spec/lib/puppet_spec/modules.rb | 27 - .../stdlib/spec/lib/puppet_spec/pops.rb | 17 - .../stdlib/spec/lib/puppet_spec/scope.rb | 15 - .../stdlib/spec/lib/puppet_spec/settings.rb | 16 - .../stdlib/spec/lib/puppet_spec/verbose.rb | 10 - .../monkey_patches/alias_should_to_must.rb | 9 - .../spec/monkey_patches/publicize_methods.rb | 11 - .../puppet/modules/stdlib/spec/spec.opts | 6 - .../puppet/modules/stdlib/spec/spec_helper.rb | 39 - .../stdlib/spec/spec_helper_acceptance.rb | 31 - .../spec/unit/facter/coverage/.last_run.json | 5 - .../spec/unit/facter/coverage/.resultset.json | 7 - .../coverage/assets/0.8.0/application.css | 799 ------- .../coverage/assets/0.8.0/application.js | 1559 ------------- .../coverage/assets/0.8.0/colorbox/border.png | Bin 163 -> 0 bytes .../assets/0.8.0/colorbox/controls.png | Bin 2033 -> 0 bytes .../assets/0.8.0/colorbox/loading.gif | Bin 9427 -> 0 bytes .../0.8.0/colorbox/loading_background.png | Bin 166 -> 0 bytes .../coverage/assets/0.8.0/favicon_green.png | Bin 1009 -> 0 bytes .../coverage/assets/0.8.0/favicon_red.png | Bin 1009 -> 0 bytes .../coverage/assets/0.8.0/favicon_yellow.png | Bin 1009 -> 0 bytes .../facter/coverage/assets/0.8.0/loading.gif | Bin 7247 -> 0 bytes .../facter/coverage/assets/0.8.0/magnify.png | Bin 1301 -> 0 bytes .../images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 180 -> 0 bytes .../images/ui-bg_flat_75_ffffff_40x100.png | Bin 178 -> 0 bytes .../images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 120 -> 0 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 105 -> 0 bytes .../images/ui-bg_glass_75_dadada_1x400.png | Bin 111 -> 0 bytes .../images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 110 -> 0 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 119 -> 0 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 101 -> 0 bytes .../images/ui-icons_222222_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_2e83ff_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_454545_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_888888_256x240.png | Bin 4369 -> 0 bytes .../images/ui-icons_cd0a0a_256x240.png | Bin 4369 -> 0 bytes .../spec/unit/facter/coverage/index.html | 72 - .../spec/unit/facter/facter_dot_d_spec.rb | 32 - .../spec/unit/facter/pe_version_spec.rb | 76 - .../stdlib/spec/unit/facter/root_home_spec.rb | 52 - .../unit/facter/util/puppet_settings_spec.rb | 36 - .../puppet/provider/file_line/ruby_spec.rb | 225 -- .../spec/unit/puppet/type/anchor_spec.rb | 11 - .../spec/unit/puppet/type/file_line_spec.rb | 70 - .../puppet/modules/stdlib/tests/file_line.pp | 9 - .../stdlib/tests/has_interface_with.pp | 10 - .../modules/stdlib/tests/has_ip_address.pp | 3 - .../modules/stdlib/tests/has_ip_network.pp | 4 - .../puppet/modules/stdlib/tests/init.pp | 1 - .../puppet/modules/supervisord/.fixtures.yml | 10 - .../puppet/modules/supervisord/.nodeset.yml | 27 - .../puppet/modules/supervisord/.travis.yml | 31 - .../puppet/modules/supervisord/Changelog | 119 - .../puppet/modules/supervisord/Gemfile | 26 - .../puppet/modules/supervisord/Modulefile | 11 - .../puppet/modules/supervisord/README.md | 127 -- .../puppet/modules/supervisord/Rakefile | 28 - .../lib/puppet/parser/functions/array2csv.rb | 36 - .../lib/puppet/parser/functions/hash2csv.rb | 40 - .../modules/supervisord/manifests/config.pp | 72 - .../supervisord/manifests/eventlistener.pp | 118 - .../supervisord/manifests/fcgi_program.pp | 117 - .../modules/supervisord/manifests/group.pp | 30 - .../modules/supervisord/manifests/init.pp | 128 -- .../modules/supervisord/manifests/install.pp | 10 - .../modules/supervisord/manifests/params.pp | 57 - .../modules/supervisord/manifests/pip.pp | 28 - .../modules/supervisord/manifests/program.pp | 113 - .../modules/supervisord/manifests/reload.pp | 21 - .../modules/supervisord/manifests/service.pp | 12 - .../supervisord/manifests/supervisorctl.pp | 29 - .../acceptance/nodesets/centos-65-i386.yml | 10 - .../acceptance/nodesets/centos-65-x64.yml | 10 - .../acceptance/nodesets/debian-73-i386.yml | 10 - .../acceptance/nodesets/debian-73-x64.yml | 10 - .../spec/acceptance/nodesets/default.yml | 10 - .../spec/acceptance/supervisord_spec.rb | 114 - .../spec/classes/supervisord_spec.rb | 299 --- .../spec/defines/eventlistener_spec.rb | 86 - .../spec/defines/fcgi_program_spec.rb | 88 - .../supervisord/spec/defines/group_spec.rb | 22 - .../supervisord/spec/defines/program_spec.rb | 86 - .../supervisord/spec/defines/supervisorctl.rb | 13 - .../spec/functions/array2csv_spec.rb | 8 - .../spec/functions/hash2csv_spec.rb | 8 - .../modules/supervisord/spec/spec_helper.rb | 10 - .../spec/spec_helper_acceptance.rb | 24 - .../templates/conf/eventlistener.erb | 88 - .../templates/conf/fcgi_program.erb | 96 - .../supervisord/templates/conf/group.erb | 5 - .../supervisord/templates/conf/program.erb | 89 - .../templates/init/Debian/defaults.erb | 10 - .../templates/init/Debian/init.erb | 133 -- .../templates/init/RedHat/defaults.erb | 8 - .../templates/init/RedHat/init.erb | 113 - .../templates/supervisord_inet.erb | 13 - .../templates/supervisord_main.erb | 34 - .../templates/supervisord_unix.erb | 15 - .../puppet/modules/supervisord/tests/group.pp | 4 - .../puppet/modules/supervisord/tests/init.pp | 5 - .../modules/supervisord/tests/program.pp | 35 - .../puphpet/puppet/modules/sysctl/ChangeLog | 29 - .../puphpet/puppet/modules/sysctl/Gemfile | 8 - .../puphpet/puppet/modules/sysctl/LICENSE | 14 - .../puphpet/puppet/modules/sysctl/Modulefile | 8 - .../puphpet/puppet/modules/sysctl/README.md | 58 - .../puphpet/puppet/modules/sysctl/Rakefile | 7 - .../puppet/modules/sysctl/manifests/base.pp | 26 - .../puppet/modules/sysctl/manifests/init.pp | 66 - .../puppet/modules/sysctl/metadata.json | 32 - .../sysctl/spec/classes/sysctl_base_spec.rb | 9 - .../sysctl/spec/defines/sysctl_init_spec.rb | 25 - .../puppet/modules/sysctl/spec/spec_helper.rb | 2 - .../sysctl/templates/sysctl.d-file.erb | 6 - .../puppet/modules/sysctl/tests/base.pp | 1 - .../puppet/modules/sysctl/tests/init.pp | 3 - .../puppet/modules/vcsrepo/.travis.yml | 31 - .../puphpet/puppet/modules/vcsrepo/CHANGELOG | 41 - .../puphpet/puppet/modules/vcsrepo/Gemfile | 22 - .../puphpet/puppet/modules/vcsrepo/LICENSE | 17 - .../puphpet/puppet/modules/vcsrepo/Modulefile | 4 - .../modules/vcsrepo/README.BZR.markdown | 47 - .../modules/vcsrepo/README.CVS.markdown | 66 - .../modules/vcsrepo/README.GIT.markdown | 95 - .../puppet/modules/vcsrepo/README.HG.markdown | 73 - .../modules/vcsrepo/README.SVN.markdown | 62 - .../puppet/modules/vcsrepo/README.markdown | 32 - .../puphpet/puppet/modules/vcsrepo/Rakefile | 1 - .../modules/vcsrepo/examples/bzr/branch.pp | 6 - .../modules/vcsrepo/examples/bzr/init_repo.pp | 4 - .../modules/vcsrepo/examples/cvs/local.pp | 11 - .../modules/vcsrepo/examples/cvs/remote.pp | 5 - .../modules/vcsrepo/examples/git/bare_init.pp | 4 - .../modules/vcsrepo/examples/git/clone.pp | 5 - .../vcsrepo/examples/git/working_copy_init.pp | 4 - .../modules/vcsrepo/examples/hg/clone.pp | 6 - .../modules/vcsrepo/examples/hg/init_repo.pp | 4 - .../modules/vcsrepo/examples/svn/checkout.pp | 5 - .../modules/vcsrepo/examples/svn/server.pp | 4 - .../vcsrepo/lib/puppet/provider/vcsrepo.rb | 42 - .../lib/puppet/provider/vcsrepo/bzr.rb | 85 - .../lib/puppet/provider/vcsrepo/cvs.rb | 137 -- .../lib/puppet/provider/vcsrepo/dummy.rb | 12 - .../lib/puppet/provider/vcsrepo/git.rb | 323 --- .../vcsrepo/lib/puppet/provider/vcsrepo/hg.rb | 115 - .../lib/puppet/provider/vcsrepo/svn.rb | 124 -- .../vcsrepo/lib/puppet/type/vcsrepo.rb | 198 -- .../spec/fixtures/bzr_version_info.txt | 5 - .../vcsrepo/spec/fixtures/git_branch_a.txt | 14 - .../spec/fixtures/git_branch_feature_bar.txt | 14 - .../vcsrepo/spec/fixtures/git_branch_none.txt | 15 - .../vcsrepo/spec/fixtures/hg_parents.txt | 6 - .../modules/vcsrepo/spec/fixtures/hg_tags.txt | 18 - .../vcsrepo/spec/fixtures/svn_info.txt | 10 - .../puppet/modules/vcsrepo/spec/spec.opts | 6 - .../modules/vcsrepo/spec/spec_helper.rb | 13 - .../spec/support/filesystem_helpers.rb | 18 - .../vcsrepo/spec/support/fixture_helpers.rb | 7 - .../unit/puppet/provider/vcsrepo/bzr_spec.rb | 109 - .../unit/puppet/provider/vcsrepo/cvs_spec.rb | 115 - .../unit/puppet/provider/vcsrepo/git_spec.rb | 369 ---- .../unit/puppet/provider/vcsrepo/hg_spec.rb | 122 - .../unit/puppet/provider/vcsrepo/svn_spec.rb | 105 - .../spec/unit/puppet/type/README.markdown | 4 - .../puphpet/puppet/modules/yum/.fixtures.yml | 10 - .../puphpet/puppet/modules/yum/.gemfile | 7 - .../puphpet/puppet/modules/yum/.project | 23 - .../puphpet/puppet/modules/yum/.travis.yml | 21 - .../puphpet/puppet/modules/yum/LICENSE | 17 - .../puphpet/puppet/modules/yum/Modulefile | 9 - .../puphpet/puppet/modules/yum/README.md | 132 -- .../puphpet/puppet/modules/yum/Rakefile | 5 - .../Amazon.3/rpm-gpg/RPM-GPG-KEY-CentOS-6 | 30 - .../files/Amazon.3/rpm-gpg/RPM-GPG-KEY-EPEL | 29 - .../files/Amazon.3/rpm-gpg/RPM-GPG-KEY-RBEL | 36 - .../files/Amazon.3/rpm-gpg/RPM-GPG-KEY-beta | 28 - .../Amazon.3/rpm-gpg/RPM-GPG-KEY-kbsingh | 25 - .../files/Amazon.3/rpm-gpg/RPM-GPG-KEY-remi | 24 - .../Amazon.3/rpm-gpg/RPM-GPG-KEY-rpmforge-dag | 32 - .../rpm-gpg/RPM-GPG-KEY-webtatic-andy | 30 - .../files/Amazon.3/rpm-gpg/RPM-GPG-KEY.atrpms | 20 - .../files/Amazon.3/rpm-gpg/RubyWorks.GPG.key | 30 - .../files/CentOS.4/rpm-gpg/RPM-GPG-KEY-EPEL | 30 - .../CentOS.5/rpm-gpg/RPM-GPG-KEY-CentOS-5 | 28 - .../files/CentOS.5/rpm-gpg/RPM-GPG-KEY-EPEL | 30 - .../files/CentOS.5/rpm-gpg/RPM-GPG-KEY-RBEL | 36 - .../files/CentOS.5/rpm-gpg/RPM-GPG-KEY-beta | 28 - .../CentOS.5/rpm-gpg/RPM-GPG-KEY-kbsingh | 25 - .../files/CentOS.5/rpm-gpg/RPM-GPG-KEY-remi | 24 - .../CentOS.5/rpm-gpg/RPM-GPG-KEY-rpmforge-dag | 32 - .../rpm-gpg/RPM-GPG-KEY-webtatic-andy | 30 - .../files/CentOS.5/rpm-gpg/RPM-GPG-KEY.art | 24 - .../files/CentOS.5/rpm-gpg/RPM-GPG-KEY.atrpms | 20 - .../files/CentOS.5/rpm-gpg/RubyWorks.GPG.key | 30 - .../CentOS.6/rpm-gpg/RPM-GPG-KEY-CentOS-6 | 30 - .../files/CentOS.6/rpm-gpg/RPM-GPG-KEY-EPEL | 29 - .../files/CentOS.6/rpm-gpg/RPM-GPG-KEY-PGDG | 31 - .../files/CentOS.6/rpm-gpg/RPM-GPG-KEY-RBEL | 36 - .../files/CentOS.6/rpm-gpg/RPM-GPG-KEY-beta | 28 - .../CentOS.6/rpm-gpg/RPM-GPG-KEY-kbsingh | 25 - .../files/CentOS.6/rpm-gpg/RPM-GPG-KEY-remi | 24 - .../CentOS.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag | 32 - .../rpm-gpg/RPM-GPG-KEY-webtatic-andy | 30 - .../files/CentOS.6/rpm-gpg/RPM-GPG-KEY.art | 24 - .../files/CentOS.6/rpm-gpg/RPM-GPG-KEY.atrpms | 20 - .../files/CentOS.6/rpm-gpg/RubyWorks.GPG.key | 30 - .../Scientific.6/rpm-gpg/RPM-GPG-KEY-CentOS-5 | 28 - .../Scientific.6/rpm-gpg/RPM-GPG-KEY-EPEL | 29 - .../Scientific.6/rpm-gpg/RPM-GPG-KEY-RBEL | 36 - .../Scientific.6/rpm-gpg/RPM-GPG-KEY-beta | 28 - .../Scientific.6/rpm-gpg/RPM-GPG-KEY-dawson | 25 - .../rpm-gpg/RPM-GPG-KEY-redhat-beta | 61 - .../rpm-gpg/RPM-GPG-KEY-redhat-legacy-former | 37 - .../rpm-gpg/RPM-GPG-KEY-redhat-legacy-release | 24 - .../rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx | 17 - .../rpm-gpg/RPM-GPG-KEY-redhat-release | 62 - .../Scientific.6/rpm-gpg/RPM-GPG-KEY-remi | 24 - .../rpm-gpg/RPM-GPG-KEY-rpmforge-dag | 32 - .../files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl | 32 - .../Scientific.6/rpm-gpg/RPM-GPG-KEY-sl3 | 34 - .../Scientific.6/rpm-gpg/RPM-GPG-KEY-sl4 | 34 - .../Scientific.6/rpm-gpg/RPM-GPG-KEY-sl5 | 34 - .../Scientific.6/rpm-gpg/RPM-GPG-KEY-sl6 | 34 - .../Scientific.6/rpm-gpg/RPM-GPG-KEY.atrpms | 20 - .../Scientific.6/rpm-gpg/RubyWorks.GPG.key | 30 - .../modules/yum/files/empty/.placeholder | 1 - .../yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-5 | 28 - .../yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-6 | 30 - .../yum/files/rpm-gpg/RPM-GPG-KEY-EPEL | 30 - .../yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-4 | 30 - .../yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-5 | 30 - .../yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-6 | 29 - .../yum/files/rpm-gpg/RPM-GPG-KEY-PGDG | 31 - .../yum/files/rpm-gpg/RPM-GPG-KEY-RBEL | 36 - .../yum/files/rpm-gpg/RPM-GPG-KEY-beta | 28 - .../yum/files/rpm-gpg/RPM-GPG-KEY-elrepo.org | 30 - .../yum/files/rpm-gpg/RPM-GPG-KEY-kbsingh | 25 - .../yum/files/rpm-gpg/RPM-GPG-KEY-redhat-beta | 61 - .../rpm-gpg/RPM-GPG-KEY-redhat-legacy-former | 37 - .../rpm-gpg/RPM-GPG-KEY-redhat-legacy-release | 24 - .../rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx | 17 - .../files/rpm-gpg/RPM-GPG-KEY-redhat-release | 62 - .../yum/files/rpm-gpg/RPM-GPG-KEY-remi | 24 - .../files/rpm-gpg/RPM-GPG-KEY-rpmforge-dag | 32 - .../modules/yum/files/rpm-gpg/RPM-GPG-KEY-sl | 32 - .../files/rpm-gpg/RPM-GPG-KEY-webtatic-andy | 30 - .../modules/yum/files/rpm-gpg/RPM-GPG-KEY.art | 24 - .../yum/files/rpm-gpg/RPM-GPG-KEY.atrpms | 20 - .../yum/files/rpm-gpg/RubyWorks.GPG.key | 30 - .../modules/yum/files/yum-updatesd.conf | 20 - .../puppet/modules/yum/manifests/cron.pp | 47 - .../puppet/modules/yum/manifests/defaults.pp | 49 - .../puppet/modules/yum/manifests/init.pp | 329 --- .../modules/yum/manifests/managed_yumrepo.pp | 77 - .../puppet/modules/yum/manifests/params.pp | 62 - .../puppet/modules/yum/manifests/plugin.pp | 54 - .../modules/yum/manifests/prerequisites.pp | 21 - .../modules/yum/manifests/repo/10gen.pp | 12 - .../modules/yum/manifests/repo/atomic.pp | 16 - .../modules/yum/manifests/repo/atrpms.pp | 17 - .../modules/yum/manifests/repo/centalt.pp | 21 - .../modules/yum/manifests/repo/centos4.pp | 61 - .../modules/yum/manifests/repo/centos5.pp | 124 -- .../modules/yum/manifests/repo/centos6.pp | 108 - .../yum/manifests/repo/centos_testing.pp | 23 - .../puppet/modules/yum/manifests/repo/ceph.pp | 20 - .../yum/manifests/repo/elasticsearch10.pp | 15 - .../yum/manifests/repo/elasticsearch90.pp | 15 - .../modules/yum/manifests/repo/elrepo.pp | 105 - .../puppet/modules/yum/manifests/repo/epel.pp | 132 -- .../modules/yum/manifests/repo/foreman.pp | 18 - .../yum/manifests/repo/integ_ganeti.pp | 69 - .../modules/yum/manifests/repo/jpackage5.pp | 49 - .../modules/yum/manifests/repo/jpackage6.pp | 17 - .../modules/yum/manifests/repo/karan.pp | 44 - .../modules/yum/manifests/repo/logstash13.pp | 15 - .../modules/yum/manifests/repo/mongodb.pp | 15 - .../yum/manifests/repo/monitoringsucks.pp | 16 - .../modules/yum/manifests/repo/newrelic.pp | 15 - .../modules/yum/manifests/repo/nginx.pp | 16 - .../yum/manifests/repo/openstack_grizzly.pp | 15 - .../modules/yum/manifests/repo/passenger.pp | 20 - .../modules/yum/manifests/repo/pgdg91.pp | 18 - .../modules/yum/manifests/repo/pgdg92.pp | 18 - .../modules/yum/manifests/repo/pgdg93.pp | 18 - .../modules/yum/manifests/repo/puppetdevel.pp | 27 - .../modules/yum/manifests/repo/puppetlabs.pp | 36 - .../puppet/modules/yum/manifests/repo/rbel.pp | 20 - .../puppet/modules/yum/manifests/repo/remi.pp | 25 - .../modules/yum/manifests/repo/remi_php55.pp | 15 - .../modules/yum/manifests/repo/repoforge.pp | 18 - .../yum/manifests/repo/repoforgeextras.pp | 17 - .../modules/yum/manifests/repo/rpmforge.pp | 17 - .../puppet/modules/yum/manifests/repo/sl5.pp | 77 - .../puppet/modules/yum/manifests/repo/sl6.pp | 74 - .../puppet/modules/yum/manifests/repo/tmz.pp | 27 - .../modules/yum/manifests/repo/varnish.pp | 17 - .../modules/yum/manifests/repo/vfabric.pp | 20 - .../modules/yum/manifests/repo/virtualbox.pp | 18 - .../modules/yum/manifests/repo/webtatic.pp | 19 - .../puppet/modules/yum/manifests/updatesd.pp | 50 - .../modules/yum/spec/classes/yum_spec.rb | 23 - .../puppet/modules/yum/spec/spec_helper.rb | 1 - .../puppet/modules/yum/templates/yum-cron.erb | 62 - .../puphpet/shell/execute-files.sh | 31 - .../puphpet/shell/hostsupdater-notice.txt | 4 - .../puphpet/shell/important-notices.sh | 9 - .../puphpet/shell/important-notices.txt | 39 - .../puphpet/shell/initial-setup.sh | 109 - .../puphpet/shell/os-detect.sh | 49 - .../puphpet/shell/r10k.sh | 23 - .../puphpet/shell/self-promotion.txt | 2 - .../puphpet/shell/ssh-keygen.sh | 80 - .../puphpet/shell/update-puppet.sh | 43 - 2026 files changed, 122635 deletions(-) delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/config.yaml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.bash_aliases delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.bash_git delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.vimrc delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/ssh/.gitignore delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/ssh/insecure_private_key delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-always/.gitkeep delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-always/setup delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-once/.gitkeep delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-once/setup delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/startup-always/.gitkeep delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/startup-once/.gitkeep delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/Puppetfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/hiera.yaml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/manifest.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.nodeset.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.puppet-lint.rc delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/CHANGELOG.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/CONTRIBUTING.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/README.passenger.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/files/httpd delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/a2mod.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/modfix.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/redhat.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/balancer.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/balancermember.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/default_confd_files.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/default_mods.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/default_mods/load.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/dev.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/listen.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/actions.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/alias.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/cache.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/cgi.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/cgid.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dav.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/deflate.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dev.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dir.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/disk_cache.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/event.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/expires.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/fastcgi.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/fcgid.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/headers.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/include.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/info.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/itk.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/ldap.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/mime.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/mime_magic.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/negotiation.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/nss.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/pagespeed.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/passenger.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/perl.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/peruser.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/php.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/prefork.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_ajp.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_balancer.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_html.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_http.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/python.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/reqtimeout.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/rewrite.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/rpaf.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/setenvif.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/speling.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/ssl.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/status.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/suexec.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/suphp.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/userdir.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/vhost_alias.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/worker.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/wsgi.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/xsendfile.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mpm.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/namevirtualhost.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/package.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/peruser/multiplexer.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/peruser/processor.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/php.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/proxy.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/python.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/service.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/ssl.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/version.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/vhost.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/metadata.json delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/apache_parameters_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/apache_ssl_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/basic_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/class_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/default_mods_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/itk_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_dav_svn_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_deflate_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_fcgid_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_mime_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_pagespeed_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_passenger_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_php_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_proxy_html_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_suphp_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-59-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64-pe.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-65-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-607-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-70rc1-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-i386.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/default.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/fedora-18-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/sles-11sp1-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/prefork_worker_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/service_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/unsupported_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/version.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/vhost_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/apache_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/dev_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/auth_kerb_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/authnz_ldap_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/dav_svn_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/deflate_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/dev_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/dir_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/event_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/fastcgi_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/fcgid_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/info_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/itk_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/mime_magic_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/mime_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/pagespeed_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/passenger_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/perl_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/peruser_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/php_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/prefork_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/proxy_html_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/python_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/rpaf_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/speling_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/ssl_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/status_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/suphp_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/worker_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/wsgi_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/params_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/service_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/defines/mod_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/defines/vhost_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/fixtures/files/spec delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/fixtures/modules/site_apache/templates/fake.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/spec.opts delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/spec_helper_acceptance.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/unit/provider/a2mod/gentoo_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/confd/no-accf.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/httpd.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/listen.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/alias.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/authnz_ldap.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/autoindex.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/cgid.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/dav_fs.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/deflate.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/dir.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/disk_cache.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/event.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/fastcgi.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/fcgid.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/info.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/itk.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/ldap.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/load.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/mime.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/mime_magic.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/mpm_event.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/negotiation.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/nss.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/pagespeed.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/passenger.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/peruser.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/php5.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/prefork.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/proxy.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/proxy_html.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/reqtimeout.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/rpaf.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/setenvif.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/ssl.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/status.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/suphp.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/userdir.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/worker.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/wsgi.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/namevirtualhost.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/ports_header.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_action.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_aliases.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_block.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_custom_fragment.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_directories.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_error_document.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_fastcgi.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_header.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_itk.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_php_admin.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_proxy.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_rack.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_redirect.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_requestheader.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_rewrite.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_scriptalias.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_serveralias.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_setenv.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_ssl.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_suexec.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_suphp.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_wsgi.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/apache.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/dev.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/mod_load_params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/mods.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/mods_custom.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/php.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost_directories.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost_ip_based.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost_ssl.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhosts_without_listen.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.project delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.puppet-lint.rc delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/CHANGELOG.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/backports.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/builddep.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/conf.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/debian/testing.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/debian/unstable.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/force.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/key.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/pin.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/ppa.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/release.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/source.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/unattended_upgrades.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/update.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/metadata.json delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_builddep_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_key_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_ppa_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_source_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/backports_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/class_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/conf_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/force_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/debian-70rc1-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/default.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/pin_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/release_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/unattended_upgrade_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/unsupported_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/apt_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/backports_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/debian_testing_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/debian_unstable_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/params_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/release_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/unattended_upgrades_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/builddep_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/conf_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/force_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/key_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/pin_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/ppa_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/source_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/spec_helper_acceptance.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/10periodic.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/50unattended-upgrades.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/pin.pref.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/source.list.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/builddep.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/debian/testing.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/debian/unstable.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/force.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/key.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/pin.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/ppa.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/release.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/source.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/unattended_upgrades.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/manifests/init.pp delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/run-tests.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/defines/config_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/manifests/site.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/debian/beanstalkd_default.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/templates/debian/beanstalkd_default.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/CHANGELOG.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/lib/facter/composer_home.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/exec.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/project.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/classes/composer_params_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/classes/composer_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/defines/composer_exec_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/defines/composer_project_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/fixtures/manifests/site.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/spec.opts delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/templates/exec.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/tests/project.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/.gitattributes delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/CHANGELOG delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/Rakefile delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/files/concatfragments.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/files/concatfragments.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/lib/facter/concat_basedir.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/manifests/fragment.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/manifests/setup.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/backup_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/concat_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/deprecation_warnings_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/empty_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/fragment_source_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/newline_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/aix-71-vcloud.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-59-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64-pe.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-607-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-70rc1-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-73-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/default.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/fedora-18-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11sp1-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/order_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/quoted_paths_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/replace_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/symbolic_name_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/warn_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/spec_helper_acceptance.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/classes/concat_setup_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/defines/concat_fragment_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/defines/concat_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/facts/concat_basedir_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/tests/fragment.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/Puppetfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/README delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/apt.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/dis.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/dl.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/en.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/git.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/git/drush.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/make.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/run.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/status.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/.module delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/Vagrantfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/test.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/vagrant_test.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/apt.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/defaults.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/dis.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/dl.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/en.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/git.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/git/drush.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/make.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/run.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/status.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/CHANGELOG delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/CONTRIBUTING.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/CONTRIBUTORS delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/config.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/java.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/package.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/plugin.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/python.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/ruby.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/service.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/service/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/template.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/001_elasticsearch_init_debian_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/002_elasticsearch_init_redhat_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/003_elasticsearch_init_unknown_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/004_elasticsearch_init_config_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/005_elasticsearch_java_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/001_elasticsearch_python_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/002_elasticsearch_ruby_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/003_elasticsearch_template_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/004_elasticsearch_plugin_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/lib/parser_validate_task.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/lib/template_check_task.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/elasticsearch/elasticsearch.yml.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.Debian.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.RedHat.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/sysconfig/defaults.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._Rakefile delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._files delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._lib delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._manifests delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._metadata.json delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._spec delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._tests delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/._RPM-GPG-KEY-EPEL-5 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/._RPM-GPG-KEY-EPEL-6 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/._RPM-GPG-KEY-EPEL-7 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/RPM-GPG-KEY-EPEL-5 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/RPM-GPG-KEY-EPEL-6 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/RPM-GPG-KEY-EPEL-7 delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/lib/._facter delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/lib/facter/._os_maj_version.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/lib/facter/os_maj_version.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/._init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/._params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/._rpm_gpg_key.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/rpm_gpg_key.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/metadata.json delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._classes delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._defines delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._spec_helper_system.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._system delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._unit delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._epel_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_base.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_debuginfo.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_gpgkey.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_source.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_testing.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_testing_debuginfo.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_testing_source.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/epel_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_base.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_debuginfo.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_gpgkey.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_source.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_testing.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_testing_debuginfo.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_testing_source.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/defines/._rpm_gpg_key_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/defines/rpm_gpg_key_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/spec_helper_system.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/._basic_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/._usage_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/basic_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/usage_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/unit/._facter delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/unit/facter/._os_maj_version_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/unit/facter/os_maj_version_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/tests/._init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.nodeset.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.rspec delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Gemfile.lock delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/repo/apt.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/repo/yum.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/classes/erlang_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/spec_helper_system.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/system/erlang_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/.nodeset.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/CHANGELOG.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/CONTRIBUTING.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/README.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/facter/ip6tables_version.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/facter/iptables_version.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/ip6tables.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/iptables.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewallchain/iptables_chain.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/type/firewall.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/type/firewallchain.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/util/firewall.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/util/ipcidr.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux/archlinux.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux/debian.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux/redhat.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/metadata.json delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/change_source_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/class_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/connlimit_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/connmark_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/firewall_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/firewallchain_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/ip6_fragment_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/isfragment_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64-pe.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-fusion.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-pe.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-607-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-70rc1-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/default.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/fedora-18-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/sles-11sp1-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/params_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/purge_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/resource_cmd_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/rules_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/socket_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/standard_usage_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/fixtures/ip6tables/conversion_hash.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/fixtures/iptables/conversion_hash.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/spec_helper_acceptance.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_archlinux_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_debian_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_redhat_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_persistent_version_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_chain_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewall_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewallchain_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/util/firewall_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/util/ipcidr_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/CHANGELOG delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/files/subtree/bash_completion.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/lib/facter/git_exec_path.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/lib/facter/git_version.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/manifests/gitosis.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/manifests/subtree.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/spec/classes/git_subtree_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/tests/gitosis.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/config.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/package.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/spec/classes/mailcatcher_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/templates/etc/init/mailcatcher.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/.nodeset.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/CHANGELOG delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/parser/functions/mongodb_password.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_database/mongodb.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_replset/mongo.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_user/mongodb.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_database.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_replset.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_user.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/client.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/client/install.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/db.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/globals.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/replset.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/repo.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/repo/apt.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/repo/yum.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server/config.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server/install.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server/service.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-6-vcloud.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64-pe.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/default.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/fedora-18-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-6-vcloud.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-64-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/sles-11-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/replset_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/server_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/client_install_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/repo_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/server_config_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/server_install_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/server_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/defines/db_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/spec_helper.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/spec_helper_acceptance.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/spec_helper_system.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/mongodb_password_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_database/mongodb_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_replset/mongodb_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_user/mongodb_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_database_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_replset_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_user_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/templates/mongodb.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/globals.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/replicaset.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/server.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/.nodeset.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/CHANGELOG.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/TODO delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/files/mysqltuner.pl delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_deepmerge.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_password.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_strip_hash.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/database/mysql.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/database_grant/mysql.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/database_user/mysql.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_database/mysql.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_grant/mysql.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_user/mysql.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/database.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/database_grant.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/database_user.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_database.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_grant.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_user.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/backup.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/java.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/perl.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/php.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/python.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/ruby.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/client.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/client/install.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/db.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/account_security.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/backup.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/config.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/install.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/monitor.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/mysqltuner.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/providers.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/root_password.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/service.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/metadata.json delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_account_delete_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_backup_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_bindings_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_db_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_config_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_monitor_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_root_password_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/centos-64-x64-pe.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/default.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/fedora-18-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/sles-11-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_database_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_grant_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_user_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/unsupported_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_bindings_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_client_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_account_security_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_backup_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_monitor_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_mysqltuner_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/defines/mysql_db_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec.opts delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec_helper_acceptance.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec_helper_system.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_account_delete_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_backup_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_bindings_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_db_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_server_monitor_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_server_root_password_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_server_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/types/mysql_grant_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/types/mysql_user_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/mysql_password_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/functions/mysql_deepmerge_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database/mysql_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_user/mysql_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_database/mysql_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_user/mysql_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_grant_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_user_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/my.cnf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/my.cnf.pass.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/my.conf.cnf.erb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/mysqlbackup.sh.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/backup.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/bindings.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/java.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/mysql_database.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/mysql_grant.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/mysql_user.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/perl.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/python.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/ruby.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/server.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/server/account_security.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/server/config.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.nodeset.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.travis/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.travis/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Puppetfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Puppetfile.lock delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/README.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/composer.json delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/config.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/debian.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/redhat.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/solaris.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/suse.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/location.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/mailhost.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/upstream.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/vhost.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/service.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/config_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/nginx_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/package_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/params_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/service_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_location_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_mailhost_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_upstream_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_vhost_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/spec_helper_system.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/basic_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/class_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/nginx_mail_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/nginx_proxy_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/nginx_vhost_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/conf.d/nginx.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/conf.d/proxy.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/conf.d/upstream.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/mailhost/mailhost.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/mailhost/mailhost_ssl.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/fastcgi_params.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_footer.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_header.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_alias.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_directory.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_empty.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_fastcgi.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_proxy.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_stub_status.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_footer.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_header.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/location_alias.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/upstream.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/vhost.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/vhost_ssl.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/.nodeset.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/CHANGELOG.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/CONTRIBUTING.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/README.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/config.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/install.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/service.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/metadata.json delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/class_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64-pe.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-65-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/default.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/fedora-18-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/sles-11-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_config_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_install_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_parameters_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_service_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/preferred_servers_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/restrict_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/unsupported_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/classes/ntp_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/fixtures/modules/my_ntp/templates/ntp.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/spec.opts delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/spec_helper_acceptance.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/unit/puppet/provider/README.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/unit/puppet/type/README.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/templates/ntp.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.project delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/lib/facter/php_fact_extension_dir.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/lib/facter/php_fact_version.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/augeas.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/conf.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/devel.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/ini.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/module.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pear.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pear/config.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pear/module.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pecl/config.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pecl/module.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/spec.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/classes/php_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/defines/php_module_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/defines/php_pear_module_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/templates/extra-ini.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/templates/spec.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.nodeset.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.project delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/CHANGELOG.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/NOTICE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/files/RPM-GPG-KEY-PGDG delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/files/validate_postgresql_connection.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_acls_to_resources_hash.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_escape.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_password.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_conf/parsed.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_psql/ruby.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_conf.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_psql.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/client.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/globals.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/lib/devel.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/lib/java.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/lib/python.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/repo.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/repo/apt_postgresql_org.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/repo/yum_postgresql_org.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/config.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/config_entry.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/contrib.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/database.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/database_grant.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/db.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/firewall.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/grant.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/initdb.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/install.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/passwd.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/pg_hba_rule.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/plperl.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/reload.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/role.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/service.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/table_grant.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/tablespace.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/validate_db_connection.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/metadata.json delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/client_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/common_patterns_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/contrib_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/lib/devel_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/lib/java_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/lib/python_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-510-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-59-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64-pe.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-607-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-73-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/default.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/postgresql_psql_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/config_entry_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_grant_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/db_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/grant_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/pg_hba_rule_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/plperl_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/role_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/table_grant_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/tablespace_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/unsupported_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/validate_db_connection_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/spec_helper_acceptance.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/client_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/globals_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/devel_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/java_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/python_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/params_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/repo_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server/contrib_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server/initdb_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server/plperl_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/config_entry_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_grant_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/db_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/grant_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/pg_hba_rule_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/role_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/table_grant_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/tablespace_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/validate_db_connection_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_acls_to_resources_hash_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_escape_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_password_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/provider/postgresql_conf/parsed_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/puppet/type/postgresql_psql_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/type/postgresql_conf_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/templates/pg_hba_rule.conf delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/files/xdebug_cli_alias.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_equals.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_true.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/value_true.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/adminer.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/apache/modpagespeed.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/apache/modspdy.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/hhvm.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/ini.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/mariadb.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/nginx.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/extra_repos.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/module.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/pear.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/pecl.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/phpmyadmin.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/python/pip.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/ssl_cert.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/xdebug.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/xhprof.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/custom_fragment.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/hhvm-httpd.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/php-wrapper.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/spdy_conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/nginx/default_conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.project delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_check.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_deploy.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_info.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_log.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/composer.json delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/info/readme/readme delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/info/readme/readme-default delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mailpuppicheck delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/mc-puppi delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppi.ddl delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppi.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppicheck delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppideploy delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/archive.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/check_project.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/checkwardir.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/clean_filelist.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/database.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/delete.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/deploy.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/deploy_files.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/execute.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/firewall.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/functions delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_file.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_filesfromlist.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_maven_files.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_metadata.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/git.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/header delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/predeploy.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/predeploy_tar.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/report_mail.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/report_mongo.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/service.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/svn.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/wait.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/yant.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/yum.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/facter/last_run.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/facter/puppi_projects.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/facter/windows_common_appdata.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/any2bool.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/bool2ensure.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_class_args.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_magicvar.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_module_path.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/nslookup.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/options_lookup.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/params_lookup.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/url_parse.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/check.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/configure.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/dependencies.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/deploy.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/extras.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/helper.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/helpers.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info/instance.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info/module.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info/readme.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/initialize.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/install_packages.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/log.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/mcollective/client.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/mcollective/server.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/netinstall.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/one.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/README delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/archive.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/builder.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/dir.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/files.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/git.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/maven.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/mysql.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/service.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/svn.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/tar.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/war.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/y4maven.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/yum.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/report.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/rollback.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/run.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/runscript.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/skel.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/todo.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/two.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/ze.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/classes/puppi_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_check_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_deploy_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_helper_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_info_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_initialize_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_log_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_project_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_report_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_rollback_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_run_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_todo_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_ze_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/functions/any2bool_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/functions/bool2ensure_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/functions/url_parse_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/helpers/standard.yml.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/instance.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/module.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/puppet.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/readme.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/install_packages.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/log.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/project/config.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/puppi.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/puppi.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/puppi_clean.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/todo.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/.nodeset.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/CHANGELOG delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/TODO delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/files/README.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/files/plugins/amqp_client-2.3.1.ez delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/files/plugins/rabbit_stomp-2.3.1.ez delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/facter/rabbitmq_erlang_cookie.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_exchange/rabbitmqadmin.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_plugin/rabbitmqplugins.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user_permissions/rabbitmqctl.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_vhost/rabbitmqctl.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_exchange.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_plugin.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user_permissions.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_vhost.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/config.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/install.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/install/rabbitmqadmin.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/management.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/policy.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/repo/apt.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/repo/rhel.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/server.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/service.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/README.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/class_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/clustering_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/delete_guest_user_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/default.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/rabbitmqadmin_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/server_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/classes/rabbitmq_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/spec.opts delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/spec_helper_acceptance.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/facts/rabbitmq_erlang_cookie_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_exchange/rabbitmqadmin_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user/rabbitmqctl_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user_permissions/rabbitmqctl_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_vhost/rabbitmqctl_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_exchange_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_permissions_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_vhost_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/templates/README.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/templates/rabbitmq-env.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/templates/rabbitmq.config.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/erlang_deps.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/full.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/permissions/add.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/plugin.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/repo/apt.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/server.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/service.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/site.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/user/add.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/vhosts/add.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/CHANGELOG delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Vagrantfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/templates/redis.debian.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/templates/redis.logrotate.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/templates/redis.rhel.conf.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/manifests/db.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/metadata.json delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/spec/spec.opts delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Vagrantfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/deploy.html delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/extract.html delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/file.html delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/init.html delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/files/sample delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/files/sample.tar.bz2 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/files/sample.tar.gz delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/lib/facter/staging_http_get.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/lib/facter/staging_windir.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/scope_defaults.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/staging_parse.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/deploy.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/extract.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/file.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/defines/staging_deploy_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/defines/staging_extract_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/defines/staging_file_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/fixtures/hiera.yaml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/scope_defaults_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/staging_parse_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/deploy.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/extract.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/file.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/scope_defaults.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/staging_parse.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/CHANGELOG.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/CONTRIBUTING.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Gemfile.lock delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/README.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/README_DEVELOPER.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/README_SPECS.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/RELEASE_PROCESS.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/facter_dot_d.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/pe_version.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/puppet_vardir.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/root_home.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/util/puppet_settings.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/any2array.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/base64.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/bool2num.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/capitalize.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/concat.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/count.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_at.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_values.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/difference.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/dirname.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/downcase.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/empty.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/flatten.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/floor.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getparam.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getvar.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/grep.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_key.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/hash.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/intersection.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_array.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_bool.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_float.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_hash.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_integer.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_string.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/keys.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/lstrip.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/max.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/member.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/merge.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/min.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/num2bool.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parsejson.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick_default.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/prefix.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/range.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reject.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reverse.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/rstrip.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/shuffle.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/size.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/sort.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strftime.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strip.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/suffix.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/swapcase.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/time.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/type.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/union.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/unique.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/upcase.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/uriescape.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_array.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_re.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_string.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values_at.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/zip.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/provider/file_line/ruby.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/anchor.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/file_line.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/manifests/stages.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/metadata.json delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/abs_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/any2array_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/base64_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/bool2num_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/build_csv.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/capitalize_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chomp_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chop_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/concat_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/count_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/deep_merge_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/defined_with_params_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_at_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_values_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/difference_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/dirname_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/downcase_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/empty_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_packages_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_resource_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/flatten_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/floor_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/get_module_path_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getparam_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getvar_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/grep_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_interface_with_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_address_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_network_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_key_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/hash_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/intersection_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_array_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_bool_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_domain_name_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_float_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_function_available_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_hash_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_integer_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_ip_address_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_mac_address_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_numeric_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_string_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/keys_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/loadyaml_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/lstrip_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/max_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/member_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/merge_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/min_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-6-vcloud.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64-pe.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/default.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/fedora-18-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/sles-11-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/num2bool_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parsejson_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parseyaml_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_default_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/prefix_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/range_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reject_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reverse_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/rstrip_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/shuffle_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/size_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/sort_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/squeeze_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2bool_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strftime_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strip_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/suffix_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/swapcase_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/time_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/to_bytes_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/type_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/union_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unique_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unsupported_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/upcase_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/uriescape_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_array_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_augeas_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_bool_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_cmd_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_hash_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_re_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_slength_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_string_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_at_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/zip_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/classes/anchor_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/fixtures/dscacheutil/root delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/abs_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/any2array_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/base64_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/bool2num_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/capitalize_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/chomp_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/chop_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/concat_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/count_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/deep_merge_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/defined_with_params_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_at_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_undef_values_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_values_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/difference_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/dirname_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/downcase_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/empty_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_packages_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_resource_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/flatten_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/floor_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/fqdn_rotate_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/get_module_path_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/getparam_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/getvar_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/grep_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_interface_with_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_address_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_network_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_key_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/hash_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/intersection_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_array_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_bool_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_domain_name_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_float_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_function_available.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_hash_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_integer_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_ip_address_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_mac_address_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_numeric_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_string_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_keys_to_values_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/keys_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/loadyaml_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/lstrip_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/max_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/member_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/merge_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/min_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/num2bool_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/parsejson_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/parseyaml_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_default_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/prefix_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/range_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/reject_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/reverse_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/rstrip_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/shuffle_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/size_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/sort_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/squeeze_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2bool_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2saltedsha512_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/strftime_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/strip_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/suffix_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/swapcase_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/time_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/to_bytes_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/type_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/union_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/unique_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/upcase_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/uriescape_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_absolute_path_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_array_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_augeas_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_bool_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_cmd_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_hash_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv4_address_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_re_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_slength_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_string_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_at_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/zip_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/compiler.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/database.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/files.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/fixtures.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/matchers.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/modules.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/pops.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/scope.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/settings.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/verbose.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/alias_should_to_must.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/publicize_methods.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/spec.opts delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper_acceptance.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.last_run.json delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.resultset.json delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.css delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.js delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/border.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/controls.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/loading.gif delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/loading_background.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_green.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_red.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_yellow.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/loading.gif delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/magnify.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_222222_256x240.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_888888_256x240.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/index.html delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/facter_dot_d_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/pe_version_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/root_home_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/util/puppet_settings_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/anchor_spec.rb delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/file_line.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/has_interface_with.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_address.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_network.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/.nodeset.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Changelog delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/config.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/group.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/install.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/pip.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/program.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/reload.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/service.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/group_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/functions/array2csv_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/functions/hash2csv_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/group.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/program.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/defaults.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/init.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/defaults.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/init.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_inet.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/tests/group.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/tests/program.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/ChangeLog delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/manifests/base.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/metadata.json delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/spec/classes/sysctl_base_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/spec/defines/sysctl_init_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/templates/sysctl.d-file.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/tests/base.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/tests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/CHANGELOG delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/Gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.BZR.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.CVS.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.GIT.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.HG.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.SVN.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/branch.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/init_repo.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/local.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/remote.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/git/bare_init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/git/clone.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/git/working_copy_init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/clone.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/init_repo.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/checkout.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/server.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/bzr.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/cvs.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/dummy.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/git.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/hg.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/svn.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/type/vcsrepo.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/bzr_version_info.txt delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_a.txt delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_feature_bar.txt delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_none.txt delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_parents.txt delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_tags.txt delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/svn_info.txt delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/spec.opts delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/support/filesystem_helpers.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/support/fixture_helpers.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/bzr_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/git_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/hg_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/svn_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/type/README.markdown delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.fixtures.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.gemfile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.project delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.travis.yml delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/LICENSE delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/Modulefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/README.md delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/Rakefile delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-CentOS-6 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-EPEL delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-RBEL delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-beta delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-kbsingh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-remi delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-rpmforge-dag delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-webtatic-andy delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY.atrpms delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RubyWorks.GPG.key delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.4/rpm-gpg/RPM-GPG-KEY-EPEL delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-CentOS-5 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-EPEL delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-RBEL delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-beta delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-kbsingh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-remi delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-rpmforge-dag delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-webtatic-andy delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.art delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.atrpms delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RubyWorks.GPG.key delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-CentOS-6 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-EPEL delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-PGDG delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-RBEL delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-beta delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-kbsingh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-remi delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-webtatic-andy delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.art delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.atrpms delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RubyWorks.GPG.key delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-CentOS-5 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-EPEL delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-RBEL delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-beta delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-dawson delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-beta delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-release delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-remi delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl3 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl4 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl5 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl6 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY.atrpms delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RubyWorks.GPG.key delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/empty/.placeholder delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-5 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-6 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-4 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-5 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-6 delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-PGDG delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-RBEL delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-beta delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-elrepo.org delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-kbsingh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-beta delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-release delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-remi delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-rpmforge-dag delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-sl delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-webtatic-andy delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.art delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.atrpms delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RubyWorks.GPG.key delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/yum-updatesd.conf delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/cron.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/defaults.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/init.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/managed_yumrepo.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/params.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/plugin.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/prerequisites.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/10gen.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/atomic.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/atrpms.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centalt.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos4.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos5.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos6.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos_testing.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/ceph.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch10.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch90.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/elrepo.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/epel.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/foreman.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/integ_ganeti.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage5.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage6.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/karan.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/logstash13.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/mongodb.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/monitoringsucks.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/newrelic.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/nginx.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/openstack_grizzly.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/passenger.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg91.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg92.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg93.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetdevel.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetlabs.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/rbel.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/remi.pp delete mode 100755 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/remi_php55.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforge.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforgeextras.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/rpmforge.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/sl5.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/sl6.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/tmz.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/varnish.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/vfabric.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/virtualbox.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/webtatic.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/updatesd.pp delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/spec/classes/yum_spec.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/spec/spec_helper.rb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/templates/yum-cron.erb delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/execute-files.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/hostsupdater-notice.txt delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/important-notices.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/important-notices.txt delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/initial-setup.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/os-detect.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/r10k.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/self-promotion.txt delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/ssh-keygen.sh delete mode 100644 resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/update-puppet.sh diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/config.yaml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/config.yaml deleted file mode 100644 index 926685ba1c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/config.yaml +++ /dev/null @@ -1,322 +0,0 @@ ---- -vagrantfile-local: - name: phraseanet-php55-nginx - vm: - box: puphpet/debian75-x64 - box_url: puphpet/debian75-x64 - hostname: phraseanet-php55-nginx - memory: '4096' - chosen_provider: virtualbox - network: - private_network: 192.168.56.101 - forwarded_port: - jjfjpp9VdZ4A: - host: '6592' - guest: '22' - provider: - virtualbox: - modifyvm: - cpus: '2' - natdnshostresolver1: on - setextradata: - VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root: 1 - vmware: - numvcpus: 1 - parallels: - cpus: 1 - provision: - puppet: - manifests_path: resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet - manifest_file: manifest.pp - module_path: resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules - options: - - '--verbose' - - '--hiera_config /vagrant/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/hiera.yaml' - - '--parser future' - synced_folder: - KaPfJ4CzfgFk: - source: '' - target: /var/www/phraseanet - sync_type: nfs - rsync: - args: '-z' - exclude: .vagrant/ - auto: 'false' - usable_port_range: 2200..2250 - ssh: - host: null - port: null - private_key_path: null - username: vagrant - guest_port: null - keep_alive: true - forward_agent: false - forward_x11: false - shell: 'bash -l' - vagrant: - host: detect -server: - packages: - - autoconf - - automake - - build-essential - - cachefilesd - - ghostscript - - git - - gpac - - htop - - imagemagick - - inkscape - - libass-dev - - libdc1394-22-dev - - libevent-dev - - libexpat1-dev - - libfaad-dev - - libfreetype6-dev - - libgif-dev - - libgpac-dev - - libgsm1-dev - - libimage-exiftool-perl - - libjpeg62-dev - - libmariadbclient-dev - - libmemcache0 - - libmp3lame-dev - - libopencore-amrnb-dev - - libopencore-amrwb-dev - - libopus-dev - - libsdl1.2-dev - - libtheora-dev - - libtool - - libva-dev - - libvdpau-dev - - libvorbis-dev - - libvpx-dev - - libx11-dev - - libx264-dev - - libxext-dev - - libxfixes-dev - - libxml2-dev - - libxvidcore-dev - - libzmq-dev - - libzmq3-dev - - locales - - memcached - - openjdk-7-jdk - - openjdk-7-jre - - pkg-config - - python-setuptools - - python-meld3 - - re2c - - scons - - swftools - - texi2html - - ufraw - - unoconv - - unzip - - vim - - xpdf - - yasm - - zip - - zlib1g-dev - dot_files: - - - bash_aliases: null - _prevent_empty: '' -mailcatcher: - install: '1' - settings: - smtp_ip: 0.0.0.0 - smtp_port: 1025 - http_ip: 0.0.0.0 - http_port: '1080' - mailcatcher_path: /usr/local/bin - log_path: /var/log/mailcatcher/mailcatcher.log -firewall: - install: '0' - rules: null -hhvm: - install: '0' - nightly: '1' - settings: - host: 127.0.0.1 - port: '9000' -apache: - install: 0 - settings: - user: www-data - group: www-data - default_vhost: true - manage_user: false - manage_group: false - sendfile: 0 - modules: - - php - - rewrite - vhosts: - 7lQATQxib5dH: - servername: awesome.dev - serveraliases: - - www.awesome.dev - docroot: /var/www/awesome - port: '80' - setenv: - - 'APP_ENV dev' - override: - - All - options: - - Indexes - - FollowSymLinks - - MultiViews - custom_fragment: '' - ssl_cert: '' - ssl_key: '' - ssl_chain: '' - ssl_certs_dir: '' - mod_pagespeed: 0 - mod_spdy: 0 -nginx: - install: '1' - settings: - default_vhost: 1 - proxy_buffer_size: 128k - proxy_buffers: '4 256k' - vhosts: - issDOx17O4bn: - server_name: phraseanet-php55-nginx - server_aliases: - - nginx.phraseanet.php55 - www_root: /var/www/phraseanet/www - listen_port: '80' - index_files: - - index.html - - index.htm - - index.php - envvars: - - 'APP_ENV dev' - - 'PATH /usr/local/bin:/usr/bin:/bin' - ssl: '1' - ssl_cert: '' - ssl_key: '' -php: - install: '1' - version: '55' - composer: '1' - composer_home: '' - modules: - php: - - cli - - curl - - enchant - - gd - - imagick - - intl - - mbstring - - mcrypt - - memcache - - memcached - - mysql - - redis - - sqlite - pear: { } - pecl: - - amqp - - json - - zip - - zmq-beta - ini: - display_errors: On - error_reporting: '-1' - session.save_path: '/var/lib/php/session' - sql.safe_mode: 'false' - file_uploads: On - session.cache_limiter: Off - short_open_tag: Off - session.auto_start: Off - allow_url_fopen: On - session.hash_bits_per_character: '6' - session.hash_function: On - session.use_only_cookies: On - session.use_cookies: On - upload_max_filesize: '2000M' - post_max_size: '2000M' - timezone: Europe/Paris -xdebug: - install: '1' - settings: - xdebug.default_enable: '1' - xdebug.remote_autostart: '0' - xdebug.remote_connect_back: '1' - xdebug.remote_enable: '1' - xdebug.remote_handler: dbgp - xdebug.remote_port: '9000' - xdebug.max_nesting_level: '1000' -drush: - install: 0 - settings: - drush.tag_branch: 6.x -mysql: - install: 0 - root_password: '123' - adminer: 0 - databases: - AClrSlhQehoc: - grant: - - ALL - name: dbname - host: localhost - user: dbuser - password: '123' - sql_file: '' -postgresql: - install: 0 - settings: - root_password: '123' - user_group: postgres - encoding: UTF8 - version: '9.3' - databases: { } - adminer: 0 -mariadb: - install: '1' - root_password: toor - adminer: '0' - databases: { } - version: '10.0' -sqlite: - install: '1' - adminer: '0' - databases: { } -mongodb: - install: '0' - settings: - auth: 1 - port: '27017' - databases: { } -redis: - install: '1' - settings: - conf_port: '6379' -beanstalkd: - install: 0 - settings: - listenaddress: 0.0.0.0 - listenport: '13000' - maxjobsize: '65535' - maxconnections: '1024' - binlogdir: /var/lib/beanstalkd/binlog - binlogfsync: null - binlogsize: '10485760' - beanstalk_console: 0 - binlogdir: /var/lib/beanstalkd/binlog -rabbitmq: - install: '1' - settings: - port: '5672' -elastic_search: - install: '1' - settings: - java_install: true - autoupgrade: true - init_defaults: - marvel.agent.enabled: false - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.bash_aliases b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.bash_aliases deleted file mode 100644 index 14bad1eabf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.bash_aliases +++ /dev/null @@ -1,55 +0,0 @@ -if [ -f /etc/bash_completion ]; then - source /etc/bash_completion -fi - -__has_parent_dir () { - # Utility function so we can test for things like .git/.hg without firing up a - # separate process - test -d "$1" && return 0; - - current="." - while [ ! "$current" -ef "$current/.." ]; do - if [ -d "$current/$1" ]; then - return 0; - fi - current="$current/.."; - done - - return 1; -} - -__vcs_name() { - if [ -d .svn ]; then - echo "-[svn]"; - elif __has_parent_dir ".git"; then - echo "-[$(__git_ps1 'git %s')]"; - elif __has_parent_dir ".hg"; then - echo "-[hg $(hg branch)]" - fi -} - -black=$(tput -Txterm setaf 0) -red=$(tput -Txterm setaf 1) -green=$(tput -Txterm setaf 2) -yellow=$(tput -Txterm setaf 3) -dk_blue=$(tput -Txterm setaf 4) -pink=$(tput -Txterm setaf 5) -lt_blue=$(tput -Txterm setaf 6) - -bold=$(tput -Txterm bold) -reset=$(tput -Txterm sgr0) - -# Nicely formatted terminal prompt -export PS1='\n\[$bold\]\[$black\][\[$dk_blue\]\@\[$black\]]-[\[$green\]\u\[$yellow\]@\[$green\]\h\[$black\]]-[\[$pink\]\w\[$black\]]\[\033[0;33m\]$(__vcs_name) \[\033[00m\]\[$reset\]\n\[$reset\]\$ ' - -alias ls='ls -F --color=always' -alias dir='dir -F --color=always' -alias ll='ls -l' -alias cp='cp -iv' -alias rm='rm -i' -alias mv='mv -iv' -alias grep='grep --color=auto -in' -alias ..='cd ..' - -alias blackfire-disable='sudo rm -f /etc/php5/fpm/conf.d/20-blackfire.ini && sudo ln -sf ../../mods-available/xdebug.ini /etc/php5/fpm/conf.d/20-xdebug.ini && sudo service php5-fpm restart' -alias blackfire-enable='sudo rm -f /etc/php5/fpm/conf.d/20-xdebug.ini && sudo ln -sf ../../mods-available/blackfire.ini /etc/php5/fpm/conf.d/20-blackfire.ini && sudo service php5-fpm restart' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.bash_git b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.bash_git deleted file mode 100644 index 853425d005..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.bash_git +++ /dev/null @@ -1,491 +0,0 @@ -# bash/zsh git prompt support -# -# Copyright (C) 2006,2007 Shawn O. Pearce -# Distributed under the GNU General Public License, version 2.0. -# -# This script allows you to see repository status in your prompt. -# -# To enable: -# -# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh). -# 2) Add the following line to your .bashrc/.zshrc: -# source ~/.git-prompt.sh -# 3a) Change your PS1 to call __git_ps1 as -# command-substitution: -# Bash: PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' -# ZSH: setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ ' -# the optional argument will be used as format string. -# 3b) Alternatively, for a slightly faster prompt, __git_ps1 can -# be used for PROMPT_COMMAND in Bash or for precmd() in Zsh -# with two parameters,
 and , which are strings
-#        you would put in $PS1 before and after the status string
-#        generated by the git-prompt machinery.  e.g.
-#        Bash: PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
-#          will show username, at-sign, host, colon, cwd, then
-#          various status string, followed by dollar and SP, as
-#          your prompt.
-#        ZSH:  precmd () { __git_ps1 "%n" ":%~$ " "|%s" }
-#          will show username, pipe, then various status string,
-#          followed by colon, cwd, dollar and SP, as your prompt.
-#        Optionally, you can supply a third argument with a printf
-#        format string to finetune the output of the branch status
-#
-# The repository status will be displayed only if you are currently in a
-# git repository. The %s token is the placeholder for the shown status.
-#
-# The prompt status always includes the current branch name.
-#
-# In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty value,
-# unstaged (*) and staged (+) changes will be shown next to the branch
-# name.  You can configure this per-repository with the
-# bash.showDirtyState variable, which defaults to true once
-# GIT_PS1_SHOWDIRTYSTATE is enabled.
-#
-# You can also see if currently something is stashed, by setting
-# GIT_PS1_SHOWSTASHSTATE to a nonempty value. If something is stashed,
-# then a '$' will be shown next to the branch name.
-#
-# If you would like to see if there're untracked files, then you can set
-# GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're untracked
-# files, then a '%' will be shown next to the branch name.  You can
-# configure this per-repository with the bash.showUntrackedFiles
-# variable, which defaults to true once GIT_PS1_SHOWUNTRACKEDFILES is
-# enabled.
-#
-# If you would like to see the difference between HEAD and its upstream,
-# set GIT_PS1_SHOWUPSTREAM="auto".  A "<" indicates you are behind, ">"
-# indicates you are ahead, "<>" indicates you have diverged and "="
-# indicates that there is no difference. You can further control
-# behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated list
-# of values:
-#
-#     verbose       show number of commits ahead/behind (+/-) upstream
-#     name          if verbose, then also show the upstream abbrev name
-#     legacy        don't use the '--count' option available in recent
-#                   versions of git-rev-list
-#     git           always compare HEAD to @{upstream}
-#     svn           always compare HEAD to your SVN upstream
-#
-# By default, __git_ps1 will compare HEAD to your SVN upstream if it can
-# find one, or @{upstream} otherwise.  Once you have set
-# GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by
-# setting the bash.showUpstream config variable.
-#
-# If you would like to see more information about the identity of
-# commits checked out as a detached HEAD, set GIT_PS1_DESCRIBE_STYLE
-# to one of these values:
-#
-#     contains      relative to newer annotated tag (v1.6.3.2~35)
-#     branch        relative to newer tag or branch (master~4)
-#     describe      relative to older annotated tag (v1.6.3.1-13-gdd42c2f)
-#     default       exactly matching tag
-#
-# If you would like a colored hint about the current dirty state, set
-# GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on
-# the colored output of "git status -sb" and are available only when
-# using __git_ps1 for PROMPT_COMMAND or precmd.
-
-# check whether printf supports -v
-__git_printf_supports_v=
-printf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1
-
-# stores the divergence from upstream in $p
-# used by GIT_PS1_SHOWUPSTREAM
-__git_ps1_show_upstream ()
-{
-	local key value
-	local svn_remote svn_url_pattern count n
-	local upstream=git legacy="" verbose="" name=""
-
-	svn_remote=()
-	# get some config options from git-config
-	local output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"
-	while read -r key value; do
-		case "$key" in
-		bash.showupstream)
-			GIT_PS1_SHOWUPSTREAM="$value"
-			if [[ -z "${GIT_PS1_SHOWUPSTREAM}" ]]; then
-				p=""
-				return
-			fi
-			;;
-		svn-remote.*.url)
-			svn_remote[$((${#svn_remote[@]} + 1))]="$value"
-			svn_url_pattern="$svn_url_pattern\\|$value"
-			upstream=svn+git # default upstream is SVN if available, else git
-			;;
-		esac
-	done <<< "$output"
-
-	# parse configuration values
-	for option in ${GIT_PS1_SHOWUPSTREAM}; do
-		case "$option" in
-		git|svn) upstream="$option" ;;
-		verbose) verbose=1 ;;
-		legacy)  legacy=1  ;;
-		name)    name=1 ;;
-		esac
-	done
-
-	# Find our upstream
-	case "$upstream" in
-	git)    upstream="@{upstream}" ;;
-	svn*)
-		# get the upstream from the "git-svn-id: ..." in a commit message
-		# (git-svn uses essentially the same procedure internally)
-		local -a svn_upstream
-		svn_upstream=($(git log --first-parent -1 \
-					--grep="^git-svn-id: \(${svn_url_pattern#??}\)" 2>/dev/null))
-		if [[ 0 -ne ${#svn_upstream[@]} ]]; then
-			svn_upstream=${svn_upstream[${#svn_upstream[@]} - 2]}
-			svn_upstream=${svn_upstream%@*}
-			local n_stop="${#svn_remote[@]}"
-			for ((n=1; n <= n_stop; n++)); do
-				svn_upstream=${svn_upstream#${svn_remote[$n]}}
-			done
-
-			if [[ -z "$svn_upstream" ]]; then
-				# default branch name for checkouts with no layout:
-				upstream=${GIT_SVN_ID:-git-svn}
-			else
-				upstream=${svn_upstream#/}
-			fi
-		elif [[ "svn+git" = "$upstream" ]]; then
-			upstream="@{upstream}"
-		fi
-		;;
-	esac
-
-	# Find how many commits we are ahead/behind our upstream
-	if [[ -z "$legacy" ]]; then
-		count="$(git rev-list --count --left-right \
-				"$upstream"...HEAD 2>/dev/null)"
-	else
-		# produce equivalent output to --count for older versions of git
-		local commits
-		if commits="$(git rev-list --left-right "$upstream"...HEAD 2>/dev/null)"
-		then
-			local commit behind=0 ahead=0
-			for commit in $commits
-			do
-				case "$commit" in
-				"<"*) ((behind++)) ;;
-				*)    ((ahead++))  ;;
-				esac
-			done
-			count="$behind	$ahead"
-		else
-			count=""
-		fi
-	fi
-
-	# calculate the result
-	if [[ -z "$verbose" ]]; then
-		case "$count" in
-		"") # no upstream
-			p="" ;;
-		"0	0") # equal to upstream
-			p="=" ;;
-		"0	"*) # ahead of upstream
-			p=">" ;;
-		*"	0") # behind upstream
-			p="<" ;;
-		*)	    # diverged from upstream
-			p="<>" ;;
-		esac
-	else
-		case "$count" in
-		"") # no upstream
-			p="" ;;
-		"0	0") # equal to upstream
-			p=" u=" ;;
-		"0	"*) # ahead of upstream
-			p=" u+${count#0	}" ;;
-		*"	0") # behind upstream
-			p=" u-${count%	0}" ;;
-		*)	    # diverged from upstream
-			p=" u+${count#*	}-${count%	*}" ;;
-		esac
-		if [[ -n "$count" && -n "$name" ]]; then
-			__git_ps1_upstream_name=$(git rev-parse \
-				--abbrev-ref "$upstream" 2>/dev/null)
-			if [ $pcmode = yes ]; then
-				# see the comments around the
-				# __git_ps1_branch_name variable below
-				p="$p \${__git_ps1_upstream_name}"
-			else
-				p="$p ${__git_ps1_upstream_name}"
-				# not needed anymore; keep user's
-				# environment clean
-				unset __git_ps1_upstream_name
-			fi
-		fi
-	fi
-
-}
-
-# Helper function that is meant to be called from __git_ps1.  It
-# injects color codes into the appropriate gitstring variables used
-# to build a gitstring.
-__git_ps1_colorize_gitstring ()
-{
-	if [[ -n ${ZSH_VERSION-} ]]; then
-		local c_red='%F{red}'
-		local c_green='%F{green}'
-		local c_lblue='%F{blue}'
-		local c_clear='%f'
-	else
-		# Using \[ and \] around colors is necessary to prevent
-		# issues with command line editing/browsing/completion!
-		local c_red='\[\e[31m\]'
-		local c_green='\[\e[32m\]'
-		local c_lblue='\[\e[1;34m\]'
-		local c_clear='\[\e[0m\]'
-	fi
-	local bad_color=$c_red
-	local ok_color=$c_green
-	local flags_color="$c_lblue"
-
-	local branch_color=""
-	if [ $detached = no ]; then
-		branch_color="$ok_color"
-	else
-		branch_color="$bad_color"
-	fi
-	c="$branch_color$c"
-
-	z="$c_clear$z"
-	if [ "$w" = "*" ]; then
-		w="$bad_color$w"
-	fi
-	if [ -n "$i" ]; then
-		i="$ok_color$i"
-	fi
-	if [ -n "$s" ]; then
-		s="$flags_color$s"
-	fi
-	if [ -n "$u" ]; then
-		u="$bad_color$u"
-	fi
-	r="$c_clear$r"
-}
-
-__git_eread ()
-{
-	f="$1"
-	shift
-	test -r "$f" && read "$@" <"$f"
-}
-
-# __git_ps1 accepts 0 or 1 arguments (i.e., format string)
-# when called from PS1 using command substitution
-# in this mode it prints text to add to bash PS1 prompt (includes branch name)
-#
-# __git_ps1 requires 2 or 3 arguments when called from PROMPT_COMMAND (pc)
-# in that case it _sets_ PS1. The arguments are parts of a PS1 string.
-# when two arguments are given, the first is prepended and the second appended
-# to the state string when assigned to PS1.
-# The optional third parameter will be used as printf format string to further
-# customize the output of the git-status string.
-# In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true
-__git_ps1 ()
-{
-	local pcmode=no
-	local detached=no
-	local ps1pc_start='\u@\h:\w '
-	local ps1pc_end='\$ '
-	local printf_format=' (%s)'
-
-	case "$#" in
-		2|3)	pcmode=yes
-			ps1pc_start="$1"
-			ps1pc_end="$2"
-			printf_format="${3:-$printf_format}"
-		;;
-		0|1)	printf_format="${1:-$printf_format}"
-		;;
-		*)	return
-		;;
-	esac
-
-	local repo_info rev_parse_exit_code
-	repo_info="$(git rev-parse --git-dir --is-inside-git-dir \
-		--is-bare-repository --is-inside-work-tree \
-		--short HEAD 2>/dev/null)"
-	rev_parse_exit_code="$?"
-
-	if [ -z "$repo_info" ]; then
-		if [ $pcmode = yes ]; then
-			#In PC mode PS1 always needs to be set
-			PS1="$ps1pc_start$ps1pc_end"
-		fi
-		return
-	fi
-
-	local short_sha
-	if [ "$rev_parse_exit_code" = "0" ]; then
-		short_sha="${repo_info##*$'\n'}"
-		repo_info="${repo_info%$'\n'*}"
-	fi
-	local inside_worktree="${repo_info##*$'\n'}"
-	repo_info="${repo_info%$'\n'*}"
-	local bare_repo="${repo_info##*$'\n'}"
-	repo_info="${repo_info%$'\n'*}"
-	local inside_gitdir="${repo_info##*$'\n'}"
-	local g="${repo_info%$'\n'*}"
-
-	local r=""
-	local b=""
-	local step=""
-	local total=""
-	if [ -d "$g/rebase-merge" ]; then
-		__git_eread "$g/rebase-merge/head-name" b
-		__git_eread "$g/rebase-merge/msgnum" step
-		__git_eread "$g/rebase-merge/end" total
-		if [ -f "$g/rebase-merge/interactive" ]; then
-			r="|REBASE-i"
-		else
-			r="|REBASE-m"
-		fi
-	else
-		if [ -d "$g/rebase-apply" ]; then
-			__git_eread "$g/rebase-apply/next" step
-			__git_eread "$g/rebase-apply/last" total
-			if [ -f "$g/rebase-apply/rebasing" ]; then
-				__git_eread "$g/rebase-apply/head-name" b
-				r="|REBASE"
-			elif [ -f "$g/rebase-apply/applying" ]; then
-				r="|AM"
-			else
-				r="|AM/REBASE"
-			fi
-		elif [ -f "$g/MERGE_HEAD" ]; then
-			r="|MERGING"
-		elif [ -f "$g/CHERRY_PICK_HEAD" ]; then
-			r="|CHERRY-PICKING"
-		elif [ -f "$g/REVERT_HEAD" ]; then
-			r="|REVERTING"
-		elif [ -f "$g/BISECT_LOG" ]; then
-			r="|BISECTING"
-		fi
-
-		if [ -n "$b" ]; then
-			:
-		elif [ -h "$g/HEAD" ]; then
-			# symlink symbolic ref
-			b="$(git symbolic-ref HEAD 2>/dev/null)"
-		else
-			local head=""
-			if ! __git_eread "$g/HEAD" head; then
-				if [ $pcmode = yes ]; then
-					PS1="$ps1pc_start$ps1pc_end"
-				fi
-				return
-			fi
-			# is it a symbolic ref?
-			b="${head#ref: }"
-			if [ "$head" = "$b" ]; then
-				detached=yes
-				b="$(
-				case "${GIT_PS1_DESCRIBE_STYLE-}" in
-				(contains)
-					git describe --contains HEAD ;;
-				(branch)
-					git describe --contains --all HEAD ;;
-				(describe)
-					git describe HEAD ;;
-				(* | default)
-					git describe --tags --exact-match HEAD ;;
-				esac 2>/dev/null)" ||
-
-				b="$short_sha..."
-				b="($b)"
-			fi
-		fi
-	fi
-
-	if [ -n "$step" ] && [ -n "$total" ]; then
-		r="$r $step/$total"
-	fi
-
-	local w=""
-	local i=""
-	local s=""
-	local u=""
-	local c=""
-	local p=""
-
-	if [ "true" = "$inside_gitdir" ]; then
-		if [ "true" = "$bare_repo" ]; then
-			c="BARE:"
-		else
-			b="GIT_DIR!"
-		fi
-	elif [ "true" = "$inside_worktree" ]; then
-		if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
-		   [ "$(git config --bool bash.showDirtyState)" != "false" ]
-		then
-			git diff --no-ext-diff --quiet --exit-code || w="*"
-			if [ -n "$short_sha" ]; then
-				git diff-index --cached --quiet HEAD -- || i="+"
-			else
-				i="#"
-			fi
-		fi
-		if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] &&
-		   [ -r "$g/refs/stash" ]; then
-			s="$"
-		fi
-
-		if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] &&
-		   [ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
-		   git ls-files --others --exclude-standard --error-unmatch -- '*' >/dev/null 2>/dev/null
-		then
-			u="%${ZSH_VERSION+%}"
-		fi
-
-		if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then
-			__git_ps1_show_upstream
-		fi
-	fi
-
-	local z="${GIT_PS1_STATESEPARATOR-" "}"
-
-	# NO color option unless in PROMPT_COMMAND mode
-	if [ $pcmode = yes ] && [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
-		__git_ps1_colorize_gitstring
-	fi
-
-	b=${b##refs/heads/}
-	if [ $pcmode = yes ]; then
-		# In pcmode (and only pcmode) the contents of
-		# $gitstring are subject to expansion by the shell.
-		# Avoid putting the raw ref name in the prompt to
-		# protect the user from arbitrary code execution via
-		# specially crafted ref names (e.g., a ref named
-		# '$(IFS=_;cmd=sudo_rm_-rf_/;$cmd)' would execute
-		# 'sudo rm -rf /' when the prompt is drawn).  Instead,
-		# put the ref name in a new global variable (in the
-		# __git_ps1_* namespace to avoid colliding with the
-		# user's environment) and reference that variable from
-		# PS1.
-		__git_ps1_branch_name=$b
-		# note that the $ is escaped -- the variable will be
-		# expanded later (when it's time to draw the prompt)
-		b="\${__git_ps1_branch_name}"
-	fi
-
-	local f="$w$i$s$u"
-	local gitstring="$c$b${f:+$z$f}$r$p"
-
-	if [ $pcmode = yes ]; then
-		if [ "${__git_printf_supports_v-}" != yes ]; then
-			gitstring=$(printf -- "$printf_format" "$gitstring")
-		else
-			printf -v gitstring -- "$printf_format" "$gitstring"
-		fi
-		PS1="$ps1pc_start$gitstring$ps1pc_end"
-	else
-		printf -- "$printf_format" "$gitstring"
-	fi
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.vimrc b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.vimrc
deleted file mode 100644
index 2ff1aa6080..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.vimrc
+++ /dev/null
@@ -1,414 +0,0 @@
-set rtp+=$GOROOT/misc/vim
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Maintainer:
-"       Amir Salihefendic
-"       http://amix.dk - amix@amix.dk
-"
-" Version:
-"       5.0 - 29/05/12 15:43:36
-"
-" Blog_post:
-"       http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github
-"
-" Awesome_version:
-"       Get this config, nice color schemes and lots of plugins!
-"
-"       Install the awesome version from:
-"
-"           https://github.com/amix/vimrc
-"
-" Syntax_highlighted:
-"       http://amix.dk/vim/vimrc.html
-"
-" Raw_version:
-"       http://amix.dk/vim/vimrc.txt
-"
-" Sections:
-"    -> General
-"    -> VIM user interface
-"    -> Colors and Fonts
-"    -> Files and backups
-"    -> Text, tab and indent related
-"    -> Visual mode related
-"    -> Moving around, tabs and buffers
-"    -> Status line
-"    -> Editing mappings
-"    -> vimgrep searching and cope displaying
-"    -> Spell checking
-"    -> Misc
-"    -> Helper functions
-"
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => General
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Sets how many lines of history VIM has to remember
-set history=700
-
-" Enable filetype plugins
-filetype plugin on
-filetype indent on
-
-" Set to auto read when a file is changed from the outside
-set autoread
-
-" With a map leader it's possible to do extra key combinations
-" like w saves the current file
-let mapleader = ","
-let g:mapleader = ","
-
-" Fast saving
-nmap w :w!
-
-" :W sudo saves the file
-" (useful for handling the permission-denied error)
-command W w !sudo tee % > /dev/null
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => VIM user interface
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Set 7 lines to the cursor - when moving vertically using j/k
-set so=7
-
-" Turn on the WiLd menu
-set wildmenu
-
-" Ignore compiled files
-set wildignore=*.o,*~,*.pyc
-if has("win16") || has("win32")
-    set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
-else
-    set wildignore+=.git\*,.hg\*,.svn\*
-endif
-
-"Always show current position
-set ruler
-
-" Height of the command bar
-set cmdheight=2
-
-" A buffer becomes hidden when it is abandoned
-set hid
-
-" Configure backspace so it acts as it should act
-set backspace=eol,start,indent
-set whichwrap+=<,>,h,l
-
-" Ignore case when searching
-set ignorecase
-
-" When searching try to be smart about cases
-set smartcase
-
-" Highlight search results
-set hlsearch
-
-" Makes search act like search in modern browsers
-set incsearch
-
-" Don't redraw while executing macros (good performance config)
-set lazyredraw
-
-" For regular expressions turn magic on
-set magic
-
-" Show matching brackets when text indicator is over them
-set showmatch
-" How many tenths of a second to blink when matching brackets
-set mat=2
-
-" No annoying sound on errors
-set noerrorbells
-set novisualbell
-set t_vb=
-set tm=500
-
-" Add a bit extra margin to the left
-set foldcolumn=1
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Colors and Fonts
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Enable syntax highlighting
-syntax enable
-
-try
-    colorscheme desert
-catch
-endtry
-
-set background=dark
-
-" Set extra options when running in GUI mode
-if has("gui_running")
-    set guioptions-=T
-    set guioptions-=e
-    set t_Co=256
-    set guitablabel=%M\ %t
-endif
-
-" Set utf8 as standard encoding and en_US as the standard language
-set encoding=utf8
-
-" Use Unix as the standard file type
-set ffs=unix,dos,mac
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Files, backups and undo
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Turn backup off, since most stuff is in SVN, git et.c anyway...
-set nobackup
-set nowb
-set noswapfile
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Text, tab and indent related
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Use spaces instead of tabs
-set expandtab
-
-" Be smart when using tabs ;)
-set smarttab
-
-" 1 tab == 4 spaces
-set shiftwidth=4
-set tabstop=4
-
-" Linebreak on 500 characters
-set lbr
-set tw=500
-
-set ai "Auto indent
-set si "Smart indent
-set wrap "Wrap lines
-
-
-""""""""""""""""""""""""""""""
-" => Visual mode related
-""""""""""""""""""""""""""""""
-" Visual mode pressing * or # searches for the current selection
-" Super useful! From an idea by Michael Naumann
-vnoremap  * :call VisualSelection('f', '')
-vnoremap  # :call VisualSelection('b', '')
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Moving around, tabs, windows and buffers
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Treat long lines as break lines (useful when moving around in them)
-map j gj
-map k gk
-
-" Map  to / (search) and Ctrl- to ? (backwards search)
-map  /
-map  ?
-
-" Disable highlight when  is pressed
-map   :noh
-
-" Smart way to move between windows
-map  j
-map  k
-map  h
-map  l
-
-" Close the current buffer
-map bd :Bclose
-
-" Close all the buffers
-map ba :1,1000 bd!
-
-" Useful mappings for managing tabs
-map tn :tabnew
-map to :tabonly
-map tc :tabclose
-map tm :tabmove
-map t :tabnext
-
-" Opens a new tab with the current buffer's path
-" Super useful when editing files in the same directory
-map te :tabedit =expand("%:p:h")/
-
-" Switch CWD to the directory of the open buffer
-map cd :cd %:p:h:pwd
-
-" Specify the behavior when switching between buffers
-try
-  set switchbuf=useopen,usetab,newtab
-  set stal=2
-catch
-endtry
-
-" Return to last edit position when opening files (You want this!)
-autocmd BufReadPost *
-     \ if line("'\"") > 0 && line("'\"") <= line("$") |
-     \   exe "normal! g`\"" |
-     \ endif
-" Remember info about open buffers on close
-set viminfo^=%
-
-
-""""""""""""""""""""""""""""""
-" => Status line
-""""""""""""""""""""""""""""""
-" Always show the status line
-set laststatus=2
-
-" Format the status line
-set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Editing mappings
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Remap VIM 0 to first non-blank character
-map 0 ^
-
-" Move a line of text using ALT+[jk] or Comamnd+[jk] on mac
-nmap  mz:m+`z
-nmap  mz:m-2`z
-vmap  :m'>+`mzgv`yo`z
-vmap  :m'<-2`>my` 
-  nmap  
-  vmap  
-  vmap  
-endif
-
-" Delete trailing white space on save, useful for Python and CoffeeScript ;)
-func! DeleteTrailingWS()
-  exe "normal mz"
-  %s/\s\+$//ge
-  exe "normal `z"
-endfunc
-autocmd BufWrite *.py :call DeleteTrailingWS()
-autocmd BufWrite *.coffee :call DeleteTrailingWS()
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => vimgrep searching and cope displaying
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" When you press gv you vimgrep after the selected text
-vnoremap  gv :call VisualSelection('gv', '')
-
-" Open vimgrep and put the cursor in the right position
-map g :vimgrep // **/*.
-
-" Vimgreps in the current file
-map  :vimgrep // %
-
-" When you press r you can search and replace the selected text
-vnoremap  r :call VisualSelection('replace', '')
-
-" Do :help cope if you are unsure what cope is. It's super useful!
-"
-" When you search with vimgrep, display your results in cope by doing:
-"   cc
-"
-" To go to the next search result do:
-"   n
-"
-" To go to the previous search results do:
-"   p
-"
-map cc :botright cope
-map co ggVGy:tabnew:set syntax=qfpgg
-map n :cn
-map p :cp
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Spell checking
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Pressing ,ss will toggle and untoggle spell checking
-map ss :setlocal spell!
-
-" Shortcuts using 
-map sn ]s
-map sp [s
-map sa zg
-map s? z=
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Misc
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" Remove the Windows ^M - when the encodings gets messed up
-noremap m mmHmt:%s///ge'tzt'm
-
-" Quickly open a buffer for scripbble
-map q :e ~/buffer
-
-" Toggle paste mode on and off
-map pp :setlocal paste!
-
-
-
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-" => Helper functions
-"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-function! CmdLine(str)
-    exe "menu Foo.Bar :" . a:str
-    emenu Foo.Bar
-    unmenu Foo
-endfunction
-
-function! VisualSelection(direction, extra_filter) range
-    let l:saved_reg = @"
-    execute "normal! vgvy"
-
-    let l:pattern = escape(@", '\\/.*$^~[]')
-    let l:pattern = substitute(l:pattern, "\n$", "", "")
-
-    if a:direction == 'b'
-        execute "normal ?" . l:pattern . "^M"
-    elseif a:direction == 'gv'
-        call CmdLine("vimgrep " . '/'. l:pattern . '/' . ' **/*.' . a:extra_filter)
-    elseif a:direction == 'replace'
-        call CmdLine("%s" . '/'. l:pattern . '/')
-    elseif a:direction == 'f'
-        execute "normal /" . l:pattern . "^M"
-    endif
-
-    let @/ = l:pattern
-    let @" = l:saved_reg
-endfunction
-
-
-" Returns true if paste mode is enabled
-function! HasPaste()
-    if &paste
-        return 'PASTE MODE  '
-    en
-    return ''
-endfunction
-
-" Don't close window, when deleting a buffer
-command! Bclose call BufcloseCloseIt()
-function! BufcloseCloseIt()
-   let l:currentBufNum = bufnr("%")
-   let l:alternateBufNum = bufnr("#")
-
-   if buflisted(l:alternateBufNum)
-     buffer #
-   else
-     bnext
-   endif
-
-   if bufnr("%") == l:currentBufNum
-     new
-   endif
-
-   if buflisted(l:currentBufNum)
-     execute("bdelete! ".l:currentBufNum)
-   endif
-endfunction
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/ssh/.gitignore b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/ssh/.gitignore
deleted file mode 100644
index b1394f8ce6..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/ssh/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*
-!.gitignore
-!insecure_private_key
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/ssh/insecure_private_key b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/ssh/insecure_private_key
deleted file mode 100644
index 7d6a083909..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/ssh/insecure_private_key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEogIBAAKCAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzI
-w+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoP
-kcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2
-hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NO
-Td0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcW
-yLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQIBIwKCAQEA4iqWPJXtzZA68mKd
-ELs4jJsdyky+ewdZeNds5tjcnHU5zUYE25K+ffJED9qUWICcLZDc81TGWjHyAqD1
-Bw7XpgUwFgeUJwUlzQurAv+/ySnxiwuaGJfhFM1CaQHzfXphgVml+fZUvnJUTvzf
-TK2Lg6EdbUE9TarUlBf/xPfuEhMSlIE5keb/Zz3/LUlRg8yDqz5w+QWVJ4utnKnK
-iqwZN0mwpwU7YSyJhlT4YV1F3n4YjLswM5wJs2oqm0jssQu/BT0tyEXNDYBLEF4A
-sClaWuSJ2kjq7KhrrYXzagqhnSei9ODYFShJu8UWVec3Ihb5ZXlzO6vdNQ1J9Xsf
-4m+2ywKBgQD6qFxx/Rv9CNN96l/4rb14HKirC2o/orApiHmHDsURs5rUKDx0f9iP
-cXN7S1uePXuJRK/5hsubaOCx3Owd2u9gD6Oq0CsMkE4CUSiJcYrMANtx54cGH7Rk
-EjFZxK8xAv1ldELEyxrFqkbE4BKd8QOt414qjvTGyAK+OLD3M2QdCQKBgQDtx8pN
-CAxR7yhHbIWT1AH66+XWN8bXq7l3RO/ukeaci98JfkbkxURZhtxV/HHuvUhnPLdX
-3TwygPBYZFNo4pzVEhzWoTtnEtrFueKxyc3+LjZpuo+mBlQ6ORtfgkr9gBVphXZG
-YEzkCD3lVdl8L4cw9BVpKrJCs1c5taGjDgdInQKBgHm/fVvv96bJxc9x1tffXAcj
-3OVdUN0UgXNCSaf/3A/phbeBQe9xS+3mpc4r6qvx+iy69mNBeNZ0xOitIjpjBo2+
-dBEjSBwLk5q5tJqHmy/jKMJL4n9ROlx93XS+njxgibTvU6Fp9w+NOFD/HvxB3Tcz
-6+jJF85D5BNAG3DBMKBjAoGBAOAxZvgsKN+JuENXsST7F89Tck2iTcQIT8g5rwWC
-P9Vt74yboe2kDT531w8+egz7nAmRBKNM751U/95P9t88EDacDI/Z2OwnuFQHCPDF
-llYOUI+SpLJ6/vURRbHSnnn8a/XG+nzedGH5JGqEJNQsz+xT2axM0/W/CRknmGaJ
-kda/AoGANWrLCz708y7VYgAtW2Uf1DPOIYMdvo6fxIB5i9ZfISgcJ/bbCUkFrhoH
-+vq/5CIWxCPp0f85R4qxxQ5ihxJ0YDQT9Jpx4TMss4PSavPaBH3RXow5Ohe+bYoQ
-NE5OgEXk2wVfZczCZpigBKbKZHNYcelXtTt/nP3rsCuGcM4h53s=
------END RSA PRIVATE KEY-----
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-always/.gitkeep b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-always/.gitkeep
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-always/setup b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-always/setup
deleted file mode 100755
index a70ce5e9db..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-always/setup
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-# stoping iptable
-sudo service iptables-persistent flush
-
-source ~/.bashrc
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-once/.gitkeep b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-once/.gitkeep
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-once/setup b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-once/setup
deleted file mode 100644
index 19a93088d3..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/exec-once/setup
+++ /dev/null
@@ -1,130 +0,0 @@
-#!/bin/bash
-
-# timezone
-sudo sh -c 'echo "Europe/Paris" > /etc/timezone'
-sudo dpkg-reconfigure -f noninteractive tzdata 
-
-# locales
-sudo sh -c "echo 'LANGUAGE=en_GB.UTF-8' >> /etc/environment"
-sudo sh -c "echo 'LANG=en_GB.UTF-8' >> /etc/environment"
-sudo sh -c "echo 'LC_ALL=en_GB.UTF-8' >> /etc/environment"
-sudo sh -c 'echo "en_GB.UTF-8 UTF-8" >> /etc/locale.gen'
-sudo sh -c 'echo "de_DE.UTF-8 UTF-8" >> /etc/locale.gen'
-sudo sh -c 'echo "es_ES.UTF-8 UTF-8" >> /etc/locale.gen'
-sudo sh -c 'echo "fr_FR.UTF-8 UTF-8" >> /etc/locale.gen'
-sudo sh -c 'echo "nl_NL.UTF-8 UTF-8" >> /etc/locale.gen'
-sudo locale-gen en_GB en_GB.UTF-8 fr_FR fr_FR.UTF-8 de_DE de_DE.UTF-8 nl_NL nl_NL.UTF-8
-sudo dpkg-reconfigure -f noninteractive locales
-
-#ffmpeg
-sudo sh -c 'echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list'
-sudo sh -c 'echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list'
-
-sudo apt-get update
-sudo apt-get install --force-yes -y deb-multimedia-keyring
-sudo apt-get update
-sudo apt-get install --force-yes -y libfaac-dev
-
-cd /tmp
-wget –-quiet https://www.ffmpeg.org/releases/ffmpeg-1.2.8.tar.gz
-tar -zxvf ffmpeg-1.2.8.tar.gz
-cd ffmpeg-1.2.8
-
-wget –-quiet -O fdk-aac.zip https://github.com/mstorsjo/fdk-aac/zipball/master
-sudo -u vagrant unzip fdk-aac.zip
-cd mstorsjo-fdk-aac*
-autoreconf -fiv
-./configure --disable-shared
-make
-sudo make install
-make distclean
-cd ..
-
-./configure --enable-gpl \
-            --enable-nonfree \
-            --enable-libfaac \
-            --enable-libgsm \
-            --enable-libmp3lame \
-            --enable-libtheora \
-            --enable-libvorbis \
-            --enable-libx264 \
-            --enable-libxvid \
-            --enable-zlib \
-            --enable-postproc \
-            --enable-swscale \
-            --enable-pthreads \
-            --enable-x11grab \
-            --enable-libdc1394 \
-            --enable-version3 \
-            --enable-libopencore-amrnb \
-            --enable-libopencore-amrwb
-make
-sudo make install
-
-# node + npm
-cd /tmp
-wget –-quiet "http://nodejs.org/dist/v0.10.29/node-v0.10.29-linux-x64.tar.gz"
-tar -zxvf node-v0.10.29-linux-x64.tar.gz
-cd node-v0.10.29-linux-x64
-find . -maxdepth 1 -type f -exec rm {} \;
-sudo cp -rf * /usr/local/
-
-# npm binaries
-
-#twig
-cd /tmp
-git clone https://github.com/fabpot/Twig.git
-cd Twig/ext/twig
-phpize
-./configure
-make
-sudo make install
-sudo sh -c 'echo "extension=twig.so" > /etc/php5/mods-available/twig.ini'
-sudo sh -c 'ln -s ../../mods-available/twig.ini /etc/php5/cli/conf.d/20-twig.ini'
-sudo sh -c 'ln -s ../../mods-available/twig.ini /etc/php5/fpm/conf.d/20-twig.ini'
-
-# ZMQ php extension
-# The empty string is important as zmq asks for specific directory
-sudo sh -c 'echo "extension=zmq.so" > /etc/php5/mods-available/zmq.ini'
-sudo sh -c 'ln -s ../../mods-available/zmq.ini /etc/php5/cli/conf.d/20-zmq.ini'
-sudo sh -c 'ln -s ../../mods-available/zmq.ini /etc/php5/fpm/conf.d/20-zmq.ini'
-
-# swftools
-cd /tmp
-wget –-quiet http://www.swftools.org/swftools-0.9.2.tar.gz
-tar -xzvf swftools-0.9.2.tar.gz
-cd swftools-0.9.2
-./configure
-make
-sudo make install
-
-# cache file sd
-sudo sh -c 'echo "RUN=yes" > /etc/default/cachefilesd'
-
-# copy www.conf
-sudo sh -c 'cat /vagrant/resources/vagrant/config/nginx/php5-fpm-www.conf > /etc/php5/fpm/pool.d/www.conf'
-
-#setup phraseanet
-if [ ! -f /var/www/phraseanet/config/configuration.yml ]
-then
-    #copy configuration template
-    mv /var/www/phraseanet/lib/conf.d/configuration.yml /var/www/phraseanet/lib/conf.d/configuration.yml.bkp
-    cd /var/www/phraseanet
-    sudo -u vagrant composer install -n --prefer-source --dev
-    sudo -u vagrant npm install
-    sudo -u vagrant rm -f /var/www/phraseanet/lib/conf.d/configuration.yml
-    mv /var/www/phraseanet/lib/conf.d/configuration.yml.bkp /var/www/phraseanet/lib/conf.d/configuration.yml
-fi
-
-# restart services
-sudo service mysql restart
-sudo service php5-fpm restart
-sudo service nginx restart
-
-# stoping iptable
-sudo service iptables-persistent flush
-
-# reload bash
-source ~/.bashrc
-
-exit 0
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/startup-always/.gitkeep b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/startup-always/.gitkeep
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/startup-once/.gitkeep b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/startup-once/.gitkeep
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/Puppetfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/Puppetfile
deleted file mode 100644
index c34cffec26..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/Puppetfile
+++ /dev/null
@@ -1,27 +0,0 @@
-forge "http://forge.puppetlabs.com"
-mod 'stdlib', :git => 'https://github.com/puphpet/puppetlabs-stdlib.git'
-mod 'concat', :git => 'https://github.com/puphpet/puppetlabs-concat.git'
-mod 'apt', :git => 'https://github.com/puphpet/puppetlabs-apt.git'
-mod 'yum', :git => 'https://github.com/puphpet/puppet-yum.git'
-mod 'vcsrepo', :git => 'https://github.com/puphpet/puppetlabs-vcsrepo.git'
-mod 'ntp', :git => 'https://github.com/puphpet/puppetlabs-ntp.git'
-mod 'firewall', :git => 'https://github.com/puppetlabs/puppetlabs-firewall.git'
-mod 'git', :git => 'https://github.com/puphpet/puppetlabs-git.git'
-mod 'mailcatcher', :git => 'https://github.com/puphpet/puppet-mailcatcher.git'
-mod 'supervisord', :git => 'https://github.com/puphpet/puppet-supervisord.git'
-mod 'apache', :git => 'https://github.com/puphpet/puppetlabs-apache.git'
-mod 'nginx', :git => 'https://github.com/puphpet/puppet-nginx.git'
-mod 'php', :git => 'https://github.com/puphpet/puppet-php.git'
-mod 'composer', :git => 'https://github.com/puphpet/puppet-composer.git'
-mod 'puphpet', :git => 'https://github.com/puphpet/puppet-puphpet.git'
-mod 'puppi', :git => 'https://github.com/puphpet/puppi.git'
-mod 'drush', :git => 'https://github.com/puphpet/puppet-drush.git'
-mod 'mysql', :git => 'https://github.com/puphpet/puppetlabs-mysql.git'
-mod 'postgresql', :git => 'https://github.com/puphpet/puppetlabs-postgresql.git'
-mod 'sqlite', :git => 'https://github.com/puppetlabs/puppetlabs-sqlite.git'
-mod 'mongodb', :git => 'https://github.com/puphpet/puppetlabs-mongodb.git'
-mod 'redis', :git => 'https://github.com/puphpet/puppet-redis.git'
-mod 'beanstalkd', :git => 'https://github.com/puphpet/puppet-beanstalkd.git'
-mod 'rabbitmq', :git => 'https://github.com/puphpet/puppetlabs-rabbitmq.git'
-mod 'staging', :git => 'https://github.com/puphpet/puppet-staging.git'
-mod 'elasticsearch', :git => 'https://github.com/puphpet/puppet-elasticsearch.git'
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/hiera.yaml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/hiera.yaml
deleted file mode 100644
index d0c497b88e..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/hiera.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-:backends: yaml
-:yaml:
-    :datadir: '/vagrant/resources/vagrant/vms/phraseanet-php55-nginx/puphpet'
-:hierarchy:
-    - config
-:logger: console
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/manifest.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/manifest.pp
deleted file mode 100644
index 68b71b721f..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/manifest.pp
+++ /dev/null
@@ -1,1813 +0,0 @@
-## Begin Server manifest
-
-if $server_values == undef {
-  $server_values = hiera('server', false)
-} if $vm_values == undef {
-  $vm_values = hiera($::vm_target_key, false)
-}
-# Ensure the time is accurate, reducing the possibilities of apt repositories
-# failing for invalid certificates
-class { 'ntp': }
-
-include 'puphpet'
-include 'puphpet::params'
-
-Exec { path => [ '/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/' ] }
-group { 'puppet':   ensure => present }
-group { 'www-data': ensure => present }
-group { 'www-user': ensure => present }
-
-user { $::ssh_username:
-  shell   => '/bin/bash',
-  home    => "/home/${::ssh_username}",
-  ensure  => present,
-  groups  => ['www-data', 'www-user'],
-  require => [Group['www-data'], Group['www-user']]
-}
-
-user { ['apache', 'nginx', 'httpd', 'www-data']:
-  shell  => '/bin/bash',
-  ensure => present,
-  groups => 'www-data',
-  require => Group['www-data']
-}
-
-file { "/home/${::ssh_username}":
-  ensure => directory,
-  owner  => $::ssh_username,
-}
-
-# copy dot files to ssh user's home directory
-exec { 'dotfiles':
-  cwd     => "/home/${::ssh_username}",
-  command => "cp -r /vagrant/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.[a-zA-Z0-9]* /home/${::ssh_username}/ \
-              && chown -R ${::ssh_username} /home/${::ssh_username}/.[a-zA-Z0-9]* \
-              && cp -r /vagrant/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot/.[a-zA-Z0-9]* /root/",
-  onlyif  => 'test -d /vagrant/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/files/dot',
-  returns => [0, 1],
-  require => User[$::ssh_username]
-}
-
-case $::osfamily {
-  # debian, ubuntu
-  'debian': {
-    class { 'apt': }
-
-    Class['::apt::update'] -> Package <|
-        title != 'python-software-properties'
-    and title != 'software-properties-common'
-    |>
-
-    if ! defined(Package['augeas-tools']) {
-      package { 'augeas-tools':
-        ensure => present,
-      }
-    }
-  }
-  # redhat, centos
-  'redhat': {
-    class { 'yum': extrarepo => ['epel'] }
-
-    class { 'yum::repo::rpmforge': }
-    class { 'yum::repo::repoforgeextras': }
-
-    Class['::yum'] -> Yum::Managed_yumrepo <| |> -> Package <| |>
-
-    if ! defined(Package['git']) {
-      package { 'git':
-        ensure  => latest,
-        require => Class['yum::repo::repoforgeextras']
-      }
-    }
-
-    file_line { 'link ~/.bash_git':
-      ensure  => present,
-      line    => 'if [ -f ~/.bash_git ] ; then source ~/.bash_git; fi',
-      path    => "/home/${::ssh_username}/.bash_profile",
-      require => Exec['dotfiles'],
-    }
-
-    file_line { 'link ~/.bash_git for root':
-      ensure  => present,
-      line    => 'if [ -f ~/.bash_git ] ; then source ~/.bash_git; fi',
-      path    => '/root/.bashrc',
-      require => Exec['dotfiles'],
-    }
-
-    file_line { 'link ~/.bash_aliases':
-      ensure  => present,
-      line    => 'if [ -f ~/.bash_aliases ] ; then source ~/.bash_aliases; fi',
-      path    => "/home/${::ssh_username}/.bash_profile",
-      require => Exec['dotfiles'],
-    }
-
-    file_line { 'link ~/.bash_aliases for root':
-      ensure  => present,
-      line    => 'if [ -f ~/.bash_aliases ] ; then source ~/.bash_aliases; fi',
-      path    => '/root/.bashrc',
-      require => Exec['dotfiles'],
-    }
-
-    ensure_packages( ['augeas'] )
-  }
-}
-
-if $php_values == undef {
-  $php_values = hiera('php', false)
-}
-
-case $::operatingsystem {
-  'debian': {
-    include apt::backports
-
-    add_dotdeb { 'packages.dotdeb.org': release => $lsbdistcodename }
-
-   if hash_key_equals($php_values, 'install', 1) {
-      # Debian Squeeze 6.0 can do PHP 5.3 (default) and 5.4
-      if $lsbdistcodename == 'squeeze' and $php_values['version'] == '54' {
-        add_dotdeb { 'packages.dotdeb.org-php54': release => 'squeeze-php54' }
-      }
-      # Debian Wheezy 7.0 can do PHP 5.4 (default) and 5.5
-      elsif $lsbdistcodename == 'wheezy' and $php_values['version'] == '55' {
-        add_dotdeb { 'packages.dotdeb.org-php55': release => 'wheezy-php55' }
-      }
-    }
-
-    $server_lsbdistcodename = downcase($lsbdistcodename)
-
-    apt::force { 'git':
-      release => "${server_lsbdistcodename}-backports",
-      timeout => 60
-    }
-  }
-  'ubuntu': {
-    apt::key { '4F4EA0AAE5267A6C':
-      key_server => 'hkp://keyserver.ubuntu.com:80'
-    }
-    apt::key { '4CBEDD5A':
-      key_server => 'hkp://keyserver.ubuntu.com:80'
-    }
-
-    if $lsbdistcodename in ['lucid', 'precise'] {
-      apt::ppa { 'ppa:pdoes/ppa': require => Apt::Key['4CBEDD5A'], options => '' }
-    } else {
-      apt::ppa { 'ppa:pdoes/ppa': require => Apt::Key['4CBEDD5A'] }
-    }
-
-    if hash_key_equals($php_values, 'install', 1) {
-      # Ubuntu Lucid 10.04, Precise 12.04, Quantal 12.10 and Raring 13.04 can do PHP 5.3 (default <= 12.10) and 5.4 (default <= 13.04)
-      if $lsbdistcodename in ['lucid', 'precise', 'quantal', 'raring', 'trusty'] and $php_values['version'] == '54' {
-        if $lsbdistcodename == 'lucid' {
-          apt::ppa { 'ppa:ondrej/php5-oldstable': require => Apt::Key['4F4EA0AAE5267A6C'], options => '' }
-        } else {
-          apt::ppa { 'ppa:ondrej/php5-oldstable': require => Apt::Key['4F4EA0AAE5267A6C'] }
-        }
-      }
-      # Ubuntu 12.04/10, 13.04/10, 14.04 can do PHP 5.5
-      elsif $lsbdistcodename in ['precise', 'quantal', 'raring', 'saucy', 'trusty'] and $php_values['version'] == '55' {
-        apt::ppa { 'ppa:ondrej/php5': require => Apt::Key['4F4EA0AAE5267A6C'] }
-      }
-      elsif $lsbdistcodename in ['lucid'] and $php_values['version'] == '55' {
-        err('You have chosen to install PHP 5.5 on Ubuntu 10.04 Lucid. This will probably not work!')
-      }
-    }
-  }
-  'redhat', 'centos': {
-    if hash_key_equals($php_values, 'install', 1) {
-      if $php_values['version'] == '54' {
-        class { 'yum::repo::remi': }
-      }
-      # remi_php55 requires the remi repo as well
-      elsif $php_values['version'] == '55' {
-        class { 'yum::repo::remi': }
-        class { 'yum::repo::remi_php55': }
-      }
-    }
-  }
-}
-
-if is_array($server_values['packages']) and count($server_values['packages']) > 0 {
-  each( $server_values['packages'] ) |$package| {
-    if ! defined(Package[$package]) {
-      package { $package:
-        ensure => present,
-      }
-    }
-  }
-}
-
-define add_dotdeb ($release){
-   apt::source { "${name}-repo.puphpet":
-    location          => 'http://repo.puphpet.com/dotdeb/',
-    release           => $release,
-    repos             => 'all',
-    required_packages => 'debian-keyring debian-archive-keyring',
-    key               => '89DF5277',
-    key_server        => 'keys.gnupg.net',
-    include_src       => true
-  }
-}
-
-# Begin open ports for iptables
-if has_key($vm_values, 'vm')
-  and has_key($vm_values['vm'], 'network')
-  and has_key($vm_values['vm']['network'], 'forwarded_port')
-{
-  create_resources( iptables_port, $vm_values['vm']['network']['forwarded_port'] )
-}
-
-if has_key($vm_values, 'ssh') and has_key($vm_values['ssh'], 'port') {
-  $vm_values_ssh_port = $vm_values['ssh']['port'] ? {
-    ''      => 22,
-    undef   => 22,
-    0       => 22,
-    default => $vm_values['ssh']['port']
-  }
-
-  if ! defined(Firewall["100 tcp/${vm_values_ssh_port}"]) {
-    firewall { "100 tcp/${vm_values_ssh_port}":
-      port   => $vm_values_ssh_port,
-      proto  => tcp,
-      action => 'accept',
-      before => Class['my_fw::post']
-    }
-  }
-}
-
-define iptables_port (
-  $host,
-  $guest,
-) {
-  if ! defined(Firewall["100 tcp/${guest}"]) {
-    firewall { "100 tcp/${guest}":
-      port   => $guest,
-      proto  => tcp,
-      action => 'accept',
-    }
-  }
-}
-
-## Begin MailCatcher manifest
-
-if $mailcatcher_values == undef {
-  $mailcatcher_values = hiera('mailcatcher', false)
-}
-
-if hash_key_equals($mailcatcher_values, 'install', 1) {
-  if ! defined(Package['tilt']) {
-    package { 'tilt':
-      ensure   => '1.3',
-      provider => 'gem',
-      before   => Class['mailcatcher']
-    }
-  }
-
-  if $::operatingsystem == 'ubuntu' and $lsbdistcodename == 'trusty' {
-    package { 'rubygems':
-      ensure => absent,
-    }
-  }
-
-  create_resources('class', { 'mailcatcher' => $mailcatcher_values['settings'] })
-
-  if ! defined(Firewall["100 tcp/${mailcatcher_values['settings']['smtp_port']}, ${mailcatcher_values['settings']['http_port']}"]) {
-    firewall { "100 tcp/${mailcatcher_values['settings']['smtp_port']}, ${mailcatcher_values['settings']['http_port']}":
-      port   => [$mailcatcher_values['settings']['smtp_port'], $mailcatcher_values['settings']['http_port']],
-      proto  => tcp,
-      action => 'accept',
-    }
-  }
-
-  if ! defined(Class['supervisord']) {
-    class{ 'puphpet::python::pip': }
-
-    class { 'supervisord':
-      install_pip => false,
-      require     => [
-        Class['my_fw::post'],
-        Class['Puphpet::Python::Pip'],
-      ],
-    }
-  }
-
-  $supervisord_mailcatcher_options = sort(join_keys_to_values({
-    ' --smtp-ip'   => $mailcatcher_values['settings']['smtp_ip'],
-    ' --smtp-port' => $mailcatcher_values['settings']['smtp_port'],
-    ' --http-ip'   => $mailcatcher_values['settings']['http_ip'],
-    ' --http-port' => $mailcatcher_values['settings']['http_port']
-  }, ' '))
-
-  $supervisord_mailcatcher_cmd = "mailcatcher ${supervisord_mailcatcher_options} -f  >> ${mailcatcher_values['settings']['log']}"
-
-  supervisord::program { 'mailcatcher':
-    command     => $supervisord_mailcatcher_cmd,
-    priority    => '100',
-    user        => 'mailcatcher',
-    autostart   => true,
-    autorestart => 'true',
-    environment => {
-      'PATH' => "/bin:/sbin:/usr/bin:/usr/sbin:${mailcatcher_values['settings']['path']}"
-    },
-    require => Package['mailcatcher']
-  }
-}
-
-## Begin Firewall manifest
-
-if $firewall_values == undef {
-  $firewall_values = hiera('firewall', false)
-}
-
-Firewall {
-  before  => Class['my_fw::post'],
-  require => Class['my_fw::pre'],
-}
-
-class { ['my_fw::pre', 'my_fw::post']: }
-
-class { 'firewall': }
-
-class my_fw::pre {
-  Firewall {
-    require => undef,
-  }
-
-  # Default firewall rules
-  firewall { '000 accept all icmp':
-    proto  => 'icmp',
-    action => 'accept',
-  }->
-  firewall { '001 accept all to lo interface':
-    proto   => 'all',
-    iniface => 'lo',
-    action  => 'accept',
-  }->
-  firewall { '002 accept related established rules':
-    proto  => 'all',
-    state  => ['RELATED', 'ESTABLISHED'],
-    action => 'accept',
-  }
-}
-
-class my_fw::post {
-  firewall { '999 drop all':
-    proto   => 'all',
-    action  => 'drop',
-    before  => undef,
-  }
-}
-
-if is_hash($firewall_values['rules']) and count($firewall_values['rules']) > 0 {
-  each( $firewall_values['rules'] ) |$key, $rule| {
-    if ! defined(Firewall["${rule['priority']} ${rule['proto']}/${rule['port']}"]) {
-      firewall { "${rule['priority']} ${rule['proto']}/${rule['port']}":
-        port   => $rule['port'],
-        proto  => $rule['proto'],
-        action => $rule['action'],
-      }
-    }
-  }
-}
-
-## Begin Apache manifest
-
-if $yaml_values == undef {
-  $yaml_values = loadyaml('/vagrant/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/config.yaml')
-} if $apache_values == undef {
-  $apache_values = $yaml_values['apache']
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $hhvm_values == undef {
-  $hhvm_values = hiera('hhvm', false)
-}
-
-if hash_key_equals($apache_values, 'install', 1) {
-  include puphpet::params
-  include apache::params
-
-  $webroot_location      = $puphpet::params::apache_webroot_location
-  $apache_provider_types = ['virtualbox', 'vmware_fusion', 'vmware_desktop', 'parallels']
-
-  exec { "exec mkdir -p ${webroot_location}":
-    command => "mkdir -p ${webroot_location}",
-    creates => $webroot_location,
-  }
-
-  if (downcase($::provisioner_type) in $apache_provider_types) and ! defined(File[$webroot_location]) {
-    file { $webroot_location:
-      ensure  => directory,
-      mode    => 0775,
-      require => [
-        Exec["exec mkdir -p ${webroot_location}"],
-        Group['www-data']
-      ]
-    }
-  } elsif ! (downcase($::provisioner_type) in $apache_provider_types) and ! defined(File[$webroot_location]) {
-    file { $webroot_location:
-      ensure  => directory,
-      group   => 'www-data',
-      mode    => 0775,
-      require => [
-        Exec["exec mkdir -p ${webroot_location}"],
-        Group['www-data']
-      ]
-    }
-  }
-
-  if hash_key_equals($hhvm_values, 'install', 1) {
-    $mpm_module           = 'worker'
-    $disallowed_modules   = ['php']
-    $apache_conf_template = 'puphpet/apache/hhvm-httpd.conf.erb'
-    $apache_php_package   = 'hhvm'
-  } elsif hash_key_equals($php_values, 'install', 1) {
-    $mpm_module           = 'prefork'
-    $disallowed_modules   = []
-    $apache_conf_template = $apache::params::conf_template
-    $apache_php_package   = 'php'
-  } else {
-    $mpm_module           = 'prefork'
-    $disallowed_modules   = []
-    $apache_conf_template = $apache::params::conf_template
-    $apache_php_package   = ''
-  }
-
-  if $::operatingsystem == 'ubuntu'
-    and hash_key_equals($php_values, 'install', 1)
-    and hash_key_equals($php_values, 'version', 55)
-  {
-    $apache_version = '2.4'
-  } else {
-    $apache_version = $apache::version::default
-  }
-
-  $apache_settings = merge($apache_values['settings'], {
-    'default_vhost'  => false,
-    'mpm_module'     => $mpm_module,
-    'conf_template'  => $apache_conf_template,
-    'sendfile'       => $apache_values['settings']['sendfile'] ? { 1 => 'On', default => 'Off' },
-    'apache_version' => $apache_version
-  })
-
-  create_resources('class', { 'apache' => $apache_settings })
-
-  if hash_key_equals($apache_values, 'mod_pagespeed', 1) {
-    class { 'puphpet::apache::modpagespeed': }
-  }
-
-  if hash_key_equals($apache_values, 'mod_spdy', 1) {
-    class { 'puphpet::apache::modspdy':
-      php_package => $apache_php_package
-    }
-  }
-
-  if $apache_values['settings']['default_vhost'] == true {
-    $apache_vhosts = merge($apache_values['vhosts'], {
-      'default_vhost_80'  => {
-        'servername'    => 'default',
-        'docroot'       => '/var/www/default',
-        'port'          => 80,
-        'default_vhost' => true,
-      },
-      'default_vhost_443' => {
-        'servername'    => 'default',
-        'docroot'       => '/var/www/default',
-        'port'          => 443,
-        'default_vhost' => true,
-        'ssl'           => 1,
-      },
-    })
-  } else {
-    $apache_vhosts = $apache_values['vhosts']
-  }
-
-  if count($apache_vhosts) > 0 {
-    each( $apache_vhosts ) |$key, $vhost| {
-      exec { "exec mkdir -p ${vhost['docroot']} @ key ${key}":
-        command => "mkdir -p ${vhost['docroot']}",
-        creates => $vhost['docroot'],
-      }
-
-      if (downcase($::provisioner_type) in $apache_provider_types)
-        and ! defined(File[$vhost['docroot']])
-      {
-        file { $vhost['docroot']:
-          ensure  => directory,
-          mode    => 0765,
-          require => Exec["exec mkdir -p ${vhost['docroot']} @ key ${key}"]
-        }
-      } elsif !(downcase($::provisioner_type) in $apache_provider_types)
-        and ! defined(File[$vhost['docroot']])
-      {
-        file { $vhost['docroot']:
-          ensure  => directory,
-          group   => 'www-user',
-          mode    => 0765,
-          require => [
-            Exec["exec mkdir -p ${vhost['docroot']} @ key ${key}"],
-            Group['www-user']
-          ]
-        }
-      }
-
-      create_resources(apache::vhost, { "${key}" => merge($vhost, {
-          'custom_fragment' => template('puphpet/apache/custom_fragment.erb'),
-          'ssl'             => 'ssl' in $vhost and str2bool($vhost['ssl']) ? { true => true, default => false },
-          'ssl_cert'        => hash_key_true($vhost, 'ssl_cert')      ? { true => $vhost['ssl_cert'],      default => undef },
-          'ssl_key'         => hash_key_true($vhost, 'ssl_key')       ? { true => $vhost['ssl_key'],       default => undef },
-          'ssl_chain'       => hash_key_true($vhost, 'ssl_chain')     ? { true => $vhost['ssl_chain'],     default => undef },
-          'ssl_certs_dir'   => hash_key_true($vhost, 'ssl_certs_dir') ? { true => $vhost['ssl_certs_dir'], default => undef }
-        })
-      })
-
-      if ! defined(Firewall["100 tcp/${vhost['port']}"]) {
-        firewall { "100 tcp/${vhost['port']}":
-          port   => $vhost['port'],
-          proto  => tcp,
-          action => 'accept',
-        }
-      }
-    }
-  }
-
-  if ! defined(Firewall['100 tcp/443']) {
-    firewall { '100 tcp/443':
-      port   => 443,
-      proto  => tcp,
-      action => 'accept',
-    }
-  }
-
-  if count($apache_values['modules']) > 0 {
-    apache_mod { $apache_values['modules']: }
-  }
-}
-
-define apache_mod {
-  if ! defined(Class["apache::mod::${name}"]) and !($name in $disallowed_modules) {
-    class { "apache::mod::${name}": }
-  }
-}
-
-## Begin Nginx manifest
-
-if $nginx_values == undef {
-   $nginx_values = hiera('nginx', false)
-} if $php_values == undef {
-   $php_values = hiera('php', false)
-} if $hhvm_values == undef {
-  $hhvm_values = hiera('hhvm', false)
-}
-
-if hash_key_equals($nginx_values, 'install', 1) {
-  include nginx::params
-  include puphpet::params
-
-  Class['puphpet::ssl_cert'] -> Nginx::Resource::Vhost <| |>
-
-  class { 'puphpet::ssl_cert': }
-
-  if $lsbdistcodename == 'lucid' and hash_key_equals($php_values, 'version', '53') {
-    apt::key { '67E15F46': key_server => 'hkp://keyserver.ubuntu.com:80' }
-    apt::ppa { 'ppa:l-mierzwa/lucid-php5':
-      options => '',
-      require => Apt::Key['67E15F46']
-    }
-  }
-
-  $webroot_location     = $puphpet::params::nginx_webroot_location
-  $nginx_provider_types = ['virtualbox', 'vmware_fusion', 'vmware_desktop', 'parallels']
-
-  exec { "exec mkdir -p ${webroot_location}":
-    command => "mkdir -p ${webroot_location}",
-    creates => $webroot_location,
-  }
-
-  if (downcase($::provisioner_type) in $nginx_provider_types) and ! defined(File[$webroot_location]) {
-    file { $webroot_location:
-      ensure  => directory,
-      mode    => 0775,
-      require => Exec["exec mkdir -p ${webroot_location}"],
-    }
-  } elsif ! (downcase($::provisioner_type) in $nginx_provider_types) and ! defined(File[$webroot_location]) {
-    file { $webroot_location:
-      ensure  => directory,
-      mode    => 0775,
-      group   => 'www-data',
-      require => [
-        Exec["exec mkdir -p ${webroot_location}"],
-        Group['www-data']
-      ]
-    }
-  }
-
-  if $::osfamily == 'redhat' {
-      file { '/usr/share/nginx':
-        ensure  => directory,
-        mode    => 0775,
-        owner   => 'www-data',
-        group   => 'www-data',
-        require => Group['www-data'],
-        before  => Package['nginx']
-      }
-  }
-
-  if hash_key_equals($php_values, 'install', 1) {
-    $php5_fpm_sock = '/var/run/php5-fpm.sock'
-
-    $fastcgi_pass = $php_values['version'] ? {
-      '53'    => '127.0.0.1:9000',
-      undef   => null,
-      default => "unix:${php5_fpm_sock}"
-    }
-
-    if $::osfamily == 'redhat' and $fastcgi_pass == "unix:${php5_fpm_sock}" {
-      exec { "create ${php5_fpm_sock} file":
-        command => "touch ${php5_fpm_sock}",
-        onlyif  => ["test ! -f ${php5_fpm_sock}", "test ! -f ${php5_fpm_sock}="],
-        require => Package['nginx'],
-      }
-
-      exec { "'listen = 127.0.0.1:9000' => 'listen = ${php5_fpm_sock}'":
-        command => "perl -p -i -e 's#listen = 127.0.0.1:9000#listen = ${php5_fpm_sock}#gi' /etc/php-fpm.d/www.conf",
-        unless  => "grep -c 'listen = 127.0.0.1:9000' '${php5_fpm_sock}'",
-        notify  => [
-          Class['nginx::service'],
-          Service['php-fpm']
-        ],
-        require => Exec["create ${php5_fpm_sock} file"]
-      }
-
-      set_nginx_php5_fpm_sock_group_and_user { 'php_rhel':
-        require => Exec["create ${php5_fpm_sock} file"],
-      }
-    } else {
-      set_nginx_php5_fpm_sock_group_and_user { 'php':
-        require   => Package['nginx'],
-        subscribe => Service['php5-fpm'],
-      }
-    }
-  } elsif hash_key_equals($hhvm_values, 'install', 1) {
-    $fastcgi_pass = '127.0.0.1:9000'
-  } else {
-    $fastcgi_pass = null
-  }
-
-  class { 'nginx': }
-
-  if hash_key_equals($nginx_values['settings'], 'default_vhost', 1) {
-    $nginx_vhosts = merge($nginx_values['vhosts'], {
-      'default' => {
-        'server_name'    => '_',
-        'server_aliases' => [],
-        'www_root'       => '/var/www/html',
-        'listen_port'    => 80,
-        'index_files'    => ['index', 'index.html', 'index.htm', 'index.php'],
-        'envvars'        => [],
-        'ssl'            => '0',
-        'ssl_cert'       => '',
-        'ssl_key'        => '',
-      },
-    })
-
-    if ! defined(File[$puphpet::params::nginx_default_conf_location]) {
-      file { $puphpet::params::nginx_default_conf_location:
-        ensure  => absent,
-        require => Package['nginx'],
-        notify  => Class['nginx::service'],
-      }
-    }
-  } else {
-    $nginx_vhosts = $nginx_values['vhosts']
-  }
-
-  if count($nginx_vhosts) > 0 {
-    each( $nginx_vhosts ) |$key, $vhost| {
-      exec { "exec mkdir -p ${vhost['www_root']} @ key ${key}":
-        command => "mkdir -p ${vhost['www_root']}",
-        creates => $vhost['www_root'],
-      }
-
-      if ! defined(File[$vhost['www_root']]) {
-        file { $vhost['www_root']:
-          ensure  => directory,
-          require => Exec["exec mkdir -p ${vhost['www_root']} @ key ${key}"]
-        }
-      }
-
-      if ! defined(Firewall["100 tcp/${vhost['listen_port']}"]) {
-        firewall { "100 tcp/${vhost['listen_port']}":
-          port   => $vhost['listen_port'],
-          proto  => tcp,
-          action => 'accept',
-        }
-      }
-    }
-
-    create_resources(nginx_vhost, $nginx_vhosts)
-  }
-
-  if ! defined(Firewall['100 tcp/443']) {
-    firewall { '100 tcp/443':
-      port   => 443,
-      proto  => tcp,
-      action => 'accept',
-    }
-  }
-}
-
-define nginx_vhost (
-  $server_name,
-  $server_aliases = [],
-  $www_root,
-  $listen_port,
-  $index_files,
-  $envvars = [],
-  $ssl = false,
-  $ssl_cert = $puphpet::params::ssl_cert_location,
-  $ssl_key = $puphpet::params::ssl_key_location,
-  $ssl_port = '443',
-  $rewrite_to_https = false,
-  $spdy = $nginx::params::nx_spdy,
-){
-  $merged_server_name = concat([$server_name], $server_aliases)
-
-  if is_array($index_files) and count($index_files) > 0 {
-    $try_files = $index_files[count($index_files) - 1]
-  } else {
-    $try_files = 'index.php'
-  }
-
-  if hash_key_equals($php_values, 'install', 1) {
-    $fastcgi_param_parts = [
-      'PATH_INFO $fastcgi_path_info',
-      'PATH_TRANSLATED $document_root$fastcgi_path_info',
-      'SCRIPT_FILENAME $document_root$fastcgi_script_name'
-    ]
-  } elsif hash_key_equals($hhvm_values, 'install', 1) {
-    $fastcgi_param_parts = [
-      'SCRIPT_FILENAME $document_root$fastcgi_script_name'
-    ]
-  } else {
-    $fastcgi_param_parts = []
-  }
-
-  $ssl_set              = value_true($ssl)              ? { true => true,      default => false, }
-  $ssl_cert_set         = value_true($ssl_cert)         ? { true => $ssl_cert, default => $puphpet::params::ssl_cert_location, }
-  $ssl_key_set          = value_true($ssl_key)          ? { true => $ssl_key,  default => $puphpet::params::ssl_key_location, }
-  $ssl_port_set         = value_true($ssl_port)         ? { true => $ssl_port, default => '443', }
-  $rewrite_to_https_set = value_true($rewrite_to_https) ? { true => true,      default => false, }
-  $spdy_set             = value_true($spdy)             ? { true => on,        default => off, }
-
-  nginx::resource::vhost { $server_name:
-    server_name      => $merged_server_name,
-    www_root         => $www_root,
-    listen_port      => $listen_port,
-    index_files      => $index_files,
-    try_files        => ['$uri', '$uri/','@rewriteapp'],
-    ssl              => $ssl_set,
-    ssl_cert         => $ssl_cert_set,
-    ssl_key          => $ssl_key_set,
-    ssl_port         => $ssl_port_set,
-    rewrite_to_https => $rewrite_to_https_set,
-    spdy             => $spdy_set,
-    vhost_cfg_append => {
-       sendfile => 'off'
-    }
-  }
-
-  $fastcgi_param = concat($fastcgi_param_parts, $envvars)
-
-  $fastcgi_pass_hash = fastcgi_pass ? {
-    null    => {},
-    ''      => {},
-    default => {'fastcgi_pass' => $fastcgi_pass},
-  }
-
-  $location_cfg_append = merge({
-    'fastcgi_index'           => 'index.php',
-    'fastcgi_param'           => $fastcgi_param,
-    'include'                 => 'fastcgi_params'
-  }, $fastcgi_pass_hash)
-
-  nginx::resource::location { "${server_name}-index":
-    ensure              => present,
-    location            => '@rewriteapp',
-    vhost               => $server_name,
-    www_root            => $www_root,
-    location_cfg_append => {
-      rewrite           => '^(.*)$ /index.php/$1 last'
-    }
-  }
-
-  nginx::resource::location { "${server_name}-api":
-    ensure              => present,
-    location            => '/api',
-    vhost               => $server_name,
-    www_root            => $www_root,
-    location_cfg_append => {
-      rewrite           => '^(.*)$ /api.php/$1 last'
-    }
-  }
-
-  nginx::resource::location { "${server_name}-php":
-    ensure              => present,
-    location            => '~ ^/(index|index_dev|api)\.php(/|$)',
-    vhost               => $server_name,
-    www_root            => $www_root,
-    location_cfg_append => $location_cfg_append,
-    notify              => Class['nginx::service'],
-  }
-}
-
-define set_nginx_php5_fpm_sock_group_and_user () {
-  exec { 'set php5_fpm_sock group and user':
-    command => "chmod 660 ${php5_fpm_sock} && \
-                chown www-data ${php5_fpm_sock} && \
-                chgrp www-data ${php5_fpm_sock} && \
-                touch /.puphpet-stuff/php5_fpm_sock",
-    creates => '/.puphpet-stuff/php5_fpm_sock',
-  }
-}
-
-## Begin PHP manifest
-
-if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-} if $mailcatcher_values == undef {
-  $mailcatcher_values = hiera('mailcatcher', false)
-}
-
-if hash_key_equals($php_values, 'install', 1) {
-  Class['Php'] -> Class['Php::Devel'] -> Php::Module <| |> -> Php::Pear::Module <| |> -> Php::Pecl::Module <| |>
-
-  if $php_prefix == undef {
-    $php_prefix = $::operatingsystem ? {
-      /(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => 'php5-',
-      default                                 => 'php-',
-    }
-  }
-
-  if $php_fpm_ini == undef {
-    $php_fpm_ini = $::operatingsystem ? {
-      /(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => '/etc/php5/fpm/php.ini',
-      default                                 => '/etc/php.ini',
-    }
-  }
-
-  if hash_key_equals($apache_values, 'install', 1) {
-    include apache::params
-
-    if has_key($apache_values, 'mod_spdy') and $apache_values['mod_spdy'] == 1 {
-      $php_webserver_service_ini = 'cgi'
-    } else {
-      $php_webserver_service_ini = 'httpd'
-    }
-
-    $php_webserver_service = 'httpd'
-    $php_webserver_user    = $apache::params::user
-    $php_webserver_restart = true
-
-    class { 'php':
-      service => $php_webserver_service
-    }
-  } elsif hash_key_equals($nginx_values, 'install', 1) {
-    include nginx::params
-
-    $php_webserver_service     = "${php_prefix}fpm"
-    $php_webserver_service_ini = $php_webserver_service
-    $php_webserver_user        = $nginx::params::nx_daemon_user
-    $php_webserver_restart     = true
-
-    class { 'php':
-      package             => $php_webserver_service,
-      service             => $php_webserver_service,
-      service_autorestart => false,
-      config_file         => $php_fpm_ini,
-    }
-
-    service { $php_webserver_service:
-      ensure     => running,
-      enable     => true,
-      hasrestart => true,
-      hasstatus  => true,
-      require    => Package[$php_webserver_service]
-    }
-  } else {
-    $php_webserver_service     = undef
-    $php_webserver_service_ini = undef
-    $php_webserver_restart     = false
-
-    class { 'php':
-      package             => "${php_prefix}cli",
-      service             => $php_webserver_service,
-      service_autorestart => false,
-    }
-  }
-
-  class { 'php::devel': }
-
-  if count($php_values['modules']['php']) > 0 {
-    php_mod { $php_values['modules']['php']:; }
-  }
-  if count($php_values['modules']['pear']) > 0 {
-    php_pear_mod { $php_values['modules']['pear']:; }
-  }
-  if count($php_values['modules']['pecl']) > 0 {
-    php_pecl_mod { $php_values['modules']['pecl']:; }
-  }
-  if count($php_values['ini']) > 0 {
-    each( $php_values['ini'] ) |$key, $value| {
-      if is_array($value) {
-        each( $php_values['ini'][$key] ) |$innerkey, $innervalue| {
-          puphpet::ini { "${key}_${innerkey}":
-            entry       => "CUSTOM_${innerkey}/${key}",
-            value       => $innervalue,
-            php_version => $php_values['version'],
-            webserver   => $php_webserver_service_ini
-          }
-        }
-      } else {
-        puphpet::ini { $key:
-          entry       => "CUSTOM/${key}",
-          value       => $value,
-          php_version => $php_values['version'],
-          webserver   => $php_webserver_service_ini
-        }
-      }
-    }
-
-    if $php_values['ini']['session.save_path'] != undef {
-      $php_sess_save_path = $php_values['ini']['session.save_path']
-
-      exec {"mkdir -p ${php_sess_save_path}":
-        onlyif => "test ! -d ${php_sess_save_path}",
-        before => Class['php']
-      }
-      exec {"chmod 775 ${php_sess_save_path} && chown www-data ${php_sess_save_path} && chgrp www-data ${php_sess_save_path}":
-        require => Class['php']
-      }
-    }
-  }
-
-  puphpet::ini { $key:
-    entry       => 'CUSTOM/date.timezone',
-    value       => $php_values['timezone'],
-    php_version => $php_values['version'],
-    webserver   => $php_webserver_service_ini
-  }
-
-  if hash_key_equals($php_values, 'composer', 1) {
-    $php_composer_home = $php_values['composer_home'] ? {
-      false   => false,
-      undef   => false,
-      ''      => false,
-      default => $php_values['composer_home'],
-    }
-
-    if $php_composer_home {
-      file { $php_composer_home:
-        ensure  => directory,
-        owner   => 'www-data',
-        group   => 'www-data',
-        mode    => 0775,
-        require => [Group['www-data'], Group['www-user']]
-      }
-
-      file_line { "COMPOSER_HOME=${php_composer_home}":
-        path => '/etc/environment',
-        line => "COMPOSER_HOME=${php_composer_home}",
-      }
-    }
-
-    class { 'composer':
-      target_dir      => '/usr/local/bin',
-      composer_file   => 'composer',
-      download_method => 'curl',
-      logoutput       => false,
-      tmp_path        => '/tmp',
-      php_package     => "${php::params::module_prefix}cli",
-      curl_package    => 'curl',
-      suhosin_enabled => false,
-    }
-  }
-
-  # Usually this would go within the library that needs in (Mailcatcher)
-  # but the values required are sufficiently complex that it's easier to
-  # add here
-  if hash_key_equals($mailcatcher_values, 'install', 1)
-    and ! defined(Puphpet::Ini['sendmail_path'])
-  {
-    puphpet::ini { 'sendmail_path':
-      entry       => 'CUSTOM/sendmail_path',
-      value       => '/usr/bin/env catchmail',
-      php_version => $php_values['version'],
-      webserver   => $php_webserver_service_ini
-    }
-  }
-}
-
-define php_mod {
-  if ! defined(Puphpet::Php::Module[$name]) {
-    puphpet::php::module { $name:
-      service_autorestart => $php_webserver_restart,
-    }
-  }
-}
-define php_pear_mod {
-  if ! defined(Puphpet::Php::Pear[$name]) {
-    puphpet::php::pear { $name:
-      service_autorestart => $php_webserver_restart,
-    }
-  }
-}
-define php_pecl_mod {
-  if ! defined(Puphpet::Php::Extra_repos[$name]) {
-    puphpet::php::extra_repos { $name:
-      before => Puphpet::Php::Pecl[$name],
-    }
-  }
-
-  if ! defined(Puphpet::Php::Pecl[$name]) {
-    puphpet::php::pecl { $name:
-      service_autorestart => $php_webserver_restart,
-    }
-  }
-}
-
-## Begin Xdebug manifest
-
-if $xdebug_values == undef {
-  $xdebug_values = hiera('xdebug', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if hash_key_equals($apache_values, 'install', 1) {
-  $xdebug_webserver_service = 'httpd'
-} elsif hash_key_equals($nginx_values, 'install', 1) {
-  $xdebug_webserver_service = 'nginx'
-} else {
-  $xdebug_webserver_service = undef
-}
-
-if hash_key_equals($xdebug_values, 'install', 1)
-  and hash_key_equals($php_values, 'install', 1)
-{
-  class { 'puphpet::xdebug':
-    webserver => $xdebug_webserver_service
-  }
-
-  if is_hash($xdebug_values['settings']) and count($xdebug_values['settings']) > 0 {
-    each( $xdebug_values['settings'] ) |$key, $value| {
-      puphpet::ini { $key:
-        entry       => "XDEBUG/${key}",
-        value       => $value,
-        php_version => $php_values['version'],
-        webserver   => $xdebug_webserver_service
-      }
-    }
-  }
-}
-
-## Begin Drush manifest
-
-if $drush_values == undef {
-  $drush_values = hiera('drush', false)
-}
-
-if hash_key_equals($drush_values, 'install', 1) {
-  if ($drush_values['settings']['drush.tag_branch'] != undef) {
-    $drush_tag_branch = $drush_values['settings']['drush.tag_branch']
-  } else {
-    $drush_tag_branch = ''
-  }
-
-  include drush::git::drush
-}
-
-## Begin MySQL manifest
-
-if $mysql_values == undef {
-  $mysql_values = hiera('mysql', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-include 'mysql::params'
-
-if hash_key_equals($mysql_values, 'install', 1) {
-  if hash_key_equals($apache_values, 'install', 1) or hash_key_equals($nginx_values, 'install', 1) {
-    $mysql_webserver_restart = true
-  } else {
-    $mysql_webserver_restart = false
-  }
-
-  if $::osfamily == 'redhat' {
-    exec { 'mysql-community-repo':
-      command => 'yum -y --nogpgcheck install "http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm" && touch /.puphpet-stuff/mysql-community-release',
-      creates => '/.puphpet-stuff/mysql-community-release'
-    }
-
-    $mysql_server_require             = Exec['mysql-community-repo']
-    $mysql_server_server_package_name = 'mysql-community-server'
-    $mysql_server_client_package_name = 'mysql-community-client'
-  } else {
-    $mysql_server_require             = []
-    $mysql_server_server_package_name = $mysql::params::server_package_name
-    $mysql_server_client_package_name = $mysql::params::client_package_name
-  }
-
-  if hash_key_equals($php_values, 'install', 1) {
-    $mysql_php_installed = true
-    $mysql_php_package   = 'php'
-  } elsif hash_key_equals($hhvm_values, 'install', 1) {
-    $mysql_php_installed = true
-    $mysql_php_package   = 'hhvm'
-  } else {
-    $mysql_php_installed = false
-  }
-
-  if $mysql_values['root_password'] {
-    class { 'mysql::server':
-      package_name  => $mysql_server_server_package_name,
-      root_password => $mysql_values['root_password'],
-      require       => $mysql_server_require
-    }
-
-    class { 'mysql::client':
-      package_name => $mysql_server_client_package_name,
-      require      => $mysql_server_require
-    }
-
-    if is_hash($mysql_values['databases']) and count($mysql_values['databases']) > 0 {
-      create_resources(mysql_db, $mysql_values['databases'])
-    }
-
-    if $mysql_php_installed and $mysql_php_package == 'php' {
-      if $::osfamily == 'redhat' and $php_values['version'] == '53' {
-        $mysql_php_module = 'mysql'
-      } elsif $lsbdistcodename == 'lucid' or $lsbdistcodename == 'squeeze' {
-        $mysql_php_module = 'mysql'
-      } else {
-        $mysql_php_module = 'mysqlnd'
-      }
-
-      if ! defined(Php::Module[$mysql_php_module]) {
-        php::module { $mysql_php_module:
-          service_autorestart => $mysql_webserver_restart,
-        }
-      }
-    }
-  }
-
-  if hash_key_equals($mysql_values, 'adminer', 1) and $mysql_php_installed {
-    if hash_key_equals($apache_values, 'install', 1) {
-      $mysql_adminer_webroot_location = '/var/www/default'
-    } elsif hash_key_equals($nginx_values, 'install', 1) {
-      $mysql_adminer_webroot_location = $puphpet::params::nginx_webroot_location
-    } else {
-      $mysql_adminer_webroot_location = '/var/www/default'
-    }
-
-    class { 'puphpet::adminer':
-      location    => "${mysql_adminer_webroot_location}/adminer",
-      owner       => 'www-data',
-      php_package => $mysql_php_package
-    }
-  }
-}
-
-define mysql_db (
-  $user,
-  $password,
-  $host,
-  $grant    = [],
-  $sql_file = false
-) {
-  if $name == '' or $password == '' or $host == '' {
-    fail( 'MySQL DB requires that name, password and host be set. Please check your settings!' )
-  }
-
-  mysql::db { $name:
-    user     => $user,
-    password => $password,
-    host     => $host,
-    grant    => $grant,
-    sql      => $sql_file,
-  }
-}
-
-# @todo update this
-define mysql_nginx_default_conf (
-  $webroot
-) {
-  if $php5_fpm_sock == undef {
-    $php5_fpm_sock = '/var/run/php5-fpm.sock'
-  }
-
-  if $fastcgi_pass == undef {
-    $fastcgi_pass = $php_values['version'] ? {
-      undef   => null,
-      '53'    => '127.0.0.1:9000',
-      default => "unix:${php5_fpm_sock}"
-    }
-  }
-
-  class { 'puphpet::nginx':
-    fastcgi_pass => $fastcgi_pass,
-    notify       => Class['nginx::service'],
-  }
-}
-
-## Begin PostgreSQL manifest
-
-if $postgresql_values == undef {
-  $postgresql_values = hiera('postgresql', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $hhvm_values == undef {
-  $hhvm_values = hiera('hhvm', false)
-}
-
-if hash_key_equals($postgresql_values, 'install', 1) {
-  if hash_key_equals($apache_values, 'install', 1) or hash_key_equals($nginx_values, 'install', 1) {
-    $postgresql_webserver_restart = true
-  } else {
-    $postgresql_webserver_restart = false
-  }
-
-  if hash_key_equals($php_values, 'install', 1) {
-    $postgresql_php_installed = true
-    $postgresql_php_package   = 'php'
-  } elsif hash_key_equals($hhvm_values, 'install', 1) {
-    $postgresql_php_installed = true
-    $postgresql_php_package   = 'hhvm'
-  } else {
-    $postgresql_php_installed = false
-  }
-
-  if $postgresql_values['settings']['root_password'] {
-    group { $postgresql_values['settings']['user_group']:
-      ensure => present
-    }
-
-    class { 'postgresql::globals':
-      manage_package_repo => true,
-      encoding            => $postgresql_values['settings']['encoding'],
-      version             => $postgresql_values['settings']['version']
-    }->
-    class { 'postgresql::server':
-      postgres_password => $postgresql_values['settings']['root_password'],
-      version           => $postgresql_values['settings']['version'],
-      require           => Group[$postgresql_values['settings']['user_group']]
-    }
-
-    if is_hash($postgresql_values['databases']) and count($postgresql_values['databases']) > 0 {
-      create_resources(postgresql_db, $postgresql_values['databases'])
-    }
-
-    if $postgresql_php_installed and $postgresql_php_package == 'php' and ! defined(Php::Module['pgsql']) {
-      php::module { 'pgsql':
-        service_autorestart => $postgresql_webserver_restart,
-      }
-    }
-  }
-
-  if hash_key_equals($postgresql_values, 'adminer', 1) and $postgresql_php_installed {
-    if hash_key_equals($apache_values, 'install', 1) {
-      $postgresql_adminer_webroot_location = '/var/www/default'
-    } elsif hash_key_equals($nginx_values, 'install', 1) {
-      $postgresql_adminer_webroot_location = $puphpet::params::nginx_webroot_location
-    } else {
-      $postgresql_adminer_webroot_location = '/var/www/default'
-    }
-
-    class { 'puphpet::adminer':
-      location    => "${postgresql_adminer_webroot_location}/adminer",
-      owner       => 'www-data',
-      php_package => $postgresql_php_package
-    }
-  }
-}
-
-define postgresql_db (
-  $user,
-  $password,
-  $grant,
-  $sql_file = false
-) {
-  if $name == '' or $user == '' or $password == '' or $grant == '' {
-    fail( 'PostgreSQL DB requires that name, user, password and grant be set. Please check your settings!' )
-  }
-
-  postgresql::server::db { $name:
-    user     => $user,
-    password => $password,
-    grant    => $grant
-  }
-
-  if $sql_file {
-    $table = "${name}.*"
-
-    exec{ "${name}-import":
-      command     => "sudo -u postgres psql ${name} < ${sql_file}",
-      logoutput   => true,
-      refreshonly => $refresh,
-      require     => Postgresql::Server::Db[$name],
-      onlyif      => "test -f ${sql_file}"
-    }
-  }
-}
-
-## Begin MariaDb manifest
-
-if $mariadb_values == undef {
-  $mariadb_values = hiera('mariadb', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $hhvm_values == undef {
-  $hhvm_values = hiera('hhvm', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if hash_key_equals($mariadb_values, 'install', 1) {
-  if hash_key_equals($apache_values, 'install', 1) or hash_key_equals($nginx_values, 'install', 1) {
-    $mariadb_webserver_restart = true
-  } else {
-    $mariadb_webserver_restart = false
-  }
-
-  if hash_key_equals($php_values, 'install', 1) {
-    $mariadb_php_installed = true
-    $mariadb_php_package   = 'php'
-  } elsif hash_key_equals($hhvm_values, 'install', 1) {
-    $mariadb_php_installed = true
-    $mariadb_php_package   = 'hhvm'
-  } else {
-    $mariadb_php_installed = false
-  }
-
-  if has_key($mariadb_values, 'root_password') and $mariadb_values['root_password'] {
-    include 'mysql::params'
-
-    if (! defined(File[$mysql::params::datadir])) {
-      file { $mysql::params::datadir :
-        ensure => directory,
-        group  => $mysql::params::root_group,
-        before => Class['mysql::server']
-      }
-    }
-
-    if ! defined(Group['mysql']) {
-      group { 'mysql':
-        ensure => present
-      }
-    }
-
-    if ! defined(User['mysql']) {
-      user { 'mysql':
-        ensure => present,
-      }
-    }
-
-    if (! defined(File['/var/run/mysqld'])) {
-      file { '/var/run/mysqld' :
-        ensure  => directory,
-        group   => 'mysql',
-        owner   => 'mysql',
-        before  => Class['mysql::server'],
-        require => [User['mysql'], Group['mysql']],
-        notify  => Service['mysql'],
-      }
-    }
-
-    if ! defined(File[$mysql::params::socket]) {
-      file { $mysql::params::socket :
-        ensure  => file,
-        group   => $mysql::params::root_group,
-        before  => Class['mysql::server'],
-        require => File[$mysql::params::datadir]
-      }
-    }
-
-    if ! defined(Package['mysql-libs']) {
-      package { 'mysql-libs':
-        ensure => purged,
-        before => Class['mysql::server'],
-      }
-    }
-
-    class { 'puphpet::mariadb':
-      version => $mariadb_values['version']
-    }
-
-    class { 'mysql::server':
-      package_name  => $puphpet::params::mariadb_package_server_name,
-      root_password => $mariadb_values['root_password'],
-      service_name  => 'mysql',
-    }
-
-    class { 'mysql::client':
-      package_name => $puphpet::params::mariadb_package_client_name
-    }
-
-    if is_hash($mariadb_values['databases']) and count($mariadb_values['databases']) > 0 {
-      create_resources(mariadb_db, $mariadb_values['databases'])
-    }
-
-    if $mariadb_php_installed and $mariadb_php_package == 'php' {
-      if $::osfamily == 'redhat' and $php_values['version'] == '53' {
-        $mariadb_php_module = 'mysql'
-      } elsif $lsbdistcodename == 'lucid' or $lsbdistcodename == 'squeeze' {
-        $mariadb_php_module = 'mysql'
-      } else {
-        $mariadb_php_module = 'mysqlnd'
-      }
-
-      if ! defined(Php::Module[$mariadb_php_module]) {
-        php::module { $mariadb_php_module:
-          service_autorestart => $mariadb_webserver_restart,
-        }
-      }
-    }
-  }
-
-  if hash_key_equals($mariadb_values, 'adminer', 1) and $mariadb_php_installed {
-    if hash_key_equals($apache_values, 'install', 1) {
-      $mariadb_adminer_webroot_location = '/var/www/default'
-    } elsif hash_key_equals($nginx_values, 'install', 1) {
-      $mariadb_adminer_webroot_location = $puphpet::params::nginx_webroot_location
-    } else {
-      $mariadb_adminer_webroot_location = '/var/www/default'
-    }
-
-    class { 'puphpet::adminer':
-      location    => "${mariadb_adminer_webroot_location}/adminer",
-      owner       => 'www-data',
-      php_package => $mariadb_php_package
-    }
-  }
-}
-
-define mariadb_db (
-  $user,
-  $password,
-  $host,
-  $grant    = [],
-  $sql_file = false
-) {
-  if $name == '' or $password == '' or $host == '' {
-    fail( 'MariaDB requires that name, password and host be set. Please check your settings!' )
-  }
-
-  mysql::db { $name:
-    user     => $user,
-    password => $password,
-    host     => $host,
-    grant    => $grant,
-    sql      => $sql_file,
-  }
-}
-
-# @todo update this!
-define mariadb_nginx_default_conf (
-  $webroot
-) {
-  if $php5_fpm_sock == undef {
-    $php5_fpm_sock = '/var/run/php5-fpm.sock'
-  }
-
-  if $fastcgi_pass == undef {
-    $fastcgi_pass = $php_values['version'] ? {
-      undef   => null,
-      '53'    => '127.0.0.1:9000',
-      default => "unix:${php5_fpm_sock}"
-    }
-  }
-
-  class { 'puphpet::nginx':
-    fastcgi_pass => $fastcgi_pass,
-    notify       => Class['nginx::service'],
-  }
-}
-
-## Begin SQLite manifest
-
-if $sqlite_values == undef {
-  $sqlite_values = hiera('sqlite', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-} if $mailcatcher_values == undef {
-  $mailcatcher_values = hiera('mailcatcher', false)
-}
-
-if hash_key_equals($sqlite_values, 'install', 1) {
-  if hash_key_equals($php_values, 'install', 1) {
-    $sqlite_php_installed = true
-    $sqlite_php_package   = 'php'
-  } elsif hash_key_equals($hhvm_values, 'install', 1) {
-    $sqlite_php_installed = true
-    $sqlite_php_package   = 'hhvm'
-  } else {
-    $sqlite_php_installed = false
-  }
-
-  # puppet manifests for mailcatcher and sqlite are not compatible.
-  if hash_key_equals($mailcatcher_values, 'install', 0) {
-    class { 'sqlite': }
-  }
-
-  if is_hash($sqlite_values['databases']) and count($sqlite_values['databases']) > 0 {
-    create_resources(sqlite_db, $sqlite_values['databases'])
-  }
-
-  if $sqlite_php_installed and $sqlite_php_package == 'php' and ! defined(Php::Module['sqlite']) {
-    php::module { 'sqlite':
-      service_autorestart => true,
-    }
-  }
-}
-
-define sqlite_db (
-  $name,
-  $owner,
-  $group = 0,
-  $mode = 0775,
-  $sql_file = false
-) {
-  if $name == '' or $owner == '' or $mode == '' {
-    fail( 'SQLite requires that name, owner, group, and mode be set. Please check your settings!' )
-  }
-
-  # ensure user and directory created
-  user { $owner:
-    ensure => present,
-    groups => $owner
-  }->
-  file { '/var/lib/sqlite':
-    ensure => directory,
-    owner  => $owner,
-    group  => $group,
-    mode   => 0775
-  }->
-  sqlite::db { $name:
-    owner => $owner,
-    group => $group,
-    mode  => $mode
-  }
-
-  if $sql_file {
-    exec{ "${name}-import":
-      command     => "cat ${sql_file} | sudo sqlite3 /var/lib/sqlite/${name}.db",
-      logoutput   => true,
-      refreshonly => $refresh,
-      require     => Sqlite::Db[$name],
-      onlyif      => "test -f ${sql_file}"
-    }
-  }
-}
-
-## Begin MongoDb manifest
-
-if $mongodb_values == undef {
-  $mongodb_values = hiera('mongodb', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if hash_key_equals($apache_values, 'install', 1)
-  or hash_key_equals($nginx_values, 'install', 1)
-{
-  $mongodb_webserver_restart = true
-} else {
-  $mongodb_webserver_restart = false
-}
-
-if hash_key_equals($mongodb_values, 'install', 1) {
-  file { ['/data', '/data/db']:
-    ensure  => directory,
-    mode    => 0775,
-    before  => Class['Mongodb::Globals'],
-  }
-
-  Class['Mongodb::Globals'] -> Class['Mongodb::Server']
-
-  class { 'mongodb::globals':
-    manage_package_repo => true,
-  }
-
-  create_resources('class', { 'mongodb::server' => $mongodb_values['settings'] })
-
-  if $::osfamily == 'redhat' {
-    class { '::mongodb::client':
-      require => Class['::Mongodb::Server']
-    }
-  }
-
-  if is_hash($mongodb_values['databases']) and count($mongodb_values['databases']) > 0 {
-    create_resources(mongodb_db, $mongodb_values['databases'])
-  }
-
-  if hash_key_equals($php_values, 'install', 1) and ! defined(Puphpet::Php::Pecl['mongo']) {
-    puphpet::php::pecl { 'mongo':
-      service_autorestart => $mongodb_webserver_restart,
-      require             => Class['mongodb::server']
-    }
-  }
-}
-
-define mongodb_db (
-  $user,
-  $password
-) {
-  if $name == '' or $password == '' {
-    fail( 'MongoDB requires that name and password be set. Please check your settings!' )
-  }
-
-  mongodb::db { $name:
-    user     => $user,
-    password => $password
-  }
-}
-
-# Begin redis
-
-if $redis_values == undef {
-  $redis_values = hiera('redis', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if hash_key_equals($apache_values, 'install', 1)
-  or hash_key_equals($nginx_values, 'install', 1)
-{
-  $redis_webserver_restart = true
-} else {
-  $redis_webserver_restart = false
-}
-
-if hash_key_equals($redis_values, 'install', 1) {
-  create_resources('class', { 'redis' => $redis_values['settings'] })
-
-  if hash_key_equals($php_values, 'install', 1) and ! defined(Php::Pecl::Module['redis']) {
-    php::pecl::module { 'redis':
-      use_package         => false,
-      service_autorestart => $redis_webserver_restart,
-      require             => Class['redis']
-    }
-  }
-}
-
-# Begin beanstalkd
-
-if $beanstalkd_values == undef {
-  $beanstalkd_values = hiera('beanstalkd', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $hhvm_values == undef {
-  $hhvm_values = hiera('hhvm', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if hash_key_equals($apache_values, 'install', 1) {
-  $beanstalk_console_webroot_location = '/var/www/default/beanstalk_console'
-} elsif hash_key_equals($nginx_values, 'install', 1) {
-  $beanstalk_console_webroot_location = "${puphpet::params::nginx_webroot_location}/beanstalk_console"
-} else {
-  $beanstalk_console_webroot_location = undef
-}
-
-if hash_key_equals($php_values, 'install', 1) or hash_key_equals($hhvm_values, 'install', 1) {
-  $beanstalkd_php_installed = true
-} else {
-  $beanstalkd_php_installed = false
-}
-
-if hash_key_equals($beanstalkd_values, 'install', 1) {
-  create_resources(beanstalkd::config, { 'beanstalkd' => $beanstalkd_values['settings'] })
-
-  if hash_key_equals($beanstalkd_values, 'beanstalk_console', 1)
-    and $beanstalk_console_webroot_location != undef
-    and $beanstalkd_php_installed
-  {
-    exec { 'delete-beanstalk_console-path-if-not-git-repo':
-      command => "rm -rf ${beanstalk_console_webroot_location}",
-      onlyif  => "test ! -d ${beanstalk_console_webroot_location}/.git"
-    }
-
-    vcsrepo { $beanstalk_console_webroot_location:
-      ensure   => present,
-      provider => git,
-      source   => 'https://github.com/ptrofimov/beanstalk_console.git',
-      require  => Exec['delete-beanstalk_console-path-if-not-git-repo']
-    }
-
-    file { "${beanstalk_console_webroot_location}/storage.json":
-      ensure  => present,
-      group   => 'www-data',
-      mode    => 0775,
-      require => Vcsrepo[$beanstalk_console_webroot_location]
-    }
-  }
-}
-
-# Begin rabbitmq
-
-if $rabbitmq_values == undef {
-  $rabbitmq_values = hiera('rabbitmq', false)
-} if $php_values == undef {
-  $php_values = hiera('php', false)
-} if $apache_values == undef {
-  $apache_values = hiera('apache', false)
-} if $nginx_values == undef {
-  $nginx_values = hiera('nginx', false)
-}
-
-if hash_key_equals($apache_values, 'install', 1)
-  or hash_key_equals($nginx_values, 'install', 1)
-{
-  $rabbitmq_webserver_restart = true
-} else {
-  $rabbitmq_webserver_restart = false
-}
-
-if hash_key_equals($rabbitmq_values, 'install', 1) {
-  if $::osfamily == 'redhat' {
-    Class['erlang'] -> Class['rabbitmq']
-    include 'erlang'
-  }
-
-  create_resources('class', { 'rabbitmq' => $rabbitmq_values['settings'] })
-
-  if hash_key_equals($php_values, 'install', 1) and ! defined(Php::Pecl::Module['amqp']) {
-    php::pecl::module { 'amqp':
-      use_package         => false,
-      service_autorestart => $rabbitmq_webserver_restart,
-      require             => Class['rabbitmq']
-    }
-  }
-
-  if ! defined(Firewall['100 tcp/15672']) {
-    firewall { '100 tcp/15672':
-      port   => 15672,
-      proto  => tcp,
-      action => 'accept',
-    }
-  }
-}
-
-# Begin Elasticsearch
-
-if $elasticsearch_values == undef {
-  $elasticsearch_values = hiera('elastic_search', false)
-}
-
-if hash_key_equals($elasticsearch_values, 'install', 1) {
-  case $::osfamily {
-    'debian': { $elasticsearch_package_url = 'https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.6.0.deb' }
-    'redhat': { $elasticsearch_package_url = 'https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.6.0.noarch.rpm' }
-    default:  { fail('Unrecognized operating system for Elasticsearch') }
-  }
-
-  $elasticsearch_settings = merge($elasticsearch_values['settings'], {
-    'package_url' => $elasticsearch_package_url,
-    require       => Class['my_fw::post'],
-  })
-
-  create_resources('class', { 'elasticsearch' => $elasticsearch_settings })
-
-  # Custom plugins
-  elasticsearch::plugin{'mobz/elasticsearch-head': module_dir => 'head' }
-  elasticsearch::plugin{'elasticsearch/marvel/latest': module_dir => 'marvel' }
-  elasticsearch::plugin{'elasticsearch/elasticsearch-analysis-icu/2.6.0': module_dir => 'analysis-icu' }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.fixtures.yml
deleted file mode 100644
index b5f76c03ac..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.fixtures.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-fixtures:
-  repositories:
-    stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
-    concat: "git://github.com/puppetlabs/puppetlabs-concat.git"
-  symlinks:
-    apache: "#{source_dir}"
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.nodeset.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.nodeset.yml
deleted file mode 100644
index 767f9cd2f6..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.nodeset.yml
+++ /dev/null
@@ -1,31 +0,0 @@
----
-default_set: 'centos-64-x64'
-sets:
-  'centos-59-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'centos-59-x64'
-  'centos-64-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'centos-64-x64'
-  'fedora-18-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'fedora-18-x64'
-  'debian-607-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'debian-607-x64'
-  'debian-70rc1-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'debian-70rc1-x64'
-  'ubuntu-server-10044-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'ubuntu-server-10044-x64'
-  'ubuntu-server-12042-x64':
-    nodes:
-      "main.foo.vm":
-        prefab: 'ubuntu-server-12042-x64'
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.puppet-lint.rc b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.puppet-lint.rc
deleted file mode 100644
index df733ca811..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.puppet-lint.rc
+++ /dev/null
@@ -1,5 +0,0 @@
---no-single_quote_string_with_variables-check
---no-80chars-check
---no-class_inherits_from_params_class-check
---no-class_parameter_defaults-check
---no-documentation-check
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.travis.yml
deleted file mode 100644
index 1d00b8eb04..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/.travis.yml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-branches:
-  only:
-  - master
-language: ruby
-bundler_args: --without development
-script: "bundle exec rake spec SPEC_OPTS='--format documentation'"
-rvm:
-  - 1.8.7
-  - 1.9.3
-  - 2.0.0
-env:
-  matrix:
-    - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
-    - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
-    - PUPPET_GEM_VERSION="~> 3.0"
-    - PUPPET_GEM_VERSION="~> 3.5.0" STRICT_VARIABLES="yes"
-matrix:
-  fast_finish: true
-  exclude:
-    - rvm: 1.9.3
-      env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
-    - rvm: 1.9.3
-      env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
-    - rvm: 2.0.0
-      env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
-    - rvm: 2.0.0
-      env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
-    - rvm: 1.8.7
-      env: PUPPET_GEM_VERSION="~> 3.2.0"
-notifications:
-  email: false
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/CHANGELOG.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/CHANGELOG.md
deleted file mode 100644
index 26e8d75d4d..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/CHANGELOG.md
+++ /dev/null
@@ -1,246 +0,0 @@
-## 2014-03-04 Supported Release 1.0.1
-###Summary
-
-This is a supported release.  This release removes a testing symlink that can
-cause trouble on systems where /var is on a seperate filesystem from the
-modulepath.
-
-####Features
-####Bugfixes
-####Known Bugs
-* By default, the version of Apache that ships with Ubuntu 10.04 does not work with `wsgi_import_script`.
-* SLES is unsupported.
- 
-## 2014-03-04 Supported Release 1.0.0
-###Summary
-
-This is a supported release. This release introduces Apache 2.4 support for
-Debian and RHEL based osfamilies.
-
-####Features
-
-- Add apache24 support
-- Add rewrite_base functionality to rewrites
-- Updated README documentation
-- Add WSGIApplicationGroup and WSGIImportScript directives
-
-####Bugfixes
-
-- Replace mutating hashes with merge() for Puppet 3.5
-- Fix WSGI import_script and mod_ssl issues on Lucid
-
-####Known Bugs
-* By default, the version of Apache that ships with Ubuntu 10.04 does not work with `wsgi_import_script`.
-* SLES is unsupported.
-
----
-
-## 2014-01-31 Release 0.11.0
-### Summary:
-
-This release adds preliminary support for Windows compatibility and multiple rewrite support.
-
-#### Backwards-incompatible Changes:
-
-- The rewrite_rule parameter is deprecated in favor of the new rewrite parameter
-  and will be removed in a future release.
-
-#### Features:
-
-- add Match directive
-- quote paths for windows compatibility
-- add auth_group_file option to README.md
-- allow AuthGroupFile directive for vhosts
-- Support Header directives in vhost context
-- Don't purge mods-available dir when separate enable dir is used
-- Fix the servername used in log file name
-- Added support for mod_include
-- Remove index parameters.
-- Support environment variable control for CustomLog
-- added redirectmatch support
-- Setting up the ability to do multiple rewrites and conditions.
-- Convert spec tests to beaker.
-- Support php_admin_(flag|value)s
-
-#### Bugfixes:
-
-- directories are either a Hash or an Array of Hashes
-- Configure Passenger in separate .conf file on RH so PassengerRoot isn't lost
-- (docs) Update list of `apache::mod::[name]` classes
-- (docs) Fix apache::namevirtualhost example call style
-- Fix $ports_file reference in apache::listen.
-- Fix $ports_file reference in Namevirtualhost.
-
-
-## 2013-12-05 Release 0.10.0
-### Summary:
-
-This release adds FreeBSD osfamily support and various other improvements to some mods.
-
-#### Features:
-
-- Add suPHP_UserGroup directive to directory context
-- Add support for ScriptAliasMatch directives
-- Set SSLOptions StdEnvVars in server context
-- No implicit  entry for ScriptAlias path
-- Add support for overriding ErrorDocument
-- Add support for AliasMatch directives
-- Disable default "allow from all" in vhost-directories
-- Add WSGIPythonPath as an optional parameter to mod_wsgi. 
-- Add mod_rpaf support
-- Add directives: IndexOptions, IndexOrderDefault
-- Add ability to include additional external configurations in vhost
-- need to use the provider variable not the provider key value from the directory hash for matches
-- Support for FreeBSD and few other features
-- Add new params to apache::mod::mime class
-- Allow apache::mod to specify module id and path
-- added $server_root parameter
-- Add Allow and ExtendedStatus support to mod_status
-- Expand vhost/_directories.pp directive support
-- Add initial support for nss module (no directives in vhost template yet)
-- added peruser and event mpms
-- added $service_name parameter
-- add parameter for TraceEnable
-- Make LogLevel configurable for server and vhost
-- Add documentation about $ip
-- Add ability to pass ip (instead of wildcard) in default vhost files
-
-#### Bugfixes:
-
-- Don't listen on port or set NameVirtualHost for non-existent vhost
-- only apply Directory defaults when provider is a directory
-- Working mod_authnz_ldap support on Debian/Ubuntu
-
-## 2013-09-06 Release 0.9.0
-### Summary:
-This release adds more parameters to the base apache class and apache defined
-resource to make the module more flexible. It also adds or enhances SuPHP,
-WSGI, and Passenger mod support, and support for the ITK mpm module.
-
-#### Backwards-incompatible Changes:
-- Remove many default mods that are not normally needed.
-- Remove `rewrite_base` `apache::vhost` parameter; did not work anyway.
-- Specify dependencies on stdlib >=2.4.0 (this was already the case, but
-making explicit)
-- Deprecate `a2mod` in favor of the `apache::mod::*` classes and `apache::mod`
-defined resource.
-
-#### Features:
-- `apache` class
-  - Add `httpd_dir` parameter to change the location of the configuration
-  files.
-  - Add `logroot` parameter to change the logroot
-  - Add `ports_file` parameter to changes the `ports.conf` file location
-  - Add `keepalive` parameter to enable persistent connections
-  - Add `keepalive_timeout` parameter to change the timeout
-  - Update `default_mods` to be able to take an array of mods to enable.
-- `apache::vhost`
-  - Add `wsgi_daemon_process`, `wsgi_daemon_process_options`,
-  `wsgi_process_group`, and `wsgi_script_aliases` parameters for per-vhost
-  WSGI configuration.
-  - Add `access_log_syslog` parameter to enable syslogging.
-  - Add `error_log_syslog` parameter to enable syslogging of errors.
-  - Add `directories` hash parameter. Please see README for documentation.
-  - Add `sslproxyengine` parameter to enable SSLProxyEngine
-  - Add `suphp_addhandler`, `suphp_engine`, and `suphp_configpath` for
-  configuring SuPHP.
-  - Add `custom_fragment` parameter to allow for arbitrary apache
-  configuration injection. (Feature pull requests are prefered over using
-  this, but it is available in a pinch.)
-- Add `apache::mod::suphp` class for configuring SuPHP.
-- Add `apache::mod::itk` class for configuring ITK mpm module.
-- Update `apache::mod::wsgi` class for global WSGI configuration with
-`wsgi_socket_prefix` and `wsgi_python_home` parameters.
-- Add README.passenger.md to document the `apache::mod::passenger` usage.
-Added `passenger_high_performance`, `passenger_pool_idle_time`,
-`passenger_max_requests`, `passenger_stat_throttle_rate`, `rack_autodetect`,
-and `rails_autodetect` parameters.
-- Separate the httpd service resource into a new `apache::service` class for
-dependency chaining of `Class['apache'] ->  ~>
-Class['apache::service']`
-- Added `apache::mod::proxy_balancer` class for `apache::balancer`
-
-#### Bugfixes:
-- Change dependency to puppetlabs-concat
-- Fix ruby 1.9 bug for `a2mod`
-- Change servername to be `$::hostname` if there is no `$::fqdn`
-- Make `/etc/ssl/certs` the default ssl certs directory for RedHat non-5.
-- Make `php` the default php package for RedHat non-5.
-- Made `aliases` able to take a single alias hash instead of requiring an
-array.
-
-## 2013-07-26 Release 0.8.1
-#### Bugfixes:
-- Update `apache::mpm_module` detection for worker/prefork
-- Update `apache::mod::cgi` and `apache::mod::cgid` detection for
-worker/prefork
-
-## 2013-07-16 Release 0.8.0
-#### Features:
-- Add `servername` parameter to `apache` class
-- Add `proxy_set` parameter to `apache::balancer` define
-
-#### Bugfixes:
-- Fix ordering for multiple `apache::balancer` clusters
-- Fix symlinking for sites-available on Debian-based OSs
-- Fix dependency ordering for recursive confdir management
-- Fix `apache::mod::*` to notify the service on config change
-- Documentation updates
-
-## 2013-07-09 Release 0.7.0
-#### Changes:
-- Essentially rewrite the module -- too many to list
-- `apache::vhost` has many abilities -- see README.md for details
-- `apache::mod::*` classes provide httpd mod-loading capabilities
-- `apache` base class is much more configurable
-
-#### Bugfixes:
-- Many. And many more to come
-
-## 2013-03-2 Release 0.6.0
-- update travis tests (add more supported versions)
-- add access log_parameter
-- make purging of vhost dir configurable
-
-## 2012-08-24 Release 0.4.0
-#### Changes:
-- `include apache` is now required when using `apache::mod::*`
-
-#### Bugfixes:
-- Fix syntax for validate_re
-- Fix formatting in vhost template
-- Fix spec tests such that they pass
-
-##2012-05-08 Puppet Labs  - 0.0.4
-* e62e362 Fix broken tests for ssl, vhost, vhost::*
-* 42c6363 Changes to match style guide and pass puppet-lint without error
-* 42bc8ba changed name => path for file resources in order to name namevar by it's name
-* 72e13de One end too much
-* 0739641 style guide fixes: 'true' <> true, $operatingsystem needs to be $::operatingsystem, etc.
-* 273f94d fix tests
-* a35ede5 (#13860) Make a2enmod/a2dismo commands optional
-* 98d774e (#13860) Autorequire Package['httpd']
-* 05fcec5 (#13073) Add missing puppet spec tests
-* 541afda (#6899) Remove virtual a2mod definition
-* 976cb69 (#13072) Move mod python and wsgi package names to params
-* 323915a (#13060) Add .gitignore to repo
-* fdf40af (#13060) Remove pkg directory from source tree
-* fd90015 Add LICENSE file and update the ModuleFile
-* d3d0d23 Re-enable local php class
-* d7516c7 Make management of firewalls configurable for vhosts
-* 60f83ba Explicitly lookup scope of apache_name in templates.
-* f4d287f (#12581) Add explicit ordering for vdir directory
-* 88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall
-* a776a8b (#11071) Fix to work with latest firewall module
-* 2b79e8b (#11070) Add support for Scientific Linux
-* 405b3e9 Fix for a2mod
-* 57b9048 Commit apache::vhost::redirect Manifest
-* 8862d01 Commit apache::vhost::proxy Manifest
-* d5c1fd0 Commit apache::mod::wsgi Manifest
-* a825ac7 Commit apache::mod::python Manifest
-* b77062f Commit Templates
-* 9a51b4a Vhost File Declarations
-* 6cf7312 Defaults for Parameters
-* 6a5b11a Ensure installed
-* f672e46 a2mod fix
-* 8a56ee9 add pthon support to apache
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/CONTRIBUTING.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/CONTRIBUTING.md
deleted file mode 100644
index e1288478a2..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/CONTRIBUTING.md
+++ /dev/null
@@ -1,234 +0,0 @@
-Checklist (and a short version for the impatient)
-=================================================
-
-  * Commits:
-
-    - Make commits of logical units.
-
-    - Check for unnecessary whitespace with "git diff --check" before
-      committing.
-
-    - Commit using Unix line endings (check the settings around "crlf" in
-      git-config(1)).
-
-    - Do not check in commented out code or unneeded files.
-
-    - The first line of the commit message should be a short
-      description (50 characters is the soft limit, excluding ticket
-      number(s)), and should skip the full stop.
-
-    - Associate the issue in the message. The first line should include
-      the issue number in the form "(#XXXX) Rest of message".
-
-    - The body should provide a meaningful commit message, which:
-
-      - uses the imperative, present tense: "change", not "changed" or
-        "changes".
-
-      - includes motivation for the change, and contrasts its
-        implementation with the previous behavior.
-
-    - Make sure that you have tests for the bug you are fixing, or
-      feature you are adding.
-
-    - Make sure the test suites passes after your commit:
-      `bundle exec rspec spec/acceptance` More information on [testing](#Testing) below
-
-    - When introducing a new feature, make sure it is properly
-      documented in the README.md
-
-  * Submission:
-
-    * Pre-requisites:
-
-      - Sign the [Contributor License Agreement](https://cla.puppetlabs.com/)
-
-      - Make sure you have a [GitHub account](https://github.com/join)
-
-      - [Create a ticket](http://projects.puppetlabs.com/projects/modules/issues/new), or [watch the ticket](http://projects.puppetlabs.com/projects/modules/issues) you are patching for.
-
-    * Preferred method:
-
-      - Fork the repository on GitHub.
-
-      - Push your changes to a topic branch in your fork of the
-        repository. (the format ticket/1234-short_description_of_change is
-        usually preferred for this project).
-
-      - Submit a pull request to the repository in the puppetlabs
-        organization.
-
-The long version
-================
-
-  1.  Make separate commits for logically separate changes.
-
-      Please break your commits down into logically consistent units
-      which include new or changed tests relevant to the rest of the
-      change.  The goal of doing this is to make the diff easier to
-      read for whoever is reviewing your code.  In general, the easier
-      your diff is to read, the more likely someone will be happy to
-      review it and get it into the code base.
-
-      If you are going to refactor a piece of code, please do so as a
-      separate commit from your feature or bug fix changes.
-
-      We also really appreciate changes that include tests to make
-      sure the bug is not re-introduced, and that the feature is not
-      accidentally broken.
-
-      Describe the technical detail of the change(s).  If your
-      description starts to get too long, that is a good sign that you
-      probably need to split up your commit into more finely grained
-      pieces.
-
-      Commits which plainly describe the things which help
-      reviewers check the patch and future developers understand the
-      code are much more likely to be merged in with a minimum of
-      bike-shedding or requested changes.  Ideally, the commit message
-      would include information, and be in a form suitable for
-      inclusion in the release notes for the version of Puppet that
-      includes them.
-
-      Please also check that you are not introducing any trailing
-      whitespace or other "whitespace errors".  You can do this by
-      running "git diff --check" on your changes before you commit.
-
-  2.  Sign the Contributor License Agreement
-
-      Before we can accept your changes, we do need a signed Puppet
-      Labs Contributor License Agreement (CLA).
-
-      You can access the CLA via the [Contributor License Agreement link](https://cla.puppetlabs.com/)
-
-      If you have any questions about the CLA, please feel free to
-      contact Puppet Labs via email at cla-submissions@puppetlabs.com.
-
-  3.  Sending your patches
-
-      To submit your changes via a GitHub pull request, we _highly_
-      recommend that you have them on a topic branch, instead of
-      directly on "master".
-      It makes things much easier to keep track of, especially if
-      you decide to work on another thing before your first change
-      is merged in.
-
-      GitHub has some pretty good
-      [general documentation](http://help.github.com/) on using
-      their site.  They also have documentation on
-      [creating pull requests](http://help.github.com/send-pull-requests/).
-
-      In general, after pushing your topic branch up to your
-      repository on GitHub, you can switch to the branch in the
-      GitHub UI and click "Pull Request" towards the top of the page
-      in order to open a pull request.
-
-
-  4.  Update the related GitHub issue.
-
-      If there is a GitHub issue associated with the change you
-      submitted, then you should update the ticket to include the
-      location of your branch, along with any other commentary you
-      may wish to make.
-
-Testing
-=======
-
-Getting Started
----------------
-
-Our puppet modules provide [`Gemfile`](./Gemfile)s which can tell a ruby
-package manager such as [bundler](http://bundler.io/) what Ruby packages,
-or Gems, are required to build, develop, and test this software.
-
-Please make sure you have [bundler installed](http://bundler.io/#getting-started)
-on your system, then use it to install all dependencies needed for this project,
-by running
-
-```shell
-% bundle install
-Fetching gem metadata from https://rubygems.org/........
-Fetching gem metadata from https://rubygems.org/..
-Using rake (10.1.0)
-Using builder (3.2.2)
--- 8><-- many more --><8 --
-Using rspec-system-puppet (2.2.0)
-Using serverspec (0.6.3)
-Using rspec-system-serverspec (1.0.0)
-Using bundler (1.3.5)
-Your bundle is complete!
-Use `bundle show [gemname]` to see where a bundled gem is installed.
-```
-
-NOTE some systems may require you to run this command with sudo.
-
-If you already have those gems installed, make sure they are up-to-date:
-
-```shell
-% bundle update
-```
-
-With all dependencies in place and up-to-date we can now run the tests:
-
-```shell
-% rake spec
-```
-
-This will execute all the [rspec tests](http://rspec-puppet.com/) tests
-under [spec/defines](./spec/defines), [spec/classes](./spec/classes),
-and so on. rspec tests may have the same kind of dependencies as the
-module they are testing. While the module defines in its [Modulefile](./Modulefile),
-rspec tests define them in [.fixtures.yml](./fixtures.yml).
-
-Some puppet modules also come with [beaker](https://github.com/puppetlabs/beaker)
-tests. These tests spin up a virtual machine under
-[VirtualBox](https://www.virtualbox.org/)) with, controlling it with
-[Vagrant](http://www.vagrantup.com/) to actually simulate scripted test
-scenarios. In order to run these, you will need both of those tools
-installed on your system.
-
-You can run them by issuing the following command
-
-```shell
-% rake spec_clean
-% rspec spec/acceptance
-```
-
-This will now download a pre-fabricated image configured in the [default node-set](./spec/acceptance/nodesets/default.yml),
-install puppet, copy this module and install its dependencies per [spec/spec_helper_acceptance.rb](./spec/spec_helper_acceptance.rb)
-and then run all the tests under [spec/acceptance](./spec/acceptance).
-
-Writing Tests
--------------
-
-XXX getting started writing tests.
-
-If you have commit access to the repository
-===========================================
-
-Even if you have commit access to the repository, you will still need to
-go through the process above, and have someone else review and merge
-in your changes.  The rule is that all changes must be reviewed by a
-developer on the project (that did not write the code) to ensure that
-all changes go through a code review process.
-
-Having someone other than the author of the topic branch recorded as
-performing the merge is the record that they performed the code
-review.
-
-
-Additional Resources
-====================
-
-* [Getting additional help](http://projects.puppetlabs.com/projects/puppet/wiki/Getting_Help)
-
-* [Writing tests](http://projects.puppetlabs.com/projects/puppet/wiki/Development_Writing_Tests)
-
-* [Patchwork](https://patchwork.puppetlabs.com)
-
-* [Contributor License Agreement](https://projects.puppetlabs.com/contributor_licenses/sign)
-
-* [General GitHub documentation](http://help.github.com/)
-
-* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
-
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/Gemfile
deleted file mode 100644
index fc45295a10..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/Gemfile
+++ /dev/null
@@ -1,26 +0,0 @@
-source ENV['GEM_SOURCE'] || "https://rubygems.org"
-
-group :development, :test do
-  gem 'rake', '10.1.1',          :require => false
-  gem 'rspec-puppet', '>=1.0.0', :require => false
-  gem 'puppetlabs_spec_helper',  :require => false
-  gem 'serverspec',              :require => false
-  gem 'puppet-lint',             :require => false
-  gem 'beaker',                  :require => false
-  gem 'beaker-rspec',            :require => false
-  gem 'rspec', '~> 2.11',        :require => false
-end  
-
-if facterversion = ENV['FACTER_GEM_VERSION']
-  gem 'facter', facterversion, :require => false
-else
-  gem 'facter', :require => false
-end
-
-if puppetversion = ENV['PUPPET_GEM_VERSION']
-  gem 'puppet', puppetversion, :require => false
-else
-  gem 'puppet', :require => false
-end
-
-# vim:ft=ruby
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/LICENSE
deleted file mode 100644
index 8961ce8a6d..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-Copyright (C) 2012 Puppet Labs Inc
-
-Puppet Labs can be contacted at: info@puppetlabs.com
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/Modulefile
deleted file mode 100644
index 227947cbba..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/Modulefile
+++ /dev/null
@@ -1,12 +0,0 @@
-name 'puppetlabs-apache'
-version '1.0.1'
-source 'git://github.com/puppetlabs/puppetlabs-apache.git'
-author 'puppetlabs'
-license 'Apache 2.0'
-summary 'Puppet module for Apache'
-description 'Module for Apache configuration'
-project_page 'https://github.com/puppetlabs/puppetlabs-apache'
-
-## Add dependencies, if any:
-dependency 'puppetlabs/stdlib', '>= 2.4.0'
-dependency 'puppetlabs/concat', '>= 1.0.0'
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/README.md
deleted file mode 100644
index 385130df31..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/README.md
+++ /dev/null
@@ -1,1958 +0,0 @@
-#apache
-
-[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-apache)
-
-####Table of Contents
-
-1. [Overview - What is the apache module?](#overview)
-2. [Module Description - What does the module do?](#module-description)
-3. [Setup - The basics of getting started with apache](#setup)
-    * [Beginning with apache - Installation](#beginning-with-apache)
-    * [Configure a virtual host - Basic options for getting started](#configure-a-virtual-host)
-4. [Usage - The classes and defined types available for configuration](#usage)
-    * [Classes and Defined Types](#classes-and-defined-types)
-        * [Class: apache](#class-apache)
-        * [Class: apache::default_mods](#class-apachedefault_mods)
-        * [Defined Type: apache::mod](#defined-type-apachemod)
-        * [Classes: apache::mod::*](#classes-apachemodname)
-        * [Class: apache::mod::pagespeed](#class-apachemodpagespeed)
-        * [Class: apache::mod::php](#class-apachemodphp)
-        * [Class: apache::mod::ssl](#class-apachemodssl)
-        * [Class: apache::mod::wsgi](#class-apachemodwsgi)
-        * [Class: apache::mod::fcgid](#class-apachemodfcgid)
-        * [Defined Type: apache::vhost](#defined-type-apachevhost)
-        * [Parameter: `directories` for apache::vhost](#parameter-directories-for-apachevhost)
-        * [SSL parameters for apache::vhost](#ssl-parameters-for-apachevhost)
-    * [Virtual Host Examples - Demonstrations of some configuration options](#virtual-host-examples)
-    * [Load Balancing](#load-balancing)
-        * [Defined Type: apache::balancer](#defined-type-apachebalancer)
-        * [Defined Type: apache::balancermember](#defined-type-apachebalancermember)
-        * [Examples - Load balancing with exported and non-exported resources](#examples)
-5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
-    * [Classes](#classes)
-        * [Public Classes](#public-classes)
-        * [Private Classes](#private-classes)
-    * [Defined Types](#defined-types)
-        * [Public Defined Types](#public-defined-types)
-        * [Private Defined Types](#private-defined-types)
-    * [Templates](#templates)
-6. [Limitations - OS compatibility, etc.](#limitations)
-7. [Development - Guide for contributing to the module](#development)
-    * [Contributing to the apache module](#contributing)
-    * [Running tests - A quick guide](#running-tests)
-
-##Overview
-
-The apache module allows you to set up virtual hosts and manage web services with minimal effort.
-
-##Module Description
-
-Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.
-
-##Setup
-
-**What apache affects:**
-
-* configuration files and directories (created and written to)
-    * **WARNING**: Configurations that are *not* managed by Puppet will be purged.
-* package/service/configuration files for Apache
-* Apache modules
-* virtual hosts
-* listened-to ports
-* `/etc/make.conf` on FreeBSD 
-
-###Beginning with Apache
-
-To install Apache with the default parameters
-
-```puppet
-    class { 'apache':  }
-```
-
-The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, and RedHat systems have another, as do FreeBSD systems). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters
-
-```puppet
-    class { 'apache':
-      default_mods        => false,
-      default_confd_files => false,
-    }
-```
-
-###Configure a virtual host
-
-Declaring the `apache` class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving `$apache::docroot`.
-
-```puppet
-    class { 'apache': }
-```
-
-To configure a very basic, name-based virtual host
-
-```puppet
-    apache::vhost { 'first.example.com':
-      port    => '80',
-      docroot => '/var/www/first',
-    }
-```
-
-*Note:* The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.
-
-A slightly more complicated example, changes the docroot owner/group from the default 'root'
-
-```puppet
-    apache::vhost { 'second.example.com':
-      port          => '80',
-      docroot       => '/var/www/second',
-      docroot_owner => 'third',
-      docroot_group => 'third',
-    }
-```
-
-To set up a virtual host with SSL and default SSL certificates
-
-```puppet
-    apache::vhost { 'ssl.example.com':
-      port    => '443',
-      docroot => '/var/www/ssl',
-      ssl     => true,
-    }
-```
-
-To set up a virtual host with SSL and specific SSL certificates
-
-```puppet
-    apache::vhost { 'fourth.example.com':
-      port     => '443',
-      docroot  => '/var/www/fourth',
-      ssl      => true,
-      ssl_cert => '/etc/ssl/fourth.example.com.cert',
-      ssl_key  => '/etc/ssl/fourth.example.com.key',
-    }
-```
-
-Virtual hosts listen on '*' by default. To listen on a specific IP address
-
-```puppet
-    apache::vhost { 'subdomain.example.com':
-      ip      => '127.0.0.1',
-      port    => '80',
-      docroot => '/var/www/subdomain',
-    }
-```
-
-To set up a virtual host with a wildcard alias for the subdomain mapped to a same-named directory, for example: `http://example.com.loc` to `/var/www/example.com`
-
-```puppet
-    apache::vhost { 'subdomain.loc':
-      vhost_name       => '*',
-      port             => '80',
-      virtual_docroot' => '/var/www/%-2+',
-      docroot          => '/var/www',
-      serveraliases    => ['*.loc',],
-    }
-```
-
-To set up a virtual host with suPHP
-
-```puppet
-    apache::vhost { 'suphp.example.com':
-      port                => '80',
-      docroot             => '/home/appuser/myphpapp',
-      suphp_addhandler    => 'x-httpd-php',
-      suphp_engine        => 'on',
-      suphp_configpath    => '/etc/php5/apache2',
-      directories         => { path => '/home/appuser/myphpapp',
-        'suphp'           => { user => 'myappuser', group => 'myappgroup' },
-      }
-    }
-```
-
-To set up a virtual host with WSGI
-
-```puppet
-    apache::vhost { 'wsgi.example.com':
-      port                        => '80',
-      docroot                     => '/var/www/pythonapp',
-      wsgi_application_group      => '%{GLOBAL}',
-      wsgi_daemon_process         => 'wsgi',
-      wsgi_daemon_process_options => { 
-        processes    => '2', 
-        threads      => '15', 
-        display-name => '%{GROUP}',
-       },
-      wsgi_import_script          => '/var/www/demo.wsgi',
-      wsgi_import_script_options  =>
-        { process-group => 'wsgi', application-group => '%{GLOBAL}' },
-      wsgi_process_group          => 'wsgi',
-      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },
-    }
-```
-
-Starting in Apache 2.2.16, HTTPD supports [FallbackResource](https://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource), a simple replacement for common RewriteRules.
-
-```puppet
-    apache::vhost { 'wordpress.example.com':
-      port                => '80',
-      docroot             => '/var/www/wordpress',
-      fallbackresource    => '/index.php',
-    }
-```
-
-Please note that the 'disabled' argument to FallbackResource is only supported since Apache 2.2.24.
-
-See a list of all [virtual host parameters](#defined-type-apachevhost). See an extensive list of [virtual host examples](#virtual-host-examples).
-
-##Usage
-
-###Classes and Defined Types
-
-This module modifies Apache configuration files and directories, and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-Puppet configuration files can cause unexpected failures.
-
-It is possible to temporarily disable full Puppet management by setting the [`purge_configs`](#purge_configs) parameter within the base `apache` class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations. See the [`purge_configs` parameter](#purge_configs) for more information.
-
-####Class: `apache`
-
-The apache module's primary class, `apache`, guides the basic setup of Apache on your system.
-
-You may establish a default vhost in this class, the `vhost` class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the `vhost` type.
-
-**Parameters within `apache`:**
-
-#####`apache_version`
-
-Configures the behavior of the module templates, package names, and default mods by setting the Apache version. Default is determined by the class `apache::version` using the OS family and release. It should not be configured manually without special reason.
-
-#####`confd_dir`
-
-Changes the location of the configuration directory your custom configuration files are placed in. Defaults to '/etc/httpd/conf' on RedHat, '/etc/apache2' on Debian, and '/usr/local/etc/apache22' on FreeBSD.
-
-#####`conf_template`
-
-Overrides the template used for the main apache configuration file. Defaults to 'apache/httpd.conf.erb'.
-
-*Note:* Using this parameter is potentially risky, as the module has been built for a minimal configuration file with the configuration primarily coming from conf.d/ entries.
-
-#####`default_confd_files`
-
-Generates default set of include-able Apache configuration files under  `${apache::confd_dir}` directory. These configuration files correspond to what is usually installed with the Apache package on a given platform.
-
-#####`default_mods`
-
-Sets up Apache with default settings based on your OS. Valid values are 'true', 'false', or an array of mod names. 
-
-Defaults to 'true', which will include the default [HTTPD mods](https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/default_mods.pp).
-
-If false, it will only include the mods required to make HTTPD work, and any other mods can be declared on their own.
-
-If an array, the apache module will include the array of mods listed.
-
-#####`default_ssl_ca`
-
-The default certificate authority, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_cert`
-
-The default SSL certification, which is automatically set based on your operating system  ('/etc/pki/tls/certs/localhost.crt' for RedHat, '/etc/ssl/certs/ssl-cert-snakeoil.pem' for Debian, and '/usr/local/etc/apache22/server.crt' for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_chain`
-
-The default SSL chain, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_crl`
-
-The default certificate revocation list to use, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_crl_path`
-
-The default certificate revocation list path, which is automatically set to 'undef'. This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_key`
-
-The default SSL key, which is automatically set based on your operating system ('/etc/pki/tls/private/localhost.key' for RedHat, '/etc/ssl/private/ssl-cert-snakeoil.key' for Debian, and '/usr/local/etc/apache22/server.key' for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.
-
-#####`default_ssl_vhost`
-
-Sets up a default SSL virtual host. Defaults to 'false'. If set to 'true', will set up the following vhost:
-
-```puppet
-    apache::vhost { 'default-ssl':
-      port            => 443,
-      ssl             => true,
-      docroot         => $docroot,
-      scriptalias     => $scriptalias,
-      serveradmin     => $serveradmin,
-      access_log_file => "ssl_${access_log_file}",
-      }
-```
-
-SSL vhosts only respond to HTTPS queries.
-
-#####`default_vhost`
-
-Sets up a default virtual host. Defaults to 'true', set to 'false' to set up [customized virtual hosts](#configure-a-virtual-host).
-
-#####`error_documents`
-
-Enables custom error documents. Defaults to 'false'.
-
-#####`httpd_dir`
-
-Changes the base location of the configuration directories used for the apache service. This is useful for specially repackaged HTTPD builds, but may have unintended consequences when used in combination with the default distribution packages. Defaults to '/etc/httpd' on RedHat, '/etc/apache2' on Debian, and '/usr/local/etc/apache22' on FreeBSD.
-
-#####`keepalive`
-
-Enables persistent connections.
-
-#####`keepalive_timeout`
-
-Sets the amount of time the server will wait for subsequent requests on a persistent connection. Defaults to '15'.
-
-#####`max_keepalive_requests`
-
-Sets the limit of the number of requests allowed per connection when KeepAlive is on. Defaults to '100'.
-
-#####`loadfile_name`
-
-Sets the file name for the module loadfile. Should be in the format *.load.  This can be used to set the module load order.
-
-#####`log_level`
-
-Changes the verbosity level of the error log. Defaults to 'warn'. Valid values are 'emerg', 'alert', 'crit', 'error', 'warn', 'notice', 'info', or 'debug'.
-
-#####`log_formats`
-
-Define additional [LogFormats](https://httpd.apache.org/docs/current/mod/mod_log_config.html#logformat). This is done in a Hash:
-
-```puppet
-  $log_formats = { vhost_common => '%v %h %l %u %t \"%r\" %>s %b' }
-```
-
-#####`logroot`
-
-Changes the directory where Apache log files for the virtual host are placed. Defaults to '/var/log/httpd' on RedHat, '/var/log/apache2' on Debian, and '/var/log/apache22' on FreeBSD.
-
-#####`manage_group`
-
-Setting this to 'false' will stop the group resource from being created. This is for when you have a group, created from another Puppet module, you want to use to run Apache. Without this parameter, attempting to use a previously established group would result in a duplicate resource error.
-
-#####`manage_user`
-
-Setting this to 'false' will stop the user resource from being created. This is for instances when you have a user, created from another Puppet module, you want to use to run Apache. Without this parameter, attempting to use a previously established user would result in a duplicate resource error.
-
-#####`mod_dir`
-
-Changes the location of the configuration directory your Apache modules configuration files are placed in. Defaults to '/etc/httpd/conf.d' for RedHat, '/etc/apache2/mods-available' for Debian, and '/usr/local/etc/apache22/Modules' for FreeBSD.
-
-#####`mpm_module`
-
-Determines which MPM is loaded and configured for the HTTPD process. Valid values are 'event', 'itk', 'peruser', 'prefork', 'worker', or 'false'. Defaults to 'prefork' on RedHat and FreeBSD, and 'worker' on Debian. Must be set to 'false' to explicitly declare the following classes with custom parameters:
-
-* `apache::mod::event`
-* `apache::mod::itk`
-* `apache::mod::peruser`
-* `apache::mod::prefork`
-* `apache::mod::worker` 
-
-*Note:* Switching between different MPMs on FreeBSD is possible but quite difficult. Before changing `$mpm_module` you must uninstall all packages that depend on your currently-installed Apache. 
-
-#####`package_ensure`
-
-Allows control over the package ensure attribute. Can be 'present','absent', or a version string.
-
-#####`ports_file`
-
-Changes the name of the file containing Apache ports configuration. Default is `${conf_dir}/ports.conf`.
-
-#####`purge_configs`
-
-Removes all other Apache configs and vhosts, defaults to 'true'. Setting this to 'false' is a stopgap measure to allow the apache module to coexist with existing or otherwise-managed configuration. It is recommended that you move your configuration entirely to resources within this module.
-
-#####`sendfile`
-
-Makes Apache use the Linux kernel sendfile to serve static files. Defaults to 'On'.
-
-#####`serveradmin`
-
-Sets the server administrator. Defaults to 'root@localhost'.
-
-#####`servername`
-
-Sets the server name. Defaults to `fqdn` provided by Facter.
-
-#####`server_root`
-
-Sets the root directory in which the server resides. Defaults to '/etc/httpd' on RedHat, '/etc/apache2' on Debian, and '/usr/local' on FreeBSD.
-
-#####`server_signature`
-
-Configures a trailing footer line under server-generated documents. More information about [ServerSignature](http://httpd.apache.org/docs/current/mod/core.html#serversignature). Defaults to 'On'.
-
-#####`server_tokens`
-
-Controls how much information Apache sends to the browser about itself and the operating system. More information about [ServerTokens](http://httpd.apache.org/docs/current/mod/core.html#servertokens). Defaults to 'OS'.
-
-#####`service_enable`
-
-Determines whether the HTTPD service is enabled when the machine is booted. Defaults to 'true'.
-
-#####`service_ensure`
-
-Determines whether the service should be running. Valid values are true, false, 'running' or 'stopped' when Puppet should manage the service. Any other value will set ensure to false for the Apache service, which is useful when you want to let the service be managed by some other application like Pacemaker. Defaults to 'running'.
-
-#####`service_name`
-
-Name of the Apache service to run. Defaults to: 'httpd' on RedHat, 'apache2' on Debian, and 'apache22' on FreeBSD.
-
-#####`trace_enable`
-
-Controls how TRACE requests per RFC 2616 are handled. More information about [TraceEnable](http://httpd.apache.org/docs/current/mod/core.html#traceenable). Defaults to 'On'.
-
-#####`vhost_dir`
-
-Changes the location of the configuration directory your virtual host configuration files are placed in. Defaults to 'etc/httpd/conf.d' on RedHat, '/etc/apache2/sites-available' on Debian, and '/usr/local/etc/apache22/Vhosts' on FreeBSD.
-
-####Class: `apache::default_mods`
-
-Installs default Apache modules based on what OS you are running.
-
-```puppet
-    class { 'apache::default_mods': }
-```
-
-####Defined Type: `apache::mod`
-
-Used to enable arbitrary Apache HTTPD modules for which there is no specific `apache::mod::[name]` class. The `apache::mod` defined type will also install the required packages to enable the module, if any.
-
-```puppet
-    apache::mod { 'rewrite': }
-    apache::mod { 'ldap': }
-```
-
-####Classes: `apache::mod::[name]`
-
-There are many `apache::mod::[name]` classes within this module that can be declared using `include`:
-
-* `actions`
-* `alias`
-* `auth_basic`
-* `auth_kerb`
-* `authnz_ldap`*
-* `autoindex`
-* `cache`
-* `cgi`
-* `cgid`
-* `dav`
-* `dav_fs`
-* `dav_svn`*
-* `deflate`
-* `dev`
-* `dir`*
-* `disk_cache`
-* `event`
-* `expires`
-* `fastcgi`
-* `fcgid`
-* `headers`
-* `include`
-* `info`
-* `itk`
-* `ldap`
-* `mime`
-* `mime_magic`*
-* `negotiation`
-* `nss`*
-* `pagespeed` (see [`apache::mod::pagespeed`](#class-apachemodpagespeed) below)
-* `passenger`*
-* `perl`
-* `peruser`
-* `php` (requires [`mpm_module`](#mpm_module) set to `prefork`)
-* `prefork`*
-* `proxy`*
-* `proxy_ajp`
-* `proxy_balancer`
-* `proxy_html`
-* `proxy_http`
-* `python`
-* `reqtimeout`
-* `rewrite`
-* `rpaf`*
-* `setenvif`
-* `speling`
-* `ssl`* (see [`apache::mod::ssl`](#class-apachemodssl) below)
-* `status`*
-* `suphp`
-* `userdir`*
-* `vhost_alias`
-* `worker`*
-* `wsgi` (see [`apache::mod::wsgi`](#class-apachemodwsgi) below)
-* `xsendfile`
-
-Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters will not require any configuration or attention.
-
-The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install and the module will not work without the template. Any module without a template will install the package but drop no files.
-
-####Class: `apache::mod::pagespeed`
-
-Installs and manages mod_pagespeed, which is a Google module that rewrites web pages to reduce latency and bandwidth.
-
-This module does *not* manage the software repositories needed to automatically install the
-mod-pagespeed-stable package. The module does however require that the package be installed,
-or be installable using the system's default package provider.  You should ensure that this
-pre-requisite is met or declaring `apache::mod::pagespeed` will cause the puppet run to fail.
-
-These are the defaults:
-
-```puppet
-    class { 'apache::mod::pagespeed':
-      inherit_vhost_config          => 'on',
-      filter_xhtml                  => false,
-      cache_path                    => '/var/cache/mod_pagespeed/',
-      log_dir                       => '/var/log/pagespeed',
-      memache_servers               => [],
-      rewrite_level                 => 'CoreFilters',
-      disable_filters               => [],
-      enable_filters                => [],
-      forbid_filters                => [],
-      rewrite_deadline_per_flush_ms => 10,
-      additional_domains            => undef,
-      file_cache_size_kb            => 102400,
-      file_cache_clean_interval_ms  => 3600000,
-      lru_cache_per_process         => 1024,
-      lru_cache_byte_limit          => 16384,
-      css_flatten_max_bytes         => 2048,
-      css_inline_max_bytes          => 2048,
-      css_image_inline_max_bytes    => 2048,
-      image_inline_max_bytes        => 2048,
-      js_inline_max_bytes           => 2048,
-      css_outline_min_bytes         => 3000,
-      js_outline_min_bytes          => 3000,
-      inode_limit                   => 500000,
-      image_max_rewrites_at_once    => 8,
-      num_rewrite_threads           => 4,
-      num_expensive_rewrite_threads => 4,
-      collect_statistics            => 'on',
-      statistics_logging            => 'on',
-      allow_view_stats              => [],
-      allow_pagespeed_console       => [],
-      allow_pagespeed_message       => [],
-      message_buffer_size           => 100000,
-      additional_configuration      => { }
-    }
-```
-
-Full documentation for mod_pagespeed is available from [Google](http://modpagespeed.com).
-
-####Class: `apache::mod::php`
-
-Installs and configures mod_php. The defaults are OS-dependant.
-
-Overriding the package name:
-```
-  class {'::apache::mod::php':
-    package_name => "php54-php",
-    path         => "${::apache::params::lib_path}/libphp54-php5.so",
-  }
-```
-
-Overriding the default configuartion:
-```puppet
-  class {'::apache::mod::php':
-    source => 'puppet:///modules/apache/my_php.conf',
-  }
-```
-
-or 
-```puppet
-  class {'::apache::mod::php':
-    template => 'apache/php.conf.erb',
-  }
-```
-
-or
-
-```puppet
-  class {'::apache::mod::php':
-    content => '
-AddHandler php5-script .php
-AddType text/html .php',
-  }
-```
-####Class: `apache::mod::ssl`
-
-Installs Apache SSL capabilities and uses the ssl.conf.erb template. These are the defaults:
-
-```puppet
-    class { 'apache::mod::ssl':
-      ssl_compression => false,
-      ssl_options     => [ 'StdEnvVars' ],
-  }
-```
-
-To *use* SSL with a virtual host, you must either set the`default_ssl_vhost` parameter in `::apache` to 'true' or set the `ssl` parameter in `apache::vhost` to 'true'.
-
-####Class: `apache::mod::wsgi`
-
-Enables Python support in the WSGI module. To use, simply `include 'apache::mod::wsgi'`. 
-
-For customized parameters, which tell Apache how Python is currently configured on the operating system,
-
-```puppet
-    class { 'apache::mod::wsgi':
-      wsgi_socket_prefix => "\${APACHE_RUN_DIR}WSGI",
-      wsgi_python_home   => '/path/to/venv',
-      wsgi_python_path   => '/path/to/venv/site-packages',
-    }
-```
-
-More information about [WSGI](http://modwsgi.readthedocs.org/en/latest/).
-
-####Class: `apache::mod::fcgid`
-
-Installs and configures mod_fcgid.
-
-The class makes no effort to list all available options, but rather uses an options hash to allow for ultimate flexibility:
-
-```puppet
-    class { 'apache::mod::fcgid':
-      options => {
-        'FcgidIPCDir'  => '/var/run/fcgidsock',
-        'SharememPath' => '/var/run/fcgid_shm',
-        'AddHandler'   => 'fcgid-script .fcgi',
-      },
-    }
-```
-
-For a full list op options, see the [official mod_fcgid documentation](https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html).
-
-It is also possible to set the FcgidWrapper per directory per vhost. You must ensure the fcgid module is loaded because there is no auto loading.
-
-```puppet
-    include apache::mod::fcgid
-    apache::vhost { 'example.org':
-      docroot     => '/var/www/html',
-      directories => {
-        path        => '/var/www/html',
-        fcgiwrapper => {
-          command => '/usr/local/bin/fcgiwrapper',
-        }
-      },
-    }
-```
-
-See [FcgidWrapper documentation](https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidwrapper) for more information.
-
-####Defined Type: `apache::vhost`
-
-The Apache module allows a lot of flexibility in the setup and configuration of virtual hosts. This flexibility is due, in part, to `vhost`'s being a defined resource type, which allows it to be evaluated multiple times with different parameters.
-
-The `vhost` defined type allows you to have specialized configurations for virtual hosts that have requirements outside the defaults. You can set up a default vhost within the base `::apache` class, as well as set a customized vhost as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).
-
-If you have a series of specific configurations and do not want a base `::apache` class default vhost, make sure to set the base class `default_vhost` to 'false'.
-
-```puppet
-    class { 'apache':
-      default_vhost => false,
-    }
-```
-
-**Parameters within `apache::vhost`:**
-
-#####`access_log`
-
-Specifies whether `*_access.log` directives (`*_file`,`*_pipe`, or `*_syslog`) should be configured. Setting the value to 'false' will choose none. Defaults to 'true'. 
-
-#####`access_log_file`
-
-Sets the `*_access.log` filename that is placed in `$logroot`. Given a vhost, example.com, it defaults to 'example.com_ssl.log' for SSL vhosts and 'example.com_access.log' for non-SSL vhosts.
-
-#####`access_log_pipe`
-
-Specifies a pipe to send access log messages to. Defaults to 'undef'.
-
-#####`access_log_syslog`
-
-Sends all access log messages to syslog. Defaults to 'undef'.
-
-#####`access_log_format`
-
-Specifies the use of either a LogFormat nickname or a custom format string for the access log. Defaults to 'combined'. See [these examples](http://httpd.apache.org/docs/current/mod/mod_log_config.html).
-
-#####`access_log_env_var`
-
-Specifies that only requests with particular environment variables be logged. Defaults to 'undef'.
-
-#####`add_listen`
-
-Determines whether the vhost creates a Listen statement. The default value is 'true'.
-
-Setting `add_listen` to 'false' stops the vhost from creating a Listen statement, and this is important when you combine vhosts that are not passed an `ip` parameter with vhosts that *are* passed the `ip` parameter.
-
-#####`additional_includes`
-
-Specifies paths to additional static, vhost-specific Apache configuration files. Useful for implementing a unique, custom configuration not supported by this module. Can be an array. Defaults to '[]'.
-
-#####`aliases`
-
-Passes a list of hashes to the vhost to create Alias or AliasMatch directives as per the [mod_alias documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html). These hashes are formatted as follows:
-
-```puppet
-aliases => [
-  { aliasmatch => '^/image/(.*)\.jpg$', 
-    path       => '/files/jpg.images/$1.jpg',
-  }
-  { alias      => '/image',
-    path       => '/ftp/pub/image', 
-  },
-],
-```
-
-For `alias` and `aliasmatch` to work, each will need a corresponding context, such as '< Directory /path/to/directory>' or ''. The Alias and AliasMatch directives are created in the order specified in the `aliases` parameter. As described in the [`mod_alias` documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html), more specific `alias` or `aliasmatch` parameters should come before the more general ones to avoid shadowing.
-
-*Note:* If `apache::mod::passenger` is loaded and `PassengerHighPerformance => true` is set, then Alias may have issues honoring the `PassengerEnabled => off` statement. See [this article](http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html) for details.
-
-#####`block`
-
-Specifies the list of things Apache will block access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories.
-
-#####`custom_fragment`
-
-Passes a string of custom configuration directives to be placed at the end of the vhost configuration. Defaults to 'undef'.
-
-#####`default_vhost`
-
-Sets a given `apache::vhost` as the default to serve requests that do not match any other `apache::vhost` definitions. The default value is 'false'.
-
-#####`directories`
-
-See the [`directories` section](#parameter-directories-for-apachevhost).
-
-#####`directoryindex`
-
-Sets the list of resources to look for when a client requests an index of the directory by specifying a '/' at the end of the directory name. [DirectoryIndex](http://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex) has more information. Defaults to 'undef'.
-
-#####`docroot`
-
-Provides the [DocumentRoot](http://httpd.apache.org/docs/current/mod/core.html#documentroot) directive, which identifies the directory Apache serves files from. Required. 
-
-#####`docroot_group`
-
-Sets group access to the docroot directory. Defaults to 'root'.
-
-#####`docroot_owner`
-
-Sets individual user access to the docroot directory. Defaults to 'root'.
-
-#####`docroot_mode`
-
-Sets access permissions of the docroot directory. Defaults to 'undef'.
-
-#####`error_log`
-
-Specifies whether `*_error.log` directives should be configured. Defaults to 'true'.
-
-#####`error_log_file`
-
-Points to the `*_error.log` file. Given a vhost, example.com, it defaults to 'example.com_ssl_error.log' for SSL vhosts and 'example.com_access_error.log' for non-SSL vhosts.
-
-#####`error_log_pipe`
-
-Specifies a pipe to send error log messages to. Defaults to 'undef'.
-
-#####`error_log_syslog`
-
-Sends all error log messages to syslog. Defaults to 'undef'.
-
-#####`error_documents`
-
-A list of hashes which can be used to override the [ErrorDocument](https://httpd.apache.org/docs/current/mod/core.html#errordocument) settings for this vhost. Defaults to '[]'. Example:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      error_documents => [
-        { 'error_code' => '503', 'document' => '/service-unavail' },
-        { 'error_code' => '407', 'document' => 'https://example.com/proxy/login' },
-      ],
-    }
-```
-
-#####`ensure`
-
-Specifies if the vhost file is present or absent. Defaults to 'present'.
-
-#####`fallbackresource`
-
-Sets the [FallbackResource](http://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource) directive, which specifies an action to take for any URL that doesn't map to anything in your filesystem and would otherwise return 'HTTP 404 (Not Found)'. Valid values must either begin with a / or be 'disabled'. Defaults to 'undef'.
-
-#####`headers`
-
-Adds lines to replace, merge, or remove response headers. See [Header](http://httpd.apache.org/docs/current/mod/mod_headers.html#header) for more information. Can be an array. Defaults to 'undef'.
-
-#####`ip`
-
-Sets the IP address the vhost listens on. Defaults to listen on all IPs.
-
-#####`ip_based`
-
-Enables an [IP-based](http://httpd.apache.org/docs/current/vhosts/ip-based.html) vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.
-
-#####`itk`
-
-Configures [ITK](http://mpm-itk.sesse.net/) in a hash. Keys may be:
-
-* user + group
-* `assignuseridexpr`
-* `assigngroupidexpr`
-* `maxclientvhost`
-* `nice`
-* `limituidrange` (Linux 3.5.0 or newer)
-* `limitgidrange` (Linux 3.5.0 or newer)
-
-Usage will typically look like:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot => '/path/to/directory',
-      itk     => {
-        user  => 'someuser',
-        group => 'somegroup',
-      },
-    }
-```
-
-#####`logroot`
-
-Specifies the location of the virtual host's logfiles. Defaults to '/var/log//'.
-
-#####`log_level`
-
-Specifies the verbosity of the error log. Defaults to 'warn' for the global server configuration and can be overridden on a per-vhost basis. Valid values are 'emerg', 'alert', 'crit', 'error', 'warn', 'notice', 'info' or 'debug'.
-
-#####`no_proxy_uris`
-
-Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with [`proxy_dest`](#proxy_dest).
-
-#####`proxy_preserve_host`
-
-Sets the [ProxyPreserveHost Directive](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost).  true Enables the Host: line from an incoming request to be proxied to the host instead of hostname .  false sets this option to off (default).
-
-#####`options`
-
-Sets the [Options](http://httpd.apache.org/docs/current/mod/core.html#options) for the specified virtual host. Defaults to '['Indexes','FollowSymLinks','MultiViews']', as demonstrated below:
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      options => ['Indexes','FollowSymLinks','MultiViews'],
-    }
-```
-
-*Note:* If you use [`directories`](#parameter-directories-for-apachevhost), 'Options', 'Override', and 'DirectoryIndex' are ignored because they are parameters within `directories`.
-
-#####`override`
-
-Sets the overrides for the specified virtual host. Accepts an array of [AllowOverride](http://httpd.apache.org/docs/current/mod/core.html#allowoverride) arguments. Defaults to '[none]'.
-
-#####`php_admin_flags & values`
-
-Allows per-vhost setting [`php_admin_value`s or `php_admin_flag`s](http://php.net/manual/en/configuration.changes.php). These flags or values cannot be overwritten by a user or an application. Defaults to '[]'.
-
-#####`port`
-
-Sets the port the host is configured on. The module's defaults ensure the host listens on port 80 for non-SSL vhosts and port 443 for SSL vhosts. The host will only listen on the port set in this parameter. 
-
-#####`priority`
-
-Sets the relative load-order for Apache HTTPD VirtualHost configuration files. Defaults to '25'.
-
-If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.
-
-*Note:* You should not need to use this parameter. However, if you do use it, be aware that the `default_vhost` parameter for `apache::vhost` passes a priority of '15'.
-
-#####`proxy_dest`
-
-Specifies the destination address of a [ProxyPass](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass) configuration. Defaults to 'undef'.
-
-#####`proxy_pass`
-
-Specifies an array of `path => URI` for a [ProxyPass](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass) configuration. Defaults to 'undef'.
-
-```puppet
-apache::vhost { 'site.name.fdqn':
-  … 
-  proxy_pass => [
-    { 'path' => '/a', 'url' => 'http://backend-a/' },
-    { 'path' => '/b', 'url' => 'http://backend-b/' },
-    { 'path' => '/c', 'url' => 'http://backend-a/c' },
-  ],
-}
-```
-
-#####`rack_base_uris`
-
-Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for [Phusion Passenger](http://www.modrails.com/documentation/Users%20guide%20Apache.html#_railsbaseuri_and_rackbaseuri) in the _rack.erb template. Defaults to 'undef'.
-
-#####`redirect_dest`
-
-Specifies the address to redirect to. Defaults to 'undef'.
-
-#####`redirect_source`
-
-Specifies the source URIs that will redirect to the destination specified in `redirect_dest`. If more than one item for redirect is supplied, the source and destination must be the same length and the items will be order-dependent. 
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      redirect_source => ['/images','/downloads'],
-      redirect_dest   => ['http://img.example.com/','http://downloads.example.com/'],
-    }
-```
-
-#####`redirect_status`
-
-Specifies the status to append to the redirect. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      redirect_status => ['temp','permanent'],
-    }
-```
-
-#####`redirectmatch_regexp` & `redirectmatch_status`
-
-Determines which server status should be raised for a given regular expression. Entered as an array. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      redirectmatch_status => ['404','404'],
-      redirectmatch_regexp => ['\.git(/.*|$)/','\.svn(/.*|$)'],
-    }
-```
-
-#####`request_headers`
-
-Modifies collected [request headers](http://httpd.apache.org/docs/current/mod/mod_headers.html#requestheader) in various ways, including adding additional request headers, removing request headers, etc. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      request_headers => [
-        'append MirrorID "mirror 12"',
-        'unset MirrorID',
-      ],
-    }
-```
-
-#####`rewrites`
-
-Creates URL rewrite rules. Expects an array of hashes, and the hash keys can be any of 'comment', 'rewrite_base', 'rewrite_cond', or 'rewrite_rule'. Defaults to 'undef'. 
-
-For example, you can specify that anyone trying to access index.html will be served welcome.html
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      rewrites => [ { rewrite_rule => ['^index\.html$ welcome.html'] } ]
-    }
-```
-
-The parameter allows rewrite conditions that, when true, will execute the associated rule. For instance, if you wanted to rewrite URLs only if the visitor is using IE
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      rewrites => [
-        {
-          comment      => 'redirect IE',
-          rewrite_cond => ['%{HTTP_USER_AGENT} ^MSIE'],
-          rewrite_rule => ['^index\.html$ welcome.html'],
-        },
-      ],
-    }
-```
-
-You can also apply multiple conditions. For instance, rewrite index.html to welcome.html only when the browser is Lynx or Mozilla (version 1 or 2)
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      rewrites => [
-        {
-          comment      => 'Lynx or Mozilla v1/2',
-          rewrite_cond => ['%{HTTP_USER_AGENT} ^Lynx/ [OR]', '%{HTTP_USER_AGENT} ^Mozilla/[12]'],
-          rewrite_rule => ['^index\.html$ welcome.html'],
-        },
-      ],
-    }
-```
-
-Multiple rewrites and conditions are also possible
-
-```puppet
-    apache::vhost { 'site.name.fdqn':
-      …
-      rewrites => [
-        {
-          comment      => 'Lynx or Mozilla v1/2',
-          rewrite_cond => ['%{HTTP_USER_AGENT} ^Lynx/ [OR]', '%{HTTP_USER_AGENT} ^Mozilla/[12]'],
-          rewrite_rule => ['^index\.html$ welcome.html'],
-        },
-        {
-          comment      => 'Internet Explorer',
-          rewrite_cond => ['%{HTTP_USER_AGENT} ^MSIE'],
-          rewrite_rule => ['^index\.html$ /index.IE.html [L]'],
-        },
-        {
-          rewrite_base => /apps/,
-          rewrite_rule => ['^index\.cgi$ index.php', '^index\.html$ index.php', '^index\.asp$ index.html'],
-        },
-     ], 
-    }
-```
-
-Refer to the [`mod_rewrite` documentation](http://httpd.apache.org/docs/current/mod/mod_rewrite.html) for more details on what is possible with rewrite rules and conditions.
-
-#####`scriptalias`
-
-Defines a directory of CGI scripts to be aliased to the path '/cgi-bin', for example: '/usr/scripts'. Defaults to 'undef'.
-
-#####`scriptaliases`
-
-Passes an array of hashes to the vhost to create either ScriptAlias or ScriptAliasMatch statements as per the [`mod_alias` documentation](http://httpd.apache.org/docs/current/mod/mod_alias.html). These hashes are formatted as follows:
-
-```puppet
-    scriptaliases => [
-      {
-        alias => '/myscript',
-        path  => '/usr/share/myscript',
-      },
-      {
-        aliasmatch => '^/foo(.*)',
-        path       => '/usr/share/fooscripts$1',
-      },
-      {
-        aliasmatch => '^/bar/(.*)',
-        path       => '/usr/share/bar/wrapper.sh/$1',
-      },
-      {
-        alias => '/neatscript',
-        path  => '/usr/share/neatscript',
-      },
-    ]
-```
-
-The ScriptAlias and ScriptAliasMatch directives are created in the order specified. As with [Alias and AliasMatch](#aliases) directives, more specific aliases should come before more general ones to avoid shadowing.
-
-#####`serveradmin`
-
-Specifies the email address Apache will display when it renders one of its error pages. Defaults to 'undef'.
-
-#####`serveraliases`
-
-Sets the [ServerAliases](http://httpd.apache.org/docs/current/mod/core.html#serveralias) of the site. Defaults to '[]'.
-
-#####`servername`
-
-Sets the servername corresponding to the hostname you connect to the virtual host at. Defaults to the title of the resource.
-
-#####`setenv`
-
-Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.
-
-#####`setenvif`
-
-Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.
-
-#####`suphp_addhandler`, `suphp_configpath`, & `suphp_engine`
-
-Set up a virtual host with [suPHP](http://suphp.org/DocumentationView.html?file=apache/CONFIG). 
-
-`suphp_addhandler` defaults to 'php5-script' on RedHat and FreeBSD, and 'x-httpd-php' on Debian.
-
-`suphp_configpath` defaults to 'undef' on RedHat and FreeBSD, and '/etc/php5/apache2' on Debian.
-
-`suphp_engine` allows values 'on' or 'off'. Defaults to 'off'
-
-To set up a virtual host with suPHP
-
-```puppet
-    apache::vhost { 'suphp.example.com':
-      port                => '80',
-      docroot             => '/home/appuser/myphpapp',
-      suphp_addhandler    => 'x-httpd-php',
-      suphp_engine        => 'on',
-      suphp_configpath    => '/etc/php5/apache2',
-      directories         => { path => '/home/appuser/myphpapp',
-        'suphp'           => { user => 'myappuser', group => 'myappgroup' },
-      }
-    }
-```
-
-#####`vhost_name`
-
-Enables name-based virtual hosting. If no IP is passed to the virtual host but the vhost is assigned a port, then the vhost name will be 'vhost_name:port'. If the virtual host has no assigned IP or port, the vhost name will be set to the title of the resource. Defaults to '*'.
-
-#####`virtual_docroot` 
-
-Sets up a virtual host with a wildcard alias subdomain mapped to a directory with the same name. For example, 'http://example.com' would map to '/var/www/example.com'. Defaults to 'false'. 
-
-```puppet
-    apache::vhost { 'subdomain.loc':
-      vhost_name       => '*',
-      port             => '80',
-      virtual_docroot' => '/var/www/%-2+',
-      docroot          => '/var/www',
-      serveraliases    => ['*.loc',],
-    }
-```
-
-#####`wsgi_daemon_process`, `wsgi_daemon_process_options`, `wsgi_process_group`, `wsgi_script_aliases`, & `wsgi_pass_authorization`
-
-Set up a virtual host with [WSGI](https://code.google.com/p/modwsgi/).
-
-`wsgi_daemon_process` sets the name of the WSGI daemon. It is a hash, accepting [these keys](http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIDaemonProcess.html), and it defaults to 'undef'.
-
-`wsgi_daemon_process_options` is optional and defaults to 'undef'.
-
-`wsgi_process_group` sets the group ID the virtual host will run under. Defaults to 'undef'.
-
-`wsgi_script_aliases` requires a hash of web paths to filesystem .wsgi paths. Defaults to 'undef'.
-
-`wsgi_pass_authorization` the WSGI application handles authorisation instead of Apache when set to 'On'. For more information see [here] (http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIPassAuthorization.html).  Defaults to 'undef' where apache will set the defaults setting to 'Off'.
-
-To set up a virtual host with WSGI
-
-```puppet
-    apache::vhost { 'wsgi.example.com':
-      port                        => '80',
-      docroot                     => '/var/www/pythonapp',
-      wsgi_daemon_process         => 'wsgi',
-      wsgi_daemon_process_options =>
-        { processes    => '2', 
-          threads      => '15', 
-          display-name => '%{GROUP}',
-         },
-      wsgi_process_group          => 'wsgi',
-      wsgi_script_aliases         => { '/' => '/var/www/demo.wsgi' },
-    }
-```
-
-####Parameter `directories` for `apache::vhost`
-
-The `directories` parameter within the `apache::vhost` class passes an array of hashes to the vhost to create [Directory](http://httpd.apache.org/docs/current/mod/core.html#directory), [File](http://httpd.apache.org/docs/current/mod/core.html#files), and [Location](http://httpd.apache.org/docs/current/mod/core.html#location) directive blocks. These blocks take the form, '< Directory /path/to/directory>...< /Directory>'.
-
-Each hash passed to `directories` must contain `path` as one of the keys.  You may also pass in `provider` which, if missing, defaults to 'directory'. (A full list of acceptable keys is below.) General usage will look something like
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [
-        { path => '/path/to/directory',  =>  },
-        { path => '/path/to/another/directory',  =>  },
-      ],
-    }
-```
-
-*Note:* At least one directory should match the `docroot` parameter. Once you start declaring directories, `apache::vhost` assumes that all required Directory blocks will be declared. If not defined, a single default Directory block will be created that matches the `docroot` parameter.
-
-The `provider` key can be set to 'directory', 'files', or 'location'. If the path starts with a [~](https://httpd.apache.org/docs/current/mod/core.html#files), HTTPD will interpret this as the equivalent of DirectoryMatch, FilesMatch, or LocationMatch.
-
-```puppet
-    apache::vhost { 'files.example.net':
-      docroot     => '/var/www/files',
-      directories => [
-        { 'path'     => '/var/www/files', 
-          'provider' => 'files', 
-          'deny'     => 'from all' 
-         },
-      ],
-    }
-```
-
-Available handlers, represented as keys, should be placed within the  `directory`,`'files`, or `location` hashes.  This looks like
-
-```puppet
-  apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ { path => '/path/to/directory', handler => value } ],
-}
-```
-
-Any handlers you do not set in these hashes will be considered 'undefined' within Puppet and will not be added to the virtual host, resulting in the module using their default values. Currently this is the list of supported handlers:
-
-######`addhandlers`
-
-Sets [AddHandler](http://httpd.apache.org/docs/current/mod/mod_mime.html#addhandler) directives, which map filename extensions to the specified handler. Accepts a list of hashes, with `extensions` serving to list the extensions being managed by the handler, and takes the form: `{ handler => 'handler-name', extensions => ['extension']}`. 
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path        => '/path/to/directory',
-          addhandlers => [{ handler => 'cgi-script', extensions => ['.cgi']}],
-        }, 
-      ],
-    }
-```
-
-######`allow`
-
-Sets an [Allow](http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow) directive, which groups authorizations based on hostnames or IPs. **Deprecated:** This parameter is being deprecated due to a change in Apache. It will only work with Apache 2.2 and lower. You can use it as a single string for one rule or as an array for more than one.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path  => '/path/to/directory', 
-          allow => 'from example.org', 
-        }, 
-      ],
-    }
-```
-
-######`allow_override`
-
-Sets the types of directives allowed in [.htaccess](http://httpd.apache.org/docs/current/mod/core.html#allowoverride) files. Accepts an array.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot      => '/path/to/directory',
-      directories  => [ 
-        { path           => '/path/to/directory', 
-          allow_override => ['AuthConfig', 'Indexes'], 
-        }, 
-      ],
-    }
-```
-
-######`auth_basic_authoritative`
-
-Sets the value for [AuthBasicAuthoritative](https://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicauthoritative), which determines whether authorization and authentication are passed to lower level Apache modules.
-
-######`auth_basic_fake`
-
-Sets the value for [AuthBasicFake](http://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicfake), which statically configures authorization credentials for a given directive block.
-
-######`auth_basic_provider`
-
-Sets the value for [AuthBasicProvider] (http://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicprovider), which sets the authentication provider for a given location.
-
-######`auth_digest_algorithm`
-
-Sets the value for [AuthDigestAlgorithm](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestalgorithm), which selects the algorithm used to calculate the challenge and response hashes.
-
-######`auth_digest_domain`
-
-Sets the value for [AuthDigestDomain](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestdomain), which allows you to specify one or more URIs in the same protection space for digest authentication.
-
-######`auth_digest_nonce_lifetime`
-
-Sets the value for [AuthDigestNonceLifetime](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestnoncelifetime), which controls how long the server nonce is valid.
-
-######`auth_digest_provider`
-
-Sets the value for [AuthDigestProvider](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestprovider), which sets the authentication provider for a given location.
-
-######`auth_digest_qop`
-
-Sets the value for [AuthDigestQop](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestqop), which determines the quality-of-protection to use in digest authentication.
-
-######`auth_digest_shmem_size`
-
-Sets the value for [AuthAuthDigestShmemSize](http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestshmemsize), which defines the amount of shared memory allocated to the server for keeping track of clients.
-
-######`auth_group_file`
-
-Sets the value for [AuthGroupFile](https://httpd.apache.org/docs/current/mod/mod_authz_groupfile.html#authgroupfile), which sets the name of the text file containing the list of user groups for authorization.
-
-######`auth_name`
-
-Sets the value for [AuthName](http://httpd.apache.org/docs/current/mod/mod_authn_core.html#authname), which sets the name of the authorization realm.
-
-######`auth_require`
-
-Sets the entity name you're requiring to allow access. Read more about [Require](http://httpd.apache.org/docs/current/mod/mod_authz_host.html#requiredirectives).
-
-######`auth_type`
-
-Sets the value for [AuthType](http://httpd.apache.org/docs/current/mod/mod_authn_core.html#authtype), which guides the type of user authentication.
-
-######`auth_user_file`
-
-Sets the value for [AuthUserFile](http://httpd.apache.org/docs/current/mod/mod_authn_file.html#authuserfile), which sets the name of the text file containing the users/passwords for authentication.
-
-######`custom_fragment`
-
-Pass a string of custom configuration directives to be placed at the end of the directory configuration.
-
-```puppet
-  apache::vhost { 'monitor':
-    … 
-    custom_fragment => '
-  
-    SetHandler balancer-manager
-    Order allow,deny
-    Allow from all
-  
-  
-    SetHandler server-status
-    Order allow,deny
-    Allow from all
-  
-  ProxyStatus On',
-}
-```
-
-######`deny`
-
-Sets a [Deny](http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny) directive, specifying which hosts are denied access to the server. **Deprecated:** This parameter is being deprecated due to a change in Apache. It will only work with Apache 2.2 and lower. 
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path => '/path/to/directory', 
-          deny => 'from example.org', 
-        }, 
-      ],
-    }
-```
-
-######`error_documents`
-
-An array of hashes used to override the [ErrorDocument](https://httpd.apache.org/docs/current/mod/core.html#errordocument) settings for the directory. 
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      directories => [ 
-        { path            => '/srv/www',
-          error_documents => [
-            { 'error_code' => '503', 
-              'document'   => '/service-unavail',
-            },
-          ],
-        },
-      ],
-    }
-```
-
-######`headers`
-
-Adds lines for [Header](http://httpd.apache.org/docs/current/mod/mod_headers.html#header) directives.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => {
-        path    => '/path/to/directory',
-        headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"',
-      },
-    }
-```
-
-######`index_options`
-
-Allows configuration settings for [directory indexing](http://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexoptions).
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path          => '/path/to/directory', 
-          options       => ['Indexes','FollowSymLinks','MultiViews'], 
-          index_options => ['IgnoreCase', 'FancyIndexing', 'FoldersFirst', 'NameWidth=*', 'DescriptionWidth=*', 'SuppressHTMLPreamble'],
-        },
-      ],
-    }
-```
-
-######`index_order_default`
-
-Sets the [default ordering](http://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexorderdefault) of the directory index.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path                => '/path/to/directory', 
-          order               => 'Allow,Deny', 
-          index_order_default => ['Descending', 'Date'],
-        }, 
-      ],
-    }
-```
-
-######`options`
-
-Lists the [Options](http://httpd.apache.org/docs/current/mod/core.html#options) for the given Directory block.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path    => '/path/to/directory', 
-          options => ['Indexes','FollowSymLinks','MultiViews'], 
-        },
-      ],
-    }
-```
-
-######`order`
-
-Sets the order of processing Allow and Deny statements as per [Apache core documentation](httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order). **Deprecated:** This parameter is being deprecated due to a change in Apache. It will only work with Apache 2.2 and lower.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path  => '/path/to/directory', 
-          order => 'Allow,Deny', 
-        },
-      ],
-    }
-```
-
-######`sethandler`
-
-Sets a `SetHandler` directive as per the [Apache Core documentation](http://httpd.apache.org/docs/2.2/mod/core.html#sethandler). An example:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path       => '/path/to/directory', 
-          sethandler => 'None', 
-        }
-      ],
-    }
-```
-
-######`passenger_enabled`
-
-Sets the value for the [PassengerEnabled](http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled) directory to 'on' or 'off'. Requires `apache::mod::passenger` to be included.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      docroot     => '/path/to/directory',
-      directories => [ 
-        { path              => '/path/to/directory', 
-          passenger_enabled => 'on',
-        }, 
-      ],
-    }
-```
-
-*Note:* Be aware that there is an [issue](http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html) using the PassengerEnabled directive with the PassengerHighPerformance directive.
-
-######`php_admin_value` and `php_admin_flag`
-
-`php_admin_value` sets the value of the directory, and `php_admin_flag` uses a boolean to configure the directory. Further information can be found [here](http://php.net/manual/en/configuration.changes.php).
-
-######`ssl_options`
-
-String or list of [SSLOptions](https://httpd.apache.org/docs/current/mod/mod_ssl.html#ssloptions), which configure SSL engine run-time options. This handler takes precedence over SSLOptions set in the parent block of the vhost.
-
-```puppet
-    apache::vhost { 'secure.example.net':
-      docroot     => '/path/to/directory',
-      directories => [
-        { path        => '/path/to/directory', 
-          ssl_options => '+ExportCertData', 
-        },
-        { path        => '/path/to/different/dir', 
-          ssl_options => [ '-StdEnvVars', '+ExportCertData'],
-        },
-      ],
-    }
-```
-
-######`suphp`
-
-A hash containing the 'user' and 'group' keys for the [suPHP_UserGroup](http://www.suphp.org/DocumentationView.html?file=apache/CONFIG) setting. It must be used with `suphp_engine => on` in the vhost declaration, and may only be passed within `directories`.
-
-```puppet
-    apache::vhost { 'secure.example.net':
-      docroot     => '/path/to/directory',
-      directories => [
-        { path  => '/path/to/directory', 
-          suphp => 
-            { user  =>  'myappuser', 
-              group => 'myappgroup', 
-            },
-        },
-      ],
-    }
-```
-
-####SSL parameters for `apache::vhost`
-
-All of the SSL parameters for `::vhost` will default to whatever is set in the base `apache` class. Use the below parameters to tweak individual SSL settings for specific vhosts.
-
-#####`ssl`
-
-Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'. Defaults to 'false'. 
-
-#####`ssl_ca`
-
-Specifies the SSL certificate authority. Defaults to 'undef'.
-
-#####`ssl_cert`
-
-Specifies the SSL certification. Defaults are based on your OS: '/etc/pki/tls/certs/localhost.crt' for RedHat, '/etc/ssl/certs/ssl-cert-snakeoil.pem' for Debian, and '/usr/local/etc/apache22/server.crt' for FreeBSD.
-
-#####`ssl_protocol`
-
-Specifies [SSLProtocol](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslprotocol). Defaults to 'undef'. 
-
-If you do not use this parameter, it will use the HTTPD default from ssl.conf.erb, 'all -SSLv2'.
-
-#####`ssl_cipher`
-
-Specifies [SSLCipherSuite](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslciphersuite). Defaults to 'undef'.
-
-If you do not use this parameter, it will use the HTTPD default from ssl.conf.erb, 'HIGH:MEDIUM:!aNULL:!MD5'.
-
-#####`ssl_honorcipherorder`
-
-Sets [SSLHonorCipherOrder](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslhonorcipherorder), which is used to prefer the server's cipher preference order. Defaults to 'On' in the base `apache` config.
-
-#####`ssl_certs_dir`
-
-Specifies the location of the SSL certification directory. Defaults to '/etc/ssl/certs' on Debian, '/etc/pki/tls/certs' on RedHat, and '/usr/local/etc/apache22' on FreeBSD.
-
-#####`ssl_chain`
-
-Specifies the SSL chain. Defaults to 'undef'. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
-
-#####`ssl_crl`
-
-Specifies the certificate revocation list to use. Defaults to 'undef'. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
-
-#####`ssl_crl_path`
-
-Specifies the location of the certificate revocation list. Defaults to 'undef'. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
-
-#####`ssl_key`
-
-Specifies the SSL key. Defaults are based on your operating system: '/etc/pki/tls/private/localhost.key' for RedHat, '/etc/ssl/private/ssl-cert-snakeoil.key' for Debian, and '/usr/local/etc/apache22/server.key' for FreeBSD. (This default will work out of the box but must be updated in the base `apache` class with your specific certificate information before being used in production.)
-
-#####`ssl_verify_client`
-
-Sets the [SSLVerifyClient](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslverifyclient) directive, which sets the certificate verification level for client authentication. Valid values are: 'none', 'optional', 'require', and 'optional_no_ca'. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      …
-      ssl_verify_client => 'optional',
-    }
-```
-
-#####`ssl_verify_depth`
-
-Sets the [SSLVerifyDepth](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslverifydepth) directive, which specifies the maximum depth of CA certificates in client certificate verification. Defaults to 'undef'.
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      …
-      ssl_verify_depth => 1,
-    }
-```
-
-#####`ssl_options`
-
-Sets the [SSLOptions](http://httpd.apache.org/docs/current/mod/mod_ssl.html#ssloptions) directive, which configures various SSL engine run-time options. This is the global setting for the given vhost and can be a string or an array. Defaults to 'undef'. 
-
-A string:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      …
-      ssl_options => '+ExportCertData',
-    }
-```
-
-An array:
-
-```puppet
-    apache::vhost { 'sample.example.net':
-      …
-      ssl_options => [ '+StrictRequire', '+ExportCertData' ],
-    }
-```
-
-#####`ssl_proxyengine`
-
-Specifies whether or not to use [SSLProxyEngine](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxyengine). Valid values are 'true' and 'false'. Defaults to 'false'.
-
-
-###Virtual Host Examples
-
-The apache module allows you to set up pretty much any configuration of virtual host you might need. This section will address some common configurations, but look at the [Tests section](https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests) for even more examples.
-
-Configure a vhost with a server administrator
-
-```puppet
-    apache::vhost { 'third.example.com':
-      port        => '80',
-      docroot     => '/var/www/third',
-      serveradmin => 'admin@example.com',
-    }
-```
-
-- - -
-
-Set up a vhost with aliased servers
-
-```puppet
-    apache::vhost { 'sixth.example.com':
-      serveraliases => [
-        'sixth.example.org',
-        'sixth.example.net',
-      ],
-      port          => '80',
-      docroot       => '/var/www/fifth',
-    }
-```
-
-- - -
-
-Configure a vhost with a cgi-bin
-
-```puppet
-    apache::vhost { 'eleventh.example.com':
-      port        => '80',
-      docroot     => '/var/www/eleventh',
-      scriptalias => '/usr/lib/cgi-bin',
-    }
-```
-
-- - -
-
-Set up a vhost with a rack configuration
-
-```puppet
-    apache::vhost { 'fifteenth.example.com':
-      port           => '80',
-      docroot        => '/var/www/fifteenth',
-      rack_base_uris => ['/rackapp1', '/rackapp2'],
-    }
-```
-
-- - -
-
-Set up a mix of SSL and non-SSL vhosts at the same domain
-
-```puppet
-    #The non-ssl vhost
-    apache::vhost { 'first.example.com non-ssl':
-      servername => 'first.example.com',
-      port       => '80',
-      docroot    => '/var/www/first',
-    }
-
-    #The SSL vhost at the same domain
-    apache::vhost { 'first.example.com ssl':
-      servername => 'first.example.com',
-      port       => '443',
-      docroot    => '/var/www/first',
-      ssl        => true,
-    }
-```
-
-- - -
-
-Configure a vhost to redirect non-SSL connections to SSL
-
-```puppet
-    apache::vhost { 'sixteenth.example.com non-ssl':
-      servername      => 'sixteenth.example.com',
-      port            => '80',
-      docroot         => '/var/www/sixteenth',
-      redirect_status => 'permanent',
-      redirect_dest   => 'https://sixteenth.example.com/'
-    }
-    apache::vhost { 'sixteenth.example.com ssl':
-      servername => 'sixteenth.example.com',
-      port       => '443',
-      docroot    => '/var/www/sixteenth',
-      ssl        => true,
-    }
-```
-
-- - -
-
-Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.
-
-```puppet
-    apache::listen { '80': }
-    apache::listen { '81': }
-```
-
-Then we will set up the IP-based vhosts
-
-```puppet
-    apache::vhost { 'first.example.com':
-      ip       => '10.0.0.10',
-      docroot  => '/var/www/first',
-      ip_based => true,
-    }
-    apache::vhost { 'second.example.com':
-      ip       => '10.0.0.11',
-      docroot  => '/var/www/second',
-      ip_based => true,
-    }
-```
-
-- - -
-
-Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL
-
-```puppet
-    apache::vhost { 'The first IP-based vhost, non-ssl':
-      servername => 'first.example.com',
-      ip         => '10.0.0.10',
-      port       => '80',
-      ip_based   => true,
-      docroot    => '/var/www/first',
-    }
-    apache::vhost { 'The first IP-based vhost, ssl':
-      servername => 'first.example.com',
-      ip         => '10.0.0.10',
-      port       => '443',
-      ip_based   => true,
-      docroot    => '/var/www/first-ssl',
-      ssl        => true,
-    }
-```
-
-Then, we will add two name-based vhosts listening on 10.0.0.20
-
-```puppet
-    apache::vhost { 'second.example.com':
-      ip      => '10.0.0.20',
-      port    => '80',
-      docroot => '/var/www/second',
-    }
-    apache::vhost { 'third.example.com':
-      ip      => '10.0.0.20',
-      port    => '80',
-      docroot => '/var/www/third',
-    }
-```
-
-If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you **MUST** declare `add_listen => 'false'` to disable the otherwise automatic 'Listen 80', as it will conflict with the preceding IP-based vhosts.
-
-```puppet
-    apache::vhost { 'fourth.example.com':
-      port       => '80',
-      docroot    => '/var/www/fourth',
-      add_listen => false,
-    }
-    apache::vhost { 'fifth.example.com':
-      port       => '80',
-      docroot    => '/var/www/fifth',
-      add_listen => false,
-    }
-```
-
-###Load Balancing
-
-####Defined Type: `apache::balancer`
-
-`apache::balancer` creates an Apache balancer cluster. Each balancer cluster needs one or more balancer members, which are declared with [`apache::balancermember`](#defined-type-apachebalancermember). 
-
-One `apache::balancer` defined resource should be defined for each Apache load balanced set of servers. The `apache::balancermember` resources for all balancer members can be exported and collected on a single Apache load balancer server using exported resources.
-
-**Parameters within `apache::balancer`:**
-
-#####`name`
-
-Sets the balancer cluster's title. This parameter will also set the title of the conf.d file.
-
-#####`proxy_set`
-
-Configures key-value pairs as [ProxySet](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyset) lines. Accepts a hash, and defaults to '{}'.
-
-#####`collect_exported`
-
-Determines whether or not to use exported resources. Valid values 'true' and 'false', defaults to 'true'. 
-
-If you statically declare all of your backend servers, you should set this to 'false' to rely on existing declared balancer member resources. Also make sure to use `apache::balancermember` with array arguments.
-
-If you wish to dynamically declare your backend servers via [exported resources](http://docs.puppetlabs.com/guides/exported_resources.html) collected on a central node, you must set this parameter to 'true' in order to collect the exported balancer member resources that were exported by the balancer member nodes.
-
-If you choose not to use exported resources, all balancer members will be configured in a single puppet run. If you are using exported resources, Puppet has to run on the balanced nodes, then run on the balancer.
-
-####Defined Type: `apache::balancermember`
-
-Defines members of [mod_proxy_balancer](http://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html), which will set up a balancer member inside a listening service configuration block in etc/apache/apache.cfg on the load balancer.
-
-**Parameters within `apache::balancermember`:**
-
-#####`name`
-
-Sets the title of the resource. This name will also set the name of the concat fragment.
-
-#####`balancer_cluster`
-
-Sets the Apache service's instance name. This must match the name of a declared `apache::balancer` resource. Required.
-
-#####`url`
-
-Specifies the URL used to contact the balancer member server. Defaults to 'http://${::fqdn}/'.
-
-#####`options`
-
-An array of [options](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#balancermember) to be specified after the URL. Accepts any key-value pairs available to [ProxyPass](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass).
-
-####Examples
-
-To load balance with exported resources, export the `balancermember` from the balancer member
-
-```puppet
-      @@apache::balancermember { "${::fqdn}-puppet00":
-        balancer_cluster => 'puppet00',
-        url              => "ajp://${::fqdn}:8009"
-        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
-      }
-```
-
-Then, on the proxy server, create the balancer cluster
-
-```puppet
-      apache::balancer { 'puppet00': }
-```
-
-To load balance without exported resources, declare the following on the proxy
-
-```puppet
-    apache::balancer { 'puppet00': }
-    apache::balancermember { "${::fqdn}-puppet00":
-        balancer_cluster => 'puppet00',
-        url              => "ajp://${::fqdn}:8009"
-        options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
-      }
-```
-
-Then declare `apache::balancer` and `apache::balancermember` on the proxy server.
-
-If you need to use ProxySet in the balancer config
-
-```puppet
-      apache::balancer { 'puppet01':
-        proxy_set => {'stickysession' => 'JSESSIONID'},
-      }
-```
-
-##Reference
-
-###Classes
-
-####Public Classes
-
-* [`apache`](#class-apache): Guides the basic setup of Apache.
-* `apache::dev`: Installs Apache development libraries. (*Note:* On FreeBSD, you must declare `apache::package` or `apache` before `apache::dev`.)
-* [`apache::mod::[name]`](#classes-apachemodname): Enables specific Apache HTTPD modules.
- 
-####Private Classes
-
-* `apache::confd::no_accf`: Creates the no-accf.conf configuration file in conf.d, required by FreeBSD's Apache 2.4.
-* `apache::default_confd_files`: Includes conf.d files for FreeBSD.
-* `apache::default_mods`: Installs the Apache modules required to run the default configuration.
-* `apache::package`: Installs and configures basic Apache packages.
-* `apache::params`: Manages Apache parameters.
-* `apache::service`: Manages the Apache daemon.
-
-###Defined Types
-
-####Public Defined Types
-
-* `apache::balancer`: Creates an Apache balancer cluster.
-* `apache::balancermember`: Defines members of [mod_proxy_balancer](http://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html).
-* `apache::listen`: Based on the title, controls which ports Apache binds to for listening. Adds [Listen](http://httpd.apache.org/docs/current/bind.html) directives to ports.conf in the Apache HTTPD configuration directory. Titles take the form '', ':', or ':'.
-* `apache::mod`: Used to enable arbitrary Apache HTTPD modules for which there is no specific `apache::mod::[name]` class.
-* `apache::namevirtualhost`: Enables name-based hosting of a virtual host. Adds all [NameVirtualHost](http://httpd.apache.org/docs/current/vhosts/name-based.html) directives to the `ports.conf` file in the Apache HTTPD configuration directory. Titles take the form '\*', '*:', '\_default_:, '', or ':'.
-* `apache::vhost`: Allows specialized configurations for virtual hosts that have requirements outside the defaults. 
-
-####Private Defined Types
-
-* `apache::peruser::multiplexer`: Enables the [Peruser](http://www.freebsd.org/cgi/url.cgi?ports/www/apache22-peruser-mpm/pkg-descr) module for FreeBSD only.
-* `apache::peruser::processor`: Enables the [Peruser](http://www.freebsd.org/cgi/url.cgi?ports/www/apache22-peruser-mpm/pkg-descr) module for FreeBSD only.
-
-###Templates
-
-The Apache module relies heavily on templates to enable the `vhost` and `apache::mod` defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.
-
-##Limitations
-
-###Ubuntu 10.04
-
-The `apache::vhost::WSGIImportScript` parameter creates a statement inside the VirtualHost which is unsupported on older versions of Apache, causing this to fail.  This will be remedied in a future refactoring.
-
-###RHEL/CentOS 5
-
-The `apache::mod::passenger` and `apache::mod::proxy_html` classes are untested since repositories are missing compatible packages.   
-
-###RHEL/CentOS 7
-
-The `apache::mod::passenger` class is untested as the repository does not have packages for EL7 yet.  The fact that passenger packages aren't available also makes us unable to test the `rack_base_uri` parameter in `apache::vhost`.
-
-###General
-
-This module is CI tested on Centos 5 & 6, Ubuntu 12.04 & 14.04, Debian 7, and RHEL 5, 6 & 7 platforms against both the OSS and Enterprise version of Puppet. 
-
-The module contains support for other distributions and operating systems, such as FreeBSD and Amazon Linux, but is not formally tested on those and regressions may occur.
-
-###SELinux and Custom Paths
-
-If you are running with SELinux in enforcing mode and want to use custom paths for your `logroot`, `mod_dir`, `vhost_dir`, and `docroot`, you will need to manage the context for the files yourself.
-
-Something along the lines of:
-
-```puppet
-        exec { 'set_apache_defaults':
-          command => 'semanage fcontext -a -t httpd_sys_content_t "/custom/path(/.*)?"',
-          path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
-          require => Package['policycoreutils-python'],
-        }
-        package { 'policycoreutils-python': ensure => installed }
-        exec { 'restorecon_apache':
-          command => 'restorecon -Rv /apache_spec',
-          path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
-          before  => Service['httpd'],
-          require => Class['apache'],
-        }
-        class { 'apache': }
-        host { 'test.server': ip => '127.0.0.1' }
-        file { '/custom/path': ensure => directory, }
-        file { '/custom/path/include': ensure => present, content => '#additional_includes' }
-        apache::vhost { 'test.server':
-          docroot             => '/custom/path',
-          additional_includes => '/custom/path/include',
-        }
-```
-
-You need to set the contexts using `semanage fcontext` not `chcon` because `file {...}` resources will reset the context to the values in the database if the resource isn't specifying the context.
-
-##Development
-
-###Contributing
-
-Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
-
-We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
-
-You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing)
-
-###Running tests
-
-This project contains tests for both [rspec-puppet](http://rspec-puppet.com/) and [beaker-rspec](https://github.com/puppetlabs/beaker-rspec) to verify functionality. For in-depth information please see their respective documentation.
-
-Quickstart:
-
-    gem install bundler
-    bundle install
-    bundle exec rake spec
-    bundle exec rspec spec/acceptance
-    RS_DEBUG=yes bundle exec rspec spec/acceptance
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/README.passenger.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/README.passenger.md
deleted file mode 100644
index 4b4caa8c09..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/README.passenger.md
+++ /dev/null
@@ -1,278 +0,0 @@
-# Passenger
-
-Just enabling the Passenger module is insufficient for the use of Passenger in
-production. Passenger should be tunable to better fit the environment in which
-it is run while being aware of the resources it required.
-
-To this end the Apache passenger module has been modified to apply system wide
-Passenger tuning declarations to `passenger.conf`. Declarations specific to a
-virtual host should be passed through when defining a `vhost` (e.g.
-`rack_base_uris` parameter on the `apache::vhost` type, check `README.md`).
-
-Also, general apache module loading parameters can be supplied to enable using
-a customized passenger module in place of a default-package-based version of
-the module.
-
-# Operating system support and Passenger versions
-
-The most important configuration directive for the Apache Passenger module is
-`PassengerRoot`. Its value depends on the Passenger version used (2.x, 3.x or
-4.x) and on the operating system package from which the Apache Passenger module
-is installed.
-
-The following table summarises the current *default versions* and
-`PassengerRoot` settings for the operating systems supported by
-puppetlabs-apache:
-
-OS               | Passenger version  | `PassengerRoot` 
----------------- | ------------------ | ----------------
-Debian 7         | 3.0.13             | /usr
-Ubuntu 12.04     | 2.2.11             | /usr
-Ubuntu 14.04     | 4.0.37             | /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini 
-RHEL with EPEL6  | 3.0.21             | /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21 
-
-As mentioned in `README.md` there are no compatible packages available for
-RHEL/CentOS 5 or RHEL/CentOS 7.
-
-## Configuration files and locations on RHEL/CentOS
-
-Notice two important points:
-
-1. The Passenger version packaged in the EPEL repositories may change over time.
-2. The value of `PassengerRoot` depends on the Passenger version installed.
-
-To prevent the puppetlabs-apache module from having to keep up with these
-package versions the Passenger configuration files installed by the
-packages are left untouched by this module. All configuration is placed in an
-extra configuration file managed by puppetlabs-apache.
-
-This means '/etc/httpd/conf.d/passenger.conf' is installed by the
-`mod_passenger` package and contains correct values for `PassengerRoot` and
-`PassengerRuby`. Puppet will ignore this file. Additional configuration
-directives as described in the remainder of this document are placed in
-'/etc/httpd/conf.d/passenger_extra.conf', managed by Puppet.
-
-This pertains *only* to RHEL/CentOS, *not* Debian and Ubuntu.
-
-## Third-party and custom Passenger packages and versions
-
-The Passenger version distributed by the default OS packages may be too old to
-be useful. Newer versions may be installed via Gems, from source or from
-third-party OS packages.
-
-Most notably the Passenger developers officially provide Debian packages for a
-variety of Debian and Ubuntu releases in the [Passenger APT
-repository](https://oss-binaries.phusionpassenger.com/apt/passenger). Read more
-about [installing these packages in the offical user
-guide](http://www.modrails.com/documentation/Users%20guide%20Apache.html#install_on_debian_ubuntu).
-
-If you install custom Passenger packages and newer version make sure to set the
-directives `PassengerRoot`, `PassengerRuby` and/or `PassengerDefaultRuby`
-correctly, or Passenger and Apache will fail to function properly.
-
-For Passenger 4.x packages on Debian and Ubuntu the `PassengerRoot` directive
-should almost universally be set to
-`/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini`.
-
-# Parameters for `apache::mod::passenger`
-
-The following class parameters configure Passenger in a global, server-wide
-context.
-
-Example:
-
-```puppet
-class { 'apache::mod::passenger':
-  passenger_root             => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini',
-  passenger_default_ruby     => '/usr/bin/ruby1.9.3',
-  passenger_high_performance => 'on',
-  rails_autodetect           => 'off',
-  mod_lib_path               => '/usr/lib/apache2/custom_modules',
-}
-```
-
-The general form is using the all lower-case version of the configuration
-directive, with underscores instead of CamelCase.
-
-## Parameters used with passenger.conf
-
-If you pass a default value to `apache::mod::passenger` it will be ignored and
-not passed through to the configuration file. 
-
-### passenger_root
-
-The location to the Phusion Passenger root directory. This configuration option
-is essential to Phusion Passenger, and allows Phusion Passenger to locate its
-own data files. 
-
-The default depends on the Passenger version and the means of installation. See
-the above section on operating system support, versions and packages for more
-information.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerroot_lt_directory_gt
-
-### passenger_default_ruby
-
-This option specifies the default Ruby interpreter to use for web apps as well
-as for all sorts of internal Phusion Passenger helper scripts, e.g. the one
-used by PassengerPreStart.
-
-This directive was introduced in Passenger 4.0.0 and will not work in versions
-< 4.x. Do not set this parameter if your Passenger version is older than 4.0.0.
-
-Defaults to `undef` for all operating systems except Ubuntu 14.04, where it is
-set to '/usr/bin/ruby'.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerDefaultRuby
-
-### passenger_ruby
-
-This directive is the same as `passenger_default_ruby` for Passenger versions
-< 4.x and must be used instead of `passenger_default_ruby` for such versions.
-
-It makes no sense to set `PassengerRuby` for Passenger >= 4.x. That
-directive should only be used to override the value of `PassengerDefaultRuby`
-on a non-global context, i.e. in ``, ``, ``
-and so on.
-
-Defaults to `/usr/bin/ruby` for all supported operating systems except Ubuntu
-14.04, where it is set to `undef`.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerRuby
-
-### passenger_high_performance
-
-Default is `off`. When turned `on` Passenger runs in a higher performance mode
-that can be less compatible with other Apache modules.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerHighPerformance
-
-### passenger_max_pool_size
-
-Sets the maximum number of Passenger application processes that may
-simultaneously run. The default value is 6.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengermaxpoolsize_lt_integer_gt
-
-### passenger_pool_idle_time
-
-The maximum number of seconds a Passenger Application process will be allowed
-to remain idle before being shut down. The default value is 300.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerPoolIdleTime
-
-### passenger_max_requests
-
-The maximum number of request a Passenger application will process before being
-restarted. The default value is 0, which indicates that a process will only
-shut down if the Pool Idle Time (see above) expires.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerMaxRequests
-
-### passenger_stat_throttle_rate
-
-Sets how often Passenger performs file system checks, at most once every _x_
-seconds. Default is 0, which means the checks are performed with every request.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_passengerstatthrottlerate_lt_integer_gt
-
-### rack_autodetect
-
-Should Passenger automatically detect if the document root of a virtual host is
-a Rack application. Not set by default (`undef`). Note that this directive has
-been removed in Passenger 4.0.0 and `PassengerEnabled` should be used instead.
-Use this directive only on Passenger < 4.x.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_rackautodetect_lt_on_off_gt
-
-### rails_autodetect
-
-Should Passenger automatically detect if the document root of a virtual host is
-a Rails application.  Not set by default (`undef`). Note that this directive
-has been removed in Passenger 4.0.0 and `PassengerEnabled` should be used
-instead. Use this directive only on Passenger < 4.x.
-
-http://www.modrails.com/documentation/Users%20guide%20Apache.html#_railsautodetect_lt_on_off_gt
-
-### passenger_use_global_queue
-
-Allows toggling of PassengerUseGlobalQueue.  NOTE: PassengerUseGlobalQueue is
-the default in Passenger 4.x and the versions >= 4.x have disabled this
-configuration option altogether.  Use with caution.
-
-## Parameters used to load the module
-
-Unlike the tuning parameters specified above, the following parameters are only
-used when loading customized passenger modules.
-
-### mod_package
-
-Allows overriding the default package name used for the passenger module
-package.
-
-### mod_package_ensure
-
-Allows overriding the package installation setting used by puppet when
-installing the passenger module. The default is 'present'.
-
-### mod_id
-
-Allows overriding the value used by apache to identify the passenger module.
-The default is 'passenger_module'.
-
-### mod_lib_path
-
-Allows overriding the directory path used by apache when loading the passenger
-module. The default is the value of `$apache::params::lib_path`.
-
-### mod_lib
-
-Allows overriding the library file name used by apache when loading the
-passenger module. The default is 'mod_passenger.so'.
-
-### mod_path
-
-Allows overriding the full path to the library file used by apache when loading
-the passenger module. The default is the concatenation of the `mod_lib_path`
-and `mod_lib` parameters.
-
-# Dependencies
-
-RedHat-based systems will need to configure additional package repositories in
-order to install Passenger, specifically:
-
-* [Extra Packages for Enterprise Linux](https://fedoraproject.org/wiki/EPEL)
-* [Phusion Passenger](http://passenger.stealthymonkeys.com)
-
-Configuration of these repositories is beyond the scope of this module and is
-left to the user.
-
-# Attribution
-
-The Passenger tuning parameters for the `apache::mod::passenger` Puppet class
-was modified by Aaron Hicks (hicksa@landcareresearch.co.nz) for work on the
-NeSI Project and the Tuakiri New Zealand Access Federation as a fork from the
-PuppetLabs Apache module on GitHub.
-
-* https://github.com/puppetlabs/puppetlabs-apache
-* https://github.com/nesi/puppetlabs-apache
-* http://www.nesi.org.nz//
-* https://tuakiri.ac.nz/confluence/display/Tuakiri/Home
-
-# Copyright and License
-
-Copyright (C) 2012 [Puppet Labs](https://www.puppetlabs.com/) Inc
-
-Puppet Labs can be contacted at: info@puppetlabs.com
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/Rakefile
deleted file mode 100644
index 5868545f20..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/Rakefile
+++ /dev/null
@@ -1,10 +0,0 @@
-require 'puppetlabs_spec_helper/rake_tasks'
-require 'puppet-lint/tasks/puppet-lint'
-
-PuppetLint.configuration.fail_on_warnings
-PuppetLint.configuration.send('disable_80chars')
-PuppetLint.configuration.send('disable_class_inherits_from_params_class')
-PuppetLint.configuration.send('disable_class_parameter_defaults')
-PuppetLint.configuration.send('disable_documentation')
-PuppetLint.configuration.send('disable_single_quote_string_with_variables')
-PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/files/httpd b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/files/httpd
deleted file mode 100644
index d65a8d445c..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/files/httpd
+++ /dev/null
@@ -1,24 +0,0 @@
-# Configuration file for the httpd service.
-
-#
-# The default processing model (MPM) is the process-based
-# 'prefork' model.  A thread-based model, 'worker', is also
-# available, but does not work with some modules (such as PHP).
-# The service must be stopped before changing this variable.
-#
-#HTTPD=/usr/sbin/httpd.worker
-
-#
-# To pass additional options (for instance, -D definitions) to the
-# httpd binary at startup, set OPTIONS here.
-#
-#OPTIONS=
-#OPTIONS=-DDOWN
-
-#
-# By default, the httpd process is started in the C locale; to 
-# change the locale in which the server runs, the HTTPD_LANG
-# variable can be set.
-#
-#HTTPD_LANG=C
-export SHORTHOST=`hostname -s`
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb
deleted file mode 100644
index 670aca3d03..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-class Puppet::Provider::A2mod < Puppet::Provider
-  def self.prefetch(mods)
-    instances.each do |prov|
-      if mod = mods[prov.name]
-        mod.provider = prov
-      end
-    end
-  end
-
-  def flush
-    @property_hash.clear
-  end
-
-  def properties
-    if @property_hash.empty?
-      @property_hash = query || {:ensure => :absent}
-      @property_hash[:ensure] = :absent if @property_hash.empty?
-    end
-    @property_hash.dup
-  end
-
-  def query
-    self.class.instances.each do |mod|
-      if mod.name == self.name or mod.name.downcase == self.name
-        return mod.properties
-      end
-    end
-    nil
-  end
-
-  def exists?
-    properties[:ensure] != :absent
-  end
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/a2mod.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/a2mod.rb
deleted file mode 100644
index e257a579e8..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/a2mod.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-require 'puppet/provider/a2mod'
-
-Puppet::Type.type(:a2mod).provide(:a2mod, :parent => Puppet::Provider::A2mod) do
-    desc "Manage Apache 2 modules on Debian and Ubuntu"
-
-    optional_commands :encmd => "a2enmod"
-    optional_commands :discmd => "a2dismod"
-    commands :apache2ctl => "apache2ctl"
-
-    confine :osfamily => :debian
-    defaultfor :operatingsystem => [:debian, :ubuntu]
-
-    def self.instances
-      modules = apache2ctl("-M").lines.collect { |line|
-        m = line.match(/(\w+)_module \(shared\)$/)
-        m[1] if m
-      }.compact
-
-      modules.map do |mod|
-        new(
-          :name     => mod,
-          :ensure   => :present,
-          :provider => :a2mod
-        )
-      end
-    end
-
-    def create
-        encmd resource[:name]
-    end
-
-    def destroy
-        discmd resource[:name]
-    end
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb
deleted file mode 100644
index 07319dfdc8..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/gentoo.rb
+++ /dev/null
@@ -1,116 +0,0 @@
-require 'puppet/util/filetype'
-Puppet::Type.type(:a2mod).provide(:gentoo, :parent => Puppet::Provider) do
-  desc "Manage Apache 2 modules on Gentoo"
-
-  confine :operatingsystem => :gentoo
-  defaultfor :operatingsystem => :gentoo
-
-  attr_accessor :property_hash
-
-  def create
-    @property_hash[:ensure] = :present
-  end
-
-  def exists?
-    (!(@property_hash[:ensure].nil?) and @property_hash[:ensure] == :present)
-  end
-
-  def destroy
-    @property_hash[:ensure] = :absent
-  end
-
-  def flush
-    self.class.flush
-  end
-
-  class << self
-    attr_reader :conf_file
-  end
-
-  def self.clear
-    @mod_resources = []
-    @modules       = []
-    @other_args    = ""
-  end
-
-  def self.initvars
-    @conf_file     = "/etc/conf.d/apache2"
-    @filetype      = Puppet::Util::FileType.filetype(:flat).new(conf_file)
-    @mod_resources = []
-    @modules       = []
-    @other_args    = ""
-  end
-
-  self.initvars
-
-  # Retrieve an array of all existing modules
-  def self.modules
-    if @modules.length <= 0
-      # Locate the APACHE_OPTS variable
-      records = filetype.read.split(/\n/)
-      apache2_opts = records.grep(/^\s*APACHE2_OPTS=/).first
-
-      # Extract all defines
-      while apache2_opts.sub!(/-D\s+(\w+)/, '')
-        @modules << $1.downcase
-      end
-
-      # Hang on to any remaining options.
-      if apache2_opts.match(/APACHE2_OPTS="(.+)"/)
-        @other_args = $1.strip
-      end
-
-      @modules.sort!.uniq!
-    end
-
-    @modules
-  end
-
-  def self.prefetch(resources={})
-    # Match resources with existing providers
-    instances.each do |provider|
-      if resource = resources[provider.name]
-        resource.provider = provider
-      end
-    end
-
-    # Store all resources using this provider for flushing
-    resources.each do |name, resource|
-      @mod_resources << resource
-    end
-  end
-
-  def self.instances
-    modules.map {|mod| new(:name => mod, :provider => :gentoo, :ensure => :present)}
-  end
-
-  def self.flush
-
-    mod_list       = modules
-    mods_to_remove = @mod_resources.select {|mod| mod.should(:ensure) == :absent}.map {|mod| mod[:name]}
-    mods_to_add    = @mod_resources.select {|mod| mod.should(:ensure) == :present}.map {|mod| mod[:name]}
-
-    mod_list -= mods_to_remove
-    mod_list += mods_to_add
-    mod_list.sort!.uniq!
-
-    if modules != mod_list
-      opts = @other_args + " "
-      opts << mod_list.map {|mod| "-D #{mod.upcase}"}.join(" ")
-      opts.strip!
-      opts.gsub!(/\s+/, ' ')
-
-      apache2_opts = %Q{APACHE2_OPTS="#{opts}"}
-      Puppet.debug("Writing back \"#{apache2_opts}\" to #{conf_file}")
-
-      records = filetype.read.split(/\n/)
-
-      opts_index = records.find_index {|i| i.match(/^\s*APACHE2_OPTS/)}
-      records[opts_index] = apache2_opts
-
-      filetype.backup
-      filetype.write(records.join("\n"))
-      @modules = mod_list
-    end
-  end
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/modfix.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/modfix.rb
deleted file mode 100644
index 8f35b2e4a1..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/modfix.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-Puppet::Type.type(:a2mod).provide :modfix do
-    desc "Dummy provider for A2mod.
-
-    Fake nil resources when there is no crontab binary available. Allows
-    puppetd to run on a bootstrapped machine before a Cron package has been
-    installed. Workaround for: http://projects.puppetlabs.com/issues/2384
-    "
-
-    def self.instances
-        []
-    end
-end
\ No newline at end of file
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/redhat.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/redhat.rb
deleted file mode 100644
index ea5494cb48..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/provider/a2mod/redhat.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-require 'puppet/provider/a2mod'
-
-Puppet::Type.type(:a2mod).provide(:redhat, :parent => Puppet::Provider::A2mod) do
-  desc "Manage Apache 2 modules on RedHat family OSs"
-
-  commands :apachectl => "apachectl"
-
-  confine :osfamily => :redhat
-  defaultfor :osfamily => :redhat
-
-  require 'pathname'
-
-  # modpath: Path to default apache modules directory /etc/httpd/mod.d
-  # modfile: Path to module load configuration file; Default: resides under modpath directory
-  # libfile: Path to actual apache module library. Added in modfile LoadModule
-
-  attr_accessor :modfile, :libfile
-  class << self
-    attr_accessor :modpath
-    def preinit
-      @modpath = "/etc/httpd/mod.d"
-    end
-  end
-
-  self.preinit
-
-  def create
-    File.open(modfile,'w') do |f|
-      f.puts "LoadModule #{resource[:identifier]} #{libfile}"
-    end
-  end
-
-  def destroy
-    File.delete(modfile)
-  end
-
-  def self.instances
-    modules = apachectl("-M").lines.collect { |line|
-      m = line.match(/(\w+)_module \(shared\)$/)
-      m[1] if m
-    }.compact
-
-    modules.map do |mod|
-      new(
-        :name     => mod,
-        :ensure   => :present,
-        :provider => :redhat
-      )
-    end
-  end
-
-  def modfile
-    modfile ||= "#{self.class.modpath}/#{resource[:name]}.load"
-  end
-
-  # Set libfile path: If absolute path is passed, then maintain it. Else, make it default from 'modules' dir.
-  def libfile
-    libfile = Pathname.new(resource[:lib]).absolute? ? resource[:lib] : "modules/#{resource[:lib]}"
-  end
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb
deleted file mode 100644
index 07a911e5ee..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/lib/puppet/type/a2mod.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-Puppet::Type.newtype(:a2mod) do
-    @doc = "Manage Apache 2 modules"
-
-    ensurable
-
-    newparam(:name) do
-       Puppet.warning "The a2mod provider is deprecated, please use apache::mod instead"
-       desc "The name of the module to be managed"
-
-       isnamevar
-
-    end
-
-    newparam(:lib) do
-      desc "The name of the .so library to be loaded"
-
-      defaultto { "mod_#{@resource[:name]}.so" }
-    end
- 
-    newparam(:identifier) do
-      desc "Module identifier string used by LoadModule. Default: module-name_module"
-
-      # http://httpd.apache.org/docs/2.2/mod/module-dict.html#ModuleIdentifier
-
-      defaultto { "#{resource[:name]}_module" }
-    end
-
-    autorequire(:package) { catalog.resource(:package, 'httpd')}
-
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/balancer.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/balancer.pp
deleted file mode 100644
index 173aaec2dd..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/balancer.pp
+++ /dev/null
@@ -1,83 +0,0 @@
-# == Define Resource Type: apache::balancer
-#
-# This type will create an apache balancer cluster file inside the conf.d
-# directory. Each balancer cluster needs one or more balancer members (that can
-# be declared with the apache::balancermember defined resource type). Using
-# storeconfigs, you can export the apache::balancermember resources on all
-# balancer members, and then collect them on a single apache load balancer
-# server.
-#
-# === Requirement/Dependencies:
-#
-# Currently requires the puppetlabs/concat module on the Puppet Forge and uses
-# storeconfigs on the Puppet Master to export/collect resources from all
-# balancer members.
-#
-# === Parameters
-#
-# [*name*]
-# The namevar of the defined resource type is the balancer clusters name.
-# This name is also used in the name of the conf.d file
-#
-# [*proxy_set*]
-# Hash, default empty. If given, each key-value pair will be used as a ProxySet
-# line in the configuration.
-#
-# [*collect_exported*]
-# Boolean, default 'true'. True means 'collect exported @@balancermember
-# resources' (for the case when every balancermember node exports itself),
-# false means 'rely on the existing declared balancermember resources' (for the
-# case when you know the full set of balancermembers in advance and use
-# apache::balancermember with array arguments, which allows you to deploy
-# everything in 1 run)
-#
-#
-# === Examples
-#
-# Exporting the resource for a balancer member:
-#
-# apache::balancer { 'puppet00': }
-#
-define apache::balancer (
-  $proxy_set = {},
-  $collect_exported = true,
-) {
-  include concat::setup
-  include ::apache::mod::proxy_balancer
-
-  $target = "${::apache::params::confd_dir}/balancer_${name}.conf"
-
-  concat { $target:
-    owner  => '0',
-    group  => '0',
-    mode   => '0644',
-    notify => Service['httpd'],
-  }
-
-  concat::fragment { "00-${name}-header":
-    ensure  => present,
-    target  => $target,
-    order   => '01',
-    content => "\n",
-  }
-
-  if $collect_exported {
-    Apache::Balancermember <<| balancer_cluster == $name |>>
-  }
-  # else: the resources have been created and they introduced their
-  # concat fragments. We don't have to do anything about them.
-
-  concat::fragment { "01-${name}-proxyset":
-    ensure  => present,
-    target  => $target,
-    order   => '19',
-    content => inline_template("<% proxy_set.keys.sort.each do |key| %> Proxyset <%= key %>=<%= proxy_set[key] %>\n<% end %>"),
-  }
-
-  concat::fragment { "01-${name}-footer":
-    ensure  => present,
-    target  => $target,
-    order   => '20',
-    content => "\n",
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/balancermember.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/balancermember.pp
deleted file mode 100644
index 121e2c5533..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/balancermember.pp
+++ /dev/null
@@ -1,53 +0,0 @@
-# == Define Resource Type: apache::balancermember
-#
-# This type will setup a balancer member inside a listening service
-# configuration block in /etc/apache/apache.cfg on the load balancer.
-# currently it only has the ability to specify the instance name, url and an
-# array of options. More features can be added as needed. The best way to
-# implement this is to export this resource for all apache balancer member
-# servers, and then collect them on the main apache load balancer.
-#
-# === Requirement/Dependencies:
-#
-# Currently requires the puppetlabs/concat module on the Puppet Forge and
-# uses storeconfigs on the Puppet Master to export/collect resources
-# from all balancer members.
-#
-# === Parameters
-#
-# [*name*]
-# The title of the resource is arbitrary and only utilized in the concat
-# fragment name.
-#
-# [*balancer_cluster*]
-# The apache service's instance name (or, the title of the apache::balancer
-# resource). This must match up with a declared apache::balancer resource.
-#
-# [*url*]
-# The url used to contact the balancer member server.
-#
-# [*options*]
-# An array of options to be specified after the url.
-#
-# === Examples
-#
-# Exporting the resource for a balancer member:
-#
-# @@apache::balancermember { 'apache':
-#   balancer_cluster => 'puppet00',
-#   url              => "ajp://${::fqdn}:8009"
-#   options          => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],
-# }
-#
-define apache::balancermember(
-  $balancer_cluster,
-  $url = "http://${::fqdn}/",
-  $options = [],
-) {
-
-  concat::fragment { "BalancerMember ${url}":
-    ensure  => present,
-    target  => "${::apache::params::confd_dir}/balancer_${balancer_cluster}.conf",
-    content => inline_template(" BalancerMember ${url} <%= @options.join ' ' %>\n"),
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp
deleted file mode 100644
index f35c0c8b9d..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/confd/no_accf.pp
+++ /dev/null
@@ -1,10 +0,0 @@
-class apache::confd::no_accf {
-  # Template uses no variables
-  file { 'no-accf.conf':
-    ensure  => 'file',
-    path    => "${::apache::confd_dir}/no-accf.conf",
-    content => template('apache/confd/no-accf.conf.erb'),
-    require => Exec["mkdir ${::apache::confd_dir}"],
-    before  => File[$::apache::confd_dir],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/default_confd_files.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/default_confd_files.pp
deleted file mode 100644
index c06b30c83b..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/default_confd_files.pp
+++ /dev/null
@@ -1,15 +0,0 @@
-class apache::default_confd_files (
-  $all = true,
-) {
-  # The rest of the conf.d/* files only get loaded if we want them
-  if $all {
-    case $::osfamily {
-      'freebsd': {
-        include ::apache::confd::no_accf
-      }
-      default: {
-        # do nothing
-      }
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/default_mods.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/default_mods.pp
deleted file mode 100644
index f665d7383e..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/default_mods.pp
+++ /dev/null
@@ -1,158 +0,0 @@
-class apache::default_mods (
-  $all            = true,
-  $mods           = undef,
-  $apache_version = $::apache::apache_version
-) {
-  # These are modules required to run the default configuration.
-  # They are not configurable at this time, so we just include
-  # them to make sure it works.
-  case $::osfamily {
-    'redhat', 'freebsd': {
-      ::apache::mod { 'log_config': }
-      if versioncmp($apache_version, '2.4') >= 0 {
-        # Lets fork it
-        ::apache::mod { 'systemd': }
-        ::apache::mod { 'unixd': }
-      }
-    }
-    default: {}
-  }
-  ::apache::mod { 'authz_host': }
-
-  # The rest of the modules only get loaded if we want all modules enabled
-  if $all {
-    case $::osfamily {
-      'debian': {
-        include ::apache::mod::reqtimeout
-      }
-      'redhat': {
-        include ::apache::mod::actions
-        include ::apache::mod::cache
-        include ::apache::mod::mime
-        include ::apache::mod::mime_magic
-        include ::apache::mod::vhost_alias
-        include ::apache::mod::suexec
-        include ::apache::mod::rewrite
-        include ::apache::mod::speling
-        ::apache::mod { 'auth_digest': }
-        ::apache::mod { 'authn_anon': }
-        ::apache::mod { 'authn_dbm': }
-        ::apache::mod { 'authz_dbm': }
-        ::apache::mod { 'authz_owner': }
-        ::apache::mod { 'expires': }
-        ::apache::mod { 'ext_filter': }
-        ::apache::mod { 'include': }
-        ::apache::mod { 'logio': }
-        ::apache::mod { 'substitute': }
-        ::apache::mod { 'usertrack': }
-        ::apache::mod { 'version': }
-
-        if versioncmp($apache_version, '2.4') >= 0 {
-          ::apache::mod { 'authn_core': }
-        }
-        else {
-          ::apache::mod { 'authn_alias': }
-          ::apache::mod { 'authn_default': }
-        }
-      }
-      'freebsd': {
-        include ::apache::mod::actions
-        include ::apache::mod::cache
-        include ::apache::mod::disk_cache
-        include ::apache::mod::headers
-        include ::apache::mod::info
-        include ::apache::mod::mime_magic
-        include ::apache::mod::reqtimeout
-        include ::apache::mod::rewrite
-        include ::apache::mod::userdir
-        include ::apache::mod::vhost_alias
-        include ::apache::mod::speling
-
-        ::apache::mod { 'asis': }
-        ::apache::mod { 'auth_digest': }
-        ::apache::mod { 'authn_alias': }
-        ::apache::mod { 'authn_anon': }
-        ::apache::mod { 'authn_dbm': }
-        ::apache::mod { 'authn_default': }
-        ::apache::mod { 'authz_dbm': }
-        ::apache::mod { 'authz_owner': }
-        ::apache::mod { 'cern_meta': }
-        ::apache::mod { 'charset_lite': }
-        ::apache::mod { 'dumpio': }
-        ::apache::mod { 'expires': }
-        ::apache::mod { 'file_cache': }
-        ::apache::mod { 'filter':}
-        ::apache::mod { 'imagemap':}
-        ::apache::mod { 'include': }
-        ::apache::mod { 'logio': }
-        ::apache::mod { 'unique_id': }
-        ::apache::mod { 'usertrack': }
-        ::apache::mod { 'version': }
-      }
-      default: {}
-    }
-    case $::apache::mpm_module {
-      'prefork': {
-        include ::apache::mod::cgi
-      }
-      'worker': {
-        include ::apache::mod::cgid
-      }
-      default: {
-        # do nothing
-      }
-    }
-    include ::apache::mod::alias
-    include ::apache::mod::autoindex
-    include ::apache::mod::dav
-    include ::apache::mod::dav_fs
-    include ::apache::mod::deflate
-    include ::apache::mod::dir
-    include ::apache::mod::mime
-    include ::apache::mod::negotiation
-    include ::apache::mod::setenvif
-    ::apache::mod { 'auth_basic': }
-    ::apache::mod { 'authn_file': }
-
-      if versioncmp($apache_version, '2.4') >= 0 {
-      # authz_core is needed for 'Require' directive
-      ::apache::mod { 'authz_core':
-        id => 'authz_core_module',
-      }
-
-      # filter is needed by mod_deflate
-      ::apache::mod { 'filter': }
-
-      # lots of stuff seems to break without access_compat
-      ::apache::mod { 'access_compat': }
-    } else {
-      ::apache::mod { 'authz_default': }
-    }
-
-    ::apache::mod { 'authz_groupfile': }
-    ::apache::mod { 'authz_user': }
-    ::apache::mod { 'env': }
-  } elsif $mods {
-    ::apache::default_mods::load { $mods: }
-
-    if versioncmp($apache_version, '2.4') >= 0 {
-      # authz_core is needed for 'Require' directive
-      ::apache::mod { 'authz_core':
-        id => 'authz_core_module',
-      }
-
-      # filter is needed by mod_deflate
-      ::apache::mod { 'filter': }
-    }
-  } else {
-    if versioncmp($apache_version, '2.4') >= 0 {
-      # authz_core is needed for 'Require' directive
-      ::apache::mod { 'authz_core':
-        id => 'authz_core_module',
-      }
-
-      # filter is needed by mod_deflate
-      ::apache::mod { 'filter': }
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/default_mods/load.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/default_mods/load.pp
deleted file mode 100644
index 356e9fa00e..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/default_mods/load.pp
+++ /dev/null
@@ -1,8 +0,0 @@
-# private define
-define apache::default_mods::load ($module = $title) {
-  if defined("apache::mod::${module}") {
-    include "::apache::mod::${module}"
-  } else {
-    ::apache::mod { $module: }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/dev.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/dev.pp
deleted file mode 100644
index 4eaeb55782..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/dev.pp
+++ /dev/null
@@ -1,11 +0,0 @@
-class apache::dev {
-  if $::osfamily == 'FreeBSD' and !defined(Class['apache::package']) {
-    fail('apache::dev requires apache::package; please include apache or apache::package class first')
-  }
-  include ::apache::params
-  $packages = $::apache::params::dev_packages
-  package { $packages:
-    ensure  => present,
-    require => Package['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/init.pp
deleted file mode 100644
index 9f77d5b4e7..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/init.pp
+++ /dev/null
@@ -1,340 +0,0 @@
-# Class: apache
-#
-# This class installs Apache
-#
-# Parameters:
-#
-# Actions:
-#   - Install Apache
-#   - Manage Apache service
-#
-# Requires:
-#
-# Sample Usage:
-#
-class apache (
-  $service_name         = $::apache::params::service_name,
-  $default_mods         = true,
-  $default_vhost        = true,
-  $default_confd_files  = true,
-  $default_ssl_vhost    = false,
-  $default_ssl_cert     = $::apache::params::default_ssl_cert,
-  $default_ssl_key      = $::apache::params::default_ssl_key,
-  $default_ssl_chain    = undef,
-  $default_ssl_ca       = undef,
-  $default_ssl_crl_path = undef,
-  $default_ssl_crl      = undef,
-  $ip                   = undef,
-  $service_enable       = true,
-  $service_ensure       = 'running',
-  $purge_configs        = true,
-  $purge_vdir           = false,
-  $serveradmin          = 'root@localhost',
-  $sendfile             = 'On',
-  $error_documents      = false,
-  $timeout              = '120',
-  $httpd_dir            = $::apache::params::httpd_dir,
-  $server_root          = $::apache::params::server_root,
-  $confd_dir            = $::apache::params::confd_dir,
-  $vhost_dir            = $::apache::params::vhost_dir,
-  $vhost_enable_dir     = $::apache::params::vhost_enable_dir,
-  $mod_dir              = $::apache::params::mod_dir,
-  $mod_enable_dir       = $::apache::params::mod_enable_dir,
-  $mpm_module           = $::apache::params::mpm_module,
-  $conf_template        = $::apache::params::conf_template,
-  $servername           = $::apache::params::servername,
-  $manage_user          = true,
-  $manage_group         = true,
-  $user                 = $::apache::params::user,
-  $group                = $::apache::params::group,
-  $keepalive            = $::apache::params::keepalive,
-  $keepalive_timeout    = $::apache::params::keepalive_timeout,
-  $max_keepalive_requests = $apache::params::max_keepalive_requests,
-  $logroot              = $::apache::params::logroot,
-  $log_level            = $::apache::params::log_level,
-  $log_formats          = {},
-  $ports_file           = $::apache::params::ports_file,
-  $apache_version       = $::apache::version::default,
-  $server_tokens        = 'OS',
-  $server_signature     = 'On',
-  $trace_enable         = 'On',
-  $package_ensure       = 'installed',
-) inherits ::apache::params {
-  validate_bool($default_vhost)
-  validate_bool($default_ssl_vhost)
-  validate_bool($default_confd_files)
-  # true/false is sufficient for both ensure and enable
-  validate_bool($service_enable)
-
-  $valid_mpms_re = $apache_version ? {
-    '2.4'   => '(event|itk|peruser|prefork|worker)',
-    default => '(event|itk|prefork|worker)'
-  }
-
-  if $mpm_module {
-    validate_re($mpm_module, $valid_mpms_re)
-  }
-
-  # NOTE: on FreeBSD it's mpm module's responsibility to install httpd package.
-  # NOTE: the same strategy may be introduced for other OSes. For this, you
-  # should delete the 'if' block below and modify all MPM modules' manifests
-  # such that they include apache::package class (currently event.pp, itk.pp,
-  # peruser.pp, prefork.pp, worker.pp).
-  if $::osfamily != 'FreeBSD' {
-    package { 'httpd':
-      ensure => $package_ensure,
-      name   => $::apache::params::apache_name,
-      notify => Class['Apache::Service'],
-    }
-  }
-  validate_re($sendfile, [ '^[oO]n$' , '^[oO]ff$' ])
-
-  # declare the web server user and group
-  # Note: requiring the package means the package ought to create them and not puppet
-  validate_bool($manage_user)
-  if $manage_user {
-    user { $user:
-      ensure  => present,
-      gid     => $group,
-      require => Package['httpd'],
-    }
-  }
-  validate_bool($manage_group)
-  if $manage_group {
-    group { $group:
-      ensure  => present,
-      require => Package['httpd']
-    }
-  }
-
-  $valid_log_level_re = '(emerg|alert|crit|error|warn|notice|info|debug)'
-
-  validate_re($log_level, $valid_log_level_re,
-  "Log level '${log_level}' is not one of the supported Apache HTTP Server log levels.")
-
-  class { '::apache::service':
-    service_name   => $service_name,
-    service_enable => $service_enable,
-    service_ensure => $service_ensure,
-  }
-
-  # Deprecated backwards-compatibility
-  if $purge_vdir {
-    warning('Class[\'apache\'] parameter purge_vdir is deprecated in favor of purge_configs')
-    $purge_confd = $purge_vdir
-  } else {
-    $purge_confd = $purge_configs
-  }
-
-  Exec {
-    path => '/bin:/sbin:/usr/bin:/usr/sbin',
-  }
-
-  exec { "mkdir ${confd_dir}":
-    creates => $confd_dir,
-    require => Package['httpd'],
-  }
-  file { $confd_dir:
-    ensure  => directory,
-    recurse => true,
-    purge   => $purge_confd,
-    notify  => Class['Apache::Service'],
-    require => Package['httpd'],
-  }
-
-  if ! defined(File[$mod_dir]) {
-    exec { "mkdir ${mod_dir}":
-      creates => $mod_dir,
-      require => Package['httpd'],
-    }
-    # Don't purge available modules if an enable dir is used
-    $purge_mod_dir = $purge_configs and !$mod_enable_dir
-    file { $mod_dir:
-      ensure  => directory,
-      recurse => true,
-      purge   => $purge_mod_dir,
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-  }
-
-  if $mod_enable_dir and ! defined(File[$mod_enable_dir]) {
-    $mod_load_dir = $mod_enable_dir
-    exec { "mkdir ${mod_enable_dir}":
-      creates => $mod_enable_dir,
-      require => Package['httpd'],
-    }
-    file { $mod_enable_dir:
-      ensure  => directory,
-      recurse => true,
-      purge   => $purge_configs,
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-  } else {
-    $mod_load_dir = $mod_dir
-  }
-
-  if ! defined(File[$vhost_dir]) {
-    exec { "mkdir ${vhost_dir}":
-      creates => $vhost_dir,
-      require => Package['httpd'],
-    }
-    file { $vhost_dir:
-      ensure  => directory,
-      recurse => true,
-      purge   => $purge_configs,
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-  }
-
-  if $vhost_enable_dir and ! defined(File[$vhost_enable_dir]) {
-    $vhost_load_dir = $vhost_enable_dir
-    exec { "mkdir ${vhost_load_dir}":
-      creates => $vhost_load_dir,
-      require => Package['httpd'],
-    }
-    file { $vhost_enable_dir:
-      ensure  => directory,
-      recurse => true,
-      purge   => $purge_configs,
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-  } else {
-    $vhost_load_dir = $vhost_dir
-  }
-
-  concat { $ports_file:
-    owner   => 'root',
-    group   => $::apache::params::root_group,
-    mode    => '0644',
-    notify  => Class['Apache::Service'],
-    require => Package['httpd'],
-  }
-  concat::fragment { 'Apache ports header':
-    ensure  => present,
-    target  => $ports_file,
-    content => template('apache/ports_header.erb')
-  }
-
-  if $::apache::params::conf_dir and $::apache::params::conf_file {
-    case $::osfamily {
-      'debian': {
-        $docroot              = '/var/www'
-        $pidfile              = '${APACHE_PID_FILE}'
-        $error_log            = 'error.log'
-        $error_documents_path = '/usr/share/apache2/error'
-        $scriptalias          = '/usr/lib/cgi-bin'
-        $access_log_file      = 'access.log'
-      }
-      'redhat': {
-        $docroot              = '/var/www/html'
-        $pidfile              = 'run/httpd.pid'
-        $error_log            = 'error_log'
-        $error_documents_path = '/var/www/error'
-        $scriptalias          = '/var/www/cgi-bin'
-        $access_log_file      = 'access_log'
-      }
-      'freebsd': {
-        $docroot              = '/usr/local/www/apache22/data'
-        $pidfile              = '/var/run/httpd.pid'
-        $error_log            = 'httpd-error.log'
-        $error_documents_path = '/usr/local/www/apache22/error'
-        $scriptalias          = '/usr/local/www/apache22/cgi-bin'
-        $access_log_file      = 'httpd-access.log'
-      }
-      default: {
-        fail("Unsupported osfamily ${::osfamily}")
-      }
-    }
-
-    $apxs_workaround = $::osfamily ? {
-      'freebsd' => true,
-      default   => false
-    }
-
-    # Template uses:
-    # - $pidfile
-    # - $user
-    # - $group
-    # - $logroot
-    # - $error_log
-    # - $sendfile
-    # - $mod_dir
-    # - $ports_file
-    # - $confd_dir
-    # - $vhost_dir
-    # - $error_documents
-    # - $error_documents_path
-    # - $apxs_workaround
-    # - $keepalive
-    # - $keepalive_timeout
-    # - $max_keepalive_requests
-    # - $server_root
-    # - $server_tokens
-    # - $server_signature
-    # - $trace_enable
-    file { "${::apache::params::conf_dir}/${::apache::params::conf_file}":
-      ensure  => file,
-      content => template($conf_template),
-      notify  => Class['Apache::Service'],
-      require => Package['httpd'],
-    }
-
-    # preserve back-wards compatibility to the times when default_mods was
-    # only a boolean value. Now it can be an array (too)
-    if is_array($default_mods) {
-      class { '::apache::default_mods':
-        all  => false,
-        mods => $default_mods,
-      }
-    } else {
-      class { '::apache::default_mods':
-        all => $default_mods,
-      }
-    }
-    class { '::apache::default_confd_files':
-      all => $default_confd_files
-    }
-    if $mpm_module {
-      class { "::apache::mod::${mpm_module}": }
-    }
-
-    $default_vhost_ensure = $default_vhost ? {
-      true  => 'present',
-      false => 'absent'
-    }
-    $default_ssl_vhost_ensure = $default_ssl_vhost ? {
-      true  => 'present',
-      false => 'absent'
-    }
-
-    ::apache::vhost { 'default':
-      ensure          => $default_vhost_ensure,
-      port            => 80,
-      docroot         => $docroot,
-      scriptalias     => $scriptalias,
-      serveradmin     => $serveradmin,
-      access_log_file => $access_log_file,
-      priority        => '15',
-      ip              => $ip,
-    }
-    $ssl_access_log_file = $::osfamily ? {
-      'freebsd' => $access_log_file,
-      default   => "ssl_${access_log_file}",
-    }
-    ::apache::vhost { 'default-ssl':
-      ensure          => $default_ssl_vhost_ensure,
-      port            => 443,
-      ssl             => true,
-      docroot         => $docroot,
-      scriptalias     => $scriptalias,
-      serveradmin     => $serveradmin,
-      access_log_file => $ssl_access_log_file,
-      priority        => '15',
-      ip              => $ip,
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/listen.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/listen.pp
deleted file mode 100644
index e6a8a3c767..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/listen.pp
+++ /dev/null
@@ -1,10 +0,0 @@
-define apache::listen {
-  $listen_addr_port = $name
-
-  # Template uses: $listen_addr_port
-  concat::fragment { "Listen ${listen_addr_port}":
-    ensure  => present,
-    target  => $::apache::ports_file,
-    content => template('apache/listen.erb'),
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod.pp
deleted file mode 100644
index aa5ea3f3bd..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod.pp
+++ /dev/null
@@ -1,130 +0,0 @@
-define apache::mod (
-  $package        = undef,
-  $package_ensure = 'present',
-  $lib            = undef,
-  $lib_path       = $::apache::params::lib_path,
-  $id             = undef,
-  $path           = undef,
-  $loadfile_name  = undef,
-  $loadfiles      = undef,
-) {
-  if ! defined(Class['apache']) {
-    fail('You must include the apache base class before using any apache defined resources')
-  }
-
-  $mod = $name
-  #include apache #This creates duplicate resources in rspec-puppet
-  $mod_dir = $::apache::mod_dir
-
-  # Determine if we have special lib
-  $mod_libs = $::apache::params::mod_libs
-  $mod_lib = $mod_libs[$mod] # 2.6 compatibility hack
-  if $lib {
-    $_lib = $lib
-  } elsif $mod_lib {
-    $_lib = $mod_lib
-  } else {
-    $_lib = "mod_${mod}.so"
-  }
-
-  # Determine if declaration specified a path to the module
-  if $path {
-    $_path = $path
-  } else {
-    $_path = "${lib_path}/${_lib}"
-  }
-
-  if $id {
-    $_id = $id
-  } else {
-    $_id = "${mod}_module"
-  }
-
-  if $loadfile_name {
-    $_loadfile_name = $loadfile_name
-  } else {
-    $_loadfile_name = "${mod}.load"
-  }
-
-  # Determine if we have a package
-  $mod_packages = $::apache::params::mod_packages
-  $mod_package = $mod_packages[$mod] # 2.6 compatibility hack
-  if $package {
-    $_package = $package
-  } elsif $mod_package {
-    $_package = $mod_package
-  } else {
-    $_package = undef
-  }
-  if $_package and ! defined(Package[$_package]) {
-    # note: FreeBSD/ports uses apxs tool to activate modules; apxs clutters
-    # httpd.conf with 'LoadModule' directives; here, by proper resource
-    # ordering, we ensure that our version of httpd.conf is reverted after
-    # the module gets installed.
-    $package_before = $::osfamily ? {
-      'freebsd' => [
-        File[$_loadfile_name],
-        File["${::apache::params::conf_dir}/${::apache::params::conf_file}"]
-      ],
-      default => File[$_loadfile_name],
-    }
-    # $_package may be an array
-    package { $_package:
-      ensure  => $package_ensure,
-      require => Package['httpd'],
-      before  => $package_before,
-    }
-  }
-
-  file { "${_loadfile_name}":
-    ensure  => file,
-    path    => "${mod_dir}/${_loadfile_name}",
-    owner   => 'root',
-    group   => $::apache::params::root_group,
-    mode    => '0644',
-    content => template('apache/mod/load.erb'),
-    require => [
-      Package['httpd'],
-      Exec["mkdir ${mod_dir}"],
-    ],
-    before  => File[$mod_dir],
-    notify  => Service['httpd'],
-  }
-
-  if $::osfamily == 'Debian' {
-    $enable_dir = $::apache::mod_enable_dir
-    file{ "${_loadfile_name} symlink":
-      ensure  => link,
-      path    => "${enable_dir}/${_loadfile_name}",
-      target  => "${mod_dir}/${_loadfile_name}",
-      owner   => 'root',
-      group   => $::apache::params::root_group,
-      mode    => '0644',
-      require => [
-        File[$_loadfile_name],
-        Exec["mkdir ${enable_dir}"],
-      ],
-      before  => File[$enable_dir],
-      notify  => Service['httpd'],
-    }
-    # Each module may have a .conf file as well, which should be
-    # defined in the class apache::mod::module
-    # Some modules do not require this file.
-    if defined(File["${mod}.conf"]) {
-      file{ "${mod}.conf symlink":
-        ensure  => link,
-        path    => "${enable_dir}/${mod}.conf",
-        target  => "${mod_dir}/${mod}.conf",
-        owner   => 'root',
-        group   => $::apache::params::root_group,
-        mode    => '0644',
-        require => [
-          File["${mod}.conf"],
-          Exec["mkdir ${enable_dir}"],
-        ],
-        before  => File[$enable_dir],
-        notify  => Service['httpd'],
-      }
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/actions.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/actions.pp
deleted file mode 100644
index 3b60f297fd..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/actions.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::actions {
-  apache::mod { 'actions': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/alias.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/alias.pp
deleted file mode 100644
index ee017b490f..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/alias.pp
+++ /dev/null
@@ -1,19 +0,0 @@
-class apache::mod::alias(
-  $apache_version = $apache::apache_version
-) {
-  $icons_path = $::osfamily ? {
-    'debian'  => '/usr/share/apache2/icons',
-    'redhat'  => '/var/www/icons',
-    'freebsd' => '/usr/local/www/apache22/icons',
-  }
-  apache::mod { 'alias': }
-  # Template uses $icons_path
-  file { 'alias.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/alias.conf",
-    content => template('apache/mod/alias.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp
deleted file mode 100644
index cacfafa4d3..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/auth_basic.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::auth_basic {
-  ::apache::mod { 'auth_basic': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp
deleted file mode 100644
index 6b53262a1b..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/auth_kerb.pp
+++ /dev/null
@@ -1,5 +0,0 @@
-class apache::mod::auth_kerb {
-  ::apache::mod { 'auth_kerb': }
-}
-
-
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp
deleted file mode 100644
index 800e656e89..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/authnz_ldap.pp
+++ /dev/null
@@ -1,19 +0,0 @@
-class apache::mod::authnz_ldap (
-  $verifyServerCert = true,
-) {
-  include '::apache::mod::ldap'
-  ::apache::mod { 'authnz_ldap': }
-
-  validate_bool($verifyServerCert)
-
-  # Template uses:
-  # - $verifyServerCert
-  file { 'authnz_ldap.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/authnz_ldap.conf",
-    content => template('apache/mod/authnz_ldap.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp
deleted file mode 100644
index f5f0f07458..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/autoindex.pp
+++ /dev/null
@@ -1,12 +0,0 @@
-class apache::mod::autoindex {
-  ::apache::mod { 'autoindex': }
-  # Template uses no variables
-  file { 'autoindex.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/autoindex.conf",
-    content => template('apache/mod/autoindex.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/cache.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/cache.pp
deleted file mode 100644
index 4ab9f44bae..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/cache.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::cache {
-  ::apache::mod { 'cache': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/cgi.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/cgi.pp
deleted file mode 100644
index 6c3c6aec8d..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/cgi.pp
+++ /dev/null
@@ -1,4 +0,0 @@
-class apache::mod::cgi {
-  Class['::apache::mod::prefork'] -> Class['::apache::mod::cgi']
-  ::apache::mod { 'cgi': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/cgid.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/cgid.pp
deleted file mode 100644
index 5c89251a1c..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/cgid.pp
+++ /dev/null
@@ -1,23 +0,0 @@
-class apache::mod::cgid {
-  Class['::apache::mod::worker'] -> Class['::apache::mod::cgid']
-
-  # Debian specifies it's cgid sock path, but RedHat uses the default value
-  # with no config file
-  $cgisock_path = $::osfamily ? {
-    'debian'  => '${APACHE_RUN_DIR}/cgisock',
-    'freebsd' => 'cgisock',
-    default   => undef,
-  }
-  ::apache::mod { 'cgid': }
-  if $cgisock_path {
-    # Template uses $cgisock_path
-    file { 'cgid.conf':
-      ensure  => file,
-      path    => "${::apache::mod_dir}/cgid.conf",
-      content => template('apache/mod/cgid.conf.erb'),
-      require => Exec["mkdir ${::apache::mod_dir}"],
-      before  => File[$::apache::mod_dir],
-      notify  => Service['httpd'],
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dav.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dav.pp
deleted file mode 100644
index ade9c0809c..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dav.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::dav {
-  ::apache::mod { 'dav': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp
deleted file mode 100644
index 482f316171..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dav_fs.pp
+++ /dev/null
@@ -1,20 +0,0 @@
-class apache::mod::dav_fs {
-  $dav_lock = $::osfamily ? {
-    'debian'  => '${APACHE_LOCK_DIR}/DAVLock',
-    'freebsd' => '/usr/local/var/DavLock',
-    default   => '/var/lib/dav/lockdb',
-  }
-
-  Class['::apache::mod::dav'] -> Class['::apache::mod::dav_fs']
-  ::apache::mod { 'dav_fs': }
-
-  # Template uses: $dav_lock
-  file { 'dav_fs.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/dav_fs.conf",
-    content => template('apache/mod/dav_fs.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp
deleted file mode 100644
index 0fd667bc3f..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dav_svn.pp
+++ /dev/null
@@ -1,14 +0,0 @@
-class apache::mod::dav_svn (
-  $authz_svn_enabled = false,
-) {
-    Class['::apache::mod::dav'] -> Class['::apache::mod::dav_svn']
-    include ::apache::mod::dav
-    ::apache::mod { 'dav_svn': } 
-    
-    if $authz_svn_enabled {
-      ::apache::mod { 'authz_svn':
-        loadfile_name => 'dav_svn_authz_svn.load',
-        require       => Apache::Mod['dav_svn'],
-      }
-    }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/deflate.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/deflate.pp
deleted file mode 100644
index 9b597d9466..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/deflate.pp
+++ /dev/null
@@ -1,12 +0,0 @@
-class apache::mod::deflate {
-  ::apache::mod { 'deflate': }
-  # Template uses no variables
-  file { 'deflate.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/deflate.conf",
-    content => template('apache/mod/deflate.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dev.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dev.pp
deleted file mode 100644
index 5abdedd361..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dev.pp
+++ /dev/null
@@ -1,5 +0,0 @@
-class apache::mod::dev {
-  # Development packages are not apache modules
-  warning('apache::mod::dev is deprecated; please use apache::dev')
-  include ::apache::dev
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dir.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dir.pp
deleted file mode 100644
index 11631305a4..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/dir.pp
+++ /dev/null
@@ -1,21 +0,0 @@
-# Note: this sets the global DirectoryIndex directive, it may be necessary to consider being able to modify the apache::vhost to declare DirectoryIndex statements in a vhost configuration
-# Parameters:
-# - $indexes provides a string for the DirectoryIndex directive http://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex
-class apache::mod::dir (
-  $dir     = 'public_html',
-  $indexes = ['index.html','index.html.var','index.cgi','index.pl','index.php','index.xhtml'],
-) {
-  validate_array($indexes)
-  ::apache::mod { 'dir': }
-
-  # Template uses
-  # - $indexes
-  file { 'dir.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/dir.conf",
-    content => template('apache/mod/dir.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/disk_cache.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/disk_cache.pp
deleted file mode 100644
index 13c9c78352..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/disk_cache.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-class apache::mod::disk_cache {
-  $cache_root = $::osfamily ? {
-    'debian'  => '/var/cache/apache2/mod_disk_cache',
-    'redhat'  => '/var/cache/mod_proxy',
-    'freebsd' => '/var/cache/mod_disk_cache',
-  }
-  if $::osfamily != 'FreeBSD' {
-    # FIXME: investigate why disk_cache was dependent on proxy
-    # NOTE: on FreeBSD disk_cache is compiled by default but proxy is not
-    Class['::apache::mod::proxy'] -> Class['::apache::mod::disk_cache']
-  }
-  Class['::apache::mod::cache'] -> Class['::apache::mod::disk_cache']
-
-  apache::mod { 'disk_cache': }
-  # Template uses $cache_proxy
-  file { 'disk_cache.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/disk_cache.conf",
-    content => template('apache/mod/disk_cache.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/event.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/event.pp
deleted file mode 100644
index cb7ed96cd6..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/event.pp
+++ /dev/null
@@ -1,62 +0,0 @@
-class apache::mod::event (
-  $startservers        = '2',
-  $maxclients          = '150',
-  $minsparethreads     = '25',
-  $maxsparethreads     = '75',
-  $threadsperchild     = '25',
-  $maxrequestsperchild = '0',
-  $serverlimit         = '25',
-  $apache_version      = $::apache::apache_version,
-) {
-  if defined(Class['apache::mod::itk']) {
-    fail('May not include both apache::mod::event and apache::mod::itk on the same node')
-  }
-  if defined(Class['apache::mod::peruser']) {
-    fail('May not include both apache::mod::event and apache::mod::peruser on the same node')
-  }
-  if defined(Class['apache::mod::prefork']) {
-    fail('May not include both apache::mod::event and apache::mod::prefork on the same node')
-  }
-  if defined(Class['apache::mod::worker']) {
-    fail('May not include both apache::mod::event and apache::mod::worker on the same node')
-  }
-  File {
-    owner => 'root',
-    group => $::apache::params::root_group,
-    mode  => '0644',
-  }
-
-  # Template uses:
-  # - $startservers
-  # - $maxclients
-  # - $minsparethreads
-  # - $maxsparethreads
-  # - $threadsperchild
-  # - $maxrequestsperchild
-  # - $serverlimit
-  file { "${::apache::mod_dir}/event.conf":
-    ensure  => file,
-    content => template('apache/mod/event.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-
-  case $::osfamily {
-    'redhat': {
-      if versioncmp($apache_version, '2.4') >= 0 {
-        apache::mpm{ 'event':
-          apache_version => $apache_version,
-        }
-      }
-    }
-    'debian','freebsd' : {
-      apache::mpm{ 'event':
-        apache_version => $apache_version,
-      }
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/expires.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/expires.pp
deleted file mode 100644
index aae4c59d98..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/expires.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::expires {
-  ::apache::mod { 'expires': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/fastcgi.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/fastcgi.pp
deleted file mode 100644
index a185bb31fa..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/fastcgi.pp
+++ /dev/null
@@ -1,24 +0,0 @@
-class apache::mod::fastcgi {
-
-  # Debian specifies it's fastcgi lib path, but RedHat uses the default value
-  # with no config file
-  $fastcgi_lib_path = $::apache::params::fastcgi_lib_path
-
-  ::apache::mod { 'fastcgi': }
-
-  if $fastcgi_lib_path {
-    # Template uses:
-    # - $fastcgi_server
-    # - $fastcgi_socket
-    # - $fastcgi_dir
-    file { 'fastcgi.conf':
-      ensure  => file,
-      path    => "${::apache::mod_dir}/fastcgi.conf",
-      content => template('apache/mod/fastcgi.conf.erb'),
-      require => Exec["mkdir ${::apache::mod_dir}"],
-      before  => File[$::apache::mod_dir],
-      notify  => Service['httpd'],
-    }
-  }
-
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/fcgid.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/fcgid.pp
deleted file mode 100644
index 70997768bc..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/fcgid.pp
+++ /dev/null
@@ -1,16 +0,0 @@
-class apache::mod::fcgid(
-  $options = {},
-) {
-  ::apache::mod { 'fcgid': }
-
-  # Template uses:
-  # - $options
-  file { 'fcgid.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/fcgid.conf",
-    content => template('apache/mod/fcgid.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/headers.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/headers.pp
deleted file mode 100644
index d18c5e2793..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/headers.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::headers {
-  ::apache::mod { 'headers': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/include.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/include.pp
deleted file mode 100644
index edbe81f324..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/include.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::include {
-  ::apache::mod { 'include': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/info.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/info.pp
deleted file mode 100644
index 18f9ea1dfe..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/info.pp
+++ /dev/null
@@ -1,17 +0,0 @@
-class apache::mod::info (
-  $allow_from = ['127.0.0.1','::1'],
-  $apache_version = $::apache::apache_version,
-){
-  apache::mod { 'info': }
-  # Template uses
-  # $allow_from
-  # $apache_version
-  file { 'info.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/info.conf",
-    content => template('apache/mod/info.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/itk.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/itk.pp
deleted file mode 100644
index 1083e5ed24..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/itk.pp
+++ /dev/null
@@ -1,53 +0,0 @@
-class apache::mod::itk (
-  $startservers        = '8',
-  $minspareservers     = '5',
-  $maxspareservers     = '20',
-  $serverlimit         = '256',
-  $maxclients          = '256',
-  $maxrequestsperchild = '4000',
-  $apache_version      = $::apache::apache_version,
-) {
-  if defined(Class['apache::mod::event']) {
-    fail('May not include both apache::mod::itk and apache::mod::event on the same node')
-  }
-  if defined(Class['apache::mod::peruser']) {
-    fail('May not include both apache::mod::itk and apache::mod::peruser on the same node')
-  }
-  if defined(Class['apache::mod::prefork']) {
-    fail('May not include both apache::mod::itk and apache::mod::prefork on the same node')
-  }
-  if defined(Class['apache::mod::worker']) {
-    fail('May not include both apache::mod::itk and apache::mod::worker on the same node')
-  }
-  File {
-    owner => 'root',
-    group => $::apache::params::root_group,
-    mode  => '0644',
-  }
-
-  # Template uses:
-  # - $startservers
-  # - $minspareservers
-  # - $maxspareservers
-  # - $serverlimit
-  # - $maxclients
-  # - $maxrequestsperchild
-  file { "${::apache::mod_dir}/itk.conf":
-    ensure  => file,
-    content => template('apache/mod/itk.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-
-  case $::osfamily {
-    'debian', 'freebsd': {
-      apache::mpm{ 'itk':
-        apache_version => $apache_version,
-      }
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/ldap.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/ldap.pp
deleted file mode 100644
index d3b17ff5b8..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/ldap.pp
+++ /dev/null
@@ -1,14 +0,0 @@
-class apache::mod::ldap (
-  $apache_version = $::apache::apache_version,
-){
-  ::apache::mod { 'ldap': }
-  # Template uses $apache_version
-  file { 'ldap.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/ldap.conf",
-    content => template('apache/mod/ldap.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/mime.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/mime.pp
deleted file mode 100644
index ccdb5d4b3c..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/mime.pp
+++ /dev/null
@@ -1,21 +0,0 @@
-class apache::mod::mime (
-  $mime_support_package = $::apache::params::mime_support_package,
-  $mime_types_config    = $::apache::params::mime_types_config,
-) {
-  apache::mod { 'mime': }
-  # Template uses $mime_types_config
-  file { 'mime.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/mime.conf",
-    content => template('apache/mod/mime.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-  if $mime_support_package {
-    package { $mime_support_package:
-      ensure => 'installed',
-      before => File['mime.conf'],
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/mime_magic.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/mime_magic.pp
deleted file mode 100644
index 9de8bc4bc6..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/mime_magic.pp
+++ /dev/null
@@ -1,14 +0,0 @@
-class apache::mod::mime_magic (
-  $magic_file = "${::apache::params::conf_dir}/magic"
-) {
-  apache::mod { 'mime_magic': }
-  # Template uses $magic_file
-  file { 'mime_magic.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/mime_magic.conf",
-    content => template('apache/mod/mime_magic.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/negotiation.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/negotiation.pp
deleted file mode 100644
index eff685b15c..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/negotiation.pp
+++ /dev/null
@@ -1,12 +0,0 @@
-class apache::mod::negotiation {
-  ::apache::mod { 'negotiation': }
-  # Template uses no variables
-  file { 'negotiation.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/negotiation.conf",
-    content => template('apache/mod/negotiation.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/nss.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/nss.pp
deleted file mode 100644
index f0eff1cdf7..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/nss.pp
+++ /dev/null
@@ -1,25 +0,0 @@
-class apache::mod::nss (
-  $transfer_log = "${::apache::params::logroot}/access.log",
-  $error_log    = "${::apache::params::logroot}/error.log",
-  $passwd_file  = undef
-) {
-  include ::apache::mod::mime
-
-  apache::mod { 'nss': }
-
-  $httpd_dir = $::apache::httpd_dir
-
-  # Template uses:
-  # $transfer_log
-  # $error_log
-  # $http_dir
-  # passwd_file
-  file { 'nss.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/nss.conf",
-    content => template('apache/mod/nss.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/pagespeed.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/pagespeed.pp
deleted file mode 100644
index 8c1c03bd5d..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/pagespeed.pp
+++ /dev/null
@@ -1,55 +0,0 @@
-class apache::mod::pagespeed (
-  $inherit_vhost_config          = 'on',
-  $filter_xhtml                  = false,
-  $cache_path                    = '/var/cache/mod_pagespeed/',
-  $log_dir                       = '/var/log/pagespeed',
-  $memache_servers               = [],
-  $rewrite_level                 = 'CoreFilters',
-  $disable_filters               = [],
-  $enable_filters                = [],
-  $forbid_filters                = [],
-  $rewrite_deadline_per_flush_ms = 10,
-  $additional_domains            = undef,
-  $file_cache_size_kb            = 102400,
-  $file_cache_clean_interval_ms  = 3600000,
-  $lru_cache_per_process         = 1024,
-  $lru_cache_byte_limit          = 16384,
-  $css_flatten_max_bytes         = 2048,
-  $css_inline_max_bytes          = 2048,
-  $css_image_inline_max_bytes    = 2048,
-  $image_inline_max_bytes        = 2048,
-  $js_inline_max_bytes           = 2048,
-  $css_outline_min_bytes         = 3000,
-  $js_outline_min_bytes          = 3000,
-  $inode_limit                   = 500000,
-  $image_max_rewrites_at_once    = 8,
-  $num_rewrite_threads           = 4,
-  $num_expensive_rewrite_threads = 4,
-  $collect_statistics            = 'on',
-  $statistics_logging            = 'on',
-  $allow_view_stats              = [],
-  $allow_pagespeed_console       = [],
-  $allow_pagespeed_message       = [],
-  $message_buffer_size           = 100000,
-  $additional_configuration      = {},
-  $apache_version                = $::apache::apache_version,
-){
-
-  $_lib = $::apache::apache_version ? {
-    '2.4'   => 'mod_pagespeed_ap24.so',
-    default => undef
-  }
-
-  apache::mod { 'pagespeed':
-    lib => $_lib,
-  }
-
-  file { 'pagespeed.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/pagespeed.conf",
-    content => template('apache/mod/pagespeed.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/passenger.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/passenger.pp
deleted file mode 100644
index 12139cb2b4..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/passenger.pp
+++ /dev/null
@@ -1,86 +0,0 @@
-class apache::mod::passenger (
-  $passenger_conf_file            = $::apache::params::passenger_conf_file,
-  $passenger_conf_package_file    = $::apache::params::passenger_conf_package_file,
-  $passenger_high_performance     = undef,
-  $passenger_pool_idle_time       = undef,
-  $passenger_max_requests         = undef,
-  $passenger_stat_throttle_rate   = undef,
-  $rack_autodetect                = undef,
-  $rails_autodetect               = undef,
-  $passenger_root                 = $::apache::params::passenger_root,
-  $passenger_ruby                 = $::apache::params::passenger_ruby,
-  $passenger_default_ruby         = $::apache::params::passenger_default_ruby,
-  $passenger_max_pool_size        = undef,
-  $passenger_use_global_queue     = undef,
-  $mod_package                    = undef,
-  $mod_package_ensure             = undef,
-  $mod_lib                        = undef,
-  $mod_lib_path                   = undef,
-  $mod_id                         = undef,
-  $mod_path                       = undef,
-) {
-  # Managed by the package, but declare it to avoid purging
-  if $passenger_conf_package_file {
-    file { 'passenger_package.conf':
-      path => "${::apache::mod_dir}/${passenger_conf_package_file}",
-    }
-  } else {
-    # Remove passenger_extra.conf left over from before Passenger support was
-    # reworked for Debian. This is a temporary fix for users running this
-    # module from master after release 1.0.1 It will be removed in two
-    # releases from now.
-    $passenger_package_conf_ensure = $::osfamily ? {
-      'Debian' => 'absent',
-      default  => undef,
-    }
-
-    file { 'passenger_package.conf':
-      ensure => $passenger_package_conf_ensure,
-      path   => "${::apache::mod_dir}/passenger_extra.conf",
-    }
-  }
-
-  $_package = $mod_package
-  $_package_ensure = $mod_package_ensure
-  $_lib = $mod_lib
-  if $::osfamily == 'FreeBSD' {
-    if $mod_lib_path {
-      $_lib_path = $mod_lib_path
-    } else {
-      $_lib_path = "${passenger_root}/buildout/apache2"
-    }
-  } else {
-    $_lib_path = $mod_lib_path
-  }
-
-  $_id = $mod_id
-  $_path = $mod_path
-  ::apache::mod { 'passenger':
-    package        => $_package,
-    package_ensure => $_package_ensure,
-    lib            => $_lib,
-    lib_path       => $_lib_path,
-    id             => $_id,
-    path           => $_path,
-  }
-
-  # Template uses:
-  # - $passenger_root
-  # - $passenger_ruby
-  # - $passenger_default_ruby
-  # - $passenger_max_pool_size
-  # - $passenger_high_performance
-  # - $passenger_max_requests
-  # - $passenger_stat_throttle_rate
-  # - $passenger_use_global_queue
-  # - $rack_autodetect
-  # - $rails_autodetect
-  file { 'passenger.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/${passenger_conf_file}",
-    content => template('apache/mod/passenger.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/perl.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/perl.pp
deleted file mode 100644
index b57f25fd5f..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/perl.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::perl {
-  ::apache::mod { 'perl': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/peruser.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/peruser.pp
deleted file mode 100644
index 518655a1d4..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/peruser.pp
+++ /dev/null
@@ -1,73 +0,0 @@
-class apache::mod::peruser (
-  $minspareprocessors = '2',
-  $minprocessors = '2',
-  $maxprocessors = '10',
-  $maxclients = '150',
-  $maxrequestsperchild = '1000',
-  $idletimeout = '120',
-  $expiretimeout = '120',
-  $keepalive = 'Off',
-) {
-  if defined(Class['apache::mod::event']) {
-    fail('May not include both apache::mod::peruser and apache::mod::event on the same node')
-  }
-  if defined(Class['apache::mod::itk']) {
-    fail('May not include both apache::mod::peruser and apache::mod::itk on the same node')
-  }
-  if defined(Class['apache::mod::prefork']) {
-    fail('May not include both apache::mod::peruser and apache::mod::prefork on the same node')
-  }
-  if defined(Class['apache::mod::worker']) {
-    fail('May not include both apache::mod::peruser and apache::mod::worker on the same node')
-  }
-  File {
-    owner => 'root',
-    group => $::apache::params::root_group,
-    mode  => '0644',
-  }
-
-  $mod_dir = $::apache::mod_dir
-
-  # Template uses:
-  # - $minspareprocessors
-  # - $minprocessors
-  # - $maxprocessors
-  # - $maxclients
-  # - $maxrequestsperchild
-  # - $idletimeout
-  # - $expiretimeout
-  # - $keepalive
-  # - $mod_dir
-  file { "${::apache::mod_dir}/peruser.conf":
-    ensure  => file,
-    content => template('apache/mod/peruser.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-  file { "${::apache::mod_dir}/peruser":
-    ensure  => directory,
-    require => File[$::apache::mod_dir],
-  }
-  file { "${::apache::mod_dir}/peruser/multiplexers":
-    ensure  => directory,
-    require => File["${::apache::mod_dir}/peruser"],
-  }
-  file { "${::apache::mod_dir}/peruser/processors":
-    ensure  => directory,
-    require => File["${::apache::mod_dir}/peruser"],
-  }
-
-  ::apache::peruser::multiplexer { '01-default': }
-
-  case $::osfamily {
-    'freebsd' : {
-      class { '::apache::package':
-        mpm_module => 'peruser'
-      }
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/php.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/php.pp
deleted file mode 100644
index a94bfe50bd..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/php.pp
+++ /dev/null
@@ -1,55 +0,0 @@
-class apache::mod::php (
-  $package_name   = undef,
-  $package_ensure = 'present',
-  $path           = undef,
-  $extensions     = ['.php'],
-  $content        = undef,
-  $template       = 'apache/mod/php5.conf.erb',
-  $source         = undef,
-) {
-  if ! defined(Class['apache::mod::prefork']) {
-    fail('apache::mod::php requires apache::mod::prefork; please enable mpm_module => \'prefork\' on Class[\'apache\']')
-  }
-  validate_array($extensions)
-
-  if $source and ($content or $template != 'apache/mod/php5.conf.erb') {
-    warning('source and content or template parameters are provided. source parameter will be used')
-  } elsif $content and $template != 'apache/mod/php5.conf.erb' {
-    warning('content and template parameters are provided. content parameter will be used')
-  }
-
-  $manage_content = $source ? {
-    undef   => $content ? {
-      undef   => template($template),
-      default => $content,
-    },
-    default => undef,
-  }
-
-  ::apache::mod { 'php5':
-    package        => $package_name,
-    package_ensure => $package_ensure,
-    path           => $path,
-  }
-
-  include ::apache::mod::mime
-  include ::apache::mod::dir
-  Class['::apache::mod::mime'] -> Class['::apache::mod::dir'] -> Class['::apache::mod::php']
-
-  # Template uses $extensions
-  file { 'php5.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/php5.conf",
-    owner   => 'root',
-    group   => 'root',
-    mode    => '0644',
-    content => $manage_content,
-    source  => $source,
-    require => [
-      Class['::apache::mod::prefork'],
-      Exec["mkdir ${::apache::mod_dir}"],
-    ],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/prefork.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/prefork.pp
deleted file mode 100644
index b3adeae8c8..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/prefork.pp
+++ /dev/null
@@ -1,70 +0,0 @@
-class apache::mod::prefork (
-  $startservers        = '8',
-  $minspareservers     = '5',
-  $maxspareservers     = '20',
-  $serverlimit         = '256',
-  $maxclients          = '256',
-  $maxrequestsperchild = '4000',
-  $apache_version      = $::apache::apache_version,
-) {
-  if defined(Class['apache::mod::event']) {
-    fail('May not include both apache::mod::prefork and apache::mod::event on the same node')
-  }
-  if defined(Class['apache::mod::itk']) {
-    fail('May not include both apache::mod::prefork and apache::mod::itk on the same node')
-  }
-  if defined(Class['apache::mod::peruser']) {
-    fail('May not include both apache::mod::prefork and apache::mod::peruser on the same node')
-  }
-  if defined(Class['apache::mod::worker']) {
-    fail('May not include both apache::mod::prefork and apache::mod::worker on the same node')
-  }
-  File {
-    owner => 'root',
-    group => $::apache::params::root_group,
-    mode  => '0644',
-  }
-
-  # Template uses:
-  # - $startservers
-  # - $minspareservers
-  # - $maxspareservers
-  # - $serverlimit
-  # - $maxclients
-  # - $maxrequestsperchild
-  file { "${::apache::mod_dir}/prefork.conf":
-    ensure  => file,
-    content => template('apache/mod/prefork.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-
-  case $::osfamily {
-    'redhat': {
-      if versioncmp($apache_version, '2.4') >= 0 {
-        ::apache::mpm{ 'prefork':
-          apache_version => $apache_version,
-        }
-      }
-      else {
-        file_line { '/etc/sysconfig/httpd prefork enable':
-          ensure  => present,
-          path    => '/etc/sysconfig/httpd',
-          line    => '#HTTPD=/usr/sbin/httpd.worker',
-          match   => '#?HTTPD=/usr/sbin/httpd.worker',
-          require => Package['httpd'],
-          notify  => Service['httpd'],
-        }
-      }
-    }
-    'debian', 'freebsd' : {
-      ::apache::mpm{ 'prefork':
-        apache_version => $apache_version,
-      }
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy.pp
deleted file mode 100644
index 03c1e78c95..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy.pp
+++ /dev/null
@@ -1,16 +0,0 @@
-class apache::mod::proxy (
-  $proxy_requests = 'Off',
-  $allow_from = undef,
-  $apache_version = $::apache::apache_version,
-) {
-  ::apache::mod { 'proxy': }
-  # Template uses $proxy_requests, $apache_version
-  file { 'proxy.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/proxy.conf",
-    content => template('apache/mod/proxy.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_ajp.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_ajp.pp
deleted file mode 100644
index a011a17895..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_ajp.pp
+++ /dev/null
@@ -1,4 +0,0 @@
-class apache::mod::proxy_ajp {
-  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_ajp']
-  ::apache::mod { 'proxy_ajp': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_balancer.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_balancer.pp
deleted file mode 100644
index 5a0768d8d0..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_balancer.pp
+++ /dev/null
@@ -1,10 +0,0 @@
-class apache::mod::proxy_balancer {
-
-  include ::apache::mod::proxy
-  include ::apache::mod::proxy_http
-
-  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_balancer']
-  Class['::apache::mod::proxy_http'] -> Class['::apache::mod::proxy_balancer']
-  ::apache::mod { 'proxy_balancer': }
-
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_html.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_html.pp
deleted file mode 100644
index 549eb117fa..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_html.pp
+++ /dev/null
@@ -1,37 +0,0 @@
-class apache::mod::proxy_html {
-  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_html']
-  Class['::apache::mod::proxy_http'] -> Class['::apache::mod::proxy_html']
-
-  # Add libxml2
-  case $::osfamily {
-    /RedHat|FreeBSD/: {
-      ::apache::mod { 'xml2enc': }
-      $loadfiles = undef
-    }
-    'Debian': {
-      $gnu_path = $::hardwaremodel ? {
-        'i686'  => 'i386',
-        default => $::hardwaremodel,
-      }
-      $loadfiles = $::apache::params::distrelease ? {
-        '6'     => ['/usr/lib/libxml2.so.2'],
-        '10'    => ['/usr/lib/libxml2.so.2'],
-        default => ["/usr/lib/${gnu_path}-linux-gnu/libxml2.so.2"],
-      }
-    }
-  }
-
-  ::apache::mod { 'proxy_html':
-    loadfiles => $loadfiles,
-  }
-
-  # Template uses $icons_path
-  file { 'proxy_html.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/proxy_html.conf",
-    content => template('apache/mod/proxy_html.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_http.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_http.pp
deleted file mode 100644
index 1579e68ee2..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/proxy_http.pp
+++ /dev/null
@@ -1,4 +0,0 @@
-class apache::mod::proxy_http {
-  Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_http']
-  ::apache::mod { 'proxy_http': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/python.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/python.pp
deleted file mode 100644
index e326c8d757..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/python.pp
+++ /dev/null
@@ -1,5 +0,0 @@
-class apache::mod::python {
-  ::apache::mod { 'python': }
-}
-
-
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/reqtimeout.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/reqtimeout.pp
deleted file mode 100644
index 80b3018306..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/reqtimeout.pp
+++ /dev/null
@@ -1,12 +0,0 @@
-class apache::mod::reqtimeout {
-  ::apache::mod { 'reqtimeout': }
-  # Template uses no variables
-  file { 'reqtimeout.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/reqtimeout.conf",
-    content => template('apache/mod/reqtimeout.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/rewrite.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/rewrite.pp
deleted file mode 100644
index 694f0b6f5c..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/rewrite.pp
+++ /dev/null
@@ -1,4 +0,0 @@
-class apache::mod::rewrite {
-  include ::apache::params
-  ::apache::mod { 'rewrite': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/rpaf.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/rpaf.pp
deleted file mode 100644
index 6fbc1d4e04..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/rpaf.pp
+++ /dev/null
@@ -1,20 +0,0 @@
-class apache::mod::rpaf (
-  $sethostname = true,
-  $proxy_ips   = [ '127.0.0.1' ],
-  $header      = 'X-Forwarded-For'
-) {
-  ::apache::mod { 'rpaf': }
-
-  # Template uses:
-  # - $sethostname
-  # - $proxy_ips
-  # - $header
-  file { 'rpaf.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/rpaf.conf",
-    content => template('apache/mod/rpaf.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/setenvif.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/setenvif.pp
deleted file mode 100644
index 15b1441d83..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/setenvif.pp
+++ /dev/null
@@ -1,12 +0,0 @@
-class apache::mod::setenvif {
-  ::apache::mod { 'setenvif': }
-  # Template uses no variables
-  file { 'setenvif.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/setenvif.conf",
-    content => template('apache/mod/setenvif.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/speling.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/speling.pp
deleted file mode 100644
index eb46d78f04..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/speling.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::speling {
-  ::apache::mod { 'speling': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/ssl.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/ssl.pp
deleted file mode 100644
index dd178150c9..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/ssl.pp
+++ /dev/null
@@ -1,56 +0,0 @@
-class apache::mod::ssl (
-  $ssl_compression = false,
-  $ssl_options     = [ 'StdEnvVars' ],
-  $ssl_cipher      = 'HIGH:MEDIUM:!aNULL:!MD5',
-  $apache_version  = $::apache::apache_version,
-) {
-  $session_cache = $::osfamily ? {
-    'debian'  => '${APACHE_RUN_DIR}/ssl_scache(512000)',
-    'redhat'  => '/var/cache/mod_ssl/scache(512000)',
-    'freebsd' => '/var/run/ssl_scache(512000)',
-  }
-
-  case $::osfamily {
-    'debian': {
-      if versioncmp($apache_version, '2.4') >= 0 and $::operatingsystem == 'Ubuntu' {
-        $ssl_mutex = 'default'
-      } elsif $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '10.04' {
-        $ssl_mutex = 'file:/var/run/apache2/ssl_mutex'
-      } else {
-        $ssl_mutex = 'file:${APACHE_RUN_DIR}/ssl_mutex'
-      }
-    }
-    'redhat': {
-      $ssl_mutex = 'default'
-    }
-    'freebsd': {
-      $ssl_mutex = 'default'
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-
-  ::apache::mod { 'ssl': }
-
-  if versioncmp($apache_version, '2.4') >= 0 {
-    ::apache::mod { 'socache_shmcb': }
-  }
-
-  # Template uses
-  #
-  # $ssl_compression
-  # $ssl_options
-  # $session_cache,
-  # $ssl_mutex
-  # $apache_version
-  #
-  file { 'ssl.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/ssl.conf",
-    content => template('apache/mod/ssl.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/status.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/status.pp
deleted file mode 100644
index cfab5d58ea..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/status.pp
+++ /dev/null
@@ -1,43 +0,0 @@
-# Class: apache::mod::status
-#
-# This class enables and configures Apache mod_status
-# See: http://httpd.apache.org/docs/current/mod/mod_status.html
-#
-# Parameters:
-# - $allow_from is an array of hosts, ip addresses, partial network numbers
-#   or networks in CIDR notation specifying what hosts can view the special
-#   /server-status URL.  Defaults to ['127.0.0.1', '::1'].
-# - $extended_status track and display extended status information. Valid
-#   values are 'On' or 'Off'.  Defaults to 'On'.
-#
-# Actions:
-# - Enable and configure Apache mod_status
-#
-# Requires:
-# - The apache class
-#
-# Sample Usage:
-#
-#  # Simple usage allowing access from localhost and a private subnet
-#  class { 'apache::mod::status':
-#    $allow_from => ['127.0.0.1', '10.10.10.10/24'],
-#  }
-#
-class apache::mod::status (
-  $allow_from      = ['127.0.0.1','::1'],
-  $extended_status = 'On',
-  $apache_version = $::apache::apache_version,
-){
-  validate_array($allow_from)
-  validate_re(downcase($extended_status), '^(on|off)$', "${extended_status} is not supported for extended_status.  Allowed values are 'On' and 'Off'.")
-  ::apache::mod { 'status': }
-  # Template uses $allow_from, $extended_status, $apache_version
-  file { 'status.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/status.conf",
-    content => template('apache/mod/status.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/suexec.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/suexec.pp
deleted file mode 100644
index ded013d499..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/suexec.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::suexec {
-  ::apache::mod { 'suexec': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/suphp.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/suphp.pp
deleted file mode 100644
index f9a572f463..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/suphp.pp
+++ /dev/null
@@ -1,14 +0,0 @@
-class apache::mod::suphp (
-){
-  ::apache::mod { 'suphp': }
-
-  file {'suphp.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/suphp.conf",
-    content => template('apache/mod/suphp.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd']
-  }
-}
-
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/userdir.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/userdir.pp
deleted file mode 100644
index accfe64a79..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/userdir.pp
+++ /dev/null
@@ -1,18 +0,0 @@
-class apache::mod::userdir (
-  $home = '/home',
-  $dir = 'public_html',
-  $disable_root = true,
-  $apache_version = $::apache::apache_version,
-) {
-  ::apache::mod { 'userdir': }
-
-  # Template uses $home, $dir, $disable_root, $apache_version
-  file { 'userdir.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/userdir.conf",
-    content => template('apache/mod/userdir.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/vhost_alias.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/vhost_alias.pp
deleted file mode 100644
index 30ae122e15..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/vhost_alias.pp
+++ /dev/null
@@ -1,3 +0,0 @@
-class apache::mod::vhost_alias {
-  ::apache::mod { 'vhost_alias': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/worker.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/worker.pp
deleted file mode 100644
index 0d2815964b..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/worker.pp
+++ /dev/null
@@ -1,74 +0,0 @@
-class apache::mod::worker (
-  $startservers        = '2',
-  $maxclients          = '150',
-  $minsparethreads     = '25',
-  $maxsparethreads     = '75',
-  $threadsperchild     = '25',
-  $maxrequestsperchild = '0',
-  $serverlimit         = '25',
-  $threadlimit         = '64',
-  $apache_version      = $::apache::apache_version,
-) {
-  if defined(Class['apache::mod::event']) {
-    fail('May not include both apache::mod::worker and apache::mod::event on the same node')
-  }
-  if defined(Class['apache::mod::itk']) {
-    fail('May not include both apache::mod::worker and apache::mod::itk on the same node')
-  }
-  if defined(Class['apache::mod::peruser']) {
-    fail('May not include both apache::mod::worker and apache::mod::peruser on the same node')
-  }
-  if defined(Class['apache::mod::prefork']) {
-    fail('May not include both apache::mod::worker and apache::mod::prefork on the same node')
-  }
-  File {
-    owner => 'root',
-    group => $::apache::params::root_group,
-    mode  => '0644',
-  }
-
-  # Template uses:
-  # - $startservers
-  # - $maxclients
-  # - $minsparethreads
-  # - $maxsparethreads
-  # - $threadsperchild
-  # - $maxrequestsperchild
-  # - $serverlimit
-  # - $threadLimit
-  file { "${::apache::mod_dir}/worker.conf":
-    ensure  => file,
-    content => template('apache/mod/worker.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd'],
-  }
-
-  case $::osfamily {
-    'redhat': {
-      if versioncmp($apache_version, '2.4') >= 0 {
-        ::apache::mpm{ 'worker':
-          apache_version => $apache_version,
-        }
-      }
-      else {
-        file_line { '/etc/sysconfig/httpd worker enable':
-          ensure  => present,
-          path    => '/etc/sysconfig/httpd',
-          line    => 'HTTPD=/usr/sbin/httpd.worker',
-          match   => '#?HTTPD=/usr/sbin/httpd.worker',
-          require => Package['httpd'],
-          notify  => Service['httpd'],
-        }
-      }
-    }
-    'debian', 'freebsd': {
-      ::apache::mpm{ 'worker':
-        apache_version => $apache_version,
-      }
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/wsgi.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/wsgi.pp
deleted file mode 100644
index 244a3458b4..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/wsgi.pp
+++ /dev/null
@@ -1,21 +0,0 @@
-class apache::mod::wsgi (
-  $wsgi_socket_prefix = undef,
-  $wsgi_python_path   = undef,
-  $wsgi_python_home   = undef,
-){
-  ::apache::mod { 'wsgi': }
-
-  # Template uses:
-  # - $wsgi_socket_prefix
-  # - $wsgi_python_path
-  # - $wsgi_python_home
-  file {'wsgi.conf':
-    ensure  => file,
-    path    => "${::apache::mod_dir}/wsgi.conf",
-    content => template('apache/mod/wsgi.conf.erb'),
-    require => Exec["mkdir ${::apache::mod_dir}"],
-    before  => File[$::apache::mod_dir],
-    notify  => Service['httpd']
-  }
-}
-
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/xsendfile.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/xsendfile.pp
deleted file mode 100644
index 7c5e88437a..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mod/xsendfile.pp
+++ /dev/null
@@ -1,4 +0,0 @@
-class apache::mod::xsendfile {
-  include ::apache::params
-  ::apache::mod { 'xsendfile': }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mpm.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mpm.pp
deleted file mode 100644
index 6437016ba7..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/mpm.pp
+++ /dev/null
@@ -1,68 +0,0 @@
-define apache::mpm (
-  $lib_path       = $::apache::params::lib_path,
-  $apache_version = $::apache::apache_version,
-) {
-  if ! defined(Class['apache']) {
-    fail('You must include the apache base class before using any apache defined resources')
-  }
-
-  $mpm     = $name
-  $mod_dir = $::apache::mod_dir
-
-  $_lib  = "mod_mpm_${mpm}.so"
-  $_path = "${lib_path}/${_lib}"
-  $_id   = "mpm_${mpm}_module"
-
-  if versioncmp($apache_version, '2.4') >= 0 {
-    file { "${mod_dir}/${mpm}.load":
-      ensure  => file,
-      path    => "${mod_dir}/${mpm}.load",
-      content => "LoadModule ${_id} ${_path}\n",
-      require => [
-        Package['httpd'],
-        Exec["mkdir ${mod_dir}"],
-      ],
-      before  => File[$mod_dir],
-      notify  => Service['httpd'],
-    }
-  }
-
-  case $::osfamily {
-    'debian': {
-      file { "${::apache::mod_enable_dir}/${mpm}.conf":
-        ensure  => link,
-        target  => "${::apache::mod_dir}/${mpm}.conf",
-        require => Exec["mkdir ${::apache::mod_enable_dir}"],
-        before  => File[$::apache::mod_enable_dir],
-        notify  => Service['httpd'],
-      }
-
-      if versioncmp($apache_version, '2.4') >= 0 {
-        file { "${::apache::mod_enable_dir}/${mpm}.load":
-          ensure  => link,
-          target  => "${::apache::mod_dir}/${mpm}.load",
-          require => Exec["mkdir ${::apache::mod_enable_dir}"],
-          before  => File[$::apache::mod_enable_dir],
-          notify  => Service['httpd'],
-        }
-      }
-
-      if versioncmp($apache_version, '2.4') < 0 {
-        package { "apache2-mpm-${mpm}":
-          ensure => present,
-        }
-      }
-    }
-    'freebsd': {
-      class { '::apache::package':
-        mpm_module => $mpm
-      }
-    }
-    'redhat': {
-      # so we don't fail
-    }
-    default: {
-      fail("Unsupported osfamily ${::osfamily}")
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/namevirtualhost.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/namevirtualhost.pp
deleted file mode 100644
index f8c3a80d85..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/namevirtualhost.pp
+++ /dev/null
@@ -1,10 +0,0 @@
-define apache::namevirtualhost {
-  $addr_port = $name
-
-  # Template uses: $addr_port
-  concat::fragment { "NameVirtualHost ${addr_port}":
-    ensure  => present,
-    target  => $::apache::ports_file,
-    content => template('apache/namevirtualhost.erb'),
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/package.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/package.pp
deleted file mode 100644
index a4e4015c52..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/package.pp
+++ /dev/null
@@ -1,48 +0,0 @@
-class apache::package (
-  $ensure     = 'present',
-  $mpm_module = $::apache::params::mpm_module,
-) inherits ::apache::params {
-  case $::osfamily {
-    'freebsd' : {
-      $all_mpms = [
-        'www/apache22',
-        'www/apache22-worker-mpm',
-        'www/apache22-event-mpm',
-        'www/apache22-itk-mpm',
-        'www/apache22-peruser-mpm',
-      ]
-      if $mpm_module {
-        $apache_package = $mpm_module ? {
-          'prefork' => 'www/apache22',
-          default   => "www/apache22-${mpm_module}-mpm"
-        }
-      } else {
-        $apache_package = 'www/apache22'
-      }
-      $other_mpms = delete($all_mpms, $apache_package)
-      # Configure ports to have apache module packages dependent on correct
-      # version of apache package (apache22, apache22-worker-mpm, ...)
-      file_line { 'APACHE_PORT in /etc/make.conf':
-        ensure => $ensure,
-        path   => '/etc/make.conf',
-        line   => "APACHE_PORT=${apache_package}",
-        match  => '^\s*#?\s*APACHE_PORT\s*=\s*',
-        before => Package['httpd'],
-      }
-      # remove other packages
-      ensure_resource('package', $other_mpms, {
-        ensure  => absent,
-        before  => Package['httpd'],
-        require => File_line['APACHE_PORT in /etc/make.conf'],
-      })
-    }
-    default: {
-      $apache_package = $::apache::params::apache_name
-    }
-  }
-  package { 'httpd':
-    ensure => $ensure,
-    name   => $apache_package,
-    notify => Class['Apache::Service'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/params.pp
deleted file mode 100644
index d272afb319..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/params.pp
+++ /dev/null
@@ -1,258 +0,0 @@
-# Class: apache::params
-#
-# This class manages Apache parameters
-#
-# Parameters:
-# - The $user that Apache runs as
-# - The $group that Apache runs as
-# - The $apache_name is the name of the package and service on the relevant
-#   distribution
-# - The $php_package is the name of the package that provided PHP
-# - The $ssl_package is the name of the Apache SSL package
-# - The $apache_dev is the name of the Apache development libraries package
-# - The $conf_contents is the contents of the Apache configuration file
-#
-# Actions:
-#
-# Requires:
-#
-# Sample Usage:
-#
-class apache::params inherits ::apache::version {
-  if($::fqdn) {
-    $servername = $::fqdn
-  } else {
-    $servername = $::hostname
-  }
-
-  # The default error log level
-  $log_level = 'warn'
-
-  if $::osfamily == 'RedHat' or $::operatingsystem == 'amazon' {
-    $user                 = 'apache'
-    $group                = 'apache'
-    $root_group           = 'root'
-    $apache_name          = 'httpd'
-    $service_name         = 'httpd'
-    $httpd_dir            = '/etc/httpd'
-    $server_root          = '/etc/httpd'
-    $conf_dir             = "${httpd_dir}/conf"
-    $confd_dir            = "${httpd_dir}/conf.d"
-    $mod_dir              = "${httpd_dir}/conf.d"
-    $mod_enable_dir       = undef
-    $vhost_dir            = "${httpd_dir}/conf.d"
-    $vhost_enable_dir     = undef
-    $conf_file            = 'httpd.conf'
-    $ports_file           = "${conf_dir}/ports.conf"
-    $logroot              = '/var/log/httpd'
-    $lib_path             = 'modules'
-    $mpm_module           = 'prefork'
-    $dev_packages         = 'httpd-devel'
-    $default_ssl_cert     = '/etc/pki/tls/certs/localhost.crt'
-    $default_ssl_key      = '/etc/pki/tls/private/localhost.key'
-    $ssl_certs_dir        = '/etc/pki/tls/certs'
-    $passenger_conf_file  = 'passenger_extra.conf'
-    $passenger_conf_package_file = 'passenger.conf'
-    $passenger_root       = undef
-    $passenger_ruby       = undef
-    $passenger_default_ruby = undef
-    $suphp_addhandler     = 'php5-script'
-    $suphp_engine         = 'off'
-    $suphp_configpath     = undef
-    $mod_packages         = {
-      'auth_kerb'   => 'mod_auth_kerb',
-      'authnz_ldap' => 'mod_authz_ldap',
-      'fastcgi'     => 'mod_fastcgi',
-      'fcgid'       => 'mod_fcgid',
-      'pagespeed'   => 'mod-pagespeed-stable',
-      'passenger'   => 'mod_passenger',
-      'perl'        => 'mod_perl',
-      'php5'        => $::apache::version::distrelease ? {
-        '5'     => 'php53',
-        default => 'php',
-      },
-      'proxy_html'  => 'mod_proxy_html',
-      'python'      => 'mod_python',
-      'shibboleth'  => 'shibboleth',
-      'ssl'         => 'mod_ssl',
-      'wsgi'        => 'mod_wsgi',
-      'dav_svn'     => 'mod_dav_svn',
-      'suphp'       => 'mod_suphp',
-      'xsendfile'   => 'mod_xsendfile',
-      'nss'         => 'mod_nss',
-    }
-    $mod_libs             = {
-      'php5' => 'libphp5.so',
-      'nss'  => 'libmodnss.so',
-    }
-    $conf_template        = 'apache/httpd.conf.erb'
-    $keepalive            = 'Off'
-    $keepalive_timeout    = 15
-    $max_keepalive_requests = 100
-    $fastcgi_lib_path     = undef
-    $mime_support_package = 'mailcap'
-    $mime_types_config    = '/etc/mime.types'
-  } elsif $::osfamily == 'Debian' {
-    $user                = 'www-data'
-    $group               = 'www-data'
-    $root_group          = 'root'
-    $apache_name         = 'apache2'
-    $service_name        = 'apache2'
-    $httpd_dir           = '/etc/apache2'
-    $server_root         = '/etc/apache2'
-    $conf_dir            = $httpd_dir
-    $confd_dir           = "${httpd_dir}/conf.d"
-    $mod_dir             = "${httpd_dir}/mods-available"
-    $mod_enable_dir      = "${httpd_dir}/mods-enabled"
-    $vhost_dir           = "${httpd_dir}/sites-available"
-    $vhost_enable_dir    = "${httpd_dir}/sites-enabled"
-    $conf_file           = 'apache2.conf'
-    $ports_file          = "${conf_dir}/ports.conf"
-    $logroot             = '/var/log/apache2'
-    $lib_path            = '/usr/lib/apache2/modules'
-    $mpm_module          = 'worker'
-    $dev_packages        = ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev']
-    $default_ssl_cert    = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
-    $default_ssl_key     = '/etc/ssl/private/ssl-cert-snakeoil.key'
-    $ssl_certs_dir       = '/etc/ssl/certs'
-    $suphp_addhandler    = 'x-httpd-php'
-    $suphp_engine        = 'off'
-    $suphp_configpath    = '/etc/php5/apache2'
-    $mod_packages        = {
-      'auth_kerb'   => 'libapache2-mod-auth-kerb',
-      'dav_svn'     => 'libapache2-svn',
-      'fastcgi'     => 'libapache2-mod-fastcgi',
-      'fcgid'       => 'libapache2-mod-fcgid',
-      'nss'         => 'libapache2-mod-nss',
-      'pagespeed'   => 'mod-pagespeed-stable',
-      'passenger'   => 'libapache2-mod-passenger',
-      'perl'        => 'libapache2-mod-perl2',
-      'php5'        => 'libapache2-mod-php5',
-      'proxy_html'  => 'libapache2-mod-proxy-html',
-      'python'      => 'libapache2-mod-python',
-      'rpaf'        => 'libapache2-mod-rpaf',
-      'suphp'       => 'libapache2-mod-suphp',
-      'wsgi'        => 'libapache2-mod-wsgi',
-      'xsendfile'   => 'libapache2-mod-xsendfile',
-    }
-    $mod_libs             = {
-      'php5' => 'libphp5.so',
-    }
-    $conf_template          = 'apache/httpd.conf.erb'
-    $keepalive              = 'Off'
-    $keepalive_timeout      = 15
-    $max_keepalive_requests = 100
-    $fastcgi_lib_path       = '/var/lib/apache2/fastcgi'
-    $mime_support_package = 'mime-support'
-    $mime_types_config    = '/etc/mime.types'
-
-    #
-    # Passenger-specific settings
-    #
-
-    $passenger_conf_file         = 'passenger.conf'
-    $passenger_conf_package_file = undef
-
-    case $::operatingsystem {
-      'Ubuntu': {
-        case $::lsbdistrelease {
-          '12.04': {
-            $passenger_root         = '/usr'
-            $passenger_ruby         = '/usr/bin/ruby'
-            $passenger_default_ruby = undef
-          }
-          '14.04': {
-            $passenger_root         = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini'
-            $passenger_ruby         = undef
-            $passenger_default_ruby = '/usr/bin/ruby'
-          }
-          default: {
-            # The following settings may or may not work on Ubuntu releases not
-            # supported by this module.
-            $passenger_root         = '/usr'
-            $passenger_ruby         = '/usr/bin/ruby'
-            $passenger_default_ruby = undef
-          }
-        }
-      }
-      'Debian': {
-        case $::lsbdistcodename {
-          'wheezy': {
-            $passenger_root         = '/usr'
-            $passenger_ruby         = '/usr/bin/ruby'
-            $passenger_default_ruby = undef
-          }
-          default: {
-            # The following settings may or may not work on Debian releases not
-            # supported by this module.
-            $passenger_root         = '/usr'
-            $passenger_ruby         = '/usr/bin/ruby'
-            $passenger_default_ruby = undef
-          }
-        }
-      }
-    }
-  } elsif $::osfamily == 'FreeBSD' {
-    $user             = 'www'
-    $group            = 'www'
-    $root_group       = 'wheel'
-    $apache_name      = 'apache22'
-    $service_name     = 'apache22'
-    $httpd_dir        = '/usr/local/etc/apache22'
-    $server_root      = '/usr/local'
-    $conf_dir         = $httpd_dir
-    $confd_dir        = "${httpd_dir}/Includes"
-    $mod_dir          = "${httpd_dir}/Modules"
-    $mod_enable_dir   = undef
-    $vhost_dir        = "${httpd_dir}/Vhosts"
-    $vhost_enable_dir = undef
-    $conf_file        = 'httpd.conf'
-    $ports_file       = "${conf_dir}/ports.conf"
-    $logroot          = '/var/log/apache22'
-    $lib_path         = '/usr/local/libexec/apache22'
-    $mpm_module       = 'prefork'
-    $dev_packages     = undef
-    $default_ssl_cert = '/usr/local/etc/apache22/server.crt'
-    $default_ssl_key  = '/usr/local/etc/apache22/server.key'
-    $ssl_certs_dir    = '/usr/local/etc/apache22'
-    $passenger_conf_file = 'passenger.conf'
-    $passenger_conf_package_file = undef
-    $passenger_root   = '/usr/local/lib/ruby/gems/1.9/gems/passenger-4.0.10'
-    $passenger_ruby   = '/usr/bin/ruby'
-    $passenger_default_ruby = undef
-    $suphp_addhandler = 'php5-script'
-    $suphp_engine     = 'off'
-    $suphp_configpath = undef
-    $mod_packages     = {
-      # NOTE: I list here only modules that are not included in www/apache22
-      # NOTE: 'passenger' needs to enable APACHE_SUPPORT in make config
-      # NOTE: 'php' needs to enable APACHE option in make config
-      # NOTE: 'dav_svn' needs to enable MOD_DAV_SVN make config
-      # NOTE: not sure where the shibboleth should come from
-      # NOTE: don't know where the shibboleth module should come from
-      'auth_kerb'  => 'www/mod_auth_kerb2',
-      'fcgid'      => 'www/mod_fcgid',
-      'passenger'  => 'www/rubygem-passenger',
-      'perl'       => 'www/mod_perl2',
-      'php5'       => 'lang/php5',
-      'proxy_html' => 'www/mod_proxy_html',
-      'python'     => 'www/mod_python3',
-      'wsgi'       => 'www/mod_wsgi',
-      'dav_svn'    => 'devel/subversion',
-      'xsendfile'  => 'www/mod_xsendfile',
-      'rpaf'       => 'www/mod_rpaf2'
-    }
-    $mod_libs         = {
-      'php5' => 'libphp5.so',
-    }
-    $conf_template        = 'apache/httpd.conf.erb'
-    $keepalive            = 'Off'
-    $keepalive_timeout    = 15
-    $max_keepalive_requests = 100
-    $fastcgi_lib_path     = undef # TODO: revisit
-    $mime_support_package = 'misc/mime-support'
-    $mime_types_config    = '/usr/local/etc/mime.types'
-  } else {
-    fail("Class['apache::params']: Unsupported osfamily: ${::osfamily}")
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/peruser/multiplexer.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/peruser/multiplexer.pp
deleted file mode 100644
index 9e57ac30b2..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/peruser/multiplexer.pp
+++ /dev/null
@@ -1,17 +0,0 @@
-define apache::peruser::multiplexer (
-  $user = $::apache::user,
-  $group = $::apache::group,
-  $file = undef,
-) {
-  if ! $file {
-    $filename = "${name}.conf"
-  } else {
-    $filename = $file
-  }
-  file { "${::apache::mod_dir}/peruser/multiplexers/${filename}":
-    ensure  => file,
-    content => "Multiplexer ${user} ${group}\n",
-    require => File["${::apache::mod_dir}/peruser/multiplexers"],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/peruser/processor.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/peruser/processor.pp
deleted file mode 100644
index 1d68934657..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/peruser/processor.pp
+++ /dev/null
@@ -1,17 +0,0 @@
-define apache::peruser::processor (
-  $user,
-  $group,
-  $file = undef,
-) {
-  if ! $file {
-    $filename = "${name}.conf"
-  } else {
-    $filename = $file
-  }
-  file { "${::apache::mod_dir}/peruser/processors/${filename}":
-    ensure  => file,
-    content => "Processor ${user} ${group}\n",
-    require => File["${::apache::mod_dir}/peruser/processors"],
-    notify  => Service['httpd'],
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/php.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/php.pp
deleted file mode 100644
index 9fa9c682e2..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/php.pp
+++ /dev/null
@@ -1,18 +0,0 @@
-# Class: apache::php
-#
-# This class installs PHP for Apache
-#
-# Parameters:
-# - $php_package
-#
-# Actions:
-#   - Install Apache PHP package
-#
-# Requires:
-#
-# Sample Usage:
-#
-class apache::php {
-  warning('apache::php is deprecated; please use apache::mod::php')
-  include ::apache::mod::php
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/proxy.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/proxy.pp
deleted file mode 100644
index 050f36c278..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/proxy.pp
+++ /dev/null
@@ -1,15 +0,0 @@
-# Class: apache::proxy
-#
-# This class enabled the proxy module for Apache
-#
-# Actions:
-#   - Enables Apache Proxy module
-#
-# Requires:
-#
-# Sample Usage:
-#
-class apache::proxy {
-  warning('apache::proxy is deprecated; please use apache::mod::proxy')
-  include ::apache::mod::proxy
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/python.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/python.pp
deleted file mode 100644
index 723a753f82..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/python.pp
+++ /dev/null
@@ -1,18 +0,0 @@
-# Class: apache::python
-#
-# This class installs Python for Apache
-#
-# Parameters:
-# - $php_package
-#
-# Actions:
-#   - Install Apache Python package
-#
-# Requires:
-#
-# Sample Usage:
-#
-class apache::python {
-  warning('apache::python is deprecated; please use apache::mod::python')
-  include ::apache::mod::python
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/service.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/service.pp
deleted file mode 100644
index 0c1f7b96aa..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/service.pp
+++ /dev/null
@@ -1,44 +0,0 @@
-# Class: apache::service
-#
-# Manages the Apache daemon
-#
-# Parameters:
-#
-# Actions:
-#   - Manage Apache service
-#
-# Requires:
-#
-# Sample Usage:
-#
-#    sometype { 'foo':
-#      notify => Class['apache::service'],
-#    }
-#
-#
-class apache::service (
-  $service_name   = $::apache::params::service_name,
-  $service_enable = true,
-  $service_ensure = 'running',
-) {
-  # The base class must be included first because parameter defaults depend on it
-  if ! defined(Class['apache::params']) {
-    fail('You must include the apache::params class before using any apache defined resources')
-  }
-  validate_bool($service_enable)
-
-  case $service_ensure {
-    true, false, 'running', 'stopped': {
-      $_service_ensure = $service_ensure
-    }
-    default: {
-      $_service_ensure = undef
-    }
-  }
-
-  service { 'httpd':
-    ensure => $_service_ensure,
-    name   => $service_name,
-    enable => $service_enable,
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/ssl.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/ssl.pp
deleted file mode 100644
index d0b36593d6..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/ssl.pp
+++ /dev/null
@@ -1,18 +0,0 @@
-# Class: apache::ssl
-#
-# This class installs Apache SSL capabilities
-#
-# Parameters:
-# - The $ssl_package name from the apache::params class
-#
-# Actions:
-#   - Install Apache SSL capabilities
-#
-# Requires:
-#
-# Sample Usage:
-#
-class apache::ssl {
-  warning('apache::ssl is deprecated; please use apache::mod::ssl')
-  include ::apache::mod::ssl
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/version.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/version.pp
deleted file mode 100644
index a8592d5e95..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/version.pp
+++ /dev/null
@@ -1,35 +0,0 @@
-# Class: apache::version
-#
-# Try to automatically detect the version by OS
-#
-class apache::version {
-  # This will be 5 or 6 on RedHat, 6 or wheezy on Debian, 12 or quantal on Ubuntu, 3 on Amazon, etc.
-  $osr_array = split($::operatingsystemrelease,'[\/\.]')
-  $distrelease = $osr_array[0]
-  if ! $distrelease {
-    fail("Class['apache::params']: Unparsable \$::operatingsystemrelease: ${::operatingsystemrelease}")
-  }
-
-  case $::osfamily {
-    'RedHat': {
-      if ($::operatingsystem == 'Fedora' and $distrelease >= 18) or ($::operatingsystem != 'Fedora' and $distrelease >= 7) {
-        $default = '2.4'
-      } else {
-        $default = '2.2'
-      }
-    }
-    'Debian': {
-      if $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease >= 13.10 {
-        $default = '2.4'
-      } else {
-        $default = '2.2'
-      }
-    }
-    'FreeBSD': {
-      $default = '2.2'
-    }
-    default: {
-      fail("Class['apache::version']: Unsupported osfamily: ${::osfamily}")
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/vhost.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/vhost.pp
deleted file mode 100644
index 40edad7e21..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/manifests/vhost.pp
+++ /dev/null
@@ -1,560 +0,0 @@
-# Definition: apache::vhost
-#
-# This class installs Apache Virtual Hosts
-#
-# Parameters:
-# - The $port to configure the host on
-# - The $docroot provides the DocumentRoot variable
-# - The $virtual_docroot provides VirtualDocumentationRoot variable
-# - The $serveradmin will specify an email address for Apache that it will
-#   display when it renders one of it's error pages
-# - The $ssl option is set true or false to enable SSL for this Virtual Host
-# - The $priority of the site
-# - The $servername is the primary name of the virtual host
-# - The $serveraliases of the site
-# - The $ip to configure the host on, defaulting to *
-# - The $options for the given vhost
-# - The $override for the given vhost (list of AllowOverride arguments)
-# - The $vhost_name for name based virtualhosting, defaulting to *
-# - The $logroot specifies the location of the virtual hosts logfiles, default
-#   to /var/log//
-# - The $log_level specifies the verbosity of the error log for this vhost. Not
-#   set by default for the vhost, instead the global server configuration default
-#   of 'warn' is used.
-# - The $access_log specifies if *_access.log directives should be configured.
-# - The $ensure specifies if vhost file is present or absent.
-# - The $headers is a list of Header statement strings as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header
-# - The $request_headers is a list of RequestHeader statement strings as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader
-# - $aliases is a list of Alias hashes for mod_alias as per http://httpd.apache.org/docs/current/mod/mod_alias.html
-#   each statement is a hash in the form of { alias => '/alias', path => '/real/path/to/directory' }
-# - $directories is a lost of hashes for creating  statements as per http://httpd.apache.org/docs/2.2/mod/core.html#directory
-#   each statement is a hash in the form of { path => '/path/to/directory',  => }
-#   see README.md for list of supported directives.
-#
-# Actions:
-# - Install Apache Virtual Hosts
-#
-# Requires:
-# - The apache class
-#
-# Sample Usage:
-#
-#  # Simple vhost definition:
-#  apache::vhost { 'site.name.fqdn':
-#    port => '80',
-#    docroot => '/path/to/docroot',
-#  }
-#
-#  # Multiple Mod Rewrites:
-#  apache::vhost { 'site.name.fqdn':
-#    port => '80',
-#    docroot => '/path/to/docroot',
-#    rewrites => [
-#      {
-#        comment       => 'force www domain',
-#        rewrite_cond => ['%{HTTP_HOST} ^([a-z.]+)?example.com$ [NC]', '%{HTTP_HOST} !^www. [NC]'],
-#        rewrite_rule => ['.? http://www.%1example.com%{REQUEST_URI} [R=301,L]']
-#      },
-#      {
-#        comment       => 'prevent image hotlinking',
-#        rewrite_cond => ['%{HTTP_REFERER} !^$', '%{HTTP_REFERER} !^http://(www.)?example.com/ [NC]'],
-#        rewrite_rule => ['.(gif|jpg|png)$ - [F]']
-#      },
-#    ]
-#  }
-#
-#  # SSL vhost with non-SSL rewrite:
-#  apache::vhost { 'site.name.fqdn':
-#    port    => '443',
-#    ssl     => true,
-#    docroot => '/path/to/docroot',
-#  }
-#  apache::vhost { 'site.name.fqdn':
-#    port            => '80',
-#    docroot         => '/path/to/other_docroot',
-#    custom_fragment => template("${module_name}/my_fragment.erb"),
-#  }
-#
-define apache::vhost(
-    $docroot,
-    $virtual_docroot             = false,
-    $port                        = undef,
-    $ip                          = undef,
-    $ip_based                    = false,
-    $add_listen                  = true,
-    $docroot_owner               = 'root',
-    $docroot_group               = $::apache::params::root_group,
-    $docroot_mode                = undef,
-    $serveradmin                 = undef,
-    $ssl                         = false,
-    $ssl_cert                    = $::apache::default_ssl_cert,
-    $ssl_key                     = $::apache::default_ssl_key,
-    $ssl_chain                   = $::apache::default_ssl_chain,
-    $ssl_ca                      = $::apache::default_ssl_ca,
-    $ssl_crl_path                = $::apache::default_ssl_crl_path,
-    $ssl_crl                     = $::apache::default_ssl_crl,
-    $ssl_certs_dir               = $::apache::params::ssl_certs_dir,
-    $ssl_protocol                = undef,
-    $ssl_cipher                  = undef,
-    $ssl_honorcipherorder        = undef,
-    $ssl_verify_client           = undef,
-    $ssl_verify_depth            = undef,
-    $ssl_options                 = undef,
-    $ssl_proxyengine             = false,
-    $priority                    = undef,
-    $default_vhost               = false,
-    $servername                  = $name,
-    $serveraliases               = [],
-    $options                     = ['Indexes','FollowSymLinks','MultiViews'],
-    $override                    = ['None'],
-    $directoryindex              = '',
-    $vhost_name                  = '*',
-    $logroot                     = $::apache::logroot,
-    $log_level                   = undef,
-    $access_log                  = true,
-    $access_log_file             = undef,
-    $access_log_pipe             = undef,
-    $access_log_syslog           = undef,
-    $access_log_format           = undef,
-    $access_log_env_var          = undef,
-    $aliases                     = undef,
-    $directories                 = undef,
-    $error_log                   = true,
-    $error_log_file              = undef,
-    $error_log_pipe              = undef,
-    $error_log_syslog            = undef,
-    $error_documents             = [],
-    $fallbackresource            = undef,
-    $scriptalias                 = undef,
-    $scriptaliases               = [],
-    $proxy_dest                  = undef,
-    $proxy_pass                  = undef,
-    $suphp_addhandler            = $::apache::params::suphp_addhandler,
-    $suphp_engine                = $::apache::params::suphp_engine,
-    $suphp_configpath            = $::apache::params::suphp_configpath,
-    $php_admin_flags             = [],
-    $php_admin_values            = [],
-    $no_proxy_uris               = [],
-    $proxy_preserve_host         = false,
-    $redirect_source             = '/',
-    $redirect_dest               = undef,
-    $redirect_status             = undef,
-    $redirectmatch_status        = undef,
-    $redirectmatch_regexp        = undef,
-    $rack_base_uris              = undef,
-    $headers                     = undef,
-    $request_headers             = undef,
-    $rewrites                    = undef,
-    $rewrite_base                = undef,
-    $rewrite_rule                = undef,
-    $rewrite_cond                = undef,
-    $setenv                      = [],
-    $setenvif                    = [],
-    $block                       = [],
-    $ensure                      = 'present',
-    $wsgi_application_group      = undef,
-    $wsgi_daemon_process         = undef,
-    $wsgi_daemon_process_options = undef,
-    $wsgi_import_script          = undef,
-    $wsgi_import_script_options  = undef,
-    $wsgi_process_group          = undef,
-    $wsgi_script_aliases         = undef,
-    $wsgi_pass_authorization     = undef,
-    $custom_fragment             = undef,
-    $itk                         = undef,
-    $action                      = undef,
-    $fastcgi_server              = undef,
-    $fastcgi_socket              = undef,
-    $fastcgi_dir                 = undef,
-    $additional_includes         = [],
-    $apache_version              = $::apache::apache_version,
-    $suexec_user_group           = undef,
-  ) {
-  # The base class must be included first because it is used by parameter defaults
-  if ! defined(Class['apache']) {
-    fail('You must include the apache base class before using any apache defined resources')
-  }
-
-  $apache_name = $::apache::params::apache_name
-
-  validate_re($ensure, '^(present|absent)$',
-  "${ensure} is not supported for ensure.
-  Allowed values are 'present' and 'absent'.")
-  validate_re($suphp_engine, '^(on|off)$',
-  "${suphp_engine} is not supported for suphp_engine.
-  Allowed values are 'on' and 'off'.")
-  validate_bool($ip_based)
-  validate_bool($access_log)
-  validate_bool($error_log)
-  validate_bool($ssl)
-  validate_bool($default_vhost)
-  validate_bool($ssl_proxyengine)
-  if $rewrites {
-    validate_array($rewrites)
-    validate_hash($rewrites[0])
-  }
-
-  if $suexec_user_group {
-    validate_re($suexec_user_group, '^\w+ \w+$',
-    "${suexec_user_group} is not supported for suexec_user_group.  Must be 'user group'.")
-  }
-
-  # Deprecated backwards-compatibility
-  if $rewrite_base {
-    warning('Apache::Vhost: parameter rewrite_base is deprecated in favor of rewrites')
-  }
-  if $rewrite_rule {
-    warning('Apache::Vhost: parameter rewrite_rule is deprecated in favor of rewrites')
-  }
-  if $rewrite_cond {
-    warning('Apache::Vhost parameter rewrite_cond is deprecated in favor of rewrites')
-  }
-
-  if $wsgi_script_aliases {
-    validate_hash($wsgi_script_aliases)
-  }
-  if $wsgi_daemon_process_options {
-    validate_hash($wsgi_daemon_process_options)
-  }
-  if $wsgi_import_script_options {
-    validate_hash($wsgi_import_script_options)
-  }
-  if $itk {
-    validate_hash($itk)
-  }
-
-  if $log_level {
-    validate_re($log_level, '^(emerg|alert|crit|error|warn|notice|info|debug)$',
-    "Log level '${log_level}' is not one of the supported Apache HTTP Server log levels.")
-  }
-
-  if $access_log_file and $access_log_pipe {
-    fail("Apache::Vhost[${name}]: 'access_log_file' and 'access_log_pipe' cannot be defined at the same time")
-  }
-
-  if $error_log_file and $error_log_pipe {
-    fail("Apache::Vhost[${name}]: 'error_log_file' and 'error_log_pipe' cannot be defined at the same time")
-  }
-
-  if $fallbackresource {
-    validate_re($fallbackresource, '^/|disabled', 'Please make sure fallbackresource starts with a / (or is "disabled")')
-  }
-
-  if $ssl and $ensure == 'present' {
-    include ::apache::mod::ssl
-    # Required for the AddType lines.
-    include ::apache::mod::mime
-  }
-
-  if $virtual_docroot {
-    include ::apache::mod::vhost_alias
-  }
-
-  if $wsgi_daemon_process {
-    include ::apache::mod::wsgi
-  }
-
-  if $suexec_user_group {
-    include ::apache::mod::suexec
-  }
-
-  # This ensures that the docroot exists
-  # But enables it to be specified across multiple vhost resources
-  if ! defined(File[$docroot]) {
-    file { $docroot:
-      ensure  => directory,
-      owner   => $docroot_owner,
-      group   => $docroot_group,
-      mode    => $docroot_mode,
-      require => Package['httpd'],
-    }
-  }
-
-  # Same as above, but for logroot
-  if ! defined(File[$logroot]) {
-    file { $logroot:
-      ensure  => directory,
-      require => Package['httpd'],
-    }
-  }
-
-
-  # Is apache::mod::passenger enabled (or apache::mod['passenger'])
-  $passenger_enabled = defined(Apache::Mod['passenger'])
-
-  # Define log file names
-  if $access_log_file {
-    $access_log_destination = "${logroot}/${access_log_file}"
-  } elsif $access_log_pipe {
-    $access_log_destination = $access_log_pipe
-  } elsif $access_log_syslog {
-    $access_log_destination = $access_log_syslog
-  } else {
-    if $ssl {
-      $access_log_destination = "${logroot}/${name}_access_ssl.log"
-    } else {
-      $access_log_destination = "${logroot}/${name}_access.log"
-    }
-  }
-
-  if $error_log_file {
-    $error_log_destination = "${logroot}/${error_log_file}"
-  } elsif $error_log_pipe {
-    $error_log_destination = $error_log_pipe
-  } elsif $error_log_syslog {
-    $error_log_destination = $error_log_syslog
-  } else {
-    if $ssl {
-      $error_log_destination = "${logroot}/${name}_error_ssl.log"
-    } else {
-      $error_log_destination = "${logroot}/${name}_error.log"
-    }
-  }
-
-  # Set access log format
-  if $access_log_format {
-    $_access_log_format = "\"${access_log_format}\""
-  } else {
-    $_access_log_format = 'combined'
-  }
-
-  if $access_log_env_var {
-    $_access_log_env_var = "env=${access_log_env_var}"
-  }
-
-  if $ip {
-    if $port {
-      $listen_addr_port = "${ip}:${port}"
-      $nvh_addr_port = "${ip}:${port}"
-    } else {
-      $listen_addr_port = undef
-      $nvh_addr_port = $ip
-      if ! $servername and ! $ip_based {
-        fail("Apache::Vhost[${name}]: must pass 'ip' and/or 'port' parameters for name-based vhosts")
-      }
-    }
-  } else {
-    if $port {
-      $listen_addr_port = $port
-      $nvh_addr_port = "${vhost_name}:${port}"
-    } else {
-      $listen_addr_port = undef
-      $nvh_addr_port = $name
-      if ! $servername {
-        fail("Apache::Vhost[${name}]: must pass 'ip' and/or 'port' parameters, and/or 'servername' parameter")
-      }
-    }
-  }
-  if $add_listen {
-    if $ip and defined(Apache::Listen[$port]) {
-      fail("Apache::Vhost[${name}]: Mixing IP and non-IP Listen directives is not possible; check the add_listen parameter of the apache::vhost define to disable this")
-    }
-    if ! defined(Apache::Listen[$listen_addr_port]) and $listen_addr_port and $ensure == 'present' {
-      ::apache::listen { $listen_addr_port: }
-    }
-  }
-  if ! $ip_based {
-    if ! defined(Apache::Namevirtualhost[$nvh_addr_port]) and $ensure == 'present' and (versioncmp($apache_version, '2.4') < 0) {
-      ::apache::namevirtualhost { $nvh_addr_port: }
-    }
-  }
-
-  # Load mod_rewrite if needed and not yet loaded
-  if $rewrites or $rewrite_cond {
-    if ! defined(Class['apache::mod::rewrite']) {
-      include ::apache::mod::rewrite
-    }
-  }
-
-  # Load mod_alias if needed and not yet loaded
-  if ($scriptalias or $scriptaliases != []) or ($redirect_source and $redirect_dest) {
-    if ! defined(Class['apache::mod::alias']) {
-      include ::apache::mod::alias
-    }
-  }
-
-  # Load mod_proxy if needed and not yet loaded
-  if ($proxy_dest or $proxy_pass) {
-    if ! defined(Class['apache::mod::proxy']) {
-      include ::apache::mod::proxy
-    }
-    if ! defined(Class['apache::mod::proxy_http']) {
-      include ::apache::mod::proxy_http
-    }
-  }
-
-  # Load mod_passenger if needed and not yet loaded
-  if $rack_base_uris {
-    if ! defined(Class['apache::mod::passenger']) {
-      include ::apache::mod::passenger
-    }
-  }
-
-  # Load mod_fastci if needed and not yet loaded
-  if $fastcgi_server and $fastcgi_socket {
-    if ! defined(Class['apache::mod::fastcgi']) {
-      include ::apache::mod::fastcgi
-    }
-  }
-
-  # Configure the defaultness of a vhost
-  if $priority {
-    $priority_real = $priority
-  } elsif $default_vhost {
-    $priority_real = '10'
-  } else {
-    $priority_real = '25'
-  }
-
-  # Check if mod_headers is required to process $headers/$request_headers
-  if $headers or $request_headers {
-    if ! defined(Class['apache::mod::headers']) {
-      include ::apache::mod::headers
-    }
-  }
-
-  ## Apache include does not always work with spaces in the filename
-  $filename = regsubst($name, ' ', '_', 'G')
-
-  ## Create a default directory list if none defined
-  if $directories {
-    if !is_hash($directories) and !(is_array($directories) and is_hash($directories[0])) {
-      fail("Apache::Vhost[${name}]: 'directories' must be either a Hash or an Array of Hashes")
-    }
-    $_directories = $directories
-  } else {
-    $_directory = {
-      provider       => 'directory',
-      path           => $docroot,
-      options        => $options,
-      allow_override => $override,
-      directoryindex => $directoryindex,
-    }
-
-    if versioncmp($apache_version, '2.4') >= 0 {
-      $_directory_version = {
-        require => 'all granted',
-      }
-    } else {
-      $_directory_version = {
-        order => 'allow,deny',
-        allow => 'from all',
-      }
-    }
-
-    $_directories = [ merge($_directory, $_directory_version) ]
-  }
-
-  # Template uses:
-  # - $nvh_addr_port
-  # - $servername
-  # - $serveradmin
-  # - $docroot
-  # - $virtual_docroot
-  # - $options
-  # - $override
-  # - $logroot
-  # - $name
-  # - $aliases
-  # - $_directories
-  # - $log_level
-  # - $access_log
-  # - $access_log_destination
-  # - $_access_log_format
-  # - $_access_log_env_var
-  # - $error_log
-  # - $error_log_destination
-  # - $error_documents
-  # - $fallbackresource
-  # - $custom_fragment
-  # - $additional_includes
-  # block fragment:
-  #   - $block
-  # directories fragment:
-  #   - $passenger_enabled
-  #   - $php_admin_flags
-  #   - $php_admin_values
-  #   - $directories (a list of key-value hashes is expected)
-  # fastcgi fragment:
-  #   - $fastcgi_server
-  #   - $fastcgi_socket
-  #   - $fastcgi_dir
-  # proxy fragment:
-  #   - $proxy_dest
-  #   - $no_proxy_uris
-  #   - $proxy_preserve_host (true to set ProxyPreserveHost to on and false to off
-  # rack fragment:
-  #   - $rack_base_uris
-  # redirect fragment:
-  #   - $redirect_source
-  #   - $redirect_dest
-  #   - $redirect_status
-  # header fragment
-  #   - $headers
-  # requestheader fragment:
-  #   - $request_headers
-  # rewrite fragment:
-  #   - $rewrites
-  # scriptalias fragment:
-  #   - $scriptalias
-  #   - $scriptaliases
-  #   - $ssl
-  # serveralias fragment:
-  #   - $serveraliases
-  # setenv fragment:
-  #   - $setenv
-  #   - $setenvif
-  # ssl fragment:
-  #   - $ssl
-  #   - $ssl_cert
-  #   - $ssl_key
-  #   - $ssl_chain
-  #   - $ssl_certs_dir
-  #   - $ssl_ca
-  #   - $ssl_crl
-  #   - $ssl_crl_path
-  #   - $ssl_verify_client
-  #   - $ssl_verify_depth
-  #   - $ssl_options
-  # suphp fragment:
-  #   - $suphp_addhandler
-  #   - $suphp_engine
-  #   - $suphp_configpath
-  # wsgi fragment:
-  #   - $wsgi_application_group
-  #   - $wsgi_daemon_process
-  #   - $wsgi_import_script
-  #   - $wsgi_process_group
-  #   - $wsgi_script_aliases
-  file { "${priority_real}-${filename}.conf":
-    ensure  => $ensure,
-    path    => "${::apache::vhost_dir}/${priority_real}-${filename}.conf",
-    content => template('apache/vhost.conf.erb'),
-    owner   => 'root',
-    group   => $::apache::params::root_group,
-    mode    => '0644',
-    require => [
-      Package['httpd'],
-      File[$docroot],
-      File[$logroot],
-    ],
-    notify  => Service['httpd'],
-  }
-  if $::osfamily == 'Debian' {
-    $vhost_enable_dir = $::apache::vhost_enable_dir
-    $vhost_symlink_ensure = $ensure ? {
-      present => link,
-      default => $ensure,
-    }
-    file{ "${priority_real}-${filename}.conf symlink":
-      ensure  => $vhost_symlink_ensure,
-      path    => "${vhost_enable_dir}/${priority_real}-${filename}.conf",
-      target  => "${::apache::vhost_dir}/${priority_real}-${filename}.conf",
-      owner   => 'root',
-      group   => $::apache::params::root_group,
-      mode    => '0644',
-      require => File["${priority_real}-${filename}.conf"],
-      notify  => Service['httpd'],
-    }
-  }
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/metadata.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/metadata.json
deleted file mode 100644
index 92663a43c4..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/metadata.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
-    "name": "puppetlabs-apache",
-    "version": "1.0.1",
-    "source": "https://github.com/puppetlabs/puppetlabs-apache",
-    "author": "Puppet Labs",
-    "license": "Apache-2.0",
-    "project_page": "https://github.com/puppetlabs/puppetlabs-apache",
-    "summary": "Puppet module for Apache",
-    "operatingsystem_support": [
-      {
-        "operatingsystem": "RedHat",
-        "operatingsystemrelease": [
-          "5",
-          "6",
-          "7"
-        ]
-      },
-      {
-        "operatingsystem": "CentOS",
-        "operatingsystemrelease": [
-          "5",
-          "6",
-          "7"
-
-        ]
-      },
-      {
-        "operatingsystem": "OracleLinux",
-        "operatingsystemrelease": [
-          "5",
-          "6",
-          "7"
-
-        ]
-      },
-      {
-        "operatingsystem": "Scientific",
-        "operatingsystemrelease": [
-          "5",
-          "6",
-          "7"
-
-        ]
-      },
-      {
-        "operatingsystem": "Debian",
-        "operatingsystemrelease": [
-          "6",
-          "7"
-        ]
-      },
-      {
-        "operatingsystem": "Ubuntu",
-        "operatingsystemrelease": [
-          "10.04",
-          "12.04",
-          "14.04"
-        ]
-      }
-    ],
-    "requirements": [
-      { "name": "puppet", "version_requirement": "3.x" }
-    ],
-    "dependencies": []
-}
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/apache_parameters_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/apache_parameters_spec.rb
deleted file mode 100644
index 4fa3bf6ec6..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/apache_parameters_spec.rb
+++ /dev/null
@@ -1,446 +0,0 @@
-require 'spec_helper_acceptance'
-require_relative './version.rb'
-
-describe 'apache parameters', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-
-  # Currently this test only does something on FreeBSD.
-  describe 'default_confd_files => false' do
-    it 'doesnt do anything' do
-      pp = "class { 'apache': default_confd_files => false }"
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    if fact('osfamily') == 'FreeBSD'
-      describe file("#{confd_dir}/no-accf.conf.erb") do
-        it { should_not be_file }
-      end
-    end
-  end
-  describe 'default_confd_files => true' do
-    it 'copies conf.d files' do
-      pp = "class { 'apache': default_confd_files => true }"
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    if fact('osfamily') == 'FreeBSD'
-      describe file("#{$confd_dir}/no-accf.conf.erb") do
-        it { should be_file }
-      end
-    end
-  end
-
-  describe 'when set adds a listen statement' do
-    it 'applys cleanly' do
-      pp = "class { 'apache': ip => '10.1.1.1', service_ensure => stopped }"
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file($ports_file) do
-      it { should be_file }
-      it { should contain 'Listen 10.1.1.1' }
-    end
-  end
-
-  describe 'service tests => true' do
-    it 'starts the service' do
-      pp = <<-EOS
-        class { 'apache':
-          service_enable => true,
-          service_ensure => running,
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe service($service_name) do
-      it { should be_running }
-      it { should be_enabled }
-    end
-  end
-
-  describe 'service tests => false' do
-    it 'stops the service' do
-      pp = <<-EOS
-        class { 'apache':
-          service_enable => false,
-          service_ensure => stopped,
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe service($service_name) do
-      it { should_not be_running }
-      it { should_not be_enabled }
-    end
-  end
-
-  describe 'purge parameters => false' do
-    it 'applies cleanly' do
-      pp = <<-EOS
-        class { 'apache':
-          purge_configs => false,
-          purge_vdir    => false,
-        }
-      EOS
-      shell("touch #{$confd_dir}/test.conf")
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    # Ensure the file didn't disappear.
-    describe file("#{$confd_dir}/test.conf") do
-      it { should be_file }
-    end
-  end
-
-  if fact('osfamily') != 'Debian'
-    describe 'purge parameters => true' do
-      it 'applies cleanly' do
-        pp = <<-EOS
-          class { 'apache':
-            purge_configs => true,
-            purge_vdir    => true,
-          }
-        EOS
-        shell("touch #{$confd_dir}/test.conf")
-        apply_manifest(pp, :catch_failures => true)
-      end
-
-      # File should be gone
-      describe file("#{$confd_dir}/test.conf") do
-        it { should_not be_file }
-      end
-    end
-  end
-
-  describe 'serveradmin' do
-    it 'applies cleanly' do
-      pp = "class { 'apache': serveradmin => 'test@example.com' }"
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file($vhost) do
-      it { should be_file }
-      it { should contain 'ServerAdmin test@example.com' }
-    end
-  end
-
-  describe 'sendfile' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': sendfile => 'On' }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { should be_file }
-      it { should contain 'EnableSendfile On' }
-    end
-
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': sendfile => 'Off' }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { should be_file }
-      it { should contain 'Sendfile Off' }
-    end
-  end
-
-  describe 'error_documents' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': error_documents => true }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { should be_file }
-      it { should contain 'Alias /error/' }
-    end
-  end
-
-  describe 'timeout' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': timeout => '1234' }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { should be_file }
-      it { should contain 'Timeout 1234' }
-    end
-  end
-
-  describe 'httpd_dir' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = <<-EOS
-          class { 'apache': httpd_dir => '/tmp', service_ensure => stopped }
-          include 'apache::mod::mime'
-        EOS
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file("#{$confd_dir}/mime.conf") do
-      it { should be_file }
-      it { should contain 'AddLanguage eo .eo' }
-    end
-  end
-
-  describe 'server_root' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': server_root => '/tmp/root', service_ensure => stopped }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { should be_file }
-      it { should contain 'ServerRoot "/tmp/root"' }
-    end
-  end
-
-  describe 'confd_dir' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': confd_dir => '/tmp/root', service_ensure => stopped }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    if $apache_version == '2.4'
-      describe file($conf_file) do
-        it { should be_file }
-        it { should contain 'IncludeOptional "/tmp/root/*.conf"' }
-      end
-    else
-      describe file($conf_file) do
-        it { should be_file }
-        it { should contain 'Include "/tmp/root/*.conf"' }
-      end
-    end
-  end
-
-  describe 'conf_template' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': conf_template => 'another/test.conf.erb', service_ensure => stopped }"
-        shell("mkdir -p #{default['distmoduledir']}/another/templates")
-        shell("echo 'testcontent' >> #{default['distmoduledir']}/another/templates/test.conf.erb")
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { should be_file }
-      it { should contain 'testcontent' }
-    end
-  end
-
-  describe 'servername' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': servername => 'test.server', service_ensure => stopped }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { should be_file }
-      it { should contain 'ServerName "test.server"' }
-    end
-  end
-
-  describe 'user' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = <<-EOS
-          class { 'apache':
-            manage_user  => true,
-            manage_group => true,
-            user         => 'testweb',
-            group        => 'testweb',
-          }
-        EOS
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe user('testweb') do
-      it { should exist }
-      it { should belong_to_group 'testweb' }
-    end
-
-    describe group('testweb') do
-      it { should exist }
-    end
-  end
-
-  describe 'logformats' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = <<-EOS
-          class { 'apache':
-            log_formats => {
-              'vhost_common'   => '%v %h %l %u %t \\\"%r\\\" %>s %b',
-              'vhost_combined' => '%v %h %l %u %t \\\"%r\\\" %>s %b \\\"%{Referer}i\\\" \\\"%{User-agent}i\\\"',
-            }
-          }
-        EOS
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { should be_file }
-      it { should contain 'LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common' }
-      it { should contain 'LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" vhost_combined' }
-    end
-  end
-
-
-  describe 'keepalive' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = "class { 'apache': keepalive => 'On', keepalive_timeout => '30', max_keepalive_requests => '200' }"
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file($conf_file) do
-      it { should be_file }
-      it { should contain 'KeepAlive On' }
-      it { should contain 'KeepAliveTimeout 30' }
-      it { should contain 'MaxKeepAliveRequests 200' }
-    end
-  end
-
-  describe 'logging' do
-    describe 'setup' do
-      it 'applies cleanly' do
-        pp = <<-EOS
-          if $::osfamily == 'RedHat' and $::selinux == 'true' {
-            $semanage_package = $::operatingsystemmajrelease ? {
-              '5'       => 'policycoreutils',
-              'default' => 'policycoreutils-python',
-            }
-
-            package { $semanage_package: ensure => installed }
-            exec { 'set_apache_defaults':
-              command => 'semanage fcontext -a -t httpd_log_t "/apache_spec(/.*)?"',
-              path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
-              require => Package[$semanage_package],
-            }
-            exec { 'restorecon_apache':
-              command => 'restorecon -Rv /apache_spec',
-              path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
-              before  => Service['httpd'],
-              require => Class['apache'],
-            }
-          }
-          file { '/apache_spec': ensure => directory, }
-          class { 'apache': logroot => '/apache_spec' }
-        EOS
-        apply_manifest(pp, :catch_failures => true)
-      end
-    end
-
-    describe file("/apache_spec/#{$error_log}") do
-      it { should be_file }
-    end
-  end
-
-  describe 'ports_file' do
-    it 'applys cleanly' do
-      pp = <<-EOS
-        file { '/apache_spec': ensure => directory, }
-        class { 'apache':
-          ports_file     => '/apache_spec/ports_file',
-          ip             => '10.1.1.1',
-          service_ensure => stopped
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file('/apache_spec/ports_file') do
-      it { should be_file }
-      it { should contain 'Listen 10.1.1.1' }
-    end
-  end
-
-  describe 'server_tokens' do
-    it 'applys cleanly' do
-      pp = <<-EOS
-        class { 'apache':
-          server_tokens  => 'Minor',
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file($conf_file) do
-      it { should be_file }
-      it { should contain 'ServerTokens Minor' }
-    end
-  end
-
-  describe 'server_signature' do
-    it 'applys cleanly' do
-      pp = <<-EOS
-        class { 'apache':
-          server_signature  => 'testsig',
-          service_ensure    => stopped,
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file($conf_file) do
-      it { should be_file }
-      it { should contain 'ServerSignature testsig' }
-    end
-  end
-
-  describe 'trace_enable' do
-    it 'applys cleanly' do
-      pp = <<-EOS
-        class { 'apache':
-          trace_enable  => 'Off',
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file($conf_file) do
-      it { should be_file }
-      it { should contain 'TraceEnable Off' }
-    end
-  end
-
-  describe 'package_ensure' do
-    it 'applys cleanly' do
-      pp = <<-EOS
-        class { 'apache':
-          package_ensure  => present,
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe package($package_name) do
-      it { should be_installed }
-    end
-  end
-
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/apache_ssl_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/apache_ssl_spec.rb
deleted file mode 100644
index 649c02d841..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/apache_ssl_spec.rb
+++ /dev/null
@@ -1,87 +0,0 @@
-require 'spec_helper_acceptance'
-
-case fact('osfamily')
-when 'RedHat'
-  vhostd = '/etc/httpd/conf.d'
-when 'Debian'
-  vhostd = '/etc/apache2/sites-available'
-end
-
-describe 'apache ssl', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-
-  describe 'ssl parameters' do
-    it 'runs without error' do
-      pp = <<-EOS
-        class { 'apache':
-          service_ensure       => stopped,
-          default_ssl_vhost    => true,
-          default_ssl_cert     => '/tmp/ssl_cert',
-          default_ssl_key      => '/tmp/ssl_key',
-          default_ssl_chain    => '/tmp/ssl_chain',
-          default_ssl_ca       => '/tmp/ssl_ca',
-          default_ssl_crl_path => '/tmp/ssl_crl_path',
-          default_ssl_crl      => '/tmp/ssl_crl',
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file("#{vhostd}/15-default-ssl.conf") do
-      it { should be_file }
-      it { should contain 'SSLCertificateFile      "/tmp/ssl_cert"' }
-      it { should contain 'SSLCertificateKeyFile   "/tmp/ssl_key"' }
-      it { should contain 'SSLCertificateChainFile "/tmp/ssl_chain"' }
-      it { should contain 'SSLCACertificateFile    "/tmp/ssl_ca"' }
-      it { should contain 'SSLCARevocationPath     "/tmp/ssl_crl_path"' }
-      it { should contain 'SSLCARevocationFile     "/tmp/ssl_crl"' }
-    end
-  end
-
-  describe 'vhost ssl parameters' do
-    it 'runs without error' do
-      pp = <<-EOS
-        class { 'apache':
-          service_ensure       => stopped,
-        }
-
-        apache::vhost { 'test_ssl':
-          docroot              => '/tmp/test',
-          ssl                  => true,
-          ssl_cert             => '/tmp/ssl_cert',
-          ssl_key              => '/tmp/ssl_key',
-          ssl_chain            => '/tmp/ssl_chain',
-          ssl_ca               => '/tmp/ssl_ca',
-          ssl_crl_path         => '/tmp/ssl_crl_path',
-          ssl_crl              => '/tmp/ssl_crl',
-          ssl_certs_dir        => '/tmp',
-          ssl_protocol         => 'test',
-          ssl_cipher           => 'test',
-          ssl_honorcipherorder => 'test',
-          ssl_verify_client    => 'test',
-          ssl_verify_depth     => 'test',
-          ssl_options          => ['test', 'test1'],
-          ssl_proxyengine      => true,
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe file("#{vhostd}/25-test_ssl.conf") do
-      it { should be_file }
-      it { should contain 'SSLCertificateFile      "/tmp/ssl_cert"' }
-      it { should contain 'SSLCertificateKeyFile   "/tmp/ssl_key"' }
-      it { should contain 'SSLCertificateChainFile "/tmp/ssl_chain"' }
-      it { should contain 'SSLCACertificateFile    "/tmp/ssl_ca"' }
-      it { should contain 'SSLCARevocationPath     "/tmp/ssl_crl_path"' }
-      it { should contain 'SSLCARevocationFile     "/tmp/ssl_crl"' }
-      it { should contain 'SSLProxyEngine On' }
-      it { should contain 'SSLProtocol             test' }
-      it { should contain 'SSLCipherSuite          test' }
-      it { should contain 'SSLHonorCipherOrder     test' }
-      it { should contain 'SSLVerifyClient         test' }
-      it { should contain 'SSLVerifyDepth          test' }
-      it { should contain 'SSLOptions test test1' }
-    end
-  end
-
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/basic_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/basic_spec.rb
deleted file mode 100644
index 6c2b3f462f..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/basic_spec.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'disable selinux:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-  it "because otherwise apache won't work" do
-    apply_manifest(%{
-      exec { "setenforce 0":
-        path   => "/bin:/sbin:/usr/bin:/usr/sbin",
-        onlyif => "which setenforce && getenforce | grep Enforcing",
-      }
-    }, :catch_failures => true)
-  end
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/class_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/class_spec.rb
deleted file mode 100644
index 830e3ed5b6..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/class_spec.rb
+++ /dev/null
@@ -1,78 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'apache class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-  case fact('osfamily')
-  when 'RedHat'
-    package_name = 'httpd'
-    service_name = 'httpd'
-  when 'Debian'
-    package_name = 'apache2'
-    service_name = 'apache2'
-  when 'FreeBSD'
-    package_name = 'apache22'
-    service_name = 'apache22'
-  end
-
-  context 'default parameters' do
-    it 'should work with no errors' do
-      pp = <<-EOS
-      class { 'apache': }
-      EOS
-
-      # Run it twice and test for idempotency
-      apply_manifest(pp, :catch_failures => true)
-      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
-    end
-
-    describe package(package_name) do
-      it { should be_installed }
-    end
-
-    describe service(service_name) do
-      it { should be_enabled }
-      it { should be_running }
-    end
-  end
-
-  context 'custom site/mod dir parameters' do
-    # Using puppet_apply as a helper
-    it 'should work with no errors' do
-      pp = <<-EOS
-      if $::osfamily == 'RedHat' and $::selinux == 'true' {
-        $semanage_package = $::operatingsystemmajrelease ? {
-          '5'       => 'policycoreutils',
-          'default' => 'policycoreutils-python',
-        }
-
-        package { $semanage_package: ensure => installed }
-        exec { 'set_apache_defaults':
-          command => 'semanage fcontext -a -t httpd_sys_content_t "/apache_spec(/.*)?"',
-          path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
-          require => Package[$semanage_package],
-        }
-        exec { 'restorecon_apache':
-          command => 'restorecon -Rv /apache_spec',
-          path    => '/bin:/usr/bin/:/sbin:/usr/sbin',
-          before  => Service['httpd'],
-          require => Class['apache'],
-        }
-      }
-      file { '/apache_spec': ensure => directory, }
-      file { '/apache_spec/apache_custom': ensure => directory, }
-      class { 'apache':
-        mod_dir   => '/apache_spec/apache_custom/mods',
-        vhost_dir => '/apache_spec/apache_custom/vhosts',
-      }
-      EOS
-
-      # Run it twice and test for idempotency
-      apply_manifest(pp, :catch_failures => true)
-      apply_manifest(pp, :catch_changes => true)
-    end
-
-    describe service(service_name) do
-      it { should be_enabled }
-      it { should be_running }
-    end
-  end
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/default_mods_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/default_mods_spec.rb
deleted file mode 100644
index c7f8755605..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/default_mods_spec.rb
+++ /dev/null
@@ -1,120 +0,0 @@
-require 'spec_helper_acceptance'
-
-case fact('osfamily')
-when 'RedHat'
-  mod_dir     = '/etc/httpd/conf.d'
-  servicename = 'httpd'
-when 'Debian'
-  mod_dir     = '/etc/apache2/mods-available'
-  servicename = 'apache2'
-when 'FreeBSD'
-  mod_dir     = '/usr/local/etc/apache22/Modules'
-  servicename = 'apache22'
-end
-
-describe 'apache::default_mods class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-  describe 'no default mods' do
-    # Using puppet_apply as a helper
-    it 'should apply with no errors' do
-      pp = <<-EOS
-        class { 'apache':
-          default_mods => false,
-        }
-      EOS
-
-      # Run it twice and test for idempotency
-      apply_manifest(pp, :catch_failures => true)
-      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
-    end
-
-    describe service(servicename) do
-      it { should be_running }
-    end
-  end
-
-  describe 'no default mods and failing' do
-    # Using puppet_apply as a helper
-    it 'should apply with errors' do
-      pp = <<-EOS
-        class { 'apache':
-          default_mods => false,
-        }
-        apache::vhost { 'defaults.example.com':
-          docroot => '/var/www/defaults',
-          aliases => {
-            alias => '/css',
-            path  => '/var/www/css',
-          },
-          setenv  => 'TEST1 one',
-        }
-      EOS
-
-      apply_manifest(pp, { :expect_failures => true })
-    end
-
-    # Are these the same?
-    describe service(servicename) do
-      it { should_not be_running }
-    end
-    describe "service #{servicename}" do
-      it 'should not be running' do
-        shell("pidof #{servicename}", {:acceptable_exit_codes => 1})
-      end
-    end
-  end
-
-  describe 'alternative default mods' do
-    # Using puppet_apply as a helper
-    it 'should apply with no errors' do
-      pp = <<-EOS
-        class { 'apache':
-          default_mods => [
-            'info',
-            'alias',
-            'mime',
-            'env',
-            'expires',
-          ],
-        }
-        apache::vhost { 'defaults.example.com':
-          docroot => '/var/www/defaults',
-          aliases => {
-            alias => '/css',
-            path  => '/var/www/css',
-          },
-          setenv  => 'TEST1 one',
-        }
-      EOS
-
-      apply_manifest(pp, :catch_failures => true)
-      shell('sleep 10')
-      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
-    end
-
-    describe service(servicename) do
-      it { should be_running }
-    end
-  end
-
-  describe 'change loadfile name' do
-    it 'should apply with no errors' do
-      pp = <<-EOS
-        class { 'apache': default_mods => false }
-        ::apache::mod { 'auth_basic': 
-          loadfile_name => 'zz_auth_basic.load',
-        }
-      EOS
-      # Run it twice and test for idempotency
-      apply_manifest(pp, :catch_failures => true)
-      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
-    end
-
-    describe service(servicename) do
-      it { should be_running }
-    end
-
-    describe file("#{mod_dir}/zz_auth_basic.load") do
-      it { should be_file }
-    end
-  end
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/itk_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/itk_spec.rb
deleted file mode 100644
index 86fc2c01ce..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/itk_spec.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-require 'spec_helper_acceptance'
-
-case fact('osfamily')
-when 'Debian'
-  service_name = 'apache2'
-when 'FreeBSD'
-  service_name = 'apache22'
-else
-  # Not implemented yet
-  service_name = :skip
-end
-
-describe 'apache::mod::itk class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) or service_name.equal? :skip do
-  describe 'running puppet code' do
-    # Using puppet_apply as a helper
-    it 'should work with no errors' do
-      pp = <<-EOS
-          class { 'apache':
-            mpm_module => 'itk',
-          }
-      EOS
-
-      # Run it twice and test for idempotency
-      apply_manifest(pp, :catch_failures => true)
-      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
-    end
-  end
-
-  describe service(service_name) do
-    it { should be_running }
-    it { should be_enabled }
-  end
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_dav_svn_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_dav_svn_spec.rb
deleted file mode 100644
index 412b794540..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_dav_svn_spec.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'apache::mod::dav_svn class' do
-  case fact('osfamily')
-  when 'Debian'
-    mod_dir      = '/etc/apache2/mods-available'
-    service_name = 'apache2'
-  when 'RedHat'
-    mod_dir      = '/etc/httpd/conf.d'
-    service_name = 'httpd'
-  when 'FreeBSD'
-    mod_dir      = '/usr/local/etc/apache22/Modules'
-    service_name = 'apache22'
-  end
-
-  context "default dav_svn config" do
-    it 'succeeds in puppeting dav_svn' do
-      pp= <<-EOS
-        class { 'apache': }
-        include apache::mod::dav_svn
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe service(service_name) do
-      it { should be_enabled }
-      it { should be_running }
-    end
-
-    describe file("#{mod_dir}/dav_svn.load") do
-      it { should contain "LoadModule dav_svn_module" }
-    end
-  end
-
-  context "dav_svn with enabled authz_svn config" do
-    it 'succeeds in puppeting dav_svn' do
-      pp= <<-EOS
-        class { 'apache': }
-        class { 'apache::mod::dav_svn':
-            authz_svn_enabled => true,
-        }
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe service(service_name) do
-      it { should be_enabled }
-      it { should be_running }
-    end
-
-    describe file("#{mod_dir}/dav_svn_authz_svn.load") do
-      it { should contain "LoadModule authz_svn_module" }
-    end
-  end
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_deflate_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_deflate_spec.rb
deleted file mode 100644
index b2ffc1436a..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_deflate_spec.rb
+++ /dev/null
@@ -1,40 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'apache::mod::deflate class' do
-  case fact('osfamily')
-  when 'Debian'
-    mod_dir      = '/etc/apache2/mods-available'
-    service_name = 'apache2'
-  when 'RedHat'
-    mod_dir      = '/etc/httpd/conf.d'
-    service_name = 'httpd'
-  when 'FreeBSD'
-    mod_dir      = '/usr/local/etc/apache22/Modules'
-    service_name = 'apache22'
-  end
-
-  context "default deflate config" do
-    it 'succeeds in puppeting deflate' do
-      pp= <<-EOS
-        class { 'apache': }
-        include apache::mod::deflate
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe service(service_name) do
-      it { should be_enabled }
-      it { should be_running }
-    end
-
-    describe file("#{mod_dir}/deflate.conf") do
-      it { should contain "AddOutputFilterByType DEFLATE text/html text/plain text/xml" }
-      it { should contain "AddOutputFilterByType DEFLATE text/css" }
-      it { should contain "AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript" }
-      it { should contain "AddOutputFilterByType DEFLATE application/rss+xml" }
-      it { should contain "DeflateFilterNote Input instream" }
-      it { should contain "DeflateFilterNote Output outstream" }
-      it { should contain "DeflateFilterNote Ratio ratio" }
-    end
-  end
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_fcgid_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_fcgid_spec.rb
deleted file mode 100644
index 52f793be06..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_fcgid_spec.rb
+++ /dev/null
@@ -1,62 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'apache::mod::fcgid class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-  case fact('osfamily')
-  when 'Debian'
-    # Not implemented
-  when 'RedHat'
-    context "default fcgid config" do
-      it 'succeeds in puppeting fcgid' do
-        pp = <<-EOS
-          class { 'epel': } # mod_fcgid lives in epel
-          class { 'apache': }
-          class { 'apache::mod::php': } # For /usr/bin/php-cgi
-          class { 'apache::mod::fcgid':
-            options => {
-              'FcgidIPCDir'  => '/var/run/fcgidsock',
-            },
-          }
-          apache::vhost { 'fcgid.example.com':
-            port        => '80',
-            docroot     => '/var/www/fcgid',
-            directories => {
-              path        => '/var/www/fcgid',
-              options     => '+ExecCGI',
-              addhandlers => {
-                handler    => 'fcgid-script',
-                extensions => '.php',
-              },
-              fcgiwrapper => {
-                command => '/usr/bin/php-cgi',
-                suffix  => '.php',
-              }
-            },
-          }
-          file { '/var/www/fcgid/index.php':
-            ensure  => file,
-            owner   => 'root',
-            group   => 'root',
-            content => "\\n",
-          }
-        EOS
-        apply_manifest(pp, :catch_failures => true)
-      end
-
-      describe service('httpd') do
-        it { should be_enabled }
-        it { should be_running }
-      end
-
-      it 'should answer to fcgid.example.com' do
-        shell("/usr/bin/curl -H 'Host: fcgid.example.com' 127.0.0.1:80") do |r|
-          r.stdout.should =~ /^Hello world$/
-          r.exit_code.should == 0
-        end
-      end
-
-      it 'should run a php-cgi process' do
-        shell("pgrep -u apache php-cgi", :acceptable_exit_codes => [0])
-      end
-    end
-  end
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_mime_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_mime_spec.rb
deleted file mode 100644
index 71a7037a62..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_mime_spec.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'apache::mod::mime class' do
-  case fact('osfamily')
-  when 'Debian'
-    mod_dir      = '/etc/apache2/mods-available'
-    service_name = 'apache2'
-  when 'RedHat'
-    mod_dir      = '/etc/httpd/conf.d'
-    service_name = 'httpd'
-  when 'FreeBSD'
-    mod_dir      = '/usr/local/etc/apache22/Modules'
-    service_name = 'apache22'
-  end
-
-  context "default mime config" do
-    it 'succeeds in puppeting mime' do
-      pp= <<-EOS
-        class { 'apache': }
-        include apache::mod::mime
-      EOS
-      apply_manifest(pp, :catch_failures => true)
-    end
-
-    describe service(service_name) do
-      it { should be_enabled }
-      it { should be_running }
-    end
-
-    describe file("#{mod_dir}/mime.conf") do
-      it { should contain "AddType application/x-compress .Z" }
-    end
-  end
-end
diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_pagespeed_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_pagespeed_spec.rb
deleted file mode 100644
index de59a347c1..0000000000
--- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_pagespeed_spec.rb
+++ /dev/null
@@ -1,85 +0,0 @@
-require 'spec_helper_acceptance'
-
-describe 'apache::mod::pagespeed class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do
-  case fact('osfamily')
-  when 'Debian'
-    vhost_dir    = '/etc/apache2/sites-enabled'
-    mod_dir      = '/etc/apache2/mods-available'
-    service_name = 'apache2'
-  when 'RedHat'
-    vhost_dir    = '/etc/httpd/conf.d'
-    mod_dir      = '/etc/httpd/conf.d'
-    service_name = 'httpd'
-  when 'FreeBSD'
-    vhost_dir    = '/usr/local/etc/apache22/Vhosts'
-    mod_dir      = '/usr/local/etc/apache22/Modules'
-    service_name = 'apache22'
-  end
-
-  context "default pagespeed config" do
-    it 'succeeds in puppeting pagespeed' do
-      pp= <<-EOS
-        if $::osfamily == 'Debian' {
-          class { 'apt': }
-
-          apt::source { 'mod-pagespeed':
-            key         => '7FAC5991',
-            key_server  => 'pgp.mit.edu',
-            location    => 'http://dl.google.com/linux/mod-pagespeed/deb/',
-            release     => 'stable',
-            repos       => 'main',
-            include_src => false,
-            before      => Class['apache'],
-          } 
-        } elsif $::osfamily == 'RedHat' {
-         yumrepo { 'mod-pagespeed':
-          baseurl  => 'http://dl.google.com/linux/mod-pagespeed/rpm/stable/x86_64',
-            enabled  => 1,
-            gpgcheck => 1,
-            gpgkey   => 'https://dl-ssl.google.com/linux/linux_signing_key.pub',
-            before   => Class['apache'],
-          }
-        }
-
-        class { 'apache':
-          mpm_module => 'prefork',
-        }
-        class { 'apache::mod::pagespeed':
-          enable_filters  => ['remove_comments'],
-          disable_filters => ['extend_cache'],
-          forbid_filters  => ['rewrite_javascript'],
-        }
-        apache::vhost { 'pagespeed.example.com':
-          port    => '80',
-          docroot => '/var/www/pagespeed',
-        }
-        host { 'pagespeed.example.com': ip => '127.0.0.1', }
-        file { '/var/www/pagespeed/index.html':
-          ensure  => file,
-          content => "\n\n\n

Hello World!

\n\n", - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { should be_enabled } - it { should be_running } - end - - describe file("#{mod_dir}/pagespeed.conf") do - it { should contain "AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html" } - it { should contain "ModPagespeedEnableFilters remove_comments" } - it { should contain "ModPagespeedDisableFilters extend_cache" } - it { should contain "ModPagespeedForbidFilters rewrite_javascript" } - end - - it 'should answer to pagespeed.example.com and include and be stripped of comments by mod_pagespeed' do - shell("/usr/bin/curl pagespeed.example.com:80") do |r| - r.stdout.should =~ // - r.stdout.should_not =~ // - r.exit_code.should == 0 - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_passenger_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_passenger_spec.rb deleted file mode 100644 index fbfac1672a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_passenger_spec.rb +++ /dev/null @@ -1,294 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apache::mod::passenger class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - case fact('osfamily') - when 'Debian' - service_name = 'apache2' - mod_dir = '/etc/apache2/mods-available/' - conf_file = "#{mod_dir}passenger.conf" - load_file = "#{mod_dir}passenger.load" - - case fact('operatingsystem') - when 'Ubuntu' - case fact('lsbdistrelease') - when '10.04' - passenger_root = '/usr' - passenger_ruby = '/usr/bin/ruby' - when '12.04' - passenger_root = '/usr' - passenger_ruby = '/usr/bin/ruby' - when '14.04' - passenger_root = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini' - passenger_ruby = '/usr/bin/ruby' - passenger_default_ruby = '/usr/bin/ruby' - else - # This may or may not work on Ubuntu releases other than the above - passenger_root = '/usr' - passenger_ruby = '/usr/bin/ruby' - end - when 'Debian' - case fact('lsbdistcodename') - when 'wheezy' - passenger_root = '/usr' - passenger_ruby = '/usr/bin/ruby' - else - # This may or may not work on Debian releases other than the above - passenger_root = '/usr' - passenger_ruby = '/usr/bin/ruby' - end - end - - passenger_module_path = '/usr/lib/apache2/modules/mod_passenger.so' - rackapp_user = 'www-data' - rackapp_group = 'www-data' - when 'RedHat' - service_name = 'httpd' - mod_dir = '/etc/httpd/conf.d/' - conf_file = "#{mod_dir}passenger.conf" - load_file = "#{mod_dir}passenger.load" - # sometimes installs as 3.0.12, sometimes as 3.0.19 - so just check for the stable part - passenger_root = '/usr/lib/ruby/gems/1.8/gems/passenger-3.0.1' - passenger_ruby = '/usr/bin/ruby' - passenger_tempdir = '/var/run/rubygem-passenger' - passenger_module_path = 'modules/mod_passenger.so' - rackapp_user = 'apache' - rackapp_group = 'apache' - end - - pp_rackapp = <<-EOS - /* a simple ruby rack 'hellow world' app */ - file { '/var/www/passenger': - ensure => directory, - owner => '#{rackapp_user}', - group => '#{rackapp_group}', - require => Class['apache::mod::passenger'], - } - file { '/var/www/passenger/config.ru': - ensure => file, - owner => '#{rackapp_user}', - group => '#{rackapp_group}', - content => "app = proc { |env| [200, { \\"Content-Type\\" => \\"text/html\\" }, [\\"hello world\\"]] }\\nrun app", - require => File['/var/www/passenger'] , - } - apache::vhost { 'passenger.example.com': - port => '80', - docroot => '/var/www/passenger/public', - docroot_group => '#{rackapp_group}' , - docroot_owner => '#{rackapp_user}' , - custom_fragment => "PassengerRuby #{passenger_ruby}\\nRailsEnv development" , - require => File['/var/www/passenger/config.ru'] , - } - host { 'passenger.example.com': ip => '127.0.0.1', } - EOS - - case fact('osfamily') - when 'Debian' - context "default passenger config" do - it 'succeeds in puppeting passenger' do - pp = <<-EOS - /* stock apache and mod_passenger */ - class { 'apache': } - class { 'apache::mod::passenger': } - #{pp_rackapp} - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { should be_enabled } - it { should be_running } - end - - describe file(conf_file) do - it { should contain "PassengerRoot \"#{passenger_root}\"" } - - case fact('operatingsystem') - when 'Ubuntu' - case fact('lsbdistrelease') - when '10.04' - it { should contain "PassengerRuby \"#{passenger_ruby}\"" } - it { should_not contain "/PassengerDefaultRuby/" } - when '12.04' - it { should contain "PassengerRuby \"#{passenger_ruby}\"" } - it { should_not contain "/PassengerDefaultRuby/" } - when '14.04' - it { should contain "PassengerDefaultRuby \"#{passenger_ruby}\"" } - it { should_not contain "/PassengerRuby/" } - else - # This may or may not work on Ubuntu releases other than the above - it { should contain "PassengerRuby \"#{passenger_ruby}\"" } - it { should_not contain "/PassengerDefaultRuby/" } - end - when 'Debian' - case fact('lsbdistcodename') - when 'wheezy' - it { should contain "PassengerRuby \"#{passenger_ruby}\"" } - it { should_not contain "/PassengerDefaultRuby/" } - else - # This may or may not work on Debian releases other than the above - it { should contain "PassengerRuby \"#{passenger_ruby}\"" } - it { should_not contain "/PassengerDefaultRuby/" } - end - end - end - - describe file(load_file) do - it { should contain "LoadModule passenger_module #{passenger_module_path}" } - end - - it 'should output status via passenger-memory-stats' do - shell("sudo /usr/sbin/passenger-memory-stats") do |r| - r.stdout.should =~ /Apache processes/ - r.stdout.should =~ /Nginx processes/ - r.stdout.should =~ /Passenger processes/ - - # passenger-memory-stats output on Ubuntu 14.04 does not contain - # these two lines - unless fact('operatingsystem') == 'Ubuntu' && fact('operatingsystemrelease') == '14.04' - r.stdout.should =~ /### Processes: [0-9]+/ - r.stdout.should =~ /### Total private dirty RSS: [0-9\.]+ MB/ - end - - r.exit_code.should == 0 - end - end - - # passenger-status fails under stock ubuntu-server-12042-x64 + mod_passenger, - # even when the passenger process is successfully installed and running - unless fact('operatingsystem') == 'Ubuntu' && fact('operatingsystemrelease') == '12.04' - it 'should output status via passenger-status' do - # xml output not available on ubunutu <= 10.04, so sticking with default pool output - shell("sudo /usr/sbin/passenger-status") do |r| - # spacing may vary - r.stdout.should =~ /[\-]+ General information [\-]+/ - if fact('operatingsystem') == 'Ubuntu' && fact('operatingsystemrelease') == '14.04' - r.stdout.should =~ /Max pool size[ ]+: [0-9]+/ - r.stdout.should =~ /Processes[ ]+: [0-9]+/ - r.stdout.should =~ /Requests in top-level queue[ ]+: [0-9]+/ - else - r.stdout.should =~ /max[ ]+= [0-9]+/ - r.stdout.should =~ /count[ ]+= [0-9]+/ - r.stdout.should =~ /active[ ]+= [0-9]+/ - r.stdout.should =~ /inactive[ ]+= [0-9]+/ - r.stdout.should =~ /Waiting on global queue: [0-9]+/ - end - - r.exit_code.should == 0 - end - end - end - - it 'should answer to passenger.example.com' do - shell("/usr/bin/curl passenger.example.com:80") do |r| - r.stdout.should =~ /^hello world<\/b>$/ - r.exit_code.should == 0 - end - end - - end - - when 'RedHat' - # no fedora 18 passenger package yet, and rhel5 packages only exist for ruby 1.8.5 - unless (fact('operatingsystem') == 'Fedora' and fact('operatingsystemrelease').to_f >= 18) or (fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') == '5' and fact('rubyversion') != '1.8.5') - - context "default passenger config" do - it 'succeeds in puppeting passenger' do - pp = <<-EOS - /* EPEL and passenger repositories */ - class { 'epel': } - exec { 'passenger.repo GPG key': - command => '/usr/bin/sudo /usr/bin/curl -o /etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc', - creates => '/etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc', - } - file { 'passenger.repo GPG key': - ensure => file, - path => '/etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc', - require => Exec['passenger.repo GPG key'], - } - epel::rpm_gpg_key { 'passenger.stealthymonkeys.com': - path => '/etc/yum.repos.d/RPM-GPG-KEY-stealthymonkeys.asc', - require => [ - Class['epel'], - File['passenger.repo GPG key'], - ] - } - yumrepo { 'passenger': - baseurl => 'http://passenger.stealthymonkeys.com/rhel/$releasever/$basearch' , - descr => 'Red Hat Enterprise $releasever - Phusion Passenger', - enabled => 1, - gpgcheck => 1, - gpgkey => 'http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc', - mirrorlist => 'http://passenger.stealthymonkeys.com/rhel/mirrors', - require => [ - Epel::Rpm_gpg_key['passenger.stealthymonkeys.com'], - ], - } - /* apache and mod_passenger */ - class { 'apache': - require => [ - Class['epel'], - ], - } - class { 'apache::mod::passenger': - require => [ - Yumrepo['passenger'] - ], - } - #{pp_rackapp} - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { should be_enabled } - it { should be_running } - end - - describe file(conf_file) do - it { should contain "PassengerRoot #{passenger_root}" } - it { should contain "PassengerRuby #{passenger_ruby}" } - it { should contain "PassengerTempDir #{passenger_tempdir}" } - end - - describe file(load_file) do - it { should contain "LoadModule passenger_module #{passenger_module_path}" } - end - - it 'should output status via passenger-memory-stats' do - shell("sudo /usr/bin/passenger-memory-stats") do |r| - r.stdout.should =~ /Apache processes/ - r.stdout.should =~ /Nginx processes/ - r.stdout.should =~ /Passenger processes/ - r.stdout.should =~ /### Processes: [0-9]+/ - r.stdout.should =~ /### Total private dirty RSS: [0-9\.]+ MB/ - - r.exit_code.should == 0 - end - end - - it 'should output status via passenger-status' do - shell("sudo PASSENGER_TMPDIR=/var/run/rubygem-passenger /usr/bin/passenger-status") do |r| - # spacing may vary - r.stdout.should =~ /[\-]+ General information [\-]+/ - r.stdout.should =~ /max[ ]+= [0-9]+/ - r.stdout.should =~ /count[ ]+= [0-9]+/ - r.stdout.should =~ /active[ ]+= [0-9]+/ - r.stdout.should =~ /inactive[ ]+= [0-9]+/ - r.stdout.should =~ /Waiting on global queue: [0-9]+/ - - r.exit_code.should == 0 - end - end - - it 'should answer to passenger.example.com' do - shell("/usr/bin/curl passenger.example.com:80") do |r| - r.stdout.should =~ /^hello world<\/b>$/ - r.exit_code.should == 0 - end - end - end - - end - - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_php_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_php_spec.rb deleted file mode 100644 index ca21fbcd7e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_php_spec.rb +++ /dev/null @@ -1,173 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apache::mod::php class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - case fact('osfamily') - when 'Debian' - vhost_dir = '/etc/apache2/sites-enabled' - mod_dir = '/etc/apache2/mods-available' - service_name = 'apache2' - when 'RedHat' - vhost_dir = '/etc/httpd/conf.d' - mod_dir = '/etc/httpd/conf.d' - service_name = 'httpd' - when 'FreeBSD' - vhost_dir = '/usr/local/etc/apache22/Vhosts' - mod_dir = '/usr/local/etc/apache22/Modules' - service_name = 'apache22' - end - - context "default php config" do - it 'succeeds in puppeting php' do - pp= <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - class { 'apache::mod::php': } - apache::vhost { 'php.example.com': - port => '80', - docroot => '/var/www/php', - } - host { 'php.example.com': ip => '127.0.0.1', } - file { '/var/www/php/index.php': - ensure => file, - content => "\\n", - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { should be_enabled } - it { should be_running } - end - - describe file("#{mod_dir}/php5.conf") do - it { should contain "DirectoryIndex index.php" } - end - - it 'should answer to php.example.com' do - shell("/usr/bin/curl php.example.com:80") do |r| - r.stdout.should =~ /PHP Version/ - r.exit_code.should == 0 - end - end - end - - context "custom extensions, php_admin_flag, and php_admin_value" do - it 'succeeds in puppeting php' do - pp= <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - class { 'apache::mod::php': - extensions => ['.php','.php5'], - } - apache::vhost { 'php.example.com': - port => '80', - docroot => '/var/www/php', - php_admin_values => { 'open_basedir' => '/var/www/php/:/usr/share/pear/', }, - php_admin_flags => { 'engine' => 'on', }, - } - host { 'php.example.com': ip => '127.0.0.1', } - file { '/var/www/php/index.php5': - ensure => file, - content => "\\n", - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { should be_enabled } - it { should be_running } - end - - describe file("#{vhost_dir}/25-php.example.com.conf") do - it { should contain " php_admin_flag engine on" } - it { should contain " php_admin_value open_basedir /var/www/php/:/usr/share/pear/" } - end - - it 'should answer to php.example.com' do - shell("/usr/bin/curl php.example.com:80") do |r| - r.stdout.should =~ /\/usr\/share\/pear\// - r.exit_code.should == 0 - end - end - end - - context "provide custom config file" do - it 'succeeds in puppeting php' do - pp= <<-EOS - class {'apache': - mpm_module => 'prefork', - } - class {'apache::mod::php': - content => '# somecontent', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{mod_dir}/php5.conf") do - it { should contain "# somecontent" } - end - end - - context "provide content and template config file" do - it 'succeeds in puppeting php' do - pp= <<-EOS - class {'apache': - mpm_module => 'prefork', - } - class {'apache::mod::php': - content => '# somecontent', - template => 'apache/mod/php5.conf.erb', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{mod_dir}/php5.conf") do - it { should contain "# somecontent" } - end - end - - context "provide source has priority over content" do - it 'succeeds in puppeting php' do - pp= <<-EOS - class {'apache': - mpm_module => 'prefork', - } - class {'apache::mod::php': - content => '# somecontent', - source => 'puppet:///modules/apache/spec', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{mod_dir}/php5.conf") do - it { should contain "# This is a file only for spec testing" } - end - end - - context "provide source has priority over template" do - it 'succeeds in puppeting php' do - pp= <<-EOS - class {'apache': - mpm_module => 'prefork', - } - class {'apache::mod::php': - template => 'apache/mod/php5.conf.erb', - source => 'puppet:///modules/apache/spec', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{mod_dir}/php5.conf") do - it { should contain "# This is a file only for spec testing" } - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_proxy_html_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_proxy_html_spec.rb deleted file mode 100644 index f015f99941..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_proxy_html_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apache::mod::proxy_html class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - case fact('osfamily') - when 'Debian' - service_name = 'apache2' - when 'RedHat' - service_name = 'httpd' - when 'FreeBSD' - service_name = 'apache22' - end - - context "default proxy_html config" do - if fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') =~ /(5|6)/ - it 'adds epel' do - pp = "class { 'epel': }" - apply_manifest(pp, :catch_failures => true) - end - end - - it 'succeeds in puppeting proxy_html' do - pp= <<-EOS - class { 'apache': } - class { 'apache::mod::proxy': } - class { 'apache::mod::proxy_http': } - # mod_proxy_html doesn't exist in RHEL5 - if $::osfamily == 'RedHat' and $::operatingsystemmajrelease != '5' { - class { 'apache::mod::proxy_html': } - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { should be_enabled } - it { should be_running } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_suphp_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_suphp_spec.rb deleted file mode 100644 index 9e26731d61..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/mod_suphp_spec.rb +++ /dev/null @@ -1,44 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apache::mod::suphp class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - case fact('osfamily') - when 'Debian' - context "default suphp config" do - it 'succeeds in puppeting suphp' do - pp = <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - class { 'apache::mod::php': } - class { 'apache::mod::suphp': } - apache::vhost { 'suphp.example.com': - port => '80', - docroot => '/var/www/suphp', - } - host { 'suphp.example.com': ip => '127.0.0.1', } - file { '/var/www/suphp/index.php': - ensure => file, - owner => 'daemon', - group => 'daemon', - content => "\\n", - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service('apache2') do - it { should be_enabled } - it { should be_running } - end - - it 'should answer to suphp.example.com' do - shell("/usr/bin/curl suphp.example.com:80") do |r| - r.stdout.should =~ /^daemon$/ - r.exit_code.should == 0 - end - end - end - when 'RedHat' - # Not implemented yet - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-59-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-59-x64.yml deleted file mode 100644 index cde1fe5a85..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-59-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - centos-59-x64: - roles: - - master - platform: el-5-x86_64 - box : centos-59-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64-pe.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64-pe.yml deleted file mode 100644 index e408d1be77..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64-pe.yml +++ /dev/null @@ -1,13 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - - database - - dashboard - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: pe diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64.yml deleted file mode 100644 index ce47212a8c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-64-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-65-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-65-x64.yml deleted file mode 100644 index ac76349736..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/centos-65-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - centos-65-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-65-x64-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-607-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-607-x64.yml deleted file mode 100644 index e642e09925..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-607-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - debian-607-x64: - roles: - - master - platform: debian-6-amd64 - box : debian-607-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-70rc1-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-70rc1-x64.yml deleted file mode 100644 index cbbbfb2cc6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-70rc1-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - debian-70rc1-x64: - roles: - - master - platform: debian-7-amd64 - box : debian-70rc1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-i386.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-i386.yml deleted file mode 100644 index a38902d897..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-i386.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - debian-73-i386: - roles: - - master - platform: debian-7-i386 - box : debian-73-i386-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-i386-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-x64.yml deleted file mode 100644 index f9cf0c9b8a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/debian-73-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - debian-73-x64: - roles: - - master - platform: debian-7-amd64 - box : debian-73-x64-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/default.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/default.yml deleted file mode 100644 index ce47212a8c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/fedora-18-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/fedora-18-x64.yml deleted file mode 100644 index 086cae995c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/fedora-18-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - fedora-18-x64: - roles: - - master - platform: fedora-18-x86_64 - box : fedora-18-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/sles-11sp1-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/sles-11sp1-x64.yml deleted file mode 100644 index a9f01d5f42..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/sles-11sp1-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - sles-11sp1-x64: - roles: - - master - platform: sles-11-x86_64 - box : sles-11sp1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml deleted file mode 100644 index c1b8bdf8fa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-10044-x64: - roles: - - master - platform: ubuntu-10.04-amd64 - box : ubuntu-server-10044-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml deleted file mode 100644 index f7df2ccce1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml deleted file mode 100644 index f4b2366f3b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-1310-x64: - roles: - - master - platform: ubuntu-13.10-amd64 - box : ubuntu-server-1310-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-1310-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - log_level : debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml deleted file mode 100644 index cba1cd04c2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-1404-x64: - roles: - - master - platform: ubuntu-14.04-amd64 - box : puppetlabs/ubuntu-14.04-64-nocm - box_url : https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm - hypervisor : vagrant -CONFIG: - log_level : debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/prefork_worker_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/prefork_worker_spec.rb deleted file mode 100644 index beffe0a014..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/prefork_worker_spec.rb +++ /dev/null @@ -1,79 +0,0 @@ -require 'spec_helper_acceptance' - -case fact('osfamily') -when 'RedHat' - servicename = 'httpd' -when 'Debian' - servicename = 'apache2' -when 'FreeBSD' - servicename = 'apache22' -end - -case fact('osfamily') -when 'FreeBSD' - describe 'apache::mod::event class' do - describe 'running puppet code' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'apache': - mpm_module => 'event', - } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - end - - describe service(servicename) do - it { should be_running } - it { should be_enabled } - end - end -end - -describe 'apache::mod::worker class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - describe 'running puppet code' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'apache': - mpm_module => 'worker', - } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - end - - describe service(servicename) do - it { should be_running } - it { should be_enabled } - end -end - -describe 'apache::mod::prefork class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - describe 'running puppet code' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'apache': - mpm_module => 'prefork', - } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - end - - describe service(servicename) do - it { should be_running } - it { should be_enabled } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/service_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/service_spec.rb deleted file mode 100644 index b51ca386f0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/service_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apache::service class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - describe 'adding dependencies in between the base class and service class' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apache': } - file { '/tmp/test': - require => Class['apache'], - notify => Class['apache::service'], - } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/unsupported_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/unsupported_spec.rb deleted file mode 100644 index 085845dbfc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/unsupported_spec.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - it 'should fail' do - pp = <<-EOS - class { 'apache': } - apache::vhost { 'test.lan': - docroot => '/var/www', - } - EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/unsupported/i) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/version.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/version.rb deleted file mode 100644 index 27498354b4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/version.rb +++ /dev/null @@ -1,57 +0,0 @@ -_osfamily = fact('osfamily') -_operatingsystem = fact('operatingsystem') -_operatingsystemrelease = fact('operatingsystemrelease').to_f - -case _osfamily -when 'RedHat' - $confd_dir = '/etc/httpd/conf.d' - $conf_file = '/etc/httpd/conf/httpd.conf' - $ports_file = '/etc/httpd/conf/ports.conf' - $vhost_dir = '/etc/httpd/conf.d' - $vhost = '/etc/httpd/conf.d/15-default.conf' - $run_dir = '/var/run/httpd' - $service_name = 'httpd' - $package_name = 'httpd' - $error_log = 'error_log' - $suphp_handler = 'php5-script' - $suphp_configpath = 'undef' - - if (_operatingsystem == 'Fedora' and _operatingsystemrelease >= 18) or (_operatingsystem != 'Fedora' and _operatingsystemrelease >= 7) - $apache_version = '2.4' - else - $apache_version = '2.2' - end -when 'Debian' - $confd_dir = '/etc/apache2/mods-available' - $conf_file = '/etc/apache2/apache2.conf' - $ports_file = '/etc/apache2/ports.conf' - $vhost = '/etc/apache2/sites-available/15-default.conf' - $vhost_dir = '/etc/apache2/sites-enabled' - $run_dir = '/var/run/apache2' - $service_name = 'apache2' - $package_name = 'apache2' - $error_log = 'error.log' - $suphp_handler = 'x-httpd-php' - $suphp_configpath = '/etc/php5/apache2' - - if _operatingsystem == 'Ubuntu' and _operatingsystemrelease >= 13.10 - $apache_version = '2.4' - else - $apache_version = '2.2' - end -when 'FreeBSD' - $confd_dir = '/usr/local/etc/apache22/Includes' - $conf_file = '/usr/local/etc/apache22/httpd.conf' - $ports_file = '/usr/local/etc/apache22/Includes/ports.conf' - $vhost = '/usr/local/etc/apache22/Vhosts/15-default.conf' - $vhost_dir = '/usr/local/etc/apache22/Vhosts' - $run_dir = '/var/run/apache22' - $service_name = 'apache22' - $package_name = 'apache22' - $error_log = 'http-error.log' - - $apache_version = '2.2' -else - $apache_version = '0' -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/vhost_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/vhost_spec.rb deleted file mode 100644 index c43d3f9e9e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/acceptance/vhost_spec.rb +++ /dev/null @@ -1,1097 +0,0 @@ -require 'spec_helper_acceptance' -require_relative './version.rb' - -describe 'apache::vhost define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'no default vhosts' do - it 'should create no default vhosts' do - pp = <<-EOS - class { 'apache': - default_vhost => false, - default_ssl_vhost => false, - service_ensure => stopped - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/15-default.conf") do - it { should_not be_file } - end - - describe file("#{$vhost_dir}/15-default-ssl.conf") do - it { should_not be_file } - end - end - - context "default vhost without ssl" do - it 'should create a default vhost config' do - pp = <<-EOS - class { 'apache': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/15-default.conf") do - it { should contain '' } - end - - describe file("#{$vhost_dir}/15-default-ssl.conf") do - it { should_not be_file } - end - end - - context 'default vhost with ssl' do - it 'should create default vhost configs' do - pp = <<-EOS - file { '#{$run_dir}': - ensure => 'directory', - recurse => true, - } - - class { 'apache': - default_ssl_vhost => true, - require => File['#{$run_dir}'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/15-default.conf") do - it { should contain '' } - end - - describe file("#{$vhost_dir}/15-default-ssl.conf") do - it { should contain '' } - it { should contain "SSLEngine on" } - end - end - - context 'new vhost on port 80' do - it 'should configure an apache vhost' do - pp = <<-EOS - class { 'apache': } - file { '#{$run_dir}': - ensure => 'directory', - recurse => true, - } - - apache::vhost { 'first.example.com': - port => '80', - docroot => '/var/www/first', - require => File['#{$run_dir}'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-first.example.com.conf") do - it { should contain '' } - it { should contain "ServerName first.example.com" } - end - end - - context 'new proxy vhost on port 80' do - it 'should configure an apache proxy vhost' do - pp = <<-EOS - class { 'apache': } - apache::vhost { 'proxy.example.com': - port => '80', - docroot => '/var/www/proxy', - proxy_pass => [ - { 'path' => '/foo', 'url' => 'http://backend-foo/'}, - ], - proxy_preserve_host => true, - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-proxy.example.com.conf") do - it { should contain '' } - it { should contain "ServerName proxy.example.com" } - it { should contain "ProxyPass" } - it { should contain "ProxyPreserveHost On" } - it { should_not contain "" } - end - end - - context 'new vhost on port 80' do - it 'should configure two apache vhosts' do - pp = <<-EOS - class { 'apache': } - apache::vhost { 'first.example.com': - port => '80', - docroot => '/var/www/first', - } - host { 'first.example.com': ip => '127.0.0.1', } - file { '/var/www/first/index.html': - ensure => file, - content => "Hello from first\\n", - } - apache::vhost { 'second.example.com': - port => '80', - docroot => '/var/www/second', - } - host { 'second.example.com': ip => '127.0.0.1', } - file { '/var/www/second/index.html': - ensure => file, - content => "Hello from second\\n", - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service($service_name) do - it { should be_enabled } - it { should be_running } - end - - it 'should answer to first.example.com' do - shell("/usr/bin/curl first.example.com:80", {:acceptable_exit_codes => 0}) do |r| - r.stdout.should == "Hello from first\n" - end - end - - it 'should answer to second.example.com' do - shell("/usr/bin/curl second.example.com:80", {:acceptable_exit_codes => 0}) do |r| - r.stdout.should == "Hello from second\n" - end - end - end - - context 'apache_directories' do - describe 'readme example, adapted' do - it 'should configure a vhost with Files' do - pp = <<-EOS - class { 'apache': } - - if versioncmp($apache::apache_version, '2.4') >= 0 { - $_files_match_directory = { 'path' => '(\.swp|\.bak|~)$', 'provider' => 'filesmatch', 'require' => 'all denied', } - } else { - $_files_match_directory = { 'path' => '(\.swp|\.bak|~)$', 'provider' => 'filesmatch', 'deny' => 'from all', } - } - - $_directories = [ - { 'path' => '/var/www/files', }, - $_files_match_directory, - ] - - apache::vhost { 'files.example.net': - docroot => '/var/www/files', - directories => $_directories, - } - file { '/var/www/files/index.html': - ensure => file, - content => "Hello World\\n", - } - file { '/var/www/files/index.html.bak': - ensure => file, - content => "Hello World\\n", - } - host { 'files.example.net': ip => '127.0.0.1', } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service($service_name) do - it { should be_enabled } - it { should be_running } - end - - it 'should answer to files.example.net' do - shell("/usr/bin/curl -sSf files.example.net:80/index.html").stdout.should eq("Hello World\n") - shell("/usr/bin/curl -sSf files.example.net:80/index.html.bak", {:acceptable_exit_codes => 22}).stderr.should match(/curl: \(22\) The requested URL returned error: 403/) - end - end - - describe 'other Directory options' do - it 'should configure a vhost with multiple Directory sections' do - pp = <<-EOS - class { 'apache': } - - if versioncmp($apache::apache_version, '2.4') >= 0 { - $_files_match_directory = { 'path' => 'private.html$', 'provider' => 'filesmatch', 'require' => 'all denied' } - } else { - $_files_match_directory = [ - { 'path' => 'private.html$', 'provider' => 'filesmatch', 'deny' => 'from all' }, - { 'path' => '/bar/bar.html', 'provider' => 'location', allow => [ 'from 127.0.0.1', ] }, - ] - } - - $_directories = [ - { 'path' => '/var/www/files', }, - { 'path' => '/foo/', 'provider' => 'location', 'directoryindex' => 'notindex.html', }, - $_files_match_directory, - ] - - apache::vhost { 'files.example.net': - docroot => '/var/www/files', - directories => $_directories, - } - file { '/var/www/files/foo': - ensure => directory, - } - file { '/var/www/files/foo/notindex.html': - ensure => file, - content => "Hello Foo\\n", - } - file { '/var/www/files/private.html': - ensure => file, - content => "Hello World\\n", - } - file { '/var/www/files/bar': - ensure => directory, - } - file { '/var/www/files/bar/bar.html': - ensure => file, - content => "Hello Bar\\n", - } - host { 'files.example.net': ip => '127.0.0.1', } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service($service_name) do - it { should be_enabled } - it { should be_running } - end - - it 'should answer to files.example.net' do - shell("/usr/bin/curl -sSf files.example.net:80/").stdout.should eq("Hello World\n") - shell("/usr/bin/curl -sSf files.example.net:80/foo/").stdout.should eq("Hello Foo\n") - shell("/usr/bin/curl -sSf files.example.net:80/private.html", {:acceptable_exit_codes => 22}).stderr.should match(/curl: \(22\) The requested URL returned error: 403/) - shell("/usr/bin/curl -sSf files.example.net:80/bar/bar.html").stdout.should eq("Hello Bar\n") - end - end - - describe 'SetHandler directive' do - it 'should configure a vhost with a SetHandler directive' do - pp = <<-EOS - class { 'apache': } - apache::mod { 'status': } - host { 'files.example.net': ip => '127.0.0.1', } - apache::vhost { 'files.example.net': - docroot => '/var/www/files', - directories => [ - { path => '/var/www/files', }, - { path => '/server-status', provider => 'location', sethandler => 'server-status', }, - ], - } - file { '/var/www/files/index.html': - ensure => file, - content => "Hello World\\n", - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service($service_name) do - it { should be_enabled } - it { should be_running } - end - - it 'should answer to files.example.net' do - shell("/usr/bin/curl -sSf files.example.net:80/index.html").stdout.should eq("Hello World\n") - shell("/usr/bin/curl -sSf files.example.net:80/server-status?auto").stdout.should match(/Scoreboard: /) - end - end - end - - case fact('lsbdistcodename') - when 'precise', 'wheezy' - context 'vhost fallbackresouce example' do - it 'should configure a vhost with Fallbackresource' do - pp = <<-EOS - class { 'apache': } - apache::vhost { 'fallback.example.net': - docroot => '/var/www/fallback', - fallbackresource => '/index.html' - } - file { '/var/www/fallback/index.html': - ensure => file, - content => "Hello World\\n", - } - host { 'fallback.example.net': ip => '127.0.0.1', } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service($service_name) do - it { should be_enabled } - it { should be_running } - end - - it 'should answer to fallback.example.net' do - shell("/usr/bin/curl fallback.example.net:80/Does/Not/Exist") do |r| - r.stdout.should == "Hello World\n" - end - end - - end - else - # The current stable RHEL release (6.4) comes with Apache httpd 2.2.15 - # That was released March 6, 2010. - # FallbackResource was backported to 2.2.16, and released July 25, 2010. - # Ubuntu Lucid (10.04) comes with apache2 2.2.14, released October 3, 2009. - # https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x/STATUS - end - - context 'virtual_docroot hosting separate sites' do - it 'should configure a vhost with VirtualDocumentRoot' do - pp = <<-EOS - class { 'apache': } - apache::vhost { 'virt.example.com': - vhost_name => '*', - serveraliases => '*virt.example.com', - port => '80', - docroot => '/var/www/virt', - virtual_docroot => '/var/www/virt/%1', - } - host { 'virt.example.com': ip => '127.0.0.1', } - host { 'a.virt.example.com': ip => '127.0.0.1', } - host { 'b.virt.example.com': ip => '127.0.0.1', } - file { [ '/var/www/virt/a', '/var/www/virt/b', ]: ensure => directory, } - file { '/var/www/virt/a/index.html': ensure => file, content => "Hello from a.virt\\n", } - file { '/var/www/virt/b/index.html': ensure => file, content => "Hello from b.virt\\n", } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service($service_name) do - it { should be_enabled } - it { should be_running } - end - - it 'should answer to a.virt.example.com' do - shell("/usr/bin/curl a.virt.example.com:80", {:acceptable_exit_codes => 0}) do |r| - r.stdout.should == "Hello from a.virt\n" - end - end - - it 'should answer to b.virt.example.com' do - shell("/usr/bin/curl b.virt.example.com:80", {:acceptable_exit_codes => 0}) do |r| - r.stdout.should == "Hello from b.virt\n" - end - end - end - - context 'proxy_pass for alternative vhost' do - it 'should configure a local vhost and a proxy vhost' do - apply_manifest(%{ - class { 'apache': default_vhost => false, } - apache::vhost { 'localhost': - docroot => '/var/www/local', - ip => '127.0.0.1', - port => '8888', - } - apache::listen { '*:80': } - apache::vhost { 'proxy.example.com': - docroot => '/var/www', - port => '80', - add_listen => false, - proxy_pass => { - 'path' => '/', - 'url' => 'http://localhost:8888/subdir/', - }, - } - host { 'proxy.example.com': ip => '127.0.0.1', } - file { ['/var/www/local', '/var/www/local/subdir']: ensure => directory, } - file { '/var/www/local/subdir/index.html': - ensure => file, - content => "Hello from localhost\\n", - } - }, :catch_failures => true) - end - - describe service($service_name) do - it { should be_enabled } - it { should be_running } - end - - it 'should get a response from the back end' do - shell("/usr/bin/curl --max-redirs 0 proxy.example.com:80") do |r| - r.stdout.should == "Hello from localhost\n" - r.exit_code.should == 0 - end - end - end - - describe 'ip_based' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - ip_based => true, - servername => 'test.server', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file($ports_file) do - it { should be_file } - it { should_not contain 'NameVirtualHost test.server' } - end - end - - describe 'add_listen' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': default_vhost => false } - host { 'testlisten.server': ip => '127.0.0.1' } - apache::listen { '81': } - apache::vhost { 'testlisten.server': - docroot => '/tmp', - port => '80', - add_listen => false, - servername => 'testlisten.server', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file($ports_file) do - it { should be_file } - it { should_not contain 'Listen 80' } - it { should contain 'Listen 81' } - end - end - - describe 'docroot' do - it 'applies cleanly' do - pp = <<-EOS - user { 'test_owner': ensure => present, } - group { 'test_group': ensure => present, } - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp/test', - docroot_owner => 'test_owner', - docroot_group => 'test_group', - docroot_mode => '0750', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file('/tmp/test') do - it { should be_directory } - it { should be_owned_by 'test_owner' } - it { should be_grouped_into 'test_group' } - it { should be_mode 750 } - end - end - - describe 'default_vhost' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - default_vhost => true, - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file($ports_file) do - it { should be_file } - if fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') == '7' - it { should_not contain 'NameVirtualHost test.server' } - elsif fact('operatingsystem') == 'Ubuntu' and fact('operatingsystemrelease') =~ /(14\.04|13\.10)/ - it { should_not contain 'NameVirtualHost test.server' } - else - it { should contain 'NameVirtualHost test.server' } - end - end - - describe file("#{$vhost_dir}/10-test.server.conf") do - it { should be_file } - end - end - - describe 'options' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - options => ['Indexes','FollowSymLinks', 'ExecCGI'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'Options Indexes FollowSymLinks ExecCGI' } - end - end - - describe 'override' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - override => ['All'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'AllowOverride All' } - end - end - - describe 'logroot' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - logroot => '/tmp', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain ' CustomLog "/tmp' } - end - end - - ['access', 'error'].each do |logtype| - case logtype - when 'access' - logname = 'CustomLog' - when 'error' - logname = 'ErrorLog' - end - - describe "#{logtype}_log" do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - logroot => '/tmp', - #{logtype}_log => false, - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should_not contain " #{logname} \"/tmp" } - end - end - - describe "#{logtype}_log_pipe" do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - logroot => '/tmp', - #{logtype}_log_pipe => '|/bin/sh', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain " #{logname} \"|/bin/sh" } - end - end - - describe "#{logtype}_log_syslog" do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - logroot => '/tmp', - #{logtype}_log_syslog => 'syslog', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain " #{logname} \"syslog\"" } - end - end - end - - describe 'access_log_format' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - logroot => '/tmp', - access_log_syslog => 'syslog', - access_log_format => '%h %l', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'CustomLog "syslog" "%h %l"' } - end - end - - describe 'access_log_env_var' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - logroot => '/tmp', - access_log_syslog => 'syslog', - access_log_env_var => 'admin', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'CustomLog "syslog" combined env=admin' } - end - end - - describe 'aliases' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - aliases => [{ alias => '/image', path => '/ftp/pub/image' }], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'Alias /image "/ftp/pub/image"' } - end - end - - describe 'scriptaliases' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - scriptaliases => [{ alias => '/myscript', path => '/usr/share/myscript', }], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'ScriptAlias /myscript "/usr/share/myscript"' } - end - end - - describe 'proxy' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': service_ensure => stopped, } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - proxy_dest => 'test2', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'ProxyPass / test2/' } - end - end - - describe 'actions' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - action => 'php-fastcgi', - } - EOS - pp = pp + "\nclass { 'apache::mod::actions': }" if fact('osfamily') == 'Debian' - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'Action php-fastcgi /cgi-bin virtual' } - end - end - - describe 'suphp' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': service_ensure => stopped, } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - suphp_addhandler => '#{$suphp_handler}', - suphp_engine => 'on', - suphp_configpath => '#{$suphp_configpath}', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain "suPHP_AddHandler #{$suphp_handler}" } - it { should contain 'suPHP_Engine on' } - it { should contain "suPHP_ConfigPath \"#{$suphp_configpath}\"" } - end - end - - describe 'no_proxy_uris' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': service_ensure => stopped, } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - proxy_dest => 'http://test2', - no_proxy_uris => [ 'http://test2/test' ], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'ProxyPass / http://test2/' } - it { should contain 'ProxyPass http://test2/test !' } - end - end - - describe 'redirect' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - redirect_source => ['/images'], - redirect_dest => ['http://test.server/'], - redirect_status => ['permanent'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'Redirect permanent /images http://test.server/' } - end - end - - # Passenger isn't even in EPEL on el-5 - if default['platform'] !~ /^el-5/ - describe 'rack_base_uris' do - if fact('osfamily') == 'RedHat' - it 'adds epel' do - pp = "class { 'epel': }" - apply_manifest(pp, :catch_failures => true) - end - end - - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - rack_base_uris => ['/test'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'RackBaseURI /test' } - end - end - end - - - describe 'request_headers' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - request_headers => ['append MirrorID "mirror 12"'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'append MirrorID "mirror 12"' } - end - end - - describe 'rewrite rules' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - rewrites => [ - { comment => 'test', - rewrite_cond => '%{HTTP_USER_AGENT} ^Lynx/ [OR]', - rewrite_rule => ['^index\.html$ welcome.html'], - } - ], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain '#test' } - it { should contain 'RewriteCond %{HTTP_USER_AGENT} ^Lynx/ [OR]' } - it { should contain 'RewriteRule ^index.html$ welcome.html' } - end - end - - describe 'setenv/setenvif' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - setenv => ['TEST /test'], - setenvif => ['Request_URI "\.gif$" object_is_image=gif'] - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'SetEnv TEST /test' } - it { should contain 'SetEnvIf Request_URI "\.gif$" object_is_image=gif' } - end - end - - describe 'block' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - block => 'scm', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain '' } - end - end - - describe 'wsgi' do - it 'import_script applies cleanly' do - pp = <<-EOS - class { 'apache': } - class { 'apache::mod::wsgi': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - wsgi_application_group => '%{GLOBAL}', - wsgi_daemon_process => 'wsgi', - wsgi_daemon_process_options => {processes => '2'}, - wsgi_process_group => 'nobody', - wsgi_script_aliases => { '/test' => '/test1' }, - wsgi_pass_authorization => 'On', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - it 'import_script applies cleanly', :unless => (fact('lsbdistcodename') == 'lucid' or UNSUPPORTED_PLATFORMS.include?(fact('osfamily'))) do - pp = <<-EOS - class { 'apache': } - class { 'apache::mod::wsgi': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - wsgi_application_group => '%{GLOBAL}', - wsgi_daemon_process => 'wsgi', - wsgi_daemon_process_options => {processes => '2'}, - wsgi_import_script => '/test1', - wsgi_import_script_options => { application-group => '%{GLOBAL}', process-group => 'wsgi' }, - wsgi_process_group => 'nobody', - wsgi_script_aliases => { '/test' => '/test1' }, - wsgi_pass_authorization => 'On', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf"), :unless => (fact('lsbdistcodename') == 'lucid' or UNSUPPORTED_PLATFORMS.include?(fact('osfamily'))) do - it { should be_file } - it { should contain 'WSGIApplicationGroup %{GLOBAL}' } - it { should contain 'WSGIDaemonProcess wsgi processes=2' } - it { should contain 'WSGIImportScript /test1 application-group=%{GLOBAL} process-group=wsgi' } - it { should contain 'WSGIProcessGroup nobody' } - it { should contain 'WSGIScriptAlias /test "/test1"' } - it { should contain 'WSGIPassAuthorization On' } - end - end - - describe 'custom_fragment' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - custom_fragment => inline_template('#weird test string'), - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain '#weird test string' } - end - end - - describe 'itk' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - itk => { user => 'nobody', group => 'nobody' } - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'AssignUserId nobody nobody' } - end - end - - # So what does this work on? - if default['platform'] !~ /^(debian-(6|7)|el-(5|6|7))/ - describe 'fastcgi' do - it 'applies cleanly' do - pp = <<-EOS - class { 'apache': } - class { 'apache::mod::fastcgi': } - host { 'test.server': ip => '127.0.0.1' } - apache::vhost { 'test.server': - docroot => '/tmp', - fastcgi_server => 'localhost', - fastcgi_socket => '/tmp/fast/1234', - fastcgi_dir => '/tmp/fast', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'FastCgiExternalServer localhost -socket /tmp/fast/1234' } - it { should contain '' } - end - end - end - - describe 'additional_includes' do - it 'applies cleanly' do - pp = <<-EOS - if $::osfamily == 'RedHat' and $::selinux == 'true' { - exec { 'set_apache_defaults': - command => 'semanage fcontext -a -t httpd_sys_content_t "/apache_spec(/.*)?"', - path => '/bin:/usr/bin/:/sbin:/usr/sbin', - require => Package[$semanage_package], - } - $semanage_package = $::operatingsystemmajrelease ? { - '5' => 'policycoreutils', - 'default' => 'policycoreutils-python', - } - - package { $semanage_package: ensure => installed } - exec { 'restorecon_apache': - command => 'restorecon -Rv /apache_spec', - path => '/bin:/usr/bin/:/sbin:/usr/sbin', - before => Service['httpd'], - require => Class['apache'], - } - } - class { 'apache': } - host { 'test.server': ip => '127.0.0.1' } - file { '/apache_spec': ensure => directory, } - file { '/apache_spec/include': ensure => present, content => '#additional_includes' } - apache::vhost { 'test.server': - docroot => '/apache_spec', - additional_includes => '/apache_spec/include', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file("#{$vhost_dir}/25-test.server.conf") do - it { should be_file } - it { should contain 'Include "/apache_spec/include"' } - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/apache_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/apache_spec.rb deleted file mode 100644 index f32fec8088..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/apache_spec.rb +++ /dev/null @@ -1,563 +0,0 @@ -require 'spec_helper' - -describe 'apache', :type => :class do - context "on a Debian OS" do - let :facts do - { - :id => 'root', - :kernel => 'Linux', - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - it { should contain_class("apache::params") } - it { should contain_package("httpd").with( - 'notify' => 'Class[Apache::Service]', - 'ensure' => 'installed' - ) - } - it { should contain_user("www-data") } - it { should contain_group("www-data") } - it { should contain_class("apache::service") } - it { should contain_file("/etc/apache2/sites-enabled").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) - } - it { should contain_file("/etc/apache2/mods-enabled").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) - } - it { should contain_file("/etc/apache2/mods-available").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'false', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) - } - it { should contain_concat("/etc/apache2/ports.conf").with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - 'notify' => 'Class[Apache::Service]' - ) - } - # Assert that load files are placed and symlinked for these mods, but no conf file. - [ - 'auth_basic', - 'authn_file', - 'authz_default', - 'authz_groupfile', - 'authz_host', - 'authz_user', - 'dav', - 'env' - ].each do |modname| - it { should contain_file("#{modname}.load").with( - 'path' => "/etc/apache2/mods-available/#{modname}.load", - 'ensure' => 'file' - ) } - it { should contain_file("#{modname}.load symlink").with( - 'path' => "/etc/apache2/mods-enabled/#{modname}.load", - 'ensure' => 'link', - 'target' => "/etc/apache2/mods-available/#{modname}.load" - ) } - it { should_not contain_file("#{modname}.conf") } - it { should_not contain_file("#{modname}.conf symlink") } - end - - context "with Apache version < 2.4" do - let :params do - { :apache_version => '2.2' } - end - - it { should contain_file("/etc/apache2/apache2.conf").with_content %r{^Include "/etc/apache2/conf\.d/\*\.conf"$} } - end - - context "with Apache version >= 2.4" do - let :params do - { :apache_version => '2.4' } - end - - it { should contain_file("/etc/apache2/apache2.conf").with_content %r{^IncludeOptional "/etc/apache2/conf\.d/\*\.conf"$} } - end - - # Assert that both load files and conf files are placed and symlinked for these mods - [ - 'alias', - 'autoindex', - 'dav_fs', - 'deflate', - 'dir', - 'mime', - 'negotiation', - 'setenvif', - ].each do |modname| - it { should contain_file("#{modname}.load").with( - 'path' => "/etc/apache2/mods-available/#{modname}.load", - 'ensure' => 'file' - ) } - it { should contain_file("#{modname}.load symlink").with( - 'path' => "/etc/apache2/mods-enabled/#{modname}.load", - 'ensure' => 'link', - 'target' => "/etc/apache2/mods-available/#{modname}.load" - ) } - it { should contain_file("#{modname}.conf").with( - 'path' => "/etc/apache2/mods-available/#{modname}.conf", - 'ensure' => 'file' - ) } - it { should contain_file("#{modname}.conf symlink").with( - 'path' => "/etc/apache2/mods-enabled/#{modname}.conf", - 'ensure' => 'link', - 'target' => "/etc/apache2/mods-available/#{modname}.conf" - ) } - end - - describe "Don't create user resource" do - context "when parameter manage_user is false" do - let :params do - { :manage_user => false } - end - - it { should_not contain_user('www-data') } - it { should contain_file("/etc/apache2/apache2.conf").with_content %r{^User www-data\n} } - end - end - describe "Don't create group resource" do - context "when parameter manage_group is false" do - let :params do - { :manage_group => false } - end - - it { should_not contain_group('www-data') } - it { should contain_file("/etc/apache2/apache2.conf").with_content %r{^Group www-data\n} } - end - end - - describe "Add extra LogFormats" do - context "When parameter log_formats is a hash" do - let :params do - { :log_formats => { - 'vhost_common' => "%v %h %l %u %t \"%r\" %>s %b", - 'vhost_combined' => "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" - } } - end - - it { should contain_file("/etc/apache2/apache2.conf").with_content %r{^LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common\n} } - it { should contain_file("/etc/apache2/apache2.conf").with_content %r{^LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" vhost_combined\n} } - end - end - - context "on Ubuntu" do - let :facts do - super().merge({ - :operatingsystem => 'Ubuntu' - }) - end - - context "13.10" do - let :facts do - super().merge({ - :lsbdistrelease => '13.10', - :operatingsystemrelease => '13.10' - }) - end - it { should contain_class('apache').with_apache_version('2.4') } - end - context "12.04" do - let :facts do - super().merge({ - :lsbdistrelease => '12.04', - :operatingsystemrelease => '12.04' - }) - end - it { should contain_class('apache').with_apache_version('2.2') } - end - context "13.04" do - let :facts do - super().merge({ - :lsbdistrelease => '13.04', - :operatingsystemrelease => '13.04' - }) - end - it { should contain_class('apache').with_apache_version('2.2') } - end - end - end - context "on a RedHat 5 OS" do - let :facts do - { - :id => 'root', - :kernel => 'Linux', - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '5', - :concat_basedir => '/dne', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_package("httpd").with( - 'notify' => 'Class[Apache::Service]', - 'ensure' => 'installed' - ) - } - it { should contain_user("apache") } - it { should contain_group("apache") } - it { should contain_class("apache::service") } - it { should contain_file("/etc/httpd/conf.d").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) - } - it { should contain_concat("/etc/httpd/conf/ports.conf").with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - 'notify' => 'Class[Apache::Service]' - ) - } - describe "Alternate confd/mod/vhosts directory" do - let :params do - { - :vhost_dir => '/etc/httpd/site.d', - :confd_dir => '/etc/httpd/conf.d', - :mod_dir => '/etc/httpd/mod.d', - } - end - - ['mod.d','site.d','conf.d'].each do |dir| - it { should contain_file("/etc/httpd/#{dir}").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) } - end - - # Assert that load files are placed for these mods, but no conf file. - [ - 'auth_basic', - 'authn_file', - 'authz_default', - 'authz_groupfile', - 'authz_host', - 'authz_user', - 'dav', - 'env', - ].each do |modname| - it { should contain_file("#{modname}.load").with_path( - "/etc/httpd/mod.d/#{modname}.load" - ) } - it { should_not contain_file("#{modname}.conf").with_path( - "/etc/httpd/mod.d/#{modname}.conf" - ) } - end - - # Assert that both load files and conf files are placed for these mods - [ - 'alias', - 'autoindex', - 'dav_fs', - 'deflate', - 'dir', - 'mime', - 'negotiation', - 'setenvif', - ].each do |modname| - it { should contain_file("#{modname}.load").with_path( - "/etc/httpd/mod.d/#{modname}.load" - ) } - it { should contain_file("#{modname}.conf").with_path( - "/etc/httpd/mod.d/#{modname}.conf" - ) } - end - - context "with Apache version < 2.4" do - let :params do - { :apache_version => '2.2' } - end - - it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/conf\.d/\*\.conf"$} } - end - - context "with Apache version >= 2.4" do - let :params do - { :apache_version => '2.4' } - end - - it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^IncludeOptional "/etc/httpd/conf\.d/\*\.conf"$} } - end - - it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/site\.d/\*"$} } - it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/mod\.d/\*\.conf"$} } - it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/mod\.d/\*\.load"$} } - end - - describe "Alternate conf.d directory" do - let :params do - { :confd_dir => '/etc/httpd/special_conf.d' } - end - - it { should contain_file("/etc/httpd/special_conf.d").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) } - end - - describe "Alternate mpm_modules" do - context "when declaring mpm_module is false" do - let :params do - { :mpm_module => false } - end - it 'should not declare mpm modules' do - should_not contain_class('apache::mod::event') - should_not contain_class('apache::mod::itk') - should_not contain_class('apache::mod::peruser') - should_not contain_class('apache::mod::prefork') - should_not contain_class('apache::mod::worker') - end - end - context "when declaring mpm_module => prefork" do - let :params do - { :mpm_module => 'prefork' } - end - it { should contain_class('apache::mod::prefork') } - it { should_not contain_class('apache::mod::event') } - it { should_not contain_class('apache::mod::itk') } - it { should_not contain_class('apache::mod::peruser') } - it { should_not contain_class('apache::mod::worker') } - end - context "when declaring mpm_module => worker" do - let :params do - { :mpm_module => 'worker' } - end - it { should contain_class('apache::mod::worker') } - it { should_not contain_class('apache::mod::event') } - it { should_not contain_class('apache::mod::itk') } - it { should_not contain_class('apache::mod::peruser') } - it { should_not contain_class('apache::mod::prefork') } - end - context "when declaring mpm_module => breakme" do - let :params do - { :mpm_module => 'breakme' } - end - it { expect { subject }.to raise_error Puppet::Error, /does not match/ } - end - end - - describe "different templates for httpd.conf" do - context "with default" do - let :params do - { :conf_template => 'apache/httpd.conf.erb' } - end - it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^# Security\n} } - end - context "with non-default" do - let :params do - { :conf_template => 'site_apache/fake.conf.erb' } - end - it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Fake template for rspec.$} } - end - end - - describe "default mods" do - context "without" do - let :params do - { :default_mods => false } - end - - it { should contain_apache__mod('authz_host') } - it { should_not contain_apache__mod('env') } - end - context "custom" do - let :params do - { :default_mods => [ - 'info', - 'alias', - 'mime', - 'env', - 'setenv', - 'expires', - ]} - end - - it { should contain_apache__mod('authz_host') } - it { should contain_apache__mod('env') } - it { should contain_class('apache::mod::info') } - it { should contain_class('apache::mod::mime') } - end - end - describe "Don't create user resource" do - context "when parameter manage_user is false" do - let :params do - { :manage_user => false } - end - - it { should_not contain_user('apache') } - it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^User apache\n} } - end - end - describe "Don't create group resource" do - context "when parameter manage_group is false" do - let :params do - { :manage_group => false } - end - - it { should_not contain_group('apache') } - it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Group apache\n} } - - end - end - describe "sendfile" do - context "with invalid value" do - let :params do - { :sendfile => 'foo' } - end - it "should fail" do - expect do - subject - end.to raise_error(Puppet::Error, /"foo" does not match/) - end - end - context "On" do - let :params do - { :sendfile => 'On' } - end - it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^EnableSendfile On\n} } - end - context "Off" do - let :params do - { :sendfile => 'Off' } - end - it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^EnableSendfile Off\n} } - end - end - end - context "on a FreeBSD OS" do - let :facts do - { - :id => 'root', - :kernel => 'FreeBSD', - :osfamily => 'FreeBSD', - :operatingsystem => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_class("apache::package").with({'ensure' => 'present'}) } - it { should contain_user("www") } - it { should contain_group("www") } - it { should contain_class("apache::service") } - it { should contain_file("/usr/local/etc/apache22/Vhosts").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) } - it { should contain_file("/usr/local/etc/apache22/Modules").with( - 'ensure' => 'directory', - 'recurse' => 'true', - 'purge' => 'true', - 'notify' => 'Class[Apache::Service]', - 'require' => 'Package[httpd]' - ) } - it { should contain_concat("/usr/local/etc/apache22/ports.conf").with( - 'owner' => 'root', - 'group' => 'wheel', - 'mode' => '0644', - 'notify' => 'Class[Apache::Service]' - ) } - # Assert that load files are placed for these mods, but no conf file. - [ - 'auth_basic', - 'authn_file', - 'authz_default', - 'authz_groupfile', - 'authz_host', - 'authz_user', - 'dav', - 'env' - ].each do |modname| - it { should contain_file("#{modname}.load").with( - 'path' => "/usr/local/etc/apache22/Modules/#{modname}.load", - 'ensure' => 'file' - ) } - it { should_not contain_file("#{modname}.conf") } - end - - # Assert that both load files and conf files are placed for these mods - [ - 'alias', - 'autoindex', - 'dav_fs', - 'deflate', - 'dir', - 'mime', - 'negotiation', - 'setenvif', - ].each do |modname| - it { should contain_file("#{modname}.load").with( - 'path' => "/usr/local/etc/apache22/Modules/#{modname}.load", - 'ensure' => 'file' - ) } - it { should contain_file("#{modname}.conf").with( - 'path' => "/usr/local/etc/apache22/Modules/#{modname}.conf", - 'ensure' => 'file' - ) } - end - end - context 'on all OSes' do - let :facts do - { - :id => 'root', - :kernel => 'Linux', - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - context 'default vhost defaults' do - it { should contain_apache__vhost('default').with_ensure('present') } - it { should contain_apache__vhost('default-ssl').with_ensure('absent') } - end - context 'without default non-ssl vhost' do - let :params do { - :default_vhost => false - } - end - it { should contain_apache__vhost('default').with_ensure('absent') } - end - context 'with default ssl vhost' do - let :params do { - :default_ssl_vhost => true - } - end - it { should contain_apache__vhost('default-ssl').with_ensure('present') } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/dev_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/dev_spec.rb deleted file mode 100644 index eceadca4a7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/dev_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'spec_helper' - -describe 'apache::dev', :type => :class do - context "on a Debian OS" do - let :facts do - { - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6', - } - end - it { should contain_class("apache::params") } - it { should contain_package("libaprutil1-dev") } - it { should contain_package("libapr1-dev") } - it { should contain_package("apache2-prefork-dev") } - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '6', - } - end - it { should contain_class("apache::params") } - it { should contain_package("httpd-devel") } - end - context "on a FreeBSD OS" do - let :pre_condition do - 'include apache::package' - end - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystem => 'FreeBSD', - :operatingsystemrelease => '9', - } - end - it { should contain_class("apache::params") } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/auth_kerb_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/auth_kerb_spec.rb deleted file mode 100644 index 6e2c16b7e9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/auth_kerb_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::auth_kerb', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS", :compile do - let :facts do - { - :id => 'root', - :kernel => 'Linux', - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod("auth_kerb") } - it { should contain_package("libapache2-mod-auth-kerb") } - end - context "on a RedHat OS", :compile do - let :facts do - { - :id => 'root', - :kernel => 'Linux', - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '6', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod("auth_kerb") } - it { should contain_package("mod_auth_kerb") } - end - context "on a FreeBSD OS", :compile do - let :facts do - { - :id => 'root', - :kernel => 'FreeBSD', - :osfamily => 'FreeBSD', - :operatingsystem => 'FreeBSD', - :operatingsystemrelease => '9', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod("auth_kerb") } - it { should contain_package("www/mod_auth_kerb2") } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/authnz_ldap_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/authnz_ldap_spec.rb deleted file mode 100644 index d9ca5398b1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/authnz_ldap_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::authnz_ldap', :type => :class do - let :pre_condition do - 'include apache' - end - - context "on a Debian OS" do - let :facts do - { - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :id => 'root', - :kernel => 'Linux', - :operatingsystem => 'Debian', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_class("apache::mod::ldap") } - it { should contain_apache__mod('authnz_ldap') } - - context 'default verifyServerCert' do - it { should contain_file('authnz_ldap.conf').with_content(/^LDAPVerifyServerCert On$/) } - end - - context 'verifyServerCert = false' do - let(:params) { { :verifyServerCert => false } } - it { should contain_file('authnz_ldap.conf').with_content(/^LDAPVerifyServerCert Off$/) } - end - - context 'verifyServerCert = wrong' do - let(:params) { { :verifyServerCert => 'wrong' } } - it 'should raise an error' do - expect { should raise_error Puppet::Error } - end - end - end #Debian - - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :id => 'root', - :kernel => 'Linux', - :operatingsystem => 'RedHat', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_class("apache::mod::ldap") } - it { should contain_apache__mod('authnz_ldap') } - - context 'default verifyServerCert' do - it { should contain_file('authnz_ldap.conf').with_content(/^LDAPVerifyServerCert On$/) } - end - - context 'verifyServerCert = false' do - let(:params) { { :verifyServerCert => false } } - it { should contain_file('authnz_ldap.conf').with_content(/^LDAPVerifyServerCert Off$/) } - end - - context 'verifyServerCert = wrong' do - let(:params) { { :verifyServerCert => 'wrong' } } - it 'should raise an error' do - expect { should raise_error Puppet::Error } - end - end - end # Redhat - -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/dav_svn_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/dav_svn_spec.rb deleted file mode 100644 index 4898cdece1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/dav_svn_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::dav_svn', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('dav_svn') } - it { should contain_package("libapache2-svn") } - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('dav_svn') } - it { should contain_package("mod_dav_svn") } - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('dav_svn') } - it { should contain_package("devel/subversion") } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/deflate_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/deflate_spec.rb deleted file mode 100644 index f8eb881013..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/deflate_spec.rb +++ /dev/null @@ -1,90 +0,0 @@ -require 'spec_helper' - -# This function is called inside the OS specific contexts -def general_deflate_specs - it { should contain_apache__mod("deflate") } - - it do - should contain_file("deflate.conf").with_content( - "AddOutputFilterByType DEFLATE text/html text/plain text/xml\n"\ - "AddOutputFilterByType DEFLATE text/css\n"\ - "AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript\n"\ - "AddOutputFilterByType DEFLATE application/rss+xml\n"\ - "\n"\ - "DeflateFilterNote Input instream\n"\ - "DeflateFilterNote Output outstream\n"\ - "DeflateFilterNote Ratio ratio\n" - ) - end -end - -describe 'apache::mod::deflate', :type => :class do - let :pre_condition do - 'include apache' - end - - context "On a Debian OS with default params" do - let :facts do - { - :id => 'root', - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - - # Load the more generic tests for this context - general_deflate_specs() - - it { should contain_file("deflate.conf").with({ - :ensure => 'file', - :path => '/etc/apache2/mods-available/deflate.conf', - } ) } - it { should contain_file("deflate.conf symlink").with({ - :ensure => 'link', - :path => '/etc/apache2/mods-enabled/deflate.conf', - } ) } - end - - context "on a RedHat OS with default params" do - let :facts do - { - :id => 'root', - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '6', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - - # Load the more generic tests for this context - general_deflate_specs() - - it { should contain_file("deflate.conf").with_path("/etc/httpd/conf.d/deflate.conf") } - end - - context "On a FreeBSD OS with default params" do - let :facts do - { - :id => 'root', - :osfamily => 'FreeBSD', - :operatingsystem => 'FreeBSD', - :operatingsystemrelease => '9', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :concat_basedir => '/dne', - } - end - - # Load the more generic tests for this context - general_deflate_specs() - - it { should contain_file("deflate.conf").with({ - :ensure => 'file', - :path => '/usr/local/etc/apache22/Modules/deflate.conf', - } ) } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/dev_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/dev_spec.rb deleted file mode 100644 index 0de62afcb5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/dev_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::dev', :type => :class do - [ - ['RedHat', '6', 'Santiago'], - ['Debian', '6', 'squeeze'], - ['FreeBSD', '9', 'FreeBSD'], - ].each do |osfamily, operatingsystemrelease, lsbdistcodename| - if osfamily == 'FreeBSD' - let :pre_condition do - 'include apache::package' - end - end - context "on a #{osfamily} OS" do - let :facts do - { - :lsbdistcodename => lsbdistcodename, - :osfamily => osfamily, - :operatingsystem => osfamily, - :operatingsystemrelease => operatingsystemrelease, - } - end - it { should contain_class('apache::dev') } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/dir_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/dir_spec.rb deleted file mode 100644 index 8bcdc0b6be..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/dir_spec.rb +++ /dev/null @@ -1,103 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::dir', :type => :class do - let :pre_condition do - 'class { "apache": - default_mods => false, - }' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :lsbdistcodename => 'squeeze', - } - end - context "passing no parameters" do - it { should contain_class("apache::params") } - it { should contain_apache__mod('dir') } - it { should contain_file('dir.conf').with_content(/^DirectoryIndex /) } - it { should contain_file('dir.conf').with_content(/ index\.html /) } - it { should contain_file('dir.conf').with_content(/ index\.html\.var /) } - it { should contain_file('dir.conf').with_content(/ index\.cgi /) } - it { should contain_file('dir.conf').with_content(/ index\.pl /) } - it { should contain_file('dir.conf').with_content(/ index\.php /) } - it { should contain_file('dir.conf').with_content(/ index\.xhtml$/) } - end - context "passing indexes => ['example.txt','fearsome.aspx']" do - let :params do - {:indexes => ['example.txt','fearsome.aspx']} - end - it { should contain_file('dir.conf').with_content(/ example\.txt /) } - it { should contain_file('dir.conf').with_content(/ fearsome\.aspx$/) } - end - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'Redhat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - context "passing no parameters" do - it { should contain_class("apache::params") } - it { should contain_apache__mod('dir') } - it { should contain_file('dir.conf').with_content(/^DirectoryIndex /) } - it { should contain_file('dir.conf').with_content(/ index\.html /) } - it { should contain_file('dir.conf').with_content(/ index\.html\.var /) } - it { should contain_file('dir.conf').with_content(/ index\.cgi /) } - it { should contain_file('dir.conf').with_content(/ index\.pl /) } - it { should contain_file('dir.conf').with_content(/ index\.php /) } - it { should contain_file('dir.conf').with_content(/ index\.xhtml$/) } - end - context "passing indexes => ['example.txt','fearsome.aspx']" do - let :params do - {:indexes => ['example.txt','fearsome.aspx']} - end - it { should contain_file('dir.conf').with_content(/ example\.txt /) } - it { should contain_file('dir.conf').with_content(/ fearsome\.aspx$/) } - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - context "passing no parameters" do - it { should contain_class("apache::params") } - it { should contain_apache__mod('dir') } - it { should contain_file('dir.conf').with_content(/^DirectoryIndex /) } - it { should contain_file('dir.conf').with_content(/ index\.html /) } - it { should contain_file('dir.conf').with_content(/ index\.html\.var /) } - it { should contain_file('dir.conf').with_content(/ index\.cgi /) } - it { should contain_file('dir.conf').with_content(/ index\.pl /) } - it { should contain_file('dir.conf').with_content(/ index\.php /) } - it { should contain_file('dir.conf').with_content(/ index\.xhtml$/) } - end - context "passing indexes => ['example.txt','fearsome.aspx']" do - let :params do - {:indexes => ['example.txt','fearsome.aspx']} - end - it { should contain_file('dir.conf').with_content(/ example\.txt /) } - it { should contain_file('dir.conf').with_content(/ fearsome\.aspx$/) } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/event_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/event_spec.rb deleted file mode 100644 index 850bd5c55b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/event_spec.rb +++ /dev/null @@ -1,103 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::event', :type => :class do - let :pre_condition do - 'class { "apache": mpm_module => false, }' - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should_not contain_apache__mod('event') } - it { should contain_file("/usr/local/etc/apache22/Modules/event.conf").with_ensure('file') } - end - context "on a Debian OS" do - let :facts do - { - :lsbdistcodename => 'squeeze', - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { should contain_class("apache::params") } - it { should_not contain_apache__mod('event') } - it { should contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file') } - it { should contain_file("/etc/apache2/mods-enabled/event.conf").with_ensure('link') } - - context "with Apache version < 2.4" do - let :params do - { - :apache_version => '2.2', - } - end - - it { should_not contain_file("/etc/apache2/mods-available/event.load") } - it { should_not contain_file("/etc/apache2/mods-enabled/event.load") } - - it { should contain_package("apache2-mpm-event") } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { should contain_file("/etc/apache2/mods-available/event.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so\n" - }) - } - it { should contain_file("/etc/apache2/mods-enabled/event.load").with_ensure('link') } - end - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { should contain_class("apache::params") } - it { should_not contain_apache__mod('worker') } - it { should_not contain_apache__mod('prefork') } - - it { should contain_file("/etc/httpd/conf.d/event.conf").with_ensure('file') } - - it { should contain_file("/etc/httpd/conf.d/event.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_event_module modules/mod_mpm_event.so\n", - }) - } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/fastcgi_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/fastcgi_spec.rb deleted file mode 100644 index 98ad2e8706..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/fastcgi_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::fastcgi', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('fastcgi') } - it { should contain_package("libapache2-mod-fastcgi") } - it { should contain_file('fastcgi.conf') } - end - - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('fastcgi') } - it { should contain_package("mod_fastcgi") } - it { should_not contain_file('fastcgi.conf') } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/fcgid_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/fcgid_spec.rb deleted file mode 100644 index 16719415d5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/fcgid_spec.rb +++ /dev/null @@ -1,86 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::fcgid', :type => :class do - let :pre_condition do - 'include apache' - end - - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('fcgid') } - it { should contain_package("libapache2-mod-fcgid") } - end - - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - describe 'without parameters' do - it { should contain_class("apache::params") } - it { should contain_apache__mod('fcgid') } - it { should contain_package("mod_fcgid") } - end - - describe 'with parameters' do - let :params do { - :options => { - 'FcgidIPCDir' => '/var/run/fcgidsock', - 'SharememPath' => '/var/run/fcgid_shm', - 'FcgidMinProcessesPerClass' => '0', - 'AddHandler' => 'fcgid-script .fcgi', - } - } end - - it 'should contain the correct config' do - content = subject.resource('file', 'fcgid.conf').send(:parameters)[:content] - content.split("\n").reject { |c| c =~ /(^#|^$)/ }.should == [ - '', - ' AddHandler fcgid-script .fcgi', - ' FcgidIPCDir /var/run/fcgidsock', - ' FcgidMinProcessesPerClass 0', - ' SharememPath /var/run/fcgid_shm', - '', - ] - end - end - end - - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { should contain_class("apache::params") } - it { should contain_apache__mod('fcgid') } - it { should contain_package("www/mod_fcgid") } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/info_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/info_spec.rb deleted file mode 100644 index ed078c519f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/info_spec.rb +++ /dev/null @@ -1,119 +0,0 @@ -require 'spec_helper' - -# This function is called inside the OS specific contexts -def general_info_specs - it { should contain_apache__mod("info") } - - it do - should contain_file("info.conf").with_content( - "\n"\ - " SetHandler server-info\n"\ - " Order deny,allow\n"\ - " Deny from all\n"\ - " Allow from 127.0.0.1 ::1\n"\ - "\n" - ) - end -end - -describe 'apache::mod::info', :type => :class do - let :pre_condition do - 'include apache' - end - - context "On a Debian OS with default params" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - # Load the more generic tests for this context - general_info_specs() - - it { should contain_file("info.conf").with({ - :ensure => 'file', - :path => '/etc/apache2/mods-available/info.conf', - } ) } - it { should contain_file("info.conf symlink").with({ - :ensure => 'link', - :path => '/etc/apache2/mods-enabled/info.conf', - } ) } - end - - context "on a RedHat OS with default params" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - # Load the more generic tests for this context - general_info_specs() - - it { should contain_file("info.conf").with_path("/etc/httpd/conf.d/info.conf") } - end - - context "On a FreeBSD OS with default params" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - # Load the more generic tests for this context - general_info_specs() - - it { should contain_file("info.conf").with({ - :ensure => 'file', - :path => '/usr/local/etc/apache22/Modules/info.conf', - } ) } - end - - context "with $allow_from => ['10.10.10.10','11.11.11.11']" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do - { :allow_from => ['10.10.10.10','11.11.11.11'] } - end - it do - should contain_file("info.conf").with_content( - "\n"\ - " SetHandler server-info\n"\ - " Order deny,allow\n"\ - " Deny from all\n"\ - " Allow from 10.10.10.10 11.11.11.11\n"\ - "\n" - ) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/itk_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/itk_spec.rb deleted file mode 100644 index d9fe2e3d12..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/itk_spec.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::itk', :type => :class do - let :pre_condition do - 'class { "apache": mpm_module => false, }' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should_not contain_apache__mod('itk') } - it { should contain_file("/etc/apache2/mods-available/itk.conf").with_ensure('file') } - it { should contain_file("/etc/apache2/mods-enabled/itk.conf").with_ensure('link') } - - context "with Apache version < 2.4" do - let :params do - { - :apache_version => '2.2', - } - end - - it { should_not contain_file("/etc/apache2/mods-available/itk.load") } - it { should_not contain_file("/etc/apache2/mods-enabled/itk.load") } - - it { should contain_package("apache2-mpm-itk") } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { should contain_file("/etc/apache2/mods-available/itk.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_itk_module /usr/lib/apache2/modules/mod_mpm_itk.so\n" - }) - } - it { should contain_file("/etc/apache2/mods-enabled/itk.load").with_ensure('link') } - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should_not contain_apache__mod('itk') } - it { should contain_file("/usr/local/etc/apache22/Modules/itk.conf").with_ensure('file') } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/mime_magic_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/mime_magic_spec.rb deleted file mode 100644 index e9984ecbaf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/mime_magic_spec.rb +++ /dev/null @@ -1,109 +0,0 @@ -require 'spec_helper' - -# This function is called inside the OS specific contexts -def general_mime_magic_specs - it { should contain_apache__mod("mime_magic") } -end - -describe 'apache::mod::mime_magic', :type => :class do - let :pre_condition do - 'include apache' - end - - context "On a Debian OS with default params" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - general_mime_magic_specs() - - it do - should contain_file("mime_magic.conf").with_content( - "MIMEMagicFile \"/etc/apache2/magic\"\n" - ) - end - - it { should contain_file("mime_magic.conf").with({ - :ensure => 'file', - :path => '/etc/apache2/mods-available/mime_magic.conf', - } ) } - it { should contain_file("mime_magic.conf symlink").with({ - :ensure => 'link', - :path => '/etc/apache2/mods-enabled/mime_magic.conf', - } ) } - - context "with magic_file => /tmp/Debian_magic" do - let :params do - { :magic_file => "/tmp/Debian_magic" } - end - - it do - should contain_file("mime_magic.conf").with_content( - "MIMEMagicFile \"/tmp/Debian_magic\"\n" - ) - end - end - - end - - context "on a RedHat OS with default params" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - general_mime_magic_specs() - - it do - should contain_file("mime_magic.conf").with_content( - "MIMEMagicFile \"/etc/httpd/conf/magic\"\n" - ) - end - - it { should contain_file("mime_magic.conf").with_path("/etc/httpd/conf.d/mime_magic.conf") } - - end - - context "with magic_file => /tmp/magic" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - let :params do - { :magic_file => "/tmp/magic" } - end - - it do - should contain_file("mime_magic.conf").with_content( - "MIMEMagicFile \"/tmp/magic\"\n" - ) - end - end - - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/mime_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/mime_spec.rb deleted file mode 100644 index 2b6154fb81..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/mime_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -require 'spec_helper' - -# This function is called inside the OS specific conte, :compilexts -def general_mime_specs - it { should contain_apache__mod("mime") } -end - -describe 'apache::mod::mime', :type => :class do - let :pre_condition do - 'include apache' - end - - context "On a Debian OS with default params", :compile do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - general_mime_specs() - - it { should contain_file("mime.conf").with_path('/etc/apache2/mods-available/mime.conf') } - - end - - context "on a RedHat OS with default params", :compile do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - general_mime_specs() - - it { should contain_file("mime.conf").with_path("/etc/httpd/conf.d/mime.conf") } - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/pagespeed_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/pagespeed_spec.rb deleted file mode 100644 index 9439f719e6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/pagespeed_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::pagespeed', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('pagespeed') } - it { should contain_package("mod-pagespeed-stable") } - it { should contain_file('pagespeed.conf') } - end - - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('pagespeed') } - it { should contain_package("mod-pagespeed-stable") } - it { should contain_file('pagespeed.conf') } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/passenger_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/passenger_spec.rb deleted file mode 100644 index 3bf7d29952..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/passenger_spec.rb +++ /dev/null @@ -1,230 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::passenger', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('passenger') } - it { should contain_package("libapache2-mod-passenger") } - it { should contain_file('passenger.load').with({ - 'path' => '/etc/apache2/mods-available/passenger.load', - }) } - it { should contain_file('passenger.conf').with({ - 'path' => '/etc/apache2/mods-available/passenger.conf', - }) } - it { should contain_file('passenger_package.conf').with_ensure('absent') } - describe "with passenger_root => '/usr/lib/example'" do - let :params do - { :passenger_root => '/usr/lib/example' } - end - it { should contain_file('passenger.conf').with_content(%r{PassengerRoot "/usr/lib/example"}) } - end - describe "with passenger_ruby => /usr/lib/example/ruby" do - let :params do - { :passenger_ruby => '/usr/lib/example/ruby' } - end - it { should contain_file('passenger.conf').with_content(%r{PassengerRuby "/usr/lib/example/ruby"}) } - end - describe "with passenger_default_ruby => /usr/lib/example/ruby1.9.3" do - let :params do - { :passenger_ruby => '/usr/lib/example/ruby1.9.3' } - end - it { should contain_file('passenger.conf').with_content(%r{PassengerRuby "/usr/lib/example/ruby1.9.3"}) } - end - describe "with passenger_high_performance => on" do - let :params do - { :passenger_high_performance => 'on' } - end - it { should contain_file('passenger.conf').with_content(/^ PassengerHighPerformance on$/) } - end - describe "with passenger_pool_idle_time => 1200" do - let :params do - { :passenger_pool_idle_time => 1200 } - end - it { should contain_file('passenger.conf').with_content(/^ PassengerPoolIdleTime 1200$/) } - end - describe "with passenger_max_requests => 20" do - let :params do - { :passenger_max_requests => 20 } - end - it { should contain_file('passenger.conf').with_content(/^ PassengerMaxRequests 20$/) } - end - describe "with passenger_stat_throttle_rate => 10" do - let :params do - { :passenger_stat_throttle_rate => 10 } - end - it { should contain_file('passenger.conf').with_content(/^ PassengerStatThrottleRate 10$/) } - end - describe "with passenger_max_pool_size => 16" do - let :params do - { :passenger_max_pool_size => 16 } - end - it { should contain_file('passenger.conf').with_content(/^ PassengerMaxPoolSize 16$/) } - end - describe "with rack_autodetect => on" do - let :params do - { :rack_autodetect => 'on' } - end - it { should contain_file('passenger.conf').with_content(/^ RackAutoDetect on$/) } - end - describe "with rails_autodetect => on" do - let :params do - { :rails_autodetect => 'on' } - end - it { should contain_file('passenger.conf').with_content(/^ RailsAutoDetect on$/) } - end - describe "with passenger_use_global_queue => on" do - let :params do - { :passenger_use_global_queue => 'on' } - end - it { should contain_file('passenger.conf').with_content(/^ PassengerUseGlobalQueue on$/) } - end - describe "with mod_path => '/usr/lib/foo/mod_foo.so'" do - let :params do - { :mod_path => '/usr/lib/foo/mod_foo.so' } - end - it { should contain_file('passenger.load').with_content(/^LoadModule passenger_module \/usr\/lib\/foo\/mod_foo\.so$/) } - end - describe "with mod_lib_path => '/usr/lib/foo'" do - let :params do - { :mod_lib_path => '/usr/lib/foo' } - end - it { should contain_file('passenger.load').with_content(/^LoadModule passenger_module \/usr\/lib\/foo\/mod_passenger\.so$/) } - end - describe "with mod_lib => 'mod_foo.so'" do - let :params do - { :mod_lib => 'mod_foo.so' } - end - it { should contain_file('passenger.load').with_content(/^LoadModule passenger_module \/usr\/lib\/apache2\/modules\/mod_foo\.so$/) } - end - describe "with mod_id => 'mod_foo'" do - let :params do - { :mod_id => 'mod_foo' } - end - it { should contain_file('passenger.load').with_content(/^LoadModule mod_foo \/usr\/lib\/apache2\/modules\/mod_passenger\.so$/) } - end - - context "with Ubuntu 12.04 defaults" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '12.04', - :operatingsystem => 'Ubuntu', - :lsbdistrelease => '12.04', - :concat_basedir => '/dne', - :id => 'root', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { should contain_file('passenger.conf').with_content(%r{PassengerRoot "/usr"}) } - it { should contain_file('passenger.conf').with_content(%r{PassengerRuby "/usr/bin/ruby"}) } - it { should contain_file('passenger.conf').without_content(/PassengerDefaultRuby/) } - end - - context "with Ubuntu 14.04 defaults" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '14.04', - :operatingsystem => 'Ubuntu', - :lsbdistrelease => '14.04', - :concat_basedir => '/dne', - :id => 'root', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { should contain_file('passenger.conf').with_content(%r{PassengerRoot "/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini"}) } - it { should contain_file('passenger.conf').without_content(/PassengerRuby/) } - it { should contain_file('passenger.conf').with_content(%r{PassengerDefaultRuby "/usr/bin/ruby"}) } - end - - context "with Debian 7 defaults" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '7.3', - :operatingsystem => 'Debian', - :lsbdistcodename => 'wheezy', - :concat_basedir => '/dne', - :id => 'root', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { should contain_file('passenger.conf').with_content(%r{PassengerRoot "/usr"}) } - it { should contain_file('passenger.conf').with_content(%r{PassengerRuby "/usr/bin/ruby"}) } - it { should contain_file('passenger.conf').without_content(/PassengerDefaultRuby/) } - end - end - - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('passenger') } - it { should contain_package("mod_passenger") } - it { should contain_file('passenger_package.conf').with({ - 'path' => '/etc/httpd/conf.d/passenger.conf', - }) } - it { should contain_file('passenger_package.conf').without_content } - it { should contain_file('passenger_package.conf').without_source } - it { should contain_file('passenger.load').with({ - 'path' => '/etc/httpd/conf.d/passenger.load', - }) } - it { should contain_file('passenger.conf').without_content(/PassengerRoot/) } - it { should contain_file('passenger.conf').without_content(/PassengerRuby/) } - describe "with passenger_root => '/usr/lib/example'" do - let :params do - { :passenger_root => '/usr/lib/example' } - end - it { should contain_file('passenger.conf').with_content(/^ PassengerRoot "\/usr\/lib\/example"$/) } - end - describe "with passenger_ruby => /usr/lib/example/ruby" do - let :params do - { :passenger_ruby => '/usr/lib/example/ruby' } - end - it { should contain_file('passenger.conf').with_content(/^ PassengerRuby "\/usr\/lib\/example\/ruby"$/) } - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('passenger') } - it { should contain_package("www/rubygem-passenger") } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/perl_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/perl_spec.rb deleted file mode 100644 index f674318e28..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/perl_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::perl', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('perl') } - it { should contain_package("libapache2-mod-perl2") } - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('perl') } - it { should contain_package("mod_perl") } - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('perl') } - it { should contain_package("www/mod_perl2") } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/peruser_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/peruser_spec.rb deleted file mode 100644 index e1ee004e93..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/peruser_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::peruser', :type => :class do - let :pre_condition do - 'class { "apache": mpm_module => false, }' - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should_not contain_apache__mod('peruser') } - it { should contain_file("/usr/local/etc/apache22/Modules/peruser.conf").with_ensure('file') } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/php_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/php_spec.rb deleted file mode 100644 index e42f4fcfe4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/php_spec.rb +++ /dev/null @@ -1,224 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::php', :type => :class do - describe "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - context "with mpm_module => prefork" do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('php5') } - it { should contain_package("libapache2-mod-php5") } - it { should contain_file("php5.load").with( - :content => "LoadModule php5_module /usr/lib/apache2/modules/libphp5.so\n" - ) } - end - context 'with mpm_module => worker' do - let :pre_condition do - 'class { "apache": mpm_module => worker, }' - end - it 'should raise an error' do - expect { subject }.to raise_error Puppet::Error, /mpm_module => 'prefork'/ - end - end - end - describe "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - context "with default params" do - let :pre_condition do - 'class { "apache": }' - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('php5') } - it { should contain_package("php") } - it { should contain_file("php5.load").with( - :content => "LoadModule php5_module modules/libphp5.so\n" - ) } - end - context "with alternative package name" do let :pre_condition do - 'class { "apache": }' - end - let :params do - { :package_name => 'php54'} - end - it { should contain_package("php54") } - end - context "with alternative path" do let :pre_condition do - 'class { "apache": }' - end - let :params do - { :path => 'alternative-path'} - end - it { should contain_file("php5.load").with( - :content => "LoadModule php5_module alternative-path\n" - ) } - end - context "with alternative extensions" do let :pre_condition do - 'class { "apache": }' - end - let :params do - { :extensions => ['.php','.php5']} - end - it { should contain_file("php5.conf").with_content(/AddHandler php5-script .php .php5\n/) } - end - context "with specific version" do - let :pre_condition do - 'class { "apache": }' - end - let :params do - { :package_ensure => '5.3.13'} - end - it { should contain_package("php").with( - :ensure => '5.3.13' - ) } - end - context "with mpm_module => prefork" do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('php5') } - it { should contain_package("php") } - it { should contain_file("php5.load").with( - :content => "LoadModule php5_module modules/libphp5.so\n" - ) } - end - end - describe "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - context "with mpm_module => prefork" do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - it { should contain_class('apache::params') } - it { should contain_apache__mod('php5') } - it { should contain_package("lang/php5") } - it { should contain_file('php5.load') } - end - # FIXME: not sure about the following context - context 'with mpm_module => worker' do - let :pre_condition do - 'class { "apache": mpm_module => worker, }' - end - it 'should raise an error' do - expect { subject.should contain_apache__mod('php5') }.to raise_error Puppet::Error, /mpm_module => 'prefork'/ - end - end - end - describe "OS independent tests" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - } - end - context 'with content param' do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - let :params do - { :content => 'somecontent' } - end - it { should contain_file('php5.conf').with( - :content => 'somecontent' - ) } - end - context 'with template param' do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - let :params do - { :template => 'apache/mod/php5.conf.erb' } - end - it { should contain_file('php5.conf').with( - :content => /^# PHP is an HTML-embedded scripting language which attempts to make it/ - ) } - end - context 'with source param' do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - let :params do - { :source => 'some-path' } - end - it { should contain_file('php5.conf').with( - :source => 'some-path' - ) } - end - context 'content has priority over template' do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - let :params do - { - :template => 'apache/mod/php5.conf.erb', - :content => 'somecontent' - } - end - it { should contain_file('php5.conf').with( - :content => 'somecontent' - ) } - end - context 'source has priority over template' do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - let :params do - { - :template => 'apache/mod/php5.conf.erb', - :source => 'some-path' - } - end - it { should contain_file('php5.conf').with( - :source => 'some-path' - ) } - end - context 'source has priority over content' do - let :pre_condition do - 'class { "apache": mpm_module => prefork, }' - end - let :params do - { - :content => 'somecontent', - :source => 'some-path' - } - end - it { should contain_file('php5.conf').with( - :source => 'some-path' - ) } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/prefork_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/prefork_spec.rb deleted file mode 100644 index 847aecf9c7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/prefork_spec.rb +++ /dev/null @@ -1,114 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::prefork', :type => :class do - let :pre_condition do - 'class { "apache": mpm_module => false, }' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should_not contain_apache__mod('prefork') } - it { should contain_file("/etc/apache2/mods-available/prefork.conf").with_ensure('file') } - it { should contain_file("/etc/apache2/mods-enabled/prefork.conf").with_ensure('link') } - - context "with Apache version < 2.4" do - let :params do - { - :apache_version => '2.2', - } - end - - it { should_not contain_file("/etc/apache2/mods-available/prefork.load") } - it { should_not contain_file("/etc/apache2/mods-enabled/prefork.load") } - - it { should contain_package("apache2-mpm-prefork") } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { should contain_file("/etc/apache2/mods-available/prefork.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_prefork_module /usr/lib/apache2/modules/mod_mpm_prefork.so\n" - }) - } - it { should contain_file("/etc/apache2/mods-enabled/prefork.load").with_ensure('link') } - end - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should_not contain_apache__mod('prefork') } - it { should contain_file("/etc/httpd/conf.d/prefork.conf").with_ensure('file') } - - context "with Apache version < 2.4" do - let :params do - { - :apache_version => '2.2', - } - end - - it { should contain_file_line("/etc/sysconfig/httpd prefork enable").with({ - 'require' => 'Package[httpd]', - }) - } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { should_not contain_apache__mod('event') } - - it { should contain_file("/etc/httpd/conf.d/prefork.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_prefork_module modules/mod_mpm_prefork.so\n", - }) - } - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should_not contain_apache__mod('prefork') } - it { should contain_file("/usr/local/etc/apache22/Modules/prefork.conf").with_ensure('file') } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/proxy_html_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/proxy_html_spec.rb deleted file mode 100644 index 77e1ab15de..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/proxy_html_spec.rb +++ /dev/null @@ -1,85 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::proxy_html', :type => :class do - let :pre_condition do - [ - 'include apache', - 'include apache::mod::proxy', - 'include apache::mod::proxy_http', - ] - end - context "on a Debian OS" do - shared_examples "debian" do |loadfiles| - it { should contain_class("apache::params") } - it { should contain_apache__mod('proxy_html').with(:loadfiles => loadfiles) } - it { should contain_package("libapache2-mod-proxy-html") } - end - let :facts do - { - :osfamily => 'Debian', - :concat_basedir => '/dne', - :architecture => 'i386', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - :hardwaremodel => 'i386', - } - end - - context "on squeeze" do - let(:facts) { super().merge({ :operatingsystemrelease => '6' }) } - it_behaves_like "debian", ['/usr/lib/libxml2.so.2'] - end - context "on wheezy" do - let(:facts) { super().merge({ :operatingsystemrelease => '7' }) } - context "i386" do - let(:facts) { super().merge({ - :hardwaremodel => 'i686', - :architecture => 'i386' - })} - it_behaves_like "debian", ["/usr/lib/i386-linux-gnu/libxml2.so.2"] - end - context "x64" do - let(:facts) { super().merge({ - :hardwaremodel => 'x86_64', - :architecture => 'amd64' - })} - it_behaves_like "debian", ["/usr/lib/x86_64-linux-gnu/libxml2.so.2"] - end - end - end - context "on a RedHat OS", :compile do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('proxy_html').with(:loadfiles => nil) } - it { should contain_package("mod_proxy_html") } - end - context "on a FreeBSD OS", :compile do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('proxy_html').with(:loadfiles => nil) } - it { should contain_package("www/mod_proxy_html") } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/python_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/python_spec.rb deleted file mode 100644 index d2d1fca7b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/python_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::python', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod("python") } - it { should contain_package("libapache2-mod-python") } - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod("python") } - it { should contain_package("mod_python") } - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod("python") } - it { should contain_package("www/mod_python3") } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/rpaf_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/rpaf_spec.rb deleted file mode 100644 index 949dd5702b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/rpaf_spec.rb +++ /dev/null @@ -1,88 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::rpaf', :type => :class do - let :pre_condition do - [ - 'include apache', - ] - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('rpaf') } - it { should contain_package("libapache2-mod-rpaf") } - it { should contain_file('rpaf.conf').with({ - 'path' => '/etc/apache2/mods-available/rpaf.conf', - }) } - it { should contain_file('rpaf.conf').with_content(/^RPAFenable On$/) } - - describe "with sethostname => true" do - let :params do - { :sethostname => 'true' } - end - it { should contain_file('rpaf.conf').with_content(/^RPAFsethostname On$/) } - end - describe "with proxy_ips => [ 10.42.17.8, 10.42.18.99 ]" do - let :params do - { :proxy_ips => [ '10.42.17.8', '10.42.18.99' ] } - end - it { should contain_file('rpaf.conf').with_content(/^RPAFproxy_ips 10.42.17.8 10.42.18.99$/) } - end - describe "with header => X-Real-IP" do - let :params do - { :header => 'X-Real-IP' } - end - it { should contain_file('rpaf.conf').with_content(/^RPAFheader X-Real-IP$/) } - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('rpaf') } - it { should contain_package("www/mod_rpaf2") } - it { should contain_file('rpaf.conf').with({ - 'path' => '/usr/local/etc/apache22/Modules/rpaf.conf', - }) } - it { should contain_file('rpaf.conf').with_content(/^RPAFenable On$/) } - - describe "with sethostname => true" do - let :params do - { :sethostname => 'true' } - end - it { should contain_file('rpaf.conf').with_content(/^RPAFsethostname On$/) } - end - describe "with proxy_ips => [ 10.42.17.8, 10.42.18.99 ]" do - let :params do - { :proxy_ips => [ '10.42.17.8', '10.42.18.99' ] } - end - it { should contain_file('rpaf.conf').with_content(/^RPAFproxy_ips 10.42.17.8 10.42.18.99$/) } - end - describe "with header => X-Real-IP" do - let :params do - { :header => 'X-Real-IP' } - end - it { should contain_file('rpaf.conf').with_content(/^RPAFheader X-Real-IP$/) } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/speling_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/speling_spec.rb deleted file mode 100644 index e7e6e1d640..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/speling_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::speling', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_apache__mod('speling') } - end - - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_apache__mod('speling') } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/ssl_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/ssl_spec.rb deleted file mode 100644 index 11e7964ded..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/ssl_spec.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::ssl', :type => :class do - let :pre_condition do - 'include apache' - end - context 'on an unsupported OS' do - let :facts do - { - :osfamily => 'Magic', - :operatingsystemrelease => '0', - :concat_basedir => '/dne', - :operatingsystem => 'Magic', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { expect { subject }.to raise_error(Puppet::Error, /Unsupported osfamily:/) } - end - - context 'on a RedHat OS' do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class('apache::params') } - it { should contain_apache__mod('ssl') } - it { should contain_package('mod_ssl') } - end - - context 'on a Debian OS' do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class('apache::params') } - it { should contain_apache__mod('ssl') } - it { should_not contain_package('libapache2-mod-ssl') } - end - - context 'on a FreeBSD OS' do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class('apache::params') } - it { should contain_apache__mod('ssl') } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/status_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/status_spec.rb deleted file mode 100644 index 5023bc7bf1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/status_spec.rb +++ /dev/null @@ -1,198 +0,0 @@ -require 'spec_helper' - -# Helper function for testing the contents of `status.conf` -def status_conf_spec(allow_from, extended_status) - it do - should contain_file("status.conf").with_content( - "\n"\ - " SetHandler server-status\n"\ - " Order deny,allow\n"\ - " Deny from all\n"\ - " Allow from #{Array(allow_from).join(' ')}\n"\ - "\n"\ - "ExtendedStatus #{extended_status}\n"\ - "\n"\ - "\n"\ - " # Show Proxy LoadBalancer status in mod_status\n"\ - " ProxyStatus On\n"\ - "\n" - ) - end -end - -describe 'apache::mod::status', :type => :class do - let :pre_condition do - 'include apache' - end - - context "on a Debian OS with default params" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { should contain_apache__mod("status") } - - status_conf_spec(["127.0.0.1", "::1"], "On") - - it { should contain_file("status.conf").with({ - :ensure => 'file', - :path => '/etc/apache2/mods-available/status.conf', - } ) } - - it { should contain_file("status.conf symlink").with({ - :ensure => 'link', - :path => '/etc/apache2/mods-enabled/status.conf', - } ) } - - end - - context "on a RedHat OS with default params" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - it { should contain_apache__mod("status") } - - status_conf_spec(["127.0.0.1", "::1"], "On") - - it { should contain_file("status.conf").with_path("/etc/httpd/conf.d/status.conf") } - - end - - context "with custom parameters $allow_from => ['10.10.10.10','11.11.11.11'], $extended_status => 'Off'" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do - { - :allow_from => ['10.10.10.10','11.11.11.11'], - :extended_status => 'Off', - } - end - - status_conf_spec(["10.10.10.10", "11.11.11.11"], "Off") - - end - - context "with valid parameter type $allow_from => ['10.10.10.10']" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do - { :allow_from => ['10.10.10.10'] } - end - it 'should expect to succeed array validation' do - expect { - should contain_file("status.conf") - }.not_to raise_error() - end - end - - context "with invalid parameter type $allow_from => '10.10.10.10'" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do - { :allow_from => '10.10.10.10' } - end - it 'should expect to fail array validation' do - expect { - should contain_file("status.conf") - }.to raise_error(Puppet::Error) - end - end - - # Only On or Off are valid options - ['On', 'Off'].each do |valid_param| - context "with valid value $extended_status => '#{valid_param}'" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do - { :extended_status => valid_param } - end - it 'should expect to succeed regular expression validation' do - expect { - should contain_file("status.conf") - }.not_to raise_error() - end - end - end - - ['Yes', 'No'].each do |invalid_param| - context "with invalid value $extended_status => '#{invalid_param}'" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do - { :extended_status => invalid_param } - end - it 'should expect to fail regular expression validation' do - expect { - should contain_file("status.conf") - }.to raise_error(Puppet::Error) - end - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/suphp_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/suphp_spec.rb deleted file mode 100644 index cb91997ac1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/suphp_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::suphp', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_package("libapache2-mod-suphp") } - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_package("mod_suphp") } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/worker_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/worker_spec.rb deleted file mode 100644 index 4843a26e65..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/worker_spec.rb +++ /dev/null @@ -1,161 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::worker', :type => :class do - let :pre_condition do - 'class { "apache": mpm_module => false, }' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should_not contain_apache__mod('worker') } - it { should contain_file("/etc/apache2/mods-available/worker.conf").with_ensure('file') } - it { should contain_file("/etc/apache2/mods-enabled/worker.conf").with_ensure('link') } - - context "with Apache version < 2.4" do - let :params do - { - :apache_version => '2.2', - } - end - - it { should_not contain_file("/etc/apache2/mods-available/worker.load") } - it { should_not contain_file("/etc/apache2/mods-enabled/worker.load") } - - it { should contain_package("apache2-mpm-worker") } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { should contain_file("/etc/apache2/mods-available/worker.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_worker_module /usr/lib/apache2/modules/mod_mpm_worker.so\n" - }) - } - it { should contain_file("/etc/apache2/mods-enabled/worker.load").with_ensure('link') } - end - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should_not contain_apache__mod('worker') } - it { should contain_file("/etc/httpd/conf.d/worker.conf").with_ensure('file') } - - context "with Apache version < 2.4" do - let :params do - { - :apache_version => '2.2', - } - end - - it { should contain_file_line("/etc/sysconfig/httpd worker enable").with({ - 'require' => 'Package[httpd]', - }) - } - end - - context "with Apache version >= 2.4" do - let :params do - { - :apache_version => '2.4', - } - end - - it { should_not contain_apache__mod('event') } - - it { should contain_file("/etc/httpd/conf.d/worker.load").with({ - 'ensure' => 'file', - 'content' => "LoadModule mpm_worker_module modules/mod_mpm_worker.so\n", - }) - } - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should_not contain_apache__mod('worker') } - it { should contain_file("/usr/local/etc/apache22/Modules/worker.conf").with_ensure('file') } - end - - # Template config doesn't vary by distro - context "on all distros" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - } - end - - context 'defaults' do - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ServerLimit\s+25$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+StartServers\s+2$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxClients\s+150$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MinSpareThreads\s+25$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxSpareThreads\s+75$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ThreadsPerChild\s+25$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxRequestsPerChild\s+0$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ThreadLimit\s+64$/) } - end - - context 'setting params' do - let :params do - { - :serverlimit => 10, - :startservers => 11, - :maxclients => 12, - :minsparethreads => 13, - :maxsparethreads => 14, - :threadsperchild => 15, - :maxrequestsperchild => 16, - :threadlimit => 17 - } - end - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ServerLimit\s+10$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+StartServers\s+11$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxClients\s+12$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MinSpareThreads\s+13$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxSpareThreads\s+14$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ThreadsPerChild\s+15$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+MaxRequestsPerChild\s+16$/) } - it { should contain_file('/etc/httpd/conf.d/worker.conf').with(:content => /^\s+ThreadLimit\s+17$/) } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/wsgi_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/wsgi_spec.rb deleted file mode 100644 index d4c391a291..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/mod/wsgi_spec.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod::wsgi', :type => :class do - let :pre_condition do - 'include apache' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('wsgi') } - it { should contain_package("libapache2-mod-wsgi") } - end - context "on a RedHat OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('wsgi') } - it { should contain_package("mod_wsgi") } - - describe "with custom WSGISocketPrefix" do - let :params do - { :wsgi_socket_prefix => 'run/wsgi' } - end - it {should contain_file('wsgi.conf').with_content(/^ WSGISocketPrefix run\/wsgi$/)} - end - describe "with custom WSGIPythonHome" do - let :params do - { :wsgi_python_home => '/path/to/virtenv' } - end - it {should contain_file('wsgi.conf').with_content(/^ WSGIPythonHome "\/path\/to\/virtenv"$/)} - end - end - context "on a FreeBSD OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_class("apache::params") } - it { should contain_apache__mod('wsgi') } - it { should contain_package("www/mod_wsgi") } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/params_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/params_spec.rb deleted file mode 100644 index eaa178c41d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/params_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'spec_helper' - -describe 'apache::params', :type => :class do - context "On a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_apache__params } - - # There are 4 resources in this class currently - # there should not be any more resources because it is a params class - # The resources are class[apache::version], class[apache::params], class[main], class[settings], stage[main] - it "Should not contain any resources" do - subject.resources.size.should == 5 - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/service_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/service_spec.rb deleted file mode 100644 index 2cd075357d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/classes/service_spec.rb +++ /dev/null @@ -1,127 +0,0 @@ -require 'spec_helper' - -describe 'apache::service', :type => :class do - let :pre_condition do - 'include apache::params' - end - context "on a Debian OS" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_service("httpd").with( - 'name' => 'apache2', - 'ensure' => 'running', - 'enable' => 'true' - ) - } - - context "with $service_name => 'foo'" do - let (:params) {{ :service_name => 'foo' }} - it { should contain_service("httpd").with( - 'name' => 'foo' - ) - } - end - - context "with $service_enable => true" do - let (:params) {{ :service_enable => true }} - it { should contain_service("httpd").with( - 'name' => 'apache2', - 'ensure' => 'running', - 'enable' => 'true' - ) - } - end - - context "with $service_enable => false" do - let (:params) {{ :service_enable => false }} - it { should contain_service("httpd").with( - 'name' => 'apache2', - 'ensure' => 'running', - 'enable' => 'false' - ) - } - end - - context "$service_enable must be a bool" do - let (:params) {{ :service_enable => 'not-a-boolean' }} - - it 'should fail' do - expect { subject }.to raise_error(Puppet::Error, /is not a boolean/) - end - end - - context "with $service_ensure => 'running'" do - let (:params) {{ :service_ensure => 'running', }} - it { should contain_service("httpd").with( - 'ensure' => 'running', - 'enable' => 'true' - ) - } - end - - context "with $service_ensure => 'stopped'" do - let (:params) {{ :service_ensure => 'stopped', }} - it { should contain_service("httpd").with( - 'ensure' => 'stopped', - 'enable' => 'true' - ) - } - end - - context "with $service_ensure => 'UNDEF'" do - let (:params) {{ :service_ensure => 'UNDEF' }} - it { should contain_service("httpd").without_ensure } - end - end - - - context "on a RedHat 5 OS" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '5', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_service("httpd").with( - 'name' => 'httpd', - 'ensure' => 'running', - 'enable' => 'true' - ) - } - end - - context "on a FreeBSD 5 OS" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - it { should contain_service("httpd").with( - 'name' => 'apache22', - 'ensure' => 'running', - 'enable' => 'true' - ) - } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/defines/mod_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/defines/mod_spec.rb deleted file mode 100644 index e6d5214097..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/defines/mod_spec.rb +++ /dev/null @@ -1,118 +0,0 @@ -require 'spec_helper' - -describe 'apache::mod', :type => :define do - let :pre_condition do - 'include apache' - end - context "on a RedHat osfamily" do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - describe "for non-special modules" do - let :title do - 'spec_m' - end - it { should contain_class("apache::params") } - it "should manage the module load file" do - should contain_file('spec_m.load').with({ - :path => '/etc/httpd/conf.d/spec_m.load', - :content => "LoadModule spec_m_module modules/mod_spec_m.so\n", - :owner => 'root', - :group => 'root', - :mode => '0644', - } ) - end - end - - describe "with shibboleth module and package param passed" do - # name/title for the apache::mod define - let :title do - 'xsendfile' - end - # parameters - let(:params) { {:package => 'mod_xsendfile'} } - - it { should contain_class("apache::params") } - it { should contain_package('mod_xsendfile') } - end - end - - context "on a Debian osfamily" do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - describe "for non-special modules" do - let :title do - 'spec_m' - end - it { should contain_class("apache::params") } - it "should manage the module load file" do - should contain_file('spec_m.load').with({ - :path => '/etc/apache2/mods-available/spec_m.load', - :content => "LoadModule spec_m_module /usr/lib/apache2/modules/mod_spec_m.so\n", - :owner => 'root', - :group => 'root', - :mode => '0644', - } ) - end - it "should link the module load file" do - should contain_file('spec_m.load symlink').with({ - :path => '/etc/apache2/mods-enabled/spec_m.load', - :target => '/etc/apache2/mods-available/spec_m.load', - :owner => 'root', - :group => 'root', - :mode => '0644', - } ) - end - end - end - - context "on a FreeBSD osfamily" do - let :facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - - describe "for non-special modules" do - let :title do - 'spec_m' - end - it { should contain_class("apache::params") } - it "should manage the module load file" do - should contain_file('spec_m.load').with({ - :path => '/usr/local/etc/apache22/Modules/spec_m.load', - :content => "LoadModule spec_m_module /usr/local/libexec/apache22/mod_spec_m.so\n", - :owner => 'root', - :group => 'wheel', - :mode => '0644', - } ) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/defines/vhost_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/defines/vhost_spec.rb deleted file mode 100644 index 4037b3011c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/defines/vhost_spec.rb +++ /dev/null @@ -1,1469 +0,0 @@ -require 'spec_helper' - -describe 'apache::vhost', :type => :define do - let :pre_condition do - 'class { "apache": default_vhost => false, }' - end - let :title do - 'rspec.example.com' - end - let :default_params do - { - :docroot => '/rspec/docroot', - :port => '84', - } - end - describe 'os-dependent items' do - context "on RedHat based systems" do - let :default_facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :operatingsystem => 'RedHat', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do default_params end - let :facts do default_facts end - it { should contain_class("apache") } - it { should contain_class("apache::params") } - end - context "on Debian based systems" do - let :default_facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do default_params end - let :facts do default_facts end - it { should contain_class("apache") } - it { should contain_class("apache::params") } - it { should contain_file("25-rspec.example.com.conf").with( - :ensure => 'present', - :path => '/etc/apache2/sites-available/25-rspec.example.com.conf' - ) } - it { should contain_file("25-rspec.example.com.conf symlink").with( - :ensure => 'link', - :path => '/etc/apache2/sites-enabled/25-rspec.example.com.conf', - :target => '/etc/apache2/sites-available/25-rspec.example.com.conf' - ) } - end - context "on FreeBSD systems" do - let :default_facts do - { - :osfamily => 'FreeBSD', - :operatingsystemrelease => '9', - :concat_basedir => '/dne', - :operatingsystem => 'FreeBSD', - :id => 'root', - :kernel => 'FreeBSD', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - let :params do default_params end - let :facts do default_facts end - it { should contain_class("apache") } - it { should contain_class("apache::params") } - it { should contain_file("25-rspec.example.com.conf").with( - :ensure => 'present', - :path => '/usr/local/etc/apache22/Vhosts/25-rspec.example.com.conf' - ) } - end - end - describe 'os-independent items' do - let :facts do - { - :osfamily => 'Debian', - :operatingsystemrelease => '6', - :concat_basedir => '/dne', - :lsbdistcodename => 'squeeze', - :operatingsystem => 'Debian', - :id => 'root', - :kernel => 'Linux', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } - end - describe 'basic assumptions' do - let :params do default_params end - it { should contain_class("apache") } - it { should contain_class("apache::params") } - it { should contain_apache__listen(params[:port]) } - it { should contain_apache__namevirtualhost("*:#{params[:port]}") } - end - - # All match and notmatch should be a list of regexs and exact match strings - context ".conf content" do - [ - { - :title => 'should contain docroot', - :attr => 'docroot', - :value => '/not/default', - :match => [/^ DocumentRoot "\/not\/default"$/,/ /], - }, - { - :title => 'should set a port', - :attr => 'port', - :value => '8080', - :match => [/^$/], - }, - { - :title => 'should set an ip', - :attr => 'ip', - :value => '10.0.0.1', - :match => [/^$/], - }, - { - :title => 'should set a serveradmin', - :attr => 'serveradmin', - :value => 'test@test.com', - :match => [/^ ServerAdmin test@test.com$/], - }, - { - :title => 'should enable ssl', - :attr => 'ssl', - :value => true, - :match => [/^ SSLEngine on$/], - }, - { - :title => 'should set a servername', - :attr => 'servername', - :value => 'param.test', - :match => [/^ ServerName param.test$/], - }, - { - :title => 'should accept server aliases', - :attr => 'serveraliases', - :value => ['one.com','two.com'], - :match => [ - /^ ServerAlias one\.com$/, - /^ ServerAlias two\.com$/ - ], - }, - { - :title => 'should accept setenv', - :attr => 'setenv', - :value => ['TEST1 one','TEST2 two'], - :match => [ - /^ SetEnv TEST1 one$/, - /^ SetEnv TEST2 two$/ - ], - }, - { - :title => 'should accept setenvif', - :attr => 'setenvif', - ## These are bugged in rspec-puppet; the $1 is droped - #:value => ['Host "^([^\.]*)\.website\.com$" CLIENT_NAME=$1'], - #:match => [' SetEnvIf Host "^([^\.]*)\.website\.com$" CLIENT_NAME=$1'], - :value => ['Host "^test\.com$" VHOST_ACCESS=test'], - :match => [/^ SetEnvIf Host "\^test\\.com\$" VHOST_ACCESS=test$/], - }, - { - :title => 'should accept options', - :attr => 'options', - :value => ['Fake','Options'], - :match => [/^ Options Fake Options$/], - }, - { - :title => 'should accept overrides', - :attr => 'override', - :value => ['Fake', 'Override'], - :match => [/^ AllowOverride Fake Override$/], - }, - { - :title => 'should accept logroot', - :attr => 'logroot', - :value => '/fake/log', - :match => [/CustomLog "\/fake\/log\//,/ErrorLog "\/fake\/log\//], - }, - { - :title => 'should accept log_level', - :attr => 'log_level', - :value => 'info', - :match => [/LogLevel info/], - }, - { - :title => 'should accept pipe destination for access log', - :attr => 'access_log_pipe', - :value => '| /bin/fake/logging', - :match => [/CustomLog "| \/bin\/fake\/logging" combined$/], - }, - { - :title => 'should accept pipe destination for error log', - :attr => 'error_log_pipe', - :value => '| /bin/fake/logging', - :match => [/ErrorLog "| \/bin\/fake\/logging" combined$/], - }, - { - :title => 'should accept syslog destination for access log', - :attr => 'access_log_syslog', - :value => 'syslog:local1', - :match => [/CustomLog "syslog:local1" combined$/], - }, - { - :title => 'should accept syslog destination for error log', - :attr => 'error_log_syslog', - :value => 'syslog', - :match => [/ErrorLog "syslog"$/], - }, - { - :title => 'should accept custom format for access logs', - :attr => 'access_log_format', - :value => '%h %{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\" \"Host: %{Host}i\" %T %D', - :match => [/CustomLog "\/var\/log\/.+_access\.log" "%h %\{X-Forwarded-For\}i %l %u %t \\"%r\\" %s %b \\"%\{Referer\}i\\" \\"%\{User-agent\}i\\" \\"Host: %\{Host\}i\\" %T %D"$/], - }, - { - :title => 'should contain access logs', - :attr => 'access_log', - :value => true, - :match => [/CustomLog "\/var\/log\/.+_access\.log" combined$/], - }, - { - :title => 'should not contain access logs', - :attr => 'access_log', - :value => false, - :notmatch => [/CustomLog "\/var\/log\/.+_access\.log" combined$/], - }, - { - :title => 'should contain error logs', - :attr => 'error_log', - :value => true, - :match => [/ErrorLog.+$/], - }, - { - :title => 'should not contain error logs', - :attr => 'error_log', - :value => false, - :notmatch => [/ErrorLog.+$/], - }, - { - :title => 'should set ErrorDocument 503', - :attr => 'error_documents', - :value => [ { 'error_code' => '503', 'document' => '"Go away, the backend is broken."'}], - :match => [/^ ErrorDocument 503 "Go away, the backend is broken."$/], - }, - { - :title => 'should set ErrorDocuments 503 407', - :attr => 'error_documents', - :value => [ - { 'error_code' => '503', 'document' => '/service-unavail'}, - { 'error_code' => '407', 'document' => 'https://example.com/proxy/login'}, - ], - :match => [ - /^ ErrorDocument 503 \/service-unavail$/, - /^ ErrorDocument 407 https:\/\/example\.com\/proxy\/login$/, - ], - }, - { - :title => 'should set ErrorDocument 503 in directory', - :attr => 'directories', - :value => { 'path' => '/srv/www', 'error_documents' => [{ 'error_code' => '503', 'document' => '"Go away, the backend is broken."'}] }, - :match => [/^ ErrorDocument 503 "Go away, the backend is broken."$/], - }, - { - :title => 'should set ErrorDocuments 503 407 in directory', - :attr => 'directories', - :value => { 'path' => '/srv/www', 'error_documents' => - [ - { 'error_code' => '503', 'document' => '/service-unavail'}, - { 'error_code' => '407', 'document' => 'https://example.com/proxy/login'}, - ]}, - :match => [ - /^ ErrorDocument 503 \/service-unavail$/, - /^ ErrorDocument 407 https:\/\/example\.com\/proxy\/login$/, - ], - }, - { - :title => 'should accept a scriptalias', - :attr => 'scriptalias', - :value => '/usr/scripts', - :match => [ - /^ ScriptAlias \/cgi-bin "\/usr\/scripts"$/, - ], - }, - { - :title => 'should accept a single scriptaliases', - :attr => 'scriptaliases', - :value => { 'alias' => '/blah/', 'path' => '/usr/scripts' }, - :match => [ - /^ ScriptAlias \/blah\/ "\/usr\/scripts"$/, - ], - :nomatch => [/ScriptAlias \/cgi\-bin\//], - }, - { - :title => 'should accept multiple scriptaliases', - :attr => 'scriptaliases', - :value => [ { 'alias' => '/blah', 'path' => '/usr/scripts' }, { 'alias' => '/blah2', 'path' => '/usr/scripts' } ], - :match => [ - /^ ScriptAlias \/blah "\/usr\/scripts"$/, - /^ ScriptAlias \/blah2 "\/usr\/scripts"$/, - ], - :nomatch => [/ScriptAlias \/cgi\-bin\//], - }, - { - :title => 'should accept multiple scriptaliases with and without trailing slashes', - :attr => 'scriptaliases', - :value => [ { 'alias' => '/blah', 'path' => '/usr/scripts' }, { 'alias' => '/blah2/', 'path' => '/usr/scripts2/' } ], - :match => [ - /^ ScriptAlias \/blah "\/usr\/scripts"$/, - /^ ScriptAlias \/blah2\/ "\/usr\/scripts2\/"$/, - ], - :nomatch => [/ScriptAlias \/cgi\-bin\//], - }, - { - :title => 'should accept a ScriptAliasMatch directive', - :attr => 'scriptaliases', - ## XXX As mentioned above, rspec-puppet drops constructs like $1. - ## Thus, these tests don't work as they should. As a workaround we - ## use FOO instead of $1 here. - :value => [ { 'aliasmatch' => '^/cgi-bin(.*)', 'path' => '/usr/local/apache/cgi-binFOO' } ], - :match => [ - /^ ScriptAliasMatch \^\/cgi-bin\(\.\*\) "\/usr\/local\/apache\/cgi-binFOO"$/ - ], - }, - { - :title => 'should accept multiple ScriptAliasMatch directives', - :attr => 'scriptaliases', - ## XXX As mentioned above, rspec-puppet drops constructs like $1. - ## Thus, these tests don't work as they should. As a workaround we - ## use FOO instead of $1 here. - :value => [ - { 'aliasmatch' => '^/cgi-bin(.*)', 'path' => '/usr/local/apache/cgi-binFOO' }, - { 'aliasmatch' => '"(?x)^/git/(.*/(HEAD|info/refs|objects/(info/[^/]+|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))|git-(upload|receive)-pack))"', 'path' => '/var/www/bin/gitolite-suexec-wrapper/FOO' }, - ], - :match => [ - /^ ScriptAliasMatch \^\/cgi-bin\(\.\*\) "\/usr\/local\/apache\/cgi-binFOO"$/, - /^ ScriptAliasMatch "\(\?x\)\^\/git\/\(\.\*\/\(HEAD\|info\/refs\|objects\/\(info\/\[\^\/\]\+\|\[0-9a-f\]\{2\}\/\[0-9a-f\]\{38\}\|pack\/pack-\[0-9a-f\]\{40\}\\\.\(pack\|idx\)\)\|git-\(upload\|receive\)-pack\)\)" "\/var\/www\/bin\/gitolite-suexec-wrapper\/FOO"$/, - ], - }, - { - :title => 'should accept mixed ScriptAlias and ScriptAliasMatch directives', - :attr => 'scriptaliases', - ## XXX As mentioned above, rspec-puppet drops constructs like $1. - ## Thus, these tests don't work as they should. As a workaround we - ## use FOO instead of $1 here. - :value => [ - { 'aliasmatch' => '"(?x)^/git/(.*/(HEAD|info/refs|objects/(info/[^/]+|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))|git-(upload|receive)-pack))"', 'path' => '/var/www/bin/gitolite-suexec-wrapper/FOO' }, - { 'alias' => '/git', 'path' => '/var/www/gitweb/index.cgi' }, - { 'aliasmatch' => '^/cgi-bin(.*)', 'path' => '/usr/local/apache/cgi-binFOO' }, - { 'alias' => '/trac', 'path' => '/etc/apache2/trac.fcgi' }, - ], - :match => [ - /^ ScriptAliasMatch "\(\?x\)\^\/git\/\(\.\*\/\(HEAD\|info\/refs\|objects\/\(info\/\[\^\/\]\+\|\[0-9a-f\]\{2\}\/\[0-9a-f\]\{38\}\|pack\/pack-\[0-9a-f\]\{40\}\\\.\(pack\|idx\)\)\|git-\(upload\|receive\)-pack\)\)" "\/var\/www\/bin\/gitolite-suexec-wrapper\/FOO"$/, - /^ ScriptAlias \/git "\/var\/www\/gitweb\/index\.cgi"$/, - /^ ScriptAliasMatch \^\/cgi-bin\(\.\*\) "\/usr\/local\/apache\/cgi-binFOO"$/, - /^ ScriptAlias \/trac "\/etc\/apache2\/trac.fcgi"$/, - ], - }, - { - :title => 'should accept proxy destinations', - :attr => 'proxy_dest', - :value => 'http://fake.com', - :match => [ - /^ ProxyPass \/ http:\/\/fake.com\/$/, - /^ $/, - /^ ProxyPassReverse http:\/\/fake.com\/$/, - /^ <\/Location>$/, - ], - :notmatch => [/ProxyPass .+!$/], - }, - { - :title => 'should accept proxy_pass hash', - :attr => 'proxy_pass', - :value => { 'path' => '/path-a', 'url' => 'http://fake.com/a' }, - :match => [ - /^ ProxyPass \/path-a http:\/\/fake.com\/a$/, - /^ $/, - /^ ProxyPassReverse http:\/\/fake.com\/a$/, - /^ <\/Location>$/, - - ], - :notmatch => [/ProxyPass .+!$/], - }, - { - :title => 'should accept proxy_pass array of hash', - :attr => 'proxy_pass', - :value => [ - { 'path' => '/path-a/', 'url' => 'http://fake.com/a/' }, - { 'path' => '/path-b', 'url' => 'http://fake.com/b' }, - ], - :match => [ - /^ ProxyPass \/path-a\/ http:\/\/fake.com\/a\/$/, - /^ $/, - /^ ProxyPassReverse http:\/\/fake.com\/a\/$/, - /^ <\/Location>$/, - /^ ProxyPass \/path-b http:\/\/fake.com\/b$/, - /^ $/, - /^ ProxyPassReverse http:\/\/fake.com\/b$/, - /^ <\/Location>$/, - ], - :notmatch => [/ProxyPass .+!$/], - }, - { - :title => 'should enable rack', - :attr => 'rack_base_uris', - :value => ['/rack1','/rack2'], - :match => [ - /^ RackBaseURI \/rack1$/, - /^ RackBaseURI \/rack2$/, - ], - }, - { - :title => 'should accept headers', - :attr => 'headers', - :value => ['add something', 'merge something_else'], - :match => [ - /^ Header add something$/, - /^ Header merge something_else$/, - ], - }, - { - :title => 'should accept request headers', - :attr => 'request_headers', - :value => ['append something', 'unset something_else'], - :match => [ - /^ RequestHeader append something$/, - /^ RequestHeader unset something_else$/, - ], - }, - { - :title => 'should accept rewrite rules', - :attr => 'rewrite_rule', - :value => 'not a real rule', - :match => [/^ RewriteRule not a real rule$/], - }, - { - :title => 'should accept rewrite rules', - :attr => 'rewrites', - :value => [{'rewrite_rule' => ['not a real rule']}], - :match => [/^ RewriteRule not a real rule$/], - }, - { - :title => 'should accept rewrite comment', - :attr => 'rewrites', - :value => [{'comment' => 'rewrite comment', 'rewrite_rule' => ['not a real rule']}], - :match => [/^ #rewrite comment/], - }, - { - :title => 'should accept rewrite conditions', - :attr => 'rewrites', - :value => [{'comment' => 'redirect IE', 'rewrite_cond' => ['%{HTTP_USER_AGENT} ^MSIE'], 'rewrite_rule' => ['^index\.html$ welcome.html'],}], - :match => [ - /^ #redirect IE$/, - /^ RewriteCond %{HTTP_USER_AGENT} \^MSIE$/, - /^ RewriteRule \^index\\\.html\$ welcome.html$/, - ], - }, - { - :title => 'should accept multiple rewrites', - :attr => 'rewrites', - :value => [ - {'rewrite_rule' => ['not a real rule']}, - {'rewrite_rule' => ['not a real rule two']}, - ], - :match => [ - /^ RewriteRule not a real rule$/, - /^ RewriteRule not a real rule two$/, - ], - }, - { - :title => 'should block scm', - :attr => 'block', - :value => 'scm', - :match => [/^ $/], - }, - { - :title => 'should accept a custom fragment', - :attr => 'custom_fragment', - :value => " Some custom fragment line\n That spans multiple lines", - :match => [ - /^ Some custom fragment line$/, - /^ That spans multiple lines$/, - /^<\/VirtualHost>$/, - ], - }, - { - :title => 'should accept an array of alias hashes', - :attr => 'aliases', - :value => [ { 'alias' => '/', 'path' => '/var/www'} ], - :match => [/^ Alias \/ "\/var\/www"$/], - }, - { - :title => 'should accept an alias hash', - :attr => 'aliases', - :value => { 'alias' => '/', 'path' => '/var/www'}, - :match => [/^ Alias \/ "\/var\/www"$/], - }, - { - :title => 'should accept multiple aliases', - :attr => 'aliases', - :value => [ - { 'alias' => '/', 'path' => '/var/www'}, - { 'alias' => '/cgi-bin', 'path' => '/var/www/cgi-bin'}, - { 'alias' => '/css', 'path' => '/opt/someapp/css'}, - ], - :match => [ - /^ Alias \/ "\/var\/www"$/, - /^ Alias \/cgi-bin "\/var\/www\/cgi-bin"$/, - /^ Alias \/css "\/opt\/someapp\/css"$/, - ], - }, - { - :title => 'should accept an aliasmatch hash', - :attr => 'aliases', - ## XXX As mentioned above, rspec-puppet drops the $1. Thus, these - # tests don't work. - #:value => { 'aliasmatch' => '^/image/(.*).gif', 'path' => '/files/gifs/$1.gif' }, - #:match => [/^ AliasMatch \^\/image\/\(\.\*\)\.gif \/files\/gifs\/\$1\.gif$/], - }, - { - :title => 'should accept a array of alias and aliasmatch hashes mixed', - :attr => 'aliases', - ## XXX As mentioned above, rspec-puppet drops the $1. Thus, these - # tests don't work. - #:value => [ - # { 'alias' => '/css', 'path' => '/files/css' }, - # { 'aliasmatch' => '^/image/(.*).gif', 'path' => '/files/gifs/$1.gif' }, - # { 'aliasmatch' => '^/image/(.*).jpg', 'path' => '/files/jpgs/$1.jpg' }, - # { 'alias' => '/image', 'path' => '/files/images' }, - #], - #:match => [ - # /^ Alias \/css \/files\/css$/, - # /^ AliasMatch \^\/image\/\(.\*\)\.gif \/files\/gifs\/\$1\.gif$/, - # /^ AliasMatch \^\/image\/\(.\*\)\.jpg \/files\/jpgs\/\$1\.jpg$/, - # /^ Alias \/image \/files\/images$/ - #], - }, - { - :title => 'should accept multiple additional includes', - :attr => 'additional_includes', - :value => [ - '/tmp/proxy_group_a', - '/tmp/proxy_group_b', - '/tmp/proxy_group_c', - ], - :match => [ - /^ Include "\/tmp\/proxy_group_a"$/, - /^ Include "\/tmp\/proxy_group_b"$/, - /^ Include "\/tmp\/proxy_group_c"$/, - ], - }, - { - :title => 'should accept a suPHP_Engine', - :attr => 'suphp_engine', - :value => 'on', - :match => [/^ suPHP_Engine on$/], - }, - { - :title => 'should accept a php_admin_flags', - :attr => 'php_admin_flags', - :value => { 'engine' => 'on' }, - :match => [/^ php_admin_flag engine on$/], - }, - { - :title => 'should accept php_admin_values', - :attr => 'php_admin_values', - :value => { 'open_basedir' => '/srv/web/www.com/:/usr/share/pear/' }, - :match => [/^ php_admin_value open_basedir \/srv\/web\/www.com\/:\/usr\/share\/pear\/$/], - }, - { - :title => 'should accept php_admin_flags in directories', - :attr => 'directories', - :value => { - 'path' => '/srv/www', - 'php_admin_flags' => { 'php_engine' => 'on' } - }, - :match => [/^ php_admin_flag php_engine on$/], - }, - { - :title => 'should accept php_admin_values', - :attr => 'php_admin_values', - :value => { 'open_basedir' => '/srv/web/www.com/:/usr/share/pear/' }, - :match => [/^ php_admin_value open_basedir \/srv\/web\/www.com\/:\/usr\/share\/pear\/$/], - }, - { - :title => 'should accept php_admin_values in directories', - :attr => 'directories', - :value => { - 'path' => '/srv/www', - 'php_admin_values' => { 'open_basedir' => '/srv/web/www.com/:/usr/share/pear/' } - }, - :match => [/^ php_admin_value open_basedir \/srv\/web\/www.com\/:\/usr\/share\/pear\/$/], - }, - { - :title => 'should accept a wsgi script alias', - :attr => 'wsgi_script_aliases', - :value => { '/' => '/var/www/myapp.wsgi'}, - :match => [/^ WSGIScriptAlias \/ "\/var\/www\/myapp.wsgi"$/], - }, - { - :title => 'should accept multiple wsgi aliases', - :attr => 'wsgi_script_aliases', - :value => { - '/wiki' => '/usr/local/wsgi/scripts/mywiki.wsgi', - '/blog' => '/usr/local/wsgi/scripts/myblog.wsgi', - '/' => '/usr/local/wsgi/scripts/myapp.wsgi', - }, - :match => [ - /^ WSGIScriptAlias \/wiki "\/usr\/local\/wsgi\/scripts\/mywiki.wsgi"$/, - /^ WSGIScriptAlias \/blog "\/usr\/local\/wsgi\/scripts\/myblog.wsgi"$/, - /^ WSGIScriptAlias \/ "\/usr\/local\/wsgi\/scripts\/myapp.wsgi"$/, - ], - }, - { - :title => 'should accept a wsgi application group', - :attr => 'wsgi_application_group', - :value => '%{GLOBAL}', - :match => [/^ WSGIApplicationGroup %{GLOBAL}$/], - }, - { - :title => 'should set wsgi pass authorization', - :attr => 'wsgi_pass_authorization', - :value => 'On', - :match => [/^ WSGIPassAuthorization On$/], - }, - { - :title => 'should set wsgi pass authorization false', - :attr => 'wsgi_pass_authorization', - :value => 'Off', - :match => [/^ WSGIPassAuthorization Off$/], - }, - { - :title => 'should contain environment variables', - :attr => 'access_log_env_var', - :value => 'admin', - :match => [/CustomLog "\/var\/log\/.+_access\.log" combined env=admin$/] - }, - { - :title => 'should contain virtual_docroot', - :attr => 'virtual_docroot', - :value => '/not/default', - :match => [ - /^ VirtualDocumentRoot "\/not\/default"$/, - ], - }, - { - :title => 'should accept multiple directories', - :attr => 'directories', - :value => [ - { 'path' => '/opt/app' }, - { 'path' => '/var/www' }, - { 'path' => '/rspec/docroot'} - ], - :match => [ - /^ $/, - /^ $/, - /^ $/, - ], - }, - ].each do |param| - describe "when #{param[:attr]} is #{param[:value]}" do - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { should contain_file("25-#{title}.conf").with_mode('0644') } - if param[:match] - it "#{param[:title]}: matches" do - param[:match].each do |match| - should contain_file("25-#{title}.conf").with_content( match ) - end - end - end - if param[:notmatch] - it "#{param[:title]}: notmatches" do - param[:notmatch].each do |notmatch| - should_not contain_file("25-#{title}.conf").with_content( notmatch ) - end - end - end - end - end - end - - # Apache below 2.4 (Default Version). All match and notmatch should be a list of regexs and exact match strings - context ".conf content with $apache_version < 2.4" do - [ - { - :title => 'should accept a directory', - :attr => 'directories', - :value => { 'path' => '/opt/app' }, - :notmatch => [' '], - :match => [ - /^ $/, - /^ AllowOverride None$/, - /^ Order allow,deny$/, - /^ Allow from all$/, - /^ <\/Directory>$/, - ], - }, - { - :title => 'should accept directory directives hash', - :attr => 'directories', - :value => { - 'path' => '/opt/app', - 'headers' => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"', - 'allow' => 'from rspec.org', - 'allow_override' => 'Lol', - 'deny' => 'from google.com', - 'options' => '-MultiViews', - 'order' => 'deny,yned', - 'passenger_enabled' => 'onf', - 'sethandler' => 'None', - }, - :match => [ - /^ $/, - /^ Header Set X-Robots-Tag "noindex, noarchive, nosnippet"$/, - /^ Allow from rspec.org$/, - /^ AllowOverride Lol$/, - /^ Deny from google.com$/, - /^ Options -MultiViews$/, - /^ Order deny,yned$/, - /^ SetHandler None$/, - /^ PassengerEnabled onf$/, - /^ <\/Directory>$/, - ], - }, - { - :title => 'should accept directory directives with arrays and hashes', - :attr => 'directories', - :value => [ - { - 'path' => '/opt/app1', - 'allow' => 'from rspec.org', - 'allow_override' => ['AuthConfig','Indexes'], - 'deny' => 'from google.com', - 'options' => ['-MultiViews','+MultiViews'], - 'order' => ['deny','yned'], - 'passenger_enabled' => 'onf', - }, - { - 'path' => '/opt/app2', - 'addhandlers' => { - 'handler' => 'cgi-script', - 'extensions' => '.cgi', - }, - }, - ], - :match => [ - /^ $/, - /^ Allow from rspec.org$/, - /^ AllowOverride AuthConfig Indexes$/, - /^ Deny from google.com$/, - /^ Options -MultiViews \+MultiViews$/, - /^ Order deny,yned$/, - /^ PassengerEnabled onf$/, - /^ <\/Directory>$/, - /^ $/, - /^ AllowOverride None$/, - /^ Order allow,deny$/, - /^ Allow from all$/, - /^ AddHandler cgi-script .cgi$/, - /^ <\/Directory>$/, - ], - }, - { - :title => 'should accept location for provider', - :attr => 'directories', - :value => { - 'path' => '/', - 'provider' => 'location', - }, - :notmatch => [' AllowOverride None'], - :match => [ - /^ $/, - /^ Order allow,deny$/, - /^ Allow from all$/, - /^ <\/Location>$/, - ], - }, - { - :title => 'should accept files for provider', - :attr => 'directories', - :value => { - 'path' => 'index.html', - 'provider' => 'files', - }, - :notmatch => [' AllowOverride None'], - :match => [ - /^ $/, - /^ Order allow,deny$/, - /^ Allow from all$/, - /^ <\/Files>$/, - ], - }, - { - :title => 'should accept files match for provider', - :attr => 'directories', - :value => { - 'path' => 'index.html', - 'provider' => 'filesmatch', - }, - :notmatch => [' AllowOverride None'], - :match => [ - /^ $/, - /^ Order allow,deny$/, - /^ Allow from all$/, - /^ <\/FilesMatch>$/, - ], - }, - ].each do |param| - describe "when #{param[:attr]} is #{param[:value]}" do - let :params do default_params.merge({ - param[:attr].to_sym => param[:value], - :apache_version => '2.2', - }) end - - it { should contain_file("25-#{title}.conf").with_mode('0644') } - if param[:match] - it "#{param[:title]}: matches" do - param[:match].each do |match| - should contain_file("25-#{title}.conf").with_content( match ) - end - end - end - if param[:notmatch] - it "#{param[:title]}: notmatches" do - param[:notmatch].each do |notmatch| - should_not contain_file("25-#{title}.conf").with_content( notmatch ) - end - end - end - end - end - end - - # Apache equals or above 2.4. All match and notmatch should be a list of regexs and exact match strings - context ".conf content with $apache_version >= 2.4" do - [ - { - :title => 'should accept a directory', - :attr => 'directories', - :value => { 'path' => '/opt/app' }, - :notmatch => [' '], - :match => [ - /^ $/, - /^ AllowOverride None$/, - /^ Require all granted$/, - /^ <\/Directory>$/, - ], - }, - { - :title => 'should accept directory directives hash', - :attr => 'directories', - :value => { - 'path' => '/opt/app', - 'headers' => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"', - 'allow_override' => 'Lol', - 'options' => '-MultiViews', - 'require' => 'something denied', - 'passenger_enabled' => 'onf', - }, - :match => [ - /^ $/, - /^ Header Set X-Robots-Tag "noindex, noarchive, nosnippet"$/, - /^ AllowOverride Lol$/, - /^ Options -MultiViews$/, - /^ Require something denied$/, - /^ PassengerEnabled onf$/, - /^ <\/Directory>$/, - ], - }, - { - :title => 'should accept directory directives with arrays and hashes', - :attr => 'directories', - :value => [ - { - 'path' => '/opt/app1', - 'allow_override' => ['AuthConfig','Indexes'], - 'options' => ['-MultiViews','+MultiViews'], - 'require' => ['host','example.org'], - 'passenger_enabled' => 'onf', - }, - { - 'path' => '/opt/app2', - 'addhandlers' => { - 'handler' => 'cgi-script', - 'extensions' => '.cgi', - }, - }, - ], - :match => [ - /^ $/, - /^ AllowOverride AuthConfig Indexes$/, - /^ Options -MultiViews \+MultiViews$/, - /^ Require host example.org$/, - /^ PassengerEnabled onf$/, - /^ <\/Directory>$/, - /^ $/, - /^ AllowOverride None$/, - /^ Require all granted$/, - /^ AddHandler cgi-script .cgi$/, - /^ <\/Directory>$/, - ], - }, - { - :title => 'should accept location for provider', - :attr => 'directories', - :value => { - 'path' => '/', - 'provider' => 'location', - }, - :notmatch => [' AllowOverride None'], - :match => [ - /^ $/, - /^ Require all granted$/, - /^ <\/Location>$/, - ], - }, - { - :title => 'should accept files for provider', - :attr => 'directories', - :value => { - 'path' => 'index.html', - 'provider' => 'files', - }, - :notmatch => [' AllowOverride None'], - :match => [ - /^ $/, - /^ Require all granted$/, - /^ <\/Files>$/, - ], - }, - { - :title => 'should accept files match for provider', - :attr => 'directories', - :value => { - 'path' => 'index.html', - 'provider' => 'filesmatch', - }, - :notmatch => [' AllowOverride None'], - :match => [ - /^ $/, - /^ Require all granted$/, - /^ <\/FilesMatch>$/, - ], - }, - ].each do |param| - describe "when #{param[:attr]} is #{param[:value]}" do - let :params do default_params.merge({ - param[:attr].to_sym => param[:value], - :apache_version => '2.4', - }) end - - it { should contain_file("25-#{title}.conf").with_mode('0644') } - if param[:match] - it "#{param[:title]}: matches" do - param[:match].each do |match| - should contain_file("25-#{title}.conf").with_content( match ) - end - end - end - if param[:notmatch] - it "#{param[:title]}: notmatches" do - param[:notmatch].each do |notmatch| - should_not contain_file("25-#{title}.conf").with_content( notmatch ) - end - end - end - end - end - end - - # All match and notmatch should be a list of regexs and exact match strings - context ".conf content with SSL" do - [ - { - :title => 'should accept setting SSLCertificateFile', - :attr => 'ssl_cert', - :value => '/path/to/cert.pem', - :match => [/^ SSLCertificateFile "\/path\/to\/cert\.pem"$/], - }, - { - :title => 'should accept setting SSLCertificateKeyFile', - :attr => 'ssl_key', - :value => '/path/to/cert.pem', - :match => [/^ SSLCertificateKeyFile "\/path\/to\/cert\.pem"$/], - }, - { - :title => 'should accept setting SSLCertificateChainFile', - :attr => 'ssl_chain', - :value => '/path/to/cert.pem', - :match => [/^ SSLCertificateChainFile "\/path\/to\/cert\.pem"$/], - }, - { - :title => 'should accept setting SSLCertificatePath', - :attr => 'ssl_certs_dir', - :value => '/path/to/certs', - :match => [/^ SSLCACertificatePath "\/path\/to\/certs"$/], - }, - { - :title => 'should accept setting SSLCertificateFile', - :attr => 'ssl_ca', - :value => '/path/to/ca.pem', - :match => [/^ SSLCACertificateFile "\/path\/to\/ca\.pem"$/], - }, - { - :title => 'should accept setting SSLRevocationPath', - :attr => 'ssl_crl_path', - :value => '/path/to/crl', - :match => [/^ SSLCARevocationPath "\/path\/to\/crl"$/], - }, - { - :title => 'should accept setting SSLRevocationFile', - :attr => 'ssl_crl', - :value => '/path/to/crl.pem', - :match => [/^ SSLCARevocationFile "\/path\/to\/crl\.pem"$/], - }, - { - :title => 'should accept setting SSLProxyEngine', - :attr => 'ssl_proxyengine', - :value => true, - :match => [/^ SSLProxyEngine On$/], - }, - { - :title => 'should accept setting SSLProtocol', - :attr => 'ssl_protocol', - :value => 'all -SSLv2', - :match => [/^ SSLProtocol all -SSLv2$/], - }, - { - :title => 'should accept setting SSLCipherSuite', - :attr => 'ssl_cipher', - :value => 'RC4-SHA:HIGH:!ADH:!SSLv2', - :match => [/^ SSLCipherSuite RC4-SHA:HIGH:!ADH:!SSLv2$/], - }, - { - :title => 'should accept setting SSLHonorCipherOrder', - :attr => 'ssl_honorcipherorder', - :value => 'On', - :match => [/^ SSLHonorCipherOrder On$/], - }, - { - :title => 'should accept setting SSLVerifyClient', - :attr => 'ssl_verify_client', - :value => 'optional', - :match => [/^ SSLVerifyClient optional$/], - }, - { - :title => 'should accept setting SSLVerifyDepth', - :attr => 'ssl_verify_depth', - :value => '1', - :match => [/^ SSLVerifyDepth 1$/], - }, - { - :title => 'should accept setting SSLOptions with a string', - :attr => 'ssl_options', - :value => '+ExportCertData', - :match => [/^ SSLOptions \+ExportCertData$/], - }, - { - :title => 'should accept setting SSLOptions with an array', - :attr => 'ssl_options', - :value => ['+StrictRequire','+ExportCertData'], - :match => [/^ SSLOptions \+StrictRequire \+ExportCertData/], - }, - { - :title => 'should accept setting SSLOptions with a string in directories', - :attr => 'directories', - :value => { 'path' => '/srv/www', 'ssl_options' => '+ExportCertData'}, - :match => [/^ SSLOptions \+ExportCertData$/], - }, - { - :title => 'should accept setting SSLOptions with an array in directories', - :attr => 'directories', - :value => { 'path' => '/srv/www', 'ssl_options' => ['-StdEnvVars','+ExportCertData']}, - :match => [/^ SSLOptions -StdEnvVars \+ExportCertData/], - }, - ].each do |param| - describe "when #{param[:attr]} is #{param[:value]} with SSL" do - let :params do - default_params.merge( { - param[:attr].to_sym => param[:value], - :ssl => true, - } ) - end - it { should contain_file("25-#{title}.conf").with_mode('0644') } - if param[:match] - it "#{param[:title]}: matches" do - param[:match].each do |match| - should contain_file("25-#{title}.conf").with_content( match ) - end - end - end - if param[:notmatch] - it "#{param[:title]}: notmatches" do - param[:notmatch].each do |notmatch| - should_not contain_file("25-#{title}.conf").with_content( notmatch ) - end - end - end - end - end - end - - context 'attribute resources' do - describe 'when access_log_file and access_log_pipe are specified' do - let :params do default_params.merge({ - :access_log_file => 'fake.log', - :access_log_pipe => '| /bin/fake', - }) end - it 'should cause a failure' do - expect { subject }.to raise_error(Puppet::Error, /'access_log_file' and 'access_log_pipe' cannot be defined at the same time/) - end - end - describe 'when error_log_file and error_log_pipe are specified' do - let :params do default_params.merge({ - :error_log_file => 'fake.log', - :error_log_pipe => '| /bin/fake', - }) end - it 'should cause a failure' do - expect { subject }.to raise_error(Puppet::Error, /'error_log_file' and 'error_log_pipe' cannot be defined at the same time/) - end - end - describe 'when docroot owner and mode is specified' do - let :params do default_params.merge({ - :docroot_owner => 'testuser', - :docroot_group => 'testgroup', - :docroot_mode => '0750', - }) end - it 'should set vhost ownership and permissions' do - should contain_file(params[:docroot]).with({ - :ensure => :directory, - :owner => 'testuser', - :group => 'testgroup', - :mode => '0750', - }) - end - end - - describe 'when wsgi_daemon_process and wsgi_daemon_process_options are specified' do - let :params do default_params.merge({ - :wsgi_daemon_process => 'example.org', - :wsgi_daemon_process_options => { 'processes' => '2', 'threads' => '15' }, - }) end - it 'should set wsgi_daemon_process_options' do - should contain_file("25-#{title}.conf").with_content( - /^ WSGIDaemonProcess example.org processes=2 threads=15$/ - ) - end - end - - describe 'when wsgi_import_script and wsgi_import_script_options are specified' do - let :params do default_params.merge({ - :wsgi_import_script => '/var/www/demo.wsgi', - :wsgi_import_script_options => { 'application-group' => '%{GLOBAL}', 'process-group' => 'wsgi' }, - }) end - it 'should set wsgi_import_script_options' do - should contain_file("25-#{title}.conf").with_content( - /^ WSGIImportScript \/var\/www\/demo.wsgi application-group=%{GLOBAL} process-group=wsgi$/ - ) - end - end - - describe 'when rewrites are specified' do - let :params do default_params.merge({ - :rewrites => [ - { - 'comment' => 'test rewrites', - 'rewrite_base' => '/mytestpath/', - 'rewrite_cond' => ['%{HTTP_USER_AGENT} ^Lynx/ [OR]', '%{HTTP_USER_AGENT} ^Mozilla/[12]'], - 'rewrite_rule' => ['^index\.html$ welcome.html', '^index\.cgi$ index.php'], - } - ] - }) end - it 'should set RewriteConds and RewriteRules' do - should contain_file("25-#{title}.conf").with_content( - /^ #test rewrites$/ - ) - should contain_file("25-#{title}.conf").with_content( - /^ RewriteCond %\{HTTP_USER_AGENT\} \^Lynx\/ \[OR\]$/ - ) - should contain_file("25-#{title}.conf").with_content( - /^ RewriteBase \/mytestpath\/$/ - ) - should contain_file("25-#{title}.conf").with_content( - /^ RewriteCond %\{HTTP_USER_AGENT\} \^Mozilla\/\[12\]$/ - ) - should contain_file("25-#{title}.conf").with_content( - /^ RewriteRule \^index\\.html\$ welcome.html$/ - ) - should contain_file("25-#{title}.conf").with_content( - /^ RewriteRule \^index\\.cgi\$ index.php$/ - ) - end - end - - describe 'when rewrite_rule and rewrite_cond are specified' do - let :params do default_params.merge({ - :rewrite_cond => '%{HTTPS} off', - :rewrite_rule => '(.*) https://%{HTTPS_HOST}%{REQUEST_URI}', - }) end - it 'should set RewriteCond' do - should contain_file("25-#{title}.conf").with_content( - /^ RewriteCond %\{HTTPS\} off$/ - ) - end - end - - describe 'when action is specified specified' do - let :params do default_params.merge({ - :action => 'php-fastcgi', - }) end - it 'should set Action' do - should contain_file("25-#{title}.conf").with_content( - /^ Action php-fastcgi \/cgi-bin virtual$/ - ) - end - end - - describe 'when suphp_engine is on and suphp_configpath is specified' do - let :params do default_params.merge({ - :suphp_engine => 'on', - :suphp_configpath => '/etc/php5/apache2', - }) end - it 'should set suphp_configpath' do - should contain_file("25-#{title}.conf").with_content( - /^ suPHP_ConfigPath "\/etc\/php5\/apache2"$/ - ) - end - end - - describe 'when suphp_engine is on and suphp_addhandler is specified' do - let :params do default_params.merge({ - :suphp_engine => 'on', - :suphp_addhandler => 'x-httpd-php', - }) end - it 'should set suphp_addhandler' do - should contain_file("25-#{title}.conf").with_content( - /^ suPHP_AddHandler x-httpd-php/ - ) - end - end - - describe 'when suphp_engine is on and suphp { user & group } is specified' do - let :params do default_params.merge({ - :suphp_engine => 'on', - :directories => { 'path' => '/srv/www', - 'suphp' => { 'user' => 'myappuser', 'group' => 'myappgroup' }, - } - }) end - it 'should set suphp_UserGroup' do - should contain_file("25-#{title}.conf").with_content( - /^ suPHP_UserGroup myappuser myappgroup/ - ) - end - end - - describe 'priority/default settings' do - describe 'when neither priority/default is specified' do - let :params do default_params end - it { should contain_file("25-#{title}.conf").with_path( - /25-#{title}.conf/ - ) } - end - describe 'when both priority/default_vhost is specified' do - let :params do - default_params.merge({ - :priority => 15, - :default_vhost => true, - }) - end - it { should contain_file("15-#{title}.conf").with_path( - /15-#{title}.conf/ - ) } - end - describe 'when only priority is specified' do - let :params do - default_params.merge({ :priority => 14, }) - end - it { should contain_file("14-#{title}.conf").with_path( - /14-#{title}.conf/ - ) } - end - describe 'when only default is specified' do - let :params do - default_params.merge({ :default_vhost => true, }) - end - it { should contain_file("10-#{title}.conf").with_path( - /10-#{title}.conf/ - ) } - end - end - - describe 'fcgid directory options' do - describe 'No fcgiwrapper' do - let :params do - default_params.merge({ - :directories => { 'path' => '/srv/www' }, - }) - end - - it { should_not contain_file("25-#{title}.conf").with_content(%r{FcgidWrapper}) } - end - - describe 'Only a command' do - let :params do - default_params.merge({ - :directories => { 'path' => '/srv/www', - 'fcgiwrapper' => { 'command' => '/usr/local/bin/fcgiwrapper' }, - } - }) - end - - it { should contain_file("25-#{title}.conf").with_content(%r{^ FcgidWrapper /usr/local/bin/fcgiwrapper $}) } - end - - describe 'All parameters' do - let :params do - default_params.merge({ - :directories => { 'path' => '/srv/www', - 'fcgiwrapper' => { 'command' => '/usr/local/bin/fcgiwrapper', 'suffix' => '.php', 'virtual' => 'virtual' }, - } - }) - end - - it { should contain_file("25-#{title}.conf").with_content(%r{^ FcgidWrapper /usr/local/bin/fcgiwrapper .php virtual$}) } - end - end - - describe 'various ip/port combos' do - describe 'when ip_based is true' do - let :params do default_params.merge({ :ip_based => true }) end - it 'should not specify a NameVirtualHost' do - should contain_apache__listen(params[:port]) - should_not contain_apache__namevirtualhost("*:#{params[:port]}") - end - end - - describe 'when ip_based is default' do - let :params do default_params end - it 'should specify a NameVirtualHost' do - should contain_apache__listen(params[:port]) - should contain_apache__namevirtualhost("*:#{params[:port]}") - end - end - - describe 'when an ip is set' do - let :params do default_params.merge({ :ip => '10.0.0.1' }) end - it 'should specify a NameVirtualHost for the ip' do - should_not contain_apache__listen(params[:port]) - should contain_apache__listen("10.0.0.1:#{params[:port]}") - should contain_apache__namevirtualhost("10.0.0.1:#{params[:port]}") - end - end - - describe 'an ip_based vhost without a port' do - let :params do - { - :docroot => '/fake', - :ip => '10.0.0.1', - :ip_based => true, - } - end - it 'should specify a NameVirtualHost for the ip' do - should_not contain_apache__listen(params[:ip]) - should_not contain_apache__namevirtualhost(params[:ip]) - should contain_file("25-#{title}.conf").with_content %r{} - end - end - end - - describe 'when suexec_user_group is specified' do - let :params do - default_params.merge({ - :suexec_user_group => 'nobody nogroup', - }) - end - - it { should contain_file("25-#{title}.conf").with_content %r{^ SuexecUserGroup nobody nogroup$} } - end - - describe 'redirect rules' do - describe 'without lockstep arrays' do - let :params do - default_params.merge({ - :redirect_source => [ - '/login', - '/logout', - ], - :redirect_dest => [ - 'http://10.0.0.10/login', - 'http://10.0.0.10/logout', - ], - :redirect_status => [ - 'permanent', - '', - ], - }) - end - - it { should contain_file("25-#{title}.conf").with_content %r{ Redirect permanent /login http://10\.0\.0\.10/login} } - it { should contain_file("25-#{title}.conf").with_content %r{ Redirect /logout http://10\.0\.0\.10/logout} } - end - describe 'redirect match rules' do - let :params do - default_params.merge({ - :redirectmatch_status => [ - '404', - ], - :redirectmatch_regexp => [ - '/\.git(/.*|$)', - ], - }) - end - - it { should contain_file("25-#{title}.conf").with_content %r{ RedirectMatch 404 } } - end - describe 'without a status' do - let :params do - default_params.merge({ - :redirect_source => [ - '/login', - '/logout', - ], - :redirect_dest => [ - 'http://10.0.0.10/login', - 'http://10.0.0.10/logout', - ], - }) - end - - it { should contain_file("25-#{title}.conf").with_content %r{ Redirect /login http://10\.0\.0\.10/login} } - it { should contain_file("25-#{title}.conf").with_content %r{ Redirect /logout http://10\.0\.0\.10/logout} } - end - describe 'with a single status and dest' do - let :params do - default_params.merge({ - :redirect_source => [ - '/login', - '/logout', - ], - :redirect_dest => 'http://10.0.0.10/test', - :redirect_status => 'permanent', - }) - end - - it { should contain_file("25-#{title}.conf").with_content %r{ Redirect permanent /login http://10\.0\.0\.10/test} } - it { should contain_file("25-#{title}.conf").with_content %r{ Redirect permanent /logout http://10\.0\.0\.10/test} } - end - - describe 'with a directoryindex specified' do - let :params do - default_params.merge({ - :directoryindex => 'index.php' - }) - end - it { should contain_file("25-#{title}.conf").with_content %r{DirectoryIndex index.php} } - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/fixtures/files/spec b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/fixtures/files/spec deleted file mode 100644 index 76e9a14466..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/fixtures/files/spec +++ /dev/null @@ -1 +0,0 @@ -# This is a file only for spec testing diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/fixtures/modules/site_apache/templates/fake.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/fixtures/modules/site_apache/templates/fake.conf.erb deleted file mode 100644 index 019debfe48..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/fixtures/modules/site_apache/templates/fake.conf.erb +++ /dev/null @@ -1 +0,0 @@ -Fake template for rspec. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/spec.opts b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/spec.opts deleted file mode 100644 index de653df4b3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/spec.opts +++ /dev/null @@ -1,4 +0,0 @@ ---format s ---colour ---loadby mtime ---backtrace diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/spec_helper.rb deleted file mode 100644 index 65379ee38a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/spec_helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' - -RSpec.configure do |c| - c.treat_symbols_as_metadata_keys_with_true_values = true - - c.before :each do - # Ensure that we don't accidentally cache facts and environment - # between test cases. - Facter::Util::Loader.any_instance.stubs(:load_all) - Facter.clear - Facter.clear_messages - - # Store any environment variables away to be restored later - @old_env = {} - ENV.each_key {|k| @old_env[k] = ENV[k]} - - if ENV['STRICT_VARIABLES'] == 'yes' - Puppet.settings[:strict_variables]=true - end - end -end - -shared_examples :compile, :compile => true do - it { should compile.with_all_deps } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/spec_helper_acceptance.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/spec_helper_acceptance.rb deleted file mode 100644 index 370de46c0d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/spec_helper_acceptance.rb +++ /dev/null @@ -1,45 +0,0 @@ -require 'beaker-rspec/spec_helper' -require 'beaker-rspec/helpers/serverspec' - - -unless ENV['RS_PROVISION'] == 'no' - hosts.each do |host| - if host['platform'] =~ /debian/ - on host, 'echo \'export PATH=/var/lib/gems/1.8/bin/:${PATH}\' >> ~/.bashrc' - end - if host.is_pe? - install_pe - else - install_puppet - on host, "mkdir -p #{host['distmoduledir']}" - end - end -end - -UNSUPPORTED_PLATFORMS = ['Suse','windows','AIX','Solaris'] - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Readable test descriptions - c.formatter = :documentation - - # Configure all nodes in nodeset - c.before :suite do - # Install module and dependencies - puppet_module_install(:source => proj_root, :module_name => 'apache') - hosts.each do |host| - # Required for mod_passenger tests. - if fact('osfamily') == 'RedHat' - on host, puppet('module','install','stahnma/epel'), { :acceptable_exit_codes => [0,1] } - end - # Required for manifest to make mod_pagespeed repository available - if fact('osfamily') == 'Debian' - on host, puppet('module','install','puppetlabs-apt'), { :acceptable_exit_codes => [0,1] } - end - on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } - on host, puppet('module','install','puppetlabs-concat'), { :acceptable_exit_codes => [0,1] } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/unit/provider/a2mod/gentoo_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/unit/provider/a2mod/gentoo_spec.rb deleted file mode 100644 index ddb9dddda4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/spec/unit/provider/a2mod/gentoo_spec.rb +++ /dev/null @@ -1,184 +0,0 @@ -#!/usr/bin/env rspec - -require 'spec_helper' - -provider_class = Puppet::Type.type(:a2mod).provider(:gentoo) - -describe provider_class do - before :each do - provider_class.clear - end - - [:conf_file, :instances, :modules, :initvars, :conf_file, :clear].each do |method| - it "should respond to the class method #{method}" do - provider_class.should respond_to(method) - end - end - - describe "when fetching modules" do - before do - @filetype = mock() - end - - it "should return a sorted array of the defined parameters" do - @filetype.expects(:read).returns(%Q{APACHE2_OPTS="-D FOO -D BAR -D BAZ"\n}) - provider_class.expects(:filetype).returns(@filetype) - - provider_class.modules.should == %w{bar baz foo} - end - - it "should cache the module list" do - @filetype.expects(:read).once.returns(%Q{APACHE2_OPTS="-D FOO -D BAR -D BAZ"\n}) - provider_class.expects(:filetype).once.returns(@filetype) - - 2.times { provider_class.modules.should == %w{bar baz foo} } - end - - it "should normalize parameters" do - @filetype.expects(:read).returns(%Q{APACHE2_OPTS="-D FOO -D BAR -D BAR"\n}) - provider_class.expects(:filetype).returns(@filetype) - - provider_class.modules.should == %w{bar foo} - end - end - - describe "when prefetching" do - it "should match providers to resources" do - provider = mock("ssl_provider", :name => "ssl") - resource = mock("ssl_resource") - resource.expects(:provider=).with(provider) - - provider_class.expects(:instances).returns([provider]) - provider_class.prefetch("ssl" => resource) - end - end - - describe "when flushing" do - before :each do - @filetype = mock() - @filetype.stubs(:backup) - provider_class.expects(:filetype).at_least_once.returns(@filetype) - - @info = mock() - @info.stubs(:[]).with(:name).returns("info") - @info.stubs(:provider=) - - @mpm = mock() - @mpm.stubs(:[]).with(:name).returns("mpm") - @mpm.stubs(:provider=) - - @ssl = mock() - @ssl.stubs(:[]).with(:name).returns("ssl") - @ssl.stubs(:provider=) - end - - it "should add modules whose ensure is present" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS=""}) - @filetype.expects(:write).with(%Q{APACHE2_OPTS="-D INFO"}) - - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - - provider_class.flush - end - - it "should remove modules whose ensure is present" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS="-D INFO"}) - @filetype.expects(:write).with(%Q{APACHE2_OPTS=""}) - - @info.stubs(:should).with(:ensure).returns(:absent) - @info.stubs(:provider=) - provider_class.prefetch("info" => @info) - - provider_class.flush - end - - it "should not modify providers without resources" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS="-D INFO -D MPM"}) - @filetype.expects(:write).with(%Q{APACHE2_OPTS="-D MPM -D SSL"}) - - @info.stubs(:should).with(:ensure).returns(:absent) - provider_class.prefetch("info" => @info) - - @ssl.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("ssl" => @ssl) - - provider_class.flush - end - - it "should write the modules in sorted order" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS=""}) - @filetype.expects(:write).with(%Q{APACHE2_OPTS="-D INFO -D MPM -D SSL"}) - - @mpm.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("mpm" => @mpm) - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - @ssl.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("ssl" => @ssl) - - provider_class.flush - end - - it "should write the records back once" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS=""}) - @filetype.expects(:write).once.with(%Q{APACHE2_OPTS="-D INFO -D SSL"}) - - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - - @ssl.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("ssl" => @ssl) - - provider_class.flush - end - - it "should only modify the line containing APACHE2_OPTS" do - @filetype.expects(:read).at_least_once.returns(%Q{# Comment\nAPACHE2_OPTS=""\n# Another comment}) - @filetype.expects(:write).once.with(%Q{# Comment\nAPACHE2_OPTS="-D INFO"\n# Another comment}) - - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - provider_class.flush - end - - it "should restore any arbitrary arguments" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS="-Y -D MPM -X"}) - @filetype.expects(:write).once.with(%Q{APACHE2_OPTS="-Y -X -D INFO -D MPM"}) - - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - provider_class.flush - end - - it "should backup the file once if changes were made" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS=""}) - @filetype.expects(:write).once.with(%Q{APACHE2_OPTS="-D INFO -D SSL"}) - - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - - @ssl.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("ssl" => @ssl) - - @filetype.unstub(:backup) - @filetype.expects(:backup) - provider_class.flush - end - - it "should not write the file or run backups if no changes were made" do - @filetype.expects(:read).at_least_once.returns(%Q{APACHE2_OPTS="-X -D INFO -D SSL -Y"}) - @filetype.expects(:write).never - - @info.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("info" => @info) - - @ssl.stubs(:should).with(:ensure).returns(:present) - provider_class.prefetch("ssl" => @ssl) - - @filetype.unstub(:backup) - @filetype.expects(:backup).never - provider_class.flush - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/confd/no-accf.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/confd/no-accf.conf.erb deleted file mode 100644 index 10e51644ce..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/confd/no-accf.conf.erb +++ /dev/null @@ -1,4 +0,0 @@ - - AcceptFilter http none - AcceptFilter https none - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/httpd.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/httpd.conf.erb deleted file mode 100644 index cac3aaf102..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/httpd.conf.erb +++ /dev/null @@ -1,109 +0,0 @@ -# Security -ServerTokens <%= @server_tokens %> -ServerSignature <%= @server_signature %> -TraceEnable <%= @trace_enable %> - -ServerName "<%= @servername %>" -ServerRoot "<%= @server_root %>" -PidFile <%= @pidfile %> -Timeout <%= @timeout %> -KeepAlive <%= @keepalive %> -MaxKeepAliveRequests <%= @max_keepalive_requests %> -KeepAliveTimeout <%= @keepalive_timeout %> - -User <%= @user %> -Group <%= @group %> - -AccessFileName .htaccess - -<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all denied -<%- else -%> - Order allow,deny - Deny from all - Satisfy all -<%- end -%> - - - - Options FollowSymLinks - AllowOverride None - - -DefaultType none -HostnameLookups Off -ErrorLog "<%= @logroot %>/<%= @error_log %>" -LogLevel <%= @log_level %> -EnableSendfile <%= @sendfile %> - -#Listen 80 - -<% if @apxs_workaround -%> -# Workaround: without this hack apxs would be confused about where to put -# LoadModule directives and fail entire procedure of apache package -# installation/reinstallation. This problem was observed on FreeBSD (apache22). -#LoadModule fake_module libexec/apache22/mod_fake.so -<% end -%> - -Include "<%= @mod_load_dir %>/*.load" -<% if @mod_load_dir != @confd_dir and @mod_load_dir != @vhost_load_dir -%> -Include "<%= @mod_load_dir %>/*.conf" -<% end -%> -Include "<%= @ports_file %>" - -LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined -LogFormat "%h %l %u %t \"%r\" %>s %b" common -LogFormat "%{Referer}i -> %U" referer -LogFormat "%{User-agent}i" agent -<% if @log_formats and !@log_formats.empty? -%> - <%- @log_formats.each do |nickname,format| -%> -LogFormat "<%= format -%>" <%= nickname %> - <%- end -%> -<% end -%> - -<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> -IncludeOptional "<%= @confd_dir %>/*.conf" -<%- else -%> -Include "<%= @confd_dir %>/*.conf" -<%- end -%> -<% if @vhost_load_dir != @confd_dir -%> -Include "<%= @vhost_load_dir %>/*" -<% end -%> - -<% if @error_documents -%> -# /usr/share/apache2/error on debian -Alias /error/ "<%= @error_documents_path %>/" - -"> - AllowOverride None - Options IncludesNoExec - AddOutputFilter Includes html - AddHandler type-map var -<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all granted -<%- else -%> - Order allow,deny - Allow from all -<%- end -%> - LanguagePriority en cs de es fr it nl sv pt-br ro - ForceLanguagePriority Prefer Fallback - - -ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var -ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var -ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var -ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var -ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var -ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var -ErrorDocument 410 /error/HTTP_GONE.html.var -ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var -ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var -ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var -ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var -ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var -ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var -ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var -ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var -ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var -ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/listen.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/listen.erb deleted file mode 100644 index 8fc871b0ad..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/listen.erb +++ /dev/null @@ -1,6 +0,0 @@ -<%# Listen should always be one of: - - - - : - - [ --%> -Listen <%= @listen_addr_port %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/alias.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/alias.conf.erb deleted file mode 100644 index 151a806c9f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/alias.conf.erb +++ /dev/null @@ -1,13 +0,0 @@ - -Alias /icons/ "<%= @icons_path %>/" -"> - Options Indexes MultiViews - AllowOverride None -<%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all granted -<%- else -%> - Order allow,deny - Allow from all -<%- end -%> - - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/authnz_ldap.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/authnz_ldap.conf.erb deleted file mode 100644 index 565fcf0df9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/authnz_ldap.conf.erb +++ /dev/null @@ -1,5 +0,0 @@ -<% if @verifyServerCert == true -%> -LDAPVerifyServerCert On -<% else -%> -LDAPVerifyServerCert Off -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/autoindex.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/autoindex.conf.erb deleted file mode 100644 index ef6bbebea6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/autoindex.conf.erb +++ /dev/null @@ -1,56 +0,0 @@ -IndexOptions FancyIndexing VersionSort HTMLTable NameWidth=* DescriptionWidth=* Charset=UTF-8 -AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip x-bzip2 - -AddIconByType (TXT,/icons/text.gif) text/* -AddIconByType (IMG,/icons/image2.gif) image/* -AddIconByType (SND,/icons/sound2.gif) audio/* -AddIconByType (VID,/icons/movie.gif) video/* - -AddIcon /icons/binary.gif .bin .exe -AddIcon /icons/binhex.gif .hqx -AddIcon /icons/tar.gif .tar -AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv -AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip -AddIcon /icons/a.gif .ps .ai .eps -AddIcon /icons/layout.gif .html .shtml .htm .pdf -AddIcon /icons/text.gif .txt -AddIcon /icons/c.gif .c -AddIcon /icons/p.gif .pl .py -AddIcon /icons/f.gif .for -AddIcon /icons/dvi.gif .dvi -AddIcon /icons/uuencoded.gif .uu -AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl -AddIcon /icons/tex.gif .tex -AddIcon /icons/bomb.gif /core -AddIcon (SND,/icons/sound2.gif) .ogg -AddIcon (VID,/icons/movie.gif) .ogm - -AddIcon /icons/back.gif .. -AddIcon /icons/hand.right.gif README -AddIcon /icons/folder.gif ^^DIRECTORY^^ -AddIcon /icons/blank.gif ^^BLANKICON^^ - -AddIcon /icons/odf6odt-20x22.png .odt -AddIcon /icons/odf6ods-20x22.png .ods -AddIcon /icons/odf6odp-20x22.png .odp -AddIcon /icons/odf6odg-20x22.png .odg -AddIcon /icons/odf6odc-20x22.png .odc -AddIcon /icons/odf6odf-20x22.png .odf -AddIcon /icons/odf6odb-20x22.png .odb -AddIcon /icons/odf6odi-20x22.png .odi -AddIcon /icons/odf6odm-20x22.png .odm - -AddIcon /icons/odf6ott-20x22.png .ott -AddIcon /icons/odf6ots-20x22.png .ots -AddIcon /icons/odf6otp-20x22.png .otp -AddIcon /icons/odf6otg-20x22.png .otg -AddIcon /icons/odf6otc-20x22.png .otc -AddIcon /icons/odf6otf-20x22.png .otf -AddIcon /icons/odf6oti-20x22.png .oti -AddIcon /icons/odf6oth-20x22.png .oth - -DefaultIcon /icons/unknown.gif -ReadmeName README.html -HeaderName HEADER.html - -IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/cgid.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/cgid.conf.erb deleted file mode 100644 index 5f82d7424c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/cgid.conf.erb +++ /dev/null @@ -1 +0,0 @@ -ScriptSock "<%= @cgisock_path %>" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/dav_fs.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/dav_fs.conf.erb deleted file mode 100644 index 3c53e9e14b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/dav_fs.conf.erb +++ /dev/null @@ -1 +0,0 @@ -DAVLockDB "<%= @dav_lock %>" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/deflate.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/deflate.conf.erb deleted file mode 100644 index a3cdf0552e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/deflate.conf.erb +++ /dev/null @@ -1,8 +0,0 @@ -AddOutputFilterByType DEFLATE text/html text/plain text/xml -AddOutputFilterByType DEFLATE text/css -AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript -AddOutputFilterByType DEFLATE application/rss+xml - -DeflateFilterNote Input instream -DeflateFilterNote Output outstream -DeflateFilterNote Ratio ratio diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/dir.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/dir.conf.erb deleted file mode 100644 index 741f6ae034..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/dir.conf.erb +++ /dev/null @@ -1 +0,0 @@ -DirectoryIndex <%= @indexes.join(' ') %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/disk_cache.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/disk_cache.conf.erb deleted file mode 100644 index 0c7e2c4b73..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/disk_cache.conf.erb +++ /dev/null @@ -1,8 +0,0 @@ - - - CacheEnable disk / - CacheRoot "<%= @cache_root %>" - CacheDirLevels 2 - CacheDirLength 1 - - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/event.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/event.conf.erb deleted file mode 100644 index 40099543d5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/event.conf.erb +++ /dev/null @@ -1,9 +0,0 @@ - - ServerLimit <%= @serverlimit %> - StartServers <%= @startservers %> - MaxClients <%= @maxclients %> - MinSpareThreads <%= @minsparethreads %> - MaxSpareThreads <%= @maxsparethreads %> - ThreadsPerChild <%= @threadsperchild %> - MaxRequestsPerChild <%= @maxrequestsperchild %> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/fastcgi.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/fastcgi.conf.erb deleted file mode 100644 index 8d94a23614..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/fastcgi.conf.erb +++ /dev/null @@ -1,6 +0,0 @@ -# The Fastcgi Apache module configuration file is being -# managed by Puppet and changes will be overwritten. - - AddHandler fastcgi-script .fcgi - FastCgiIpcDir "<%= @fastcgi_lib_path %>" - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/fcgid.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/fcgid.conf.erb deleted file mode 100644 index a82bc30df9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/fcgid.conf.erb +++ /dev/null @@ -1,5 +0,0 @@ - -<% @options.sort_by {|key, value| key}.each do |key, value| -%> - <%= key %> <%= value %> -<% end -%> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/info.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/info.conf.erb deleted file mode 100644 index d5288fb8c9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/info.conf.erb +++ /dev/null @@ -1,10 +0,0 @@ - - SetHandler server-info - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip <%= Array(@allow_from).join(" ") %> - <%- else -%> - Order deny,allow - Deny from all - Allow from <%= Array(@allow_from).join(" ") %> - <%- end -%> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/itk.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/itk.conf.erb deleted file mode 100644 index f45f2b35dd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/itk.conf.erb +++ /dev/null @@ -1,8 +0,0 @@ - - StartServers <%= @startservers %> - MinSpareServers <%= @minspareservers %> - MaxSpareServers <%= @maxspareservers %> - ServerLimit <%= @serverlimit %> - MaxClients <%= @maxclients %> - MaxRequestsPerChild <%= @maxrequestsperchild %> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/ldap.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/ldap.conf.erb deleted file mode 100644 index 0019776175..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/ldap.conf.erb +++ /dev/null @@ -1,11 +0,0 @@ - - SetHandler ldap-status - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip 127.0.0.1 ::1 - <%- else -%> - Order deny,allow - Deny from all - Allow from 127.0.0.1 ::1 - Satisfy all - <%- end -%> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/load.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/load.erb deleted file mode 100644 index 51f45edb21..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/load.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% if @loadfiles -%> -<% Array(@loadfiles).each do |loadfile| -%> -LoadFile <%= loadfile %> -<% end -%> - -<% end -%> -LoadModule <%= @_id %> <%= @_path %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/mime.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/mime.conf.erb deleted file mode 100644 index a69a424a6a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/mime.conf.erb +++ /dev/null @@ -1,36 +0,0 @@ -TypesConfig <%= @mime_types_config %> - -AddType application/x-compress .Z -AddType application/x-gzip .gz .tgz -AddType application/x-bzip2 .bz2 - -AddLanguage ca .ca -AddLanguage cs .cz .cs -AddLanguage da .dk -AddLanguage de .de -AddLanguage el .el -AddLanguage en .en -AddLanguage eo .eo -AddLanguage es .es -AddLanguage et .et -AddLanguage fr .fr -AddLanguage he .he -AddLanguage hr .hr -AddLanguage it .it -AddLanguage ja .ja -AddLanguage ko .ko -AddLanguage ltz .ltz -AddLanguage nl .nl -AddLanguage nn .nn -AddLanguage no .no -AddLanguage pl .po -AddLanguage pt .pt -AddLanguage pt-BR .pt-br -AddLanguage ru .ru -AddLanguage sv .sv -AddLanguage zh-CN .zh-cn -AddLanguage zh-TW .zh-tw - -AddHandler type-map var -AddType text/html .shtml -AddOutputFilter INCLUDES .shtml diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/mime_magic.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/mime_magic.conf.erb deleted file mode 100644 index 1ce1bc3c16..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/mime_magic.conf.erb +++ /dev/null @@ -1 +0,0 @@ -MIMEMagicFile "<%= @magic_file %>" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/mpm_event.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/mpm_event.conf.erb deleted file mode 100644 index eb6f1ff5f5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/mpm_event.conf.erb +++ /dev/null @@ -1,9 +0,0 @@ - - StartServers 2 - MinSpareThreads 25 - MaxSpareThreads 75 - ThreadLimit 64 - ThreadsPerChild 25 - MaxClients 150 - MaxRequestsPerChild 0 - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/negotiation.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/negotiation.conf.erb deleted file mode 100644 index 50921019bc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/negotiation.conf.erb +++ /dev/null @@ -1,2 +0,0 @@ -LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW -ForceLanguagePriority Prefer Fallback diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/nss.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/nss.conf.erb deleted file mode 100644 index a5c81752f3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/nss.conf.erb +++ /dev/null @@ -1,228 +0,0 @@ -# -# This is the Apache server configuration file providing SSL support using. -# the mod_nss plugin. It contains the configuration directives to instruct -# the server how to serve pages over an https connection. -# -# Do NOT simply read the instructions in here without understanding -# what they do. They're here only as hints or reminders. If you are unsure -# consult the online docs. You have been warned. -# - -#LoadModule nss_module modules/libmodnss.so - -# -# When we also provide SSL we have to listen to the -# standard HTTP port (see above) and to the HTTPS port -# -# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two -# Listen directives: "Listen [::]:8443" and "Listen 0.0.0.0:443" -# -Listen 8443 - -## -## SSL Global Context -## -## All SSL configuration in this context applies both to -## the main server and all SSL-enabled virtual hosts. -## - -# -# Some MIME-types for downloading Certificates and CRLs -# -AddType application/x-x509-ca-cert .crt -AddType application/x-pkcs7-crl .crl - -# Pass Phrase Dialog: -# Configure the pass phrase gathering process. -# The filtering dialog program (`builtin' is a internal -# terminal dialog) has to provide the pass phrase on stdout. -<% if @passwd_file -%> -NSSPassPhraseDialog "file:<%= @passwd_file %>" -<% else -%> -NSSPassPhraseDialog builtin -<% end -%> - -# Pass Phrase Helper: -# This helper program stores the token password pins between -# restarts of Apache. -NSSPassPhraseHelper /usr/sbin/nss_pcache - -# Configure the SSL Session Cache. -# NSSSessionCacheSize is the number of entries in the cache. -# NSSSessionCacheTimeout is the SSL2 session timeout (in seconds). -# NSSSession3CacheTimeout is the SSL3/TLS session timeout (in seconds). -NSSSessionCacheSize 10000 -NSSSessionCacheTimeout 100 -NSSSession3CacheTimeout 86400 - -# -# Pseudo Random Number Generator (PRNG): -# Configure one or more sources to seed the PRNG of the SSL library. -# The seed data should be of good random quality. -# WARNING! On some platforms /dev/random blocks if not enough entropy -# is available. Those platforms usually also provide a non-blocking -# device, /dev/urandom, which may be used instead. -# -# This does not support seeding the RNG with each connection. - -NSSRandomSeed startup builtin -#NSSRandomSeed startup file:/dev/random 512 -#NSSRandomSeed startup file:/dev/urandom 512 - -# -# TLS Negotiation configuration under RFC 5746 -# -# Only renegotiate if the peer's hello bears the TLS renegotiation_info -# extension. Default off. -NSSRenegotiation off - -# Peer must send Signaling Cipher Suite Value (SCSV) or -# Renegotiation Info (RI) extension in ALL handshakes. Default: off -NSSRequireSafeNegotiation off - -## -## SSL Virtual Host Context -## - - - -# General setup for the virtual host -#DocumentRoot "/etc/httpd/htdocs" -#ServerName www.example.com:8443 -#ServerAdmin you@example.com - -# mod_nss can log to separate log files, you can choose to do that if you'd like -# LogLevel is not inherited from httpd.conf. -ErrorLog "<%= @error_log %>" -TransferLog "<%= @transfer_log %>" -LogLevel warn - -# SSL Engine Switch: -# Enable/Disable SSL for this virtual host. -NSSEngine on - -# SSL Cipher Suite: -# List the ciphers that the client is permitted to negotiate. -# See the mod_nss documentation for a complete list. - -# SSL 3 ciphers. SSL 2 is disabled by default. -NSSCipherSuite +rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,+fips_3des_sha,-fips_des_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-rsa_des_56_sha,-rsa_rc4_56_sha,+rsa_aes_128_sha,+rsa_aes_256_sha - -# SSL 3 ciphers + ECC ciphers. SSL 2 is disabled by default. -# -# Comment out the NSSCipherSuite line above and use the one below if you have -# ECC enabled NSS and mod_nss and want to use Elliptical Curve Cryptography -#NSSCipherSuite +rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,+fips_3des_sha,-fips_des_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-rsa_des_56_sha,-rsa_rc4_56_sha,+rsa_aes_128_sha,+rsa_aes_256_sha,-ecdh_ecdsa_null_sha,+ecdh_ecdsa_rc4_128_sha,+ecdh_ecdsa_3des_sha,+ecdh_ecdsa_aes_128_sha,+ecdh_ecdsa_aes_256_sha,-ecdhe_ecdsa_null_sha,+ecdhe_ecdsa_rc4_128_sha,+ecdhe_ecdsa_3des_sha,+ecdhe_ecdsa_aes_128_sha,+ecdhe_ecdsa_aes_256_sha,-ecdh_rsa_null_sha,+ecdh_rsa_128_sha,+ecdh_rsa_3des_sha,+ecdh_rsa_aes_128_sha,+ecdh_rsa_aes_256_sha,-echde_rsa_null,+ecdhe_rsa_rc4_128_sha,+ecdhe_rsa_3des_sha,+ecdhe_rsa_aes_128_sha,+ecdhe_rsa_aes_256_sha - -# SSL Protocol: -# Cryptographic protocols that provide communication security. -# NSS handles the specified protocols as "ranges", and automatically -# negotiates the use of the strongest protocol for a connection starting -# with the maximum specified protocol and downgrading as necessary to the -# minimum specified protocol that can be used between two processes. -# Since all protocol ranges are completely inclusive, and no protocol in the -# middle of a range may be excluded, the entry "NSSProtocol SSLv3,TLSv1.1" -# is identical to the entry "NSSProtocol SSLv3,TLSv1.0,TLSv1.1". -NSSProtocol SSLv3,TLSv1.0,TLSv1.1 - -# SSL Certificate Nickname: -# The nickname of the RSA server certificate you are going to use. -NSSNickname Server-Cert - -# SSL Certificate Nickname: -# The nickname of the ECC server certificate you are going to use, if you -# have an ECC-enabled version of NSS and mod_nss -#NSSECCNickname Server-Cert-ecc - -# Server Certificate Database: -# The NSS security database directory that holds the certificates and -# keys. The database consists of 3 files: cert8.db, key3.db and secmod.db. -# Provide the directory that these files exist. -NSSCertificateDatabase "<%= @httpd_dir -%>/alias" - -# Database Prefix: -# In order to be able to store multiple NSS databases in one directory -# they need unique names. This option sets the database prefix used for -# cert8.db and key3.db. -#NSSDBPrefix my-prefix- - -# Client Authentication (Type): -# Client certificate verification type. Types are none, optional and -# require. -#NSSVerifyClient none - -# -# Online Certificate Status Protocol (OCSP). -# Verify that certificates have not been revoked before accepting them. -#NSSOCSP off - -# -# Use a default OCSP responder. If enabled this will be used regardless -# of whether one is included in a client certificate. Note that the -# server certificate is verified during startup. -# -# NSSOCSPDefaultURL defines the service URL of the OCSP responder -# NSSOCSPDefaultName is the nickname of the certificate to trust to -# sign the OCSP responses. -#NSSOCSPDefaultResponder on -#NSSOCSPDefaultURL http://example.com/ocsp/status -#NSSOCSPDefaultName ocsp-nickname - -# Access Control: -# With SSLRequire you can do per-directory access control based -# on arbitrary complex boolean expressions containing server -# variable checks and other lookup directives. The syntax is a -# mixture between C and Perl. See the mod_nss documentation -# for more details. -# -#NSSRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \ -# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ -# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ -# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \ -# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \ -# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ -# - -# SSL Engine Options: -# Set various options for the SSL engine. -# o FakeBasicAuth: -# Translate the client X.509 into a Basic Authorisation. This means that -# the standard Auth/DBMAuth methods can be used for access control. The -# user name is the `one line' version of the client's X.509 certificate. -# Note that no password is obtained from the user. Every entry in the user -# file needs this password: `xxj31ZMTZzkVA'. -# o ExportCertData: -# This exports two additional environment variables: SSL_CLIENT_CERT and -# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the -# server (always existing) and the client (only existing when client -# authentication is used). This can be used to import the certificates -# into CGI scripts. -# o StdEnvVars: -# This exports the standard SSL/TLS related `SSL_*' environment variables. -# Per default this exportation is switched off for performance reasons, -# because the extraction step is an expensive operation and is usually -# useless for serving static content. So one usually enables the -# exportation for CGI and SSI requests only. -# o StrictRequire: -# This denies access when "NSSRequireSSL" or "NSSRequire" applied even -# under a "Satisfy any" situation, i.e. when it applies access is denied -# and no other module can change it. -# o OptRenegotiate: -# This enables optimized SSL connection renegotiation handling when SSL -# directives are used in per-directory context. -#NSSOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire - - NSSOptions +StdEnvVars - - - NSSOptions +StdEnvVars - - -# Per-Server Logging: -# The home of a custom SSL log file. Use this when you want a -# compact non-error SSL logfile on a virtual host basis. -#CustomLog /home/rcrit/redhat/apache/logs/ssl_request_log \ -# "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" - - - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/pagespeed.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/pagespeed.conf.erb deleted file mode 100644 index a4d8a7220e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/pagespeed.conf.erb +++ /dev/null @@ -1,98 +0,0 @@ -ModPagespeed on - -ModPagespeedInheritVHostConfig <%= @inherit_vhost_config %> -AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html -<% if @filter_xhtml -%> -AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER application/xhtml+xml -<% end -%> -ModPagespeedFileCachePath "<%= @cache_path %>" -ModPagespeedLogDir "<%= @log_dir %>" - -<% @memache_servers.each do |server| -%> -ModPagespeedMemcachedServers <%= server -%> -<% end -%> - -ModPagespeedRewriteLevel <%= @rewrite_level -%> - -<% @disable_filters.each do |filter| -%> -ModPagespeedDisableFilters <%= filter -%> -<% end -%> - -<% @enable_filters.each do |filter| -%> -ModPagespeedEnableFilters <%= filter -%> -<% end -%> - -<% @forbid_filters.each do |filter| -%> -ModPagespeedForbidFilters <%= filter -%> -<% end -%> - -ModPagespeedRewriteDeadlinePerFlushMs <%= @rewrite_deadline_per_flush_ms %> - -<% if @additional_domains -%> -ModPagespeedDomain <%= @additional_domains -%> -<% end -%> - -ModPagespeedFileCacheSizeKb <%= @file_cache_size_kb %> -ModPagespeedFileCacheCleanIntervalMs <%= @file_cache_clean_interval_ms %> -ModPagespeedLRUCacheKbPerProcess <%= @lru_cache_per_process %> -ModPagespeedLRUCacheByteLimit <%= @lru_cache_byte_limit %> -ModPagespeedCssFlattenMaxBytes <%= @css_flatten_max_bytes %> -ModPagespeedCssInlineMaxBytes <%= @css_inline_max_bytes %> -ModPagespeedCssImageInlineMaxBytes <%= @css_image_inline_max_bytes %> -ModPagespeedImageInlineMaxBytes <%= @image_inline_max_bytes %> -ModPagespeedJsInlineMaxBytes <%= @js_inline_max_bytes %> -ModPagespeedCssOutlineMinBytes <%= @css_outline_min_bytes %> -ModPagespeedJsOutlineMinBytes <%= @js_outline_min_bytes %> - - -ModPagespeedFileCacheInodeLimit <%= @inode_limit %> -ModPagespeedImageMaxRewritesAtOnce <%= @image_max_rewrites_at_once %> - -ModPagespeedNumRewriteThreads <%= @num_rewrite_threads %> -ModPagespeedNumExpensiveRewriteThreads <%= @num_expensive_rewrite_threads %> - -ModPagespeedStatistics <%= @collect_statistics %> - - - # You may insert other "Allow from" lines to add hosts you want to - # allow to look at generated statistics. Another possibility is - # to comment out the "Order" and "Allow" options from the config - # file, to allow any client that can reach your server to examine - # statistics. This might be appropriate in an experimental setup or - # if the Apache server is protected by a reverse proxy that will - # filter URLs in some fashion. - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip 127.0.0.1 ::1 <%= Array(@allow_view_stats).join(" ") %> - <%- else -%> - Order allow,deny - Allow from 127.0.0.1 ::1 <%= Array(@allow_view_stats).join(" ") %> - <%- end -%> - SetHandler mod_pagespeed_statistics - - -ModPagespeedStatisticsLogging <%= @statistics_logging %> - - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip 127.0.0.1 ::1 <%= Array(@allow_pagespeed_console).join(" ") %> - <%- else -%> - Order allow,deny - Allow from 127.0.0.1 ::1 <%= Array(@allow_pagespeed_console).join(" ") %> - <%- end -%> - SetHandler pagespeed_console - - -ModPagespeedMessageBufferSize <%= @message_buffer_size %> - - - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip 127.0.0.1 ::1 <%= Array(@allow_pagespeed_message).join(" ") %> - <%- else -%> - Order allow,deny - Allow from 127.0.0.1 ::1 <%= Array(@allow_pagespeed_message).join(" ") %> - <%- end -%> - SetHandler mod_pagespeed_message - - -<% @additional_configuration.each_pair do |key, value| -%> -<%= key %> <%= value %> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/passenger.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/passenger.conf.erb deleted file mode 100644 index dd9eee3b13..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/passenger.conf.erb +++ /dev/null @@ -1,37 +0,0 @@ -# The Passanger Apache module configuration file is being -# managed by Puppet and changes will be overwritten. - - <%- if @passenger_root -%> - PassengerRoot "<%= @passenger_root %>" - <%- end -%> - <%- if @passenger_ruby -%> - PassengerRuby "<%= @passenger_ruby %>" - <%- end -%> - <%- if @passenger_default_ruby -%> - PassengerDefaultRuby "<%= @passenger_default_ruby %>" - <%- end -%> - <%- if @passenger_high_performance -%> - PassengerHighPerformance <%= @passenger_high_performance %> - <%- end -%> - <%- if @passenger_max_pool_size -%> - PassengerMaxPoolSize <%= @passenger_max_pool_size %> - <%- end -%> - <%- if @passenger_pool_idle_time -%> - PassengerPoolIdleTime <%= @passenger_pool_idle_time %> - <%- end -%> - <%- if @passenger_max_requests -%> - PassengerMaxRequests <%= @passenger_max_requests %> - <%- end -%> - <%- if @passenger_stat_throttle_rate -%> - PassengerStatThrottleRate <%= @passenger_stat_throttle_rate %> - <%- end -%> - <%- if @rack_autodetect -%> - RackAutoDetect <%= @rack_autodetect %> - <%- end -%> - <%- if @rails_autodetect -%> - RailsAutoDetect <%= @rails_autodetect %> - <%- end -%> - <%- if @passenger_use_global_queue -%> - PassengerUseGlobalQueue <%= @passenger_use_global_queue %> - <%- end -%> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/peruser.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/peruser.conf.erb deleted file mode 100644 index 13c8d708db..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/peruser.conf.erb +++ /dev/null @@ -1,12 +0,0 @@ - - MinSpareProcessors <%= @minspareprocessors %> - MinProcessors <%= @minprocessors %> - MaxProcessors <%= @maxprocessors %> - MaxClients <%= @maxclients %> - MaxRequestsPerChild <%= @maxrequestsperchild %> - IdleTimeout <%= @idletimeout %> - ExpireTimeout <%= @expiretimeout %> - KeepAlive <%= @keepalive %> - Include "<%= @mod_dir %>/peruser/multiplexers/*.conf" - Include "<%= @mod_dir %>/peruser/processors/*.conf" - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/php5.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/php5.conf.erb deleted file mode 100644 index 44df2ae066..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/php5.conf.erb +++ /dev/null @@ -1,30 +0,0 @@ -# -# PHP is an HTML-embedded scripting language which attempts to make it -# easy for developers to write dynamically generated webpages. -# -# -# LoadModule php5_module modules/libphp5.so -# -# -# # Use of the "ZTS" build with worker is experimental, and no shared -# # modules are supported. -# LoadModule php5_module modules/libphp5-zts.so -# - -# -# Cause the PHP interpreter to handle files with a .php extension. -# -AddHandler php5-script <%= @extensions.flatten.compact.join(' ') %> -AddType text/html .php - -# -# Add index.php to the list of files that will be served as directory -# indexes. -# -DirectoryIndex index.php - -# -# Uncomment the following line to allow PHP to pretty-print .phps -# files as PHP source code: -# -#AddType application/x-httpd-php-source .phps diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/prefork.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/prefork.conf.erb deleted file mode 100644 index aabfdf7b22..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/prefork.conf.erb +++ /dev/null @@ -1,8 +0,0 @@ - - StartServers <%= @startservers %> - MinSpareServers <%= @minspareservers %> - MaxSpareServers <%= @maxspareservers %> - ServerLimit <%= @serverlimit %> - MaxClients <%= @maxclients %> - MaxRequestsPerChild <%= @maxrequestsperchild %> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/proxy.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/proxy.conf.erb deleted file mode 100644 index 5ea829eeb3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/proxy.conf.erb +++ /dev/null @@ -1,27 +0,0 @@ -# -# Proxy Server directives. Uncomment the following lines to -# enable the proxy server: -# - - # Do not enable proxying with ProxyRequests until you have secured your - # server. Open proxy servers are dangerous both to your network and to the - # Internet at large. - ProxyRequests <%= @proxy_requests %> - - <% if @proxy_requests != 'Off' or ( @allow_from and ! @allow_from.empty? ) -%> - - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip <%= Array(@allow_from).join(" ") %> - <%- else -%> - Order deny,allow - Deny from all - Allow from <%= Array(@allow_from).join(" ") %> - <%- end -%> - - <% end -%> - - # Enable/disable the handling of HTTP/1.1 "Via:" headers. - # ("Full" adds the server version; "Block" removes all outgoing Via: headers) - # Set to one of: Off | On | Full | Block - ProxyVia On - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/proxy_html.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/proxy_html.conf.erb deleted file mode 100644 index fea15f393f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/proxy_html.conf.erb +++ /dev/null @@ -1,18 +0,0 @@ -ProxyHTMLLinks a href -ProxyHTMLLinks area href -ProxyHTMLLinks link href -ProxyHTMLLinks img src longdesc usemap -ProxyHTMLLinks object classid codebase data usemap -ProxyHTMLLinks q cite -ProxyHTMLLinks blockquote cite -ProxyHTMLLinks ins cite -ProxyHTMLLinks del cite -ProxyHTMLLinks form action -ProxyHTMLLinks input src usemap -ProxyHTMLLinks head profileProxyHTMLLinks base href -ProxyHTMLLinks script src for - -ProxyHTMLEvents onclick ondblclick onmousedown onmouseup \ - onmouseover onmousemove onmouseout onkeypress \ - onkeydown onkeyup onfocus onblur onload \ - onunload onsubmit onreset onselect onchange diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/reqtimeout.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/reqtimeout.conf.erb deleted file mode 100644 index 9a18800da5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/reqtimeout.conf.erb +++ /dev/null @@ -1,2 +0,0 @@ -RequestReadTimeout header=20-40,minrate=500 -RequestReadTimeout body=10,minrate=500 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/rpaf.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/rpaf.conf.erb deleted file mode 100644 index 56e2398b55..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/rpaf.conf.erb +++ /dev/null @@ -1,15 +0,0 @@ -# Enable reverse proxy add forward -RPAFenable On -# RPAFsethostname will, when enabled, take the incoming X-Host header and -# update the virtual host settings accordingly. This allows to have the same -# hostnames as in the "real" configuration for the forwarding proxy. -<% if @sethostname -%> -RPAFsethostname On -<% else -%> -RPAFsethostname Off -<% end -%> -# Which IPs are forwarding requests to us -RPAFproxy_ips <%= Array(@proxy_ips).join(" ") %> -# Setting RPAFheader allows you to change the header name to parse from the -# default X-Forwarded-For to something of your choice. -RPAFheader <%= @header %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/setenvif.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/setenvif.conf.erb deleted file mode 100644 index d31c79fe5d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/setenvif.conf.erb +++ /dev/null @@ -1,34 +0,0 @@ -# -# The following directives modify normal HTTP response behavior to -# handle known problems with browser implementations. -# -BrowserMatch "Mozilla/2" nokeepalive -BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 -BrowserMatch "RealPlayer 4\.0" force-response-1.0 -BrowserMatch "Java/1\.0" force-response-1.0 -BrowserMatch "JDK/1\.0" force-response-1.0 - -# -# The following directive disables redirects on non-GET requests for -# a directory that does not include the trailing slash. This fixes a -# problem with Microsoft WebFolders which does not appropriately handle -# redirects for folders with DAV methods. -# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV. -# -BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully -BrowserMatch "MS FrontPage" redirect-carefully -BrowserMatch "^WebDrive" redirect-carefully -BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully -BrowserMatch "^gnome-vfs/1.0" redirect-carefully -BrowserMatch "^gvfs/1" redirect-carefully -BrowserMatch "^XML Spy" redirect-carefully -BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully -BrowserMatch " Konqueror/4" redirect-carefully - - - BrowserMatch "MSIE [2-6]" \ - nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 - # MSIE 7 and newer should be able to use keepalive - BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/ssl.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/ssl.conf.erb deleted file mode 100644 index 24274050c2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/ssl.conf.erb +++ /dev/null @@ -1,28 +0,0 @@ - - SSLRandomSeed startup builtin - SSLRandomSeed startup file:/dev/urandom 512 - SSLRandomSeed connect builtin - SSLRandomSeed connect file:/dev/urandom 512 - - AddType application/x-x509-ca-cert .crt - AddType application/x-pkcs7-crl .crl - - SSLPassPhraseDialog builtin - SSLSessionCache "shmcb:<%= @session_cache %>" - SSLSessionCacheTimeout 300 -<% if @ssl_compression -%> - SSLCompression On -<% end -%> - <% if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Mutex <%= @ssl_mutex %> - <% else -%> - SSLMutex <%= @ssl_mutex %> - <% end -%> - SSLCryptoDevice builtin - SSLHonorCipherOrder On - SSLCipherSuite <%= @ssl_cipher %> - SSLProtocol all -SSLv2 -<% if @ssl_options -%> - SSLOptions <%= @ssl_options.compact.join(' ') %> -<% end -%> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/status.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/status.conf.erb deleted file mode 100644 index 84f2e03430..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/status.conf.erb +++ /dev/null @@ -1,16 +0,0 @@ - - SetHandler server-status - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require ip <%= Array(@allow_from).join(" ") %> - <%- else -%> - Order deny,allow - Deny from all - Allow from <%= Array(@allow_from).join(" ") %> - <%- end -%> - -ExtendedStatus <%= @extended_status %> - - - # Show Proxy LoadBalancer status in mod_status - ProxyStatus On - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/suphp.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/suphp.conf.erb deleted file mode 100644 index 95fbf97c78..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/suphp.conf.erb +++ /dev/null @@ -1,19 +0,0 @@ - - AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml - suPHP_AddHandler application/x-httpd-suphp - - - suPHP_Engine on - - - # By default, disable suPHP for debian packaged web applications as files - # are owned by root and cannot be executed by suPHP because of min_uid. - - suPHP_Engine off - - -# # Use a specific php config file (a dir which contains a php.ini file) -# suPHP_ConfigPath /etc/php4/cgi/suphp/ -# # Tells mod_suphp NOT to handle requests with the type . -# suPHP_RemoveHandler - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/userdir.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/userdir.conf.erb deleted file mode 100644 index add525d5ea..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/userdir.conf.erb +++ /dev/null @@ -1,27 +0,0 @@ - -<% if @disable_root -%> - UserDir disabled root -<% end -%> - UserDir <%= @dir %> - - /*/<%= @dir %>"> - AllowOverride FileInfo AuthConfig Limit Indexes - Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec - - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all denied - <%- else -%> - Order allow,deny - Allow from all - <%- end -%> - - - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all denied - <%- else -%> - Order allow,deny - Allow from all - <%- end -%> - - - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/worker.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/worker.conf.erb deleted file mode 100644 index 597e05f8d5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/worker.conf.erb +++ /dev/null @@ -1,10 +0,0 @@ - - ServerLimit <%= @serverlimit %> - StartServers <%= @startservers %> - MaxClients <%= @maxclients %> - MinSpareThreads <%= @minsparethreads %> - MaxSpareThreads <%= @maxsparethreads %> - ThreadsPerChild <%= @threadsperchild %> - MaxRequestsPerChild <%= @maxrequestsperchild %> - ThreadLimit <%= @threadlimit %> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/wsgi.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/wsgi.conf.erb deleted file mode 100644 index 18752d2c4a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/mod/wsgi.conf.erb +++ /dev/null @@ -1,13 +0,0 @@ -# The WSGI Apache module configuration file is being -# managed by Puppet an changes will be overwritten. - - <%- if @wsgi_socket_prefix -%> - WSGISocketPrefix <%= @wsgi_socket_prefix %> - <%- end -%> - <%- if @wsgi_python_home -%> - WSGIPythonHome "<%= @wsgi_python_home %>" - <%- end -%> - <%- if @wsgi_python_path -%> - WSGIPythonPath "<%= @wsgi_python_path %>" - <%- end -%> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/namevirtualhost.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/namevirtualhost.erb deleted file mode 100644 index cf767680fc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/namevirtualhost.erb +++ /dev/null @@ -1,8 +0,0 @@ -<%# NameVirtualHost should always be one of: - - * - - *: - - _default_: - - - - : --%> -NameVirtualHost <%= @addr_port %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/ports_header.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/ports_header.erb deleted file mode 100644 index 4908db4ad3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/ports_header.erb +++ /dev/null @@ -1,5 +0,0 @@ -# ************************************ -# Listen & NameVirtualHost resources in module puppetlabs-apache -# Managed by Puppet -# ************************************ - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost.conf.erb deleted file mode 100644 index 64024cfef3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost.conf.erb +++ /dev/null @@ -1,66 +0,0 @@ -# ************************************ -# Vhost template in module puppetlabs-apache -# Managed by Puppet -# ************************************ - -> - ServerName <%= @servername %> -<% if @serveradmin -%> - ServerAdmin <%= @serveradmin %> -<% end -%> - - ## Vhost docroot -<% if @virtual_docroot -%> - VirtualDocumentRoot "<%= @virtual_docroot %>" -<% else -%> - DocumentRoot "<%= @docroot %>" -<% end -%> -<%= scope.function_template(['apache/vhost/_aliases.erb']) -%> - -<%= scope.function_template(['apache/vhost/_itk.erb']) -%> - -<% if @fallbackresource -%> - FallbackResource <%= @fallbackresource %> -<% end -%> - - ## Directories, there should at least be a declaration for <%= @docroot %> -<%= scope.function_template(['apache/vhost/_directories.erb']) -%> - - ## Load additional static includes -<% Array(@additional_includes).each do |include| %> - Include "<%= include %>" -<% end %> - - ## Logging -<% if @error_log -%> - ErrorLog "<%= @error_log_destination %>" -<% end -%> -<% if @log_level -%> - LogLevel <%= @log_level %> -<% end -%> - ServerSignature Off -<% if @access_log and @_access_log_env_var -%> - CustomLog "<%= @access_log_destination %>" <%= @_access_log_format %> <%= @_access_log_env_var %> -<% elsif @access_log -%> - CustomLog "<%= @access_log_destination %>" <%= @_access_log_format %> -<% end -%> -<%= scope.function_template(['apache/vhost/_action.erb']) -%> -<%= scope.function_template(['apache/vhost/_block.erb']) -%> -<%= scope.function_template(['apache/vhost/_error_document.erb']) -%> -<%= scope.function_template(['apache/vhost/_proxy.erb']) -%> -<%= scope.function_template(['apache/vhost/_rack.erb']) -%> -<%= scope.function_template(['apache/vhost/_redirect.erb']) -%> -<%= scope.function_template(['apache/vhost/_rewrite.erb']) -%> -<%= scope.function_template(['apache/vhost/_scriptalias.erb']) -%> -<%= scope.function_template(['apache/vhost/_serveralias.erb']) -%> -<%= scope.function_template(['apache/vhost/_setenv.erb']) -%> -<%= scope.function_template(['apache/vhost/_ssl.erb']) -%> -<%= scope.function_template(['apache/vhost/_suphp.erb']) -%> -<%= scope.function_template(['apache/vhost/_php_admin.erb']) -%> -<%= scope.function_template(['apache/vhost/_header.erb']) -%> -<%= scope.function_template(['apache/vhost/_requestheader.erb']) -%> -<%= scope.function_template(['apache/vhost/_wsgi.erb']) -%> -<%= scope.function_template(['apache/vhost/_custom_fragment.erb']) -%> -<%= scope.function_template(['apache/vhost/_fastcgi.erb']) -%> -<%= scope.function_template(['apache/vhost/_suexec.erb']) -%> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_action.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_action.erb deleted file mode 100644 index 8a02290595..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_action.erb +++ /dev/null @@ -1,4 +0,0 @@ -<% if @action -%> - - Action <%= @action %> /cgi-bin virtual -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_aliases.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_aliases.erb deleted file mode 100644 index 5fdd76ba24..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_aliases.erb +++ /dev/null @@ -1,12 +0,0 @@ -<% if @aliases and ! @aliases.empty? -%> - ## Alias declarations for resources outside the DocumentRoot - <%- [@aliases].flatten.compact.each do |alias_statement| -%> - <%- if alias_statement["path"] != '' -%> - <%- if alias_statement["alias"] and alias_statement["alias"] != '' -%> - Alias <%= alias_statement["alias"] %> "<%= alias_statement["path"] %>" - <%- elsif alias_statement["aliasmatch"] and alias_statement["aliasmatch"] != '' -%> - AliasMatch <%= alias_statement["aliasmatch"] %> "<%= alias_statement["path"] %>" - <%- end -%> - <%- end -%> - <%- end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_block.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_block.erb deleted file mode 100644 index d0776829da..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_block.erb +++ /dev/null @@ -1,14 +0,0 @@ -<% if @block and ! @block.empty? -%> - - ## Block access statements -<% if @block.include? 'scm' -%> - # Block access to SCM directories. - - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all denied - <%- else -%> - Deny From All - <%- end -%> - -<% end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_custom_fragment.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_custom_fragment.erb deleted file mode 100644 index 973964655e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_custom_fragment.erb +++ /dev/null @@ -1,5 +0,0 @@ -<% if @custom_fragment -%> - - ## Custom fragment -<%= @custom_fragment %> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_directories.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_directories.erb deleted file mode 100644 index f4307c7618..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_directories.erb +++ /dev/null @@ -1,171 +0,0 @@ -<% if @_directories and ! @_directories.empty? -%> - <%- [@_directories].flatten.compact.each do |directory| -%> - <%- if directory['path'] and directory['path'] != '' -%> - <%- if directory['provider'] and directory['provider'].match('(directory|location|files)') -%> - <%- if /^(.*)match$/ =~ directory['provider'] -%> - <%- provider = $1.capitalize + 'Match' -%> - <%- else -%> - <%- provider = directory['provider'].capitalize -%> - <%- end -%> - <%- else -%> - <%- provider = 'Directory' -%> - <%- end -%> - <%- path = directory['path'] -%> - - <<%= provider %> "<%= path %>"> - <%- if directory['headers'] -%> - <%- Array(directory['headers']).each do |header| -%> - Header <%= header %> - <%- end -%> - <%- end -%> - <%- if directory['options'] -%> - Options <%= Array(directory['options']).join(' ') %> - <%- end -%> - <%- if provider == 'Directory' -%> - <%- if directory['index_options'] -%> - IndexOptions <%= Array(directory['index_options']).join(' ') %> - <%- end -%> - <%- if directory['index_order_default'] -%> - IndexOrderDefault <%= Array(directory['index_order_default']).join(' ') %> - <%- end -%> - <%- if directory['allow_override'] -%> - AllowOverride <%= Array(directory['allow_override']).join(' ') %> - <%- elsif provider == 'Directory' -%> - AllowOverride None - <%- end -%> - <%- end -%> - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - <%- if directory['require'] and directory['require'] != '' -%> - Require <%= Array(directory['require']).join(' ') %> - <%- else -%> - Require all granted - <%- end -%> - <%- else -%> - <%- if directory['order'] and directory['order'] != '' -%> - Order <%= Array(directory['order']).join(',') %> - <%- else -%> - Order allow,deny - <%- end -%> - <%- if directory['deny'] and directory['deny'] != '' -%> - Deny <%= directory['deny'] %> - <%- end -%> - <%- if directory['allow'] and ! [ false, 'false', '' ].include?(directory['allow']) -%> - <%- if directory['allow'].kind_of?(Array) -%> - <%- Array(directory['allow']).each do |access| -%> - Allow <%= access %> - <%- end -%> - <%- else -%> - Allow <%= directory['allow'] %> - <%- end -%> - <%- elsif [ 'from all', 'from All' ].include?(directory['deny']) -%> - <%- elsif ! directory['deny'] and [ false, 'false', '' ].include?(directory['allow']) -%> - Deny from all - <%- else -%> - Allow from all - <%- end -%> - <%- end -%> - <%- if directory['addhandlers'] and ! directory['addhandlers'].empty? -%> - <%- [directory['addhandlers']].flatten.compact.each do |addhandler| -%> - AddHandler <%= addhandler['handler'] %> <%= Array(addhandler['extensions']).join(' ') %> - <%- end -%> - <%- end -%> - <%- if directory['sethandler'] and directory['sethandler'] != '' -%> - SetHandler <%= directory['sethandler'] %> - <%- end -%> - <%- if directory['passenger_enabled'] and directory['passenger_enabled'] != '' -%> - PassengerEnabled <%= directory['passenger_enabled'] %> - <%- end -%> - <%- if directory['php_admin_flags'] and ! directory['php_admin_flags'].empty? -%> - <%- directory['php_admin_flags'].each do |flag,value| -%> - <%- value = if value =~ /true|yes|on|1/i then 'on' else 'off' end -%> - php_admin_flag <%= "#{flag} #{value}" %> - <%- end -%> - <%- end -%> - <%- if directory['php_admin_values'] and ! directory['php_admin_values'].empty? -%> - <%- directory['php_admin_values'].each do |key,value| -%> - php_admin_value <%= "#{key} #{value}" %> - <%- end -%> - <%- end -%> - <%- if directory['directoryindex'] and directory['directoryindex'] != '' -%> - DirectoryIndex <%= directory['directoryindex'] %> - <%- end -%> - <%- if directory['error_documents'] and ! directory['error_documents'].empty? -%> - <%- [directory['error_documents']].flatten.compact.each do |error_document| -%> - ErrorDocument <%= error_document['error_code'] %> <%= error_document['document'] %> - <%- end -%> - <%- end -%> - <%- if directory['auth_type'] -%> - AuthType <%= directory['auth_type'] %> - <%- end -%> - <%- if directory['auth_name'] -%> - AuthName "<%= directory['auth_name'] %>" - <%- end -%> - <%- if directory['auth_digest_algorithm'] -%> - AuthDigestAlgorithm <%= directory['auth_digest_algorithm'] %> - <%- end -%> - <%- if directory['auth_digest_domain'] -%> - AuthDigestDomain <%= Array(directory['auth_digest_domain']).join(' ') %> - <%- end -%> - <%- if directory['auth_digest_nonce_lifetime'] -%> - AuthDigestNonceLifetime <%= directory['auth_digest_nonce_lifetime'] %> - <%- end -%> - <%- if directory['auth_digest_provider'] -%> - AuthDigestProvider <%= directory['auth_digest_provider'] %> - <%- end -%> - <%- if directory['auth_digest_qop'] -%> - AuthDigestQop <%= directory['auth_digest_qop'] %> - <%- end -%> - <%- if directory['auth_digest_shmem_size'] -%> - AuthDigestShmemSize <%= directory['auth_digest_shmem_size'] %> - <%- end -%> - <%- if directory['auth_basic_authoritative'] -%> - AuthBasicAuthoritative <%= directory['auth_basic_authoritative'] %> - <%- end -%> - <%- if directory['auth_basic_fake'] -%> - AuthBasicFake <%= directory['auth_basic_fake'] %> - <%- end -%> - <%- if directory['auth_basic_provider'] -%> - AuthBasicProvider <%= directory['auth_basic_provider'] %> - <%- end -%> - <%- if directory['auth_user_file'] -%> - AuthUserFile <%= directory['auth_user_file'] %> - <%- end -%> - <%- if directory['auth_group_file'] -%> - AuthGroupFile <%= directory['auth_group_file'] %> - <%- end -%> - <%- if directory['auth_require'] -%> - Require <%= directory['auth_require'] %> - <%- end -%> - <%- if directory['fallbackresource'] -%> - FallbackResource <%= directory['fallbackresource'] %> - <%- end -%> - <%- if directory['expires_active'] -%> - ExpiresActive <%= directory['expires_active'] %> - <%- end -%> - <%- if directory['expires_default'] -%> - ExpiresDefault <%= directory['expires_default'] %> - <%- end -%> - <%- if directory['expires_by_type'] -%> - <%- Array(directory['expires_by_type']).each do |rule| -%> - ExpiresByType <%= rule %> - <%- end -%> - <%- end -%> - <%- if directory['force_type'] -%> - ForceType <%= directory['force_type'] %> - <%- end -%> - <%- if directory['ssl_options'] -%> - SSLOptions <%= Array(directory['ssl_options']).join(' ') %> - <%- end -%> - <%- if directory['suphp'] and @suphp_engine == 'on' -%> - suPHP_UserGroup <%= directory['suphp']['user'] %> <%= directory['suphp']['group'] %> - <%- end -%> - <%- if directory['fcgiwrapper'] -%> - FcgidWrapper <%= directory['fcgiwrapper']['command'] %> <%= directory['fcgiwrapper']['suffix'] %> <%= directory['fcgiwrapper']['virtual'] %> - <%- end -%> - <%- if directory['custom_fragment'] -%> - <%= directory['custom_fragment'] %> - <%- end -%> - > - <%- end -%> - <%- end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_error_document.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_error_document.erb deleted file mode 100644 index 654e72c676..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_error_document.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% if @error_documents and ! @error_documents.empty? -%> - <%- [@error_documents].flatten.compact.each do |error_document| -%> - <%- if error_document["error_code"] != '' and error_document["document"] != '' -%> - ErrorDocument <%= error_document["error_code"] %> <%= error_document["document"] %> - <%- end -%> - <%- end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_fastcgi.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_fastcgi.erb deleted file mode 100644 index 3a2baa5596..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_fastcgi.erb +++ /dev/null @@ -1,22 +0,0 @@ -<% if @fastcgi_server -%> - - FastCgiExternalServer <%= @fastcgi_server %> -socket <%= @fastcgi_socket %> -<% end -%> -<% if @fastcgi_dir -%> - - "> - Options +ExecCGI - AllowOverride All - SetHandler fastcgi-script - <%- if scope.function_versioncmp([@apache_version, '2.4']) >= 0 -%> - Require all granted - <%- else -%> - Order allow,deny - Allow From All - <%- end -%> - AuthBasicAuthoritative Off - - - AllowEncodedSlashes On - ServerSignature Off -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_header.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_header.erb deleted file mode 100644 index c0f68c8257..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_header.erb +++ /dev/null @@ -1,10 +0,0 @@ -<% if @headers and ! @headers.empty? -%> - - ## Header rules - ## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header - <%- Array(@headers).each do |header_statement| -%> - <%- if header_statement != '' -%> - Header <%= header_statement %> - <%- end -%> - <%- end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_itk.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_itk.erb deleted file mode 100644 index 2971c7a7d0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_itk.erb +++ /dev/null @@ -1,28 +0,0 @@ -<% if @itk and ! @itk.empty? -%> - ## ITK statement - - <%- if @itk["user"] and @itk["group"] -%> - AssignUserId <%= @itk["user"] %> <%= @itk["group"] %> - <%- end -%> - <%- if @itk["assignuseridexpr"] -%> - AssignUserIdExpr <%= @itk["assignuseridexpr"] %> - <%- end -%> - <%- if @itk["assigngroupidexpr"] -%> - AssignGroupIdExpr <%= @itk["assigngroupidexpr"] %> - <%- end -%> - <%- if @itk["maxclientvhost"] -%> - MaxClientsVHost <%= @itk["maxclientvhost"] %> - <%- end -%> - <%- if @itk["nice"] -%> - NiceValue <%= @itk["nice"] %> - <%- end -%> - <%- if @kernelversion >= '3.5.0' -%> - <%- if @itk["limituidrange"] -%> - LimitUIDRange <%= @itk["limituidrange"] %> - <%- end -%> - <%- if @itk["limitgidrange"] -%> - LimitGIDRange <%= @itk["limitgidrange"] %> - <%- end -%> - <%- end -%> - -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_php_admin.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_php_admin.erb deleted file mode 100644 index 59536cbc99..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_php_admin.erb +++ /dev/null @@ -1,12 +0,0 @@ -<% if @php_admin_values and not @php_admin_values.empty? -%> -<% @php_admin_values.each do |key,value| -%> - php_admin_value <%= key %> <%= value %> -<% end -%> -<% end -%> -<% if @php_admin_flags and not @php_admin_flags.empty? -%> -<% @php_admin_flags.each do |key,flag| -%> -<%# normalize flag -%> -<% if flag =~ /true|yes|on|1/i then flag = 'on' else flag = 'off' end -%> - php_admin_flag <%= key %> <%= flag %> -<% end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_proxy.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_proxy.erb deleted file mode 100644 index a1d2e52923..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_proxy.erb +++ /dev/null @@ -1,23 +0,0 @@ -<% if @proxy_dest or @proxy_pass -%> - - ## Proxy rules - ProxyRequests Off -<%- end -%> -<% if @proxy_preserve_host %> - ProxyPreserveHost On -<%- end -%> -<%- [@proxy_pass].flatten.compact.each do |proxy| -%> - ProxyPass <%= proxy['path'] %> <%= proxy['url'] %> - > - ProxyPassReverse <%= proxy['url'] %> - -<% end %> -<% if @proxy_dest -%> -<%- Array(@no_proxy_uris).each do |uri| -%> - ProxyPass <%= uri %> ! -<% end %> - ProxyPass / <%= @proxy_dest %>/ - - ProxyPassReverse <%= @proxy_dest %>/ - -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_rack.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_rack.erb deleted file mode 100644 index 4a5b5f1cdc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_rack.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% if @rack_base_uris -%> - - ## Enable rack -<% Array(@rack_base_uris).each do |uri| -%> - RackBaseURI <%= uri %> -<% end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_redirect.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_redirect.erb deleted file mode 100644 index e865bd9afa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_redirect.erb +++ /dev/null @@ -1,24 +0,0 @@ -<% if @redirect_source and @redirect_dest -%> -<% @redirect_dest_a = Array(@redirect_dest) -%> -<% @redirect_source_a = Array(@redirect_source) -%> -<% @redirect_status_a = Array(@redirect_status) -%> - - ## Redirect rules -<% @redirect_source_a.each_with_index do |source, i| -%> -<% @redirect_dest_a[i] ||= @redirect_dest_a[0] -%> -<% @redirect_status_a[i] ||= @redirect_status_a[0] -%> - Redirect <%= "#{@redirect_status_a[i]} " %><%= source %> <%= @redirect_dest_a[i] %> -<% end -%> -<% end -%> - -<%- if @redirectmatch_status and @redirectmatch_regexp -%> -<% @redirectmatch_status_a = Array(@redirectmatch_status) -%> -<% @redirectmatch_regexp_a = Array(@redirectmatch_regexp) -%> - - ## RedirectMatch rules -<% @redirectmatch_status_a.each_with_index do |status, i| -%> -<% @redirectmatch_status_a[i] ||= @redirectmatch_status_a[0] -%> -<% @redirectmatch_regexp_a[i] ||= @redirectmatch_regexp_a[0] -%> - RedirectMatch <%= "#{@redirectmatch_status_a[i]} " %> <%= @redirectmatch_regexp_a[i] %> -<% end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_requestheader.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_requestheader.erb deleted file mode 100644 index 9f175052b5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_requestheader.erb +++ /dev/null @@ -1,10 +0,0 @@ -<% if @request_headers and ! @request_headers.empty? -%> - - ## Request header rules - ## as per http://httpd.apache.org/docs/2.2/mod/mod_headers.html#requestheader - <%- Array(@request_headers).each do |request_statement| -%> - <%- if request_statement != '' -%> - RequestHeader <%= request_statement %> - <%- end -%> - <%- end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_rewrite.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_rewrite.erb deleted file mode 100644 index af8b45001e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_rewrite.erb +++ /dev/null @@ -1,43 +0,0 @@ -<%- if @rewrites -%> - ## Rewrite rules - RewriteEngine On - <%- if @rewrite_base -%> - RewriteBase <%= @rewrite_base %> - <%- end -%> - - <%- [@rewrites].flatten.compact.each do |rewrite_details| -%> - <%- if rewrite_details['comment'] -%> - #<%= rewrite_details['comment'] %> - <%- end -%> - <%- if rewrite_details['rewrite_base'] -%> - RewriteBase <%= rewrite_details['rewrite_base'] %> - <%- end -%> - <%- if rewrite_details['rewrite_cond'] -%> - <%- Array(rewrite_details['rewrite_cond']).each do |commands| -%> - <%- Array(commands).each do |command| -%> - RewriteCond <%= command %> - <%- end -%> - <%- end -%> - <%- end -%> - <%- Array(rewrite_details['rewrite_rule']).each do |commands| -%> - <%- Array(commands).each do |command| -%> - RewriteRule <%= command %> - <%- end -%> - - <%- end -%> - <%- end -%> -<%- end -%> -<%# reverse compatibility %> -<% if @rewrite_rule and !@rewrites -%> - ## Rewrite rules - RewriteEngine On -<% if @rewrite_base -%> - RewriteBase <%= @rewrite_base %> -<% end -%> -<% if @rewrite_cond -%> -<% Array(@rewrite_cond).each do |cond| -%> - RewriteCond <%= cond %> -<% end -%> -<% end -%> - RewriteRule <%= @rewrite_rule %> -<%- end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_scriptalias.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_scriptalias.erb deleted file mode 100644 index bb4f6b316e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_scriptalias.erb +++ /dev/null @@ -1,24 +0,0 @@ -<%- if @scriptaliases.is_a?(Array) -%> -<%- aliases = @scriptaliases -%> -<%- elsif @scriptaliases.is_a?(Hash) -%> -<%- aliases = [@scriptaliases] -%> -<%- else -%> -<%- # Nothing to do with any other data type -%> -<%- aliases = [] -%> -<%- end -%> -<%- if @scriptalias or !aliases.empty? -%> - ## Script alias directives -<%# Combine scriptalais and scriptaliases into a single data structure -%> -<%# for backward compatibility and ease of implementation -%> -<%- aliases << { 'alias' => '/cgi-bin', 'path' => @scriptalias } if @scriptalias -%> -<%- aliases.flatten.compact! -%> -<%- aliases.each do |salias| -%> - <%- if salias["path"] != '' -%> - <%- if salias["alias"] and salias["alias"] != '' -%> - ScriptAlias <%= salias['alias'] %> "<%= salias['path'] %>" - <%- elsif salias["aliasmatch"] and salias["aliasmatch"] != '' -%> - ScriptAliasMatch <%= salias['aliasmatch'] %> "<%= salias['path'] %>" - <%- end -%> - <%- end -%> -<%- end -%> -<%- end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_serveralias.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_serveralias.erb deleted file mode 100644 index 278b6ddc53..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_serveralias.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% if @serveraliases and ! @serveraliases.empty? -%> - - ## Server aliases -<% Array(@serveraliases).each do |serveralias| -%> - ServerAlias <%= serveralias %> -<% end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_setenv.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_setenv.erb deleted file mode 100644 index d5f9ea8450..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_setenv.erb +++ /dev/null @@ -1,12 +0,0 @@ -<% if @setenv and ! @setenv.empty? -%> - - ## SetEnv/SetEnvIf for environment variables -<% Array(@setenv).each do |envvar| -%> - SetEnv <%= envvar %> -<% end -%> -<% end -%> -<% if @setenvif and ! @setenvif.empty? -%> -<% Array(@setenvif).each do |envifvar| -%> - SetEnvIf <%= envifvar %> -<% end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_ssl.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_ssl.erb deleted file mode 100644 index 03c78ef427..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_ssl.erb +++ /dev/null @@ -1,41 +0,0 @@ -<% if @ssl -%> - - ## SSL directives - SSLEngine on - SSLCertificateFile "<%= @ssl_cert %>" - SSLCertificateKeyFile "<%= @ssl_key %>" -<% if @ssl_chain -%> - SSLCertificateChainFile "<%= @ssl_chain %>" -<% end -%> - SSLCACertificatePath "<%= @ssl_certs_dir %>" -<% if @ssl_ca -%> - SSLCACertificateFile "<%= @ssl_ca %>" -<% end -%> -<% if @ssl_crl_path -%> - SSLCARevocationPath "<%= @ssl_crl_path %>" -<% end -%> -<% if @ssl_crl -%> - SSLCARevocationFile "<%= @ssl_crl %>" -<% end -%> -<% if @ssl_proxyengine -%> - SSLProxyEngine On -<% end -%> -<% if @ssl_protocol -%> - SSLProtocol <%= @ssl_protocol %> -<% end -%> -<% if @ssl_cipher -%> - SSLCipherSuite <%= @ssl_cipher %> -<% end -%> -<% if @ssl_honorcipherorder -%> - SSLHonorCipherOrder <%= @ssl_honorcipherorder %> -<% end -%> -<% if @ssl_verify_client -%> - SSLVerifyClient <%= @ssl_verify_client %> -<% end -%> -<% if @ssl_verify_depth -%> - SSLVerifyDepth <%= @ssl_verify_depth %> -<% end -%> -<% if @ssl_options -%> - SSLOptions <%= Array(@ssl_options).join(' ') %> -<% end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_suexec.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_suexec.erb deleted file mode 100644 index 8a7ae0f17f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_suexec.erb +++ /dev/null @@ -1,4 +0,0 @@ -<% if @suexec_user_group -%> - - SuexecUserGroup <%= @suexec_user_group %> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_suphp.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_suphp.erb deleted file mode 100644 index 9389581805..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_suphp.erb +++ /dev/null @@ -1,11 +0,0 @@ -<% if @suphp_engine == 'on' -%> -<% if @suphp_addhandler -%> - suPHP_AddHandler <%= @suphp_addhandler %> -<% end -%> -<% if @suphp_engine -%> - suPHP_Engine <%= @suphp_engine %> -<% end -%> -<% if @suphp_configpath -%> - suPHP_ConfigPath "<%= @suphp_configpath %>" -<% end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_wsgi.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_wsgi.erb deleted file mode 100644 index 473b223ab6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/templates/vhost/_wsgi.erb +++ /dev/null @@ -1,24 +0,0 @@ -<% if @wsgi_application_group -%> - WSGIApplicationGroup <%= @wsgi_application_group %> -<% end -%> -<% if @wsgi_daemon_process and @wsgi_daemon_process_options -%> - WSGIDaemonProcess <%= @wsgi_daemon_process %> <%= @wsgi_daemon_process_options.collect { |k,v| "#{k}=#{v}"}.sort.join(' ') %> -<% elsif @wsgi_daemon_process and !@wsgi_daemon_process_options -%> - WSGIDaemonProcess <%= @wsgi_daemon_process %> -<% end -%> -<% if @wsgi_import_script and @wsgi_import_script_options -%> - WSGIImportScript <%= @wsgi_import_script %> <%= @wsgi_import_script_options.collect { |k,v| "#{k}=#{v}"}.sort.join(' ') %> -<% end -%> -<% if @wsgi_process_group -%> - WSGIProcessGroup <%= @wsgi_process_group %> -<% end -%> -<% if @wsgi_script_aliases and ! @wsgi_script_aliases.empty? -%> - <%- @wsgi_script_aliases.each do |a, p| -%> - <%- if a != '' and p != ''-%> - WSGIScriptAlias <%= a %> "<%= p %>" - <%- end -%> - <%- end -%> -<% end -%> -<% if @wsgi_pass_authorization -%> - WSGIPassAuthorization <%= @wsgi_pass_authorization %> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/apache.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/apache.pp deleted file mode 100644 index 0d4543564c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/apache.pp +++ /dev/null @@ -1,6 +0,0 @@ -include apache -include apache::mod::php -include apache::mod::cgi -include apache::mod::userdir -include apache::mod::disk_cache -include apache::mod::proxy_http diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/dev.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/dev.pp deleted file mode 100644 index 805ad7e373..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/dev.pp +++ /dev/null @@ -1 +0,0 @@ -include apache::dev diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/init.pp deleted file mode 100644 index b3f9f13aac..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/init.pp +++ /dev/null @@ -1 +0,0 @@ -include apache diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/mod_load_params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/mod_load_params.pp deleted file mode 100644 index 0e84c5efbf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/mod_load_params.pp +++ /dev/null @@ -1,11 +0,0 @@ -# Tests the path and identifier parameters for the apache::mod class - -# Base class for clarity: -class { 'apache': } - - -# Exaple parameter usage: -apache::mod { 'testmod': - path => '/usr/some/path/mod_testmod.so', - id => 'testmod_custom_name', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/mods.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/mods.pp deleted file mode 100644 index 59362bd9a0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/mods.pp +++ /dev/null @@ -1,9 +0,0 @@ -## Default mods - -# Base class. Declares default vhost on port 80 and default ssl -# vhost on port 443 listening on all interfaces and serving -# $apache::docroot, and declaring our default set of modules. -class { 'apache': - default_mods => true, -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/mods_custom.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/mods_custom.pp deleted file mode 100644 index 0ae699c73d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/mods_custom.pp +++ /dev/null @@ -1,16 +0,0 @@ -## custom mods - -# Base class. Declares default vhost on port 80 and default ssl -# vhost on port 443 listening on all interfaces and serving -# $apache::docroot, and declaring a custom set of modules. -class { 'apache': - default_mods => [ - 'info', - 'alias', - 'mime', - 'env', - 'setenv', - 'expires', - ], -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/php.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/php.pp deleted file mode 100644 index 1d926bfb46..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/php.pp +++ /dev/null @@ -1,4 +0,0 @@ -class { 'apache': - mpm_module => 'prefork', -} -include apache::mod::php diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost.pp deleted file mode 100644 index a6c61360a7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost.pp +++ /dev/null @@ -1,238 +0,0 @@ -## Default vhosts, and custom vhosts -# NB: Please see the other vhost_*.pp example files for further -# examples. - -# Base class. Declares default vhost on port 80 and default ssl -# vhost on port 443 listening on all interfaces and serving -# $apache::docroot -class { 'apache': } - -# Most basic vhost -apache::vhost { 'first.example.com': - port => '80', - docroot => '/var/www/first', -} - -# Vhost with different docroot owner/group/mode -apache::vhost { 'second.example.com': - port => '80', - docroot => '/var/www/second', - docroot_owner => 'third', - docroot_group => 'third', - docroot_mode => '0770', -} - -# Vhost with serveradmin -apache::vhost { 'third.example.com': - port => '80', - docroot => '/var/www/third', - serveradmin => 'admin@example.com', -} - -# Vhost with ssl (uses default ssl certs) -apache::vhost { 'ssl.example.com': - port => '443', - docroot => '/var/www/ssl', - ssl => true, -} - -# Vhost with ssl and specific ssl certs -apache::vhost { 'fourth.example.com': - port => '443', - docroot => '/var/www/fourth', - ssl => true, - ssl_cert => '/etc/ssl/fourth.example.com.cert', - ssl_key => '/etc/ssl/fourth.example.com.key', -} - -# Vhost with english title and servername parameter -apache::vhost { 'The fifth vhost': - servername => 'fifth.example.com', - port => '80', - docroot => '/var/www/fifth', -} - -# Vhost with server aliases -apache::vhost { 'sixth.example.com': - serveraliases => [ - 'sixth.example.org', - 'sixth.example.net', - ], - port => '80', - docroot => '/var/www/fifth', -} - -# Vhost with alternate options -apache::vhost { 'seventh.example.com': - port => '80', - docroot => '/var/www/seventh', - options => [ - 'Indexes', - 'MultiViews', - ], -} - -# Vhost with AllowOverride for .htaccess -apache::vhost { 'eighth.example.com': - port => '80', - docroot => '/var/www/eighth', - override => 'All', -} - -# Vhost with access and error logs disabled -apache::vhost { 'ninth.example.com': - port => '80', - docroot => '/var/www/ninth', - access_log => false, - error_log => false, -} - -# Vhost with custom access and error logs and logroot -apache::vhost { 'tenth.example.com': - port => '80', - docroot => '/var/www/tenth', - access_log_file => 'tenth_vhost.log', - error_log_file => 'tenth_vhost_error.log', - logroot => '/var/log', -} - -# Vhost with a cgi-bin -apache::vhost { 'eleventh.example.com': - port => '80', - docroot => '/var/www/eleventh', - scriptalias => '/usr/lib/cgi-bin', -} - -# Vhost with a proxypass configuration -apache::vhost { 'twelfth.example.com': - port => '80', - docroot => '/var/www/twelfth', - proxy_dest => 'http://internal.example.com:8080/twelfth', - no_proxy_uris => ['/login','/logout'], -} - -# Vhost to redirect /login and /logout -apache::vhost { 'thirteenth.example.com': - port => '80', - docroot => '/var/www/thirteenth', - redirect_source => [ - '/login', - '/logout', - ], - redirect_dest => [ - 'http://10.0.0.10/login', - 'http://10.0.0.10/logout', - ], -} - -# Vhost to permamently redirect -apache::vhost { 'fourteenth.example.com': - port => '80', - docroot => '/var/www/fourteenth', - redirect_source => '/blog', - redirect_dest => 'http://blog.example.com', - redirect_status => 'permanent', -} - -# Vhost with a rack configuration -apache::vhost { 'fifteenth.example.com': - port => '80', - docroot => '/var/www/fifteenth', - rack_base_uris => ['/rackapp1', '/rackapp2'], -} - -# Vhost to redirect non-ssl to ssl -apache::vhost { 'sixteenth.example.com non-ssl': - servername => 'sixteenth.example.com', - port => '80', - docroot => '/var/www/sixteenth', - rewrites => [ - { - comment => 'redirect non-SSL traffic to SSL site', - rewrite_cond => ['%{HTTPS} off'], - rewrite_rule => ['(.*) https://%{HTTPS_HOST}%{REQUEST_URI}'], - } - ] -} -apache::vhost { 'sixteenth.example.com ssl': - servername => 'sixteenth.example.com', - port => '443', - docroot => '/var/www/sixteenth', - ssl => true, -} - -# Vhost to redirect non-ssl to ssl using old rewrite method -apache::vhost { 'sixteenth.example.com non-ssl old rewrite': - servername => 'sixteenth.example.com', - port => '80', - docroot => '/var/www/sixteenth', - rewrite_cond => '%{HTTPS} off', - rewrite_rule => '(.*) https://%{HTTPS_HOST}%{REQUEST_URI}', -} -apache::vhost { 'sixteenth.example.com ssl old rewrite': - servername => 'sixteenth.example.com', - port => '443', - docroot => '/var/www/sixteenth', - ssl => true, -} - -# Vhost to block repository files -apache::vhost { 'seventeenth.example.com': - port => '80', - docroot => '/var/www/seventeenth', - block => 'scm', -} - -# Vhost with special environment variables -apache::vhost { 'eighteenth.example.com': - port => '80', - docroot => '/var/www/eighteenth', - setenv => ['SPECIAL_PATH /foo/bin','KILROY was_here'], -} - -apache::vhost { 'nineteenth.example.com': - port => '80', - docroot => '/var/www/nineteenth', - setenvif => 'Host "^([^\.]*)\.website\.com$" CLIENT_NAME=$1', -} - -# Vhost with additional include files -apache::vhost { 'twentyieth.example.com': - port => '80', - docroot => '/var/www/twelfth', - additional_includes => ['/tmp/proxy_group_a','/tmp/proxy_group_b'], -} - -# Vhost with alias for subdomain mapped to same named directory -# http://example.com.loc => /var/www/example.com -apache::vhost { 'subdomain.loc': - vhost_name => '*', - port => '80', - virtual_docroot => '/var/www/%-2+', - docroot => '/var/www', - serveraliases => ['*.loc',], -} - -# Vhost with SSLProtocol,SSLCipherSuite, SSLHonorCipherOrder -apache::vhost { 'securedomain.com': - priority => '10', - vhost_name => 'www.securedomain.com', - port => '443', - docroot => '/var/www/secure', - ssl => true, - ssl_cert => '/etc/ssl/securedomain.cert', - ssl_key => '/etc/ssl/securedomain.key', - ssl_chain => '/etc/ssl/securedomain.crt', - ssl_protocol => '-ALL +SSLv3 +TLSv1', - ssl_cipher => 'ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM', - ssl_honorcipherorder => 'On', - add_listen => false, -} - -# Vhost with access log environment variables writing control -apache::vhost { 'twentyfirst.example.com': - port => '80', - docroot => '/var/www/twentyfirst', - access_log_env_var => 'admin', -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost_directories.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost_directories.pp deleted file mode 100644 index b8953ee321..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost_directories.pp +++ /dev/null @@ -1,44 +0,0 @@ -# Base class. Declares default vhost on port 80 and default ssl -# vhost on port 443 listening on all interfaces and serving -# $apache::docroot -class { 'apache': } - -# Example from README adapted. -apache::vhost { 'readme.example.net': - docroot => '/var/www/readme', - directories => [ - { - 'path' => '/var/www/readme', - 'ServerTokens' => 'prod' , - }, - { - 'path' => '/usr/share/empty', - 'allow' => 'from all', - }, - ], -} - -# location test -apache::vhost { 'location.example.net': - docroot => '/var/www/location', - directories => [ - { - 'path' => '/location', - 'provider' => 'location', - 'ServerTokens' => 'prod' - }, - ], -} - -# files test, curedly disable access to accidental backup files. -apache::vhost { 'files.example.net': - docroot => '/var/www/files', - directories => [ - { - 'path' => '(\.swp|\.bak|~)$', - 'provider' => 'filesmatch', - 'deny' => 'from all' - }, - ], -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost_ip_based.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost_ip_based.pp deleted file mode 100644 index dc0fa4f33b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost_ip_based.pp +++ /dev/null @@ -1,25 +0,0 @@ -## IP-based vhosts on any listen port -# IP-based vhosts respond to requests on specific IP addresses. - -# Base class. Turn off the default vhosts; we will be declaring -# all vhosts below. -class { 'apache': - default_vhost => false, -} - -# Listen on port 80 and 81; required because the following vhosts -# are not declared with a port parameter. -apache::listen { '80': } -apache::listen { '81': } - -# IP-based vhosts -apache::vhost { 'first.example.com': - ip => '10.0.0.10', - docroot => '/var/www/first', - ip_based => true, -} -apache::vhost { 'second.example.com': - ip => '10.0.0.11', - docroot => '/var/www/second', - ip_based => true, -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost_ssl.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost_ssl.pp deleted file mode 100644 index 8e7a2b279e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhost_ssl.pp +++ /dev/null @@ -1,23 +0,0 @@ -## SSL-enabled vhosts -# SSL-enabled vhosts respond only to HTTPS queries. - -# Base class. Turn off the default vhosts; we will be declaring -# all vhosts below. -class { 'apache': - default_vhost => false, -} - -# Non-ssl vhost -apache::vhost { 'first.example.com non-ssl': - servername => 'first.example.com', - port => '80', - docroot => '/var/www/first', -} - -# SSL vhost at the same domain -apache::vhost { 'first.example.com ssl': - servername => 'first.example.com', - port => '443', - docroot => '/var/www/first', - ssl => true, -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhosts_without_listen.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhosts_without_listen.pp deleted file mode 100644 index e7d6cc036c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apache/tests/vhosts_without_listen.pp +++ /dev/null @@ -1,53 +0,0 @@ -## Declare ip-based and name-based vhosts -# Mixing Name-based vhost with IP-specific vhosts requires `add_listen => -# 'false'` on the non-IP vhosts - -# Base class. Turn off the default vhosts; we will be declaring -# all vhosts below. -class { 'apache': - default_vhost => false, -} - - -# Add two an IP-based vhost on 10.0.0.10, ssl and non-ssl -apache::vhost { 'The first IP-based vhost, non-ssl': - servername => 'first.example.com', - ip => '10.0.0.10', - port => '80', - ip_based => true, - docroot => '/var/www/first', -} -apache::vhost { 'The first IP-based vhost, ssl': - servername => 'first.example.com', - ip => '10.0.0.10', - port => '443', - ip_based => true, - docroot => '/var/www/first-ssl', - ssl => true, -} - -# Two name-based vhost listening on 10.0.0.20 -apache::vhost { 'second.example.com': - ip => '10.0.0.20', - port => '80', - docroot => '/var/www/second', -} -apache::vhost { 'third.example.com': - ip => '10.0.0.20', - port => '80', - docroot => '/var/www/third', -} - -# Two name-based vhosts without IPs specified, so that they will answer on either 10.0.0.10 or 10.0.0.20 . It is requried to declare -# `add_listen => 'false'` to disable declaring "Listen 80" which will conflict -# with the IP-based preceeding vhosts. -apache::vhost { 'fourth.example.com': - port => '80', - docroot => '/var/www/fourth', - add_listen => false, -} -apache::vhost { 'fifth.example.com': - port => '80', - docroot => '/var/www/fifth', - add_listen => false, -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.fixtures.yml deleted file mode 100644 index 2bb941de23..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.fixtures.yml +++ /dev/null @@ -1,7 +0,0 @@ -fixtures: - repositories: - "stdlib": - "repo": "git://github.com/puppetlabs/puppetlabs-stdlib.git" - "ref": "v2.2.1" - symlinks: - "apt": "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.project b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.project deleted file mode 100644 index 6523c6dafa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - apt - - - - - - org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - - org.cloudsmith.geppetto.pp.dsl.ui.puppetNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.puppet-lint.rc b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.puppet-lint.rc deleted file mode 100644 index f4abb47dc5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.puppet-lint.rc +++ /dev/null @@ -1 +0,0 @@ ---no-single_quote_string_with_variables-check diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.travis.yml deleted file mode 100644 index 582efdf70a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -branches: - only: - - master -language: ruby -bundler_args: --without development -script: bundle exec rake spec SPEC_OPTS='--format documentation' -after_success: - - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-release - - .forge-release/publish -rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 -env: - matrix: - - PUPPET_GEM_VERSION="~> 2.7.0" - - PUPPET_GEM_VERSION="~> 3.0.0" - - PUPPET_GEM_VERSION="~> 3.1.0" - - PUPPET_GEM_VERSION="~> 3.2.0" - global: - - PUBLISHER_LOGIN=puppetlabs - - secure: |- - ipB/CV1rVSTXU9ZDuzrFOlzJrRmJob36tKns2xszuH4r9s5P9qivNAngRGdV - msb69xvOlzQykM0WRF+4kJ6TZ7AbMiDI+VZ8GDtsRaU5/q3BpsvFe8aato+6 - QeyFtBG62OsosTEhGws4mqiFsPDu3dHlakuJc9zevlTuhNwbKSs= -matrix: - fast_finish: true - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 3.0.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 3.1.0" - - rvm: 1.8.7 - env: PUPPET_GEM_VERSION="~> 3.2.0" -notifications: - email: false diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/CHANGELOG.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/CHANGELOG.md deleted file mode 100644 index 10503c9144..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/CHANGELOG.md +++ /dev/null @@ -1,222 +0,0 @@ -##2014-03-04 - Supported Release 1.4.2 -###Summary - -This is a supported release. This release tidies up 1.4.1 and re-enables -support for Ubuntu 10.04 - -####Features - -####Bugfixes -- Fix apt:ppa to include the -y Ubuntu 10.04 requires. -- Documentation changes. -- Test fixups. - -####Known Bugs - -* No known issues. - - - -##2014-02-13 1.4.1 -###Summary -This is a bugfix release. - -####Bugfixes -- Fix apt::force unable to upgrade packages from releases other than its original -- Removed a few refeneces to aptitude instead of apt-get for portability -- Removed call to getparam() due to stdlib dependency -- Correct apt::source template when architecture is provided -- Retry package installs if apt is locked -- Use root to exec in apt::ppa -- Updated tests and converted acceptance tests to beaker - -##2013-10-08 - Release 1.4.0 - -###Summary - -Minor bugfix and allow the timeout to be adjusted. - -####Features -- Add an `updates_timeout` to apt::params - -####Bugfixes -- Ensure apt::ppa can read a ppa removed by hand. - - -##2013-10-08 - Release 1.3.0 -###Summary - -This major feature in this release is the new apt::unattended_upgrades class, -allowing you to handle Ubuntu's unattended feature. This allows you to select -specific packages to automatically upgrade without any further user -involvement. - -In addition we extend our Wheezy support, add proxy support to apt:ppa and do -various cleanups and tweaks. - -####Features -- Add apt::unattended_upgrades support for Ubuntu. -- Add wheezy backports support. -- Use the geoDNS http.debian.net instead of the main debian ftp server. -- Add `options` parameter to apt::ppa in order to pass options to apt-add-repository command. -- Add proxy support for apt::ppa (uses proxy_host and proxy_port from apt). - -####Bugfixes -- Fix regsubst() calls to quote single letters (for future parser). -- Fix lint warnings and other misc cleanup. - - -##2013-07-03 - Release 1.2.0 - -####Features -- Add geppetto `.project` natures -- Add GH auto-release -- Add `apt::key::key_options` parameter -- Add complex pin support using distribution properties for `apt::pin` via new properties: - - `apt::pin::codename` - - `apt::pin::release_version` - - `apt::pin::component` - - `apt::pin::originator` - - `apt::pin::label` -- Add source architecture support to `apt::source::architecture` - -####Bugfixes -- Use apt-get instead of aptitude in apt::force -- Update default backports location -- Add dependency for required packages before apt-get update - - -##2013-06-02 - Release 1.1.1 -###Summary - -This is a bug fix release that resolves a number of issues: - -* By changing template variable usage, we remove the deprecation warnings - for Puppet 3.2.x -* Fixed proxy file removal, when proxy absent - -Some documentation, style and whitespaces changes were also merged. This -release also introduced proper rspec-puppet unit testing on Travis-CI to help -reduce regression. - -Thanks to all the community contributors below that made this patch possible. - -#### Detail Changes - -* fix minor comment type (Chris Rutter) -* whitespace fixes (Michael Moll) -* Update travis config file (William Van Hevelingen) -* Build all branches on travis (William Van Hevelingen) -* Standardize travis.yml on pattern introduced in stdlib (William Van Hevelingen) -* Updated content to conform to README best practices template (Lauren Rother) -* Fix apt::release example in readme (Brian Galey) -* add @ to variables in template (Peter Hoeg) -* Remove deprecation warnings for pin.pref.erb as well (Ken Barber) -* Update travis.yml to latest versions of puppet (Ken Barber) -* Fix proxy file removal (Scott Barber) -* Add spec test for removing proxy configuration (Dean Reilly) -* Fix apt::key listing longer than 8 chars (Benjamin Knofe) - - - - -## Release 1.1.0 -###Summary - -This release includes Ubuntu 12.10 (Quantal) support for PPAs. - ---- - -##2012-05-25 - Puppet Labs - Release 0.0.4 -###Summary - - * Fix ppa list filename when there is a period in the PPA name - * Add .pref extension to apt preferences files - * Allow preferences to be purged - * Extend pin support - - -##2012-05-04 - Puppet Labs - Release 0.0.3 -###Summary - - * only invoke apt-get update once - * only install python-software-properties if a ppa is added - * support 'ensure => absent' for all defined types - * add apt::conf - * add apt::backports - * fixed Modulefile for module tool dependency resolution - * configure proxy before doing apt-get update - * use apt-get update instead of aptitude for apt::ppa - * add support to pin release - - -##2012-03-26 - Puppet Labs - Release 0.0.2 -###Summary - -* 41cedbb (#13261) Add real examples to smoke tests. -* d159a78 (#13261) Add key.pp smoke test -* 7116c7a (#13261) Replace foo source with puppetlabs source -* 1ead0bf Ignore pkg directory. -* 9c13872 (#13289) Fix some more style violations -* 0ea4ffa (#13289) Change test scaffolding to use a module & manifest dir fixture path -* a758247 (#13289) Clean up style violations and fix corresponding tests -* 99c3fd3 (#13289) Add puppet lint tests to Rakefile -* 5148cbf (#13125) Apt keys should be case insensitive -* b9607a4 Convert apt::key to use anchors - - -##2012-03-07 - Puppet Labs - Release 0.0.1 -###Summary - -* d4fec56 Modify apt::source release parameter test -* 1132a07 (#12917) Add contributors to README -* 8cdaf85 (#12823) Add apt::key defined type and modify apt::source to use it -* 7c0d10b (#12809) $release should use $lsbdistcodename and fall back to manual input -* be2cc3e (#12522) Adjust spec test for splitting purge -* 7dc60ae (#12522) Split purge option to spare sources.list -* 9059c4e Fix source specs to test all key permutations -* 8acb202 Add test for python-software-properties package -* a4af11f Check if python-software-properties is defined before attempting to define it. -* 1dcbf3d Add tests for required_packages change -* f3735d2 Allow duplicate $required_packages -* 74c8371 (#12430) Add tests for changes to apt module -* 97ebb2d Test two sources with the same key -* 1160bcd (#12526) Add ability to reverse apt { disable_keys => true } -* 2842d73 Add Modulefile to puppet-apt -* c657742 Allow the use of the same key in multiple sources -* 8c27963 (#12522) Adding purge option to apt class -* 997c9fd (#12529) Add unit test for apt proxy settings -* 50f3cca (#12529) Add parameter to support setting a proxy for apt -* d522877 (#12094) Replace chained .with_* with a hash -* 8cf1bd0 (#12094) Remove deprecated spec.opts file -* 2d688f4 (#12094) Add rspec-puppet tests for apt -* 0fb5f78 (#12094) Replace name with path in file resources -* f759bc0 (#11953) Apt::force passes $version to aptitude -* f71db53 (#11413) Add spec test for apt::force to verify changes to unless -* 2f5d317 (#11413) Update dpkg query used by apt::force -* cf6caa1 (#10451) Add test coverage to apt::ppa -* 0dd697d include_src parameter in example; Whitespace cleanup -* b662eb8 fix typos in "repositories" -* 1be7457 Fix (#10451) - apt::ppa fails to "apt-get update" when new PPA source is added -* 864302a Set the pin priority before adding the source (Fix #10449) -* 1de4e0a Refactored as per mlitteken -* 1af9a13 Added some crazy bash madness to check if the ppa is installed already. Otherwise the manifest tries to add it on every run! -* 52ca73e (#8720) Replace Apt::Ppa with Apt::Builddep -* 5c05fa0 added builddep command. -* a11af50 added the ability to specify the content of a key -* c42db0f Fixes ppa test. -* 77d2b0d reformatted whitespace to match recommended style of 2 space indentation. -* 27ebdfc ignore swap files. -* 377d58a added smoke tests for module. -* 18f614b reformatted apt::ppa according to recommended style. -* d8a1e4e Created a params class to hold global data. -* 636ae85 Added two params for apt class -* 148fc73 Update LICENSE. -* ed2d19e Support ability to add more than one PPA -* 420d537 Add call to apt-update after add-apt-repository in apt::ppa -* 945be77 Add package definition for python-software-properties -* 71fc425 Abs paths for all commands -* 9d51cd1 Adding LICENSE -* 71796e3 Heading fix in README -* 87777d8 Typo in README -* f848bac First commit diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/Gemfile deleted file mode 100644 index 1e359d07b5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/Gemfile +++ /dev/null @@ -1,18 +0,0 @@ -source ENV['GEM_SOURCE'] || 'https://rubygems.org' - -group :development, :test do - gem 'rake', :require => false - gem 'pry', :require => false - gem 'rspec-puppet', :require => false - gem 'puppet-lint', :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'serverspec', :require => false - gem 'beaker', :require => false - gem 'beaker-rspec', :require => false -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/LICENSE deleted file mode 100644 index 30ce036d5e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/LICENSE +++ /dev/null @@ -1,34 +0,0 @@ -Copyright (c) 2011 Evolving Web Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -Copyright 2014 Puppet Labs - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/Modulefile deleted file mode 100644 index 40a87f4ef3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/Modulefile +++ /dev/null @@ -1,14 +0,0 @@ -name 'puppetlabs-apt' -version '1.4.2' -source 'https://github.com/puppetlabs/puppetlabs-apt' -author 'Evolving Web / Puppet Labs' -license 'Apache License 2.0' -summary 'Puppet Labs Apt Module' -description 'APT Module for Puppet' -project_page 'https://github.com/puppetlabs/puppetlabs-apt' - -## Add dependencies, if any: -#dependency 'puppetlabs/stdlib', '2.x' -# The dependency should be written as above but librarian-puppet -# does not support the expression as the PMT does. -dependency 'puppetlabs/stdlib', '>= 2.2.1' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/README.md deleted file mode 100644 index ec8b4c5e49..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/README.md +++ /dev/null @@ -1,236 +0,0 @@ -apt -=== - -[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-apt.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-apt) - -## Description - -Provides helpful definitions for dealing with Apt. - -======= - -Overview --------- - -The APT module provides a simple interface for managing APT source, key, and definitions with Puppet. - -Module Description ------------------- - -APT automates obtaining and installing software packages on \*nix systems. - -Setup ------ - -**What APT affects:** - -* package/service/configuration files for APT -* your system's `sources.list` file and `sources.list.d` directory - * NOTE: Setting the `purge_sources_list` and `purge_sources_list_d` parameters to 'true' will destroy any existing content that was not declared with Puppet. The default for these parameters is 'false'. -* system repositories -* authentication keys -* wget (optional) - -### Beginning with APT - -To begin using the APT module with default parameters, declare the class - - include apt - -Puppet code that uses anything from the APT module requires that the core apt class be declared/\s\+$//e - -Usage ------ - -Using the APT module consists predominantly in declaring classes that provide desired functionality and features. - -### apt - -`apt` provides a number of common resources and options that are shared by the various defined types in this module, so you MUST always include this class in your manifests. - -The parameters for `apt` are not required in general and are predominantly for development environment use-cases. - - class { 'apt': - always_apt_update => false, - disable_keys => undef, - proxy_host => false, - proxy_port => '8080', - purge_sources_list => false, - purge_sources_list_d => false, - purge_preferences_d => false, - update_timeout => undef - } - -Puppet will manage your system's `sources.list` file and `sources.list.d` directory but will do its best to respect existing content. - -If you declare your apt class with `purge_sources_list` and `purge_sources_list_d` set to 'true', Puppet will unapologetically purge any existing content it finds that wasn't declared with Puppet. - -### apt::builddep - -Installs the build depends of a specified package. - - apt::builddep { 'glusterfs-server': } - -### apt::force - -Forces a package to be installed from a specific release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu. - - apt::force { 'glusterfs-server': - release => 'unstable', - version => '3.0.3', - require => Apt::Source['debian_unstable'], - } - -### apt::key - -Adds a key to the list of keys used by APT to authenticate packages. - - apt::key { 'puppetlabs': - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - - apt::key { 'jenkins': - key => 'D50582E6', - key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key', - } - -Note that use of `key_source` requires wget to be installed and working. - -### apt::pin - -Adds an apt pin for a certain release. - - apt::pin { 'karmic': priority => 700 } - apt::pin { 'karmic-updates': priority => 700 } - apt::pin { 'karmic-security': priority => 700 } - -Note you can also specifying more complex pins using distribution properties. - - apt::pin { 'stable': - priority => -10, - originator => 'Debian', - release_version => '3.0', - component => 'main', - label => 'Debian' - } - -### apt::ppa - -Adds a ppa repository using `add-apt-repository`. - - apt::ppa { 'ppa:drizzle-developers/ppa': } - -### apt::release - -Sets the default apt release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu. - - class { 'apt::release': - release_id => 'precise', - } - -### apt::source - -Adds an apt source to `/etc/apt/sources.list.d/`. - - apt::source { 'debian_unstable': - location => 'http://debian.mirror.iweb.ca/debian/', - release => 'unstable', - repos => 'main contrib non-free', - required_packages => 'debian-keyring debian-archive-keyring', - key => '46925553', - key_server => 'subkeys.pgp.net', - pin => '-10', - include_src => true - } - -If you would like to configure your system so the source is the Puppet Labs APT repository - - apt::source { 'puppetlabs': - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - -### Testing - -The APT module is mostly a collection of defined resource types, which provide reusable logic that can be leveraged to manage APT. It does provide smoke tests for testing functionality on a target system, as well as spec tests for checking a compiled catalog against an expected set of resources. - -#### Example Test - -This test will set up a Puppet Labs apt repository. Start by creating a new smoke test in the apt module's test folder. Call it puppetlabs-apt.pp. Inside, declare a single resource representing the Puppet Labs APT source and gpg key - - apt::source { 'puppetlabs': - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - -This resource creates an apt source named puppetlabs and gives Puppet information about the repository's location and key used to sign its packages. Puppet leverages Facter to determine the appropriate release, but you can set it directly by adding the release type. - -Check your smoke test for syntax errors - - $ puppet parser validate tests/puppetlabs-apt.pp - -If you receive no output from that command, it means nothing is wrong. Then apply the code - - $ puppet apply --verbose tests/puppetlabs-apt.pp - notice: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]/ensure: defined content as '{md5}3be1da4923fb910f1102a233b77e982e' - info: /Stage[main]//Apt::Source[puppetlabs]/File[puppetlabs.list]: Scheduling refresh of Exec[puppetlabs apt update] - notice: /Stage[main]//Apt::Source[puppetlabs]/Exec[puppetlabs apt update]: Triggered 'refresh' from 1 events> - -The above example used a smoke test to easily lay out a resource declaration and apply it on your system. In production, you may want to declare your APT sources inside the classes where they’re needed. - -Implementation --------------- - -### apt::backports - -Adds the necessary components to get backports for Ubuntu and Debian. The release name defaults to `$lsbdistcodename`. Setting this manually can cause undefined behavior (read: universe exploding). - -Limitations ------------ - -This module should work across all versions of Debian/Ubuntu and support all major APT repository management features. - -Development ------------- - -Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve. - -We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. - -You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) - -License -------- - -The original code for this module comes from Evolving Web and was licensed under the MIT license. Code added since the fork of this module is licensed under the Apache 2.0 License like the rest of the Puppet Labs products. - -The LICENSE contains both licenses. - -Contributors ------------- - -A lot of great people have contributed to this module. A somewhat current list follows: - -* Ben Godfrey -* Branan Purvine-Riley -* Christian G. Warden -* Dan Bode -* Garrett Honeycutt -* Jeff Wallace -* Ken Barber -* Matthaus Litteken -* Matthias Pigulla -* Monty Taylor -* Peter Drake -* Reid Vandewiele -* Robert Navarro -* Ryan Coleman -* Scott McLeod -* Spencer Krum -* William Van Hevelingen -* Zach Leslie diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/Rakefile deleted file mode 100644 index 6d067dc56c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/Rakefile +++ /dev/null @@ -1,4 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' - -PuppetLint.configuration.send('disable_single_quote_string_with_variables') diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/backports.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/backports.pp deleted file mode 100644 index 9cfa1c0113..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/backports.pp +++ /dev/null @@ -1,48 +0,0 @@ -# This adds the necessary components to get backports for ubuntu and debian -# -# == Parameters -# -# [*release*] -# The ubuntu/debian release name. Defaults to $lsbdistcodename. Setting this -# manually can cause undefined behavior. (Read: universe exploding) -# -# == Examples -# -# include apt::backports -# -# class { 'apt::backports': -# release => 'natty', -# } -# -# == Authors -# -# Ben Hughes, I think. At least blame him if this goes wrong. -# I just added puppet doc. -# -# == Copyright -# -# Copyright 2011 Puppet Labs Inc, unless otherwise noted. -class apt::backports( - $release = $::lsbdistcodename, - $location = $apt::params::backports_location -) inherits apt::params { - - $release_real = downcase($release) - $key = $::lsbdistid ? { - 'debian' => '46925553', - 'ubuntu' => '437D05B5', - } - $repos = $::lsbdistid ? { - 'debian' => 'main contrib non-free', - 'ubuntu' => 'main universe multiverse restricted', - } - - apt::source { 'backports': - location => $location, - release => "${release_real}-backports", - repos => $repos, - key => $key, - key_server => 'pgp.mit.edu', - pin => '200', - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/builddep.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/builddep.pp deleted file mode 100644 index 3294f71339..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/builddep.pp +++ /dev/null @@ -1,16 +0,0 @@ -# builddep.pp - -define apt::builddep() { - include apt::update - - exec { "apt-builddep-${name}": - command => "/usr/bin/apt-get -y --force-yes build-dep ${name}", - logoutput => 'on_failure', - notify => Exec['apt_update'], - } - - # Need anchor to provide containment for dependencies. - anchor { "apt::builddep::${name}": - require => Class['apt::update'], - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/conf.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/conf.pp deleted file mode 100644 index 3c4cb1975c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/conf.pp +++ /dev/null @@ -1,18 +0,0 @@ -define apt::conf ( - $content, - $ensure = present, - $priority = '50' -) { - - include apt::params - - $apt_conf_d = $apt::params::apt_conf_d - - file { "${apt_conf_d}/${priority}${name}": - ensure => $ensure, - content => $content, - owner => root, - group => root, - mode => '0644', - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/debian/testing.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/debian/testing.pp deleted file mode 100644 index 3a82b4f7fd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/debian/testing.pp +++ /dev/null @@ -1,21 +0,0 @@ -# testing.pp - -class apt::debian::testing { - include apt - - # deb http://debian.mirror.iweb.ca/debian/ testing main contrib non-free - # deb-src http://debian.mirror.iweb.ca/debian/ testing main contrib non-free - # Key: 46925553 Server: subkeys.pgp.net - # debian-keyring - # debian-archive-keyring - - apt::source { 'debian_testing': - location => 'http://debian.mirror.iweb.ca/debian/', - release => 'testing', - repos => 'main contrib non-free', - required_packages => 'debian-keyring debian-archive-keyring', - key => '46925553', - key_server => 'subkeys.pgp.net', - pin => '-10', - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/debian/unstable.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/debian/unstable.pp deleted file mode 100644 index 77df94b0af..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/debian/unstable.pp +++ /dev/null @@ -1,21 +0,0 @@ -# unstable.pp - -class apt::debian::unstable { - include apt - - # deb http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free - # deb-src http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free - # Key: 46925553 Server: subkeys.pgp.net - # debian-keyring - # debian-archive-keyring - - apt::source { 'debian_unstable': - location => 'http://debian.mirror.iweb.ca/debian/', - release => 'unstable', - repos => 'main contrib non-free', - required_packages => 'debian-keyring debian-archive-keyring', - key => '46925553', - key_server => 'subkeys.pgp.net', - pin => '-10', - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/force.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/force.pp deleted file mode 100644 index 70b7d47239..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/force.pp +++ /dev/null @@ -1,42 +0,0 @@ -# force.pp -# force a package from a specific release - -define apt::force( - $release = 'testing', - $version = false, - $timeout = 300 -) { - - $provider = $apt::params::provider - - $version_string = $version ? { - false => undef, - default => "=${version}", - } - - $release_string = $release ? { - false => undef, - default => "-t ${release}", - } - - if $version == false { - if $release == false { - $install_check = "/usr/bin/dpkg -s ${name} | grep -q 'Status: install'" - } else { - # If installed version and candidate version differ, this check returns 1 (false). - $install_check = "/usr/bin/test \$(/usr/bin/apt-cache policy -t ${release} ${name} | /bin/grep -E 'Installed|Candidate' | /usr/bin/uniq -s 14 | /usr/bin/wc -l) -eq 1" - } - } else { - if $release == false { - $install_check = "/usr/bin/dpkg -s ${name} | grep -q 'Version: ${version}'" - } else { - $install_check = "/usr/bin/apt-cache policy -t ${release} ${name} | /bin/grep -q 'Installed: ${version}'" - } - } - - exec { "${provider} -y ${release_string} install ${name}${version_string}": - unless => $install_check, - logoutput => 'on_failure', - timeout => $timeout, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/init.pp deleted file mode 100644 index 364ce8cb4e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/init.pp +++ /dev/null @@ -1,121 +0,0 @@ -# Class: apt -# -# This module manages the initial configuration of apt. -# -# Parameters: -# The parameters listed here are not required in general and were -# added for use cases related to development environments. -# disable_keys - disables the requirement for all packages to be signed -# always_apt_update - rather apt should be updated on every run (intended -# for development environments where package updates are frequent) -# purge_sources_list - Accepts true or false. Defaults to false If set to -# true, Puppet will purge all unmanaged entries from sources.list -# purge_sources_list_d - Accepts true or false. Defaults to false. If set -# to true, Puppet will purge all unmanaged entries from sources.list.d -# update_timeout - Overrides the exec timeout in seconds for apt-get update. -# If not set defaults to Exec's default (300) -# -# Actions: -# -# Requires: -# puppetlabs/stdlib -# Sample Usage: -# class { 'apt': } - -class apt( - $always_apt_update = false, - $disable_keys = undef, - $proxy_host = undef, - $proxy_port = '8080', - $purge_sources_list = false, - $purge_sources_list_d = false, - $purge_preferences_d = false, - $update_timeout = undef -) { - - include apt::params - include apt::update - - validate_bool($purge_sources_list, $purge_sources_list_d, $purge_preferences_d) - - $sources_list_content = $purge_sources_list ? { - false => undef, - true => "# Repos managed by puppet.\n", - } - - if $always_apt_update == true { - Exec <| title=='apt_update' |> { - refreshonly => false, - } - } - - $root = $apt::params::root - $apt_conf_d = $apt::params::apt_conf_d - $sources_list_d = $apt::params::sources_list_d - $preferences_d = $apt::params::preferences_d - $provider = $apt::params::provider - - file { 'sources.list': - ensure => present, - path => "${root}/sources.list", - owner => root, - group => root, - mode => '0644', - content => $sources_list_content, - notify => Exec['apt_update'], - } - - file { 'sources.list.d': - ensure => directory, - path => $sources_list_d, - owner => root, - group => root, - purge => $purge_sources_list_d, - recurse => $purge_sources_list_d, - notify => Exec['apt_update'], - } - - file { 'preferences.d': - ensure => directory, - path => $preferences_d, - owner => root, - group => root, - purge => $purge_preferences_d, - recurse => $purge_preferences_d, - } - - case $disable_keys { - true: { - file { '99unauth': - ensure => present, - content => "APT::Get::AllowUnauthenticated 1;\n", - path => "${apt_conf_d}/99unauth", - } - } - false: { - file { '99unauth': - ensure => absent, - path => "${apt_conf_d}/99unauth", - } - } - undef: { } # do nothing - default: { fail('Valid values for disable_keys are true or false') } - } - - $proxy_set = $proxy_host ? { - undef => absent, - default => present - } - - file { 'configure-apt-proxy': - ensure => $proxy_set, - path => "${apt_conf_d}/proxy", - content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";", - notify => Exec['apt_update'], - } - - # Need anchor to provide containment for dependencies. - anchor { 'apt::update': - require => Class['apt::update'], - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/key.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/key.pp deleted file mode 100644 index c78bf658ce..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/key.pp +++ /dev/null @@ -1,90 +0,0 @@ -define apt::key ( - $key = $title, - $ensure = present, - $key_content = false, - $key_source = false, - $key_server = 'keyserver.ubuntu.com', - $key_options = false -) { - - include apt::params - - $upkey = upcase($key) - # trim the key to the last 8 chars so we can match longer keys with apt-key list too - $trimmedkey = regsubst($upkey, '^.*(.{8})$', '\1') - - if $key_content { - $method = 'content' - } elsif $key_source { - $method = 'source' - } elsif $key_server { - $method = 'server' - } - - # This is a hash of the parts of the key definition that we care about. - # It is used as a unique identifier for this instance of apt::key. It gets - # hashed to ensure that the resource name doesn't end up being pages and - # pages (e.g. in the situation where key_content is specified). - $digest = sha1("${upkey}/${key_content}/${key_source}/${key_server}/") - - # Allow multiple ensure => present for the same key to account for many - # apt::source resources that all reference the same key. - case $ensure { - present: { - - anchor { "apt::key/${title}": } - - if defined(Exec["apt::key ${upkey} absent"]) { - fail("Cannot ensure Apt::Key[${upkey}] present; ${upkey} already ensured absent") - } - - if !defined(Anchor["apt::key ${upkey} present"]) { - anchor { "apt::key ${upkey} present": } - } - - if $key_options{ - $options_string = "--keyserver-options ${key_options}" - } - else{ - $options_string = '' - } - - if !defined(Exec[$digest]) { - $digest_command = $method ? { - 'content' => "echo '${key_content}' | /usr/bin/apt-key add -", - 'source' => "wget -q '${key_source}' -O- | apt-key add -", - 'server' => "apt-key adv --keyserver '${key_server}' ${options_string} --recv-keys '${upkey}'", - } - exec { $digest: - command => $digest_command, - path => '/bin:/usr/bin', - unless => "/usr/bin/apt-key list | /bin/grep '${trimmedkey}'", - logoutput => 'on_failure', - before => Anchor["apt::key ${upkey} present"], - } - } - - Anchor["apt::key ${upkey} present"] -> Anchor["apt::key/${title}"] - - } - absent: { - - if defined(Anchor["apt::key ${upkey} present"]) { - fail("Cannot ensure Apt::Key[${upkey}] absent; ${upkey} already ensured present") - } - - exec { "apt::key ${upkey} absent": - command => "apt-key del '${upkey}'", - path => '/bin:/usr/bin', - onlyif => "apt-key list | grep '${trimmedkey}'", - user => 'root', - group => 'root', - logoutput => 'on_failure', - } - } - - default: { - fail "Invalid 'ensure' value '${ensure}' for aptkey" - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/params.pp deleted file mode 100644 index b35bb1c8d9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/params.pp +++ /dev/null @@ -1,42 +0,0 @@ -class apt::params { - $root = '/etc/apt' - $provider = '/usr/bin/apt-get' - $sources_list_d = "${root}/sources.list.d" - $apt_conf_d = "${root}/apt.conf.d" - $preferences_d = "${root}/preferences.d" - - case $::lsbdistid { - 'debian': { - case $::lsbdistcodename { - 'squeeze': { - $backports_location = 'http://backports.debian.org/debian-backports' - } - 'wheezy': { - $backports_location = 'http://ftp.debian.org/debian/' - } - default: { - $backports_location = 'http://http.debian.net/debian/' - } - } - } - 'ubuntu': { - case $::lsbdistcodename { - 'hardy','maverick','natty','oneiric','precise': { - $backports_location = 'http://us.archive.ubuntu.com/ubuntu' - $ppa_options = '-y' - } - 'lucid': { - $backports_location = 'http://us.archive.ubuntu.com/ubuntu' - $ppa_options = undef - } - default: { - $backports_location = 'http://old-releases.ubuntu.com/ubuntu' - $ppa_options = '-y' - } - } - } - default: { - fail("Unsupported osfamily (${::osfamily}) or lsbdistid (${::lsbdistid})") - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/pin.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/pin.pp deleted file mode 100644 index 402e79ede7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/pin.pp +++ /dev/null @@ -1,73 +0,0 @@ -# pin.pp -# pin a release in apt, useful for unstable repositories - -define apt::pin( - $ensure = present, - $explanation = "${::caller_module_name}: ${name}", - $order = '', - $packages = '*', - $priority = 0, - $release = '', # a= - $origin = '', - $version = '', - $codename = '', # n= - $release_version = '', # v= - $component = '', # c= - $originator = '', # o= - $label = '' # l= -) { - - include apt::params - - $preferences_d = $apt::params::preferences_d - - if $order != '' and !is_integer($order) { - fail('Only integers are allowed in the apt::pin order param') - } - - $pin_release_array = [ - $release, - $codename, - $release_version, - $component, - $originator, - $label] - $pin_release = join($pin_release_array, '') - - # Read the manpage 'apt_preferences(5)', especially the chapter - # 'Thea Effect of APT Preferences' to understand the following logic - # and the difference between specific and general form - if $packages != '*' { # specific form - - if ( $pin_release != '' and ( $origin != '' or $version != '' )) or - ( $origin != '' and ( $pin_release != '' or $version != '' )) or - ( $version != '' and ( $pin_release != '' or $origin != '' )) { - fail('parameters release, origin, and version are mutually exclusive') - } - - } else { # general form - - if $version != '' { - fail('parameter version cannot be used in general form') - } - - if ( $pin_release != '' and $origin != '' ) or - ( $origin != '' and $pin_release != '' ) { - fail('parmeters release and origin are mutually exclusive') - } - - } - - $path = $order ? { - '' => "${preferences_d}/${name}.pref", - default => "${preferences_d}/${order}-${name}.pref", - } - file { "${name}.pref": - ensure => $ensure, - path => $path, - owner => root, - group => root, - mode => '0644', - content => template('apt/pin.pref.erb'), - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/ppa.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/ppa.pp deleted file mode 100644 index f2629809e0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/ppa.pp +++ /dev/null @@ -1,81 +0,0 @@ -# ppa.pp - -define apt::ppa( - $release = $::lsbdistcodename, - $options = $apt::params::ppa_options, -) { - $ensure = 'present' - include apt::params - include apt::update - - $sources_list_d = $apt::params::sources_list_d - - if ! $release { - fail('lsbdistcodename fact not available: release parameter required') - } - - if $::operatingsystem != 'Ubuntu' { - fail("apt::ppa is currently supported on Ubuntu only.") - } - - $filename_without_slashes = regsubst($name, '/', '-', 'G') - $filename_without_dots = regsubst($filename_without_slashes, '\.', '_', 'G') - $filename_without_ppa = regsubst($filename_without_dots, '^ppa:', '', 'G') - $sources_list_d_filename = "${filename_without_ppa}-${release}.list" - - if $ensure == 'present' { - $package = $::lsbdistrelease ? { - /^[1-9]\..*|1[01]\..*|12.04$/ => 'python-software-properties', - default => 'software-properties-common', - } - - if ! defined(Package[$package]) { - package { $package: } - } - - if defined(Class[apt]) { - $proxy_host = $apt::proxy_host - $proxy_port = $apt::proxy_port - case $proxy_host { - false, '': { - $proxy_env = [] - } - default: {$proxy_env = ["http_proxy=http://${proxy_host}:${proxy_port}", "https_proxy=http://${proxy_host}:${proxy_port}"]} - } - } else { - $proxy_env = [] - } - exec { "add-apt-repository-${name}": - environment => $proxy_env, - command => "/usr/bin/add-apt-repository ${options} ${name}", - unless => "/usr/bin/test -s ${sources_list_d}/${sources_list_d_filename}", - user => 'root', - logoutput => 'on_failure', - notify => Exec['apt_update'], - require => [ - File['sources.list.d'], - Package[$package], - ], - } - - file { "${sources_list_d}/${sources_list_d_filename}": - ensure => file, - require => Exec["add-apt-repository-${name}"], - } - } - else { - - file { "${sources_list_d}/${sources_list_d_filename}": - ensure => 'absent', - mode => '0644', - owner => 'root', - gruop => 'root', - notify => Exec['apt_update'], - } - } - - # Need anchor to provide containment for dependencies. - anchor { "apt::ppa::${name}": - require => Class['apt::update'], - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/release.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/release.pp deleted file mode 100644 index 6e0a38f73f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/release.pp +++ /dev/null @@ -1,17 +0,0 @@ -# release.pp - -class apt::release ( - $release_id -) { - - include apt::params - - $root = $apt::params::root - - file { "${root}/apt.conf.d/01release": - owner => root, - group => root, - mode => '0644', - content => "APT::Default-Release \"${release_id}\";" - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/source.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/source.pp deleted file mode 100644 index bc93ad9d57..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/source.pp +++ /dev/null @@ -1,87 +0,0 @@ -# source.pp -# add an apt source - -define apt::source( - $ensure = present, - $location = '', - $release = 'UNDEF', - $repos = 'main', - $include_src = true, - $required_packages = false, - $key = false, - $key_server = 'keyserver.ubuntu.com', - $key_content = false, - $key_source = false, - $pin = false, - $architecture = undef -) { - - include apt::params - include apt::update - - $sources_list_d = $apt::params::sources_list_d - $provider = $apt::params::provider - - if $release == 'UNDEF' { - if $::lsbdistcodename == undef { - fail('lsbdistcodename fact not available: release parameter required') - } else { - $release_real = $::lsbdistcodename - } - } else { - $release_real = $release - } - - file { "${name}.list": - ensure => $ensure, - path => "${sources_list_d}/${name}.list", - owner => root, - group => root, - mode => '0644', - content => template("${module_name}/source.list.erb"), - notify => Exec['apt_update'], - } - - - if ($pin != false) { - # Get the host portion out of the url so we can pin to origin - $url_split = split($location, '/') - $host = $url_split[2] - - apt::pin { $name: - ensure => $ensure, - priority => $pin, - before => File["${name}.list"], - origin => $host, - } - } - - if ($required_packages != false) and ($ensure == 'present') { - exec { "Required packages: '${required_packages}' for ${name}": - command => "${provider} -y install ${required_packages}", - logoutput => 'on_failure', - refreshonly => true, - tries => 3, - try_sleep => 1, - subscribe => File["${name}.list"], - before => Exec['apt_update'], - } - } - - # We do not want to remove keys when the source is absent. - if ($key != false) and ($ensure == 'present') { - apt::key { "Add key: ${key} from Apt::Source ${title}": - ensure => present, - key => $key, - key_server => $key_server, - key_content => $key_content, - key_source => $key_source, - before => File["${name}.list"], - } - } - - # Need anchor to provide containment for dependencies. - anchor { "apt::source::${name}": - require => Class['apt::update'], - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/unattended_upgrades.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/unattended_upgrades.pp deleted file mode 100644 index b0bd8ab1e0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/unattended_upgrades.pp +++ /dev/null @@ -1,69 +0,0 @@ -# Class: apt::unattended_upgrades -# -# This class manages the unattended-upgrades package and related configuration -# files for ubuntu -# -# origins are the repositories to automatically upgrade included packages -# blacklist is a list of packages to not automatically upgrade -# update is how often to run "apt-get update" in days -# download is how often to run "apt-get upgrade --download-only" in days -# upgrade is how often to upgrade packages included in the origins list in days -# autoclean is how often to run "apt-get autoclean" in days -# -# information on the other options can be found in the 50unattended-upgrades -# file and in /etc/cron.daily/apt -# -class apt::unattended_upgrades ( - $origins = ['${distro_id}:${distro_codename}-security'], - $blacklist = [], - $update = "1", - $download = "1", - $upgrade = "1", - $autoclean = "7", - $auto_fix = true, - $minimal_steps = false, - $install_on_shutdown = false, - $mail_to = "NONE", - $mail_only_on_error = false, - $remove_unused = true, - $auto_reboot = false, - $dl_limit = "NONE", - $enable = "1", - $backup_interval = "0", - $backup_level = "3", - $max_age = "0", - $min_age = "0", - $max_size = "0", - $download_delta = "0", - $verbose = "0", -) { - include apt::params - - validate_bool( - $auto_fix, - $minimal_steps, - $install_on_shutdown, - $mail_only_on_error, - $remove_unused, - $auto_reboot - ) - - package { 'unattended-upgrades': - ensure => present, - } - - File { - ensure => file, - owner => 'root', - group => 'root', - mode => '0644', - require => Package['unattended-upgrades'], - } - - file { - '/etc/apt/apt.conf.d/50unattended-upgrades': - content => template('apt/50unattended-upgrades.erb'); - '/etc/apt/apt.conf.d/10periodic': - content => template('apt/10periodic.erb'); - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/update.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/update.pp deleted file mode 100644 index ce0b78fbdd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/manifests/update.pp +++ /dev/null @@ -1,10 +0,0 @@ -class apt::update { - include apt::params - - exec { 'apt_update': - command => "${apt::params::provider} update", - logoutput => 'on_failure', - refreshonly => true, - timeout => $apt::update_timeout, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/metadata.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/metadata.json deleted file mode 100644 index f1e8663059..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/metadata.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "puppetlabs-apt", - "version": "1.4.1", - "source": "https://github.com/puppetlabs/puppetlabs-apt", - "author": "Puppet Labs", - "license": "Apache-2.0", - "project_page": "https://github.com/puppetlabs/puppetlabs-apt", - "summary": "Puppet Labs Apt Module", - "operatingsystem_support": [ - { - "operatingsystem": "Debian", - "operatingsystemrelease": [ - "6", - "7" - ] - }, - { - "operatingsystem": "Ubuntu", - "operatingsystemrelease": [ - "10.04", - "12.04" - ] - } - ], - "requirements": [ - { "name": "pe", "version_requirement": "3.2.x" }, - { "name": "puppet", "version_requirement": "3.x" } - ], - "dependencies": [] -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_builddep_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_builddep_spec.rb deleted file mode 100644 index 1e35e4aa68..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_builddep_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::builddep', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - - context 'reset' do - it 'removes packages' do - shell('apt-get -y remove znc') - shell('apt-get -y remove g++') - end - end - - context 'apt::builddep' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::builddep { 'znc': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe 'should install g++ as a dependency' do - describe package('g++') do - it { should be_installed } - end - end - end - - context 'reset' do - it 'removes packages' do - shell('apt-get -y remove znc') - shell('apt-get -y remove g++') - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_key_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_key_spec.rb deleted file mode 100644 index 9f2ba395ad..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_key_spec.rb +++ /dev/null @@ -1,200 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::key', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'apt::key' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::key { 'puppetlabs': - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - - apt::key { 'jenkins': - key => 'D50582E6', - key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key', - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - shell('apt-key del D50582E6', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe 'keys should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30') - end - it 'finds jenkins key' do - shell('apt-key list | grep D50582E6') - end - end - end - context 'ensure' do - context 'absent' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::key { 'puppetlabs': - ensure => absent, - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - - apt::key { 'jenkins': - ensure => absent, - key => 'D50582E6', - key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe 'keys shouldnt exist' do - it 'fails' do - shell('apt-key list | grep 4BD6EC30', :acceptable_exit_codes => [1]) - end - it 'fails' do - shell('apt-key list | grep D50582E6', :acceptable_exit_codes => [1]) - end - end - end - end - - context 'reset' do - it 'clean up keys' do - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - shell('apt-key del D50582E6', :acceptable_exit_codes => [0,1,2]) - end - end - - context 'key options' do - context 'key_content' do - - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::key { 'puppetlabs': - key => '4BD6EC30', - key_content => '-----BEGIN PGP PUBLIC KEY BLOCK----- - Version: GnuPG v1.4.12 (GNU/Linux) - Comment: GPGTools - http://gpgtools.org - - mQINBEw3u0ABEAC1+aJQpU59fwZ4mxFjqNCgfZgDhONDSYQFMRnYC1dzBpJHzI6b - fUBQeaZ8rh6N4kZ+wq1eL86YDXkCt4sCvNTP0eF2XaOLbmxtV9bdpTIBep9bQiKg - 5iZaz+brUZlFk/MyJ0Yz//VQ68N1uvXccmD6uxQsVO+gx7rnarg/BGuCNaVtGwy+ - S98g8Begwxs9JmGa8pMCcSxtC7fAfAEZ02cYyrw5KfBvFI3cHDdBqrEJQKwKeLKY - GHK3+H1TM4ZMxPsLuR/XKCbvTyl+OCPxU2OxPjufAxLlr8BWUzgJv6ztPe9imqpH - Ppp3KuLFNorjPqWY5jSgKl94W/CO2x591e++a1PhwUn7iVUwVVe+mOEWnK5+Fd0v - VMQebYCXS+3dNf6gxSvhz8etpw20T9Ytg4EdhLvCJRV/pYlqhcq+E9le1jFOHOc0 - Nc5FQweUtHGaNVyn8S1hvnvWJBMxpXq+Bezfk3X8PhPT/l9O2lLFOOO08jo0OYiI - wrjhMQQOOSZOb3vBRvBZNnnxPrcdjUUm/9cVB8VcgI5KFhG7hmMCwH70tpUWcZCN - NlI1wj/PJ7Tlxjy44f1o4CQ5FxuozkiITJvh9CTg+k3wEmiaGz65w9jRl9ny2gEl - f4CR5+ba+w2dpuDeMwiHJIs5JsGyJjmA5/0xytB7QvgMs2q25vWhygsmUQARAQAB - tEdQdXBwZXQgTGFicyBSZWxlYXNlIEtleSAoUHVwcGV0IExhYnMgUmVsZWFzZSBL - ZXkpIDxpbmZvQHB1cHBldGxhYnMuY29tPokCPgQTAQIAKAUCTDe7QAIbAwUJA8Jn - AAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQEFS3okvW7DAZaw//aLmE/eob - pXpIUVyCUWQxEvPtM/h/SAJsG3KoHN9u216ews+UHsL/7F91ceVXQQdD2e8CtYWF - eLNM0RSM9i/KM60g4CvIQlmNqdqhi1HsgGqInZ72/XLAXun0gabfC36rLww2kel+ - aMpRf58SrSuskY321NnMEJl4OsHV2hfNtAIgw2e/zm9RhoMpGKxoHZCvFhnP7u2M - 2wMq7iNDDWb6dVsLpzdlVf242zCbubPCxxQXOpA56rzkUPuJ85mdVw4i19oPIFIZ - VL5owit1SxCOxBg4b8oaMS36hEl3qtZG834rtLfcqAmqjhx6aJuJLOAYN84QjDEU - 3NI5IfNRMvluIeTcD4Dt5FCYahN045tW1Rc6s5GAR8RW45GYwQDzG+kkkeeGxwEh - qCW7nOHuwZIoVJufNhd28UFn83KGJHCQt4NBBr3K5TcY6bDQEIrpSplWSDBbd3p1 - IaoZY1WSDdP9OTVOSbsz0JiglWmUWGWCdd/CMSW/D7/3VUOJOYRDwptvtSYcjJc8 - 1UV+1zB+rt5La/OWe4UOORD+jU1ATijQEaFYxBbqBBkFboAEXq9btRQyegqk+eVp - HhzacP5NYFTMThvHuTapNytcCso5au/cMywqCgY1DfcMJyjocu4bCtrAd6w4kGKN - MUdwNDYQulHZDI+UjJInhramyngdzZLjdeGJARwEEAECAAYFAkw3wEYACgkQIVr+ - UOQUcDKvEwgAoBuOPnPioBwYp8oHVPTo/69cJn1225kfraUYGebCcrRwuoKd8Iyh - R165nXYJmD8yrAFBk8ScUVKsQ/pSnqNrBCrlzQD6NQvuIWVFegIdjdasrWX6Szj+ - N1OllbzIJbkE5eo0WjCMEKJVI/GTY2AnTWUAm36PLQC5HnSATykqwxeZDsJ/s8Rc - kd7+QN5sBVytG3qb45Q7jLJpLcJO6KYH4rz9ZgN7LzyyGbu9DypPrulADG9OrL7e - lUnsGDG4E1M8Pkgk9Xv9MRKao1KjYLD5zxOoVtdeoKEQdnM+lWMJin1XvoqJY7FT - DJk6o+cVqqHkdKL+sgsscFVQljgCEd0EgIkCHAQQAQgABgUCTPlA6QAKCRBcE9bb - kwUuAxdYD/40FxAeNCYByxkr/XRT0gFT+NCjPuqPWCM5tf2NIhSapXtb2+32WbAf - DzVfqWjC0G0RnQBve+vcjpY4/rJu4VKIDGIT8CtnKOIyEcXTNFOehi65xO4ypaei - BPSb3ip3P0of1iZZDQrNHMW5VcyL1c+PWT/6exXSGsePtO/89tc6mupqZtC05f5Z - XG4jswMF0U6Q5s3S0tG7Y+oQhKNFJS4sH4rHe1o5CxKwNRSzqccA0hptKy3MHUZ2 - +zeHzuRdRWGjb2rUiVxnIvPPBGxF2JHhB4ERhGgbTxRZ6wZbdW06BOE8r7pGrUpU - fCw/WRT3gGXJHpGPOzFAvr3Xl7VcDUKTVmIajnpd3SoyD1t2XsvJlSQBOWbViucH - dvE4SIKQ77vBLRlZIoXXVb6Wu7Vq+eQs1ybjwGOhnnKjz8llXcMnLzzN86STpjN4 - qGTXQy/E9+dyUP1sXn3RRwb+ZkdI77m1YY95QRNgG/hqh77IuWWg1MtTSgQnP+F2 - 7mfo0/522hObhdAe73VO3ttEPiriWy7tw3bS9daP2TAVbYyFqkvptkBb1OXRUSzq - UuWjBmZ35UlXjKQsGeUHlOiEh84aondF90A7gx0X/ktNIPRrfCGkHJcDu+HVnR7x - Kk+F0qb9+/pGLiT3rqeQTr8fYsb4xLHT7uEg1gVFB1g0kd+RQHzV74kCPgQTAQIA - KAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAk/x5PoFCQtIMjoACgkQEFS3 - okvW7DAIKQ/9HvZyf+LHVSkCk92Kb6gckniin3+5ooz67hSr8miGBfK4eocqQ0H7 - bdtWjAILzR/IBY0xj6OHKhYP2k8TLc7QhQjt0dRpNkX+Iton2AZryV7vUADreYz4 - 4B0bPmhiE+LL46ET5IThLKu/KfihzkEEBa9/t178+dO9zCM2xsXaiDhMOxVE32gX - vSZKP3hmvnK/FdylUY3nWtPedr+lHpBLoHGaPH7cjI+MEEugU3oAJ0jpq3V8n4w0 - jIq2V77wfmbD9byIV7dXcxApzciK+ekwpQNQMSaceuxLlTZKcdSqo0/qmS2A863Y - ZQ0ZBe+Xyf5OI33+y+Mry+vl6Lre2VfPm3udgR10E4tWXJ9Q2CmG+zNPWt73U1FD - 7xBI7PPvOlyzCX4QJhy2Fn/fvzaNjHp4/FSiCw0HvX01epcersyun3xxPkRIjwwR - M9m5MJ0o4hhPfa97zibXSh8XXBnosBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUf - REsFmNOBUbi8xlKNS5CZypH3Zh88EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5y - DHmg7unCk4JyVopQ2KHMoqG886elu+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAk - ugVIB2pi+8u84f+an4Hml4xlyijgYu05pqNvnLRyJDLd61hviLC8GYU= - =a34C - -----END PGP PUBLIC KEY BLOCK----- - ', - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - end - describe 'keys should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30') - end - end - - context 'key_source' do - - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::key { 'puppetlabs': - key => '4BD6EC30', - key_source => 'http://apt.puppetlabs.com/pubkey.gpg', - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe 'keys should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30') - end - end - end - - context 'key_options' do - - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::key { 'puppetlabs': - key => '4BD6EC30', - key_source => 'http://apt.puppetlabs.com/pubkey.gpg', - key_options => 'debug' - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe 'keys should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30') - end - end - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_ppa_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_ppa_spec.rb deleted file mode 100644 index c11da9123b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_ppa_spec.rb +++ /dev/null @@ -1,98 +0,0 @@ -require 'spec_helper_acceptance' - -if fact('operatingsystem') == 'Ubuntu' - describe 'apt::ppa', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - - context 'reset' do - it 'removes ppa' do - shell('rm /etc/apt/sources.list.d/canonical-kernel-team-ppa-*', :acceptable_exit_codes => [0,1,2]) - shell('rm /etc/apt/sources.list.d/raravena80-collectd5-*', :acceptable_exit_codes => [0,1,2]) - end - end - - context 'adding a ppa that doesnt exist' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::ppa { 'ppa:canonical-kernel-team/ppa': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe 'contains the source file' do - it 'contains a kernel ppa source' do - shell('ls /etc/apt/sources.list.d/canonical-kernel-team-ppa-*', :acceptable_exit_codes => [0]) - end - end - end - - context 'reading a removed ppa.' do - it 'setup' do - # This leaves a blank file - shell('echo > /etc/apt/sources.list.d/raravena80-collectd5-$(lsb_release -c -s).list') - end - - it 'should read it successfully' do - pp = <<-EOS - include '::apt' - apt::ppa { 'ppa:raravena80/collectd5': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - end - - context 'reset' do - it 'removes added ppas' do - shell('rm /etc/apt/sources.list.d/canonical-kernel-team-ppa-*') - shell('rm /etc/apt/sources.list.d/raravena80-collectd5-*') - end - end - - context 'release' do - context 'precise' do - it 'works without failure' do - pp = <<-EOS - include '::apt' - apt::ppa { 'ppa:canonical-kernel-team/ppa': - release => precise, - } - EOS - - shell('rm -rf /etc/apt/sources.list.d/canonical-kernel-team-ppa*', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/canonical-kernel-team-ppa-precise.list') do - it { should be_file } - end - end - end - - context 'options' do - context '-y', :unless => default[:platform].match(/10\.04/) do - it 'works without failure' do - pp = <<-EOS - include '::apt' - apt::ppa { 'ppa:canonical-kernel-team/ppa': - release => precise, - options => '-y', - } - EOS - - shell('rm -rf /etc/apt/sources.list.d/canonical-kernel-team-ppa*', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/canonical-kernel-team-ppa-precise.list') do - it { should be_file } - end - end - end - - context 'reset' do - it { shell('rm -rf /etc/apt/sources.list.d/canonical-kernel-team-ppa*', :acceptable_exit_codes => [0,1,2]) } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_source_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_source_spec.rb deleted file mode 100644 index c2d076cbff..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_source_spec.rb +++ /dev/null @@ -1,326 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::source', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - - context 'apt::source' do - context 'ensure => present' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - shell('rm /etc/apt/sources.list.d/puppetlabs.list', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe 'key should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30', :acceptable_exit_codes => [0]) - end - end - - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should be_file } - end - end - - context 'ensure => absent' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => absent, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - # The key should remain -we don't delete those when deleting a source. - describe 'key should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30', :acceptable_exit_codes => [0]) - end - end - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should_not be_file } - end - end - - end - - context 'release' do - context 'test' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - release => 'precise', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should be_file } - it { should contain 'deb http://apt.puppetlabs.com precise main' } - end - end - end - - context 'include_src' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - include_src => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should be_file } - it { should contain 'deb-src http://apt.puppetlabs.com' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - include_src => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should be_file } - it { should_not contain 'deb-src http://apt.puppetlabs.com' } - end - end - end - - context 'required_packages' do - context 'vim' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - required_packages => 'vim', - } - EOS - - shell('apt-get -y remove vim') - apply_manifest(pp, :catch_failures => true) - end - - describe package('vim') do - it { should be_installed } - end - end - end - - context 'key content' do - context 'giant key' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_content => '-----BEGIN PGP PUBLIC KEY BLOCK----- - Version: GnuPG v1.4.12 (GNU/Linux) - Comment: GPGTools - http://gpgtools.org - - mQINBEw3u0ABEAC1+aJQpU59fwZ4mxFjqNCgfZgDhONDSYQFMRnYC1dzBpJHzI6b - fUBQeaZ8rh6N4kZ+wq1eL86YDXkCt4sCvNTP0eF2XaOLbmxtV9bdpTIBep9bQiKg - 5iZaz+brUZlFk/MyJ0Yz//VQ68N1uvXccmD6uxQsVO+gx7rnarg/BGuCNaVtGwy+ - S98g8Begwxs9JmGa8pMCcSxtC7fAfAEZ02cYyrw5KfBvFI3cHDdBqrEJQKwKeLKY - GHK3+H1TM4ZMxPsLuR/XKCbvTyl+OCPxU2OxPjufAxLlr8BWUzgJv6ztPe9imqpH - Ppp3KuLFNorjPqWY5jSgKl94W/CO2x591e++a1PhwUn7iVUwVVe+mOEWnK5+Fd0v - VMQebYCXS+3dNf6gxSvhz8etpw20T9Ytg4EdhLvCJRV/pYlqhcq+E9le1jFOHOc0 - Nc5FQweUtHGaNVyn8S1hvnvWJBMxpXq+Bezfk3X8PhPT/l9O2lLFOOO08jo0OYiI - wrjhMQQOOSZOb3vBRvBZNnnxPrcdjUUm/9cVB8VcgI5KFhG7hmMCwH70tpUWcZCN - NlI1wj/PJ7Tlxjy44f1o4CQ5FxuozkiITJvh9CTg+k3wEmiaGz65w9jRl9ny2gEl - f4CR5+ba+w2dpuDeMwiHJIs5JsGyJjmA5/0xytB7QvgMs2q25vWhygsmUQARAQAB - tEdQdXBwZXQgTGFicyBSZWxlYXNlIEtleSAoUHVwcGV0IExhYnMgUmVsZWFzZSBL - ZXkpIDxpbmZvQHB1cHBldGxhYnMuY29tPokCPgQTAQIAKAUCTDe7QAIbAwUJA8Jn - AAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQEFS3okvW7DAZaw//aLmE/eob - pXpIUVyCUWQxEvPtM/h/SAJsG3KoHN9u216ews+UHsL/7F91ceVXQQdD2e8CtYWF - eLNM0RSM9i/KM60g4CvIQlmNqdqhi1HsgGqInZ72/XLAXun0gabfC36rLww2kel+ - aMpRf58SrSuskY321NnMEJl4OsHV2hfNtAIgw2e/zm9RhoMpGKxoHZCvFhnP7u2M - 2wMq7iNDDWb6dVsLpzdlVf242zCbubPCxxQXOpA56rzkUPuJ85mdVw4i19oPIFIZ - VL5owit1SxCOxBg4b8oaMS36hEl3qtZG834rtLfcqAmqjhx6aJuJLOAYN84QjDEU - 3NI5IfNRMvluIeTcD4Dt5FCYahN045tW1Rc6s5GAR8RW45GYwQDzG+kkkeeGxwEh - qCW7nOHuwZIoVJufNhd28UFn83KGJHCQt4NBBr3K5TcY6bDQEIrpSplWSDBbd3p1 - IaoZY1WSDdP9OTVOSbsz0JiglWmUWGWCdd/CMSW/D7/3VUOJOYRDwptvtSYcjJc8 - 1UV+1zB+rt5La/OWe4UOORD+jU1ATijQEaFYxBbqBBkFboAEXq9btRQyegqk+eVp - HhzacP5NYFTMThvHuTapNytcCso5au/cMywqCgY1DfcMJyjocu4bCtrAd6w4kGKN - MUdwNDYQulHZDI+UjJInhramyngdzZLjdeGJARwEEAECAAYFAkw3wEYACgkQIVr+ - UOQUcDKvEwgAoBuOPnPioBwYp8oHVPTo/69cJn1225kfraUYGebCcrRwuoKd8Iyh - R165nXYJmD8yrAFBk8ScUVKsQ/pSnqNrBCrlzQD6NQvuIWVFegIdjdasrWX6Szj+ - N1OllbzIJbkE5eo0WjCMEKJVI/GTY2AnTWUAm36PLQC5HnSATykqwxeZDsJ/s8Rc - kd7+QN5sBVytG3qb45Q7jLJpLcJO6KYH4rz9ZgN7LzyyGbu9DypPrulADG9OrL7e - lUnsGDG4E1M8Pkgk9Xv9MRKao1KjYLD5zxOoVtdeoKEQdnM+lWMJin1XvoqJY7FT - DJk6o+cVqqHkdKL+sgsscFVQljgCEd0EgIkCHAQQAQgABgUCTPlA6QAKCRBcE9bb - kwUuAxdYD/40FxAeNCYByxkr/XRT0gFT+NCjPuqPWCM5tf2NIhSapXtb2+32WbAf - DzVfqWjC0G0RnQBve+vcjpY4/rJu4VKIDGIT8CtnKOIyEcXTNFOehi65xO4ypaei - BPSb3ip3P0of1iZZDQrNHMW5VcyL1c+PWT/6exXSGsePtO/89tc6mupqZtC05f5Z - XG4jswMF0U6Q5s3S0tG7Y+oQhKNFJS4sH4rHe1o5CxKwNRSzqccA0hptKy3MHUZ2 - +zeHzuRdRWGjb2rUiVxnIvPPBGxF2JHhB4ERhGgbTxRZ6wZbdW06BOE8r7pGrUpU - fCw/WRT3gGXJHpGPOzFAvr3Xl7VcDUKTVmIajnpd3SoyD1t2XsvJlSQBOWbViucH - dvE4SIKQ77vBLRlZIoXXVb6Wu7Vq+eQs1ybjwGOhnnKjz8llXcMnLzzN86STpjN4 - qGTXQy/E9+dyUP1sXn3RRwb+ZkdI77m1YY95QRNgG/hqh77IuWWg1MtTSgQnP+F2 - 7mfo0/522hObhdAe73VO3ttEPiriWy7tw3bS9daP2TAVbYyFqkvptkBb1OXRUSzq - UuWjBmZ35UlXjKQsGeUHlOiEh84aondF90A7gx0X/ktNIPRrfCGkHJcDu+HVnR7x - Kk+F0qb9+/pGLiT3rqeQTr8fYsb4xLHT7uEg1gVFB1g0kd+RQHzV74kCPgQTAQIA - KAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAk/x5PoFCQtIMjoACgkQEFS3 - okvW7DAIKQ/9HvZyf+LHVSkCk92Kb6gckniin3+5ooz67hSr8miGBfK4eocqQ0H7 - bdtWjAILzR/IBY0xj6OHKhYP2k8TLc7QhQjt0dRpNkX+Iton2AZryV7vUADreYz4 - 4B0bPmhiE+LL46ET5IThLKu/KfihzkEEBa9/t178+dO9zCM2xsXaiDhMOxVE32gX - vSZKP3hmvnK/FdylUY3nWtPedr+lHpBLoHGaPH7cjI+MEEugU3oAJ0jpq3V8n4w0 - jIq2V77wfmbD9byIV7dXcxApzciK+ekwpQNQMSaceuxLlTZKcdSqo0/qmS2A863Y - ZQ0ZBe+Xyf5OI33+y+Mry+vl6Lre2VfPm3udgR10E4tWXJ9Q2CmG+zNPWt73U1FD - 7xBI7PPvOlyzCX4QJhy2Fn/fvzaNjHp4/FSiCw0HvX01epcersyun3xxPkRIjwwR - M9m5MJ0o4hhPfa97zibXSh8XXBnosBQxeg6nEnb26eorVQbqGx0ruu/W2m5/JpUf - REsFmNOBUbi8xlKNS5CZypH3Zh88EZiTFolOMEh+hT6s0l6znBAGGZ4m/Unacm5y - DHmg7unCk4JyVopQ2KHMoqG886elu+rm0ASkhyqBAk9sWKptMl3NHiYTRE/m9VAk - ugVIB2pi+8u84f+an4Hml4xlyijgYu05pqNvnLRyJDLd61hviLC8GYU= - =a34C - -----END PGP PUBLIC KEY BLOCK-----', - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should be_file } - end - describe 'keys should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30') - end - end - end - end - - context 'key_source' do - context 'http://apt.puppetlabs.com/pubkey.gpg' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - release => 'precise', - repos => 'main', - key => '4BD6EC30', - key_source => 'http://apt.puppetlabs.com/pubkey.gpg', - } - EOS - - shell('apt-key del 4BD6EC30', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/puppetlabs.list') do - it { should be_file } - it { should contain 'deb http://apt.puppetlabs.com precise main' } - end - describe 'keys should exist' do - it 'finds puppetlabs key' do - shell('apt-key list | grep 4BD6EC30') - end - end - end - end - - context 'pin' do - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - pin => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/puppetlabs.pref') do - it { should_not be_file } - end - end - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include '::apt' - apt::source { 'puppetlabs': - ensure => present, - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - pin => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/puppetlabs.pref') do - it { should be_file } - end - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_spec.rb deleted file mode 100644 index 775139145e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/apt_spec.rb +++ /dev/null @@ -1,233 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - - context 'reset' do - it 'fixes the sources.list' do - shell('cp /etc/apt/sources.list /tmp') - end - end - - context 'always_apt_update => true' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': always_apt_update => true } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/apt_update/) - end - end - end - context 'always_apt_update => false' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': always_apt_update => false } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to_not match(/apt_update/) - end - end - end - - # disable_keys drops in a 99unauth file to ignore keys in - # other files. - context 'disable_keys => true' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': disable_keys => true } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/99unauth') do - it { should be_file } - it { should contain 'APT::Get::AllowUnauthenticated 1;' } - end - end - context 'disable_keys => false' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': disable_keys => false } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/99unauth') do - it { should_not be_file } - end - end - - # proxy_host sets the proxy to use for transfers. - # proxy_port sets the proxy port to use. - context 'proxy settings' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': - proxy_host => 'localhost', - proxy_port => '7042', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/proxy') do - it { should be_file } - it { should contain 'Acquire::http::Proxy "http://localhost:7042\";' } - end - end - - context 'purge_sources' do - it 'creates a fake apt file' do - shell('touch /etc/apt/sources.list.d/fake.list') - shell('echo "deb fake" >> /etc/apt/sources.list') - end - it 'purge_sources_list and purge_sources_list_d => true' do - pp = <<-EOS - class { 'apt': - purge_sources_list => true, - purge_sources_list_d => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list') do - it { should_not contain 'deb fake' } - end - - describe file('/etc/apt/sources.list.d/fake.list') do - it { should_not be_file } - end - end - context 'proxy settings' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': - proxy_host => 'localhost', - proxy_port => '7042', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/proxy') do - it { should be_file } - it { should contain 'Acquire::http::Proxy "http://localhost:7042\";' } - end - end - - context 'purge_sources' do - context 'false' do - it 'creates a fake apt file' do - shell('touch /etc/apt/sources.list.d/fake.list') - shell('echo "deb fake" >> /etc/apt/sources.list') - end - it 'purge_sources_list and purge_sources_list_d => false' do - pp = <<-EOS - class { 'apt': - purge_sources_list => false, - purge_sources_list_d => false, - } - EOS - - apply_manifest(pp, :catch_failures => false) - end - - describe file('/etc/apt/sources.list') do - it { should contain 'deb fake' } - end - - describe file('/etc/apt/sources.list.d/fake.list') do - it { should be_file } - end - end - - context 'true' do - it 'creates a fake apt file' do - shell('touch /etc/apt/sources.list.d/fake.list') - shell('echo "deb fake" >> /etc/apt/sources.list') - end - it 'purge_sources_list and purge_sources_list_d => true' do - pp = <<-EOS - class { 'apt': - purge_sources_list => true, - purge_sources_list_d => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list') do - it { should_not contain 'deb fake' } - end - - describe file('/etc/apt/sources.list.d/fake.list') do - it { should_not be_file } - end - end - end - - context 'purge_preferences_d' do - context 'false' do - it 'creates a preferences file' do - shell('touch /etc/apt/preferences.d/test') - end - - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': purge_preferences_d => false } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/test') do - it { should be_file } - end - end - context 'true' do - it 'creates a preferences file' do - shell('touch /etc/apt/preferences.d/test') - end - - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': purge_preferences_d => true } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/test') do - it { should_not be_file } - end - end - end - - context 'update_timeout' do - context '5000' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': update_timeout => '5000' } - EOS - - apply_manifest(pp, :catch_failures => true) - end - end - end - - context 'reset' do - it 'fixes the sources.list' do - shell('cp /tmp/sources.list /etc/apt') - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/backports_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/backports_spec.rb deleted file mode 100644 index 6d3f7f0e68..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/backports_spec.rb +++ /dev/null @@ -1,59 +0,0 @@ -require 'spec_helper_acceptance' - -codename = fact('lsbdistcodename') -case fact('operatingsystem') -when 'Ubuntu' - repos = 'main universe multiverse restricted' -when 'Debian' - repos = 'main contrib non-free' -end - -describe 'apt::backports class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'defaults' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt::backports': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - end - - context 'release' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt::backports': release => '#{codename}' } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/backports.list') do - it { should be_file } - it { should contain "#{codename}-backports #{repos}" } - end - end - - context 'location' do - it 'should work with no errors' do - pp = <<-EOS - class { 'apt::backports': release => 'precise', location => 'http://localhost/ubuntu' } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/sources.list.d/backports.list') do - it { should be_file } - it { should contain "deb http://localhost/ubuntu precise-backports #{repos}" } - end - end - - context 'reset' do - it 'deletes backport files' do - shell('rm -rf /etc/apt/sources.list.d/backports.list') - shell('rm -rf /etc/apt/preferences.d/backports.pref') - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/class_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/class_spec.rb deleted file mode 100644 index e5994498b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/class_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - - context 'default parameters' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'apt': } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/conf_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/conf_spec.rb deleted file mode 100644 index 8a8ed63db4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/conf_spec.rb +++ /dev/null @@ -1,66 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::conf define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'defaults' do - it 'should work with no errors' do - pp = <<-EOS - apt::conf { 'test': - content => 'test', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50test') do - it { should be_file } - it { should contain 'test' } - end - end - - context 'ensure' do - context 'absent' do - it 'should work with no errors' do - pp = <<-EOS - apt::conf { 'test': - ensure => absent, - content => 'test', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50test') do - it { should_not be_file } - end - end - end - - context 'priority' do - context '99' do - it 'should work with no errors' do - pp = <<-EOS - apt::conf { 'test': - ensure => present, - content => 'test', - priority => '99', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/99test') do - it { should be_file } - it { should contain 'test' } - end - end - end - - context 'cleanup' do - it 'deletes 99test' do - shell ('rm -rf /etc/apt/apt.conf.d/99test') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/force_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/force_spec.rb deleted file mode 100644 index 00572eae37..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/force_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -require 'spec_helper_acceptance' - -codename = fact('lsbdistcodename') - -describe 'apt::force define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'defaults' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::force { 'vim': release => false, } - EOS - - shell('apt-get remove -y vim') - apply_manifest(pp, :catch_failures => true) - end - - describe package('vim') do - it { should be_installed } - end - end - - context 'release' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::force { 'vim': release => '#{codename}' } - EOS - - shell('apt-get remove -y vim') - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/apt-get -y -t #{codename} install vim/) - end - end - - describe package('vim') do - it { should be_installed } - end - end - - context 'version' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::force { 'vim': version => '1.1.1', release => false, } - EOS - - shell('apt-get remove -y vim') - apply_manifest(pp, :catch_failures => false) do |r| - expect(r.stdout).to match(/apt-get -y install vim=1.1.1/) - end - end - - describe package('vim') do - it { should_not be_installed } - end - end - - context 'timeout' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::force { 'vim': release => false, timeout => '1' } - EOS - - shell('apt-get clean') - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/Error: Command exceeded timeout/) - end - end - - describe package('vim') do - it { should_not be_installed } - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/debian-70rc1-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/debian-70rc1-x64.yml deleted file mode 100644 index 4b55677f4c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/debian-70rc1-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - debian-70rc1-x64: - roles: - - master - platform: debian-70rc1-x64 - box : debian-70rc1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/default.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/default.yml deleted file mode 100644 index a5f38f784c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-server-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml deleted file mode 100644 index c1b8bdf8fa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-10044-x64: - roles: - - master - platform: ubuntu-10.04-amd64 - box : ubuntu-server-10044-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml deleted file mode 100644 index a5f38f784c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-server-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/pin_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/pin_spec.rb deleted file mode 100644 index 6de11748d0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/pin_spec.rb +++ /dev/null @@ -1,266 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::pin define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'defaults' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release a=vim-puppet' } - end - end - - context 'ensure' do - context 'present' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': ensure => present } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release a=vim-puppet' } - end - end - - context 'absent' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': ensure => absent } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should_not be_file } - end - end - end - - context 'order' do - context '99' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - order => '99', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/99-vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release a=vim-puppet' } - end - end - end - - context 'packages' do - context 'test' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - packages => 'test', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Package: test' } - it { should contain 'Pin: release a=vim-puppet' } - end - end - end - - context 'release' do - context 'testrelease' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - release => 'testrelease', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release a=testrelease' } - end - end - end - - context 'origin' do - context 'testrelease' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - origin => 'testrelease', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: origin testrelease' } - end - end - end - - context 'version' do - context '1.0.0' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - packages => 'test', - version => '1.0.0', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Package: test' } - it { should contain 'Pin: version 1.0.0' } - end - end - end - - context 'codename' do - context 'testname' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - codename => 'testname', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release n=testname' } - end - end - end - - context 'release_version' do - context '1.1.1' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - release_version => '1.1.1', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release v=1.1.1' } - end - end - end - - context 'component' do - context 'testcomponent' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - component => 'testcomponent', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release c=testcomponent' } - end - end - end - - context 'originator' do - context 'testorigin' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - originator => 'testorigin', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release o=testorigin' } - end - end - end - - context 'label' do - context 'testlabel' do - it 'should work with no errors' do - pp = <<-EOS - include apt - apt::pin { 'vim-puppet': - ensure => present, - label => 'testlabel', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/preferences.d/vim-puppet.pref') do - it { should be_file } - it { should contain 'Pin: release l=testlabel' } - end - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/release_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/release_spec.rb deleted file mode 100644 index e7467bf62d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/release_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::release class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'release_id' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::release': release_id => 'precise', } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/01release') do - it { should be_file } - it { should contain 'APT::Default-Release "precise";' } - end - end - - context 'reset' do - it 'cleans up' do - shell('rm -rf /etc/apt/apt.conf.d/01release') - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/unattended_upgrade_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/unattended_upgrade_spec.rb deleted file mode 100644 index 6a19f4e74e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/unattended_upgrade_spec.rb +++ /dev/null @@ -1,562 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'apt::unattended_upgrades class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'defaults' do - it 'should work with no errors' do - pp = <<-EOS - include apt - include apt::unattended_upgrades - EOS - - # Attempted workaround for problems seen on debian with - # something holding the package database open. - #shell('killall -9 apt-get') - #shell('killall -9 dpkg') - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - end - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - end - end - - context 'origins' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - origins => ['${distro_id}:${distro_codename}-test'], - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain '${distro_id}:${distro_codename}-test' } - end - end - - context 'blacklist' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - blacklist => ['puppet'] - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'puppet' } - end - end - - context 'update' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - update => '99' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::Update-Package-Lists "99";' } - end - end - - context 'download' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - download => '99' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::Download-Upgradeable-Packages "99";' } - end - end - - context 'upgrade' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - upgrade => '99' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::Unattended-Upgrade "99";' } - end - end - - context 'autoclean' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - autoclean => '99' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::AutocleanInterval "99";' } - end - end - - context 'auto_fix' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - auto_fix => true - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::AutoFixInterruptedDpkg "true";' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - auto_fix => false - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::AutoFixInterruptedDpkg "false";' } - end - end - end - - context 'minimal_steps' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - minimal_steps => true - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::MinimalSteps "true";' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - minimal_steps => false - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::MinimalSteps "false";' } - end - end - end - - context 'install_on_shutdown' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - install_on_shutdown => true - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::InstallOnShutdown "true";' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - install_on_shutdown => false - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::InstallOnShutdown "false";' } - end - end - end - - context 'mail_to' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - mail_to => 'test@example.com' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::Mail "test@example.com";' } - end - end - - context 'mail_only_on_error' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - mail_to => 'test@example.com', - mail_only_on_error => true - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::MailOnlyOnError "true";' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - mail_to => 'test@example.com', - mail_only_on_error => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::MailOnlyOnError "false";' } - end - end - - context 'mail_to missing' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - mail_only_on_error => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should_not contain 'Unattended-Upgrade::MailOnlyOnError "true";' } - end - end - end - - context 'remove_unused' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - remove_unused => true - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::Remove-Unused-Dependencies "true";' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - remove_unused => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::Remove-Unused-Dependencies "false";' } - end - end - end - - context 'auto_reboot' do - context 'true' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - auto_reboot => true - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::Automatic-Reboot "true";' } - end - end - - context 'false' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - auto_reboot => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Unattended-Upgrade::Automatic-Reboot "false";' } - end - end - end - - context 'dl_limit' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - dl_limit => '99' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/50unattended-upgrades') do - it { should be_file } - it { should contain 'Acquire::http::Dl-Limit "99"' } - end - end - - context 'enable' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - enable => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::Enable "2"' } - end - end - - context 'backup_interval' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - backup_interval => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::BackUpArchiveInterval "2";' } - end - end - - context 'backup_level' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - backup_level => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::BackUpLevel "2";' } - end - end - - context 'max_age' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - max_age => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::MaxAge "2";' } - end - end - - context 'min_age' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - min_age => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::MinAge "2";' } - end - end - - context 'max_size' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - max_size => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::MaxSize "2";' } - end - end - - context 'download_delta' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - download_delta => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::Download-Upgradeable-Packages-Debdelta "2";' } - end - end - - context 'verbose' do - it 'should work with no errors' do - pp = <<-EOS - include apt - class { 'apt::unattended_upgrades': - verbose => '2' - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/apt/apt.conf.d/10periodic') do - it { should be_file } - it { should contain 'APT::Periodic::Verbose "2";' } - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/unsupported_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/unsupported_spec.rb deleted file mode 100644 index 08dca76b84..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/acceptance/unsupported_spec.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - it 'class apt fails' do - pp = <<-EOS - class { 'apt': } - EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/unsupported/i) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/apt_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/apt_spec.rb deleted file mode 100644 index 080bc81760..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/apt_spec.rb +++ /dev/null @@ -1,134 +0,0 @@ -require 'spec_helper' -describe 'apt', :type => :class do - let(:facts) { { :lsbdistid => 'Debian' } } - let :default_params do - { - :disable_keys => :undef, - :always_apt_update => false, - :purge_sources_list => false, - :purge_sources_list_d => false, - } - end - - [{}, - { - :disable_keys => true, - :always_apt_update => true, - :proxy_host => true, - :proxy_port => '3128', - :purge_sources_list => true, - :purge_sources_list_d => true, - }, - { - :disable_keys => false - } - ].each do |param_set| - describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do - let :param_hash do - default_params.merge(param_set) - end - - let :params do - param_set - end - - let :refresh_only_apt_update do - if param_hash[:always_apt_update] - false - else - true - end - end - - it { should contain_class("apt::params") } - - it { - if param_hash[:purge_sources_list] - should contain_file("sources.list").with({ - 'path' => "/etc/apt/sources.list", - 'ensure' => "present", - 'owner' => "root", - 'group' => "root", - 'mode' => "0644", - "content" => "# Repos managed by puppet.\n" - }) - else - should contain_file("sources.list").with({ - 'path' => "/etc/apt/sources.list", - 'ensure' => "present", - 'owner' => "root", - 'group' => "root", - 'mode' => "0644", - 'content' => nil - }) - end - } - it { - if param_hash[:purge_sources_list_d] - should create_file("sources.list.d").with({ - 'path' => "/etc/apt/sources.list.d", - 'ensure' => "directory", - 'owner' => "root", - 'group' => "root", - 'purge' => true, - 'recurse' => true, - 'notify' => 'Exec[apt_update]' - }) - else - should create_file("sources.list.d").with({ - 'path' => "/etc/apt/sources.list.d", - 'ensure' => "directory", - 'owner' => "root", - 'group' => "root", - 'purge' => false, - 'recurse' => false, - 'notify' => 'Exec[apt_update]' - }) - end - } - - it { - should contain_exec("apt_update").with({ - 'command' => "/usr/bin/apt-get update", - 'refreshonly' => refresh_only_apt_update - }) - } - - it { - if param_hash[:disable_keys] == true - should create_file("99unauth").with({ - 'content' => "APT::Get::AllowUnauthenticated 1;\n", - 'ensure' => "present", - 'path' => "/etc/apt/apt.conf.d/99unauth" - }) - elsif param_hash[:disable_keys] == false - should create_file("99unauth").with({ - 'ensure' => "absent", - 'path' => "/etc/apt/apt.conf.d/99unauth" - }) - elsif param_hash[:disable_keys] != :undef - should_not create_file("99unauth").with({ - 'path' => "/etc/apt/apt.conf.d/99unauth" - }) - end - } - describe 'when setting a proxy' do - it { - if param_hash[:proxy_host] - should contain_file('configure-apt-proxy').with( - 'path' => '/etc/apt/apt.conf.d/proxy', - 'content' => "Acquire::http::Proxy \"http://#{param_hash[:proxy_host]}:#{param_hash[:proxy_port]}\";", - 'notify' => "Exec[apt_update]" - ) - else - should contain_file('configure-apt-proxy').with( - 'path' => '/etc/apt/apt.conf.d/proxy', - 'notify' => 'Exec[apt_update]', - 'ensure' => 'absent' - ) - end - } - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/backports_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/backports_spec.rb deleted file mode 100644 index 98ad873af5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/backports_spec.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'spec_helper' -describe 'apt::backports', :type => :class do - - describe 'when turning on backports for ubuntu karmic' do - - let :facts do - { - 'lsbdistcodename' => 'Karmic', - 'lsbdistid' => 'Ubuntu' - } - end - - it { should contain_apt__source('backports').with({ - 'location' => 'http://old-releases.ubuntu.com/ubuntu', - 'release' => 'karmic-backports', - 'repos' => 'main universe multiverse restricted', - 'key' => '437D05B5', - 'key_server' => 'pgp.mit.edu', - 'pin' => '200', - }) - } - end - - describe "when turning on backports for debian squeeze" do - - let :facts do - { - 'lsbdistcodename' => 'Squeeze', - 'lsbdistid' => 'Debian', - } - end - - it { should contain_apt__source('backports').with({ - 'location' => 'http://backports.debian.org/debian-backports', - 'release' => 'squeeze-backports', - 'repos' => 'main contrib non-free', - 'key' => '46925553', - 'key_server' => 'pgp.mit.edu', - 'pin' => '200', - }) - } - end - - describe "when turning on backports for debian squeeze but using your own mirror" do - - let :facts do - { - 'lsbdistcodename' => 'Squeeze', - 'lsbdistid' => 'Debian' - } - end - - let :location do - 'http://mirrors.example.com/debian-backports' - end - - let :params do - { 'location' => location } - end - - it { should contain_apt__source('backports').with({ - 'location' => location, - 'release' => 'squeeze-backports', - 'repos' => 'main contrib non-free', - 'key' => '46925553', - 'key_server' => 'pgp.mit.edu', - 'pin' => '200', - }) - } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/debian_testing_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/debian_testing_spec.rb deleted file mode 100644 index 20487333f6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/debian_testing_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'spec_helper' -describe 'apt::debian::testing', :type => :class do - let(:facts) { { :lsbdistid => 'Debian' } } - it { - should contain_apt__source("debian_testing").with({ - "location" => "http://debian.mirror.iweb.ca/debian/", - "release" => "testing", - "repos" => "main contrib non-free", - "required_packages" => "debian-keyring debian-archive-keyring", - "key" => "46925553", - "key_server" => "subkeys.pgp.net", - "pin" => "-10" - }) - } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/debian_unstable_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/debian_unstable_spec.rb deleted file mode 100644 index 70724f90bd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/debian_unstable_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'spec_helper' -describe 'apt::debian::unstable', :type => :class do - let(:facts) { { :lsbdistid => 'Debian' } } - it { - should contain_apt__source("debian_unstable").with({ - "location" => "http://debian.mirror.iweb.ca/debian/", - "release" => "unstable", - "repos" => "main contrib non-free", - "required_packages" => "debian-keyring debian-archive-keyring", - "key" => "46925553", - "key_server" => "subkeys.pgp.net", - "pin" => "-10" - }) - } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/params_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/params_spec.rb deleted file mode 100644 index 2d3ec3c71a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/params_spec.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'spec_helper' -describe 'apt::params', :type => :class do - let(:facts) { { :lsbdistid => 'Debian' } } - let (:title) { 'my_package' } - - it { should contain_apt__params } - - # There are 4 resources in this class currently - # there should not be any more resources because it is a params class - # The resources are class[apt::params], class[main], class[settings], stage[main] - it "Should not contain any resources" do - subject.resources.size.should == 4 - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/release_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/release_spec.rb deleted file mode 100644 index e43f449d62..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/release_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'spec_helper' -describe 'apt::release', :type => :class do - let(:facts) { { :lsbdistid => 'Debian' } } - let (:title) { 'my_package' } - - let :param_set do - { :release_id => 'precise' } - end - - let (:params) { param_set } - - it { should contain_class("apt::params") } - - it { - should contain_file("/etc/apt/apt.conf.d/01release").with({ - "mode" => "0644", - "owner" => "root", - "group" => "root", - "content" => "APT::Default-Release \"#{param_set[:release_id]}\";" - }) - } -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/unattended_upgrades_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/unattended_upgrades_spec.rb deleted file mode 100644 index f5cad53a5b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/classes/unattended_upgrades_spec.rb +++ /dev/null @@ -1,205 +0,0 @@ -require 'spec_helper' -describe 'apt::unattended_upgrades', :type => :class do - let(:file_unattended) { '/etc/apt/apt.conf.d/50unattended-upgrades' } - let(:file_periodic) { '/etc/apt/apt.conf.d/10periodic' } - let(:facts) { { :lsbdistid => 'Debian' } } - - it { should contain_package("unattended-upgrades") } - - it { - should create_file("/etc/apt/apt.conf.d/50unattended-upgrades").with({ - "owner" => "root", - "group" => "root", - "mode" => "0644", - "require" => "Package[unattended-upgrades]", - }) - } - - it { - should create_file("/etc/apt/apt.conf.d/10periodic").with({ - "owner" => "root", - "group" => "root", - "mode" => "0644", - "require" => "Package[unattended-upgrades]", - }) - } - - describe "origins" do - describe "with param defaults" do - let(:params) {{ }} - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Allowed-Origins \{\n\t"\$\{distro_id\}:\$\{distro_codename\}-security";\n\};$/) } - end - - describe "with origins => ['ubuntu:precise-security']" do - let :params do - { :origins => ['ubuntu:precise-security'] } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Allowed-Origins \{\n\t"ubuntu:precise-security";\n\};$/) } - end - end - - describe "blacklist" do - describe "with param defaults" do - let(:params) {{ }} - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Package-Blacklist \{\n\};$/) } - end - - describe "with blacklist => []" do - let :params do - { :blacklist => ['libc6', 'libc6-dev'] } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Package-Blacklist \{\n\t"libc6";\n\t"libc6-dev";\n\};$/) } - end - end - - describe "with update => 2" do - let :params do - { :update => "2" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Update-Package-Lists "2";$/) } - end - - describe "with download => 2" do - let :params do - { :download => "2" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Download-Upgradeable-Packages "2";$/) } - end - - describe "with upgrade => 2" do - let :params do - { :upgrade => "2" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Unattended-Upgrade "2";$/) } - end - - describe "with autoclean => 2" do - let :params do - { :autoclean => "2" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::AutocleanInterval "2";$/) } - end - - describe "with auto_fix => false" do - let :params do - { :auto_fix => false } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::AutoFixInterruptedDpkg "false";$/) } - end - - describe "with minimal_steps => true" do - let :params do - { :minimal_steps => true } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::MinimalSteps "true";$/) } - end - - describe "with install_on_shutdown => true" do - let :params do - { :install_on_shutdown => true } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::InstallOnShutdown "true";$/) } - end - - describe "mail_to" do - describe "param defaults" do - let(:params) {{ }} - it { should_not contain_file(file_unattended).with_content(/^Unattended-Upgrade::Mail /) } - it { should_not contain_file(file_unattended).with_content(/^Unattended-Upgrade::MailOnlyOnError /) } - end - - describe "with mail_to => user@website, mail_only_on_error => true" do - let :params do - { :mail_to => "user@website", - :mail_only_on_error => true } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Mail "user@website";$/) } - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::MailOnlyOnError "true";$/) } - end - end - - describe "with remove_unused => false" do - let :params do - { :remove_unused => false } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Remove-Unused-Dependencies "false";$/) } - end - - describe "with auto_reboot => true" do - let :params do - { :auto_reboot => true } - end - it { should contain_file(file_unattended).with_content(/^Unattended-Upgrade::Automatic-Reboot "true";$/) } - end - - describe "dl_limit" do - describe "param defaults" do - let(:params) {{ }} - it { should_not contain_file(file_unattended).with_content(/^Acquire::http::Dl-Limit /) } - end - - describe "with dl_limit => 70" do - let :params do - { :dl_limit => "70" } - end - it { should contain_file(file_unattended).with_content(/^Acquire::http::Dl-Limit "70";$/) } - end - end - - describe "with enable => 0" do - let :params do - { :enable => "0" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Enable "0";$/) } - end - - describe "with backup_interval => 1" do - let :params do - { :backup_interval => "1" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::BackUpArchiveInterval "1";$/) } - end - - describe "with backup_level => 0" do - let :params do - { :backup_level => "0" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::BackUpLevel "0";$/) } - end - - describe "with max_age => 1" do - let :params do - { :max_age => "1" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::MaxAge "1";$/) } - end - - describe "with min_age => 1" do - let :params do - { :min_age => "1" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::MinAge "1";$/) } - end - - describe "with max_size => 1" do - let :params do - { :max_size => "1" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::MaxSize "1";$/) } - end - - describe "with download_delta => 2" do - let :params do - { :download_delta => "2" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Download-Upgradeable-Packages-Debdelta "2";$/) } - end - - describe "with verbose => 2" do - let :params do - { :verbose => "2" } - end - it { should contain_file(file_periodic).with_content(/^APT::Periodic::Verbose "2";$/) } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/builddep_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/builddep_spec.rb deleted file mode 100644 index a0cbaa4cc0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/builddep_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'spec_helper' -describe 'apt::builddep', :type => :define do - - let(:facts) { { :lsbdistid => 'Debian' } } - let(:title) { 'my_package' } - - describe "should require apt-get update" do - it { should contain_exec("apt_update").with({ - 'command' => "/usr/bin/apt-get update", - 'refreshonly' => true - }) - } - it { should contain_anchor("apt::builddep::my_package").with({ - 'require' => 'Class[Apt::Update]', - }) - } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/conf_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/conf_spec.rb deleted file mode 100644 index cda5900c03..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/conf_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -require 'spec_helper' -describe 'apt::conf', :type => :define do - let(:facts) { { :lsbdistid => 'Debian' } } - let :title do - 'norecommends' - end - - describe "when creating an apt preference" do - let :params do - { - :priority => '00', - :content => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n" - } - end - - let :filename do - "/etc/apt/apt.conf.d/00norecommends" - end - - it { should contain_apt__conf('norecommends').with({ - 'priority' => '00', - 'content' => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n" - }) - } - - it { should contain_file(filename).with({ - 'ensure' => 'present', - 'content' => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n", - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - }) - } - end - - describe "when removing an apt preference" do - let :params do - { - :ensure => 'absent', - :priority => '00', - :content => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n" - } - end - - let :filename do - "/etc/apt/apt.conf.d/00norecommends" - end - - it { should contain_file(filename).with({ - 'ensure' => 'absent', - 'content' => "Apt::Install-Recommends 0;\nApt::AutoRemove::InstallRecommends 1;\n", - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - }) - } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/force_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/force_spec.rb deleted file mode 100644 index b8665e6dab..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/force_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -require 'spec_helper' -describe 'apt::force', :type => :define do - let(:facts) { { :lsbdistid => 'Debian' } } - let :pre_condition do - 'include apt::params' - end - - let :title do - 'my_package' - end - - let :default_params do - { - :release => 'testing', - :version => false - } - end - - describe "when using default parameters" do - let :params do - default_params - end - it { should contain_exec("/usr/bin/apt-get -y -t #{params[:release]} install #{title}").with( - :unless => "/usr/bin/test \$(/usr/bin/apt-cache policy -t #{params[:release]} #{title} | /bin/grep -E 'Installed|Candidate' | /usr/bin/uniq -s 14 | /usr/bin/wc -l) -eq 1", - :timeout => '300' - ) } - end - - describe "when specifying false release parameter" do - let :params do - default_params.merge(:release => false) - end - it { should contain_exec("/usr/bin/apt-get -y install #{title}").with( - :unless => "/usr/bin/dpkg -s #{title} | grep -q 'Status: install'" - ) } - end - - describe "when specifying version parameter" do - let :params do - default_params.merge(:version => '1') - end - it { should contain_exec("/usr/bin/apt-get -y -t #{params[:release]} install #{title}=#{params[:version]}").with( - :unless => "/usr/bin/apt-cache policy -t #{params[:release]} #{title} | /bin/grep -q 'Installed: #{params[:version]}'" - ) } - end - - describe "when specifying false release and version parameters" do - let :params do - default_params.merge( - :release => false, - :version => '1' - ) - end - it { should contain_exec("/usr/bin/apt-get -y install #{title}=1").with( - :unless => "/usr/bin/dpkg -s #{title} | grep -q 'Version: #{params[:version]}'" - ) } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/key_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/key_spec.rb deleted file mode 100644 index 4ba7b87eae..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/key_spec.rb +++ /dev/null @@ -1,124 +0,0 @@ -require 'spec_helper' -describe 'apt::key', :type => :define do - let(:facts) { { :lsbdistid => 'Debian' } } - let :title do - '8347A27F' - end - - let :default_params do - { - :key => title, - :ensure => 'present', - :key_server => "keyserver.ubuntu.com", - :key_source => false, - :key_content => false - } - end - - [{}, - { - :ensure => 'absent' - }, - { - :ensure => 'random' - }, - { - :key_source => 'ftp://ftp.example.org/key', - }, - { - :key_content => 'deadbeef', - } - ].each do |param_set| - - let :param_hash do - param_hash = default_params.merge(param_set) - param_hash[:key].upcase! if param_hash[:key] - param_hash - end - - let :params do - param_set - end - - let :digest do - str = String.new - str << param_hash[:key].to_s << '/' - str << param_hash[:key_content].to_s << '/' - str << param_hash[:key_source].to_s << '/' - str << param_hash[:key_server].to_s << '/' - Digest::SHA1.hexdigest(str) - end - - describe "when #{param_set == {} ? "using default" : "specifying"} define parameters" do - - it { - if [:present, 'present', :absent, 'absent'].include? param_hash[:ensure] - should contain_apt__params - end - } - - it { - if [:present, 'present'].include? param_hash[:ensure] - should_not contain_exec("apt::key #{param_hash[:key]} absent") - should contain_anchor("apt::key #{param_hash[:key]} present") - should contain_exec(digest).with({ - "path" => "/bin:/usr/bin", - "unless" => "/usr/bin/apt-key list | /bin/grep '#{param_hash[:key]}'" - }) - elsif [:absent, 'absent'].include? param_hash[:ensure] - should_not contain_anchor("apt::key #{param_hash[:key]} present") - should contain_exec("apt::key #{param_hash[:key]} absent").with({ - "path" => "/bin:/usr/bin", - "onlyif" => "apt-key list | grep '#{param_hash[:key]}'", - "command" => "apt-key del '#{param_hash[:key]}'" - }) - else - expect { should raise_error(Puppet::Error) } - end - } - - it { - if [:present, 'present'].include? param_hash[:ensure] - if param_hash[:key_content] - should contain_exec(digest).with({ - "command" => "echo '#{param_hash[:key_content]}' | /usr/bin/apt-key add -" - }) - elsif param_hash[:key_source] - should contain_exec(digest).with({ - "command" => "wget -q '#{param_hash[:key_source]}' -O- | apt-key add -" - }) - elsif param_hash[:key_server] - should contain_exec(digest).with({ - "command" => "apt-key adv --keyserver '#{param_hash[:key_server]}' --recv-keys '#{param_hash[:key]}'" - }) - end - end - } - - end - end - - [{ :ensure => 'present' }, { :ensure => 'absent' }].each do |param_set| - describe "should correctly handle duplicate definitions" do - - let :pre_condition do - "apt::key { 'duplicate': key => '#{title}'; }" - end - - let(:params) { param_set } - - it { - if param_set[:ensure] == 'present' - should contain_anchor("apt::key #{title} present") - should contain_apt__key(title) - should contain_apt__key("duplicate") - elsif param_set[:ensure] == 'absent' - expect { should raise_error(Puppet::Error) } - end - } - - end - end - -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/pin_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/pin_spec.rb deleted file mode 100644 index 78a9b12690..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/pin_spec.rb +++ /dev/null @@ -1,102 +0,0 @@ -require 'spec_helper' -describe 'apt::pin', :type => :define do - let(:facts) { { :lsbdistid => 'Debian' } } - let(:title) { 'my_pin' } - - let :default_params do - { - :ensure => 'present', - :order => '', - :packages => '*', - :priority => '0', - :release => nil - } - end - - [ - { :params => {}, - :content => "# my_pin\nExplanation: : my_pin\nPackage: *\nPin: release a=my_pin\nPin-Priority: 0\n" - }, - { - :params => { - :packages => 'apache', - :priority => '1' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n" - }, - { - :params => { - :order => 50, - :packages => 'apache', - :priority => '1' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n" - }, - { - :params => { - :ensure => 'absent', - :packages => 'apache', - :priority => '1' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n" - }, - { - :params => { - :packages => 'apache', - :priority => '1', - :release => 'my_newpin' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_newpin\nPin-Priority: 1\n" - }, - { - :params => { - :packages => 'apache', - :priority => '1', - :version => '2.2.16*' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: version 2.2.16*\nPin-Priority: 1\n" - }, - { - :params => { - :priority => '1', - :origin => 'ftp.de.debian.org' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: *\nPin: origin ftp.de.debian.org\nPin-Priority: 1\n" - }, - { - :params => { - :packages => 'apache', - :priority => '1', - :release => 'stable', - :codename => 'wheezy', - :release_version => '3.0', - :component => 'main', - :originator => 'Debian', - :label => 'Debian' - }, - :content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=stable, n=wheezy, v=3.0, c=main, o=Debian, l=Debian\nPin-Priority: 1\n" - }, - ].each do |param_set| - describe "when #{param_set == {} ? "using default" : "specifying"} define parameters" do - let :param_hash do - default_params.merge(param_set[:params]) - end - - let :params do - param_set[:params] - end - - it { should contain_class("apt::params") } - - it { should contain_file("#{title}.pref").with({ - 'ensure' => param_hash[:ensure], - 'path' => "/etc/apt/preferences.d/#{param_hash[:order] == '' ? "" : "#{param_hash[:order]}-"}#{title}.pref", - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - 'content' => param_set[:content], - }) - } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/ppa_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/ppa_spec.rb deleted file mode 100644 index 0c3bd75ed7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/ppa_spec.rb +++ /dev/null @@ -1,156 +0,0 @@ -require 'spec_helper' -describe 'apt::ppa', :type => :define do - [ - { - :lsbdistrelease => '11.04', - :lsbdistcodename => 'natty', - :operatingsystem => 'Ubuntu', - :lsbdistid => 'Ubuntu', - :package => 'python-software-properties' - }, - { - :lsbdistrelease => '12.10', - :lsbdistcodename => 'quantal', - :operatingsystem => 'Ubuntu', - :lsbdistid => 'Ubuntu', - :package => 'software-properties-common' - }, - ].each do |platform| - context "on #{platform[:lsbdistcodename]}" do - let :facts do - { - :lsbdistrelease => platform[:lsbdistrelease], - :lsbdistcodename => platform[:lsbdistcodename], - :operatingsystem => platform[:operatingsystem], - :lsbdistid => platform[:lsbdistid], - } - end - let :release do - "#{platform[:lsbdistcodename]}" - end - let :package do - "#{platform[:package]}" - end - let :options do - "-y" - end - ['ppa:dans_ppa', 'dans_ppa','ppa:dans-daily/ubuntu'].each do |t| - describe "with title #{t}" do - let :pre_condition do - 'class { "apt": }' - end - let :title do - t - end - let :filename do - t.sub(/^ppa:/,'').gsub('/','-') << "-" << "#{release}.list" - end - - it { should contain_package("#{package}") } - - it { should contain_exec("apt_update").with( - 'command' => '/usr/bin/apt-get update', - 'refreshonly' => true - ) - } - - it { should contain_exec("add-apt-repository-#{t}").with( - 'command' => "/usr/bin/add-apt-repository #{options} #{t}", - 'unless' => "/usr/bin/test -s /etc/apt/sources.list.d/#{filename}", - 'require' => ["File[sources.list.d]", "Package[#{package}]"], - 'notify' => "Exec[apt_update]" - ) - } - - it { should create_file("/etc/apt/sources.list.d/#{filename}").with( - 'ensure' => 'file', - 'require' => "Exec[add-apt-repository-#{t}]" - ) - } - end - end - describe 'without a proxy defined' do - let :title do - 'rspec_ppa' - end - let :pre_condition do - 'class { "apt": - proxy_host => false - }' - end - let :filename do - "#{title}-#{release}.list" - end - - it { should contain_exec("add-apt-repository-#{title}").with( - 'environment' => [], - 'command' => "/usr/bin/add-apt-repository #{options} #{title}", - 'unless' => "/usr/bin/test -s /etc/apt/sources.list.d/#{filename}", - 'require' => ["File[sources.list.d]", "Package[#{package}]"], - 'notify' => "Exec[apt_update]" - ) - } - end - - describe 'behind a proxy' do - let :title do - 'rspec_ppa' - end - let :pre_condition do - 'class { "apt": - proxy_host => "user:pass@proxy", - }' - end - let :filename do - "#{title}-#{release}.list" - end - - it { should contain_exec("add-apt-repository-#{title}").with( - 'environment' => [ - "http_proxy=http://user:pass@proxy:8080", - "https_proxy=http://user:pass@proxy:8080", - ], - 'command' => "/usr/bin/add-apt-repository #{options} #{title}", - 'unless' => "/usr/bin/test -s /etc/apt/sources.list.d/#{filename}", - 'require' => ["File[sources.list.d]", "Package[#{package}]"], - 'notify' => "Exec[apt_update]" - ) - } - end - end - end - - [ { :lsbdistcodename => 'natty', - :package => 'python-software-properties' }, - { :lsbdistcodename => 'quantal', - :package => 'software-properties-common'}, - ].each do |platform| - context "on #{platform[:lsbdistcodename]}" do - describe "it should not error if package['#{platform[:package]}'] is already defined" do - let :pre_condition do - 'class {"apt": }' + - 'package { "#{platform[:package]}": }->Apt::Ppa["ppa"]' - end - let :facts do - {:lsbdistcodename => '#{platform[:lsbdistcodename]}', - :operatingsystem => 'Ubuntu', - :lsbdistid => 'Ubuntu'} - end - let(:title) { "ppa" } - let(:release) { "#{platform[:lsbdistcodename]}" } - it { should contain_package('#{platform[:package]}') } - end - end - end - - describe "without Class[apt] should raise a Puppet::Error" do - let(:release) { "natty" } - let(:title) { "ppa" } - it { expect { should contain_apt__ppa(title) }.to raise_error(Puppet::Error) } - end - - describe "without release should raise a Puppet::Error" do - let(:title) { "ppa:" } - it { expect { should contain_apt__ppa(:release) }.to raise_error(Puppet::Error) } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/source_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/source_spec.rb deleted file mode 100644 index 9da8b235fe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/defines/source_spec.rb +++ /dev/null @@ -1,167 +0,0 @@ -require 'spec_helper' -describe 'apt::source', :type => :define do - let(:facts) { { :lsbdistid => 'Debian' } } - let :title do - 'my_source' - end - - let :default_params do - { - :ensure => 'present', - :location => '', - :release => 'karmic', - :repos => 'main', - :include_src => true, - :required_packages => false, - :key => false, - :key_server => 'keyserver.ubuntu.com', - :key_content => false, - :key_source => false, - :pin => false - } - end - - [{}, - { - :location => 'http://example.com', - :release => 'precise', - :repos => 'security', - :include_src => false, - :required_packages => 'apache', - :key => 'key_name', - :key_server => 'keyserver.debian.com', - :pin => '600', - :key_content => 'ABCD1234' - }, - { - :key => 'key_name', - :key_server => 'keyserver.debian.com', - :key_content => false, - }, - { - :ensure => 'absent', - :location => 'http://example.com', - :release => 'precise', - :repos => 'security', - }, - { - :release => '', - }, - { - :release => 'custom', - }, - { - :architecture => 'amd64', - } - ].each do |param_set| - describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do - let :param_hash do - default_params.merge(param_set) - end - - let :facts do - {:lsbdistcodename => 'karmic', :lsbdistid => 'Ubuntu'} - end - - let :params do - param_set - end - - let :filename do - "/etc/apt/sources.list.d/#{title}.list" - end - - let :content do - content = "# #{title}" - if param_hash[:architecture] - arch = "[arch=#{param_hash[:architecture]}] " - end - content << "\ndeb #{arch}#{param_hash[:location]} #{param_hash[:release]} #{param_hash[:repos]}\n" - - if param_hash[:include_src] - content << "deb-src #{arch}#{param_hash[:location]} #{param_hash[:release]} #{param_hash[:repos]}\n" - end - content - end - - it { should contain_apt__params } - - it { should contain_file("#{title}.list").with({ - 'ensure' => param_hash[:ensure], - 'path' => filename, - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - 'content' => content, - }) - } - - it { - if param_hash[:pin] - should contain_apt__pin(title).with({ - "priority" => param_hash[:pin], - "before" => "File[#{title}.list]" - }) - else - should_not contain_apt__pin(title).with({ - "priority" => param_hash[:pin], - "before" => "File[#{title}.list]" - }) - end - } - - it { - should contain_exec("apt_update").with({ - "command" => "/usr/bin/apt-get update", - "refreshonly" => true - }) - } - - it { - if param_hash[:required_packages] - should contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({ - "command" => "/usr/bin/apt-get -y install #{param_hash[:required_packages]}", - "subscribe" => "File[#{title}.list]", - "refreshonly" => true, - "before" => 'Exec[apt_update]', - }) - else - should_not contain_exec("Required packages: '#{param_hash[:required_packages]}' for #{title}").with({ - "command" => "/usr/bin/apt-get -y install #{param_hash[:required_packages]}", - "subscribe" => "File[#{title}.list]", - "refreshonly" => true - }) - end - } - - it { - if param_hash[:key] - should contain_apt__key("Add key: #{param_hash[:key]} from Apt::Source #{title}").with({ - "key" => param_hash[:key], - "ensure" => :present, - "key_server" => param_hash[:key_server], - "key_content" => param_hash[:key_content], - "key_source" => param_hash[:key_source], - "before" => "File[#{title}.list]" - }) - else - should_not contain_apt__key("Add key: #{param_hash[:key]} from Apt::Source #{title}").with({ - "key" => param_hash[:key], - "ensure" => :present, - "key_server" => param_hash[:key_server], - "key_content" => param_hash[:key_content], - "key_source" => param_hash[:key_source], - "before" => "File[#{title}.list]" - }) - end - } - end - end - describe "without release should raise a Puppet::Error" do - let(:default_params) { Hash.new } - let(:facts) { Hash.new } - it { expect { should raise_error(Puppet::Error) } } - let(:facts) { { :lsbdistcodename => 'lucid', :lsbdistid => 'Ubuntu' } } - it { should contain_apt__source(title) } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/spec_helper.rb deleted file mode 100644 index 2c6f56649a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/spec_helper_acceptance.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/spec_helper_acceptance.rb deleted file mode 100644 index 3352564ce7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/spec/spec_helper_acceptance.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'beaker-rspec' - -# Install Puppet -unless ENV['RS_PROVISION'] == 'no' - hosts.each do |host| - if host.is_pe? - install_pe - else - install_puppet - on host, "mkdir -p #{host['distmoduledir']}" - end - end -end - -UNSUPPORTED_PLATFORMS = ['RedHat','Suse','windows','AIX','Solaris'] - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Readable test descriptions - c.formatter = :documentation - - # Configure all nodes in nodeset - c.before :suite do - # Install module and dependencies - puppet_module_install(:source => proj_root, :module_name => 'apt') - hosts.each do |host| - shell('/bin/touch /etc/puppet/hiera.yaml') - shell('puppet module install puppetlabs-stdlib --version 2.2.1', { :acceptable_exit_codes => [0,1] }) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/10periodic.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/10periodic.erb deleted file mode 100644 index 5737c9ac29..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/10periodic.erb +++ /dev/null @@ -1,12 +0,0 @@ -APT::Periodic::Enable "<%= @enable %>"; -APT::Periodic::BackUpArchiveInterval "<%= @backup_interval %>"; -APT::Periodic::BackUpLevel "<%= @backup_level %>"; -APT::Periodic::MaxAge "<%= @max_age %>"; -APT::Periodic::MinAge "<%= @min_age %>"; -APT::Periodic::MaxSize "<%= @max_size %>"; -APT::Periodic::Update-Package-Lists "<%= @update %>"; -APT::Periodic::Download-Upgradeable-Packages "<%= @download %>"; -APT::Periodic::Download-Upgradeable-Packages-Debdelta "<%= @download_delta %>"; -APT::Periodic::Unattended-Upgrade "<%= @upgrade %>"; -APT::Periodic::AutocleanInterval "<%= @autoclean %>"; -APT::Periodic::Verbose "<%= @verbose %>"; diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/50unattended-upgrades.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/50unattended-upgrades.erb deleted file mode 100644 index 4df0f74401..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/50unattended-upgrades.erb +++ /dev/null @@ -1,53 +0,0 @@ -// Automatically upgrade packages from these (origin:archive) pairs -Unattended-Upgrade::Allowed-Origins { -<% @origins.each do |origin| -%> - "<%= origin %>"; -<% end -%> -}; - -// List of packages to not update -Unattended-Upgrade::Package-Blacklist { -<% @blacklist.each do |package| -%> - "<%= package %>"; -<% end -%> -}; - -// This option allows you to control if on a unclean dpkg exit -// unattended-upgrades will automatically run -// dpkg --force-confold --configure -a -// The default is true, to ensure updates keep getting installed -Unattended-Upgrade::AutoFixInterruptedDpkg "<%= @auto_fix %>"; - -// Split the upgrade into the smallest possible chunks so that -// they can be interrupted with SIGUSR1. This makes the upgrade -// a bit slower but it has the benefit that shutdown while a upgrade -// is running is possible (with a small delay) -Unattended-Upgrade::MinimalSteps "<%= @minimal_steps %>"; - -// Install all unattended-upgrades when the machine is shuting down -// instead of doing it in the background while the machine is running -// This will (obviously) make shutdown slower -Unattended-Upgrade::InstallOnShutdown "<%= @install_on_shutdown %>"; - -// Send email to this address for problems or packages upgrades -// If empty or unset then no email is sent, make sure that you -// have a working mail setup on your system. A package that provides -// 'mailx' must be installed. -<% if @mail_to != "NONE" %>Unattended-Upgrade::Mail "<%= @mail_to %>";<% end %> - -// Set this value to "true" to get emails only on errors. Default -// is to always send a mail if Unattended-Upgrade::Mail is set -<% if @mail_to != "NONE" %>Unattended-Upgrade::MailOnlyOnError "<%= @mail_only_on_error %>";<% end %> - -// Do automatic removal of new unused dependencies after the upgrade -// (equivalent to apt-get autoremove) -Unattended-Upgrade::Remove-Unused-Dependencies "<%= @remove_unused %>"; - -// Automatically reboot *WITHOUT CONFIRMATION* if a -// the file /var/run/reboot-required is found after the upgrade -Unattended-Upgrade::Automatic-Reboot "<%= @auto_reboot %>"; - - -// Use apt bandwidth limit feature, this example limits the download -// speed to 70kb/sec -<% if @dl_limit != "NONE" %>Acquire::http::Dl-Limit "<%= @dl_limit %>";<% end %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/pin.pref.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/pin.pref.erb deleted file mode 100644 index eed0c10db6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/pin.pref.erb +++ /dev/null @@ -1,22 +0,0 @@ -<%- -@pin = "release a=#{@name}" # default value -if @pin_release.length > 0 - options = [] - options.push("a=#{@release}") if @release.length > 0 - options.push("n=#{@codename}") if @codename.length > 0 - options.push("v=#{@release_version}") if @release_version.length > 0 - options.push("c=#{@component}") if @component.length > 0 - options.push("o=#{@originator}") if @originator.length > 0 - options.push("l=#{@label}") if @label.length > 0 - @pin = "release #{options.join(', ')}" -elsif @version.length > 0 - @pin = "version #{@version}" -elsif @origin.length > 0 - @pin = "origin #{@origin}" -end --%> -# <%= @name %> -Explanation: <%= @explanation %> -Package: <%= @packages %> -Pin: <%= @pin %> -Pin-Priority: <%= @priority %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/source.list.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/source.list.erb deleted file mode 100644 index 9946966ee5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/templates/source.list.erb +++ /dev/null @@ -1,5 +0,0 @@ -# <%= @name %> -deb <% if @architecture %>[arch=<%= @architecture %>] <% end %><%= @location %> <%= @release_real %> <%= @repos %> -<%- if @include_src then -%> -deb-src <% if @architecture %>[arch=<%= @architecture %>] <% end %><%= @location %> <%= @release_real %> <%= @repos %> -<%- end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/builddep.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/builddep.pp deleted file mode 100644 index 8b4f796408..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/builddep.pp +++ /dev/null @@ -1,2 +0,0 @@ -class { 'apt': } -apt::builddep{ 'glusterfs-server': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/debian/testing.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/debian/testing.pp deleted file mode 100644 index 8245b3a337..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/debian/testing.pp +++ /dev/null @@ -1,2 +0,0 @@ -class { 'apt': } -class { 'apt::debian::testing': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/debian/unstable.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/debian/unstable.pp deleted file mode 100644 index 8605179295..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/debian/unstable.pp +++ /dev/null @@ -1,2 +0,0 @@ -class { 'apt': } -class { 'apt::debian::unstable': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/force.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/force.pp deleted file mode 100644 index 59ad8f1b57..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/force.pp +++ /dev/null @@ -1,17 +0,0 @@ -# force.pp - -# force a package from a specific release -apt::force { 'package1': - release => 'backports', -} - -# force a package to be a specific version -apt::force { 'package2': - version => '1.0.0-1', -} - -# force a package from a specific release to be a specific version -apt::force { 'package3': - release => 'sid', - version => '2.0.0-1', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/init.pp deleted file mode 100644 index abc75afa25..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/init.pp +++ /dev/null @@ -1 +0,0 @@ -class { 'apt': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/key.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/key.pp deleted file mode 100644 index 79e0e1b749..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/key.pp +++ /dev/null @@ -1,6 +0,0 @@ -# Declare Apt key for apt.puppetlabs.com source -apt::key { 'puppetlabs': - key => '4BD6EC30', - key_server => 'pgp.mit.edu', - key_options => 'http-proxy="http://proxyuser:proxypass@example.org:3128"', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/params.pp deleted file mode 100644 index 5ddf3c6551..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/params.pp +++ /dev/null @@ -1 +0,0 @@ -include apt::params diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/pin.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/pin.pp deleted file mode 100644 index 6a9024c234..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/pin.pp +++ /dev/null @@ -1,5 +0,0 @@ -# pin a release in apt, useful for unstable repositories -apt::pin { 'foo': - packages => '*', - priority => 0, -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/ppa.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/ppa.pp deleted file mode 100644 index e728f6f10f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/ppa.pp +++ /dev/null @@ -1,4 +0,0 @@ -class { 'apt': } - -# Example declaration of an Apt PPA -apt::ppa{ 'ppa:openstack-ppa/bleeding-edge': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/release.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/release.pp deleted file mode 100644 index 823f5861fa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/release.pp +++ /dev/null @@ -1,4 +0,0 @@ -class { 'apt': } -class { 'apt::release': - release_id => 'karmic' -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/source.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/source.pp deleted file mode 100644 index c20b59662a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/source.pp +++ /dev/null @@ -1,29 +0,0 @@ -# Declare the apt class to manage /etc/apt/sources.list and /etc/sources.list.d -class { 'apt': } - -# Install the puppetlabs apt source -# Release is automatically obtained from lsbdistcodename fact if available. -apt::source { 'puppetlabs': - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', -} - -# test two sources with the same key -apt::source { 'debian_testing': - location => 'http://debian.mirror.iweb.ca/debian/', - release => 'testing', - repos => 'main contrib non-free', - key => '46925553', - key_server => 'subkeys.pgp.net', - pin => '-10', -} -apt::source { 'debian_unstable': - location => 'http://debian.mirror.iweb.ca/debian/', - release => 'unstable', - repos => 'main contrib non-free', - key => '46925553', - key_server => 'subkeys.pgp.net', - pin => '-10', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/unattended_upgrades.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/unattended_upgrades.pp deleted file mode 100644 index 3b9b49eb72..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/apt/tests/unattended_upgrades.pp +++ /dev/null @@ -1 +0,0 @@ -include apt::unattended_upgrades diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/.travis.yml deleted file mode 100644 index 788946406c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: ruby -rvm: - - "1.8.7" -# life with later versions of ruby gets interesting with 2.6..so lets -# ignore them for now -# - "1.9.2" -# - "1.9.3" -# - ruby-head ..that doesnt work. would be nice to do "current" - -env: -#find versions here https://rubygems.org/gems/puppet/versions -# spec_helper pretty much fails on these earlier versions. -# - PUPPET_VERSION=0.24.5 -# - PUPPET_VERSION=0.25.5 - - PUPPET_VERSION=2.6.18 - - PUPPET_VERSION=2.7.21 - - PUPPET_VERSION=3.1.1 - - -before_script: - - cd beanstalkd - - bundle install - - bundle show - -script: - - bundle exec rake diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/Gemfile deleted file mode 100644 index c9aabd4b8c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/Gemfile +++ /dev/null @@ -1,12 +0,0 @@ -source 'https://rubygems.org' - -puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7'] - - -gem 'rake' -gem 'rspec-expectations' -gem 'rspec' -gem 'facter' -gem 'puppet', puppetversion -gem 'rspec-puppet' -gem 'puppetlabs_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/README.md deleted file mode 100644 index 6abbcb7fb2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/README.md +++ /dev/null @@ -1,68 +0,0 @@ -puppet-beanstalkd -================= -[![Build Status](https://travis-ci.org/keen99/puppet-beanstalkd.png?branch=master)](https://travis-ci.org/keen99/puppet-beanstalkd) - -puppet module for managing beanstalkd, a simple and fast work queue - https://github.com/kr/beanstalkd - - -## Supported OSes - -redhat/centos and debian/ubuntu currently. Please PR updates for others! - -Requires packages (rpm, etc) with traditional init scripts supported by service{} for your OS. - - -## Basic Usage - -Drop the beanstalkd directory into your modules tree and realize the define: - - beanstalkd::config{"my beanstalk install": } - -## Optional parameters - - listenaddress => '0.0.0.0', - listenport => '13000', - maxjobsize => '65535', - maxconnections => '1024', - binlogdir => '/var/lib/beanstalkd/binlog', # set empty ( '' ) to disable binlog - binlogfsync => undef, - binlogsize => '10485760', - ensure => 'running', # running, stopped, absent - packageversion => 'latest', # latest, present, or specific version - packagename => undef, # override package name - servicename => undef # override service name - - - - - -## Tests - -To run unit tests, cd into beanstalkd and execute "run-tests.sh" - -Requires ruby and bundler, everything else should get installed by the test. - -``` -$$ puppet-beanstalkd/beanstalkd# ./run-tests.sh -Using rake (10.0.4) -Using diff-lcs (1.2.4) -Using facter (1.7.0) -Using json_pure (1.7.7) -Using hiera (1.2.1) -Using metaclass (0.0.1) -Using mocha (0.13.3) -Using puppet (3.1.1) -Using rspec-core (2.13.1) -Using rspec-expectations (2.13.0) -Using rspec-mocks (2.13.1) -Using rspec (2.13.0) -Using rspec-puppet (0.1.6) -Using puppetlabs_spec_helper (0.4.1) -Using bundler (1.1.4) -Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. -/usr/bin/ruby1.9.1 -S rspec spec/defines/config_spec.rb -................... - -Finished in 0.84772 seconds -19 examples, 0 failures -``` diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/Rakefile deleted file mode 100644 index f6d5a0c463..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/Rakefile +++ /dev/null @@ -1,10 +0,0 @@ -require 'rake' - -require 'rspec/core/rake_task' - -task :default => [:spec] - - -RSpec::Core::RakeTask.new(:spec) do |t| - t.pattern = 'spec/*/*_spec.rb' -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/manifests/init.pp deleted file mode 100644 index fc57ab851a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/manifests/init.pp +++ /dev/null @@ -1,124 +0,0 @@ - -# usage: -# -# beanstalkd::config { name: -# listenaddress => '0.0.0.0', -# listenport => '13000', -# maxjobsize => '65535', -# maxconnections => '1024', -# binlogdir => '/var/lib/beanstalkd/binlog', -# binlogfsync => undef, -# binlogsize => '10485760', -# ensure => 'running', # running, stopped, absent -# packageversion => 'latest', # latest, present, or specific version -# packagename => undef, # override package name -# servicename => undef # override service name -# } - - -define beanstalkd::config ( # name - $listenaddress = '0.0.0.0', - $listenport = '13000', - $maxjobsize = '65535', - $maxconnections = '1024', # results in open file limit - $binlogdir = '/var/lib/beanstalkd/binlog', # set empty ( '' ) to disable binlog - $binlogfsync = undef, # unset = no explicit fsync - $binlogsize = '10485760', - # - $ensure = 'running', # running, stopped, absent - $packageversion = 'latest', # latest, present, or specific version - $packagename = undef, # got your own custom package? override the default name/service here. - $servicename = undef -) { - - case $::operatingsystem { - ubuntu, debian: { - $defaultpackagename = 'beanstalkd' - $defaultservicename = 'beanstalkd' - $user = 'beanstalkd' - $configfile = '/etc/default/beanstalkd' - $configtemplate = "${module_name}/debian/beanstalkd_default.erb" # please create me! - $hasstatus = 'true' - $restart = '/etc/init.d/beanstalkd restart' - } - centos, redhat: { - $defaultpackagename = 'beanstalkd' - $defaultservicename = 'beanstalkd' - $user = 'beanstalkd' - $configfile = '/etc/sysconfig/beanstalkd' - $configtemplate = "${module_name}/redhat/beanstalkd_sysconfig.erb" - $hasstatus = 'true' - $restart = '/etc/init.d/beanstalkd restart' - } - # TODO: add more OS support! - default: { - fail("ERROR [${module_name}]: I don't know how to manage this OS: ${::operatingsystem}") - } - } - - # simply the users experience for running/stopped/absent, and use ensure to cover those bases - case $ensure { - absent: { - $ourpackageversion = 'absent' - $serviceenable = 'false' - $serviceensure = 'stopped' - $fileensure = 'absent' - } - running: { - $serviceenable = 'true' - $serviceensure = 'running' - $fileensure = 'present' - } - stopped: { - $serviceenable = 'false' - $serviceensure = 'stopped' - $fileensure = 'present' - } - default: { - fail("ERROR [${module_name}]: enable must be one of: running stopped absent") - } - } - - # for packageversion, use what's configured unless we're set (which should only be in the absent case..) - if ! $ourpackageversion { - $ourpackageversion = $packageversion - } - - # for service and package name - if we've specified one, use it. else use the default - if $packagename == undef { - $ourpackagename = $defaultpackagename - } else { - $ourpackagename = $packagename - } - - if $servicename == undef { - $ourservicename = $defaultservicename - } else { - $ourservicename = $servicename - } - - package { $ourpackagename: - ensure => $ourpackageversion - } - - service { $ourservicename: - enable => $serviceenable, - ensure => $serviceensure, - hasstatus => $hasstatus, - restart => $restart, - subscribe => [ - Package[$ourpackagename], - File[$configfile] - ], - } - - file { $configfile: - content => template($configtemplate), - owner => 'root', - group => 'root', - mode => 0644, - ensure => $fileensure, - require => Package[$ourpackagename], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/run-tests.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/run-tests.sh deleted file mode 100755 index 89896b94fb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/run-tests.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env sh - -bundle="bundle" -gotbundle=0 -for i in $(echo "$PATH" | tr ":" " ") - do - if [ -e $i/$bundle ] - then - gotbundle=1 - break - fi -done -if [ $gotbundle = 0 ] - then - echo "ERROR: please install 'bundler' for ruby from http://gembundler.com/ and make sure '$bundle' is in your path" - exit 1 -fi - -$bundle install || exit $? -$bundle exec rake || exit $? diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/defines/config_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/defines/config_spec.rb deleted file mode 100644 index e70c3fe40f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/defines/config_spec.rb +++ /dev/null @@ -1,80 +0,0 @@ -require 'spec_helper' - - -describe 'beanstalkd::config' do - let (:title) {'a title is required'} - - #basic OS support testing - context "on Debian" do - let (:facts) { { :operatingsystem => 'debian' } } - it { should contain_package('beanstalkd').with_ensure('latest') } - it { should contain_service('beanstalkd').with_ensure('running') } - end - context "on redhat" do - let (:facts) { { :operatingsystem => 'debian' } } - it { should contain_package('beanstalkd').with_ensure('latest') } - it { should contain_service('beanstalkd').with_ensure('running') } - end - context "on ubuntu" do - let (:facts) { { :operatingsystem => 'ubuntu' } } - it { should contain_package('beanstalkd').with_ensure('latest') } - it { should contain_service('beanstalkd').with_ensure('running') } - end - context "on centos" do - let (:facts) { { :operatingsystem => 'centos' } } - it { should contain_package('beanstalkd').with_ensure('latest') } - it { should contain_service('beanstalkd').with_ensure('running') } - end - context "on unsupported OS" do - let (:facts) { { :operatingsystem => 'unsupported' } } - it { expect { raise_error(Puppet::Error) } } - end - - #now lets test our various parameters - for the most part this shouldn't care what OS it is - #if your OS support needs more specific testing, do it! - - #ensure testing - remember this does both service and packages, so test both - context "on redhat, ensure absent" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :ensure => 'absent' } } - it { should contain_package('beanstalkd').with_ensure('absent') } - it { should contain_service('beanstalkd').with_ensure('stopped') } - end - context "on redhat, ensure running" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :ensure => 'running' } } - it { should contain_package('beanstalkd').with_ensure('latest') } - it { should contain_service('beanstalkd').with_ensure('running') } - end - context "on redhat, ensure stopped" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :ensure => 'stopped' } } - it { should contain_package('beanstalkd').with_ensure('latest') } - it { should contain_service('beanstalkd').with_ensure('stopped') } - end - context "on redhat, ensure broken" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :ensure => 'broken' } } - it { expect { raise_error(Puppet::Error) } } - end - - #custom package/service names - context "on redhat, servicename testbeans" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :servicename => 'testbeans' } } - it { should contain_service('testbeans').with_ensure('running') } - end - context "on redhat, packagename testbeans" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :packagename => 'testbeans' } } - it { should contain_package('testbeans').with_ensure('latest') } - end - #and custom version - context "on redhat, package version" do - let (:facts) { { :operatingsystem => 'redhat' } } - let(:params) { { :packageversion => 'testversion' } } - it { should contain_package('beanstalkd').with_ensure('testversion') } - end - - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/manifests/site.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/manifests/site.pp deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/manifests/init.pp deleted file mode 100644 index fc57ab851a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/manifests/init.pp +++ /dev/null @@ -1,124 +0,0 @@ - -# usage: -# -# beanstalkd::config { name: -# listenaddress => '0.0.0.0', -# listenport => '13000', -# maxjobsize => '65535', -# maxconnections => '1024', -# binlogdir => '/var/lib/beanstalkd/binlog', -# binlogfsync => undef, -# binlogsize => '10485760', -# ensure => 'running', # running, stopped, absent -# packageversion => 'latest', # latest, present, or specific version -# packagename => undef, # override package name -# servicename => undef # override service name -# } - - -define beanstalkd::config ( # name - $listenaddress = '0.0.0.0', - $listenport = '13000', - $maxjobsize = '65535', - $maxconnections = '1024', # results in open file limit - $binlogdir = '/var/lib/beanstalkd/binlog', # set empty ( '' ) to disable binlog - $binlogfsync = undef, # unset = no explicit fsync - $binlogsize = '10485760', - # - $ensure = 'running', # running, stopped, absent - $packageversion = 'latest', # latest, present, or specific version - $packagename = undef, # got your own custom package? override the default name/service here. - $servicename = undef -) { - - case $::operatingsystem { - ubuntu, debian: { - $defaultpackagename = 'beanstalkd' - $defaultservicename = 'beanstalkd' - $user = 'beanstalkd' - $configfile = '/etc/default/beanstalkd' - $configtemplate = "${module_name}/debian/beanstalkd_default.erb" # please create me! - $hasstatus = 'true' - $restart = '/etc/init.d/beanstalkd restart' - } - centos, redhat: { - $defaultpackagename = 'beanstalkd' - $defaultservicename = 'beanstalkd' - $user = 'beanstalkd' - $configfile = '/etc/sysconfig/beanstalkd' - $configtemplate = "${module_name}/redhat/beanstalkd_sysconfig.erb" - $hasstatus = 'true' - $restart = '/etc/init.d/beanstalkd restart' - } - # TODO: add more OS support! - default: { - fail("ERROR [${module_name}]: I don't know how to manage this OS: ${::operatingsystem}") - } - } - - # simply the users experience for running/stopped/absent, and use ensure to cover those bases - case $ensure { - absent: { - $ourpackageversion = 'absent' - $serviceenable = 'false' - $serviceensure = 'stopped' - $fileensure = 'absent' - } - running: { - $serviceenable = 'true' - $serviceensure = 'running' - $fileensure = 'present' - } - stopped: { - $serviceenable = 'false' - $serviceensure = 'stopped' - $fileensure = 'present' - } - default: { - fail("ERROR [${module_name}]: enable must be one of: running stopped absent") - } - } - - # for packageversion, use what's configured unless we're set (which should only be in the absent case..) - if ! $ourpackageversion { - $ourpackageversion = $packageversion - } - - # for service and package name - if we've specified one, use it. else use the default - if $packagename == undef { - $ourpackagename = $defaultpackagename - } else { - $ourpackagename = $packagename - } - - if $servicename == undef { - $ourservicename = $defaultservicename - } else { - $ourservicename = $servicename - } - - package { $ourpackagename: - ensure => $ourpackageversion - } - - service { $ourservicename: - enable => $serviceenable, - ensure => $serviceensure, - hasstatus => $hasstatus, - restart => $restart, - subscribe => [ - Package[$ourpackagename], - File[$configfile] - ], - } - - file { $configfile: - content => template($configtemplate), - owner => 'root', - group => 'root', - mode => 0644, - ensure => $fileensure, - require => Package[$ourpackagename], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/debian/beanstalkd_default.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/debian/beanstalkd_default.erb deleted file mode 100644 index c532f47bd8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/debian/beanstalkd_default.erb +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/sh -##based loosely on my sysconfig and initd scripts from centos, but tweaked to work without having to -##hack up the debian init script. -keen99 4/2013 - -<% if @maxconnections -%> -BEANSTALKD_MAXCONNECTIONS=<%= @maxconnections %> -<% else -%> -#use default ulimit -#BEANSTALKD_MAXCONNECTIONS=1024 -<% end -%> - - -BEANSTALKD_ADDR=<%= @listenaddress %> -BEANSTALKD_PORT=<%= @listenport %> -BEANSTALKD_USER=<%= @user %> - -# Job size is left to the default. Uncomment and set it -# to a value to have it take affect. -<% if @maxjobsize -%> -BEANSTALKD_MAX_JOB_SIZE=<%= @maxjobsize %> -<% else -%> -#use default -#BEANSTALKD_MAX_JOB_SIZE=65535 -<% end -%> - -# Using the binlog is off by default. -# -# The direcory to house the binlog. -<% if @binlogdir -%> -BEANSTALKD_BINLOG_DIR=<%= @binlogdir %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog -<% end -%> - -# fsync the binlog at most once every N milliseconds. -# setting this to 0 means 'always fsync'. If this is unset, -# and the binlog is used, then no explicit fsync is ever -# performed. That is, the -F option is used. -<% if @binlogfsync -%> -BEANSTALKD_BINLOG_FSYNC_PERIOD=<%= @bbinlogfsync %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_FSYNC_PERIOD= -<% end -%> - -# The size of each binlog file. This is rounded -# up to the nearest 512 byte boundary. -<% if @binlogsize -%> -BEANSTALKD_BINLOG_SIZE=<%= @binlogsize %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_SIZE=10485760 -<% end -%> - - - - -##the debian init script leaves everything to be desired. so lets put our setup logic here. - -case "$1" in - start|restart|force-reload|reload) - exec=$DAEMON - [ -x $exec ] || exit 5 - - # if not running, start it up here, usually something like "daemon $exec" - options="-l ${BEANSTALKD_ADDR} -p ${BEANSTALKD_PORT} -u ${BEANSTALKD_USER}" - if [ "${BEANSTALKD_MAX_JOB_SIZE}" != "" ]; then - options="${options} -z ${BEANSTALKD_MAX_JOB_SIZE}" - fi - - if [ "${BEANSTALKD_BINLOG_DIR}" != "" ]; then - if [ ! -d "${BEANSTALKD_BINLOG_DIR}" ]; then - echo "Creating binlog directory (${BEANSTALKD_BINLOG_DIR})" - mkdir -p ${BEANSTALKD_BINLOG_DIR} && chown ${BEANSTALKD_USER}:${BEANSTALKD_USER} ${BEANSTALKD_BINLOG_DIR} - fi - options="${options} -b ${BEANSTALKD_BINLOG_DIR}" - if [ "${BEANSTALKD_BINLOG_FSYNC_PERIOD}" != "" ]; then - options="${options} -f ${BEANSTALKD_BINLOG_FSYNC_PERIOD}" - else - options="${options} -F" - fi - if [ "${BEANSTALKD_BINLOG_SIZE}" != "" ]; then - options="${options} -s ${BEANSTALKD_BINLOG_SIZE}" - fi - - ##1.4.6 at least is prone to leave a lock file around after shutting down - ##this breaks startup after upgrade to 1.5, so work around this - ##unknown if this happens w/o binlog enabled... - #check for stale lock file in binlog - if [ -e "${BEANSTALKD_BINLOG_DIR}/lock" ] - then - if ! ps xa| grep -v grep | grep -q $exec - then - echo "found old lock file and beanstalk isn't running - deleting it" - rm -f ${BEANSTALKD_BINLOG_DIR}/lock - fi - fi - fi - - if [ -n "${BEANSTALKD_MAXCONNECTIONS}" ]; then - #increase open files ulimit to support higher concurrent connections - echo "increasing open file limit to $BEANSTALKD_MAXCONNECTIONS" - ulimit -n $BEANSTALKD_MAXCONNECTIONS - fi - - DAEMON_OPTS="-l $BEANSTALKD_LISTEN_ADDR -p $BEANSTALKD_LISTEN_PORT" - DAEMON_OPTS="$options" - - ;; - *) - #nothing, please keep moving - ;; -esac - - - -DAEMONUSER=$BEANSTALKD_USER - - -## Uncomment to enable startup during boot. -START=yes - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb deleted file mode 100644 index 6e3bb422ec..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/fixtures/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb +++ /dev/null @@ -1,56 +0,0 @@ -# System configuration for the beanstalkd daemon - -# Available options correspond to the options to the -# beanstalkd commandline. - -<% if @maxconnections -%> -BEANSTALKD_MAXCONNECTIONS=<%= @maxconnections %> -<% else -%> -#use default ulimit -#BEANSTALKD_MAXCONNECTIONS=1024 -<% end -%> - - -BEANSTALKD_ADDR=<%= @listenaddress %> -BEANSTALKD_PORT=<%= @listenport %> -BEANSTALKD_USER=<%= @user %> - -# Job size is left to the default. Uncomment and set it -# to a value to have it take affect. -<% if @maxjobsize -%> -BEANSTALKD_MAX_JOB_SIZE=<%= @maxjobsize %> -<% else -%> -#use default -#BEANSTALKD_MAX_JOB_SIZE=65535 -<% end -%> - -# Using the binlog is off by default. -# -# The direcory to house the binlog. -<% if @binlogdir -%> -BEANSTALKD_BINLOG_DIR=<%= @binlogdir %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog -<% end -%> - -# fsync the binlog at most once every N milliseconds. -# setting this to 0 means 'always fsync'. If this is unset, -# and the binlog is used, then no explicit fsync is ever -# performed. That is, the -F option is used. -<% if @binlogfsync -%> -BEANSTALKD_BINLOG_FSYNC_PERIOD=<%= @bbinlogfsync %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_FSYNC_PERIOD= -<% end -%> - -# The size of each binlog file. This is rounded -# up to the nearest 512 byte boundary. -<% if @binlogsize -%> -BEANSTALKD_BINLOG_SIZE=<%= @binlogsize %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_SIZE=10485760 -<% end -%> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/spec_helper.rb deleted file mode 100644 index d3923f8306..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/spec/spec_helper.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'rspec-puppet' - -fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) - -RSpec.configure do |c| - c.module_path = File.join(fixture_path, 'modules') - c.manifest_dir = File.join(fixture_path, 'manifests') -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/templates/debian/beanstalkd_default.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/templates/debian/beanstalkd_default.erb deleted file mode 100644 index c532f47bd8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/templates/debian/beanstalkd_default.erb +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/sh -##based loosely on my sysconfig and initd scripts from centos, but tweaked to work without having to -##hack up the debian init script. -keen99 4/2013 - -<% if @maxconnections -%> -BEANSTALKD_MAXCONNECTIONS=<%= @maxconnections %> -<% else -%> -#use default ulimit -#BEANSTALKD_MAXCONNECTIONS=1024 -<% end -%> - - -BEANSTALKD_ADDR=<%= @listenaddress %> -BEANSTALKD_PORT=<%= @listenport %> -BEANSTALKD_USER=<%= @user %> - -# Job size is left to the default. Uncomment and set it -# to a value to have it take affect. -<% if @maxjobsize -%> -BEANSTALKD_MAX_JOB_SIZE=<%= @maxjobsize %> -<% else -%> -#use default -#BEANSTALKD_MAX_JOB_SIZE=65535 -<% end -%> - -# Using the binlog is off by default. -# -# The direcory to house the binlog. -<% if @binlogdir -%> -BEANSTALKD_BINLOG_DIR=<%= @binlogdir %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog -<% end -%> - -# fsync the binlog at most once every N milliseconds. -# setting this to 0 means 'always fsync'. If this is unset, -# and the binlog is used, then no explicit fsync is ever -# performed. That is, the -F option is used. -<% if @binlogfsync -%> -BEANSTALKD_BINLOG_FSYNC_PERIOD=<%= @bbinlogfsync %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_FSYNC_PERIOD= -<% end -%> - -# The size of each binlog file. This is rounded -# up to the nearest 512 byte boundary. -<% if @binlogsize -%> -BEANSTALKD_BINLOG_SIZE=<%= @binlogsize %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_SIZE=10485760 -<% end -%> - - - - -##the debian init script leaves everything to be desired. so lets put our setup logic here. - -case "$1" in - start|restart|force-reload|reload) - exec=$DAEMON - [ -x $exec ] || exit 5 - - # if not running, start it up here, usually something like "daemon $exec" - options="-l ${BEANSTALKD_ADDR} -p ${BEANSTALKD_PORT} -u ${BEANSTALKD_USER}" - if [ "${BEANSTALKD_MAX_JOB_SIZE}" != "" ]; then - options="${options} -z ${BEANSTALKD_MAX_JOB_SIZE}" - fi - - if [ "${BEANSTALKD_BINLOG_DIR}" != "" ]; then - if [ ! -d "${BEANSTALKD_BINLOG_DIR}" ]; then - echo "Creating binlog directory (${BEANSTALKD_BINLOG_DIR})" - mkdir -p ${BEANSTALKD_BINLOG_DIR} && chown ${BEANSTALKD_USER}:${BEANSTALKD_USER} ${BEANSTALKD_BINLOG_DIR} - fi - options="${options} -b ${BEANSTALKD_BINLOG_DIR}" - if [ "${BEANSTALKD_BINLOG_FSYNC_PERIOD}" != "" ]; then - options="${options} -f ${BEANSTALKD_BINLOG_FSYNC_PERIOD}" - else - options="${options} -F" - fi - if [ "${BEANSTALKD_BINLOG_SIZE}" != "" ]; then - options="${options} -s ${BEANSTALKD_BINLOG_SIZE}" - fi - - ##1.4.6 at least is prone to leave a lock file around after shutting down - ##this breaks startup after upgrade to 1.5, so work around this - ##unknown if this happens w/o binlog enabled... - #check for stale lock file in binlog - if [ -e "${BEANSTALKD_BINLOG_DIR}/lock" ] - then - if ! ps xa| grep -v grep | grep -q $exec - then - echo "found old lock file and beanstalk isn't running - deleting it" - rm -f ${BEANSTALKD_BINLOG_DIR}/lock - fi - fi - fi - - if [ -n "${BEANSTALKD_MAXCONNECTIONS}" ]; then - #increase open files ulimit to support higher concurrent connections - echo "increasing open file limit to $BEANSTALKD_MAXCONNECTIONS" - ulimit -n $BEANSTALKD_MAXCONNECTIONS - fi - - DAEMON_OPTS="-l $BEANSTALKD_LISTEN_ADDR -p $BEANSTALKD_LISTEN_PORT" - DAEMON_OPTS="$options" - - ;; - *) - #nothing, please keep moving - ;; -esac - - - -DAEMONUSER=$BEANSTALKD_USER - - -## Uncomment to enable startup during boot. -START=yes - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb deleted file mode 100644 index 6e3bb422ec..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/beanstalkd/templates/redhat/beanstalkd_sysconfig.erb +++ /dev/null @@ -1,56 +0,0 @@ -# System configuration for the beanstalkd daemon - -# Available options correspond to the options to the -# beanstalkd commandline. - -<% if @maxconnections -%> -BEANSTALKD_MAXCONNECTIONS=<%= @maxconnections %> -<% else -%> -#use default ulimit -#BEANSTALKD_MAXCONNECTIONS=1024 -<% end -%> - - -BEANSTALKD_ADDR=<%= @listenaddress %> -BEANSTALKD_PORT=<%= @listenport %> -BEANSTALKD_USER=<%= @user %> - -# Job size is left to the default. Uncomment and set it -# to a value to have it take affect. -<% if @maxjobsize -%> -BEANSTALKD_MAX_JOB_SIZE=<%= @maxjobsize %> -<% else -%> -#use default -#BEANSTALKD_MAX_JOB_SIZE=65535 -<% end -%> - -# Using the binlog is off by default. -# -# The direcory to house the binlog. -<% if @binlogdir -%> -BEANSTALKD_BINLOG_DIR=<%= @binlogdir %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_DIR=/var/lib/beanstalkd/binlog -<% end -%> - -# fsync the binlog at most once every N milliseconds. -# setting this to 0 means 'always fsync'. If this is unset, -# and the binlog is used, then no explicit fsync is ever -# performed. That is, the -F option is used. -<% if @binlogfsync -%> -BEANSTALKD_BINLOG_FSYNC_PERIOD=<%= @bbinlogfsync %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_FSYNC_PERIOD= -<% end -%> - -# The size of each binlog file. This is rounded -# up to the nearest 512 byte boundary. -<% if @binlogsize -%> -BEANSTALKD_BINLOG_SIZE=<%= @binlogsize %> -<% else -%> -#use default -#BEANSTALKD_BINLOG_SIZE=10485760 -<% end -%> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/.fixtures.yml deleted file mode 100644 index c0123415c7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/.fixtures.yml +++ /dev/null @@ -1,5 +0,0 @@ -fixtures: - repositories: - git: "git://github.com/puppetlabs/puppetlabs-git" - symlinks: - composer: "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/.travis.yml deleted file mode 100644 index 033f11dd3d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: ruby -rvm: - - 1.9.3 -before_script: -after_script: -script: "bundle exec rake spec" -env: - - PUPPET_VERSION=2.7.23 - - PUPPET_VERSION=3.0.2 - - PUPPET_VERSION=3.2.4 - - PUPPET_VERSION=3.3.0 -notifications: - email: false diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/CHANGELOG.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/CHANGELOG.md deleted file mode 100644 index bd8105b127..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/CHANGELOG.md +++ /dev/null @@ -1,133 +0,0 @@ -v1.2.1 -====== -f44b7e5 Now also supports Amazon Linux (RedHat) - -9341805 Now `suhosin_enabled` parameter is correctly documented. - -v1.2.0 -====== -66b071a (HEAD, tag: 1.2.0, master) Bumping version to 1.2.0 - -166ec87 Updated README.md - -626ee43 (origin/master, origin/HEAD) Updated CHANGELOG format - -1364058 Moved CHANGELOG to markdown format - -6f21dcb Updated LICENSE file - -6209eb8 Added CHANGELOG file - -6307d5a Add parameter 'php_bin' to override name or path of php binary - -9e484e9 (origin/rspec_head_fixes, rspec_head_fixes) just match on errorname, not specific exception - -db4176e update specs for latest rspec-puppet 1.0.1+ - -v1.1.1 -====== -17b2309 (tag: 1.1.1) Update Modulefile - -d848038 Used puppetlabs/git >= 0.0.2 - -0d75cff doc updates for 1.1.0 release - -v1.1.0 -====== -3b46e4d (tag: 1.1.0) bumping version to 1.1.0 for refreshonly and user features - -5290e8e support setting exec user for project and exec - -6af1e25 ignore puppet module package folder - -c2106ec Add refreshonly parameter to exec - -v1.0.1 -====== -fb1fd04 (tag: 1.0.1) Bumped version to 1.0.1 - -bf43913 (origin/deprecated_erb_variables) fix deprecated variables in the exec erb template - -342b898 (origin/documentation_refactor) document refactor, add spec test information - -3677acc adding tests for new suhosin_enable param and Debian family - -de86c0d Only run augeas commands if suhosin is enabled - -v1.0.0 -====== -f5d214a (tag: 1.0.0) Bumping version to 1.0.0 - -12589bf fixes for travis-ci building - -5279b92 spec testing using rspec-puppet - -3069608 documentation updates for composer_home and previous PRs - -b5faa45 add a composer_home fact and use it to set up environment - -v0.1.1 -====== -dbc0c74 Bumping version to 0.1.1 - -b4833d6 no-custom-installers is deprecated in favor of no-plugins - -acdc73c dry up the composer binary download code - -41f3a7b CentOS isn't actually an $::osfamily value - -d54c0db PHP binary is provided by php-cli on RHEL systems - -v0.1.0 -====== -1e8f9f1 (tag: 0.1.0) Adding License file. - -523c28f (igalic/option-names, igalic-option-names) update readme with the new options - -3d2ddda double-negating option names is confusing - -be518cf (igalic/style, igalic-style) Fix puppet lint complaints - -4050077 There's no need for these files to be executable - -522e93c Updated temp path. - -bf0f9e7 Support centos/redhat - -f45e9de Support redhat/centos - -920d1ca Support redhat/centos - -v0.0.6 -====== -78643ef (tag: 0.0.6) Bumping version to 0.0.6 - -0fbfb53 Fixing bug where global path is overwritten by local scope. - -v0.0.5 -====== -ee4e49b (tag: 0.0.5) Bumping version to 0.0.5 - -17ca5ee Added varaible composer path to exec calls. - -v0.0.4 -====== -e94be5e (tag: 0.0.4) Bumping version to 0.0.4 - -a27e45f Fixed dry_run parameter - -28cfee8 Adding version parameter to project task README - -v0.0.3 -====== -4787b24 Bumping version to 0.0.3 - -4ee9547 (tag: 0.0.3) Fixing type in exec manifest. - -v0.0.2 -====== -974d2ad (tag: 0.0.2) Bumping version to 0.0.2 - -667eb18 Fixed README - -925aa97 Fixed Modulefile. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/Gemfile deleted file mode 100644 index 992fecaab8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/Gemfile +++ /dev/null @@ -1,17 +0,0 @@ -#ruby=1.9.3@puppet-composer - -if ENV.key?('PUPPET_VERSION') - puppetversion = "= #{ENV['PUPPET_VERSION']}" -else - puppetversion = ['>= 2.7'] -end - -source 'https://rubygems.org' - -ruby '1.9.3' - -gem 'puppet', puppetversion -gem 'puppetlabs_spec_helper' -gem 'rspec-puppet', :github => 'rodjek/rspec-puppet', :ref => '03e94422fb9bbdd950d5a0bec6ead5d76e06616b' -gem 'mocha' -gem 'puppet-lint' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/LICENSE deleted file mode 100644 index 3cff480369..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 - 2014 Thomas Ploch - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/Modulefile deleted file mode 100644 index b1a9c8c49d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/Modulefile +++ /dev/null @@ -1,8 +0,0 @@ -name 'tPl0ch-composer' -version '1.2.1' -dependency 'puppetlabs/git', '>= 0.0.2' -summary "This module provides the 'Composer' PHP dependency manager." -description "This module installs the 'Composer' PHP dependency manager and provides some custom types to create, update - and install projects. Until now the Debian and Redhat OS families are supported." -project_page "https://github.com/tPl0ch/puppet-composer" -author "tPl0ch - Thomas Ploch " diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/README.md deleted file mode 100644 index c142e258f0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/README.md +++ /dev/null @@ -1,155 +0,0 @@ -# Composer Puppet Module - -[![Build Status](https://travis-ci.org/tPl0ch/puppet-composer.png?branch=master)](https://travis-ci.org/tPl0ch/puppet-composer) - -## Description - -The `puppet-composer` module installs the latest version of Composer from http://getcomposer.org. Composer is a dependency manager for PHP. - -## Supported Platforms - -* `Debian` -* `Redhat` -* `Centos` -* `Amazon Linux` - -## Installation - -#### Puppet Forge -We recommend installing using the Puppet Forge as it automatically satisfies dependencies. - - puppet module install --target-dir=/your/path/to/modules tPl0ch-composer - -#### Installation via git submodule -You can also install as a git submodule and handle the dependencies manually. See the [Dependencies](#dependencies) section below. - - git submodule add git://github.com/tPl0ch/puppet-composer.git modules/composer - -## Dependencies - -This module requires the following Puppet modules: - -* [`puppetlabs-git`](https://github.com/puppetlabs/puppetlabs-git/) - -And additional (for puppet version lower than 3.0.0) you need: - -* [`libaugeas`](http://augeas.net/) (For automatically updating php.ini settings for suhosin patch) - -## Usage -To install the `composer` binary globally in `/usr/local/bin` you only need to declare the `composer` class. We try to set some sane defaults. There are also a number of parameters you can tweak should the defaults not be sufficient. - -### Simple Include -To install the binary with the defaults you just need to include the following in your manifests: - - include composer - -### Full Include -Alternatively, you can set a number of options by declaring the class with parameters: - -```puppet -class { 'composer': - target_dir => '/usr/local/bin', - composer_file => 'composer', # could also be 'composer.phar' - download_method => 'curl', # or 'wget' - logoutput => false, - tmp_path => '/tmp', - php_package => 'php5-cli', - curl_package => 'curl', - wget_package => 'wget', - composer_home => '/root', - php_bin => 'php', # could also i.e. be 'php -d "apc.enable_cli=0"' for more fine grained control - suhosin_enabled => true, -} -``` - -### Creating Projects - -The `composer::project` definition provides a way to create projects in a target directory. - -```puppet -composer::project { 'silex': - project_name => 'fabpot/silex-skeleton', # REQUIRED - target_dir => '/vagrant/silex', # REQUIRED - version => '2.1.x-dev', # Some valid version string - prefer_source => true, - stability => 'dev', # Minimum stability setting - keep_vcs => false, # Keep the VCS information - dev => true, # Install dev dependencies - repository_url => 'http://repo.example.com', # Custom repository URL - user => undef, # Set the user to run as -} -``` - -#### Updating Packages - -The `composer::exec` definition provides a more generic wrapper arround composer `update` and `install` commands. The following example will update the `silex/silex` and `symfony/browser-kit` packages in the `/vagrant/silex` directory. You can omit `packages` to update the entire project. - -```puppet -composer::exec { 'silex-update': - cmd => 'update', # REQUIRED - cwd => '/vagrant/silex', # REQUIRED - packages => ['silex/silex', 'symfony/browser-kit'], # leave empty or omit to update whole project - prefer_source => false, # Only one of prefer_source or prefer_dist can be true - prefer_dist => false, # Only one of prefer_source or prefer_dist can be true - dry_run => false, # Just simulate actions - custom_installers => false, # No custom installers - scripts => false, # No script execution - interaction => false, # No interactive questions - optimize => false, # Optimize autoloader - dev => false, # Install dev dependencies - user => undef, # Set the user to run as - refreshonly => false, # Only run on refresh -} -``` - -#### Installing Packages - -We support the `install` command in addition to `update`. The install command will ignore the `packages` parameter and the following example is the equivalent to running `composer install` in the `/vagrant/silex` directory. - -```puppet -composer::exec { 'silex-install': - cmd => 'install', # REQUIRED - cwd => '/vagrant/silex', # REQUIRED - prefer_source => false, - prefer_dist => false, - dry_run => false, # Just simulate actions - custom_installers => false, # No custom installers - scripts => false, # No script execution - interaction => false, # No interactive questions - optimize => false, # Optimize autoloader - dev => false, # Install dev dependencies -} -``` - -## Development - -We have `rspec-puppet` and Travis CI setup for the project. To run the spec tests locally you need `bundler` installed: - -``` -gem install bundler -``` - -Then you can install the required gems: - -``` -bundle install -``` - -Finally, the tests can be run: - -``` -rake spec -``` - -## Contributing - -We welcome everyone to help develop this module. To contribute: - -* Fork this repository -* Add features and spec tests for them -* Commit to feature named branch -* Open a pull request outlining your changes and the reasoning for them - -## Todo - -* Add a `composer::require` type diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/Rakefile deleted file mode 100644 index 1a388518f2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/Rakefile +++ /dev/null @@ -1,2 +0,0 @@ -require 'puppet-lint/tasks/puppet-lint' -require 'puppetlabs_spec_helper/rake_tasks' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/lib/facter/composer_home.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/lib/facter/composer_home.rb deleted file mode 100644 index b815cfa404..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/lib/facter/composer_home.rb +++ /dev/null @@ -1,5 +0,0 @@ -Facter.add(:composer_home) do - setcode do - ENV['HOME'] - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/exec.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/exec.pp deleted file mode 100644 index 82039e8557..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/exec.pp +++ /dev/null @@ -1,55 +0,0 @@ -# == Type: composer::exec -# -# Either installs from composer.json or updates project or specific packages -# -# === Authors -# -# Thomas Ploch -# -# === Copyright -# -# Copyright 2013 Thomas Ploch -# -define composer::exec ( - $cmd, - $cwd, - $packages = [], - $prefer_source = false, - $prefer_dist = false, - $dry_run = false, - $custom_installers = false, - $scripts = false, - $optimize = false, - $interaction = false, - $dev = false, - $logoutput = false, - $verbose = false, - $refreshonly = false, - $user = undef, -) { - require composer - require git - - Exec { - path => "/bin:/usr/bin/:/sbin:/usr/sbin:${composer::target_dir}", - environment => "COMPOSER_HOME=${composer::composer_home}", - user => $user, - } - - if $cmd != 'install' and $cmd != 'update' { - fail("Only types 'install' and 'update' are allowed, ${cmd} given") - } - - if $prefer_source and $prefer_dist { - fail('Only one of \$prefer_source or \$prefer_dist can be true.') - } - - $command = "${composer::php_bin} ${composer::target_dir}/${composer::composer_file} ${cmd}" - - exec { "composer_update_${title}": - command => template('composer/exec.erb'), - cwd => $cwd, - logoutput => $logoutput, - refreshonly => $refreshonly - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/init.pp deleted file mode 100644 index 5b3a431921..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/init.pp +++ /dev/null @@ -1,156 +0,0 @@ -# == Class: composer -# -# The parameters for the composer class and corresponding definitions -# -# === Parameters -# -# Document parameters here. -# -# [*target_dir*] -# The target dir that composer should be installed to. -# Defaults to ```/usr/local/bin```. -# -# [*composer_file*] -# The name of the composer binary, which will reside in ```target_dir```. -# -# [*download_method*] -# Either ```curl``` or ```wget```. -# -# [*logoutput*] -# If the output should be logged. Defaults to FALSE. -# -# [*tmp_path*] -# Where the composer.phar file should be temporarily put. -# -# [*php_package*] -# The Package name of tht PHP CLI package. -# -# [*curl_package*] -# The name of the curl package to override the default set in the -# composer::params class. -# -# [*wget_package*] -# The name of the wget package to override the default set in the -# composer::params class. -# -# [*composer_home*] -# Folder to use as the COMPOSER_HOME environment variable. Default comes -# from our composer::params class which derives from our own $composer_home -# fact. The fact returns the current users $HOME environment variable. -# -# [*php_bin*] -# The name or path of the php binary to override the default set in the -# composer::params class. -# -# === Authors -# -# Thomas Ploch -# -class composer( - $target_dir = $composer::params::target_dir, - $composer_file = $composer::params::composer_file, - $download_method = $composer::params::download_method, - $logoutput = $composer::params::logoutput, - $tmp_path = $composer::params::tmp_path, - $php_package = $composer::params::php_package, - $curl_package = $composer::params::curl_package, - $wget_package = $composer::params::wget_package, - $composer_home = $composer::params::composer_home, - $php_bin = $composer::params::php_bin, - $suhosin_enabled = $composer::params::suhosin_enabled -) inherits composer::params { - - Exec { path => "/bin:/usr/bin/:/sbin:/usr/sbin:${target_dir}" } - - if defined(Package[$php_package]) == false { - package { $php_package: ensure => present, } - } - - # download composer - case $download_method { - 'curl': { - $download_command = "curl -s http://getcomposer.org/installer | ${composer::php_bin}" - $download_require = $suhosin_enabled ? { - true => [ Package['curl', $php_package], Augeas['allow_url_fopen', 'whitelist_phar'] ], - false => [ Package['curl', $php_package] ] - } - $method_package = $curl_package - } - 'wget': { - $download_command = 'wget http://getcomposer.org/composer.phar -O composer.phar' - $download_require = $suhosin_enabled ? { - true => [ Package['wget', $php_package], Augeas['allow_url_fopen', 'whitelist_phar'] ], - false => [ Package['wget', $php_package] ] - } - $method_package = $wget_package - } - default: { - fail("The param download_method ${download_method} is not valid. Please set download_method to curl or wget.") - } - } - - if defined(Package[$method_package]) == false { - package { $method_package: ensure => present, } - } - - exec { 'download_composer': - command => $download_command, - cwd => $tmp_path, - require => $download_require, - creates => "${tmp_path}/composer.phar", - logoutput => $logoutput, - } - - # check if directory exists - file { $target_dir: - ensure => directory, - } - - # move file to target_dir - file { "${target_dir}/${composer_file}": - ensure => present, - source => "${tmp_path}/composer.phar", - require => [ Exec['download_composer'], File[$target_dir] ], - mode => 0755, - } - - if $suhosin_enabled { - case $family { - - 'Redhat','Centos': { - - # set /etc/php5/cli/php.ini/suhosin.executor.include.whitelist = phar - augeas { 'whitelist_phar': - context => '/files/etc/suhosin.ini/suhosin', - changes => 'set suhosin.executor.include.whitelist phar', - require => Package[$php_package], - } - - # set /etc/cli/php.ini/PHP/allow_url_fopen = On - augeas{ 'allow_url_fopen': - context => '/files/etc/php.ini/PHP', - changes => 'set allow_url_fopen On', - require => Package[$php_package], - } - - } - 'Debian': { - - # set /etc/php5/cli/php.ini/suhosin.executor.include.whitelist = phar - augeas { 'whitelist_phar': - context => '/files/etc/php5/conf.d/suhosin.ini/suhosin', - changes => 'set suhosin.executor.include.whitelist phar', - require => Package[$php_package], - } - - # set /etc/php5/cli/php.ini/PHP/allow_url_fopen = On - augeas{ 'allow_url_fopen': - context => '/files/etc/php5/cli/php.ini/PHP', - changes => 'set allow_url_fopen On', - require => Package[$php_package], - } - - } - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/params.pp deleted file mode 100644 index 54f752a43f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/params.pp +++ /dev/null @@ -1,53 +0,0 @@ -# == Class: composer::params -# -# The parameters for the composer class and corresponding definitions -# -# === Authors -# -# Thomas Ploch -# Andrew Johnstone -# -# === Copyright -# -# Copyright 2013 Thomas Ploch -# -class composer::params { - $composer_home = $::composer_home - - # Support Amazon Linux which is supported by RedHat family - if $::osfamily == 'Linux' and $::operatingsystem == 'Amazon' { - $family = 'RedHat' - } else { - $family = $::osfamily - } - - case $family { - 'Debian': { - $target_dir = '/usr/local/bin' - $composer_file = 'composer' - $download_method = 'curl' - $logoutput = false - $tmp_path = '/tmp' - $php_package = 'php5-cli' - $curl_package = 'curl' - $wget_package = 'wget' - $php_bin = 'php' - $suhosin_enabled = true - } - 'RedHat', 'Centos': { - $target_dir = '/usr/local/bin' - $composer_file = 'composer' - $download_method = 'curl' - $logoutput = false - $tmp_path = '/tmp' - $php_package = 'php-cli' - $curl_package = 'curl' - $wget_package = 'wget' - $php_bin = 'php' - $suhosin_enabled = true - } - default: { - fail("Unsupported platform: ${family}") - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/project.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/project.pp deleted file mode 100644 index 594f67f1ba..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/manifests/project.pp +++ /dev/null @@ -1,96 +0,0 @@ -# == Type: composer::project -# -# Installs a given project with composer create-project -# -# === Parameters -# -# Document parameters here. -# -# [*target_dir*] -# The target dir that composer should be installed to. -# Defaults to ```/usr/local/bin```. -# -# [*composer_file*] -# The name of the composer binary, which will reside in ```target_dir```. -# -# [*download_method*] -# Either ```curl``` or ```wget```. -# -# [*logoutput*] -# If the output should be logged. Defaults to FALSE. -# -# [*tmp_path*] -# Where the composer.phar file should be temporarily put. -# -# [*php_package*] -# The Package name of the PHP CLI package. -# -# [*user*] -# The user name to exec the composer commands as. Default is undefined. -# -# === Authors -# -# Thomas Ploch -# -# === Copyright -# -# Copyright 2013 Thomas Ploch -# -define composer::project( - $project_name, - $target_dir, - $version = undef, - $dev = false, - $prefer_source = false, - $stability = 'dev', - $repository_url = undef, - $keep_vcs = false, - $tries = 3, - $timeout = 1200, - $user = undef, -) { - require git - require composer - - Exec { - path => "/bin:/usr/bin/:/sbin:/usr/sbin:${composer::target_dir}", - environment => "COMPOSER_HOME=${composer::composer_home}", - user => $user, - } - - $exec_name = "composer_create_project_${title}" - $base_command = "${composer::php_bin} ${composer::target_dir}/${composer::composer_file} --stability=${stability}" - $end_command = "${project_name} ${target_dir}" - - $dev_arg = $dev ? { - true => ' --dev', - default => '', - } - - $vcs = $keep_vcs? { - true => ' --keep-vcs', - default => '', - } - - $repo = $repository_url? { - undef => '', - default => " --repository-url=${repository_url}", - } - - $pref_src = $prefer_source? { - true => ' --prefer-source', - false => '' - } - - $v = $version? { - undef => '', - default => " ${version}", - } - - exec { $exec_name: - command => "${base_command}${dev_arg}${repo}${pref_src}${vcs} create-project ${end_command}${v}", - tries => $tries, - timeout => $timeout, - creates => $target_dir, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/classes/composer_params_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/classes/composer_params_spec.rb deleted file mode 100644 index 914de7111f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/classes/composer_params_spec.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'spec_helper' - -describe 'composer::params' do - ['RedHat', 'Debian', 'Linux'].each do |osfamily| - context "on #{osfamily} operating system family" do - let(:facts) { { - :osfamily => osfamily, - :operatingsystem => 'Amazon', - } } - - it { should compile } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/classes/composer_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/classes/composer_spec.rb deleted file mode 100644 index a34e335e7a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/classes/composer_spec.rb +++ /dev/null @@ -1,116 +0,0 @@ -require 'spec_helper' - -describe 'composer' do - ['RedHat', 'Debian', 'Linux'].each do |osfamily| - case osfamily - when 'RedHat' - php_package = 'php-cli' - php_context = '/files/etc/php.ini/PHP' - suhosin_context = '/files/etc/suhosin.ini/suhosin' - when 'Linux' - php_package = 'php-cli' - php_context = '/files/etc/php.ini/PHP' - suhosin_context = '/files/etc/suhosin.ini/suhosin' - when 'Debian' - php_package = 'php5-cli' - php_context = '/files/etc/php5/cli/php.ini/PHP' - suhosin_context = '/files/etc/php5/conf.d/suhosin.ini/suhosin' - else - php_package = 'php-cli' - php_context = '/files/etc/php.ini/PHP' - suhosin_context = '/files/etc/suhosin.ini/suhosin' - end - - context "on #{osfamily} operating system family" do - let(:facts) { { - :osfamily => osfamily, - :operatingsystem => 'Amazon' - } } - - it { should contain_class('composer::params') } - - it { - should contain_exec('download_composer').with({ - :command => 'curl -s http://getcomposer.org/installer | php', - :cwd => '/tmp', - :creates => '/tmp/composer.phar', - :logoutput => false, - }) - } - - it { - should contain_augeas('whitelist_phar').with({ - :context => suhosin_context, - :changes => 'set suhosin.executor.include.whitelist phar', - }) - } - - it { - should contain_augeas('allow_url_fopen').with({ - :context => php_context, - :changes => 'set allow_url_fopen On', - }) - } - - context 'with default parameters' do - it 'should compile' do - compile - end - - it { should contain_package(php_package).with_ensure('present') } - it { should contain_package('curl').with_ensure('present') } - it { should contain_file('/usr/local/bin').with_ensure('directory') } - - it { - should contain_file('/usr/local/bin/composer').with({ - :source => 'present', - :source => '/tmp/composer.phar', - :mode => '0755', - }) - } - end - - context "on invalid operating system family" do - let(:facts) { { - :osfamily => 'Invalid', - :operatingsystem => 'Amazon' - } } - - it 'should not compile' do - expect { should compile }.to raise_error(/Unsupported platform: Invalid/) - end - end - - context 'with custom parameters' do - let(:params) { { - :target_dir => '/you_sir/lowcal/been', - :php_package => 'php8-cli', - :composer_file => 'compozah', - :curl_package => 'kerl', - :php_bin => 'pehpe', - :suhosin_enabled => false, - } } - - it 'should compile' do - compile - end - - it { should contain_package('php8-cli').with_ensure('present') } - it { should contain_package('kerl').with_ensure('present') } - it { should contain_file('/you_sir/lowcal/been').with_ensure('directory') } - - it { - should contain_file('/you_sir/lowcal/been/compozah').with({ - :source => 'present', - :source => '/tmp/composer.phar', - :mode => '0755', - }) - } - - it { should_not contain_augeas('whitelist_phar') } - it { should_not contain_augeas('allow_url_fopen') } - - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/defines/composer_exec_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/defines/composer_exec_spec.rb deleted file mode 100644 index 36a062f406..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/defines/composer_exec_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -require 'spec_helper' - -describe 'composer::exec' do - ['RedHat', 'Debian'].each do |osfamily| - context "on #{osfamily} operating system family" do - let(:facts) { { - :osfamily => osfamily, - } } - - context 'using install command' do - it { should contain_class('git') } - it { should contain_class('composer') } - - let(:title) { 'myproject' } - let(:params) { { - :cmd => 'install', - :cwd => '/my/awesome/project', - :user => 'linus', - } } - - it { - should contain_exec('composer_update_myproject').with({ - :command => %r{php /usr/local/bin/composer install --no-plugins --no-scripts --no-interaction}, - :cwd => '/my/awesome/project', - :user => 'linus', - :logoutput => false, - }) - } - end - - context 'using update command' do - it { should contain_class('git') } - it { should contain_class('composer') } - - let(:title) { 'yourpr0ject' } - let(:params) { { - :cmd => 'update', - :cwd => '/just/in/time', - :packages => ['package1', 'packageinf'], - :logoutput => true, - } } - - it { - should contain_exec('composer_update_yourpr0ject').without_user.with({ - :command => %r{php /usr/local/bin/composer update --no-plugins --no-scripts --no-interaction package1 packageinf}, - :cwd => '/just/in/time', - :logoutput => true, - }) - } - end - end - end - - context 'on unsupported operating system family' do - let(:facts) { { - :osfamily => 'Darwin', - } } - - let(:title) { 'someproject' } - - it 'should not compile' do - expect { should compile }.to raise_error(/Unsupported platform: Darwin/) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/defines/composer_project_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/defines/composer_project_spec.rb deleted file mode 100644 index 624f911156..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/defines/composer_project_spec.rb +++ /dev/null @@ -1,61 +0,0 @@ -require 'spec_helper' - -describe 'composer::project' do - ['RedHat', 'Debian'].each do |osfamily| - context "on #{osfamily} operating system family" do - let(:facts) { { - :osfamily => osfamily, - } } - - context 'with default params' do - let(:title) { 'myproject' } - let(:params) { { - :project_name => 'projectzzz', - :target_dir => '/my/subpar/project', - } } - - it { should contain_class('git') } - it { should contain_class('composer') } - - it { - should contain_exec('composer_create_project_myproject').without_user.with({ - :command => "php /usr/local/bin/composer --stability=dev create-project projectzzz /my/subpar/project", - :tries => 3, - :timeout => 1200, - :creates => '/my/subpar/project', - }) - } - end - - context 'with all custom params' do - let(:title) { 'whoadawg' } - let(:params) { { - :project_name => 'whoadawg99', - :target_dir => '/my/mediocre/project', - :version => '0.0.8', - :dev => true, - :prefer_source => true, - :stability => 'dev', - :repository_url => 'git@github.com:trollface/whoadawg.git', - :keep_vcs => true, - :tries => 2, - :timeout => 600, - :user => 'mrploch', - } } - - it { should contain_class('git') } - it { should contain_class('composer') } - - it { - should contain_exec('composer_create_project_whoadawg').with({ - :command => %r{php /usr/local/bin/composer --stability=dev --dev --repository-url=git@github.com:trollface/whoadawg.git --prefer-source --keep-vcs create-project whoadawg99 /my/mediocre/project 0.0.8}, - :tries => 2, - :timeout => 600, - :creates => '/my/mediocre/project', - :user => 'mrploch', - }) - } - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/fixtures/manifests/site.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/fixtures/manifests/site.pp deleted file mode 100644 index d669ee3889..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/fixtures/manifests/site.pp +++ /dev/null @@ -1,8 +0,0 @@ -node default { - include composer - - composer::exec {'ohai': - cmd => 'install', - cwd => '/some/cool/dir', - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/spec.opts b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/spec.opts deleted file mode 100644 index 22420e39c6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/spec.opts +++ /dev/null @@ -1,6 +0,0 @@ ---format -s ---colour ---loadby -mtime ---backtrace \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/spec_helper.rb deleted file mode 100644 index 2c6f56649a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/templates/exec.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/templates/exec.erb deleted file mode 100644 index 960002f94c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/templates/exec.erb +++ /dev/null @@ -1,17 +0,0 @@ -<%= @command -%> -<% if @prefer_source %> --prefer-source<% end -%> -<% if @prefer_dist %> --prefer-dist<% end -%> -<% unless @custom_installers %> --no-plugins<% end -%> -<% unless @scripts %> --no-scripts<% end -%> -<% unless @interaction %> --no-interaction<% end -%> -<% if @dev %> --dev<% end -%> -<% if @verbose %> -v<% end -%> -<% if @dry_run %> --dry-run<% end -%> -<% if @cmd == 'update' -%> - <%- if @packages -%> - <%- @packages.each do |package| -%> - <%= ' ' + package -%> - <%- end -%> - <%- end -%> -<% end -%> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/tests/init.pp deleted file mode 100644 index 36afe85fa2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/tests/init.pp +++ /dev/null @@ -1,11 +0,0 @@ -# The baseline for module testing used by Puppet Labs is that each manifest -# should have a corresponding test manifest that declares that class or defined -# type. -# -# Tests are then run by using puppet apply --noop (to check for compilation errors -# and view a log of events) or by fully applying the test in a virtual environment -# (to compare the resulting system state to the desired state). -# -# Learn more about module testing here: http://docs.puppetlabs.com/guides/tests_smoke.html -# -include composer diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/tests/project.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/tests/project.pp deleted file mode 100644 index 6208a5eede..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/composer/tests/project.pp +++ /dev/null @@ -1,23 +0,0 @@ -# The baseline for module testing used by Puppet Labs is that each manifest -# should have a corresponding test manifest that declares that class or defined -# type. -# -# Tests are then run by using puppet apply --noop (to check for compilation errors -# and view a log of events) or by fully applying the test in a virtual environment -# (to compare the resulting system state to the desired state). -# -# Learn more about module testing here: http://docs.puppetlabs.com/guides/tests_smoke.html -# - -composer::project { 'my_first_test': - project_name => 'fabpot/silex-skeleton', - target_dir => '/tmp/first_test', -} - -composer::project { 'my_second_test': - project_name => 'fabpot/silex-skeleton', - target_dir => '/tmp/second_test', - prefer_source => true, - stability => 'dev', -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/.fixtures.yml deleted file mode 100644 index dc6b41f836..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/.fixtures.yml +++ /dev/null @@ -1,7 +0,0 @@ -fixtures: - repositories: - 'stdlib': - repo: 'git://github.com/puppetlabs/puppetlabs-stdlib.git' - ref: '4.0.0' - symlinks: - 'concat': '#{source_dir}' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/.gitattributes b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/.gitattributes deleted file mode 100644 index 2e05fd47de..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.sh eol=lf diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/.travis.yml deleted file mode 100644 index 4e72cd4cf9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -branches: - only: - - master -language: ruby -bundler_args: --without development -script: bundle exec rake spec SPEC_OPTS='--format documentation' -# work around RubyGems 2.2.0 breaking ruby 1.8.7 -# https://github.com/rubygems/rubygems/pull/763 -# https://github.com/freerange/mocha/commit/66bab2a8f4e7cd8734bf88e6f32157c0d5153125 -before_install: - - gem update --system 2.1.11 - - gem --version -rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 -env: - matrix: - - PUPPET_GEM_VERSION="2.7.3" FACTER_GEM_VERSION="1.6.0" - - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" - - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" - - PUPPET_GEM_VERSION="~> 3.0" -matrix: - fast_finish: true - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="2.7.3" FACTER_GEM_VERSION="1.6.0" - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="2.7.3" FACTER_GEM_VERSION="1.6.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" -notifications: - email: false diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/CHANGELOG b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/CHANGELOG deleted file mode 100644 index c66b922d44..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/CHANGELOG +++ /dev/null @@ -1,127 +0,0 @@ -2014-05-14 1.1.0 - -Summary - -This release is primarily a bugfix release since 1.1.0-rc1. - -Features: -- Improved testing, with tests moved to beaker - -Bugfixes: -- No longer attempts to set fragment owner and mode on Windows -- Fix numeric sorting -- Fix incorrect quoting -- Fix newlines - -2014-01-03 1.1.0-rc1 - -Summary: - -This release of concat was 90% written by Joshua Hoblitt, and the module team -would like to thank him for the huge amount of work he put into this release. - -This module deprecates a bunch of old parameters and usage patterns, modernizes -much of the manifest code, simplifies a whole bunch of logic and makes -improvements to almost all parts of the module. - -The other major feature is windows support, courtesy of luisfdez, with an -alternative version of the concat bash script in ruby. We've attempted to -ensure that there are no backwards incompatible changes, all users of 1.0.0 -should be able to use 1.1.0 without any failures, but you may find deprecation -warnings and we'll be aggressively moving for a 2.0 to remove those too. - -For further information on deprecations, please read: -https://github.com/puppetlabs/puppetlabs-concat/blob/master/README.md#api-deprecations - -Removed: -- Puppet 0.24 support. -- Filebucket backup of all file resources except the target concatenated file. -- Default owner/user/group values. -- Purging of long unused /usr/local/bin/concatfragments.sh - -Features: -- Windows support via a ruby version of the concat bash script. -- Huge amount of acceptance testing work added. -- Documentation (README) completely rewritten. -- New parameters in concat: - - `ensure`: Controls if the file should be present/absent at all. -- Remove requirement to include concat::setup in manifests. -- Made `gnu` parameter deprecated. -- Added parameter validation. - -Bugfixes: -- Ensure concat::setup runs before concat::fragment in all cases. -- Pluginsync references updated for modern Puppet. -- Fix incorrect group parameter. -- Use $owner instead of $id to avoid confusion with $::id -- Compatibility fixes for Puppet 2.7/ruby 1.8.7 -- Use LC_ALL=C instead of LANG=C -- Always exec the concatfragments script as root when running as root. -- Syntax and other cleanup changes. - -2013-08-09 1.0.0 - -Summary: - -Many new features and bugfixes in this release, and if you're a heavy concat -user you should test carefully before upgrading. The features should all be -backwards compatible but only light testing has been done from our side before -this release. - -Features: -- New parameters in concat: - - `replace`: specify if concat should replace existing files. - - `ensure_newline`: controls if fragments should contain a newline at the end. -- Improved README documentation. -- Add rspec:system tests (rake spec:system to test concat) - -Bugfixes -- Gracefully handle \n in a fragment resource name. -- Adding more helpful message for 'pluginsync = true' -- Allow passing `source` and `content` directly to file resource, rather than -defining resource defaults. -- Added -r flag to read so that filenames with \ will be read correctly. -- sort always uses LANG=C. -- Allow WARNMSG to contain/start with '#'. -- Replace while-read pattern with for-do in order to support Solaris. - -CHANGELOG: -- 2010/02/19 - initial release -- 2010/03/12 - add support for 0.24.8 and newer - - make the location of sort configurable - - add the ability to add shell comment based warnings to - top of files - - add the ablity to create empty files -- 2010/04/05 - fix parsing of WARN and change code style to match rest - of the code - - Better and safer boolean handling for warn and force - - Don't use hard coded paths in the shell script, set PATH - top of the script - - Use file{} to copy the result and make all fragments owned - by root. This means we can chnage the ownership/group of the - resulting file at any time. - - You can specify ensure => "/some/other/file" in concat::fragment - to include the contents of a symlink into the final file. -- 2010/04/16 - Add more cleaning of the fragment name - removing / from the $name -- 2010/05/22 - Improve documentation and show the use of ensure => -- 2010/07/14 - Add support for setting the filebucket behavior of files -- 2010/10/04 - Make the warning message configurable -- 2010/12/03 - Add flags to make concat work better on Solaris - thanks Jonathan Boyett -- 2011/02/03 - Make the shell script more portable and add a config option for root group -- 2011/06/21 - Make base dir root readable only for security -- 2011/06/23 - Set base directory using a fact instead of hardcoding it -- 2011/06/23 - Support operating as non privileged user -- 2011/06/23 - Support dash instead of bash or sh -- 2011/07/11 - Better solaris support -- 2011/12/05 - Use fully qualified variables -- 2011/12/13 - Improve Nexenta support -- 2012/04/11 - Do not use any GNU specific extensions in the shell script -- 2012/03/24 - Comply to community style guides -- 2012/05/23 - Better errors when basedir isnt set -- 2012/05/31 - Add spec tests -- 2012/07/11 - Include concat::setup in concat improving UX -- 2012/08/14 - Puppet Lint improvements -- 2012/08/30 - The target path can be different from the $name -- 2012/08/30 - More Puppet Lint cleanup -- 2012/09/04 - RELEASE 0.2.0 -- 2012/12/12 - Added (file) $replace parameter to concat diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/Gemfile deleted file mode 100644 index 56b977598c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/Gemfile +++ /dev/null @@ -1,20 +0,0 @@ -source ENV['GEM_SOURCE'] || "https://rubygems.org" - -group :development, :test do - gem 'rake', :require => false - gem 'rspec-puppet', :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'beaker', :require => false - gem 'beaker-rspec', :require => false - gem 'puppet-lint', :require => false - gem 'serverspec', :require => false - gem 'pry', :require => false -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end - -# vim:ft=ruby diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/LICENSE deleted file mode 100644 index 6a9e9a194b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ - Copyright 2012 R.I.Pienaar - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/Modulefile deleted file mode 100644 index ea9ef2c3e3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/Modulefile +++ /dev/null @@ -1,9 +0,0 @@ -name 'puppetlabs-concat' -version '1.1.0' -source 'git://github.com/puppetlabs/puppetlabs-concat.git' -author 'Puppetlabs' -license 'Apache 2.0' -summary 'Concat module' -description 'Concat module' -project_page 'http://github.com/puppetlabs/puppetlabs-concat' -dependency 'puppetlabs/stdlib', '>= 4.0.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/README.md deleted file mode 100644 index 60eca38300..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/README.md +++ /dev/null @@ -1,441 +0,0 @@ -#Concat - -[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-concat.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-concat) - -####Table of Contents - -1. [Overview](#overview) -2. [Module Description - What the module does and why it is useful](#module-description) -3. [Setup - The basics of getting started with concat](#setup) - * [What concat affects](#what-concat-affects) - * [Setup requirements](#setup-requirements) - * [Beginning with concat](#beginning-with-concat) -4. [Usage - Configuration options and additional functionality](#usage) - * [API _deprecations_](#api-deprecations) -5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) -5. [Limitations - OS compatibility, etc.](#limitations) -6. [Development - Guide for contributing to the module](#development) - -##Overview - -This module constructs files from multiple fragments in an ordered way. - -##Module Description - -This module lets you use many concat::fragment{} resources throughout -your modules to construct a single file at the end. It does this through -a shell (or ruby) script and a temporary holding space for the fragments. - -##Setup - -###What concat affects - -* Installs concatfragments.[sh|rb] based on platform. -* Adds a concat/ directory into Puppets `vardir`. - -###Beginning with concat - -To start using concat you need to create: - -* A concat{} resource for the final file. -* One or more concat::fragment{}'s. - -A minimal example might be: - -```puppet -concat { '/tmp/file': - ensure => present, -} - -concat::fragment { 'tmpfile': - target => '/tmp/file' - content => 'test contents', - order => '01' -} -``` - -##Usage - -Please be aware that there have been a number of [API -_deprecations_](#api-deprecations). - -If you wanted a /etc/motd file that listed all the major modules -on the machine. And that would be maintained automatically even -if you just remove the include lines for other modules you could -use code like below, a sample /etc/motd would be: - -
-Puppet modules on this server:
-
-    -- Apache
-    -- MySQL
-
- -Local sysadmins can also append to the file by just editing /etc/motd.local -their changes will be incorporated into the puppet managed motd. - -```puppet -class motd { - $motd = '/etc/motd' - - concat { $motd: - owner => 'root', - group => 'root', - mode => '0644' - } - - concat::fragment{ 'motd_header': - target => $motd, - content => "\nPuppet modules on this server:\n\n", - order => '01' - } - - # local users on the machine can append to motd by just creating - # /etc/motd.local - concat::fragment{ 'motd_local': - target => $motd, - source => '/etc/motd.local', - order => '15' - } -} - -# used by other modules to register themselves in the motd -define motd::register($content="", $order=10) { - if $content == "" { - $body = $name - } else { - $body = $content - } - - concat::fragment{ "motd_fragment_$name": - target => '/etc/motd', - order => $order, - content => " -- $body\n" - } -} -``` - -To use this you'd then do something like: - -```puppet -class apache { - include apache::install, apache::config, apache::service - - motd::register{ 'Apache': } -} -``` - -##Reference - -###Classes - -####Public classes - -####Private classes -* `concat::setup`: Sets up the concat script/directories. - -###Parameters - -###Defines - -####concat - -#####`ensure` -Controls if the combined file is present or absent. - -######Example -- ensure => present -- ensure => absent - -#####`path` -Controls the destination of the file to create. - -######Example -- path => '/tmp/filename' - -#####`owner` -Set the owner of the combined file. - -######Example -- owner => 'root' - -#####`group` -Set the group of the combined file. - -######Example -- group => 'root' - -#####`mode` -Set the mode of the combined file. - -######Example -- mode => '0644' - -#####`warn` -Determine if a warning message should be added at the top of the file to let -users know it was autogenerated by Puppet. - -######Example -- warn => true -- warn => false - -#####`warn_message` -Set the contents of the warning message. - -######Example -- warn_message => 'This file is autogenerated!' - -#####`force` -Determine if empty files are allowed when no fragments were added. - -######Example -- force => true -- force => false - -#####`backup` -Controls the filebucket behavior used for the file. - -######Example -- backup => 'puppet' - -#####`replace` -Controls if Puppet should replace the destination file if it already exists. - -######Example -- replace => true -- replace => false - -#####`order` -Controls the way in which the shell script chooses to sort the files. It's -rare you'll need to adjust this. - -######Allowed Values -- order => 'alpha' -- order => 'numeric' - -#####`ensure_newline` -Ensure there's a newline at the end of the fragments. - -######Example -- ensure_newline => true -- ensure_newline => false - -####concat::fragment - -#####`target` -Choose the destination file of the fragment. - -######Example -- target => '/tmp/testfile' - -#####`content` -Create the content of the fragment. - -######Example -- content => 'test file contents' - -#####`source` -Find the sources within Puppet of the fragment. - -######Example -- source => 'puppet:///modules/test/testfile' -- source => ['puppet:///modules/test/1', 'puppet:///modules/test/2'] - -#####`order` -Order the fragments. - -######Example -- order => '01' - -#####`ensure` -Control the file of fragment created. - -######Example -- ensure => 'present' -- ensure => 'absent' -- ensure => 'file' -- ensure => 'directory' - -#####`mode` -Set the mode of the fragment. - -######Example -- mode => '0644' - -#####`owner` -Set the owner of the fragment. - -######Example -- owner => 'root' - -#####`group` -Set the group of the fragment. - -######Example -- group => 'root' - -#####`backup` -Control the filebucket behavior for the fragment. - -######Example -- backup => 'puppet' - -### API _deprecations_ - -#### Since version `1.0.0` - -##### `concat{}` `warn` parameter - -```puppet -concat { '/tmp/file': - ensure => present, - warn => 'true', # generates stringified boolean value warning -} -``` - -Using stringified Boolean values as the `warn` parameter to `concat` is -deprecated, generates a catalog compile time warning, and will be silently -treated as the concatenated file header/warning message in a future release. - -The following strings are considered a stringified Boolean value: - - * `'true'` - * `'yes'` - * `'on'` - * `'false'` - * `'no'` - * `'off'` - -Please migrate to using the Puppet DSL's native [Boolean data -type](http://docs.puppetlabs.com/puppet/3/reference/lang_datatypes.html#booleans). - -##### `concat{}` `gnu` parameter - -```puppet -concat { '/tmp/file': - ensure => present, - gnu => $foo, # generates deprecation warning -} -``` - -The `gnu` parameter to `concat` is deprecated, generates a catalog compile time -warning, and has no effect. This parameter will be removed in a future -release. - -Note that this parameter was silently ignored in the `1.0.0` release. - -##### `concat::fragment{}` `ensure` parameter - -```puppet -concat::fragment { 'cpuinfo': - ensure => '/proc/cpuinfo', # generates deprecation warning - target => '/tmp/file', -} -``` - -Passing a value other than `'present'` or `'absent'` as the `ensure` parameter -to `concat::fragment` is deprecated and generates a catalog compile time -warning. The warning will become a catalog compilation failure in a future -release. - -This type emulates the Puppet core `file` type's disfavored [`ensure` -semantics](http://docs.puppetlabs.com/references/latest/type.html#file-attribute-ensure) -of treating a file path as a directive to create a symlink. This feature is -problematic in several ways. It copies an API semantic of another type that is -both frowned upon and not generally well known. It's behavior may be -surprising in that the target concatenated file will not be a symlink nor is -there any common file system that has a concept of a section of a plain file -being symbolically linked to another file. Additionally, the behavior is -generally inconsistent with most Puppet types in that a missing source file -will be silently ignored. - -If you want to use the content of a file as a fragment please use the `source` -parameter. - -##### `concat::fragment{}` `mode/owner/group` parameters - -```puppet -concat::fragment { 'foo': - target => '/tmp/file', - content => 'foo', - mode => $mode, # generates deprecation warning - owner => $owner, # generates deprecation warning - group => $group, # generates deprecation warning -} -``` - -The `mode` parameter to `concat::fragment` is deprecated, generates a catalog compile time warning, and has no effect. - -The `owner` parameter to `concat::fragment` is deprecated, generates a catalog -compile time warning, and has no effect. - -The `group` parameter to `concat::fragment` is deprecated, generates a catalog -compile time warning, and has no effect. - -These parameters had no user visible effect in version `1.0.0` and will be -removed in a future release. - -##### `concat::fragment{}` `backup` parameter - -```puppet -concat::fragment { 'foo': - target => '/tmp/file', - content => 'foo', - backup => 'bar', # generates deprecation warning -} -``` - -The `backup` parameter to `concat::fragment` is deprecated, generates a catalog -compile time warning, and has no effect. It will be removed in a future -release. - -In the `1.0.0` release this parameter controlled file bucketing of the file -fragment. Bucketting the fragment(s) is redundant with bucketting the final -concatenated file and this feature has been removed. - -##### `class { 'concat::setup': }` - -```puppet -include concat::setup # generates deprecation warning - -class { 'concat::setup: } # generates deprecation warning -``` - -The `concat::setup` class is deprecated as a public API of this module and -should no longer be directly included in the manifest. This class may be -removed in a future release. - -##### Parameter validation - -While not an API depreciation, users should be aware that all public parameters -in this module are now validated for at least variable type. This may cause -validation errors in a manifest that was previously silently misbehaving. - -##Limitations - -This module has been tested on: - -* RedHat Enterprise Linux (and Centos) 5/6 -* Debian 6/7 -* Ubuntu 12.04 - -Testing on other platforms has been light and cannot be guaranteed. - -#Development - -Puppet Labs modules on the Puppet Forge are open projects, and community -contributions are essential for keeping them great. We can’t access the -huge number of platforms and myriad of hardware, software, and deployment -configurations that Puppet is intended to serve. - -We want to keep it as easy as possible to contribute changes so that our -modules work in your environment. There are a few guidelines that we need -contributors to follow so that we can have a chance of keeping on top of things. - -You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) - -###Contributors - -The list of contributors can be found at: - -https://github.com/puppetlabs/puppetlabs-concat/graphs/contributors diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/Rakefile deleted file mode 100644 index 23aea87de2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/Rakefile +++ /dev/null @@ -1,5 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' - -PuppetLint.configuration.send('disable_80chars') -PuppetLint.configuration.send('disable_quoted_booleans') diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/files/concatfragments.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/files/concatfragments.rb deleted file mode 100755 index 73fd7f9b2d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/files/concatfragments.rb +++ /dev/null @@ -1,137 +0,0 @@ -# Script to concat files to a config file. -# -# Given a directory like this: -# /path/to/conf.d -# |-- fragments -# | |-- 00_named.conf -# | |-- 10_domain.net -# | `-- zz_footer -# -# The script supports a test option that will build the concat file to a temp location and -# use /usr/bin/cmp to verify if it should be run or not. This would result in the concat happening -# twice on each run but gives you the option to have an unless option in your execs to inhibit rebuilds. -# -# Without the test option and the unless combo your services that depend on the final file would end up -# restarting on each run, or in other manifest models some changes might get missed. -# -# OPTIONS: -# -o The file to create from the sources -# -d The directory where the fragments are kept -# -t Test to find out if a build is needed, basically concats the files to a temp -# location and compare with what's in the final location, return codes are designed -# for use with unless on an exec resource -# -w Add a shell style comment at the top of the created file to warn users that it -# is generated by puppet -# -f Enables the creation of empty output files when no fragments are found -# -n Sort the output numerically rather than the default alpha sort -# -# the command: -# -# concatfragments.rb -o /path/to/conffile.cfg -d /path/to/conf.d -# -# creates /path/to/conf.d/fragments.concat and copies the resulting -# file to /path/to/conffile.cfg. The files will be sorted alphabetically -# pass the -n switch to sort numerically. -# -# The script does error checking on the various dirs and files to make -# sure things don't fail. -require 'optparse' -require 'fileutils' - -settings = { - :outfile => "", - :workdir => "", - :test => false, - :force => false, - :warn => "", - :sortarg => "" -} - -OptionParser.new do |opts| - opts.banner = "Usage: #{$0} [options]" - opts.separator "Specific options:" - - opts.on("-o", "--outfile OUTFILE", String, "The file to create from the sources") do |o| - settings[:outfile] = o - end - - opts.on("-d", "--workdir WORKDIR", String, "The directory where the fragments are kept") do |d| - settings[:workdir] = d - end - - opts.on("-t", "--test", "Test to find out if a build is needed") do - settings[:test] = true - end - - opts.separator "Other options:" - opts.on("-w", "--warn WARNMSG", String, - "Add a shell style comment at the top of the created file to warn users that it is generated by puppet") do |w| - settings[:warn] = w - end - - opts.on("-f", "--force", "Enables the creation of empty output files when no fragments are found") do - settings[:force] = true - end - - opts.on("-n", "--sort", "Sort the output numerically rather than the default alpha sort") do - settings[:sortarg] = "-n" - end -end.parse! - -# do we have -o? -raise 'Please specify an output file with -o' unless !settings[:outfile].empty? - -# do we have -d? -raise 'Please specify fragments directory with -d' unless !settings[:workdir].empty? - -# can we write to -o? -if File.file?(settings[:outfile]) - if !File.writable?(settings[:outfile]) - raise "Cannot write to #{settings[:outfile]}" - end -else - if !File.writable?(File.dirname(settings[:outfile])) - raise "Cannot write to dirname #{File.dirname(settings[:outfile])} to create #{settings[:outfile]}" - end -end - -# do we have a fragments subdir inside the work dir? -if !File.directory?(File.join(settings[:workdir], "fragments")) && !File.executable?(File.join(settings[:workdir], "fragments")) - raise "Cannot access the fragments directory" -end - -# are there actually any fragments? -if (Dir.entries(File.join(settings[:workdir], "fragments")) - %w{ . .. }).empty? - if !settings[:force] - raise "The fragments directory is empty, cowardly refusing to make empty config files" - end -end - -Dir.chdir(settings[:workdir]) - -if settings[:warn].empty? - File.open("fragments.concat", 'w') {|f| f.write("") } -else - File.open("fragments.concat", 'w') {|f| f.write("#{settings[:warn]}\n") } -end - -# find all the files in the fragments directory, sort them numerically and concat to fragments.concat in the working dir -open('fragments.concat', 'a') do |f| - Dir.entries("fragments").sort.each{ |entry| - if File.file?(File.join("fragments", entry)) - f << File.read(File.join("fragments", entry)) - end - } -end - -if !settings[:test] - # This is a real run, copy the file to outfile - FileUtils.cp 'fragments.concat', settings[:outfile] -else - # Just compare the result to outfile to help the exec decide - if FileUtils.cmp 'fragments.concat', settings[:outfile] - exit 0 - else - exit 1 - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/files/concatfragments.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/files/concatfragments.sh deleted file mode 100755 index 7e6b0f5c56..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/files/concatfragments.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/sh - -# Script to concat files to a config file. -# -# Given a directory like this: -# /path/to/conf.d -# |-- fragments -# | |-- 00_named.conf -# | |-- 10_domain.net -# | `-- zz_footer -# -# The script supports a test option that will build the concat file to a temp location and -# use /usr/bin/cmp to verify if it should be run or not. This would result in the concat happening -# twice on each run but gives you the option to have an unless option in your execs to inhibit rebuilds. -# -# Without the test option and the unless combo your services that depend on the final file would end up -# restarting on each run, or in other manifest models some changes might get missed. -# -# OPTIONS: -# -o The file to create from the sources -# -d The directory where the fragments are kept -# -t Test to find out if a build is needed, basically concats the files to a temp -# location and compare with what's in the final location, return codes are designed -# for use with unless on an exec resource -# -w Add a shell style comment at the top of the created file to warn users that it -# is generated by puppet -# -f Enables the creation of empty output files when no fragments are found -# -n Sort the output numerically rather than the default alpha sort -# -# the command: -# -# concatfragments.sh -o /path/to/conffile.cfg -d /path/to/conf.d -# -# creates /path/to/conf.d/fragments.concat and copies the resulting -# file to /path/to/conffile.cfg. The files will be sorted alphabetically -# pass the -n switch to sort numerically. -# -# The script does error checking on the various dirs and files to make -# sure things don't fail. - -OUTFILE="" -WORKDIR="" -TEST="" -FORCE="" -WARN="" -SORTARG="" -ENSURE_NEWLINE="" - -PATH=/sbin:/usr/sbin:/bin:/usr/bin - -## Well, if there's ever a bad way to do things, Nexenta has it. -## http://nexenta.org/projects/site/wiki/Personalities -unset SUN_PERSONALITY - -while getopts "o:s:d:tnw:fl" options; do - case $options in - o ) OUTFILE=$OPTARG;; - d ) WORKDIR=$OPTARG;; - n ) SORTARG="-n";; - w ) WARNMSG="$OPTARG";; - f ) FORCE="true";; - t ) TEST="true";; - l ) ENSURE_NEWLINE="true";; - * ) echo "Specify output file with -o and fragments directory with -d" - exit 1;; - esac -done - -# do we have -o? -if [ "x${OUTFILE}" = "x" ]; then - echo "Please specify an output file with -o" - exit 1 -fi - -# do we have -d? -if [ "x${WORKDIR}" = "x" ]; then - echo "Please fragments directory with -d" - exit 1 -fi - -# can we write to -o? -if [ -f "${OUTFILE}" ]; then - if [ ! -w "${OUTFILE}" ]; then - echo "Cannot write to ${OUTFILE}" - exit 1 - fi -else - if [ ! -w `dirname "${OUTFILE}"` ]; then - echo "Cannot write to `dirname \"${OUTFILE}\"` to create ${OUTFILE}" - exit 1 - fi -fi - -# do we have a fragments subdir inside the work dir? -if [ ! -d "${WORKDIR}/fragments" ] && [ ! -x "${WORKDIR}/fragments" ]; then - echo "Cannot access the fragments directory" - exit 1 -fi - -# are there actually any fragments? -if [ ! "$(ls -A """${WORKDIR}/fragments""")" ]; then - if [ "x${FORCE}" = "x" ]; then - echo "The fragments directory is empty, cowardly refusing to make empty config files" - exit 1 - fi -fi - -cd "${WORKDIR}" - -if [ "x${WARNMSG}" = "x" ]; then - : > "fragments.concat" -else - printf '%s\n' "$WARNMSG" > "fragments.concat" -fi - -# find all the files in the fragments directory, sort them numerically and concat to fragments.concat in the working dir -IFS_BACKUP=$IFS -IFS=' -' -for fragfile in `find fragments/ -type f -follow -print0 | xargs -0 -n1 basename | LC_ALL=C sort ${SORTARG}` -do - cat "fragments/$fragfile" >> "fragments.concat" - # Handle newlines. - if [ "x${ENSURE_NEWLINE}" != "x" ]; then - echo >> "fragments.concat" - fi -done -IFS=$IFS_BACKUP - -if [ "x${TEST}" = "x" ]; then - # This is a real run, copy the file to outfile - cp fragments.concat "${OUTFILE}" - RETVAL=$? -else - # Just compare the result to outfile to help the exec decide - cmp "${OUTFILE}" fragments.concat - RETVAL=$? -fi - -exit $RETVAL diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/lib/facter/concat_basedir.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/lib/facter/concat_basedir.rb deleted file mode 100644 index bfac07102d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/lib/facter/concat_basedir.rb +++ /dev/null @@ -1,11 +0,0 @@ -# == Fact: concat_basedir -# -# A custom fact that sets the default location for fragments -# -# "${::vardir}/concat/" -# -Facter.add("concat_basedir") do - setcode do - File.join(Puppet[:vardir],"concat") - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/manifests/fragment.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/manifests/fragment.pp deleted file mode 100644 index 40baadd234..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/manifests/fragment.pp +++ /dev/null @@ -1,121 +0,0 @@ -# == Define: concat::fragment -# -# Puts a file fragment into a directory previous setup using concat -# -# === Options: -# -# [*target*] -# The file that these fragments belong to -# [*content*] -# If present puts the content into the file -# [*source*] -# If content was not specified, use the source -# [*order*] -# By default all files gets a 10_ prefix in the directory you can set it to -# anything else using this to influence the order of the content in the file -# [*ensure*] -# Present/Absent or destination to a file to include another file -# [*mode*] -# Deprecated -# [*owner*] -# Deprecated -# [*group*] -# Deprecated -# [*backup*] -# Deprecated -# -define concat::fragment( - $target, - $content = undef, - $source = undef, - $order = 10, - $ensure = undef, - $mode = undef, - $owner = undef, - $group = undef, - $backup = undef -) { - validate_string($target) - validate_string($content) - if !(is_string($source) or is_array($source)) { - fail('$source is not a string or an Array.') - } - validate_string($order) - if $mode { - warning('The $mode parameter to concat::fragment is deprecated and has no effect') - } - if $owner { - warning('The $owner parameter to concat::fragment is deprecated and has no effect') - } - if $group { - warning('The $group parameter to concat::fragment is deprecated and has no effect') - } - if $backup { - warning('The $backup parameter to concat::fragment is deprecated and has no effect') - } - if $ensure == undef { - $_ensure = getparam(Concat[$target], 'ensure') - } else { - if ! ($ensure in [ 'present', 'absent' ]) { - warning('Passing a value other than \'present\' or \'absent\' as the $ensure parameter to concat::fragment is deprecated. If you want to use the content of a file as a fragment please use the $source parameter.') - } - $_ensure = $ensure - } - - include concat::setup - - $safe_name = regsubst($name, '[/:\n]', '_', 'GM') - $safe_target_name = regsubst($target, '[/:\n]', '_', 'GM') - $concatdir = $concat::setup::concatdir - $fragdir = "${concatdir}/${safe_target_name}" - $fragowner = $concat::setup::fragment_owner - $fragmode = $concat::setup::fragment_mode - - # The file type's semantics are problematic in that ensure => present will - # not over write a pre-existing symlink. We are attempting to provide - # backwards compatiblity with previous concat::fragment versions that - # supported the file type's ensure => /target syntax - - # be paranoid and only allow the fragment's file resource's ensure param to - # be file, absent, or a file target - $safe_ensure = $_ensure ? { - '' => 'file', - undef => 'file', - 'file' => 'file', - 'present' => 'file', - 'absent' => 'absent', - default => $_ensure, - } - - # if it looks line ensure => /target syntax was used, fish that out - if ! ($_ensure in ['', 'present', 'absent', 'file' ]) { - $ensure_target = $_ensure - } else { - $ensure_target = undef - } - - # the file type's semantics only allows one of: ensure => /target, content, - # or source - if ($ensure_target and $source) or - ($ensure_target and $content) or - ($source and $content) { - fail('You cannot specify more than one of $content, $source, $ensure => /target') - } - - if ! ($content or $source or $ensure_target) { - crit('No content, source or symlink specified') - } - - # punt on group ownership until some point in the distant future when $::gid - # can be relied on to be present - file { "${fragdir}/fragments/${order}_${safe_name}": - ensure => $safe_ensure, - owner => $fragowner, - mode => $fragmode, - source => $source, - content => $content, - backup => false, - alias => "concat_fragment_${name}", - notify => Exec["concat_${target}"] - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/manifests/init.pp deleted file mode 100644 index 91d82ebd3e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/manifests/init.pp +++ /dev/null @@ -1,232 +0,0 @@ -# == Define: concat -# -# Sets up so that you can use fragments to build a final config file, -# -# === Options: -# -# [*ensure*] -# Present/Absent -# [*path*] -# The path to the final file. Use this in case you want to differentiate -# between the name of a resource and the file path. Note: Use the name you -# provided in the target of your fragments. -# [*owner*] -# Who will own the file -# [*group*] -# Who will own the file -# [*mode*] -# The mode of the final file -# [*force*] -# Enables creating empty files if no fragments are present -# [*warn*] -# Adds a normal shell style comment top of the file indicating that it is -# built by puppet -# [*force*] -# [*backup*] -# Controls the filebucketing behavior of the final file and see File type -# reference for its use. Defaults to 'puppet' -# [*replace*] -# Whether to replace a file that already exists on the local system -# [*order*] -# [*ensure_newline*] -# [*gnu*] -# Deprecated -# -# === Actions: -# * Creates fragment directories if it didn't exist already -# * Executes the concatfragments.sh script to build the final file, this -# script will create directory/fragments.concat. Execution happens only -# when: -# * The directory changes -# * fragments.concat != final destination, this means rebuilds will happen -# whenever someone changes or deletes the final file. Checking is done -# using /usr/bin/cmp. -# * The Exec gets notified by something else - like the concat::fragment -# define -# * Copies the file over to the final destination using a file resource -# -# === Aliases: -# -# * The exec can notified using Exec["concat_/path/to/file"] or -# Exec["concat_/path/to/directory"] -# * The final file can be referenced as File["/path/to/file"] or -# File["concat_/path/to/file"] -# -define concat( - $ensure = 'present', - $path = $name, - $owner = undef, - $group = undef, - $mode = '0644', - $warn = false, - $force = false, - $backup = 'puppet', - $replace = true, - $order = 'alpha', - $ensure_newline = false, - $gnu = undef -) { - validate_re($ensure, '^present$|^absent$') - validate_absolute_path($path) - validate_string($owner) - validate_string($group) - validate_string($mode) - if ! (is_string($warn) or $warn == true or $warn == false) { - fail('$warn is not a string or boolean') - } - validate_bool($force) - validate_string($backup) - validate_bool($replace) - validate_re($order, '^alpha$|^numeric$') - validate_bool($ensure_newline) - if $gnu { - warning('The $gnu parameter to concat is deprecated and has no effect') - } - - include concat::setup - - $safe_name = regsubst($name, '[/:]', '_', 'G') - $concatdir = $concat::setup::concatdir - $fragdir = "${concatdir}/${safe_name}" - $concat_name = 'fragments.concat.out' - $script_command = $concat::setup::script_command - $default_warn_message = '# This file is managed by Puppet. DO NOT EDIT.' - $bool_warn_message = 'Using stringified boolean values (\'true\', \'yes\', \'on\', \'false\', \'no\', \'off\') to represent boolean true/false as the $warn parameter to concat is deprecated and will be treated as the warning message in a future release' - - case $warn { - true: { - $warn_message = $default_warn_message - } - 'true', 'yes', 'on': { - warning($bool_warn_message) - $warn_message = $default_warn_message - } - false: { - $warn_message = '' - } - 'false', 'no', 'off': { - warning($bool_warn_message) - $warn_message = '' - } - default: { - $warn_message = $warn - } - } - - $warnmsg_escaped = regsubst($warn_message, '\'', '\'\\\'\'', 'G') - $warnflag = $warnmsg_escaped ? { - '' => '', - default => "-w '${warnmsg_escaped}'" - } - - $forceflag = $force ? { - true => '-f', - false => '', - } - - $orderflag = $order ? { - 'numeric' => '-n', - 'alpha' => '', - } - - $newlineflag = $ensure_newline ? { - true => '-l', - false => '', - } - - File { - backup => false, - } - - if $ensure == 'present' { - file { $fragdir: - ensure => directory, - mode => '0750', - } - - file { "${fragdir}/fragments": - ensure => directory, - mode => '0750', - force => true, - ignore => ['.svn', '.git', '.gitignore'], - notify => Exec["concat_${name}"], - purge => true, - recurse => true, - } - - file { "${fragdir}/fragments.concat": - ensure => present, - mode => '0640', - } - - file { "${fragdir}/${concat_name}": - ensure => present, - mode => '0640', - } - - file { $name: - ensure => present, - owner => $owner, - group => $group, - mode => $mode, - replace => $replace, - path => $path, - alias => "concat_${name}", - source => "${fragdir}/${concat_name}", - backup => $backup, - } - - # remove extra whitespace from string interpolation to make testing easier - $command = strip(regsubst("${script_command} -o \"${fragdir}/${concat_name}\" -d \"${fragdir}\" ${warnflag} ${forceflag} ${orderflag} ${newlineflag}", '\s+', ' ', 'G')) - - # if puppet is running as root, this exec should also run as root to allow - # the concatfragments.sh script to potentially be installed in path that - # may not be accessible by a target non-root owner. - exec { "concat_${name}": - alias => "concat_${fragdir}", - command => $command, - notify => File[$name], - subscribe => File[$fragdir], - unless => "${command} -t", - path => $::path, - require => [ - File[$fragdir], - File["${fragdir}/fragments"], - File["${fragdir}/fragments.concat"], - ], - } - } else { - file { [ - $fragdir, - "${fragdir}/fragments", - "${fragdir}/fragments.concat", - "${fragdir}/${concat_name}" - ]: - ensure => absent, - force => true, - } - - file { $path: - ensure => absent, - backup => $backup, - } - - $absent_exec_command = $::kernel ? { - 'windows' => 'cmd.exe /c exit 0', - default => 'true', - } - - $absent_exec_path = $::kernel ? { - 'windows' => $::path, - default => '/bin:/usr/bin', - } - - exec { "concat_${name}": - alias => "concat_${fragdir}", - command => $absent_exec_command, - path => $absent_exec_path - } - } -} - -# vim:sw=2:ts=2:expandtab:textwidth=79 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/manifests/setup.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/manifests/setup.pp deleted file mode 100644 index 17674003ce..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/manifests/setup.pp +++ /dev/null @@ -1,58 +0,0 @@ -# === Class: concat::setup -# -# Sets up the concat system. This is a private class. -# -# [$concatdir] -# is where the fragments live and is set on the fact concat_basedir. -# Since puppet should always manage files in $concatdir and they should -# not be deleted ever, /tmp is not an option. -# -# It also copies out the concatfragments.sh file to ${concatdir}/bin -# -class concat::setup { - if $caller_module_name != $module_name { - warning("${name} is deprecated as a public API of the ${module_name} module and should no longer be directly included in the manifest.") - } - - if $::concat_basedir { - $concatdir = $::concat_basedir - } else { - fail ('$concat_basedir not defined. Try running again with pluginsync=true on the [master] and/or [main] section of your node\'s \'/etc/puppet/puppet.conf\'.') - } - - # owner and mode of fragment files (on windows owner and access rights should be inherited from concatdir and not explicitly set to avoid problems) - $fragment_owner = $osfamily ? { 'windows' => undef, default => $::id } - $fragment_mode = $osfamily ? { 'windows' => undef, default => '0640' } - - $script_name = $::kernel ? { - 'windows' => 'concatfragments.rb', - default => 'concatfragments.sh' - } - - $script_path = "${concatdir}/bin/${script_name}" - - $script_owner = $osfamily ? { 'windows' => undef, default => $::id } - - $script_mode = $osfamily ? { 'windows' => undef, default => '0755' } - - $script_command = $::kernel ? { - 'windows' => "ruby.exe ${script_path}", - default => $script_path - } - - File { - backup => false, - } - - file { $script_path: - ensure => file, - owner => $script_owner, - mode => $script_mode, - source => "puppet:///modules/concat/${script_name}", - } - - file { [ $concatdir, "${concatdir}/bin" ]: - ensure => directory, - mode => '0755', - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/backup_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/backup_spec.rb deleted file mode 100644 index 7b2858d8e9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/backup_spec.rb +++ /dev/null @@ -1,101 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'concat backup parameter' do - context '=> puppet' do - before :all do - shell('rm -rf /tmp/concat') - shell('mkdir -p /tmp/concat') - shell("/bin/echo 'old contents' > /tmp/concat/file") - end - - pp = <<-EOS - concat { '/tmp/concat/file': - backup => 'puppet', - } - concat::fragment { 'new file': - target => '/tmp/concat/file', - content => 'new contents', - } - EOS - - it 'applies the manifest twice with "Filebucketed" stdout and no stderr' do - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stderr).to eq("") - expect(r.stdout).to match(/Filebucketed \/tmp\/concat\/file to puppet with sum 0140c31db86293a1a1e080ce9b91305f/) # sum is for file contents of 'old contents' - end - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'new contents' } - end - end - - context '=> .backup' do - before :all do - shell('rm -rf /tmp/concat') - shell('mkdir -p /tmp/concat') - shell("/bin/echo 'old contents' > /tmp/concat/file") - end - - pp = <<-EOS - concat { '/tmp/concat/file': - backup => '.backup', - } - concat::fragment { 'new file': - target => '/tmp/concat/file', - content => 'new contents', - } - EOS - - # XXX Puppet doesn't mention anything about filebucketing with a given - # extension like .backup - it 'applies the manifest twice no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'new contents' } - end - describe file('/tmp/concat/file.backup') do - it { should be_file } - it { should contain 'old contents' } - end - end - - # XXX The backup parameter uses validate_string() and thus can't be the - # boolean false value, but the string 'false' has the same effect in Puppet 3 - context "=> 'false'" do - before :all do - shell('rm -rf /tmp/concat') - shell('mkdir -p /tmp/concat') - shell("/bin/echo 'old contents' > /tmp/concat/file") - end - - pp = <<-EOS - concat { '/tmp/concat/file': - backup => '.backup', - } - concat::fragment { 'new file': - target => '/tmp/concat/file', - content => 'new contents', - } - EOS - - it 'applies the manifest twice with no "Filebucketed" stdout and no stderr' do - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stderr).to eq("") - expect(r.stdout).to_not match(/Filebucketed/) - end - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'new contents' } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/concat_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/concat_spec.rb deleted file mode 100644 index 89919cc53b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/concat_spec.rb +++ /dev/null @@ -1,204 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'basic concat test' do - - shared_examples 'successfully_applied' do |pp| - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file("#{default['puppetvardir']}/concat") do - it { should be_directory } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 755 } - end - describe file("#{default['puppetvardir']}/concat/bin") do - it { should be_directory } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 755 } - end - describe file("#{default['puppetvardir']}/concat/bin/concatfragments.sh") do - it { should be_file } - it { should be_owned_by 'root' } - #it { should be_grouped_into 'root' } - it { should be_mode 755 } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file") do - it { should be_directory } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 750 } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments") do - it { should be_directory } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 750 } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments.concat") do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 640 } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments.concat.out") do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 640 } - end - end - - context 'owner/group root' do - pp = <<-EOS - concat { '/tmp/concat/file': - owner => 'root', - group => 'root', - mode => '0644', - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - order => '01', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - order => '02', - } - EOS - - it_behaves_like 'successfully_applied', pp - - describe file('/tmp/concat/file') do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 644 } - it { should contain '1' } - it { should contain '2' } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments/01_1") do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 640 } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments/02_2") do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 640 } - end - end - - context 'owner/group non-root' do - before(:all) do - shell "groupadd -g 64444 bob" - shell "useradd -u 42 -g 64444 bob" - end - after(:all) do - shell "userdel bob" - end - - pp=" - concat { '/tmp/concat/file': - owner => 'bob', - group => 'bob', - mode => '0644', - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - order => '01', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - order => '02', - } - " - - it_behaves_like 'successfully_applied', pp - - describe file('/tmp/concat/file') do - it { should be_file } - it { should be_owned_by 'bob' } - it { should be_grouped_into 'bob' } - it { should be_mode 644 } - it { should contain '1' } - it { should contain '2' } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments/01_1") do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 640 } - it { should contain '1' } - end - describe file("#{default['puppetvardir']}/concat/_tmp_concat_file/fragments/02_2") do - it { should be_file } - it { should be_owned_by 'root' } - it { should be_grouped_into 'root' } - it { should be_mode 640 } - it { should contain '2' } - end - end - - context 'ensure' do - context 'works when set to present with path set' do - pp=" - concat { 'file': - ensure => present, - path => '/tmp/concat/file', - mode => '0644', - } - concat::fragment { '1': - target => 'file', - content => '1', - order => '01', - } - " - - it_behaves_like 'successfully_applied', pp - - describe file('/tmp/concat/file') do - it { should be_file } - it { should be_mode 644 } - it { should contain '1' } - end - end - context 'works when set to absent with path set' do - pp=" - concat { 'file': - ensure => absent, - path => '/tmp/concat/file', - mode => '0644', - } - concat::fragment { '1': - target => 'file', - content => '1', - order => '01', - } - " - - # Can't used shared examples as this will always trigger the exec when - # absent is set. - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should_not be_file } - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/deprecation_warnings_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/deprecation_warnings_spec.rb deleted file mode 100644 index f139d818c6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/deprecation_warnings_spec.rb +++ /dev/null @@ -1,230 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'deprecation warnings' do - - shared_examples 'has_warning'do |pp, w| - it 'applies the manifest twice with a stderr regex' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to match(/#{Regexp.escape(w)}/m) - expect(apply_manifest(pp, :catch_changes => true).stderr).to match(/#{Regexp.escape(w)}/m) - end - end - - context 'concat gnu parameter' do - pp = <<-EOS - concat { '/tmp/concat/file': - gnu => 'foo', - } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - } - EOS - w = 'The $gnu parameter to concat is deprecated and has no effect' - - it_behaves_like 'has_warning', pp, w - end - - context 'concat warn parameter =>' do - ['true', 'yes', 'on'].each do |warn| - context warn do - pp = <<-EOS - concat { '/tmp/concat/file': - warn => '#{warn}', - } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - } - EOS - w = 'Using stringified boolean values (\'true\', \'yes\', \'on\', \'false\', \'no\', \'off\') to represent boolean true/false as the $warn parameter to concat is deprecated and will be treated as the warning message in a future release' - - it_behaves_like 'has_warning', pp, w - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain '# This file is managed by Puppet. DO NOT EDIT.' } - it { should contain 'bar' } - end - end - end - - ['false', 'no', 'off'].each do |warn| - context warn do - pp = <<-EOS - concat { '/tmp/concat/file': - warn => '#{warn}', - } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - } - EOS - w = 'Using stringified boolean values (\'true\', \'yes\', \'on\', \'false\', \'no\', \'off\') to represent boolean true/false as the $warn parameter to concat is deprecated and will be treated as the warning message in a future release' - - it_behaves_like 'has_warning', pp, w - - describe file('/tmp/concat/file') do - it { should be_file } - it { should_not contain '# This file is managed by Puppet. DO NOT EDIT.' } - it { should contain 'bar' } - end - end - end - end - - context 'concat::fragment ensure parameter' do - context 'target file exists' do - before(:all) do - shell("/bin/echo 'file1 contents' > /tmp/concat/file1") - end - after(:all) do - # XXX this test may leave behind a symlink in the fragment directory - # which could cause warnings and/or breakage from the subsequent tests - # unless we clean it up. - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - shell('mkdir -p /tmp/concat') - end - - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - ensure => '/tmp/concat/file1', - } - EOS - w = 'Passing a value other than \'present\' or \'absent\' as the $ensure parameter to concat::fragment is deprecated. If you want to use the content of a file as a fragment please use the $source parameter.' - - it_behaves_like 'has_warning', pp, w - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'file1 contents' } - end - - describe 'the fragment can be changed from a symlink to a plain file' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'new content', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'new content' } - it { should_not contain 'file1 contents' } - end - end - end # target file exists - - context 'target does not exist' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - ensure => '/tmp/concat/file1', - } - EOS - w = 'Passing a value other than \'present\' or \'absent\' as the $ensure parameter to concat::fragment is deprecated. If you want to use the content of a file as a fragment please use the $source parameter.' - - it_behaves_like 'has_warning', pp, w - - describe file('/tmp/concat/file') do - it { should be_file } - end - - describe 'the fragment can be changed from a symlink to a plain file' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'new content', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'new content' } - end - end - end # target file exists - - end # concat::fragment ensure parameter - - context 'concat::fragment mode parameter' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - mode => 'bar', - } - EOS - w = 'The $mode parameter to concat::fragment is deprecated and has no effect' - - it_behaves_like 'has_warning', pp, w - end - - context 'concat::fragment owner parameter' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - owner => 'bar', - } - EOS - w = 'The $owner parameter to concat::fragment is deprecated and has no effect' - - it_behaves_like 'has_warning', pp, w - end - - context 'concat::fragment group parameter' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - group => 'bar', - } - EOS - w = 'The $group parameter to concat::fragment is deprecated and has no effect' - - it_behaves_like 'has_warning', pp, w - end - - context 'concat::fragment backup parameter' do - pp = <<-EOS - concat { '/tmp/concat/file': } - concat::fragment { 'foo': - target => '/tmp/concat/file', - content => 'bar', - backup => 'bar', - } - EOS - w = 'The $backup parameter to concat::fragment is deprecated and has no effect' - - it_behaves_like 'has_warning', pp, w - end - - context 'include concat::setup' do - pp = <<-EOS - include concat::setup - EOS - w = 'concat::setup is deprecated as a public API of the concat module and should no longer be directly included in the manifest.' - - it_behaves_like 'has_warning', pp, w - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/empty_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/empty_spec.rb deleted file mode 100644 index 09995282a3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/empty_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'concat force empty parameter' do - context 'should run successfully' do - pp = <<-EOS - concat { '/tmp/concat/file': - owner => root, - group => root, - mode => '0644', - force => true, - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should_not contain '1\n2' } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/fragment_source_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/fragment_source_spec.rb deleted file mode 100644 index 3afd53430d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/fragment_source_spec.rb +++ /dev/null @@ -1,134 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'concat::fragment source' do - context 'should read file fragments from local system' do - before(:all) do - shell("/bin/echo 'file1 contents' > /tmp/concat/file1") - shell("/bin/echo 'file2 contents' > /tmp/concat/file2") - end - - pp = <<-EOS - concat { '/tmp/concat/foo': } - - concat::fragment { '1': - target => '/tmp/concat/foo', - source => '/tmp/concat/file1', - } - concat::fragment { '2': - target => '/tmp/concat/foo', - content => 'string1 contents', - } - concat::fragment { '3': - target => '/tmp/concat/foo', - source => '/tmp/concat/file2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/foo') do - it { should be_file } - it { should contain 'file1 contents' } - it { should contain 'string1 contents' } - it { should contain 'file2 contents' } - end - end # should read file fragments from local system - - context 'should create files containing first match only.' do - before(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - shell('mkdir -p /tmp/concat') - shell("/bin/echo 'file1 contents' > /tmp/concat/file1") - shell("/bin/echo 'file2 contents' > /tmp/concat/file2") - end - - pp = <<-EOS - concat { '/tmp/concat/result_file1': - owner => root, - group => root, - mode => '0644', - } - concat { '/tmp/concat/result_file2': - owner => root, - group => root, - mode => '0644', - } - concat { '/tmp/concat/result_file3': - owner => root, - group => root, - mode => '0644', - } - - concat::fragment { '1': - target => '/tmp/concat/result_file1', - source => [ '/tmp/concat/file1', '/tmp/concat/file2' ], - order => '01', - } - concat::fragment { '2': - target => '/tmp/concat/result_file2', - source => [ '/tmp/concat/file2', '/tmp/concat/file1' ], - order => '01', - } - concat::fragment { '3': - target => '/tmp/concat/result_file3', - source => [ '/tmp/concat/file1', '/tmp/concat/file2' ], - order => '01', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - describe file('/tmp/concat/result_file1') do - it { should be_file } - it { should contain 'file1 contents' } - it { should_not contain 'file2 contents' } - end - describe file('/tmp/concat/result_file2') do - it { should be_file } - it { should contain 'file2 contents' } - it { should_not contain 'file1 contents' } - end - describe file('/tmp/concat/result_file3') do - it { should be_file } - it { should contain 'file1 contents' } - it { should_not contain 'file2 contents' } - end - end - - context 'should fail if no match on source.' do - before(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - shell('mkdir -p /tmp/concat') - shell('/bin/rm -rf /tmp/concat/fail_no_source /tmp/concat/nofilehere /tmp/concat/nothereeither') - end - - pp = <<-EOS - concat { '/tmp/concat/fail_no_source': - owner => root, - group => root, - mode => '0644', - } - - concat::fragment { '1': - target => '/tmp/concat/fail_no_source', - source => [ '/tmp/concat/nofilehere', '/tmp/concat/nothereeither' ], - order => '01', - } - EOS - - it 'applies the manifest with resource failures' do - apply_manifest(pp, :expect_failures => true) - end - describe file('/tmp/concat/fail_no_source') do - #FIXME: Serverspec::Type::File doesn't support exists? for some reason. so... hack. - it { should_not be_file } - it { should_not be_directory } - end - end -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/newline_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/newline_spec.rb deleted file mode 100644 index 1e989df2ab..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/newline_spec.rb +++ /dev/null @@ -1,57 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'concat ensure_newline parameter' do - context '=> false' do - pp = <<-EOS - concat { '/tmp/concat/file': - ensure_newline => false, - } - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain '12' } - end - end - - context '=> true' do - pp = <<-EOS - concat { '/tmp/concat/file': - ensure_newline => true, - } - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - #XXX ensure_newline => true causes changes on every run because the files - #are modified in place. - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain "1\n2\n" } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/aix-71-vcloud.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/aix-71-vcloud.yml deleted file mode 100644 index f0ae87a5c8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/aix-71-vcloud.yml +++ /dev/null @@ -1,19 +0,0 @@ -HOSTS: - pe-aix-71-acceptance: - roles: - - master - - dashboard - - database - - agent - - default - platform: aix-7.1-power - hypervisor: aix - ip: pe-aix-71-acceptance.delivery.puppetlabs.net -CONFIG: - type: pe - nfs_server: NONE - consoleport: 443 - datastore: instance0 - folder: Delivery/Quality Assurance/Enterprise/Dynamic - resourcepool: delivery/Quality Assurance/Enterprise/Dynamic - pooling_api: http://vcloud.delivery.puppetlabs.net/ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-59-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-59-x64.yml deleted file mode 100644 index 2ad90b86aa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-59-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-59-x64: - roles: - - master - platform: el-5-x86_64 - box : centos-59-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64-pe.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64-pe.yml deleted file mode 100644 index 7d9242f1b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64-pe.yml +++ /dev/null @@ -1,12 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - - database - - dashboard - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: pe diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64.yml deleted file mode 100644 index 05540ed8c5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/centos-64-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-607-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-607-x64.yml deleted file mode 100644 index 4c8be42d03..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-607-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - debian-607-x64: - roles: - - master - platform: debian-6-amd64 - box : debian-607-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-70rc1-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-70rc1-x64.yml deleted file mode 100644 index 19181c123d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-70rc1-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - debian-70rc1-x64: - roles: - - master - platform: debian-7-amd64 - box : debian-70rc1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-73-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-73-x64.yml deleted file mode 100644 index 3e6a3a9ddd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/debian-73-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - debian-73-x64.localhost: - roles: - - master - platform: debian-7-amd64 - box : debian-73-x64-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/default.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/default.yml deleted file mode 100644 index ae812b0aef..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64.localdomain: - roles: - - master - platform: el-6-x86_64 - box : centos-65-x64-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/fedora-18-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/fedora-18-x64.yml deleted file mode 100644 index 1361649830..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/fedora-18-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - fedora-18-x64: - roles: - - master - platform: fedora-18-x86_64 - box : fedora-18-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11-x64.yml deleted file mode 100644 index 41abe2135e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - sles-11-x64.local: - roles: - - master - platform: sles-11-x64 - box : sles-11sp1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11sp1-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11sp1-x64.yml deleted file mode 100644 index 554c37a505..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/sles-11sp1-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - sles-11sp1-x64: - roles: - - master - platform: sles-11-x86_64 - box : sles-11sp1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml deleted file mode 100644 index 5ca1514e40..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-10044-x64: - roles: - - master - platform: ubuntu-10.04-amd64 - box : ubuntu-server-10044-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml deleted file mode 100644 index d065b304f8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml deleted file mode 100644 index cba1cd04c2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-1404-x64: - roles: - - master - platform: ubuntu-14.04-amd64 - box : puppetlabs/ubuntu-14.04-64-nocm - box_url : https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm - hypervisor : vagrant -CONFIG: - log_level : debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/order_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/order_spec.rb deleted file mode 100644 index 8bcb7131ce..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/order_spec.rb +++ /dev/null @@ -1,137 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'concat order' do - before(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - shell('mkdir -p /tmp/concat') - end - - context '=> alpha' do - pp = <<-EOS - concat { '/tmp/concat/foo': - order => 'alpha' - } - concat::fragment { '1': - target => '/tmp/concat/foo', - content => 'string1', - } - concat::fragment { '2': - target => '/tmp/concat/foo', - content => 'string2', - } - concat::fragment { '10': - target => '/tmp/concat/foo', - content => 'string10', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/foo') do - it { should be_file } - it { should contain "string10\nstring1\nsring2" } - end - end - - context '=> numeric' do - pp = <<-EOS - concat { '/tmp/concat/foo': - order => 'numeric' - } - concat::fragment { '1': - target => '/tmp/concat/foo', - content => 'string1', - } - concat::fragment { '2': - target => '/tmp/concat/foo', - content => 'string2', - } - concat::fragment { '10': - target => '/tmp/concat/foo', - content => 'string10', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/foo') do - it { should be_file } - it { should contain "string1\nstring2\nsring10" } - end - end -end # concat order - -describe 'concat::fragment order' do - before(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - shell('mkdir -p /tmp/concat') - end - - context '=> reverse order' do - pp = <<-EOS - concat { '/tmp/concat/foo': } - concat::fragment { '1': - target => '/tmp/concat/foo', - content => 'string1', - order => '15', - } - concat::fragment { '2': - target => '/tmp/concat/foo', - content => 'string2', - # default order 10 - } - concat::fragment { '3': - target => '/tmp/concat/foo', - content => 'string3', - order => '1', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/foo') do - it { should be_file } - it { should contain "string3\nstring2\nsring1" } - end - end - - context '=> normal order' do - pp = <<-EOS - concat { '/tmp/concat/foo': } - concat::fragment { '1': - target => '/tmp/concat/foo', - content => 'string1', - order => '01', - } - concat::fragment { '2': - target => '/tmp/concat/foo', - content => 'string2', - order => '02' - } - concat::fragment { '3': - target => '/tmp/concat/foo', - content => 'string3', - order => '03', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/foo') do - it { should be_file } - it { should contain "string1\nstring2\nsring3" } - end - end -end # concat::fragment order diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/quoted_paths_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/quoted_paths_spec.rb deleted file mode 100644 index af352efce8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/quoted_paths_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'quoted paths' do - before(:all) do - shell('rm -rf "/tmp/concat test" /var/lib/puppet/concat') - shell('mkdir -p "/tmp/concat test"') - end - - context 'path with blanks' do - pp = <<-EOS - concat { '/tmp/concat test/foo': - } - concat::fragment { '1': - target => '/tmp/concat test/foo', - content => 'string1', - } - concat::fragment { '2': - target => '/tmp/concat test/foo', - content => 'string2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat test/foo') do - it { should be_file } - it { should contain "string1\nsring2" } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/replace_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/replace_spec.rb deleted file mode 100644 index 7b31e09c44..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/replace_spec.rb +++ /dev/null @@ -1,241 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'replacement of' do - context 'file' do - context 'should not succeed' do - before(:all) do - shell('mkdir -p /tmp/concat') - shell('echo "file exists" > /tmp/concat/file') - end - after(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - end - - pp = <<-EOS - concat { '/tmp/concat/file': - replace => false, - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain 'file exists' } - it { should_not contain '1' } - it { should_not contain '2' } - end - end - - context 'should succeed' do - before(:all) do - shell('mkdir -p /tmp/concat') - shell('echo "file exists" > /tmp/concat/file') - end - after(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - end - - pp = <<-EOS - concat { '/tmp/concat/file': - replace => true, - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should_not contain 'file exists' } - it { should contain '1' } - it { should contain '2' } - end - end - end # file - - context 'symlink' do - context 'should not succeed' do - # XXX the core puppet file type will replace a symlink with a plain file - # when using ensure => present and source => ... but it will not when using - # ensure => present and content => ...; this is somewhat confusing behavior - before(:all) do - shell('mkdir -p /tmp/concat') - shell('ln -s /tmp/concat/dangling /tmp/concat/file') - end - after(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - end - - pp = <<-EOS - concat { '/tmp/concat/file': - replace => false, - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_linked_to '/tmp/concat/dangling' } - end - - describe file('/tmp/concat/dangling') do - # XXX serverspec does not have a matcher for 'exists' - it { should_not be_file } - it { should_not be_directory } - end - end - - context 'should succeed' do - # XXX the core puppet file type will replace a symlink with a plain file - # when using ensure => present and source => ... but it will not when using - # ensure => present and content => ...; this is somewhat confusing behavior - before(:all) do - shell('mkdir -p /tmp/concat') - shell('ln -s /tmp/concat/dangling /tmp/concat/file') - end - after(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - end - - pp = <<-EOS - concat { '/tmp/concat/file': - replace => true, - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain '1' } - it { should contain '2' } - end - end - end # symlink - - context 'directory' do - context 'should not succeed' do - before(:all) do - shell('mkdir -p /tmp/concat/file') - end - after(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - end - - pp = <<-EOS - concat { '/tmp/concat/file': } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with stderr for changing to file' do - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/change from directory to file failed/) - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/change from directory to file failed/) - end - - describe file('/tmp/concat/file') do - it { should be_directory } - end - end - - # XXX concat's force param currently enables the creation of empty files - # when there are no fragments, and the replace param will only replace - # files and symlinks, not directories. The semantics either need to be - # changed, extended, or a new param introduced to control directory - # replacement. - context 'should succeed', :pending => 'not yet implemented' do - before(:all) do - shell('mkdir -p /tmp/concat/file') - end - after(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - end - - pp = <<-EOS - concat { '/tmp/concat/file': - force => true, - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain '1' } - end - end - end # directory -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/symbolic_name_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/symbolic_name_spec.rb deleted file mode 100644 index 7267f5e6b4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/symbolic_name_spec.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'symbolic name' do - pp = <<-EOS - concat { 'not_abs_path': - path => '/tmp/concat/file', - } - - concat::fragment { '1': - target => 'not_abs_path', - content => '1', - order => '01', - } - - concat::fragment { '2': - target => 'not_abs_path', - content => '2', - order => '02', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain '1' } - it { should contain '2' } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/warn_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/warn_spec.rb deleted file mode 100644 index cb0b7430dc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/acceptance/warn_spec.rb +++ /dev/null @@ -1,97 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'concat warn =>' do - context 'true should enable default warning message' do - pp = <<-EOS - concat { '/tmp/concat/file': - warn => true, - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - order => '01', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - order => '02', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain '# This file is managed by Puppet. DO NOT EDIT.' } - it { should contain '1' } - it { should contain '2' } - end - end - context 'false should not enable default warning message' do - pp = <<-EOS - concat { '/tmp/concat/file': - warn => false, - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - order => '01', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - order => '02', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should_not contain '# This file is managed by Puppet. DO NOT EDIT.' } - it { should contain '1' } - it { should contain '2' } - end - end - context '# foo should overide default warning message' do - pp = <<-EOS - concat { '/tmp/concat/file': - warn => '# foo', - } - - concat::fragment { '1': - target => '/tmp/concat/file', - content => '1', - order => '01', - } - - concat::fragment { '2': - target => '/tmp/concat/file', - content => '2', - order => '02', - } - EOS - - it 'applies the manifest twice with no stderr' do - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq("") - expect(apply_manifest(pp, :catch_changes => true).stderr).to eq("") - end - - describe file('/tmp/concat/file') do - it { should be_file } - it { should contain '# foo' } - it { should contain '1' } - it { should contain '2' } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/spec_helper.rb deleted file mode 100644 index 2c6f56649a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/spec_helper_acceptance.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/spec_helper_acceptance.rb deleted file mode 100644 index 22bd72f06a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/spec_helper_acceptance.rb +++ /dev/null @@ -1,39 +0,0 @@ -require 'beaker-rspec/spec_helper' -require 'beaker-rspec/helpers/serverspec' - -unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' - if hosts.first.is_pe? - install_pe - else - install_puppet - end - hosts.each do |host| - on hosts, "mkdir -p #{host['distmoduledir']}" - end -end - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Readable test descriptions - c.formatter = :documentation - - # Configure all nodes in nodeset - c.before :suite do - # Install module and dependencies - puppet_module_install(:source => proj_root, :module_name => 'concat') - hosts.each do |host| - on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } - end - end - - c.before(:all) do - shell('mkdir -p /tmp/concat') - end - c.after(:all) do - shell('rm -rf /tmp/concat /var/lib/puppet/concat') - end - - c.treat_symbols_as_metadata_keys_with_true_values = true -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/classes/concat_setup_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/classes/concat_setup_spec.rb deleted file mode 100644 index bba455ab91..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/classes/concat_setup_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'spec_helper' - -describe 'concat::setup', :type => :class do - - shared_examples 'setup' do |concatdir| - concatdir = '/foo' if concatdir.nil? - - let(:facts) {{ :concat_basedir => concatdir }} - - it do - should contain_file("#{concatdir}/bin/concatfragments.sh").with({ - :mode => '0755', - :source => 'puppet:///modules/concat/concatfragments.sh', - :backup => false, - }) - end - - [concatdir, "#{concatdir}/bin"].each do |file| - it do - should contain_file(file).with({ - :ensure => 'directory', - :mode => '0755', - :backup => false, - }) - end - end - end - - context 'facts' do - context 'concat_basedir =>' do - context '/foo' do - it_behaves_like 'setup', '/foo' - end - end - end # facts - - context 'deprecated as a public class' do - it 'should create a warning' do - pending('rspec-puppet support for testing warning()') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/defines/concat_fragment_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/defines/concat_fragment_spec.rb deleted file mode 100644 index 3b5269e8d5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/defines/concat_fragment_spec.rb +++ /dev/null @@ -1,267 +0,0 @@ -require 'spec_helper' - -describe 'concat::fragment', :type => :define do - - shared_examples 'fragment' do |title, params| - params = {} if params.nil? - - p = { - :content => nil, - :source => nil, - :order => 10, - :ensure => 'present', - }.merge(params) - - safe_name = title.gsub(/[\/\n]/, '_') - safe_target_name = p[:target].gsub(/[\/\n]/, '_') - concatdir = '/var/lib/puppet/concat' - fragdir = "#{concatdir}/#{safe_target_name}" - id = 'root' - if p[:ensure] == 'absent' - safe_ensure = p[:ensure] - else - safe_ensure = 'file' - end - - let(:title) { title } - let(:facts) {{ :concat_basedir => concatdir, :id => id }} - let(:params) { params } - let(:pre_condition) do - "concat{ '#{p[:target]}': }" - end - - it do - should contain_class('concat::setup') - should contain_concat(p[:target]) - should contain_file("#{fragdir}/fragments/#{p[:order]}_#{safe_name}").with({ - :ensure => safe_ensure, - :owner => id, - :mode => '0640', - :source => p[:source], - :content => p[:content], - :alias => "concat_fragment_#{title}", - :backup => false, - }) - end - end - - context 'title' do - ['0', '1', 'a', 'z'].each do |title| - it_behaves_like 'fragment', title, { - :target => '/etc/motd', - } - end - end # title - - context 'target =>' do - ['./etc/motd', 'etc/motd', 'motd_header'].each do |target| - context target do - it_behaves_like 'fragment', target, { - :target => '/etc/motd', - } - end - end - - context 'false' do - let(:title) { 'motd_header' } - let(:facts) {{ :concat_basedir => '/tmp' }} - let(:params) {{ :target => false }} - - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not a string/) - end - end - end # target => - - context 'ensure =>' do - ['present', 'absent'].each do |ens| - context ens do - it_behaves_like 'fragment', 'motd_header', { - :ensure => ens, - :target => '/etc/motd', - } - end - end - - context 'any value other than \'present\' or \'absent\'' do - let(:title) { 'motd_header' } - let(:facts) {{ :concat_basedir => '/tmp' }} - let(:params) {{ :ensure => 'invalid', :target => '/etc/motd' }} - - it 'should create a warning' do - pending('rspec-puppet support for testing warning()') - end - end - end # ensure => - - context 'content =>' do - ['', 'ashp is our hero'].each do |content| - context content do - it_behaves_like 'fragment', 'motd_header', { - :content => content, - :target => '/etc/motd', - } - end - end - - context 'false' do - let(:title) { 'motd_header' } - let(:facts) {{ :concat_basedir => '/tmp' }} - let(:params) {{ :content => false, :target => '/etc/motd' }} - - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not a string/) - end - end - end # content => - - context 'source =>' do - ['', '/foo/bar', ['/foo/bar', '/foo/baz']].each do |source| - context source do - it_behaves_like 'fragment', 'motd_header', { - :source => source, - :target => '/etc/motd', - } - end - end - - context 'false' do - let(:title) { 'motd_header' } - let(:facts) {{ :concat_basedir => '/tmp' }} - let(:params) {{ :source => false, :target => '/etc/motd' }} - - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not a string or an Array/) - end - end - end # source => - - context 'order =>' do - ['', '42', 'a', 'z'].each do |order| - context '\'\'' do - it_behaves_like 'fragment', 'motd_header', { - :order => order, - :target => '/etc/motd', - } - end - end - - context 'false' do - let(:title) { 'motd_header' } - let(:facts) {{ :concat_basedir => '/tmp' }} - let(:params) {{ :order => false, :target => '/etc/motd' }} - - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not a string/) - end - end - end # order => - - context 'more than one content source' do - error_msg = 'You cannot specify more than one of $content, $source, $ensure => /target' - - context 'ensure => target and source' do - let(:title) { 'motd_header' } - let(:facts) {{ :concat_basedir => '/tmp' }} - let(:params) do - { - :target => '/etc/motd', - :ensure => '/foo', - :source => '/bar', - } - end - - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /#{Regexp.escape(error_msg)}/m) - end - end - - context 'ensure => target and content' do - let(:title) { 'motd_header' } - let(:facts) {{ :concat_basedir => '/tmp' }} - let(:params) do - { - :target => '/etc/motd', - :ensure => '/foo', - :content => 'bar', - } - end - - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /#{Regexp.escape(error_msg)}/m) - end - end - - context 'source and content' do - let(:title) { 'motd_header' } - let(:facts) {{ :concat_basedir => '/tmp' }} - let(:params) do - { - :target => '/etc/motd', - :source => '/foo', - :content => 'bar', - } - end - - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /#{Regexp.escape(error_msg)}/m) - end - end - - end # more than one content source - - describe 'deprecated parameter' do - context 'mode =>' do - context '1755' do - it_behaves_like 'fragment', 'motd_header', { - :mode => '1755', - :target => '/etc/motd', - } - - it 'should create a warning' do - pending('rspec-puppet support for testing warning()') - end - end - end # mode => - - context 'owner =>' do - context 'apenny' do - it_behaves_like 'fragment', 'motd_header', { - :owner => 'apenny', - :target => '/etc/motd', - } - - it 'should create a warning' do - pending('rspec-puppet support for testing warning()') - end - end - end # owner => - - context 'group =>' do - context 'apenny' do - it_behaves_like 'fragment', 'motd_header', { - :group => 'apenny', - :target => '/etc/motd', - } - - it 'should create a warning' do - pending('rspec-puppet support for testing warning()') - end - end - end # group => - - context 'backup =>' do - context 'foo' do - it_behaves_like 'fragment', 'motd_header', { - :backup => 'foo', - :target => '/etc/motd', - } - - it 'should create a warning' do - pending('rspec-puppet support for testing warning()') - end - end - end # backup => - end # deprecated params - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/defines/concat_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/defines/concat_spec.rb deleted file mode 100644 index 9fdd7b26f1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/defines/concat_spec.rb +++ /dev/null @@ -1,380 +0,0 @@ -require 'spec_helper' - -describe 'concat', :type => :define do - - shared_examples 'concat' do |title, params, id| - params = {} if params.nil? - id = 'root' if id.nil? - - # default param values - p = { - :ensure => 'present', - :path => title, - :owner => nil, - :group => nil, - :mode => '0644', - :warn => false, - :force => false, - :backup => 'puppet', - :replace => true, - :order => 'alpha', - :ensure_newline => false, - }.merge(params) - - safe_name = title.gsub('/', '_') - concatdir = '/var/lib/puppet/concat' - fragdir = "#{concatdir}/#{safe_name}" - concat_name = 'fragments.concat.out' - default_warn_message = '# This file is managed by Puppet. DO NOT EDIT.' - - file_defaults = { - :backup => false, - } - - let(:title) { title } - let(:params) { params } - let(:facts) {{ :concat_basedir => concatdir, :id => id }} - - if p[:ensure] == 'present' - it do - should contain_file(fragdir).with(file_defaults.merge({ - :ensure => 'directory', - :mode => '0750', - })) - end - - it do - should contain_file("#{fragdir}/fragments").with(file_defaults.merge({ - :ensure => 'directory', - :mode => '0750', - :force => true, - :ignore => ['.svn', '.git', '.gitignore'], - :purge => true, - :recurse => true, - })) - end - - [ - "#{fragdir}/fragments.concat", - "#{fragdir}/#{concat_name}", - ].each do |file| - it do - should contain_file(file).with(file_defaults.merge({ - :ensure => 'present', - :mode => '0640', - })) - end - end - - it do - should contain_file(title).with(file_defaults.merge({ - :ensure => 'present', - :owner => p[:owner], - :group => p[:group], - :mode => p[:mode], - :replace => p[:replace], - :path => p[:path], - :alias => "concat_#{title}", - :source => "#{fragdir}/#{concat_name}", - :backup => p[:backup], - })) - end - - cmd = "#{concatdir}/bin/concatfragments.sh " + - "-o \"#{concatdir}/#{safe_name}/fragments.concat.out\" " + - "-d \"#{concatdir}/#{safe_name}\"" - - # flag order: fragdir, warnflag, forceflag, orderflag, newlineflag - if p.has_key?(:warn) - case p[:warn] - when TrueClass - message = default_warn_message - when 'true', 'yes', 'on' - # should generate a stringified boolean warning - message = default_warn_message - when FalseClass - message = nil - when 'false', 'no', 'off' - # should generate a stringified boolean warning - message = nil - else - message = p[:warn] - end - - unless message.nil? - cmd += " -w \'#{message}\'" - end - end - - cmd += " -f" if p[:force] - cmd += " -n" if p[:order] == 'numeric' - cmd += " -l" if p[:ensure_newline] == true - - it do - should contain_exec("concat_#{title}").with({ - :alias => "concat_#{fragdir}", - :command => cmd, - :unless => "#{cmd} -t", - }) - end - else - [ - fragdir, - "#{fragdir}/fragments", - "#{fragdir}/fragments.concat", - "#{fragdir}/#{concat_name}", - ].each do |file| - it do - should contain_file(file).with(file_defaults.merge({ - :ensure => 'absent', - :backup => false, - :force => true, - })) - end - end - - it do - should contain_file(title).with(file_defaults.merge({ - :ensure => 'absent', - :backup => p[:backup], - })) - end - - it do - should contain_exec("concat_#{title}").with({ - :alias => "concat_#{fragdir}", - :command => 'true', - :path => '/bin:/usr/bin', - }) - end - end - end - - context 'title' do - context 'without path param' do - # title/name is the default value for the path param. therefore, the - # title must be an absolute path unless path is specified - ['/foo', '/foo/bar', '/foo/bar/baz'].each do |title| - context title do - it_behaves_like 'concat', '/etc/foo.bar' - end - end - - ['./foo', 'foo', 'foo/bar'].each do |title| - context title do - let(:title) { title } - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not an absolute path/) - end - end - end - end - - context 'with path param' do - ['./foo', 'foo', 'foo/bar'].each do |title| - context title do - it_behaves_like 'concat', title, { :path => '/etc/foo.bar' } - end - end - end - end # title => - - context 'as non-root user' do - it_behaves_like 'concat', '/etc/foo.bar', {}, 'bob' - end - - context 'ensure =>' do - ['present', 'absent'].each do |ens| - context ens do - it_behaves_like 'concat', '/etc/foo.bar', { :ensure => ens } - end - end - - context 'invalid' do - let(:title) { '/etc/foo.bar' } - let(:params) {{ :ensure => 'invalid' }} - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /#{Regexp.escape('does not match "^present$|^absent$"')}/) - end - end - end # ensure => - - context 'path =>' do - context '/foo' do - it_behaves_like 'concat', '/etc/foo.bar', { :path => '/foo' } - end - - ['./foo', 'foo', 'foo/bar', false].each do |path| - context path do - let(:title) { '/etc/foo.bar' } - let(:params) {{ :path => path }} - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not an absolute path/) - end - end - end - end # path => - - context 'owner =>' do - context 'apenney' do - it_behaves_like 'concat', '/etc/foo.bar', { :owner => 'apenny' } - end - - context 'false' do - let(:title) { '/etc/foo.bar' } - let(:params) {{ :owner => false }} - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not a string/) - end - end - end # owner => - - context 'group =>' do - context 'apenney' do - it_behaves_like 'concat', '/etc/foo.bar', { :group => 'apenny' } - end - - context 'false' do - let(:title) { '/etc/foo.bar' } - let(:params) {{ :group => false }} - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not a string/) - end - end - end # group => - - context 'mode =>' do - context '1755' do - it_behaves_like 'concat', '/etc/foo.bar', { :mode => '1755' } - end - - context 'false' do - let(:title) { '/etc/foo.bar' } - let(:params) {{ :mode => false }} - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not a string/) - end - end - end # mode => - - context 'warn =>' do - [true, false, '# foo'].each do |warn| - context warn do - it_behaves_like 'concat', '/etc/foo.bar', { :warn => warn } - end - end - - context '(stringified boolean)' do - ['true', 'yes', 'on', 'false', 'no', 'off'].each do |warn| - context warn do - it_behaves_like 'concat', '/etc/foo.bar', { :warn => warn } - - it 'should create a warning' do - pending('rspec-puppet support for testing warning()') - end - end - end - end - - context '123' do - let(:title) { '/etc/foo.bar' } - let(:params) {{ :warn => 123 }} - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not a string or boolean/) - end - end - end # warn => - - context 'force =>' do - [true, false].each do |force| - context force do - it_behaves_like 'concat', '/etc/foo.bar', { :force => force } - end - end - - context '123' do - let(:title) { '/etc/foo.bar' } - let(:params) {{ :force => 123 }} - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not a boolean/) - end - end - end # force => - - context 'backup =>' do - context 'reverse' do - it_behaves_like 'concat', '/etc/foo.bar', { :backup => 'reverse' } - end - - context 'false' do - let(:title) { '/etc/foo.bar' } - let(:params) {{ :backup => false }} - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not a string/) - end - end - end # backup => - - context 'replace =>' do - [true, false].each do |replace| - context replace do - it_behaves_like 'concat', '/etc/foo.bar', { :replace => replace } - end - end - - context '123' do - let(:title) { '/etc/foo.bar' } - let(:params) {{ :replace => 123 }} - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not a boolean/) - end - end - end # replace => - - context 'order =>' do - ['alpha', 'numeric'].each do |order| - context order do - it_behaves_like 'concat', '/etc/foo.bar', { :order => order } - end - end - - context 'invalid' do - let(:title) { '/etc/foo.bar' } - let(:params) {{ :order => 'invalid' }} - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /#{Regexp.escape('does not match "^alpha$|^numeric$"')}/) - end - end - end # order => - - context 'ensure_newline =>' do - [true, false].each do |ensure_newline| - context 'true' do - it_behaves_like 'concat', '/etc/foo.bar', { :ensure_newline => ensure_newline} - end - end - - context '123' do - let(:title) { '/etc/foo.bar' } - let(:params) {{ :ensure_newline => 123 }} - it 'should fail' do - expect { should }.to raise_error(Puppet::Error, /is not a boolean/) - end - end - end # ensure_newline => - - describe 'deprecated parameter' do - context 'gnu =>' do - context 'foo' do - it_behaves_like 'concat', '/etc/foo.bar', { :gnu => 'foo'} - - it 'should create a warning' do - pending('rspec-puppet support for testing warning()') - end - end - end - end - -end - -# vim:sw=2:ts=2:expandtab:textwidth=79 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/facts/concat_basedir_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/facts/concat_basedir_spec.rb deleted file mode 100644 index 41bc90f159..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/spec/unit/facts/concat_basedir_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'spec_helper' - -describe 'concat_basedir', :type => :fact do - before(:each) { Facter.clear } - - context 'Puppet[:vardir] ==' do - it '/var/lib/puppet' do - Puppet.stubs(:[]).with(:vardir).returns('/var/lib/puppet') - Facter.fact(:concat_basedir).value.should == '/var/lib/puppet/concat' - end - - it '/home/apenny/.puppet/var' do - Puppet.stubs(:[]).with(:vardir).returns('/home/apenny/.puppet/var') - Facter.fact(:concat_basedir).value.should == '/home/apenny/.puppet/var/concat' - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/tests/fragment.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/tests/fragment.pp deleted file mode 100644 index a2dfaca290..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/tests/fragment.pp +++ /dev/null @@ -1,19 +0,0 @@ -concat { 'testconcat': - ensure => present, - path => '/tmp/concat', - owner => 'root', - group => 'root', - mode => '0664', -} - -concat::fragment { '1': - target => 'testconcat', - content => '1', - order => '01', -} - -concat::fragment { '2': - target => 'testconcat', - content => '2', - order => '02', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/tests/init.pp deleted file mode 100644 index fd21427180..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/concat/tests/init.pp +++ /dev/null @@ -1,7 +0,0 @@ -concat { '/tmp/concat': - ensure => present, - force => true, - owner => 'root', - group => 'root', - mode => '0644', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/Puppetfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/Puppetfile deleted file mode 100644 index 42968dff1b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/Puppetfile +++ /dev/null @@ -1,6 +0,0 @@ -forge "http://forge.puppetlabs.com" - -mod 'php', :git => 'https://github.com/puphpet/puppet-php.git' -mod 'composer', :git => 'https://github.com/puphpet/puppet-composer.git' -mod 'puphpet', :git => 'https://github.com/puphpet/puppet-puphpet.git' -mod 'puppi', :git => 'https://github.com/puphpet/puppi.git' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/README b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/README deleted file mode 100644 index d546e570ab..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/README +++ /dev/null @@ -1,226 +0,0 @@ -DRUSH PUPPET MODULE -=================== - -This module manages Drush, a command line shell and scripting interface for -Drupal. - -It can install and upgrade Drush from Debian packages or source, as well as -download, enable and disable Drupal modules and themes, build codebases from -Drush makefiles, run arbitrary Drush commands and optionally log its output. - - -DEPENDENCIES ------------- - -None. - - -REQUIREMENTS ------------- - -The Drush Puppet module is designed to work on Debian GNU/Linux systems and -derivatives. It provides rudimentary support for apt-get, but defaults to -letting the OS's default packaging system handle installation. As such, it -should work with other *nix systems, assuming Drush is available for install -in the OS's packaging system, or Drush is installed from source using the -provided 'drush::git' class. - - -INSTALLATION ------------- - -To use this module, follow these directions: - -1. Your modules directory will need all the files included in this - repository placed under a directory called "drush". - -2. To install Drush, add one of these entries to your manifests (such as in - manifests/nodes.pp): - - include drush - - or - - class {'drush': - ensure => latest, - } - - The following parameters are available: - - api: The major version of Drush to install. Currently supports '4' or '5'. - dist: The Debian distribution from which to install via apt-get. Defaults - to 'stable'. Set to false to suppres adding custom sources for install - via apt-get. - ensure: What state the package should be in. Valid values are 'present' - (also called 'installed'), 'absent', 'purged', 'held', of 'latest'. - -2a. To install Drush from source, add one of these entries to your manifests: - - include drush::git::drush - - or - - class {'drush::git::drush': - git_branch => '8.x-6.x', - update => true, - } - - - The following parameters are available: - - git_branch: The git branch to track. - git_tag: The git tag to check out. - git_url: The git URL from which to clone the repository. - update: Whether to update to the latest code with each Puppet run. - Defaults to false. - - -USAGE ------ - -1. To run a Drush command, use the drush::run defined type like so: - - drush::run { '@dev uli --uid=42': } - - The following parameters are all optional: - - command: The command to run. Defaults to the name of the resource. - site_alias: The alias against which to run the command. - options: Options to pass to Drush. - arguments: Arguments to pass to the command. - site_path: The path to the site or code-base in which to run the command. - drush_user: The user under which to execute the command. - drush_home: Set the drush_user's home directory, for alias search paths. - log: Path to the logfile in which to log all Drush output. - creates, unless, onlyif, refreshonly: Control whether the command is - executed at each Puppet run. Identical to these paramaters on the - built-in 'exec' resource. - timeout: The maximum time the command should take, specified in seconds. - Defaults to 300 seconds. Disable the timeout by setting to 0. - paths: provide alternative paths to search for your Drush executable. - -2. To download projects from drupal.org to a site, add lines such as the - following to your manifests: - - drush::dl {'token': - site_path => '/var/aegir/platforms/drupal/sites/example.com', - log => '/var/aegir/drush.log', - } - - The following parameters are all optional: - - type: The type of package to download. Defaults to 'module'. - version: The version of the package to download. - site_path: Operates the same as for drush::run. Set this parameter to avoid - having a package downloaded repeatedly, as it will allow Puppet to see - whether it already exists. Alternatively, do not set this parameter to - have the package continuously updated. - site_alias, options, arguments, drush_user, drush_home, log: All operate - the same as for drush::run. - -3. To enable or disable projects on a Drupal site, add lines such as the following to your - manifests: - - drush::en {'token': - site_alias => '@www.example.com', - } - - drush::dis {'@prod devel, devel-generate':} - - The following parameters are all optional: - - site_alias, options, arguments, site_path, drush_user, drush_home, log: All - operate the same as for drush::run. - -4. To display the status of a site in your Puppet log, add lines such as the - following to your manifests: - - drush::dis {'@prod status': - options => '--full', - } - - The following parameters are all optional: - - site_alias, options, arguments, site_path, drush_user, drush_home, log: All - operate the same as for drush::run. - - -5. To build a Drupal code-base using Drush Make, add lines such as the following to your - manifests: - - drush::make {'/var/aegir/platform/Drupal7': - makefile => '/var/aegir/makefiles/drupal7.make', - } - - There is one required parameter: - - makefile: The path to the makefile to use in building the code-base. - - The following parameters are all optional: - - make_path: The path to build the code-base. Defaults to the name of the - resource. - options, drush_user, drush_home, log: All operate the same as for - drush::run. - - -6. The module also provides a simple way to clone git repos and keep them up- - to-date: - - drush::git { 'git://git.drupal.org:project/provision': - path => '/var/aegir/.drush', - } - - There is one required parameter: - - path: Where to clone the git repo. - - The following parameters are all optional: - - git_branch: The git branch to checkout. - git_tag: The git tag to check out. Overrides 'branch' if also specified. - git_repo: The git repository to clone. Defaults to the resource name. - dir_name: The name of the directory in which to clone the git repo. - update: Run 'git pull -r' in this repo on every Puppet run. - paths: Alternative search paths for your git binary. - - -DEVELOPING ----------- - -The drush::run defined type provides a basis on which to build pretty much any -Drush command imagineable. The other provided commands build upon it to provide -convenience resources for common use-cases. While quite simple, they should -form a good basis for creating your own custom defined types. - -For more complex examples, take a look at the puppet-aegir module, which -extends this API further in the context of the Aegir Hosting System. It can be -found at: - - https://drupal.org/project/puppet-aegir - -Along similar lines, Skynet takes this way too far: - - https://drupal.org/project/skynet - -The drush::git resource is a minimalist general-purpose function to allow -cloning and updating git repositories. It is not intended to be a full-featured -git class/resource. It will not attempt to install git for you either, but this -should be sufficient: - - package {'git':} - -This Puppet module is published under the GNU GPLv2 (General Public License, -Version 2), and as such is, and will always remain, Free Software. Engagement -in the development process by users and other developers is very much appreci- -ated. So, please feel free to post to the issue queue, submit bug reports and -feature requests, and ask questions about how to use or extend it. - - -------------------------------------------------------------------------------- -Current maintainers: Christopher Gervais (mailto:chris@praxis.coop) - Guillaume Boudrias (mailto:gboudrias@praxis.coop) -Original authors: Christopher Gervais (mailto:chris@koumbit.org) - Antoine Beaupré (mailto:anarcat@koumbit.org) -Copyright:: Copyright (c) 2011-2013 Réseau Koumbit Networks -License:: GPLv2 or later diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/apt.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/apt.pp deleted file mode 100644 index 8d7ff58561..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/apt.pp +++ /dev/null @@ -1,49 +0,0 @@ -class drush::apt ( $dist = false, $backports = false) { - - if $backports { - file { "/etc/apt/preferences.d/drush-${backports}.pref": - ensure => 'present', - content => "Package: drush\nPin: release a=${backports}-backports\nPin-Priority: 1001\n", - owner => root, group => root, mode => '0644', - notify => Exec['drush_update_apt'], - } - file { "/etc/apt/sources.list.d/drush-${backports}-backports.list" : - ensure => 'present', - content => "deb http://backports.debian.org/debian-backports ${backports}-backports main", - owner => root, group => root, mode => '0644', - notify => Exec['drush_update_apt'], - } - } - else { - file { [ - "/etc/apt/preferences.d/drush-${backports}.pref", - "/etc/apt/sources.list.d/drush-${backports}-backports.list", - ]: - ensure => 'absent', - notify => Exec['drush_update_apt'], - } - } - - if $dist { - file { "/etc/apt/sources.list.d/drush-${dist}.list" : - ensure => 'present', - content => "deb http://ftp.debian.org/debian ${dist} main", - owner => root, group => root, mode => '0644', - notify => Exec['drush_update_apt'], - before => Exec['drush_apt_update'], - } - } - - exec { 'drush_update_apt': - command => 'apt-get update & sleep 1', - path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ], - refreshonly => true, - } - - exec { 'drush_apt_update': - command => 'apt-get update && /usr/bin/apt-get autoclean', - path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ], - schedule => daily, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/dis.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/dis.pp deleted file mode 100644 index 9cbf1bcaab..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/dis.pp +++ /dev/null @@ -1,25 +0,0 @@ -define drush::dis ( - $site_alias = $drush::params::site_alias, - $options = $drush::params::options, - $arguments = $drush::params::arguments, - $site_path = $drush::params::site_path, - $drush_user = $drush::params::drush_user, - $drush_home = $drush::params::drush_home, - $log = $drush::params::log - ) { - - if $arguments { $real_args = $arguments } - else { $real_args = $name } - - drush::run {"drush-dis:${name}": - command => 'pm-disable', - site_alias => $site_alias, - options => $options, - arguments => $real_args, - site_path => $site_path, - drush_user => $drush_user, - drush_home => $drush_home, - log => $log, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/dl.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/dl.pp deleted file mode 100644 index 89a9a29059..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/dl.pp +++ /dev/null @@ -1,48 +0,0 @@ -define drush::dl ( - $type = 'module', - $site_alias = $drush::params::site_alias, - $options = $drush::params::options, - $arguments = $drush::params::arguments, - $drush_user = $drush::params::drush_user, - $drush_home = $drush::params::drush_home, - $log = $drush::params::log - ) { - - if $arguments { $real_args = $arguments } - else { $real_args = "${name}" } - - # Always download drush extensions without a site alias. - if $type == 'extension' { $real_alias = '@none' } - else { $real_alias = "${site_alias}" } - - drush::run {"drush-dl:${name}": - command => 'pm-download', - site_alias => $real_alias, - options => $options, - arguments => $real_args, - drush_user => $drush_user, - drush_home => $drush_home, - log => $log, - } - - # Add an 'unless' argument depending on the project type. - case $type { - 'module', 'theme': { - Drush::Run["drush-dl:${name}"] { - unless => "drush ${site_alias} pm-list | grep ${name}", - } - } - 'extension': { - Drush::Run["drush-dl:${name}"] { - unless => "[ -d '${drush_home}/.drush/${name}' ]", - } - } - } - - if defined(Drush::Run["drush-en:${name}"]) { - Drush::Run["drush-dl:${name}"] { - before +> Exec["drush-en:${name}"], - } - } -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/en.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/en.pp deleted file mode 100644 index 036074968f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/en.pp +++ /dev/null @@ -1,26 +0,0 @@ -define drush::en ( - $site_alias = $drush::params::site_alias, - $options = $drush::params::options, - $arguments = $drush::params::arguments, - $drush_user = $drush::params::drush_user, - $drush_home = $drush::params::drush_home, - $log = $drush::params::log, - $refreshonly = false - ) { - - if $arguments { $real_args = $arguments } - else { $real_args = $name } - - drush::run {"drush-en:${name}": - command => 'pm-enable', - site_alias => $site_alias, - options => $options, - arguments => $real_args, - drush_user => $drush_user, - drush_home => $drush_home, - refreshonly => $refreshonly, - log => $log, - unless => "drush ${site_alias} pm-list --status=enabled | grep ${name}", - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/git.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/git.pp deleted file mode 100644 index dc0598121b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/git.pp +++ /dev/null @@ -1,60 +0,0 @@ -define drush::git ( - $path, - $git_branch = '', - $git_tag = '', - $git_repo = false, - $dir_name = false, - $update = false, - $paths = $drush::params::paths, - $user = 'root', - ) { - - # Default to the resource name if no explicit git repo is provided. - if $git_repo { $real_git_repo = $git_repo } - else { $real_git_repo = $name } - - # Figure out the path and directory name. - if $dir_name { - $real_path = "${path}/${dir_name}" - $real_dir = $dir_name - } - else { - # Figure out the name of the cloned into directory from the git repo. - $repo_array = split($real_git_repo, '[/]') - $last_element = $repo_array[-1] - $real_dir = regsubst($last_element, '\.git$', '') - $real_path = "${path}/${real_dir}" - } - - exec {"drush-clone-repo:${name}": - command => "git clone ${real_git_repo} ${real_dir}", - creates => $real_path, - cwd => $path, - user => $user, - path => $paths, - timeout => 0, - } - - # The specific (tag) overrides the general (branch). - if $git_tag { $git_ref = $git_tag } - else { $git_ref = $git_branch } - - if $git_ref { - exec {"drush-checkout-ref:${name}": - command => "git checkout ${git_ref}", - cwd => $real_path, - path => $paths, - require => Exec["drush-clone-repo:${name}"], - } - } - - if $update { - exec {"drush-update-repo:${name}": - command => 'git pull -r', - cwd => $real_path, - path => $paths, - require => Exec["drush-clone-repo:${name}"], - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/git/drush.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/git/drush.pp deleted file mode 100644 index 36680c63f4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/git/drush.pp +++ /dev/null @@ -1,61 +0,0 @@ -class drush::git::drush ( - $git_branch = '', - $git_tag = '', - $git_repo = 'https://github.com/drush-ops/drush.git', - $update = false - ) inherits drush::params { - - include php::params - - Exec { path => ['/bin', '/usr/bin', '/usr/local/bin', '/usr/share'], } - - if ! defined(Package['git']) { - package { 'git': - ensure => present, - before => Drush::Git[$git_repo] - } - } - - if ! defined(Class['composer']) { - class { 'composer': - target_dir => '/usr/local/bin', - composer_file => 'composer', - download_method => 'curl', - logoutput => false, - tmp_path => '/tmp', - php_package => "${php::params::module_prefix}cli", - curl_package => 'curl', - suhosin_enabled => false, - } - } - - drush::git { $git_repo : - path => '/usr/share', - git_branch => $git_branch, - git_tag => $git_tag, - update => $update, - } - - composer::exec { 'drush': - cmd => 'install', - cwd => '/usr/share/drush', - require => Drush::Git[$git_repo], - notify => File['symlink drush'], - } - - file { 'symlink drush': - ensure => link, - path => '/usr/bin/drush', - target => '/usr/share/drush/drush', - require => Composer::Exec['drush'], - notify => Exec['first drush run'], - } - - # Needed to download a Pear library - exec { 'first drush run': - command => 'drush cache-clear drush', - refreshonly => true, - require => File['symlink drush'], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/init.pp deleted file mode 100644 index 53325d537a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/init.pp +++ /dev/null @@ -1,33 +0,0 @@ -class drush ( - $api = $drush::params::api, - $dist = $drush::params::dist, - $ensure = $drush::params::ensure - ) inherits drush::params { - - include drush::params - - package { 'drush': - ensure => $ensure, - } - - case $operatingsystem { - /^(Debian|Ubuntu)$/: { - include drush::apt - Package['drush'] { require => Exec['drush_update_apt'] } - } - } - - if $dist { - - Package['drush'] { require => Class['drush::apt'] } - - if $api == 4 { $backports = 'squeeze' } - else { $backports = '' } - - class {'drush::apt': - dist => $dist, - backports => $backports, - } - } -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/make.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/make.pp deleted file mode 100644 index e09efdfbb5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/make.pp +++ /dev/null @@ -1,26 +0,0 @@ -define drush::make ( - $makefile, - $make_path = false, - $options = $drush::params::options, - $site_path = $drush::params::site_path, - $drush_user = $drush::params::drush_user, - $drush_home = $drush::params::drush_home, - $log = $drush::params::log - ) { - - if $make_path { $real_make_path = $make_path } - else { $real_make_path = $name } - $arguments = "${makefile} ${real_make_path}" - - drush::run {"drush-make:${name}": - command => 'make', - creates => $make_path, - options => $options, - arguments => $arguments, - drush_user => $drush_user, - drush_home => $drush_home, - log => $log, - timeout => 0, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/params.pp deleted file mode 100644 index 1af2e4ae7c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/params.pp +++ /dev/null @@ -1,35 +0,0 @@ -class drush::params { - - case $::operatingsystem { - 'centos', 'redhat': { - $php_cli_package = 'php-cli' - } - 'ubuntu', 'debian': { - $php_cli_package = 'php5-cli' - } - default: { - fail('The puppet-drush module only supports RHEL and Debian systems') - } - } - - $drush_user = 'root' - $drush_home = '/root' - $site_alias = '@none' - $options = '' - $arguments = '' - $api = 5 - $dist = false - $ensure = 'present' - $site_path = false - $log = false - $creates = false - $paths = [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ] - - if defined(Class['drush::git::drush']) { - $installed = Class['drush::git::drush'] - } - else { - $installed = Class['drush'] - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/run.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/run.pp deleted file mode 100644 index 2b6c1d255e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/run.pp +++ /dev/null @@ -1,57 +0,0 @@ -define drush::run ( - $command = false, - $site_alias = $drush::params::site_alias, - $options = $drush::params::options, - $arguments = $drush::params::arguments, - $site_path = $drush::params::site_path, - $drush_user = $drush::params::drush_user, - $drush_home = $drush::params::drush_home, - $log = $drush::params::log, - $installed = $drush::params::installed, - $creates = $drush::params::creates, - $paths = $drush::params::paths, - $timeout = false, - $unless = false, - $onlyif = false, - $refreshonly = false - ) { - - if $log { $log_output = " >> ${log} 2>&1" } - - if $command { $real_command = $command } - else { $real_command = $name} - - exec {"drush-run:${name}": - command => "drush ${site_alias} --yes ${options} ${real_command} ${arguments} ${log_output}", - user => $drush_user, - group => $drush_user, - path => $paths, - environment => "HOME=${drush_home}", - require => $installed, - } - - if $site_path { - Exec["drush-run:${name}"] { cwd => $site_path } - } - - if $creates { - Exec["drush-run:${name}"] { creates => $creates } - } - - if $timeout { - Exec["drush-run:${name}"] { timeout => $timeout } - } - - if $unless { - Exec["drush-run:${name}"] { unless => $unless } - } - - if $onlyif { - Exec["drush-run:${name}"] { onlyif => $onlyif } - } - - if $refreshonly { - Exec["drush-run:${name}"] { refreshonly => $refreshonly } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/status.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/status.pp deleted file mode 100644 index 3f7784bd4b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/manifests/status.pp +++ /dev/null @@ -1,22 +0,0 @@ -define drush::status ( - $site_alias = $drush::params::site_alias, - $options = $drush::params::options, - $arguments = $drush::params::arguments, - $site_path = $drush::params::site_path, - $drush_user = $drush::params::drush_user, - $drush_home = $drush::params::drush_home, - $log = $drush::params::log - ) { - - drush::run {"drush-status:${name}": - command => 'core-status', - site_alias => $site_alias, - options => $options, - arguments => $arguments, - site_path => $site_path, - drush_user => $drush_user, - drush_home => $drush_home, - log => $log, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/.module b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/.module deleted file mode 100644 index e430fc6c1d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/.module +++ /dev/null @@ -1 +0,0 @@ -drush diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/Vagrantfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/Vagrantfile deleted file mode 100644 index 6bb52efe91..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/Vagrantfile +++ /dev/null @@ -1,11 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant::Config.run do |config| - config.vm.box = "Debian 6.0.7 x64" - config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210.box" - - config.vm.provision :shell, - :path => "./tests/.ci/vagrant_test.sh" - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/test.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/test.sh deleted file mode 100644 index 55ab628039..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/test.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -echo "Creating test environment..." -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -if [ -e $SCRIPT_DIR/.module ] -then - MODULE=`cat $SCRIPT_DIR/.module` -else - echo "ERROR: The test script expects the name of the module to be in a file" - echo " called '.module', in the same directory as the test script." - echo $SCRIPT_DIR - exit 1 -fi -cd $SCRIPT_DIR -cd ../.. -if [ -e manifests/init.pp ] -then - MODULE_DIR=`pwd` -else - echo "ERROR: The test script expects to be in /tests/.ci/, but" - echo " cannot find the module's 'init.pp', from its current location." - echo $SCRIPT_DIR - exit 1 -fi -rm -rf /tmp/$MODULE -cp $MODULE_DIR /tmp/$MODULE -r -cd /tmp/$MODULE -wget http://ansi-color.googlecode.com/svn/tags/0.6/ansi-color/color >> /dev/null 2>&1 -mv ./color /usr/local/bin -chmod a+x /usr/local/bin/color - -echo "Scanning for tests in '$MODULE' module..." -FILES=`find /tmp/$MODULE/tests -name *.pp` -COUNT=${#FILES[@]} -PASSED=0 -FAILED=0 -TOTAL=0 - -echo "Running tests..." -for f in $FILES -do - NAME=`basename $f` - echo "Running '$NAME' test..." - OUTPUT=`puppet apply --noop --modulepath=/tmp/ --color=ansi $f 2>&1` - STATUS=$? - if [ $STATUS -ne 0 ] - then - color red - echo "///////////////////////////////////////////////////////" - echo - echo " ERROR in '$NAME' test." - echo " Output from failed test:" - echo - echo $OUTPUT - echo - echo "///////////////////////////////////////////////////////" - color off - let FAILED++ - let TOTAL++ - else - color green - echo "'$NAME' test passed." - color off - let PASSED++ - let TOTAL++ - fi -done - -echo "Total tests run: $TOTAL" -color green -echo "Tests passed: $PASSED" -color red -echo "Tests failed: $FAILED" -color off - -rm -rf /tmp/$MODULE -rm /usr/local/bin/color -exit $FAILED diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/vagrant_test.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/vagrant_test.sh deleted file mode 100644 index 162b704173..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/.ci/vagrant_test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cd /vagrant -chmod a+x tests/.ci/test.sh -./tests/.ci/test.sh diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/apt.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/apt.pp deleted file mode 100644 index 4e5fa18404..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/apt.pp +++ /dev/null @@ -1,4 +0,0 @@ -class { 'drush::apt' : - dist => 'squeeze', - backports => 'squeeze', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/defaults.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/defaults.pp deleted file mode 100644 index da0c41ab8b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/defaults.pp +++ /dev/null @@ -1 +0,0 @@ -include drush::defaults diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/dis.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/dis.pp deleted file mode 100644 index 8b6519724d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/dis.pp +++ /dev/null @@ -1,3 +0,0 @@ -include drush - -drush::dis { 'devel': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/dl.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/dl.pp deleted file mode 100644 index 4a7d19897a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/dl.pp +++ /dev/null @@ -1,2 +0,0 @@ -include drush -drush::dl { 'token': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/en.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/en.pp deleted file mode 100644 index c43afe3826..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/en.pp +++ /dev/null @@ -1,2 +0,0 @@ -include drush -drush::en { 'views': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/git.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/git.pp deleted file mode 100644 index d33d4a6894..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/git.pp +++ /dev/null @@ -1,4 +0,0 @@ -include drush -drush::git { 'git://git.drupal.org:project/provision.git' : - path => '/var/aegir/.drush', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/git/drush.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/git/drush.pp deleted file mode 100644 index 6acc7e34d3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/git/drush.pp +++ /dev/null @@ -1 +0,0 @@ -include drush::git::drush diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/init.pp deleted file mode 100644 index 86f0b12cf0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/init.pp +++ /dev/null @@ -1 +0,0 @@ -include drush diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/make.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/make.pp deleted file mode 100644 index 8df88a5253..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/make.pp +++ /dev/null @@ -1,4 +0,0 @@ -include drush -drush::make { '/var/aegir/platforms/drupal7' : - makefile => '/var/aegir/makefiles/drupal7.make', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/run.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/run.pp deleted file mode 100644 index b6f37a633d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/run.pp +++ /dev/null @@ -1,2 +0,0 @@ -include drush -drush::run { '@hostmaster hosting-dispatch' : } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/status.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/status.pp deleted file mode 100644 index 9e562fa6bb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/drush/tests/status.pp +++ /dev/null @@ -1,2 +0,0 @@ -include drush -drush::status { '@none' : } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/.fixtures.yml deleted file mode 100644 index e16c4080a1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/.fixtures.yml +++ /dev/null @@ -1,5 +0,0 @@ -fixtures: - repositories: - stdlib: git://github.com/puppetlabs/puppetlabs-stdlib.git - symlinks: - elasticsearch: "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/.travis.yml deleted file mode 100644 index c4a322e03f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -language: ruby -rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 -script: - - "rake lint" - - "rake parser_validate" - - "rake template_verify" - - "rake spec SPEC_OPTS='--format documentation'" -env: - - PUPPET_VERSION="~> 2.7.0" - - PUPPET_VERSION="~> 3.0.0" - - PUPPET_VERSION="~> 3.1.0" - - PUPPET_VERSION="~> 3.2.0" - - PUPPET_VERSION="~> 3.3.0" -matrix: - allow_failures: - - rvm: 2.0.0 -gemfile: Gemfile -notifications: - email: - recipients: - - richard.pijnenburg@elasticsearch.com - on_success: change - on_failure: always - hipchat: - rooms: - secure: "gFaED3lu9MRrmoojO2iagrfOaKAbCeQSqVZ9TsIo+qkqem8hwOsMuxsYQ9evPbPbanXQoVNALXTd4fgQW16+hfg/ClqI3nDtVZZJSy0W+U0yVZtz9TXFpi9Q/Z4TwK5TMdNMjemt0l2idY2SE3leHBZEeaIAGfLf0v38tCsNI84=" - template: - - '@electrical %{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} %{build_url}' - on_success: change - on_failure: always diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/CHANGELOG b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/CHANGELOG deleted file mode 100644 index 90a59fc930..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/CHANGELOG +++ /dev/null @@ -1,91 +0,0 @@ -0.2.2 ( Jan 23, 2014 ) - Ensure exec names are unique. This caused issues when using our logstash module - Add spec tests for plugin define - -0.2.1 ( Jan 22, 2014 ) - Simplify the management of the defaults file ( PR #64 ) - Doc improvements for the plugin define ( PR #66 ) - Allow creation of data directory ( PR #68 ) - Fail early when package version and package_url are defined - -0.2.0 ( Nov 19, 2013 ) - Large rewrite of the entire module described below - Make the core more dynamic for different service providers and multi instance capable - Add better testing and devided into different files - Fix template function. Replace of template is now only done when the file is changed - Add different ways to install the package except from the repository ( puppet/http/https/ftp/file ) - Update java class to install openjdk 1.7 - Add tests for python function - Update config file template to fix scoping issue ( from PR #57 ) - Add validation of templates - Small changes for preperation for system tests - Update readme for new functionality - Added more test scenario's - Added puppet parser validate task for added checking - Ensure we don't add stuff when removing the module - Update python client define - Add ruby client define - Add tests for ruby clients and update python client tests - -0.1.3 ( Sep 06, 2013 ) - Exec path settings has been updated to fix warnings ( PR #37, #47 ) - Adding define to install python bindings ( PR #43 ) - Scope deprecation fixes ( PR #41 ) - feature to install plugins ( PR #40 ) - -0.1.2 ( Jun 21, 2013 ) - Update rake file to ignore the param inherit - Added missing documentation to the template define - Fix for template define to allow multiple templates ( PR #36 by Bruce Morrison ) - -0.1.1 ( Jun 14, 2013 ) - Add Oracle Linux to the OS list ( PR #25 by Stas Alekseev ) - Respect the restart_on_change on the defaults ( PR #29 by Simon Effenberg ) - Make sure the config can be empty as advertised in the readme - Remove dependency cycle when the defaults file is updated ( PR #31 by Bruce Morrison ) - Enable retry on the template insert in case ES isn't started yet ( PR #32 by Bruce Morrison ) - Update templates to avoid deprecation notice with Puppet 3.2.x - Update template define to avoid auto insert issue with ES - Update spec tests to reflect changes to template define - -0.1.0 ( May 09, 2013 ) - Populate .gitignore ( PR #19 by Igor Galić ) - Add ability to install initfile ( PR #20 by Justin Lambert ) - Add ability to manage default file* service parameters ( PR #21 by Mathieu Bornoz ) - Providing complete containment of the module ( PR #24 by Brian Lalor ) - Add ability to specify package version ( PR #25 by Justin Lambert ) - Adding license file - -0.0.7 ( Mar 23, 2013 ) - Ensure config directory is created and managed ( PR #13 by Martin Seener ) - Dont backup package if it changes - Create explicit dependency on template directory ( PR #16 by Igor Galić ) - Make the config directory variable ( PR #17 by Igor Galić and PR #18 by Vincent Janelle ) - Fixing template define - -0.0.6 ( Mar 05, 2013 ) - Fixing issue with configuration not printing out arrays - New feature to write the config hash shorter - Updated readme to reflect the new feature - Adding spec tests for config file generation - -0.0.5 ( Mar 03, 2013 ) - Option to disable restart on config file change ( PR #10 by Chris Boulton ) - -0.0.4 ( Mar 02, 2013 ) - Fixed a major issue with the config template ( Issue #9 ) - -0.0.3 ( Mar 02, 2013 ) - Adding spec tests - Fixed init issue on Ubuntu ( Issue #6 by Marcus Furlong ) - Fixed config template problem ( Issue #8 by surfchris ) - New feature to manage templates - -0.0.2 ( Feb 16, 2013 ) - Feature to supply a package instead of being dependent on the repository - Feature to install java in case one doesn't manage it externally - Adding RedHat and Amazon as Operating systems - fixed a typo - its a shard not a shared :) ( PR #5 by Martin Seener ) - -0.0.1 ( Jan 13, 2013 ) - Initial release of the module diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/CONTRIBUTING.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/CONTRIBUTING.md deleted file mode 100644 index 13f29e3307..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/CONTRIBUTING.md +++ /dev/null @@ -1,18 +0,0 @@ -If you have a bugfix or new feature that you would like to contribute to this puppet module, please find or open an issue about it first. Talk about what you would like to do. It may be that somebody is already working on it, or that there are particular issues that you should know about before implementing the change. - -We enjoy working with contributors to get their code accepted. There are many approaches to fixing a problem and it is important to find the best approach before writing too much code. - -The process for contributing to any of the Elasticsearch repositories is similar. - -1. Sign the contributor license agreement -Please make sure you have signed the [Contributor License Agreement](http://www.elasticsearch.org/contributor-agreement/). We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once. - -2. Run the rspec tests and ensure it completes without errors with your changes. - -3. Rebase your changes -Update your local repository with the most recent code from the main this puppet module repository, and rebase your branch on top of the latest master branch. We prefer your changes to be squashed into a single commit. - -4. Submit a pull request -Push your local changes to your forked copy of the repository and submit a pull request. In the pull request, describe what your changes do and mention the number of the issue where discussion has taken place, eg “Closes #123″. - -Then sit back and wait. There will probably be discussion about the pull request and, if any changes are needed, we would love to work with you to get your pull request merged into this puppet module. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/CONTRIBUTORS b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/CONTRIBUTORS deleted file mode 100644 index ad0eb76c4d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/CONTRIBUTORS +++ /dev/null @@ -1,20 +0,0 @@ -The following is a list of people who have contributed ideas, code, bug -reports, or in general have helped this puppet module along its way. - -Project Owner -* Richard Pijnenburg (electrical) - -Contributors: -Martin Seener (martinseener) -Marcus Furlong (furlongm) -Chris Boulton (chrisboulton) -Igor Galić (igalic) -Vincent Janelle (vjanelle) -Mathieu Bornoz (mbornoz) -Justin Lambert (jlambert121) -Brian Lalor (blalor) -Stas Alekseev (salekseev) -Simon Effenberg (Savar) -Bruce Morrison (brucem) -deanmalmgren -Matteo Sessa (msessa-cotd) diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/Gemfile deleted file mode 100644 index 95b8d66d8f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/Gemfile +++ /dev/null @@ -1,7 +0,0 @@ -source 'https://rubygems.org' - -puppetversion = ENV['PUPPET_VERSION'] -gem 'puppet', puppetversion, :require => false -gem 'puppet-lint' -gem 'rspec-puppet' -gem 'puppetlabs_spec_helper', '>= 0.1.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/LICENSE deleted file mode 100644 index f8b711d55d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2012-2014 Elasticsearch - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/Modulefile deleted file mode 100644 index 44aae1c8bd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/Modulefile +++ /dev/null @@ -1,9 +0,0 @@ -name 'elasticsearch-elasticsearch' -version '0.2.2' -source 'https://github.com/elasticsearch/puppet-elasticsearch' -author 'elasticsearch' -license 'Apache License, Version 2.0' -summary 'Module for managing and configuring Elasticsearch nodes' -description 'Module for managing and configuring Elasticsearch nodes' -project_page 'https://github.com/elasticsearch/puppet-elasticsearch' -dependency 'puppetlabs/stdlib', '>= 3.0.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/README.md deleted file mode 100644 index 12a12759d9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/README.md +++ /dev/null @@ -1,203 +0,0 @@ -# puppet-elasticsearch - -A puppet module for managing elasticsearch nodes - -http://www.elasticsearch.org/ - -[![Build Status](https://travis-ci.org/elasticsearch/puppet-elasticsearch.png?branch=master)](https://travis-ci.org/elasticsearch/puppet-elasticsearch) - -## Usage - -Installation, make sure service is running and will be started at boot time: - - class { 'elasticsearch': } - -Install a certain version: - - class { 'elasticsearch': - version => '0.90.3' - } - -This assumes an elasticsearch package is already available to your distribution's package manager. To install it in a different way: - -To download from http/https/ftp source: - - class { 'elasticsearch': - package_url => 'https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.7.deb' - } - -To download from a puppet:// source: - - class { 'elasticsearch': - package_url => 'puppet:///path/to/elasticsearch-0.90.7.deb' - } - -Or use a local file source: - - class { 'elasticsearch': - package_url => 'file:/path/to/elasticsearch-0.90.7.deb' - } - -Automatic upgrade of the software ( default set to false ): - - class { 'elasticsearch': - autoupgrade => true - } - -Removal/decommissioning: - - class { 'elasticsearch': - ensure => 'absent' - } - -Install everything but disable service(s) afterwards: - - class { 'elasticsearch': - status => 'disabled' - } - -Disable automated restart of Elasticsearch on config file change: - - class { 'elasticsearch': - restart_on_change => false - } - -For the config variable a hash needs to be passed: - - class { 'elasticsearch': - config => { - 'node' => { - 'name' => 'elasticsearch001' - }, - 'index' => { - 'number_of_replicas' => '0', - 'number_of_shards' => '5' - }, - 'network' => { - 'host' => $::ipaddress - } - } - } - -Short write up of the config hash is also possible. - -Instead of writing the full hash representation: - - class { 'elasticsearch': - config => { - 'cluster' => { - 'name' => 'ClusterName', - 'routing' => { - 'allocation' => { - 'awareness' => { - 'attributes' => 'rack' - } - } - } - } - } - } - -You can write the dotted key naming: - - class { 'elasticsearch': - config => { - 'cluster' => { - 'name' => 'ClusterName', - 'routing.allocation.awareness.attributes' => 'rack' - } - } - } - - -## Manage templates - -### Add a new template - -This will install and/or replace the template in Elasticearch - - elasticsearch::template { 'templatename': - file => 'puppet:///path/to/template.json' - } - -### Delete a template - - elasticsearch::template { 'templatename': - ensure => 'absent' - } - -### Host - - Default it uses localhost:9200 as host. you can change this with the 'host' and 'port' variables - - elasticsearch::template { 'templatename': - host => $::ipaddress, - port => 9200 - } - -## Bindings / clients - -Install a variety of [clients/bindings](http://www.elasticsearch.org/guide/clients/): - -### Python - - elasticsearch::python { 'rawes': } - -### Ruby - - elasticsearch::ruby { 'elasticsearch': } - -## Plugins - -Install [a variety of plugins](http://www.elasticsearch.org/guide/clients/): - -### From official repository: - - elasticsearch::plugin{'mobz/elasticsearch-head': - module_dir => 'head' - } - -### From custom url: - - elasticsearch::plugin{ 'elasticsearch-jetty': - module_dir => 'jetty', - url => 'https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-0.90.0.zip' - } - -## Java install - -For those that have no separate module for installation of java: - - class { 'elasticsearch': - java_install => true - } - -If you want a specific java package/version: - - class { 'elasticsearch': - java_install => true, - java_package => 'packagename' - } - -## Service providers - -Currently only the 'init' service provider is supported but others can be implemented quite easy. - -### init - -#### Defaults file - -You can populate the defaults file ( /etc/defaults/elasticsearch or /etc/sysconfig/elasticsearch ) - -##### hash representation - - class { 'elasticsearch': - init_defaults => { 'ES_USER' => 'elasticsearch', 'ES_GROUP' => 'elasticsearch' } - } - -##### file source - - class { 'elasticsearch': - init_defaults_file => 'puppet:///path/to/defaults' - } - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/Rakefile deleted file mode 100644 index 425e032920..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -require 'rubygems' -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint' -require './spec/lib/template_check_task.rb' -require './spec/lib/parser_validate_task.rb' -PuppetLint.configuration.send("disable_80chars") -PuppetLint.configuration.send("disable_class_inherits_from_params_class") diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/config.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/config.pp deleted file mode 100644 index a26886d4f0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/config.pp +++ /dev/null @@ -1,90 +0,0 @@ -# == Class: elasticsearch::config -# -# This class exists to coordinate all configuration related actions, -# functionality and logical units in a central place. -# -# -# === Parameters -# -# This class does not provide any parameters. -# -# -# === Examples -# -# This class may be imported by other classes to use its functionality: -# class { 'elasticsearch::config': } -# -# It is not intended to be used directly by external resources like node -# definitions or other modules. -# -# -# === Authors -# -# * Richard Pijnenburg -# -class elasticsearch::config { - - #### Configuration - - File { - owner => $elasticsearch::elasticsearch_user, - group => $elasticsearch::elasticsearch_group - } - - Exec { - path => [ '/bin', '/usr/bin', '/usr/local/bin' ], - cwd => '/', - } - - if ( $elasticsearch::ensure == 'present' ) { - - $notify_service = $elasticsearch::restart_on_change ? { - true => Class['elasticsearch::service'], - false => undef, - } - - file { $elasticsearch::confdir: - ensure => directory, - mode => '0644', - purge => $elasticsearch::purge_confdir, - force => $elasticsearch::purge_confdir - } - - file { "${elasticsearch::confdir}/elasticsearch.yml": - ensure => file, - content => template("${module_name}/etc/elasticsearch/elasticsearch.yml.erb"), - mode => '0644', - notify => $notify_service - } - - exec { 'mkdir_templates_elasticsearch': - command => "mkdir -p ${elasticsearch::confdir}/templates_import", - creates => "${elasticsearch::confdir}/templates_import" - } - - file { "${elasticsearch::confdir}/templates_import": - ensure => 'directory', - mode => '0644', - require => Exec['mkdir_templates_elasticsearch'] - } - - if ( $elasticsearch::datadir != undef ) { - file { $elasticsearch::datadir: - ensure => 'directory', - owner => $elasticsearch::elasticsearch_user, - group => $elasticsearch::elasticsearch_group, - mode => '0770', - } - } - - } elsif ( $elasticsearch::ensure == 'absent' ) { - - file { $elasticsearch::confdir: - ensure => 'absent', - recurse => true, - force => true - } - - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/init.pp deleted file mode 100644 index fabfd78867..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/init.pp +++ /dev/null @@ -1,208 +0,0 @@ -# == Class: elasticsearch -# -# This class is able to install or remove elasticsearch on a node. -# It manages the status of the related service. -# -# === Parameters -# -# [*ensure*] -# String. Controls if the managed resources shall be present or -# absent. If set to absent: -# * The managed software packages are being uninstalled. -# * Any traces of the packages will be purged as good as possible. This may -# include existing configuration files. The exact behavior is provider -# dependent. Q.v.: -# * Puppet type reference: {package, "purgeable"}[http://j.mp/xbxmNP] -# * {Puppet's package provider source code}[http://j.mp/wtVCaL] -# * System modifications (if any) will be reverted as good as possible -# (e.g. removal of created users, services, changed log settings, ...). -# * This is thus destructive and should be used with care. -# Defaults to present. -# -# [*autoupgrade*] -# Boolean. If set to true, any managed package gets upgraded -# on each Puppet run when the package provider is able to find a newer -# version than the present one. The exact behavior is provider dependent. -# Q.v.: -# * Puppet type reference: {package, "upgradeable"}[http://j.mp/xbxmNP] -# * {Puppet's package provider source code}[http://j.mp/wtVCaL] -# Defaults to false. -# -# [*status*] -# String to define the status of the service. Possible values: -# * enabled: Service is running and will be started at boot time. -# * disabled: Service is stopped and will not be started at boot -# time. -# * running: Service is running but will not be started at boot time. -# You can use this to start a service on the first Puppet run instead of -# the system startup. -# * unmanaged: Service will not be started at boot time and Puppet -# does not care whether the service is running or not. For example, this may -# be useful if a cluster management software is used to decide when to start -# the service plus assuring it is running on the desired node. -# Defaults to enabled. The singular form ("service") is used for the -# sake of convenience. Of course, the defined status affects all services if -# more than one is managed (see service.pp to check if this is the -# case). -# -# [*version*] -# String to set the specific version you want to install. -# Defaults to false. -# -# [*restart_on_change*] -# Boolean that determines if the application should be automatically restarted -# whenever the configuration changes. Disabling automatic restarts on config -# changes may be desired in an environment where you need to ensure restarts -# occur in a controlled/rolling manner rather than during a Puppet run. -# -# Defaults to true, which will restart the application on any config -# change. Setting to false disables the automatic restart. -# -# [*confdir*] -# Path to directory containing the elasticsearch configuration. -# Use this setting if your packages deviate from the norm (/etc/elasticsearch) -# -# [*plugindir*] -# Path to directory containing the elasticsearch plugins -# Use this setting if your packages deviate from the norm (/usr/share/elasticsearch/plugins) -# -# [*plugintool*] -# Path to directory containing the elasticsearch plugin installation script -# Use this setting if your packages deviate from the norm (/usr/share/elasticsearch/bin/plugin) -# -# The default values for the parameters are set in elasticsearch::params. Have -# a look at the corresponding params.pp manifest file if you need more -# technical information about them. -# -# === Examples -# -# * Installation, make sure service is running and will be started at boot time: -# class { 'elasticsearch': } -# -# * Removal/decommissioning: -# class { 'elasticsearch': -# ensure => 'absent', -# } -# -# * Install everything but disable service(s) afterwards -# class { 'elasticsearch': -# status => 'disabled', -# } -# -# -# === Authors -# -# * Richard Pijnenburg -# -class elasticsearch( - $ensure = $elasticsearch::params::ensure, - $status = $elasticsearch::params::status, - $restart_on_change = $elasticsearch::params::restart_on_change, - $autoupgrade = $elasticsearch::params::autoupgrade, - $version = false, - $package_provider = 'package', - $package_url = undef, - $package_dir = $elasticsearch::params::package_dir, - $purge_package_dir = $elasticsearch::params::purge_package_dir, - $elasticsearch_user = $elasticsearch::params::elasticsearch_user, - $elasticsearch_group = $elasticsearch::params::elasticsearch_group, - $purge_confdir = $elasticsearch::params::purge_confdir, - $service_provider = 'init', - $init_defaults = undef, - $init_defaults_file = undef, - $init_template = undef, - $config = {}, - $confdir = $elasticsearch::params::confdir, - $datadir = undef, - $plugindir = $elasticsearch::params::plugindir, - $plugintool = $elasticsearch::params::plugintool, - $java_install = false, - $java_package = undef -) inherits elasticsearch::params { - - anchor {'elasticsearch::begin': } - anchor {'elasticsearch::end': } - - - #### Validate parameters - - # ensure - if ! ($ensure in [ 'present', 'absent' ]) { - fail("\"${ensure}\" is not a valid ensure parameter value") - } - - # autoupgrade - validate_bool($autoupgrade) - - # service status - if ! ($status in [ 'enabled', 'disabled', 'running', 'unmanaged' ]) { - fail("\"${status}\" is not a valid status parameter value") - } - - # restart on change - validate_bool($restart_on_change) - - # purge conf dir - validate_bool($purge_confdir) - - if ! ($service_provider in $elasticsearch::params::service_providers) { - fail("\"${service_provider}\" is not a valid provider for \"${::operatingsystem}\"") - } - - if ($package_url != undef and $version != false) { - fail('Unable to set the version number when using package_url option.') - } - - # validate config hash - validate_hash($config) - - # java install validation - validate_bool($java_install) - - #### Manage actions - - # package(s) - class { 'elasticsearch::package': } - - # configuration - class { 'elasticsearch::config': } - - # service(s) - class { 'elasticsearch::service': } - - if $java_install == true { - # Install java - class { 'elasticsearch::java': } - - # ensure we first java java and then manage the service - Anchor['elasticsearch::begin'] - -> Class['elasticsearch::java'] - -> Class['elasticsearch::service'] - } - - #### Manage relationships - - if $ensure == 'present' { - - # we need the software before configuring it - Anchor['elasticsearch::begin'] - -> Class['elasticsearch::package'] - -> Class['elasticsearch::config'] - - # we need the software and a working configuration before running a service - Class['elasticsearch::package'] -> Class['elasticsearch::service'] - Class['elasticsearch::config'] -> Class['elasticsearch::service'] - - Class['elasticsearch::service'] -> Anchor['elasticsearch::end'] - - } else { - - # make sure all services are getting stopped before software removal - Anchor['elasticsearch::begin'] - -> Class['elasticsearch::service'] - -> Class['elasticsearch::package'] - -> Anchor['elasticsearch::end'] - - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/java.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/java.pp deleted file mode 100644 index 8d5149d381..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/java.pp +++ /dev/null @@ -1,50 +0,0 @@ -# == Class: elasticsearch::java -# -# This class exists to install java if its not managed from an other module -# -# -# === Parameters -# -# This class does not provide any parameters. -# -# -# === Examples -# -# This class may be imported by other classes to use its functionality: -# class { 'elasticsearch::java': } -# -# It is not intended to be used directly by external resources like node -# definitions or other modules. -# -# -# === Authors -# -# * Richard Pijnenburg -# -class elasticsearch::java { - - if $elasticsearch::java_package == undef { - # Default Java package - case $::operatingsystem { - 'CentOS', 'Fedora', 'Scientific', 'RedHat', 'Amazon', 'OracleLinux': { - $package = 'java-1.7.0-openjdk' - } - 'Debian', 'Ubuntu': { - $package = 'openjdk-7-jre-headless' - } - default: { - fail("\"${module_name}\" provides no java package - for \"${::operatingsystem}\"") - } - } - } else { - $package = $elasticsearch::java_package - } - - ## Install the java package unless already specified somewhere else - if !defined(Package[$package]) { - package { $package: - ensure => present - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/package.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/package.pp deleted file mode 100644 index 1cb5295d47..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/package.pp +++ /dev/null @@ -1,145 +0,0 @@ -# == Class: elasticsearch::package -# -# This class exists to coordinate all software package management related -# actions, functionality and logical units in a central place. -# -# -# === Parameters -# -# This class does not provide any parameters. -# -# -# === Examples -# -# This class may be imported by other classes to use its functionality: -# class { 'elasticsearch::package': } -# -# It is not intended to be used directly by external resources like node -# definitions or other modules. -# -# -# === Authors -# -# * Richard Pijnenburg -# -class elasticsearch::package { - - - #### Package management - - # set params: in operation - if $elasticsearch::ensure == 'present' { - - # Check if we want to install a specific version or not - if $elasticsearch::version == false { - - $package_ensure = $elasticsearch::autoupgrade ? { - true => 'latest', - false => 'present', - } - - } else { - - # install specific version - $package_ensure = $elasticsearch::version - - } - - # action - if ($elasticsearch::package_url != undef) { - - $package_dir = $elasticsearch::package_dir - - # Create directory to place the package file - exec { 'create_package_dir_elasticsearch': - cwd => '/', - path => ['/usr/bin', '/bin'], - command => "mkdir -p ${elasticsearch::package_dir}", - creates => $elasticsearch::package_dir; - } - - file { $package_dir: - ensure => 'directory', - purge => $elasticsearch::purge_package_dir, - force => $elasticsearch::purge_package_dir, - require => Exec['create_package_dir_elasticsearch'], - } - - $filenameArray = split($elasticsearch::package_url, '/') - $basefilename = $filenameArray[-1] - - $sourceArray = split($elasticsearch::package_url, ':') - $protocol_type = $sourceArray[0] - - $extArray = split($basefilename, '\.') - $ext = $extArray[-1] - - case $protocol_type { - - puppet: { - - file { "${package_dir}/${basefilename}": - ensure => present, - source => $elasticsearch::package_url, - require => File[$package_dir], - backup => false, - before => Package[$elasticsearch::params::package] - } - - } - ftp, https, http: { - - exec { 'download_package_elasticsearch': - command => "${elasticsearch::params::dlcmd} ${package_dir}/${basefilename} ${elasticsearch::package_url} 2> /dev/null", - path => ['/usr/bin', '/bin'], - creates => "${package_dir}/${basefilename}", - require => File[$package_dir], - before => Package[$elasticsearch::params::package] - } - - } - file: { - - $source_path = $sourceArray[1] - file { "${package_dir}/${basefilename}": - ensure => present, - source => $source_path, - require => File[$package_dir], - backup => false, - before => Package[$elasticsearch::params::package] - } - - } - default: { - fail("Protocol must be puppet, file, http, https, or ftp. You have given \"${protocol_type}\"") - } - } - - case $ext { - 'deb': { $pkg_provider = 'dpkg' } - 'rpm': { $pkg_provider = 'rpm' } - default: { fail("Unknown file extention \"${ext}\".") } - } - - $pkg_source = "${package_dir}/${basefilename}" - - } else { - $pkg_source = undef - $pkg_provider = undef - } - - # Package removal - } else { - - $pkg_source = undef - $pkg_provider = undef - $package_ensure = 'purged' - } - - package { $elasticsearch::params::package: - ensure => $package_ensure, - source => $pkg_source, - provider => $pkg_provider - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/params.pp deleted file mode 100644 index aea527f1b6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/params.pp +++ /dev/null @@ -1,122 +0,0 @@ -# == Class: elasticsearch::params -# -# This class exists to -# 1. Declutter the default value assignment for class parameters. -# 2. Manage internally used module variables in a central place. -# -# Therefore, many operating system dependent differences (names, paths, ...) -# are addressed in here. -# -# -# === Parameters -# -# This class does not provide any parameters. -# -# -# === Examples -# -# This class is not intended to be used directly. -# -# -# === Links -# -# * {Puppet Docs: Using Parameterized Classes}[http://j.mp/nVpyWY] -# -# -# === Authors -# -# * Richard Pijnenburg -# -class elasticsearch::params { - - #### Default values for the parameters of the main module class, init.pp - - # ensure - $ensure = 'present' - - # autoupgrade - $autoupgrade = false - - # service status - $status = 'enabled' - - # restart on configuration change? - $restart_on_change = true - - # Package dir. Temporary place to download the package to for installation - $package_dir = '/var/lib/elasticsearch' - - # User and Group for the files and user to run the service as. - $elasticsearch_user = 'elasticsearch' - $elasticsearch_group = 'elasticsearch' - - # Purge configuration directory - $purge_confdir = true - - ## init service provider - - # configuration directory - $confdir = '/etc/elasticsearch' - - # plugins directory - $plugindir = '/usr/share/elasticsearch/plugins' - - # plugins helper binary - $plugintool = '/usr/share/elasticsearch/bin/plugin' - - # Download tool - $dlcmd = 'wget -O' - - $purge_package_dir = false - - #### Internal module values - - # packages - case $::operatingsystem { - 'RedHat', 'CentOS', 'Fedora', 'Scientific', 'Amazon', 'OracleLinux': { - # main application - $package = [ 'elasticsearch' ] - } - 'Debian', 'Ubuntu': { - # main application - $package = [ 'elasticsearch' ] - } - default: { - fail("\"${module_name}\" provides no package default value - for \"${::operatingsystem}\"") - } - } - - # service parameters - case $::operatingsystem { - 'RedHat', 'CentOS', 'Fedora', 'Scientific', 'Amazon', 'OracleLinux': { - $service_name = 'elasticsearch' - $service_hasrestart = true - $service_hasstatus = true - $service_pattern = $service_name - $service_providers = [ 'init' ] - $defaults_location = '/etc/sysconfig' - } - 'Debian', 'Ubuntu': { - $service_name = 'elasticsearch' - $service_hasrestart = true - $service_hasstatus = true - $service_pattern = $service_name - $service_providers = [ 'init' ] - $defaults_location = '/etc/default' - } - 'Darwin': { - $service_name = 'FIXME/TODO' - $service_hasrestart = true - $service_hasstatus = true - $service_pattern = $service_name - $service_providers = [ 'launchd' ] - $defaults_location = false - } - default: { - fail("\"${module_name}\" provides no service parameters - for \"${::operatingsystem}\"") - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/plugin.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/plugin.pp deleted file mode 100644 index 025c302332..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/plugin.pp +++ /dev/null @@ -1,96 +0,0 @@ -# == Define: elasticsearch::plugin -# -# This define allows you to install arbitrary Elasticsearch plugins -# either by using the default repositories or by specifying an URL -# -# All default values are defined in the elasticsearch::params class. -# -# -# === Parameters -# -# [*module_dir*] -# Directory name where the module will be installed -# Value type is string -# Default value: None -# This variable is required -# -# [*ensure*] -# Whether the plugin will be installed or removed. -# Set to 'absent' to ensure a plugin is not installed -# Value type is string -# Default value: present -# This variable is optional -# -# [*url*] -# Specify an URL where to download the plugin from. -# Value type is string -# Default value: None -# This variable is optional -# -# -# === Examples -# -# # From official repository -# elasticsearch::plugin{'mobz/elasticsearch-head': module_dir => 'head'} -# -# # From custom url -# elasticsearch::plugin{ 'elasticsearch-jetty': -# module_dir => 'elasticsearch-jetty', -# url => 'https://oss-es-plugins.s3.amazonaws.com/elasticsearch-jetty/elasticsearch-jetty-0.90.0.zip', -# } -# -# === Authors -# -# * Matteo Sessa -# * Dennis Konert -# -define elasticsearch::plugin( - $module_dir, - $ensure = 'present', - $url = '' -) { - - Exec { - path => [ '/bin', '/usr/bin', '/usr/local/bin' ], - cwd => '/', - } - - $notify_service = $elasticsearch::restart_on_change ? { - false => undef, - default => Service['elasticsearch'], - } - - if ($module_dir != '') { - validate_string($module_dir) - } else { - fail("module_dir undefined for plugin ${name}") - } - - if ($url != '') { - validate_string($url) - $install_cmd = "${elasticsearch::plugintool} -install ${name} -url ${url}" - $exec_rets = [0,1] - } else { - $install_cmd = "${elasticsearch::plugintool} -install ${name}" - $exec_rets = [0,] - } - - case $ensure { - 'installed', 'present': { - exec {"install_plugin_${name}": - command => $install_cmd, - creates => "${elasticsearch::plugindir}/${module_dir}", - returns => $exec_rets, - notify => $notify_service, - require => Class['elasticsearch::package'] - } - } - default: { - exec {"remove_plugin_${name}": - command => "${elasticsearch::plugintool} --remove ${module_dir}", - onlyif => "test -d ${elasticsearch::plugindir}/${module_dir}", - notify => $notify_service, - } - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/python.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/python.pp deleted file mode 100644 index e1d91a9aba..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/python.pp +++ /dev/null @@ -1,73 +0,0 @@ -# == Define: elasticsearch::python -# -# there are many python bindings for elasticsearch. This provides all -# the ones we know about http://www.elasticsearch.org/guide/clients/ -# -# -# === Parameters -# -# [*ensure*] -# String. Controls if the managed resources shall be present or -# absent. If set to absent: -# * The managed software packages are being uninstalled. -# * Any traces of the packages will be purged as good as possible. This may -# include existing configuration files. The exact behavior is provider -# dependent. Q.v.: -# * Puppet type reference: {package, "purgeable"}[http://j.mp/xbxmNP] -# * {Puppet's package provider source code}[http://j.mp/wtVCaL] -# * System modifications (if any) will be reverted as good as possible -# (e.g. removal of created users, services, changed log settings, ...). -# * This is thus destructive and should be used with care. -# Defaults to present. - -# -# -# === Examples -# -# elasticsearch::python { 'pyes':; } -# -# -# === Authors -# -# * Richard Pijnenburg -# -define elasticsearch::python ( - $ensure = 'present' -) { - - if ! ($ensure in [ 'present', 'absent' ]) { - fail("\"${ensure}\" is not a valid ensure parameter value") - } - - # make sure the package name is valid and setup the provider as - # necessary - case $name { - 'pyes': { - $provider = 'pip' - } - 'rawes': { - $provider = 'pip' - } - 'pyelasticsearch': { - $provider = 'pip' - } - 'ESClient': { - $provider = 'pip' - } - 'elasticutils': { - $provider = 'pip' - } - 'elasticsearch': { - $provider = 'pip' - } - default: { - fail("unknown python binding package '${name}'") - } - } - - package { $name: - ensure => $ensure, - provider => $provider, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/ruby.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/ruby.pp deleted file mode 100644 index 3e35f416f2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/ruby.pp +++ /dev/null @@ -1,67 +0,0 @@ -# == Define: elasticsearch::ruby -# -# there are many ruby bindings for elasticsearch. This provides all -# the ones we know about http://www.elasticsearch.org/guide/clients/ -# -# -# === Parameters -# -# [*ensure*] -# String. Controls if the managed resources shall be present or -# absent. If set to absent: -# * The managed software packages are being uninstalled. -# * Any traces of the packages will be purged as good as possible. This may -# include existing configuration files. The exact behavior is provider -# dependent. Q.v.: -# * Puppet type reference: {package, "purgeable"}[http://j.mp/xbxmNP] -# * {Puppet's package provider source code}[http://j.mp/wtVCaL] -# * System modifications (if any) will be reverted as good as possible -# (e.g. removal of created users, services, changed log settings, ...). -# * This is thus destructive and should be used with care. -# Defaults to present. - -# -# -# === Examples -# -# elasticsearch::ruby { 'elasticsearch':; } -# -# -# === Authors -# -# * Richard Pijnenburg -# -define elasticsearch::ruby ( - $ensure = 'present' -) { - - if ! ($ensure in [ 'present', 'absent' ]) { - fail("\"${ensure}\" is not a valid ensure parameter value") - } - - # make sure the package name is valid and setup the provider as - # necessary - case $name { - 'tire': { - $provider = 'gem' - } - 'stretcher': { - $provider = 'gem' - } - 'elastic_searchable': { - $provider = 'gem' - } - 'elasticsearch': { - $provider = 'gem' - } - default: { - fail("unknown ruby client package '${name}'") - } - } - - package { $name: - ensure => $ensure, - provider => $provider, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/service.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/service.pp deleted file mode 100644 index 891f559799..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/service.pp +++ /dev/null @@ -1,43 +0,0 @@ -# == Class: elasticsearch::service -# -# This class exists to coordinate all service management related actions, -# functionality and logical units in a central place. -# -# Note: "service" is the Puppet term and type for background processes -# in general and is used in a platform-independent way. E.g. "service" means -# "daemon" in relation to Unix-like systems. -# -# -# === Parameters -# -# This class does not provide any parameters. -# -# -# === Examples -# -# This class may be imported by other classes to use its functionality: -# class { 'elasticsearch::service': } -# -# It is not intended to be used directly by external resources like node -# definitions or other modules. -# -# -# === Authors -# -# * Richard Pijnenburg -# -class elasticsearch::service { - - case $elasticsearch::service_provider { - - init: { - elasticsearch::service::init { 'elasticsearch': } - } - - default: { - fail("Unknown service provider ${elasticsearch::service_provider}") - } - - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/service/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/service/init.pp deleted file mode 100644 index 2db645c8de..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/service/init.pp +++ /dev/null @@ -1,132 +0,0 @@ -# == Define: elasticsearch::service::init -# -# This class exists to coordinate all service management related actions, -# functionality and logical units in a central place. -# -# Note: "service" is the Puppet term and type for background processes -# in general and is used in a platform-independent way. E.g. "service" means -# "daemon" in relation to Unix-like systems. -# -# -# === Parameters -# -# This class does not provide any parameters. -# -# -# === Examples -# -# === Authors -# -# * Richard Pijnenburg -# -define elasticsearch::service::init{ - - #### Service management - - # set params: in operation - if $elasticsearch::ensure == 'present' { - - case $elasticsearch::status { - # make sure service is currently running, start it on boot - 'enabled': { - $service_ensure = 'running' - $service_enable = true - } - # make sure service is currently stopped, do not start it on boot - 'disabled': { - $service_ensure = 'stopped' - $service_enable = false - } - # make sure service is currently running, do not start it on boot - 'running': { - $service_ensure = 'running' - $service_enable = false - } - # do not start service on boot, do not care whether currently running - # or not - 'unmanaged': { - $service_ensure = undef - $service_enable = false - } - # unknown status - # note: don't forget to update the parameter check in init.pp if you - # add a new or change an existing status. - default: { - fail("\"${elasticsearch::status}\" is an unknown service status value") - } - } - - # set params: removal - } else { - - # make sure the service is stopped and disabled (the removal itself will be - # done by package.pp) - $service_ensure = 'stopped' - $service_enable = false - - } - - $notify_service = $elasticsearch::restart_on_change ? { - true => Service[$name], - false => undef, - } - - - if ( $elasticsearch::status != 'unmanaged' ) { - - # defaults file content. Either from a hash or file - if ($elasticsearch::init_defaults_file != undef) { - $defaults_content = undef - $defaults_source = $elasticsearch::init_defaults_file - } elsif ($elasticsearch::init_defaults != undef and is_hash($elasticsearch::init_defaults) ) { - $defaults_content = template("${module_name}/etc/sysconfig/defaults.erb") - $defaults_source = undef - } else { - $defaults_content = undef - $defaults_source = undef - } - - # Check if we are going to manage the defaults file. - if ( $defaults_content != undef or $defaults_source != undef ) { - - file { "${elasticsearch::params::defaults_location}/${name}": - ensure => $elasticsearch::ensure, - source => $defaults_source, - content => $defaults_content, - owner => 'root', - group => 'root', - mode => '0644', - before => Service[$name], - notify => $notify_service - } - - } - - # init file from template - if ($elasticsearch::init_template != undef) { - - file { "/etc/init.d/${name}": - ensure => $elasticsearch::ensure, - content => template($elasticsearch::init_template), - owner => 'root', - group => 'root', - mode => '0755', - before => Service[$name], - notify => $notify_service - } - - } - - } - - # action - service { $name: - ensure => $service_ensure, - enable => $service_enable, - name => $elasticsearch::params::service_name, - hasstatus => $elasticsearch::params::service_hasstatus, - hasrestart => $elasticsearch::params::service_hasrestart, - pattern => $elasticsearch::params::service_pattern, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/template.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/template.pp deleted file mode 100644 index b8ab2a6151..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/manifests/template.pp +++ /dev/null @@ -1,114 +0,0 @@ -# == Define: elasticsearch::template -# -# This define allows you to insert, update or delete templates that are used within Elasticsearch for the indexes -# -# === Parameters -# -# [*file*] -# File path of the template ( json file ) -# Value type is string -# Default value: undef -# This variable is optional -# -# [*replace*] -# Set to 'true' if you intend to replace the existing template -# Value type is boolean -# Default value: false -# This variable is optional -# -# [*delete*] -# Set to 'true' if you intend to delete the existing template -# Value type is boolean -# Default value: false -# This variable is optional -# -# [*host*] -# Host name or IP address of the ES instance to connect to -# Value type is string -# Default value: localhost -# This variable is optional -# -# [*port*] -# Port number of the ES instance to connect to -# Value type is number -# Default value: 9200 -# This variable is optional -# -# === Authors -# -# * Richard Pijnenburg -# -define elasticsearch::template( - $ensure = 'present', - $file = undef, - $host = 'localhost', - $port = 9200 -) { - - require elasticsearch - - # ensure - if ! ($ensure in [ 'present', 'absent' ]) { - fail("\"${ensure}\" is not a valid ensure parameter value") - } - - if ! is_integer($port) { - fail("\"${port}\" is not an integer") - } - - Exec { - path => [ '/bin', '/usr/bin', '/usr/local/bin' ], - cwd => '/', - tries => 3, - try_sleep => 10 - } - - # Build up the url - $es_url = "http://${host}:${port}/_template/${name}" - - # Can't do a replace and delete at the same time - - if ($ensure == 'present') { - - # Fail when no file is supplied - if $file == undef { - fail('The variable "file" cannot be empty when inserting or updating a template') - - } else { # we are good to go. notify to insert in case we deleted - $insert_notify = Exec[ "insert_template_${name}" ] - } - - } else { - - $insert_notify = undef - - } - - # Delete the existing template - # First check if it exists of course - exec { "delete_template_${name}": - command => "curl -s -XDELETE ${es_url}", - onlyif => "test $(curl -s '${es_url}?pretty=true' | wc -l) -gt 1", - notify => $insert_notify, - refreshonly => true - } - - if ($ensure == 'present') { - - # place the template file - file { "${elasticsearch::confdir}/templates_import/elasticsearch-template-${name}.json": - ensure => 'present', - source => $file, - notify => Exec[ "delete_template_${name}" ], - require => Exec[ 'mkdir_templates' ], - } - - exec { "insert_template_${name}": - command => "curl -s -XPUT ${es_url} -d @${elasticsearch::confdir}/templates_import/elasticsearch-template-${name}.json", - unless => "test $(curl -s '${es_url}?pretty=true' | wc -l) -gt 1", - refreshonly => true - } - - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/001_elasticsearch_init_debian_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/001_elasticsearch_init_debian_spec.rb deleted file mode 100644 index dd4b5c1d20..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/001_elasticsearch_init_debian_spec.rb +++ /dev/null @@ -1,219 +0,0 @@ -require 'spec_helper' - -describe 'elasticsearch', :type => 'class' do - - [ 'Debian', 'Ubuntu'].each do |distro| - - context "on #{distro} OS" do - - let :facts do { - :operatingsystem => distro - } end - - context 'main class tests' do - - # init.pp - it { should contain_class('elasticsearch::package') } - it { should contain_class('elasticsearch::config') } - it { should contain_class('elasticsearch::service') } - - end - - context 'package installation' do - - context 'via repository' do - - context 'with default settings' do - - it { should contain_package('elasticsearch').with(:ensure => 'present') } - - end - - context 'with specified version' do - - let :params do { - :version => '1.0' - } end - - it { should contain_package('elasticsearch').with(:ensure => '1.0') } - end - - context 'with auto upgrade enabled' do - - let :params do { - :autoupgrade => true - } end - - it { should contain_package('elasticsearch').with(:ensure => 'latest') } - end - - end - - context 'when setting package version and package_url' do - - let :params do { - :version => '0.90.10', - :package_url => 'puppet:///path/to/some/elasticsearch-0.90.10.deb' - } end - - it { expect { should raise_error(Puppet::Error) } } - - end - - context 'via package_url setting' do - - context 'using puppet:/// schema' do - - let :params do { - :package_url => 'puppet:///path/to/package.deb' - } end - - it { should contain_file('/var/lib/elasticsearch/package.deb').with(:source => 'puppet:///path/to/package.deb', :backup => false) } - it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.deb', :provider => 'dpkg') } - end - - context 'using http:// schema' do - - let :params do { - :package_url => 'http://www.domain.com/path/to/package.deb' - } end - - it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } - it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => "Exec[create_package_dir_elasticsearch]") } - it { should contain_exec('download_package_elasticsearch').with(:command => 'wget -O /var/lib/elasticsearch/package.deb http://www.domain.com/path/to/package.deb 2> /dev/null', :require => 'File[/var/lib/elasticsearch]') } - it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.deb', :provider => 'dpkg') } - end - - context 'using https:// schema' do - - let :params do { - :package_url => 'https://www.domain.com/path/to/package.deb' - } end - - it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } - it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => 'Exec[create_package_dir_elasticsearch]') } - it { should contain_exec('download_package_elasticsearch').with(:command => 'wget -O /var/lib/elasticsearch/package.deb https://www.domain.com/path/to/package.deb 2> /dev/null', :require => 'File[/var/lib/elasticsearch]') } - it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.deb', :provider => 'dpkg') } - end - - context 'using ftp:// schema' do - - let :params do { - :package_url => 'ftp://www.domain.com/path/to/package.deb' - } end - - it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } - it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => 'Exec[create_package_dir_elasticsearch]') } - it { should contain_exec('download_package_elasticsearch').with(:command => 'wget -O /var/lib/elasticsearch/package.deb ftp://www.domain.com/path/to/package.deb 2> /dev/null', :require => 'File[/var/lib/elasticsearch]') } - it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.deb', :provider => 'dpkg') } - end - - context 'using file:// schema' do - - let :params do { - :package_url => 'file:/path/to/package.deb' - } end - - it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } - it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => 'Exec[create_package_dir_elasticsearch]') } - it { should contain_file('/var/lib/elasticsearch/package.deb').with(:source => '/path/to/package.deb', :backup => false) } - it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.deb', :provider => 'dpkg') } - end - - end - - end # package - - context 'service setup' do - - context 'with provider \'init\'' do - - context 'and default settings' do - - it { should contain_service('elasticsearch').with(:ensure => 'running') } - - end - - context 'and set defaults via hash param' do - - let :params do { - :init_defaults => { 'SERVICE_USER' => 'root', 'SERVICE_GROUP' => 'root' } - } end - - it { should contain_file('/etc/default/elasticsearch').with(:content => "### MANAGED BY PUPPET ###\n\nSERVICE_GROUP=root\nSERVICE_USER=root\n", :notify => 'Service[elasticsearch]') } - - end - - context 'and set defaults via file param' do - - let :params do { - :init_defaults_file => 'puppet:///path/to/elasticsearch.defaults' - } end - - it { should contain_file('/etc/default/elasticsearch').with(:source => 'puppet:///path/to/elasticsearch.defaults', :notify => 'Service[elasticsearch]') } - - end - - context 'no service restart when defaults change' do - - let :params do { - :init_defaults => { 'SERVICE_USER' => 'root', 'SERVICE_GROUP' => 'root' }, - :restart_on_change => false - } end - - it { should contain_file('/etc/default/elasticsearch').with(:content => "### MANAGED BY PUPPET ###\n\nSERVICE_GROUP=root\nSERVICE_USER=root\n").without_notify } - - end - - context 'and set init file via template' do - - let :params do { - :init_template => "elasticsearch/etc/init.d/elasticsearch.Debian.erb" - } end - - it { should contain_file('/etc/init.d/elasticsearch').with(:notify => 'Service[elasticsearch]') } - - end - - context 'No service restart when restart_on_change is false' do - - let :params do { - :init_template => "elasticsearch/etc/init.d/elasticsearch.Debian.erb", - :restart_on_change => false - } end - - it { should contain_file('/etc/init.d/elasticsearch').without_notify } - - end - - context 'when its unmanaged do nothing with it' do - - let :params do { - :status => 'unmanaged' - } end - - it { should contain_service('elasticsearch').with(:ensure => nil, :enable => false) } - - end - - end # provider init - - end # Services - - context 'when setting the module to absent' do - - let :params do { - :ensure => 'absent' - } end - - it { should contain_file('/etc/elasticsearch').with(:ensure => 'absent', :force => true, :recurse => true) } - it { should contain_package('elasticsearch').with(:ensure => 'purged') } - it { should contain_service('elasticsearch').with(:ensure => 'stopped', :enable => false) } - - end - - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/002_elasticsearch_init_redhat_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/002_elasticsearch_init_redhat_spec.rb deleted file mode 100644 index 9151b20e6c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/002_elasticsearch_init_redhat_spec.rb +++ /dev/null @@ -1,219 +0,0 @@ -require 'spec_helper' - -describe 'elasticsearch', :type => 'class' do - - [ 'RedHat', 'CentOS', 'Fedora', 'Scientific', 'Amazon', 'OracleLinux' ].each do |distro| - - context "on #{distro} OS" do - - let :facts do { - :operatingsystem => distro - } end - - context 'Main class' do - - # init.pp - it { should contain_class('elasticsearch::package') } - it { should contain_class('elasticsearch::config') } - it { should contain_class('elasticsearch::service') } - - end - - context 'package installation' do - - context 'via repository' do - - context 'with default settings' do - - it { should contain_package('elasticsearch').with(:ensure => 'present') } - - end - - context 'with specified version' do - - let :params do { - :version => '1.0' - } end - - it { should contain_package('elasticsearch').with(:ensure => '1.0') } - end - - context 'with auto upgrade enabled' do - - let :params do { - :autoupgrade => true - } end - - it { should contain_package('elasticsearch').with(:ensure => 'latest') } - end - - end - - context 'when setting package version and package_url' do - - let :params do { - :version => '0.90.10', - :package_url => 'puppet:///path/to/some/elasticsearch-0.90.10.rpm' - } end - - it { expect { should raise_error(Puppet::Error) } } - - end - - context 'via package_url setting' do - - context 'using puppet:/// schema' do - - let :params do { - :package_url => 'puppet:///path/to/package.rpm' - } end - - it { should contain_file('/var/lib/elasticsearch/package.rpm').with(:source => 'puppet:///path/to/package.rpm', :backup => false) } - it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.rpm', :provider => 'rpm') } - end - - context 'using http:// schema' do - - let :params do { - :package_url => 'http://www.domain.com/path/to/package.rpm' - } end - - it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } - it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => "Exec[create_package_dir_elasticsearch]") } - it { should contain_exec('download_package_elasticsearch').with(:command => 'wget -O /var/lib/elasticsearch/package.rpm http://www.domain.com/path/to/package.rpm 2> /dev/null', :require => 'File[/var/lib/elasticsearch]') } - it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.rpm', :provider => 'rpm') } - end - - context 'using https:// schema' do - - let :params do { - :package_url => 'https://www.domain.com/path/to/package.rpm' - } end - - it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } - it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => 'Exec[create_package_dir_elasticsearch]') } - it { should contain_exec('download_package_elasticsearch').with(:command => 'wget -O /var/lib/elasticsearch/package.rpm https://www.domain.com/path/to/package.rpm 2> /dev/null', :require => 'File[/var/lib/elasticsearch]') } - it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.rpm', :provider => 'rpm') } - end - - context 'using ftp:// schema' do - - let :params do { - :package_url => 'ftp://www.domain.com/path/to/package.rpm' - } end - - it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } - it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => 'Exec[create_package_dir_elasticsearch]') } - it { should contain_exec('download_package_elasticsearch').with(:command => 'wget -O /var/lib/elasticsearch/package.rpm ftp://www.domain.com/path/to/package.rpm 2> /dev/null', :require => 'File[/var/lib/elasticsearch]') } - it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.rpm', :provider => 'rpm') } - end - - context 'using file:// schema' do - - let :params do { - :package_url => 'file:/path/to/package.rpm' - } end - - it { should contain_exec('create_package_dir_elasticsearch').with(:command => 'mkdir -p /var/lib/elasticsearch') } - it { should contain_file('/var/lib/elasticsearch').with(:purge => false, :force => false, :require => 'Exec[create_package_dir_elasticsearch]') } - it { should contain_file('/var/lib/elasticsearch/package.rpm').with(:source => '/path/to/package.rpm', :backup => false) } - it { should contain_package('elasticsearch').with(:ensure => 'present', :source => '/var/lib/elasticsearch/package.rpm', :provider => 'rpm') } - end - - end - - end # package - - context 'service setup' do - - context 'with provider \'init\'' do - - context 'and default settings' do - - it { should contain_service('elasticsearch').with(:ensure => 'running') } - - end - - context 'and set defaults via hash param' do - - let :params do { - :init_defaults => { 'SERVICE_USER' => 'root', 'SERVICE_GROUP' => 'root' } - } end - - it { should contain_file('/etc/sysconfig/elasticsearch').with(:content => "### MANAGED BY PUPPET ###\n\nSERVICE_GROUP=root\nSERVICE_USER=root\n", :notify => 'Service[elasticsearch]') } - - end - - context 'and set defaults via file param' do - - let :params do { - :init_defaults_file => 'puppet:///path/to/elasticsearch.defaults' - } end - - it { should contain_file('/etc/sysconfig/elasticsearch').with(:source => 'puppet:///path/to/elasticsearch.defaults', :notify => 'Service[elasticsearch]') } - - end - - context 'no service restart when defaults change' do - - let :params do { - :init_defaults => { 'SERVICE_USER' => 'root', 'SERVICE_GROUP' => 'root' }, - :restart_on_change => false - } end - - it { should contain_file('/etc/sysconfig/elasticsearch').with(:content => "### MANAGED BY PUPPET ###\n\nSERVICE_GROUP=root\nSERVICE_USER=root\n").without_notify } - - end - - context 'and set init file via template' do - - let :params do { - :init_template => "elasticsearch/etc/init.d/elasticsearch.RedHat.erb" - } end - - it { should contain_file('/etc/init.d/elasticsearch').with(:notify => 'Service[elasticsearch]') } - - end - - context 'No service restart when restart_on_change is false' do - - let :params do { - :init_template => "elasticsearch/etc/init.d/elasticsearch.RedHat.erb", - :restart_on_change => false - } end - - it { should contain_file('/etc/init.d/elasticsearch').without_notify } - - end - - context 'when its unmanaged do nothing with it' do - - let :params do { - :status => 'unmanaged' - } end - - it { should contain_service('elasticsearch').with(:ensure => nil, :enable => false) } - - end - - end - - end # Services - - context 'when setting the module to absent' do - - let :params do { - :ensure => 'absent' - } end - - it { should contain_file('/etc/elasticsearch').with(:ensure => 'absent', :force => true, :recurse => true) } - it { should contain_package('elasticsearch').with(:ensure => 'purged') } - it { should contain_service('elasticsearch').with(:ensure => 'stopped', :enable => false) } - - end - - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/003_elasticsearch_init_unknown_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/003_elasticsearch_init_unknown_spec.rb deleted file mode 100644 index 12bce8fef8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/003_elasticsearch_init_unknown_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'spec_helper' - -describe 'elasticsearch', :type => 'class' do - - context "on an unknown OS" do - - context "it should fail" do - let :facts do { - :operatingsystem => 'Windows' - } end - - it { expect { should raise_error(Puppet::Error) } } - - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/004_elasticsearch_init_config_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/004_elasticsearch_init_config_spec.rb deleted file mode 100644 index 2f01fb5b29..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/004_elasticsearch_init_config_spec.rb +++ /dev/null @@ -1,112 +0,0 @@ -require 'spec_helper' - -describe 'elasticsearch', :type => 'class' do - - let :facts do { - :operatingsystem => 'CentOS' - } end - - context "config file content" do - - context "with nothing set" do - - let :params do { - } end - - it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:content => "### MANAGED BY PUPPET ###\n") } - - end - - context "set a value" do - - let :params do { - :config => { 'node' => { 'name' => 'test' } } - } end - - it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:content => "### MANAGED BY PUPPET ###\n---\nnode: \n name: test\n") } - - end - - context "set a value to true" do - - let :params do { - :config => { 'node' => { 'master' => true } } - } end - - it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:content => "### MANAGED BY PUPPET ###\n---\nnode: \n master: true\n") } - - end - - context "set a value to false" do - - let :params do { - :config => { 'node' => { 'data' => false } } - } end - - it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:content => "### MANAGED BY PUPPET ###\n---\nnode: \n data: false\n") } - - end - - context "deeper hash and multiple keys" do - - let :params do { - :config => { 'index' => { 'routing' => { 'allocation' => { 'include' => 'tag1', 'exclude' => [ 'tag2', 'tag3' ] } } }, 'node' => { 'name' => 'somename' } } - } end - - it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:content => "### MANAGED BY PUPPET ###\n---\nindex: \n routing: \n allocation: \n exclude: \n - tag2\n - tag3\n include: tag1\nnode: \n name: somename\n") } - - end - - context "Combination of full hash and shorted write up keys" do - - let :params do { - :config => { 'node' => { 'name' => 'NodeName', 'rack' => 46 }, 'boostrap.mlockall' => true, 'cluster' => { 'name' => 'ClusterName', 'routing.allocation.awareness.attributes' => 'rack' }, 'discovery.zen' => { 'ping.unicast.hosts'=> [ "host1", "host2" ], 'minimum_master_nodes' => 3, 'ping.multicast.enabled' => false }, 'gateway' => { 'expected_nodes' => 4, 'recover_after_nodes' => 3 }, 'network.host' => '123.123.123.123' } - } end - - it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:content => "### MANAGED BY PUPPET ###\n---\nboostrap: \n mlockall: true\ncluster: \n name: ClusterName\n routing: \n allocation: \n awareness: \n attributes: rack\ndiscovery: \n zen: \n minimum_master_nodes: 3\n ping: \n multicast: \n enabled: false\n unicast: \n hosts: \n - host1\n - host2\ngateway: \n expected_nodes: 4\n recover_after_nodes: 3\nnetwork: \n host: 123.123.123.123\nnode: \n name: NodeName\n rack: 46\n") } - - end - - end - - context "service restarts" do - - let :facts do { - :operatingsystem => 'CentOS' - } end - - context "does not restart when restart_on_change is false" do - let :params do { - :config => { 'node' => { 'name' => 'test' } }, - :restart_on_change => false, - } end - - it { should contain_file('/etc/elasticsearch/elasticsearch.yml').without_notify } - end - - context "should happen restart_on_change is true (default)" do - let :params do { - :config => { 'node' => { 'name' => 'test' } }, - :restart_on_change => true, - } end - - it { should contain_file('/etc/elasticsearch/elasticsearch.yml').with(:notify => "Class[Elasticsearch::Service]") } - end - - end - - context 'data directory' do - let(:facts) do { - :operatingsystem => 'CentOS' - } end - - context 'should allow creating datadir' do - let(:params) do { - :datadir => '/foo' - } end - - it { should contain_file('/foo').with(:ensure => 'directory') } - end - - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/005_elasticsearch_java_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/005_elasticsearch_java_spec.rb deleted file mode 100644 index d51108746d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/classes/005_elasticsearch_java_spec.rb +++ /dev/null @@ -1,120 +0,0 @@ -require 'spec_helper' - -describe 'elasticsearch', :type => 'class' do - - context "install java" do - - let :params do { - :java_install => true, - :config => { 'node' => { 'name' => 'test' } } - } end - - context "On Debian OS" do - - let :facts do { - :operatingsystem => 'Debian' - } end - - it { should contain_package('openjdk-7-jre-headless') } - - end - - context "On Ubuntu OS" do - - let :facts do { - :operatingsystem => 'Ubuntu' - } end - - it { should contain_package('openjdk-7-jre-headless') } - - end - - context "On CentOS OS " do - - let :facts do { - :operatingsystem => 'CentOS' - } end - - it { should contain_package('java-1.7.0-openjdk') } - - end - - context "On RedHat OS " do - - let :facts do { - :operatingsystem => 'Redhat' - } end - - it { should contain_package('java-1.7.0-openjdk') } - - end - - context "On Fedora OS " do - - let :facts do { - :operatingsystem => 'Fedora' - } end - - it { should contain_package('java-1.7.0-openjdk') } - - end - - context "On Scientific OS " do - - let :facts do { - :operatingsystem => 'Scientific' - } end - - it { should contain_package('java-1.7.0-openjdk') } - - end - - context "On Amazon OS " do - - let :facts do { - :operatingsystem => 'Amazon' - } end - - it { should contain_package('java-1.7.0-openjdk') } - - end - - context "On OracleLinux OS " do - - let :facts do { - :operatingsystem => 'OracleLinux' - } end - - it { should contain_package('java-1.7.0-openjdk') } - - end - - context "On an unknown OS" do - - let :facts do { - :operatingsystem => 'Windows' - } end - - it { expect { should raise_error(Puppet::Error) } } - - end - - context "Custom java package" do - - let :facts do { - :operatingsystem => 'CentOS' - } end - - let :params do { - :java_install => true, - :java_package => 'java-1.6.0-openjdk', - :config => { 'node' => { 'name' => 'test' } } - } end - - it { should contain_package('java-1.6.0-openjdk') } - - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/001_elasticsearch_python_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/001_elasticsearch_python_spec.rb deleted file mode 100644 index 56d0428067..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/001_elasticsearch_python_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'spec_helper' - -describe 'elasticsearch::python', :type => 'define' do - - let(:facts) { {:operatingsystem => 'CentOS' }} - - [ 'pyes', 'rawes', 'pyelasticsearch', 'ESClient', 'elasticutils', 'elasticsearch' ].each do |pythonlib| - - context "installation of library #{pythonlib}" do - - let(:title) { pythonlib } - - it { should contain_package(pythonlib).with(:provider => 'pip') } - - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/002_elasticsearch_ruby_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/002_elasticsearch_ruby_spec.rb deleted file mode 100644 index 6de94f76b2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/002_elasticsearch_ruby_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'spec_helper' - -describe 'elasticsearch::ruby', :type => 'define' do - - let(:facts) { {:operatingsystem => 'CentOS' }} - - [ 'tire', 'stretcher', 'elastic_searchable', 'elasticsearch'].each do |rubylib| - - context "installation of library #{rubylib}" do - - let(:title) { rubylib } - - it { should contain_package(rubylib).with(:provider => 'gem') } - - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/003_elasticsearch_template_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/003_elasticsearch_template_spec.rb deleted file mode 100644 index 527fb118f0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/003_elasticsearch_template_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'spec_helper' - -describe 'elasticsearch::template', :type => 'define' do - - let(:title) { 'foo' } - let(:facts) { {:operatingsystem => 'CentOS' }} - let(:pre_condition) { 'class {"elasticsearch": config => { "node" => {"name" => "test" }}}'} - - context "Add a template" do - - let :params do { - :ensure => 'present', - :file => 'puppet:///path/to/foo.json', - } end - - it { should contain_file('/etc/elasticsearch/templates_import/elasticsearch-template-foo.json').with(:source => 'puppet:///path/to/foo.json', :notify => "Exec[delete_template_foo]", :require => "Exec[mkdir_templates]") } - it { should contain_exec('insert_template_foo').with(:command => 'curl -s -XPUT http://localhost:9200/_template/foo -d @/etc/elasticsearch/templates_import/elasticsearch-template-foo.json', :unless => 'test $(curl -s \'http://localhost:9200/_template/foo?pretty=true\' | wc -l) -gt 1') } - end - - context "Delete a template" do - - let :params do { - :ensure => 'absent' - } end - - it { should_not contain_file('/etc/elasticsearch/templates_import/elasticsearch-template-foo.json').with(:source => 'puppet:///path/to/foo.json') } - it { should_not contain_exec('insert_template_foo') } - it { should contain_exec('delete_template_foo').with(:command => 'curl -s -XDELETE http://localhost:9200/_template/foo', :notify => nil, :onlyif => 'test $(curl -s \'http://localhost:9200/_template/foo?pretty=true\' | wc -l) -gt 1' ) } - end - - context "Add template with alternative host and port" do - - let :params do { - :file => 'puppet:///path/to/foo.json', - :host => 'otherhost', - :port => '9201' - } end - - it { should contain_file('/etc/elasticsearch/templates_import/elasticsearch-template-foo.json').with(:source => 'puppet:///path/to/foo.json') } - it { should contain_exec('insert_template_foo').with(:command => 'curl -s -XPUT http://otherhost:9201/_template/foo -d @/etc/elasticsearch/templates_import/elasticsearch-template-foo.json', :unless => 'test $(curl -s \'http://otherhost:9201/_template/foo?pretty=true\' | wc -l) -gt 1') } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/004_elasticsearch_plugin_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/004_elasticsearch_plugin_spec.rb deleted file mode 100644 index dcf2170ea7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/defines/004_elasticsearch_plugin_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'spec_helper' - -describe 'elasticsearch::plugin', :type => 'define' do - - let(:title) { 'mobz/elasticsearch-head' } - let(:facts) { {:operatingsystem => 'CentOS' }} - let(:pre_condition) { 'class {"elasticsearch": config => { "node" => {"name" => "test" }}}'} - - context "Add a plugin" do - - let :params do { - :ensure => 'present', - :module_dir => 'head', - } end - - it { should contain_exec('install_plugin_mobz/elasticsearch-head').with(:command => '/usr/share/elasticsearch/bin/plugin -install mobz/elasticsearch-head', :creates => '/usr/share/elasticsearch/plugins/head') } - end - - context "Remove a plugin" do - - let :params do { - :ensure => 'absent', - :module_dir => 'head' - } end - - it { should contain_exec('remove_plugin_mobz/elasticsearch-head').with(:command => '/usr/share/elasticsearch/bin/plugin --remove head', :onlyif => 'test -d /usr/share/elasticsearch/plugins/head') } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/lib/parser_validate_task.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/lib/parser_validate_task.rb deleted file mode 100644 index 27ab76450a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/lib/parser_validate_task.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'find' -require 'pathname' -require 'rake' -require 'rspec/core/rake_task' - -desc "run Puppet parser validate" -task :parser_validate do - - pwd = ENV["PWD"] - puppet_file_paths = [] - Find.find(pwd) do |path| - puppet_file_paths << path if path =~ /.*\.pp$/ - end - - exit_code = 0 - puppet_file_paths.each do |puppetfile| - - pwdpath = Pathname.new(pwd) - pn = Pathname.new(puppetfile) - rel_path = pn.relative_path_from(pwdpath) - - print "Validating #{rel_path}.... " - $stdout.flush - - result = `puppet parser validate #{puppetfile}` - if $?.exitstatus == 0 - res = 'OK' - else - res = 'ERR' - end - - puts "#{res}" - - if $?.exitstatus != 0 - exit_code = 1 - end - end - exit exit_code - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/lib/template_check_task.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/lib/template_check_task.rb deleted file mode 100644 index f4748236fb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/lib/template_check_task.rb +++ /dev/null @@ -1,31 +0,0 @@ -require 'find' -require 'pathname' -require 'rake' -require 'rspec/core/rake_task' - -desc "Verify puppet templates" -task :template_verify do - - pwd = ENV["PWD"] - erb_file_paths = [] - Find.find(pwd) do |path| - erb_file_paths << path if path =~ /.*\.erb$/ - end - - exit_code = 0 - erb_file_paths.each do |erbfile| - - pwdpath = Pathname.new(pwd) - pn = Pathname.new(erbfile) - rel_path = pn.relative_path_from(pwdpath) - - result = `erb -P -x -T '-' #{erbfile} | ruby -c` - puts "Verifying #{rel_path}.... #{result}" - - if $?.exitstatus != 0 - exit_code = 1 - end - end - exit exit_code - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/spec_helper.rb deleted file mode 100644 index dc7e9f4a0e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/spec/spec_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'rubygems' -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/elasticsearch/elasticsearch.yml.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/elasticsearch/elasticsearch.yml.erb deleted file mode 100644 index b93ccdcb21..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/elasticsearch/elasticsearch.yml.erb +++ /dev/null @@ -1,93 +0,0 @@ -<%- - - # Function to make a structured and sorted yaml representation out of a hash - def recursive_hash_to_yml_string(hash, depth=0) - spacer = "" - depth.times { spacer += " "} - hash.keys.sort.each do |sorted_key| - @yml_string += spacer + sorted_key + ": " - if hash[sorted_key].is_a?(Array) - keyspacer = "" - sorted_key.length.times { keyspacer += " " } - @yml_string += "\n" - hash[sorted_key].each do |item| - @yml_string += spacer + keyspacer + "- " + item +"\n" - end - elsif hash[sorted_key].is_a?(Hash) - @yml_string += "\n" - recursive_hash_to_yml_string(hash[sorted_key], depth+1) - else - @yml_string += "#{hash[sorted_key].to_s}\n" - end - end - end - - # Function to transform shorted write up of the keys into full hash representation - def transform(hash) - return_vals = [] - - hash.each do |key,val| - if m = /^([^.]+)\.(.*)$/.match(key) - temp = { m[1] => { m[2] => val } } - transform(temp).each do |stuff| - return_vals << stuff - end - else - if val.is_a?(Hash) - transform(val).each do |stuff| - return_vals << { key => stuff } - end - else - return_vals << { key => val } - end - end - end - - return_vals - end - - # Function to deep merge hashes with same keys - class ::Hash - def deep_merge_with_array_values_concatenated(hash) - target = dup - - hash.keys.each do |key| - if hash[key].is_a? Hash and self[key].is_a? Hash - target[key] = target[key].deep_merge_with_array_values_concatenated(hash[key]) - next - end - - if hash[key].is_a?(Array) && target[key].is_a?(Array) - target[key] = target[key] + hash[key] - else - target[key] = hash[key] - end - end - - target - end - end - - # initial string - @yml_string = "### MANAGED BY PUPPET ###\n" - - if !scope.lookupvar('elasticsearch::config').empty? - - @yml_string += "---\n" - - ## Transform shorted keys into full write up - transformed_config = transform(scope.lookupvar('elasticsearch::config')) - - # Merge it back into a hash - tmphash = { } - transformed_config.each do |subhash| - tmphash = tmphash.deep_merge_with_array_values_concatenated(subhash) - end - - # Transform it into yaml - recursive_hash_to_yml_string(tmphash) - - end - --%> -<%= @yml_string -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.Debian.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.Debian.erb deleted file mode 100644 index 220c2f80b7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.Debian.erb +++ /dev/null @@ -1,196 +0,0 @@ -#!/bin/sh -# -# /etc/init.d/elasticsearch -- startup script for Elasticsearch -# -# Written by Miquel van Smoorenburg . -# Modified for Debian GNU/Linux by Ian Murdock . -# Modified for Tomcat by Stefan Gybas . -# Modified for Tomcat6 by Thierry Carrez . -# Additional improvements by Jason Brittain . -# Modified by Nicolas Huray for ElasticSearch . -# -### BEGIN INIT INFO -# Provides: elasticsearch -# Required-Start: $network $remote_fs $named -# Required-Stop: $network $remote_fs $named -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Starts elasticsearch -# Description: Starts elasticsearch using start-stop-daemon -### END INIT INFO - -PATH=/bin:/usr/bin:/sbin:/usr/sbin -NAME=elasticsearch -DESC="ElasticSearch Server" -DEFAULT=/etc/default/$NAME - -if [ `id -u` -ne 0 ]; then - echo "You need root privileges to run this script" - exit 1 -fi - - -. /lib/lsb/init-functions - -if [ -r /etc/default/rcS ]; then - . /etc/default/rcS -fi - - -# The following variables can be overwritten in $DEFAULT - -# Run ElasticSearch as this user ID and group ID -ES_USER=elasticsearch -ES_GROUP=elasticsearch - -# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT) -JDK_DIRS="/usr/lib/jvm/java-7-oracle /usr/lib/jvm/java-7-openjdk /usr/lib/jvm/java-7-openjdk-amd64/ /usr/lib/jvm/java-7-openjdk-armhf /usr/lib/jvm/java-7-openjdk-i386/ /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-openjdk-armhf /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/default-java" - -# Look for the right JVM to use -for jdir in $JDK_DIRS; do - if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then - JAVA_HOME="$jdir" - fi -done -export JAVA_HOME - -# Directory where the ElasticSearch binary distribution resides -ES_HOME=/usr/share/$NAME - -# Heap Size (defaults to 256m min, 1g max) -#ES_HEAP_SIZE=2g - -# Heap new generation -#ES_HEAP_NEWSIZE= - -# max direct memory -#ES_DIRECT_SIZE= - -# Additional Java OPTS -#ES_JAVA_OPTS= - -# Maximum number of open files -MAX_OPEN_FILES=65535 - -# Maximum amount of locked memory -#MAX_LOCKED_MEMORY= - -# ElasticSearch log directory -LOG_DIR=/var/log/$NAME - -# ElasticSearch data directory -DATA_DIR=/var/lib/$NAME - -# ElasticSearch work directory -WORK_DIR=/tmp/$NAME - -# ElasticSearch configuration directory -CONF_DIR=/etc/$NAME - -# ElasticSearch configuration file (elasticsearch.yml) -CONF_FILE=$CONF_DIR/elasticsearch.yml - -# End of variables that can be overwritten in $DEFAULT - -# overwrite settings from default file -if [ -f "$DEFAULT" ]; then - . "$DEFAULT" -fi - -# Define other required variables -PID_FILE=/var/run/$NAME.pid -DAEMON=$ES_HOME/bin/elasticsearch -DAEMON_OPTS="-p $PID_FILE -Des.default.config=$CONF_FILE -Des.default.path.home=$ES_HOME -Des.default.path.logs=$LOG_DIR -Des.default.path.data=$DATA_DIR -Des.default.path.work=$WORK_DIR -Des.default.path.conf=$CONF_DIR" - -export ES_HEAP_SIZE -export ES_HEAP_NEWSIZE -export ES_DIRECT_SIZE -export ES_JAVA_OPTS - -# Check DAEMON exists -test -x $DAEMON || exit 0 - -checkJava() { - if [ -x "$JAVA_HOME/bin/java" ]; then - JAVA="$JAVA_HOME/bin/java" - else - JAVA=`which java` - fi - - if [ ! -x "$JAVA" ]; then - echo "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME" - exit 1 - fi -} - -case "$1" in - start) - checkJava - - if [ -n "$MAX_LOCKED_MEMORY" -a -z "$ES_HEAP_SIZE" ]; then - log_failure_msg "MAX_LOCKED_MEMORY is set - ES_HEAP_SIZE must also be set" - exit 1 - fi - - log_daemon_msg "Starting $DESC" - - pid=`pidofproc -p $PID_FILE elasticsearch` - if [ -n "$pid" ] ; then - log_begin_msg "Already running." - log_end_msg 0 - exit 0 - fi - - # Prepare environment - mkdir -p "$LOG_DIR" "$DATA_DIR" "$WORK_DIR" && chown "$ES_USER":"$ES_GROUP" "$LOG_DIR" "$DATA_DIR" "$WORK_DIR" - touch "$PID_FILE" && chown "$ES_USER":"$ES_GROUP" "$PID_FILE" - - if [ -n "$MAX_OPEN_FILES" ]; then - ulimit -n $MAX_OPEN_FILES - fi - - if [ -n "$MAX_LOCKED_MEMORY" ]; then - ulimit -l $MAX_LOCKED_MEMORY - fi - - # Start Daemon - start-stop-daemon --start -b --user "$ES_USER" -c "$ES_USER" --pidfile "$PID_FILE" --exec $DAEMON -- $DAEMON_OPTS - log_end_msg $? - ;; - stop) - log_daemon_msg "Stopping $DESC" - - if [ -f "$PID_FILE" ]; then - start-stop-daemon --stop --pidfile "$PID_FILE" \ - --user "$ES_USER" \ - --retry=TERM/20/KILL/5 >/dev/null - if [ $? -eq 1 ]; then - log_progress_msg "$DESC is not running but pid file exists, cleaning up" - elif [ $? -eq 3 ]; then - PID="`cat $PID_FILE`" - log_failure_msg "Failed to stop $DESC (pid $PID)" - exit 1 - fi - rm -f "$PID_FILE" - else - log_progress_msg "(not running)" - fi - log_end_msg 0 - ;; - status) - status_of_proc -p $PID_FILE elasticsearch elasticsearch && exit 0 || exit $? - ;; - restart|force-reload) - if [ -f "$PID_FILE" ]; then - $0 stop - sleep 1 - fi - $0 start - ;; - *) - log_success_msg "Usage: $0 {start|stop|restart|force-reload|status}" - exit 1 - ;; -esac - -exit 0 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.RedHat.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.RedHat.erb deleted file mode 100644 index 8d611514a1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/init.d/elasticsearch.RedHat.erb +++ /dev/null @@ -1,155 +0,0 @@ -#!/bin/sh -# -# elasticsearch -# -# chkconfig: 2345 80 20 -# description: Starts and stops a single elasticsearch instance on this system -# - -### BEGIN INIT INFO -# Provides: Elasticsearch -# Required-Start: $network $named -# Required-Stop: $network $named -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: This service manages the elasticsearch daemon -# Description: Elasticsearch is a very scalable, schema-free and high-performance search solution supporting multi-tenancy and near realtime search. -### END INIT INFO - -# -# init.d / servicectl compatibility (openSUSE) -# -if [ -f /etc/rc.status ]; then - . /etc/rc.status - rc_reset -fi - -# -# Source function library. -# -if [ -f /etc/rc.d/init.d/functions ]; then - . /etc/rc.d/init.d/functions -fi - -exec="/usr/share/elasticsearch/bin/elasticsearch" -prog="elasticsearch" -pidfile=/var/run/elasticsearch/${prog}.pid - -[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog - -export ES_HEAP_SIZE -export ES_HEAP_NEWSIZE -export ES_DIRECT_SIZE -export ES_JAVA_OPTS - -lockfile=/var/lock/subsys/$prog - -# backwards compatibility for old config sysconfig files, pre 0.90.1 -if [ -n $USER ] && [ -z $ES_USER ] ; then - ES_USER=$USER -fi - -checkJava() { - if [ -x "$JAVA_HOME/bin/java" ]; then - JAVA="$JAVA_HOME/bin/java" - else - JAVA=$(which java) - fi - - if [ ! -x "$JAVA" ]; then - echo "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME" - exit 1 - fi -} - -start() { - checkJava - [ -x $exec ] || exit 5 - [ -f $CONF_FILE ] || exit 6 - if [ -n "$MAX_LOCKED_MEMORY" -a -z "$ES_HEAP_SIZE" ]; then - echo "MAX_LOCKED_MEMORY is set - ES_HEAP_SIZE must also be set" - return 7 - fi - if [ -n "$MAX_OPEN_FILES" ]; then - ulimit -n $MAX_OPEN_FILES - fi - if [ -n "$MAX_LOCKED_MEMORY" ]; then - ulimit -l $MAX_LOCKED_MEMORY - fi - if [ -n "$WORK_DIR" ]; then - mkdir -p "$WORK_DIR" - chown "$ES_USER":"$ES_GROUP" "$WORK_DIR" - fi - echo -n $"Starting $prog: " - # if not running, start it up here, usually something like "daemon $exec" - daemon --user $ES_USER --pidfile $pidfile $exec -p $pidfile -Des.default.path.home=$ES_HOME -Des.default.path.logs=$LOG_DIR -Des.default.path.data=$DATA_DIR -Des.default.path.work=$WORK_DIR -Des.default.path.conf=$CONF_DIR - retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile - return $retval -} - -stop() { - echo -n $"Stopping $prog: " - # stop it here, often "killproc $prog" - killproc -p $pidfile $prog - retval=$? - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - start -} - -reload() { - restart -} - -force_reload() { - restart -} - -rh_status() { - # run checks to determine if the service is running or use generic status - status -p $pidfile $prog -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 -esac -exit $? diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/sysconfig/defaults.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/sysconfig/defaults.erb deleted file mode 100644 index b4e8af62dc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/elasticsearch/templates/etc/sysconfig/defaults.erb +++ /dev/null @@ -1,5 +0,0 @@ -### MANAGED BY PUPPET ### - -<% scope.lookupvar('elasticsearch::init_defaults').sort.map do |key, value| -%> -<%= key %>=<%= value %> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._Gemfile deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._LICENSE deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._Modulefile deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._README.md deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._Rakefile deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._files b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._files deleted file mode 100755 index bb87e14dde0f1c1e55858971d09fe60463759777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcma)$Ka0XZ5XCowh_-@t#C8)-K~A^xZzqCU*o9>?rwgkIn-TS!*xgsXXD(V?bw3#9 zy*E3{h2|(F{aW5KX{G$#ATaBG1^_!;#f!th964Roe5B syk$z|mvxj>R;JdI;mqG(iSndVNjEYVCiyg)*_Q(6ymf&&zPq=?4;Gq5dH?_b diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._lib b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._lib deleted file mode 100755 index bb87e14dde0f1c1e55858971d09fe60463759777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcma)$Ka0XZ5XCowh_-@t#C8)-K~A^xZzqCU*o9>?rwgkIn-TS!*xgsXXD(V?bw3#9 zy*E3{h2|(F{aW5KX{G$#ATaBG1^_!;#f!th964Roe5B syk$z|mvxj>R;JdI;mqG(iSndVNjEYVCiyg)*_Q(6ymf&&zPq=?4;Gq5dH?_b diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._manifests b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._manifests deleted file mode 100755 index bb87e14dde0f1c1e55858971d09fe60463759777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcma)$Ka0XZ5XCowh_-@t#C8)-K~A^xZzqCU*o9>?rwgkIn-TS!*xgsXXD(V?bw3#9 zy*E3{h2|(F{aW5KX{G$#ATaBG1^_!;#f!th964Roe5B syk$z|mvxj>R;JdI;mqG(iSndVNjEYVCiyg)*_Q(6ymf&&zPq=?4;Gq5dH?_b diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._metadata.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._metadata.json deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._spec b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._spec deleted file mode 100755 index bb87e14dde0f1c1e55858971d09fe60463759777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcma)$Ka0XZ5XCowh_-@t#C8)-K~A^xZzqCU*o9>?rwgkIn-TS!*xgsXXD(V?bw3#9 zy*E3{h2|(F{aW5KX{G$#ATaBG1^_!;#f!th964Roe5B syk$z|mvxj>R;JdI;mqG(iSndVNjEYVCiyg)*_Q(6ymf&&zPq=?4;Gq5dH?_b diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._tests b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/._tests deleted file mode 100755 index bb87e14dde0f1c1e55858971d09fe60463759777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcma)$Ka0XZ5XCowh_-@t#C8)-K~A^xZzqCU*o9>?rwgkIn-TS!*xgsXXD(V?bw3#9 zy*E3{h2|(F{aW5KX{G$#ATaBG1^_!;#f!th964Roe5B syk$z|mvxj>R;JdI;mqG(iSndVNjEYVCiyg)*_Q(6ymf&&zPq=?4;Gq5dH?_b diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/Gemfile deleted file mode 100644 index 95c7a5dd0b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source 'https://rubygems.org' - -group :development, :test do - gem 'rake', :require => false - gem 'rspec-puppet', :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'puppet-lint', :require => false - gem 'rspec-system-puppet', '~>2.0.0' -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/LICENSE deleted file mode 100644 index 009b66b6cc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2012-2014 Michael Stahnke - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/Modulefile deleted file mode 100644 index 237d164011..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/Modulefile +++ /dev/null @@ -1,8 +0,0 @@ -name 'stahnma-epel' -version '0.1.0' -source 'http://github.com/stahnma/puppet-module-epel' -author 'stahnma' -license 'Apache License, Version 2.0' -summary 'Setup the EPEL package repo' -description 'Setup the EPEL package repo on Centos/RHEL et all' -project_page 'http://github.com/stahnma/puppet-module-epel' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/README.md deleted file mode 100644 index 33b8727857..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/README.md +++ /dev/null @@ -1,90 +0,0 @@ -# Configure EPEL (Extra Repository for Enterprise Linux) - -# About -This module basically just mimics the epel-release rpm. The same repos are -enabled/disabled and the GPG key is imported. In the end you will end up with -the EPEL repos configured. - -The following Repos will be setup and enabled by default: - - * epel - -Other repositories that will setup but disabled (as per the epel-release setup) - - * epel-debuginfo - * epel-source - * epel-testing - * epel-testing-debuginfo - * epel-testing-source - -# Proxy -If you have an http proxy required to access the internet, you can use either -a class parameter in the _epel_ class, or edit the $proxy variable in the -params.pp file. By default no proxy is assumed. - -# Why? -I am a big fan of EPEL. I actually was one of the people who helped get it -going. I am also the owner of the epel-release package, so in general this -module should stay fairly up to date with the official upstream package. - -I just got sick of coding Puppet modules and basically having an assumption -that EPEL was setup or installed. I can now depend on this module instead. - -I realize it is fairly trivial to get EPEL setup. Every now-and-then however -the path to epel-release changes because something changes in the package (mass -rebuild, rpm build macros updates, etc). This module will bypass the changing -URL and just setup the package mirrors. - -This does mean that if you are looking for RPM macros that are normally -included with EPEL release, this will not have them. - -# Futher Information - -* [EPEL Wiki](http://fedoraproject.org/wiki/EPEL) -* [epel-release package information](http://mirrors.servercentral.net/fedora/epel/6/i386/repoview/epel-release.html) - -# Testing - -* This is commonly used on Puppet Enterprise 3.x -* This was tested using Puppet 3.3.0 on Centos5/6 -* This was tested using Puppet 3.1.1 on Amazon's AWS Linux -* I assume it will work on any RHEL variant (Amazon Linux is debatable as a variant) - -# Lifecycle -* No functionality has been introduced that should break Puppet 2.6 or 2.7, but I am no longer testing these versions of Puppet as they are end-of-lifed from Puppet Labs. - -## Unit tests - -Install the necessary gems - - bundle install - -Run the RSpec and puppet-lint tests - - bundle exec rake ci - -## System tests - -If you have Vagrant >=1.1.0 you can also run system tests: - - RSPEC_SET=centos-64-x64 bundle exec rake spec:system - -Available RSPEC_SET options are in .nodeset.yml - -# License -Apache Software License 2.0 - -# Author/Contributors - * Chad Metcalf - * Joseph Swick - * Matthaus Owens - * Michael Stahnke - * Michael Stahnke - * Pro Cabales - * Proletaryo Cabales - * Stefan Goethals - * Tim Rupp - * Trey Dockendorf - * Troy Bollinger - * Vlastimil Holer - * Ewoud Kohl van Wijngaarden diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/Rakefile deleted file mode 100644 index 5a71d17767..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/Rakefile +++ /dev/null @@ -1,17 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' -require 'rspec-system/rake_task' - -task :default do - sh %{rake -T} -end - -# Disable specific puppet-lint checks -PuppetLint.configuration.send("disable_80chars") -PuppetLint.configuration.send("disable_class_inherits_from_params_class") - -desc "Run rspec-puppet and puppet-lint tasks" -task :ci => [ - :lint, - :spec, -] diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/._RPM-GPG-KEY-EPEL-5 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/._RPM-GPG-KEY-EPEL-5 deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/._RPM-GPG-KEY-EPEL-6 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/._RPM-GPG-KEY-EPEL-6 deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/._RPM-GPG-KEY-EPEL-7 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/._RPM-GPG-KEY-EPEL-7 deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/RPM-GPG-KEY-EPEL-5 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/RPM-GPG-KEY-EPEL-5 deleted file mode 100644 index 5a13bb4f9f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/RPM-GPG-KEY-EPEL-5 +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF -l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/ -QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/ -lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk -/RTaZ8Kr1mTosVtosqmdIAA2XHxi8ZLiVPPSezJjfElsSqOAxEKPL0djfpp2wrTm -l/1iVnX+PZH5DRKCbjdCMLDJhYap7YUhcPsMGSeUKrwmBCBJUPc6DhjFvyhA9IMl -1T0+A/9SKTv94ToP/JYoCTHTgnG5MoVNafisfe0wojP2mWU4gRk8X4dNGKMj6lic -vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ6Ob8cTR2T12Fmv9w03DD3MnBstR6vhP -QcqZKhc5SJYYY7oVfxlSOfF4xfwcHQKoD5TOKwIAQ6T8jyFpKbQkRmVkb3JhIEVQ -RUwgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iGQEExECACQFAkXopTICGwMFCRLM -AwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQEZzANiF1IfabmQCgzvE60MnHSOBa -ZXXF7uU2Vzu8EOkAoKg9h+j0NuNom6WUYZyJQt4zc5seuQINBEXopTYQCADapnR/ -blrJ8FhlgNPl0X9S3JE/kygPbNXIqne4XBVYisVp0uzNCRUxNZq30MpY027JCs2J -nL2fMpwvx33f0phU029vrIZKA3CmnnwVsjcWfMJOVPBmVN7m5bGU68F+PdRIcDsl -PMOWRLkTBZOGolLgIbM4719fqA8etewILrX6uPvRDwywV7/sPCFpRcfNNBUY+Zx3 -5bf4fnkaCKxgXgQS3AT+hGYhlzIqQVTkGNveHTnt4SSzgAqR9sSwQwqvEfVtYNeS -w5rDguLG41HQm1Hojv59HNYjH6F/S1rClZi21bLgZbKpCFX76qPt8CTw+iQLBPPd -yoOGHfzyp7nsfhUrAAMFB/9/H9Gpk822ZpBexQW4y3LGFo9ZSnmu+ueOZPU3SqDA -DW1ovZdYzGuJTGGM9oMl6bL8eZrcUBBOFaWge5wZczIE3hx2exEOkDdvq+MUDVD1 -axmN45q/7h1NYRp5GQL2ZsoV4g9U2gMdzHOFtZCER6PP9ErVlfJpgBUCdSL93V4H -Sgpkk7znmTOklbCM6l/G/A6q4sCRqfzHwVSTiruyTBiU9lfROsAl8fjIq2OzWJ2T -P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24 -0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC -GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY -bbsLFWOfmzAnNIGvFRWy+YHi -=MMNL ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/RPM-GPG-KEY-EPEL-6 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/RPM-GPG-KEY-EPEL-6 deleted file mode 100644 index 7a2030489d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/RPM-GPG-KEY-EPEL-6 +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 -JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B -M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn -XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 -pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV -QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp -Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq -3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu -vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar -1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g -YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB -tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS -KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9 -qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT -9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP -Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS -WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft -HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF -p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP -x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8 -wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J -l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG -iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR -XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== -=V/6I ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/RPM-GPG-KEY-EPEL-7 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/RPM-GPG-KEY-EPEL-7 deleted file mode 100644 index f205ede463..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/files/RPM-GPG-KEY-EPEL-7 +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.11 (GNU/Linux) - -mQINBFKuaIQBEAC1UphXwMqCAarPUH/ZsOFslabeTVO2pDk5YnO96f+rgZB7xArB -OSeQk7B90iqSJ85/c72OAn4OXYvT63gfCeXpJs5M7emXkPsNQWWSju99lW+AqSNm -jYWhmRlLRGl0OO7gIwj776dIXvcMNFlzSPj00N2xAqjMbjlnV2n2abAE5gq6VpqP -vFXVyfrVa/ualogDVmf6h2t4Rdpifq8qTHsHFU3xpCz+T6/dGWKGQ42ZQfTaLnDM -jToAsmY0AyevkIbX6iZVtzGvanYpPcWW4X0RDPcpqfFNZk643xI4lsZ+Y2Er9Yu5 -S/8x0ly+tmmIokaE0wwbdUu740YTZjCesroYWiRg5zuQ2xfKxJoV5E+Eh+tYwGDJ -n6HfWhRgnudRRwvuJ45ztYVtKulKw8QQpd2STWrcQQDJaRWmnMooX/PATTjCBExB -9dkz38Druvk7IkHMtsIqlkAOQMdsX1d3Tov6BE2XDjIG0zFxLduJGbVwc/6rIc95 -T055j36Ez0HrjxdpTGOOHxRqMK5m9flFbaxxtDnS7w77WqzW7HjFrD0VeTx2vnjj -GqchHEQpfDpFOzb8LTFhgYidyRNUflQY35WLOzLNV+pV3eQ3Jg11UFwelSNLqfQf -uFRGc+zcwkNjHh5yPvm9odR1BIfqJ6sKGPGbtPNXo7ERMRypWyRz0zi0twARAQAB -tChGZWRvcmEgRVBFTCAoNykgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iQI4BBMB -AgAiBQJSrmiEAhsPBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBqL66iNSxk -5cfGD/4spqpsTjtDM7qpytKLHKruZtvuWiqt5RfvT9ww9GUUFMZ4ZZGX4nUXg49q -ixDLayWR8ddG/s5kyOi3C0uX/6inzaYyRg+Bh70brqKUK14F1BrrPi29eaKfG+Gu -MFtXdBG2a7OtPmw3yuKmq9Epv6B0mP6E5KSdvSRSqJWtGcA6wRS/wDzXJENHp5re -9Ism3CYydpy0GLRA5wo4fPB5uLdUhLEUDvh2KK//fMjja3o0L+SNz8N0aDZyn5Ax -CU9RB3EHcTecFgoy5umRj99BZrebR1NO+4gBrivIfdvD4fJNfNBHXwhSH9ACGCNv -HnXVjHQF9iHWApKkRIeh8Fr2n5dtfJEF7SEX8GbX7FbsWo29kXMrVgNqHNyDnfAB -VoPubgQdtJZJkVZAkaHrMu8AytwT62Q4eNqmJI1aWbZQNI5jWYqc6RKuCK6/F99q -thFT9gJO17+yRuL6Uv2/vgzVR1RGdwVLKwlUjGPAjYflpCQwWMAASxiv9uPyYPHc -ErSrbRG0wjIfAR3vus1OSOx3xZHZpXFfmQTsDP7zVROLzV98R3JwFAxJ4/xqeON4 -vCPFU6OsT3lWQ8w7il5ohY95wmujfr6lk89kEzJdOTzcn7DBbUru33CQMGKZ3Evt -RjsC7FDbL017qxS+ZVA/HGkyfiu4cpgV8VUnbql5eAZ+1Ll6Dw== -=hdPa ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/lib/._facter b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/lib/._facter deleted file mode 100755 index bb87e14dde0f1c1e55858971d09fe60463759777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcma)$Ka0XZ5XCowh_-@t#C8)-K~A^xZzqCU*o9>?rwgkIn-TS!*xgsXXD(V?bw3#9 zy*E3{h2|(F{aW5KX{G$#ATaBG1^_!;#f!th964Roe5B syk$z|mvxj>R;JdI;mqG(iSndVNjEYVCiyg)*_Q(6ymf&&zPq=?4;Gq5dH?_b diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/lib/facter/._os_maj_version.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/lib/facter/._os_maj_version.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/lib/facter/os_maj_version.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/lib/facter/os_maj_version.rb deleted file mode 100644 index ba5cb84043..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/lib/facter/os_maj_version.rb +++ /dev/null @@ -1,11 +0,0 @@ -# This is a simple fact to get the Major version of an OS without having to -# have the entire LSB suite installed. LSB seems to pull in about 300 megs of -# stuff I often don't require. This fact is quick to load so it shouldn't be -# much of an issue. - -Facter.add(:os_maj_version) do - setcode do - v = Facter.value(:operatingsystemrelease) - v.split('.')[0].strip - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/._init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/._init.pp deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/._params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/._params.pp deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/._rpm_gpg_key.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/._rpm_gpg_key.pp deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/init.pp deleted file mode 100644 index f9f4be114a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/init.pp +++ /dev/null @@ -1,135 +0,0 @@ -# Class epel -# -# Actions: -# Configure the proper repositories and import GPG keys -# -# Reqiures: -# You should probably be on an Enterprise Linux variant. (Centos, RHEL, -# Scientific, Oracle, Ascendos, et al) -# -# Sample Usage: -# include epel -# -class epel ( - $epel_mirrorlist = $epel::params::epel_mirrorlist, - $epel_baseurl = $epel::params::epel_baseurl, - $epel_failovermethod = $epel::params::epel_failovermethod, - $epel_proxy = $epel::params::epel_proxy, - $epel_enabled = $epel::params::epel_enabled, - $epel_gpgcheck = $epel::params::epel_gpgcheck, - $epel_testing_baseurl = $epel::params::epel_testing_baseurl, - $epel_testing_failovermethod = $epel::params::epel_testing_failovermethod, - $epel_testing_proxy = $epel::params::epel_testing_proxy, - $epel_testing_enabled = $epel::params::epel_testing_enabled, - $epel_testing_gpgcheck = $epel::params::epel_testing_gpgcheck, - $epel_source_mirrorlist = $epel::params::epel_source_mirrorlist, - $epel_source_baseurl = $epel::params::epel_source_baseurl, - $epel_source_failovermethod = $epel::params::epel_source_failovermethod, - $epel_source_proxy = $epel::params::epel_source_proxy, - $epel_source_enabled = $epel::params::epel_source_enabled, - $epel_source_gpgcheck = $epel::params::epel_source_gpgcheck, - $epel_debuginfo_mirrorlist = $epel::params::epel_debuginfo_mirrorlist, - $epel_debuginfo_baseurl = $epel::params::epel_debuginfo_baseurl, - $epel_debuginfo_failovermethod = $epel::params::epel_debuginfo_failovermethod, - $epel_debuginfo_proxy = $epel::params::epel_debuginfo_proxy, - $epel_debuginfo_enabled = $epel::params::epel_debuginfo_enabled, - $epel_debuginfo_gpgcheck = $epel::params::epel_debuginfo_gpgcheck, - $epel_testing_source_baseurl = $epel::params::epel_testing_source_baseurl, - $epel_testing_source_failovermethod = $epel::params::epel_testing_source_failovermethod, - $epel_testing_source_proxy = $epel::params::epel_testing_source_proxy, - $epel_testing_source_enabled = $epel::params::epel_testing_source_enabled, - $epel_testing_source_gpgcheck = $epel::params::epel_testing_source_gpgcheck, - $epel_testing_debuginfo_baseurl = $epel::params::epel_testing_debuginfo_baseurl, - $epel_testing_debuginfo_failovermethod = $epel::params::epel_testing_debuginfo_failovermethod, - $epel_testing_debuginfo_proxy = $epel::params::epel_testing_debuginfo_proxy, - $epel_testing_debuginfo_enabled = $epel::params::epel_testing_debuginfo_enabled, - $epel_testing_debuginfo_gpgcheck = $epel::params::epel_testing_debuginfo_gpgcheck -) inherits epel::params { - - if $::osfamily == 'RedHat' and $::operatingsystem !~ /Fedora|Amazon/ { - yumrepo { 'epel-testing': - baseurl => $epel_testing_baseurl, - failovermethod => $epel_testing_failovermethod, - proxy => $epel_testing_proxy, - enabled => $epel_testing_enabled, - gpgcheck => $epel_testing_gpgcheck, - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}", - descr => "Extra Packages for Enterprise Linux ${::os_maj_version} - Testing - \$basearch ", - } - - yumrepo { 'epel-testing-debuginfo': - baseurl => $epel_testing_debuginfo_baseurl, - failovermethod => $epel_testing_debuginfo_failovermethod, - proxy => $epel_testing_debuginfo_proxy, - enabled => $epel_testing_debuginfo_enabled, - gpgcheck => $epel_testing_debuginfo_gpgcheck, - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}", - descr => "Extra Packages for Enterprise Linux ${::os_maj_version} - Testing - \$basearch - Debug", - } - - yumrepo { 'epel-testing-source': - baseurl => $epel_testing_source_baseurl, - failovermethod => $epel_testing_source_failovermethod, - proxy => $epel_testing_source_proxy, - enabled => $epel_testing_source_enabled, - gpgcheck => $epel_testing_source_gpgcheck, - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}", - descr => "Extra Packages for Enterprise Linux ${::os_maj_version} - Testing - \$basearch - Source", - } - - yumrepo { 'epel': - mirrorlist => $epel_mirrorlist, - baseurl => $epel_baseurl, - failovermethod => $epel_failovermethod, - proxy => $epel_proxy, - enabled => $epel_enabled, - gpgcheck => $epel_gpgcheck, - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}", - descr => "Extra Packages for Enterprise Linux ${::os_maj_version} - \$basearch", - } - - yumrepo { 'epel-debuginfo': - mirrorlist => $epel_debuginfo_mirrorlist, - baseurl => $epel_debuginfo_baseurl, - failovermethod => $epel_debuginfo_failovermethod, - proxy => $epel_debuginfo_proxy, - enabled => $epel_debuginfo_enabled, - gpgcheck => $epel_debuginfo_gpgcheck, - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}", - descr => "Extra Packages for Enterprise Linux ${::os_maj_version} - \$basearch - Debug", - } - - yumrepo { 'epel-source': - mirrorlist => $epel_source_mirrorlist, - baseurl => $epel_source_baseurl, - failovermethod => $epel_source_failovermethod, - proxy => $epel_source_proxy, - enabled => $epel_source_enabled, - gpgcheck => $epel_source_gpgcheck, - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}", - descr => "Extra Packages for Enterprise Linux ${::os_maj_version} - \$basearch - Source", - } - - file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}": - ensure => present, - owner => 'root', - group => 'root', - mode => '0644', - source => "puppet:///modules/epel/RPM-GPG-KEY-EPEL-${::os_maj_version}", - } - - epel::rpm_gpg_key{ "EPEL-${::os_maj_version}": - path => "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${::os_maj_version}", - before => Yumrepo['epel','epel-source','epel-debuginfo','epel-testing','epel-testing-source','epel-testing-debuginfo'], - } - - } elsif $::osfamily == 'RedHat' and $::operatingsystem == 'Amazon' { - yumrepo { 'epel': - enabled => $epel_enabled, - gpgcheck => $epel_gpgcheck, - } - } else { - notice ("Your operating system ${::operatingsystem} will not have the EPEL repository applied") - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/params.pp deleted file mode 100644 index 0939de9045..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/params.pp +++ /dev/null @@ -1,45 +0,0 @@ -# Optional parameters in setting up EPEL -class epel::params { - # Setting to 'absent' will fall back to the yum.conf - # Setting proxy here will be the default for all repos. - # - # If you wish to set a proxy for an individual set of repos, - # you can declare $proxy in that class, and should scope to - # the most specific declaration of proxy. - $proxy = 'absent' - - $epel_mirrorlist = "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-${::os_maj_version}&arch=\$basearch" - $epel_baseurl = 'absent' - $epel_failovermethod = 'priority' - $epel_proxy = $proxy - $epel_enabled = '1' - $epel_gpgcheck = '1' - $epel_testing_baseurl = "http://download.fedoraproject.org/pub/epel/testing/${::os_maj_version}/\$basearch" - $epel_testing_failovermethod = 'priority' - $epel_testing_proxy = $proxy - $epel_testing_enabled = '0' - $epel_testing_gpgcheck = '1' - $epel_source_mirrorlist = "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-${::os_maj_version}&arch=\$basearch" - $epel_source_baseurl = 'absent' - $epel_source_failovermethod = 'priority' - $epel_source_proxy = $proxy - $epel_source_enabled = '0' - $epel_source_gpgcheck = '1' - $epel_debuginfo_mirrorlist = "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-${::os_maj_version}&arch=\$basearch" - $epel_debuginfo_baseurl = 'absent' - $epel_debuginfo_failovermethod = 'priority' - $epel_debuginfo_proxy = $proxy - $epel_debuginfo_enabled = '0' - $epel_debuginfo_gpgcheck = '1' - $epel_testing_source_baseurl = "http://download.fedoraproject.org/pub/epel/testing/${::os_maj_version}/SRPMS" - $epel_testing_source_failovermethod = 'priority' - $epel_testing_source_proxy = $proxy - $epel_testing_source_enabled = '0' - $epel_testing_source_gpgcheck = '1' - $epel_testing_debuginfo_baseurl = "http://download.fedoraproject.org/pub/epel/testing/${::os_maj_version}/\$basearch/debug" - $epel_testing_debuginfo_failovermethod = 'priority' - $epel_testing_debuginfo_proxy = $proxy - $epel_testing_debuginfo_enabled = '0' - $epel_testing_debuginfo_gpgcheck = '1' - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/rpm_gpg_key.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/rpm_gpg_key.pp deleted file mode 100644 index ee0604dbbf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/manifests/rpm_gpg_key.pp +++ /dev/null @@ -1,28 +0,0 @@ -# Define epel::rpm_gpg_key -# -# Actions: -# Import a RPM gpg key -# -# Parameters: -# -# [*path*] -# Path of the RPM GPG key to import -# -# Reqiures: -# You should probably be on an Enterprise Linux variant. (Centos, RHEL, Scientific, Oracle, Ascendos, et al) -# -# Sample Usage: -# epel::rpm_gpg_key{ "EPEL-6": -# path => "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6" -# } -# -define epel::rpm_gpg_key($path) { - # Given the path to a key, see if it is imported, if not, import it - exec { "import-${name}": - path => '/bin:/usr/bin:/sbin:/usr/sbin', - command => "rpm --import ${path}", - unless => "rpm -q gpg-pubkey-$(echo $(gpg --throw-keyids < ${path}) | cut --characters=11-18 | tr '[A-Z]' '[a-z]')", - require => File[$path], - logoutput => 'on_failure', - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/metadata.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/metadata.json deleted file mode 100644 index ba8770e8b6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/metadata.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "stahnma-epel", - "version": "0.1.0", - "source": "http://github.com/stahnma/puppet-module-epel", - "author": "stahnma", - "license": "Apache License, Version 2.0", - "summary": "Setup the EPEL package repo", - "description": "Setup the EPEL package repo on Centos/RHEL et all", - "project_page": "http://github.com/stahnma/puppet-module-epel", - "dependencies": [ - - ], - "types": [ - - ], - "checksums": { - "Gemfile": "3189476f30a99858b367d955298fe469", - "LICENSE": "94f0b1430ad7e59227ccabf8232f81d5", - "Modulefile": "250a4370b189d3f2e68ffd359ee02bb5", - "README.md": "6b4c4d2e7f0f9c1b6197529fa1120c88", - "Rakefile": "946eced163d7f8e0da85bda4baa7fa9c", - "files/RPM-GPG-KEY-EPEL-5": "0466c259781def56dafe0a2cdc9de0c5", - "files/RPM-GPG-KEY-EPEL-6": "d865e6b948a74cb03bc3401c0b01b785", - "files/RPM-GPG-KEY-EPEL-7": "58fa8ae27c89f37b08429f04fd4a88cc", - "lib/facter/os_maj_version.rb": "806fb856251b605df379e973c716a41c", - "manifests/init.pp": "61856de8db1eb00700e0a9a93aea506f", - "manifests/params.pp": "4fb2e283b4ba6e41abd7a914bdd001b8", - "manifests/rpm_gpg_key.pp": "69086f12752a14b200e462afaa59a93c", - "spec/classes/epel_spec.rb": "7e8e5973fdccb866e91ed00a3fd0af4c", - "spec/classes/shared_base.rb": "a6a46eb7225a1814b9343f32190ba75b", - "spec/classes/shared_debuginfo.rb": "1bd23934bc1f7d14d2491c7741f10299", - "spec/classes/shared_gpgkey.rb": "38a62fe24acfc9cc8d740d242c9f1c85", - "spec/classes/shared_source.rb": "6581989ed1ca2edd589ed98ecb08bdfa", - "spec/classes/shared_testing.rb": "50e936b9cf241c9849cf551961492532", - "spec/classes/shared_testing_debuginfo.rb": "41e8a2215d347246ff241f1b3a819c91", - "spec/classes/shared_testing_source.rb": "8cd827b2cb0b08b1633d70784417f946", - "spec/defines/rpm_gpg_key_spec.rb": "489fa716eaa2aba013089a6cf552c5a6", - "spec/spec_helper.rb": "a5ad64bd67aa3fe2512fa7ba505c8e8b", - "spec/spec_helper_system.rb": "d24a7ffdf4b67dbbd3ef5687292f51cf", - "spec/system/basic_spec.rb": "bc475b95f390134b31d905590bf8b039", - "spec/system/usage_spec.rb": "04506df5627ecbe975acd1fd0407ae40", - "spec/unit/facter/os_maj_version_spec.rb": "67ab2730991d4a8430f1115aad46bcea", - "tests/init.pp": "7c69b7adf2ba141cb62cfc9e0704d59e" - } -} \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._classes b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._classes deleted file mode 100755 index bb87e14dde0f1c1e55858971d09fe60463759777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcma)$Ka0XZ5XCowh_-@t#C8)-K~A^xZzqCU*o9>?rwgkIn-TS!*xgsXXD(V?bw3#9 zy*E3{h2|(F{aW5KX{G$#ATaBG1^_!;#f!th964Roe5B syk$z|mvxj>R;JdI;mqG(iSndVNjEYVCiyg)*_Q(6ymf&&zPq=?4;Gq5dH?_b diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._defines b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._defines deleted file mode 100755 index bb87e14dde0f1c1e55858971d09fe60463759777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcma)$Ka0XZ5XCowh_-@t#C8)-K~A^xZzqCU*o9>?rwgkIn-TS!*xgsXXD(V?bw3#9 zy*E3{h2|(F{aW5KX{G$#ATaBG1^_!;#f!th964Roe5B syk$z|mvxj>R;JdI;mqG(iSndVNjEYVCiyg)*_Q(6ymf&&zPq=?4;Gq5dH?_b diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._spec_helper.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._spec_helper_system.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._spec_helper_system.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._system b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._system deleted file mode 100755 index bb87e14dde0f1c1e55858971d09fe60463759777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcma)$Ka0XZ5XCowh_-@t#C8)-K~A^xZzqCU*o9>?rwgkIn-TS!*xgsXXD(V?bw3#9 zy*E3{h2|(F{aW5KX{G$#ATaBG1^_!;#f!th964Roe5B syk$z|mvxj>R;JdI;mqG(iSndVNjEYVCiyg)*_Q(6ymf&&zPq=?4;Gq5dH?_b diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._unit b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/._unit deleted file mode 100755 index bb87e14dde0f1c1e55858971d09fe60463759777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcma)$Ka0XZ5XCowh_-@t#C8)-K~A^xZzqCU*o9>?rwgkIn-TS!*xgsXXD(V?bw3#9 zy*E3{h2|(F{aW5KX{G$#ATaBG1^_!;#f!th964Roe5B syk$z|mvxj>R;JdI;mqG(iSndVNjEYVCiyg)*_Q(6ymf&&zPq=?4;Gq5dH?_b diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._epel_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._epel_spec.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_base.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_base.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_debuginfo.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_debuginfo.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_gpgkey.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_gpgkey.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_source.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_source.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_testing.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_testing.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_testing_debuginfo.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_testing_debuginfo.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_testing_source.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/._shared_testing_source.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/epel_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/epel_spec.rb deleted file mode 100644 index 5d95a61a5f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/epel_spec.rb +++ /dev/null @@ -1,80 +0,0 @@ -require 'spec_helper' -require 'classes/shared_gpgkey' -require 'classes/shared_base' -require 'classes/shared_source' -require 'classes/shared_debuginfo' -require 'classes/shared_testing' -require 'classes/shared_testing_source' -require 'classes/shared_testing_debuginfo' - -describe 'epel' do - it { should create_class('epel') } - it { should contain_class('epel::params') } - - context "operatingsystem => #{default_facts[:operatingsystem]}" do - context 'os_maj_version => 6' do - include_context :base_6 - include_context :gpgkey_6 - include_context :epel_source_6 - include_context :epel_debuginfo_6 - include_context :epel_testing_6 - include_context :epel_testing_source_6 - include_context :epel_testing_debuginfo_6 - - let :facts do - default_facts.merge({ - :operatingsystemrelease => '6.4', - :os_maj_version => '6', - }) - end - - context 'epel_baseurl => http://example.com/epel/6/x86_64' do - let(:params) {{ :epel_baseurl => "http://example.com/epel/6/x86_64" }} - it { should contain_yumrepo('epel').with('baseurl' => 'http://example.com/epel/6/x86_64') } - end - - context 'epel_mirrorlist => absent' do - let(:params) {{ :epel_mirrorlist => 'absent' }} - it { should contain_yumrepo('epel').with('mirrorlist' => 'absent') } - end - end - - context 'os_maj_version => 5' do - include_context :base_5 - include_context :gpgkey_5 - include_context :epel_source_5 - include_context :epel_debuginfo_5 - include_context :epel_testing_5 - include_context :epel_testing_source_5 - include_context :epel_testing_debuginfo_5 - - let :facts do - default_facts.merge({ - :operatingsystemrelease => '5.9', - :os_maj_version => '5', - }) - end - end - end - - context 'operatingsystem => Amazon' do - let :facts do - default_facts.merge({ - :operatingsystem => 'Amazon', - }) - end - - it { should_not contain_yumrepo('epel-testing') } - it { should_not contain_yumrepo('epel-testing-debuginfo') } - it { should_not contain_yumrepo('epel-testing-source') } - it { should_not contain_yumrepo('epel-debuginfo') } - it { should_not contain_yumrepo('epel-source') } - - it do - should contain_yumrepo('epel').with({ - 'enabled' => '1', - 'gpgcheck' => '1', - }) - end - end -end \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_base.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_base.rb deleted file mode 100644 index 89b3c58cca..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_base.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper' - -shared_context :base do - it do - should contain_yumrepo('epel').with({ - 'failovermethod' => 'priority', - 'proxy' => 'absent', - 'enabled' => '1', - 'gpgcheck' => '1', - }) - end -end - -shared_context :base_6 do - include_context :base - - it do - should contain_yumrepo('epel').with({ - 'mirrorlist' => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch", - 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6", - 'descr' => "Extra Packages for Enterprise Linux 6 - $basearch", - }) - end -end - -shared_context :base_5 do - include_context :base - - it do - should contain_yumrepo('epel').with({ - 'mirrorlist' => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch", - 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5", - 'descr' => "Extra Packages for Enterprise Linux 5 - $basearch", - }) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_debuginfo.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_debuginfo.rb deleted file mode 100644 index d47934d142..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_debuginfo.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper' - -shared_context :epel_debuginfo do - it do - should contain_yumrepo('epel-debuginfo').with({ - 'proxy' => 'absent', - 'failovermethod' => 'priority', - 'enabled' => '0', - 'gpgcheck' => '1', - }) - end -end - -shared_context :epel_debuginfo_6 do - include_context :epel_debuginfo - - it do - should contain_yumrepo('epel-debuginfo').with({ - 'mirrorlist' => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-6&arch=$basearch", - 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6", - 'descr' => "Extra Packages for Enterprise Linux 6 - $basearch - Debug", - }) - end -end - -shared_context :epel_debuginfo_5 do - include_context :epel_debuginfo - - it do - should contain_yumrepo('epel-debuginfo').with({ - 'mirrorlist' => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch", - 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5", - 'descr' => "Extra Packages for Enterprise Linux 5 - $basearch - Debug", - }) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_gpgkey.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_gpgkey.rb deleted file mode 100644 index 8b79c8cdd7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_gpgkey.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'spec_helper' - -shared_context :gpgkey_6 do - it do - should contain_file("/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6").with({ - 'ensure' => 'present', - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - 'source' => "puppet:///modules/epel/RPM-GPG-KEY-EPEL-6", - }) - end - - it do - should contain_epel__rpm_gpg_key("EPEL-6").with({ - 'path' => "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6" - }) - end -end - -shared_context :gpgkey_5 do - it do - should contain_file("/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5").with({ - 'ensure' => 'present', - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - 'source' => "puppet:///modules/epel/RPM-GPG-KEY-EPEL-5", - }) - end - - it do - should contain_epel__rpm_gpg_key("EPEL-5").with({ - 'path' => "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5" - }) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_source.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_source.rb deleted file mode 100644 index c371465ba9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_source.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper' - -shared_context :epel_source do - it do - should contain_yumrepo('epel-source').with({ - 'proxy' => 'absent', - 'failovermethod' => 'priority', - 'enabled' => '0', - 'gpgcheck' => '1', - }) - end -end - -shared_context :epel_source_6 do - include_context :epel_source - - it do - should contain_yumrepo('epel-source').with({ - 'mirrorlist' => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-6&arch=$basearch", - 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6", - 'descr' => "Extra Packages for Enterprise Linux 6 - $basearch - Source", - }) - end -end - -shared_context :epel_source_5 do - include_context :epel_source - - it do - should contain_yumrepo('epel-source').with({ - 'mirrorlist' => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch", - 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5", - 'descr' => "Extra Packages for Enterprise Linux 5 - $basearch - Source", - }) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_testing.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_testing.rb deleted file mode 100644 index d560edb6e0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_testing.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper' - -shared_context :epel_testing do - it do - should contain_yumrepo('epel-testing').with({ - 'failovermethod' => 'priority', - 'proxy' => 'absent', - 'enabled' => '0', - 'gpgcheck' => '1', - }) - end -end - -shared_context :epel_testing_6 do - include_context :epel_testing - - it do - should contain_yumrepo('epel-testing').with({ - 'baseurl' => "http://download.fedoraproject.org/pub/epel/testing/6/$basearch", - 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6", - 'descr' => "Extra Packages for Enterprise Linux 6 - Testing - $basearch ", - }) - end -end - -shared_context :epel_testing_5 do - include_context :epel_testing - - it do - should contain_yumrepo('epel-testing').with({ - 'baseurl' => "http://download.fedoraproject.org/pub/epel/testing/5/$basearch", - 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5", - 'descr' => "Extra Packages for Enterprise Linux 5 - Testing - $basearch ", - }) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_testing_debuginfo.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_testing_debuginfo.rb deleted file mode 100644 index 62f647d379..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_testing_debuginfo.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper' - -shared_context :epel_testing_debuginfo do - it do - should contain_yumrepo('epel-testing-debuginfo').with({ - 'failovermethod' => 'priority', - 'proxy' => 'absent', - 'enabled' => '0', - 'gpgcheck' => '1', - }) - end -end - -shared_context :epel_testing_debuginfo_6 do - include_context :epel_testing_debuginfo - - it do - should contain_yumrepo('epel-testing-debuginfo').with({ - 'baseurl' => "http://download.fedoraproject.org/pub/epel/testing/6/$basearch/debug", - 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6", - 'descr' => "Extra Packages for Enterprise Linux 6 - Testing - $basearch - Debug", - }) - end -end - -shared_context :epel_testing_debuginfo_5 do - include_context :epel_testing_debuginfo - - it do - should contain_yumrepo('epel-testing-debuginfo').with({ - 'baseurl' => "http://download.fedoraproject.org/pub/epel/testing/5/$basearch/debug", - 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5", - 'descr' => "Extra Packages for Enterprise Linux 5 - Testing - $basearch - Debug", - }) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_testing_source.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_testing_source.rb deleted file mode 100644 index 1a7e0a6ae8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/classes/shared_testing_source.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper' - -shared_context :epel_testing_source do - it do - should contain_yumrepo('epel-testing-source').with({ - 'failovermethod' => 'priority', - 'proxy' => 'absent', - 'enabled' => '0', - 'gpgcheck' => '1', - }) - end -end - -shared_context :epel_testing_source_6 do - include_context :epel_testing_source - - it do - should contain_yumrepo('epel-testing-source').with({ - 'baseurl' => "http://download.fedoraproject.org/pub/epel/testing/6/SRPMS", - 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6", - 'descr' => "Extra Packages for Enterprise Linux 6 - Testing - $basearch - Source", - }) - end -end - -shared_context :epel_testing_source_5 do - include_context :epel_testing_source - - it do - should contain_yumrepo('epel-testing-source').with({ - 'baseurl' => "http://download.fedoraproject.org/pub/epel/testing/5/SRPMS", - 'gpgkey' => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5", - 'descr' => "Extra Packages for Enterprise Linux 5 - Testing - $basearch - Source", - }) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/defines/._rpm_gpg_key_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/defines/._rpm_gpg_key_spec.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/defines/rpm_gpg_key_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/defines/rpm_gpg_key_spec.rb deleted file mode 100644 index 63cfe08ff9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/defines/rpm_gpg_key_spec.rb +++ /dev/null @@ -1,57 +0,0 @@ -require 'spec_helper' - -describe 'epel::rpm_gpg_key' do - context 'os_maj_version => 6' do - let :facts do - default_facts.merge({ - :operatingsystemrelease => '6.4', - :os_maj_version => '6', - }) - end - - let :title do - 'EPEL-6' - end - - let :params do - { :path => "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6" } - end - - it do - should contain_exec("import-#{title}").with({ - 'path' => '/bin:/usr/bin:/sbin:/usr/sbin', - 'command' => "rpm --import #{params[:path]}", - 'unless' => "rpm -q gpg-pubkey-$(echo $(gpg --throw-keyids < #{params[:path]}) | cut --characters=11-18 | tr '[A-Z]' '[a-z]')", - 'require' => "File[#{params[:path]}]", - 'logoutput' => 'on_failure', - }) - end - end - - context 'os_maj_version => 5' do - let :facts do - default_facts.merge({ - :operatingsystemrelease => '5.9', - :os_maj_version => '5', - }) - end - - let :title do - 'EPEL-5' - end - - let :params do - { :path => "/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-5" } - end - - it do - should contain_exec("import-#{title}").with({ - 'path' => '/bin:/usr/bin:/sbin:/usr/sbin', - 'command' => "rpm --import #{params[:path]}", - 'unless' => "rpm -q gpg-pubkey-$(echo $(gpg --throw-keyids < #{params[:path]}) | cut --characters=11-18 | tr '[A-Z]' '[a-z]')", - 'require' => "File[#{params[:path]}]", - 'logoutput' => 'on_failure', - }) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/spec_helper.rb deleted file mode 100644 index eafe6b6001..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/spec_helper.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' - -def default_facts - { - :osfamily => 'RedHat', - :operatingsystem => 'CentOS', - } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/spec_helper_system.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/spec_helper_system.rb deleted file mode 100644 index cf680367b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/spec_helper_system.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'rspec-system/spec_helper' -require 'rspec-system-puppet/helpers' - -include RSpecSystemPuppet::Helpers - -RSpec.configure do |c| - # Project root for the this module's code - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Enable colour in Jenkins - c.tty = true - - c.include RSpecSystemPuppet::Helpers - - # This is where we 'setup' the nodes before running our tests - c.before :suite do - # Install puppet - puppet_install - puppet_master_install - - puppet_module_install(:source => proj_root, :module_name => 'epel') - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/._basic_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/._basic_spec.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/._usage_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/._usage_spec.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/basic_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/basic_spec.rb deleted file mode 100644 index 569e12d373..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/basic_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper_system' - -describe 'epel class:' do - context puppet_agent do - its(:stderr) { should be_empty } - its(:exit_code) { should_not == 1 } - end - - # Verify the os_maj_version fact is working - context shell 'facter --puppet os_maj_version' do - its(:stdout) { should_not be_empty } - its(:stderr) { should be_empty } - its(:exit_code) { should be_zero } - end - - pp = "class { 'epel': }" - - context puppet_apply pp do - its(:stderr) { should be_empty } - its(:exit_code) { should_not == 1 } - its(:refresh) { should be_nil } - its(:stderr) { should be_empty } - its(:exit_code) { should be_zero } - end - - context 'test EPEL repo presence' do - facts = node.facts - - # Only test for EPEL's presence if not Fedora - if facts['operatingsystem'] !~ /Fedora/ - context shell '/usr/bin/yum-config-manager epel | grep -q "\[epel\]"' do - its(:exit_code) { should be_zero } - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/usage_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/usage_spec.rb deleted file mode 100644 index 2b0d8f36e2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/system/usage_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -require 'spec_helper_system' - -describe 'standage usage tests:' do - context 'test epel baseurl and mirrorlist' do - facts = node.facts - os_maj_version = facts['operatingsystemrelease'].split('.')[0] - pp = <<-EOS - class { 'epel': - epel_baseurl => 'http://dl.fedoraproject.org/pub/epel/#{os_maj_version}/x86_64/', - epel_mirrorlist => 'absent', - } - EOS - - context puppet_apply pp do - its(:stderr) { should be_empty } - its(:exit_code) { should_not == 1 } - its(:refresh) { should be_nil } - its(:stderr) { should be_empty } - its(:exit_code) { should be_zero } - end - - # Only test for EPEL's presence if not Fedora - if facts['operatingsystem'] !~ /Fedora/ - # Test the yum config to ensure mirrorlist was emptied - context shell '/usr/bin/yum-config-manager epel | egrep "^mirrorlist ="' do - its(:stdout) { should =~ /mirrorlist =\s+/ } - end - - # Test the yum config to ensure baseurl was defined - context shell '/usr/bin/yum-config-manager epel | egrep "^baseurl ="' do - its(:stdout) { should =~ /baseurl = http:\/\/dl.fedoraproject.org\/pub\/epel\/#{os_maj_version}\/x86_64\// } - end - end - end - - context 'test epel-testing is enabled' do - facts = node.facts - pp = <<-EOS - class { 'epel': - epel_testing_enabled => '1', - } - EOS - - context puppet_apply pp do - its(:stderr) { should be_empty } - its(:exit_code) { should_not == 1 } - its(:refresh) { should be_nil } - its(:stderr) { should be_empty } - its(:exit_code) { should be_zero } - end - - # Only test for EPEL's presence if not Fedora - if facts['operatingsystem'] !~ /Fedora/ - # Test the yum config to ensure epel-testing was enabled - context shell '/usr/bin/yum-config-manager epel-testing | grep -q "enabled = True"' do - its(:exit_code) { should be_zero } - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/unit/._facter b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/unit/._facter deleted file mode 100755 index bb87e14dde0f1c1e55858971d09fe60463759777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 311 zcma)$Ka0XZ5XCowh_-@t#C8)-K~A^xZzqCU*o9>?rwgkIn-TS!*xgsXXD(V?bw3#9 zy*E3{h2|(F{aW5KX{G$#ATaBG1^_!;#f!th964Roe5B syk$z|mvxj>R;JdI;mqG(iSndVNjEYVCiyg)*_Q(6ymf&&zPq=?4;Gq5dH?_b diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/unit/facter/._os_maj_version_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/unit/facter/._os_maj_version_spec.rb deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/unit/facter/os_maj_version_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/unit/facter/os_maj_version_spec.rb deleted file mode 100644 index 83bcdffd2c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/spec/unit/facter/os_maj_version_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'spec_helper' - -describe 'os_maj_version fact' do - before :each do - Facter.clear - end - - context "on 5.9 operatingsystemrelease" do - it "should have os_maj_version => 5" do - Facter.fact(:operatingsystemrelease).stubs(:value).returns("5.9") - Facter.fact(:os_maj_version).value.should == "5" - end - end - - context "on 6.4 operatingsystemrelease" do - it "should have os_maj_version => 6" do - Facter.fact(:operatingsystemrelease).stubs(:value).returns("6.4") - Facter.fact(:os_maj_version).value.should == "6" - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/tests/._init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/tests/._init.pp deleted file mode 100644 index 313e184ac1160728ad22e138717590ad40a8ffaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}@iQO>@);$7G!eitBqRu;46I`Ykllc$ zjS*MsJ@bm0RY89Ic)#{ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/tests/init.pp deleted file mode 100644 index c2e61d4298..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/epel/tests/init.pp +++ /dev/null @@ -1,3 +0,0 @@ -# And by test, I mean, run this thing for me using Puppet apply and I'll check -# it out. -include 'epel' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.fixtures.yml deleted file mode 100644 index 8968df1f45..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.fixtures.yml +++ /dev/null @@ -1,7 +0,0 @@ -fixtures: - repositories: - apt: git://github.com/puppetlabs/puppetlabs-apt.git - stdlib: git://github.com/puppetlabs/puppetlabs-stdlib.git - epel: git://github.com/stahnma/puppet-module-epel.git - symlinks: - erlang: "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.nodeset.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.nodeset.yml deleted file mode 100644 index cbd0d57b83..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.nodeset.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -default_set: 'centos-64-x64' -sets: - 'centos-59-x64': - nodes: - "main.foo.vm": - prefab: 'centos-59-x64' - 'centos-64-x64': - nodes: - "main.foo.vm": - prefab: 'centos-64-x64' - 'fedora-18-x64': - nodes: - "main.foo.vm": - prefab: 'fedora-18-x64' - 'debian-607-x64': - nodes: - "main.foo.vm": - prefab: 'debian-607-x64' - 'debian-70rc1-x64': - nodes: - "main.foo.vm": - prefab: 'debian-70rc1-x64' - 'ubuntu-server-10044-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-10044-x64' - 'ubuntu-server-12042-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-12042-x64' - 'sles-11sp1-x64': - nodes: - "main.foo.vm": - prefab: 'sles-11sp1-x64' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.rspec b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.rspec deleted file mode 100644 index 49d5710b3e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.rspec +++ /dev/null @@ -1 +0,0 @@ ---format documentation diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.travis.yml deleted file mode 100644 index cd412bfd34..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -language: ruby -bundler_args: --without development -before_install: rm Gemfile.lock || true -rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 -script: bundle exec rake test -env: - - PUPPET_VERSION="~> 2.7.0" - - PUPPET_VERSION="~> 3.1.0" - - PUPPET_VERSION="~> 3.2.0" - - PUPPET_VERSION="~> 3.3.0" - - PUPPET_VERSION="~> 3.4.0" -matrix: - exclude: - - rvm: 2.0.0 - env: PUPPET_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_VERSION="~> 3.1.0" - - rvm: 1.9.3 - env: PUPPET_VERSION="~> 2.7.0" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Gemfile deleted file mode 100644 index 39ba7f9f63..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "http://rubygems.org" - - -gem "rake" -gem "puppet", ENV['PUPPET_VERSION'] || '~> 3.2.0' -gem "puppet-lint" -gem "rspec-puppet", '~> 1.0.0' -gem "puppetlabs_spec_helper" -gem "rspec-system-puppet" -gem "vagrant-wrapper" -gem "puppet-syntax" - -group :development do - gem "puppet-blacksmith" -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Gemfile.lock b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Gemfile.lock deleted file mode 100644 index d719aa9791..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Gemfile.lock +++ /dev/null @@ -1,94 +0,0 @@ -GEM - remote: http://rubygems.org/ - specs: - builder (3.2.2) - diff-lcs (1.2.5) - excon (0.31.0) - facter (1.7.5) - fog (1.20.0) - builder - excon (~> 0.31.0) - formatador (~> 0.2.0) - mime-types - multi_json (~> 1.0) - net-scp (~> 1.1) - net-ssh (>= 2.1.3) - nokogiri (>= 1.5.11) - formatador (0.2.4) - hiera (1.3.2) - json_pure - json_pure (1.8.1) - kwalify (0.7.2) - metaclass (0.0.4) - mime-types (1.25.1) - mocha (1.0.0) - metaclass (~> 0.0.1) - multi_json (1.8.4) - net-scp (1.1.2) - net-ssh (>= 2.6.5) - net-ssh (2.8.0) - nokogiri (1.5.11) - puppet (3.2.4) - facter (~> 1.6) - hiera (~> 1.0) - rgen (~> 0.6.5) - puppet-blacksmith (2.0.2) - nokogiri - puppet (>= 2.7.16) - rest-client - puppet-lint (0.3.2) - puppet-syntax (1.1.0) - puppet (>= 2.7.0) - rake - puppetlabs_spec_helper (0.4.1) - mocha (>= 0.10.5) - rake - rspec (>= 2.9.0) - rspec-puppet (>= 0.1.1) - rake (10.1.1) - rbvmomi (1.8.1) - builder - nokogiri (>= 1.4.1) - trollop - rest-client (1.6.7) - mime-types (>= 1.16) - rgen (0.6.6) - rspec (2.14.1) - rspec-core (~> 2.14.0) - rspec-expectations (~> 2.14.0) - rspec-mocks (~> 2.14.0) - rspec-core (2.14.8) - rspec-expectations (2.14.5) - diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.14.6) - rspec-puppet (1.0.1) - rspec - rspec-system (2.8.0) - fog (~> 1.18) - kwalify (~> 0.7.2) - mime-types (~> 1.16) - net-scp (~> 1.1) - net-ssh (~> 2.7) - nokogiri (~> 1.5.10) - rbvmomi (~> 1.6) - rspec (~> 2.14) - systemu (~> 2.5) - rspec-system-puppet (2.2.1) - rspec-system (~> 2.0) - systemu (2.6.3) - trollop (2.0) - vagrant-wrapper (1.2.1.1) - -PLATFORMS - ruby - -DEPENDENCIES - puppet (~> 3.2.0) - puppet-blacksmith - puppet-lint - puppet-syntax - puppetlabs_spec_helper - rake - rspec-puppet (~> 1.0.0) - rspec-system-puppet - vagrant-wrapper diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/LICENSE deleted file mode 100644 index bf023233a1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/LICENSE +++ /dev/null @@ -1,207 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, and - distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by the - copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all other - entities that control, are controlled by, or are under common control with - that entity. For the purposes of this definition, "control" means (i) the - power, direct or indirect, to cause the direction or management of such - entity, whether by contract or otherwise, or (ii) ownership of - fifty percent (50%) or more of the outstanding shares, or (iii) beneficial - ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity exercising - permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation source, - and configuration files. - - "Object" form shall mean any form resulting from mechanical transformation - or translation of a Source form, including but not limited to compiled - object code, generated documentation, and conversions to - other media types. - - "Work" shall mean the work of authorship, whether in Source or Object - form, made available under the License, as indicated by a copyright notice - that is included in or attached to the work (an example is provided in the - Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object form, - that is based on (or derived from) the Work and for which the editorial - revisions, annotations, elaborations, or other modifications represent, - as a whole, an original work of authorship. For the purposes of this - License, Derivative Works shall not include works that remain separable - from, or merely link (or bind by name) to the interfaces of, the Work and - Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including the original - version of the Work and any modifications or additions to that Work or - Derivative Works thereof, that is intentionally submitted to Licensor for - inclusion in the Work by the copyright owner or by an individual or - Legal Entity authorized to submit on behalf of the copyright owner. - For the purposes of this definition, "submitted" means any form of - electronic, verbal, or written communication sent to the Licensor or its - representatives, including but not limited to communication on electronic - mailing lists, source code control systems, and issue tracking systems - that are managed by, or on behalf of, the Licensor for the purpose of - discussing and improving the Work, but excluding communication that is - conspicuously marked or otherwise designated in writing by the copyright - owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity on - behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. - - Subject to the terms and conditions of this License, each Contributor - hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, - royalty-free, irrevocable copyright license to reproduce, prepare - Derivative Works of, publicly display, publicly perform, sublicense, - and distribute the Work and such Derivative Works in - Source or Object form. - -3. Grant of Patent License. - - Subject to the terms and conditions of this License, each Contributor - hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, - royalty-free, irrevocable (except as stated in this section) patent - license to make, have made, use, offer to sell, sell, import, and - otherwise transfer the Work, where such license applies only to those - patent claims licensable by such Contributor that are necessarily - infringed by their Contribution(s) alone or by combination of their - Contribution(s) with the Work to which such Contribution(s) was submitted. - If You institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work or a - Contribution incorporated within the Work constitutes direct or - contributory patent infringement, then any patent licenses granted to - You under this License for that Work shall terminate as of the date such - litigation is filed. - -4. Redistribution. - - You may reproduce and distribute copies of the Work or Derivative Works - thereof in any medium, with or without modifications, and in Source or - Object form, provided that You meet the following conditions: - - 1. You must give any other recipients of the Work or Derivative Works a - copy of this License; and - - 2. You must cause any modified files to carry prominent notices stating - that You changed the files; and - - 3. You must retain, in the Source form of any Derivative Works that You - distribute, all copyright, patent, trademark, and attribution notices from - the Source form of the Work, excluding those notices that do not pertain - to any part of the Derivative Works; and - - 4. If the Work includes a "NOTICE" text file as part of its distribution, - then any Derivative Works that You distribute must include a readable copy - of the attribution notices contained within such NOTICE file, excluding - those notices that do not pertain to any part of the Derivative Works, - in at least one of the following places: within a NOTICE text file - distributed as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, within a - display generated by the Derivative Works, if and wherever such - third-party notices normally appear. The contents of the NOTICE file are - for informational purposes only and do not modify the License. - You may add Your own attribution notices within Derivative Works that You - distribute, alongside or as an addendum to the NOTICE text from the Work, - provided that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and may - provide additional or different license terms and conditions for use, - reproduction, or distribution of Your modifications, or for any such - Derivative Works as a whole, provided Your use, reproduction, and - distribution of the Work otherwise complies with the conditions - stated in this License. - -5. Submission of Contributions. - - Unless You explicitly state otherwise, any Contribution intentionally - submitted for inclusion in the Work by You to the Licensor shall be under - the terms and conditions of this License, without any additional - terms or conditions. Notwithstanding the above, nothing herein shall - supersede or modify the terms of any separate license agreement you may - have executed with Licensor regarding such Contributions. - -6. Trademarks. - - This License does not grant permission to use the trade names, trademarks, - service marks, or product names of the Licensor, except as required for - reasonable and customary use in describing the origin of the Work and - reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - - Unless required by applicable law or agreed to in writing, Licensor - provides the Work (and each Contributor provides its Contributions) - on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - either express or implied, including, without limitation, any warranties - or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS - FOR A PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any risks - associated with Your exercise of permissions under this License. - -8. Limitation of Liability. - - In no event and under no legal theory, whether in tort - (including negligence), contract, or otherwise, unless required by - applicable law (such as deliberate and grossly negligent acts) or agreed - to in writing, shall any Contributor be liable to You for damages, - including any direct, indirect, special, incidental, or consequential - damages of any character arising as a result of this License or out of - the use or inability to use the Work (including but not limited to damages - for loss of goodwill, work stoppage, computer failure or malfunction, - or any and all other commercial damages or losses), even if such - Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - - While redistributing the Work or Derivative Works thereof, You may choose - to offer, and charge a fee for, acceptance of support, warranty, - indemnity, or other liability obligations and/or rights consistent with - this License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf of any - other Contributor, and only if You agree to indemnify, defend, and hold - each Contributor harmless for any liability incurred by, or claims - asserted against, such Contributor by reason of your accepting any such - warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - - To apply the Apache License to your work, attach the following boilerplate - notice, with the fields enclosed by brackets "[]" replaced with your own - identifying information. (Don't include the brackets!) The text should be - enclosed in the appropriate comment syntax for the file format. We also - recommend that a file or class name and description of purpose be included - on the same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2013 Gareth Rushgrove - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - or implied. See the License for the specific language governing - permissions and limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Modulefile deleted file mode 100644 index 9ca1ef7042..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Modulefile +++ /dev/null @@ -1,10 +0,0 @@ -name 'garethr-erlang' -version '0.3.0' -source 'git://github.com/garethr/garethr-erlang.git' -author 'Gareth Rushgrove' -summary 'Module for installing erlang from official repos' -description 'Install one of the official erlang packages' -license 'Apache License, Version 2.0' -dependency 'puppetlabs/apt' -dependency 'puppetlabs/stdlib' -dependency 'stahnma/epel' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/README.md deleted file mode 100644 index a1959740bc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/README.md +++ /dev/null @@ -1,28 +0,0 @@ -Puppet module for installing Erlang from alternative repositories. - -On debian it will use the official repositories -mentioned on the [Erlang -docs](https://www.erlang-solutions.com/downloads/download-erlang-otp). - -On Redhat 5 it'll use an additional EPEL repository hosted by -[Redhat](http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo). - -On Redhat 6 it'll require EPEL. - -On SUSE it'll use the official repos. - -On Archlinux it'll use community repos. - -This module is also available on the [Puppet -Forge](https://forge.puppetlabs.com/garethr/erlang) - -[![Build -Status](https://secure.travis-ci.org/garethr/garethr-erlang.png)](http://travis-ci.org/garethr/garethr-erlang) - -## Usage - -The module includes a single class: - - include 'erlang' - -By default this sets up the repository and installs the erlang package. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Rakefile deleted file mode 100644 index d45aa3d574..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/Rakefile +++ /dev/null @@ -1,35 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' -require 'puppet-syntax/tasks/puppet-syntax' -require 'rspec-system/rake_task' - -begin - require 'puppet_blacksmith/rake_tasks' -rescue LoadError -end - -PuppetLint.configuration.log_format = "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}" -PuppetLint.configuration.fail_on_warnings = true - -# Forsake support for Puppet 2.6.2 for the benefit of cleaner code. -# http://puppet-lint.com/checks/class_parameter_defaults/ -PuppetLint.configuration.send('disable_class_parameter_defaults') -# http://puppet-lint.com/checks/class_inherits_from_params_class/ -PuppetLint.configuration.send('disable_class_inherits_from_params_class') -# http://puppet-lint.com/checks/80chars/ -PuppetLint.configuration.send("disable_80chars") - -exclude_paths = [ - "pkg/**/*", - "vendor/**/*", - "spec/**/*", -] -PuppetLint.configuration.ignore_paths = exclude_paths -PuppetSyntax.exclude_paths = exclude_paths - -desc "Run syntax, lint, and spec tests." -task :test => [ - :syntax, - :lint, - :spec, -] diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/init.pp deleted file mode 100644 index 045bada947..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/init.pp +++ /dev/null @@ -1,45 +0,0 @@ -# == Class: erlang -# -# Module to install an up-to-date version of Erlang from the -# official repositories -# -# === Parameters -# [*version*] -# The package version to install, passed to ensure. -# Defaults to present. -# -class erlang ( - $epel_enable = $erlang::params::epel_enable, - $key_signature = $erlang::params::key_signature, - $local_repo_location = $erlang::params::local_repo_location, - $package_name = $erlang::params::package_name, - $remote_repo_location = $erlang::params::remote_repo_location, - $remote_repo_key_location = $erlang::params::remote_repo_key_location, - $repos = $erlang::params::repos, - $version = 'present', -) inherits erlang::params { - validate_string($version) - - case $::osfamily { - 'Debian' : { - include '::apt' - include '::erlang::repo::apt' - } - 'RedHat' : { - if $epel_enable { - # Include epel as this is a requirement for erlang in RHEL6. - include '::epel' - Class['epel'] -> Package[$package_name] - } - - # This is only needed on RHEL5, RHEL6 has erlang in EPEL. - if $::operatingsystemrelease =~ /^5/ { - include '::erlang::repo::yum' - } - } - default : { - } - } - - package { $package_name: ensure => $version, } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/params.pp deleted file mode 100644 index 9358326cd9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/params.pp +++ /dev/null @@ -1,29 +0,0 @@ -# == Class: erlang::params -# -# Default paramaters setting repository details for different -# operating systems -# -class erlang::params { - $epel_enable = false - - case $::osfamily { - 'Debian' : { - $key_signature = 'D208507CA14F4FCA' - $package_name = 'erlang-nox' - $remote_repo_key_location = 'http://packages.erlang-solutions.com/debian/erlang_solutions.asc' - $remote_repo_location = 'http://packages.erlang-solutions.com/debian' - $repos = 'contrib' - } - 'RedHat', 'SUSE', 'Archlinux' : { - $package_name = 'erlang' - - if $::operatingsystemrelease =~ /^5/ { - $local_repo_location = '/etc/yum.repos.d/epel-erlang.repo' - $remote_repo_location = 'http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo' - } - } - default : { - fail("The ${module_name} module is not supported on an ${::osfamily} based system.") - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/repo/apt.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/repo/apt.pp deleted file mode 100644 index dc5dbc9c4f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/repo/apt.pp +++ /dev/null @@ -1,41 +0,0 @@ -# == Class: erlang::repo::apt -# -# Install an apt package repository containing Erlang. -# All parameters have sane default values in erlang::params. -# -# === Parameters -# [*key_signature*] -# The signature for the key used to sign packages in the repository. -# -# [*package_name*] -# Name of the Erlang package in the specified repository. -# -# [*remote_repo_key_location*] -# URL of the public key for the remote repository. -# -# [*remote_repo_location*] -# URL of the remote debian repository. -# -# [*repos*] -# Which of the standard repositories to install from the -# remote repo. For instance main, contrib, restricted. -# -class erlang::repo::apt( - $key_signature = $erlang::key_signature, - $package_name = $erlang::package_name, - $remote_repo_key_location = $erlang::remote_repo_key_location, - $remote_repo_location = $erlang::remote_repo_location, - $repos = $erlang::repos, -) { - - Class['erlang::repo::apt'] -> Package<| title == $package_name |> - - apt::source { 'erlang': - include_src => false, - key => $key_signature, - key_source => $remote_repo_key_location, - location => $remote_repo_location, - repos => $repos, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/repo/yum.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/repo/yum.pp deleted file mode 100644 index 702e65220b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/manifests/repo/yum.pp +++ /dev/null @@ -1,30 +0,0 @@ -# == Class: erlang::repo::yum -# -# Install a yum package repository containing Erlang. -# All parameters have sane default values in erlang::params. -# -# === Parameters -# [*local_repo_location*] -# File system location to store the repository details -# -# [*package_name*] -# Name of the Erlang package in the specified repository -# -# [*remote_repo_location*] -# URL of the remote repository -# -class erlang::repo::yum ( - $local_repo_location = $erlang::local_repo_location, - $package_name = $erlang::package_name, - $remote_repo_location = $erlang::remote_repo_location, -) inherits erlang { - - Class['erlang::repo::yum'] -> Package<| title == $package_name |> - - exec { 'erlang-repo-download': - command => "curl -o ${local_repo_location} ${remote_repo_location}", - path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin', - creates => $local_repo_location, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/classes/erlang_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/classes/erlang_spec.rb deleted file mode 100644 index 8708eb1afe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/classes/erlang_spec.rb +++ /dev/null @@ -1,138 +0,0 @@ -require 'spec_helper' - -describe 'erlang', :type => :class do - - - context 'on Debian' do - let(:facts) { { - :osfamily => 'Debian', - :lsbdistid => 'debian', - :lsbdistcodename => 'squeeze' - }} - - context 'with no parameters' do - it { should compile.with_all_deps } - it { should contain_package('erlang-nox').with_ensure('present') } - it { should contain_apt__source('erlang').with( - 'key_source' => 'http://packages.erlang-solutions.com/debian/erlang_solutions.asc', - 'key' => 'D208507CA14F4FCA' - ) } - end - - context 'with a custom version' do - let(:params) { {'version' => 'absent' } } - it { should contain_package('erlang-nox').with_ensure('absent') } - end - - context 'with a custom package name' do - let(:params) { {'package_name' => 'not-erlang' } } - it { should contain_package('not-erlang').with_ensure('present') } - end - - context 'with custom repository details' do - let(:params) { { - 'key_signature' => '1234ABCD', - 'repos' => 'main', - 'remote_repo_location' => 'http://example.com/debian', - 'remote_repo_key_location' => 'http://example.com/debian/key.asc', - } } - it { should contain_apt__source('erlang').with( - 'location' => 'http://example.com/debian', - 'key_source' => 'http://example.com/debian/key.asc', - 'key' => '1234ABCD', - 'repos' => 'main' - ) } - end - - end - - context 'on RedHat 5' do - let(:facts) { {:osfamily => 'RedHat', :operatingsystemrelease => '5.9' } } - - context "epel enabled" do - let(:params) {{ :epel_enable => true }} - it { should contain_class('epel') } - end - - context "epel disabled" do - let(:params) {{ :epel_enable => false }} - it { should_not contain_class('epel') } - end - - context 'with no parameters' do - it { should contain_package('erlang').with_ensure('present') } - it { should contain_exec('erlang-repo-download').with( - 'command' => 'curl -o /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo', - 'path' => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin' - ) - } - end - - context 'with a custom repository' do - let(:params) { { - 'local_repo_location' => '/tmp/yum.repos.d/tmp.repo', - 'remote_repo_location' => 'http://example.com/fake.repo', - } } - - it { should contain_exec('erlang-repo-download').with( - 'command' => 'curl -o /tmp/yum.repos.d/tmp.repo http://example.com/fake.repo' - ) - } - end - - context 'with a custom version' do - let(:params) { {'version' => 'absent' } } - it { should contain_package('erlang').with_ensure('absent') } - end - end - - context 'on RedHat 6' do - let(:facts) { {:osfamily => 'RedHat', :operatingsystemrelease => '6.4' } } - - context "epel enabled" do - let(:params) {{ :epel_enable => true }} - it { should contain_class('epel') } - end - - context "epel disabled" do - let(:params) {{ :epel_enable => false }} - it { should_not contain_class('epel') } - end - - context 'with no parameters' do - it { should contain_package('erlang').with_ensure('present') } - end - - context 'with a custom version' do - let(:params) { {'version' => 'absent' } } - it { should contain_package('erlang').with_ensure('absent') } - end - end - - context 'on SUSE' do - let(:facts) {{ :osfamily => 'SUSE', }} - - context 'with no parameters' do - it { should contain_package('erlang').with_ensure('present') } - end - - context 'with a custom version' do - let(:params) { {'version' => 'absent' } } - it { should contain_package('erlang').with_ensure('absent') } - end - end - - context 'on Archlinux' do - let(:facts) {{ :osfamily => 'Archlinux', }} - - context 'with no parameters' do - it { should contain_package('erlang').with_ensure('present') } - end - - context 'with a custom version' do - let(:params) { {'version' => 'absent' } } - it { should contain_package('erlang').with_ensure('absent') } - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/spec_helper.rb deleted file mode 100644 index 2c6f56649a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/spec_helper_system.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/spec_helper_system.rb deleted file mode 100644 index 5c37024856..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/spec_helper_system.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'rspec-system/spec_helper' -require 'rspec-system-puppet/helpers' - -include RSpecSystemPuppet::Helpers - -RSpec.configure do |c| - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - c.tty = true - c.include RSpecSystemPuppet::Helpers - - c.before :suite do - puppet_install - puppet_module_install(:source => proj_root, :module_name => 'erlang') - shell('puppet module install puppetlabs-apt') - shell('puppet module install stahnma-epel') - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/system/erlang_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/system/erlang_spec.rb deleted file mode 100644 index 4d5772fa59..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/erlang/spec/system/erlang_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'spec_helper_system' - -describe 'The erlang puppet module' do - it 'should run without errors' do - pp = <<-EOS - class { 'erlang': - epel_enable => true - } - EOS - - puppet_apply(pp) do |r| - r.exit_code.should == 2 - r.refresh - r.exit_code.should be_zero - end - end - - it 'should install the erl binary into /usr/bin' do - shell 'which erl' do |r| - r.stdout.should =~ /\/usr\/bin\/erl/ - r.stderr.should be_empty - r.exit_code.should be_zero - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/.fixtures.yml deleted file mode 100644 index 0d10d5cec1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/.fixtures.yml +++ /dev/null @@ -1,3 +0,0 @@ -fixtures: - symlinks: - "firewall": "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/.nodeset.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/.nodeset.yml deleted file mode 100644 index 767f9cd2f6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/.nodeset.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -default_set: 'centos-64-x64' -sets: - 'centos-59-x64': - nodes: - "main.foo.vm": - prefab: 'centos-59-x64' - 'centos-64-x64': - nodes: - "main.foo.vm": - prefab: 'centos-64-x64' - 'fedora-18-x64': - nodes: - "main.foo.vm": - prefab: 'fedora-18-x64' - 'debian-607-x64': - nodes: - "main.foo.vm": - prefab: 'debian-607-x64' - 'debian-70rc1-x64': - nodes: - "main.foo.vm": - prefab: 'debian-70rc1-x64' - 'ubuntu-server-10044-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-10044-x64' - 'ubuntu-server-12042-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-12042-x64' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/.travis.yml deleted file mode 100644 index 0e94c2876c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: ruby -bundler_args: --without development -script: "bundle exec rake ci SPEC_OPTS='--format documentation'" -rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 -env: - - PUPPET_GEM_VERSION="~> 2.7.0" - - PUPPET_GEM_VERSION="~> 3.0.0" - - PUPPET_GEM_VERSION="~> 3.1.0" - - PUPPET_GEM_VERSION="~> 3.2.0" - - PUPPET_GEM_VERSION="~> 3.4.0" -matrix: - fast_finish: true - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 3.0.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 3.1.0" - - rvm: 1.8.7 - env: PUPPET_GEM_VERSION="~> 3.2.0" -notifications: - email: false diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/CHANGELOG.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/CHANGELOG.md deleted file mode 100644 index daf390e98d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/CHANGELOG.md +++ /dev/null @@ -1,432 +0,0 @@ -## 2014-05-16 Release 1.1.1 -###Summary - -This release reverts the alphabetical ordering of 1.1.0. We found this caused -a regression in the Openstack modules so in the interest of safety we have -removed this for now. - -## 2014-05-13 Release 1.1.0 -###Summary - -This release has a significant change from previous releases; we now apply the -firewall resources alphabetically by default, removing the need to create pre -and post classes just to enforce ordering. It only effects default ordering -and further information can be found in the README about this. Please test -this in development before rolling into production out of an abundance of -caution. - -We've also added `mask` which is required for --recent in recent (no pun -intended) versions of iptables, as well as connlimit and connmark. This -release has been validated against Ubuntu 14.04 and RHEL7 and should be fully -working on those platforms. - -####Features - -- Apply firewall resources alphabetically. -- Add support for connlimit and connmark. -- Add `mask` as a parameter. (Used exclusively with the recent parameter). - -####Bugfixes - -- Add systemd support for RHEL7. -- Replace &&'s with the correct and in manifests. -- Fix tests on Trusty and RHEL7 -- Fix for Fedora Rawhide. -- Fix boolean flag tests. -- Fix DNAT->SNAT typo in an error message. - -####Known Bugs - -* For Oracle, the `owner` and `socket` parameters require a workaround to function. Please see the Limitations section of the README. - - -## 2014-03-04 Supported Release 1.0.2 -###Summary - -This is a supported release. This release removes a testing symlink that can -cause trouble on systems where /var is on a seperate filesystem from the -modulepath. - -####Features -####Bugfixes -####Known Bugs - -* For Oracle, the `owner` and `socket` parameters require a workaround to function. Please see the Limitations section of the README. - -### Supported release - 2014-03-04 1.0.1 - -####Summary - -An important bugfix was made to the offset calculation for unmanaged rules -to handle rules with 9000+ in the name. - -####Features - -####Bugfixes -- Offset calculations assumed unmanaged rules were numbered 9000+. -- Gracefully fail to manage ip6tables on iptables 1.3.x - -####Known Bugs - -* For Oracle, the `owner` and `socket` parameters require a workaround to function. Please see the Limitations section of the README. - ---- -### 1.0.0 - 2014-02-11 - -No changes, just renumbering to 1.0.0. - ---- -### 0.5.0 - 2014-02-10 - -##### Summary: -This is a bigger release that brings in "recent" connection limiting (think -"port knocking"), firewall chain purging on a per-chain/per-table basis, and -support for a few other use cases. This release also fixes a major bug which -could cause modifications to the wrong rules when unmanaged rules are present. - -##### New Features: -* Add "recent" limiting via parameters `rdest`, `reap`, `recent`, `rhitcount`, - `rname`, `rseconds`, `rsource`, and `rttl` -* Add negation support for source and destination -* Add per-chain/table purging support to `firewallchain` -* IPv4 specific - * Add random port forwarding support - * Add ipsec policy matching via `ipsec_dir` and `ipsec_policy` -* IPv6 specific - * Add support for hop limiting via `hop_limit` parameter - * Add fragmentation matchers via `ishasmorefrags`, `islastfrag`, and `isfirstfrag` - * Add support for conntrack stateful firewall matching via `ctstate` - -##### Bugfixes: -- Boolean fixups allowing false values -- Better detection of unmanaged rules -- Fix multiport rule detection -- Fix sport/dport rule detection -- Make INPUT, OUTPUT, and FORWARD not autorequired for firewall chain filter -- Allow INPUT with the nat table -- Fix `src_range` & `dst_range` order detection -- Documentation clarifications -- Fixes to spec tests - ---------------------------------------- - -### 0.4.2 - 2013-09-10 - -Another attempt to fix the packaging issue. We think we understand exactly -what is failing and this should work properly for the first time. - ---------------------------------------- - -### 0.4.1 - 2013-08-09 - -Bugfix release to fix a packaging issue that may have caused puppet module -install commands to fail. - ---------------------------------------- - -### 0.4.0 - 2013-07-11 - -This release adds support for address type, src/dest ip ranges, and adds -additional testing and bugfixes. - -#### Features -* Add `src_type` and `dst_type` attributes (Nick Stenning) -* Add `src_range` and `dst_range` attributes (Lei Zhang) -* Add SL and SLC operatingsystems as supported (Steve Traylen) - -#### Bugfixes -* Fix parser for bursts other than 5 (Chris Rutter) -* Fix parser for -f in --comment (Georg Koester) -* Add doc headers to class files (Dan Carley) -* Fix lint warnings/errors (Wolf Noble) - ---------------------------------------- - -### 0.3.1 - 2013/6/10 - -This minor release provides some bugfixes and additional tests. - -#### Changes - -* Update tests for rspec-system-puppet 2 (Ken Barber) -* Update rspec-system tests for rspec-system-puppet 1.5 (Ken Barber) -* Ensure all services have 'hasstatus => true' for Puppet 2.6 (Ken Barber) -* Accept pre-existing rule with invalid name (Joe Julian) -* Swap log_prefix and log_level order to match the way it's saved (Ken Barber) -* Fix log test to replicate bug #182 (Ken Barber) -* Split argments while maintaining quoted strings (Joe Julian) -* Add more log param tests (Ken Barber) -* Add extra tests for logging parameters (Ken Barber) -* Clarify OS support (Ken Barber) - ---------------------------------------- - -### 0.3.0 - 2013/4/25 - -This release introduces support for Arch Linux and extends support for Fedora 15 and up. There are also lots of bugs fixed and improved testing to prevent regressions. - -##### Changes - -* Fix error reporting for insane hostnames (Tomas Doran) -* Support systemd on Fedora 15 and up (Eduardo Gutierrez) -* Move examples to docs (Ken Barber) -* Add support for Arch Linux platform (Ingmar Steen) -* Add match rule for fragments (Georg Koester) -* Fix boolean rules being recognized as changed (Georg Koester) -* Same rules now get deleted (Anastasis Andronidis) -* Socket params test (Ken Barber) -* Ensure parameter can disable firewall (Marc Tardif) - ---------------------------------------- - -### 0.2.1 - 2012/3/13 - -This maintenance release introduces the new README layout, and fixes a bug with iptables_persistent_version. - -##### Changes - -* (GH-139) Throw away STDERR from dpkg-query in Fact -* Update README to be consistent with module documentation template -* Fix failing spec tests due to dpkg change in iptables_persistent_version - ---------------------------------------- - -### 0.2.0 - 2012/3/3 - -This release introduces automatic persistence, removing the need for the previous manual dependency requirement for persistent the running rules to the OS persistence file. - -Previously you would have required the following in your site.pp (or some other global location): - - # Always persist firewall rules - exec { 'persist-firewall': - command => $operatingsystem ? { - 'debian' => '/sbin/iptables-save > /etc/iptables/rules.v4', - /(RedHat|CentOS)/ => '/sbin/iptables-save > /etc/sysconfig/iptables', - }, - refreshonly => true, - } - Firewall { - notify => Exec['persist-firewall'], - before => Class['my_fw::post'], - require => Class['my_fw::pre'], - } - Firewallchain { - notify => Exec['persist-firewall'], - } - resources { "firewall": - purge => true - } - -You only need: - - class { 'firewall': } - Firewall { - before => Class['my_fw::post'], - require => Class['my_fw::pre'], - } - -To install pre-requisites and to create dependencies on your pre & post rules. Consult the README for more information. - -##### Changes - -* Firewall class manifests (Dan Carley) -* Firewall and firewallchain persistence (Dan Carley) -* (GH-134) Autorequire iptables related packages (Dan Carley) -* Typo in #persist_iptables OS normalisation (Dan Carley) -* Tests for #persist_iptables (Dan Carley) -* (GH-129) Replace errant return in autoreq block (Dan Carley) - ---------------------------------------- - -### 0.1.1 - 2012/2/28 - -This release primarily fixes changing parameters in 3.x - -##### Changes - -* (GH-128) Change method_missing usage to define_method for 3.x compatibility -* Update travis.yml gem specifications to actually test 2.6 -* Change source in Gemfile to use a specific URL for Ruby 2.0.0 compatibility - ---------------------------------------- - -### 0.1.0 - 2012/2/24 - -This release is somewhat belated, so no summary as there are far too many changes this time around. Hopefully we won't fall this far behind again :-). - -##### Changes - -* Add support for MARK target and set-mark property (Johan Huysmans) -* Fix broken call to super for ruby-1.9.2 in munge (Ken Barber) -* simple fix of the error message for allowed values of the jump property (Daniel Black) -* Adding OSPF(v3) protocol to puppetlabs-firewall (Arnoud Vermeer) -* Display multi-value: port, sport, dport and state command seperated (Daniel Black) -* Require jump=>LOG for log params (Daniel Black) -* Reject and document icmp => "any" (Dan Carley) -* add firewallchain type and iptables_chain provider (Daniel Black) -* Various fixes for firewallchain resource (Ken Barber) -* Modify firewallchain name to be chain:table:protocol (Ken Barber) -* Fix allvalidchain iteration (Ken Barber) -* Firewall autorequire Firewallchains (Dan Carley) -* Tests and docstring for chain autorequire (Dan Carley) -* Fix README so setup instructions actually work (Ken Barber) -* Support vlan interfaces (interface containing ".") (Johan Huysmans) -* Add tests for VLAN support for iniface/outiface (Ken Barber) -* Add the table when deleting rules (Johan Huysmans) -* Fix tests since we are now prefixing -t) -* Changed 'jump' to 'action', commands to lower case (Jason Short) -* Support interface names containing "+" (Simon Deziel) -* Fix for when iptables-save spews out "FATAL" errors (Sharif Nassar) -* Fix for incorrect limit command arguments for ip6tables provider (Michael Hsu) -* Document Util::Firewall.host_to_ip (Dan Carley) -* Nullify addresses with zero prefixlen (Dan Carley) -* Add support for --tcp-flags (Thomas Vander Stichele) -* Make tcp_flags support a feature (Ken Barber) -* OUTPUT is a valid chain for the mangle table (Adam Gibbins) -* Enable travis-ci support (Ken Barber) -* Convert an existing test to CIDR (Dan Carley) -* Normalise iptables-save to CIDR (Dan Carley) -* be clearer about what distributions we support (Ken Barber) -* add gre protocol to list of acceptable protocols (Jason Hancock) -* Added pkttype property (Ashley Penney) -* Fix mark to not repeat rules with iptables 1.4.1+ (Sharif Nassar) -* Stub iptables_version for now so tests run on non-Linux hosts (Ken Barber) -* Stub iptables facts for set_mark tests (Dan Carley) -* Update formatting of README to meet Puppet Labs best practices (Will Hopper) -* Support for ICMP6 type code resolutions (Dan Carley) -* Insert order hash included chains from different tables (Ken Barber) -* rspec 2.11 compatibility (Jonathan Boyett) -* Add missing class declaration in README (sfozz) -* array_matching is contraindicated (Sharif Nassar) -* Convert port Fixnum into strings (Sharif Nassar) -* Update test framework to the modern age (Ken Barber) -* working with ip6tables support (wuwx) -* Remove gemfile.lock and add to gitignore (William Van Hevelingen) -* Update travis and gemfile to be like stdlib travis files (William Van Hevelingen) -* Add support for -m socket option (Ken Barber) -* Add support for single --sport and --dport parsing (Ken Barber) -* Fix tests for Ruby 1.9.3 from 3e13bf3 (Dan Carley) -* Mock Resolv.getaddress in #host_to_ip (Dan Carley) -* Update docs for source and dest - they are not arrays (Ken Barber) - ---------------------------------------- - -### 0.0.4 - 2011/12/05 - -This release adds two new parameters, 'uid' and 'gid'. As a part of the owner module, these params allow you to specify a uid, username, gid, or group got a match: - - firewall { '497 match uid': - port => '123', - proto => 'mangle', - chain => 'OUTPUT', - action => 'drop' - uid => '123' - } - -This release also adds value munging for the 'log_level', 'source', and 'destination' parameters. The 'source' and 'destination' now support hostnames: - - firewall { '498 accept from puppetlabs.com': - port => '123', - proto => 'tcp', - source => 'puppetlabs.com', - action => 'accept' - } - - -The 'log_level' parameter now supports using log level names, such as 'warn', 'debug', and 'panic': - - firewall { '499 logging': - port => '123', - proto => 'udp', - log_level => 'debug', - action => 'drop' - } - -Additional changes include iptables and ip6tables version facts, general whitespace cleanup, and adding additional unit tests. - -##### Changes - -* (#10957) add iptables_version and ip6tables_version facts -* (#11093) Improve log_level property so it converts names to numbers -* (#10723) Munge hostnames and IPs to IPs with CIDR -* (#10718) Add owner-match support -* (#10997) Add fixtures for ipencap -* (#11034) Whitespace cleanup -* (#10690) add port property support to ip6tables - ---------------------------------------- - -### 0.0.3 - 2011/11/12 - -This release introduces a new parameter 'port' which allows you to set both -source and destination ports for a match: - - firewall { "500 allow NTP requests": - port => "123", - proto => "udp", - action => "accept", - } - -We also have the limit parameter finally working: - - firewall { "500 limit HTTP requests": - dport => 80, - proto => tcp, - limit => "60/sec", - burst => 30, - action => accept, - } - -State ordering has been fixed now, and more characters are allowed in the -namevar: - -* Alphabetical -* Numbers -* Punctuation -* Whitespace - -##### Changes - -* (#10693) Ensure -m limit is added for iptables when using 'limit' param -* (#10690) Create new port property -* (#10700) allow additional characters in comment string -* (#9082) Sort iptables --state option values internally to keep it consistent across runs -* (#10324) Remove extraneous whitespace from iptables rule line in spec tests - ---------------------------------------- - -### 0.0.2 - 2011/10/26 - -This is largely a maintanence and cleanup release, but includes the ability to -specify ranges of ports in the sport/dport parameter: - - firewall { "500 allow port range": - dport => ["3000-3030","5000-5050"], - sport => ["1024-65535"], - action => "accept", - } - -##### Changes - -* (#10295) Work around bug #4248 whereby the puppet/util paths are not being loaded correctly on the puppetmaster -* (#10002) Change to dport and sport to handle ranges, and fix handling of name to name to port -* (#10263) Fix tests on Puppet 2.6.x -* (#10163) Cleanup some of the inline documentation and README file to align with general forge usage - ---------------------------------------- - -### 0.0.1 - 2011/10/18 - -Initial release. - -##### Changes - -* (#9362) Create action property and perform transformation for accept, drop, reject value for iptables jump parameter -* (#10088) Provide a customised version of CONTRIBUTING.md -* (#10026) Re-arrange provider and type spec files to align with Puppet -* (#10026) Add aliases for test,specs,tests to Rakefile and provide -T as default -* (#9439) fix parsing and deleting existing rules -* (#9583) Fix provider detection for gentoo and unsupported linuxes for the iptables provider -* (#9576) Stub provider so it works properly outside of Linux -* (#9576) Align spec framework with Puppet core -* and lots of other earlier development tasks ... diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/CONTRIBUTING.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/CONTRIBUTING.md deleted file mode 100644 index 630ba8581e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/CONTRIBUTING.md +++ /dev/null @@ -1,87 +0,0 @@ -# How to contribute - -Third-party patches are essential for keeping puppet great. We simply can't -access the huge number of platforms and myriad configurations for running -puppet. We want to keep it as easy as possible to contribute changes that -get things working in your environment. There are a few guidelines that we -need contributors to follow so that we can have a chance of keeping on -top of things. - -## Getting Started - -* Make sure you have a [Jira account](http://tickets.puppetlabs.com) -* Make sure you have a [GitHub account](https://github.com/signup/free) -* Submit a ticket for your issue, assuming one does not already exist. - * Clearly describe the issue including steps to reproduce when it is a bug. - * Make sure you fill in the earliest version that you know has the issue. -* Fork the repository on GitHub - -## Making Changes - -* Create a topic branch from where you want to base your work. - * This is usually the master branch. - * Only target release branches if you are certain your fix must be on that - branch. - * To quickly create a topic branch based on master; `git branch - fix/master/my_contribution master` then checkout the new branch with `git - checkout fix/master/my_contribution`. Please avoid working directly on the - `master` branch. -* Make commits of logical units. -* Check for unnecessary whitespace with `git diff --check` before committing. -* Make sure your commit messages are in the proper format. - -```` - (MODULES-1234) Make the example in CONTRIBUTING imperative and concrete - - Without this patch applied the example commit message in the CONTRIBUTING - document is not a concrete example. This is a problem because the - contributor is left to imagine what the commit message should look like - based on a description rather than an example. This patch fixes the - problem by making the example concrete and imperative. - - The first line is a real life imperative statement with a ticket number - from our issue tracker. The body describes the behavior without the patch, - why this is a problem, and how the patch fixes the problem when applied. -```` - -* Make sure you have added the necessary tests for your changes. -* Run _all_ the tests to assure nothing else was accidentally broken. - -## Making Trivial Changes - -### Documentation - -For changes of a trivial nature to comments and documentation, it is not -always necessary to create a new ticket in Jira. In this case, it is -appropriate to start the first line of a commit with '(doc)' instead of -a ticket number. - -```` - (doc) Add documentation commit example to CONTRIBUTING - - There is no example for contributing a documentation commit - to the Puppet repository. This is a problem because the contributor - is left to assume how a commit of this nature may appear. - - The first line is a real life imperative statement with '(doc)' in - place of what would have been the ticket number in a - non-documentation related commit. The body describes the nature of - the new documentation or comments added. -```` - -## Submitting Changes - -* Sign the [Contributor License Agreement](http://links.puppetlabs.com/cla). -* Push your changes to a topic branch in your fork of the repository. -* Submit a pull request to the repository in the puppetlabs organization. -* Update your Jira ticket to mark that you have submitted code and are ready for it to be reviewed (Status: Ready for Merge). - * Include a link to the pull request in the ticket. - -# Additional Resources - -* [More information on contributing](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) -* [Bug tracker (Jira)](http://tickets.puppetlabs.com) -* [Contributor License Agreement](http://links.puppetlabs.com/cla) -* [General GitHub documentation](http://help.github.com/) -* [GitHub pull request documentation](http://help.github.com/send-pull-requests/) -* #puppet-dev IRC channel on freenode.org diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/Gemfile deleted file mode 100644 index 9e6eaa5416..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/Gemfile +++ /dev/null @@ -1,18 +0,0 @@ -source ENV['GEM_SOURCE'] || "https://rubygems.org" - -group :development, :test do - gem 'puppetlabs_spec_helper', :require => false - gem 'rspec-puppet', :require => false - gem 'serverspec', :require => false - gem 'beaker-rspec', :require => false - gem 'puppet-lint', :require => false - gem 'pry', :require => false -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end - -# vim:ft=ruby diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/LICENSE deleted file mode 100644 index 1d196fc30c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Puppet Firewall Module - Puppet module for managing Firewalls - -Copyright (C) 2011-2013 Puppet Labs, Inc. -Copyright (C) 2011 Jonathan Boyett -Copyright (C) 2011 Media Temple, Inc. - -Some of the iptables code was taken from puppet-iptables which was: - -Copyright (C) 2011 Bob.sh Limited -Copyright (C) 2008 Camptocamp Association -Copyright (C) 2007 Dmitri Priimak - -Puppet Labs can be contacted at: info@puppetlabs.com - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/Modulefile deleted file mode 100644 index 975614762f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/Modulefile +++ /dev/null @@ -1,8 +0,0 @@ -name 'puppetlabs-firewall' -version '1.1.1' -source 'git://github.com/puppetlabs/puppetlabs-firewall.git' -author 'puppetlabs' -license 'ASL 2.0' -summary 'Firewall Module' -description 'Manages Firewalls such as iptables' -project_page 'http://forge.puppetlabs.com/puppetlabs/firewall' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/README.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/README.markdown deleted file mode 100644 index 24705149e7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/README.markdown +++ /dev/null @@ -1,429 +0,0 @@ -#firewall - -[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-firewall.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-firewall) - -####Table of Contents - -1. [Overview - What is the Firewall module?](#overview) -2. [Module Description - What does the module do?](#module-description) -3. [Setup - The basics of getting started with Firewall](#setup) - * [What Firewall affects](#what-firewall-affects) - * [Setup Requirements](#setup-requirements) - * [Beginning with Firewall](#beginning-with-firewall) - * [Upgrading](#upgrading) -4. [Usage - Configuration and customization options](#usage) - * [Default rules - Setting up general configurations for all firewalls](#default-rules) - * [Application-specific rules - Options for configuring and managing firewalls across applications](#application-specific-rules) - * [Other Rules](#other-rules) -5. [Reference - An under-the-hood peek at what the module is doing](#reference) -6. [Limitations - OS compatibility, etc.](#limitations) -7. [Development - Guide for contributing to the module](#development) - * [Tests - Testing your configuration](#tests) - -##Overview - -The Firewall module lets you manage firewall rules with Puppet. - -##Module Description - -PuppetLabs' Firewall introduces the resource `firewall`, which is used to manage and configure firewall rules from within the Puppet DSL. This module offers support for iptables, ip6tables, and ebtables. - -The module also introduces the resource `firewallchain`, which allows you to manage chains or firewall lists. At the moment, only iptables and ip6tables chains are supported. - -##Setup - -###What Firewall affects: - -* every node running a firewall -* system's firewall settings -* connection settings for managed nodes -* unmanaged resources (get purged) -* site.pp - -###Setup Requirements - -Firewall uses Ruby-based providers, so you must have [pluginsync enabled](http://docs.puppetlabs.com/guides/plugins_in_modules.html#enabling-pluginsync). - -###Beginning with Firewall - -To begin, you need to provide some initial top-scope configuration to ensure your firewall configurations are ordered properly and you do not lock yourself out of your box or lose any configuration. - -Persistence of rules between reboots is handled automatically, although there are known issues with ip6tables on older Debian/Ubuntu, as well as known issues with ebtables. - -In your `site.pp` (or some similarly top-scope file), set up a metatype to purge unmanaged firewall resources. This will clear any existing rules and make sure that only rules defined in Puppet exist on the machine. - - resources { "firewall": - purge => true - } - -Next, set up the default parameters for all of the firewall rules you will be establishing later. These defaults will ensure that the pre and post classes (you will be setting up in just a moment) are run in the correct order to avoid locking you out of your box during the first puppet run. - - Firewall { - before => Class['my_fw::post'], - require => Class['my_fw::pre'], - } - -You also need to declare the `my_fw::pre` & `my_fw::post` classes so that dependencies are satisfied. This can be achieved using an External Node Classifier or the following - - class { ['my_fw::pre', 'my_fw::post']: } - -Finally, you should include the `firewall` class to ensure the correct packages are installed. - - class { 'firewall': } - -Now to create the `my_fw::pre` and `my_fw::post` classes. Firewall acts on your running firewall, making immediate changes as the catalog executes. Defining default pre and post rules allows you provide global defaults for your hosts before and after any custom rules; it is also required to avoid locking yourself out of your own boxes when Puppet runs. This approach employs a whitelist setup, so you can define what rules you want and everything else is ignored rather than removed. - -The `pre` class should be located in `my_fw/manifests/pre.pp` and should contain any default rules to be applied first. - - class my_fw::pre { - Firewall { - require => undef, - } - - # Default firewall rules - firewall { '000 accept all icmp': - proto => 'icmp', - action => 'accept', - }-> - firewall { '001 accept all to lo interface': - proto => 'all', - iniface => 'lo', - action => 'accept', - }-> - firewall { '002 accept related established rules': - proto => 'all', - state => ['RELATED', 'ESTABLISHED'], - action => 'accept', - } - } - -The rules in `pre` should allow basic networking (such as ICMP and TCP), as well as ensure that existing connections are not closed. - -The `post` class should be located in `my_fw/manifests/post.pp` and include any default rules to be applied last. - - class my_fw::post { - firewall { '999 drop all': - proto => 'all', - action => 'drop', - before => undef, - } - } - -To put it all together: the `require` parameter in `Firewall {}` ensures `my_fw::pre` is run before any other rules and the `before` parameter ensures `my_fw::post` is run after any other rules. So the run order is: - -* run the rules in `my_fw::pre` -* run your rules (defined in code) -* run the rules in `my_fw::post` - -###Upgrading - -####Upgrading from version 0.2.0 and newer - -Upgrade the module with the puppet module tool as normal: - - puppet module upgrade puppetlabs/firewall - -####Upgrading from version 0.1.1 and older - -Start by upgrading the module using the puppet module tool: - - puppet module upgrade puppetlabs/firewall - -Previously, you would have required the following in your `site.pp` (or some other global location): - - # Always persist firewall rules - exec { 'persist-firewall': - command => $operatingsystem ? { - 'debian' => '/sbin/iptables-save > /etc/iptables/rules.v4', - /(RedHat|CentOS)/ => '/sbin/iptables-save > /etc/sysconfig/iptables', - }, - refreshonly => true, - } - Firewall { - notify => Exec['persist-firewall'], - before => Class['my_fw::post'], - require => Class['my_fw::pre'], - } - Firewallchain { - notify => Exec['persist-firewall'], - } - resources { "firewall": - purge => true - } - -With the latest version, we now have in-built persistence, so this is no longer needed. However, you will still need some basic setup to define pre & post rules. - - resources { "firewall": - purge => true - } - Firewall { - before => Class['my_fw::post'], - require => Class['my_fw::pre'], - } - class { ['my_fw::pre', 'my_fw::post']: } - class { 'firewall': } - -Consult the the documentation below for more details around the classes `my_fw::pre` and `my_fw::post`. - -##Usage - -There are two kinds of firewall rules you can use with Firewall: default rules and application-specific rules. Default rules apply to general firewall settings, whereas application-specific rules manage firewall settings of a specific application, node, etc. - -All rules employ a numbering system in the resource's title that is used for ordering. When titling your rules, make sure you prefix the rule with a number. - - 000 this runs first - 999 this runs last - -###Default rules - -You can place default rules in either `my_fw::pre` or `my_fw::post`, depending on when you would like them to run. Rules placed in the `pre` class will run first, rules in the `post` class, last. - -Depending on the provider, the title of the rule can be stored using the comment feature of the underlying firewall subsystem. Values can match `/^\d+[[:alpha:][:digit:][:punct:][:space:]]+$/`. - -####Examples of default rules - -Basic accept ICMP request example: - - firewall { "000 accept all icmp requests": - proto => "icmp", - action => "accept", - } - -Drop all: - - firewall { "999 drop all other requests": - action => "drop", - } - -###Application-specific rules - -Puppet doesn't care where you define rules, and this means that you can place -your firewall resources as close to the applications and services that you -manage as you wish. If you use the [roles and profiles -pattern](https://puppetlabs.com/learn/roles-profiles-introduction) then it -would make sense to create your firewall rules in the profiles, so that they -remain close to the services managed by the profile. - -An example of this might be: - -```puppet -class profile::apache { - include apache - apache::vhost { 'mysite': ensure => present } - - firewall { '100 allow http and https access': - port => [80, 443], - proto => tcp, - action => accept, - } -} -``` - - -However, if you're not using that pattern then you can place them directly into -the individual module that manages a service, such as: - -```puppet -class apache { - firewall { '100 allow http and https access': - port => [80, 443], - proto => tcp, - action => accept, - } - # ... the rest of your code ... -} -``` - -This means if someone includes either the profile: - -```puppet -include profile::apache -``` - -Or the module, if you're not using roles and profiles: - -```puppet - include ::apache -``` - -Then they would automatically get appropriate firewall rules. - -###Other rules - -You can also apply firewall rules to specific nodes. Usually, you will want to put the firewall rule in another class and apply that class to a node. But you can apply a rule to a node. - - node 'foo.bar.com' { - firewall { '111 open port 111': - dport => 111 - } - } - -You can also do more complex things with the `firewall` resource. Here we are doing some NAT configuration. - - firewall { '100 snat for network foo2': - chain => 'POSTROUTING', - jump => 'MASQUERADE', - proto => 'all', - outiface => "eth0", - source => '10.1.2.0/24', - table => 'nat', - } - -In the below example, we are creating a new chain and forwarding any port 5000 access to it. - - firewall { '100 forward to MY_CHAIN': - chain => 'INPUT', - jump => 'MY_CHAIN', - } - # The namevar here is in the format chain_name:table:protocol - firewallchain { 'MY_CHAIN:filter:IPv4': - ensure => present, - } - firewall { '100 my rule': - chain => 'MY_CHAIN', - action => 'accept', - proto => 'tcp', - dport => 5000, - } - -###Additional Information - -You can access the inline documentation: - - puppet describe firewall - -Or - - puppet doc -r type - (and search for firewall) - -##Reference - -Classes: - -* [firewall](#class-firewall) - -Types: - -* [firewall](#type-firewall) -* [firewallchain](#type-firewallchain) - -Facts: - -* [ip6tables_version](#fact-ip6tablesversion) -* [iptables_version](#fact-iptablesversion) -* [iptables_persistent_version](#fact-iptablespersistentversion) - -###Class: firewall - -This class is provided to do the basic setup tasks required for using the firewall resources. - -At the moment this takes care of: - -* iptables-persistent package installation - -You should include the class for nodes that need to use the resources in this module. For example - - class { 'firewall': } - -####`ensure` - -Indicates the state of `iptables` on your system, allowing you to disable `iptables` if desired. - -Can either be `running` or `stopped`. Default to `running`. - -###Type: firewall - -This type provides the capability to manage firewall rules within puppet. - -For more documentation on the type, access the 'Types' tab on the Puppet Labs Forge: - - - -###Type:: firewallchain - -This type provides the capability to manage rule chains for firewalls. - -For more documentation on the type, access the 'Types' tab on the Puppet Labs Forge: - - - -###Fact: ip6tables_version - -The module provides a Facter fact that can be used to determine what the default version of ip6tables is for your operating system/distribution. - -###Fact: iptables_version - -The module provides a Facter fact that can be used to determine what the default version of iptables is for your operating system/distribution. - -###Fact: iptables_persistent_version - -Retrieves the version of iptables-persistent from your OS. This is a Debian/Ubuntu specific fact. - -##Limitations - -###SLES - -The `socket` parameter is not supported on SLES. In this release it will cause -the catalog to fail with iptables failures, rather than correctly warn you that -the features are unusable. - -###Oracle Enterprise Linux - -The `socket` and `owner` parameters are unsupported on Oracle Enterprise Linux -when the "Unbreakable" kernel is used. These may function correctly when using -the stock RedHat kernel instead. Declaring either of these parameters on an -unsupported system will result in iptable rules failing to apply. - -###Other - -Bugs can be reported using JIRA issues - - - -##Development - -Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve. - -We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. - -You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) - -For this particular module, please also read CONTRIBUTING.md before contributing. - -Currently we support: - -* iptables -* ip6tables -* ebtables (chains only) - -But plans are to support lots of other firewall implementations: - -* FreeBSD (ipf) -* Mac OS X (ipfw) -* OpenBSD (pf) -* Cisco (ASA and basic access lists) - -If you have knowledge in these technologies, know how to code, and wish to contribute to this project, we would welcome the help. - -###Testing - -Make sure you have: - -* rake -* bundler - -Install the necessary gems: - - bundle install - -And run the tests from the root of the source code: - - rake test - -If you have a copy of Vagrant 1.1.0 you can also run the system tests: - - RSPEC_SET=debian-606-x64 rake spec:system - RSPEC_SET=centos-58-x64 rake spec:system - -*Note:* system testing is fairly alpha at this point, your mileage may vary. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/Rakefile deleted file mode 100644 index 8b12070304..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/Rakefile +++ /dev/null @@ -1,14 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' - -require 'puppet-lint/tasks/puppet-lint' -PuppetLint.configuration.ignore_paths = ['vendor/**/*.pp'] - -task :default do - sh %{rake -T} -end - -desc 'Run reasonably quick tests for CI' -task :ci => [ - :lint, - :spec, -] diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/facter/ip6tables_version.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/facter/ip6tables_version.rb deleted file mode 100644 index 3dce27f70c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/facter/ip6tables_version.rb +++ /dev/null @@ -1,11 +0,0 @@ -Facter.add(:ip6tables_version) do - confine :kernel => :linux - setcode do - version = Facter::Util::Resolution.exec('ip6tables --version') - if version - version.match(/\d+\.\d+\.\d+/).to_s - else - nil - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb deleted file mode 100644 index 80bf9dea1a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb +++ /dev/null @@ -1,15 +0,0 @@ -Facter.add(:iptables_persistent_version) do - confine :operatingsystem => %w{Debian Ubuntu} - setcode do - # Throw away STDERR because dpkg >= 1.16.7 will make some noise if the - # package isn't currently installed. - cmd = "dpkg-query -Wf '${Version}' iptables-persistent 2>/dev/null" - version = Facter::Util::Resolution.exec(cmd) - - if version.nil? or !version.match(/\d+\.\d+/) - nil - else - version - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/facter/iptables_version.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/facter/iptables_version.rb deleted file mode 100644 index 6f7ae56474..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/facter/iptables_version.rb +++ /dev/null @@ -1,11 +0,0 @@ -Facter.add(:iptables_version) do - confine :kernel => :linux - setcode do - version = Facter::Util::Resolution.exec('iptables --version') - if version - version.match(/\d+\.\d+\.\d+/).to_s - else - nil - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall.rb deleted file mode 100644 index c6b0b10bb1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Puppet::Provider::Firewall < Puppet::Provider - - # Prefetch our rule list. This is ran once every time before any other - # action (besides initialization of each object). - def self.prefetch(resources) - debug("[prefetch(resources)]") - instances.each do |prov| - if resource = resources[prov.name] || resources[prov.name.downcase] - resource.provider = prov - end - end - end - - # Look up the current status. This allows us to conventiently look up - # existing status with properties[:foo]. - def properties - if @property_hash.empty? - @property_hash = query || {:ensure => :absent} - @property_hash[:ensure] = :absent if @property_hash.empty? - end - @property_hash.dup - end - - # Pull the current state of the list from the full list. We're - # getting some double entendre here.... - def query - self.class.instances.each do |instance| - if instance.name == self.name or instance.name.downcase == self.name - return instance.properties - end - end - nil - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/ip6tables.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/ip6tables.rb deleted file mode 100644 index e1ce01af6a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/ip6tables.rb +++ /dev/null @@ -1,136 +0,0 @@ -Puppet::Type.type(:firewall).provide :ip6tables, :parent => :iptables, :source => :iptables do - @doc = "Ip6tables type provider" - - has_feature :iptables - has_feature :connection_limiting - has_feature :hop_limiting - has_feature :rate_limiting - has_feature :recent_limiting - has_feature :snat - has_feature :dnat - has_feature :interface_match - has_feature :icmp_match - has_feature :owner - has_feature :state_match - has_feature :reject_type - has_feature :log_level - has_feature :log_prefix - has_feature :mark - has_feature :tcp_flags - has_feature :pkttype - has_feature :ishasmorefrags - has_feature :islastfrag - has_feature :isfirstfrag - - optional_commands({ - :ip6tables => 'ip6tables', - :ip6tables_save => 'ip6tables-save', - }) - - def initialize(*args) - if Facter.fact('ip6tables_version').value.match /1\.3\.\d/ - raise ArgumentError, 'The ip6tables provider is not supported on version 1.3 of iptables' - else - super - end - end - - def self.iptables(*args) - ip6tables(*args) - end - - def self.iptables_save(*args) - ip6tables_save(*args) - end - - @protocol = "IPv6" - - @resource_map = { - :burst => "--limit-burst", - :connlimit_above => "-m connlimit --connlimit-above", - :connlimit_mask => "--connlimit-mask", - :connmark => "-m connmark --mark", - :ctstate => "-m conntrack --ctstate", - :destination => "-d", - :dport => "-m multiport --dports", - :gid => "-m owner --gid-owner", - :icmp => "-m icmp6 --icmpv6-type", - :iniface => "-i", - :jump => "-j", - :hop_limit => "-m hl --hl-eq", - :limit => "-m limit --limit", - :log_level => "--log-level", - :log_prefix => "--log-prefix", - :name => "-m comment --comment", - :outiface => "-o", - :port => '-m multiport --ports', - :proto => "-p", - :rdest => "--rdest", - :reap => "--reap", - :recent => "-m recent", - :reject => "--reject-with", - :rhitcount => "--hitcount", - :rname => "--name", - :rseconds => "--seconds", - :rsource => "--rsource", - :rttl => "--rttl", - :source => "-s", - :state => "-m state --state", - :sport => "-m multiport --sports", - :table => "-t", - :todest => "--to-destination", - :toports => "--to-ports", - :tosource => "--to-source", - :uid => "-m owner --uid-owner", - :pkttype => "-m pkttype --pkt-type", - :ishasmorefrags => "-m frag --fragid 0 --fragmore", - :islastfrag => "-m frag --fragid 0 --fraglast", - :isfirstfrag => "-m frag --fragid 0 --fragfirst", - } - - # These are known booleans that do not take a value, but we want to munge - # to true if they exist. - @known_booleans = [:ishasmorefrags, :islastfrag, :isfirstfrag, :rsource, :rdest, :reap, :rttl] - - # Create property methods dynamically - (@resource_map.keys << :chain << :table << :action).each do |property| - if @known_booleans.include?(property) then - # The boolean properties default to '' which should be read as false - define_method "#{property}" do - @property_hash[property] = :false if @property_hash[property] == nil - @property_hash[property.to_sym] - end - else - define_method "#{property}" do - @property_hash[property.to_sym] - end - end - - if property == :chain - define_method "#{property}=" do |value| - if @property_hash[:chain] != value - raise ArgumentError, "Modifying the chain for existing rules is not supported." - end - end - else - define_method "#{property}=" do |value| - @property_hash[:needs_change] = true - end - end - end - - # This is the order of resources as they appear in iptables-save output, - # we need it to properly parse and apply rules, if the order of resource - # changes between puppet runs, the changed rules will be re-applied again. - # This order can be determined by going through iptables source code or just tweaking and trying manually - # (Note: on my CentOS 6.4 ip6tables-save returns -m frag on the place - # I put it when calling the command. So compability with manual changes - # not provided with current parser [georg.koester]) - @resource_list = [:table, :source, :destination, :iniface, :outiface, - :proto, :ishasmorefrags, :islastfrag, :isfirstfrag, :gid, :uid, :sport, :dport, - :port, :pkttype, :name, :state, :ctstate, :icmp, :hop_limit, :limit, :burst, - :recent, :rseconds, :reap, :rhitcount, :rttl, :rname, :rsource, :rdest, - :jump, :todest, :tosource, :toports, :log_level, :log_prefix, :reject, - :connlimit_above, :connlimit_mask, :connmark] - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/iptables.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/iptables.rb deleted file mode 100644 index 5ad10125d7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewall/iptables.rb +++ /dev/null @@ -1,501 +0,0 @@ -require 'puppet/provider/firewall' -require 'digest/md5' - -Puppet::Type.type(:firewall).provide :iptables, :parent => Puppet::Provider::Firewall do - include Puppet::Util::Firewall - - @doc = "Iptables type provider" - - has_feature :iptables - has_feature :connection_limiting - has_feature :rate_limiting - has_feature :recent_limiting - has_feature :snat - has_feature :dnat - has_feature :interface_match - has_feature :icmp_match - has_feature :owner - has_feature :state_match - has_feature :reject_type - has_feature :log_level - has_feature :log_prefix - has_feature :mark - has_feature :tcp_flags - has_feature :pkttype - has_feature :isfragment - has_feature :socket - has_feature :address_type - has_feature :iprange - has_feature :ipsec_dir - has_feature :ipsec_policy - has_feature :mask - - optional_commands({ - :iptables => 'iptables', - :iptables_save => 'iptables-save', - }) - - defaultfor :kernel => :linux - - iptables_version = Facter.fact('iptables_version').value - if (iptables_version and Puppet::Util::Package.versioncmp(iptables_version, '1.4.1') < 0) - mark_flag = '--set-mark' - else - mark_flag = '--set-xmark' - end - - @protocol = "IPv4" - - @resource_map = { - :burst => "--limit-burst", - :connlimit_above => "-m connlimit --connlimit-above", - :connlimit_mask => "--connlimit-mask", - :connmark => "-m connmark --mark", - :ctstate => "-m conntrack --ctstate", - :destination => "-d", - :dst_type => "-m addrtype --dst-type", - :dst_range => "-m iprange --dst-range", - :dport => ["-m multiport --dports", "--dport"], - :gid => "-m owner --gid-owner", - :icmp => "-m icmp --icmp-type", - :iniface => "-i", - :jump => "-j", - :limit => "-m limit --limit", - :log_level => "--log-level", - :log_prefix => "--log-prefix", - :name => "-m comment --comment", - :outiface => "-o", - :port => '-m multiport --ports', - :proto => "-p", - :random => "--random", - :rdest => "--rdest", - :reap => "--reap", - :recent => "-m recent", - :reject => "--reject-with", - :rhitcount => "--hitcount", - :rname => "--name", - :rseconds => "--seconds", - :rsource => "--rsource", - :rttl => "--rttl", - :set_mark => mark_flag, - :socket => "-m socket", - :source => "-s", - :src_type => "-m addrtype --src-type", - :src_range => "-m iprange --src-range", - :sport => ["-m multiport --sports", "--sport"], - :state => "-m state --state", - :table => "-t", - :tcp_flags => "-m tcp --tcp-flags", - :todest => "--to-destination", - :toports => "--to-ports", - :tosource => "--to-source", - :uid => "-m owner --uid-owner", - :pkttype => "-m pkttype --pkt-type", - :isfragment => "-f", - :ipsec_dir => "-m policy --dir", - :ipsec_policy => "--pol", - :mask => '--mask', - } - - # These are known booleans that do not take a value, but we want to munge - # to true if they exist. - @known_booleans = [ - :isfragment, - :random, - :rdest, - :reap, - :rsource, - :rttl, - :socket - ] - - - # Create property methods dynamically - (@resource_map.keys << :chain << :table << :action).each do |property| - if @known_booleans.include?(property) then - # The boolean properties default to '' which should be read as false - define_method "#{property}" do - @property_hash[property] = :false if @property_hash[property] == nil - @property_hash[property.to_sym] - end - else - define_method "#{property}" do - @property_hash[property.to_sym] - end - end - - if property == :chain - define_method "#{property}=" do |value| - if @property_hash[:chain] != value - raise ArgumentError, "Modifying the chain for existing rules is not supported." - end - end - else - define_method "#{property}=" do |value| - @property_hash[:needs_change] = true - end - end - end - - # This is the order of resources as they appear in iptables-save output, - # we need it to properly parse and apply rules, if the order of resource - # changes between puppet runs, the changed rules will be re-applied again. - # This order can be determined by going through iptables source code or just tweaking and trying manually - @resource_list = [ - :table, :source, :destination, :iniface, :outiface, :proto, :isfragment, - :src_range, :dst_range, :tcp_flags, :gid, :uid, :sport, :dport, :port, - :dst_type, :src_type, :socket, :pkttype, :name, :ipsec_dir, :ipsec_policy, - :state, :ctstate, :icmp, :limit, :burst, :recent, :rseconds, :reap, - :rhitcount, :rttl, :rname, :mask, :rsource, :rdest, :jump, :todest, - :tosource, :toports, :random, :log_prefix, :log_level, :reject, :set_mark, - :connlimit_above, :connlimit_mask, :connmark - ] - - def insert - debug 'Inserting rule %s' % resource[:name] - iptables insert_args - end - - def update - debug 'Updating rule %s' % resource[:name] - iptables update_args - end - - def delete - debug 'Deleting rule %s' % resource[:name] - iptables delete_args - end - - def exists? - properties[:ensure] != :absent - end - - # Flush the property hash once done. - def flush - debug("[flush]") - if @property_hash.delete(:needs_change) - notice("Properties changed - updating rule") - update - end - persist_iptables(self.class.instance_variable_get(:@protocol)) - @property_hash.clear - end - - def self.instances - debug "[instances]" - table = nil - rules = [] - counter = 1 - - # String#lines would be nice, but we need to support Ruby 1.8.5 - iptables_save.split("\n").each do |line| - unless line =~ /^\#\s+|^\:\S+|^COMMIT|^FATAL/ - if line =~ /^\*/ - table = line.sub(/\*/, "") - else - if hash = rule_to_hash(line, table, counter) - rules << new(hash) - counter += 1 - end - end - end - end - rules - end - - def self.rule_to_hash(line, table, counter) - hash = {} - keys = [] - values = line.dup - - #################### - # PRE-PARSE CLUDGING - #################### - - # --tcp-flags takes two values; we cheat by adding " around it - # so it behaves like --comment - values = values.sub(/--tcp-flags (\S*) (\S*)/, '--tcp-flags "\1 \2"') - # we do a similar thing for negated address masks (source and destination). - values = values.sub(/(-\S+) (!)\s?(\S*)/,'\1 "\2 \3"') - # the actual rule will have the ! mark before the option. - values = values.sub(/(!)\s*(-\S+)\s*(\S*)/, '\2 "\1 \3"') - # The match extension for tcp & udp are optional and throws off the @resource_map. - values = values.sub(/-m (tcp|udp) (--(s|d)port|-m multiport)/, '\2') - - # Trick the system for booleans - @known_booleans.each do |bool| - # append "true" because all params are expected to have values - if bool == :isfragment then - # -f requires special matching: - # only replace those -f that are not followed by an l to - # distinguish between -f and the '-f' inside of --tcp-flags. - values = values.sub(/-f(?!l)(?=.*--comment)/, '-f true') - else - values = values.sub(/#{@resource_map[bool]}/, "#{@resource_map[bool]} true") - end - end - - ############ - # Populate parser_list with used value, in the correct order - ############ - map_index={} - @resource_map.each_pair do |map_k,map_v| - [map_v].flatten.each do |v| - ind=values.index(/\s#{v}/) - next unless ind - map_index[map_k]=ind - end - end - # Generate parser_list based on the index of the found option - parser_list=[] - map_index.sort_by{|k,v| v}.each{|mapi| parser_list << mapi.first } - - ############ - # MAIN PARSE - ############ - - # Here we iterate across our values to generate an array of keys - parser_list.reverse.each do |k| - resource_map_key = @resource_map[k] - [resource_map_key].flatten.each do |opt| - if values.slice!(/\s#{opt}/) - keys << k - break - end - end - end - - # Manually remove chain - values.slice!('-A') - keys << :chain - - # Here we generate the main hash - keys.zip(values.scan(/"[^"]*"|\S+/).reverse) { |f, v| hash[f] = v.gsub(/"/, '') } - - ##################### - # POST PARSE CLUDGING - ##################### - - # Normalise all rules to CIDR notation. - [:source, :destination].each do |prop| - next if hash[prop].nil? - m = hash[prop].match(/(!?)\s?(.*)/) - neg = "! " if m[1] == "!" - hash[prop] = "#{neg}#{Puppet::Util::IPCidr.new(m[2]).cidr}" - end - - [:dport, :sport, :port, :state, :ctstate].each do |prop| - hash[prop] = hash[prop].split(',') if ! hash[prop].nil? - end - - # Convert booleans removing the previous cludge we did - @known_booleans.each do |bool| - if hash[bool] != nil then - if hash[bool] != "true" then - raise "Parser error: #{bool} was meant to be a boolean but received value: #{hash[bool]}." - end - end - end - - # Our type prefers hyphens over colons for ranges so ... - # Iterate across all ports replacing colons with hyphens so that ranges match - # the types expectations. - [:dport, :sport, :port].each do |prop| - next unless hash[prop] - hash[prop] = hash[prop].collect do |elem| - elem.gsub(/:/,'-') - end - end - - # States should always be sorted. This ensures that the output from - # iptables-save and user supplied resources is consistent. - hash[:state] = hash[:state].sort unless hash[:state].nil? - hash[:ctstate] = hash[:ctstate].sort unless hash[:ctstate].nil? - - # This forces all existing, commentless rules or rules with invalid comments to be moved - # to the bottom of the stack. - # Puppet-firewall requires that all rules have comments (resource names) and match this - # regex and will fail if a rule in iptables does not have a comment. We get around this - # by appending a high level - if ! hash[:name] - num = 9000 + counter - hash[:name] = "#{num} #{Digest::MD5.hexdigest(line)}" - elsif not /^\d+[[:alpha:][:digit:][:punct:][:space:]]+$/ =~ hash[:name] - num = 9000 + counter - hash[:name] = "#{num} #{/([[:alpha:][:digit:][:punct:][:space:]]+)/.match(hash[:name])[1]}" - end - - # Iptables defaults to log_level '4', so it is omitted from the output of iptables-save. - # If the :jump value is LOG and you don't have a log-level set, we assume it to be '4'. - if hash[:jump] == 'LOG' && ! hash[:log_level] - hash[:log_level] = '4' - end - - # Iptables defaults to burst '5', so it is ommitted from the output of iptables-save. - # If the :limit value is set and you don't have a burst set, we assume it to be '5'. - if hash[:limit] && ! hash[:burst] - hash[:burst] = '5' - end - - hash[:line] = line - hash[:provider] = self.name.to_s - hash[:table] = table - hash[:ensure] = :present - - # Munge some vars here ... - - # Proto should equal 'all' if undefined - hash[:proto] = "all" if !hash.include?(:proto) - - # If the jump parameter is set to one of: ACCEPT, REJECT or DROP then - # we should set the action parameter instead. - if ['ACCEPT','REJECT','DROP'].include?(hash[:jump]) then - hash[:action] = hash[:jump].downcase - hash.delete(:jump) - end - - hash - end - - def insert_args - args = [] - args << ["-I", resource[:chain], insert_order] - args << general_args - args - end - - def update_args - args = [] - args << ["-R", resource[:chain], insert_order] - args << general_args - args - end - - def delete_args - # Split into arguments - line = properties[:line].gsub(/\-A/, '-D').split(/\s(?=(?:[^"]|"[^"]*")*$)/).map{|v| v.gsub(/"/, '')} - line.unshift("-t", properties[:table]) - end - - # This method takes the resource, and attempts to generate the command line - # arguments for iptables. - def general_args - debug "Current resource: %s" % resource.class - - args = [] - resource_list = self.class.instance_variable_get('@resource_list') - resource_map = self.class.instance_variable_get('@resource_map') - known_booleans = self.class.instance_variable_get('@known_booleans') - - resource_list.each do |res| - resource_value = nil - if (resource[res]) then - resource_value = resource[res] - # If socket is true then do not add the value as -m socket is standalone - if known_booleans.include?(res) then - if resource[res] == :true then - resource_value = nil - else - # If the property is not :true then we don't want to add the value - # to the args list - next - end - end - elsif res == :jump and resource[:action] then - # In this case, we are substituting jump for action - resource_value = resource[:action].to_s.upcase - else - next - end - - args << [resource_map[res]].flatten.first.split(' ') - - # On negations, the '!' has to be before the option (eg: "! -d 1.2.3.4") - if resource_value.is_a?(String) and resource_value.sub!(/^!\s*/, '') then - # we do this after adding the 'dash' argument because of ones like "-m multiport --dports", where we want it before the "--dports" but after "-m multiport". - # so we insert before whatever the last argument is - args.insert(-2, '!') - end - - - # For sport and dport, convert hyphens to colons since the type - # expects hyphens for ranges of ports. - if [:sport, :dport, :port].include?(res) then - resource_value = resource_value.collect do |elem| - elem.gsub(/-/, ':') - end - end - - # our tcp_flags takes a single string with comma lists separated - # by space - # --tcp-flags expects two arguments - if res == :tcp_flags - one, two = resource_value.split(' ') - args << one - args << two - elsif resource_value.is_a?(Array) - args << resource_value.join(',') - elsif !resource_value.nil? - args << resource_value - end - end - - args - end - - def insert_order - debug("[insert_order]") - rules = [] - - # Find list of current rules based on chain and table - self.class.instances.each do |rule| - if rule.chain == resource[:chain].to_s and rule.table == resource[:table].to_s - rules << rule.name - end - end - - # No rules at all? Just bail now. - return 1 if rules.empty? - - # Add our rule to the end of the array of known rules - my_rule = resource[:name].to_s - rules << my_rule - - unmanaged_rule_regex = /^9[0-9]{3}\s[a-f0-9]{32}$/ - # Find if this is a new rule or an existing rule, then find how many - # unmanaged rules preceed it. - if rules.length == rules.uniq.length - # This is a new rule so find its ordered location. - new_rule_location = rules.sort.uniq.index(my_rule) - if new_rule_location == 0 - # The rule will be the first rule in the chain because nothing came - # before it. - offset_rule = rules[0] - else - # This rule will come after other managed rules, so find the rule - # immediately preceeding it. - offset_rule = rules.sort.uniq[new_rule_location - 1] - end - else - # This is a pre-existing rule, so find the offset from the original - # ordering. - offset_rule = my_rule - end - # Count how many unmanaged rules are ahead of the target rule so we know - # how much to add to the insert order - unnamed_offset = rules[0..rules.index(offset_rule)].inject(0) do |sum,rule| - # This regex matches the names given to unmanaged rules (a number - # 9000-9999 followed by an MD5 hash). - sum + (rule.match(unmanaged_rule_regex) ? 1 : 0) - end - - # We want our rule to come before unmanaged rules if it's not a 9-rule - if offset_rule.match(unmanaged_rule_regex) and ! my_rule.match(/^9/) - unnamed_offset -= 1 - end - - # Insert our new or updated rule in the correct order of named rules, but - # offset for unnamed rules. - rules.reject{|r|r.match(unmanaged_rule_regex)}.sort.index(my_rule) + 1 + unnamed_offset - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewallchain/iptables_chain.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewallchain/iptables_chain.rb deleted file mode 100644 index 29fbc1f6b8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/provider/firewallchain/iptables_chain.rb +++ /dev/null @@ -1,178 +0,0 @@ -Puppet::Type.type(:firewallchain).provide :iptables_chain do - include Puppet::Util::Firewall - - @doc = "Iptables chain provider" - - has_feature :iptables_chain - has_feature :policy - - optional_commands({ - :iptables => 'iptables', - :iptables_save => 'iptables-save', - :ip6tables => 'ip6tables', - :ip6tables_save => 'ip6tables-save', - :ebtables => 'ebtables', - :ebtables_save => 'ebtables-save', - }) - - defaultfor :kernel => :linux - - # chain name is greedy so we anchor from the end. - # [\d+:\d+] doesn't exist on ebtables - Mapping = { - :IPv4 => { - :tables => method(:iptables), - :save => method(:iptables_save), - :re => /^:(.+)\s(\S+)\s\[\d+:\d+\]$/, - }, - :IPv6 => { - :tables => method(:ip6tables), - :save => method(:ip6tables_save), - :re => /^:(.+)\s(\S+)\s\[\d+:\d+\]$/, - }, - :ethernet => { - :tables => method(:ebtables), - :save => method(:ebtables_save), - :re => /^:(.+)\s(\S+)$/, - } - } - InternalChains = /^(PREROUTING|POSTROUTING|BROUTING|INPUT|FORWARD|OUTPUT)$/ - Tables = 'nat|mangle|filter|raw|rawpost|broute' - Nameformat = /^(.+):(#{Tables}):(IP(v[46])?|ethernet)$/ - - def create - allvalidchains do |t, chain, table, protocol| - if chain =~ InternalChains - # can't create internal chains - warning "Attempting to create internal chain #{@resource[:name]}" - end - if properties[:ensure] == protocol - debug "Skipping Inserting chain #{chain} on table #{table} (#{protocol}) already exists" - else - debug "Inserting chain #{chain} on table #{table} (#{protocol}) using #{t}" - t.call ['-t',table,'-N',chain] - unless @resource[:policy].nil? - t.call ['-t',table,'-P',chain,@resource[:policy].to_s.upcase] - end - end - end - end - - def destroy - allvalidchains do |t, chain, table| - if chain =~ InternalChains - # can't delete internal chains - warning "Attempting to destroy internal chain #{@resource[:name]}" - end - debug "Deleting chain #{chain} on table #{table}" - t.call ['-t',table,'-X',chain] - end - end - - def exists? - allvalidchains do |t, chain| - if chain =~ InternalChains - # If the chain isn't present, it's likely because the module isn't loaded. - # If this is true, then we fall into 2 cases - # 1) It'll be loaded on demand - # 2) It won't be loaded on demand, and we throw an error - # This is the intended behavior as it's not the provider's job to load kernel modules - # So we pretend it exists... - return true - end - end - properties[:ensure] == :present - end - - def policy=(value) - return if value == :empty - allvalidchains do |t, chain, table| - p = ['-t',table,'-P',chain,value.to_s.upcase] - debug "[set policy] #{t} #{p}" - t.call p - end - end - - def policy - debug "[get policy] #{@resource[:name]} =#{@property_hash[:policy].to_s.downcase}" - return @property_hash[:policy].to_s.downcase - end - - def self.prefetch(resources) - debug("[prefetch(resources)]") - instances.each do |prov| - if resource = resources[prov.name] - resource.provider = prov - end - end - end - - def flush - debug("[flush]") - persist_iptables(@resource[:name].match(Nameformat)[3]) - # Clear the property hash so we re-initialize with updated values - @property_hash.clear - end - - # Look up the current status. This allows us to conventiently look up - # existing status with properties[:foo]. - def properties - if @property_hash.empty? - @property_hash = query || {:ensure => :absent} - end - @property_hash.dup - end - - # Pull the current state of the list from the full list. - def query - self.class.instances.each do |instance| - if instance.name == self.name - debug "query found #{self.name}" % instance.properties.inspect - return instance.properties - end - end - nil - end - - def self.instances - debug "[instances]" - table = nil - chains = [] - - Mapping.each { |p, c| - begin - c[:save].call.each_line do |line| - if line =~ c[:re] then - name = $1 + ':' + (table == 'filter' ? 'filter' : table) + ':' + p.to_s - policy = $2 == '-' ? nil : $2.downcase.to_sym - - chains << new({ - :name => name, - :policy => policy, - :ensure => :present, - }) - - debug "[instance] '#{name}' #{policy}" - elsif line =~ /^\*(\S+)/ - table = $1 - else - next - end - end - rescue Puppet::Error - # ignore command not found for ebtables or anything that doesn't exist - end - } - - chains - end - - def allvalidchains - @resource[:name].match(Nameformat) - chain = $1 - table = $2 - protocol = $3 - yield Mapping[protocol.to_sym][:tables],chain,table,protocol.to_sym - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/type/firewall.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/type/firewall.rb deleted file mode 100644 index 22afbd21e2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/type/firewall.rb +++ /dev/null @@ -1,1077 +0,0 @@ -# See: #10295 for more details. -# -# This is a workaround for bug: #4248 whereby ruby files outside of the normal -# provider/type path do not load until pluginsync has occured on the puppetmaster -# -# In this case I'm trying the relative path first, then falling back to normal -# mechanisms. This should be fixed in future versions of puppet but it looks -# like we'll need to maintain this for some time perhaps. -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),"..","..")) -require 'puppet/util/firewall' - -Puppet::Type.newtype(:firewall) do - include Puppet::Util::Firewall - - @doc = <<-EOS - This type provides the capability to manage firewall rules within - puppet. - - **Autorequires:** - - If Puppet is managing the iptables or ip6tables chains specified in the - `chain` or `jump` parameters, the firewall resource will autorequire - those firewallchain resources. - - If Puppet is managing the iptables or iptables-persistent packages, and - the provider is iptables or ip6tables, the firewall resource will - autorequire those packages to ensure that any required binaries are - installed. - EOS - - feature :connection_limiting, "Connection limiting features." - feature :hop_limiting, "Hop limiting features." - feature :rate_limiting, "Rate limiting features." - feature :recent_limiting, "The netfilter recent module" - feature :snat, "Source NATing" - feature :dnat, "Destination NATing" - feature :interface_match, "Interface matching" - feature :icmp_match, "Matching ICMP types" - feature :owner, "Matching owners" - feature :state_match, "Matching stateful firewall states" - feature :reject_type, "The ability to control reject messages" - feature :log_level, "The ability to control the log level" - feature :log_prefix, "The ability to add prefixes to log messages" - feature :mark, "Match or Set the netfilter mark value associated with the packet" - feature :tcp_flags, "The ability to match on particular TCP flag settings" - feature :pkttype, "Match a packet type" - feature :socket, "Match open sockets" - feature :isfragment, "Match fragments" - feature :address_type, "The ability match on source or destination address type" - feature :iprange, "The ability match on source or destination IP range " - feature :ishasmorefrags, "Match a non-last fragment of a fragmented ipv6 packet - might be first" - feature :islastfrag, "Match the last fragment of an ipv6 packet" - feature :isfirstfrag, "Match the first fragment of a fragmented ipv6 packet" - feature :ipsec_policy, "Match IPsec policy" - feature :ipsec_dir, "Match IPsec policy direction" - - # provider specific features - feature :iptables, "The provider provides iptables features." - - ensurable do - desc <<-EOS - Manage the state of this rule. The default action is *present*. - EOS - - newvalue(:present) do - provider.insert - end - - newvalue(:absent) do - provider.delete - end - - defaultto :present - end - - newparam(:name) do - desc <<-EOS - The canonical name of the rule. This name is also used for ordering - so make sure you prefix the rule with a number: - - 000 this runs first - 999 this runs last - - Depending on the provider, the name of the rule can be stored using - the comment feature of the underlying firewall subsystem. - EOS - isnamevar - - # Keep rule names simple - they must start with a number - newvalues(/^\d+[[:alpha:][:digit:][:punct:][:space:]]+$/) - end - - newproperty(:action) do - desc <<-EOS - This is the action to perform on a match. Can be one of: - - * accept - the packet is accepted - * reject - the packet is rejected with a suitable ICMP response - * drop - the packet is dropped - - If you specify no value it will simply match the rule but perform no - action unless you provide a provider specific parameter (such as *jump*). - EOS - newvalues(:accept, :reject, :drop) - end - - # Generic matching properties - newproperty(:source) do - desc <<-EOS - The source address. For example: - - source => '192.168.2.0/24' - - You can also negate a mask by putting ! in front. For example: - - source => '! 192.168.2.0/24' - - The source can also be an IPv6 address if your provider supports it. - EOS - - munge do |value| - begin - @resource.host_to_mask(value) - rescue Exception => e - self.fail("host_to_ip failed for #{value}, exception #{e}") - end - end - end - - # Source IP range - newproperty(:src_range, :required_features => :iprange) do - desc <<-EOS - The source IP range. For example: - - src_range => '192.168.1.1-192.168.1.10' - - The source IP range is must in 'IP1-IP2' format. - EOS - - newvalues(/^((25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)-((25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)/) - end - - newproperty(:destination) do - desc <<-EOS - The destination address to match. For example: - - destination => '192.168.1.0/24' - - You can also negate a mask by putting ! in front. For example: - - destination => '! 192.168.2.0/24' - - The destination can also be an IPv6 address if your provider supports it. - EOS - - munge do |value| - begin - @resource.host_to_mask(value) - rescue Exception => e - self.fail("host_to_ip failed for #{value}, exception #{e}") - end - end - end - - # Destination IP range - newproperty(:dst_range, :required_features => :iprange) do - desc <<-EOS - The destination IP range. For example: - - dst_range => '192.168.1.1-192.168.1.10' - - The destination IP range is must in 'IP1-IP2' format. - EOS - - newvalues(/^((25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)-((25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)/) - end - - newproperty(:sport, :array_matching => :all) do - desc <<-EOS - The source port to match for this filter (if the protocol supports - ports). Will accept a single element or an array. - - For some firewall providers you can pass a range of ports in the format: - - - - - For example: - - 1-1024 - - This would cover ports 1 to 1024. - EOS - - munge do |value| - @resource.string_to_port(value, :proto) - end - - def is_to_s(value) - should_to_s(value) - end - - def should_to_s(value) - value = [value] unless value.is_a?(Array) - value.join(',') - end - end - - newproperty(:dport, :array_matching => :all) do - desc <<-EOS - The destination port to match for this filter (if the protocol supports - ports). Will accept a single element or an array. - - For some firewall providers you can pass a range of ports in the format: - - - - - For example: - - 1-1024 - - This would cover ports 1 to 1024. - EOS - - munge do |value| - @resource.string_to_port(value, :proto) - end - - def is_to_s(value) - should_to_s(value) - end - - def should_to_s(value) - value = [value] unless value.is_a?(Array) - value.join(',') - end - end - - newproperty(:port, :array_matching => :all) do - desc <<-EOS - The destination or source port to match for this filter (if the protocol - supports ports). Will accept a single element or an array. - - For some firewall providers you can pass a range of ports in the format: - - - - - For example: - - 1-1024 - - This would cover ports 1 to 1024. - EOS - - munge do |value| - @resource.string_to_port(value, :proto) - end - - def is_to_s(value) - should_to_s(value) - end - - def should_to_s(value) - value = [value] unless value.is_a?(Array) - value.join(',') - end - end - - newproperty(:dst_type, :required_features => :address_type) do - desc <<-EOS - The destination address type. For example: - - dst_type => 'LOCAL' - - Can be one of: - - * UNSPEC - an unspecified address - * UNICAST - a unicast address - * LOCAL - a local address - * BROADCAST - a broadcast address - * ANYCAST - an anycast packet - * MULTICAST - a multicast address - * BLACKHOLE - a blackhole address - * UNREACHABLE - an unreachable address - * PROHIBIT - a prohibited address - * THROW - undocumented - * NAT - undocumented - * XRESOLVE - undocumented - EOS - - newvalues(:UNSPEC, :UNICAST, :LOCAL, :BROADCAST, :ANYCAST, :MULTICAST, - :BLACKHOLE, :UNREACHABLE, :PROHIBIT, :THROW, :NAT, :XRESOLVE) - end - - newproperty(:src_type, :required_features => :address_type) do - desc <<-EOS - The source address type. For example: - - src_type => 'LOCAL' - - Can be one of: - - * UNSPEC - an unspecified address - * UNICAST - a unicast address - * LOCAL - a local address - * BROADCAST - a broadcast address - * ANYCAST - an anycast packet - * MULTICAST - a multicast address - * BLACKHOLE - a blackhole address - * UNREACHABLE - an unreachable address - * PROHIBIT - a prohibited address - * THROW - undocumented - * NAT - undocumented - * XRESOLVE - undocumented - EOS - - newvalues(:UNSPEC, :UNICAST, :LOCAL, :BROADCAST, :ANYCAST, :MULTICAST, - :BLACKHOLE, :UNREACHABLE, :PROHIBIT, :THROW, :NAT, :XRESOLVE) - end - - newproperty(:proto) do - desc <<-EOS - The specific protocol to match for this rule. By default this is - *tcp*. - EOS - - newvalues(:tcp, :udp, :icmp, :"ipv6-icmp", :esp, :ah, :vrrp, :igmp, :ipencap, :ospf, :gre, :all) - defaultto "tcp" - end - - # tcp-specific - newproperty(:tcp_flags, :required_features => :tcp_flags) do - desc <<-EOS - Match when the TCP flags are as specified. - Is a string with a list of comma-separated flag names for the mask, - then a space, then a comma-separated list of flags that should be set. - The flags are: SYN ACK FIN RST URG PSH ALL NONE - Note that you specify them in the order that iptables --list-rules - would list them to avoid having puppet think you changed the flags. - Example: FIN,SYN,RST,ACK SYN matches packets with the SYN bit set and the - ACK,RST and FIN bits cleared. Such packets are used to request - TCP connection initiation. - EOS - end - - - # Iptables specific - newproperty(:chain, :required_features => :iptables) do - desc <<-EOS - Name of the chain to use. Can be one of the built-ins: - - * INPUT - * FORWARD - * OUTPUT - * PREROUTING - * POSTROUTING - - Or you can provide a user-based chain. - - The default value is 'INPUT'. - EOS - - defaultto "INPUT" - newvalue(/^[a-zA-Z0-9\-_]+$/) - end - - newproperty(:table, :required_features => :iptables) do - desc <<-EOS - Table to use. Can be one of: - - * nat - * mangle - * filter - * raw - * rawpost - - By default the setting is 'filter'. - EOS - - newvalues(:nat, :mangle, :filter, :raw, :rawpost) - defaultto "filter" - end - - newproperty(:jump, :required_features => :iptables) do - desc <<-EOS - The value for the iptables --jump parameter. Normal values are: - - * QUEUE - * RETURN - * DNAT - * SNAT - * LOG - * MASQUERADE - * REDIRECT - * MARK - - But any valid chain name is allowed. - - For the values ACCEPT, DROP and REJECT you must use the generic - 'action' parameter. This is to enfore the use of generic parameters where - possible for maximum cross-platform modelling. - - If you set both 'accept' and 'jump' parameters, you will get an error as - only one of the options should be set. - EOS - - validate do |value| - unless value =~ /^[a-zA-Z0-9\-_]+$/ - raise ArgumentError, <<-EOS - Jump destination must consist of alphanumeric characters, an - underscore or a yphen. - EOS - end - - if ["accept","reject","drop"].include?(value.downcase) - raise ArgumentError, <<-EOS - Jump destination should not be one of ACCEPT, REJECT or DROP. Use - the action property instead. - EOS - end - - end - end - - # Interface specific matching properties - newproperty(:iniface, :required_features => :interface_match) do - desc <<-EOS - Input interface to filter on. - EOS - newvalues(/^[a-zA-Z0-9\-\._\+]+$/) - end - - newproperty(:outiface, :required_features => :interface_match) do - desc <<-EOS - Output interface to filter on. - EOS - newvalues(/^[a-zA-Z0-9\-\._\+]+$/) - end - - # NAT specific properties - newproperty(:tosource, :required_features => :snat) do - desc <<-EOS - When using jump => "SNAT" you can specify the new source address using - this parameter. - EOS - end - - newproperty(:todest, :required_features => :dnat) do - desc <<-EOS - When using jump => "DNAT" you can specify the new destination address - using this paramter. - EOS - end - - newproperty(:toports, :required_features => :dnat) do - desc <<-EOS - For DNAT this is the port that will replace the destination port. - EOS - end - - newproperty(:random, :required_features => :dnat) do - desc <<-EOS - When using a jump value of "MASQUERADE", "DNAT", "REDIRECT", or "SNAT" - this boolean will enable randomized port mapping. - EOS - - newvalues(:true, :false) - end - - # Reject ICMP type - newproperty(:reject, :required_features => :reject_type) do - desc <<-EOS - When combined with jump => "REJECT" you can specify a different icmp - response to be sent back to the packet sender. - EOS - end - - # Logging properties - newproperty(:log_level, :required_features => :log_level) do - desc <<-EOS - When combined with jump => "LOG" specifies the system log level to log - to. - EOS - - munge do |value| - if value.kind_of?(String) - value = @resource.log_level_name_to_number(value) - else - value - end - - if value == nil && value != "" - self.fail("Unable to determine log level") - end - value - end - end - - newproperty(:log_prefix, :required_features => :log_prefix) do - desc <<-EOS - When combined with jump => "LOG" specifies the log prefix to use when - logging. - EOS - end - - # ICMP matching property - newproperty(:icmp, :required_features => :icmp_match) do - desc <<-EOS - When matching ICMP packets, this is the type of ICMP packet to match. - - A value of "any" is not supported. To achieve this behaviour the - parameter should simply be omitted or undefined. - EOS - - validate do |value| - if value == "any" - raise ArgumentError, - "Value 'any' is not valid. This behaviour should be achieved " \ - "by omitting or undefining the ICMP parameter." - end - end - - munge do |value| - if value.kind_of?(String) - # ICMP codes differ between IPv4 and IPv6. - case @resource[:provider] - when :iptables - protocol = 'inet' - when :ip6tables - protocol = 'inet6' - else - self.fail("cannot work out protocol family") - end - - value = @resource.icmp_name_to_number(value, protocol) - else - value - end - - if value == nil && value != "" - self.fail("cannot work out icmp type") - end - value - end - end - - newproperty(:state, :array_matching => :all, :required_features => - :state_match) do - - desc <<-EOS - Matches a packet based on its state in the firewall stateful inspection - table. Values can be: - - * INVALID - * ESTABLISHED - * NEW - * RELATED - EOS - - newvalues(:INVALID,:ESTABLISHED,:NEW,:RELATED) - - # States should always be sorted. This normalizes the resource states to - # keep it consistent with the sorted result from iptables-save. - def should=(values) - @should = super(values).sort_by {|sym| sym.to_s} - end - - def is_to_s(value) - should_to_s(value) - end - - def should_to_s(value) - value = [value] unless value.is_a?(Array) - value.join(',') - end - end - - newproperty(:ctstate, :array_matching => :all, :required_features => - :state_match) do - - desc <<-EOS - Matches a packet based on its state in the firewall stateful inspection - table, using the conntrack module. Values can be: - - * INVALID - * ESTABLISHED - * NEW - * RELATED - EOS - - newvalues(:INVALID,:ESTABLISHED,:NEW,:RELATED) - - # States should always be sorted. This normalizes the resource states to - # keep it consistent with the sorted result from iptables-save. - def should=(values) - @should = super(values).sort_by {|sym| sym.to_s} - end - - def is_to_s(value) - should_to_s(value) - end - - def should_to_s(value) - value = [value] unless value.is_a?(Array) - value.join(',') - end - end - - - # Connection mark - newproperty(:connmark, :required_features => :mark) do - desc <<-EOS - Match the Netfilter mark value associated with the packet. Accepts either of: - mark/mask or mark. These will be converted to hex if they are not already. - EOS - munge do |value| - int_or_hex = '[a-fA-F0-9x]' - match = value.to_s.match("(#{int_or_hex}+)(/)?(#{int_or_hex}+)?") - mark = @resource.to_hex32(match[1]) - - # Values that can't be converted to hex. - # Or contain a trailing slash with no mask. - if mark.nil? or (mark and match[2] and match[3].nil?) - raise ArgumentError, "MARK value must be integer or hex between 0 and 0xffffffff" - end - - # There should not be a mask on connmark - unless match[3].nil? - raise ArgumentError, "iptables does not support masks on MARK match rules" - end - value = mark - - value - end - end - - # Connection limiting properties - newproperty(:connlimit_above, :required_features => :connection_limiting) do - desc <<-EOS - Connection limiting value for matched connections above n. - EOS - newvalue(/^\d+$/) - end - - newproperty(:connlimit_mask, :required_features => :connection_limiting) do - desc <<-EOS - Connection limiting by subnet mask for matched connections. - IPv4: 0-32 - IPv6: 0-128 - EOS - newvalue(/^\d+$/) - end - - # Hop limiting properties - newproperty(:hop_limit, :required_features => :hop_limiting) do - desc <<-EOS - Hop limiting value for matched packets. - EOS - newvalue(/^\d+$/) - end - - # Rate limiting properties - newproperty(:limit, :required_features => :rate_limiting) do - desc <<-EOS - Rate limiting value for matched packets. The format is: - rate/[/second/|/minute|/hour|/day]. - - Example values are: '50/sec', '40/min', '30/hour', '10/day'." - EOS - end - - newproperty(:burst, :required_features => :rate_limiting) do - desc <<-EOS - Rate limiting burst value (per second) before limit checks apply. - EOS - newvalue(/^\d+$/) - end - - newproperty(:uid, :required_features => :owner) do - desc <<-EOS - UID or Username owner matching rule. Accepts a string argument - only, as iptables does not accept multiple uid in a single - statement. - EOS - end - - newproperty(:gid, :required_features => :owner) do - desc <<-EOS - GID or Group owner matching rule. Accepts a string argument - only, as iptables does not accept multiple gid in a single - statement. - EOS - end - - newproperty(:set_mark, :required_features => :mark) do - desc <<-EOS - Set the Netfilter mark value associated with the packet. Accepts either of: - mark/mask or mark. These will be converted to hex if they are not already. - EOS - - munge do |value| - int_or_hex = '[a-fA-F0-9x]' - match = value.to_s.match("(#{int_or_hex}+)(/)?(#{int_or_hex}+)?") - mark = @resource.to_hex32(match[1]) - - # Values that can't be converted to hex. - # Or contain a trailing slash with no mask. - if mark.nil? or (mark and match[2] and match[3].nil?) - raise ArgumentError, "MARK value must be integer or hex between 0 and 0xffffffff" - end - - # Old iptables does not support a mask. New iptables will expect one. - iptables_version = Facter.fact('iptables_version').value - mask_required = (iptables_version and Puppet::Util::Package.versioncmp(iptables_version, '1.4.1') >= 0) - - if mask_required - if match[3].nil? - value = "#{mark}/0xffffffff" - else - mask = @resource.to_hex32(match[3]) - if mask.nil? - raise ArgumentError, "MARK mask must be integer or hex between 0 and 0xffffffff" - end - value = "#{mark}/#{mask}" - end - else - unless match[3].nil? - raise ArgumentError, "iptables version #{iptables_version} does not support masks on MARK rules" - end - value = mark - end - - value - end - end - - newproperty(:pkttype, :required_features => :pkttype) do - desc <<-EOS - Sets the packet type to match. - EOS - - newvalues(:unicast, :broadcast, :multicast) - end - - newproperty(:isfragment, :required_features => :isfragment) do - desc <<-EOS - Set to true to match tcp fragments (requires type to be set to tcp) - EOS - - newvalues(:true, :false) - end - - newproperty(:recent, :required_features => :recent_limiting) do - desc <<-EOS - Enable the recent module. Takes as an argument one of set, update, - rcheck or remove. For example: - - # If anyone's appeared on the 'badguy' blacklist within - # the last 60 seconds, drop their traffic, and update the timestamp. - firewall { '100 Drop badguy traffic': - recent => 'update', - rseconds => 60, - rsource => true, - rname => 'badguy', - action => 'DROP', - chain => 'FORWARD', - } - # No-one should be sending us traffic on eth0 from localhost - # Blacklist them - firewall { '101 blacklist strange traffic': - recent => 'set', - rsource => true, - rname => 'badguy', - destination => '127.0.0.0/8', - iniface => 'eth0', - action => 'DROP', - chain => 'FORWARD', - } - EOS - - newvalues(:set, :update, :rcheck, :remove) - munge do |value| - value = "--" + value - end - end - - newproperty(:rdest, :required_features => :recent_limiting) do - desc <<-EOS - Recent module; add the destination IP address to the list. - Must be boolean true. - EOS - - newvalues(:true, :false) - end - - newproperty(:rsource, :required_features => :recent_limiting) do - desc <<-EOS - Recent module; add the source IP address to the list. - Must be boolean true. - EOS - - newvalues(:true, :false) - end - - newproperty(:rname, :required_features => :recent_limiting) do - desc <<-EOS - Recent module; The name of the list. Takes a string argument. - EOS - end - - newproperty(:rseconds, :required_features => :recent_limiting) do - desc <<-EOS - Recent module; used in conjunction with one of `recent => 'rcheck'` or - `recent => 'update'`. When used, this will narrow the match to only - happen when the address is in the list and was seen within the last given - number of seconds. - EOS - end - - newproperty(:reap, :required_features => :recent_limiting) do - desc <<-EOS - Recent module; can only be used in conjunction with the `rseconds` - attribute. When used, this will cause entries older than 'seconds' to be - purged. Must be boolean true. - EOS - - newvalues(:true, :false) - end - - newproperty(:rhitcount, :required_features => :recent_limiting) do - desc <<-EOS - Recent module; used in conjunction with `recent => 'update'` or `recent - => 'rcheck'. When used, this will narrow the match to only happen when - the address is in the list and packets had been received greater than or - equal to the given value. - EOS - end - - newproperty(:rttl, :required_features => :recent_limiting) do - desc <<-EOS - Recent module; may only be used in conjunction with one of `recent => - 'rcheck'` or `recent => 'update'`. When used, this will narrow the match - to only happen when the address is in the list and the TTL of the current - packet matches that of the packet which hit the `recent => 'set'` rule. - This may be useful if you have problems with people faking their source - address in order to DoS you via this module by disallowing others access - to your site by sending bogus packets to you. Must be boolean true. - EOS - - newvalues(:true, :false) - end - - newproperty(:socket, :required_features => :socket) do - desc <<-EOS - If true, matches if an open socket can be found by doing a coket lookup - on the packet. - EOS - - newvalues(:true, :false) - end - - newproperty(:ishasmorefrags, :required_features => :ishasmorefrags) do - desc <<-EOS - If true, matches if the packet has it's 'more fragments' bit set. ipv6. - EOS - - newvalues(:true, :false) - end - - newproperty(:islastfrag, :required_features => :islastfrag) do - desc <<-EOS - If true, matches if the packet is the last fragment. ipv6. - EOS - - newvalues(:true, :false) - end - - newproperty(:isfirstfrag, :required_features => :isfirstfrag) do - desc <<-EOS - If true, matches if the packet is the first fragment. - Sadly cannot be negated. ipv6. - EOS - - newvalues(:true, :false) - end - - newproperty(:ipsec_policy, :required_features => :ipsec_policy) do - desc <<-EOS - Sets the ipsec policy type - EOS - - newvalues(:none, :ipsec) - end - - newproperty(:ipsec_dir, :required_features => :ipsec_dir) do - desc <<-EOS - Sets the ipsec policy direction - EOS - - newvalues(:in, :out) - end - - newproperty(:mask, :required_features => :mask) do - desc <<-EOS - Sets the mask to use when `recent` is enabled. - EOS - end - - newparam(:line) do - desc <<-EOS - Read-only property for caching the rule line. - EOS - end - - autorequire(:firewallchain) do - reqs = [] - protocol = nil - - case value(:provider) - when :iptables - protocol = "IPv4" - when :ip6tables - protocol = "IPv6" - end - - unless protocol.nil? - table = value(:table) - [value(:chain), value(:jump)].each do |chain| - reqs << "#{chain}:#{table}:#{protocol}" unless ( chain.nil? || (['INPUT', 'OUTPUT', 'FORWARD'].include?(chain) && table == :filter) ) - end - end - - reqs - end - - # Classes would be a better abstraction, pending: - # http://projects.puppetlabs.com/issues/19001 - autorequire(:package) do - case value(:provider) - when :iptables, :ip6tables - %w{iptables iptables-persistent} - else - [] - end - end - - validate do - debug("[validate]") - - # TODO: this is put here to skip validation if ensure is not set. This - # is because there is a revalidation stage called later where the values - # are not set correctly. I tried tracing it - but have put in this - # workaround instead to skip. Must get to the bottom of this. - if ! value(:ensure) - return - end - - # First we make sure the chains and tables are valid combinations - if value(:table).to_s == "filter" && - value(:chain) =~ /PREROUTING|POSTROUTING/ - - self.fail "PREROUTING and POSTROUTING cannot be used in table 'filter'" - end - - if value(:table).to_s == "nat" && value(:chain) =~ /INPUT|FORWARD/ - self.fail "INPUT and FORWARD cannot be used in table 'nat'" - end - - if value(:table).to_s == "raw" && - value(:chain) =~ /INPUT|FORWARD|POSTROUTING/ - - self.fail "INPUT, FORWARD and POSTROUTING cannot be used in table raw" - end - - # Now we analyse the individual properties to make sure they apply to - # the correct combinations. - if value(:iniface) - unless value(:chain).to_s =~ /INPUT|FORWARD|PREROUTING/ - self.fail "Parameter iniface only applies to chains " \ - "INPUT,FORWARD,PREROUTING" - end - end - - if value(:outiface) - unless value(:chain).to_s =~ /OUTPUT|FORWARD|POSTROUTING/ - self.fail "Parameter outiface only applies to chains " \ - "OUTPUT,FORWARD,POSTROUTING" - end - end - - if value(:uid) - unless value(:chain).to_s =~ /OUTPUT|POSTROUTING/ - self.fail "Parameter uid only applies to chains " \ - "OUTPUT,POSTROUTING" - end - end - - if value(:gid) - unless value(:chain).to_s =~ /OUTPUT|POSTROUTING/ - self.fail "Parameter gid only applies to chains " \ - "OUTPUT,POSTROUTING" - end - end - - if value(:set_mark) - unless value(:jump).to_s =~ /MARK/ && - value(:chain).to_s =~ /PREROUTING|OUTPUT/ && - value(:table).to_s =~ /mangle/ - self.fail "Parameter set_mark only applies to " \ - "the PREROUTING or OUTPUT chain of the mangle table and when jump => MARK" - end - end - - if value(:dport) - unless value(:proto).to_s =~ /tcp|udp|sctp/ - self.fail "[%s] Parameter dport only applies to sctp, tcp and udp " \ - "protocols. Current protocol is [%s] and dport is [%s]" % - [value(:name), should(:proto), should(:dport)] - end - end - - if value(:jump).to_s == "DNAT" - unless value(:table).to_s =~ /nat/ - self.fail "Parameter jump => DNAT only applies to table => nat" - end - - unless value(:todest) - self.fail "Parameter jump => DNAT must have todest parameter" - end - end - - if value(:jump).to_s == "SNAT" - unless value(:table).to_s =~ /nat/ - self.fail "Parameter jump => SNAT only applies to table => nat" - end - - unless value(:tosource) - self.fail "Parameter jump => SNAT must have tosource parameter" - end - end - - if value(:jump).to_s == "REDIRECT" - unless value(:toports) - self.fail "Parameter jump => REDIRECT missing mandatory toports " \ - "parameter" - end - end - - if value(:jump).to_s == "MASQUERADE" - unless value(:table).to_s =~ /nat/ - self.fail "Parameter jump => MASQUERADE only applies to table => nat" - end - end - - if value(:log_prefix) || value(:log_level) - unless value(:jump).to_s == "LOG" - self.fail "Parameter log_prefix and log_level require jump => LOG" - end - end - - if value(:burst) && ! value(:limit) - self.fail "burst makes no sense without limit" - end - - if value(:action) && value(:jump) - self.fail "Only one of the parameters 'action' and 'jump' can be set" - end - - if value(:connlimit_mask) && ! value(:connlimit_above) - self.fail "Parameter 'connlimit_mask' requires 'connlimit_above'" - end - - if value(:mask) && ! value(:recent) - self.fail "Mask can only be set if recent is enabled." - end - - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/type/firewallchain.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/type/firewallchain.rb deleted file mode 100644 index 3e3c5d1370..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/type/firewallchain.rb +++ /dev/null @@ -1,222 +0,0 @@ -# This is a workaround for bug: #4248 whereby ruby files outside of the normal -# provider/type path do not load until pluginsync has occured on the puppetmaster -# -# In this case I'm trying the relative path first, then falling back to normal -# mechanisms. This should be fixed in future versions of puppet but it looks -# like we'll need to maintain this for some time perhaps. -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__),"..","..")) -require 'puppet/util/firewall' - -Puppet::Type.newtype(:firewallchain) do - include Puppet::Util::Firewall - - @doc = <<-EOS - This type provides the capability to manage rule chains for firewalls. - - Currently this supports only iptables, ip6tables and ebtables on Linux. And - provides support for setting the default policy on chains and tables that - allow it. - - **Autorequires:** - If Puppet is managing the iptables or iptables-persistent packages, and - the provider is iptables_chain, the firewall resource will autorequire - those packages to ensure that any required binaries are installed. - EOS - - feature :iptables_chain, "The provider provides iptables chain features." - feature :policy, "Default policy (inbuilt chains only)" - - ensurable do - defaultvalues - defaultto :present - end - - newparam(:name) do - desc <<-EOS - The canonical name of the chain. - - For iptables the format must be {chain}:{table}:{protocol}. - EOS - isnamevar - - validate do |value| - if value !~ Nameformat then - raise ArgumentError, "Inbuilt chains must be in the form {chain}:{table}:{protocol} where {table} is one of FILTER, NAT, MANGLE, RAW, RAWPOST, BROUTE or empty (alias for filter), chain can be anything without colons or one of PREROUTING, POSTROUTING, BROUTING, INPUT, FORWARD, OUTPUT for the inbuilt chains, and {protocol} being IPv4, IPv6, ethernet (ethernet bridging) got '#{value}' table:'#{$1}' chain:'#{$2}' protocol:'#{$3}'" - else - chain = $1 - table = $2 - protocol = $3 - case table - when 'filter' - if chain =~ /^(PREROUTING|POSTROUTING|BROUTING)$/ - raise ArgumentError, "INPUT, OUTPUT and FORWARD are the only inbuilt chains that can be used in table 'filter'" - end - when 'mangle' - if chain =~ InternalChains && chain == 'BROUTING' - raise ArgumentError, "PREROUTING, POSTROUTING, INPUT, FORWARD and OUTPUT are the only inbuilt chains that can be used in table 'mangle'" - end - when 'nat' - if chain =~ /^(BROUTING|FORWARD)$/ - raise ArgumentError, "PREROUTING, POSTROUTING, INPUT, and OUTPUT are the only inbuilt chains that can be used in table 'nat'" - end - if protocol =~/^(IP(v6)?)?$/ - raise ArgumentError, "table nat isn't valid in IPv6. You must specify ':IPv4' as the name suffix" - end - when 'raw' - if chain =~ /^(POSTROUTING|BROUTING|INPUT|FORWARD)$/ - raise ArgumentError,'PREROUTING and OUTPUT are the only inbuilt chains in the table \'raw\'' - end - when 'broute' - if protocol != 'ethernet' - raise ArgumentError,'BROUTE is only valid with protocol \'ethernet\'' - end - if chain =~ /^PREROUTING|POSTROUTING|INPUT|FORWARD|OUTPUT$/ - raise ArgumentError,'BROUTING is the only inbuilt chain allowed on on table \'broute\'' - end - end - if chain == 'BROUTING' && ( protocol != 'ethernet' || table!='broute') - raise ArgumentError,'BROUTING is the only inbuilt chain allowed on on table \'BROUTE\' with protocol \'ethernet\' i.e. \'broute:BROUTING:enternet\'' - end - end - end - end - - newproperty(:policy) do - desc <<-EOS - This is the action to when the end of the chain is reached. - It can only be set on inbuilt chains (INPUT, FORWARD, OUTPUT, - PREROUTING, POSTROUTING) and can be one of: - - * accept - the packet is accepted - * drop - the packet is dropped - * queue - the packet is passed userspace - * return - the packet is returned to calling (jump) queue - or the default of inbuilt chains - EOS - newvalues(:accept, :drop, :queue, :return) - defaultto do - # ethernet chain have an ACCEPT default while other haven't got an - # allowed value - if @resource[:name] =~ /:ethernet$/ - :accept - else - nil - end - end - end - - newparam(:purge, :boolean => true) do - desc <<-EOS - Purge unmanaged firewall rules in this chain - EOS - newvalues(:false, :true) - defaultto :false - end - - newparam(:ignore) do - desc <<-EOS - Regex to perform on firewall rules to exempt unmanaged rules from purging (when enabled). - This is matched against the output of `iptables-save`. - - This can be a single regex, or an array of them. - To support flags, use the ruby inline flag mechanism. - Meaning a regex such as - /foo/i - can be written as - '(?i)foo' or '(?i:foo)' - - Full example: - firewallchain { 'INPUT:filter:IPv4': - purge => true, - ignore => [ - '-j fail2ban-ssh', # ignore the fail2ban jump rule - '--comment "[^"]*(?i:ignore)[^"]*"', # ignore any rules with "ignore" (case insensitive) in the comment in the rule - ], - } - EOS - - validate do |value| - unless value.is_a?(Array) or value.is_a?(String) or value == false - self.devfail "Ignore must be a string or an Array" - end - end - munge do |patterns| # convert into an array of {Regex}es - patterns = [patterns] if patterns.is_a?(String) - patterns.map{|p| Regexp.new(p)} - end - end - - # Classes would be a better abstraction, pending: - # http://projects.puppetlabs.com/issues/19001 - autorequire(:package) do - case value(:provider) - when :iptables_chain - %w{iptables iptables-persistent} - else - [] - end - end - - validate do - debug("[validate]") - - value(:name).match(Nameformat) - chain = $1 - table = $2 - protocol = $3 - - # Check that we're not removing an internal chain - if chain =~ InternalChains && value(:ensure) == :absent - self.fail "Cannot remove in-built chains" - end - - if value(:policy).nil? && protocol == 'ethernet' - self.fail "you must set a non-empty policy on all ethernet table chains" - end - - # Check that we're not setting a policy on a user chain - if chain !~ InternalChains && - !value(:policy).nil? && - protocol != 'ethernet' - - self.fail "policy can only be set on in-built chains (with the exception of ethernet chains) (table:#{table} chain:#{chain} protocol:#{protocol})" - end - - # no DROP policy on nat table - if table == 'nat' && - value(:policy) == :drop - - self.fail 'The "nat" table is not intended for filtering, the use of DROP is therefore inhibited' - end - end - - def generate - return [] unless self.purge? - - value(:name).match(Nameformat) - chain = $1 - table = $2 - protocol = $3 - - provider = case protocol - when 'IPv4' - :iptables - when 'IPv6' - :ip6tables - end - - # gather a list of all rules present on the system - rules_resources = Puppet::Type.type(:firewall).instances - - # Keep only rules in this chain - rules_resources.delete_if { |res| (res[:provider] != provider or res.provider.properties[:table].to_s != table or res.provider.properties[:chain] != chain) } - - # Remove rules which match our ignore filter - rules_resources.delete_if {|res| value(:ignore).find_index{|f| res.provider.properties[:line].match(f)}} if value(:ignore) - - # We mark all remaining rules for deletion, and then let the catalog override us on rules which should be present - rules_resources.each {|res| res[:ensure] = :absent} - - rules_resources - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/util/firewall.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/util/firewall.rb deleted file mode 100644 index aa26d3bc70..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/util/firewall.rb +++ /dev/null @@ -1,225 +0,0 @@ -require 'socket' -require 'resolv' -require 'puppet/util/ipcidr' - -# Util module for puppetlabs-firewall -module Puppet::Util::Firewall - # Translate the symbolic names for icmp packet types to integers - def icmp_name_to_number(value_icmp, protocol) - if value_icmp =~ /\d{1,2}$/ - value_icmp - elsif protocol == 'inet' - case value_icmp - when "echo-reply" then "0" - when "destination-unreachable" then "3" - when "source-quench" then "4" - when "redirect" then "6" - when "echo-request" then "8" - when "router-advertisement" then "9" - when "router-solicitation" then "10" - when "time-exceeded" then "11" - when "parameter-problem" then "12" - when "timestamp-request" then "13" - when "timestamp-reply" then "14" - when "address-mask-request" then "17" - when "address-mask-reply" then "18" - else nil - end - elsif protocol == 'inet6' - case value_icmp - when "destination-unreachable" then "1" - when "time-exceeded" then "3" - when "parameter-problem" then "4" - when "echo-request" then "128" - when "echo-reply" then "129" - when "router-solicitation" then "133" - when "router-advertisement" then "134" - when "redirect" then "137" - else nil - end - else - raise ArgumentError, "unsupported protocol family '#{protocol}'" - end - end - - # Convert log_level names to their respective numbers - def log_level_name_to_number(value) - #TODO make this 0-7 only - if value =~ /\d/ - value - else - case value - when "panic" then "0" - when "alert" then "1" - when "crit" then "2" - when "err" then "3" - when "error" then "3" - when "warn" then "4" - when "warning" then "4" - when "not" then "5" - when "notice" then "5" - when "info" then "6" - when "debug" then "7" - else nil - end - end - end - - # This method takes a string and a protocol and attempts to convert - # it to a port number if valid. - # - # If the string already contains a port number or perhaps a range of ports - # in the format 22:1000 for example, it simply returns the string and does - # nothing. - def string_to_port(value, proto) - proto = proto.to_s - unless proto =~ /^(tcp|udp)$/ - proto = 'tcp' - end - - if value.kind_of?(String) - if value.match(/^\d+(-\d+)?$/) - return value - else - return Socket.getservbyname(value, proto).to_s - end - else - Socket.getservbyname(value.to_s, proto).to_s - end - end - - # Takes an address and returns it in CIDR notation. - # - # If the address is: - # - # - A hostname: - # It will be resolved - # - An IPv4 address: - # It will be qualified with a /32 CIDR notation - # - An IPv6 address: - # It will be qualified with a /128 CIDR notation - # - An IP address with a CIDR notation: - # It will be normalised - # - An IP address with a dotted-quad netmask: - # It will be converted to CIDR notation - # - Any address with a resulting prefix length of zero: - # It will return nil which is equivilent to not specifying an address - # - def host_to_ip(value) - begin - value = Puppet::Util::IPCidr.new(value) - rescue - value = Puppet::Util::IPCidr.new(Resolv.getaddress(value)) - end - - return nil if value.prefixlen == 0 - value.cidr - end - - # Takes an address mask and converts the host portion to CIDR notation. - # - # This takes into account you can negate a mask but follows all rules - # defined in host_to_ip for the host/address part. - # - def host_to_mask(value) - match = value.match /(!)\s?(.*)$/ - return host_to_ip(value) unless match - - cidr = host_to_ip(match[2]) - return nil if cidr == nil - "#{match[1]} #{cidr}" - end - - # Validates the argument is int or hex, and returns valid hex - # conversion of the value or nil otherwise. - def to_hex32(value) - begin - value = Integer(value) - if value.between?(0, 0xffffffff) - return '0x' + value.to_s(16) - end - rescue ArgumentError - # pass - end - return nil - end - - def persist_iptables(proto) - debug("[persist_iptables]") - - # Basic normalisation for older Facter - os_key = Facter.value(:osfamily) - os_key ||= case Facter.value(:operatingsystem) - when 'RedHat', 'CentOS', 'Fedora', 'Scientific', 'SL', 'SLC', 'Ascendos', 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS', 'OEL', 'Amazon', 'XenServer' - 'RedHat' - when 'Debian', 'Ubuntu' - 'Debian' - else - Facter.value(:operatingsystem) - end - - # Older iptables-persistent doesn't provide save action. - if os_key == 'Debian' - persist_ver = Facter.value(:iptables_persistent_version) - if (persist_ver and Puppet::Util::Package.versioncmp(persist_ver, '0.5.0') < 0) - os_key = 'Debian_manual' - end - end - - # Fedora 15 and newer use systemd to persist iptable rules - if os_key == 'RedHat' && Facter.value(:operatingsystem) == 'Fedora' && Facter.value(:operatingsystemrelease).to_i >= 15 - os_key = 'Fedora' - end - - # RHEL 7 and newer also use systemd to persist iptable rules - if os_key == 'RedHat' && Facter.value(:operatingsystem) == 'RedHat' && Facter.value(:operatingsystemrelease).to_i >= 7 - os_key = 'Fedora' - end - - cmd = case os_key.to_sym - when :RedHat - case proto.to_sym - when :IPv4 - %w{/sbin/service iptables save} - when :IPv6 - %w{/sbin/service ip6tables save} - end - when :Fedora - case proto.to_sym - when :IPv4 - %w{/usr/libexec/iptables/iptables.init save} - when :IPv6 - %w{/usr/libexec/iptables/ip6tables.init save} - end - when :Debian - case proto.to_sym - when :IPv4, :IPv6 - %w{/usr/sbin/service iptables-persistent save} - end - when :Debian_manual - case proto.to_sym - when :IPv4 - ["/bin/sh", "-c", "/sbin/iptables-save > /etc/iptables/rules"] - end - when :Archlinux - case proto.to_sym - when :IPv4 - ["/bin/sh", "-c", "/usr/sbin/iptables-save > /etc/iptables/iptables.rules"] - when :IPv6 - ["/bin/sh", "-c", "/usr/sbin/ip6tables-save > /etc/iptables/ip6tables.rules"] - end - end - - # Catch unsupported OSs from the case statement above. - if cmd.nil? - debug('firewall: Rule persistence is not supported for this type/OS') - return - end - - begin - execute(cmd) - rescue Puppet::ExecutionFailure => detail - warning("Unable to persist firewall rules: #{detail}") - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/util/ipcidr.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/util/ipcidr.rb deleted file mode 100644 index 87e8d5e372..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/lib/puppet/util/ipcidr.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'ipaddr' - -# IPCidr object wrapper for IPAddr -module Puppet - module Util - class IPCidr < IPAddr - def initialize(ipaddr) - begin - super(ipaddr) - rescue ArgumentError => e - if e.message =~ /invalid address/ - raise ArgumentError, "Invalid address from IPAddr.new: #{ipaddr}" - else - raise e - end - end - end - - def netmask - _to_string(@mask_addr) - end - - def prefixlen - m = case @family - when Socket::AF_INET - IN4MASK - when Socket::AF_INET6 - IN6MASK - else - raise "unsupported address family" - end - return $1.length if /\A(1*)(0*)\z/ =~ (@mask_addr & m).to_s(2) - raise "bad addr_mask format" - end - - def cidr - cidr = sprintf("%s/%s", self.to_s, self.prefixlen) - cidr - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/init.pp deleted file mode 100644 index 759f328235..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/init.pp +++ /dev/null @@ -1,36 +0,0 @@ -# = Class: firewall -# -# Manages packages and services required by the firewall type/provider. -# -# This class includes the appropriate sub-class for your operating system, -# where supported. -# -# == Parameters: -# -# [*ensure*] -# Ensure parameter passed onto Service[] resources. -# Default: running -# -class firewall ( - $ensure = running -) { - case $ensure { - /^(running|stopped)$/: { - # Do nothing. - } - default: { - fail("${title}: Ensure value '${ensure}' is not supported") - } - } - - case $::kernel { - 'Linux': { - class { "${title}::linux": - ensure => $ensure, - } - } - default: { - fail("${title}: Kernel '${::kernel}' is not currently supported") - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux.pp deleted file mode 100644 index 7c4f3a80b5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux.pp +++ /dev/null @@ -1,51 +0,0 @@ -# = Class: firewall::linux -# -# Installs the `iptables` package for Linux operating systems and includes -# the appropriate sub-class for any distribution specific services and -# additional packages. -# -# == Parameters: -# -# [*ensure*] -# Ensure parameter passed onto Service[] resources. When `running` the -# service will be started on boot, and when `stopped` it will not. -# Default: running -# -class firewall::linux ( - $ensure = running -) { - $enable = $ensure ? { - running => true, - stopped => false, - } - - package { 'iptables': - ensure => present, - } - - case $::operatingsystem { - 'RedHat', 'CentOS', 'Fedora', 'Scientific', 'SL', 'SLC', 'Ascendos', - 'CloudLinux', 'PSBM', 'OracleLinux', 'OVS', 'OEL', 'Amazon', 'XenServer': { - class { "${title}::redhat": - ensure => $ensure, - enable => $enable, - require => Package['iptables'], - } - } - 'Debian', 'Ubuntu': { - class { "${title}::debian": - ensure => $ensure, - enable => $enable, - require => Package['iptables'], - } - } - 'Archlinux': { - class { "${title}::archlinux": - ensure => $ensure, - enable => $enable, - require => Package['iptables'], - } - } - default: {} - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux/archlinux.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux/archlinux.pp deleted file mode 100644 index 546a5a80fe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux/archlinux.pp +++ /dev/null @@ -1,41 +0,0 @@ -# = Class: firewall::linux::archlinux -# -# Manages `iptables` and `ip6tables` services, and creates files used for -# persistence, on Arch Linux systems. -# -# == Parameters: -# -# [*ensure*] -# Ensure parameter passed onto Service[] resources. -# Default: running -# -# [*enable*] -# Enable parameter passed onto Service[] resources. -# Default: true -# -class firewall::linux::archlinux ( - $ensure = 'running', - $enable = true -) { - service { 'iptables': - ensure => $ensure, - enable => $enable, - hasstatus => true, - } - - service { 'ip6tables': - ensure => $ensure, - enable => $enable, - hasstatus => true, - } - - file { '/etc/iptables/iptables.rules': - ensure => present, - before => Service['iptables'], - } - - file { '/etc/iptables/ip6tables.rules': - ensure => present, - before => Service['ip6tables'], - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux/debian.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux/debian.pp deleted file mode 100644 index 4d28bc482e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux/debian.pp +++ /dev/null @@ -1,44 +0,0 @@ -# = Class: firewall::linux::debian -# -# Installs the `iptables-persistent` package for Debian-alike systems. This -# allows rules to be stored to file and restored on boot. -# -# == Parameters: -# -# [*ensure*] -# Ensure parameter passed onto Service[] resources. -# Default: running -# -# [*enable*] -# Enable parameter passed onto Service[] resources. -# Default: true -# -class firewall::linux::debian ( - $ensure = running, - $enable = true -) { - package { 'iptables-persistent': - ensure => present, - } - - if($::operatingsystemrelease =~ /^6\./ and $enable == true - and versioncmp($::iptables_persistent_version, '0.5.0') < 0 ) { - # This fixes a bug in the iptables-persistent LSB headers in 6.x, without it - # we lose idempotency - exec { 'iptables-persistent-enable': - logoutput => on_failure, - command => '/usr/sbin/update-rc.d iptables-persistent enable', - unless => '/usr/bin/test -f /etc/rcS.d/S*iptables-persistent', - require => Package['iptables-persistent'], - } - } else { - # This isn't a real service/daemon. The start action loads rules, so just - # needs to be called on system boot. - service { 'iptables-persistent': - ensure => undef, - enable => $enable, - hasstatus => true, - require => Package['iptables-persistent'], - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux/redhat.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux/redhat.pp deleted file mode 100644 index f697d211b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/manifests/linux/redhat.pp +++ /dev/null @@ -1,40 +0,0 @@ -# = Class: firewall::linux::redhat -# -# Manages the `iptables` service on RedHat-alike systems. -# -# == Parameters: -# -# [*ensure*] -# Ensure parameter passed onto Service[] resources. -# Default: running -# -# [*enable*] -# Enable parameter passed onto Service[] resources. -# Default: true -# -class firewall::linux::redhat ( - $ensure = running, - $enable = true -) { - - # RHEL 7 and later and Fedora 15 and later require the iptables-services - # package, which provides the /usr/libexec/iptables/iptables.init used by - # lib/puppet/util/firewall.rb. - if $::operatingsystem == RedHat and $::operatingsystemrelease >= 7 { - package { 'iptables-services': - ensure => present, - } - } - - if ($::operatingsystem == 'Fedora' and (( $::operatingsystemrelease =~ /^\d+/ and $::operatingsystemrelease >= 15 ) or $::operatingsystemrelease == "Rawhide")) { - package { 'iptables-services': - ensure => present, - } - } - - service { 'iptables': - ensure => $ensure, - enable => $enable, - hasstatus => true, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/metadata.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/metadata.json deleted file mode 100644 index 40fb8612bd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/metadata.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "puppetlabs-firewall", - "version": "1.1.1", - "source": "https://github.com/puppetlabs/puppetlabs-firewall", - "author": "Puppet Labs", - "license": "Apache-2.0", - "project_page": "https://github.com/puppetlabs/puppetlabs-firewall", - "summary": "Manages Firewalls such as iptable", - "operatingsystem_support": [ - { - "operatingsystem": "RedHat", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "CentOS", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "OracleLinux", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "Scientific", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "SLES", - "operatingsystemrelease": [ - "11 SP1" - ] - }, - { - "operatingsystem": "Debian", - "operatingsystemrelease": [ - "6", - "7" - ] - }, - { - "operatingsystem": "Ubuntu", - "operatingsystemrelease": [ - "10.04", - "12.04" - ] - } - ], - "requirements": [ - { "name": "pe", "version_requirement": "3.2.x" }, - { "name": "puppet", "version_requirement": "3.x" } - ], - "dependencies": [] -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/change_source_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/change_source_spec.rb deleted file mode 100644 index cdb4eab354..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/change_source_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'firewall type' do - describe 'reset' do - it 'deletes all rules' do - shell('iptables --flush; iptables -t nat --flush; iptables -t mangle --flush') - end - end - - describe 'when unmanaged rules exist' do - it 'applies with 8.0.0.1 first' do - pp = <<-EOS - class { '::firewall': } - firewall { '101 test source changes': - proto => tcp, - port => '101', - action => accept, - source => '8.0.0.1', - } - firewall { '100 test source static': - proto => tcp, - port => '100', - action => accept, - source => '8.0.0.2', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'adds a unmanaged rule without a comment' do - shell('iptables -A INPUT -t filter -s 8.0.0.3/32 -p tcp -m multiport --ports 102 -j ACCEPT') - expect(shell('iptables-save').stdout).to match(/-A INPUT -s 8\.0\.0\.3(\/32)? -p tcp -m multiport --ports 102 -j ACCEPT/) - end - - it 'contains the changable 8.0.0.1 rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -s 8\.0\.0\.1(\/32)? -p tcp -m multiport --ports 101 -m comment --comment "101 test source changes" -j ACCEPT/) - end - end - it 'contains the static 8.0.0.2 rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -s 8\.0\.0\.2(\/32)? -p tcp -m multiport --ports 100 -m comment --comment "100 test source static" -j ACCEPT/) - end - end - - it 'changes to 8.0.0.4 second' do - pp = <<-EOS - class { '::firewall': } - firewall { '101 test source changes': - proto => tcp, - port => '101', - action => accept, - source => '8.0.0.4', - } - EOS - - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/Notice: \/Stage\[main\]\/Main\/Firewall\[101 test source changes\]\/source: source changed '8\.0\.0\.1\/32' to '8\.0\.0\.4\/32'/) - end - - it 'does not contain the old changing 8.0.0.1 rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/8\.0\.0\.1/) - end - end - it 'contains the staic 8.0.0.2 rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -s 8\.0\.0\.2(\/32)? -p tcp -m multiport --ports 100 -m comment --comment "100 test source static" -j ACCEPT/) - end - end - it 'contains the changing new 8.0.0.4 rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -s 8\.0\.0\.4(\/32)? -p tcp -m multiport --ports 101 -m comment --comment "101 test source changes" -j ACCEPT/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/class_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/class_spec.rb deleted file mode 100644 index aaf05a1f53..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/class_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'spec_helper_acceptance' - -describe "firewall class:" do - it 'should run successfully' do - pp = "class { 'firewall': }" - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - - it 'ensure => stopped:' do - pp = "class { 'firewall': ensure => stopped }" - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - - it 'ensure => running:' do - pp = "class { 'firewall': ensure => running }" - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/connlimit_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/connlimit_spec.rb deleted file mode 100644 index ce6cab4ed7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/connlimit_spec.rb +++ /dev/null @@ -1,55 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'firewall type' do - - describe 'connlimit_above' do - context '10' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '500 - test': - proto => tcp, - dport => '22', - connlimit_above => '10', - action => reject, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - #connlimit-saddr is added in Ubuntu 14.04. - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --dports 22 -m comment --comment "500 - test" -m connlimit --connlimit-above 10 --connlimit-mask 32 (--connlimit-saddr )?-j REJECT --reject-with icmp-port-unreachable/) - end - end - end - end - - describe 'connlimit_mask' do - context '24' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '501 - test': - proto => tcp, - dport => '22', - connlimit_above => '10', - connlimit_mask => '24', - action => reject, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - #connlimit-saddr is added in Ubuntu 14.04. - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --dports 22 -m comment --comment "501 - test" -m connlimit --connlimit-above 10 --connlimit-mask 24 (--connlimit-saddr )?-j REJECT --reject-with icmp-port-unreachable/) - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/connmark_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/connmark_spec.rb deleted file mode 100644 index 959efbdfa7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/connmark_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'firewall type' do - - describe 'connmark' do - context '50' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '502 - test': - proto => 'all', - connmark => '0x1', - action => reject, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -m comment --comment "502 - test" -m connmark --mark 0x1 -j REJECT --reject-with icmp-port-unreachable/) - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/firewall_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/firewall_spec.rb deleted file mode 100644 index 5353e104d5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/firewall_spec.rb +++ /dev/null @@ -1,1618 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'firewall type' do - - describe 'reset' do - it 'deletes all rules' do - shell('iptables --flush; iptables -t nat --flush; iptables -t mangle --flush') - end - end - - describe 'name' do - context 'valid' do - it 'applies cleanly' do - pp = <<-EOS - class { '::firewall': } - firewall { '001 - test': ensure => present } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - end - - context 'invalid' do - it 'fails' do - pp = <<-EOS - class { '::firewall': } - firewall { 'test': ensure => present } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/Invalid value "test"./) - end - end - end - end - - describe 'ensure' do - context 'default' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '555 - test': - proto => tcp, - port => '555', - action => accept, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 555 -m comment --comment "555 - test" -j ACCEPT/) - end - end - end - - context 'present' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '555 - test': - ensure => present, - proto => tcp, - port => '555', - action => accept, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 555 -m comment --comment "555 - test" -j ACCEPT/) - end - end - end - - context 'absent' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '555 - test': - ensure => absent, - proto => tcp, - port => '555', - action => accept, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should not contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --ports 555 -m comment --comment "555 - test" -j ACCEPT/) - end - end - end - end - - describe 'source' do - context '192.168.2.0/24' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '556 - test': - proto => tcp, - port => '556', - action => accept, - source => '192.168.2.0/24', - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -s 192.168.2.0\/(24|255\.255\.255\.0) -p tcp -m multiport --ports 556 -m comment --comment "556 - test" -j ACCEPT/) - end - end - end - - context '! 192.168.2.0/24' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '556 - test': - proto => tcp, - port => '556', - action => accept, - source => '! 192.168.2.0/24', - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT (! -s|-s !) 192.168.2.0\/(24|255\.255\.255\.0) -p tcp -m multiport --ports 556 -m comment --comment "556 - test" -j ACCEPT/) - end - end - end - - # Invalid address - context '256.168.2.0/24' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '556 - test': - proto => tcp, - port => '556', - action => accept, - source => '256.168.2.0/24', - } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/host_to_ip failed for 256.168.2.0\/(24|255\.255\.255\.0)/) - end - end - - it 'should not contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -s 256.168.2.0\/(24|255\.255\.255\.0) -p tcp -m multiport --ports 556 -m comment --comment "556 - test" -j ACCEPT/) - end - end - end - end - - describe 'src_range' do - context '192.168.1.1-192.168.1.10' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '557 - test': - proto => tcp, - port => '557', - action => accept, - src_range => '192.168.1.1-192.168.1.10', - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m iprange --src-range 192.168.1.1-192.168.1.10 -m multiport --ports 557 -m comment --comment "557 - test" -j ACCEPT/) - end - end - end - - # Invalid IP - context '392.168.1.1-192.168.1.10' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '557 - test': - proto => tcp, - port => '557', - action => accept, - src_range => '392.168.1.1-192.168.1.10', - } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/Invalid value "392.168.1.1-192.168.1.10"/) - end - end - - it 'should not contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -p tcp -m iprange --src-range 392.168.1.1-192.168.1.10 -m multiport --ports 557 -m comment --comment "557 - test" -j ACCEPT/) - end - end - end - end - - describe 'destination' do - context '192.168.2.0/24' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '558 - test': - proto => tcp, - port => '558', - action => accept, - destination => '192.168.2.0/24', - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -d 192.168.2.0\/(24|255\.255\.255\.0) -p tcp -m multiport --ports 558 -m comment --comment "558 - test" -j ACCEPT/) - end - end - end - - context '! 192.168.2.0/24' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '558 - test': - proto => tcp, - port => '558', - action => accept, - destination => '! 192.168.2.0/24', - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT (! -d|-d !) 192.168.2.0\/(24|255\.255\.255\.0) -p tcp -m multiport --ports 558 -m comment --comment "558 - test" -j ACCEPT/) - end - end - end - - # Invalid address - context '256.168.2.0/24' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '558 - test': - proto => tcp, - port => '558', - action => accept, - destination => '256.168.2.0/24', - } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/host_to_ip failed for 256.168.2.0\/(24|255\.255\.255\.0)/) - end - end - - it 'should not contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -d 256.168.2.0\/(24|255\.255\.255\.0) -p tcp -m multiport --ports 558 -m comment --comment "558 - test" -j ACCEPT/) - end - end - end - end - - describe 'dst_range' do - context '192.168.1.1-192.168.1.10' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '559 - test': - proto => tcp, - port => '559', - action => accept, - dst_range => '192.168.1.1-192.168.1.10', - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m iprange --dst-range 192.168.1.1-192.168.1.10 -m multiport --ports 559 -m comment --comment "559 - test" -j ACCEPT/) - end - end - end - - # Invalid IP - context '392.168.1.1-192.168.1.10' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '559 - test': - proto => tcp, - port => '559', - action => accept, - dst_range => '392.168.1.1-192.168.1.10', - } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/Invalid value "392.168.1.1-192.168.1.10"/) - end - end - - it 'should not contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -p tcp -m iprange --dst-range 392.168.1.1-192.168.1.10 -m multiport --ports 559 -m comment --comment "559 - test" -j ACCEPT/) - end - end - end - end - - describe 'sport' do - context 'single port' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '560 - test': - proto => tcp, - sport => '560', - action => accept, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --sports 560 -m comment --comment "560 - test" -j ACCEPT/) - end - end - end - - context 'multiple ports' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '560 - test': - proto => tcp, - sport => '560-561', - action => accept, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --sports 560:561 -m comment --comment "560 - test" -j ACCEPT/) - end - end - end - - context 'invalid ports' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '560 - test': - proto => tcp, - sport => '9999560-561', - action => accept, - } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/invalid port\/service `9999560' specified/) - end - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --sports 9999560-561 -m comment --comment "560 - test" -j ACCEPT/) - end - end - end - end - - describe 'dport' do - context 'single port' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '561 - test': - proto => tcp, - dport => '561', - action => accept, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --dports 561 -m comment --comment "561 - test" -j ACCEPT/) - end - end - end - - context 'multiple ports' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '561 - test': - proto => tcp, - dport => '561-562', - action => accept, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --dports 561:562 -m comment --comment "561 - test" -j ACCEPT/) - end - end - end - - context 'invalid ports' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '561 - test': - proto => tcp, - dport => '9999561-562', - action => accept, - } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/invalid port\/service `9999561' specified/) - end - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --dports 9999561-562 -m comment --comment "560 - test" -j ACCEPT/) - end - end - end - end - - describe 'port' do - context 'single port' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '562 - test': - proto => tcp, - port => '562', - action => accept, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 562 -m comment --comment "562 - test" -j ACCEPT/) - end - end - end - - context 'multiple ports' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '562 - test': - proto => tcp, - port => '562-563', - action => accept, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 562:563 -m comment --comment "562 - test" -j ACCEPT/) - end - end - end - - context 'invalid ports' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '562 - test': - proto => tcp, - port => '9999562-563', - action => accept, - } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/invalid port\/service `9999562' specified/) - end - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --ports 9999562-563 -m comment --comment "562 - test" -j ACCEPT/) - end - end - end - end - - ['dst_type', 'src_type'].each do |type| - describe "#{type}" do - context 'MULTICAST' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '563 - test': - proto => tcp, - action => accept, - #{type} => 'MULTICAST', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m addrtype\s.*\sMULTICAST -m comment --comment "563 - test" -j ACCEPT/) - end - end - end - - context 'BROKEN' do - it 'fails' do - pp = <<-EOS - class { '::firewall': } - firewall { '563 - test': - proto => tcp, - action => accept, - #{type} => 'BROKEN', - } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/Invalid value "BROKEN"./) - end - end - - it 'should not contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -p tcp -m addrtype\s.*\sBROKEN -m comment --comment "563 - test" -j ACCEPT/) - end - end - end - end - end - - describe 'tcp_flags' do - context 'FIN,SYN ACK' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '564 - test': - proto => tcp, - action => accept, - tcp_flags => 'FIN,SYN ACK', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN ACK -m comment --comment "564 - test" -j ACCEPT/) - end - end - end - end - - describe 'chain' do - context 'INPUT' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '565 - test': - proto => tcp, - action => accept, - chain => 'FORWARD', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A FORWARD -p tcp -m comment --comment "565 - test" -j ACCEPT/) - end - end - end - end - - describe 'table' do - context 'mangle' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '566 - test': - proto => tcp, - action => accept, - table => 'mangle', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save -t mangle') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m comment --comment "566 - test" -j ACCEPT/) - end - end - end - context 'nat' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '566 - test2': - proto => tcp, - action => accept, - table => 'nat', - chain => 'OUTPUT', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should not contain the rule' do - shell('iptables-save -t nat') do |r| - expect(r.stdout).to match(/-A OUTPUT -p tcp -m comment --comment "566 - test2" -j ACCEPT/) - end - end - end - end - - describe 'jump' do - after :all do - iptables_flush_all_tables - expect(shell('iptables -t filter -X TEST').stderr).to eq("") - end - - context 'MARK' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewallchain { 'TEST:filter:IPv4': - ensure => present, - } - firewall { '567 - test': - proto => tcp, - chain => 'INPUT', - jump => 'TEST', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m comment --comment "567 - test" -j TEST/) - end - end - end - - context 'jump and apply' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewallchain { 'TEST:filter:IPv4': - ensure => present, - } - firewall { '568 - test': - proto => tcp, - chain => 'INPUT', - action => 'accept', - jump => 'TEST', - } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/Only one of the parameters 'action' and 'jump' can be set/) - end - end - - it 'should not contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -p tcp -m comment --comment "568 - test" -j TEST/) - end - end - end - end - - describe 'tosource' do - context '192.168.1.1' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '568 - test': - proto => tcp, - table => 'nat', - chain => 'POSTROUTING', - jump => 'SNAT', - tosource => '192.168.1.1', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save -t nat') do |r| - expect(r.stdout).to match(/A POSTROUTING -p tcp -m comment --comment "568 - test" -j SNAT --to-source 192.168.1.1/) - end - end - end - end - - describe 'todest' do - context '192.168.1.1' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '569 - test': - proto => tcp, - table => 'nat', - chain => 'PREROUTING', - jump => 'DNAT', - source => '200.200.200.200', - todest => '192.168.1.1', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save -t nat') do |r| - expect(r.stdout).to match(/-A PREROUTING -s 200.200.200.200(\/32)? -p tcp -m comment --comment "569 - test" -j DNAT --to-destination 192.168.1.1/) - end - end - end - end - - describe 'toports' do - context '192.168.1.1' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '570 - test': - proto => icmp, - table => 'nat', - chain => 'PREROUTING', - jump => 'REDIRECT', - toports => '2222', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save -t nat') do |r| - expect(r.stdout).to match(/-A PREROUTING -p icmp -m comment --comment "570 - test" -j REDIRECT --to-ports 2222/) - end - end - end - end - - # RHEL5 does not support --random - if default['platform'] !~ /el-5/ - describe 'random' do - context '192.168.1.1' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '570 - test 2': - proto => all, - table => 'nat', - chain => 'POSTROUTING', - jump => 'MASQUERADE', - source => '172.30.0.0/16', - random => true - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - it 'should contain the rule' do - shell('iptables-save -t nat') do |r| - expect(r.stdout).to match(/-A POSTROUTING -s 172\.30\.0\.0\/16 -m comment --comment "570 - test 2" -j MASQUERADE --random/) - end - end - end - end - end - - describe 'icmp' do - context 'any' do - it 'fails' do - pp = <<-EOS - class { '::firewall': } - firewall { '571 - test': - proto => icmp, - icmp => 'any', - } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/This behaviour should be achieved by omitting or undefining the ICMP parameter/) - end - end - - it 'should not contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -p icmp -m comment --comment "570 - test" -m icmp --icmp-type 11/) - end - end - end - end - - #iptables version 1.3.5 is not suppored by the ip6tables provider - if default['platform'] !~ /el-5/ - describe 'hop_limit' do - context '5' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '571 - test': - ensure => present, - proto => tcp, - port => '571', - action => accept, - hop_limit => '5', - provider => 'ip6tables', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('ip6tables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 571 -m comment --comment "571 - test" -m hl --hl-eq 5 -j ACCEPT/) - end - end - end - - context 'invalid' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '571 - test': - ensure => present, - proto => tcp, - port => '571', - action => accept, - hop_limit => 'invalid', - provider => 'ip6tables', - } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/Invalid value "invalid"./) - end - end - - it 'should not contain the rule' do - shell('ip6tables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --ports 571 -m comment --comment "571 - test" -m hl --hl-eq invalid -j ACCEPT/) - end - end - end - end - - describe 'ishasmorefrags' do - context 'true' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '587 - test': - ensure => present, - proto => tcp, - port => '587', - action => accept, - ishasmorefrags => true, - provider => 'ip6tables', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('ip6tables-save') do |r| - expect(r.stdout).to match(/A INPUT -p tcp -m frag --fragid 0 --fragmore -m multiport --ports 587 -m comment --comment "587 - test" -j ACCEPT/) - end - end - end - - context 'false' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '588 - test': - ensure => present, - proto => tcp, - port => '588', - action => accept, - ishasmorefrags => false, - provider => 'ip6tables', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('ip6tables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 588 -m comment --comment "588 - test" -j ACCEPT/) - end - end - end - end - - describe 'islastfrag' do - context 'true' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '589 - test': - ensure => present, - proto => tcp, - port => '589', - action => accept, - islastfrag => true, - provider => 'ip6tables', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('ip6tables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m frag --fragid 0 --fraglast -m multiport --ports 589 -m comment --comment "589 - test" -j ACCEPT/) - end - end - end - - context 'false' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '590 - test': - ensure => present, - proto => tcp, - port => '590', - action => accept, - islastfrag => false, - provider => 'ip6tables', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('ip6tables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 590 -m comment --comment "590 - test" -j ACCEPT/) - end - end - end - end - - describe 'isfirstfrag' do - context 'true' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '591 - test': - ensure => present, - proto => tcp, - port => '591', - action => accept, - isfirstfrag => true, - provider => 'ip6tables', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('ip6tables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m frag --fragid 0 --fragfirst -m multiport --ports 591 -m comment --comment "591 - test" -j ACCEPT/) - end - end - end - - context 'false' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '592 - test': - ensure => present, - proto => tcp, - port => '592', - action => accept, - isfirstfrag => false, - provider => 'ip6tables', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('ip6tables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 592 -m comment --comment "592 - test" -j ACCEPT/) - end - end - end - end - end - - describe 'limit' do - context '500/sec' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '572 - test': - ensure => present, - proto => tcp, - port => '572', - action => accept, - limit => '500/sec', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 572 -m comment --comment "572 - test" -m limit --limit 500\/sec -j ACCEPT/) - end - end - end - end - - describe 'burst' do - context '500' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '573 - test': - ensure => present, - proto => tcp, - port => '573', - action => accept, - limit => '500/sec', - burst => '1500', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 573 -m comment --comment "573 - test" -m limit --limit 500\/sec --limit-burst 1500 -j ACCEPT/) - end - end - end - - context 'invalid' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '571 - test': - ensure => present, - proto => tcp, - port => '571', - action => accept, - limit => '500/sec', - burst => '1500/sec', - } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/Invalid value "1500\/sec"./) - end - end - - it 'should not contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --ports 573 -m comment --comment "573 - test" -m limit --limit 500\/sec --limit-burst 1500\/sec -j ACCEPT/) - end - end - end - end - - describe 'uid' do - context 'nobody' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '574 - test': - ensure => present, - proto => tcp, - chain => 'OUTPUT', - port => '574', - action => accept, - uid => 'nobody', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A OUTPUT -p tcp -m owner --uid-owner (nobody|\d+) -m multiport --ports 574 -m comment --comment "574 - test" -j ACCEPT/) - end - end - end - end - - describe 'gid' do - context 'root' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '575 - test': - ensure => present, - proto => tcp, - chain => 'OUTPUT', - port => '575', - action => accept, - gid => 'root', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A OUTPUT -p tcp -m owner --gid-owner (root|\d+) -m multiport --ports 575 -m comment --comment "575 - test" -j ACCEPT/) - end - end - end - end - - #iptables version 1.3.5 does not support masks on MARK rules - if default['platform'] !~ /el-5/ - describe 'set_mark' do - context '0x3e8/0xffffffff' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '580 - test': - ensure => present, - chain => 'OUTPUT', - proto => tcp, - port => '580', - jump => 'MARK', - table => 'mangle', - set_mark => '0x3e8/0xffffffff', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save -t mangle') do |r| - expect(r.stdout).to match(/-A OUTPUT -p tcp -m multiport --ports 580 -m comment --comment "580 - test" -j MARK --set-xmark 0x3e8\/0xffffffff/) - end - end - end - end - end - - describe 'pkttype' do - context 'multicast' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '581 - test': - ensure => present, - proto => tcp, - port => '581', - action => accept, - pkttype => 'multicast', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 581 -m pkttype --pkt-type multicast -m comment --comment "581 - test" -j ACCEPT/) - end - end - end - - context 'test' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '582 - test': - ensure => present, - proto => tcp, - port => '582', - action => accept, - pkttype => 'test', - } - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/Invalid value "test"./) - end - end - - it 'should not contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/-A INPUT -p tcp -m multiport --ports 582 -m pkttype --pkt-type multicast -m comment --comment "582 - test" -j ACCEPT/) - end - end - end - end - - describe 'isfragment' do - context 'true' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '583 - test': - ensure => present, - proto => tcp, - port => '583', - action => accept, - isfragment => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -f -m multiport --ports 583 -m comment --comment "583 - test" -j ACCEPT/) - end - end - end - - context 'false' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '584 - test': - ensure => present, - proto => tcp, - port => '584', - action => accept, - isfragment => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --ports 584 -m comment --comment "584 - test" -j ACCEPT/) - end - end - end - end - - # RHEL5/SLES does not support -m socket - describe 'socket', :unless => (default['platform'] =~ /el-5/ or fact('operatingsystem') == 'SLES') do - context 'true' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '585 - test': - ensure => present, - proto => tcp, - port => '585', - action => accept, - chain => 'PREROUTING', - table => 'nat', - socket => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save -t nat') do |r| - expect(r.stdout).to match(/-A PREROUTING -p tcp -m multiport --ports 585 -m socket -m comment --comment "585 - test" -j ACCEPT/) - end - end - end - - context 'false' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '586 - test': - ensure => present, - proto => tcp, - port => '586', - action => accept, - chain => 'PREROUTING', - table => 'nat', - socket => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save -t nat') do |r| - expect(r.stdout).to match(/-A PREROUTING -p tcp -m multiport --ports 586 -m comment --comment "586 - test" -j ACCEPT/) - end - end - end - end - - describe 'ipsec_policy' do - context 'ipsec' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '593 - test': - ensure => 'present', - action => 'reject', - chain => 'OUTPUT', - destination => '20.0.0.0/8', - ipsec_dir => 'out', - ipsec_policy => 'ipsec', - proto => 'all', - reject => 'icmp-net-unreachable', - table => 'filter', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A OUTPUT -d 20.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "593 - test" -m policy --dir out --pol ipsec -j REJECT --reject-with icmp-net-unreachable/) - end - end - end - - context 'none' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '594 - test': - ensure => 'present', - action => 'reject', - chain => 'OUTPUT', - destination => '20.0.0.0/8', - ipsec_dir => 'out', - ipsec_policy => 'none', - proto => 'all', - reject => 'icmp-net-unreachable', - table => 'filter', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A OUTPUT -d 20.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "594 - test" -m policy --dir out --pol none -j REJECT --reject-with icmp-net-unreachable/) - end - end - end - end - - describe 'ipsec_dir' do - context 'out' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '595 - test': - ensure => 'present', - action => 'reject', - chain => 'OUTPUT', - destination => '20.0.0.0/8', - ipsec_dir => 'out', - ipsec_policy => 'ipsec', - proto => 'all', - reject => 'icmp-net-unreachable', - table => 'filter', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A OUTPUT -d 20.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "595 - test" -m policy --dir out --pol ipsec -j REJECT --reject-with icmp-net-unreachable/) - end - end - end - - context 'in' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '596 - test': - ensure => 'present', - action => 'reject', - chain => 'INPUT', - destination => '20.0.0.0/8', - ipsec_dir => 'in', - ipsec_policy => 'none', - proto => 'all', - reject => 'icmp-net-unreachable', - table => 'filter', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -d 20.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "596 - test" -m policy --dir in --pol none -j REJECT --reject-with icmp-net-unreachable/) - end - end - end - end - - describe 'recent' do - context 'set' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '597 - test': - ensure => 'present', - chain => 'INPUT', - destination => '30.0.0.0/8', - proto => 'all', - table => 'filter', - recent => 'set', - rdest => true, - rname => 'list1', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - # Mask added as of Ubuntu 14.04. - expect(r.stdout).to match(/-A INPUT -d 30.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "597 - test" -m recent --set --name list1 (--mask 255.255.255.255 )?--rdest/) - end - end - end - - context 'rcheck' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '598 - test': - ensure => 'present', - chain => 'INPUT', - destination => '30.0.0.0/8', - proto => 'all', - table => 'filter', - recent => 'rcheck', - rsource => true, - rname => 'list1', - rseconds => 60, - rhitcount => 5, - rttl => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -d 30.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "598 - test" -m recent --rcheck --seconds 60 --hitcount 5 --rttl --name list1 (--mask 255.255.255.255 )?--rsource/) - end - end - end - - context 'update' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '599 - test': - ensure => 'present', - chain => 'INPUT', - destination => '30.0.0.0/8', - proto => 'all', - table => 'filter', - recent => 'update', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -d 30.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "599 - test" -m recent --update/) - end - end - end - - context 'remove' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '600 - test': - ensure => 'present', - chain => 'INPUT', - destination => '30.0.0.0/8', - proto => 'all', - table => 'filter', - recent => 'remove', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should contain the rule' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/-A INPUT -d 30.0.0.0\/(8|255\.0\.0\.0) -m comment --comment "600 - test" -m recent --remove/) - end - end - end - end - - describe 'reset' do - it 'deletes all rules' do - shell('ip6tables --flush') - shell('iptables --flush; iptables -t nat --flush; iptables -t mangle --flush') - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/firewallchain_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/firewallchain_spec.rb deleted file mode 100644 index 757336a75c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/firewallchain_spec.rb +++ /dev/null @@ -1,125 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'puppet resource firewallchain command:' do - before :all do - iptables_flush_all_tables - end - describe 'ensure' do - context 'present' do - it 'applies cleanly' do - pp = <<-EOS - firewallchain { 'MY_CHAIN:filter:IPv4': - ensure => present, - } - EOS - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - it 'finds the chain' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/MY_CHAIN/) - end - end - end - - context 'absent' do - it 'applies cleanly' do - pp = <<-EOS - firewallchain { 'MY_CHAIN:filter:IPv4': - ensure => absent, - } - EOS - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - it 'fails to find the chain' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/MY_CHAIN/) - end - end - end - end - - # XXX purge => false is not yet implemented - #context 'adding a firewall rule to a chain:' do - # it 'applies cleanly' do - # pp = <<-EOS - # firewallchain { 'MY_CHAIN:filter:IPv4': - # ensure => present, - # } - # firewall { '100 my rule': - # chain => 'MY_CHAIN', - # action => 'accept', - # proto => 'tcp', - # dport => 5000, - # } - # EOS - # # Run it twice and test for idempotency - # apply_manifest(pp, :catch_failures => true) - # apply_manifest(pp, :catch_changes => true) - # end - #end - - #context 'not purge firewallchain chains:' do - # it 'does not purge the rule' do - # pp = <<-EOS - # firewallchain { 'MY_CHAIN:filter:IPv4': - # ensure => present, - # purge => false, - # before => Resources['firewall'], - # } - # resources { 'firewall': - # purge => true, - # } - # EOS - # # Run it twice and test for idempotency - # apply_manifest(pp, :catch_failures => true) do |r| - # expect(r.stdout).to_not match(/removed/) - # expect(r.stderr).to eq('') - # end - # apply_manifest(pp, :catch_changes => true) - # end - - # it 'still has the rule' do - # pp = <<-EOS - # firewall { '100 my rule': - # chain => 'MY_CHAIN', - # action => 'accept', - # proto => 'tcp', - # dport => 5000, - # } - # EOS - # # Run it twice and test for idempotency - # apply_manifest(pp, :catch_changes => true) - # end - #end - - describe 'policy' do - after :all do - shell('iptables -t filter -P FORWARD ACCEPT') - end - - context 'DROP' do - it 'applies cleanly' do - pp = <<-EOS - firewallchain { 'FORWARD:filter:IPv4': - policy => 'drop', - } - EOS - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - it 'finds the chain' do - shell('iptables-save') do |r| - expect(r.stdout).to match(/FORWARD DROP/) - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/ip6_fragment_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/ip6_fragment_spec.rb deleted file mode 100644 index bfce0e607f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/ip6_fragment_spec.rb +++ /dev/null @@ -1,114 +0,0 @@ -require 'spec_helper_acceptance' - -if default['platform'] =~ /el-5/ - describe "firewall ip6tables doesn't work on 1.3.5 because --comment is missing" do - before :all do - ip6tables_flush_all_tables - end - - it "can't use ip6tables" do - pp = <<-EOS - class { '::firewall': } - firewall { '599 - test': - ensure => present, - proto => 'tcp', - provider => 'ip6tables', - } - EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/ip6tables provider is not supported/) - end - end -else - describe 'firewall ishasmorefrags/islastfrag/isfirstfrag properties' do - before :all do - ip6tables_flush_all_tables - end - - shared_examples "is idempotent" do |values, line_match| - it "changes the values to #{values}" do - pp = <<-EOS - class { '::firewall': } - firewall { '599 - test': - ensure => present, - proto => 'tcp', - provider => 'ip6tables', - #{values} - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - shell('ip6tables-save') do |r| - expect(r.stdout).to match(/#{line_match}/) - end - end - end - shared_examples "doesn't change" do |values, line_match| - it "doesn't change the values to #{values}" do - pp = <<-EOS - class { '::firewall': } - firewall { '599 - test': - ensure => present, - proto => 'tcp', - provider => 'ip6tables', - #{values} - } - EOS - - apply_manifest(pp, :catch_changes => true) - - shell('ip6tables-save') do |r| - expect(r.stdout).to match(/#{line_match}/) - end - end - end - - describe 'adding a rule' do - context 'when unset' do - before :all do - ip6tables_flush_all_tables - end - it_behaves_like 'is idempotent', '', /-A INPUT -p tcp -m comment --comment "599 - test"/ - end - context 'when set to true' do - before :all do - ip6tables_flush_all_tables - end - it_behaves_like "is idempotent", 'ishasmorefrags => true, islastfrag => true, isfirstfrag => true', /-A INPUT -p tcp -m frag --fragid 0 --fragmore -m frag --fragid 0 --fraglast -m frag --fragid 0 --fragfirst -m comment --comment "599 - test"/ - end - context 'when set to false' do - before :all do - ip6tables_flush_all_tables - end - it_behaves_like "is idempotent", 'ishasmorefrags => false, islastfrag => false, isfirstfrag => false', /-A INPUT -p tcp -m comment --comment "599 - test"/ - end - end - describe 'editing a rule' do - context 'when unset or false' do - before :each do - ip6tables_flush_all_tables - shell('ip6tables -A INPUT -p tcp -m comment --comment "599 - test"') - end - context 'and current value is false' do - it_behaves_like "doesn't change", 'ishasmorefrags => false, islastfrag => false, isfirstfrag => false', /-A INPUT -p tcp -m comment --comment "599 - test"/ - end - context 'and current value is true' do - it_behaves_like "is idempotent", 'ishasmorefrags => true, islastfrag => true, isfirstfrag => true', /-A INPUT -p tcp -m frag --fragid 0 --fragmore -m frag --fragid 0 --fraglast -m frag --fragid 0 --fragfirst -m comment --comment "599 - test"/ - end - end - context 'when set to true' do - before :each do - ip6tables_flush_all_tables - shell('ip6tables -A INPUT -p tcp -m frag --fragid 0 --fragmore -m frag --fragid 0 --fraglast -m frag --fragid 0 --fragfirst -m comment --comment "599 - test"') - end - context 'and current value is false' do - it_behaves_like "is idempotent", 'ishasmorefrags => false, islastfrag => false, isfirstfrag => false', /-A INPUT -p tcp -m comment --comment "599 - test"/ - end - context 'and current value is true' do - it_behaves_like "doesn't change", 'ishasmorefrags => true, islastfrag => true, isfirstfrag => true', /-A INPUT -p tcp -m frag --fragid 0 --fragmore -m frag --fragid 0 --fraglast -m frag --fragid 0 --fragfirst -m comment --comment "599 - test"/ - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/isfragment_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/isfragment_spec.rb deleted file mode 100644 index 7fdedc2873..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/isfragment_spec.rb +++ /dev/null @@ -1,92 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'firewall isfragment property' do - before :all do - iptables_flush_all_tables - end - - shared_examples "is idempotent" do |value, line_match| - it "changes the value to #{value}" do - pp = <<-EOS - class { '::firewall': } - firewall { '597 - test': - ensure => present, - proto => 'tcp', - #{value} - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - shell('iptables-save') do |r| - expect(r.stdout).to match(/#{line_match}/) - end - end - end - shared_examples "doesn't change" do |value, line_match| - it "doesn't change the value to #{value}" do - pp = <<-EOS - class { '::firewall': } - firewall { '597 - test': - ensure => present, - proto => 'tcp', - #{value} - } - EOS - - apply_manifest(pp, :catch_changes => true) - - shell('iptables-save') do |r| - expect(r.stdout).to match(/#{line_match}/) - end - end - end - - describe 'adding a rule' do - context 'when unset' do - before :all do - iptables_flush_all_tables - end - it_behaves_like 'is idempotent', '', /-A INPUT -p tcp -m comment --comment "597 - test"/ - end - context 'when set to true' do - before :all do - iptables_flush_all_tables - end - it_behaves_like 'is idempotent', 'isfragment => true,', /-A INPUT -p tcp -f -m comment --comment "597 - test"/ - end - context 'when set to false' do - before :all do - iptables_flush_all_tables - end - it_behaves_like "is idempotent", 'isfragment => false,', /-A INPUT -p tcp -m comment --comment "597 - test"/ - end - end - describe 'editing a rule' do - context 'when unset or false' do - before :each do - iptables_flush_all_tables - shell('iptables -A INPUT -p tcp -m comment --comment "597 - test"') - end - context 'and current value is false' do - it_behaves_like "doesn't change", 'isfragment => false,', /-A INPUT -p tcp -m comment --comment "597 - test"/ - end - context 'and current value is true' do - it_behaves_like "is idempotent", 'isfragment => true,', /-A INPUT -p tcp -f -m comment --comment "597 - test"/ - end - end - context 'when set to true' do - before :each do - iptables_flush_all_tables - shell('iptables -A INPUT -p tcp -f -m comment --comment "597 - test"') - end - context 'and current value is false' do - it_behaves_like "is idempotent", 'isfragment => false,', /-A INPUT -p tcp -m comment --comment "597 - test"/ - end - context 'and current value is true' do - it_behaves_like "doesn't change", 'isfragment => true,', /-A INPUT -p tcp -f -m comment --comment "597 - test"/ - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64-pe.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64-pe.yml deleted file mode 100644 index 3a6470beae..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64-pe.yml +++ /dev/null @@ -1,12 +0,0 @@ -HOSTS: - centos-59-x64: - roles: - - master - - database - - console - platform: el-5-x86_64 - box : centos-59-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: pe diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64.yml deleted file mode 100644 index b41a947169..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-59-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-59-x64: - roles: - - master - platform: el-5-x86_64 - box : centos-59-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-fusion.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-fusion.yml deleted file mode 100644 index d5166735ec..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-fusion.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-fusion503-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box - hypervisor : fusion -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-pe.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-pe.yml deleted file mode 100644 index 7d9242f1b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64-pe.yml +++ /dev/null @@ -1,12 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - - database - - dashboard - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: pe diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64.yml deleted file mode 100644 index 05540ed8c5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/centos-64-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-607-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-607-x64.yml deleted file mode 100644 index 4c8be42d03..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-607-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - debian-607-x64: - roles: - - master - platform: debian-6-amd64 - box : debian-607-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-70rc1-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-70rc1-x64.yml deleted file mode 100644 index 19181c123d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/debian-70rc1-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - debian-70rc1-x64: - roles: - - master - platform: debian-7-amd64 - box : debian-70rc1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/default.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/default.yml deleted file mode 100644 index 05540ed8c5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/fedora-18-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/fedora-18-x64.yml deleted file mode 100644 index 624b53716b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/fedora-18-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - fedora-18-x64: - roles: - - master - platform: fedora-18-x86_64 - box : fedora-18-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/sles-11sp1-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/sles-11sp1-x64.yml deleted file mode 100644 index 554c37a505..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/sles-11sp1-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - sles-11sp1-x64: - roles: - - master - platform: sles-11-x86_64 - box : sles-11sp1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml deleted file mode 100644 index 5047017e62..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-10044-x64: - roles: - - master - platform: ubuntu-10.04-amd64 - box : ubuntu-server-10044-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml deleted file mode 100644 index d065b304f8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml deleted file mode 100644 index 7e789c8d8d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml +++ /dev/null @@ -1,9 +0,0 @@ -HOSTS: - ubuntu-server-1404-x64: - roles: - - master - platform: ubuntu-14.04-64 - box: puppetlabs/ubuntu-14.04-64-nocm - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/params_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/params_spec.rb deleted file mode 100644 index c0f93ad21f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/params_spec.rb +++ /dev/null @@ -1,154 +0,0 @@ -require 'spec_helper_acceptance' - -describe "param based tests:" do - # Takes a hash and converts it into a firewall resource - def pp(params) - name = params.delete('name') || '100 test' - pm = <<-EOS -firewall { '#{name}': - EOS - - params.each do |k,v| - pm += <<-EOS - #{k} => #{v}, - EOS - end - - pm += <<-EOS -} - EOS - pm - end - - it 'test various params', :unless => (default['platform'].match(/el-5/) || fact('operatingsystem') == 'SLES') do - iptables_flush_all_tables - - ppm = pp({ - 'table' => "'raw'", - 'socket' => 'true', - 'chain' => "'PREROUTING'", - 'jump' => 'LOG', - 'log_level' => 'debug', - }) - - expect(apply_manifest(ppm, :catch_failures => true).exit_code).to eq(2) - expect(apply_manifest(ppm, :catch_failures => true).exit_code).to be_zero - end - - it 'test log rule' do - iptables_flush_all_tables - - ppm = pp({ - 'name' => '998 log all', - 'proto' => 'all', - 'jump' => 'LOG', - 'log_level' => 'debug', - }) - expect(apply_manifest(ppm, :catch_failures => true).exit_code).to eq(2) - expect(apply_manifest(ppm, :catch_failures => true).exit_code).to be_zero - end - - it 'test log rule - changing names' do - iptables_flush_all_tables - - ppm1 = pp({ - 'name' => '004 log all INVALID packets', - 'chain' => 'INPUT', - 'proto' => 'all', - 'ctstate' => 'INVALID', - 'jump' => 'LOG', - 'log_level' => '3', - 'log_prefix' => '"IPTABLES dropped invalid: "', - }) - - ppm2 = pp({ - 'name' => '003 log all INVALID packets', - 'chain' => 'INPUT', - 'proto' => 'all', - 'ctstate' => 'INVALID', - 'jump' => 'LOG', - 'log_level' => '3', - 'log_prefix' => '"IPTABLES dropped invalid: "', - }) - - expect(apply_manifest(ppm1, :catch_failures => true).exit_code).to eq(2) - - ppm = <<-EOS + "\n" + ppm2 - resources { 'firewall': - purge => true, - } - EOS - expect(apply_manifest(ppm, :catch_failures => true).exit_code).to eq(2) - end - - it 'test chain - changing names' do - iptables_flush_all_tables - - ppm1 = pp({ - 'name' => '004 with a chain', - 'chain' => 'INPUT', - 'proto' => 'all', - }) - - ppm2 = pp({ - 'name' => '004 with a chain', - 'chain' => 'OUTPUT', - 'proto' => 'all', - }) - - apply_manifest(ppm1, :expect_changes => true) - - ppm = <<-EOS + "\n" + ppm2 - resources { 'firewall': - purge => true, - } - EOS - expect(apply_manifest(ppm2, :expect_failures => true).stderr).to match(/is not supported/) - end - - it 'test log rule - idempotent' do - iptables_flush_all_tables - - ppm1 = pp({ - 'name' => '004 log all INVALID packets', - 'chain' => 'INPUT', - 'proto' => 'all', - 'ctstate' => 'INVALID', - 'jump' => 'LOG', - 'log_level' => '3', - 'log_prefix' => '"IPTABLES dropped invalid: "', - }) - - expect(apply_manifest(ppm1, :catch_failures => true).exit_code).to eq(2) - expect(apply_manifest(ppm1, :catch_failures => true).exit_code).to be_zero - end - - it 'test src_range rule' do - iptables_flush_all_tables - - ppm = pp({ - 'name' => '997 block src ip range', - 'chain' => 'INPUT', - 'proto' => 'all', - 'action' => 'drop', - 'src_range' => '"10.0.0.1-10.0.0.10"', - }) - expect(apply_manifest(ppm, :catch_failures => true).exit_code).to eq(2) - expect(apply_manifest(ppm, :catch_failures => true).exit_code).to be_zero - end - - it 'test dst_range rule' do - iptables_flush_all_tables - - ppm = pp({ - 'name' => '998 block dst ip range', - 'chain' => 'INPUT', - 'proto' => 'all', - 'action' => 'drop', - 'dst_range' => '"10.0.0.2-10.0.0.20"', - }) - expect(apply_manifest(ppm, :catch_failures => true).exit_code).to eq(2) - expect(apply_manifest(ppm, :catch_failures => true).exit_code).to be_zero - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/purge_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/purge_spec.rb deleted file mode 100644 index f62b14f936..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/purge_spec.rb +++ /dev/null @@ -1,124 +0,0 @@ -require 'spec_helper_acceptance' - -describe "purge tests:" do - context('resources purge') do - before(:all) do - iptables_flush_all_tables - - shell('iptables -A INPUT -s 1.2.1.2') - shell('iptables -A INPUT -s 1.2.1.2') - end - - it 'make sure duplicate existing rules get purged' do - - pp = <<-EOS - class { 'firewall': } - resources { 'firewall': - purge => true, - } - EOS - - apply_manifest(pp, :expect_changes => true) - end - - it 'saves' do - shell('iptables-save') do |r| - expect(r.stdout).to_not match(/1\.2\.1\.2/) - expect(r.stderr).to eq("") - end - end - end - - context('chain purge') do - before(:each) do - iptables_flush_all_tables - - shell('iptables -A INPUT -p tcp -s 1.2.1.1') - shell('iptables -A INPUT -p udp -s 1.2.1.1') - shell('iptables -A OUTPUT -s 1.2.1.2 -m comment --comment "010 output-1.2.1.2"') - end - - it 'purges only the specified chain' do - pp = <<-EOS - class { 'firewall': } - firewallchain { 'INPUT:filter:IPv4': - purge => true, - } - EOS - - apply_manifest(pp, :expect_changes => true) - - shell('iptables-save') do |r| - expect(r.stdout).to match(/010 output-1\.2\.1\.2/) - expect(r.stdout).to_not match(/1\.2\.1\.1/) - expect(r.stderr).to eq("") - end - end - - it 'ignores managed rules' do - pp = <<-EOS - class { 'firewall': } - firewallchain { 'OUTPUT:filter:IPv4': - purge => true, - } - firewall { '010 output-1.2.1.2': - chain => 'OUTPUT', - proto => 'all', - source => '1.2.1.2', - } - EOS - - apply_manifest(pp, :catch_changes => true) - end - - it 'ignores specified rules' do - pp = <<-EOS - class { 'firewall': } - firewallchain { 'INPUT:filter:IPv4': - purge => true, - ignore => [ - '-s 1\.2\.1\.1', - ], - } - EOS - - apply_manifest(pp, :catch_changes => true) - end - - it 'adds managed rules with ignored rules' do - pp = <<-EOS - class { 'firewall': } - firewallchain { 'INPUT:filter:IPv4': - purge => true, - ignore => [ - '-s 1\.2\.1\.1', - ], - } - firewall { '014 input-1.2.1.6': - chain => 'INPUT', - proto => 'all', - source => '1.2.1.6', - } - -> firewall { '013 input-1.2.1.5': - chain => 'INPUT', - proto => 'all', - source => '1.2.1.5', - } - -> firewall { '012 input-1.2.1.4': - chain => 'INPUT', - proto => 'all', - source => '1.2.1.4', - } - -> firewall { '011 input-1.2.1.3': - chain => 'INPUT', - proto => 'all', - source => '1.2.1.3', - } - EOS - - apply_manifest(pp, :catch_failures => true) - - expect(shell('iptables-save').stdout).to match(/-A INPUT -s 1\.2\.1\.1(\/32)? -p tcp\s?\n-A INPUT -s 1\.2\.1\.1(\/32)? -p udp/) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/resource_cmd_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/resource_cmd_spec.rb deleted file mode 100644 index c9a852d826..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/resource_cmd_spec.rb +++ /dev/null @@ -1,93 +0,0 @@ -require 'spec_helper_acceptance' - -# Here we want to test the the resource commands ability to work with different -# existing ruleset scenarios. This will give the parsing capabilities of the -# code a good work out. -describe 'puppet resource firewall command:' do - context 'make sure it returns no errors when executed on a clean machine' do - it do - shell('puppet resource firewall') do |r| - r.exit_code.should be_zero - # don't check stdout, some boxes come with rules, that is normal - r.stderr.should be_empty - end - end - end - - context 'flush iptables and make sure it returns nothing afterwards' do - before(:all) do - iptables_flush_all_tables - end - - # No rules, means no output thanks. And no errors as well. - it do - shell('puppet resource firewall') do |r| - r.exit_code.should be_zero - r.stderr.should be_empty - r.stdout.should == "\n" - end - end - end - - context 'accepts rules without comments' do - before(:all) do - iptables_flush_all_tables - shell('iptables -A INPUT -j ACCEPT -p tcp --dport 80') - end - - it do - shell('puppet resource firewall') do |r| - r.exit_code.should be_zero - # don't check stdout, testing preexisting rules, output is normal - r.stderr.should be_empty - end - end - end - - context 'accepts rules with invalid comments' do - before(:all) do - iptables_flush_all_tables - shell('iptables -A INPUT -j ACCEPT -p tcp --dport 80 -m comment --comment "http"') - end - - it do - shell('puppet resource firewall') do |r| - r.exit_code.should be_zero - # don't check stdout, testing preexisting rules, output is normal - r.stderr.should be_empty - end - end - end - - context 'accepts rules with negation' do - before :all do - iptables_flush_all_tables - shell('iptables -t nat -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p tcp -j MASQUERADE --to-ports 1024-65535') - shell('iptables -t nat -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p udp -j MASQUERADE --to-ports 1024-65535') - shell('iptables -t nat -A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -j MASQUERADE') - end - - it do - shell('puppet resource firewall') do |r| - r.exit_code.should be_zero - # don't check stdout, testing preexisting rules, output is normal - r.stderr.should be_empty - end - end - end - - context 'accepts rules with match extension tcp flag' do - before :all do - iptables_flush_all_tables - shell('iptables -t mangle -A PREROUTING -d 1.2.3.4 -p tcp -m tcp -m multiport --dports 80,443,8140 -j MARK --set-mark 42') - end - - it do - shell('puppet resource firewall') do |r| - r.exit_code.should be_zero - # don't check stdout, testing preexisting rules, output is normal - r.stderr.should be_empty - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/rules_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/rules_spec.rb deleted file mode 100644 index b0e66ae5bc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/rules_spec.rb +++ /dev/null @@ -1,252 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'complex ruleset 1' do - before :all do - iptables_flush_all_tables - end - - after :all do - shell('iptables -t filter -P INPUT ACCEPT') - shell('iptables -t filter -P FORWARD ACCEPT') - shell('iptables -t filter -P OUTPUT ACCEPT') - shell('iptables -t filter --flush') - end - - it 'applies cleanly' do - pp = <<-EOS - firewall { '090 forward allow local': - chain => 'FORWARD', - proto => 'all', - source => '10.0.0.0/8', - destination => '10.0.0.0/8', - action => 'accept', - } - firewall { '100 forward standard allow tcp': - chain => 'FORWARD', - source => '10.0.0.0/8', - destination => '!10.0.0.0/8', - proto => 'tcp', - state => 'NEW', - port => [80,443,21,20,22,53,123,43,873,25,465], - action => 'accept', - } - firewall { '100 forward standard allow udp': - chain => 'FORWARD', - source => '10.0.0.0/8', - destination => '!10.0.0.0/8', - proto => 'udp', - port => [53,123], - action => 'accept', - } - firewall { '100 forward standard allow icmp': - chain => 'FORWARD', - source => '10.0.0.0/8', - destination => '!10.0.0.0/8', - proto => 'icmp', - action => 'accept', - } - - firewall { '090 ignore ipsec': - table => 'nat', - chain => 'POSTROUTING', - outiface => 'eth0', - ipsec_policy => 'ipsec', - ipsec_dir => 'out', - action => 'accept', - } - firewall { '093 ignore 10.0.0.0/8': - table => 'nat', - chain => 'POSTROUTING', - outiface => 'eth0', - destination => '10.0.0.0/8', - action => 'accept', - } - firewall { '093 ignore 172.16.0.0/12': - table => 'nat', - chain => 'POSTROUTING', - outiface => 'eth0', - destination => '172.16.0.0/12', - action => 'accept', - } - firewall { '093 ignore 192.168.0.0/16': - table => 'nat', - chain => 'POSTROUTING', - outiface => 'eth0', - destination => '192.168.0.0/16', - action => 'accept', - } - firewall { '100 masq outbound': - table => 'nat', - chain => 'POSTROUTING', - outiface => 'eth0', - jump => 'MASQUERADE', - } - firewall { '101 redirect port 1': - table => 'nat', - chain => 'PREROUTING', - iniface => 'eth0', - proto => 'tcp', - dport => '1', - toports => '22', - jump => 'REDIRECT', - } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - - it 'contains appropriate rules' do - shell('iptables-save') do |r| - [ - /INPUT ACCEPT/, - /FORWARD ACCEPT/, - /OUTPUT ACCEPT/, - /-A FORWARD -s 10.0.0.0\/(8|255\.0\.0\.0) -d 10.0.0.0\/(8|255\.0\.0\.0) -m comment --comment \"090 forward allow local\" -j ACCEPT/, - /-A FORWARD -s 10.0.0.0\/(8|255\.0\.0\.0) (! -d|-d !) 10.0.0.0\/(8|255\.0\.0\.0) -p icmp -m comment --comment \"100 forward standard allow icmp\" -j ACCEPT/, - /-A FORWARD -s 10.0.0.0\/(8|255\.0\.0\.0) (! -d|-d !) 10.0.0.0\/(8|255\.0\.0\.0) -p tcp -m multiport --ports 80,443,21,20,22,53,123,43,873,25,465 -m comment --comment \"100 forward standard allow tcp\" -m state --state NEW -j ACCEPT/, - /-A FORWARD -s 10.0.0.0\/(8|255\.0\.0\.0) (! -d|-d !) 10.0.0.0\/(8|255\.0\.0\.0) -p udp -m multiport --ports 53,123 -m comment --comment \"100 forward standard allow udp\" -j ACCEPT/ - ].each do |line| - expect(r.stdout).to match(line) - end - end - end -end - -describe 'complex ruleset 2' do - after :all do - shell('iptables -t filter -P INPUT ACCEPT') - shell('iptables -t filter -P FORWARD ACCEPT') - shell('iptables -t filter -P OUTPUT ACCEPT') - shell('iptables -t filter --flush') - expect(shell('iptables -t filter -X LOCAL_INPUT').stderr).to eq("") - expect(shell('iptables -t filter -X LOCAL_INPUT_PRE').stderr).to eq("") - end - - it 'applies cleanly' do - pp = <<-EOS - class { '::firewall': } - - Firewall { - proto => 'all', - stage => 'pre', - } - Firewallchain { - stage => 'pre', - purge => 'true', - ignore => [ - '--comment "[^"]*(?i:ignore)[^"]*"', - ], - } - - firewall { '010 INPUT allow established and related': - proto => 'all', - state => ['ESTABLISHED', 'RELATED'], - action => 'accept', - before => Firewallchain['INPUT:filter:IPv4'], - } - firewall { '012 accept loopback': - iniface => 'lo', - action => 'accept', - before => Firewallchain['INPUT:filter:IPv4'], - } - firewall { '020 ssh': - proto => 'tcp', - dport => '22', - state => 'NEW', - action => 'accept', - before => Firewallchain['INPUT:filter:IPv4'], - } - - firewall { '013 icmp echo-request': - proto => 'icmp', - icmp => 'echo-request', - action => 'accept', - source => '10.0.0.0/8', - } - firewall { '013 icmp destination-unreachable': - proto => 'icmp', - icmp => 'destination-unreachable', - action => 'accept', - } - firewall { '013 icmp time-exceeded': - proto => 'icmp', - icmp => 'time-exceeded', - action => 'accept', - } - firewall { '999 reject': - action => 'reject', - reject => 'icmp-host-prohibited', - } - - - firewallchain { 'LOCAL_INPUT_PRE:filter:IPv4': } - firewall { '001 LOCAL_INPUT_PRE': - jump => 'LOCAL_INPUT_PRE', - require => Firewallchain['LOCAL_INPUT_PRE:filter:IPv4'], - } - firewallchain { 'LOCAL_INPUT:filter:IPv4': } - firewall { '900 LOCAL_INPUT': - jump => 'LOCAL_INPUT', - require => Firewallchain['LOCAL_INPUT:filter:IPv4'], - } - firewallchain { 'INPUT:filter:IPv4': - policy => 'drop', - ignore => [ - '-j fail2ban-ssh', - '--comment "[^"]*(?i:ignore)[^"]*"', - ], - } - - - firewall { '010 allow established and related': - chain => 'FORWARD', - proto => 'all', - state => ['ESTABLISHED','RELATED'], - action => 'accept', - before => Firewallchain['FORWARD:filter:IPv4'], - } - firewallchain { 'FORWARD:filter:IPv4': - policy => 'drop', - } - - firewallchain { 'OUTPUT:filter:IPv4': } - - - # purge unknown rules from mangle table - firewallchain { ['PREROUTING:mangle:IPv4', 'INPUT:mangle:IPv4', 'FORWARD:mangle:IPv4', 'OUTPUT:mangle:IPv4', 'POSTROUTING:mangle:IPv4']: } - - # and the nat table - firewallchain { ['PREROUTING:nat:IPv4', 'INPUT:nat:IPv4', 'OUTPUT:nat:IPv4', 'POSTROUTING:nat:IPv4']: } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - it 'contains appropriate rules' do - shell('iptables-save') do |r| - [ - /INPUT DROP/, - /FORWARD DROP/, - /OUTPUT ACCEPT/, - /LOCAL_INPUT/, - /LOCAL_INPUT_PRE/, - /-A INPUT -m comment --comment \"001 LOCAL_INPUT_PRE\" -j LOCAL_INPUT_PRE/, - /-A INPUT -m comment --comment \"010 INPUT allow established and related\" -m state --state RELATED,ESTABLISHED -j ACCEPT/, - /-A INPUT -i lo -m comment --comment \"012 accept loopback\" -j ACCEPT/, - /-A INPUT -p icmp -m comment --comment \"013 icmp destination-unreachable\" -m icmp --icmp-type 3 -j ACCEPT/, - /-A INPUT -s 10.0.0.0\/(8|255\.0\.0\.0) -p icmp -m comment --comment \"013 icmp echo-request\" -m icmp --icmp-type 8 -j ACCEPT/, - /-A INPUT -p icmp -m comment --comment \"013 icmp time-exceeded\" -m icmp --icmp-type 11 -j ACCEPT/, - /-A INPUT -p tcp -m multiport --dports 22 -m comment --comment \"020 ssh\" -m state --state NEW -j ACCEPT/, - /-A INPUT -m comment --comment \"900 LOCAL_INPUT\" -j LOCAL_INPUT/, - /-A INPUT -m comment --comment \"999 reject\" -j REJECT --reject-with icmp-host-prohibited/, - /-A FORWARD -m comment --comment \"010 allow established and related\" -m state --state RELATED,ESTABLISHED -j ACCEPT/ - ].each do |line| - expect(r.stdout).to match(line) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/socket_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/socket_spec.rb deleted file mode 100644 index c4a05348cf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/socket_spec.rb +++ /dev/null @@ -1,97 +0,0 @@ -require 'spec_helper_acceptance' - -# RHEL5 does not support -m socket -describe 'firewall socket property', :unless => (default['platform'] =~ /el-5/ || fact('operatingsystem') == 'SLES') do - before :all do - iptables_flush_all_tables - end - - shared_examples "is idempotent" do |value, line_match| - it "changes the value to #{value}" do - pp = <<-EOS - class { '::firewall': } - firewall { '598 - test': - ensure => present, - proto => 'tcp', - chain => 'PREROUTING', - table => 'raw', - #{value} - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - shell('iptables-save -t raw') do |r| - expect(r.stdout).to match(/#{line_match}/) - end - end - end - shared_examples "doesn't change" do |value, line_match| - it "doesn't change the value to #{value}" do - pp = <<-EOS - class { '::firewall': } - firewall { '598 - test': - ensure => present, - proto => 'tcp', - chain => 'PREROUTING', - table => 'raw', - #{value} - } - EOS - - apply_manifest(pp, :catch_changes => true) - - shell('iptables-save -t raw') do |r| - expect(r.stdout).to match(/#{line_match}/) - end - end - end - - describe 'adding a rule' do - context 'when unset' do - before :all do - iptables_flush_all_tables - end - it_behaves_like 'is idempotent', '', /-A PREROUTING -p tcp -m comment --comment "598 - test"/ - end - context 'when set to true' do - before :all do - iptables_flush_all_tables - end - it_behaves_like 'is idempotent', 'socket => true,', /-A PREROUTING -p tcp -m socket -m comment --comment "598 - test"/ - end - context 'when set to false' do - before :all do - iptables_flush_all_tables - end - it_behaves_like "is idempotent", 'socket => false,', /-A PREROUTING -p tcp -m comment --comment "598 - test"/ - end - end - describe 'editing a rule' do - context 'when unset or false' do - before :each do - iptables_flush_all_tables - shell('iptables -t raw -A PREROUTING -p tcp -m comment --comment "598 - test"') - end - context 'and current value is false' do - it_behaves_like "doesn't change", 'socket => false,', /-A PREROUTING -p tcp -m comment --comment "598 - test"/ - end - context 'and current value is true' do - it_behaves_like "is idempotent", 'socket => true,', /-A PREROUTING -p tcp -m socket -m comment --comment "598 - test"/ - end - end - context 'when set to true' do - before :each do - iptables_flush_all_tables - shell('iptables -t raw -A PREROUTING -p tcp -m socket -m comment --comment "598 - test"') - end - context 'and current value is false' do - it_behaves_like "is idempotent", 'socket => false,', /-A PREROUTING -p tcp -m comment --comment "598 - test"/ - end - context 'and current value is true' do - it_behaves_like "doesn't change", 'socket => true,', /-A PREROUTING -p tcp -m socket -m comment --comment "598 - test"/ - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/standard_usage_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/standard_usage_spec.rb deleted file mode 100644 index f29278b97f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/acceptance/standard_usage_spec.rb +++ /dev/null @@ -1,55 +0,0 @@ -require 'spec_helper_acceptance' - -# Some tests for the standard recommended usage -describe 'standard usage tests:' do - it 'applies twice' do - pp = <<-EOS - class my_fw::pre { - Firewall { - require => undef, - } - - # Default firewall rules - firewall { '000 accept all icmp': - proto => 'icmp', - action => 'accept', - }-> - firewall { '001 accept all to lo interface': - proto => 'all', - iniface => 'lo', - action => 'accept', - }-> - firewall { '002 accept related established rules': - proto => 'all', - ctstate => ['RELATED', 'ESTABLISHED'], - action => 'accept', - } - } - class my_fw::post { - firewall { '999 drop all': - proto => 'all', - action => 'drop', - before => undef, - } - } - resources { "firewall": - purge => true - } - Firewall { - before => Class['my_fw::post'], - require => Class['my_fw::pre'], - } - class { ['my_fw::pre', 'my_fw::post']: } - class { 'firewall': } - firewall { '500 open up port 22': - action => 'accept', - proto => 'tcp', - dport => 22, - } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/fixtures/ip6tables/conversion_hash.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/fixtures/ip6tables/conversion_hash.rb deleted file mode 100644 index 7c507d78bd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/fixtures/ip6tables/conversion_hash.rb +++ /dev/null @@ -1,107 +0,0 @@ -# These hashes allow us to iterate across a series of test data -# creating rspec examples for each parameter to ensure the input :line -# extrapolates to the desired value for the parameter in question. And -# vice-versa - -# This hash is for testing a line conversion to a hash of parameters -# which will be used to create a resource. -ARGS_TO_HASH6 = { - 'source_destination_ipv6_no_cidr' => { - :line => '-A INPUT -s 2001:db8:85a3::8a2e:370:7334 -d 2001:db8:85a3::8a2e:370:7334 -m comment --comment "000 source destination ipv6 no cidr"', - :table => 'filter', - :provider => 'ip6tables', - :params => { - :source => '2001:db8:85a3::8a2e:370:7334/128', - :destination => '2001:db8:85a3::8a2e:370:7334/128', - }, - }, - 'source_destination_ipv6_netmask' => { - :line => '-A INPUT -s 2001:db8:1234::/ffff:ffff:ffff:0000:0000:0000:0000:0000 -d 2001:db8:4321::/ffff:ffff:ffff:0000:0000:0000:0000:0000 -m comment --comment "000 source destination ipv6 netmask"', - :table => 'filter', - :provider => 'ip6tables', - :params => { - :source => '2001:db8:1234::/48', - :destination => '2001:db8:4321::/48', - }, - }, -} - -# This hash is for testing converting a hash to an argument line. -HASH_TO_ARGS6 = { - 'zero_prefixlen_ipv6' => { - :params => { - :name => '100 zero prefix length ipv6', - :table => 'filter', - :provider => 'ip6tables', - :source => '::/0', - :destination => '::/0', - }, - :args => ['-t', :filter, '-p', :tcp, '-m', 'comment', '--comment', '100 zero prefix length ipv6'], - }, - 'source_destination_ipv4_no_cidr' => { - :params => { - :name => '000 source destination ipv4 no cidr', - :table => 'filter', - :provider => 'ip6tables', - :source => '1.1.1.1', - :destination => '2.2.2.2', - }, - :args => ['-t', :filter, '-s', '1.1.1.1/32', '-d', '2.2.2.2/32', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv4 no cidr'], - }, - 'source_destination_ipv6_no_cidr' => { - :params => { - :name => '000 source destination ipv6 no cidr', - :table => 'filter', - :provider => 'ip6tables', - :source => '2001:db8:1234::', - :destination => '2001:db8:4321::', - }, - :args => ['-t', :filter, '-s', '2001:db8:1234::/128', '-d', '2001:db8:4321::/128', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv6 no cidr'], - }, - 'source_destination_ipv6_netmask' => { - :params => { - :name => '000 source destination ipv6 netmask', - :table => 'filter', - :provider => 'ip6tables', - :source => '2001:db8:1234::/ffff:ffff:ffff:0000:0000:0000:0000:0000', - :destination => '2001:db8:4321::/ffff:ffff:ffff:0000:0000:0000:0000:0000', - }, - :args => ['-t', :filter, '-s', '2001:db8:1234::/48', '-d', '2001:db8:4321::/48', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv6 netmask'], - }, - 'frag_ishasmorefrags' => { - :params => { - :name => "100 has more fragments", - :ishasmorefrags => true, - :provider => 'ip6tables', - :table => "filter", - }, - :args => ["-t", :filter, "-p", :tcp, "-m", "frag", "--fragid", "0", "--fragmore", "-m", "comment", "--comment", "100 has more fragments"], - }, - 'frag_islastfrag' => { - :params => { - :name => "100 last fragment", - :islastfrag => true, - :provider => 'ip6tables', - :table => "filter", - }, - :args => ["-t", :filter, "-p", :tcp, "-m", "frag", "--fragid", "0", "--fraglast", "-m", "comment", "--comment", "100 last fragment"], - }, - 'frag_isfirstfrags' => { - :params => { - :name => "100 first fragment", - :isfirstfrag => true, - :provider => 'ip6tables', - :table => "filter", - }, - :args => ["-t", :filter, "-p", :tcp, "-m", "frag", "--fragid", "0", "--fragfirst", "-m", "comment", "--comment", "100 first fragment"], - }, - 'hop_limit' => { - :params => { - :name => "100 hop limit", - :hop_limit => 255, - :provider => 'ip6tables', - :table => "filter", - }, - :args => ["-t", :filter, "-p", :tcp, "-m", "comment", "--comment", "100 hop limit", "-m", "hl", "--hl-eq", 255], - }, -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/fixtures/iptables/conversion_hash.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/fixtures/iptables/conversion_hash.rb deleted file mode 100644 index 105d27fb6b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/fixtures/iptables/conversion_hash.rb +++ /dev/null @@ -1,934 +0,0 @@ -# These hashes allow us to iterate across a series of test data -# creating rspec examples for each parameter to ensure the input :line -# extrapolates to the desired value for the parameter in question. And -# vice-versa - -# This hash is for testing a line conversion to a hash of parameters -# which will be used to create a resource. -ARGS_TO_HASH = { - 'dport_and_sport' => { - :line => '-A nova-compute-FORWARD -s 0.0.0.0/32 -d 255.255.255.255/32 -p udp -m udp --sport 68 --dport 67 -j ACCEPT', - :table => 'filter', - :params => { - :action => 'accept', - :chain => 'nova-compute-FORWARD', - :source => '0.0.0.0/32', - :destination => '255.255.255.255/32', - :sport => ['68'], - :dport => ['67'], - :proto => 'udp', - }, - }, - 'long_rule_1' => { - :line => '-A INPUT -s 1.1.1.1/32 -d 1.1.1.1/32 -p tcp -m multiport --dports 7061,7062 -m multiport --sports 7061,7062 -m comment --comment "000 allow foo" -j ACCEPT', - :table => 'filter', - :compare_all => true, - :params => { - :action => "accept", - :chain => "INPUT", - :destination => "1.1.1.1/32", - :dport => ["7061","7062"], - :ensure => :present, - :line => '-A INPUT -s 1.1.1.1/32 -d 1.1.1.1/32 -p tcp -m multiport --dports 7061,7062 -m multiport --sports 7061,7062 -m comment --comment "000 allow foo" -j ACCEPT', - :name => "000 allow foo", - :proto => "tcp", - :provider => "iptables", - :source => "1.1.1.1/32", - :sport => ["7061","7062"], - :table => "filter", - }, - }, - 'action_drop_1' => { - :line => '-A INPUT -m comment --comment "000 allow foo" -j DROP', - :table => 'filter', - :params => { - :jump => nil, - :action => "drop", - }, - }, - 'action_reject_1' => { - :line => '-A INPUT -m comment --comment "000 allow foo" -j REJECT', - :table => 'filter', - :params => { - :jump => nil, - :action => "reject", - }, - }, - 'action_nil_1' => { - :line => '-A INPUT -m comment --comment "000 allow foo"', - :table => 'filter', - :params => { - :jump => nil, - :action => nil, - }, - }, - 'jump_custom_chain_1' => { - :line => '-A INPUT -m comment --comment "000 allow foo" -j custom_chain', - :table => 'filter', - :params => { - :jump => "custom_chain", - :action => nil, - }, - }, - 'source_destination_ipv4_no_cidr' => { - :line => '-A INPUT -s 1.1.1.1 -d 2.2.2.2 -m comment --comment "000 source destination ipv4 no cidr"', - :table => 'filter', - :params => { - :source => '1.1.1.1/32', - :destination => '2.2.2.2/32', - }, - }, - 'source_destination_ipv6_no_cidr' => { - :line => '-A INPUT -s 2001:db8:85a3::8a2e:370:7334 -d 2001:db8:85a3::8a2e:370:7334 -m comment --comment "000 source destination ipv6 no cidr"', - :table => 'filter', - :params => { - :source => '2001:db8:85a3::8a2e:370:7334/128', - :destination => '2001:db8:85a3::8a2e:370:7334/128', - }, - }, - 'source_destination_ipv4_netmask' => { - :line => '-A INPUT -s 1.1.1.0/255.255.255.0 -d 2.2.0.0/255.255.0.0 -m comment --comment "000 source destination ipv4 netmask"', - :table => 'filter', - :params => { - :source => '1.1.1.0/24', - :destination => '2.2.0.0/16', - }, - }, - 'source_destination_ipv6_netmask' => { - :line => '-A INPUT -s 2001:db8:1234::/ffff:ffff:ffff:0000:0000:0000:0000:0000 -d 2001:db8:4321::/ffff:ffff:ffff:0000:0000:0000:0000:0000 -m comment --comment "000 source destination ipv6 netmask"', - :table => 'filter', - :params => { - :source => '2001:db8:1234::/48', - :destination => '2001:db8:4321::/48', - }, - }, - 'source_destination_negate_source' => { - :line => '-A INPUT ! -s 1.1.1.1 -d 2.2.2.2 -m comment --comment "000 negated source address"', - :table => 'filter', - :params => { - :source => '! 1.1.1.1/32', - :destination => '2.2.2.2/32', - }, - }, - 'source_destination_negate_destination' => { - :line => '-A INPUT -s 1.1.1.1 ! -d 2.2.2.2 -m comment --comment "000 negated destination address"', - :table => 'filter', - :params => { - :source => '1.1.1.1/32', - :destination => '! 2.2.2.2/32', - }, - }, - 'source_destination_negate_destination_alternative' => { - :line => '-A INPUT -s 1.1.1.1 -d ! 2.2.2.2 -m comment --comment "000 negated destination address alternative"', - :table => 'filter', - :params => { - :source => '1.1.1.1/32', - :destination => '! 2.2.2.2/32', - }, - }, - 'dport_range_1' => { - :line => '-A INPUT -m multiport --dports 1:1024 -m comment --comment "000 allow foo"', - :table => 'filter', - :params => { - :dport => ["1-1024"], - }, - }, - 'dport_range_2' => { - :line => '-A INPUT -m multiport --dports 15,512:1024 -m comment --comment "000 allow foo"', - :table => 'filter', - :params => { - :dport => ["15","512-1024"], - }, - }, - 'sport_range_1' => { - :line => '-A INPUT -m multiport --sports 1:1024 -m comment --comment "000 allow foo"', - :table => 'filter', - :params => { - :sport => ["1-1024"], - }, - }, - 'sport_range_2' => { - :line => '-A INPUT -m multiport --sports 15,512:1024 -m comment --comment "000 allow foo"', - :table => 'filter', - :params => { - :sport => ["15","512-1024"], - }, - }, - 'dst_type_1' => { - :line => '-A INPUT -m addrtype --dst-type LOCAL', - :table => 'filter', - :params => { - :dst_type => 'LOCAL', - }, - }, - 'src_type_1' => { - :line => '-A INPUT -m addrtype --src-type LOCAL', - :table => 'filter', - :params => { - :src_type => 'LOCAL', - }, - }, - 'dst_range_1' => { - :line => '-A INPUT -m iprange --dst-range 10.0.0.2-10.0.0.20', - :table => 'filter', - :params => { - :dst_range => '10.0.0.2-10.0.0.20', - }, - }, - 'src_range_1' => { - :line => '-A INPUT -m iprange --src-range 10.0.0.2-10.0.0.20', - :table => 'filter', - :params => { - :src_range => '10.0.0.2-10.0.0.20', - }, - }, - 'tcp_flags_1' => { - :line => '-A INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK,FIN SYN -m comment --comment "000 initiation"', - :table => 'filter', - :compare_all => true, - :chain => 'INPUT', - :proto => 'tcp', - :params => { - :chain => "INPUT", - :ensure => :present, - :line => '-A INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK,FIN SYN -m comment --comment "000 initiation"', - :name => "000 initiation", - :proto => "tcp", - :provider => "iptables", - :table => "filter", - :tcp_flags => "SYN,RST,ACK,FIN SYN", - }, - }, - 'state_returns_sorted_values' => { - :line => '-A INPUT -m state --state INVALID,RELATED,ESTABLISHED', - :table => 'filter', - :params => { - :state => ['ESTABLISHED', 'INVALID', 'RELATED'], - :action => nil, - }, - }, - 'ctstate_returns_sorted_values' => { - :line => '-A INPUT -m conntrack --ctstate INVALID,RELATED,ESTABLISHED', - :table => 'filter', - :params => { - :ctstate => ['ESTABLISHED', 'INVALID', 'RELATED'], - :action => nil, - }, - }, - 'comment_string_character_validation' => { - :line => '-A INPUT -s 192.168.0.1/32 -m comment --comment "000 allow from 192.168.0.1, please"', - :table => 'filter', - :params => { - :source => '192.168.0.1/32', - }, - }, - 'log_level_debug' => { - :line => '-A INPUT -m comment --comment "956 INPUT log-level" -m state --state NEW -j LOG --log-level 7', - :table => 'filter', - :params => { - :state => ['NEW'], - :log_level => '7', - :jump => 'LOG' - }, - }, - 'log_level_warn' => { - :line => '-A INPUT -m comment --comment "956 INPUT log-level" -m state --state NEW -j LOG', - :table => 'filter', - :params => { - :state => ['NEW'], - :log_level => '4', - :jump => 'LOG' - }, - }, - 'load_limit_module_and_implicit_burst' => { - :line => '-A INPUT -m multiport --dports 123 -m comment --comment "057 INPUT limit NTP" -m limit --limit 15/hour', - :table => 'filter', - :params => { - :dport => ['123'], - :limit => '15/hour', - :burst => '5' - }, - }, - 'limit_with_explicit_burst' => { - :line => '-A INPUT -m multiport --dports 123 -m comment --comment "057 INPUT limit NTP" -m limit --limit 30/hour --limit-burst 10', - :table => 'filter', - :params => { - :dport => ['123'], - :limit => '30/hour', - :burst => '10' - }, - }, - 'proto_ipencap' => { - :line => '-A INPUT -p ipencap -m comment --comment "0100 INPUT accept ipencap"', - :table => 'filter', - :params => { - :proto => 'ipencap', - } - }, - 'load_uid_owner_filter_module' => { - :line => '-A OUTPUT -m owner --uid-owner root -m comment --comment "057 OUTPUT uid root only" -j ACCEPT', - :table => 'filter', - :params => { - :action => 'accept', - :uid => 'root', - :chain => 'OUTPUT', - }, - }, - 'load_uid_owner_postrouting_module' => { - :line => '-t mangle -A POSTROUTING -m owner --uid-owner root -m comment --comment "057 POSTROUTING uid root only" -j ACCEPT', - :table => 'mangle', - :params => { - :action => 'accept', - :chain => 'POSTROUTING', - :uid => 'root', - }, - }, - 'load_gid_owner_filter_module' => { - :line => '-A OUTPUT -m owner --gid-owner root -m comment --comment "057 OUTPUT gid root only" -j ACCEPT', - :table => 'filter', - :params => { - :action => 'accept', - :chain => 'OUTPUT', - :gid => 'root', - }, - }, - 'load_gid_owner_postrouting_module' => { - :line => '-t mangle -A POSTROUTING -m owner --gid-owner root -m comment --comment "057 POSTROUTING gid root only" -j ACCEPT', - :table => 'mangle', - :params => { - :action => 'accept', - :chain => 'POSTROUTING', - :gid => 'root', - }, - }, - 'mark_set-mark' => { - :line => '-t mangle -A PREROUTING -j MARK --set-xmark 0x3e8/0xffffffff', - :table => 'mangle', - :params => { - :jump => 'MARK', - :chain => 'PREROUTING', - :set_mark => '0x3e8/0xffffffff', - } - }, - 'iniface_1' => { - :line => '-A INPUT -i eth0 -m comment --comment "060 iniface" -j DROP', - :table => 'filter', - :params => { - :action => 'drop', - :chain => 'INPUT', - :iniface => 'eth0', - }, - }, - 'iniface_with_vlans_1' => { - :line => '-A INPUT -i eth0.234 -m comment --comment "060 iniface" -j DROP', - :table => 'filter', - :params => { - :action => 'drop', - :chain => 'INPUT', - :iniface => 'eth0.234', - }, - }, - 'iniface_with_plus_1' => { - :line => '-A INPUT -i eth+ -m comment --comment "060 iniface" -j DROP', - :table => 'filter', - :params => { - :action => 'drop', - :chain => 'INPUT', - :iniface => 'eth+', - }, - }, - 'outiface_1' => { - :line => '-A OUTPUT -o eth0 -m comment --comment "060 outiface" -j DROP', - :table => 'filter', - :params => { - :action => 'drop', - :chain => 'OUTPUT', - :outiface => 'eth0', - }, - }, - 'outiface_with_vlans_1' => { - :line => '-A OUTPUT -o eth0.234 -m comment --comment "060 outiface" -j DROP', - :table => 'filter', - :params => { - :action => 'drop', - :chain => 'OUTPUT', - :outiface => 'eth0.234', - }, - }, - 'outiface_with_plus_1' => { - :line => '-A OUTPUT -o eth+ -m comment --comment "060 outiface" -j DROP', - :table => 'filter', - :params => { - :action => 'drop', - :chain => 'OUTPUT', - :outiface => 'eth+', - }, - }, - 'pkttype multicast' => { - :line => '-A INPUT -m pkttype --pkt-type multicast -j ACCEPT', - :table => 'filter', - :params => { - :action => 'accept', - :pkttype => 'multicast', - }, - }, - 'socket_option' => { - :line => '-A PREROUTING -m socket -j ACCEPT', - :table => 'mangle', - :params => { - :action => 'accept', - :chain => 'PREROUTING', - :socket => true, - }, - }, - 'isfragment_option' => { - :line => '-A INPUT -f -m comment --comment "010 a-f comment with dashf" -j ACCEPT', - :table => 'filter', - :params => { - :name => '010 a-f comment with dashf', - :action => 'accept', - :isfragment => true, - }, - }, - 'single_tcp_sport' => { - :line => '-A OUTPUT -s 10.94.100.46/32 -p tcp -m tcp --sport 20443 -j ACCEPT', - :table => 'mangle', - :params => { - :action => 'accept', - :chain => 'OUTPUT', - :source => "10.94.100.46/32", - :proto => "tcp", - :sport => ["20443"], - }, - }, - 'single_udp_sport' => { - :line => '-A OUTPUT -s 10.94.100.46/32 -p udp -m udp --sport 20443 -j ACCEPT', - :table => 'mangle', - :params => { - :action => 'accept', - :chain => 'OUTPUT', - :source => "10.94.100.46/32", - :proto => "udp", - :sport => ["20443"], - }, - }, - 'single_tcp_dport' => { - :line => '-A OUTPUT -s 10.94.100.46/32 -p tcp -m tcp --dport 20443 -j ACCEPT', - :table => 'mangle', - :params => { - :action => 'accept', - :chain => 'OUTPUT', - :source => "10.94.100.46/32", - :proto => "tcp", - :dport => ["20443"], - }, - }, - 'single_udp_dport' => { - :line => '-A OUTPUT -s 10.94.100.46/32 -p udp -m udp --dport 20443 -j ACCEPT', - :table => 'mangle', - :params => { - :action => 'accept', - :chain => 'OUTPUT', - :source => "10.94.100.46/32", - :proto => "udp", - :dport => ["20443"], - }, - }, - 'connlimit_above' => { - :line => '-A INPUT -p tcp -m multiport --dports 22 -m comment --comment "061 REJECT connlimit_above 10" -m connlimit --connlimit-above 10 --connlimit-mask 32 -j REJECT --reject-with icmp-port-unreachable', - :table => 'filter', - :params => { - :proto => 'tcp', - :dport => ["22"], - :connlimit_above => '10', - :action => 'reject', - }, - }, - 'connlimit_above_with_connlimit_mask' => { - :line => '-A INPUT -p tcp -m multiport --dports 22 -m comment --comment "061 REJECT connlimit_above 10 with mask 24" -m connlimit --connlimit-above 10 --connlimit-mask 24 -j REJECT --reject-with icmp-port-unreachable', - :table => 'filter', - :params => { - :proto => 'tcp', - :dport => ["22"], - :connlimit_above => '10', - :connlimit_mask => '24', - :action => 'reject', - }, - }, - 'connmark' => { - :line => '-A INPUT -m comment --comment "062 REJECT connmark" -m connmark --mark 0x1 -j REJECT --reject-with icmp-port-unreachable', - :table => 'filter', - :params => { - :proto => 'all', - :connmark => '0x1', - :action => 'reject', - }, - }, -} - -# This hash is for testing converting a hash to an argument line. -HASH_TO_ARGS = { - 'long_rule_1' => { - :params => { - :action => "accept", - :chain => "INPUT", - :destination => "1.1.1.1", - :dport => ["7061","7062"], - :ensure => :present, - :name => "000 allow foo", - :proto => "tcp", - :source => "1.1.1.1", - :sport => ["7061","7062"], - :table => "filter", - }, - :args => ["-t", :filter, "-s", "1.1.1.1/32", "-d", "1.1.1.1/32", "-p", :tcp, "-m", "multiport", "--sports", "7061,7062", "-m", "multiport", "--dports", "7061,7062", "-m", "comment", "--comment", "000 allow foo", "-j", "ACCEPT"], - }, - 'long_rule_2' => { - :params => { - :chain => "INPUT", - :destination => "2.10.13.3/24", - :dport => ["7061"], - :ensure => :present, - :jump => "my_custom_chain", - :name => "700 allow bar", - :proto => "udp", - :source => "1.1.1.1", - :sport => ["7061","7062"], - :table => "filter", - }, - :args => ["-t", :filter, "-s", "1.1.1.1/32", "-d", "2.10.13.0/24", "-p", :udp, "-m", "multiport", "--sports", "7061,7062", "-m", "multiport", "--dports", "7061", "-m", "comment", "--comment", "700 allow bar", "-j", "my_custom_chain"], - }, - 'no_action' => { - :params => { - :name => "100 no action", - :table => "filter", - }, - :args => ["-t", :filter, "-p", :tcp, "-m", "comment", "--comment", - "100 no action"], - }, - 'zero_prefixlen_ipv4' => { - :params => { - :name => '100 zero prefix length ipv4', - :table => 'filter', - :source => '0.0.0.0/0', - :destination => '0.0.0.0/0', - }, - :args => ['-t', :filter, '-p', :tcp, '-m', 'comment', '--comment', '100 zero prefix length ipv4'], - }, - 'zero_prefixlen_ipv6' => { - :params => { - :name => '100 zero prefix length ipv6', - :table => 'filter', - :source => '::/0', - :destination => '::/0', - }, - :args => ['-t', :filter, '-p', :tcp, '-m', 'comment', '--comment', '100 zero prefix length ipv6'], - }, - 'source_destination_ipv4_no_cidr' => { - :params => { - :name => '000 source destination ipv4 no cidr', - :table => 'filter', - :source => '1.1.1.1', - :destination => '2.2.2.2', - }, - :args => ['-t', :filter, '-s', '1.1.1.1/32', '-d', '2.2.2.2/32', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv4 no cidr'], - }, - 'source_destination_ipv6_no_cidr' => { - :params => { - :name => '000 source destination ipv6 no cidr', - :table => 'filter', - :source => '2001:db8:1234::', - :destination => '2001:db8:4321::', - }, - :args => ['-t', :filter, '-s', '2001:db8:1234::/128', '-d', '2001:db8:4321::/128', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv6 no cidr'], - }, - 'source_destination_ipv4_netmask' => { - :params => { - :name => '000 source destination ipv4 netmask', - :table => 'filter', - :source => '1.1.1.0/255.255.255.0', - :destination => '2.2.0.0/255.255.0.0', - }, - :args => ['-t', :filter, '-s', '1.1.1.0/24', '-d', '2.2.0.0/16', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv4 netmask'], - }, - 'source_destination_ipv6_netmask' => { - :params => { - :name => '000 source destination ipv6 netmask', - :table => 'filter', - :source => '2001:db8:1234::/ffff:ffff:ffff:0000:0000:0000:0000:0000', - :destination => '2001:db8:4321::/ffff:ffff:ffff:0000:0000:0000:0000:0000', - }, - :args => ['-t', :filter, '-s', '2001:db8:1234::/48', '-d', '2001:db8:4321::/48', '-p', :tcp, '-m', 'comment', '--comment', '000 source destination ipv6 netmask'], - }, - 'sport_range_1' => { - :params => { - :name => "100 sport range", - :sport => ["1-1024"], - :table => "filter", - }, - :args => ["-t", :filter, "-p", :tcp, "-m", "multiport", "--sports", "1:1024", "-m", "comment", "--comment", "100 sport range"], - }, - 'sport_range_2' => { - :params => { - :name => "100 sport range", - :sport => ["15","512-1024"], - :table => "filter", - }, - :args => ["-t", :filter, "-p", :tcp, "-m", "multiport", "--sports", "15,512:1024", "-m", "comment", "--comment", "100 sport range"], - }, - 'dport_range_1' => { - :params => { - :name => "100 sport range", - :dport => ["1-1024"], - :table => "filter", - }, - :args => ["-t", :filter, "-p", :tcp, "-m", "multiport", "--dports", "1:1024", "-m", "comment", "--comment", "100 sport range"], - }, - 'dport_range_2' => { - :params => { - :name => "100 sport range", - :dport => ["15","512-1024"], - :table => "filter", - }, - :args => ["-t", :filter, "-p", :tcp, "-m", "multiport", "--dports", "15,512:1024", "-m", "comment", "--comment", "100 sport range"], - }, - 'dst_type_1' => { - :params => { - :name => '000 dst_type', - :table => 'filter', - :dst_type => 'LOCAL', - }, - :args => ['-t', :filter, '-p', :tcp, '-m', 'addrtype', '--dst-type', :LOCAL, '-m', 'comment', '--comment', '000 dst_type'], - }, - 'src_type_1' => { - :params => { - :name => '000 src_type', - :table => 'filter', - :src_type => 'LOCAL', - }, - :args => ['-t', :filter, '-p', :tcp, '-m', 'addrtype', '--src-type', :LOCAL, '-m', 'comment', '--comment', '000 src_type'], - }, - 'dst_range_1' => { - :params => { - :name => '000 dst_range', - :table => 'filter', - :dst_range => '10.0.0.1-10.0.0.10', - }, - :args => ['-t', :filter, '-p', :tcp, '-m', 'iprange', '--dst-range', '10.0.0.1-10.0.0.10', '-m', 'comment', '--comment', '000 dst_range'], - }, - 'src_range_1' => { - :params => { - :name => '000 src_range', - :table => 'filter', - :dst_range => '10.0.0.1-10.0.0.10', - }, - :args => ['-t', :filter, '-p', :tcp, '-m', 'iprange', '--dst-range', '10.0.0.1-10.0.0.10', '-m', 'comment', '--comment', '000 src_range'], - }, - 'tcp_flags_1' => { - :params => { - :name => "000 initiation", - :tcp_flags => "SYN,RST,ACK,FIN SYN", - :table => "filter", - }, - - :args => ["-t", :filter, "-p", :tcp, "-m", "tcp", "--tcp-flags", "SYN,RST,ACK,FIN", "SYN", "-m", "comment", "--comment", "000 initiation",] - }, - 'states_set_from_array' => { - :params => { - :name => "100 states_set_from_array", - :table => "filter", - :state => ['ESTABLISHED', 'INVALID'] - }, - :args => ["-t", :filter, "-p", :tcp, "-m", "comment", "--comment", "100 states_set_from_array", - "-m", "state", "--state", "ESTABLISHED,INVALID"], - }, - 'ctstates_set_from_array' => { - :params => { - :name => "100 ctstates_set_from_array", - :table => "filter", - :ctstate => ['ESTABLISHED', 'INVALID'] - }, - :args => ["-t", :filter, "-p", :tcp, "-m", "comment", "--comment", "100 ctstates_set_from_array", - "-m", "conntrack", "--ctstate", "ESTABLISHED,INVALID"], - }, - 'comment_string_character_validation' => { - :params => { - :name => "000 allow from 192.168.0.1, please", - :table => 'filter', - :source => '192.168.0.1' - }, - :args => ['-t', :filter, '-s', '192.168.0.1/32', '-p', :tcp, '-m', 'comment', '--comment', '000 allow from 192.168.0.1, please'], - }, - 'port_property' => { - :params => { - :name => '001 port property', - :table => 'filter', - :port => '80', - }, - :args => ['-t', :filter, '-p', :tcp, '-m', 'multiport', '--ports', '80', '-m', 'comment', '--comment', '001 port property'], - }, - 'log_level_debug' => { - :params => { - :name => '956 INPUT log-level', - :table => 'filter', - :state => 'NEW', - :jump => 'LOG', - :log_level => 'debug' - }, - :args => ['-t', :filter, '-p', :tcp, '-m', 'comment', '--comment', '956 INPUT log-level', '-m', 'state', '--state', 'NEW', '-j', 'LOG', '--log-level', '7'], - }, - 'log_level_warn' => { - :params => { - :name => '956 INPUT log-level', - :table => 'filter', - :state => 'NEW', - :jump => 'LOG', - :log_level => 'warn' - }, - :args => ['-t', :filter, '-p', :tcp, '-m', 'comment', '--comment', '956 INPUT log-level', '-m', 'state', '--state', 'NEW', '-j', 'LOG', '--log-level', '4'], - }, - 'load_limit_module_and_implicit_burst' => { - :params => { - :name => '057 INPUT limit NTP', - :table => 'filter', - :dport => '123', - :limit => '15/hour' - }, - :args => ['-t', :filter, '-p', :tcp, '-m', 'multiport', '--dports', '123', '-m', 'comment', '--comment', '057 INPUT limit NTP', '-m', 'limit', '--limit', '15/hour'], - }, - 'limit_with_explicit_burst' => { - :params => { - :name => '057 INPUT limit NTP', - :table => 'filter', - :dport => '123', - :limit => '30/hour', - :burst => '10' - }, - :args => ['-t', :filter, '-p', :tcp, '-m', 'multiport', '--dports', '123', '-m', 'comment', '--comment', '057 INPUT limit NTP', '-m', 'limit', '--limit', '30/hour', '--limit-burst', '10'], - }, - 'proto_ipencap' => { - :params => { - :name => '0100 INPUT accept ipencap', - :table => 'filter', - :proto => 'ipencap', - }, - :args => ['-t', :filter, '-p', :ipencap, '-m', 'comment', '--comment', '0100 INPUT accept ipencap'], - }, - 'load_uid_owner_filter_module' => { - :params => { - :name => '057 OUTPUT uid root only', - :table => 'filter', - :uid => 'root', - :action => 'accept', - :chain => 'OUTPUT', - :proto => 'all', - }, - :args => ['-t', :filter, '-p', :all, '-m', 'owner', '--uid-owner', 'root', '-m', 'comment', '--comment', '057 OUTPUT uid root only', '-j', 'ACCEPT'], - }, - 'load_uid_owner_postrouting_module' => { - :params => { - :name => '057 POSTROUTING uid root only', - :table => 'mangle', - :uid => 'root', - :action => 'accept', - :chain => 'POSTROUTING', - :proto => 'all', - }, - :args => ['-t', :mangle, '-p', :all, '-m', 'owner', '--uid-owner', 'root', '-m', 'comment', '--comment', '057 POSTROUTING uid root only', '-j', 'ACCEPT'], - }, - 'load_gid_owner_filter_module' => { - :params => { - :name => '057 OUTPUT gid root only', - :table => 'filter', - :chain => 'OUTPUT', - :gid => 'root', - :action => 'accept', - :proto => 'all', - }, - :args => ['-t', :filter, '-p', :all, '-m', 'owner', '--gid-owner', 'root', '-m', 'comment', '--comment', '057 OUTPUT gid root only', '-j', 'ACCEPT'], - }, - 'load_gid_owner_postrouting_module' => { - :params => { - :name => '057 POSTROUTING gid root only', - :table => 'mangle', - :gid => 'root', - :action => 'accept', - :chain => 'POSTROUTING', - :proto => 'all', - }, - :args => ['-t', :mangle, '-p', :all, '-m', 'owner', '--gid-owner', 'root', '-m', 'comment', '--comment', '057 POSTROUTING gid root only', '-j', 'ACCEPT'], - }, - 'mark_set-mark_int' => { - :params => { - :name => '058 set-mark 1000', - :table => 'mangle', - :jump => 'MARK', - :chain => 'PREROUTING', - :set_mark => '1000', - }, - :args => ['-t', :mangle, '-p', :tcp, '-m', 'comment', '--comment', '058 set-mark 1000', '-j', 'MARK', '--set-xmark', '0x3e8/0xffffffff'], - }, - 'mark_set-mark_hex' => { - :params => { - :name => '058 set-mark 0x32', - :table => 'mangle', - :jump => 'MARK', - :chain => 'PREROUTING', - :set_mark => '0x32', - }, - :args => ['-t', :mangle, '-p', :tcp, '-m', 'comment', '--comment', '058 set-mark 0x32', '-j', 'MARK', '--set-xmark', '0x32/0xffffffff'], - }, - 'mark_set-mark_hex_with_hex_mask' => { - :params => { - :name => '058 set-mark 0x32/0xffffffff', - :table => 'mangle', - :jump => 'MARK', - :chain => 'PREROUTING', - :set_mark => '0x32/0xffffffff', - }, - :args => ['-t', :mangle, '-p', :tcp, '-m', 'comment', '--comment', '058 set-mark 0x32/0xffffffff', '-j', 'MARK', '--set-xmark', '0x32/0xffffffff'], - }, - 'mark_set-mark_hex_with_mask' => { - :params => { - :name => '058 set-mark 0x32/4', - :table => 'mangle', - :jump => 'MARK', - :chain => 'PREROUTING', - :set_mark => '0x32/4', - }, - :args => ['-t', :mangle, '-p', :tcp, '-m', 'comment', '--comment', '058 set-mark 0x32/4', '-j', 'MARK', '--set-xmark', '0x32/0x4'], - }, - 'iniface_1' => { - :params => { - :name => '060 iniface', - :table => 'filter', - :action => 'drop', - :chain => 'INPUT', - :iniface => 'eth0', - }, - :args => ["-t", :filter, "-i", "eth0", "-p", :tcp, "-m", "comment", "--comment", "060 iniface", "-j", "DROP"], - }, - 'iniface_with_vlans_1' => { - :params => { - :name => '060 iniface', - :table => 'filter', - :action => 'drop', - :chain => 'INPUT', - :iniface => 'eth0.234', - }, - :args => ["-t", :filter, "-i", "eth0.234", "-p", :tcp, "-m", "comment", "--comment", "060 iniface", "-j", "DROP"], - }, - 'iniface_with_plus_1' => { - :params => { - :name => '060 iniface', - :table => 'filter', - :action => 'drop', - :chain => 'INPUT', - :iniface => 'eth+', - }, - :args => ["-t", :filter, "-i", "eth+", "-p", :tcp, "-m", "comment", "--comment", "060 iniface", "-j", "DROP"], - }, - 'outiface_1' => { - :params => { - :name => '060 outiface', - :table => 'filter', - :action => 'drop', - :chain => 'OUTPUT', - :outiface => 'eth0', - }, - :args => ["-t", :filter, "-o", "eth0", "-p", :tcp, "-m", "comment", "--comment", "060 outiface", "-j", "DROP"], - }, - 'outiface_with_vlans_1' => { - :params => { - :name => '060 outiface', - :table => 'filter', - :action => 'drop', - :chain => 'OUTPUT', - :outiface => 'eth0.234', - }, - :args => ["-t", :filter, "-o", "eth0.234", "-p", :tcp, "-m", "comment", "--comment", "060 outiface", "-j", "DROP"], - }, - 'outiface_with_plus_1' => { - :params => { - :name => '060 outiface', - :table => 'filter', - :action => 'drop', - :chain => 'OUTPUT', - :outiface => 'eth+', - }, - :args => ["-t", :filter, "-o", "eth+", "-p", :tcp, "-m", "comment", "--comment", "060 outiface", "-j", "DROP"], - }, - 'pkttype multicast' => { - :params => { - :name => '062 pkttype multicast', - :table => "filter", - :action => 'accept', - :chain => 'INPUT', - :iniface => 'eth0', - :pkttype => 'multicast', - }, - :args => ["-t", :filter, "-i", "eth0", "-p", :tcp, "-m", "pkttype", "--pkt-type", :multicast, "-m", "comment", "--comment", "062 pkttype multicast", "-j", "ACCEPT"], - }, - 'socket_option' => { - :params => { - :name => '050 socket option', - :table => 'mangle', - :action => 'accept', - :chain => 'PREROUTING', - :socket => true, - }, - :args => ['-t', :mangle, '-p', :tcp, '-m', 'socket', '-m', 'comment', '--comment', '050 socket option', '-j', 'ACCEPT'], - }, - 'isfragment_option' => { - :params => { - :name => '050 isfragment option', - :table => 'filter', - :proto => :all, - :action => 'accept', - :isfragment => true, - }, - :args => ['-t', :filter, '-p', :all, '-f', '-m', 'comment', '--comment', '050 isfragment option', '-j', 'ACCEPT'], - }, - 'isfragment_option not changing -f in comment' => { - :params => { - :name => '050 testcomment-with-fdashf', - :table => 'filter', - :proto => :all, - :action => 'accept', - }, - :args => ['-t', :filter, '-p', :all, '-m', 'comment', '--comment', '050 testcomment-with-fdashf', '-j', 'ACCEPT'], - }, - 'connlimit_above' => { - :params => { - :name => '061 REJECT connlimit_above 10', - :table => 'filter', - :proto => 'tcp', - :dport => ["22"], - :connlimit_above => '10', - :action => 'reject', - }, - :args => ["-t", :filter, "-p", :tcp, "-m", "multiport", "--dports", "22", "-m", "comment", "--comment", "061 REJECT connlimit_above 10", "-j", "REJECT", "-m", "connlimit", "--connlimit-above", "10"], - }, - 'connlimit_above_with_connlimit_mask' => { - :params => { - :name => '061 REJECT connlimit_above 10 with mask 24', - :table => 'filter', - :proto => 'tcp', - :dport => ["22"], - :connlimit_above => '10', - :connlimit_mask => '24', - :action => 'reject', - }, - :args => ["-t", :filter, "-p", :tcp, "-m", "multiport", "--dports", "22", "-m", "comment", "--comment", "061 REJECT connlimit_above 10 with mask 24", "-j", "REJECT", "-m", "connlimit", "--connlimit-above", "10", "--connlimit-mask", "24"], - }, - 'connmark' => { - :params => { - :name => '062 REJECT connmark', - :table => 'filter', - :proto => 'all', - :connmark => '0x1', - :action => 'reject', - }, - :args => ["-t", :filter, "-p", :all, "-m", "comment", "--comment", "062 REJECT connmark", "-j", "REJECT", "-m", "connmark", "--mark", "0x1"], - }, -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/spec_helper.rb deleted file mode 100644 index dc8bc39cb4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/spec_helper.rb +++ /dev/null @@ -1,29 +0,0 @@ -dir = File.expand_path(File.dirname(__FILE__)) -$LOAD_PATH.unshift File.join(dir, 'lib') - -# Don't want puppet getting the command line arguments for rake or autotest -ARGV.clear - -require 'rubygems' -require 'bundler/setup' -require 'rspec-puppet' - -Bundler.require :default, :test - -require 'pathname' -require 'tmpdir' - -Pathname.glob("#{dir}/shared_behaviours/**/*.rb") do |behaviour| - require behaviour.relative_path_from(Pathname.new(dir)) -end - -fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) - -RSpec.configure do |config| - config.tty = true - config.mock_with :rspec do |c| - c.syntax = :expect - end - config.module_path = File.join(fixture_path, 'modules') - config.manifest_dir = File.join(fixture_path, 'manifests') -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/spec_helper_acceptance.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/spec_helper_acceptance.rb deleted file mode 100644 index 13d056fa93..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/spec_helper_acceptance.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'beaker-rspec' - -def iptables_flush_all_tables - ['filter', 'nat', 'mangle', 'raw'].each do |t| - expect(shell("iptables -t #{t} -F").stderr).to eq("") - end -end - -def ip6tables_flush_all_tables - ['filter'].each do |t| - expect(shell("ip6tables -t #{t} -F").stderr).to eq("") - end -end - -unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' - if hosts.first.is_pe? - install_pe - else - install_puppet - end - hosts.each do |host| - on host, "mkdir -p #{host['distmoduledir']}" - end -end - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Readable test descriptions - c.formatter = :documentation - - # Configure all nodes in nodeset - c.before :suite do - # Install module and dependencies - puppet_module_install(:source => proj_root, :module_name => 'firewall') - hosts.each do |host| - shell('/bin/touch /etc/puppet/hiera.yaml') - shell('puppet module install puppetlabs-stdlib --version 3.2.0', { :acceptable_exit_codes => [0,1] }) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_archlinux_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_archlinux_spec.rb deleted file mode 100644 index 954d9ee10d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_archlinux_spec.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'spec_helper' - -describe 'firewall::linux::archlinux', :type => :class do - it { should contain_service('iptables').with( - :ensure => 'running', - :enable => 'true' - )} - it { should contain_service('ip6tables').with( - :ensure => 'running', - :enable => 'true' - )} - - context 'ensure => stopped' do - let(:params) {{ :ensure => 'stopped' }} - it { should contain_service('iptables').with( - :ensure => 'stopped' - )} - it { should contain_service('ip6tables').with( - :ensure => 'stopped' - )} - end - - context 'enable => false' do - let(:params) {{ :enable => 'false' }} - it { should contain_service('iptables').with( - :enable => 'false' - )} - it { should contain_service('ip6tables').with( - :enable => 'false' - )} - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_debian_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_debian_spec.rb deleted file mode 100644 index 98285b642c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_debian_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'spec_helper' - -describe 'firewall::linux::debian', :type => :class do - it { should contain_package('iptables-persistent').with( - :ensure => 'present' - )} - it { should contain_service('iptables-persistent').with( - :ensure => nil, - :enable => 'true', - :require => 'Package[iptables-persistent]' - )} - - context 'enable => false' do - let(:params) {{ :enable => 'false' }} - it { should contain_service('iptables-persistent').with( - :enable => 'false' - )} - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_redhat_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_redhat_spec.rb deleted file mode 100644 index ea49d2b83b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_redhat_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'spec_helper' - -describe 'firewall::linux::redhat', :type => :class do - it { should contain_service('iptables').with( - :ensure => 'running', - :enable => 'true' - )} - - context 'ensure => stopped' do - let(:params) {{ :ensure => 'stopped' }} - it { should contain_service('iptables').with( - :ensure => 'stopped' - )} - end - - context 'enable => false' do - let(:params) {{ :enable => 'false' }} - it { should contain_service('iptables').with( - :enable => 'false' - )} - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_spec.rb deleted file mode 100644 index 42056c1b1a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_linux_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'spec_helper' - -describe 'firewall::linux', :type => :class do - let(:facts_default) {{ :kernel => 'Linux' }} - it { should contain_package('iptables').with_ensure('present') } - - context 'RedHat like' do - %w{RedHat CentOS Fedora}.each do |os| - context "operatingsystem => #{os}" do - releases = (os == 'Fedora' ? [14,15,'Rawhide'] : [6,7]) - releases.each do |osrel| - context "operatingsystemrelease => #{osrel}" do - let(:facts) { facts_default.merge({ :operatingsystem => os, - :operatingsystemrelease => osrel}) } - it { should contain_class('firewall::linux::redhat').with_require('Package[iptables]') } - end - end - end - end - end - - context 'Debian like' do - %w{Debian Ubuntu}.each do |os| - context "operatingsystem => #{os}" do - let(:facts) { facts_default.merge({ :operatingsystem => os }) } - it { should contain_class('firewall::linux::debian').with_require('Package[iptables]') } - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_spec.rb deleted file mode 100644 index efc153ab2e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/classes/firewall_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'spec_helper' - -describe 'firewall', :type => :class do - context 'kernel => Linux' do - let(:facts) {{ :kernel => 'Linux' }} - it { should contain_class('firewall::linux').with_ensure('running') } - end - - context 'kernel => Windows' do - let(:facts) {{ :kernel => 'Windows' }} - it { expect { should contain_class('firewall::linux') }.to raise_error(Puppet::Error) } - end - - context 'ensure => stopped' do - let(:facts) {{ :kernel => 'Linux' }} - let(:params) {{ :ensure => 'stopped' }} - it { should contain_class('firewall::linux').with_ensure('stopped') } - end - - context 'ensure => test' do - let(:facts) {{ :kernel => 'Linux' }} - let(:params) {{ :ensure => 'test' }} - it { expect { should contain_class('firewall::linux') }.to raise_error(Puppet::Error) } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_persistent_version_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_persistent_version_spec.rb deleted file mode 100644 index 13a23a5c29..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_persistent_version_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'spec_helper' - -describe "Facter::Util::Fact iptables_persistent_version" do - before { Facter.clear } - let(:dpkg_cmd) { "dpkg-query -Wf '${Version}' iptables-persistent 2>/dev/null" } - - { - "Debian" => "0.0.20090701", - "Ubuntu" => "0.5.3ubuntu2", - }.each do |os, ver| - describe "#{os} package installed" do - before { - allow(Facter.fact(:operatingsystem)).to receive(:value).and_return(os) - allow(Facter::Util::Resolution).to receive(:exec).with(dpkg_cmd). - and_return(ver) - } - it { Facter.fact(:iptables_persistent_version).value.should == ver } - end - end - - describe 'Ubuntu package not installed' do - before { - allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('Ubuntu') - allow(Facter::Util::Resolution).to receive(:exec).with(dpkg_cmd). - and_return(nil) - } - it { Facter.fact(:iptables_persistent_version).value.should be_nil } - end - - describe 'CentOS not supported' do - before { allow(Facter.fact(:operatingsystem)).to receive(:value). - and_return("CentOS") } - it { Facter.fact(:iptables_persistent_version).value.should be_nil } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_spec.rb deleted file mode 100644 index 5773fdce56..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/facter/iptables_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'spec_helper' - -describe "Facter::Util::Fact" do - before { - Facter.clear - allow(Facter.fact(:kernel)).to receive(:value).and_return('Linux') - allow(Facter.fact(:kernelrelease)).to receive(:value).and_return('2.6') - } - - describe 'iptables_version' do - it { - allow(Facter::Util::Resolution).to receive(:exec).with('iptables --version'). - and_return('iptables v1.4.7') - Facter.fact(:iptables_version).value.should == '1.4.7' - } - end - - describe 'ip6tables_version' do - before { allow(Facter::Util::Resolution).to receive(:exec). - with('ip6tables --version').and_return('ip6tables v1.4.7') } - it { Facter.fact(:ip6tables_version).value.should == '1.4.7' } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_chain_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_chain_spec.rb deleted file mode 100755 index f350c2e3c5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_chain_spec.rb +++ /dev/null @@ -1,227 +0,0 @@ -#!/usr/bin/env rspec - -require 'spec_helper' -if Puppet.version < '3.4.0' - require 'puppet/provider/confine/exists' -else - require 'puppet/confine/exists' -end - -describe 'iptables chain provider detection' do - if Puppet.version < '3.4.0' - let(:exists) { - Puppet::Provider::Confine::Exists - } - else - let(:exists) { - Puppet::Confine::Exists - } - end - - before :each do - # Reset the default provider - Puppet::Type.type(:firewallchain).defaultprovider = nil - end - - it "should default to iptables provider if /sbin/(eb|ip|ip6)tables[-save] exists" do - # Stub lookup for /sbin/iptables & /sbin/iptables-save - allow(exists).to receive(:which).with("ebtables"). - and_return "/sbin/ebtables" - allow(exists).to receive(:which).with("ebtables-save"). - and_return "/sbin/ebtables-save" - - allow(exists).to receive(:which).with("iptables"). - and_return "/sbin/iptables" - allow(exists).to receive(:which).with("iptables-save"). - and_return "/sbin/iptables-save" - - allow(exists).to receive(:which).with("ip6tables"). - and_return "/sbin/ip6tables" - allow(exists).to receive(:which).with("ip6tables-save"). - and_return "/sbin/ip6tables-save" - - # Every other command should return false so we don't pick up any - # other providers - allow(exists).to receive(:which).with() { |value| - value !~ /(eb|ip|ip6)tables(-save)?$/ - }.and_return false - - # Create a resource instance and make sure the provider is iptables - resource = Puppet::Type.type(:firewallchain).new({ - :name => 'test:filter:IPv4', - }) - expect(resource.provider.class.to_s).to eq("Puppet::Type::Firewallchain::ProviderIptables_chain") - end -end - -describe 'iptables chain provider' do - let(:provider) { Puppet::Type.type(:firewallchain).provider(:iptables_chain) } - let(:resource) { - Puppet::Type.type(:firewallchain).new({ - :name => ':test:', - }) - } - - before :each do - allow(Puppet::Type::Firewallchain).to receive(:defaultprovider).and_return provider - allow(provider).to receive(:command).with(:ebtables_save).and_return "/sbin/ebtables-save" - allow(provider).to receive(:command).with(:iptables_save).and_return "/sbin/iptables-save" - allow(provider).to receive(:command).with(:ip6tables_save).and_return "/sbin/ip6tables-save" - end - - it 'should be able to get a list of existing rules' do - # Pretend to return nil from iptables - allow(provider).to receive(:execute).with(['/sbin/ip6tables-save']).and_return("") - allow(provider).to receive(:execute).with(['/sbin/ebtables-save']).and_return("") - allow(provider).to receive(:execute).with(['/sbin/iptables-save']).and_return("") - - provider.instances.each do |chain| - expect(chain).to be_instance_of(provider) - expect(chain.properties[:provider].to_s).to eq(provider.name.to_s) - end - end - -end - -describe 'iptables chain resource parsing' do - let(:provider) { Puppet::Type.type(:firewallchain).provider(:iptables_chain) } - - before :each do - ebtables = ['BROUTE:BROUTING:ethernet', - 'BROUTE:broute:ethernet', - ':INPUT:ethernet', - ':FORWARD:ethernet', - ':OUTPUT:ethernet', - ':filter:ethernet', - ':filterdrop:ethernet', - ':filterreturn:ethernet', - 'NAT:PREROUTING:ethernet', - 'NAT:OUTPUT:ethernet', - 'NAT:POSTROUTING:ethernet', - ] - allow(provider).to receive(:execute).with(['/sbin/ebtables-save']).and_return(' -*broute -:BROUTING ACCEPT -:broute ACCEPT - -*filter -:INPUT ACCEPT -:FORWARD ACCEPT -:OUTPUT ACCEPT -:filter ACCEPT -:filterdrop DROP -:filterreturn RETURN - -*nat -:PREROUTING ACCEPT -:OUTPUT ACCEPT -:POSTROUTING ACCEPT -') - - iptables = [ - 'raw:PREROUTING:IPv4', - 'raw:OUTPUT:IPv4', - 'raw:raw:IPv4', - 'mangle:PREROUTING:IPv4', - 'mangle:INPUT:IPv4', - 'mangle:FORWARD:IPv4', - 'mangle:OUTPUT:IPv4', - 'mangle:POSTROUTING:IPv4', - 'mangle:mangle:IPv4', - 'NAT:PREROUTING:IPv4', - 'NAT:OUTPUT:IPv4', - 'NAT:POSTROUTING:IPv4', - 'NAT:mangle:IPv4', - 'NAT:mangle:IPv4', - 'NAT:mangle:IPv4', - ':$5()*&%\'"^$): :IPv4', - ] - allow(provider).to receive(:execute).with(['/sbin/iptables-save']).and_return(' -# Generated by iptables-save v1.4.9 on Mon Jan 2 01:20:06 2012 -*raw -:PREROUTING ACCEPT [12:1780] -:OUTPUT ACCEPT [19:1159] -:raw - [0:0] -COMMIT -# Completed on Mon Jan 2 01:20:06 2012 -# Generated by iptables-save v1.4.9 on Mon Jan 2 01:20:06 2012 -*mangle -:PREROUTING ACCEPT [12:1780] -:INPUT ACCEPT [12:1780] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [19:1159] -:POSTROUTING ACCEPT [19:1159] -:mangle - [0:0] -COMMIT -# Completed on Mon Jan 2 01:20:06 2012 -# Generated by iptables-save v1.4.9 on Mon Jan 2 01:20:06 2012 -*nat -:PREROUTING ACCEPT [2242:639750] -:OUTPUT ACCEPT [5176:326206] -:POSTROUTING ACCEPT [5162:325382] -COMMIT -# Completed on Mon Jan 2 01:20:06 2012 -# Generated by iptables-save v1.4.9 on Mon Jan 2 01:20:06 2012 -*filter -:INPUT ACCEPT [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [5673:420879] -:$5()*&%\'"^$): - [0:0] -COMMIT -# Completed on Mon Jan 2 01:20:06 2012 -') - ip6tables = [ - 'raw:PREROUTING:IPv6', - 'raw:OUTPUT:IPv6', - 'raw:ff:IPv6', - 'mangle:PREROUTING:IPv6', - 'mangle:INPUT:IPv6', - 'mangle:FORWARD:IPv6', - 'mangle:OUTPUT:IPv6', - 'mangle:POSTROUTING:IPv6', - 'mangle:ff:IPv6', - ':INPUT:IPv6', - ':FORWARD:IPv6', - ':OUTPUT:IPv6', - ':test:IPv6', - ] - allow(provider).to receive(:execute).with(['/sbin/ip6tables-save']).and_return(' -# Generated by ip6tables-save v1.4.9 on Mon Jan 2 01:31:39 2012 -*raw -:PREROUTING ACCEPT [2173:489241] -:OUTPUT ACCEPT [0:0] -:ff - [0:0] -COMMIT -# Completed on Mon Jan 2 01:31:39 2012 -# Generated by ip6tables-save v1.4.9 on Mon Jan 2 01:31:39 2012 -*mangle -:PREROUTING ACCEPT [2301:518373] -:INPUT ACCEPT [0:0] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [0:0] -:POSTROUTING ACCEPT [0:0] -:ff - [0:0] -COMMIT -# Completed on Mon Jan 2 01:31:39 2012 -# Generated by ip6tables-save v1.4.9 on Mon Jan 2 01:31:39 2012 -*filter -:INPUT ACCEPT [0:0] -:FORWARD DROP [0:0] -:OUTPUT ACCEPT [20:1292] -:test - [0:0] -COMMIT -# Completed on Mon Jan 2 01:31:39 2012 -') - @all = ebtables + iptables + ip6tables - # IPv4 and IPv6 names also exist as resources {table}:{chain}:IP and {table}:{chain}: - iptables.each { |name| @all += [ name[0..-3], name[0..-5] ] } - ip6tables.each { |name| @all += [ name[0..-3], name[0..-5] ] } - end - - it 'should have all in parsed resources' do - provider.instances.each do |resource| - @all.include?(resource.name) - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_spec.rb deleted file mode 100644 index d6f5b64cfe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/provider/iptables_spec.rb +++ /dev/null @@ -1,410 +0,0 @@ -#!/usr/bin/env rspec - -require 'spec_helper' -if Puppet.version < '3.4.0' - require 'puppet/provider/confine/exists' -else - require 'puppet/confine/exists' -end - -describe 'iptables provider detection' do - if Puppet.version < '3.4.0' - let(:exists) { - Puppet::Provider::Confine::Exists - } - else - let(:exists) { - Puppet::Confine::Exists - } - end - - before :each do - # Reset the default provider - Puppet::Type.type(:firewall).defaultprovider = nil - end - - it "should default to iptables provider if /sbin/iptables[-save] exists" do - # Stub lookup for /sbin/iptables & /sbin/iptables-save - allow(exists).to receive(:which).with("iptables"). - and_return "/sbin/iptables" - allow(exists).to receive(:which).with("iptables-save"). - and_return "/sbin/iptables-save" - - # Every other command should return false so we don't pick up any - # other providers - allow(exists).to receive(:which).with() { |value| - ! ["iptables","iptables-save"].include?(value) - }.and_return false - - # Create a resource instance and make sure the provider is iptables - resource = Puppet::Type.type(:firewall).new({ - :name => '000 test foo', - }) - expect(resource.provider.class.to_s).to eq("Puppet::Type::Firewall::ProviderIptables") - end -end - -describe 'iptables provider' do - let(:provider) { Puppet::Type.type(:firewall).provider(:iptables) } - let(:resource) { - Puppet::Type.type(:firewall).new({ - :name => '000 test foo', - :action => 'accept', - }) - } - - before :each do - allow(Puppet::Type::Firewall).to receive(:defaultprovider).and_return provider - allow(provider).to receive(:command).with(:iptables_save).and_return "/sbin/iptables-save" - - # Stub iptables version - allow(Facter.fact(:iptables_version)).to receive(:value).and_return("1.4.2") - - allow(Puppet::Util::Execution).to receive(:execute).and_return "" - allow(Puppet::Util).to receive(:which).with("iptables-save"). - and_return "/sbin/iptables-save" - end - - it 'should be able to get a list of existing rules' do - provider.instances.each do |rule| - expect(rule).to be_instance_of(provider) - expect(rule.properties[:provider].to_s).to eq(provider.name.to_s) - end - end - - it 'should ignore lines with fatal errors' do - allow(Puppet::Util::Execution).to receive(:execute).with(['/sbin/iptables-save']). - and_return("FATAL: Could not load /lib/modules/2.6.18-028stab095.1/modules.dep: No such file or directory") - - expect(provider.instances.length).to be_zero - end - - describe '#insert_order' do - let(:iptables_save_output) { [ - '-A INPUT -s 8.0.0.2/32 -p tcp -m multiport --ports 100 -m comment --comment "100 test" -j ACCEPT', - '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 200 -m comment --comment "200 test" -j ACCEPT', - '-A INPUT -s 8.0.0.4/32 -p tcp -m multiport --ports 300 -m comment --comment "300 test" -j ACCEPT' - ] } - let(:resources) do - iptables_save_output.each_with_index.collect { |l,index| provider.rule_to_hash(l, 'filter', index) } - end - let(:providers) do - resources.collect { |r| provider.new(r) } - end - it 'understands offsets for adding rules to the beginning' do - resource = Puppet::Type.type(:firewall).new({ :name => '001 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(1) # 1-indexed - end - it 'understands offsets for editing rules at the beginning' do - resource = Puppet::Type.type(:firewall).new({ :name => '100 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(1) - end - it 'understands offsets for adding rules to the middle' do - resource = Puppet::Type.type(:firewall).new({ :name => '101 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(2) - end - it 'understands offsets for editing rules at the middle' do - resource = Puppet::Type.type(:firewall).new({ :name => '200 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(2) - end - it 'understands offsets for adding rules to the end' do - resource = Puppet::Type.type(:firewall).new({ :name => '301 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(4) - end - it 'understands offsets for editing rules at the end' do - resource = Puppet::Type.type(:firewall).new({ :name => '300 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(3) - end - - context 'with unname rules between' do - let(:iptables_save_output) { [ - '-A INPUT -s 8.0.0.2/32 -p tcp -m multiport --ports 100 -m comment --comment "100 test" -j ACCEPT', - '-A INPUT -s 8.0.0.2/32 -p tcp -m multiport --ports 150 -m comment --comment "150 test" -j ACCEPT', - '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 200 -j ACCEPT', - '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 250 -j ACCEPT', - '-A INPUT -s 8.0.0.4/32 -p tcp -m multiport --ports 300 -m comment --comment "300 test" -j ACCEPT', - '-A INPUT -s 8.0.0.4/32 -p tcp -m multiport --ports 350 -m comment --comment "350 test" -j ACCEPT', - ] } - it 'understands offsets for adding rules before unnamed rules' do - resource = Puppet::Type.type(:firewall).new({ :name => '001 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(1) - end - it 'understands offsets for editing rules before unnamed rules' do - resource = Puppet::Type.type(:firewall).new({ :name => '100 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(1) - end - it 'understands offsets for adding rules between managed rules' do - resource = Puppet::Type.type(:firewall).new({ :name => '120 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(2) - end - it 'understands offsets for adding rules between unnamed rules' do - resource = Puppet::Type.type(:firewall).new({ :name => '151 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(3) - end - it 'understands offsets for adding rules after unnamed rules' do - resource = Puppet::Type.type(:firewall).new({ :name => '351 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(7) - end - end - - context 'with unname rules before and after' do - let(:iptables_save_output) { [ - '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 050 -j ACCEPT', - '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 090 -j ACCEPT', - '-A INPUT -s 8.0.0.2/32 -p tcp -m multiport --ports 100 -m comment --comment "100 test" -j ACCEPT', - '-A INPUT -s 8.0.0.2/32 -p tcp -m multiport --ports 150 -m comment --comment "150 test" -j ACCEPT', - '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 200 -j ACCEPT', - '-A INPUT -s 8.0.0.3/32 -p tcp -m multiport --ports 250 -j ACCEPT', - '-A INPUT -s 8.0.0.4/32 -p tcp -m multiport --ports 300 -m comment --comment "300 test" -j ACCEPT', - '-A INPUT -s 8.0.0.4/32 -p tcp -m multiport --ports 350 -m comment --comment "350 test" -j ACCEPT', - '-A INPUT -s 8.0.0.5/32 -p tcp -m multiport --ports 400 -j ACCEPT', - '-A INPUT -s 8.0.0.5/32 -p tcp -m multiport --ports 450 -j ACCEPT', - ] } - it 'understands offsets for adding rules before unnamed rules' do - resource = Puppet::Type.type(:firewall).new({ :name => '001 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(1) - end - it 'understands offsets for editing rules before unnamed rules' do - resource = Puppet::Type.type(:firewall).new({ :name => '100 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(3) - end - it 'understands offsets for adding rules between managed rules' do - resource = Puppet::Type.type(:firewall).new({ :name => '120 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(4) - end - it 'understands offsets for adding rules between unnamed rules' do - resource = Puppet::Type.type(:firewall).new({ :name => '151 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(5) - end - it 'understands offsets for adding rules after unnamed rules' do - resource = Puppet::Type.type(:firewall).new({ :name => '351 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(9) - end - it 'understands offsets for adding rules at the end' do - resource = Puppet::Type.type(:firewall).new({ :name => '950 test', }) - allow(resource.provider.class).to receive(:instances).and_return(providers) - expect(resource.provider.insert_order).to eq(11) - end - end - end - - # Load in ruby hash for test fixtures. - load 'spec/fixtures/iptables/conversion_hash.rb' - - describe 'when converting rules to resources' do - ARGS_TO_HASH.each do |test_name,data| - describe "for test data '#{test_name}'" do - let(:resource) { provider.rule_to_hash(data[:line], data[:table], 0) } - - # If this option is enabled, make sure the parameters exactly match - if data[:compare_all] then - it "the parameter hash keys should be the same as returned by rules_to_hash" do - expect(resource.keys).to match_array(data[:params].keys) - end - end - - # Iterate across each parameter, creating an example for comparison - data[:params].each do |param_name, param_value| - it "the parameter '#{param_name.to_s}' should match #{param_value.inspect}" do - # booleans get cludged to string "true" - if param_value == true then - expect(resource[param_name]).to be_true - else - expect(resource[param_name]).to eq(data[:params][param_name]) - end - end - end - end - end - end - - describe 'when working out general_args' do - HASH_TO_ARGS.each do |test_name,data| - describe "for test data '#{test_name}'" do - let(:resource) { Puppet::Type.type(:firewall).new(data[:params]) } - let(:provider) { Puppet::Type.type(:firewall).provider(:iptables) } - let(:instance) { provider.new(resource) } - - it 'general_args should be valid' do - expect(instance.general_args.flatten).to eq(data[:args]) - end - end - end - end - - describe 'when converting rules without comments to resources' do - let(:sample_rule) { - '-A INPUT -s 1.1.1.1 -d 1.1.1.1 -p tcp -m multiport --dports 7061,7062 -m multiport --sports 7061,7062 -j ACCEPT' - } - let(:resource) { provider.rule_to_hash(sample_rule, 'filter', 0) } - let(:instance) { provider.new(resource) } - - it 'rule name contains a MD5 sum of the line' do - expect(resource[:name]).to eq("9000 #{Digest::MD5.hexdigest(resource[:line])}") - end - - it 'parsed the rule arguments correctly' do - expect(resource[:chain]).to eq('INPUT') - expect(resource[:source]).to eq('1.1.1.1/32') - expect(resource[:destination]).to eq('1.1.1.1/32') - expect(resource[:proto]).to eq('tcp') - expect(resource[:dport]).to eq(['7061', '7062']) - expect(resource[:sport]).to eq(['7061', '7062']) - expect(resource[:action]).to eq('accept') - end - end - - describe 'when converting existing rules generates by system-config-firewall-tui to resources' do - let(:sample_rule) { - # as generated by iptables-save from rules created with system-config-firewall-tui - '-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT' - } - let(:resource) { provider.rule_to_hash(sample_rule, 'filter', 0) } - let(:instance) { provider.new(resource) } - - it 'rule name contains a MD5 sum of the line' do - expect(resource[:name]).to eq("9000 #{Digest::MD5.hexdigest(resource[:line])}") - end - - it 'parse arguments' do - expect(resource[:chain]).to eq('INPUT') - expect(resource[:proto]).to eq('tcp') - expect(resource[:dport]).to eq(['22']) - expect(resource[:state]).to eq(['NEW']) - expect(resource[:action]).to eq('accept') - end - end - - describe 'when creating resources' do - let(:instance) { provider.new(resource) } - - it 'insert_args should be an array' do - expect(instance.insert_args.class).to eq(Array) - end - end - - describe 'when modifying resources' do - let(:instance) { provider.new(resource) } - - it 'update_args should be an array' do - expect(instance.update_args.class).to eq(Array) - end - - it 'fails when modifying the chain' do - expect { instance.chain = "OUTPUT" }.to raise_error(/is not supported/) - end - end - - describe 'when deleting resources' do - let(:sample_rule) { - '-A INPUT -s 1.1.1.1 -d 1.1.1.1 -p tcp -m multiport --dports 7061,7062 -m multiport --sports 7061,7062 -j ACCEPT' - } - let(:resource) { provider.rule_to_hash(sample_rule, 'filter', 0) } - let(:instance) { provider.new(resource) } - - it 'resource[:line] looks like the original rule' do - resource[:line] == sample_rule - end - - it 'delete_args is an array' do - expect(instance.delete_args.class).to eq(Array) - end - - it 'delete_args is the same as the rule string when joined' do - expect(instance.delete_args.join(' ')).to eq(sample_rule.gsub(/\-A/, - '-t filter -D')) - end - end -end - -describe 'ip6tables provider' do - let(:provider6) { Puppet::Type.type(:firewall).provider(:ip6tables) } - let(:resource) { - Puppet::Type.type(:firewall).new({ - :name => '000 test foo', - :action => 'accept', - :provider => "ip6tables", - }) - } - - before :each do - allow(Puppet::Type::Firewall).to receive(:ip6tables).and_return provider6 - allow(provider6).to receive(:command).with(:ip6tables_save).and_return "/sbin/ip6tables-save" - - # Stub iptables version - allow(Facter.fact(:ip6tables_version)).to receive(:value).and_return '1.4.7' - - allow(Puppet::Util::Execution).to receive(:execute).and_return '' - allow(Puppet::Util).to receive(:which).with("ip6tables-save"). - and_return "/sbin/ip6tables-save" - end - - it 'should be able to get a list of existing rules' do - provider6.instances.each do |rule| - rule.should be_instance_of(provider6) - rule.properties[:provider6].to_s.should == provider6.name.to_s - end - end - - it 'should ignore lines with fatal errors' do - allow(Puppet::Util::Execution).to receive(:execute).with(['/sbin/ip6tables-save']). - and_return("FATAL: Could not load /lib/modules/2.6.18-028stab095.1/modules.dep: No such file or directory") - provider6.instances.length.should == 0 - end - - # Load in ruby hash for test fixtures. - load 'spec/fixtures/ip6tables/conversion_hash.rb' - - describe 'when converting rules to resources' do - ARGS_TO_HASH6.each do |test_name,data| - describe "for test data '#{test_name}'" do - let(:resource) { provider6.rule_to_hash(data[:line], data[:table], 0) } - - # If this option is enabled, make sure the parameters exactly match - if data[:compare_all] then - it "the parameter hash keys should be the same as returned by rules_to_hash" do - resource.keys.should =~ data[:params].keys - end - end - - # Iterate across each parameter, creating an example for comparison - data[:params].each do |param_name, param_value| - it "the parameter '#{param_name.to_s}' should match #{param_value.inspect}" do - resource[param_name].should == data[:params][param_name] - end - end - end - end - end - - describe 'when working out general_args' do - HASH_TO_ARGS6.each do |test_name,data| - describe "for test data '#{test_name}'" do - let(:resource) { Puppet::Type.type(:firewall).new(data[:params]) } - let(:provider6) { Puppet::Type.type(:firewall).provider(:ip6tables) } - let(:instance) { provider6.new(resource) } - - it 'general_args should be valid' do - instance.general_args.flatten.should == data[:args] - end - end - end - end -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewall_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewall_spec.rb deleted file mode 100755 index afb61662b6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewall_spec.rb +++ /dev/null @@ -1,650 +0,0 @@ -#!/usr/bin/env rspec - -require 'spec_helper' - -firewall = Puppet::Type.type(:firewall) - -describe firewall do - before :each do - @class = firewall - @provider = double 'provider' - allow(@provider).to receive(:name).and_return(:iptables) - allow(Puppet::Type::Firewall).to receive(:defaultprovider).and_return @provider - - @resource = @class.new({:name => '000 test foo'}) - - # Stub iptables version - allow(Facter.fact(:iptables_version)).to receive(:value).and_return('1.4.2') - allow(Facter.fact(:ip6tables_version)).to receive(:value).and_return('1.4.2') - - # Stub confine facts - allow(Facter.fact(:kernel)).to receive(:value).and_return('Linux') - allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('Debian') - end - - it 'should have :name be its namevar' do - @class.key_attributes.should == [:name] - end - - describe ':name' do - it 'should accept a name' do - @resource[:name] = '000-test-foo' - @resource[:name].should == '000-test-foo' - end - - it 'should not accept a name with non-ASCII chars' do - lambda { @resource[:name] = '%*#^(#$' }.should raise_error(Puppet::Error) - end - end - - describe ':action' do - it "should have no default" do - res = @class.new(:name => "000 test") - res.parameters[:action].should == nil - end - - [:accept, :drop, :reject].each do |action| - it "should accept value #{action}" do - @resource[:action] = action - @resource[:action].should == action - end - end - - it 'should fail when value is not recognized' do - lambda { @resource[:action] = 'not valid' }.should raise_error(Puppet::Error) - end - end - - describe ':chain' do - [:INPUT, :FORWARD, :OUTPUT, :PREROUTING, :POSTROUTING].each do |chain| - it "should accept chain value #{chain}" do - @resource[:chain] = chain - @resource[:chain].should == chain - end - end - - it 'should fail when the chain value is not recognized' do - lambda { @resource[:chain] = 'not valid' }.should raise_error(Puppet::Error) - end - end - - describe ':table' do - [:nat, :mangle, :filter, :raw].each do |table| - it "should accept table value #{table}" do - @resource[:table] = table - @resource[:table].should == table - end - end - - it "should fail when table value is not recognized" do - lambda { @resource[:table] = 'not valid' }.should raise_error(Puppet::Error) - end - end - - describe ':proto' do - [:tcp, :udp, :icmp, :esp, :ah, :vrrp, :igmp, :ipencap, :ospf, :gre, :all].each do |proto| - it "should accept proto value #{proto}" do - @resource[:proto] = proto - @resource[:proto].should == proto - end - end - - it "should fail when proto value is not recognized" do - lambda { @resource[:proto] = 'foo' }.should raise_error(Puppet::Error) - end - end - - describe ':jump' do - it "should have no default" do - res = @class.new(:name => "000 test") - res.parameters[:jump].should == nil - end - - ['QUEUE', 'RETURN', 'DNAT', 'SNAT', 'LOG', 'MASQUERADE', 'REDIRECT', 'MARK'].each do |jump| - it "should accept jump value #{jump}" do - @resource[:jump] = jump - @resource[:jump].should == jump - end - end - - ['ACCEPT', 'DROP', 'REJECT'].each do |jump| - it "should now fail when value #{jump}" do - lambda { @resource[:jump] = jump }.should raise_error(Puppet::Error) - end - end - - it "should fail when jump value is not recognized" do - lambda { @resource[:jump] = '%^&*' }.should raise_error(Puppet::Error) - end - end - - [:source, :destination].each do |addr| - describe addr do - it "should accept a #{addr} as a string" do - @resource[addr] = '127.0.0.1' - @resource[addr].should == '127.0.0.1/32' - end - ['0.0.0.0/0', '::/0'].each do |prefix| - it "should be nil for zero prefix length address #{prefix}" do - @resource[addr] = prefix - @resource[addr].should == nil - end - end - it "should accept a negated #{addr} as a string" do - @resource[addr] = '! 127.0.0.1' - @resource[addr].should == '! 127.0.0.1/32' - end - end - end - - [:dport, :sport].each do |port| - describe port do - it "should accept a #{port} as string" do - @resource[port] = '22' - @resource[port].should == ['22'] - end - - it "should accept a #{port} as an array" do - @resource[port] = ['22','23'] - @resource[port].should == ['22','23'] - end - - it "should accept a #{port} as a number" do - @resource[port] = 22 - @resource[port].should == ['22'] - end - - it "should accept a #{port} as a hyphen separated range" do - @resource[port] = ['22-1000'] - @resource[port].should == ['22-1000'] - end - - it "should accept a #{port} as a combination of arrays of single and " \ - "hyphen separated ranges" do - - @resource[port] = ['22-1000','33','3000-4000'] - @resource[port].should == ['22-1000','33','3000-4000'] - end - - it "should convert a port name for #{port} to its number" do - @resource[port] = 'ssh' - @resource[port].should == ['22'] - end - - it "should not accept something invalid for #{port}" do - expect { @resource[port] = 'something odd' }.to raise_error(Puppet::Error, /^Parameter .+ failed.+Munging failed for value ".+" in class .+: no such service/) - end - - it "should not accept something invalid in an array for #{port}" do - expect { @resource[port] = ['something odd','something even odder'] }.to raise_error(Puppet::Error, /^Parameter .+ failed.+Munging failed for value ".+" in class .+: no such service/) - end - end - end - - [:dst_type, :src_type].each do |addrtype| - describe addrtype do - it "should have no default" do - res = @class.new(:name => "000 test") - res.parameters[addrtype].should == nil - end - end - - [:UNSPEC, :UNICAST, :LOCAL, :BROADCAST, :ANYCAST, :MULTICAST, :BLACKHOLE, - :UNREACHABLE, :PROHIBIT, :THROW, :NAT, :XRESOLVE].each do |type| - it "should accept #{addrtype} value #{type}" do - @resource[addrtype] = type - @resource[addrtype].should == type - end - end - - it "should fail when #{addrtype} value is not recognized" do - lambda { @resource[addrtype] = 'foo' }.should raise_error(Puppet::Error) - end - end - - [:iniface, :outiface].each do |iface| - describe iface do - it "should accept #{iface} value as a string" do - @resource[iface] = 'eth1' - @resource[iface].should == 'eth1' - end - end - end - - [:tosource, :todest].each do |addr| - describe addr do - it "should accept #{addr} value as a string" do - @resource[addr] = '127.0.0.1' - end - end - end - - describe ':log_level' do - values = { - 'panic' => '0', - 'alert' => '1', - 'crit' => '2', - 'err' => '3', - 'warn' => '4', - 'warning' => '4', - 'not' => '5', - 'notice' => '5', - 'info' => '6', - 'debug' => '7' - } - - values.each do |k,v| - it { - @resource[:log_level] = k - @resource[:log_level].should == v - } - - it { - @resource[:log_level] = 3 - @resource[:log_level].should == 3 - } - - it { lambda { @resource[:log_level] = 'foo' }.should raise_error(Puppet::Error) } - end - end - - describe ':icmp' do - icmp_codes = { - :iptables => { - '0' => 'echo-reply', - '3' => 'destination-unreachable', - '4' => 'source-quench', - '6' => 'redirect', - '8' => 'echo-request', - '9' => 'router-advertisement', - '10' => 'router-solicitation', - '11' => 'time-exceeded', - '12' => 'parameter-problem', - '13' => 'timestamp-request', - '14' => 'timestamp-reply', - '17' => 'address-mask-request', - '18' => 'address-mask-reply' - }, - :ip6tables => { - '1' => 'destination-unreachable', - '3' => 'time-exceeded', - '4' => 'parameter-problem', - '128' => 'echo-request', - '129' => 'echo-reply', - '133' => 'router-solicitation', - '134' => 'router-advertisement', - '137' => 'redirect' - } - } - icmp_codes.each do |provider, values| - describe provider do - values.each do |k,v| - it 'should convert icmp string to number' do - @resource[:provider] = provider - @resource[:provider].should == provider - @resource[:icmp] = v - @resource[:icmp].should == k - end - end - end - end - - it 'should accept values as integers' do - @resource[:icmp] = 9 - @resource[:icmp].should == 9 - end - - it 'should fail if icmp type is "any"' do - lambda { @resource[:icmp] = 'any' }.should raise_error(Puppet::Error) - end - - it 'should fail if icmp type cannot be mapped to a numeric' do - lambda { @resource[:icmp] = 'foo' }.should raise_error(Puppet::Error) - end - end - - describe ':state' do - it 'should accept value as a string' do - @resource[:state] = :INVALID - @resource[:state].should == [:INVALID] - end - - it 'should accept value as an array' do - @resource[:state] = [:INVALID, :NEW] - @resource[:state].should == [:INVALID, :NEW] - end - - it 'should sort values alphabetically' do - @resource[:state] = [:NEW, :ESTABLISHED] - @resource[:state].should == [:ESTABLISHED, :NEW] - end - end - - describe ':ctstate' do - it 'should accept value as a string' do - @resource[:ctstate] = :INVALID - @resource[:ctstate].should == [:INVALID] - end - - it 'should accept value as an array' do - @resource[:ctstate] = [:INVALID, :NEW] - @resource[:ctstate].should == [:INVALID, :NEW] - end - - it 'should sort values alphabetically' do - @resource[:ctstate] = [:NEW, :ESTABLISHED] - @resource[:ctstate].should == [:ESTABLISHED, :NEW] - end - end - - describe ':burst' do - it 'should accept numeric values' do - @resource[:burst] = 12 - @resource[:burst].should == 12 - end - - it 'should fail if value is not numeric' do - lambda { @resource[:burst] = 'foo' }.should raise_error(Puppet::Error) - end - end - - describe ':recent' do - ['set', 'update', 'rcheck', 'remove'].each do |recent| - it "should accept recent value #{recent}" do - @resource[:recent] = recent - @resource[:recent].should == "--#{recent}" - end - end - end - - describe ':action and :jump' do - it 'should allow only 1 to be set at a time' do - expect { - @class.new( - :name => "001-test", - :action => "accept", - :jump => "custom_chain" - ) - }.to raise_error(Puppet::Error, /Only one of the parameters 'action' and 'jump' can be set$/) - end - end - describe ':gid and :uid' do - it 'should allow me to set uid' do - @resource[:uid] = 'root' - @resource[:uid].should == 'root' - end - it 'should allow me to set uid as an array, and silently hide my error' do - @resource[:uid] = ['root', 'bobby'] - @resource[:uid].should == 'root' - end - it 'should allow me to set gid' do - @resource[:gid] = 'root' - @resource[:gid].should == 'root' - end - it 'should allow me to set gid as an array, and silently hide my error' do - @resource[:gid] = ['root', 'bobby'] - @resource[:gid].should == 'root' - end - end - - describe ':set_mark' do - ['1.3.2', '1.4.2'].each do |iptables_version| - describe "with iptables #{iptables_version}" do - before { - Facter.clear - allow(Facter.fact(:iptables_version)).to receive(:value).and_return iptables_version - allow(Facter.fact(:ip6tables_version)).to receive(:value).and_return iptables_version - } - - if iptables_version == '1.3.2' - it 'should allow me to set set-mark without mask' do - @resource[:set_mark] = '0x3e8' - @resource[:set_mark].should == '0x3e8' - end - it 'should convert int to hex without mask' do - @resource[:set_mark] = '1000' - @resource[:set_mark].should == '0x3e8' - end - it 'should fail if mask is present' do - lambda { @resource[:set_mark] = '0x3e8/0xffffffff'}.should raise_error( - Puppet::Error, /iptables version #{iptables_version} does not support masks on MARK rules$/ - ) - end - end - - if iptables_version == '1.4.2' - it 'should allow me to set set-mark with mask' do - @resource[:set_mark] = '0x3e8/0xffffffff' - @resource[:set_mark].should == '0x3e8/0xffffffff' - end - it 'should convert int to hex and add a 32 bit mask' do - @resource[:set_mark] = '1000' - @resource[:set_mark].should == '0x3e8/0xffffffff' - end - it 'should add a 32 bit mask' do - @resource[:set_mark] = '0x32' - @resource[:set_mark].should == '0x32/0xffffffff' - end - it 'should use the mask provided' do - @resource[:set_mark] = '0x32/0x4' - @resource[:set_mark].should == '0x32/0x4' - end - it 'should use the mask provided and convert int to hex' do - @resource[:set_mark] = '1000/0x4' - @resource[:set_mark].should == '0x3e8/0x4' - end - it 'should fail if mask value is more than 32 bits' do - lambda { @resource[:set_mark] = '1/4294967296'}.should raise_error( - Puppet::Error, /MARK mask must be integer or hex between 0 and 0xffffffff$/ - ) - end - it 'should fail if mask is malformed' do - lambda { @resource[:set_mark] = '1000/0xq4'}.should raise_error( - Puppet::Error, /MARK mask must be integer or hex between 0 and 0xffffffff$/ - ) - end - end - - ['/', '1000/', 'pwnie'].each do |bad_mark| - it "should fail with malformed mark '#{bad_mark}'" do - lambda { @resource[:set_mark] = bad_mark}.should raise_error(Puppet::Error) - end - end - it 'should fail if mark value is more than 32 bits' do - lambda { @resource[:set_mark] = '4294967296'}.should raise_error( - Puppet::Error, /MARK value must be integer or hex between 0 and 0xffffffff$/ - ) - end - end - end - end - - [:chain, :jump].each do |param| - describe param do - it 'should autorequire fwchain when table and provider are undefined' do - @resource[param] = 'FOO' - @resource[:table].should == :filter - @resource[:provider].should == :iptables - - chain = Puppet::Type.type(:firewallchain).new(:name => 'FOO:filter:IPv4') - catalog = Puppet::Resource::Catalog.new - catalog.add_resource @resource - catalog.add_resource chain - rel = @resource.autorequire[0] - rel.source.ref.should == chain.ref - rel.target.ref.should == @resource.ref - end - - it 'should autorequire fwchain when table is undefined and provider is ip6tables' do - @resource[param] = 'FOO' - @resource[:table].should == :filter - @resource[:provider] = :ip6tables - - chain = Puppet::Type.type(:firewallchain).new(:name => 'FOO:filter:IPv6') - catalog = Puppet::Resource::Catalog.new - catalog.add_resource @resource - catalog.add_resource chain - rel = @resource.autorequire[0] - rel.source.ref.should == chain.ref - rel.target.ref.should == @resource.ref - end - - it 'should autorequire fwchain when table is raw and provider is undefined' do - @resource[param] = 'FOO' - @resource[:table] = :raw - @resource[:provider].should == :iptables - - chain = Puppet::Type.type(:firewallchain).new(:name => 'FOO:raw:IPv4') - catalog = Puppet::Resource::Catalog.new - catalog.add_resource @resource - catalog.add_resource chain - rel = @resource.autorequire[0] - rel.source.ref.should == chain.ref - rel.target.ref.should == @resource.ref - end - - it 'should autorequire fwchain when table is raw and provider is ip6tables' do - @resource[param] = 'FOO' - @resource[:table] = :raw - @resource[:provider] = :ip6tables - - chain = Puppet::Type.type(:firewallchain).new(:name => 'FOO:raw:IPv6') - catalog = Puppet::Resource::Catalog.new - catalog.add_resource @resource - catalog.add_resource chain - rel = @resource.autorequire[0] - rel.source.ref.should == chain.ref - rel.target.ref.should == @resource.ref - end - - # test where autorequire is still needed (table != filter) - ['INPUT', 'OUTPUT', 'FORWARD'].each do |test_chain| - it "should autorequire fwchain #{test_chain} when table is mangle and provider is undefined" do - @resource[param] = test_chain - @resource[:table] = :mangle - @resource[:provider].should == :iptables - - chain = Puppet::Type.type(:firewallchain).new(:name => "#{test_chain}:mangle:IPv4") - catalog = Puppet::Resource::Catalog.new - catalog.add_resource @resource - catalog.add_resource chain - rel = @resource.autorequire[0] - rel.source.ref.should == chain.ref - rel.target.ref.should == @resource.ref - end - - it "should autorequire fwchain #{test_chain} when table is mangle and provider is ip6tables" do - @resource[param] = test_chain - @resource[:table] = :mangle - @resource[:provider] = :ip6tables - - chain = Puppet::Type.type(:firewallchain).new(:name => "#{test_chain}:mangle:IPv6") - catalog = Puppet::Resource::Catalog.new - catalog.add_resource @resource - catalog.add_resource chain - rel = @resource.autorequire[0] - rel.source.ref.should == chain.ref - rel.target.ref.should == @resource.ref - end - end - - # test of case where autorequire should not happen - ['INPUT', 'OUTPUT', 'FORWARD'].each do |test_chain| - - it "should not autorequire fwchain #{test_chain} when table and provider are undefined" do - @resource[param] = test_chain - @resource[:table].should == :filter - @resource[:provider].should == :iptables - - chain = Puppet::Type.type(:firewallchain).new(:name => "#{test_chain}:filter:IPv4") - catalog = Puppet::Resource::Catalog.new - catalog.add_resource @resource - catalog.add_resource chain - rel = @resource.autorequire[0] - rel.should == nil - end - - it "should not autorequire fwchain #{test_chain} when table is undefined and provider is ip6tables" do - @resource[param] = test_chain - @resource[:table].should == :filter - @resource[:provider] = :ip6tables - - chain = Puppet::Type.type(:firewallchain).new(:name => "#{test_chain}:filter:IPv6") - catalog = Puppet::Resource::Catalog.new - catalog.add_resource @resource - catalog.add_resource chain - rel = @resource.autorequire[0] - rel.should == nil - end - end - end - end - - describe ":chain and :jump" do - it 'should autorequire independent fwchains' do - @resource[:chain] = 'FOO' - @resource[:jump] = 'BAR' - @resource[:table].should == :filter - @resource[:provider].should == :iptables - - chain_foo = Puppet::Type.type(:firewallchain).new(:name => 'FOO:filter:IPv4') - chain_bar = Puppet::Type.type(:firewallchain).new(:name => 'BAR:filter:IPv4') - catalog = Puppet::Resource::Catalog.new - catalog.add_resource @resource - catalog.add_resource chain_foo - catalog.add_resource chain_bar - rel = @resource.autorequire - rel[0].source.ref.should == chain_foo.ref - rel[0].target.ref.should == @resource.ref - rel[1].source.ref.should == chain_bar.ref - rel[1].target.ref.should == @resource.ref - end - end - - describe ':pkttype' do - [:multicast, :broadcast, :unicast].each do |pkttype| - it "should accept pkttype value #{pkttype}" do - @resource[:pkttype] = pkttype - @resource[:pkttype].should == pkttype - end - end - - it 'should fail when the pkttype value is not recognized' do - lambda { @resource[:pkttype] = 'not valid' }.should raise_error(Puppet::Error) - end - end - - describe 'autorequire packages' do - [:iptables, :ip6tables].each do |provider| - it "provider #{provider} should autorequire package iptables" do - @resource[:provider] = provider - @resource[:provider].should == provider - package = Puppet::Type.type(:package).new(:name => 'iptables') - catalog = Puppet::Resource::Catalog.new - catalog.add_resource @resource - catalog.add_resource package - rel = @resource.autorequire[0] - rel.source.ref.should == package.ref - rel.target.ref.should == @resource.ref - end - - it "provider #{provider} should autorequire packages iptables and iptables-persistent" do - @resource[:provider] = provider - @resource[:provider].should == provider - packages = [ - Puppet::Type.type(:package).new(:name => 'iptables'), - Puppet::Type.type(:package).new(:name => 'iptables-persistent') - ] - catalog = Puppet::Resource::Catalog.new - catalog.add_resource @resource - packages.each do |package| - catalog.add_resource package - end - packages.zip(@resource.autorequire) do |package, rel| - rel.source.ref.should == package.ref - rel.target.ref.should == @resource.ref - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewallchain_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewallchain_spec.rb deleted file mode 100755 index 88ca99dc59..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/type/firewallchain_spec.rb +++ /dev/null @@ -1,185 +0,0 @@ -#!/usr/bin/env rspec - -require 'spec_helper' - -firewallchain = Puppet::Type.type(:firewallchain) - -describe firewallchain do - before(:each) do - # Stub confine facts - allow(Facter.fact(:kernel)).to receive(:value).and_return('Linux') - allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('Debian') - end - let(:klass) { firewallchain } - let(:provider) { - prov = double 'provider' - allow(prov).to receive(:name).and_return(:iptables_chain) - prov - } - let(:resource) { - allow(Puppet::Type::Firewallchain).to receive(:defaultprovider).and_return provider - klass.new({:name => 'INPUT:filter:IPv4', :policy => :accept }) - } - - it 'should have :name be its namevar' do - klass.key_attributes.should == [:name] - end - - describe ':name' do - {'nat' => ['PREROUTING', 'POSTROUTING', 'INPUT', 'OUTPUT'], - 'mangle' => [ 'PREROUTING', 'POSTROUTING', 'INPUT', 'FORWARD', 'OUTPUT' ], - 'filter' => ['INPUT','OUTPUT','FORWARD'], - 'raw' => [ 'PREROUTING', 'OUTPUT'], - 'broute' => ['BROUTING'] - }.each_pair do |table, allowedinternalchains| - ['IPv4', 'IPv6', 'ethernet'].each do |protocol| - [ 'test', '$5()*&%\'"^$09):' ].each do |chainname| - name = "#{chainname}:#{table}:#{protocol}" - if table == 'nat' && protocol == 'IPv6' - it "should fail #{name}" do - expect { resource[:name] = name }.to raise_error(Puppet::Error) - end - elsif protocol != 'ethernet' && table == 'broute' - it "should fail #{name}" do - expect { resource[:name] = name }.to raise_error(Puppet::Error) - end - else - it "should accept name #{name}" do - resource[:name] = name - resource[:name].should == name - end - end - end # chainname - end # protocol - - [ 'PREROUTING', 'POSTROUTING', 'BROUTING', 'INPUT', 'FORWARD', 'OUTPUT' ].each do |internalchain| - name = internalchain + ':' + table + ':' - if internalchain == 'BROUTING' - name += 'ethernet' - elsif table == 'nat' - name += 'IPv4' - else - name += 'IPv4' - end - if allowedinternalchains.include? internalchain - it "should allow #{name}" do - resource[:name] = name - resource[:name].should == name - end - else - it "should fail #{name}" do - expect { resource[:name] = name }.to raise_error(Puppet::Error) - end - end - end # internalchain - - end # table, allowedinternalchainnames - - it 'should fail with invalid table names' do - expect { resource[:name] = 'wrongtablename:test:IPv4' }.to raise_error(Puppet::Error) - end - - it 'should fail with invalid protocols names' do - expect { resource[:name] = 'test:filter:IPv5' }.to raise_error(Puppet::Error) - end - - end - - describe ':policy' do - - [:accept, :drop, :queue, :return].each do |policy| - it "should accept policy #{policy}" do - resource[:policy] = policy - resource[:policy].should == policy - end - end - - it 'should fail when value is not recognized' do - expect { resource[:policy] = 'not valid' }.to raise_error(Puppet::Error) - end - - [:accept, :drop, :queue, :return].each do |policy| - it "non-inbuilt chains should not accept policy #{policy}" do - expect { klass.new({:name => 'testchain:filter:IPv4', :policy => policy }) }.to raise_error(Puppet::Error) - end - it "non-inbuilt chains can accept policies on protocol = ethernet (policy #{policy})" do - klass.new({:name => 'testchain:filter:ethernet', :policy => policy }) - end - end - - end - - describe 'autorequire packages' do - it "provider iptables_chain should autorequire package iptables" do - resource[:provider].should == :iptables_chain - package = Puppet::Type.type(:package).new(:name => 'iptables') - catalog = Puppet::Resource::Catalog.new - catalog.add_resource resource - catalog.add_resource package - rel = resource.autorequire[0] - rel.source.ref.should == package.ref - rel.target.ref.should == resource.ref - end - - it "provider iptables_chain should autorequire packages iptables and iptables-persistent" do - resource[:provider].should == :iptables_chain - packages = [ - Puppet::Type.type(:package).new(:name => 'iptables'), - Puppet::Type.type(:package).new(:name => 'iptables-persistent') - ] - catalog = Puppet::Resource::Catalog.new - catalog.add_resource resource - packages.each do |package| - catalog.add_resource package - end - packages.zip(resource.autorequire) do |package, rel| - rel.source.ref.should == package.ref - rel.target.ref.should == resource.ref - end - end - end - - describe 'purge iptables rules' do - before(:each) do - allow(Puppet::Type.type(:firewall).provider(:iptables)).to receive(:iptables_save).and_return(< 'INPUT:filter:IPv4', :purge => true) - - expect(resource.generate.size).to eq(3) - end - - it 'should not generate ignored iptables rules' do - resource = Puppet::Type::Firewallchain.new(:name => 'INPUT:filter:IPv4', :purge => true, :ignore => ['-j fail2ban-ssh']) - - expect(resource.generate.size).to eq(2) - end - - it 'should not generate iptables resources when not enabled' do - resource = Puppet::Type::Firewallchain.new(:name => 'INPUT:filter:IPv4') - - expect(resource.generate.size).to eq(0) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/util/firewall_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/util/firewall_spec.rb deleted file mode 100644 index e5864879c3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/util/firewall_spec.rb +++ /dev/null @@ -1,197 +0,0 @@ -require 'spec_helper' - -describe 'Puppet::Util::Firewall' do - let(:resource) { - type = Puppet::Type.type(:firewall) - provider = double 'provider' - allow(provider).to receive(:name).and_return(:iptables) - allow(Puppet::Type::Firewall).to receive(:defaultprovider).and_return(provider) - type.new({:name => '000 test foo'}) - } - - before(:each) { resource } - - describe '#host_to_ip' do - subject { resource } - specify { - expect(Resolv).to receive(:getaddress).with('puppetlabs.com').and_return('96.126.112.51') - subject.host_to_ip('puppetlabs.com').should == '96.126.112.51/32' - } - specify { subject.host_to_ip('96.126.112.51').should == '96.126.112.51/32' } - specify { subject.host_to_ip('96.126.112.51/32').should == '96.126.112.51/32' } - specify { subject.host_to_ip('2001:db8:85a3:0:0:8a2e:370:7334').should == '2001:db8:85a3::8a2e:370:7334/128' } - specify { subject.host_to_ip('2001:db8:1234::/48').should == '2001:db8:1234::/48' } - specify { subject.host_to_ip('0.0.0.0/0').should == nil } - specify { subject.host_to_ip('::/0').should == nil } - end - - describe '#host_to_mask' do - subject { resource } - specify { - expect(Resolv).to receive(:getaddress).at_least(:once).with('puppetlabs.com').and_return('96.126.112.51') - subject.host_to_mask('puppetlabs.com').should == '96.126.112.51/32' - subject.host_to_mask('!puppetlabs.com').should == '! 96.126.112.51/32' - } - specify { subject.host_to_mask('96.126.112.51').should == '96.126.112.51/32' } - specify { subject.host_to_mask('!96.126.112.51').should == '! 96.126.112.51/32' } - specify { subject.host_to_mask('96.126.112.51/32').should == '96.126.112.51/32' } - specify { subject.host_to_mask('! 96.126.112.51/32').should == '! 96.126.112.51/32' } - specify { subject.host_to_mask('2001:db8:85a3:0:0:8a2e:370:7334').should == '2001:db8:85a3::8a2e:370:7334/128' } - specify { subject.host_to_mask('!2001:db8:85a3:0:0:8a2e:370:7334').should == '! 2001:db8:85a3::8a2e:370:7334/128' } - specify { subject.host_to_mask('2001:db8:1234::/48').should == '2001:db8:1234::/48' } - specify { subject.host_to_mask('! 2001:db8:1234::/48').should == '! 2001:db8:1234::/48' } - specify { subject.host_to_mask('0.0.0.0/0').should == nil } - specify { subject.host_to_mask('!0.0.0.0/0').should == nil } - specify { subject.host_to_mask('::/0').should == nil } - specify { subject.host_to_mask('! ::/0').should == nil } - end - - describe '#icmp_name_to_number' do - describe 'proto unsupported' do - subject { resource } - - %w{inet5 inet8 foo}.each do |proto| - it "should reject invalid proto #{proto}" do - expect { subject.icmp_name_to_number('echo-reply', proto) }. - to raise_error(ArgumentError, "unsupported protocol family '#{proto}'") - end - end - end - - describe 'proto IPv4' do - proto = 'inet' - subject { resource } - specify { subject.icmp_name_to_number('echo-reply', proto).should == '0' } - specify { subject.icmp_name_to_number('destination-unreachable', proto).should == '3' } - specify { subject.icmp_name_to_number('source-quench', proto).should == '4' } - specify { subject.icmp_name_to_number('redirect', proto).should == '6' } - specify { subject.icmp_name_to_number('echo-request', proto).should == '8' } - specify { subject.icmp_name_to_number('router-advertisement', proto).should == '9' } - specify { subject.icmp_name_to_number('router-solicitation', proto).should == '10' } - specify { subject.icmp_name_to_number('time-exceeded', proto).should == '11' } - specify { subject.icmp_name_to_number('parameter-problem', proto).should == '12' } - specify { subject.icmp_name_to_number('timestamp-request', proto).should == '13' } - specify { subject.icmp_name_to_number('timestamp-reply', proto).should == '14' } - specify { subject.icmp_name_to_number('address-mask-request', proto).should == '17' } - specify { subject.icmp_name_to_number('address-mask-reply', proto).should == '18' } - end - - describe 'proto IPv6' do - proto = 'inet6' - subject { resource } - specify { subject.icmp_name_to_number('destination-unreachable', proto).should == '1' } - specify { subject.icmp_name_to_number('time-exceeded', proto).should == '3' } - specify { subject.icmp_name_to_number('parameter-problem', proto).should == '4' } - specify { subject.icmp_name_to_number('echo-request', proto).should == '128' } - specify { subject.icmp_name_to_number('echo-reply', proto).should == '129' } - specify { subject.icmp_name_to_number('router-solicitation', proto).should == '133' } - specify { subject.icmp_name_to_number('router-advertisement', proto).should == '134' } - specify { subject.icmp_name_to_number('redirect', proto).should == '137' } - end - end - - describe '#string_to_port' do - subject { resource } - specify { subject.string_to_port('80','tcp').should == '80' } - specify { subject.string_to_port(80,'tcp').should == '80' } - specify { subject.string_to_port('http','tcp').should == '80' } - specify { subject.string_to_port('domain','udp').should == '53' } - end - - describe '#to_hex32' do - subject { resource } - specify { subject.to_hex32('0').should == '0x0' } - specify { subject.to_hex32('0x32').should == '0x32' } - specify { subject.to_hex32('42').should == '0x2a' } - specify { subject.to_hex32('4294967295').should == '0xffffffff' } - specify { subject.to_hex32('4294967296').should == nil } - specify { subject.to_hex32('-1').should == nil } - specify { subject.to_hex32('bananas').should == nil } - end - - describe '#persist_iptables' do - before { Facter.clear } - subject { resource } - - describe 'when proto is IPv4' do - let(:proto) { 'IPv4' } - - it 'should exec /sbin/service if running RHEL 6 or earlier' do - allow(Facter.fact(:osfamily)).to receive(:value).and_return('RedHat') - allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('RedHat') - allow(Facter.fact(:operatingsystemrelease)).to receive(:value).and_return('6') - - expect(subject).to receive(:execute).with(%w{/sbin/service iptables save}) - subject.persist_iptables(proto) - end - - it 'should exec for systemd if running RHEL 7 or greater' do - allow(Facter.fact(:osfamily)).to receive(:value).and_return('RedHat') - allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('RedHat') - allow(Facter.fact(:operatingsystemrelease)).to receive(:value).and_return('7') - - expect(subject).to receive(:execute).with(%w{/usr/libexec/iptables/iptables.init save}) - subject.persist_iptables(proto) - end - - it 'should exec for systemd if running Fedora 15 or greater' do - allow(Facter.fact(:osfamily)).to receive(:value).and_return('RedHat') - allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('Fedora') - allow(Facter.fact(:operatingsystemrelease)).to receive(:value).and_return('15') - - expect(subject).to receive(:execute).with(%w{/usr/libexec/iptables/iptables.init save}) - subject.persist_iptables(proto) - end - - it 'should exec for CentOS identified from operatingsystem' do - allow(Facter.fact(:osfamily)).to receive(:value).and_return(nil) - allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('CentOS') - expect(subject).to receive(:execute).with(%w{/sbin/service iptables save}) - subject.persist_iptables(proto) - end - - it 'should exec for Archlinux identified from osfamily' do - allow(Facter.fact(:osfamily)).to receive(:value).and_return('Archlinux') - expect(subject).to receive(:execute).with(['/bin/sh', '-c', '/usr/sbin/iptables-save > /etc/iptables/iptables.rules']) - subject.persist_iptables(proto) - end - - it 'should raise a warning when exec fails' do - allow(Facter.fact(:osfamily)).to receive(:value).and_return('RedHat') - allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('RedHat') - allow(Facter.fact(:operatingsystemrelease)).to receive(:value).and_return('6') - - expect(subject).to receive(:execute).with(%w{/sbin/service iptables save}). - and_raise(Puppet::ExecutionFailure, 'some error') - expect(subject).to receive(:warning).with('Unable to persist firewall rules: some error') - subject.persist_iptables(proto) - end - end - - describe 'when proto is IPv6' do - let(:proto) { 'IPv6' } - - it 'should exec for newer Ubuntu' do - allow(Facter.fact(:osfamily)).to receive(:value).and_return(nil) - allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('Ubuntu') - allow(Facter.fact(:iptables_persistent_version)).to receive(:value).and_return('0.5.3ubuntu2') - expect(subject).to receive(:execute).with(%w{/usr/sbin/service iptables-persistent save}) - subject.persist_iptables(proto) - end - - it 'should not exec for older Ubuntu which does not support IPv6' do - allow(Facter.fact(:osfamily)).to receive(:value).and_return(nil) - allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('Ubuntu') - allow(Facter.fact(:iptables_persistent_version)).to receive(:value).and_return('0.0.20090701') - expect(subject).to receive(:execute).never - subject.persist_iptables(proto) - end - - it 'should not exec for Suse which is not supported' do - allow(Facter.fact(:osfamily)).to receive(:value).and_return('Suse') - expect(subject).to receive(:execute).never - subject.persist_iptables(proto) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/util/ipcidr_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/util/ipcidr_spec.rb deleted file mode 100644 index 916f74a350..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/firewall/spec/unit/puppet/util/ipcidr_spec.rb +++ /dev/null @@ -1,67 +0,0 @@ -require 'spec_helper' - -describe 'Puppet::Util::IPCidr' do - describe 'ipv4 address' do - before { @ipaddr = Puppet::Util::IPCidr.new('96.126.112.51') } - subject { @ipaddr } - specify { subject.cidr.should == '96.126.112.51/32' } - specify { subject.prefixlen.should == 32 } - specify { subject.netmask.should == '255.255.255.255' } - end - - describe 'single ipv4 address with cidr' do - before { @ipcidr = Puppet::Util::IPCidr.new('96.126.112.51/32') } - subject { @ipcidr } - specify { subject.cidr.should == '96.126.112.51/32' } - specify { subject.prefixlen.should == 32 } - specify { subject.netmask.should == '255.255.255.255' } - end - - describe 'ipv4 address range with cidr' do - before { @ipcidr = Puppet::Util::IPCidr.new('96.126.112.0/24') } - subject { @ipcidr } - specify { subject.cidr.should == '96.126.112.0/24' } - specify { subject.prefixlen.should == 24 } - specify { subject.netmask.should == '255.255.255.0' } - end - - describe 'ipv4 open range with cidr' do - before { @ipcidr = Puppet::Util::IPCidr.new('0.0.0.0/0') } - subject { @ipcidr } - specify { subject.cidr.should == '0.0.0.0/0' } - specify { subject.prefixlen.should == 0 } - specify { subject.netmask.should == '0.0.0.0' } - end - - describe 'ipv6 address' do - before { @ipaddr = Puppet::Util::IPCidr.new('2001:db8:85a3:0:0:8a2e:370:7334') } - subject { @ipaddr } - specify { subject.cidr.should == '2001:db8:85a3::8a2e:370:7334/128' } - specify { subject.prefixlen.should == 128 } - specify { subject.netmask.should == 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff' } - end - - describe 'single ipv6 addr with cidr' do - before { @ipaddr = Puppet::Util::IPCidr.new('2001:db8:85a3:0:0:8a2e:370:7334/128') } - subject { @ipaddr } - specify { subject.cidr.should == '2001:db8:85a3::8a2e:370:7334/128' } - specify { subject.prefixlen.should == 128 } - specify { subject.netmask.should == 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff' } - end - - describe 'ipv6 addr range with cidr' do - before { @ipaddr = Puppet::Util::IPCidr.new('2001:db8:1234::/48') } - subject { @ipaddr } - specify { subject.cidr.should == '2001:db8:1234::/48' } - specify { subject.prefixlen.should == 48 } - specify { subject.netmask.should == 'ffff:ffff:ffff:0000:0000:0000:0000:0000' } - end - - describe 'ipv6 open range with cidr' do - before { @ipaddr = Puppet::Util::IPCidr.new('::/0') } - subject { @ipaddr } - specify { subject.cidr.should == '::/0' } - specify { subject.prefixlen.should == 0 } - specify { subject.netmask.should == '0000:0000:0000:0000:0000:0000:0000:0000' } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/.fixtures.yml deleted file mode 100644 index 2aa9e3d77a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/.fixtures.yml +++ /dev/null @@ -1,5 +0,0 @@ -fixtures: - repositories: - vcsrepo: git://github.com/puppetlabs/puppetlabs-vcsrepo.git - symlinks: - git: "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/CHANGELOG b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/CHANGELOG deleted file mode 100644 index 670358b689..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/CHANGELOG +++ /dev/null @@ -1,2 +0,0 @@ -2011-06-03 - Dan Bode - 0.0.1 -* initial commit diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/LICENSE deleted file mode 100644 index 297f85cfa8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2013 Puppet Labs - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/Modulefile deleted file mode 100644 index 9403b43a06..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/Modulefile +++ /dev/null @@ -1,10 +0,0 @@ -name 'puppetlabs-git' -version '0.0.3' -source 'git://github.com/puppetlabs/puppetlabs-git.git' -author 'puppetlabs' -license 'Apache 2.0' -summary 'module for installing git' -description 'module for installing git' -project_page 'https://github.com/puppetlabs/puppetlabs-git/' -dependency 'puppetlabs/vcsrepo' - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/README.md deleted file mode 100644 index 49e51f4817..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/README.md +++ /dev/null @@ -1,71 +0,0 @@ -#git - -####Table of Contents - -1. [Overview - What is the [Modulename] module?](#overview) -2. [Module Description - What does the module do?](#module-description) -3. [Setup - The basics of getting started with [Modulename]](#setup) - * [What [Modulename] affects](#what-registry-affects) -4. [Usage - Configuration options and additional functionality](#usage) -6. [Limitations - OS compatibility, etc.](#limitations) -7. [Development - Guide for contributing to the module](#development) - -##Overview - -Simple module that can install git or gitosis - -##Module Description - -This module installs the git revision control system on a target node. It does not manage a git server or any associated services; it simply ensures a bare minimum set of features (e.g. just a package) to use git. - -##Setup - -###What git affects - -* Package['git'] - -The specifics managed by the module may vary depending on the platform. - -##Usage - -###I just want `git` installed -Simply include the `git` class. - -```puppet -include git -``` - -###I want to use `git subtree` with bash completion - -```puppet -include git::subtree -``` - -##Reference - -###Classes - -* `git`: Installs the git client package. -* `gitosis`: Installs the gitosis package. No configuration -* `subtree`: Installs and configures git-subtree for git 1.7 and up. - -###Facts - -* `git_exec_path`: Path to the directory containing all `git-*` commands. -* `git_version`: Version of git that is installed. Undefined if not installed. - -##Limitations - -This module is known to work with the following operating system families: - - - RedHat 5, 6 - - Debian 6.0.7 or newer - - Ubuntu 12.04 or newer - -##Development - -Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve. - -We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. - -You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/Rakefile deleted file mode 100644 index cd3d379958..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/Rakefile +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/files/subtree/bash_completion.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/files/subtree/bash_completion.sh deleted file mode 100644 index f2683e4494..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/files/subtree/bash_completion.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!bash -# -# bash completion support for Git subtree. -# -# To use this routine: -# -# 1) Make sure you have installed and configured the core Git completion script, which is required to make this script work; -# 2) Copy this file to somewhere (e.g. ~/.git-subtree-completion.sh); -# 3) Added the following line to your .bashrc: -# source ~/.git-subtree-completion.sh -# - -_git_subtree () -{ - local cur="${COMP_WORDS[COMP_CWORD]}" - - if [ $COMP_CWORD -eq 2 ]; then - __gitcomp "add merge pull push split" - return - elif [ $COMP_CWORD -eq 3 ]; then - __gitcomp "--prefix=" - return - fi - __gitcomp "$(__git_remotes)" -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/lib/facter/git_exec_path.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/lib/facter/git_exec_path.rb deleted file mode 100644 index 23d06e0b0d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/lib/facter/git_exec_path.rb +++ /dev/null @@ -1,4 +0,0 @@ -# git_exec_path.rb -Facter.add('git_exec_path') do - setcode 'git --exec-path 2>/dev/null' -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/lib/facter/git_version.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/lib/facter/git_version.rb deleted file mode 100644 index 4cb71d2cce..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/lib/facter/git_version.rb +++ /dev/null @@ -1,4 +0,0 @@ -# git_version -Facter.add('git_version') do - setcode 'git --version 2>/dev/null'.sub(/git version /, '') -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/manifests/gitosis.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/manifests/gitosis.pp deleted file mode 100644 index 64b7b2df3d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/manifests/gitosis.pp +++ /dev/null @@ -1,13 +0,0 @@ -# Class: gitosis -# -# This installs and configures gitosis -# -# Requires: -# - Class[git] -# -class git::gitosis { - include ::git - package {'gitosis': - ensure => present - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/manifests/init.pp deleted file mode 100644 index 7e57fa23cb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/manifests/init.pp +++ /dev/null @@ -1,17 +0,0 @@ -# Class: git -# -# This class installs git -# -# Actions: -# - Install the git package -# -# Sample Usage: -# class { 'git': } -# -class git { - if ! defined(Package['git']) { - package { 'git': - ensure => present - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/manifests/subtree.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/manifests/subtree.pp deleted file mode 100644 index 6c47ca8b4d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/manifests/subtree.pp +++ /dev/null @@ -1,43 +0,0 @@ -# == Class: git::subtree -# -# Installs and configure git-subtree -# -class git::subtree { - - include ::git - - Package['git'] -> Class['git::subtree'] - - if (versioncmp('1.7.0', $::git_version) > 0) { - fail 'git-subtree requires git 1.7 or later!' - } - - if (versioncmp('1.7.11', $::git_version) > 0) { - $source_dir = '/usr/src/git-subtree' - vcsrepo { $source_dir: - ensure => present, - source => 'http://github.com/apenwarr/git-subtree.git', - provider => 'git', - revision => '2793ee6ba', - } - } else { - $source_dir = '/usr/share/doc/git-core/contrib/subtree' - } - - exec { "/usr/bin/make prefix=/usr libexecdir=${::git_exec_path}": - creates => "${source_dir}/git-subtree", - cwd => $source_dir, - } - -> - exec { "/usr/bin/make prefix=/usr libexecdir=${::git_exec_path} install": - creates => "${::git_exec_path}/git-subtree", - cwd => $source_dir, - } - - file { '/etc/bash_completion.d/git-subtree': - ensure => file, - source => 'puppet:///modules/git/subtree/bash_completion.sh', - mode => '0644', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/spec/classes/git_subtree_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/spec/classes/git_subtree_spec.rb deleted file mode 100644 index e7a6e32539..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/spec/classes/git_subtree_spec.rb +++ /dev/null @@ -1,70 +0,0 @@ -require 'spec_helper' - -describe 'git::subtree' do - - context 'when git version < 1.7.0' do - let(:facts) { { :git_version => '1.6.0' } } - - it 'should fail' do - expect { should create_class('git::subtree') }.to raise_error(Puppet::Error, /git-subtree requires git 1.7 or later!/) - end - end - - context 'when git version > 1.7.0 and < 1.7.11' do - let(:facts) { { - :git_version => '1.7.0', - :git_exec_path => '/usr/lib/git-core', - } } - - it { should create_class('git') } - - it { should create_vcsrepo('/usr/src/git-subtree').with({ - :ensure => 'present', - :source => 'http://github.com/apenwarr/git-subtree.git', - :provider => 'git', - :revision => '2793ee6ba', - })} - - it { should create_exec('/usr/bin/make prefix=/usr libexecdir=/usr/lib/git-core').with({ - :creates => '/usr/src/git-subtree/git-subtree', - :cwd => '/usr/src/git-subtree', - })} - - it { should create_exec('/usr/bin/make prefix=/usr libexecdir=/usr/lib/git-core install').with({ - :creates => '/usr/lib/git-core/git-subtree', - :cwd => '/usr/src/git-subtree', - })} - - it { should create_file('/etc/bash_completion.d/git-subtree').with({ - :ensure => 'file', - :source => 'puppet:///modules/git/subtree/bash_completion.sh', - :mode => '0644', - })} - end - - context 'when git version >= 1.7.11' do - let(:facts) { { - :git_version => '1.7.11', - :git_exec_path => '/usr/lib/git-core', - } } - - it { should create_class('git') } - - it { should create_exec('/usr/bin/make prefix=/usr libexecdir=/usr/lib/git-core').with({ - :creates => '/usr/share/doc/git-core/contrib/subtree/git-subtree', - :cwd => '/usr/share/doc/git-core/contrib/subtree', - })} - - it { should create_exec('/usr/bin/make prefix=/usr libexecdir=/usr/lib/git-core install').with({ - :creates => '/usr/lib/git-core/git-subtree', - :cwd => '/usr/share/doc/git-core/contrib/subtree', - })} - - it { should create_file('/etc/bash_completion.d/git-subtree').with({ - :ensure => 'file', - :source => 'puppet:///modules/git/subtree/bash_completion.sh', - :mode => '0644', - })} - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/spec/spec_helper.rb deleted file mode 100644 index 2c6f56649a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/tests/gitosis.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/tests/gitosis.pp deleted file mode 100644 index e6240ae21f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/tests/gitosis.pp +++ /dev/null @@ -1 +0,0 @@ -class { 'git::gitosis': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/tests/init.pp deleted file mode 100644 index c232904713..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/git/tests/init.pp +++ /dev/null @@ -1 +0,0 @@ -class { 'git': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/.fixtures.yml deleted file mode 100644 index 0d21abb8c4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/.fixtures.yml +++ /dev/null @@ -1,5 +0,0 @@ -fixtures: - repositories: - stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git" - symlinks: - mailcatcher: "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/.travis.yml deleted file mode 100644 index 08a65c8187..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -branches: - only: - - master -language: ruby -bundler_args: --without development -script: "bundle exec rake spec SPEC_OPTS='--format documentation'" -rvm: -- 1.8.7 -- 1.9.3 -- 2.0.0 -env: - matrix: - - PUPPET_GEM_VERSION="~> 2.7.0" - - PUPPET_GEM_VERSION="~> 3.0.0" - - PUPPET_GEM_VERSION="~> 3.1.0" - - PUPPET_GEM_VERSION="~> 3.2.0" -matrix: - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 3.0.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 3.1.0" - - rvm: 1.8.7 - env: PUPPET_GEM_VERSION="~> 3.2.0" -notifications: - email: false \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/Gemfile deleted file mode 100644 index 170516d981..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/Gemfile +++ /dev/null @@ -1,12 +0,0 @@ -source 'https://rubygems.org' -puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7'] - -gem 'puppet', puppetversion - -group :test do - gem 'rake', '>= 0.9.0' - gem 'rspec', '>= 2.8.0' - gem 'rspec-puppet', '>= 0.1.1' - gem 'puppetlabs_spec_helper', '>= 0.4.1' - gem 'puppet-lint' -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/Modulefile deleted file mode 100644 index 54de3a1024..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/Modulefile +++ /dev/null @@ -1,13 +0,0 @@ -name 'actionjack-mailcatcher' -version '0.1.5' -source 'https://github.com/actionjack/puppet-mailcatcher' -author 'actionjack' -license 'Apache License, Version 2.0' -summary 'Install and configure the mailcatcher application.' -description "This puppet module is used to install and configure the mailcatcher -application. -MailCatcher runs a super simple SMTP server which catches any message sent to it -to display in a web interface." -project_page 'https://github.com/actionjack/puppet-mailcatcher' - -dependency 'puppetlabs/stdlib', '>= 2.2.1' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/README.md deleted file mode 100644 index 12d569a08b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Mailcatcher - -[![Build Status](https://travis-ci.org/actionjack/puppet-mailcatcher.png?branch=master)](https://travis-ci.org/actionjack/puppet-mailcatcher) - -This puppet module is used to install and configure the mailcatcher application. -MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface. -http://mailcatcher.me/ - -* * * - -## Configuration - - -## Dependencies - -Current dependencies are: - - * 'puppetlabs/stdlib', '>= 2.1.0' - -## Usage - - - -```ruby -class {'mailcatcher': } -``` - -## Documentation - -This module is written in puppetdoc compliant format so details on configuration and usage can be found by executing: - -```bash -$ puppet doc manifest/init.pp -``` diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/Rakefile deleted file mode 100644 index e0e78cfbb8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/Rakefile +++ /dev/null @@ -1,6 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' - -PuppetLint.configuration.send('disable_class_inherits_from_params_class') -PuppetLint.configuration.send("disable_80chars") -PuppetLint.configuration.log_format = "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/config.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/config.pp deleted file mode 100644 index c4a27921e9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/config.pp +++ /dev/null @@ -1,18 +0,0 @@ -# class mailcatcher::config -# -class mailcatcher::config { - user { 'mailcatcher': - ensure => present, - comment => 'Mailcatcher Mock Smtp Service User', - home => '/var/spool/mailcatcher', - shell => '/bin/true', - } - - file { $mailcatcher::params::log_path: - ensure => directory, - owner => 'mailcatcher', - group => 'mailcatcher', - mode => 0755, - require => User['mailcatcher'] - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/init.pp deleted file mode 100644 index 31c5d3434e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/init.pp +++ /dev/null @@ -1,64 +0,0 @@ -# == Class: mailcatcher -# -# Install and configure Mailcatcher. -# MailCatcher runs a super simple SMTP server which catches any message sent to -# it to display in a web interface. -# http://mailcatcher.me/ -# -# === Parameters -# -# Document parameters here. -# -# [*smtp_ip*] -# What IP address the mailcatcher smtp service should listen on. -# The default is 127.0.0.1 -# -# [*smtp_port*] -# What TCP Port the mailcatcher smtp service should listen on. -# The default is 1025 -# -# [*http_ip*] -# What IP address the mailcatcher web mail client service should listen on. -# The default is 0.0.0.0 -# -# [*http_port*] -# What TCP Port the mailcatcher web mail client service should listen on. -# The default is 1080 -# -# [*mailcatcher_path*] -# Path to the mailcatcher program. -# The default is '/usr/local/bin' -# -# === Examples -# -# [*default*] -# -# class { mailcatcher: } -# -# [*listen on all ethernet adapters*] -# -# class { mailcatcher: -# smtp_ip => '0.0.0.0' -# } -# -# === Authors -# -# Martin Jackson -# -# === Copyright -# -# Copyright 2013 Martin Jackson, unless otherwise noted. -# -class mailcatcher ( - $smtp_ip = $mailcatcher::params::smtp_ip, - $smtp_port = $mailcatcher::params::smtp_port, - $http_ip = $mailcatcher::params::http_ip, - $http_port = $mailcatcher::params::http_port, - $mailcatcher_path = $mailcatcher::params::mailcatcher_path, - $log_path = $mailcatcher::params::log_path -) inherits mailcatcher::params { - - class {'mailcatcher::package': } -> - class {'mailcatcher::config': } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/package.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/package.pp deleted file mode 100644 index 6d66fb836b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/package.pp +++ /dev/null @@ -1,17 +0,0 @@ -# class mailcatcher::package -# -class mailcatcher::package { - each( $mailcatcher::params::packages ) |$package| { - if ! defined(Package[$package]) { - package { $package: - ensure => present - } - } - } - - package { 'mailcatcher': - ensure => present, - provider => 'gem', - require => Package[$mailcatcher::params::packages] - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/params.pp deleted file mode 100644 index a21d6b07e5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/manifests/params.pp +++ /dev/null @@ -1,22 +0,0 @@ -# class mailcatcher::params -# -class mailcatcher::params { - $smtp_ip = '0.0.0.0' - $smtp_port = '1025' - $http_ip = '0.0.0.0' - $http_port = '1080' - $mailcatcher_path = '/usr/local/bin' - $log_path = '/var/log/mailcatcher' - - case $::osfamily { - 'Debian': { - $packages = ['ruby-dev', 'sqlite3', 'libsqlite3-dev', 'rubygems'] - } - 'Redhat': { - $packages = ['ruby-devel', 'sqlite', 'sqlite-devel', 'ruby-sqlite3', 'rubygems'] - } - default: { - fail("${::osfamily} is not supported.") - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/spec/classes/mailcatcher_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/spec/classes/mailcatcher_spec.rb deleted file mode 100644 index 4ae17bd3b1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/spec/classes/mailcatcher_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -require 'spec_helper' - -describe 'mailcatcher', :type => :class do - context "As a Web Operations Engineer" do - context 'When I install the mailcatcher base class on Ubuntu' do - let :facts do { - :osfamily => 'Debian', - :operatingsystem => 'Ubuntu' - } - end - - describe 'by default it' do - it { should contain_package('ruby-dev') } - it { should contain_package('sqlite3') } - it { should contain_package('libsqlite3-dev') } - it { should contain_package('rubygems') } - it { should contain_package('mailcatcher').with({ 'provider' => 'gem'}) } - it { should contain_user('mailcatcher') } - it 'should contain a properly formatted start up configuration for upstart' do - should contain_file('/etc/init/mailcatcher.conf').with_content(/exec\s+nohup\s+\/usr\/local\/bin\/mailcatcher\s+--http-ip\s+0\.0\.0\.0\s+--http-port\s+1080\s+--smtp-ip\s+0\.0\.0\.0\s+--smtp-port\s+1025\s+-f/) - end - it { should contain_file('/etc/init/mailcatcher.conf').with({ :notify => 'Class[Mailcatcher::Service]'})} - it { should contain_file('/var/log/mailcatcher').with({ - :ensure => 'directory', - :owner => 'mailcatcher', - :group => 'mailcatcher', - :mode => '0755', - :require => 'User[mailcatcher]' - })} - it { should contain_service('mailcatcher').with({ - :ensure => 'running', - :provider => 'upstart', - :hasstatus => true, - :hasrestart => true, - :require => 'Class[Mailcatcher::Config]', - })} - - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/spec/spec_helper.rb deleted file mode 100644 index 3d92005247..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/templates/etc/init/mailcatcher.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/templates/etc/init/mailcatcher.conf.erb deleted file mode 100644 index 4cd663ffe5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/templates/etc/init/mailcatcher.conf.erb +++ /dev/null @@ -1,16 +0,0 @@ -# mailcatcher - mock smtp server -# -# mailCatcher runs a super simple SMTP server which catches any -# message sent to it to display in a web interface. - -description "mock smtp server" - -start on startup -stop on shutdown - -setuid mailcatcher -setgid mailcatcher - -script - exec nohup <%= @mailcatcher_path %>/mailcatcher<%= @options.join(' ') %> -f >> /var/log/mailcatcher/mailcatcher.log 2>&1 -end script diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/tests/init.pp deleted file mode 100644 index adead2832a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mailcatcher/tests/init.pp +++ /dev/null @@ -1,12 +0,0 @@ -# The baseline for module testing used by Puppet Labs is that each manifest -# should have a corresponding test manifest that declares that class or defined -# type. -# -# Tests are then run by using puppet apply --noop (to check for compilation -# errors and view a log of events) or by fully applying the test in a virtual -# environment (to compare the resulting system state to the desired state). -# -# Learn more about module testing here: -# http://docs.puppetlabs.com/guides/tests_smoke.html -# -include mailcatcher diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/.fixtures.yml deleted file mode 100644 index e48e20aaee..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/.fixtures.yml +++ /dev/null @@ -1,6 +0,0 @@ -fixtures: - repositories: - "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" - "apt": "git://github.com/puppetlabs/puppetlabs-apt.git" - symlinks: - "mongodb": "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/.nodeset.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/.nodeset.yml deleted file mode 100644 index 767f9cd2f6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/.nodeset.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -default_set: 'centos-64-x64' -sets: - 'centos-59-x64': - nodes: - "main.foo.vm": - prefab: 'centos-59-x64' - 'centos-64-x64': - nodes: - "main.foo.vm": - prefab: 'centos-64-x64' - 'fedora-18-x64': - nodes: - "main.foo.vm": - prefab: 'fedora-18-x64' - 'debian-607-x64': - nodes: - "main.foo.vm": - prefab: 'debian-607-x64' - 'debian-70rc1-x64': - nodes: - "main.foo.vm": - prefab: 'debian-70rc1-x64' - 'ubuntu-server-10044-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-10044-x64' - 'ubuntu-server-12042-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-12042-x64' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/.travis.yml deleted file mode 100644 index f6eff1ce96..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/.travis.yml +++ /dev/null @@ -1,33 +0,0 @@ -branches: - only: - - master -language: ruby -before_install: - - gem update bundler - - bundle --version - - gem update --system 2.1.11 - - gem --version -bundler_args: --without development -script: "bundle exec rake spec SPEC_OPTS='--format documentation'" -after_success: - - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-release - - .forge-release/publish -rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 -env: - matrix: - - PUPPET_GEM_VERSION="~> 2.7.0" - - PUPPET_GEM_VERSION="~> 3.3.0" - global: - - PUBLISHER_LOGIN=puppetlabs - - secure: "iUYpjvk33JffZB9lVRqjuwRWesvcvmTknh908xnf60rUOA0QbGEPXxQY+LsQJEIimVsMA22fV6vp9BcqMEjO7OfK2MvAWsEWU/lG+kisFqhWDRf96sADE7k/RvPWJeB2xe+lWXK7Eh26jgctNfk4NptX1X1MjGmdzEvH7Aq79/w=" -matrix: - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" -notifications: - email: false diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/CHANGELOG b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/CHANGELOG deleted file mode 100644 index 92a220f481..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/CHANGELOG +++ /dev/null @@ -1,74 +0,0 @@ -##2014-05-27 - Release 0.8.0 - -This feature features a rewritten mongodb_replset{} provider, includes several -important bugfixes, ruby 1.8 support, and two new features. - -####Features -- Rewritten mongodb_replset{}, featuring puppet resource support, prefetching, -and flushing. -- Add Ruby 1.8 compatibility. -- Adds `syslog`, allowing you to configure mongodb to send all logging to the hosts syslog. -- Add mongodb::replset, a wrapper class for hiera users. -- Improved testing! - -####Bugfixes -- Fixes the package names to work since 10gen renamed them again. -- Fix provider name in the README. -- Disallow `nojournal` and `journal` to be set at the same time. -- Changed - to = for versioned install on Ubuntu. - -####Known Bugs -* No known bugs - -2014-1-29 - Version 0.7.0 - -Summary: - -Added Replica Set Type and Provider - -2014-1-17 - Version 0.6.0 - -Summary: - -Added support for installing MongoDB client on -RHEL family systems. - -2014-01-10 Version 0.5.0 - -Summary: - -Added types for providers for Mongo users and databases. - -2013-12 Version 0.4.0 - -Major refactoring of the MongoDB module. Includes a new 'mongodb::globals' -that consolidates many shared parameters into one location. This is an -API-breaking release in anticipation of a 1.0 release. - -2013-10-31 - Version 0.3.0 - -Summary: - -Adds a number of parameters and fixes some platform -specific bugs in module deployment. - -2013-09-25 - Version 0.2.0 - -Summary: - -This release fixes a duplicate parameter. - -Fixes: -- Fix a duplicated parameter. - -2012-07-13 Puppet Labs - 0.1.0 -* Add support for RHEL/CentOS -* Change default mongodb install location to OS repo - -2012-05-29 Puppet Labs - 0.0.2 -* Fix Modulefile typo. -* Remove repo pin. -* Update spec tests and add travis support. - -2012-05-03 Puppet Labs - 0.0.1 -* Initial Release. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/Gemfile deleted file mode 100644 index 39abe867d4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/Gemfile +++ /dev/null @@ -1,19 +0,0 @@ -source ENV['GEM_SOURCE'] || 'https://rubygems.org' - -group :test, :development do - gem 'rspec-puppet', :require => false - gem 'rake', :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'serverspec', :require => false - gem 'puppet-lint', :require => false - gem 'pry', :require => false - gem 'simplecov', :require => false - gem 'beaker', :require => false - gem 'beaker-rspec', :require => false -end - -if puppetversion = ENV['PUPPET_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/LICENSE deleted file mode 100644 index 8961ce8a6d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -Copyright (C) 2012 Puppet Labs Inc - -Puppet Labs can be contacted at: info@puppetlabs.com - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/Modulefile deleted file mode 100644 index e2eb82771a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/Modulefile +++ /dev/null @@ -1,12 +0,0 @@ -name 'puppetlabs-mongodb' -version '0.8.0' -source 'git@github.com:puppetlabs/puppetlabs-mongodb.git' -author 'puppetlabs' -license 'Apache License Version 2.0' -summary 'mongodb puppet module' -description '10gen mongodb puppet module' -project_page 'https://github.com/puppetlabs/puppetlabs-mongodb' - -## Add dependencies, if any: -dependency 'puppetlabs/apt', '>= 1.0.0' -dependency 'puppetlabs/stdlib', '>= 2.2.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/README.md deleted file mode 100644 index 2bc16bb348..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/README.md +++ /dev/null @@ -1,515 +0,0 @@ -# mongodb puppet module - -[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-mongodb.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-mongodb) - -####Table of Contents - -1. [Overview] (#overview) -2. [Module Description - What does the module do?](#module-description) -3. [Setup - The basics of getting started with mongodb](#setup) -4. [Usage - Configuration options and additional functionality](#usage) -5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) -6. [Limitations - OS compatibility, etc.] (#limitations) -7. [Development - Guide for contributing to the module] (#development) - -## Overview - -Installs MongoDB on RHEL/Ubuntu/Debian from OS repo, or alternatively from -10gen repository [installation documentation](http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages). - -### Deprecation Warning ### - -This release is a major refactoring of the module which means that the API may -have changed in backwards incompatible ways. If your project depends on the old API, -please pin your dependencies to 0.3 version to ensure your environments don't break. - -The current module design is undergoing review for potential 1.0 release. We welcome -any feedback with regard to the APIs and patterns used in this release. - -##Module Description - -The MongoDB module manages mongod server installation and configuration of the -mongod daemon. For the time being it supports only a single MongoDB server -instance, without sharding functionality. - -For the 0.5 release, the MongoDB module now supports database and user types. - -For the 0.6 release, the MongoDB module now supports basic replicaset features -(initiating a replicaset and adding members, but without specific options). - -## Setup - -###What MongoDB affects - -* MongoDB package. -* MongoDB configuration files. -* MongoDB service. -* MongoDB client. -* 10gen/mongodb apt/yum repository. - -###Beginning with MongoDB - -If you just want a server installation with the default options you can run -`include '::mongodb::server'`. If you need to customize configuration -options you need to do the following: - -```puppet -class {'::mongodb::server': - port => 27018, - verbose => true, -} -``` - -For Red Hat family systems, the client can be installed in a similar fashion: - -``` -puppet class {'::mongodb::client':} -``` - -Note that for Debian/Ubuntu family systems the client is installed with the -server. Using the client class will by default install the server. - -Although most distros come with a prepacked MongoDB server we recommend to -use the 10gen/MongoDB software repository, because most of the current OS -packages are outdated and not appropriate for a production environment. -To install MongoDB from 10gen repository: - -```puppet -class {'::mongodb::globals': - manage_package_repo => true, -}-> -class {'::mongodb::server': }-> -class {'::mongodb::client': } -``` - -## Usage - -Most of the interaction for the server is done via `mongodb::server`. For -more options please have a look at [mongodb::server](#class-mongodbserver). -Also in this version we introduced `mongodb::globals`, which is meant more -for future implementation, where you can configure the main settings for -this module in a global way, to be used by other classes and defined resources. -On its own it does nothing. - -### Create MongoDB database - -To install MongoDB server, create database "testdb" and user "user1" with password "pass1". - -```puppet -class {'::mongodb::server': - auth => true, -} - -mongodb::db { 'testdb': - user => 'user1', - password_hash => 'a15fbfca5e3a758be80ceaf42458bcd8', -} -``` -Parameter 'password_hash' is hex encoded md5 hash of "user1:mongo:pass1". -Unsafe plain text password could be used with 'password' parameter instead of 'password_hash'. - -## Reference - -### Classes - -####Public classes -* `mongodb::server`: Installs and configure MongoDB -* `mongodb::client`: Installs the MongoDB client shell (for Red Hat family systems) -* `mongodb::globals`: Configure main settings in a global way - -####Private classes -* `mongodb::repo`: Manage 10gen/MongoDB software repository -* `mongodb::repo::apt`: Manage Debian/Ubuntu apt 10gen/MongoDB repository -* `mongodb::repo::yum`: Manage Redhat/CentOS apt 10gen/MongoDB repository -* `mongodb::server::config`: Configures MongoDB configuration files -* `mongodb::server::install`: Install MongoDB software packages -* `mongodb::server::service`: Manages service -* `mongodb::client::install`: Installs the MongoDB client software package - -####Class: mongodb::globals -*Note:* most server specific defaults should be overridden in the `mongodb::server` -class. This class should only be used if you are using a non-standard OS or -if you are changing elements such as `version` or `manage_package_repo` that -can only be changed here. - -This class allows you to configure the main settings for this module in a -global way, to be used by the other classes and defined resources. On its -own it does nothing. - -#####`server_package_name` -This setting can be used to override the default MongoDB server package -name. If not specified, the module will use whatever package name is the -default for your OS distro. - -#####`service_name` -This setting can be used to override the default MongoDB service name. If not -specified, the module will use whatever service name is the default for your OS distro. - -#####`service_provider` -This setting can be used to override the default MongoDB service provider. If -not specified, the module will use whatever service provider is the default for -your OS distro. - -#####`service_status` -This setting can be used to override the default status check command for -your MongoDB service. If not specified, the module will use whatever service -name is the default for your OS distro. - -#####`user` -This setting can be used to override the default MongoDB user and owner of the -service and related files in the file system. If not specified, the module will -use the default for your OS distro. - -#####`group` -This setting can be used to override the default MongoDB user group to be used -for related files in the file system. If not specified, the module will use -the default for your OS distro. - -#####`bind_ip` -This setting can be used to configure MonogDB process to bind to and listen -for connections from applications on this address. If not specified, the -module will use the default for your OS distro. -*Note:* This value should be passed as an array. - -#####`version` -The version of MonogDB to install/manage. This is a simple way of providing -a specific version such as '2.2' or '2.4' for example. If not specified, -the module will use the default for your OS distro. - -####Class: mongodb::server - -Most of the parameters manipulate the mongod.conf file. - -For more details about configuration parameters consult the -[MongoDB Configuration File Options](http://docs.mongodb.org/manual/reference/configuration-options/). - -#####`ensure` -Used to ensure that the package is installed and the service is running, or that the package is absent/purged and the service is stopped. Valid values are true/false/present/absent/purged. - -#####`config` -Path of the config file. If not specified, the module will use the default -for your OS distro. - -#####`dbpath` -Set this value to designate a directory for the mongod instance to store -it's data. If not specified, the module will use the default for your OS distro. - -#####`pidfilepath` -Specify a file location to hold the PID or process ID of the mongod process. -If not specified, the module will use the default for your OS distro. - -#####`logpath` -Specify the path to a file name for the log file that will hold all diagnostic -logging information. Unless specified, mongod will output all log information -to the standard output. - -#####`bind_ip` -Set this option to configure the mongod or mongos process to bind to and listen -for connections from applications on this address. If not specified, the module -will use the default for your OS distro. Example: bind_ip=['127.0.0.1', '192.168.0.3'] -*Note*: bind_ip accepts an array as a value. - -#####`logappend` -Set to true to add new entries to the end of the logfile rather than overwriting -the content of the log when the process restarts. Default: True - -#####`fork` -Set to true to fork server process at launch time. The default setting depends on -the operating system. - -#####`port` -Specifies a TCP port for the server instance to listen for client connections. -Default: 27017 - -#####`journal` -Set to true to enable operation journaling to ensure write durability and -data consistency. Default: on 64-bit systems true and on 32-bit systems false - -#####`nojournal` -Set nojournal = true to disable durability journaling. By default, mongod -enables journaling in 64-bit versions after v2.0. -Default: on 64-bit systems false and on 32-bit systems true - -*Note*: You must use journal to enable journaling on 32-bit systems. - -#####`smallfiles` -Set to true to modify MongoDB to use a smaller default data file size. -Specifically, smallfiles reduces the initial size for data files and -limits them to 512 megabytes. Default: false - -#####`cpu` -Set to true to force mongod to report every four seconds CPU utilization -and the amount of time that the processor waits for I/O operations to -complete (i.e. I/O wait.) Default: false - -#####`auth` -Set to true to enable database authentication for users connecting from -remote hosts. If no users exist, the localhost interface will continue -to have access to the database until you create the first user. -Default: false - -#####`noauth` -Disable authentication. Currently the default. Exists for future compatibility - and clarity. - -#####`verbose` -Increases the amount of internal reporting returned on standard output or in -the log file generated by `logpath`. Default: false - -#####`verbositylevel` -MongoDB has the following levels of verbosity: v, vv, vvv, vvvv and vvvvv. -Default: None - -#####`objcheck` -Forces the mongod to validate all requests from clients upon receipt to ensure -that clients never insert invalid documents into the database. -Default: on v2.4 default to true and on earlier version to false - -#####`quota` -Set to true to enable a maximum limit for the number of data files each database -can have. The default quota is 8 data files, when quota is true. Default: false - -#####`quotafiles` -Modify limit on the number of data files per database. This option requires the -`quota` setting. Default: 8 - -#####`diaglog` -Creates a very verbose diagnostic log for troubleshooting and recording various -errors. Valid values: 0, 1, 2, 3 and 7. -For more information please refer to [MongoDB Configuration File Options](http://docs.mongodb.org/manual/reference/configuration-options/). - -#####`directoryperdb` -Set to true to modify the storage pattern of the data directory to store each -database’s files in a distinct folder. Default: false - -#####`profile` -Modify this value to changes the level of database profiling, which inserts -information about operation performance into output of mongod or the -log file if specified by `logpath`. - -#####`maxconns` -Specifies a value to set the maximum number of simultaneous connections -that MongoDB will accept. Default: depends on system (i.e. ulimit and file descriptor) -limits. Unless set, MongoDB will not limit its own connections. - -#####`oplog_size` -Specifies a maximum size in megabytes for the replication operation log -(e.g. oplog.) mongod creates an oplog based on the maximum amount of space -available. For 64-bit systems, the oplog is typically 5% of available disk space. - -#####`nohints` -Ignore query hints. Default: None - -#####`nohttpinterface` -Set to true to disable the HTTP interface. This command will override the rest -and disable the HTTP interface if you specify both. Default: false - -#####`noscripting` -Set noscripting = true to disable the scripting engine. Default: false - -#####`notablescan` -Set notablescan = true to forbid operations that require a table scan. Default: false - -#####`noprealloc` -Set noprealloc = true to disable the preallocation of data files. This will shorten -the start up time in some cases, but can cause significant performance penalties -during normal operations. Default: false - -#####`nssize` -Use this setting to control the default size for all newly created namespace -files (i.e .ns). Default: 16 - -#####`mms_token` -MMS token for mms monitoring. Default: None - -#####`mms_name` -MMS identifier for mms monitoring. Default: None - -#####`mms_interval` -MMS interval for mms monitoring. Default: None - -#####`replset` -Use this setting to configure replication with replica sets. Specify a replica -set name as an argument to this set. All hosts must have the same set name. - -#####`rest` -Set to true to enable a simple REST interface. Default: false - -#####`slowms` -Sets the threshold for mongod to consider a query “slow” for the database profiler. -Default: 100 ms - -#####`keyfile` -Specify the path to a key file to store authentication information. This option -is only useful for the connection between replica set members. Default: None - -#####`master` -Set to true to configure the current instance to act as master instance in a -replication configuration. Default: False *Note*: deprecated – use replica sets - -#####`set_parameter` -Specify extra configuration file parameters (i.e. -textSearchEnabled=true). Default: None - -#####`syslog` -Sends all logging output to the host’s syslog system rather than to standard -output or a log file. Default: None -*Important*: You cannot use syslog with logpath. - -#####`slave` -Set to true to configure the current instance to act as slave instance in a -replication configuration. Default: false -*Note*: deprecated – use replica sets - -#####`only` -Used with the slave option, only specifies only a single database to -replicate. Default: <> -*Note*: deprecated – use replica sets - -#####`source` -Used with the slave setting to specify the master instance from which -this slave instance will replicate. Default: <> -*Note*: deprecated – use replica sets - -### Definitions - -#### Definition: mongodb:db - -Creates database with user. Resource title used as database name. - -#####`user` -Name of the user for database - -#####`password_hash` -Hex encoded md5 hash of "$username:mongo:$password". -For more information please refer to [MongoDB Authentication Process](http://docs.mongodb.org/meta-driver/latest/legacy/implement-authentication-in-driver/#authentication-process). - -#####`password` -Plain-text user password (will be hashed) - -#####`roles` -Array with user roles. Default: ['dbAdmin'] - -### Providers - -#### Provider: mongodb_database -'mongodb_database' can be used to create and manage databases within MongoDB. - -```puppet -mongodb_database { testdb: - ensure => present, - tries => 10, - require => Class['mongodb::server'], -} -``` -#####`tries` -The maximum amount of two second tries to wait MongoDB startup. Default: 10 - - -#### Provider: mongodb_user -'mongodb_user' can be used to create and manage users within MongoDB database. - -```puppet -mongodb_user { testuser: - ensure => present, - password_hash => mongodb_password('testuser', 'p@ssw0rd'), - database => testdb, - roles => ['readWrite', 'dbAdmin'], - tries => 10, - require => Class['mongodb::server'], -} -``` -#####`password_hash` -Hex encoded md5 hash of "$username:mongo:$password". - -#####`database` -Name of database. It will be created, if not exists. - -#####`roles` -Array with user roles. Default: ['dbAdmin'] - -#####`tries` -The maximum amount of two second tries to wait MongoDB startup. Default: 10 - -#### Provider: mongodb_replset -'mongodb_replset' can be used to create and manage MongoDB replicasets. - -```puppet -mongodb_replset { rsmain: - ensure => present, - members => ['host1:27017', 'host2:27017', 'host3:27017'] -} -``` - -Ideally the ```mongodb_replset``` resource will be declared on the initial -desired primary node (arbitrarily the first of the list) and this node will be -processed once the secondary nodes are up. This will ensure all the nodes are -in the first configuration of the replicaset, else it will require running -puppet again to add them. - -#####`members` -Array of 'host:port' of the replicaset members. - -It currently only adds members without options. - -## Limitation - -This module has been tested on: - -* Debian 7.* (Wheezy) -* Debian 6.* (squeeze) -* Ubuntu 12.04.2 (precise) -* Ubuntu 10.04.4 LTS (lucid) -* RHEL 5/6 -* CentOS 5/6 - -For a full list of tested operating systems please have a look at the [.nodeset.xml](https://github.com/puppetlabs/puppetlabs-mongodb/blob/master/.nodeset.yml) definition. - -This module should support `service_ensure` separate from the `ensure` value on `Class[mongodb::server]` but it does not yet. - -## Development - -Puppet Labs modules on the Puppet Forge are open projects, and community -contributions are essential for keeping them great. We can’t access the -huge number of platforms and myriad of hardware, software, and deployment -configurations that Puppet is intended to serve. - -We want to keep it as easy as possible to contribute changes so that our -modules work in your environment. There are a few guidelines that we need -contributors to follow so that we can have a chance of keeping on top of things. - -You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) - -### Testing - -There are two types of tests distributed with this module. Unit tests with -rspec-puppet and system tests using rspec-system. - - -unit tests should be run under Bundler with the gem versions as specified -in the Gemfile. To install the necessary gems: - - bundle install --path=vendor - -Test setup and teardown is handled with rake tasks, so the -supported way of running tests is with - - bundle exec rake spec - - -For system test you will also need to install vagrant > 1.3.x and virtualbox > 4.2.10. -To run the system tests - - bundle exec rake spec:system - -To run the tests on different operating systems, see the sets available in [.nodeset.xml](https://github.com/puppetlabs/puppetlabs-mongodb/blob/master/.nodeset.yml) -and run the specific set with the following syntax: - - RSPEC_SET=ubuntu-server-12042-x64 bundle exec rake spec:system - -### Authors - -We would like to thank everyone who has contributed issues and pull requests to this module. -A complete list of contributors can be found on the -[GitHub Contributor Graph](https://github.com/puppetlabs/puppetlabs-mongodb/graphs/contributors) -for the [puppetlabs-mongodb module](https://github.com/puppetlabs/puppetlabs-mongodb). diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/Rakefile deleted file mode 100644 index cd3d379958..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/Rakefile +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/parser/functions/mongodb_password.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/parser/functions/mongodb_password.rb deleted file mode 100644 index e61bcb9dae..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/parser/functions/mongodb_password.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'digest/md5' - -module Puppet::Parser::Functions - newfunction(:mongodb_password, :type => :rvalue, :doc => <<-EOS - Returns the mongodb password hash from the clear text password. - EOS - ) do |args| - - raise(Puppet::ParseError, 'mongodb_password(): Wrong number of arguments ' + - "given (#{args.size} for 2)") if args.size != 2 - - Digest::MD5.hexdigest("#{args[0]}:mongo:#{args[1]}") - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_database/mongodb.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_database/mongodb.rb deleted file mode 100644 index 0acc76996c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_database/mongodb.rb +++ /dev/null @@ -1,36 +0,0 @@ -Puppet::Type.type(:mongodb_database).provide(:mongodb) do - - desc "Manages MongoDB database." - - defaultfor :kernel => 'Linux' - - commands :mongo => 'mongo' - - def block_until_mongodb(tries = 10) - begin - mongo('--quiet', '--eval', 'db.getMongo()') - rescue => e - debug('MongoDB server not ready, retrying') - sleep 2 - if (tries -= 1) > 0 - retry - else - raise e - end - end - end - - def create - mongo(@resource[:name], '--quiet', '--eval', "db.dummyData.insert({\"created_by_puppet\": 1})") - end - - def destroy - mongo(@resource[:name], '--quiet', '--eval', 'db.dropDatabase()') - end - - def exists? - block_until_mongodb(@resource[:tries]) - mongo("--quiet", "--eval", 'db.getMongo().getDBNames()').split(",").include?(@resource[:name]) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_replset/mongo.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_replset/mongo.rb deleted file mode 100644 index d77afe3036..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_replset/mongo.rb +++ /dev/null @@ -1,232 +0,0 @@ -# -# Author: François Charlier -# - -Puppet::Type.type(:mongodb_replset).provide(:mongo) do - - desc "Manage hosts members for a replicaset." - - confine :true => - begin - require 'json' - true - rescue LoadError - false - end - - commands :mongo => 'mongo' - - mk_resource_methods - - def initialize(resource={}) - super(resource) - @property_flush = {} - end - - def members=(hosts) - @property_flush[:members] = hosts - end - - def self.instances - instance = get_replset_properties - if instance - # There can only be one replset per node - [new(instance)] - else - [] - end - end - - def self.prefetch(resources) - instances.each do |prov| - if resource = resources[prov.name] - resource.provider = prov - end - end - end - - def exists? - @property_hash[:ensure] == :present - end - - def create - @property_flush[:ensure] = :present - @property_flush[:members] = resource.should(:members) - end - - def destroy - @property_flush[:ensure] = :absent - end - - def flush - set_members - @property_hash = self.class.get_replset_properties - end - - private - - def db_ismaster(host) - mongo_command("db.isMaster()", host) - end - - def rs_initiate(conf, master) - return mongo_command("rs.initiate(#{conf})", master) - end - - def rs_status(host) - mongo_command("rs.status()", host) - end - - def rs_add(host, master) - mongo_command("rs.add(\"#{host}\")", master) - end - - def rs_remove(host, master) - mongo_command("rs.remove(\"#{host}\")", master) - end - - def master_host(hosts) - hosts.each do |host| - status = db_ismaster(host) - if status.has_key?('primary') - return status['primary'] - end - end - false - end - - def self.get_replset_properties - output = mongo_command('rs.conf()') - if output['members'] - members = output['members'].collect do |val| - val['host'] - end - props = { - :name => output['_id'], - :ensure => :present, - :members => members, - :provider => :mongo, - } - else - props = nil - end - Puppet.debug("MongoDB replset properties: #{props.inspect}") - props - end - - def alive_members(hosts) - hosts.select do |host| - begin - Puppet.debug "Checking replicaset member #{host} ..." - status = rs_status(host) - if status.has_key?('errmsg') and status['errmsg'] == 'not running with --replSet' - raise Puppet::Error, "Can't configure replicaset #{self.name}, host #{host} is not supposed to be part of a replicaset." - end - if status.has_key?('set') - if status['set'] != self.name - raise Puppet::Error, "Can't configure replicaset #{self.name}, host #{host} is already part of another replicaset." - end - - # This node is alive and supposed to be a member of our set - Puppet.debug "Host #{self.name} is available for replset #{status['set']}" - true - elsif status.has_key?('info') - Puppet.debug "Host #{self.name} is alive but unconfigured: #{status['info']}" - true - end - rescue Puppet::ExecutionFailure - Puppet.warning "Can't connect to replicaset member #{host}." - - false - end - end - end - - def set_members - if @property_flush[:ensure] == :absent - # TODO: I don't know how to remove a node from a replset; unimplemented - #Puppet.debug "Removing all members from replset #{self.name}" - #@property_hash[:members].collect do |member| - # rs_remove(member, master_host(@property_hash[:members])) - #end - return - end - - if ! @property_flush[:members].empty? - # Find the alive members so we don't try to add dead members to the replset - alive_hosts = alive_members(@property_flush[:members]) - dead_hosts = @property_flush[:members] - alive_hosts - raise Puppet::Error, "Can't connect to any member of replicaset #{self.name}." if alive_hosts.empty? - Puppet.debug "Alive members: #{alive_hosts.inspect}" - Puppet.debug "Dead members: #{dead_hosts.inspect}" unless dead_hosts.empty? - else - alive_hosts = [] - end - - if @property_flush[:ensure] == :present and @property_hash[:ensure] != :present - Puppet.debug "Initializing the replset #{self.name}" - - # Create a replset configuration - hostconf = alive_hosts.each_with_index.map do |host,id| - "{ _id: #{id}, host: \"#{host}\" }" - end.join(',') - conf = "{ _id: \"#{self.name}\", members: [ #{hostconf} ] }" - - # Set replset members with the first host as the master - output = rs_initiate(conf, alive_hosts[0]) - if output['ok'] == 0 - raise Puppet::Error, "rs.initiate() failed for replicaset #{self.name}: #{output['errmsg']}" - end - else - # Add members to an existing replset - if master = master_host(alive_hosts) - current_hosts = db_ismaster(master)['hosts'] - newhosts = alive_hosts - current_hosts - newhosts.each do |host| - output = rs_add(host, master) - if output['ok'] == 0 - raise Puppet::Error, "rs.add() failed to add host to replicaset #{self.name}: #{output['errmsg']}" - end - end - else - raise Puppet::Error, "Can't find master host for replicaset #{self.name}." - end - end - end - - def mongo_command(command, host, retries=4) - self.class.mongo_command(command,host,retries) - end - - def self.mongo_command(command, host=nil, retries=4) - # Allow waiting for mongod to become ready - # Wait for 2 seconds initially and double the delay at each retry - wait = 2 - begin - args = Array.new - args << '--quiet' - args << ['--host',host] if host - args << ['--eval',"printjson(#{command})"] - output = mongo(args.flatten) - rescue Puppet::ExecutionFailure => e - if e =~ /Error: couldn't connect to server/ and wait <= 2**max_wait - info("Waiting #{wait} seconds for mongod to become available") - sleep wait - wait *= 2 - retry - else - raise - end - end - - # Dirty hack to remove JavaScript objects - output.gsub!(/ISODate\((.+?)\)/, '\1 ') - output.gsub!(/Timestamp\((.+?)\)/, '[\1]') - - #Hack to avoid non-json empty sets - output = "{}" if output == "null\n" - - JSON.parse(output) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_user/mongodb.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_user/mongodb.rb deleted file mode 100644 index 10e0bf7f07..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/provider/mongodb_user/mongodb.rb +++ /dev/null @@ -1,48 +0,0 @@ -Puppet::Type.type(:mongodb_user).provide(:mongodb) do - - desc "Manage users for a MongoDB database." - - defaultfor :kernel => 'Linux' - - commands :mongo => 'mongo' - - def block_until_mongodb(tries = 10) - begin - mongo('--quiet', '--eval', 'db.getMongo()') - rescue - debug('MongoDB server not ready, retrying') - sleep 2 - retry unless (tries -= 1) <= 0 - end - end - - def create - mongo(@resource[:database], '--eval', "db.system.users.insert({user:\"#{@resource[:name]}\", pwd:\"#{@resource[:password_hash]}\", roles: #{@resource[:roles].inspect}})") - end - - def destroy - mongo(@resource[:database], '--quiet', '--eval', "db.removeUser(\"#{@resource[:name]}\")") - end - - def exists? - block_until_mongodb(@resource[:tries]) - mongo(@resource[:database], '--quiet', '--eval', "db.system.users.find({user:\"#{@resource[:name]}\"}).count()").strip.eql?('1') - end - - def password_hash - mongo(@resource[:database], '--quiet', '--eval', "db.system.users.findOne({user:\"#{@resource[:name]}\"})[\"pwd\"]").strip - end - - def password_hash=(value) - mongo(@resource[:database], '--quiet', '--eval', "db.system.users.update({user:\"#{@resource[:name]}\"}, { $set: {pwd:\"#{value}\"}})") - end - - def roles - mongo(@resource[:database], '--quiet', '--eval', "db.system.users.findOne({user:\"#{@resource[:name]}\"})[\"roles\"]").strip.split(",").sort - end - - def roles=(value) - mongo(@resource[:database], '--quiet', '--eval', "db.system.users.update({user:\"#{@resource[:name]}\"}, { $set: {roles: #{@resource[:roles].inspect}}})") - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_database.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_database.rb deleted file mode 100644 index 45c0f8fa23..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_database.rb +++ /dev/null @@ -1,27 +0,0 @@ -Puppet::Type.newtype(:mongodb_database) do - @doc = "Manage MongoDB databases." - - ensurable - - newparam(:name, :namevar=>true) do - desc "The name of the database." - newvalues(/^\w+$/) - end - - newparam(:tries) do - desc "The maximum amount of two second tries to wait MongoDB startup." - defaultto 10 - newvalues(/^\d+$/) - munge do |value| - Integer(value) - end - end - - autorequire(:package) do - 'mongodb' - end - - autorequire(:service) do - 'mongodb' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_replset.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_replset.rb deleted file mode 100644 index 8115ef034e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_replset.rb +++ /dev/null @@ -1,35 +0,0 @@ -# -# Author: François Charlier -# - -Puppet::Type.newtype(:mongodb_replset) do - @doc = "Manage a MongoDB replicaSet" - - ensurable do - defaultto :present - - newvalue(:present) do - provider.create - end - end - - newparam(:name) do - desc "The name of the replicaSet" - end - - newproperty(:members, :array_matching => :all) do - desc "The replicaSet members" - - def insync?(is) - is.sort == should.sort - end - end - - autorequire(:package) do - 'mongodb' - end - - autorequire(:service) do - 'mongodb' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_user.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_user.rb deleted file mode 100644 index 7f7e97b843..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/lib/puppet/type/mongodb_user.rb +++ /dev/null @@ -1,63 +0,0 @@ -Puppet::Type.newtype(:mongodb_user) do - @doc = 'Manage a MongoDB user. This includes management of users password as well as privileges.' - - ensurable - - def initialize(*args) - super - # Sort roles array before comparison. - self[:roles] = Array(self[:roles]).sort! - end - - newparam(:name, :namevar=>true) do - desc "The name of the user." - end - - newparam(:database) do - desc "The user's target database." - defaultto do - fail("Parameter 'database' must be set") - end - newvalues(/^\w+$/) - end - - newparam(:tries) do - desc "The maximum amount of two second tries to wait MongoDB startup." - defaultto 10 - newvalues(/^\d+$/) - munge do |value| - Integer(value) - end - end - - newproperty(:roles, :array_matching => :all) do - desc "The user's roles." - defaultto ['dbAdmin'] - newvalue(/^\w+$/) - - # Pretty output for arrays. - def should_to_s(value) - value.inspect - end - - def is_to_s(value) - value.inspect - end - end - - newproperty(:password_hash) do - desc "The password hash of the user. Use mongodb_password() for creating hash." - defaultto do - fail("Property 'password_hash' must be set. Use mongodb_password() for creating hash.") - end - newvalue(/^\w+$/) - end - - autorequire(:package) do - 'mongodb' - end - - autorequire(:service) do - 'mongodb' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/client.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/client.pp deleted file mode 100644 index de1b339c7d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/client.pp +++ /dev/null @@ -1,26 +0,0 @@ -# Class for installing a MongoDB client shell (CLI). -# -# == Parameters -# -# [ensure] Desired ensure state of the package. Optional. -# Defaults to 'true' -# -# [package_name] Name of the package to install the client from. Default -# is repository dependent. -# -class mongodb::client ( - $ensure = $mongodb::params::ensure_client, - $package_name = $mongodb::params::client_package_name, -) inherits mongodb::params { - case $::osfamily { - 'RedHat', 'Linux': { - class { 'mongodb::client::install': } - } - 'Debian': { - warning ('Debian client is included by default with server. Please use ::mongodb::server to install the mongo client for Debian family systems.') - } - default: { - # no action taken, failure happens in params.pp - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/client/install.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/client/install.pp deleted file mode 100644 index 6da26003ba..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/client/install.pp +++ /dev/null @@ -1,26 +0,0 @@ -# PRIVATE CLASS: do not call directly -class mongodb::client::install { - $package_ensure = $mongodb::client::ensure - $package_name = $mongodb::client::package_name - - case $package_ensure { - true: { - $my_package_ensure = 'present' - } - false: { - $my_package_ensure = 'purged' - } - 'absent': { - $my_package_ensure = 'purged' - } - default: { - $my_package_ensure = $package_ensure - } - } - - package { 'mongodb_client': - ensure => $my_package_ensure, - name => $package_name, - tag => 'mongodb', - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/db.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/db.pp deleted file mode 100644 index 708f5d75e7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/db.pp +++ /dev/null @@ -1,43 +0,0 @@ -# == Class: mongodb::db -# -# Class for creating mongodb databases and users. -# -# == Parameters -# -# user - Database username. -# password_hash - Hashed password. Hex encoded md5 hash of "$username:mongo:$password". -# password - Plain text user password. This is UNSAFE, use 'password_hash' unstead. -# roles (default: ['dbAdmin']) - array with user roles. -# tries (default: 10) - The maximum amount of two second tries to wait MongoDB startup. -# -define mongodb::db ( - $user, - $password_hash = false, - $password = false, - $roles = ['dbAdmin'], - $tries = 10, -) { - - mongodb_database { $name: - ensure => present, - tries => $tries, - require => Class['mongodb::server'], - } - - if $password_hash { - $hash = $password_hash - } elsif $password { - $hash = mongodb_password($user, $password) - } else { - fail("Parameter 'password_hash' or 'password' should be provided to mongodb::db.") - } - - mongodb_user { $user: - ensure => present, - password_hash => $hash, - database => $name, - roles => $roles, - require => Mongodb_database[$name], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/globals.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/globals.pp deleted file mode 100644 index fb04df694d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/globals.pp +++ /dev/null @@ -1,27 +0,0 @@ -# Class for setting cross-class global overrides. See README.md for more -# details. - -class mongodb::globals ( - $server_package_name = undef, - $client_package_name = undef, - - $service_name = undef, - $service_provider = undef, - $service_status = undef, - - $user = undef, - $group = undef, - $bind_ip = undef, - - $version = undef, - - $manage_package_repo = undef, -) { - - # Setup of the repo only makes sense globally, so we are doing it here. - if($manage_package_repo) { - class { '::mongodb::repo': - ensure => present, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/init.pp deleted file mode 100644 index d489731b0d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/init.pp +++ /dev/null @@ -1,136 +0,0 @@ -# == Class: mongodb -# -# Direct use of this class is deprecated. Please use mongodb::server -# -# Manage mongodb installations on RHEL, CentOS, Debian and Ubuntu - either -# installing from the 10Gen repo or from EPEL in the case of EL systems. -# -# === Parameters -# -# enable_10gen (default: false) - Whether or not to set up 10gen software repositories -# init (auto discovered) - override init (sysv or upstart) for Debian derivatives -# location - override apt location configuration for Debian derivatives -# packagename (auto discovered) - override the package name -# servicename (auto discovered) - override the service name -# service-enable (default: true) - Enable the service and ensure it is running -# -# === Examples -# -# To install with defaults from the distribution packages on any system: -# include mongodb -# -# To install from 10gen on a EL server -# class { 'mongodb': -# enable_10gen => true, -# } -# -# === Authors -# -# Craig Dunn -# -# === Copyright -# -# Copyright 2013 PuppetLabs -# - -class mongodb ( - # Deprecated parameters - $enable_10gen = undef, - - $init = $mongodb::params::service_provider, - $location = '', - $packagename = undef, - $version = undef, - $servicename = $mongodb::params::service_name, - $service_enable = true, #deprecated - $logpath = $mongodb::params::logpath, - $logappend = true, - $fork = $mongodb::params::fork, - $port = 27017, - $dbpath = $mongodb::params::dbpath, - $journal = undef, - $nojournal = undef, - $smallfiles = undef, - $cpu = undef, - $noauth = undef, - $auth = undef, - $verbose = undef, - $objcheck = undef, - $quota = undef, - $oplog = undef, #deprecated it's on if replica set - $oplog_size = undef, - $nohints = undef, - $nohttpinterface = undef, - $noscripting = undef, - $notablescan = undef, - $noprealloc = undef, - $nssize = undef, - $mms_token = undef, - $mms_name = undef, - $mms_interval = undef, - $slave = undef, - $only = undef, - $master = undef, - $source = undef, - $replset = undef, - $rest = undef, - $slowms = undef, - $keyfile = undef, - $bind_ip = undef, - $pidfilepath = undef -) inherits mongodb::params { - - if $enable_10gen { - fail("Parameter enable_10gen is no longer supported. Please use class { 'mongodb::globals': manage_package_repo => true }") - } - - if $version { - fail("Parameter version is no longer supported. Please use class { 'mongodb::globals': version => VERSION }") - } - - if $oplog { - fail('Parameter is no longer supported. On replica set Oplog is enabled by default.') - } - - notify { 'An attempt has been made below to automatically apply your custom - settings to mongodb::server. Please verify this works in a safe test - environment.': } - - class { 'mongodb::server': - package_name => $packagename, - logpath => $logpath, - logappend => $logappend, - fork => $fork, - port => $port, - dbpath => $dbpath, - journal => $journal, - nojournal => $nojournal, - smallfiles => $smallfiles, - cpu => $cpu, - noauth => $noauth, - verbose => $verbose, - objcheck => $objcheck, - quota => $quota, - oplog_size => $oplog_size, - nohints => $nohints, - nohttpinterface => $nohttpinterface, - noscripting => $noscripting, - notablescan => $notablescan, - noprealloc => $noprealloc, - nssize => $nssize, - mms_token => $mms_token, - mms_name => $mms_name, - mms_interval => $mms_interval, - slave => $slave, - only => $only, - master => $master, - source => $source, - replset => $replset, - rest => $rest, - slowms => $slowms, - keyfile => $keyfile, - bind_ip => $bind_ip, - pidfilepath => $pidfilepath, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/params.pp deleted file mode 100644 index 5afc4845e3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/params.pp +++ /dev/null @@ -1,93 +0,0 @@ -# PRIVATE CLASS: do not use directly -class mongodb::params inherits mongodb::globals { - $ensure = true - $service_status = $service_status - $ensure_client = true - - # Amazon Linux's OS Family is 'Linux', operating system 'Amazon'. - case $::osfamily { - 'RedHat', 'Linux': { - - if $mongodb::globals::manage_package_repo { - $user = pick($user, 'mongod') - $group = pick($group, 'mongod') - if $::mongodb::globals::version { - $server_package_name = "mongodb-org-server-${::mongodb::globals::version}" - $client_package_name = "mongodb-org-${::mongodb::globals::version}" - } else { - $server_package_name = 'mongodb-org-server' - $client_package_name = 'mongodb-org' - } - $service_name = pick($service_name, 'mongod') - $config = '/etc/mongod.conf' - $dbpath = '/var/lib/mongo' - $logpath = '/var/log/mongodb/mongod.log' - $pidfilepath = '/var/run/mongodb/mongod.pid' - $bind_ip = pick($bind_ip, ['127.0.0.1']) - $fork = true - } else { - # RedHat/CentOS doesn't come with a prepacked mongodb - # so we assume that you are using EPEL repository. - $user = pick($user, 'mongodb') - $group = pick($group, 'mongodb') - $server_package_name = pick($server_package_name, 'mongodb-server') - $client_package_name = pick($client_package_name, 'mongodb') - - $service_name = pick($service_name, 'mongod') - $config = '/etc/mongodb.conf' - $dbpath = '/var/lib/mongodb' - $logpath = '/var/log/mongodb/mongodb.log' - $bind_ip = pick($bind_ip, ['127.0.0.1']) - $pidfilepath = '/var/run/mongodb/mongodb.pid' - $fork = true - $journal = true - } - } - 'Debian': { - if $mongodb::globals::manage_package_repo { - $user = pick($user, 'mongodb') - $group = pick($group, 'mongodb') - if $::mongodb::globals::version { - $server_package_name = "mongodb-10gen=${::mongodb::globals::version}" - } else { - $server_package_name = 'mongodb-10gen' - } - $service_name = 'mongodb' - $config = '/etc/mongodb.conf' - $dbpath = '/var/lib/mongodb' - $logpath = '/var/log/mongodb/mongodb.log' - $bind_ip = ['127.0.0.1'] - } else { - # although we are living in a free world, - # I would not recommend to use the prepacked - # mongodb server on Ubuntu 12.04 or Debian 6/7, - # because its really outdated - $user = pick($user, 'mongodb') - $group = pick($group, 'mongodb') - $server_package_name = pick($server_package_name, 'mongodb-server') - $client_package_name = pick($client_package_name, 'mongodb') - $service_name = pick($service_name, 'mongodb') - $config = '/etc/mongodb.conf' - $dbpath = '/var/lib/mongodb' - $logpath = '/var/log/mongodb/mongodb.log' - $bind_ip = pick($bind_ip, ['127.0.0.1']) - $pidfilepath = undef - } - # avoid using fork because of the init scripts design - $fork = undef - } - default: { - fail("Osfamily ${::osfamily} and ${::operatingsystem} is not supported") - } - } - - case $::operatingsystem { - 'Ubuntu': { - $service_provider = pick($service_provider, 'upstart') - } - default: { - $service_provider = undef - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/replset.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/replset.pp deleted file mode 100644 index ce4a025557..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/replset.pp +++ /dev/null @@ -1,10 +0,0 @@ -# Wrapper class useful for hiera based deployments - -class mongodb::replset( - $sets = undef -) { - - if $sets { - create_resources(mongodb_replset, $sets) - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/repo.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/repo.pp deleted file mode 100644 index ecd6de1b71..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/repo.pp +++ /dev/null @@ -1,31 +0,0 @@ -# PRIVATE CLASS: do not use directly -class mongodb::repo ( - $ensure = $mongodb::params::ensure, -) inherits mongodb::params { - case $::osfamily { - 'RedHat', 'Linux': { - $location = $::architecture ? { - 'x86_64' => 'http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/', - 'i686' => 'http://downloads-distro.mongodb.org/repo/redhat/os/i686/', - 'i386' => 'http://downloads-distro.mongodb.org/repo/redhat/os/i686/', - default => undef - } - class { 'mongodb::repo::yum': } - } - - 'Debian': { - $location = $::operatingsystem ? { - 'Debian' => 'http://downloads-distro.mongodb.org/repo/debian-sysvinit', - 'Ubuntu' => 'http://downloads-distro.mongodb.org/repo/ubuntu-upstart', - default => undef - } - class { 'mongodb::repo::apt': } - } - - default: { - if($ensure == 'present' or $ensure == true) { - fail("Unsupported managed repository for osfamily: ${::osfamily}, operatingsystem: ${::operatingsystem}, module ${module_name} currently only supports managing repos for osfamily RedHat, Debian and Ubuntu") - } - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/repo/apt.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/repo/apt.pp deleted file mode 100644 index e8f4b812f9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/repo/apt.pp +++ /dev/null @@ -1,25 +0,0 @@ -# PRIVATE CLASS: do not use directly -class mongodb::repo::apt inherits mongodb::repo { - # we try to follow/reproduce the instruction - # from http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ - - include ::apt - - if($::mongodb::repo::ensure == 'present' or $::mongodb::repo::ensure == true) { - apt::source { 'downloads-distro.mongodb.org': - location => $::mongodb::repo::location, - release => 'dist', - repos => '10gen', - key => '9ECBEC467F0CEB10', - key_server => 'keyserver.ubuntu.com', - include_src => false, - } - - Apt::Source['downloads-distro.mongodb.org']->Package<|tag == 'mongodb'|> - } - else { - apt::source { 'downloads-distro.mongodb.org': - ensure => absent, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/repo/yum.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/repo/yum.pp deleted file mode 100644 index 3a3f6b5d84..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/repo/yum.pp +++ /dev/null @@ -1,20 +0,0 @@ -# PRIVATE CLASS: do not use directly -class mongodb::repo::yum inherits mongodb::repo { - # We try to follow/reproduce the instruction - # http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/ - - if($::mongodb::repo::ensure == 'present' or $::mongodb::repo::ensure == true) { - yumrepo { 'mongodb': - descr => 'MongoDB/10gen Repository', - baseurl => $::mongodb::repo::location, - gpgcheck => '0', - enabled => '1', - } - Yumrepo['mongodb'] -> Package<|tag == 'mongodb'|> - } - else { - yumrepo { 'mongodb': - enabled => absent, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server.pp deleted file mode 100644 index 04c576a139..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server.pp +++ /dev/null @@ -1,77 +0,0 @@ -# This installs a MongoDB server. See README.md for more details. -class mongodb::server ( - $ensure = $mongodb::params::ensure, - - $user = $mongodb::params::user, - $group = $mongodb::params::group, - - $config = $mongodb::params::config, - $dbpath = $mongodb::params::dbpath, - $pidfilepath = $mongodb::params::pidfilepath, - - $service_provider = $mongodb::params::service_provider, - $service_name = $mongodb::params::service_name, - $service_status = $mongodb::params::service_status, - - $package_ensure = $ensure, - $package_name = $mongodb::params::server_package_name, - - $logpath = $mongodb::params::logpath, - $bind_ip = $mongodb::params::bind_ip, - $logappend = true, - $fork = $mongodb::params::fork, - $port = 27017, - $journal = $mongodb::params::journal, - $nojournal = undef, - $smallfiles = undef, - $cpu = undef, - $auth = false, - $noauth = undef, - $verbose = undef, - $verbositylevel = undef, - $objcheck = undef, - $quota = undef, - $quotafiles = undef, - $diaglog = undef, - $directoryperdb = undef, - $profile = undef, - $maxconns = undef, - $oplog_size = undef, - $nohints = undef, - $nohttpinterface = undef, - $noscripting = undef, - $notablescan = undef, - $noprealloc = undef, - $nssize = undef, - $mms_token = undef, - $mms_name = undef, - $mms_interval = undef, - $replset = undef, - $rest = undef, - $slowms = undef, - $keyfile = undef, - $set_parameter = undef, - $syslog = undef, - - # Deprecated parameters - $master = undef, - $slave = undef, - $only = undef, - $source = undef, -) inherits mongodb::params { - - - if ($ensure == 'present' or $ensure == true) { - anchor { 'mongodb::server::start': }-> - class { 'mongodb::server::install': }-> - class { 'mongodb::server::config': }-> - class { 'mongodb::server::service': }-> - anchor { 'mongodb::server::end': } - } else { - anchor { 'mongodb::server::start': }-> - class { 'mongodb::server::service': }-> - class { 'mongodb::server::config': }-> - class { 'mongodb::server::install': }-> - anchor { 'mongodb::server::end': } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server/config.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server/config.pp deleted file mode 100644 index 2056c14d54..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server/config.pp +++ /dev/null @@ -1,92 +0,0 @@ -# PRIVATE CLASS: do not call directly -class mongodb::server::config { - $ensure = $mongodb::server::ensure - $user = $mongodb::server::user - $group = $mongodb::server::group - $config = $mongodb::server::config - - $dbpath = $mongodb::server::dbpath - $pidfilepath = $mongodb::server::pidfilepath - $logpath = $mongodb::server::logpath - $logappend = $mongodb::server::logappend - $fork = $mongodb::server::fork - $port = $mongodb::server::port - $journal = $mongodb::server::journal - $nojournal = $mongodb::server::nojournal - $smallfiles = $mongodb::server::smallfiles - $cpu = $mongodb::server::cpu - $auth = $mongodb::server::auth - $noath = $mongodb::server::noauth - $verbose = $mongodb::server::verbose - $verbositylevel = $mongodb::server::verbositylevel - $objcheck = $mongodb::server::objcheck - $quota = $mongodb::server::quota - $quotafiles = $mongodb::server::quotafiles - $diaglog = $mongodb::server::diaglog - $oplog_size = $mongodb::server::oplog_size - $nohints = $mongodb::server::nohints - $nohttpinterface = $mongodb::server::nohttpinterface - $noscripting = $mongodb::server::noscripting - $notablescan = $mongodb::server::notablescan - $noprealloc = $mongodb::server::noprealloc - $nssize = $mongodb::server::nssize - $mms_token = $mongodb::server::mms_token - $mms_name = $mongodb::server::mms_name - $mms_interval = $mongodb::server::mms_interval - $master = $mongodb::server::master - $slave = $mongodb::server::slave - $only = $mongodb::server::only - $source = $mongodb::server::source - $replset = $mongodb::server::replset - $rest = $mongodb::server::rest - $slowms = $mongodb::server::slowms - $keyfile = $mongodb::server::keyfile - $bind_ip = $mongodb::server::bind_ip - $directoryperdb = $mongodb::server::directoryperdb - $profile = $mongodb::server::profile - $set_parameter = $mongodb::server::set_parameter - $syslog = $mongodb::server::syslog - - File { - owner => $user, - group => $group, - } - - if ($logpath and $syslog) { fail('You cannot use syslog with logpath')} - - if ($ensure == 'present' or $ensure == true) { - - # Exists for future compatibility and clarity. - if $auth { - $noauth = false - } - else { - $noauth = true - } - - file { $config: - content => template('mongodb/mongodb.conf.erb'), - owner => 'root', - group => 'root', - mode => '0644', - notify => Class['mongodb::server::service'] - } - - file { $dbpath: - ensure => directory, - mode => '0755', - owner => $user, - group => $group, - require => File[$config] - } - } else { - file { $dbpath: - ensure => absent, - force => true, - backup => false, - } - file { $config: - ensure => absent - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server/install.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server/install.pp deleted file mode 100644 index 46b0e749b1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server/install.pp +++ /dev/null @@ -1,34 +0,0 @@ -# PRIVATE CLASS: do not call directly -class mongodb::server::install { - $package_ensure = $mongodb::server::package_ensure - $package_name = $mongodb::server::package_name - - case $package_ensure { - true: { - $my_package_ensure = 'present' - $file_ensure = 'directory' - } - false: { - $my_package_ensure = 'absent' - $file_ensure = 'absent' - } - 'absent': { - $my_package_ensure = 'absent' - $file_ensure = 'absent' - } - 'purged': { - $my_package_ensure = 'purged' - $file_ensure = 'absent' - } - default: { - $my_package_ensure = $package_ensure - $file_ensure = 'present' - } - } - - package { 'mongodb_server': - ensure => $my_package_ensure, - name => $package_name, - tag => 'mongodb', - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server/service.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server/service.pp deleted file mode 100644 index 8cb4a48ef5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/manifests/server/service.pp +++ /dev/null @@ -1,23 +0,0 @@ -# PRIVATE CLASS: do not call directly -class mongodb::server::service { - $ensure = $mongodb::server::ensure - $service_name = $mongodb::server::service_name - $service_provider = $mongodb::server::service_provider - $service_status = $mongodb::server::service_status - - $service_ensure = $ensure ? { - present => true, - absent => false, - purged => false, - default => $ensure - } - - service { 'mongodb': - ensure => $service_ensure, - name => $service_name, - enable => $service_ensure, - provider => $service_provider, - hasstatus => true, - status => $service_status, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-6-vcloud.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-6-vcloud.yml deleted file mode 100644 index ae19ee77c8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-6-vcloud.yml +++ /dev/null @@ -1,21 +0,0 @@ -HOSTS: - 'master': - roles: - - master - platform: el-6-x86_64 - hypervisor: vcloud - template: centos-6-x86_64 - 'slave': - roles: - - slave - platform: el-6-x86_64 - hypervisor: vcloud - template: centos-6-x86_64 -CONFIG: - type: foss - ssh: - keys: "~/.ssh/id_rsa-acceptance" - datastore: instance0 - folder: Delivery/Quality Assurance/Enterprise/Dynamic - resourcepool: delivery/Quality Assurance/Enterprise/Dynamic - pooling_api: http://vcloud.delivery.puppetlabs.net/ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64-pe.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64-pe.yml deleted file mode 100644 index 7d9242f1b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64-pe.yml +++ /dev/null @@ -1,12 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - - database - - dashboard - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: pe diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64.yml deleted file mode 100644 index 05540ed8c5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/centos-64-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/default.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/default.yml deleted file mode 100644 index 4e2cb809e8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-65-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-65-x64-vbox436-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/fedora-18-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/fedora-18-x64.yml deleted file mode 100644 index 1361649830..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/fedora-18-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - fedora-18-x64: - roles: - - master - platform: fedora-18-x86_64 - box : fedora-18-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-6-vcloud.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-6-vcloud.yml deleted file mode 100644 index ae19ee77c8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-6-vcloud.yml +++ /dev/null @@ -1,21 +0,0 @@ -HOSTS: - 'master': - roles: - - master - platform: el-6-x86_64 - hypervisor: vcloud - template: centos-6-x86_64 - 'slave': - roles: - - slave - platform: el-6-x86_64 - hypervisor: vcloud - template: centos-6-x86_64 -CONFIG: - type: foss - ssh: - keys: "~/.ssh/id_rsa-acceptance" - datastore: instance0 - folder: Delivery/Quality Assurance/Enterprise/Dynamic - resourcepool: delivery/Quality Assurance/Enterprise/Dynamic - pooling_api: http://vcloud.delivery.puppetlabs.net/ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-64-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-64-x64.yml deleted file mode 100644 index 05540ed8c5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/multi-centos-64-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/sles-11-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/sles-11-x64.yml deleted file mode 100644 index 41abe2135e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/sles-11-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - sles-11-x64.local: - roles: - - master - platform: sles-11-x64 - box : sles-11sp1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml deleted file mode 100644 index 5ca1514e40..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-10044-x64: - roles: - - master - platform: ubuntu-10.04-amd64 - box : ubuntu-server-10044-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml deleted file mode 100644 index d065b304f8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/replset_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/replset_spec.rb deleted file mode 100644 index 8be5a0f463..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/replset_spec.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'spec_helper_acceptance' - -if hosts.length > 1 - describe 'mongodb_replset resource' do - after :all do - # Have to drop the DB to disable replsets for further testing - on hosts, %{mongo local --verbose --eval 'db.dropDatabase()'} - - pp = <<-EOS - class { 'mongodb::globals': } - -> class { 'mongodb::server': - ensure => purged, - } - if $::osfamily == 'RedHat' { - class { 'mongodb::client': } - } - EOS - - apply_manifest_on(hosts.reverse, pp, :catch_failures => true) - end - - it 'configures mongo on both nodes' do - pp = <<-EOS - class { 'mongodb::globals': } - -> class { 'mongodb::server': - bind_ip => '0.0.0.0', - replset => 'test', - } - if $::osfamily == 'RedHat' { - class { 'mongodb::client': } - } - EOS - - apply_manifest_on(hosts.reverse, pp, :catch_failures => true) - apply_manifest_on(hosts.reverse, pp, :catch_changes => true) - end - - it 'sets up the replset with puppet' do - pp = <<-EOS - mongodb_replset { 'test': - members => [#{hosts.collect{|x|"'#{x}:27017'"}.join(',')}], - } - EOS - apply_manifest_on(hosts_as('master'), pp, :catch_failures => true) - on(hosts_as('master'), 'mongo --quiet --eval "printjson(rs.conf())"') do |r| - expect(r.stdout).to match /#{hosts[0]}:27017/ - expect(r.stdout).to match /#{hosts[1]}:27017/ - end - end - - it 'inserts data on the master' do - sleep(30) - on hosts_as('master'), %{mongo --verbose --eval 'db.test.save({name:"test1",value:"some value"})'} - end - - it 'checks the data on the master' do - on hosts_as('master'), %{mongo --verbose --eval 'printjson(db.test.findOne({name:"test1"}))'} do |r| - expect(r.stdout).to match /some value/ - end - end - - it 'checks the data on the slave' do - sleep(10) - on hosts_as('slave'), %{mongo --verbose --eval 'rs.slaveOk(); printjson(db.test.findOne({name:"test1"}))'} do |r| - expect(r.stdout).to match /some value/ - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/server_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/server_spec.rb deleted file mode 100644 index c1132f594c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/acceptance/server_spec.rb +++ /dev/null @@ -1,122 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'mongodb::server class' do - - shared_examples 'normal tests' do |tengen| - if tengen - case fact('osfamily') - when 'RedHat' - package_name = 'mongodb-org-server' - service_name = 'mongod' - config_file = '/etc/mongod.conf' - when 'Debian' - package_name = 'mongodbdb-org-10gen' - service_name = 'mongodb' - config_file = '/etc/mongodb.conf' - end - else - case fact('osfamily') - when 'RedHat' - package_name = 'mongodb-server' - service_name = 'mongod' - config_file = '/etc/mongodb.conf' - when 'Debian' - package_name = 'mongodb-server' - service_name = 'mongodb' - config_file = '/etc/mongodb.conf' - end - end - - client_name = 'mongo --version' - - context "default parameters with 10gen => #{tengen}" do - after :all do - if tengen - puts "XXX uninstalls mongodb because changing the port with tengen doesn't work because they have a crappy init script" - pp = <<-EOS - class {'mongodb::globals': manage_package_repo => #{tengen}, } - -> class { 'mongodb::server': ensure => absent, } - -> class { 'mongodb::client': ensure => absent, } - EOS - apply_manifest(pp, :catch_failures => true) - end - end - - it 'should work with no errors' do - case fact('osfamily') - when 'RedHat' - pp = <<-EOS - class { 'mongodb::globals': manage_package_repo => #{tengen}, } - -> class { 'mongodb::server': } - -> class { 'mongodb::client': } - EOS - when 'Debian' - pp = <<-EOS - class { 'mongodb::globals': manage_package_repo => #{tengen}, } - -> class { 'mongodb::server': } - EOS - end - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - describe package(package_name) do - it { should be_installed } - end - - describe file(config_file) do - it { should be_file } - end - - describe service(service_name) do - it { should be_enabled } - it { should be_running } - end - - describe port(27017) do - it do - sleep(20) - should be_listening - end - end - - describe command(client_name) do - it do - should return_exit_status 0 - end - end - end - - context "test using custom port and 10gen => #{tengen}" do - it 'change port to 27018' do - pp = <<-EOS - class { 'mongodb::globals': manage_package_repo => #{tengen}, } - -> class { 'mongodb::server': port => 27018, } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - describe port(27018) do - sleep(20) - it { sleep 5 ; should be_listening } - end - end - - describe "uninstalling with 10gen => #{tengen}" do - it 'uninstalls mongodb' do - pp = <<-EOS - class {'mongodb::globals': manage_package_repo => #{tengen}, } - -> class { 'mongodb::server': ensure => absent, } - -> class { 'mongodb::client': ensure => absent, } - EOS - apply_manifest(pp, :catch_failures => true) - end - end - end - - it_behaves_like 'normal tests', false - it_behaves_like 'normal tests', true -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/client_install_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/client_install_spec.rb deleted file mode 100644 index 5fe4bfa7cc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/client_install_spec.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'spec_helper' - -describe 'mongodb::client::install', :type => :class do - describe 'it should create package' do - let(:pre_condition) { ["class mongodb::client { $ensure = true $package_name = 'mongodb' }", "include mongodb::client"]} - it { - should contain_package('mongodb_client').with({ - :ensure => 'present', - :name => 'mongodb', - }) - } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/repo_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/repo_spec.rb deleted file mode 100644 index aa051e915f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/repo_spec.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'spec_helper' - -describe 'mongodb::repo', :type => :class do - - context 'when deploying on Debian' do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :lsbdistid => 'Debian', - } - end - - it { - should contain_class('mongodb::repo::apt') - } - end - - context 'when deploying on CentOS' do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystem => 'CentOS', - } - end - - it { - should contain_class('mongodb::repo::yum') - } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/server_config_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/server_config_spec.rb deleted file mode 100644 index db05b88e31..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/server_config_spec.rb +++ /dev/null @@ -1,116 +0,0 @@ -require 'spec_helper' - -describe 'mongodb::server::config', :type => :class do - - describe 'with preseted variables' do - let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' }", "include mongodb::server"]} - - it { - should contain_file('/etc/mongod.conf') - } - - end - - describe 'with default values' do - let(:pre_condition) {[ "class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $user = 'mongod' $group = 'mongod' $port = 29017 $bind_ip = ['0.0.0.0'] $fork = true $logpath ='/var/log/mongo/mongod.log' $logappend = true }", "include mongodb::server" ]} - - it { - should contain_file('/etc/mongod.conf').with({ - :mode => '0644', - :owner => 'root', - :group => 'root' - }) - - should contain_file('/etc/mongod.conf').with_content(/^dbpath=\/var\/lib\/mongo/) - should contain_file('/etc/mongod.conf').with_content(/bind_ip\s=\s0\.0\.0\.0/) - should contain_file('/etc/mongod.conf').with_content(/^port = 29017$/) - should contain_file('/etc/mongod.conf').with_content(/^logappend=true/) - should contain_file('/etc/mongod.conf').with_content(/^logpath=\/var\/log\/mongo\/mongod\.log/) - should contain_file('/etc/mongod.conf').with_content(/^fork=true/) - } - end - - describe 'with absent ensure' do - let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = absent }", "include mongodb::server"]} - - it { - should contain_file('/etc/mongod.conf').with({ :ensure => 'absent' }) - } - - end - - describe 'with specific bind_ip values' do - let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $bind_ip = ['127.0.0.1', '10.1.1.13']}", "include mongodb::server"]} - - it { - should contain_file('/etc/mongod.conf').with_content(/bind_ip\s=\s127\.0\.0\.1\,10\.1\.1\.13/) - } - end - - describe 'when specifying auth to true' do - let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $auth = true $dbpath = '/var/lib/mongo' $ensure = present }", "include mongodb::server"]} - - it { - should contain_file('/etc/mongod.conf').with_content(/^auth=true/) - } - end - - describe 'when specifying set_parameter value' do - let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $set_parameter = 'textSearchEnable=true' $dbpath = '/var/lib/mongo' $ensure = present }", "include mongodb::server"]} - - it { - should contain_file('/etc/mongod.conf').with_content(/^setParameter = textSearchEnable=true/) - } - end - - describe 'with journal:' do - context 'on true with i686 architecture' do - let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $journal = true }", "include mongodb::server"]} - let (:facts) { { :architecture => 'i686' } } - - it { - should contain_file('/etc/mongod.conf').with_content(/^journal = true/) - } - end - end - - # check nested quota and quotafiles - describe 'with quota to' do - - context 'true and without quotafiles' do - let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $quota = true }", "include mongodb::server"]} - it { - should contain_file('/etc/mongod.conf').with_content(/^quota = true/) - } - end - - context 'true and with quotafiles' do - let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $quota = true $quotafiles = 1 }", "include mongodb::server"]} - - it { - should contain_file('/etc/mongod.conf').with_content(/quota = true/) - should contain_file('/etc/mongod.conf').with_content(/quotaFiles = 1/) - } - end - end - - describe 'when specifying syslog value' do - context 'it should be set to true' do - let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $syslog = true }", "include mongodb::server"]} - - it { - should contain_file('/etc/mongod.conf').with_content(/^syslog = true/) - } - end - - context 'if logpath is also set an error should be raised' do - let(:pre_condition) { ["class mongodb::server { $config = '/etc/mongod.conf' $dbpath = '/var/lib/mongo' $ensure = present $syslog = true $logpath ='/var/log/mongo/mongod.log' }", "include mongodb::server"]} - - it { - expect { should contain_file('/etc/mongod.conf') }.to raise_error(Puppet::Error, /You cannot use syslog with logpath/) - } - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/server_install_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/server_install_spec.rb deleted file mode 100644 index 5ca01a90e4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/server_install_spec.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'spec_helper' - -describe 'mongodb::server::install', :type => :class do - - describe 'it should create package and dbpath file' do - let(:pre_condition) { ["class mongodb::server { $package_ensure = true $dbpath = '/var/lib/mongo' $user = 'mongodb' $package_name = 'mongodb-server' }", "include mongodb::server"]} - - it { - should contain_package('mongodb_server').with({ - :ensure => 'present', - :name => 'mongodb-server', - }) - } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/server_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/server_spec.rb deleted file mode 100644 index c74e7f0c16..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/classes/server_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'spec_helper' - -describe 'mongodb::server' do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - } - end - - context 'with defaults' do - it { should contain_class('mongodb::server::install') } - it { should contain_class('mongodb::server::config') } - end - - context 'when deploying on Solaris' do - let :facts do - { :osfamily => 'Solaris' } - end - it { expect { should raise_error(Puppet::Error) } } - end - -end \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/defines/db_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/defines/db_spec.rb deleted file mode 100644 index 65a6f10523..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/defines/db_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'spec_helper' - -describe 'mongodb::db', :type => :define do - let(:title) { 'testdb' } - - let(:params) { - { 'user' => 'testuser', - 'password' => 'testpass', - } - } - - it 'should contain mongodb_database with mongodb::server requirement' do - should contain_mongodb_database('testdb')\ - .with_require('Class[Mongodb::Server]') - end - - it 'should contain mongodb_user with mongodb_database requirement' do - should contain_mongodb_user('testuser')\ - .with_require('Mongodb_database[testdb]') - end - - it 'should contain mongodb_user with proper database name' do - should contain_mongodb_user('testuser')\ - .with_database('testdb') - end - - it 'should contain mongodb_user with proper roles' do - params.merge!({'roles' => ['testrole1', 'testrole2']}) - should contain_mongodb_user('testuser')\ - .with_roles(["testrole1", "testrole2"]) - end - - it 'should prefer password_hash instead of password' do - params.merge!({'password_hash' => 'securehash'}) - should contain_mongodb_user('testuser')\ - .with_password_hash('securehash') - end - - it 'should contain mongodb_database with proper tries param' do - params.merge!({'tries' => 5}) - should contain_mongodb_database('testdb').with_tries(5) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/spec_helper.rb deleted file mode 100644 index 2c6f56649a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/spec_helper_acceptance.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/spec_helper_acceptance.rb deleted file mode 100755 index c1c09a9b74..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/spec_helper_acceptance.rb +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'beaker-rspec' - -UNSUPPORTED_PLATFORMS = [] - -unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' - if hosts.first.is_pe? - install_pe - on hosts, 'mkdir -p /etc/puppetlabs/facter/facts.d' - else - install_puppet - on hosts, 'mkdir -p /etc/facter/facts.d' - on hosts, '/bin/touch /etc/puppet/hiera.yaml' - end - hosts.each do |host| - on host, "mkdir -p #{host['distmoduledir']}" - end -end - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Readable test descriptions - c.formatter = :documentation - - # Configure all nodes in nodeset - c.before :suite do - puppet_module_install(:source => proj_root, :module_name => 'mongodb') - on hosts, 'puppet module install puppetlabs-stdlib' - on hosts, 'puppet module install puppetlabs-apt' - case fact('osfamily') - when 'RedHat' - on hosts, 'puppet module install stahnma-epel' - apply_manifest_on hosts, 'include epel' - end - on hosts, 'service iptables stop' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/spec_helper_system.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/spec_helper_system.rb deleted file mode 100644 index 7e2c48fb5e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/spec_helper_system.rb +++ /dev/null @@ -1,34 +0,0 @@ -require 'rspec-system/spec_helper' -require 'rspec-system-puppet/helpers' -require 'rspec-system-serverspec/helpers' - -include RSpecSystemPuppet::Helpers -include Serverspec::Helper::RSpecSystem -include Serverspec::Helper::DetectOS - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Enable colour - c.tty = true - - c.include RSpecSystemPuppet::Helpers - - # This is where we 'setup' the nodes before running our tests - c.before :suite do - # Install puppet - puppet_install - - # Install modules and dependencies - puppet_module_install(:source => proj_root, :module_name => 'mongodb') - shell('puppet module install puppetlabs-stdlib') - shell('puppet module install puppetlabs-apt') - - case node.facts['osfamily'] - when 'RedHat' - shell('puppet module install stahnma-epel') - puppet_apply('include epel') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/mongodb_password_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/mongodb_password_spec.rb deleted file mode 100644 index 5b0b825e56..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/mongodb_password_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'spec_helper' - -describe 'the mongodb_password function' do - before :all do - Puppet::Parser::Functions.autoloader.loadall - end - - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it 'should exist' do - Puppet::Parser::Functions.function('mongodb_password').should == 'function_mongodb_password' - end - - it 'should raise a ParseError if there no arguments' do - lambda { scope.function_mongodb_password([]) }.should( raise_error(Puppet::ParseError)) - end - - it 'should raise a ParseError if there is more than 2 arguments' do - lambda { scope.function_mongodb_password(%w(foo bar baz)) }.should( raise_error(Puppet::ParseError)) - end - - it 'should convert password into a hash' do - result = scope.function_mongodb_password(%w(user pass)) - result.should(eq('e0c4a7b97d4db31f5014e9694e567d6b')) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_database/mongodb_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_database/mongodb_spec.rb deleted file mode 100644 index 4376ada54b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_database/mongodb_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'spec_helper' - -describe Puppet::Type.type(:mongodb_database).provider(:mongodb) do - - let(:resource) { Puppet::Type.type(:mongodb_database).new( - { :ensure => :present, - :name => 'new_database', - :provider => described_class.name - } - )} - - let(:provider) { resource.provider } - - describe 'create' do - it 'makes a database' do - provider.expects(:mongo) - provider.create - end - end - - describe 'destroy' do - it 'removes a database' do - provider.expects(:mongo) - provider.destroy - end - end - - describe 'exists?' do - it 'checks if database exists' do - provider.expects(:mongo).at_least(2).returns("db1,new_database,db2") - provider.exists?.should be_true - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_replset/mongodb_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_replset/mongodb_spec.rb deleted file mode 100644 index 51b3f9effe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/provider/mongodb_replset/mongodb_spec.rb +++ /dev/null @@ -1,148 +0,0 @@ -# -# Authors: Emilien Macchi -# Francois Charlier -# - -require 'spec_helper' - -describe Puppet::Type.type(:mongodb_replset).provider(:mongo) do - - valid_members = ['mongo1:27017', 'mongo2:27017', 'mongo3:27017'] - - let(:resource) { Puppet::Type.type(:mongodb_replset).new( - { :ensure => :present, - :name => 'rs_test', - :members => valid_members, - :provider => :mongo - } - )} - - let(:resources) { { 'rs_test' => resource } } - let(:provider) { described_class.new(resource) } - - describe '#create' do - it 'should create a replicaset' do - provider.class.stubs(:get_replset_properties) - provider.stubs(:alive_members).returns(valid_members) - provider.expects('rs_initiate').with("{ _id: \"rs_test\", members: [ { _id: 0, host: \"mongo1:27017\" },{ _id: 1, host: \"mongo2:27017\" },{ _id: 2, host: \"mongo3:27017\" } ] }", "mongo1:27017").returns( - { "info" => "Config now saved locally. Should come online in about a minute.", - "ok" => 1 } ) - provider.create - provider.flush - end - end - - describe '#exists?' do - describe 'when the replicaset does not exist' do - it 'returns false' do - provider.class.stubs(:mongo).returns(< "rs_test" }) - provider.expects('rs_add').times(2).returns({ 'ok' => 1 }) - provider.members=(valid_members) - provider.flush - end - - it 'raises an error when the master host is not available' do - provider.stubs(:rs_status).returns({ "set" => "rs_test" }) - provider.stubs(:db_ismaster).returns({ "primary" => false }) - provider.members=(valid_members) - expect { provider.flush }.to raise_error(Puppet::Error, "Can't find master host for replicaset #{resource[:name]}.") - end - - it 'raises an error when at least one member is not running with --replSet' do - provider.stubs(:rs_status).returns({ "ok" => 0, "errmsg" => "not running with --replSet" }) - provider.members=(valid_members) - expect { provider.flush }.to raise_error(Puppet::Error, /is not supposed to be part of a replicaset\.$/) - end - - it 'raises an error when at least one member is configured with another replicaset name' do - provider.stubs(:rs_status).returns({ "set" => "rs_another" }) - provider.members=(valid_members) - expect { provider.flush }.to raise_error(Puppet::Error, /is already part of another replicaset\.$/) - end - - it 'raises an error when no member is available' do - provider.class.stubs(:mongo_command).raises(Puppet::ExecutionFailure, < :present, - :name => 'new_user', - :database => 'new_database', - :password_hash => 'pass', - :roles => ['role1', 'role2'], - :provider => described_class.name - } - )} - - let(:provider) { resource.provider } - - describe 'create' do - it 'creates a user' do - provider.expects(:mongo) - provider.create - end - end - - describe 'destroy' do - it 'removes a user' do - provider.expects(:mongo) - provider.destroy - end - end - - describe 'exists?' do - it 'checks if user exists' do - provider.expects(:mongo).at_least(2).returns("1") - provider.exists?.should be_true - end - end - - describe 'password_hash' do - it 'returns a password_hash' do - provider.expects(:mongo).returns("pass\n") - provider.password_hash.should == "pass" - end - end - - describe 'password_hash=' do - it 'changes a password_hash' do - provider.expects(:mongo) - provider.password_hash=("newpass") - end - end - - describe 'roles' do - it 'returns a sorted roles' do - provider.expects(:mongo).returns("role2,role1\n") - provider.roles.should == ['role1','role2'] - end - end - - describe 'roles=' do - it 'changes a roles' do - provider.expects(:mongo) - provider.roles=(['role3','role4']) - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_database_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_database_spec.rb deleted file mode 100644 index 245a1becf1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_database_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'puppet' -require 'puppet/type/mongodb_database' -describe Puppet::Type.type(:mongodb_database) do - - before :each do - @db = Puppet::Type.type(:mongodb_database).new(:name => 'test') - end - - it 'should accept a database name' do - @db[:name].should == 'test' - end - - it 'should accept a tries parameter' do - @db[:tries] = 5 - @db[:tries].should == 5 - end - - it 'should require a name' do - expect { - Puppet::Type.type(:mongodb_database).new({}) - }.to raise_error(Puppet::Error, 'Title or name must be provided') - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_replset_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_replset_spec.rb deleted file mode 100644 index f9b72d4236..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_replset_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -# -# Author: Emilien Macchi -# - -require 'puppet' -require 'puppet/type/mongodb_replset' -describe Puppet::Type.type(:mongodb_replset) do - - before :each do - @replset = Puppet::Type.type(:mongodb_replset).new(:name => 'test') - end - - it 'should accept a replica set name' do - @replset[:name].should == 'test' - end - - it 'should accept a members array' do - @replset[:members] = ['mongo1:27017', 'mongo2:27017'] - @replset[:members].should == ['mongo1:27017', 'mongo2:27017'] - end - - it 'should require a name' do - expect { - Puppet::Type.type(:mongodb_replset).new({}) - }.to raise_error(Puppet::Error, 'Title or name must be provided') - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_user_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_user_spec.rb deleted file mode 100644 index c822265d11..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/spec/unit/puppet/type/mongodb_user_spec.rb +++ /dev/null @@ -1,67 +0,0 @@ -require 'puppet' -require 'puppet/type/mongodb_user' -describe Puppet::Type.type(:mongodb_user) do - - before :each do - @user = Puppet::Type.type(:mongodb_user).new( - :name => 'test', - :database => 'testdb', - :password_hash => 'pass') - end - - it 'should accept a user name' do - @user[:name].should == 'test' - end - - it 'should accept a database name' do - @user[:database].should == 'testdb' - end - - it 'should accept a tries parameter' do - @user[:tries] = 5 - @user[:tries].should == 5 - end - - it 'should accept a password' do - @user[:password_hash] = 'foo' - @user[:password_hash].should == 'foo' - end - - it 'should use default role' do - @user[:roles].should == ['dbAdmin'] - end - - it 'should accept a roles array' do - @user[:roles] = ['role1', 'role2'] - @user[:roles].should == ['role1', 'role2'] - end - - it 'should require a name' do - expect { - Puppet::Type.type(:mongodb_user).new({}) - }.to raise_error(Puppet::Error, 'Title or name must be provided') - end - - it 'should require a database' do - expect { - Puppet::Type.type(:mongodb_user).new({:name => 'test', :password_hash => 'pass'}) - }.to raise_error(Puppet::Error, 'Parameter \'database\' must be set') - end - - it 'should require a password_hash' do - expect { - Puppet::Type.type(:mongodb_user).new({:name => 'test', :database => 'testdb'}) - }.to raise_error(Puppet::Error, 'Property \'password_hash\' must be set. Use mongodb_password() for creating hash.') - end - - it 'should sort roles' do - # Reinitialize type with explicit unsorted roles. - @user = Puppet::Type.type(:mongodb_user).new( - :name => 'test', - :database => 'testdb', - :password_hash => 'pass', - :roles => ['b', 'a']) - @user[:roles].should == ['a', 'b'] - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/templates/mongodb.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/templates/mongodb.conf.erb deleted file mode 100644 index 85d81054bb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/templates/mongodb.conf.erb +++ /dev/null @@ -1,172 +0,0 @@ -# mongo.conf - generated from Puppet - - -<% if @logpath -%> -#where to log -logpath=<%= @logpath %> -<% if @logappend -%> -logappend=<%= @logappend %> -<% end -%> -<% end -%> -<% if @bind_ip -%> -# Set this option to configure the mongod or mongos process to bind to and -# listen for connections from applications on this address. -# You may concatenate a list of comma separated values to bind mongod to multiple IP addresses. -bind_ip = <%= Array(@bind_ip).join(',') %> -<% end -%> -<% if @fork -%> -# fork and run in background -fork=<%= @fork %> -<% end -%> -port = <%= @port %> -dbpath=<%= @dbpath %> -<% if @pidfilepath -%> -# location of pidfile -pidfilepath = <%= @pidfilepath %> -<% end -%> -<% if @nojournal and not @journal -%> -# Disables write-ahead journaling -nojournal = <%= @nojournal %> -<% end -%> -<% if @journal and not @nojournal -%> -# Enables journaling -journal = <%= @journal %> -<% end -%> -<% if @cpu -%> -# Enables periodic logging of CPU utilization and I/O wait -cpu = <%= @cpu %> -<% end -%> -# Turn on/off security. Off is currently the default -<% if @noauth and not @auth -%> -noauth=<%= @noauth %> -<% end -%> -<% if @auth and not @noauth -%> -auth=<%= @auth %> -<% end -%> -<% if @verbose -%> -# Verbose logging output. -verbose = <%= @verbose %> -<% end -%> -<% if @verbositylevel -%> -<%= @verbositylevel -%> = true -<% end -%> -<% if @objcheck -%> -# Inspect all client data for validity on receipt (useful for -# developing drivers) -objcheck = <%= @objcheck %> -<% end -%> -<% if @maxconns -%> -maxConns = <%= @maxconns %> -<% end -%> -<% if @quota -%> -# Enable db quota management -quota = <%= @quota %> -<% if @quotafiles -%> -quotaFiles = <%= @quotafiles %> -<% end -%> -<% end -%> -<% if @diaglog -%> -# Set oplogging level where n is -# 0=off (default) -# 1=W -# 2=R -# 3=both -# 7=W+some reads -diaglog = <%= @diaglog %> -<% end -%> -<% if @oplog_size -%> -# Specifies a maximum size in megabytes for the replication operation log -oplogSize = <%= @oplog_size %> -<% end -%> -<% if @nohints -%> -# Ignore query hints -nohints = <%= @nohints %> -<% end -%> -<% if @nohttpinterface -%> -# Disable the HTTP interface (Defaults to localhost:27018). -nohttpinterface = <%= @nohttpinterface %> -<% end -%> -<% if @noscripting -%> -# Turns off server-side scripting. This will result in greatly limited -# functionality -noscripting = <%= @noscripting %> -<% end -%> -<% if @notablescan -%> -# Turns off table scans. Any query that would do a table scan fails. -notablescan = <%= @notablescan %> -<% end -%> -<% if @noprealloc -%> -# Disable data file preallocation. -noprealloc = <%= @noprealloc %> -<% end -%> -<% if @nssize -%> -# Specify .ns file size for new databases in megabytes. -nssize = <%= @nssize %> -<% end -%> -<% if @mms_token -%> -# Accout token for Mongo monitoring server. -mms-token = <%= @mms_token %> -<% end -%> -<% if @mms_name -%> -# Server name for Mongo monitoring server. -mms-name = <%= @mms_name %> -<% end -%> -<% if @mms_interval -%> -# Ping interval for Mongo monitoring server. -mms-interval = <%= @mms_interval %> -<% end -%> -<% if @slave -%> -slave = <%= @slave %> -<% end -%> -<% if @source -%> -source = <%= @source %> -<% end -%> -<% if @only -%> -# Slave only: specify a single database to replicate -only = <%= @only %> -<% end -%> -<% if @master -%> -master = <%= @master %> -<% end -%> -<% if @directoryperdb -%> -# Alters the storage pattern of the data directory to store each database -# files in a distinct folder. -directoryperdb = <%= @directoryperdb %> -<% end -%> -<% if @replset -%> -# Configure ReplicaSet membership -replSet = <%= @replset %> -<% end -%> -<% if @smallfiles -%> -# Use a smaller default data file size. -smallfiles = <%= @smallfiles %> -<% end -%> -<% if @rest -%> -# Enable rest API (disabled by default) -rest = <%= @rest %> -<% end -%> -<% if @profile -%> -# Modify this value to changes the level of database profiling, which inserts -# information about operation performance into output of mongod or the log file. -#0 = Off. No profiling. default -#1 = On. Only includes slow operations. -#2 = On. Includes all operations. -profile = <%= @profile %> -<% end -%> -<% if @slowms -%> -# Sets the threshold in milliseconds for mongod to consider a query slow for the profiler. -slowms = <%= @slowms %> -<% end -%> -<% if @keyfile -%> -# Specify the path to a key file to store authentication information. -keyFile = <%= @keyfile %> -<% end -%> -<% if @directoryperdb -%> -directoryperdb = <%= @directoryperdb %> -<% end -%> -<% if @set_parameter -%> -setParameter = <%= @set_parameter %> -<% end -%> -<% if @syslog -%> -syslog = <%= @syslog %> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/globals.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/globals.pp deleted file mode 100644 index 8166214bb7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/globals.pp +++ /dev/null @@ -1,3 +0,0 @@ -class { 'mongodb::globals': - manage_package_repo => true -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/init.pp deleted file mode 100644 index aac044ee0d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/init.pp +++ /dev/null @@ -1 +0,0 @@ -class { '::mongodb': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/replicaset.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/replicaset.pp deleted file mode 100644 index a758b8dd26..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/replicaset.pp +++ /dev/null @@ -1,16 +0,0 @@ -node default { - class { '::mongodb::globals': - manage_package_repo => true - } -> - class { '::mongodb::server': - smallfiles => true, - bind_ip => ['0.0.0.0'], - replset => 'rsmain' - } -} - -node /mongo1/ inherits default { - mongodb_replset{'rsmain': - members => ['mongo1:27017', 'mongo2:27017', 'mongo3:27017'] - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/server.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/server.pp deleted file mode 100644 index 95106ebc98..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mongodb/tests/server.pp +++ /dev/null @@ -1,2 +0,0 @@ -class { 'mongodb::globals': manage_package_repo => true }-> -class { 'mongodb::server': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/.fixtures.yml deleted file mode 100644 index 5631e2a231..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/.fixtures.yml +++ /dev/null @@ -1,5 +0,0 @@ -fixtures: - repositories: - "stdlib": "https://github.com/puppetlabs/puppetlabs-stdlib" - symlinks: - "mysql": "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/.nodeset.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/.nodeset.yml deleted file mode 100644 index 767f9cd2f6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/.nodeset.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -default_set: 'centos-64-x64' -sets: - 'centos-59-x64': - nodes: - "main.foo.vm": - prefab: 'centos-59-x64' - 'centos-64-x64': - nodes: - "main.foo.vm": - prefab: 'centos-64-x64' - 'fedora-18-x64': - nodes: - "main.foo.vm": - prefab: 'fedora-18-x64' - 'debian-607-x64': - nodes: - "main.foo.vm": - prefab: 'debian-607-x64' - 'debian-70rc1-x64': - nodes: - "main.foo.vm": - prefab: 'debian-70rc1-x64' - 'ubuntu-server-10044-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-10044-x64' - 'ubuntu-server-12042-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-12042-x64' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/.travis.yml deleted file mode 100644 index 42aea59180..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -branches: - only: - - master -language: ruby -bundler_args: --without development -script: "bundle exec rake spec SPEC_OPTS='--format documentation'" -after_success: - - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-release - - .forge-release/publish -rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 -env: - matrix: - - PUPPET_GEM_VERSION="~> 2.7.0" - - PUPPET_GEM_VERSION="~> 3.3.0" - - PUPPET_GEM_VERSION="~> 3.4.0" - global: - - PUBLISHER_LOGIN=puppetlabs - - secure: |- - Hc9OPm/kRTmjXSP3TbLir/y6Yy1LqmZS8zrqxdTbpo3Z04EYv1uKhaFDpECl - 0a6bJRUWpLWIuDco08fHMeCTWoFGzE97EDelhHKSYiTNllzYKWPHy7ki/al6 - wjz0gLtiDfmktHQOHatBy6EKLFjoyjGoE4cUUta4Ixq4tMBNzEA= -matrix: - fast_finish: true - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" -notifications: - email: false diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/CHANGELOG.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/CHANGELOG.md deleted file mode 100644 index 8349998f3f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/CHANGELOG.md +++ /dev/null @@ -1,476 +0,0 @@ -##2014-03-04 - Supported Release 2.2.3 -###Summary - -This is a supported release. This release removes a testing symlink that can -cause trouble on systems where /var is on a seperate filesystem from the -modulepath. - -####Features -####Bugfixes -####Known Bugs -* No known bugs - -##2014-03-04 - Supported Release 2.2.2 -###Summary -This is a supported release. Mostly comprised of enhanced testing, plus a -bugfix for Suse. - -####Bugfixes -- PHP bindings on Suse -- Test fixes - -####Known Bugs -* No known bugs - -##2014-02-19 - Version 2.2.1 - -###Summary - -Minor release that repairs mysql_database{} so that it sees the correct -collation settings (it was only checking the global mysql ones, not the -actual database and constantly setting it over and over since January 22nd). - -Also fixes a bunch of tests on various platforms. - - -##2014-02-13 - Version 2.2.0 - -###Summary - -####Features -- Add `backupdirmode`, `backupdirowner`, `backupdirgroup` to - mysql::server::backup to allow customizing the mysqlbackupdir. -- Support multiple options of the same name, allowing you to - do 'replicate-do-db' => ['base1', 'base2', 'base3'] in order to get three - lines of replicate-do-db = base1, replicate-do-db = base2 etc. - -####Bugfixes -- Fix `restart` so it actually stops mysql restarting if set to false. -- DRY out the defaults_file functionality in the providers. -- mysql_grant fixed to work with root@localhost/@. -- mysql_grant fixed for WITH MAX_QUERIES_PER_HOUR -- mysql_grant fixed so revoking all privileges accounts for GRANT OPTION -- mysql_grant fixed to remove duplicate privileges. -- mysql_grant fixed to handle PROCEDURES when removing privileges. -- mysql_database won't try to create existing databases, breaking replication. -- bind_address renamed bind-address in 'mysqld' options. -- key_buffer renamed to key_buffer_size. -- log_error renamed to log-error. -- pid_file renamed to pid-file. -- Ensure mysql::server:root_password runs before mysql::server::backup -- Fix options_override -> override_options in the README. -- Extensively rewrite the README to be accurate and awesome. -- Move to requiring stdlib 3.2.0, shipped in PE3.0 -- Add many new tests. - - -##2013-11-13 - Version 2.1.0 - -###Summary - -The most important changes in 2.1.0 are improvements to the my.cnf creation, -as well as providers. Setting options to = true strips them to be just the -key name itself, which is required for some options. - -The provider updates fix a number of bugs, from lowercase privileges to -deprecation warnings. - -Last, the new hiera integration functionality should make it easier to -externalize all your grants, users, and, databases. Another great set of -community submissions helped to make this release. - -####Features -- Some options can not take a argument. Gets rid of the '= true' when an -option is set to true. -- Easier hiera integration: Add hash parameters to mysql::server to allow -specifying grants, users, and databases. - -####Bugfixes -- Fix an issue with lowercase privileges in mysql_grant{} causing them to be reapplied needlessly. -- Changed defaults-file to defaults-extra-file in providers. -- Ensure /root/.my.cnf is 0600 and root owned. -- database_user deprecation warning was incorrect. -- Add anchor pattern for client.pp -- Documentation improvements. -- Various test fixes. - - -##2013-10-21 - Version 2.0.1 - -###Summary - -This is a bugfix release to handle an issue where unsorted mysql_grant{} -privileges could cause Puppet to incorrectly reapply the permissions on -each run. - -####Bugfixes -- Mysql_grant now sorts privileges in the type and provider for comparison. -- Comment and test tweak for PE3.1. - - -##2013-10-14 - Version 2.0.0 - -###Summary - -(Previously detailed in the changelog for 2.0.0-rc1) - -This module has been completely refactored and works significantly different. -The changes are broad and touch almost every piece of the module. - -See the README.md for full details of all changes and syntax. -Please remain on 1.0.0 if you don't have time to fully test this in dev. - -* mysql::server, mysql::client, and mysql::bindings are the primary interface -classes. -* mysql::server takes an `override_options` parameter to set my.cnf options, -with the hash format: { 'section' => { 'thing' => 'value' }} -* mysql attempts backwards compatibility by forwarding all parameters to -mysql::server. - - -##2013-10-09 - Version 2.0.0-rc5 - -###Summary - -Hopefully the final rc! Further fixes to mysql_grant (stripping out the -cleverness so we match a much wider range of input.) - -####Bugfixes -- Make mysql_grant accept '.*'@'.*' in terms of input for user@host. - - -##2013-10-09 - Version 2.0.0-rc4 - -###Summary - -Bugfixes to mysql_grant and mysql_user form the bulk of this rc, as well as -ensuring that values in the override_options hash that contain a value of '' -are created as just "key" in the conf rather than "key =" or "key = false". - -####Bugfixes -- Improve mysql_grant to work with IPv6 addresses (both long and short). -- Ensure @host users work as well as user@host users. -- Updated my.cnf template to support items with no values. - - -##2013-10-07 - Version 2.0.0-rc3 - -###Summary -Fix mysql::server::monitor's use of mysql_user{}. - -####Bugfixes -- Fix myql::server::monitor's use of mysql_user{} to grant the proper -permissions. Add specs as well. (Thanks to treydock!) - - -##2013-10-03 - Version 2.0.0-rc2 - -###Summary -Bugfixes - -####Bugfixes -- Fix a duplicate parameter in mysql::server - - -##2013-10-03 - Version 2.0.0-rc1 - -###Summary - -This module has been completely refactored and works significantly different. -The changes are broad and touch almost every piece of the module. - -See the README.md for full details of all changes and syntax. -Please remain on 1.0.0 if you don't have time to fully test this in dev. - -* mysql::server, mysql::client, and mysql::bindings are the primary interface -classes. -* mysql::server takes an `override_options` parameter to set my.cnf options, -with the hash format: { 'section' => { 'thing' => 'value' }} -* mysql attempts backwards compatibility by forwarding all parameters to -mysql::server. - ---- -##2013-09-23 - Version 1.0.0 - -###Summary - -This release introduces a number of new type/providers, to eventually -replace the database_ ones. The module has been converted to call the -new providers rather than the previous ones as they have a number of -fixes, additional options, and work with puppet resource. - -This 1.0.0 release precedes a large refactoring that will be released -almost immediately after as 2.0.0. - -####Features -- Added mysql_grant, mysql_database, and mysql_user. -- Add `mysql::bindings` class and refactor all other bindings to be contained underneath mysql::bindings:: namespace. -- Added support to back up specified databases only with 'mysqlbackup' parameter. -- Add option to mysql::backup to set the backup script to perform a mysqldump on each database to its own file - -####Bugfixes -- Update my.cnf.pass.erb to allow custom socket support -- Add environment variable for .my.cnf in mysql::db. -- Add HOME environment variable for .my.cnf to mysqladmin command when -(re)setting root password - ---- -##2013-07-15 - Version 0.9.0 -####Features -- Add `mysql::backup::backuprotate` parameter -- Add `mysql::backup::delete_before_dump` parameter -- Add `max_user_connections` attribute to `database_user` type - -####Bugfixes -- Add client package dependency for `mysql::db` -- Remove duplicate `expire_logs_days` and `max_binlog_size` settings -- Make root's `.my.cnf` file path dynamic -- Update pidfile path for Suse variants -- Fixes for lint - -##2013-07-05 - Version 0.8.1 -####Bugfixes - - Fix a typo in the Fedora 19 support. - -##2013-07-01 - Version 0.8.0 -####Features - - mysql::perl class to install perl-DBD-mysql. - - minor improvements to the providers to improve reliability - - Install the MariaDB packages on Fedora 19 instead of MySQL. - - Add new `mysql` class parameters: - - `max_connections`: The maximum number of allowed connections. - - `manage_config_file`: Opt out of puppetized control of my.cnf. - - `ft_min_word_len`: Fine tune the full text search. - - `ft_max_word_len`: Fine tune the full text search. - - Add new `mysql` class performance tuning parameters: - - `key_buffer` - - `thread_stack` - - `thread_cache_size` - - `myisam-recover` - - `query_cache_limit` - - `query_cache_size` - - `max_connections` - - `tmp_table_size` - - `table_open_cache` - - `long_query_time` - - Add new `mysql` class replication parameters: - - `server_id` - - `sql_log_bin` - - `log_bin` - - `max_binlog_size` - - `binlog_do_db` - - `expire_logs_days` - - `log_bin_trust_function_creators` - - `replicate_ignore_table` - - `replicate_wild_do_table` - - `replicate_wild_ignore_table` - - `expire_logs_days` - - `max_binlog_size` - -####Bugfixes - - No longer restart MySQL when /root/.my.cnf changes. - - Ensure mysql::config runs before any mysql::db defines. - -##2013-06-26 - Version 0.7.1 -####Bugfixes -- Single-quote password for special characters -- Update travis testing for puppet 3.2.x and missing Bundler gems - -##2013-06-25 - Version 0.7.0 -This is a maintenance release for community bugfixes and exposing -configuration variables. - -* Add new `mysql` class parameters: - - `basedir`: The base directory mysql uses - - `bind_address`: The IP mysql binds to - - `client_package_name`: The name of the mysql client package - - `config_file`: The location of the server config file - - `config_template`: The template to use to generate my.cnf - - `datadir`: The directory MySQL's datafiles are stored - - `default_engine`: The default engine to use for tables - - `etc_root_password`: Whether or not to add the mysql root password to - /etc/my.cnf - - `java_package_name`: The name of the java package containing the java - connector - - `log_error`: Where to log errors - - `manage_service`: Boolean dictating if mysql::server should manage the - service - - `max_allowed_packet`: Maximum network packet size mysqld will accept - - `old_root_password`: Previous root user password - - `php_package_name`: The name of the phpmysql package to install - - `pidfile`: The location mysql will expect the pidfile to be - - `port`: The port mysql listens on - - `purge_conf_dir`: Value fed to recurse and purge parameters of the - /etc/mysql/conf.d resource - - `python_package_name`: The name of the python mysql package to install - - `restart`: Whether to restart mysqld - - `root_group`: Use specified group for root-owned files - - `root_password`: The root MySQL password to use - - `ruby_package_name`: The name of the ruby mysql package to install - - `ruby_package_provider`: The installation suite to use when installing the - ruby package - - `server_package_name`: The name of the server package to install - - `service_name`: The name of the service to start - - `service_provider`: The name of the service provider - - `socket`: The location of the MySQL server socket file - - `ssl_ca`: The location of the SSL CA Cert - - `ssl_cert`: The location of the SSL Certificate to use - - `ssl_key`: The SSL key to use - - `ssl`: Whether or not to enable ssl - - `tmpdir`: The directory MySQL's tmpfiles are stored -* Deprecate `mysql::package_name` parameter in favor of -`mysql::client_package_name` -* Fix local variable template deprecation -* Fix dependency ordering in `mysql::db` -* Fix ANSI quoting in queries -* Fix travis support (but still messy) -* Fix typos - -##2013-01-11 - Version 0.6.1 -* Fix providers when /root/.my.cnf is absent - -##2013-01-09 - Version 0.6.0 -* Add `mysql::server::config` define for specific config directives -* Add `mysql::php` class for php support -* Add `backupcompress` parameter to `mysql::backup` -* Add `restart` parameter to `mysql::config` -* Add `purge_conf_dir` parameter to `mysql::config` -* Add `manage_service` parameter to `mysql::server` -* Add syslog logging support via the `log_error` parameter -* Add initial SuSE support -* Fix remove non-localhost root user when fqdn != hostname -* Fix dependency in `mysql::server::monitor` -* Fix .my.cnf path for root user and root password -* Fix ipv6 support for users -* Fix / update various spec tests -* Fix typos -* Fix lint warnings - -##2012-08-23 - Version 0.5.0 -* Add puppetlabs/stdlib as requirement -* Add validation for mysql privs in provider -* Add `pidfile` parameter to mysql::config -* Add `ensure` parameter to mysql::db -* Add Amazon linux support -* Change `bind_address` parameter to be optional in my.cnf template -* Fix quoting root passwords - -##2012-07-24 - Version 0.4.0 -* Fix various bugs regarding database names -* FreeBSD support -* Allow specifying the storage engine -* Add a backup class -* Add a security class to purge default accounts - -##2012-05-03 - Version 0.3.0 -* 14218 Query the database for available privileges -* Add mysql::java class for java connector installation -* Use correct error log location on different distros -* Fix set_mysql_rootpw to properly depend on my.cnf - -##2012-04-11 - Version 0.2.0 - -##2012-03-19 - William Van Hevelingen -* (#13203) Add ssl support (f7e0ea5) - -##2012-03-18 - Nan Liu -* Travis ci before script needs success exit code. (0ea463b) - -##2012-03-18 - Nan Liu -* Fix Puppet 2.6 compilation issues. (9ebbbc4) - -##2012-03-16 - Nan Liu -* Add travis.ci for testing multiple puppet versions. (33c72ef) - -##2012-03-15 - William Van Hevelingen -* (#13163) Datadir should be configurable (f353fc6) - -##2012-03-16 - Nan Liu -* Document create_resources dependency. (558a59c) - -##2012-03-16 - Nan Liu -* Fix spec test issues related to error message. (eff79b5) - -##2012-03-16 - Nan Liu -* Fix mysql service on Ubuntu. (72da2c5) - -##2012-03-16 - Dan Bode -* Add more spec test coverage (55e399d) - -##2012-03-16 - Nan Liu -* (#11963) Fix spec test due to path changes. (1700349) - -##2012-03-07 - François Charlier -* Add a test to check path for 'mysqld-restart' (b14c7d1) - -##2012-03-07 - François Charlier -* Fix path for 'mysqld-restart' (1a9ae6b) - -##2012-03-15 - Dan Bode -* Add rspec-puppet tests for mysql::config (907331a) - -##2012-03-15 - Dan Bode -* Moved class dependency between sever and config to server (da62ad6) - -##2012-03-14 - Dan Bode -* Notify mysql restart from set_mysql_rootpw exec (0832a2c) - -##2012-03-15 - Nan Liu -* Add documentation related to osfamily fact. (8265d28) - -##2012-03-14 - Dan Bode -* Mention osfamily value in failure message (e472d3b) - -##2012-03-14 - Dan Bode -* Fix bug when querying for all database users (015490c) - -##2012-02-09 - Nan Liu -* Major refactor of mysql module. (b1f90fd) - -##2012-01-11 - Justin Ellison -* Ruby and Python's MySQL libraries are named differently on different distros. (1e926b4) - -##2012-01-11 - Justin Ellison -* Per @ghoneycutt, we should fail explicitly and explain why. (09af083) - -##2012-01-11 - Justin Ellison -* Removing duplicate declaration (7513d03) - -##2012-01-10 - Justin Ellison -* Use socket value from params class instead of hardcoding. (663e97c) - -##2012-01-10 - Justin Ellison -* Instead of hardcoding the config file target, pull it from mysql::params (031a47d) - -##2012-01-10 - Justin Ellison -* Moved $socket to within the case to toggle between distros. Added a $config_file variable to allow per-distro config file destinations. (360eacd) - -##2012-01-10 - Justin Ellison -* Pretty sure this is a bug, 99% of Linux distros out there won't ever hit the default. (3462e6b) - -##2012-02-09 - William Van Hevelingen -* Changed the README to use markdown (3b7dfeb) - -##2012-02-04 - Daniel Black -* (#12412) mysqltuner.pl update (b809e6f) - -##2011-11-17 - Matthias Pigulla -* (#11363) Add two missing privileges to grant: event_priv, trigger_priv (d15c9d1) - -##2011-12-20 - Jeff McCune -* (minor) Fixup typos in Modulefile metadata (a0ed6a1) - -##2011-12-19 - Carl Caum -* Only notify Exec to import sql if sql is given (0783c74) - -##2011-12-19 - Carl Caum -* (#11508) Only load sql_scripts on DB creation (e3b9fd9) - -##2011-12-13 - Justin Ellison -* Require not needed due to implicit dependencies (3058feb) - -##2011-12-13 - Justin Ellison -* Bug #11375: puppetlabs-mysql fails on CentOS/RHEL (a557b8d) - -##2011-06-03 - Dan Bode - 0.0.1 -* initial commit diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/Gemfile deleted file mode 100644 index 39687be031..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/Gemfile +++ /dev/null @@ -1,25 +0,0 @@ -source ENV['GEM_SOURCE'] || 'https://rubygems.org' - -group :development, :test do - gem 'mime-types', '<2.0', :require => false - gem 'rake', :require => false - gem 'rspec-puppet', :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'rspec-system', :require => false - gem 'rspec-system-puppet', :require => false - gem 'rspec-system-serverspec', :require => false - gem 'serverspec', :require => false - gem 'puppet-lint', :require => false - gem 'pry', :require => false - gem 'simplecov', :require => false - gem 'beaker', :require => false - gem 'beaker-rspec', :require => false -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end - -# vim:ft=ruby diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/LICENSE deleted file mode 100644 index 297f85cfa8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2013 Puppet Labs - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/Modulefile deleted file mode 100644 index e89be88ecb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/Modulefile +++ /dev/null @@ -1,9 +0,0 @@ -name 'puppetlabs-mysql' -version '2.2.3' -source 'git://github.com/puppetlabs/puppetlabs-mysql.git' -author 'Puppet Labs' -license 'Apache 2.0' -summary 'Mysql module' -description 'Mysql module' -project_page 'http://github.com/puppetlabs/puppetlabs-mysql' -dependency 'puppetlabs/stdlib', '>= 3.2.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/README.md deleted file mode 100644 index 03b6bbd369..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/README.md +++ /dev/null @@ -1,523 +0,0 @@ -#MySQL - -####Table of Contents - -1. [Overview](#overview) -2. [Module Description - What the module does and why it is useful](#module-description) -3. [Setup - The basics of getting started with mysql](#setup) - * [What mysql affects](#what-mysql-affects) - * [Setup requirements](#setup-requirements) - * [Beginning with mysql](#beginning-with-mysql) -4. [Usage - Configuration options and additional functionality](#usage) -5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) -5. [Limitations - OS compatibility, etc.](#limitations) -6. [Development - Guide for contributing to the module](#development) - -##Overview - -The mysql module installs, configures, and manages the MySQL service. - -##Module Description - -The mysql module manages both the installation and configuration of MySQL as -well as extends Puppet to allow management of MySQL resources, such as -databases, users, and grants. - -##Backwards Compatibility - -This module has just undergone a very large rewrite. Some new classes have been added, and many previous classes and configurations work differently than before. We've attempted to handle backwards compatibility automatically by adding a -`attempt_compatibility_mode` parameter to the main mysql class. If you set -this to 'true' it will attempt to map your previous parameters into the new -`mysql::server` class. - -#####WARNING - -Compatibility mode may fail. It may eat your MySQL server. PLEASE test it before running it live, even if the test is just a no-op and manual comparison. Please be careful! - -##Setup - -###What MySQL affects - -* MySQL package -* MySQL configuration files -* MySQL service - -###Beginning with MySQL - -If you just want a server installed with the default options you can run -`include '::mysql::server'`. - -If you need to customize options, such as the root -password or `/etc/my.cnf` settings, then you must also pass in an override hash: - -```puppet -class { '::mysql::server': - root_password => 'strongpassword', - override_options => { 'mysqld' => { 'max_connections' => '1024' } } -} -``` - -##Usage - -All interaction for the server is done via `mysql::server`. To install the -client you use `mysql::client`, and to install bindings you can use -`mysql::bindings`. - -###Overrides - -The hash structure for overrides in `mysql::server` is as follows: - -```puppet -$override_options = { - 'section' => { - 'item' => 'thing', - } -} -``` - -For items that you would traditionally represent as: - -
-[section]
-thing = X
-
- -You can just make an entry like `thing => true`, `thing => value`, or `thing => "` in the hash. You can also pass an array `thing => ['value', 'value2']` or even list each `thing => value` separately on separate lines. MySQL doesn't care if 'thing' is alone or set to a value; it'll happily accept both. To keep an option out of the my.cnf file, e.g. when using override_options to revert to a default value, you can pass thing => undef. -If an option needs multiple instances, you can pass an array. For example - -```puppet -$override_options = { - 'mysqld' => { - 'replicate-do-db' => ['base1', 'base2'], - } -} -``` - -will produce - -
-[mysql]
-replicate-do-db = base1
-replicate-do-db = base2
-
- -###Custom configuration - -To add custom MySQL configuration, drop additional files into -`/etc/mysql/conf.d/`. Dropping files into conf.d allows you to override settings or add additional ones, which is helpful if you choose not to use `override_options` in `mysql::server`. The conf.d location is hardcoded into the my.cnf template file. - -##Reference - -###Classes - -####Public classes -* `mysql::server`: Installs and configures MySQL. -* `mysql::server::account_security`: Deletes default MySQL accounts. -* `mysql::server::monitor`: Sets up a monitoring user. -* `mysql::server::mysqltuner`: Installs MySQL tuner script. -* `mysql::server::backup`: Sets up MySQL backups via cron. -* `mysql::bindings`: Installs various MySQL language bindings. -* `mysql::client`: Installs MySQL client (for non-servers). - -####Private classes -* `mysql::server::install`: Installs packages. -* `mysql::server::config`: Configures MYSQL. -* `mysql::server::service`: Manages service. -* `mysql::server::root_password`: Sets MySQL root password. -* `mysql::server::providers`: Creates users, grants, and databases. -* `mysql::bindings::java`: Installs Java bindings. -* `mysql::bindings::perl`: Installs Perl bindings. -* `mysql::bindings::python`: Installs Python bindings. -* `mysql::bindings::ruby`: Installs Ruby bindings. -* `mysql::client::install`: Installs MySQL client. - -###Parameters - -####mysql::server - -#####`root_password` - -The MySQL root password. Puppet will attempt to set the root password and update `/root/.my.cnf` with it. - -#####`old_root_password` - -The previous root password (**REQUIRED** if you wish to change the root password via Puppet.) - -#####`override_options` - -The hash of override options to pass into MySQL. It can be structured -like a hash in the my.cnf file, so entries look like - -```puppet -$override_options = { - 'section' => { - 'item' => 'thing', - } -} -``` - -For items that you would traditionally represent as: - -
-[section]
-thing = X
-
- -You can just make an entry like `thing => true`, `thing => value`, or `thing => "` in the hash. You can also pass an array `thing => ['value', 'value2']` or even list each `thing => value` separately on separate lines. MySQL doesn't care if 'thing' is alone or set to a value; it'll happily accept both. To keep an option out of the my.cnf file, e.g. when using override_options to revert to a default value, you can pass thing => undef. - -#####`config_file` - -The location of the MySQL configuration file. - -#####`manage_config_file` - -Whether the MySQL configuration file should be managed. - -#####`purge_conf_dir` - -Whether the conf.d directory should be purged. - -#####`restart` - -Whether the service should be restarted when things change. - -#####`root_group` - -What is the group used for root? - -#####`package_ensure` - -What to set the package to. Can be 'present', 'absent', or 'x.y.z'. - -#####`package_name` - -The name of the mysql server package to install. - -#####`remove_default_accounts` - -Boolean to decide if we should automatically include -`mysql::server::account_security`. - -#####`service_enabled` - -Boolean to decide if the service should be enabled. - -#####`service_manage` - -Boolean to decide if the service should be managed. - -#####`service_name` - -The name of the mysql server service. - -#####`service_provider` - -The provider to use to manage the service. - -#####`users` - -Optional hash of users to create, which are passed to [mysql_user](#mysql_user). - -```puppet -$users = { - 'someuser@localhost' => { - ensure => 'present', - max_connections_per_hour => '0', - max_queries_per_hour => '0', - max_updates_per_hour => '0', - max_user_connections => '0', - password_hash => '*F3A2A51A9B0F2BE2468926B4132313728C250DBF', - }, -} -``` - -#####`grants` - -Optional hash of grants, which are passed to [mysql_grant](#mysql_grant). - -```puppet -$grants = { - 'someuser@localhost/somedb.*' => { - ensure => 'present', - options => ['GRANT'], - privileges => ['SELECT', 'INSERT', 'UPDATE', 'DELETE'], - table => 'somedb.*', - user => 'someuser@localhost', - }, -} -``` - -#####`databases` - -Optional hash of databases to create, which are passed to [mysql_database](#mysql_database). - -```puppet -$databases = { - 'somedb' => { - ensure => 'present', - charset => 'utf8', - }, -} -``` - -####mysql::server::backup - -#####`backupuser` - -MySQL user to create for backups. - -#####`backuppassword` - -MySQL user password for backups. - -#####`backupdir` - -Directory to back up into. - -#####`backupdirmode` - -Permissions applied to the backup directory. This parameter is passed directly -to the `file` resource. - -#####`backupdirowner` - -Owner for the backup directory. This parameter is passed directly to the `file` -resource. - -#####`backupdirgroup` - -Group owner for the backup directory. This parameter is passed directly to the -`file` resource. - -#####`backupcompress` - -Boolean to determine if backups should be compressed. - -#####`backuprotate` - -How many days to keep backups for. - -#####`delete_before_dump` - -Boolean to determine if you should cleanup before backing up or after. - -#####`backupdatabases` - -Array of databases to specifically back up. - -#####`file_per_database` - -Whether a separate file be used per database. - -#####`ensure` - -Allows you to remove the backup scripts. Can be 'present' or 'absent'. - -#####`time` - -An array of two elements to set the backup time. Allows ['23', '5'] or ['3', '45'] for HH:MM times. - -#####`postscript` - -A script that is executed at when the backup is finished. This could be used to (r)sync the backup to a central store. This script can be either a single line that is directly executed or a number of lines, when supplied as an array. It could also be one or more externally managed (executable) files. - -####mysql::server::monitor - -#####`mysql_monitor_username` - -The username to create for MySQL monitoring. - -#####`mysql_monitor_password` - -The password to create for MySQL monitoring. - -#####`mysql_monitor_hostname` - -The hostname to allow to access the MySQL monitoring user. - -####mysql::bindings - -#####`java_enable` - -Boolean to decide if the Java bindings should be installed. - -#####`perl_enable` - -Boolean to decide if the Perl bindings should be installed. - -#####`php_enable` - -Boolean to decide if the PHP bindings should be installed. - -#####`python_enable` - -Boolean to decide if the Python bindings should be installed. - -#####`ruby_enable` - -Boolean to decide if the Ruby bindings should be installed. - -#####`java_package_ensure` - -What to set the package to. Can be 'present', 'absent', or 'x.y.z'. - -#####`java_package_name` - -The name of the package to install. - -#####`java_package_provider` - -What provider should be used to install the package. - -#####`perl_package_ensure` - -What to set the package to. Can be 'present', 'absent', or 'x.y.z'. - -#####`perl_package_name` - -The name of the package to install. - -#####`perl_package_provider` - -What provider should be used to install the package. - -#####`python_package_ensure` - -What to set the package to. Can be 'present', 'absent', or 'x.y.z'. - -#####`python_package_name` - -The name of the package to install. - -#####`python_package_provider` - -What provider should be used to install the package. - -#####`ruby_package_ensure` - -What to set the package to. Can be 'present', 'absent', or 'x.y.z'. - -#####`ruby_package_name` - -The name of the package to install. - -#####`ruby_package_provider` - -What provider should be used to install the package. - -####mysql::client - -#####`bindings_enable` - -Boolean to automatically install all bindings. - -#####`package_ensure` - -What to set the package to. Can be 'present', 'absent', or 'x.y.z'. - -#####`package_name` - -What is the name of the mysql client package to install. - -###Defines - -####mysql::db - -Creates a database with a user and assigns some privileges. - -```puppet - mysql::db { 'mydb': - user => 'myuser', - password => 'mypass', - host => 'localhost', - grant => ['SELECT', 'UPDATE'], - } -``` - -###Providers - -####mysql_database - -`mysql_database` can be used to create and manage databases within MySQL. - -```puppet -mysql_database { 'information_schema': - ensure => 'present', - charset => 'utf8', - collate => 'utf8_swedish_ci', -} -mysql_database { 'mysql': - ensure => 'present', - charset => 'latin1', - collate => 'latin1_swedish_ci', -} -``` - -####mysql_user - -`mysql_user` can be used to create and manage user grants within MySQL. - -```puppet -mysql_user { 'root@127.0.0.1': - ensure => 'present', - max_connections_per_hour => '0', - max_queries_per_hour => '0', - max_updates_per_hour => '0', - max_user_connections => '0', -} -``` - -####mysql_grant - -`mysql_grant` can be used to create grant permissions to access databases within -MySQL. To use it you must create the title of the resource as shown below, -following the pattern of `username@hostname/database.table`: - -```puppet -mysql_grant { 'root@localhost/*.*': - ensure => 'present', - options => ['GRANT'], - privileges => ['ALL'], - table => '*.*', - user => 'root@localhost', -} -``` - -##Limitations - -This module has been tested on: - -* RedHat Enterprise Linux 5/6 -* Debian 6/7 -* CentOS 5/6 -* Ubuntu 12.04 - -Testing on other platforms has been light and cannot be guaranteed. - -#Development - -Puppet Labs modules on the Puppet Forge are open projects, and community -contributions are essential for keeping them great. We can’t access the -huge number of platforms and myriad of hardware, software, and deployment -configurations that Puppet is intended to serve. - -We want to keep it as easy as possible to contribute changes so that our -modules work in your environment. There are a few guidelines that we need -contributors to follow so that we can have a chance of keeping on top of things. - -You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) - -### Authors - -This module is based on work by David Schmitt. The following contributors have contributed patches to this module (beyond Puppet Labs): - -* Larry Ludwig -* Christian G. Warden -* Daniel Black -* Justin Ellison -* Lowe Schmidt -* Matthias Pigulla -* William Van Hevelingen -* Michael Arnold -* Chris Weyl - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/Rakefile deleted file mode 100644 index bb60173e57..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/Rakefile +++ /dev/null @@ -1,2 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'rspec-system/rake_task' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/TODO b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/TODO deleted file mode 100644 index 3913293930..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/TODO +++ /dev/null @@ -1,8 +0,0 @@ -The best that I can tell is that this code traces back to David Schmitt. It has been forked many times since then :) - -1. you cannot add databases to an instance that has a root password -2. you have to specify username as USER@BLAH or it cannot be found -3. mysql_grant does not complain if user does not exist -4. Needs support for pre-seeding on debian -5. the types may need to take user/password -6. rather or not to configure /etc/.my.cnf should be configurable diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/files/mysqltuner.pl b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/files/mysqltuner.pl deleted file mode 100644 index 46cdb7f42f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/files/mysqltuner.pl +++ /dev/null @@ -1,966 +0,0 @@ -#!/usr/bin/perl -w -# mysqltuner.pl - Version 1.2.0 -# High Performance MySQL Tuning Script -# Copyright (C) 2006-2011 Major Hayden - major@mhtx.net -# -# For the latest updates, please visit http://mysqltuner.com/ -# Git repository available at http://github.com/rackerhacker/MySQLTuner-perl -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# This project would not be possible without help from: -# Matthew Montgomery Paul Kehrer Dave Burgess -# Jonathan Hinds Mike Jackson Nils Breunese -# Shawn Ashlee Luuk Vosslamber Ville Skytta -# Trent Hornibrook Jason Gill Mark Imbriaco -# Greg Eden Aubin Galinotti Giovanni Bechis -# Bill Bradford Ryan Novosielski Michael Scheidell -# Blair Christensen Hans du Plooy Victor Trac -# Everett Barnes Tom Krouper Gary Barrueto -# Simon Greenaway Adam Stein Isart Montane -# Baptiste M. -# -# Inspired by Matthew Montgomery's tuning-primer.sh script: -# http://forge.mysql.com/projects/view.php?id=44 -# -use strict; -use warnings; -use diagnostics; -use File::Spec; -use Getopt::Long; - -# Set up a few variables for use in the script -my $tunerversion = "1.2.0"; -my (@adjvars, @generalrec); - -# Set defaults -my %opt = ( - "nobad" => 0, - "nogood" => 0, - "noinfo" => 0, - "nocolor" => 0, - "forcemem" => 0, - "forceswap" => 0, - "host" => 0, - "socket" => 0, - "port" => 0, - "user" => 0, - "pass" => 0, - "skipsize" => 0, - "checkversion" => 0, - ); - -# Gather the options from the command line -GetOptions(\%opt, - 'nobad', - 'nogood', - 'noinfo', - 'nocolor', - 'forcemem=i', - 'forceswap=i', - 'host=s', - 'socket=s', - 'port=i', - 'user=s', - 'pass=s', - 'skipsize', - 'checkversion', - 'help', - ); - -if (defined $opt{'help'} && $opt{'help'} == 1) { usage(); } - -sub usage { - # Shown with --help option passed - print "\n". - " MySQLTuner $tunerversion - MySQL High Performance Tuning Script\n". - " Bug reports, feature requests, and downloads at http://mysqltuner.com/\n". - " Maintained by Major Hayden (major\@mhtx.net) - Licensed under GPL\n". - "\n". - " Important Usage Guidelines:\n". - " To run the script with the default options, run the script without arguments\n". - " Allow MySQL server to run for at least 24-48 hours before trusting suggestions\n". - " Some routines may require root level privileges (script will provide warnings)\n". - " You must provide the remote server's total memory when connecting to other servers\n". - "\n". - " Connection and Authentication\n". - " --host Connect to a remote host to perform tests (default: localhost)\n". - " --socket Use a different socket for a local connection\n". - " --port Port to use for connection (default: 3306)\n". - " --user Username to use for authentication\n". - " --pass Password to use for authentication\n". - "\n". - " Performance and Reporting Options\n". - " --skipsize Don't enumerate tables and their types/sizes (default: on)\n". - " (Recommended for servers with many tables)\n". - " --checkversion Check for updates to MySQLTuner (default: don't check)\n". - " --forcemem Amount of RAM installed in megabytes\n". - " --forceswap Amount of swap memory configured in megabytes\n". - "\n". - " Output Options:\n". - " --nogood Remove OK responses\n". - " --nobad Remove negative/suggestion responses\n". - " --noinfo Remove informational responses\n". - " --nocolor Don't print output in color\n". - "\n"; - exit; -} - -my $devnull = File::Spec->devnull(); - -# Setting up the colors for the print styles -my $good = ($opt{nocolor} == 0)? "[\e[0;32mOK\e[0m]" : "[OK]" ; -my $bad = ($opt{nocolor} == 0)? "[\e[0;31m!!\e[0m]" : "[!!]" ; -my $info = ($opt{nocolor} == 0)? "[\e[0;34m--\e[0m]" : "[--]" ; - -# Functions that handle the print styles -sub goodprint { print $good." ".$_[0] unless ($opt{nogood} == 1); } -sub infoprint { print $info." ".$_[0] unless ($opt{noinfo} == 1); } -sub badprint { print $bad." ".$_[0] unless ($opt{nobad} == 1); } -sub redwrap { return ($opt{nocolor} == 0)? "\e[0;31m".$_[0]."\e[0m" : $_[0] ; } -sub greenwrap { return ($opt{nocolor} == 0)? "\e[0;32m".$_[0]."\e[0m" : $_[0] ; } - -# Calculates the parameter passed in bytes, and then rounds it to one decimal place -sub hr_bytes { - my $num = shift; - if ($num >= (1024**3)) { #GB - return sprintf("%.1f",($num/(1024**3)))."G"; - } elsif ($num >= (1024**2)) { #MB - return sprintf("%.1f",($num/(1024**2)))."M"; - } elsif ($num >= 1024) { #KB - return sprintf("%.1f",($num/1024))."K"; - } else { - return $num."B"; - } -} - -# Calculates the parameter passed in bytes, and then rounds it to the nearest integer -sub hr_bytes_rnd { - my $num = shift; - if ($num >= (1024**3)) { #GB - return int(($num/(1024**3)))."G"; - } elsif ($num >= (1024**2)) { #MB - return int(($num/(1024**2)))."M"; - } elsif ($num >= 1024) { #KB - return int(($num/1024))."K"; - } else { - return $num."B"; - } -} - -# Calculates the parameter passed to the nearest power of 1000, then rounds it to the nearest integer -sub hr_num { - my $num = shift; - if ($num >= (1000**3)) { # Billions - return int(($num/(1000**3)))."B"; - } elsif ($num >= (1000**2)) { # Millions - return int(($num/(1000**2)))."M"; - } elsif ($num >= 1000) { # Thousands - return int(($num/1000))."K"; - } else { - return $num; - } -} - -# Calculates uptime to display in a more attractive form -sub pretty_uptime { - my $uptime = shift; - my $seconds = $uptime % 60; - my $minutes = int(($uptime % 3600) / 60); - my $hours = int(($uptime % 86400) / (3600)); - my $days = int($uptime / (86400)); - my $uptimestring; - if ($days > 0) { - $uptimestring = "${days}d ${hours}h ${minutes}m ${seconds}s"; - } elsif ($hours > 0) { - $uptimestring = "${hours}h ${minutes}m ${seconds}s"; - } elsif ($minutes > 0) { - $uptimestring = "${minutes}m ${seconds}s"; - } else { - $uptimestring = "${seconds}s"; - } - return $uptimestring; -} - -# Retrieves the memory installed on this machine -my ($physical_memory,$swap_memory,$duflags); -sub os_setup { - sub memerror { - badprint "Unable to determine total memory/swap; use '--forcemem' and '--forceswap'\n"; - exit; - } - my $os = `uname`; - $duflags = ($os =~ /Linux/) ? '-b' : ''; - if ($opt{'forcemem'} > 0) { - $physical_memory = $opt{'forcemem'} * 1048576; - infoprint "Assuming $opt{'forcemem'} MB of physical memory\n"; - if ($opt{'forceswap'} > 0) { - $swap_memory = $opt{'forceswap'} * 1048576; - infoprint "Assuming $opt{'forceswap'} MB of swap space\n"; - } else { - $swap_memory = 0; - badprint "Assuming 0 MB of swap space (use --forceswap to specify)\n"; - } - } else { - if ($os =~ /Linux/) { - $physical_memory = `free -b | grep Mem | awk '{print \$2}'` or memerror; - $swap_memory = `free -b | grep Swap | awk '{print \$2}'` or memerror; - } elsif ($os =~ /Darwin/) { - $physical_memory = `sysctl -n hw.memsize` or memerror; - $swap_memory = `sysctl -n vm.swapusage | awk '{print \$3}' | sed 's/\..*\$//'` or memerror; - } elsif ($os =~ /NetBSD|OpenBSD/) { - $physical_memory = `sysctl -n hw.physmem` or memerror; - if ($physical_memory < 0) { - $physical_memory = `sysctl -n hw.physmem64` or memerror; - } - $swap_memory = `swapctl -l | grep '^/' | awk '{ s+= \$2 } END { print s }'` or memerror; - } elsif ($os =~ /BSD/) { - $physical_memory = `sysctl -n hw.realmem`; - $swap_memory = `swapinfo | grep '^/' | awk '{ s+= \$2 } END { print s }'`; - } elsif ($os =~ /SunOS/) { - $physical_memory = `/usr/sbin/prtconf | grep Memory | cut -f 3 -d ' '` or memerror; - chomp($physical_memory); - $physical_memory = $physical_memory*1024*1024; - } elsif ($os =~ /AIX/) { - $physical_memory = `lsattr -El sys0 | grep realmem | awk '{print \$2}'` or memerror; - chomp($physical_memory); - $physical_memory = $physical_memory*1024; - $swap_memory = `lsps -as | awk -F"(MB| +)" '/MB /{print \$2}'` or memerror; - chomp($swap_memory); - $swap_memory = $swap_memory*1024*1024; - } - } - chomp($physical_memory); -} - -# Checks to see if a MySQL login is possible -my ($mysqllogin,$doremote,$remotestring); -sub mysql_setup { - $doremote = 0; - $remotestring = ''; - my $command = `which mysqladmin`; - chomp($command); - if (! -e $command) { - badprint "Unable to find mysqladmin in your \$PATH. Is MySQL installed?\n"; - exit; - } - # Are we being asked to connect via a socket? - if ($opt{socket} ne 0) { - $remotestring = " -S $opt{socket}"; - } - # Are we being asked to connect to a remote server? - if ($opt{host} ne 0) { - chomp($opt{host}); - $opt{port} = ($opt{port} eq 0)? 3306 : $opt{port} ; - # If we're doing a remote connection, but forcemem wasn't specified, we need to exit - if ($opt{'forcemem'} eq 0) { - badprint "The --forcemem option is required for remote connections\n"; - exit; - } - infoprint "Performing tests on $opt{host}:$opt{port}\n"; - $remotestring = " -h $opt{host} -P $opt{port}"; - $doremote = 1; - } - # Did we already get a username and password passed on the command line? - if ($opt{user} ne 0 and $opt{pass} ne 0) { - $mysqllogin = "-u $opt{user} -p'$opt{pass}'".$remotestring; - my $loginstatus = `mysqladmin ping $mysqllogin 2>&1`; - if ($loginstatus =~ /mysqld is alive/) { - goodprint "Logged in using credentials passed on the command line\n"; - return 1; - } else { - badprint "Attempted to use login credentials, but they were invalid\n"; - exit 0; - } - } - if ( -r "/etc/psa/.psa.shadow" and $doremote == 0 ) { - # It's a Plesk box, use the available credentials - $mysqllogin = "-u admin -p`cat /etc/psa/.psa.shadow`"; - my $loginstatus = `mysqladmin ping $mysqllogin 2>&1`; - unless ($loginstatus =~ /mysqld is alive/) { - badprint "Attempted to use login credentials from Plesk, but they failed.\n"; - exit 0; - } - } elsif ( -r "/etc/mysql/debian.cnf" and $doremote == 0 ){ - # We have a debian maintenance account, use it - $mysqllogin = "--defaults-extra-file=/etc/mysql/debian.cnf"; - my $loginstatus = `mysqladmin $mysqllogin ping 2>&1`; - if ($loginstatus =~ /mysqld is alive/) { - goodprint "Logged in using credentials from debian maintenance account.\n"; - return 1; - } else { - badprint "Attempted to use login credentials from debian maintenance account, but they failed.\n"; - exit 0; - } - } else { - # It's not Plesk or debian, we should try a login - my $loginstatus = `mysqladmin $remotestring ping 2>&1`; - if ($loginstatus =~ /mysqld is alive/) { - # Login went just fine - $mysqllogin = " $remotestring "; - # Did this go well because of a .my.cnf file or is there no password set? - my $userpath = `printenv HOME`; - if (length($userpath) > 0) { - chomp($userpath); - } - unless ( -e "${userpath}/.my.cnf" ) { - badprint "Successfully authenticated with no password - SECURITY RISK!\n"; - } - return 1; - } else { - print STDERR "Please enter your MySQL administrative login: "; - my $name = <>; - print STDERR "Please enter your MySQL administrative password: "; - system("stty -echo >$devnull 2>&1"); - my $password = <>; - system("stty echo >$devnull 2>&1"); - chomp($password); - chomp($name); - $mysqllogin = "-u $name"; - if (length($password) > 0) { - $mysqllogin .= " -p'$password'"; - } - $mysqllogin .= $remotestring; - my $loginstatus = `mysqladmin ping $mysqllogin 2>&1`; - if ($loginstatus =~ /mysqld is alive/) { - print STDERR "\n"; - if (! length($password)) { - # Did this go well because of a .my.cnf file or is there no password set? - my $userpath = `ls -d ~`; - chomp($userpath); - unless ( -e "$userpath/.my.cnf" ) { - badprint "Successfully authenticated with no password - SECURITY RISK!\n"; - } - } - return 1; - } else { - print "\n".$bad." Attempted to use login credentials, but they were invalid.\n"; - exit 0; - } - exit 0; - } - } -} - -# Populates all of the variable and status hashes -my (%mystat,%myvar,$dummyselect); -sub get_all_vars { - # We need to initiate at least one query so that our data is useable - $dummyselect = `mysql $mysqllogin -Bse "SELECT VERSION();"`; - my @mysqlvarlist = `mysql $mysqllogin -Bse "SHOW /*!50000 GLOBAL */ VARIABLES;"`; - foreach my $line (@mysqlvarlist) { - $line =~ /([a-zA-Z_]*)\s*(.*)/; - $myvar{$1} = $2; - } - my @mysqlstatlist = `mysql $mysqllogin -Bse "SHOW /*!50000 GLOBAL */ STATUS;"`; - foreach my $line (@mysqlstatlist) { - $line =~ /([a-zA-Z_]*)\s*(.*)/; - $mystat{$1} = $2; - } - # Workaround for MySQL bug #59393 wrt. ignore-builtin-innodb - if (($myvar{'ignore_builtin_innodb'} || "") eq "ON") { - $myvar{'have_innodb'} = "NO"; - } - # have_* for engines is deprecated and will be removed in MySQL 5.6; - # check SHOW ENGINES and set corresponding old style variables. - # Also works around MySQL bug #59393 wrt. skip-innodb - my @mysqlenginelist = `mysql $mysqllogin -Bse "SHOW ENGINES;" 2>$devnull`; - foreach my $line (@mysqlenginelist) { - if ($line =~ /^([a-zA-Z_]+)\s+(\S+)/) { - my $engine = lc($1); - if ($engine eq "federated" || $engine eq "blackhole") { - $engine .= "_engine"; - } elsif ($engine eq "berkeleydb") { - $engine = "bdb"; - } - my $val = ($2 eq "DEFAULT") ? "YES" : $2; - $myvar{"have_$engine"} = $val; - } - } -} - -sub security_recommendations { - print "\n-------- Security Recommendations -------------------------------------------\n"; - my @mysqlstatlist = `mysql $mysqllogin -Bse "SELECT CONCAT(user, '\@', host) FROM mysql.user WHERE password = '' OR password IS NULL;"`; - if (@mysqlstatlist) { - foreach my $line (sort @mysqlstatlist) { - chomp($line); - badprint "User '".$line."' has no password set.\n"; - } - } else { - goodprint "All database users have passwords assigned\n"; - } -} - -sub get_replication_status { - my $slave_status = `mysql $mysqllogin -Bse "show slave status\\G"`; - my ($io_running) = ($slave_status =~ /slave_io_running\S*\s+(\S+)/i); - my ($sql_running) = ($slave_status =~ /slave_sql_running\S*\s+(\S+)/i); - if ($io_running eq 'Yes' && $sql_running eq 'Yes') { - if ($myvar{'read_only'} eq 'OFF') { - badprint "This replication slave is running with the read_only option disabled."; - } else { - goodprint "This replication slave is running with the read_only option enabled."; - } - } -} - -# Checks for updates to MySQLTuner -sub validate_tuner_version { - print "\n-------- General Statistics --------------------------------------------------\n"; - if ($opt{checkversion} eq 0) { - infoprint "Skipped version check for MySQLTuner script\n"; - return; - } - my $update; - my $url = "http://mysqltuner.com/versioncheck.php?v=$tunerversion"; - if (-e "/usr/bin/curl") { - $update = `/usr/bin/curl --connect-timeout 5 '$url' 2>$devnull`; - chomp($update); - } elsif (-e "/usr/bin/wget") { - $update = `/usr/bin/wget -e timestamping=off -T 5 -O - '$url' 2>$devnull`; - chomp($update); - } - if ($update eq 1) { - badprint "There is a new version of MySQLTuner available\n"; - } elsif ($update eq 0) { - goodprint "You have the latest version of MySQLTuner\n"; - } else { - infoprint "Unable to check for the latest MySQLTuner version\n"; - } -} - -# Checks for supported or EOL'ed MySQL versions -my ($mysqlvermajor,$mysqlverminor); -sub validate_mysql_version { - ($mysqlvermajor,$mysqlverminor) = $myvar{'version'} =~ /(\d)\.(\d)/; - if (!mysql_version_ge(5)) { - badprint "Your MySQL version ".$myvar{'version'}." is EOL software! Upgrade soon!\n"; - } elsif (mysql_version_ge(6)) { - badprint "Currently running unsupported MySQL version ".$myvar{'version'}."\n"; - } else { - goodprint "Currently running supported MySQL version ".$myvar{'version'}."\n"; - } -} - -# Checks if MySQL version is greater than equal to (major, minor) -sub mysql_version_ge { - my ($maj, $min) = @_; - return $mysqlvermajor > $maj || ($mysqlvermajor == $maj && $mysqlverminor >= ($min || 0)); -} - -# Checks for 32-bit boxes with more than 2GB of RAM -my ($arch); -sub check_architecture { - if ($doremote eq 1) { return; } - if (`uname` =~ /SunOS/ && `isainfo -b` =~ /64/) { - $arch = 64; - goodprint "Operating on 64-bit architecture\n"; - } elsif (`uname` !~ /SunOS/ && `uname -m` =~ /64/) { - $arch = 64; - goodprint "Operating on 64-bit architecture\n"; - } elsif (`uname` =~ /AIX/ && `bootinfo -K` =~ /64/) { - $arch = 64; - goodprint "Operating on 64-bit architecture\n"; - } else { - $arch = 32; - if ($physical_memory > 2147483648) { - badprint "Switch to 64-bit OS - MySQL cannot currently use all of your RAM\n"; - } else { - goodprint "Operating on 32-bit architecture with less than 2GB RAM\n"; - } - } -} - -# Start up a ton of storage engine counts/statistics -my (%enginestats,%enginecount,$fragtables); -sub check_storage_engines { - if ($opt{skipsize} eq 1) { - print "\n-------- Storage Engine Statistics -------------------------------------------\n"; - infoprint "Skipped due to --skipsize option\n"; - return; - } - print "\n-------- Storage Engine Statistics -------------------------------------------\n"; - infoprint "Status: "; - my $engines; - $engines .= (defined $myvar{'have_archive'} && $myvar{'have_archive'} eq "YES")? greenwrap "+Archive " : redwrap "-Archive " ; - $engines .= (defined $myvar{'have_bdb'} && $myvar{'have_bdb'} eq "YES")? greenwrap "+BDB " : redwrap "-BDB " ; - $engines .= (defined $myvar{'have_federated_engine'} && $myvar{'have_federated_engine'} eq "YES")? greenwrap "+Federated " : redwrap "-Federated " ; - $engines .= (defined $myvar{'have_innodb'} && $myvar{'have_innodb'} eq "YES")? greenwrap "+InnoDB " : redwrap "-InnoDB " ; - $engines .= (defined $myvar{'have_isam'} && $myvar{'have_isam'} eq "YES")? greenwrap "+ISAM " : redwrap "-ISAM " ; - $engines .= (defined $myvar{'have_ndbcluster'} && $myvar{'have_ndbcluster'} eq "YES")? greenwrap "+NDBCluster " : redwrap "-NDBCluster " ; - print "$engines\n"; - if (mysql_version_ge(5)) { - # MySQL 5 servers can have table sizes calculated quickly from information schema - my @templist = `mysql $mysqllogin -Bse "SELECT ENGINE,SUM(DATA_LENGTH),COUNT(ENGINE) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema','mysql') AND ENGINE IS NOT NULL GROUP BY ENGINE ORDER BY ENGINE ASC;"`; - foreach my $line (@templist) { - my ($engine,$size,$count); - ($engine,$size,$count) = $line =~ /([a-zA-Z_]*)\s+(\d+)\s+(\d+)/; - if (!defined($size)) { next; } - $enginestats{$engine} = $size; - $enginecount{$engine} = $count; - } - $fragtables = `mysql $mysqllogin -Bse "SELECT COUNT(TABLE_NAME) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema','mysql') AND Data_free > 0 AND NOT ENGINE='MEMORY';"`; - chomp($fragtables); - } else { - # MySQL < 5 servers take a lot of work to get table sizes - my @tblist; - # Now we build a database list, and loop through it to get storage engine stats for tables - my @dblist = `mysql $mysqllogin -Bse "SHOW DATABASES"`; - foreach my $db (@dblist) { - chomp($db); - if ($db eq "information_schema") { next; } - my @ixs = (1, 6, 9); - if (!mysql_version_ge(4, 1)) { - # MySQL 3.23/4.0 keeps Data_Length in the 5th (0-based) column - @ixs = (1, 5, 8); - } - push(@tblist, map { [ (split)[@ixs] ] } `mysql $mysqllogin -Bse "SHOW TABLE STATUS FROM \\\`$db\\\`"`); - } - # Parse through the table list to generate storage engine counts/statistics - $fragtables = 0; - foreach my $tbl (@tblist) { - my ($engine, $size, $datafree) = @$tbl; - if (defined $enginestats{$engine}) { - $enginestats{$engine} += $size; - $enginecount{$engine} += 1; - } else { - $enginestats{$engine} = $size; - $enginecount{$engine} = 1; - } - if ($datafree > 0) { - $fragtables++; - } - } - } - while (my ($engine,$size) = each(%enginestats)) { - infoprint "Data in $engine tables: ".hr_bytes_rnd($size)." (Tables: ".$enginecount{$engine}.")"."\n"; - } - # If the storage engine isn't being used, recommend it to be disabled - if (!defined $enginestats{'InnoDB'} && defined $myvar{'have_innodb'} && $myvar{'have_innodb'} eq "YES") { - badprint "InnoDB is enabled but isn't being used\n"; - push(@generalrec,"Add skip-innodb to MySQL configuration to disable InnoDB"); - } - if (!defined $enginestats{'BerkeleyDB'} && defined $myvar{'have_bdb'} && $myvar{'have_bdb'} eq "YES") { - badprint "BDB is enabled but isn't being used\n"; - push(@generalrec,"Add skip-bdb to MySQL configuration to disable BDB"); - } - if (!defined $enginestats{'ISAM'} && defined $myvar{'have_isam'} && $myvar{'have_isam'} eq "YES") { - badprint "ISAM is enabled but isn't being used\n"; - push(@generalrec,"Add skip-isam to MySQL configuration to disable ISAM (MySQL > 4.1.0)"); - } - # Fragmented tables - if ($fragtables > 0) { - badprint "Total fragmented tables: $fragtables\n"; - push(@generalrec,"Run OPTIMIZE TABLE to defragment tables for better performance"); - } else { - goodprint "Total fragmented tables: $fragtables\n"; - } -} - -my %mycalc; -sub calculations { - if ($mystat{'Questions'} < 1) { - badprint "Your server has not answered any queries - cannot continue..."; - exit 0; - } - # Per-thread memory - if (mysql_version_ge(4)) { - $mycalc{'per_thread_buffers'} = $myvar{'read_buffer_size'} + $myvar{'read_rnd_buffer_size'} + $myvar{'sort_buffer_size'} + $myvar{'thread_stack'} + $myvar{'join_buffer_size'}; - } else { - $mycalc{'per_thread_buffers'} = $myvar{'record_buffer'} + $myvar{'record_rnd_buffer'} + $myvar{'sort_buffer'} + $myvar{'thread_stack'} + $myvar{'join_buffer_size'}; - } - $mycalc{'total_per_thread_buffers'} = $mycalc{'per_thread_buffers'} * $myvar{'max_connections'}; - $mycalc{'max_total_per_thread_buffers'} = $mycalc{'per_thread_buffers'} * $mystat{'Max_used_connections'}; - - # Server-wide memory - $mycalc{'max_tmp_table_size'} = ($myvar{'tmp_table_size'} > $myvar{'max_heap_table_size'}) ? $myvar{'max_heap_table_size'} : $myvar{'tmp_table_size'} ; - $mycalc{'server_buffers'} = $myvar{'key_buffer_size'} + $mycalc{'max_tmp_table_size'}; - $mycalc{'server_buffers'} += (defined $myvar{'innodb_buffer_pool_size'}) ? $myvar{'innodb_buffer_pool_size'} : 0 ; - $mycalc{'server_buffers'} += (defined $myvar{'innodb_additional_mem_pool_size'}) ? $myvar{'innodb_additional_mem_pool_size'} : 0 ; - $mycalc{'server_buffers'} += (defined $myvar{'innodb_log_buffer_size'}) ? $myvar{'innodb_log_buffer_size'} : 0 ; - $mycalc{'server_buffers'} += (defined $myvar{'query_cache_size'}) ? $myvar{'query_cache_size'} : 0 ; - - # Global memory - $mycalc{'max_used_memory'} = $mycalc{'server_buffers'} + $mycalc{"max_total_per_thread_buffers"}; - $mycalc{'total_possible_used_memory'} = $mycalc{'server_buffers'} + $mycalc{'total_per_thread_buffers'}; - $mycalc{'pct_physical_memory'} = int(($mycalc{'total_possible_used_memory'} * 100) / $physical_memory); - - # Slow queries - $mycalc{'pct_slow_queries'} = int(($mystat{'Slow_queries'}/$mystat{'Questions'}) * 100); - - # Connections - $mycalc{'pct_connections_used'} = int(($mystat{'Max_used_connections'}/$myvar{'max_connections'}) * 100); - $mycalc{'pct_connections_used'} = ($mycalc{'pct_connections_used'} > 100) ? 100 : $mycalc{'pct_connections_used'} ; - - # Key buffers - if (mysql_version_ge(4, 1)) { - $mycalc{'pct_key_buffer_used'} = sprintf("%.1f",(1 - (($mystat{'Key_blocks_unused'} * $myvar{'key_cache_block_size'}) / $myvar{'key_buffer_size'})) * 100); - } - if ($mystat{'Key_read_requests'} > 0) { - $mycalc{'pct_keys_from_mem'} = sprintf("%.1f",(100 - (($mystat{'Key_reads'} / $mystat{'Key_read_requests'}) * 100))); - } else { - $mycalc{'pct_keys_from_mem'} = 0; - } - if ($doremote eq 0 and !mysql_version_ge(5)) { - my $size = 0; - $size += (split)[0] for `find $myvar{'datadir'} -name "*.MYI" 2>&1 | xargs du -L $duflags 2>&1`; - $mycalc{'total_myisam_indexes'} = $size; - } elsif (mysql_version_ge(5)) { - $mycalc{'total_myisam_indexes'} = `mysql $mysqllogin -Bse "SELECT IFNULL(SUM(INDEX_LENGTH),0) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema') AND ENGINE = 'MyISAM';"`; - } - if (defined $mycalc{'total_myisam_indexes'} and $mycalc{'total_myisam_indexes'} == 0) { - $mycalc{'total_myisam_indexes'} = "fail"; - } elsif (defined $mycalc{'total_myisam_indexes'}) { - chomp($mycalc{'total_myisam_indexes'}); - } - - # Query cache - if (mysql_version_ge(4)) { - $mycalc{'query_cache_efficiency'} = sprintf("%.1f",($mystat{'Qcache_hits'} / ($mystat{'Com_select'} + $mystat{'Qcache_hits'})) * 100); - if ($myvar{'query_cache_size'}) { - $mycalc{'pct_query_cache_used'} = sprintf("%.1f",100 - ($mystat{'Qcache_free_memory'} / $myvar{'query_cache_size'}) * 100); - } - if ($mystat{'Qcache_lowmem_prunes'} == 0) { - $mycalc{'query_cache_prunes_per_day'} = 0; - } else { - $mycalc{'query_cache_prunes_per_day'} = int($mystat{'Qcache_lowmem_prunes'} / ($mystat{'Uptime'}/86400)); - } - } - - # Sorting - $mycalc{'total_sorts'} = $mystat{'Sort_scan'} + $mystat{'Sort_range'}; - if ($mycalc{'total_sorts'} > 0) { - $mycalc{'pct_temp_sort_table'} = int(($mystat{'Sort_merge_passes'} / $mycalc{'total_sorts'}) * 100); - } - - # Joins - $mycalc{'joins_without_indexes'} = $mystat{'Select_range_check'} + $mystat{'Select_full_join'}; - $mycalc{'joins_without_indexes_per_day'} = int($mycalc{'joins_without_indexes'} / ($mystat{'Uptime'}/86400)); - - # Temporary tables - if ($mystat{'Created_tmp_tables'} > 0) { - if ($mystat{'Created_tmp_disk_tables'} > 0) { - $mycalc{'pct_temp_disk'} = int(($mystat{'Created_tmp_disk_tables'} / ($mystat{'Created_tmp_tables'} + $mystat{'Created_tmp_disk_tables'})) * 100); - } else { - $mycalc{'pct_temp_disk'} = 0; - } - } - - # Table cache - if ($mystat{'Opened_tables'} > 0) { - $mycalc{'table_cache_hit_rate'} = int($mystat{'Open_tables'}*100/$mystat{'Opened_tables'}); - } else { - $mycalc{'table_cache_hit_rate'} = 100; - } - - # Open files - if ($myvar{'open_files_limit'} > 0) { - $mycalc{'pct_files_open'} = int($mystat{'Open_files'}*100/$myvar{'open_files_limit'}); - } - - # Table locks - if ($mystat{'Table_locks_immediate'} > 0) { - if ($mystat{'Table_locks_waited'} == 0) { - $mycalc{'pct_table_locks_immediate'} = 100; - } else { - $mycalc{'pct_table_locks_immediate'} = int($mystat{'Table_locks_immediate'}*100/($mystat{'Table_locks_waited'} + $mystat{'Table_locks_immediate'})); - } - } - - # Thread cache - $mycalc{'thread_cache_hit_rate'} = int(100 - (($mystat{'Threads_created'} / $mystat{'Connections'}) * 100)); - - # Other - if ($mystat{'Connections'} > 0) { - $mycalc{'pct_aborted_connections'} = int(($mystat{'Aborted_connects'}/$mystat{'Connections'}) * 100); - } - if ($mystat{'Questions'} > 0) { - $mycalc{'total_reads'} = $mystat{'Com_select'}; - $mycalc{'total_writes'} = $mystat{'Com_delete'} + $mystat{'Com_insert'} + $mystat{'Com_update'} + $mystat{'Com_replace'}; - if ($mycalc{'total_reads'} == 0) { - $mycalc{'pct_reads'} = 0; - $mycalc{'pct_writes'} = 100; - } else { - $mycalc{'pct_reads'} = int(($mycalc{'total_reads'}/($mycalc{'total_reads'}+$mycalc{'total_writes'})) * 100); - $mycalc{'pct_writes'} = 100-$mycalc{'pct_reads'}; - } - } - - # InnoDB - if ($myvar{'have_innodb'} eq "YES") { - $mycalc{'innodb_log_size_pct'} = ($myvar{'innodb_log_file_size'} * 100 / $myvar{'innodb_buffer_pool_size'}); - } -} - -sub mysql_stats { - print "\n-------- Performance Metrics -------------------------------------------------\n"; - # Show uptime, queries per second, connections, traffic stats - my $qps; - if ($mystat{'Uptime'} > 0) { $qps = sprintf("%.3f",$mystat{'Questions'}/$mystat{'Uptime'}); } - if ($mystat{'Uptime'} < 86400) { push(@generalrec,"MySQL started within last 24 hours - recommendations may be inaccurate"); } - infoprint "Up for: ".pretty_uptime($mystat{'Uptime'})." (".hr_num($mystat{'Questions'}). - " q [".hr_num($qps)." qps], ".hr_num($mystat{'Connections'})." conn,". - " TX: ".hr_num($mystat{'Bytes_sent'}).", RX: ".hr_num($mystat{'Bytes_received'}).")\n"; - infoprint "Reads / Writes: ".$mycalc{'pct_reads'}."% / ".$mycalc{'pct_writes'}."%\n"; - - # Memory usage - infoprint "Total buffers: ".hr_bytes($mycalc{'server_buffers'})." global + ".hr_bytes($mycalc{'per_thread_buffers'})." per thread ($myvar{'max_connections'} max threads)\n"; - if ($mycalc{'total_possible_used_memory'} > 2*1024*1024*1024 && $arch eq 32) { - badprint "Allocating > 2GB RAM on 32-bit systems can cause system instability\n"; - badprint "Maximum possible memory usage: ".hr_bytes($mycalc{'total_possible_used_memory'})." ($mycalc{'pct_physical_memory'}% of installed RAM)\n"; - } elsif ($mycalc{'pct_physical_memory'} > 85) { - badprint "Maximum possible memory usage: ".hr_bytes($mycalc{'total_possible_used_memory'})." ($mycalc{'pct_physical_memory'}% of installed RAM)\n"; - push(@generalrec,"Reduce your overall MySQL memory footprint for system stability"); - } else { - goodprint "Maximum possible memory usage: ".hr_bytes($mycalc{'total_possible_used_memory'})." ($mycalc{'pct_physical_memory'}% of installed RAM)\n"; - } - - # Slow queries - if ($mycalc{'pct_slow_queries'} > 5) { - badprint "Slow queries: $mycalc{'pct_slow_queries'}% (".hr_num($mystat{'Slow_queries'})."/".hr_num($mystat{'Questions'}).")\n"; - } else { - goodprint "Slow queries: $mycalc{'pct_slow_queries'}% (".hr_num($mystat{'Slow_queries'})."/".hr_num($mystat{'Questions'}).")\n"; - } - if ($myvar{'long_query_time'} > 10) { push(@adjvars,"long_query_time (<= 10)"); } - if (defined($myvar{'log_slow_queries'})) { - if ($myvar{'log_slow_queries'} eq "OFF") { push(@generalrec,"Enable the slow query log to troubleshoot bad queries"); } - } - - # Connections - if ($mycalc{'pct_connections_used'} > 85) { - badprint "Highest connection usage: $mycalc{'pct_connections_used'}% ($mystat{'Max_used_connections'}/$myvar{'max_connections'})\n"; - push(@adjvars,"max_connections (> ".$myvar{'max_connections'}.")"); - push(@adjvars,"wait_timeout (< ".$myvar{'wait_timeout'}.")","interactive_timeout (< ".$myvar{'interactive_timeout'}.")"); - push(@generalrec,"Reduce or eliminate persistent connections to reduce connection usage") - } else { - goodprint "Highest usage of available connections: $mycalc{'pct_connections_used'}% ($mystat{'Max_used_connections'}/$myvar{'max_connections'})\n"; - } - - # Key buffer - if (!defined($mycalc{'total_myisam_indexes'}) and $doremote == 1) { - push(@generalrec,"Unable to calculate MyISAM indexes on remote MySQL server < 5.0.0"); - } elsif ($mycalc{'total_myisam_indexes'} =~ /^fail$/) { - badprint "Cannot calculate MyISAM index size - re-run script as root user\n"; - } elsif ($mycalc{'total_myisam_indexes'} == "0") { - badprint "None of your MyISAM tables are indexed - add indexes immediately\n"; - } else { - if ($myvar{'key_buffer_size'} < $mycalc{'total_myisam_indexes'} && $mycalc{'pct_keys_from_mem'} < 95) { - badprint "Key buffer size / total MyISAM indexes: ".hr_bytes($myvar{'key_buffer_size'})."/".hr_bytes($mycalc{'total_myisam_indexes'})."\n"; - push(@adjvars,"key_buffer_size (> ".hr_bytes($mycalc{'total_myisam_indexes'}).")"); - } else { - goodprint "Key buffer size / total MyISAM indexes: ".hr_bytes($myvar{'key_buffer_size'})."/".hr_bytes($mycalc{'total_myisam_indexes'})."\n"; - } - if ($mystat{'Key_read_requests'} > 0) { - if ($mycalc{'pct_keys_from_mem'} < 95) { - badprint "Key buffer hit rate: $mycalc{'pct_keys_from_mem'}% (".hr_num($mystat{'Key_read_requests'})." cached / ".hr_num($mystat{'Key_reads'})." reads)\n"; - } else { - goodprint "Key buffer hit rate: $mycalc{'pct_keys_from_mem'}% (".hr_num($mystat{'Key_read_requests'})." cached / ".hr_num($mystat{'Key_reads'})." reads)\n"; - } - } else { - # No queries have run that would use keys - } - } - - # Query cache - if (!mysql_version_ge(4)) { - # MySQL versions < 4.01 don't support query caching - push(@generalrec,"Upgrade MySQL to version 4+ to utilize query caching"); - } elsif ($myvar{'query_cache_size'} < 1) { - badprint "Query cache is disabled\n"; - push(@adjvars,"query_cache_size (>= 8M)"); - } elsif ($mystat{'Com_select'} == 0) { - badprint "Query cache cannot be analyzed - no SELECT statements executed\n"; - } else { - if ($mycalc{'query_cache_efficiency'} < 20) { - badprint "Query cache efficiency: $mycalc{'query_cache_efficiency'}% (".hr_num($mystat{'Qcache_hits'})." cached / ".hr_num($mystat{'Qcache_hits'}+$mystat{'Com_select'})." selects)\n"; - push(@adjvars,"query_cache_limit (> ".hr_bytes_rnd($myvar{'query_cache_limit'}).", or use smaller result sets)"); - } else { - goodprint "Query cache efficiency: $mycalc{'query_cache_efficiency'}% (".hr_num($mystat{'Qcache_hits'})." cached / ".hr_num($mystat{'Qcache_hits'}+$mystat{'Com_select'})." selects)\n"; - } - if ($mycalc{'query_cache_prunes_per_day'} > 98) { - badprint "Query cache prunes per day: $mycalc{'query_cache_prunes_per_day'}\n"; - if ($myvar{'query_cache_size'} > 128*1024*1024) { - push(@generalrec,"Increasing the query_cache size over 128M may reduce performance"); - push(@adjvars,"query_cache_size (> ".hr_bytes_rnd($myvar{'query_cache_size'}).") [see warning above]"); - } else { - push(@adjvars,"query_cache_size (> ".hr_bytes_rnd($myvar{'query_cache_size'}).")"); - } - } else { - goodprint "Query cache prunes per day: $mycalc{'query_cache_prunes_per_day'}\n"; - } - } - - # Sorting - if ($mycalc{'total_sorts'} == 0) { - # For the sake of space, we will be quiet here - # No sorts have run yet - } elsif ($mycalc{'pct_temp_sort_table'} > 10) { - badprint "Sorts requiring temporary tables: $mycalc{'pct_temp_sort_table'}% (".hr_num($mystat{'Sort_merge_passes'})." temp sorts / ".hr_num($mycalc{'total_sorts'})." sorts)\n"; - push(@adjvars,"sort_buffer_size (> ".hr_bytes_rnd($myvar{'sort_buffer_size'}).")"); - push(@adjvars,"read_rnd_buffer_size (> ".hr_bytes_rnd($myvar{'read_rnd_buffer_size'}).")"); - } else { - goodprint "Sorts requiring temporary tables: $mycalc{'pct_temp_sort_table'}% (".hr_num($mystat{'Sort_merge_passes'})." temp sorts / ".hr_num($mycalc{'total_sorts'})." sorts)\n"; - } - - # Joins - if ($mycalc{'joins_without_indexes_per_day'} > 250) { - badprint "Joins performed without indexes: $mycalc{'joins_without_indexes'}\n"; - push(@adjvars,"join_buffer_size (> ".hr_bytes($myvar{'join_buffer_size'}).", or always use indexes with joins)"); - push(@generalrec,"Adjust your join queries to always utilize indexes"); - } else { - # For the sake of space, we will be quiet here - # No joins have run without indexes - } - - # Temporary tables - if ($mystat{'Created_tmp_tables'} > 0) { - if ($mycalc{'pct_temp_disk'} > 25 && $mycalc{'max_tmp_table_size'} < 256*1024*1024) { - badprint "Temporary tables created on disk: $mycalc{'pct_temp_disk'}% (".hr_num($mystat{'Created_tmp_disk_tables'})." on disk / ".hr_num($mystat{'Created_tmp_disk_tables'} + $mystat{'Created_tmp_tables'})." total)\n"; - push(@adjvars,"tmp_table_size (> ".hr_bytes_rnd($myvar{'tmp_table_size'}).")"); - push(@adjvars,"max_heap_table_size (> ".hr_bytes_rnd($myvar{'max_heap_table_size'}).")"); - push(@generalrec,"When making adjustments, make tmp_table_size/max_heap_table_size equal"); - push(@generalrec,"Reduce your SELECT DISTINCT queries without LIMIT clauses"); - } elsif ($mycalc{'pct_temp_disk'} > 25 && $mycalc{'max_tmp_table_size'} >= 256) { - badprint "Temporary tables created on disk: $mycalc{'pct_temp_disk'}% (".hr_num($mystat{'Created_tmp_disk_tables'})." on disk / ".hr_num($mystat{'Created_tmp_disk_tables'} + $mystat{'Created_tmp_tables'})." total)\n"; - push(@generalrec,"Temporary table size is already large - reduce result set size"); - push(@generalrec,"Reduce your SELECT DISTINCT queries without LIMIT clauses"); - } else { - goodprint "Temporary tables created on disk: $mycalc{'pct_temp_disk'}% (".hr_num($mystat{'Created_tmp_disk_tables'})." on disk / ".hr_num($mystat{'Created_tmp_disk_tables'} + $mystat{'Created_tmp_tables'})." total)\n"; - } - } else { - # For the sake of space, we will be quiet here - # No temporary tables have been created - } - - # Thread cache - if ($myvar{'thread_cache_size'} eq 0) { - badprint "Thread cache is disabled\n"; - push(@generalrec,"Set thread_cache_size to 4 as a starting value"); - push(@adjvars,"thread_cache_size (start at 4)"); - } else { - if ($mycalc{'thread_cache_hit_rate'} <= 50) { - badprint "Thread cache hit rate: $mycalc{'thread_cache_hit_rate'}% (".hr_num($mystat{'Threads_created'})." created / ".hr_num($mystat{'Connections'})." connections)\n"; - push(@adjvars,"thread_cache_size (> $myvar{'thread_cache_size'})"); - } else { - goodprint "Thread cache hit rate: $mycalc{'thread_cache_hit_rate'}% (".hr_num($mystat{'Threads_created'})." created / ".hr_num($mystat{'Connections'})." connections)\n"; - } - } - - # Table cache - if ($mystat{'Open_tables'} > 0) { - if ($mycalc{'table_cache_hit_rate'} < 20) { - badprint "Table cache hit rate: $mycalc{'table_cache_hit_rate'}% (".hr_num($mystat{'Open_tables'})." open / ".hr_num($mystat{'Opened_tables'})." opened)\n"; - if (mysql_version_ge(5, 1)) { - push(@adjvars,"table_cache (> ".$myvar{'table_open_cache'}.")"); - } else { - push(@adjvars,"table_cache (> ".$myvar{'table_cache'}.")"); - } - push(@generalrec,"Increase table_cache gradually to avoid file descriptor limits"); - } else { - goodprint "Table cache hit rate: $mycalc{'table_cache_hit_rate'}% (".hr_num($mystat{'Open_tables'})." open / ".hr_num($mystat{'Opened_tables'})." opened)\n"; - } - } - - # Open files - if (defined $mycalc{'pct_files_open'}) { - if ($mycalc{'pct_files_open'} > 85) { - badprint "Open file limit used: $mycalc{'pct_files_open'}% (".hr_num($mystat{'Open_files'})."/".hr_num($myvar{'open_files_limit'}).")\n"; - push(@adjvars,"open_files_limit (> ".$myvar{'open_files_limit'}.")"); - } else { - goodprint "Open file limit used: $mycalc{'pct_files_open'}% (".hr_num($mystat{'Open_files'})."/".hr_num($myvar{'open_files_limit'}).")\n"; - } - } - - # Table locks - if (defined $mycalc{'pct_table_locks_immediate'}) { - if ($mycalc{'pct_table_locks_immediate'} < 95) { - badprint "Table locks acquired immediately: $mycalc{'pct_table_locks_immediate'}%\n"; - push(@generalrec,"Optimize queries and/or use InnoDB to reduce lock wait"); - } else { - goodprint "Table locks acquired immediately: $mycalc{'pct_table_locks_immediate'}% (".hr_num($mystat{'Table_locks_immediate'})." immediate / ".hr_num($mystat{'Table_locks_waited'}+$mystat{'Table_locks_immediate'})." locks)\n"; - } - } - - # Performance options - if (!mysql_version_ge(4, 1)) { - push(@generalrec,"Upgrade to MySQL 4.1+ to use concurrent MyISAM inserts"); - } elsif ($myvar{'concurrent_insert'} eq "OFF") { - push(@generalrec,"Enable concurrent_insert by setting it to 'ON'"); - } elsif ($myvar{'concurrent_insert'} eq 0) { - push(@generalrec,"Enable concurrent_insert by setting it to 1"); - } - if ($mycalc{'pct_aborted_connections'} > 5) { - badprint "Connections aborted: ".$mycalc{'pct_aborted_connections'}."%\n"; - push(@generalrec,"Your applications are not closing MySQL connections properly"); - } - - # InnoDB - if (defined $myvar{'have_innodb'} && $myvar{'have_innodb'} eq "YES" && defined $enginestats{'InnoDB'}) { - if ($myvar{'innodb_buffer_pool_size'} > $enginestats{'InnoDB'}) { - goodprint "InnoDB data size / buffer pool: ".hr_bytes($enginestats{'InnoDB'})."/".hr_bytes($myvar{'innodb_buffer_pool_size'})."\n"; - } else { - badprint "InnoDB data size / buffer pool: ".hr_bytes($enginestats{'InnoDB'})."/".hr_bytes($myvar{'innodb_buffer_pool_size'})."\n"; - push(@adjvars,"innodb_buffer_pool_size (>= ".hr_bytes_rnd($enginestats{'InnoDB'}).")"); - } - } -} - -# Take the two recommendation arrays and display them at the end of the output -sub make_recommendations { - print "\n-------- Recommendations -----------------------------------------------------\n"; - if (@generalrec > 0) { - print "General recommendations:\n"; - foreach (@generalrec) { print " ".$_."\n"; } - } - if (@adjvars > 0) { - print "Variables to adjust:\n"; - if ($mycalc{'pct_physical_memory'} > 90) { - print " *** MySQL's maximum memory usage is dangerously high ***\n". - " *** Add RAM before increasing MySQL buffer variables ***\n"; - } - foreach (@adjvars) { print " ".$_."\n"; } - } - if (@generalrec == 0 && @adjvars ==0) { - print "No additional performance recommendations are available.\n" - } - print "\n"; -} - -# --------------------------------------------------------------------------- -# BEGIN 'MAIN' -# --------------------------------------------------------------------------- -print "\n >> MySQLTuner $tunerversion - Major Hayden \n". - " >> Bug reports, feature requests, and downloads at http://mysqltuner.com/\n". - " >> Run with '--help' for additional options and output filtering\n"; -mysql_setup; # Gotta login first -os_setup; # Set up some OS variables -get_all_vars; # Toss variables/status into hashes -validate_tuner_version; # Check current MySQLTuner version -validate_mysql_version; # Check current MySQL version -check_architecture; # Suggest 64-bit upgrade -check_storage_engines; # Show enabled storage engines -security_recommendations; # Display some security recommendations -calculations; # Calculate everything we need -mysql_stats; # Print the server stats -make_recommendations; # Make recommendations based on stats -# --------------------------------------------------------------------------- -# END 'MAIN' -# --------------------------------------------------------------------------- - -# Local variables: -# indent-tabs-mode: t -# cperl-indent-level: 8 -# perl-indent-level: 8 -# End: diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_deepmerge.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_deepmerge.rb deleted file mode 100644 index aca9c7a3da..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_deepmerge.rb +++ /dev/null @@ -1,58 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:mysql_deepmerge, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| - Recursively merges two or more hashes together and returns the resulting hash. - - For example: - - $hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } } - $hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } } - $merged_hash = mysql_deepmerge($hash1, $hash2) - # The resulting hash is equivalent to: - # $merged_hash = { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } } - - When there is a duplicate key that is a hash, they are recursively merged. - When there is a duplicate key that is not a hash, the key in the rightmost hash will "win." - When there are conficting uses of dashes and underscores in two keys (which mysql would otherwise equate), - the rightmost style will win. - - ENDHEREDOC - - if args.length < 2 - raise Puppet::ParseError, ("mysql_deepmerge(): wrong number of arguments (#{args.length}; must be at least 2)") - end - - result = Hash.new - args.each do |arg| - next if arg.is_a? String and arg.empty? # empty string is synonym for puppet's undef - # If the argument was not a hash, skip it. - unless arg.is_a?(Hash) - raise Puppet::ParseError, "mysql_deepmerge: unexpected argument type #{arg.class}, only expects hash arguments" - end - - # Now we have to traverse our hash assigning our non-hash values - # to the matching keys in our result while following our hash values - # and repeating the process. - overlay( result, arg ) - end - return( result ) - end -end - -def has_normalized!(hash, key) - return true if hash.has_key?( key ) - return false unless key.match(/-|_/) - other_key = key.include?('-') ? key.gsub( '-', '_' ) : key.gsub( '_', '-' ) - return false unless hash.has_key?( other_key ) - hash[key] = hash.delete( other_key ) - return true; -end - -def overlay( hash1, hash2 ) - hash2.each do |key, value| - if(has_normalized!( hash1, key ) and value.is_a?(Hash) and hash1[key].is_a?(Hash)) - overlay( hash1[key], value ) - else - hash1[key] = value - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_password.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_password.rb deleted file mode 100644 index f057a3139d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_password.rb +++ /dev/null @@ -1,15 +0,0 @@ -# hash a string as mysql's "PASSWORD()" function would do it -require 'digest/sha1' - -module Puppet::Parser::Functions - newfunction(:mysql_password, :type => :rvalue, :doc => <<-EOS - Returns the mysql password hash from the clear text password. - EOS - ) do |args| - - raise(Puppet::ParseError, 'mysql_password(): Wrong number of arguments ' + - "given (#{args.size} for 1)") if args.size != 1 - - '*' + Digest::SHA1.hexdigest(Digest::SHA1.digest(args[0])).upcase - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_strip_hash.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_strip_hash.rb deleted file mode 100644 index 8e850d02a5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/parser/functions/mysql_strip_hash.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:mysql_strip_hash, :type => :rvalue, :arity => 1, :doc => <<-EOS -TEMPORARY FUNCTION: EXPIRES 2014-03-10 -When given a hash this function strips out all blank entries. -EOS - ) do |args| - - hash = args[0] - unless hash.is_a?(Hash) - raise(Puppet::ParseError, 'mysql_strip_hash(): Requires hash to work with') - end - - # Filter out all the top level blanks. - hash.reject{|k,v| v == ''}.each do |k,v| - if v.is_a?(Hash) - v.reject!{|ki,vi| vi == '' } - end - end - - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/database/mysql.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/database/mysql.rb deleted file mode 100644 index ace742967e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/database/mysql.rb +++ /dev/null @@ -1,41 +0,0 @@ -require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mysql')) -Puppet::Type.type(:database).provide(:mysql, :parent => Puppet::Provider::Mysql) do - desc 'Manages MySQL database.' - - defaultfor :kernel => 'Linux' - - optional_commands :mysql => 'mysql' - optional_commands :mysqladmin => 'mysqladmin' - - def self.instances - mysql([defaults_file, '-NBe', 'show databases'].compact).split("\n").collect do |name| - new(:name => name) - end - end - - def create - mysql([defaults_file, '-NBe', "create database `#{@resource[:name]}` character set #{resource[:charset]}"].compact) - end - - def destroy - mysqladmin([defaults_file, '-f', 'drop', @resource[:name]].compact) - end - - def charset - mysql([defaults_file, '-NBe', "show create database `#{resource[:name]}`"].compact).match(/.*?(\S+)\s(?:COLLATE.*)?\*\//)[1] - end - - def charset=(value) - mysql([defaults_file, '-NBe', "alter database `#{resource[:name]}` CHARACTER SET #{value}"].compact) - end - - def exists? - begin - mysql([defaults_file, '-NBe', 'show databases'].compact).match(/^#{@resource[:name]}$/) - rescue => e - debug(e.message) - return nil - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/database_grant/mysql.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/database_grant/mysql.rb deleted file mode 100644 index eabc649c3d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/database_grant/mysql.rb +++ /dev/null @@ -1,199 +0,0 @@ -# A grant is either global or per-db. This can be distinguished by the syntax -# of the name: -# user@host => global -# user@host/db => per-db - -require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mysql')) -Puppet::Type.type(:database_grant).provide(:mysql, :parent => Puppet::Provider::Mysql) do - - desc 'Uses mysql as database.' - - defaultfor :kernel => 'Linux' - - optional_commands :mysql => 'mysql' - optional_commands :mysqladmin => 'mysqladmin' - - def self.prefetch(resources) - @user_privs = query_user_privs - @db_privs = query_db_privs - end - - def self.user_privs - @user_privs || query_user_privs - end - - def self.db_privs - @db_privs || query_db_privs - end - - def user_privs - self.class.user_privs - end - - def db_privs - self.class.db_privs - end - - def self.query_user_privs - results = mysql([defaults_file, 'mysql', '-Be', 'describe user'].compact) - column_names = results.split(/\n/).map { |l| l.chomp.split(/\t/)[0] } - @user_privs = column_names.delete_if { |e| !( e =~/_priv$/) } - end - - def self.query_db_privs - results = mysql([defaults_file, 'mysql', '-Be', 'describe db'].compact) - column_names = results.split(/\n/).map { |l| l.chomp.split(/\t/)[0] } - @db_privs = column_names.delete_if { |e| !(e =~/_priv$/) } - end - - def mysql_flush - mysqladmin([defaults_file, 'flush-privileges'].compact) - end - - # this parses the - def split_name(string) - matches = /^([^@]*)@([^\/]*)(\/(.*))?$/.match(string).captures.compact - case matches.length - when 2 - { - :type => :user, - :user => matches[0], - :host => matches[1] - } - when 4 - { - :type => :db, - :user => matches[0], - :host => matches[1], - :db => matches[3] - } - end - end - - def create_row - unless @resource.should(:privileges).empty? - name = split_name(@resource[:name]) - case name[:type] - when :user - mysql([defaults_file, 'mysql', '-e', "INSERT INTO user (host, user) VALUES ('%s', '%s')" % [ - name[:host], name[:user], - ]].compact) - when :db - mysql([defaults_file, 'mysql', '-e', "INSERT INTO db (host, user, db) VALUES ('%s', '%s', '%s')" % [ - name[:host], name[:user], name[:db], - ]].compact) - end - mysql_flush - end - end - - def destroy - mysql([defaults_file, 'mysql', '-e', "REVOKE ALL ON '%s'.* FROM '%s@%s'" % [ @resource[:privileges], @resource[:database], @resource[:name], @resource[:host] ]].compact) - end - - def row_exists? - name = split_name(@resource[:name]) - fields = [:user, :host] - if name[:type] == :db - fields << :db - end - not mysql([defaults_file, 'mysql', '-NBe', "SELECT '1' FROM %s WHERE %s" % [ name[:type], fields.map do |f| "%s='%s'" % [f, name[f]] end.join(' AND ')]].compact).empty? - end - - def all_privs_set? - all_privs = case split_name(@resource[:name])[:type] - when :user - user_privs - when :db - db_privs - end - all_privs = all_privs.collect do |p| p.downcase end.sort.join('|') - privs = privileges.collect do |p| p.downcase end.sort.join('|') - - all_privs == privs - end - - def privileges - name = split_name(@resource[:name]) - privs = '' - - case name[:type] - when :user - privs = mysql([defaults_file, 'mysql', '-Be', "select * from mysql.user where user='%s' and host='%s'" % [ name[:user], name[:host] ]].compact) - when :db - privs = mysql([defaults_file, 'mysql', '-Be', "select * from mysql.db where user='%s' and host='%s' and db='%s'" % [ name[:user], name[:host], name[:db] ]].compact) - end - - if privs.match(/^$/) - privs = [] # no result, no privs - else - # returns a line with field names and a line with values, each tab-separated - privs = privs.split(/\n/).map! do |l| l.chomp.split(/\t/) end - # transpose the lines, so we have key/value pairs - privs = privs[0].zip(privs[1]) - privs = privs.select do |p| p[0].match(/_priv$/) and p[1] == 'Y' end - end - - privs.collect do |p| p[0] end - end - - def privileges=(privs) - unless row_exists? - create_row - end - - # puts "Setting privs: ", privs.join(", ") - name = split_name(@resource[:name]) - stmt = '' - where = '' - all_privs = [] - case name[:type] - when :user - stmt = 'update user set ' - where = " where user='%s' and host='%s'" % [ name[:user], name[:host] ] - all_privs = user_privs - when :db - stmt = 'update db set ' - where = " where user='%s' and host='%s' and db='%s'" % [ name[:user], name[:host], name[:db] ] - all_privs = db_privs - end - - if privs[0].downcase == 'all' - privs = all_privs - end - - # Downcase the requested priviliges for case-insensitive selection - # we don't map! here because the all_privs object has to remain in - # the same case the DB gave it to us in - privs = privs.map { |p| p.downcase } - - # puts "stmt:", stmt - set = all_privs.collect do |p| "%s = '%s'" % [p, privs.include?(p.downcase) ? 'Y' : 'N'] end.join(', ') - # puts "set:", set - stmt = stmt << set << where - - validate_privs privs, all_privs - mysql([defaults_file, 'mysql', '-Be', stmt].compact) - mysql_flush - end - - def validate_privs(set_privs, all_privs) - all_privs = all_privs.collect { |p| p.downcase } - set_privs = set_privs.collect { |p| p.downcase } - invalid_privs = Array.new - hints = Array.new - # Test each of the user provided privs to see if they exist in all_privs - set_privs.each do |priv| - invalid_privs << priv unless all_privs.include?(priv) - hints << "#{priv}_priv" if all_privs.include?("#{priv}_priv") - end - unless invalid_privs.empty? - # Print a decently helpful and gramatically correct error message - hints = "Did you mean '#{hints.join(',')}'?" unless hints.empty? - p = invalid_privs.size > 1 ? ['s', 'are not valid'] : ['', 'is not valid'] - detail = ["The privilege#{p[0]} '#{invalid_privs.join(',')}' #{p[1]}."] - fail [detail, hints].join(' ') - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/database_user/mysql.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/database_user/mysql.rb deleted file mode 100644 index 71e76d5c36..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/database_user/mysql.rb +++ /dev/null @@ -1,65 +0,0 @@ -require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mysql')) -Puppet::Type.type(:database_user).provide(:mysql, :parent => Puppet::Provider::Mysql) do - - desc 'manage users for a mysql database.' - - defaultfor :kernel => 'Linux' - - commands :mysql => 'mysql' - commands :mysqladmin => 'mysqladmin' - - def self.instances - users = mysql([defaults_file, 'mysql', '-BNe' "select concat(User, '@',Host) as User from mysql.user"].compact).split("\n") - users.select{ |user| user =~ /.+@/ }.collect do |name| - new(:name => name) - end - end - - def create - merged_name = self.class.cmd_user(@resource[:name]) - password_hash = @resource.value(:password_hash) - max_user_connections = @resource.value(:max_user_connections) || 0 - - mysql([defaults_file, 'mysql', '-e', "grant usage on *.* to #{merged_name} identified by PASSWORD - '#{password_hash}' with max_user_connections #{max_user_connections}"].compact) - - exists? ? (return true) : (return false) - end - - def destroy - merged_name = self.class.cmd_user(@resource[:name]) - mysql([defaults_file, 'mysql', '-e', "drop user #{merged_name}"].compact) - - exists? ? (return false) : (return true) - end - - def password_hash - mysql([defaults_file, 'mysql', '-NBe', "select password from mysql.user where CONCAT(user, '@', host) = '#{@resource[:name]}'"].compact).chomp - end - - def password_hash=(string) - mysql([defaults_file, 'mysql', '-e', "SET PASSWORD FOR #{self.class.cmd_user(@resource[:name])} = '#{string}'"].compact) - - password_hash == string ? (return true) : (return false) - end - - def max_user_connections - mysql([defaults_file, "mysql", "-NBe", "select max_user_connections from mysql.user where CONCAT(user, '@', host) = '#{@resource[:name]}'"].compact).chomp - end - - def max_user_connections=(int) - mysql([defaults_file, "mysql", "-e", "grant usage on *.* to %s with max_user_connections #{int}" % [ self.class.cmd_user(@resource[:name])] ].compact).chomp - - max_user_connections == int ? (return true) : (return false) - end - - def exists? - not mysql([defaults_file, 'mysql', '-NBe', "select '1' from mysql.user where CONCAT(user, '@', host) = '%s'" % @resource.value(:name)].compact).empty? - end - - def flush - @property_hash.clear - mysqladmin([defaults_file, 'flush-privileges'].compact) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql.rb deleted file mode 100644 index 9b34ca00e2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql.rb +++ /dev/null @@ -1,70 +0,0 @@ -class Puppet::Provider::Mysql < Puppet::Provider - - # Without initvars commands won't work. - initvars - commands :mysql => 'mysql' - commands :mysqladmin => 'mysqladmin' - - # Optional defaults file - def self.defaults_file - if File.file?("#{Facter.value(:root_home)}/.my.cnf") - "--defaults-extra-file=#{Facter.value(:root_home)}/.my.cnf" - else - nil - end - end - - def defaults_file - self.class.defaults_file - end - - def self.users - mysql([defaults_file, '-NBe', "SELECT CONCAT(User, '@',Host) AS User FROM mysql.user"].compact).split("\n") - end - - # Take root@localhost and munge it to 'root'@'localhost' - def self.cmd_user(user) - "'#{user.sub('@', "'@'")}'" - end - - # Take root.* and return ON `root`.* - def self.cmd_table(table) - table_string = '' - - # We can't escape *.* so special case this. - if table == '*.*' - table_string << '*.*' - # Special case also for PROCEDURES - elsif table.start_with?('PROCEDURE ') - table_string << table.sub(/^PROCEDURE (.*)(\..*)/, 'PROCEDURE `\1`\2') - else - table_string << table.sub(/^(.*)(\..*)/, '`\1`\2') - end - table_string - end - - def self.cmd_privs(privileges) - if privileges.include?('ALL') - return 'ALL PRIVILEGES' - else - priv_string = '' - privileges.each do |priv| - priv_string << "#{priv}, " - end - end - # Remove trailing , from the last element. - priv_string.sub(/, $/, '') - end - - # Take in potential options and build up a query string with them. - def self.cmd_options(options) - option_string = '' - options.each do |opt| - if opt == 'GRANT' - option_string << ' WITH GRANT OPTION' - end - end - option_string - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_database/mysql.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_database/mysql.rb deleted file mode 100644 index ae9ab39302..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_database/mysql.rb +++ /dev/null @@ -1,68 +0,0 @@ -require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mysql')) -Puppet::Type.type(:mysql_database).provide(:mysql, :parent => Puppet::Provider::Mysql) do - desc 'Manages MySQL databases.' - - commands :mysql => 'mysql' - - def self.instances - mysql([defaults_file, '-NBe', 'show databases'].compact).split("\n").collect do |name| - attributes = {} - mysql([defaults_file, '-NBe', "show variables like '%_database'", name].compact).split("\n").each do |line| - k,v = line.split(/\s/) - attributes[k] = v - end - new(:name => name, - :ensure => :present, - :charset => attributes['character_set_database'], - :collate => attributes['collation_database'] - ) - end - end - - # We iterate over each mysql_database entry in the catalog and compare it against - # the contents of the property_hash generated by self.instances - def self.prefetch(resources) - databases = instances - resources.keys.each do |database| - if provider = databases.find { |db| db.name == database } - resources[database].provider = provider - end - end - end - - def create - mysql([defaults_file, '-NBe', "create database if not exists `#{@resource[:name]}` character set #{@resource[:charset]} collate #{@resource[:collate]}"].compact) - - @property_hash[:ensure] = :present - @property_hash[:charset] = @resource[:charset] - @property_hash[:collate] = @resource[:collate] - - exists? ? (return true) : (return false) - end - - def destroy - mysql([defaults_file, '-NBe', "drop database `#{@resource[:name]}`"].compact) - - @property_hash.clear - exists? ? (return false) : (return true) - end - - def exists? - @property_hash[:ensure] == :present || false - end - - mk_resource_methods - - def charset=(value) - mysql([defaults_file, '-NBe', "alter database `#{resource[:name]}` CHARACTER SET #{value}"].compact) - @property_hash[:charset] = value - charset == value ? (return true) : (return false) - end - - def collate=(value) - mysql([defaults_file, '-NBe', "alter database `#{resource[:name]}` COLLATE #{value}"].compact) - @property_hash[:collate] = value - collate == value ? (return true) : (return false) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_grant/mysql.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_grant/mysql.rb deleted file mode 100644 index 7dabf46205..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_grant/mysql.rb +++ /dev/null @@ -1,120 +0,0 @@ -require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mysql')) -Puppet::Type.type(:mysql_grant).provide(:mysql, :parent => Puppet::Provider::Mysql) do - - desc 'Set grants for users in MySQL.' - - def self.instances - instances = [] - users.select{ |user| user =~ /.+@/ }.collect do |user| - user_string = self.cmd_user(user) - query = "SHOW GRANTS FOR #{user_string};" - grants = mysql([defaults_file, "-NBe", query].compact) - # Once we have the list of grants generate entries for each. - grants.each_line do |grant| - # Match the munges we do in the type. - munged_grant = grant.delete("'").delete("`") - # Matching: GRANT (SELECT, UPDATE) PRIVILEGES ON (*.*) TO ('root')@('127.0.0.1') (WITH GRANT OPTION) - if match = munged_grant.match(/^GRANT\s(.+)\sON\s(.+)\sTO\s(.*)@(.*?)(\s.*)$/) - privileges, table, user, host, rest = match.captures - # Once we split privileges up on the , we need to make sure we - # shortern ALL PRIVILEGES to just all. - stripped_privileges = privileges.split(',').map do |priv| - priv == 'ALL PRIVILEGES' ? 'ALL' : priv.lstrip.rstrip - end - # Same here, but to remove OPTION leaving just GRANT. - options = ['GRANT'] if rest.match(/WITH\sGRANT\sOPTION/) - # We need to return an array of instances so capture these - instances << new( - :name => "#{user}@#{host}/#{table}", - :ensure => :present, - :privileges => stripped_privileges.sort, - :table => table, - :user => "#{user}@#{host}", - :options => options - ) - end - end - end - return instances - end - - def self.prefetch(resources) - users = instances - resources.keys.each do |name| - if provider = users.find { |user| user.name == name } - resources[name].provider = provider - end - end - end - - def grant(user, table, privileges, options) - user_string = self.class.cmd_user(user) - priv_string = self.class.cmd_privs(privileges) - table_string = self.class.cmd_table(table) - query = "GRANT #{priv_string}" - query << " ON #{table_string}" - query << " TO #{user_string}" - query << self.class.cmd_options(options) unless options.nil? - mysql([defaults_file, '-e', query].compact) - end - - def create - grant(@resource[:user], @resource[:table], @resource[:privileges], @resource[:options]) - - @property_hash[:ensure] = :present - @property_hash[:table] = @resource[:table] - @property_hash[:user] = @resource[:user] - @property_hash[:options] = @resource[:options] if @resource[:options] - @property_hash[:privileges] = @resource[:privileges] - - exists? ? (return true) : (return false) - end - - def revoke(user, table) - user_string = self.class.cmd_user(user) - table_string = self.class.cmd_table(table) - - query = "REVOKE ALL ON #{table_string} FROM #{user_string}" - mysql([defaults_file, '-e', query].compact) - # revoke grant option needs to be a extra query, because - # "REVOKE ALL PRIVILEGES, GRANT OPTION [..]" is only valid mysql syntax - # if no ON clause is used. - query = "REVOKE GRANT OPTION ON #{table_string} FROM #{user_string}" - mysql([defaults_file, '-e', query].compact) - end - - def destroy - revoke(@property_hash[:user], @property_hash[:table]) - @property_hash.clear - - exists? ? (return false) : (return true) - end - - def exists? - @property_hash[:ensure] == :present || false - end - - def flush - @property_hash.clear - mysql([defaults_file, '-NBe', 'FLUSH PRIVILEGES'].compact) - end - - mk_resource_methods - - def privileges=(privileges) - revoke(@property_hash[:user], @property_hash[:table]) - grant(@property_hash[:user], @property_hash[:table], privileges, @property_hash[:options]) - @property_hash[:privileges] = privileges - - self.privileges - end - - def options=(options) - revoke(@property_hash[:user], @property_hash[:table]) - grant(@property_hash[:user], @property_hash[:table], @property_hash[:privileges], options) - @property_hash[:options] = options - - self.options - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_user/mysql.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_user/mysql.rb deleted file mode 100644 index 066ea0b00d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/provider/mysql_user/mysql.rb +++ /dev/null @@ -1,115 +0,0 @@ -require File.expand_path(File.join(File.dirname(__FILE__), '..', 'mysql')) -Puppet::Type.type(:mysql_user).provide(:mysql, :parent => Puppet::Provider::Mysql) do - - desc 'manage users for a mysql database.' - commands :mysql => 'mysql' - - # Build a property_hash containing all the discovered information about MySQL - # users. - def self.instances - users = mysql([defaults_file, '-NBe', - "SELECT CONCAT(User, '@',Host) AS User FROM mysql.user"].compact).split("\n") - # To reduce the number of calls to MySQL we collect all the properties in - # one big swoop. - users.collect do |name| - query = "SELECT MAX_USER_CONNECTIONS, MAX_CONNECTIONS, MAX_QUESTIONS, MAX_UPDATES, PASSWORD FROM mysql.user WHERE CONCAT(user, '@', host) = '#{name}'" - @max_user_connections, @max_connections_per_hour, @max_queries_per_hour, - @max_updates_per_hour, @password = mysql([defaults_file, "-NBe", query].compact).split(/\s/) - - new(:name => name, - :ensure => :present, - :password_hash => @password, - :max_user_connections => @max_user_connections, - :max_connections_per_hour => @max_connections_per_hour, - :max_queries_per_hour => @max_queries_per_hour, - :max_updates_per_hour => @max_updates_per_hour - ) - end - end - - # We iterate over each mysql_user entry in the catalog and compare it against - # the contents of the property_hash generated by self.instances - def self.prefetch(resources) - users = instances - resources.keys.each do |name| - if provider = users.find { |user| user.name == name } - resources[name].provider = provider - end - end - end - - def create - merged_name = @resource[:name].sub('@', "'@'") - password_hash = @resource.value(:password_hash) - max_user_connections = @resource.value(:max_user_connections) || 0 - max_connections_per_hour = @resource.value(:max_connections_per_hour) || 0 - max_queries_per_hour = @resource.value(:max_queries_per_hour) || 0 - max_updates_per_hour = @resource.value(:max_updates_per_hour) || 0 - - mysql([defaults_file, '-e', "GRANT USAGE ON *.* TO '#{merged_name}' IDENTIFIED BY PASSWORD '#{password_hash}' WITH MAX_USER_CONNECTIONS #{max_user_connections} MAX_CONNECTIONS_PER_HOUR #{max_connections_per_hour} MAX_QUERIES_PER_HOUR #{max_queries_per_hour} MAX_UPDATES_PER_HOUR #{max_updates_per_hour}"].compact) - - @property_hash[:ensure] = :present - @property_hash[:password_hash] = password_hash - @property_hash[:max_user_connections] = max_user_connections - @property_hash[:max_connections_per_hour] = max_connections_per_hour - @property_hash[:max_queries_per_hour] = max_queries_per_hour - @property_hash[:max_updates_per_hour] = max_updates_per_hour - - exists? ? (return true) : (return false) - end - - def destroy - merged_name = @resource[:name].sub('@', "'@'") - mysql([defaults_file, '-e', "DROP USER '#{merged_name}'"].compact) - - @property_hash.clear - exists? ? (return false) : (return true) - end - - def exists? - @property_hash[:ensure] == :present || false - end - - ## - ## MySQL user properties - ## - - # Generates method for all properties of the property_hash - mk_resource_methods - - def password_hash=(string) - merged_name = self.class.cmd_user(@resource[:name]) - mysql([defaults_file, '-e', "SET PASSWORD FOR #{merged_name} = '#{string}'"].compact) - - password_hash == string ? (return true) : (return false) - end - - def max_user_connections=(int) - merged_name = self.class.cmd_user(@resource[:name]) - mysql([defaults_file, '-e', "GRANT USAGE ON *.* TO #{merged_name} WITH MAX_USER_CONNECTIONS #{int}"].compact).chomp - - max_user_connections == int ? (return true) : (return false) - end - - def max_connections_per_hour=(int) - merged_name = self.class.cmd_user(@resource[:name]) - mysql([defaults_file, '-e', "GRANT USAGE ON *.* TO #{merged_name} WITH MAX_CONNECTIONS_PER_HOUR #{int}"].compact).chomp - - max_connections_per_hour == int ? (return true) : (return false) - end - - def max_queries_per_hour=(int) - merged_name = self.class.cmd_user(@resource[:name]) - mysql([defaults_file, '-e', "GRANT USAGE ON *.* TO #{merged_name} WITH MAX_QUERIES_PER_HOUR #{int}"].compact).chomp - - max_queries_per_hour == int ? (return true) : (return false) - end - - def max_updates_per_hour=(int) - merged_name = self.class.cmd_user(@resource[:name]) - mysql([defaults_file, '-e', "GRANT USAGE ON *.* TO #{merged_name} WITH MAX_UPDATES_PER_HOUR #{int}"].compact).chomp - - max_updates_per_hour == int ? (return true) : (return false) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/database.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/database.rb deleted file mode 100644 index b02fb10998..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/database.rb +++ /dev/null @@ -1,21 +0,0 @@ -# This has to be a separate type to enable collecting -Puppet::Type.newtype(:database) do - @doc = 'Manage databases.' - - ensurable - - newparam(:name, :namevar=>true) do - desc 'The name of the database.' - validate do |value| - Puppet.warning("database has been deprecated in favor of mysql_database.") - true - end - end - - newproperty(:charset) do - desc 'The characterset to use for a database' - defaultto :utf8 - newvalue(/^\S+$/) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/database_grant.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/database_grant.rb deleted file mode 100644 index 7fdad82317..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/database_grant.rb +++ /dev/null @@ -1,79 +0,0 @@ -# This has to be a separate type to enable collecting -Puppet::Type.newtype(:database_grant) do - @doc = "Manage a database user's rights." - #ensurable - - autorequire :database do - # puts "Starting db autoreq for %s" % self[:name] - reqs = [] - matches = self[:name].match(/^([^@]+)@([^\/]+)\/(.+)$/) - unless matches.nil? - reqs << matches[3] - end - # puts "Autoreq: '%s'" % reqs.join(" ") - reqs - end - - autorequire :database_user do - # puts "Starting user autoreq for %s" % self[:name] - reqs = [] - matches = self[:name].match(/^([^@]+)@([^\/]+).*$/) - unless matches.nil? - reqs << '%s@%s' % [ matches[1], matches[2] ] - end - # puts "Autoreq: '%s'" % reqs.join(" ") - reqs - end - - newparam(:name, :namevar=>true) do - desc 'The primary key: either user@host for global privilges or user@host/database for database specific privileges' - validate do |value| - Puppet.warning("database_grant has been deprecated in favor of mysql_grant.") - true - end - end - - newproperty(:privileges, :array_matching => :all) do - desc 'The privileges the user should have. The possible values are implementation dependent.' - - def should_to_s(newvalue = @should) - if newvalue - unless newvalue.is_a?(Array) - newvalue = [ newvalue ] - end - newvalue.collect do |v| v.downcase end.sort.join ', ' - else - nil - end - end - - def is_to_s(currentvalue = @is) - if currentvalue - unless currentvalue.is_a?(Array) - currentvalue = [ currentvalue ] - end - currentvalue.collect do |v| v.downcase end.sort.join ', ' - else - nil - end - end - - # use the sorted outputs for comparison - def insync?(is) - if defined? @should and @should - case self.should_to_s - when 'all' - self.provider.all_privs_set? - when self.is_to_s(is) - true - else - false - end - else - true - end - end - end - -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/database_user.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/database_user.rb deleted file mode 100644 index 9a9d5fbc74..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/database_user.rb +++ /dev/null @@ -1,31 +0,0 @@ -# This has to be a separate type to enable collecting -Puppet::Type.newtype(:database_user) do - @doc = 'Manage a database user. This includes management of users password as well as privileges' - - ensurable - - newparam(:name, :namevar=>true) do - desc "The name of the user. This uses the 'username@hostname' or username@hostname." - validate do |value| - Puppet.warning("database has been deprecated in favor of mysql_user.") - # https://dev.mysql.com/doc/refman/5.1/en/account-names.html - # Regex should problably be more like this: /^[`'"]?[^`'"]*[`'"]?@[`'"]?[\w%\.]+[`'"]?$/ - raise(ArgumentError, "Invalid database user #{value}") unless value =~ /[\w-]*@[\w%\.:]+/ - username = value.split('@')[0] - if username.size > 16 - raise ArgumentError, 'MySQL usernames are limited to a maximum of 16 characters' - end - end - end - - newproperty(:password_hash) do - desc 'The password hash of the user. Use mysql_password() for creating such a hash.' - newvalue(/\w+/) - end - - newproperty(:max_user_connections) do - desc "Max concurrent connections for the user. 0 means no (or global) limit." - newvalue(/\d+/) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_database.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_database.rb deleted file mode 100644 index 3e8518c967..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_database.rb +++ /dev/null @@ -1,22 +0,0 @@ -Puppet::Type.newtype(:mysql_database) do - @doc = 'Manage MySQL databases.' - - ensurable - - newparam(:name, :namevar => true) do - desc 'The name of the MySQL database to manage.' - end - - newproperty(:charset) do - desc 'The CHARACTER SET setting for the database' - defaultto :utf8 - newvalue(/^\S+$/) - end - - newproperty(:collate) do - desc 'The COLLATE setting for the database' - defaultto :utf8_general_ci - newvalue(/^\S+$/) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_grant.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_grant.rb deleted file mode 100644 index be8dfbc340..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_grant.rb +++ /dev/null @@ -1,72 +0,0 @@ -# This has to be a separate type to enable collecting -Puppet::Type.newtype(:mysql_grant) do - @doc = "Manage a MySQL user's rights." - ensurable - - autorequire(:file) { '/root/.my.cnf' } - - def initialize(*args) - super - # Forcibly munge any privilege with 'ALL' in the array to exist of just - # 'ALL'. This can't be done in the munge in the property as that iterates - # over the array and there's no way to replace the entire array before it's - # returned to the provider. - if self[:ensure] == :present and Array(self[:privileges]).count > 1 and self[:privileges].to_s.include?('ALL') - self[:privileges] = 'ALL' - end - # Sort the privileges array in order to ensure the comparision in the provider - # self.instances method match. Otherwise this causes it to keep resetting the - # privileges. - self[:privileges] = Array(self[:privileges]).map(&:upcase).uniq.reject{|k| k == 'GRANT' or k == 'GRANT OPTION'}.sort! - end - - validate do - fail('privileges parameter is required.') if self[:ensure] == :present and self[:privileges].nil? - fail('table parameter is required.') if self[:ensure] == :present and self[:table].nil? - fail('user parameter is required.') if self[:ensure] == :present and self[:user].nil? - end - - newparam(:name, :namevar => true) do - desc 'Name to describe the grant.' - - munge do |value| - value.delete("'") - end - end - - newproperty(:privileges, :array_matching => :all) do - desc 'Privileges for user' - - munge do |value| - value.upcase - end - end - - newproperty(:table) do - desc 'Table to apply privileges to.' - - munge do |value| - value.delete("`") - end - - newvalues(/.*\..*/,/@/) - end - - newproperty(:user) do - desc 'User to operate on.' - validate do |value| - # https://dev.mysql.com/doc/refman/5.1/en/account-names.html - # Regex should problably be more like this: /^[`'"]?[^`'"]*[`'"]?@[`'"]?[\w%\.]+[`'"]?$/ - raise(ArgumentError, "Invalid user #{value}") unless value =~ /[\w-]*@[\w%\.:]+/ - username = value.split('@')[0] - if username.size > 16 - raise ArgumentError, 'MySQL usernames are limited to a maximum of 16 characters' - end - end - end - - newproperty(:options, :array_matching => :all) do - desc 'Options to grant.' - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_user.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_user.rb deleted file mode 100644 index 38564a948b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/lib/puppet/type/mysql_user.rb +++ /dev/null @@ -1,45 +0,0 @@ -# This has to be a separate type to enable collecting -Puppet::Type.newtype(:mysql_user) do - @doc = 'Manage a MySQL user. This includes management of users password as well as privileges.' - - ensurable - - newparam(:name, :namevar => true) do - desc "The name of the user. This uses the 'username@hostname' or username@hostname." - validate do |value| - # https://dev.mysql.com/doc/refman/5.1/en/account-names.html - # Regex should problably be more like this: /^[`'"]?[^`'"]*[`'"]?@[`'"]?[\w%\.]+[`'"]?$/ - raise(ArgumentError, "Invalid database user #{value}") unless value =~ /[\w-]*@[\w%\.:]+/ - username = value.split('@')[0] - if username.size > 16 - raise ArgumentError, 'MySQL usernames are limited to a maximum of 16 characters' - end - end - end - - newproperty(:password_hash) do - desc 'The password hash of the user. Use mysql_password() for creating such a hash.' - newvalue(/\w+/) - end - - newproperty(:max_user_connections) do - desc "Max concurrent connections for the user. 0 means no (or global) limit." - newvalue(/\d+/) - end - - newproperty(:max_connections_per_hour) do - desc "Max connections per hour for the user. 0 means no (or global) limit." - newvalue(/\d+/) - end - - newproperty(:max_queries_per_hour) do - desc "Max queries per hour for the user. 0 means no (or global) limit." - newvalue(/\d+/) - end - - newproperty(:max_updates_per_hour) do - desc "Max updates per hour for the user. 0 means no (or global) limit." - newvalue(/\d+/) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/backup.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/backup.pp deleted file mode 100644 index 680a5744d5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/backup.pp +++ /dev/null @@ -1,31 +0,0 @@ -# Deprecated class -class mysql::backup ( - $backupuser, - $backuppassword, - $backupdir, - $backupcompress = true, - $backuprotate = 30, - $delete_before_dump = false, - $backupdatabases = [], - $file_per_database = false, - $ensure = 'present', - $time = ['23', '5'], -) { - - crit("This class has been deprecated and callers should directly call - mysql::server::backup now.") - - class { 'mysql::server::backup': - ensure => $ensure, - backupuser => $backupuser, - backuppassword => $backuppassword, - backupdir => $backupdir, - backupcompress => $backupcompress, - backuprotate => $backuprotate, - delete_before_dump => $delete_before_dump, - backupdatabases => $backupdatabases, - file_per_database => $file_per_database, - time => $time, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings.pp deleted file mode 100644 index 88c4903393..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings.pp +++ /dev/null @@ -1,33 +0,0 @@ -# See README.md. -class mysql::bindings ( - # Boolean to determine if we should include the classes. - $java_enable = false, - $perl_enable = false, - $php_enable = false, - $python_enable = false, - $ruby_enable = false, - # Settings for the various classes. - $java_package_ensure = $mysql::params::java_package_ensure, - $java_package_name = $mysql::params::java_package_name, - $java_package_provider = $mysql::params::java_package_provider, - $perl_package_ensure = $mysql::params::perl_package_ensure, - $perl_package_name = $mysql::params::perl_package_name, - $perl_package_provider = $mysql::params::perl_package_provider, - $php_package_ensure = $mysql::params::php_package_ensure, - $php_package_name = $mysql::params::php_package_name, - $php_package_provider = $mysql::params::php_package_provider, - $python_package_ensure = $mysql::params::python_package_ensure, - $python_package_name = $mysql::params::python_package_name, - $python_package_provider = $mysql::params::python_package_provider, - $ruby_package_ensure = $mysql::params::ruby_package_ensure, - $ruby_package_name = $mysql::params::ruby_package_name, - $ruby_package_provider = $mysql::params::ruby_package_provider -) inherits mysql::params { - - if $java_enable { include '::mysql::bindings::java' } - if $perl_enable { include '::mysql::bindings::perl' } - if $php_enable { include '::mysql::bindings::php' } - if $python_enable { include '::mysql::bindings::python' } - if $ruby_enable { include '::mysql::bindings::ruby' } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/java.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/java.pp deleted file mode 100644 index d080837334..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/java.pp +++ /dev/null @@ -1,10 +0,0 @@ -# Private class -class mysql::bindings::java { - - package { 'mysql-connector-java': - ensure => $mysql::bindings::java_package_ensure, - name => $mysql::bindings::java_package_name, - provider => $mysql::bindings::java_package_provider, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/perl.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/perl.pp deleted file mode 100644 index 58c76f4b34..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/perl.pp +++ /dev/null @@ -1,10 +0,0 @@ -# Private class -class mysql::bindings::perl { - - package{ 'perl_mysql': - ensure => $mysql::bindings::perl_package_ensure, - name => $mysql::bindings::perl_package_name, - provider => $mysql::bindings::perl_package_provider, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/php.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/php.pp deleted file mode 100644 index 81d08d3aa4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/php.pp +++ /dev/null @@ -1,10 +0,0 @@ -# Private class: See README.md -class mysql::bindings::php { - - package { 'php-mysql': - ensure => $mysql::bindings::php_package_ensure, - name => $mysql::bindings::php_package_name, - provider => $mysql::bindings::php_package_provider, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/python.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/python.pp deleted file mode 100644 index 96a3882b34..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/python.pp +++ /dev/null @@ -1,10 +0,0 @@ -# Private class -class mysql::bindings::python { - - package { 'python-mysqldb': - ensure => $mysql::bindings::python_package_ensure, - name => $mysql::bindings::python_package_name, - provider => $mysql::bindings::python_package_provider, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/ruby.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/ruby.pp deleted file mode 100644 index f916f54c23..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/bindings/ruby.pp +++ /dev/null @@ -1,10 +0,0 @@ -# Private class -class mysql::bindings::ruby { - - package{ 'ruby_mysql': - ensure => $mysql::bindings::ruby_package_ensure, - name => $mysql::bindings::ruby_package_name, - provider => $mysql::bindings::ruby_package_provider, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/client.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/client.pp deleted file mode 100644 index 59487f7005..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/client.pp +++ /dev/null @@ -1,27 +0,0 @@ -# -class mysql::client ( - $bindings_enable = $mysql::params::bindings_enable, - $package_ensure = $mysql::params::client_package_ensure, - $package_name = $mysql::params::client_package_name, -) inherits mysql::params { - - include '::mysql::client::install' - - if $bindings_enable { - class { 'mysql::bindings': - java_enable => true, - perl_enable => true, - php_enable => true, - python_enable => true, - ruby_enable => true, - } - } - - - # Anchor pattern workaround to avoid resources of mysql::client::install to - # "float off" outside mysql::client - anchor { 'mysql::client::start': } -> - Class['mysql::client::install'] -> - anchor { 'mysql::client::end': } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/client/install.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/client/install.pp deleted file mode 100644 index a443f5320e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/client/install.pp +++ /dev/null @@ -1,8 +0,0 @@ -class mysql::client::install { - - package { 'mysql_client': - ensure => $mysql::client::package_ensure, - name => $mysql::client::package_name, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/db.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/db.pp deleted file mode 100644 index d406a07d52..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/db.pp +++ /dev/null @@ -1,59 +0,0 @@ -# See README.md for details. -define mysql::db ( - $user, - $password, - $charset = 'utf8', - $collate = 'utf8_general_ci', - $host = 'localhost', - $grant = 'ALL', - $sql = '', - $enforce_sql = false, - $ensure = 'present' -) { - #input validation - validate_re($ensure, '^(present|absent)$', - "${ensure} is not supported for ensure. Allowed values are 'present' and 'absent'.") - $table = "${name}.*" - - include '::mysql::client' - - mysql_database { $name: - ensure => $ensure, - charset => $charset, - collate => $collate, - provider => 'mysql', - require => [ Class['mysql::server'], Class['mysql::client'] ], - before => Mysql_user["${user}@${host}"], - } - - $user_resource = { - ensure => $ensure, - password_hash => mysql_password($password), - provider => 'mysql', - require => Class['mysql::server'], - } - ensure_resource('mysql_user', "${user}@${host}", $user_resource) - - if $ensure == 'present' { - mysql_grant { "${user}@${host}/${table}": - privileges => $grant, - provider => 'mysql', - user => "${user}@${host}", - table => $table, - require => [ Mysql_user["${user}@${host}"], Class['mysql::server'] ], - } - - $refresh = ! $enforce_sql - - if $sql { - exec{ "${name}-import": - command => "/usr/bin/mysql ${name} < ${sql}", - logoutput => true, - environment => "HOME=${::root_home}", - refreshonly => $refresh, - require => Mysql_grant["${user}@${host}/${table}"], - subscribe => Mysql_database[$name], - } - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/init.pp deleted file mode 100644 index eba5c20631..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/init.pp +++ /dev/null @@ -1,100 +0,0 @@ -# -class mysql( - $basedir = '', - $bind_address = '', - $client_package_ensure = '', - $client_package_name = '', - $config_file = '', - $config_template = '', - $datadir = '', - $default_engine = '', - $etc_root_password = '', - $log_error = '', - $manage_config_file = '', - $manage_service = '', - $max_allowed_packet = '', - $max_connections = '', - $old_root_password = '', - $package_ensure = '', - $php_package_name = '', - $pidfile = '', - $port = '', - $purge_conf_dir = '', - $restart = '', - $root_group = '', - $root_password = '', - $server_package_name = '', - $service_name = '', - $service_provider = '', - $socket = '', - $ssl = '', - $ssl_ca = '', - $ssl_cert = '', - $ssl_key = '', - $tmpdir = '', - $attempt_compatibility_mode = false, -) { - - if $attempt_compatibility_mode { - notify { "An attempt has been made below to automatically apply your custom - settings to mysql::server. Please verify this works in a safe test - environment.": } - - $override_options = { - 'client' => { - 'port' => $port, - 'socket' => $socket - }, - 'mysqld_safe' => { - 'log_error' => $log_error, - 'socket' => $socket, - }, - 'mysqld' => { - 'basedir' => $basedir, - 'bind_address' => $bind_address, - 'datadir' => $datadir, - 'log_error' => $log_error, - 'max_allowed_packet' => $max_allowed_packet, - 'max_connections' => $max_connections, - 'pid_file' => $pidfile, - 'port' => $port, - 'socket' => $socket, - 'ssl-ca' => $ssl_ca, - 'ssl-cert' => $ssl_cert, - 'ssl-key' => $ssl_key, - 'tmpdir' => $tmpdir, - }, - 'mysqldump' => { - 'max_allowed_packet' => $max_allowed_packet, - }, - 'config_file' => $config_file, - 'etc_root_password' => $etc_root_password, - 'manage_config_file' => $manage_config_file, - 'old_root_password' => $old_root_password, - 'purge_conf_dir' => $purge_conf_dir, - 'restart' => $restart, - 'root_group' => $root_group, - 'root_password' => $root_password, - 'service_name' => $service_name, - 'ssl' => $ssl - } - $filtered_options = mysql_strip_hash($override_options) - validate_hash($filtered_options) - notify { $filtered_options: } - class { 'mysql::server': - override_options => $filtered_options, - } - - } else { - fail("ERROR: This class has been deprecated and the functionality moved - into mysql::server. If you run mysql::server without correctly calling - mysql:: server with the new override_options hash syntax you will revert - your MySQL to the stock settings. Do not proceed without removing this - class and using mysql::server correctly. - - If you are brave you may set attempt_compatibility_mode in this class which - attempts to automap the previous settings to appropriate calls to - mysql::server") - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/params.pp deleted file mode 100644 index 67dd785b09..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/params.pp +++ /dev/null @@ -1,230 +0,0 @@ -# Private class: See README.md. -class mysql::params { - - $manage_config_file = true - $old_root_password = '' - $purge_conf_dir = false - $restart = false - $root_password = 'UNSET' - $server_package_ensure = 'present' - $server_service_manage = true - $server_service_enabled = true - # mysql::bindings - $bindings_enable = false - $java_package_ensure = 'present' - $java_package_provider = undef - $perl_package_ensure = 'present' - $perl_package_provider = undef - $php_package_ensure = 'present' - $php_package_provider = undef - $python_package_ensure = 'present' - $python_package_provider = undef - $ruby_package_ensure = 'present' - $ruby_package_provider = undef - - - case $::osfamily { - 'RedHat': { - if $::operatingsystem == 'Fedora' and (is_integer($::operatingsystemrelease) and $::operatingsystemrelease >= 19 or $::operatingsystemrelease == "Rawhide") { - $client_package_name = 'mariadb' - $server_package_name = 'mariadb-server' - } else { - $client_package_name = 'mysql' - $server_package_name = 'mysql-server' - } - $basedir = '/usr' - $config_file = '/etc/my.cnf' - $datadir = '/var/lib/mysql' - $log_error = '/var/log/mysqld.log' - $pidfile = '/var/run/mysqld/mysqld.pid' - $root_group = 'root' - $server_service_name = 'mysqld' - $socket = '/var/lib/mysql/mysql.sock' - $ssl_ca = '/etc/mysql/cacert.pem' - $ssl_cert = '/etc/mysql/server-cert.pem' - $ssl_key = '/etc/mysql/server-key.pem' - $tmpdir = '/tmp' - # mysql::bindings - $java_package_name = 'mysql-connector-java' - $perl_package_name = 'perl-DBD-MySQL' - $php_package_name = 'php-mysql' - $python_package_name = 'MySQL-python' - $ruby_package_name = 'ruby-mysql' - } - - 'Suse': { - $client_package_name = $::operatingsystem ? { - /OpenSuSE/ => 'mysql-community-server-client', - /(SLES|SLED)/ => 'mysql-client', - } - $server_package_name = $::operatingsystem ? { - /OpenSuSE/ => 'mysql-community-server', - /(SLES|SLED)/ => 'mysql', - } - $basedir = '/usr' - $config_file = '/etc/my.cnf' - $datadir = '/var/lib/mysql' - $log_error = $::operatingsystem ? { - /OpenSuSE/ => '/var/log/mysql/mysqld.log', - /(SLES|SLED)/ => '/var/log/mysqld.log', - } - $pidfile = $::operatingsystem ? { - /OpenSuSE/ => '/var/run/mysql/mysqld.pid', - /(SLES|SLED)/ => '/var/lib/mysql/mysqld.pid', - } - $root_group = 'root' - $server_service_name = 'mysql' - $socket = $::operatingsystem ? { - /OpenSuSE/ => '/var/run/mysql/mysql.sock', - /(SLES|SLED)/ => '/var/lib/mysql/mysql.sock', - } - $ssl_ca = '/etc/mysql/cacert.pem' - $ssl_cert = '/etc/mysql/server-cert.pem' - $ssl_key = '/etc/mysql/server-key.pem' - $tmpdir = '/tmp' - # mysql::bindings - $java_package_name = 'mysql-connector-java' - $perl_package_name = 'perl-DBD-mysql' - $php_package_name = 'apache2-mod_php53' - $python_package_name = 'python-mysql' - $ruby_package_name = $::operatingsystem ? { - /OpenSuSE/ => 'rubygem-mysql', - /(SLES|SLED)/ => 'ruby-mysql', - } - } - - 'Debian': { - $client_package_name = 'mysql-client' - $server_package_name = 'mysql-server' - - $basedir = '/usr' - $config_file = '/etc/mysql/my.cnf' - $datadir = '/var/lib/mysql' - $log_error = '/var/log/mysql/error.log' - $pidfile = '/var/run/mysqld/mysqld.pid' - $root_group = 'root' - $server_service_name = 'mysql' - $socket = '/var/run/mysqld/mysqld.sock' - $ssl_ca = '/etc/mysql/cacert.pem' - $ssl_cert = '/etc/mysql/server-cert.pem' - $ssl_key = '/etc/mysql/server-key.pem' - $tmpdir = '/tmp' - # mysql::bindings - $java_package_name = 'libmysql-java' - $perl_package_name = 'libdbd-mysql-perl' - $php_package_name = 'php5-mysql' - $python_package_name = 'python-mysqldb' - $ruby_package_name = 'libmysql-ruby' - } - - 'FreeBSD': { - $client_package_name = 'databases/mysql55-client' - $server_package_name = 'databases/mysql55-server' - $basedir = '/usr/local' - $config_file = '/var/db/mysql/my.cnf' - $datadir = '/var/db/mysql' - $log_error = "/var/db/mysql/${::hostname}.err" - $pidfile = '/var/db/mysql/mysql.pid' - $root_group = 'wheel' - $server_service_name = 'mysql-server' - $socket = '/tmp/mysql.sock' - $ssl_ca = undef - $ssl_cert = undef - $ssl_key = undef - $tmpdir = '/tmp' - # mysql::bindings - $java_package_name = 'databases/mysql-connector-java' - $perl_package_name = 'p5-DBD-mysql' - $php_package_name = 'php5-mysql' - $python_package_name = 'databases/py-MySQLdb' - $ruby_package_name = 'databases/ruby-mysql' - } - - default: { - case $::operatingsystem { - 'Amazon': { - $client_package_name = 'mysql' - $server_package_name = 'mysql-server' - $basedir = '/usr' - $config_file = '/etc/my.cnf' - $datadir = '/var/lib/mysql' - $log_error = '/var/log/mysqld.log' - $pidfile = '/var/run/mysqld/mysqld.pid' - $root_group = 'root' - $server_service_name = 'mysqld' - $socket = '/var/lib/mysql/mysql.sock' - $ssl_ca = '/etc/mysql/cacert.pem' - $ssl_cert = '/etc/mysql/server-cert.pem' - $ssl_key = '/etc/mysql/server-key.pem' - $tmpdir = '/tmp' - # mysql::bindings - $java_package_name = 'mysql-connector-java' - $perl_package_name = 'perl-DBD-MySQL' - $php_package_name = 'php-mysql' - $python_package_name = 'MySQL-python' - $ruby_package_name = 'ruby-mysql' - } - - default: { - fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat, Debian, and FreeBSD, or operatingsystem Amazon") - } - } - } - } - - case $::operatingsystem { - 'Ubuntu': { - $server_service_provider = upstart - } - default: { - $server_service_provider = undef - } - } - - $default_options = { - 'client' => { - 'port' => '3306', - 'socket' => $mysql::params::socket, - }, - 'mysqld_safe' => { - 'nice' => '0', - 'log-error' => $mysql::params::log_error, - 'socket' => $mysql::params::socket, - }, - 'mysqld' => { - 'basedir' => $mysql::params::basedir, - 'bind-address' => '127.0.0.1', - 'datadir' => $mysql::params::datadir, - 'expire_logs_days' => '10', - 'key_buffer_size' => '16M', - 'log-error' => $mysql::params::log_error, - 'max_allowed_packet' => '16M', - 'max_binlog_size' => '100M', - 'max_connections' => '151', - 'myisam_recover' => 'BACKUP', - 'pid-file' => $mysql::params::pidfile, - 'port' => '3306', - 'query_cache_limit' => '1M', - 'query_cache_size' => '16M', - 'skip-external-locking' => true, - 'socket' => $mysql::params::socket, - 'ssl' => false, - 'ssl-ca' => $mysql::params::ssl_ca, - 'ssl-cert' => $mysql::params::ssl_cert, - 'ssl-key' => $mysql::params::ssl_key, - 'thread_cache_size' => '8', - 'thread_stack' => '256K', - 'tmpdir' => $mysql::params::tmpdir, - 'user' => 'mysql', - }, - 'mysqldump' => { - 'max_allowed_packet' => '16M', - 'quick' => true, - 'quote-names' => true, - }, - 'isamchk' => { - 'key_buffer_size' => '16M', - }, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server.pp deleted file mode 100644 index ae8b208a18..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server.pp +++ /dev/null @@ -1,82 +0,0 @@ -# Class: mysql::server: See README.md for documentation. -class mysql::server ( - $config_file = $mysql::params::config_file, - $manage_config_file = $mysql::params::manage_config_file, - $old_root_password = $mysql::params::old_root_password, - $override_options = {}, - $package_ensure = $mysql::params::server_package_ensure, - $package_name = $mysql::params::server_package_name, - $purge_conf_dir = $mysql::params::purge_conf_dir, - $remove_default_accounts = false, - $restart = $mysql::params::restart, - $root_group = $mysql::params::root_group, - $root_password = $mysql::params::root_password, - $service_enabled = $mysql::params::server_service_enabled, - $service_manage = $mysql::params::server_service_manage, - $service_name = $mysql::params::server_service_name, - $service_provider = $mysql::params::server_service_provider, - $users = {}, - $grants = {}, - $databases = {}, - - # Deprecated parameters - $enabled = undef, - $manage_service = undef -) inherits mysql::params { - - # Deprecated parameters. - if $enabled { - crit('This parameter has been renamed to service_enabled.') - $real_service_enabled = $enabled - } else { - $real_service_enabled = $service_enabled - } - if $manage_service { - crit('This parameter has been renamed to service_manage.') - $real_service_manage = $manage_service - } else { - $real_service_manage = $service_manage - } - - # Create a merged together set of options. Rightmost hashes win over left. - $options = mysql_deepmerge($mysql::params::default_options, $override_options) - - Class['mysql::server::root_password'] -> Mysql::Db <| |> - - include '::mysql::server::install' - include '::mysql::server::config' - include '::mysql::server::service' - include '::mysql::server::root_password' - include '::mysql::server::providers' - - if $remove_default_accounts { - class { '::mysql::server::account_security': - require => Anchor['mysql::server::end'], - } - } - - anchor { 'mysql::server::start': } - anchor { 'mysql::server::end': } - - if $restart { - Anchor['mysql::server::start'] -> - Class['mysql::server::install'] -> - # Only difference between the blocks is that we use ~> to restart if - # restart is set to true. - Class['mysql::server::config'] ~> - Class['mysql::server::service'] -> - Class['mysql::server::root_password'] -> - Class['mysql::server::providers'] -> - Anchor['mysql::server::end'] - } else { - Anchor['mysql::server::start'] -> - Class['mysql::server::install'] -> - Class['mysql::server::config'] -> - Class['mysql::server::service'] -> - Class['mysql::server::root_password'] -> - Class['mysql::server::providers'] -> - Anchor['mysql::server::end'] - } - - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/account_security.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/account_security.pp deleted file mode 100644 index 36d943757c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/account_security.pp +++ /dev/null @@ -1,22 +0,0 @@ -class mysql::server::account_security { - mysql_user { - [ "root@${::fqdn}", - 'root@127.0.0.1', - 'root@::1', - "@${::fqdn}", - '@localhost', - '@%']: - ensure => 'absent', - require => Anchor['mysql::server::end'], - } - if ($::fqdn != $::hostname) { - mysql_user { ["root@${::hostname}", "@${::hostname}"]: - ensure => 'absent', - require => Anchor['mysql::server::end'], - } - } - mysql_database { 'test': - ensure => 'absent', - require => Anchor['mysql::server::end'], - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/backup.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/backup.pp deleted file mode 100644 index a33b2b03b4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/backup.pp +++ /dev/null @@ -1,61 +0,0 @@ -# See README.me for usage. -class mysql::server::backup ( - $backupuser, - $backuppassword, - $backupdir, - $backupdirmode = '0700', - $backupdirowner = 'root', - $backupdirgroup = 'root', - $backupcompress = true, - $backuprotate = 30, - $ignore_events = true, - $delete_before_dump = false, - $backupdatabases = [], - $file_per_database = false, - $ensure = 'present', - $time = ['23', '5'], - $postscript = false, -) { - - mysql_user { "${backupuser}@localhost": - ensure => $ensure, - password_hash => mysql_password($backuppassword), - provider => 'mysql', - require => Class['mysql::server::root_password'], - } - - mysql_grant { "${backupuser}@localhost/*.*": - ensure => present, - user => "${backupuser}@localhost", - table => '*.*', - privileges => [ 'SELECT', 'RELOAD', 'LOCK TABLES', 'SHOW VIEW' ], - require => Mysql_user["${backupuser}@localhost"], - } - - cron { 'mysql-backup': - ensure => $ensure, - command => '/usr/local/sbin/mysqlbackup.sh', - user => 'root', - hour => $time[0], - minute => $time[1], - require => File['mysqlbackup.sh'], - } - - file { 'mysqlbackup.sh': - ensure => $ensure, - path => '/usr/local/sbin/mysqlbackup.sh', - mode => '0700', - owner => 'root', - group => 'root', - content => template('mysql/mysqlbackup.sh.erb'), - } - - file { 'mysqlbackupdir': - ensure => 'directory', - path => $backupdir, - mode => $backupdirmode, - owner => $backupdirowner, - group => $backupdirgroup, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/config.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/config.pp deleted file mode 100644 index c51f22ff97..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/config.pp +++ /dev/null @@ -1,30 +0,0 @@ -# See README.me for options. -class mysql::server::config { - - $options = $mysql::server::options - - File { - owner => 'root', - group => $mysql::server::root_group, - mode => '0400', - } - - file { '/etc/mysql': - ensure => directory, - mode => '0755', - } - - file { '/etc/mysql/conf.d': - ensure => directory, - mode => '0755', - recurse => $mysql::server::purge_conf_dir, - purge => $mysql::server::purge_conf_dir, - } - - if $mysql::server::manage_config_file { - file { $mysql::server::config_file: - content => template('mysql/my.cnf.erb'), - mode => '0644', - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/install.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/install.pp deleted file mode 100644 index dcb04cb128..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/install.pp +++ /dev/null @@ -1,9 +0,0 @@ -# -class mysql::server::install { - - package { 'mysql-server': - ensure => $mysql::server::package_ensure, - name => $mysql::server::package_name, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/monitor.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/monitor.pp deleted file mode 100644 index 9e86b92c77..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/monitor.pp +++ /dev/null @@ -1,24 +0,0 @@ -#This is a helper class to add a monitoring user to the database -class mysql::server::monitor ( - $mysql_monitor_username, - $mysql_monitor_password, - $mysql_monitor_hostname -) { - - Anchor['mysql::server::end'] -> Class['mysql::server::monitor'] - - mysql_user { "${mysql_monitor_username}@${mysql_monitor_hostname}": - ensure => present, - password_hash => mysql_password($mysql_monitor_password), - require => Class['mysql::server::service'], - } - - mysql_grant { "${mysql_monitor_username}@${mysql_monitor_hostname}/*.*": - ensure => present, - user => "${mysql_monitor_username}@${mysql_monitor_hostname}", - table => '*.*', - privileges => [ 'PROCESS', 'SUPER' ], - require => Mysql_user["${mysql_monitor_username}@${mysql_monitor_hostname}"], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/mysqltuner.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/mysqltuner.pp deleted file mode 100644 index 23d19a5585..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/mysqltuner.pp +++ /dev/null @@ -1,9 +0,0 @@ -# -class mysql::server::mysqltuner($ensure='present') { - # mysql performance tester - file { '/usr/local/bin/mysqltuner': - ensure => $ensure, - mode => '0550', - source => 'puppet:///modules/mysql/mysqltuner.pl', - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/providers.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/providers.pp deleted file mode 100644 index b651172fca..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/providers.pp +++ /dev/null @@ -1,8 +0,0 @@ -# Convenience class to call each of the three providers with the corresponding -# hashes provided in mysql::server. -# See README.md for details. -class mysql::server::providers { - create_resources('mysql_user', $mysql::server::users) - create_resources('mysql_grant', $mysql::server::grants) - create_resources('mysql_database', $mysql::server::databases) -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/root_password.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/root_password.pp deleted file mode 100644 index e75412dabe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/root_password.pp +++ /dev/null @@ -1,21 +0,0 @@ -# -class mysql::server::root_password { - - $options = $mysql::server::options - - # manage root password if it is set - if $mysql::server::root_password != 'UNSET' { - mysql_user { 'root@localhost': - ensure => present, - password_hash => mysql_password($mysql::server::root_password), - } - - file { "${::root_home}/.my.cnf": - content => template('mysql/my.cnf.pass.erb'), - owner => 'root', - mode => '0600', - require => Mysql_user['root@localhost'], - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/service.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/service.pp deleted file mode 100644 index c60e036623..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/manifests/server/service.pp +++ /dev/null @@ -1,19 +0,0 @@ -# -class mysql::server::service { - - if $mysql::server::real_service_enabled { - $service_ensure = 'running' - } else { - $service_ensure = 'stopped' - } - - if $mysql::server::real_service_manage { - service { 'mysqld': - ensure => $service_ensure, - name => $mysql::server::service_name, - enable => $mysql::server::real_service_enabled, - provider => $mysql::server::service_provider, - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/metadata.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/metadata.json deleted file mode 100644 index e1a8c79053..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/metadata.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "operatingsystem_support": [ - { - "operatingsystem": "RedHat", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "CentOS", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "OracleLinux", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "Scientific", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "SLES", - "operatingsystemrelease": [ - "11 SP1" - ] - }, - { - "operatingsystem": "Debian", - "operatingsystemrelease": [ - "6", - "7" - ] - }, - { - "operatingsystem": "Ubuntu", - "operatingsystemrelease": [ - "10.04", - "12.04" - ] - } - ], - "requirements": [ - { - "name": "pe", - "version_requirement": "3.2.x" - }, - { - "name": "puppet", - "version_requirement": "3.x" - } - ], - "name": "puppetlabs-mysql", - "version": "2.2.3", - "source": "git://github.com/puppetlabs/puppetlabs-mysql.git", - "author": "Puppet Labs", - "license": "Apache 2.0", - "summary": "Mysql module", - "description": "Mysql module", - "project_page": "http://github.com/puppetlabs/puppetlabs-mysql", - "dependencies": [ - { - "name": "puppetlabs/stdlib", - "version_requirement": ">= 3.2.0" - } - ] -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_account_delete_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_account_delete_spec.rb deleted file mode 100644 index 07c99a183c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_account_delete_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'mysql::server::account_security class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'running puppet code' do - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': remove_default_accounts => true } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - - describe 'accounts' do - it 'should delete accounts' do - shell("mysql -e 'show grants for root@127.0.0.1;'", :acceptable_exit_codes => 1) - end - - it 'should delete databases' do - shell("mysql -e 'show databases;' |grep test", :acceptable_exit_codes => 1) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_backup_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_backup_spec.rb deleted file mode 100644 index 131520661f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_backup_spec.rb +++ /dev/null @@ -1,64 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'mysql::server::backup class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - context 'should work with no errors' do - it 'when configuring mysql backups' do - pp = <<-EOS - class { 'mysql::server': root_password => 'password' } - mysql::db { 'backup1': - user => 'backup', - password => 'secret', - } - - class { 'mysql::server::backup': - backupuser => 'myuser', - backuppassword => 'mypassword', - backupdir => '/tmp/backups', - backupcompress => true, - postscript => [ - 'rm -rf /var/tmp/mysqlbackups', - 'rm -f /var/tmp/mysqlbackups.done', - 'cp -r /tmp/backups /var/tmp/mysqlbackups', - 'touch /var/tmp/mysqlbackups.done', - ], - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stderr).to eq("") - end - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stderr).to eq("") - end - end - end - - describe 'mysqlbackup.sh' do - it 'should run mysqlbackup.sh with no errors' do - shell("/usr/local/sbin/mysqlbackup.sh") do |r| - expect(r.stderr).to eq("") - end - end - - it 'should dump all databases to single file' do - shell('ls -l /tmp/backups/mysql_backup_*-*.sql.bz2 | wc -l') do |r| - expect(r.stdout).to match(/1/) - expect(r.exit_code).to be_zero - end - end - - context 'should create one file per database per run' do - it 'executes mysqlbackup.sh a second time' do - shell('sleep 1') - shell('/usr/local/sbin/mysqlbackup.sh') - end - - it 'creates at least one backup tarball' do - shell('ls -l /tmp/backups/mysql_backup_*-*.sql.bz2 | wc -l') do |r| - expect(r.stdout).to match(/2/) - expect(r.exit_code).to be_zero - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_bindings_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_bindings_spec.rb deleted file mode 100644 index b7e25d63d3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_bindings_spec.rb +++ /dev/null @@ -1,117 +0,0 @@ -require 'spec_helper_acceptance' - -osfamily = fact('osfamily') -operatingsystem = fact('operatingsystem') - -case osfamily -when 'RedHat' - java_package = 'mysql-connector-java' - perl_package = 'perl-DBD-MySQL' - php_package = 'php-mysql' - python_package = 'MySQL-python' - ruby_package = 'ruby-mysql' -when 'Suse' - java_package = 'mysql-connector-java' - perl_package = 'perl-DBD-mysql' - php_package = 'apache2-mod_php53' - python_package = 'python-mysql' - case operatingsystem - when /OpenSuSE/ - ruby_package = 'rubygem-mysql' - when /(SLES|SLED)/ - ruby_package = 'ruby-mysql' - end -when 'Debian' - java_package = 'libmysql-java' - perl_package = 'libdbd-mysql-perl' - php_package = 'php5-mysql' - python_package = 'python-mysqldb' - ruby_package = 'libmysql-ruby' -when 'FreeBSD' - java_package = 'databases/mysql-connector-java' - perl_package = 'p5-DBD-mysql' - php_package = 'php5-mysql' - python_package = 'databases/py-MySQLdb' - ruby_package = 'ruby-mysql' -else - case operatingsystem - when 'Amazon' - java_package = 'mysql-connector-java' - perl_package = 'perl-DBD-MySQL' - php_package = 'php5-mysql' - python_package = 'MySQL-python' - ruby_package = 'ruby-mysql' - end -end - -describe 'mysql::bindings class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - - describe 'running puppet code' do - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::bindings': } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - end - - describe 'all parameters' do - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::bindings': - java_enable => true, - perl_enable => true, - php_enable => true, - python_enable => true, - ruby_enable => true, - java_package_ensure => present, - perl_package_ensure => present, - php_package_ensure => present, - python_package_ensure => present, - ruby_package_ensure => present, - java_package_name => #{java_package}, - perl_package_name => #{perl_package}, - php_package_name => #{php_package}, - python_package_name => #{python_package}, - ruby_package_name => #{ruby_package}, - java_package_provider => undef, - perl_package_provider => undef, - php_package_provider => undef, - python_package_provider => undef, - ruby_package_provider => undef, - } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - - describe package(java_package) do - it { should be_installed } - end - - describe package(perl_package) do - it { should be_installed } - end - - # This package is not available out of the box and adding in other repos - # is a bit much for the scope of this test. - unless fact('osfamily') == 'RedHat' - describe package(php_package) do - it { should be_installed } - end - end - - describe package(python_package) do - it { should be_installed } - end - - describe package(ruby_package) do - it { should be_installed } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_db_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_db_spec.rb deleted file mode 100644 index 1e8df8a1f4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_db_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'mysql::db define', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'creating a database' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': root_password => 'password' } - mysql::db { 'spec1': - user => 'root1', - password => 'password', - } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - expect(shell("mysql -e 'show databases;'|grep spec1").exit_code).to be_zero - end - end - - describe 'creating a database with post-sql' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': override_options => { 'root_password' => 'password' } } - file { '/tmp/spec.sql': - ensure => file, - content => 'CREATE TABLE table1 (id int);', - before => Mysql::Db['spec2'], - } - mysql::db { 'spec2': - user => 'root1', - password => 'password', - sql => '/tmp/spec.sql', - } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - it 'should have the table' do - expect(shell("mysql -e 'show tables;' spec2|grep table1").exit_code).to be_zero - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_config_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_config_spec.rb deleted file mode 100644 index d327dd29ae..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_config_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'config location', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - it 'creates the file elsewhere' do - pp = <<-EOS - class { 'mysql::server': - config_file => '/etc/testmy.cnf', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/testmy.cnf') do - it { should be_file } - end -end - -describe 'manage_config_file', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - it 'wont reset the location of my.cnf' do - pp = <<-EOS - class { 'mysql::server': - config_file => '/etc/my.cnf', - manage_config_file => false, - service_manage => false, - } - EOS - # Make sure this doesn't exist so we can test if puppet - # readded it. It may not exist in the first place on - # some platforms. - shell('rm /etc/my.cnf', :acceptable_exit_codes => [0,1,2]) - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/my.cnf') do - it { should_not be_file } - end -end - -describe 'resets', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - it 'cleans up' do - pp = <<-EOS - class { 'mysql::server': } - EOS - apply_manifest(pp, :catch_failures => true) - shell('rm /etc/testmy.cnf') - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_monitor_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_monitor_spec.rb deleted file mode 100644 index 9c66334e5b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_monitor_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'mysql::server::monitor class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': root_password => 'password' } - - class { 'mysql::server::monitor': - mysql_monitor_username => 'monitoruser', - mysql_monitor_password => 'monitorpass', - mysql_monitor_hostname => 'localhost', - } - EOS - - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - - it 'should run mysqladmin ping with no errors' do - expect(shell("mysqladmin -u monitoruser -pmonitorpass -h localhost ping").stdout).to match(/mysqld is alive/) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_root_password_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_root_password_spec.rb deleted file mode 100644 index f6035f0b36..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_root_password_spec.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'mysql::server::root_password class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - - describe 'reset' do - it 'shuts down mysql' do - pp = <<-EOS - class { 'mysql::server': service_enabled => false } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'deletes the /root/.my.cnf password' do - shell('rm -rf /root/.my.cnf') - end - - it 'deletes all databases' do - case fact('osfamily') - when 'RedHat', 'Suse' - shell('rm -rf `grep datadir /etc/my.cnf | cut -d" " -f 3`/*') - when 'Debian' - shell('rm -rf `grep datadir /etc/mysql/my.cnf | cut -d" " -f 3`/*') - shell('mysql_install_db') - end - end - - it 'starts up mysql' do - pp = <<-EOS - class { 'mysql::server': service_enabled => true } - EOS - - puppet_apply(pp, :catch_failures => true) - end - end - - describe 'when unset' do - it 'should work' do - pp = <<-EOS - class { 'mysql::server': root_password => 'test' } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - end - - describe 'when set' do - it 'should work' do - pp = <<-EOS - class { 'mysql::server': root_password => 'new', old_root_password => 'test' } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - end -end - -# Debian relies on a debian-sys-maint@ account to do almost everything. -# Without recreating this account we can't even stop the service in future -# tests. -if fact('osfamily') == 'Debian' - describe 'readd debian user' do - it 'readds the user' do - shell("MYSQL_PASSWORD=`head -5 /etc/mysql/debian.cnf | grep password | cut -d' ' -f 3`; mysql -NBe \"GRANT ALL PRIVILEGES ON *.* to 'debian-sys-maint'@'localhost' IDENTIFIED BY '${MYSQL_PASSWORD}' WITH GRANT OPTION;\"") - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_spec.rb deleted file mode 100644 index 938368dbf9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/mysql_server_spec.rb +++ /dev/null @@ -1,281 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'mysql class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - case fact('osfamily') - when 'RedHat' - package_name = 'mysql-server' - service_name = 'mysqld' - service_provider = 'undef' - mycnf = '/etc/my.cnf' - when 'Suse' - case fact('operatingsystem') - when 'OpenSuSE' - package_name = 'mysql-community-server' - service_name = 'mysql' - service_provider = 'undef' - mycnf = '/etc/my.cnf' - when 'SLES' - package_name = 'mysql' - service_name = 'mysql' - service_provider = 'undef' - mycnf = '/etc/my.cnf' - end - when 'Debian' - package_name = 'mysql-server' - service_name = 'mysql' - service_provider = 'undef' - mycnf = '/etc/mysql/my.cnf' - when 'Ubuntu' - package_name = 'mysql-server' - service_name = 'mysql' - service_provider = 'upstart' - mycnf = '/etc/mysql/my.cnf' - end - - describe 'running puppet code' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': } - EOS - - # Run it twice and test for idempotency - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero - end - - describe package(package_name) do - it { should be_installed } - end - - describe service(service_name) do - it { should be_running } - it { should be_enabled } - end - end - - describe 'mycnf' do - it 'should contain sensible values' do - pp = <<-EOS - class { 'mysql::server': } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file(mycnf) do - it { should contain 'key_buffer_size = 16M' } - it { should contain 'max_binlog_size = 100M' } - it { should contain 'query_cache_size = 16M' } - end - end - - describe 'my.cnf changes' do - it 'sets values' do - pp = <<-EOS - class { 'mysql::server': - override_options => { 'mysqld' => - { 'key_buffer' => '32M', - 'max_binlog_size' => '200M', - 'query_cache_size' => '32M', - } - } - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file(mycnf) do - it { should contain 'key_buffer = 32M' } - it { should contain 'max_binlog_size = 200M' } - it { should contain 'query_cache_size = 32M' } - end - end - - describe 'my.cnf should contain multiple instances of the same option' do - it 'sets multiple values' do - pp = <<-EOS - class { 'mysql::server': - override_options => { 'mysqld' => - { 'replicate-do-db' => ['base1', 'base2', 'base3'], } - } - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file(mycnf) do - it { should contain 'replicate-do-db = base1' } - it { should contain 'replicate-do-db = base2' } - it { should contain 'replicate-do-db = base3' } - end - end - - describe 'package_ensure => absent' do - it 'uninstalls mysql' do - pp = <<-EOS - class { 'mysql::server': - service_enabled => false, - package_ensure => absent, - package_name => #{package_name} - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe package(package_name) do - it { should_not be_installed } - end - end - - describe 'package_ensure => present' do - it 'installs mysql' do - pp = <<-EOS - class { 'mysql::server': - package_ensure => present, - package_name => #{package_name} - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe package(package_name) do - it { should be_installed } - end - end - - describe 'purge_conf_dir' do - - it 'purges the conf dir' do - pp = <<-EOS - class { 'mysql::server': - purge_conf_dir => true - } - EOS - shell('touch /etc/mysql/conf.d/test.conf') - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/mysql/conf.d/test.conf') do - it { should_not be_file } - end - end - - describe 'restart' do - it 'restart => true' do - pp = <<-EOS - class { 'mysql::server': - restart => true, - override_options => { 'mysqldump' => { 'default-character-set' => 'UTF-8' } } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.exit_code).to eq(2) - expect(r.stdout).to match(/Scheduling refresh/) - end - end - it 'restart => false' do - pp = <<-EOS - class { 'mysql::server': - restart => false, - override_options => { 'mysqldump' => { 'default-character-set' => 'UTF-16' } } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.exit_code).to eq(2) - expect(r.stdout).to_not match(/Scheduling refresh/) - end - end - end - - describe 'root_group' do - it 'creates a group' do - pp = "group { 'test': ensure => present }" - apply_manifest(pp, :catch_failures => true) - end - - it 'sets the group of files' do - pp = <<-EOS - class { 'mysql::server': - root_group => 'test', - config_file => '/tmp/mysql_group_test', - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file('/tmp/mysql_group_test') do - it { should be_grouped_into 'test' } - end - end - - describe 'service parameters' do - it 'calls all parameters' do - pp = <<-EOS - class { 'mysql::server': - service_enabled => true, - service_manage => true, - service_name => #{service_name}, - service_provider => #{service_provider} - } - EOS - apply_manifest(pp, :catch_failures => true) - end - end - - describe 'users, grants, and databases' do - it 'are created' do - pp = <<-EOS - class { 'mysql::server': - users => { - 'zerg1@localhost' => { - ensure => 'present', - max_connections_per_hour => '0', - max_queries_per_hour => '0', - max_updates_per_hour => '0', - max_user_connections => '0', - password_hash => '*F3A2A51A9B0F2BE2468926B4132313728C250DBF', - } - }, - grants => { - 'zerg1@localhost/zergdb.*' => { - ensure => 'present', - options => ['GRANT'], - privileges => ['SELECT', 'INSERT', 'UPDATE', 'DELETE'], - table => 'zergdb.*', - user => 'zerg1@localhost', - } - }, - databases => { - 'zergdb' => { - ensure => 'present', - charset => 'utf8', - } - }, - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - it 'has a user' do - shell("mysql -NBe \"select '1' from mysql.user where CONCAT(user, '@', host) = 'zerg1@localhost'\"") do |r| - expect(r.stdout).to match(/^1$/) - expect(r.stderr).to be_empty - end - end - it 'has a grant' do - shell("mysql -NBe \"SHOW GRANTS FOR zerg1@localhost\"") do |r| - expect(r.stdout).to match(/GRANT SELECT, INSERT, UPDATE, DELETE ON `zergdb`.* TO 'zerg1'@'localhost' WITH GRANT OPTION/) - expect(r.stderr).to be_empty - end - end - it 'has a database' do - shell("mysql -NBe \"SHOW DATABASES LIKE 'zergdb'\"") do |r| - expect(r.stdout).to match(/zergdb/) - expect(r.stderr).to be_empty - end - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/centos-64-x64-pe.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/centos-64-x64-pe.yml deleted file mode 100644 index 7d9242f1b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/centos-64-x64-pe.yml +++ /dev/null @@ -1,12 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - - database - - dashboard - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: pe diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/default.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/default.yml deleted file mode 100644 index 05540ed8c5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/fedora-18-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/fedora-18-x64.yml deleted file mode 100644 index 1361649830..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/fedora-18-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - fedora-18-x64: - roles: - - master - platform: fedora-18-x86_64 - box : fedora-18-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/sles-11-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/sles-11-x64.yml deleted file mode 100644 index 41abe2135e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/sles-11-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - sles-11-x64.local: - roles: - - master - platform: sles-11-x64 - box : sles-11sp1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml deleted file mode 100644 index 5ca1514e40..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-10044-x64: - roles: - - master - platform: ubuntu-10.04-amd64 - box : ubuntu-server-10044-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml deleted file mode 100644 index d065b304f8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_database_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_database_spec.rb deleted file mode 100644 index c064209916..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_database_spec.rb +++ /dev/null @@ -1,64 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'mysql_database', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'setup' do - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - end - - describe 'creating database' do - it 'should work without errors' do - pp = <<-EOS - mysql_database { 'spec_db': - ensure => present, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should find the database' do - shell("mysql -NBe \"SHOW DATABASES LIKE 'spec_db'\"") do |r| - expect(r.stdout).to match(/^spec_db$/) - expect(r.stderr).to be_empty - end - end - end - - describe 'charset and collate' do - it 'should create two db of different types idempotently' do - pp = <<-EOS - mysql_database { 'spec_latin1': - charset => 'latin1', - collate => 'latin1_swedish_ci', - } - mysql_database { 'spec_utf8': - charset => 'utf8', - collate => 'utf8_general_ci', - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - it 'should find latin1 db' do - shell("mysql -NBe \"SHOW VARIABLES LIKE '%_database'\" spec_latin1") do |r| - expect(r.stdout).to match(/^character_set_database\tlatin1\ncollation_database\tlatin1_swedish_ci$/) - expect(r.stderr).to be_empty - end - end - - it 'should find utf8 db' do - shell("mysql -NBe \"SHOW VARIABLES LIKE '%_database'\" spec_utf8") do |r| - expect(r.stdout).to match(/^character_set_database\tutf8\ncollation_database\tutf8_general_ci$/) - expect(r.stderr).to be_empty - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_grant_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_grant_spec.rb deleted file mode 100644 index df8bea4f31..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_grant_spec.rb +++ /dev/null @@ -1,308 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'mysql_grant', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - - describe 'setup' do - it 'setup mysql::server' do - pp = <<-EOS - class { 'mysql::server': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - end - - describe 'missing privileges for user' do - it 'should fail' do - pp = <<-EOS - mysql_grant { 'test1@tester/test.*': - ensure => 'present', - table => 'test.*', - user => 'test1@tester', - } - EOS - - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/privileges parameter is required/) - end - - it 'should not find the user' do - expect(shell("mysql -NBe \"SHOW GRANTS FOR test1@tester\"", { :acceptable_exit_codes => 1}).stderr).to match(/There is no such grant defined for user 'test1' on host 'tester'/) - end - end - - describe 'missing table for user' do - it 'should fail' do - pp = <<-EOS - mysql_grant { 'atest@tester/test.*': - ensure => 'present', - user => 'atest@tester', - privileges => ['ALL'], - } - EOS - - apply_manifest(pp, :expect_failures => true) - end - - it 'should not find the user' do - expect(shell("mysql -NBe \"SHOW GRANTS FOR atest@tester\"", {:acceptable_exit_codes => 1}).stderr).to match(/There is no such grant defined for user 'atest' on host 'tester'/) - end - end - - describe 'adding privileges' do - it 'should work without errors' do - pp = <<-EOS - mysql_grant { 'test2@tester/test.*': - ensure => 'present', - table => 'test.*', - user => 'test2@tester', - privileges => ['SELECT', 'UPDATE'], - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should find the user' do - shell("mysql -NBe \"SHOW GRANTS FOR test2@tester\"") do |r| - expect(r.stdout).to match(/GRANT SELECT, UPDATE.*TO 'test2'@'tester'/) - expect(r.stderr).to be_empty - end - end - end - - describe 'adding option' do - it 'should work without errors' do - pp = <<-EOS - mysql_grant { 'test3@tester/test.*': - ensure => 'present', - table => 'test.*', - user => 'test3@tester', - options => ['GRANT'], - privileges => ['SELECT', 'UPDATE'], - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should find the user' do - shell("mysql -NBe \"SHOW GRANTS FOR test3@tester\"") do |r| - expect(r.stdout).to match(/GRANT SELECT, UPDATE ON `test`.* TO 'test3'@'tester' WITH GRANT OPTION$/) - expect(r.stderr).to be_empty - end - end - end - - describe 'adding all privileges without table' do - it 'should fail' do - pp = <<-EOS - mysql_grant { 'test4@tester/test.*': - ensure => 'present', - user => 'test4@tester', - options => ['GRANT'], - privileges => ['SELECT', 'UPDATE', 'ALL'], - } - EOS - - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/table parameter is required./) - end - end - - describe 'adding all privileges' do - it 'should only try to apply ALL' do - pp = <<-EOS - mysql_grant { 'test4@tester/test.*': - ensure => 'present', - table => 'test.*', - user => 'test4@tester', - options => ['GRANT'], - privileges => ['SELECT', 'UPDATE', 'ALL'], - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should find the user' do - shell("mysql -NBe \"SHOW GRANTS FOR test4@tester\"") do |r| - expect(r.stdout).to match(/GRANT ALL PRIVILEGES ON `test`.* TO 'test4'@'tester' WITH GRANT OPTION/) - expect(r.stderr).to be_empty - end - end - end - - # Test combinations of user@host to ensure all cases work. - describe 'short hostname' do - it 'should apply' do - pp = <<-EOS - mysql_grant { 'test@short/test.*': - ensure => 'present', - table => 'test.*', - user => 'test@short', - privileges => 'ALL', - } - mysql_grant { 'test@long.hostname.com/test.*': - ensure => 'present', - table => 'test.*', - user => 'test@long.hostname.com', - privileges => 'ALL', - } - mysql_grant { 'test@192.168.5.6/test.*': - ensure => 'present', - table => 'test.*', - user => 'test@192.168.5.6', - privileges => 'ALL', - } - mysql_grant { 'test@2607:f0d0:1002:0051:0000:0000:0000:0004/test.*': - ensure => 'present', - table => 'test.*', - user => 'test@2607:f0d0:1002:0051:0000:0000:0000:0004', - privileges => 'ALL', - } - mysql_grant { 'test@::1/128/test.*': - ensure => 'present', - table => 'test.*', - user => 'test@::1/128', - privileges => 'ALL', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'finds short hostname' do - shell("mysql -NBe \"SHOW GRANTS FOR test@short\"") do |r| - expect(r.stdout).to match(/GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'short'/) - expect(r.stderr).to be_empty - end - end - it 'finds long hostname' do - shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'long.hostname.com'\"") do |r| - expect(r.stdout).to match(/GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'long.hostname.com'/) - expect(r.stderr).to be_empty - end - end - it 'finds ipv4' do - shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'192.168.5.6'\"") do |r| - expect(r.stdout).to match(/GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'192.168.5.6'/) - expect(r.stderr).to be_empty - end - end - it 'finds ipv6' do - shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'2607:f0d0:1002:0051:0000:0000:0000:0004'\"") do |r| - expect(r.stdout).to match(/GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'2607:f0d0:1002:0051:0000:0000:0000:0004'/) - expect(r.stderr).to be_empty - end - end - it 'finds short ipv6' do - shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'::1/128'\"") do |r| - expect(r.stdout).to match(/GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'::1\/128'/) - expect(r.stderr).to be_empty - end - end - end - - describe 'complex test' do - it 'setup mysql::server' do - pp = <<-EOS - $dbSubnet = '10.10.10.%' - - mysql_database { 'foo': - ensure => present, - } - - exec { 'mysql-create-table': - command => '/usr/bin/mysql -NBe "CREATE TABLE foo.bar (name VARCHAR(20))"', - environment => "HOME=${::root_home}", - unless => '/usr/bin/mysql -NBe "SELECT 1 FROM foo.bar LIMIT 1;"', - require => Mysql_database['foo'], - } - - Mysql_grant { - ensure => present, - options => ['GRANT'], - privileges => ['ALL'], - table => '*.*', - require => [ Mysql_database['foo'], Exec['mysql-create-table'] ], - } - - mysql_grant { "user1@${dbSubnet}/*.*": - user => "user1@${dbSubnet}", - } - mysql_grant { "user2@${dbSubnet}/foo.bar": - privileges => ['SELECT', 'INSERT', 'UPDATE'], - user => "user2@${dbSubnet}", - table => 'foo.bar', - } - mysql_grant { "user3@${dbSubnet}/foo.*": - privileges => ['SELECT', 'INSERT', 'UPDATE'], - user => "user3@${dbSubnet}", - table => 'foo.*', - } - mysql_grant { 'web@%/*.*': - user => 'web@%', - } - mysql_grant { "web@${dbSubnet}/*.*": - user => "web@${dbSubnet}", - } - mysql_grant { "web@${fqdn}/*.*": - user => "web@${fqdn}", - } - mysql_grant { 'web@localhost/*.*': - user => 'web@localhost', - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - end - - describe 'lower case privileges' do - it 'create ALL privs' do - pp = <<-EOS - mysql_grant { 'lowercase@localhost/*.*': - user => 'lowercase@localhost', - privileges => 'ALL', - table => '*.*', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'create lowercase all privs' do - pp = <<-EOS - mysql_grant { 'lowercase@localhost/*.*': - user => 'lowercase@localhost', - privileges => 'all', - table => '*.*', - } - EOS - - expect(apply_manifest(pp, :catch_failures => true).exit_code).to eq(0) - end - end - - describe 'adding procedure privileges' do - it 'should work without errors' do - pp = <<-EOS - mysql_grant { 'test2@tester/PROCEDURE test.simpleproc': - ensure => 'present', - table => 'PROCEDURE test.simpleproc', - user => 'test2@tester', - privileges => ['EXECUTE'], - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should find the user' do - shell("mysql -NBe \"SHOW GRANTS FOR test2@tester\"") do |r| - expect(r.stdout).to match(/GRANT EXECUTE ON PROCEDURE `test`.`simpleproc` TO 'test2'@'tester'/) - expect(r.stderr).to be_empty - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_user_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_user_spec.rb deleted file mode 100644 index 65b403f193..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/types/mysql_user_spec.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'mysql_user', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'setup' do - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': } - EOS - - apply_manifest(pp, :catch_failures => true) - end - end - - describe 'adding user' do - it 'should work without errors' do - pp = <<-EOS - mysql_user { 'ashp@localhost': - password_hash => '6f8c114b58f2ce9e', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should find the user' do - shell("mysql -NBe \"select '1' from mysql.user where CONCAT(user, '@', host) = 'ashp@localhost'\"") do |r| - expect(r.stdout).to match(/^1$/) - expect(r.stderr).to be_empty - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/unsupported_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/unsupported_spec.rb deleted file mode 100644 index 449f35a63b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/acceptance/unsupported_spec.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - it 'should fail' do - pp = <<-EOS - class { 'mysql::server': } - EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/unsupported osfamily/i) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_bindings_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_bindings_spec.rb deleted file mode 100644 index 8ec4428bb0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_bindings_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -require 'spec_helper' - -describe 'mysql::bindings' do - let(:params) {{ - 'java_enable' => true, - 'perl_enable' => true, - 'php_enable' => true, - 'python_enable' => true, - 'ruby_enable' => true, - }} - - shared_examples 'bindings' do |osfamily, operatingsystem, java_name, perl_name, php_name, python_name, ruby_name| - let :facts do - { :osfamily => osfamily, :operatingsystem => operatingsystem, :root_home => '/root'} - end - it { should contain_package('mysql-connector-java').with( - :name => java_name, - :ensure => 'present' - )} - it { should contain_package('perl_mysql').with( - :name => perl_name, - :ensure => 'present' - )} - it { should contain_package('python-mysqldb').with( - :name => python_name, - :ensure => 'present' - )} - it { should contain_package('ruby_mysql').with( - :name => ruby_name, - :ensure => 'present' - )} - end - - context 'Debian' do - it_behaves_like 'bindings', 'Debian', 'Debian', 'libmysql-java', 'libdbd-mysql-perl', 'php5-mysql', 'python-mysqldb', 'libmysql-ruby' - it_behaves_like 'bindings', 'Debian', 'Ubuntu', 'libmysql-java', 'libdbd-mysql-perl', 'php5-mysql', 'python-mysqldb', 'libmysql-ruby' - end - - context 'freebsd' do - it_behaves_like 'bindings', 'FreeBSD', 'FreeBSD', 'databases/mysql-connector-java', 'p5-DBD-mysql', 'databases/php5-mysql', 'databases/py-MySQLdb', 'databases/ruby-mysql' - end - - context 'redhat' do - it_behaves_like 'bindings', 'RedHat', 'RedHat', 'mysql-connector-java', 'perl-DBD-MySQL', 'php-mysql', 'MySQL-python', 'ruby-mysql' - it_behaves_like 'bindings', 'RedHat', 'OpenSuSE', 'mysql-connector-java', 'perl-DBD-MySQL', 'php-mysql', 'MySQL-python', 'ruby-mysql' - end - - describe 'on any other os' do - let :facts do - {:osfamily => 'foo', :root_home => '/root'} - end - - it 'should fail' do - expect { subject }.to raise_error(/Unsupported osfamily: foo/) - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_client_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_client_spec.rb deleted file mode 100644 index d7386d17a6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_client_spec.rb +++ /dev/null @@ -1,16 +0,0 @@ -describe 'mysql::client' do - let(:facts) {{ :osfamily => 'RedHat' }} - - context 'with defaults' do - it { should_not contain_class('mysql::bindings') } - it { should contain_package('mysql_client') } - end - - context 'with bindings enabled' do - let(:params) {{ :bindings_enable => true }} - - it { should contain_class('mysql::bindings') } - it { should contain_package('mysql_client') } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_account_security_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_account_security_spec.rb deleted file mode 100644 index 1d0e7506c4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_account_security_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -require 'spec_helper' - -describe 'mysql::server::account_security' do - - let :facts do { - :fqdn => 'myhost.mydomain', - :hostname => 'myhost', - :root_home => '/root' - } - end - - it 'should remove Mysql_User[root@myhost.mydomain]' do - should contain_mysql_user('root@myhost.mydomain').with_ensure('absent') - end - it 'should remove Mysql_User[root@myhost]' do - should contain_mysql_user('root@myhost').with_ensure('absent') - end - it 'should remove Mysql_User[root@127.0.0.1]' do - should contain_mysql_user('root@127.0.0.1').with_ensure('absent') - end - it 'should remove Mysql_User[root@::1]' do - should contain_mysql_user('root@::1').with_ensure('absent') - end - it 'should remove Mysql_User[@myhost.mydomain]' do - should contain_mysql_user('@myhost.mydomain').with_ensure('absent') - end - it 'should remove Mysql_User[@myhost]' do - should contain_mysql_user('@myhost').with_ensure('absent') - end - it 'should remove Mysql_User[@localhost]' do - should contain_mysql_user('@localhost').with_ensure('absent') - end - it 'should remove Mysql_User[@%]' do - should contain_mysql_user('@%').with_ensure('absent') - end - - it 'should remove Mysql_database[test]' do - should contain_mysql_database('test').with_ensure('absent') - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_backup_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_backup_spec.rb deleted file mode 100644 index c46f95bd79..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_backup_spec.rb +++ /dev/null @@ -1,183 +0,0 @@ -require 'spec_helper' - -describe 'mysql::server::backup' do - - let(:default_params) { - { 'backupuser' => 'testuser', - 'backuppassword' => 'testpass', - 'backupdir' => '/tmp', - 'backuprotate' => '25', - 'delete_before_dump' => true, - } - } - context 'standard conditions' do - let(:params) { default_params } - - it { should contain_mysql_user('testuser@localhost').with( - :require => 'Class[Mysql::Server::Root_password]' - )} - - it { should contain_mysql_grant('testuser@localhost/*.*').with( - :privileges => ["SELECT", "RELOAD", "LOCK TABLES", "SHOW VIEW"] - )} - - it { should contain_cron('mysql-backup').with( - :command => '/usr/local/sbin/mysqlbackup.sh', - :ensure => 'present' - )} - - it { should contain_file('mysqlbackup.sh').with( - :path => '/usr/local/sbin/mysqlbackup.sh', - :ensure => 'present' - ) } - - it { should contain_file('mysqlbackupdir').with( - :path => '/tmp', - :ensure => 'directory' - )} - - it 'should have compression by default' do - verify_contents(subject, 'mysqlbackup.sh', [ - ' --all-databases | bzcat -zc > ${DIR}/${PREFIX}`date +%Y%m%d-%H%M%S`.sql.bz2', - ]) - end - it 'should skip backing up events table by default' do - verify_contents(subject, 'mysqlbackup.sh', [ - 'EVENTS="--ignore-table=mysql.event"', - ]) - end - - it 'should have 25 days of rotation' do - # MySQL counts from 0 I guess. - should contain_file('mysqlbackup.sh').with_content(/.*ROTATE=24.*/) - end - end - - context 'custom ownership and mode for backupdir' do - let(:params) do - { :backupdirmode => '0750', - :backupdirowner => 'testuser', - :backupdirgroup => 'testgrp', - }.merge(default_params) - end - - it { should contain_file('mysqlbackupdir').with( - :path => '/tmp', - :ensure => 'directory', - :mode => '0750', - :owner => 'testuser', - :group => 'testgrp' - ) } - end - - context 'with compression disabled' do - let(:params) do - { :backupcompress => false }.merge(default_params) - end - - it { should contain_file('mysqlbackup.sh').with( - :path => '/usr/local/sbin/mysqlbackup.sh', - :ensure => 'present' - ) } - - it 'should be able to disable compression' do - verify_contents(subject, 'mysqlbackup.sh', [ - ' --all-databases > ${DIR}/${PREFIX}`date +%Y%m%d-%H%M%S`.sql', - ]) - end - end - - context 'with mysql.events backedup' do - let(:params) do - { :ignore_events => false }.merge(default_params) - end - - it { should contain_file('mysqlbackup.sh').with( - :path => '/usr/local/sbin/mysqlbackup.sh', - :ensure => 'present' - ) } - - it 'should be able to backup events table' do - verify_contents(subject, 'mysqlbackup.sh', [ - 'EVENTS="--events"', - ]) - end - end - - - context 'with database list specified' do - let(:params) do - { :backupdatabases => ['mysql'] }.merge(default_params) - end - - it { should contain_file('mysqlbackup.sh').with( - :path => '/usr/local/sbin/mysqlbackup.sh', - :ensure => 'present' - ) } - - it 'should have a backup file for each database' do - content = subject.resource('file','mysqlbackup.sh').send(:parameters)[:content] - content.should match(' mysql | bzcat -zc \${DIR}\\\${PREFIX}mysql_`date') - # verify_contents(subject, 'mysqlbackup.sh', [ - # ' mysql | bzcat -zc ${DIR}/${PREFIX}mysql_`date +%Y%m%d-%H%M%S`.sql', - # ]) - end - end - - context 'with file per database' do - let(:params) do - default_params.merge({ :file_per_database => true }) - end - - it 'should loop through backup all databases' do - verify_contents(subject, 'mysqlbackup.sh', [ - 'mysql -s -r -N -e \'SHOW DATABASES\' | while read dbname', - 'do', - ' mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \\', - ' ${EVENTS} \\', - ' ${dbname} | bzcat -zc > ${DIR}/${PREFIX}${dbname}_`date +%Y%m%d-%H%M%S`.sql.bz2', - 'done', - ]) - end - - context 'with compression disabled' do - let(:params) do - default_params.merge({ :file_per_database => true, :backupcompress => false }) - end - - it 'should loop through backup all databases without compression' do - verify_contents(subject, 'mysqlbackup.sh', [ - ' ${dbname} > ${DIR}/${PREFIX}${dbname}_`date +%Y%m%d-%H%M%S`.sql', - ]) - end - end - end - - context 'with postscript' do - let(:params) do - default_params.merge({ :postscript => 'rsync -a /tmp backup01.local-lan:' }) - end - - it 'should be add postscript' do - verify_contents(subject, 'mysqlbackup.sh', [ - 'rsync -a /tmp backup01.local-lan:', - ]) - end - end - - context 'with postscripts' do - let(:params) do - default_params.merge({ :postscript => [ - 'rsync -a /tmp backup01.local-lan:', - 'rsync -a /tmp backup02.local-lan:', - ]}) - end - - it 'should be add postscript' do - verify_contents(subject, 'mysqlbackup.sh', [ - 'rsync -a /tmp backup01.local-lan:', - 'rsync -a /tmp backup02.local-lan:', - ]) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_monitor_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_monitor_spec.rb deleted file mode 100644 index 8df9530f0a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_monitor_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -require 'spec_helper' -describe 'mysql::server::monitor' do - let :facts do - { :osfamily => 'Debian', :root_home => '/root' } - end - let :pre_condition do - "include 'mysql::server'" - end - - let :default_params do - { - :mysql_monitor_username => 'monitoruser', - :mysql_monitor_password => 'monitorpass', - :mysql_monitor_hostname => 'monitorhost', - } - end - - let :params do - default_params - end - - it { should contain_mysql_user('monitoruser@monitorhost')} - - it { should contain_mysql_grant('monitoruser@monitorhost/*.*').with( - :ensure => 'present', - :user => 'monitoruser@monitorhost', - :table => '*.*', - :privileges => ["PROCESS", "SUPER"], - :require => 'Mysql_user[monitoruser@monitorhost]' - )} -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_mysqltuner_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_mysqltuner_spec.rb deleted file mode 100644 index 7e9499a65a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_mysqltuner_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -describe 'mysql::server::mysqltuner' do - - it { should contain_file('/usr/local/bin/mysqltuner') } - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_spec.rb deleted file mode 100644 index c14b70f7c6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/classes/mysql_server_spec.rb +++ /dev/null @@ -1,193 +0,0 @@ -require 'spec_helper' -describe 'mysql::server' do - let(:facts) {{:osfamily => 'RedHat', :root_home => '/root'}} - - context 'with defaults' do - it { should contain_class('mysql::server::install') } - it { should contain_class('mysql::server::config') } - it { should contain_class('mysql::server::service') } - it { should contain_class('mysql::server::root_password') } - it { should contain_class('mysql::server::providers') } - end - - # make sure that overriding the mysqld settings keeps the defaults for everything else - context 'with overrides' do - let(:params) {{ :override_options => { 'mysqld' => { 'socket' => '/var/lib/mysql/mysql.sock' } } }} - it do - should contain_file('/etc/my.cnf').with({ - :mode => '0644', - }).with_content(/basedir/) - end - end - - describe 'with multiple instance of an option' do - let(:params) {{ :override_options => { 'mysqld' => { 'replicate-do-db' => ['base1', 'base2', 'base3'], } }}} - it do - should contain_file('/etc/my.cnf').with_content( - /^replicate-do-db = base1$/ - ).with_content( - /^replicate-do-db = base2$/ - ).with_content( - /^replicate-do-db = base3$/ - ) - end - end - - describe 'an option set to true' do - let(:params) { - { :override_options => { 'mysqld' => { 'ssl' => true } }} - } - it do - should contain_file('/etc/my.cnf').with_content(/^\s*ssl\s*(?:$|= true)/m) - end - end - - describe 'an option set to false' do - let(:params) { - { :override_options => { 'mysqld' => { 'ssl' => false } }} - } - it do - should contain_file('/etc/my.cnf').with_content(/^\s*ssl = false/m) - end - end - - context 'with remove_default_accounts set' do - let (:params) {{ :remove_default_accounts => true }} - it { should contain_class('mysql::server::account_security') } - end - - context 'mysql::server::install' do - let(:params) {{ :package_ensure => 'present', :name => 'mysql-server' }} - it do - should contain_package('mysql-server').with({ - :ensure => :present, - :name => 'mysql-server', - }) - end - end - - context 'mysql::server::config' do - it do - should contain_file('/etc/mysql').with({ - :ensure => :directory, - :mode => '0755', - }) - end - - it do - should contain_file('/etc/mysql/conf.d').with({ - :ensure => :directory, - :mode => '0755', - }) - end - - it do - should contain_file('/etc/my.cnf').with({ - :mode => '0644', - }) - end - end - - context 'mysql::server::service' do - context 'with defaults' do - it { should contain_service('mysqld') } - end - - context 'service_enabled set to false' do - let(:params) {{ :service_enabled => false }} - - it do - should contain_service('mysqld').with({ - :ensure => :stopped - }) - end - end - end - - context 'mysql::server::root_password' do - describe 'when defaults' do - it { should_not contain_mysql_user('root@localhost') } - it { should_not contain_file('/root/.my.cnf') } - end - describe 'when set' do - let(:params) {{:root_password => 'SET' }} - it { should contain_mysql_user('root@localhost') } - it { should contain_file('/root/.my.cnf') } - end - - end - - context 'mysql::server::providers' do - describe 'with users' do - let(:params) {{:users => { - 'foo@localhost' => { - 'max_connections_per_hour' => '1', - 'max_queries_per_hour' => '2', - 'max_updates_per_hour' => '3', - 'max_user_connections' => '4', - 'password_hash' => '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' - }, - 'foo2@localhost' => {} - }}} - it { should contain_mysql_user('foo@localhost').with( - :max_connections_per_hour => '1', - :max_queries_per_hour => '2', - :max_updates_per_hour => '3', - :max_user_connections => '4', - :password_hash => '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' - )} - it { should contain_mysql_user('foo2@localhost').with( - :max_connections_per_hour => nil, - :max_queries_per_hour => nil, - :max_updates_per_hour => nil, - :max_user_connections => nil, - :password_hash => '' - )} - end - - describe 'with grants' do - let(:params) {{:grants => { - 'foo@localhost/somedb.*' => { - 'user' => 'foo@localhost', - 'table' => 'somedb.*', - 'privileges' => ["SELECT", "UPDATE"], - 'options' => ["GRANT"], - }, - 'foo2@localhost/*.*' => { - 'user' => 'foo2@localhost', - 'table' => '*.*', - 'privileges' => ["SELECT"], - }, - }}} - it { should contain_mysql_grant('foo@localhost/somedb.*').with( - :user => 'foo@localhost', - :table => 'somedb.*', - :privileges => ["SELECT", "UPDATE"], - :options => ["GRANT"] - )} - it { should contain_mysql_grant('foo2@localhost/*.*').with( - :user => 'foo2@localhost', - :table => '*.*', - :privileges => ["SELECT"], - :options => nil - )} - end - - describe 'with databases' do - let(:params) {{:databases => { - 'somedb' => { - 'charset' => 'latin1', - 'collate' => 'latin1', - }, - 'somedb2' => {} - }}} - it { should contain_mysql_database('somedb').with( - :charset => 'latin1', - :collate => 'latin1' - )} - it { should contain_mysql_database('somedb2')} - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/defines/mysql_db_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/defines/mysql_db_spec.rb deleted file mode 100644 index a7ee31ff8b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/defines/mysql_db_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -require 'spec_helper' - -describe 'mysql::db', :type => :define do - let(:facts) {{ :osfamily => 'RedHat' }} - let(:title) { 'test_db' } - - let(:params) { - { 'user' => 'testuser', - 'password' => 'testpass', - } - } - - it 'should report an error when ensure is not present or absent' do - params.merge!({'ensure' => 'invalid_val'}) - expect { subject }.to raise_error(Puppet::Error, - /invalid_val is not supported for ensure\. Allowed values are 'present' and 'absent'\./) - end - - it 'should not notify the import sql exec if no sql script was provided' do - should contain_mysql_database('test_db').without_notify - end - - it 'should subscribe to database if sql script is given' do - params.merge!({'sql' => 'test_sql'}) - should contain_exec('test_db-import').with_subscribe('Mysql_database[test_db]') - end - - it 'should only import sql script on creation if not enforcing' do - params.merge!({'sql' => 'test_sql', 'enforce_sql' => false}) - should contain_exec('test_db-import').with_refreshonly(true) - end - - it 'should import sql script on creation if enforcing' do - params.merge!({'sql' => 'test_sql', 'enforce_sql' => true}) - should contain_exec('test_db-import').with_refreshonly(false) - end - - it 'should not create database and database user' do - params.merge!({'ensure' => 'absent', 'host' => 'localhost'}) - should contain_mysql_database('test_db').with_ensure('absent') - should contain_mysql_user('testuser@localhost').with_ensure('absent') - end - - it 'should create with an appropriate collate and charset' do - params.merge!({'charset' => 'utf8', 'collate' => 'utf8_danish_ci'}) - should contain_mysql_database('test_db').with({ - 'charset' => 'utf8', - 'collate' => 'utf8_danish_ci', - }) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec.opts b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec.opts deleted file mode 100644 index 91cd6427ed..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec.opts +++ /dev/null @@ -1,6 +0,0 @@ ---format -s ---colour ---loadby -mtime ---backtrace diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec_helper.rb deleted file mode 100644 index 1fd2563f59..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec_helper.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'simplecov' -SimpleCov.start do - add_filter "/spec/" -end -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec_helper_acceptance.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec_helper_acceptance.rb deleted file mode 100644 index a76c2e5833..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec_helper_acceptance.rb +++ /dev/null @@ -1,48 +0,0 @@ -require 'beaker-rspec' - -UNSUPPORTED_PLATFORMS = [ 'Windows', 'Solaris', 'AIX' ] - -unless ENV['RS_PROVISION'] == 'no' - hosts.each do |host| - # Install Puppet - if host.is_pe? - install_pe - else - install_package host, 'rubygems' - on host, 'gem install puppet --no-ri --no-rdoc' - on host, "mkdir -p #{host['distmoduledir']}" - end - end -end - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Readable test descriptions - c.formatter = :documentation - - # Configure all nodes in nodeset - c.before :suite do - # Install module and dependencies - puppet_module_install(:source => proj_root, :module_name => 'mysql') - hosts.each do |host| - # Required for binding tests. - if fact('osfamily') == 'RedHat' - version = fact("operatingsystemmajrelease") - shell("yum localinstall -y http://yum.puppetlabs.com/puppetlabs-release-el-#{version}.noarch.rpm") - if version == '6' - shell("yum localinstall -y http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm") - elsif version == '5' - shell("yum localinstall -y http://mirrors.servercentral.net/fedora/epel/5/i386/epel-release-5-4.noarch.rpm") - else - puts "Sorry, this version is not supported." - exit - end - end - - shell("/bin/touch #{default['distmoduledir']}/hiera.yaml") - shell('puppet module install puppetlabs-stdlib --version 3.2.0', { :acceptable_exit_codes => [0,1] }) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec_helper_system.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec_helper_system.rb deleted file mode 100644 index de20690c51..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/spec_helper_system.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'rspec-system/spec_helper' -require 'rspec-system-puppet/helpers' -require 'rspec-system-serverspec/helpers' - -include RSpecSystemPuppet::Helpers - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Enable colour - c.tty = true - - c.include RSpecSystemPuppet::Helpers - - # This is where we 'setup' the nodes before running our tests - c.before :suite do - # Install puppet - puppet_install - - # Install modules and dependencies - puppet_module_install(:source => proj_root, :module_name => 'mysql') - shell('puppet module install puppetlabs-stdlib') - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_account_delete_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_account_delete_spec.rb deleted file mode 100644 index 11f776a05c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_account_delete_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'spec_helper_system' - -describe 'mysql::server::account_security class' do - - describe 'running puppet code' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': remove_default_accounts => true } - EOS - - # Run it twice and test for idempotency - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - end - - describe 'accounts' do - it 'should delete accounts' do - shell("mysql -e 'show grants for root@127.0.01;'") do |s| - s.exit_code.should == 1 - end - end - - it 'should delete databases' do - shell("mysql -e 'show databases;' |grep test") do |s| - s.exit_code.should == 1 - end - end - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_backup_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_backup_spec.rb deleted file mode 100644 index cdbf4ed278..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_backup_spec.rb +++ /dev/null @@ -1,62 +0,0 @@ -require 'spec_helper_system' - -describe 'mysql::server::backup class' do - context 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': override_options => { 'root_password' => 'password' } } - mysql::db { 'backup1': - user => 'backup', - password => 'secret', - } - - class { 'mysql::server::backup': - backupuser => 'myuser', - backuppassword => 'mypassword', - backupdir => '/tmp/backups', - backupcompress => true, - postscript => [ - 'rm -rf /var/tmp/mysqlbackups', - 'rm -f /var/tmp/mysqlbackups.done', - 'cp -r /tmp/backups /var/tmp/mysqlbackups', - 'touch /var/tmp/mysqlbackups.done', - ], - } - EOS - - context puppet_apply(pp) do - its(:stderr) { should be_empty } - its(:exit_code) { should_not == 1 } - its(:refresh) { should be_nil } - its(:stderr) { should be_empty } - its(:exit_code) { should be_zero } - end - end - - describe 'mysqlbackup.sh' do - context 'should run mysqlbackup.sh with no errors' do - context shell("/usr/local/sbin/mysqlbackup.sh") do - its(:exit_code) { should be_zero } - its(:stderr) { should be_empty } - end - end - - context 'should dump all databases to single file' do - describe command('ls /tmp/backups/ | grep -c "mysql_backup_[0-9][0-9]*-[0-9][0-9]*.sql.bz2"') do - it { should return_stdout /1/ } - it { should return_exit_status 0 } - end - end - - context 'should create one file per database per run' do - context shell("/usr/local/sbin/mysqlbackup.sh") do - its(:exit_code) { should be_zero } - its(:stderr) { should be_empty } - end - - describe command('ls /tmp/backups/ | grep -c "mysql_backup_backup1_[0-9][0-9]*-[0-9][0-9]*.sql.bz2"') do - it { should return_stdout /2/ } - it { should return_exit_status 0 } - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_bindings_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_bindings_spec.rb deleted file mode 100644 index 694cf574d4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_bindings_spec.rb +++ /dev/null @@ -1,90 +0,0 @@ -require 'spec_helper_system' - -describe 'mysql::bindings class' do - let(:os) { - node.facts['osfamily'] - } - - case node.facts['osfamily'] - when 'RedHat' - java_package = 'mysql-connector-java' - perl_package = 'perl-DBD-MySQL' - python_package = 'MySQL-python' - ruby_package = 'ruby-mysql' - when 'Suse' - java_package = 'mysql-connector-java' - perl_package = 'perl-DBD-MySQL' - python_package = 'python-mysql' - case node.facts['operatingsystem'] - when /OpenSuSE/ - ruby_package = 'rubygem-mysql' - when /(SLES|SLED)/ - ruby_package = 'ruby-mysql' - end - when 'Debian' - java_package = 'libmysql-java' - perl_package = 'libdbd-mysql-perl' - python_package = 'python-mysqldb' - ruby_package = 'libmysql-ruby' - when 'FreeBSD' - java_package = 'databases/mysql-connector-java' - perl_package = 'p5-DBD-mysql' - python_package = 'databases/py-MySQLdb' - ruby_package = 'ruby-mysql' - else - case node.facts['operatingsystem'] - when 'Amazon' - java_package = 'mysql-connector-java' - perl_package = 'perl-DBD-MySQL' - python_package = 'MySQL-python' - ruby_package = 'ruby-mysql' - end - end - - describe 'running puppet code' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::bindings': } - EOS - - # Run it twice and test for idempotency - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - end - end - - describe 'enabling bindings' do - it 'should work with no errors' do - puppet_apply(%{ - class { 'mysql::bindings': - java_enable => true, - perl_enable => true, - python_enable => true, - ruby_enable => true, - } - }) - end - - describe package(java_package) do - it { should be_installed } - end - - describe package(perl_package) do - it { should be_installed } - end - - describe package(python_package) do - it { should be_installed } - end - - describe package(ruby_package) do - it { should be_installed } - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_db_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_db_spec.rb deleted file mode 100644 index 49299e1ddb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_db_spec.rb +++ /dev/null @@ -1,61 +0,0 @@ -require 'spec_helper_system' - -describe 'mysql::db define' do - describe 'creating a database' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': override_options => { 'root_password' => 'password' } } - mysql::db { 'spec1': - user => 'root1', - password => 'password', - } - EOS - - # Run it twice and test for idempotency - puppet_apply(pp) do |r| - [0,2].should include r.exit_code - r.refresh - r.exit_code.should be_zero - end - end - - it 'should have the database' do - shell("mysql -e 'show databases;'|grep spec1") do |s| - s.exit_code.should be_zero - end - end - end - - describe 'creating a database with post-sql' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': override_options => { 'root_password' => 'password' } } - file { '/tmp/spec.sql': - ensure => file, - content => 'CREATE TABLE table1 (id int);', - before => Mysql::Db['spec2'], - } - mysql::db { 'spec2': - user => 'root1', - password => 'password', - sql => '/tmp/spec.sql', - } - EOS - - # Run it twice and test for idempotency - puppet_apply(pp) do |r| - [0,2].should include r.exit_code - r.refresh - r.exit_code.should be_zero - end - end - - it 'should have the table' do - shell("mysql -e 'show tables;' spec2|grep table1") do |s| - s.exit_code.should == 0 - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_server_monitor_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_server_monitor_spec.rb deleted file mode 100644 index b7ebd0dffd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_server_monitor_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'spec_helper_system' - -describe 'mysql::server::monitor class' do - context 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': root_password => 'password' } - - class { 'mysql::server::monitor': - mysql_monitor_username => 'monitoruser', - mysql_monitor_password => 'monitorpass', - mysql_monitor_hostname => 'localhost', - } - EOS - - context puppet_apply(pp) do - its(:stderr) { should be_empty } - its(:exit_code) { should_not == 1 } - its(:refresh) { should be_nil } - its(:stderr) { should be_empty } - its(:exit_code) { should be_zero } - end - - context 'should run mysqladmin ping with no errors' do - describe command("mysqladmin -u monitoruser -pmonitorpass -h localhost ping") do - it { should return_stdout /mysqld is alive/ } - it { should return_exit_status 0 } - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_server_root_password_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_server_root_password_spec.rb deleted file mode 100644 index ea9cafad56..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_server_root_password_spec.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'spec_helper_system' - -describe 'mysql::server::root_password class' do - - describe 'reset' do - it 'shuts down mysql' do - pp = <<-EOS - class { 'mysql::server': service_enabled => false } - EOS - - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - end - end - - it 'deletes the /root/.my.cnf password' do - shell('rm -rf /root/.my.cnf') - end - - it 'deletes all databases' do - case node.facts['osfamily'] - when 'RedHat' - shell('rm -rf `grep datadir /etc/my.cnf | cut -d" " -f 3`/*') - when 'Debian' - shell('rm -rf `grep datadir /etc/mysql/my.cnf | cut -d" " -f 3`/*') - shell('mysql_install_db') - end - end - - it 'starts up mysql' do - pp = <<-EOS - class { 'mysql::server': service_enabled => true } - EOS - - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - end - end - end - - describe 'when unset' do - it 'should work' do - pp = <<-EOS - class { 'mysql::server': root_password => 'test' } - EOS - - # Run it twice and test for idempotency - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - end - end - - describe 'when set' do - it 'should work' do - pp = <<-EOS - class { 'mysql::server': root_password => 'new', old_root_password => 'test' } - EOS - - # Run it twice and test for idempotency - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_server_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_server_spec.rb deleted file mode 100644 index b9ecabdce2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/mysql_server_spec.rb +++ /dev/null @@ -1,106 +0,0 @@ -require 'spec_helper_system' - -describe 'mysql class' do - case node.facts['osfamily'] - when 'RedHat' - package_name = 'mysql-server' - service_name = 'mysqld' - mycnf = '/etc/my.cnf' - when 'Suse' - package_name = 'mysql-community-server' - service_name = 'mysql' - mycnf = '/etc/my.cnf' - when 'Debian' - package_name = 'mysql-server' - service_name = 'mysql' - mycnf = '/etc/mysql/my.cnf' - end - - describe 'running puppet code' do - # Using puppet_apply as a helper - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': } - EOS - - # Run it twice and test for idempotency - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - end - - describe package(package_name) do - it { should be_installed } - end - - describe service(service_name) do - it { should be_running } - it { should be_enabled } - end - end - - describe 'mycnf' do - it 'should contain sensible values' do - pp = <<-EOS - class { 'mysql::server': } - EOS - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - end - end - - describe file(mycnf) do - it { should contain 'key_buffer = 16M' } - it { should contain 'max_binlog_size = 100M' } - it { should contain 'query_cache_size = 16M' } - end - end - - describe 'my.cnf changes' do - it 'sets values' do - pp = <<-EOS - class { 'mysql::server': - override_options => { 'mysqld' => - { 'key_buffer' => '32M', - 'max_binlog_size' => '200M', - 'query_cache_size' => '32M', - } - } - } - EOS - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - end - end - - describe file(mycnf) do - it { should contain 'key_buffer = 32M' } - it { should contain 'max_binlog_size = 200M' } - it { should contain 'query_cache_size = 32M' } - end - end - - describe 'my.cnf should contain multiple instances of the same option' do - it 'sets multiple values' do - pp = <<-EOS - class { 'mysql::server': - override_options => { 'mysqld' => - { 'replicate-do-db' => ['base1', 'base2', 'base3'], } - } - } - EOS - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - end - end - - describe file(mycnf) do - it { should contain 'replicate-do-db = base1' } - it { should contain 'replicate-do-db = base2' } - it { should contain 'replicate-do-db = base3' } - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/types/mysql_grant_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/types/mysql_grant_spec.rb deleted file mode 100644 index a3bdf8282f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/types/mysql_grant_spec.rb +++ /dev/null @@ -1,314 +0,0 @@ -require 'spec_helper_system' - -describe 'mysql_grant' do - - describe 'setup' do - it 'setup mysql::server' do - pp = <<-EOS - class { 'mysql::server': } - EOS - - puppet_apply(pp) - end - end - - describe 'missing privileges for user' do - it 'should fail' do - pp = <<-EOS - mysql_grant { 'test1@tester/test.*': - ensure => 'present', - table => 'test.*', - user => 'test1@tester', - } - EOS - - puppet_apply(pp) do |r| - r.stderr.should =~ /privileges parameter is required/ - end - end - - it 'should not find the user' do - shell("mysql -NBe \"SHOW GRANTS FOR test1@tester\"") do |r| - r.stderr.should =~ /There is no such grant defined for user 'test1' on host 'tester'/ - r.exit_code.should eq 1 - end - end - end - - describe 'missing table for user' do - it 'should fail' do - pp = <<-EOS - mysql_grant { 'atest@tester/test.*': - ensure => 'present', - user => 'atest@tester', - privileges => ['ALL'], - } - EOS - - puppet_apply(pp) do |r| - r.exit_code.should eq 1 - end - end - - it 'should not find the user' do - shell("mysql -NBe \"SHOW GRANTS FOR atest@tester\"") do |r| - r.stderr.should =~ /There is no such grant defined for user 'atest' on host 'tester'/ - r.exit_code.should eq 1 - end - end - end - - describe 'adding privileges' do - it 'should work without errors' do - pp = <<-EOS - mysql_grant { 'test2@tester/test.*': - ensure => 'present', - table => 'test.*', - user => 'test2@tester', - privileges => ['SELECT', 'UPDATE'], - } - EOS - - puppet_apply(pp) - end - - it 'should find the user' do - shell("mysql -NBe \"SHOW GRANTS FOR test2@tester\"") do |r| - r.stdout.should =~ /GRANT SELECT, UPDATE.*TO 'test2'@'tester'/ - r.stderr.should be_empty - r.exit_code.should be_zero - end - end - end - - describe 'adding option' do - it 'should work without errors' do - pp = <<-EOS - mysql_grant { 'test3@tester/test.*': - ensure => 'present', - table => 'test.*', - user => 'test3@tester', - options => ['GRANT'], - privileges => ['SELECT', 'UPDATE'], - } - EOS - - puppet_apply(pp) - end - - it 'should find the user' do - shell("mysql -NBe \"SHOW GRANTS FOR test3@tester\"") do |r| - r.stdout.should =~ /GRANT SELECT, UPDATE ON `test`.* TO 'test3'@'tester' WITH GRANT OPTION$/ - r.stderr.should be_empty - r.exit_code.should be_zero - end - end - end - - describe 'adding all privileges without table' do - it 'should fail' do - pp = <<-EOS - mysql_grant { 'test4@tester/test.*': - ensure => 'present', - user => 'test4@tester', - options => ['GRANT'], - privileges => ['SELECT', 'UPDATE', 'ALL'], - } - EOS - - puppet_apply(pp) do |r| - r.stderr.should =~ /table parameter is required./ - end - end - - end - - - describe 'adding all privileges' do - it 'should only try to apply ALL' do - pp = <<-EOS - mysql_grant { 'test4@tester/test.*': - ensure => 'present', - table => 'test.*', - user => 'test4@tester', - options => ['GRANT'], - privileges => ['SELECT', 'UPDATE', 'ALL'], - } - EOS - - puppet_apply(pp) - end - - it 'should find the user' do - shell("mysql -NBe \"SHOW GRANTS FOR test4@tester\"") do |r| - r.stdout.should =~ /GRANT ALL PRIVILEGES ON `test`.* TO 'test4'@'tester' WITH GRANT OPTION/ - r.stderr.should be_empty - r.exit_code.should be_zero - end - end - end - - # Test combinations of user@host to ensure all cases work. - describe 'short hostname' do - it 'should apply' do - pp = <<-EOS - mysql_grant { 'test@short/test.*': - ensure => 'present', - table => 'test.*', - user => 'test@short', - privileges => 'ALL', - } - mysql_grant { 'test@long.hostname.com/test.*': - ensure => 'present', - table => 'test.*', - user => 'test@long.hostname.com', - privileges => 'ALL', - } - mysql_grant { 'test@192.168.5.6/test.*': - ensure => 'present', - table => 'test.*', - user => 'test@192.168.5.6', - privileges => 'ALL', - } - mysql_grant { 'test@2607:f0d0:1002:0051:0000:0000:0000:0004/test.*': - ensure => 'present', - table => 'test.*', - user => 'test@2607:f0d0:1002:0051:0000:0000:0000:0004', - privileges => 'ALL', - } - mysql_grant { 'test@::1/128/test.*': - ensure => 'present', - table => 'test.*', - user => 'test@::1/128', - privileges => 'ALL', - } - EOS - - puppet_apply(pp) - end - - it 'finds short hostname' do - shell("mysql -NBe \"SHOW GRANTS FOR test@short\"") do |r| - r.stdout.should =~ /GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'short'/ - r.stderr.should be_empty - r.exit_code.should be_zero - end - end - it 'finds long hostname' do - shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'long.hostname.com'\"") do |r| - r.stdout.should =~ /GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'long.hostname.com'/ - r.stderr.should be_empty - r.exit_code.should be_zero - end - end - it 'finds ipv4' do - shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'192.168.5.6'\"") do |r| - r.stdout.should =~ /GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'192.168.5.6'/ - r.stderr.should be_empty - r.exit_code.should be_zero - end - end - it 'finds ipv6' do - shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'2607:f0d0:1002:0051:0000:0000:0000:0004'\"") do |r| - r.stdout.should =~ /GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'2607:f0d0:1002:0051:0000:0000:0000:0004'/ - r.stderr.should be_empty - r.exit_code.should be_zero - end - end - it 'finds short ipv6' do - shell("mysql -NBe \"SHOW GRANTS FOR 'test'@'::1/128'\"") do |r| - r.stdout.should =~ /GRANT ALL PRIVILEGES ON `test`.* TO 'test'@'::1\/128'/ - r.stderr.should be_empty - r.exit_code.should be_zero - end - end - end - - describe 'complex test' do - it 'setup mysql::server' do - pp = <<-EOS - $dbSubnet = '10.10.10.%' - - mysql_database { 'foo': - ensure => present, - } - - exec { 'mysql-create-table': - command => '/usr/bin/mysql -NBe "CREATE TABLE foo.bar (name VARCHAR(20))"', - environment => "HOME=${::root_home}", - unless => '/usr/bin/mysql -NBe "SELECT 1 FROM foo.bar LIMIT 1;"', - require => Mysql_database['foo'], - } - - Mysql_grant { - ensure => present, - options => ['GRANT'], - privileges => ['ALL'], - table => '*.*', - require => [ Mysql_database['foo'], Exec['mysql-create-table'] ], - } - - mysql_grant { "user1@${dbSubnet}/*.*": - user => "user1@${dbSubnet}", - } - mysql_grant { "user2@${dbSubnet}/foo.bar": - privileges => ['SELECT', 'INSERT', 'UPDATE'], - user => "user2@${dbSubnet}", - table => 'foo.bar', - } - mysql_grant { "user3@${dbSubnet}/foo.*": - privileges => ['SELECT', 'INSERT', 'UPDATE'], - user => "user3@${dbSubnet}", - table => 'foo.*', - } - mysql_grant { 'web@%/*.*': - user => 'web@%', - } - mysql_grant { "web@${dbSubnet}/*.*": - user => "web@${dbSubnet}", - } - mysql_grant { "web@${fqdn}/*.*": - user => "web@${fqdn}", - } - mysql_grant { 'web@localhost/*.*': - user => 'web@localhost', - } - EOS - - puppet_apply(pp) do |r| - r.exit_code.should_not == 1 - r.refresh - r.exit_code.should be_zero - end - end - end - - describe 'lower case privileges' do - it 'create ALL privs' do - pp = <<-EOS - mysql_grant { 'lowercase@localhost/*.*': - user => 'lowercase@localhost', - privileges => 'ALL', - table => '*.*', - } - EOS - - puppet_apply(pp) - end - - it 'create lowercase all privs' do - pp = <<-EOS - mysql_grant { 'lowercase@localhost/*.*': - user => 'lowercase@localhost', - privileges => 'all', - table => '*.*', - } - EOS - - puppet_apply(pp) do |r| - r.exit_code.should be_zero - end - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/types/mysql_user_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/types/mysql_user_spec.rb deleted file mode 100644 index 7aaa9797e4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/system/types/mysql_user_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'spec_helper_system' - -describe 'mysql_user' do - - describe 'setup' do - it 'should work with no errors' do - pp = <<-EOS - class { 'mysql::server': } - EOS - - puppet_apply(pp) - end - end - - describe 'adding user' do - it 'should work without errors' do - pp = <<-EOS - mysql_user { 'ashp@localhost': - password_hash => '6f8c114b58f2ce9e', - } - EOS - - puppet_apply(pp) - end - - it 'should find the user' do - shell("mysql -NBe \"select '1' from mysql.user where CONCAT(user, '@', host) = 'ashp@localhost'\"") do |r| - r.stdout.should =~ /^1$/ - r.stderr.should be_empty - r.exit_code.should be_zero - end - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/mysql_password_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/mysql_password_spec.rb deleted file mode 100644 index 0736910049..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/mysql_password_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'spec_helper' - -describe 'the mysql_password function' do - before :all do - Puppet::Parser::Functions.autoloader.loadall - end - - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it 'should exist' do - Puppet::Parser::Functions.function('mysql_password').should == 'function_mysql_password' - end - - it 'should raise a ParseError if there is less than 1 arguments' do - lambda { scope.function_mysql_password([]) }.should( raise_error(Puppet::ParseError)) - end - - it 'should raise a ParseError if there is more than 1 arguments' do - lambda { scope.function_mysql_password(%w(foo bar)) }.should( raise_error(Puppet::ParseError)) - end - - it 'should convert password into a hash' do - result = scope.function_mysql_password(%w(password)) - result.should(eq('*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19')) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/functions/mysql_deepmerge_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/functions/mysql_deepmerge_spec.rb deleted file mode 100644 index fa9c72b787..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/functions/mysql_deepmerge_spec.rb +++ /dev/null @@ -1,91 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:mysql_deepmerge) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - describe 'when calling mysql_deepmerge from puppet' do - it "should not compile when no arguments are passed" do - pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ - Puppet[:code] = '$x = mysql_deepmerge()' - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /wrong number of arguments/) - end - - it "should not compile when 1 argument is passed" do - pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ - Puppet[:code] = "$my_hash={'one' => 1}\n$x = mysql_deepmerge($my_hash)" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /wrong number of arguments/) - end - end - - describe 'when calling mysql_deepmerge on the scope instance' do - it 'should require all parameters are hashes' do - expect { new_hash = scope.function_mysql_deepmerge([{}, '2'])}.to raise_error(Puppet::ParseError, /unexpected argument type String/) - expect { new_hash = scope.function_mysql_deepmerge([{}, 2])}.to raise_error(Puppet::ParseError, /unexpected argument type Fixnum/) - end - - it 'should accept empty strings as puppet undef' do - expect { new_hash = scope.function_mysql_deepmerge([{}, ''])}.not_to raise_error - end - - it 'should be able to mysql_deepmerge two hashes' do - new_hash = scope.function_mysql_deepmerge([{'one' => '1', 'two' => '1'}, {'two' => '2', 'three' => '2'}]) - new_hash['one'].should == '1' - new_hash['two'].should == '2' - new_hash['three'].should == '2' - end - - it 'should mysql_deepmerge multiple hashes' do - hash = scope.function_mysql_deepmerge([{'one' => 1}, {'one' => '2'}, {'one' => '3'}]) - hash['one'].should == '3' - end - - it 'should accept empty hashes' do - scope.function_mysql_deepmerge([{},{},{}]).should == {} - end - - it 'should mysql_deepmerge subhashes' do - hash = scope.function_mysql_deepmerge([{'one' => 1}, {'two' => 2, 'three' => { 'four' => 4 } }]) - hash['one'].should == 1 - hash['two'].should == 2 - hash['three'].should == { 'four' => 4 } - end - - it 'should append to subhashes' do - hash = scope.function_mysql_deepmerge([{'one' => { 'two' => 2 } }, { 'one' => { 'three' => 3 } }]) - hash['one'].should == { 'two' => 2, 'three' => 3 } - end - - it 'should append to subhashes 2' do - hash = scope.function_mysql_deepmerge([{'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }, {'two' => 'dos', 'three' => { 'five' => 5 } }]) - hash['one'].should == 1 - hash['two'].should == 'dos' - hash['three'].should == { 'four' => 4, 'five' => 5 } - end - - it 'should append to subhashes 3' do - hash = scope.function_mysql_deepmerge([{ 'key1' => { 'a' => 1, 'b' => 2 }, 'key2' => { 'c' => 3 } }, { 'key1' => { 'b' => 99 } }]) - hash['key1'].should == { 'a' => 1, 'b' => 99 } - hash['key2'].should == { 'c' => 3 } - end - - it 'should equate keys mod dash and underscore' do - hash = scope.function_mysql_deepmerge([{ 'a-b-c' => 1 } , { 'a_b_c' => 10 }]) - hash['a_b_c'].should == 10 - hash.should_not have_key('a-b-c') - end - - it 'should keep style of the last when keys are euqal mod dash and underscore' do - hash = scope.function_mysql_deepmerge([{ 'a-b-c' => 1, 'b_c_d' => { 'c-d-e' => 2, 'e-f-g' => 3 }} , { 'a_b_c' => 10, 'b-c-d' => { 'c_d_e' => 12 } }]) - hash['a_b_c'].should == 10 - hash.should_not have_key('a-b-c') - hash['b-c-d'].should == { 'e-f-g' => 3, 'c_d_e' => 12 } - hash.should_not have_key('b_c_d') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database/mysql_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database/mysql_spec.rb deleted file mode 100644 index e2557fc35d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database/mysql_spec.rb +++ /dev/null @@ -1,86 +0,0 @@ -require 'spec_helper' - -provider_class = Puppet::Type.type(:database).provider(:mysql) - -describe provider_class do - subject { provider_class } - - let(:root_home) { '/root' } - let(:defaults_file) { '--defaults-extra-file=/root/.my.cnf' } - - let(:raw_databases) do - <<-SQL_OUTPUT -information_schema -mydb -mysql -performance_schema -test - SQL_OUTPUT - end - - let(:parsed_databases) { %w(information_schema mydb mysql performance_schema test) } - - before :each do - @resource = Puppet::Type::Database.new( - { :charset => 'utf8', :name => 'new_database' } - ) - @provider = provider_class.new(@resource) - Facter.stubs(:value).with(:root_home).returns(root_home) - Puppet::Util.stubs(:which).with('mysql').returns('/usr/bin/mysql') - subject.stubs(:which).with('mysql').returns('/usr/bin/mysql') - subject.stubs(:defaults_file).returns('--defaults-extra-file=/root/.my.cnf') - end - - describe 'self.instances' do - it 'returns an array of databases' do - subject.stubs(:mysql).with([defaults_file, '-NBe', 'show databases']).returns(raw_databases) - - databases = subject.instances.collect {|x| x.name } - parsed_databases.should match_array(databases) - end - end - - describe 'create' do - it 'makes a user' do - subject.expects(:mysql).with([defaults_file, '-NBe', "create database `#{@resource[:name]}` character set #{@resource[:charset]}"]) - @provider.create - end - end - - describe 'destroy' do - it 'removes a user if present' do - subject.expects(:mysqladmin).with([defaults_file, '-f', 'drop', "#{@resource[:name]}"]) - @provider.destroy - end - end - - describe 'charset' do - it 'returns a charset' do - subject.expects(:mysql).with([defaults_file, '-NBe', "show create database `#{@resource[:name]}`"]).returns('mydbCREATE DATABASE `mydb` /*!40100 DEFAULT CHARACTER SET utf8 */') - @provider.charset.should == 'utf8' - end - end - - describe 'charset=' do - it 'changes the charset' do - subject.expects(:mysql).with([defaults_file, '-NBe', "alter database `#{@resource[:name]}` CHARACTER SET blah"]).returns('0') - - @provider.charset=('blah') - end - end - - describe 'exists?' do - it 'checks if user exists' do - subject.expects(:mysql).with([defaults_file, '-NBe', 'show databases']).returns('information_schema\nmydb\nmysql\nperformance_schema\ntest') - @provider.exists? - end - end - - describe 'self.defaults_file' do - it 'sets --defaults-extra-file' do - File.stubs(:file?).with('#{root_home}/.my.cnf').returns(true) - @provider.defaults_file.should == '--defaults-extra-file=/root/.my.cnf' - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb deleted file mode 100644 index 4d9484d04f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_grant/mysql_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -require 'puppet' -require 'mocha/api' -require 'spec_helper' -RSpec.configure do |config| - config.mock_with :mocha -end -provider_class = Puppet::Type.type(:database_grant).provider(:mysql) -describe provider_class do - let(:root_home) { '/root' } - - before :each do - @resource = Puppet::Type::Database_grant.new( - { :privileges => 'all', :provider => 'mysql', :name => 'user@host'} - ) - @provider = provider_class.new(@resource) - Facter.stubs(:value).with(:root_home).returns(root_home) - File.stubs(:file?).with("#{root_home}/.my.cnf").returns(true) - end - - it 'should query privileges from the database' do - provider_class.expects(:mysql) .with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', 'describe user']).returns <<-EOT -Field Type Null Key Default Extra -Host char(60) NO PRI -User char(16) NO PRI -Password char(41) NO -Select_priv enum('N','Y') NO N -Insert_priv enum('N','Y') NO N -Update_priv enum('N','Y') NO N -EOT - provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', 'describe db']).returns <<-EOT -Field Type Null Key Default Extra -Host char(60) NO PRI -Db char(64) NO PRI -User char(16) NO PRI -Select_priv enum('N','Y') NO N -Insert_priv enum('N','Y') NO N -Update_priv enum('N','Y') NO N -EOT - provider_class.user_privs.should == %w(Select_priv Insert_priv Update_priv) - provider_class.db_privs.should == %w(Select_priv Insert_priv Update_priv) - end - - it 'should query set privileges' do - provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', "select * from mysql.user where user='user' and host='host'"]).returns <<-EOT -Host User Password Select_priv Insert_priv Update_priv -host user Y N Y -EOT - @provider.privileges.should == %w(Select_priv Update_priv) - end - - it 'should recognize when all privileges are set' do - provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', "select * from mysql.user where user='user' and host='host'"]).returns <<-EOT -Host User Password Select_priv Insert_priv Update_priv -host user Y Y Y -EOT - @provider.all_privs_set?.should == true - end - - it 'should recognize when all privileges are not set' do - provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', "select * from mysql.user where user='user' and host='host'"]).returns <<-EOT -Host User Password Select_priv Insert_priv Update_priv -host user Y N Y -EOT - @provider.all_privs_set?.should == false - end - - it 'should be able to set all privileges' do - provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-NBe', "SELECT '1' FROM user WHERE user='user' AND host='host'"]).returns "1\n" - provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', "update user set Select_priv = 'Y', Insert_priv = 'Y', Update_priv = 'Y' where user='user' and host='host'"]) - provider_class.expects(:mysqladmin).with(%W(--defaults-extra-file=#{root_home}/.my.cnf flush-privileges)) - @provider.privileges=(%w(all)) - end - - it 'should be able to set partial privileges' do - provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-NBe', "SELECT '1' FROM user WHERE user='user' AND host='host'"]).returns "1\n" - provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', "update user set Select_priv = 'Y', Insert_priv = 'N', Update_priv = 'Y' where user='user' and host='host'"]) - provider_class.expects(:mysqladmin).with(%W(--defaults-extra-file=#{root_home}/.my.cnf flush-privileges)) - @provider.privileges=(%w(Select_priv Update_priv)) - end - - it 'should be case insensitive' do - provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-NBe', "SELECT '1' FROM user WHERE user='user' AND host='host'"]).returns "1\n" - provider_class.expects(:mysql).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'mysql', '-Be', "update user set Select_priv = 'Y', Insert_priv = 'Y', Update_priv = 'Y' where user='user' and host='host'"]) - provider_class.expects(:mysqladmin).with(["--defaults-extra-file=#{root_home}/.my.cnf", 'flush-privileges']) - @provider.privileges=(%w(SELECT_PRIV insert_priv UpDaTe_pRiV)) - end - - it 'should not pass --defaults-extra-file if $root_home/.my.cnf is absent' do - File.stubs(:file?).with("#{root_home}/.my.cnf").returns(false) - provider_class.expects(:mysql).with(['mysql', '-NBe', "SELECT '1' FROM user WHERE user='user' AND host='host'"]).returns "1\n" - provider_class.expects(:mysql).with(['mysql', '-Be', "update user set Select_priv = 'Y', Insert_priv = 'N', Update_priv = 'Y' where user='user' and host='host'"]) - provider_class.expects(:mysqladmin).with(%w(flush-privileges)) - @provider.privileges=(%w(Select_priv Update_priv)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_user/mysql_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_user/mysql_spec.rb deleted file mode 100644 index 0939fdd224..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/database_user/mysql_spec.rb +++ /dev/null @@ -1,119 +0,0 @@ -require 'spec_helper' - -provider_class = Puppet::Type.type(:database_user).provider(:mysql) - -describe provider_class do - subject { provider_class } - - let(:root_home) { '/root' } - let(:defaults_file) { '--defaults-extra-file=/root/.my.cnf' } - let(:newhash) { '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5' } - - let(:raw_users) do - <<-SQL_OUTPUT -root@127.0.0.1 -root@::1 -@localhost -debian-sys-maint@localhost -root@localhost -usvn_user@localhost -@vagrant-ubuntu-raring-64 - SQL_OUTPUT - end - - let(:parsed_users) { %w(root@127.0.0.1 root@::1 debian-sys-maint@localhost root@localhost usvn_user@localhost) } - - before :each do - # password hash = mypass - @resource = Puppet::Type::Database_user.new( - { :password_hash => '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4', - :name => 'joe@localhost', - :max_user_connections => '10' - } - ) - @provider = provider_class.new(@resource) - Facter.stubs(:value).with(:root_home).returns(root_home) - Puppet::Util.stubs(:which).with('mysql').returns('/usr/bin/mysql') - subject.stubs(:which).with('mysql').returns('/usr/bin/mysql') - subject.stubs(:defaults_file).returns('--defaults-extra-file=/root/.my.cnf') - end - - describe 'self.instances' do - it 'returns an array of users' do - subject.stubs(:mysql).with([defaults_file, 'mysql', "-BNeselect concat(User, '@',Host) as User from mysql.user"]).returns(raw_users) - - usernames = subject.instances.collect {|x| x.name } - parsed_users.should match_array(usernames) - end - end - - describe 'create' do - it 'makes a user' do - subject.expects(:mysql).with([defaults_file, 'mysql', '-e', "grant usage on *.* to 'joe'@'localhost' identified by PASSWORD - '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' with max_user_connections 10"]) - @provider.expects(:exists?).returns(true) - @provider.create.should be_true - end - end - - describe 'destroy' do - it 'removes a user if present' do - subject.expects(:mysql).with([defaults_file, 'mysql', '-e', "drop user 'joe'@'localhost'"]) - @provider.expects(:exists?).returns(false) - @provider.destroy.should be_true - end - end - - describe 'password_hash' do - it 'returns a hash' do - subject.expects(:mysql).with([defaults_file, 'mysql', '-NBe', "select password from mysql.user where CONCAT(user, '@', host) = 'joe@localhost'"]).returns('*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4') - @provider.password_hash.should == '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' - end - end - - describe 'password_hash=' do - it 'changes the hash' do - subject.expects(:mysql).with([defaults_file, 'mysql', '-e', "SET PASSWORD FOR 'joe'@'localhost' = '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5'"]).returns('0') - - @provider.expects(:password_hash).returns('*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5') - @provider.password_hash=('*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5') - end - end - - describe 'max_user_connections' do - it 'returns max user connections' do - subject.expects(:mysql).with([defaults_file, 'mysql', '-NBe', "select max_user_connections from mysql.user where CONCAT(user, '@', host) = 'joe@localhost'"]).returns('10') - @provider.max_user_connections.should == '10' - end - end - - describe 'max_user_connections=' do - it 'changes max user connections' do - subject.expects(:mysql).with([defaults_file, 'mysql', '-e', "grant usage on *.* to 'joe'@'localhost' with max_user_connections 42"]).returns('0') - @provider.expects(:max_user_connections).returns('42') - @provider.max_user_connections=('42') - end - end - - describe 'exists?' do - it 'checks if user exists' do - subject.expects(:mysql).with([defaults_file, 'mysql', '-NBe', "select '1' from mysql.user where CONCAT(user, '@', host) = 'joe@localhost'"]).returns('1') - @provider.exists?.should be_true - end - end - - describe 'flush' do - it 'removes cached privileges' do - subject.expects(:mysqladmin).with([defaults_file, 'flush-privileges']) - @provider.flush - end - end - - describe 'self.defaults_file' do - it 'sets --defaults-extra-file' do - File.stubs(:file?).with('#{root_home}/.my.cnf').returns(true) - @provider.defaults_file.should == '--defaults-extra-file=/root/.my.cnf' - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_database/mysql_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_database/mysql_spec.rb deleted file mode 100644 index 10f061f5d8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_database/mysql_spec.rb +++ /dev/null @@ -1,118 +0,0 @@ -require 'spec_helper' - -describe Puppet::Type.type(:mysql_database).provider(:mysql) do - - let(:defaults_file) { '--defaults-extra-file=/root/.my.cnf' } - - let(:raw_databases) do - <<-SQL_OUTPUT -information_schema -mydb -mysql -performance_schema -test - SQL_OUTPUT - end - - let(:parsed_databases) { %w(information_schema mydb mysql performance_schema test) } - - let(:resource) { Puppet::Type.type(:mysql_database).new( - { :ensure => :present, - :charset => 'latin1', - :collate => 'latin1_swedish_ci', - :name => 'new_database', - :provider => described_class.name - } - )} - let(:provider) { resource.provider } - - before :each do - Facter.stubs(:value).with(:root_home).returns('/root') - Puppet::Util.stubs(:which).with('mysql').returns('/usr/bin/mysql') - File.stubs(:file?).with('/root/.my.cnf').returns(true) - provider.class.stubs(:mysql).with([defaults_file, '-NBe', 'show databases']).returns('new_database') - provider.class.stubs(:mysql).with([defaults_file, '-NBe', "show variables like '%_database'", 'new_database']).returns("character_set_database latin1\ncollation_database latin1_swedish_ci\nskip_show_database OFF") - end - - let(:instance) { provider.class.instances.first } - - describe 'self.instances' do - it 'returns an array of databases' do - provider.class.stubs(:mysql).with([defaults_file, '-NBe', 'show databases']).returns(raw_databases) - raw_databases.each_line do |db| - provider.class.stubs(:mysql).with([defaults_file, '-NBe', "show variables like '%_database'", db.chomp]).returns("character_set_database latin1\ncollation_database latin1_swedish_ci\nskip_show_database OFF") - end - databases = provider.class.instances.collect {|x| x.name } - parsed_databases.should match_array(databases) - end - end - - describe 'self.prefetch' do - it 'exists' do - provider.class.instances - provider.class.prefetch({}) - end - end - - describe 'create' do - it 'makes a database' do - provider.expects(:mysql).with([defaults_file, '-NBe', "create database if not exists `#{resource[:name]}` character set #{resource[:charset]} collate #{resource[:collate]}"]) - provider.expects(:exists?).returns(true) - provider.create.should be_true - end - end - - describe 'destroy' do - it 'removes a database if present' do - provider.expects(:mysql).with([defaults_file, '-NBe', "drop database `#{resource[:name]}`"]) - provider.expects(:exists?).returns(false) - provider.destroy.should be_true - end - end - - describe 'exists?' do - it 'checks if database exists' do - instance.exists?.should be_true - end - end - - describe 'self.defaults_file' do - it 'sets --defaults-extra-file' do - File.stubs(:file?).with('/root/.my.cnf').returns(true) - provider.defaults_file.should eq '--defaults-extra-file=/root/.my.cnf' - end - it 'fails if file missing' do - File.stubs(:file?).with('/root/.my.cnf').returns(false) - provider.defaults_file.should be_nil - end - end - - describe 'charset' do - it 'returns a charset' do - instance.charset.should == 'latin1' - end - end - - describe 'charset=' do - it 'changes the charset' do - provider.expects(:mysql).with([defaults_file, '-NBe', "alter database `#{resource[:name]}` CHARACTER SET blah"]).returns('0') - - provider.charset=('blah') - end - end - - describe 'collate' do - it 'returns a collate' do - instance.collate.should == 'latin1_swedish_ci' - end - end - - describe 'collate=' do - it 'changes the collate' do - provider.expects(:mysql).with([defaults_file, '-NBe', "alter database `#{resource[:name]}` COLLATE blah"]).returns('0') - - provider.collate=('blah') - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_user/mysql_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_user/mysql_spec.rb deleted file mode 100644 index 34639c920f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/provider/mysql_user/mysql_spec.rb +++ /dev/null @@ -1,130 +0,0 @@ -require 'spec_helper' - -describe Puppet::Type.type(:mysql_user).provider(:mysql) do - let(:defaults_file) { '--defaults-extra-file=/root/.my.cnf' } - let(:newhash) { '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5' } - - let(:raw_users) do - <<-SQL_OUTPUT -root@127.0.0.1 -root@::1 -@localhost -debian-sys-maint@localhost -root@localhost -usvn_user@localhost -@vagrant-ubuntu-raring-64 - SQL_OUTPUT - end - - let(:parsed_users) { %w(root@127.0.0.1 root@::1 @localhost debian-sys-maint@localhost root@localhost usvn_user@localhost @vagrant-ubuntu-raring-64) } - - let(:resource) { Puppet::Type.type(:mysql_user).new( - { :ensure => :present, - :password_hash => '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4', - :name => 'joe@localhost', - :max_user_connections => '10', - :max_connections_per_hour => '10', - :max_queries_per_hour => '10', - :max_updates_per_hour => '10', - :provider => described_class.name - } - )} - let(:provider) { resource.provider } - - before :each do - # Set up the stubs for an instances call. - Facter.stubs(:value).with(:root_home).returns('/root') - Puppet::Util.stubs(:which).with('mysql').returns('/usr/bin/mysql') - File.stubs(:file?).with('/root/.my.cnf').returns(true) - provider.class.stubs(:mysql).with([defaults_file, '-NBe', "SELECT CONCAT(User, '@',Host) AS User FROM mysql.user"]).returns('joe@localhost') - provider.class.stubs(:mysql).with([defaults_file, '-NBe', "SELECT MAX_USER_CONNECTIONS, MAX_CONNECTIONS, MAX_QUESTIONS, MAX_UPDATES, PASSWORD FROM mysql.user WHERE CONCAT(user, '@', host) = 'joe@localhost'"]).returns('10 10 10 10 *6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4') - end - - let(:instance) { provider.class.instances.first } - - describe 'self.instances' do - it 'returns an array of users' do - provider.class.stubs(:mysql).with([defaults_file, '-NBe', "SELECT CONCAT(User, '@',Host) AS User FROM mysql.user"]).returns(raw_users) - parsed_users.each do |user| - provider.class.stubs(:mysql).with([defaults_file, '-NBe', "SELECT MAX_USER_CONNECTIONS, MAX_CONNECTIONS, MAX_QUESTIONS, MAX_UPDATES, PASSWORD FROM mysql.user WHERE CONCAT(user, '@', host) = '#{user}'"]).returns('10 10 10 10 ') - end - - usernames = provider.class.instances.collect {|x| x.name } - parsed_users.should match_array(usernames) - end - end - - describe 'self.prefetch' do - it 'exists' do - provider.class.instances - provider.class.prefetch({}) - end - end - - describe 'create' do - it 'makes a user' do - provider.expects(:mysql).with([defaults_file, '-e', "GRANT USAGE ON *.* TO 'joe'@'localhost' IDENTIFIED BY PASSWORD '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' WITH MAX_USER_CONNECTIONS 10 MAX_CONNECTIONS_PER_HOUR 10 MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 10"]) - provider.expects(:exists?).returns(true) - provider.create.should be_true - end - end - - describe 'destroy' do - it 'removes a user if present' do - provider.expects(:mysql).with([defaults_file, '-e', "DROP USER 'joe'@'localhost'"]) - provider.expects(:exists?).returns(false) - provider.destroy.should be_true - end - end - - describe 'exists?' do - it 'checks if user exists' do - instance.exists?.should be_true - end - end - - describe 'self.defaults_file' do - it 'sets --defaults-extra-file' do - File.stubs(:file?).with('/root/.my.cnf').returns(true) - provider.defaults_file.should eq '--defaults-extra-file=/root/.my.cnf' - end - it 'fails if file missing' do - File.expects(:file?).with('/root/.my.cnf').returns(false) - provider.defaults_file.should be_nil - end - end - - describe 'password_hash' do - it 'returns a hash' do - instance.password_hash.should == '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' - end - end - - describe 'password_hash=' do - it 'changes the hash' do - provider.expects(:mysql).with([defaults_file, '-e', "SET PASSWORD FOR 'joe'@'localhost' = '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5'"]).returns('0') - - provider.expects(:password_hash).returns('*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5') - provider.password_hash=('*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF5') - end - end - - ['max_user_connections', 'max_connections_per_hour', 'max_queries_per_hour', - 'max_updates_per_hour'].each do |property| - - describe property do - it "returns #{property}" do - instance.send("#{property}".to_sym).should == '10' - end - end - - describe "#{property}=" do - it "changes #{property}" do - provider.expects(:mysql).with([defaults_file, '-e', "GRANT USAGE ON *.* TO 'joe'@'localhost' WITH #{property.upcase} 42"]).returns('0') - provider.expects(property.to_sym).returns('42') - provider.send("#{property}=".to_sym, '42') - end - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb deleted file mode 100644 index e2ebd90d4e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_database_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'puppet' -require 'puppet/type/mysql_database' -describe Puppet::Type.type(:mysql_database) do - - before :each do - @user = Puppet::Type.type(:mysql_database).new(:name => 'test', :charset => 'utf8', :collate => 'utf8_blah_ci') - end - - it 'should accept a database name' do - @user[:name].should == 'test' - end - - it 'should accept a charset' do - @user[:charset] = 'latin1' - @user[:charset].should == 'latin1' - end - - it 'should accept a collate' do - @user[:collate] = 'latin1_swedish_ci' - @user[:collate].should == 'latin1_swedish_ci' - end - - it 'should require a name' do - expect { - Puppet::Type.type(:mysql_database).new({}) - }.to raise_error(Puppet::Error, 'Title or name must be provided') - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_grant_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_grant_spec.rb deleted file mode 100644 index d56ba241a4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_grant_spec.rb +++ /dev/null @@ -1,44 +0,0 @@ -require 'puppet' -require 'puppet/type/mysql_grant' -describe Puppet::Type.type(:mysql_grant) do - - before :each do - @user = Puppet::Type.type(:mysql_grant).new(:name => 'foo@localhost/*.*', :privileges => ['ALL', 'PROXY'], :table => ['*.*','@'], :user => 'foo@localhost') - end - - it 'should accept a grant name' do - @user[:name].should == 'foo@localhost/*.*' - end - - it 'should accept ALL privileges' do - @user[:privileges] = 'ALL' - @user[:privileges].should == ['ALL'] - end - - it 'should accept PROXY privilege' do - @user[:privileges] = 'PROXY' - @user[:privileges].should == ['PROXY'] - end - - it 'should accept a table' do - @user[:table] = '*.*' - @user[:table].should == '*.*' - end - - it 'should accept @ for table' do - @user[:table] = '@' - @user[:table].should == '@' - end - - it 'should accept a user' do - @user[:user] = 'foo@localhost' - @user[:user].should == 'foo@localhost' - end - - it 'should require a name' do - expect { - Puppet::Type.type(:mysql_grant).new({}) - }.to raise_error(Puppet::Error, 'Title or name must be provided') - end - -end \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_user_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_user_spec.rb deleted file mode 100644 index 62aad7aef3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/spec/unit/puppet/type/mysql_user_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'puppet' -require 'puppet/type/mysql_user' -describe Puppet::Type.type(:mysql_user) do - - before :each do - @user = Puppet::Type.type(:mysql_user).new(:name => 'foo@localhost', :password_hash => 'pass') - end - - it 'should accept a user name' do - @user[:name].should == 'foo@localhost' - end - - it 'should fail with a long user name' do - expect { - Puppet::Type.type(:mysql_user).new({:name => '12345678901234567@localhost', :password_hash => 'pass'}) - }.to raise_error /MySQL usernames are limited to a maximum of 16 characters/ - end - - it 'should accept a password' do - @user[:password_hash] = 'foo' - @user[:password_hash].should == 'foo' - end - - it 'should require a name' do - expect { - Puppet::Type.type(:mysql_user).new({}) - }.to raise_error(Puppet::Error, 'Title or name must be provided') - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/my.cnf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/my.cnf.erb deleted file mode 100644 index 5aa959ba0b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/my.cnf.erb +++ /dev/null @@ -1,18 +0,0 @@ -<% @options.sort.map do |k,v| -%> -<% if v.is_a?(Hash) -%> -[<%= k %>] -<% v.sort.map do |ki, vi| -%> -<% if vi == true or v == '' -%> -<%= ki %> -<% elsif vi.is_a?(Array) -%> -<% vi.each do |vii| -%> -<%= ki %> = <%= vii %> -<% end -%> -<% elsif vi != :undef -%> -<%= ki %> = <%= vi %> -<% end -%> -<% end -%> -<% end %> -<% end -%> - -!includedir /etc/mysql/conf.d/ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/my.cnf.pass.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/my.cnf.pass.erb deleted file mode 100644 index 99663fccdc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/my.cnf.pass.erb +++ /dev/null @@ -1,7 +0,0 @@ -[client] -user=root -host=localhost -<% unless scope.lookupvar('mysql::server::root_password') == 'UNSET' -%> -password='<%= scope.lookupvar('mysql::server::root_password') %>' -<% end -%> -socket=<%= @options['client']['socket'] -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/my.conf.cnf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/my.conf.cnf.erb deleted file mode 100644 index 04d2974294..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/my.conf.cnf.erb +++ /dev/null @@ -1,17 +0,0 @@ -### MANAGED BY PUPPET ### -<% @settings.sort.each do |section, content| -%> -[<%= section %>] -<% content.sort.each do |key, values| -%> -<% [values].flatten.sort.each do |value| -%> -<%= !value ? '#' : '' %><%= key -%><%= - case value - when true, false - '' - else - " = #{value}" - end -%> -<% end -%> -<% end -%> - -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/mysqlbackup.sh.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/mysqlbackup.sh.erb deleted file mode 100755 index ff38b23af0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/templates/mysqlbackup.sh.erb +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash -# -# MySQL Backup Script -# Dumps mysql databases to a file for another backup tool to pick up. -# -# MySQL code: -# GRANT SELECT, RELOAD, LOCK TABLES ON *.* TO 'user'@'localhost' -# IDENTIFIED BY 'password'; -# FLUSH PRIVILEGES; -# -##### START CONFIG ################################################### - -USER=<%= @backupuser %> -PASS=<%= @backuppassword %> -DIR=<%= @backupdir %> -ROTATE=<%= [ Integer(@backuprotate) - 1, 0 ].max %> - -PREFIX=mysql_backup_ -<% if @ignore_events %> -EVENTS="--ignore-table=mysql.event" -<% else %> -EVENTS="--events" -<% end %> - -##### STOP CONFIG #################################################### -PATH=/usr/bin:/usr/sbin:/bin:/sbin - - - -set -o pipefail - -cleanup() -{ - find "${DIR}/" -maxdepth 1 -type f -name "${PREFIX}*.sql*" -mtime +${ROTATE} -print0 | xargs -0 -r rm -f -} - -<% if @delete_before_dump -%> -cleanup - -<% end -%> -<% if @backupdatabases.empty? -%> -<% if @file_per_database -%> -mysql -s -r -N -e 'SHOW DATABASES' | while read dbname -do - mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \ - ${EVENTS} \ - ${dbname} <% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}${dbname}_`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %> -done -<% else -%> -mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \ - ${EVENTS} \ - --all-databases <% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %> -<% end -%> -<% else -%> -<% @backupdatabases.each do |db| -%> -mysqldump -u${USER} -p${PASS} --opt --flush-logs --single-transaction \ - ${EVENTS} \ - <%= db %><% if @backupcompress %>| bzcat -zc <% end %>> ${DIR}/${PREFIX}<%= db %>_`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %>.bz2<% end %> -<% end -%> -<% end -%> - -<% unless @delete_before_dump -%> -if [ $? -eq 0 ] ; then - cleanup -fi -<% end -%> - -<% if @postscript -%> - <%- [@postscript].flatten.compact.each do |script|%> -<%= script %> - <%- end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/backup.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/backup.pp deleted file mode 100644 index cb669e6db8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/backup.pp +++ /dev/null @@ -1,8 +0,0 @@ -class { 'mysql::server': - config_hash => {'root_password' => 'password'} -} -class { 'mysql::backup': - backupuser => 'myuser', - backuppassword => 'mypassword', - backupdir => '/tmp/backups', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/bindings.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/bindings.pp deleted file mode 100644 index 83af3713a9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/bindings.pp +++ /dev/null @@ -1,3 +0,0 @@ -class { 'mysql::bindings': - php_enable => 'true', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/init.pp deleted file mode 100644 index 846121b7df..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/init.pp +++ /dev/null @@ -1 +0,0 @@ -include mysql diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/java.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/java.pp deleted file mode 100644 index 0fc009a6da..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/java.pp +++ /dev/null @@ -1 +0,0 @@ -class { 'mysql::java':} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/mysql_database.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/mysql_database.pp deleted file mode 100644 index 8747f707d5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/mysql_database.pp +++ /dev/null @@ -1,12 +0,0 @@ -class { 'mysql::server': - config_hash => {'root_password' => 'password'} -} -database{ ['test1', 'test2', 'test3']: - ensure => present, - charset => 'utf8', - require => Class['mysql::server'], -} -database{ 'test4': - ensure => present, - charset => 'latin1', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/mysql_grant.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/mysql_grant.pp deleted file mode 100644 index 20fe78d6a7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/mysql_grant.pp +++ /dev/null @@ -1,5 +0,0 @@ -mysql_grant{'test1@localhost/redmine.*': - user => 'test1@localhost', - table => 'redmine.*', - privileges => ['UPDATE'], -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/mysql_user.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/mysql_user.pp deleted file mode 100644 index f63908431b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/mysql_user.pp +++ /dev/null @@ -1,23 +0,0 @@ -$mysql_root_pw = 'password' - -class { 'mysql::server': - config_hash => { - root_password => 'password', - } -} - -database_user{ 'redmine@localhost': - ensure => present, - password_hash => mysql_password('redmine'), - require => Class['mysql::server'], -} - -database_user{ 'dan@localhost': - ensure => present, - password_hash => mysql_password('blah') -} - -database_user{ 'dan@%': - ensure => present, - password_hash => mysql_password('blah'), -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/perl.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/perl.pp deleted file mode 100644 index 87e941751a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/perl.pp +++ /dev/null @@ -1 +0,0 @@ -include mysql::perl diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/python.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/python.pp deleted file mode 100644 index 04f7ffa1ac..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/python.pp +++ /dev/null @@ -1 +0,0 @@ -class { 'mysql::python':} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/ruby.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/ruby.pp deleted file mode 100644 index e84c046a31..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/ruby.pp +++ /dev/null @@ -1 +0,0 @@ -include mysql::ruby diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/server.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/server.pp deleted file mode 100644 index 8afdd00d24..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/server.pp +++ /dev/null @@ -1,3 +0,0 @@ -class { 'mysql::server': - root_password => 'password', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/server/account_security.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/server/account_security.pp deleted file mode 100644 index de393cce4d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/server/account_security.pp +++ /dev/null @@ -1,4 +0,0 @@ -class { 'mysql::server': - config_hash => { 'root_password' => 'password', }, -} -class { 'mysql::server::account_security': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/server/config.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/server/config.pp deleted file mode 100644 index fe8d86e905..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/mysql/tests/server/config.pp +++ /dev/null @@ -1,11 +0,0 @@ -mysql::server::config { 'testfile': - settings => { - 'mysqld' => { - 'bind-address' => '0.0.0.0', - 'read-only' => true, - }, - 'client' => { - 'port' => '3306' - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.fixtures.yml deleted file mode 100644 index 439f1aba9d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.fixtures.yml +++ /dev/null @@ -1,3 +0,0 @@ -fixtures: - symlinks: - nginx: "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.nodeset.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.nodeset.yml deleted file mode 100644 index 767f9cd2f6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.nodeset.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -default_set: 'centos-64-x64' -sets: - 'centos-59-x64': - nodes: - "main.foo.vm": - prefab: 'centos-59-x64' - 'centos-64-x64': - nodes: - "main.foo.vm": - prefab: 'centos-64-x64' - 'fedora-18-x64': - nodes: - "main.foo.vm": - prefab: 'fedora-18-x64' - 'debian-607-x64': - nodes: - "main.foo.vm": - prefab: 'debian-607-x64' - 'debian-70rc1-x64': - nodes: - "main.foo.vm": - prefab: 'debian-70rc1-x64' - 'ubuntu-server-10044-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-10044-x64' - 'ubuntu-server-12042-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-12042-x64' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.travis.yml deleted file mode 100644 index 61c92863a1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -branches: - only: - - master -language: ruby -script: "bundle exec rake --rakefile $PWD/.travis/Rakefile spec SPEC_OPTS='--format documentation'" -rvm: - - 1.9.3 - - 2.0.0 -gemfile: .travis/Gemfile -env: - matrix: - - PUPPET_GEM_VERSION="~> 2.7.0" - - PUPPET_GEM_VERSION="~> 3.0" -matrix: - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" - gemfile: .travis/Gemfile - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" - gemfile: .travis/Gemfile -notifications: - email: false diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.travis/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.travis/Gemfile deleted file mode 100644 index 8af652f251..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.travis/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source 'https://rubygems.org' - -group :rake do - gem 'puppetlabs_spec_helper' - gem 'librarian-puppet-maestrodev' - gem 'open3_backport', :platforms => :ruby_18 - gem 'json', :platforms => :ruby_18 -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.travis/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.travis/Rakefile deleted file mode 100644 index 500bd023a9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/.travis/Rakefile +++ /dev/null @@ -1,8 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' - -# use librarian-puppet to manage fixtures instead of .fixtures.yml -# offers more possibilities like explicit version management, forge downloads,... -task :librarian_spec_prep do - sh "librarian-puppet install --path=$PWD/spec/fixtures/modules/" -end -task :spec_prep => :librarian_spec_prep diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Gemfile deleted file mode 100644 index 513b910ae9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source 'https://rubygems.org' - -group :rake do - gem 'puppet', '>=3.0.1' - gem 'rspec-puppet', '>=1.0.1' - gem 'rake', '>=0.9.2.2' - gem 'puppet-lint', '>=0.1.12' - gem 'puppetlabs_spec_helper' - gem 'puppet-blacksmith' - gem 'librarian-puppet-maestrodev' - gem 'rspec-system-puppet', :require => false - gem 'rspec-system-serverspec', :require => false -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/LICENSE deleted file mode 100644 index d955a86d74..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Modulefile deleted file mode 100644 index 8754662fef..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Modulefile +++ /dev/null @@ -1,12 +0,0 @@ -name 'jfryman-nginx' -version '0.0.9' -source 'http://github.com/jfryman/puppet-nginx' -author 'James Fryman' -license 'Apache License Version 2.0' -summary 'Puppet NGINX management module' -description 'This module can be used for basic NGINX Management' -project_page 'http://github.com/jfryman/puppet-nginx' - -dependency 'puppetlabs/stdlib', '>= 0.1.6' -dependency 'puppetlabs/apt', '>= 1.0.0' -dependency 'puppetlabs/concat', '>= 1.0.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Puppetfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Puppetfile deleted file mode 100644 index 7a314f2e9a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Puppetfile +++ /dev/null @@ -1,5 +0,0 @@ -forge 'http://forge.puppetlabs.com' - -mod 'puppetlabs/stdlib', '>=0.1.6' -mod 'puppetlabs/apt', '>=1.0.0' -mod 'puppetlabs/concat', '>=1.0.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Puppetfile.lock b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Puppetfile.lock deleted file mode 100644 index aac666e403..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Puppetfile.lock +++ /dev/null @@ -1,13 +0,0 @@ -FORGE - remote: http://forge.puppetlabs.com - specs: - puppetlabs/apt (1.2.0) - puppetlabs/stdlib (>= 2.2.1) - puppetlabs/concat (1.0.0) - puppetlabs/stdlib (4.1.0) - -DEPENDENCIES - puppetlabs/apt (>= 1.0.0) - puppetlabs/concat (>= 1.0.0) - puppetlabs/stdlib (>= 0.1.6) - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/README.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/README.markdown deleted file mode 100644 index a640f03968..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/README.markdown +++ /dev/null @@ -1,240 +0,0 @@ -# NGINX Module - -[![Build Status](https://travis-ci.org/jfryman/puppet-nginx.png)](https://travis-ci.org/jfryman/puppet-nginx) - -James Fryman - -This module manages NGINX configuration. - -## Quick Start - -### Requirements - -* Puppet-2.7.0 or later -* Ruby-1.9.3 or later (Ruby-1.8.7 does not work) - -### Install and bootstrap an NGINX instance - -```puppet -class { 'nginx': } -``` - -### Setup a new virtual host - -```puppet -nginx::resource::vhost { 'www.puppetlabs.com': - www_root => '/var/www/www.puppetlabs.com', -} -``` - -### Add a Proxy Server - -```puppet -nginx::resource::upstream { 'puppet_rack_app': - members => [ - 'localhost:3000', - 'localhost:3001', - 'localhost:3002', - ], -} - -nginx::resource::vhost { 'rack.puppetlabs.com': - proxy => 'http://puppet_rack_app', -} -``` - -### Add a smtp proxy - -```puppet -class { 'nginx': - mail => true, -} - -nginx::resource::mailhost { 'domain1.example': - auth_http => 'server2.example/cgi-bin/auth', - protocol => 'smtp', - listen_port => 587, - ssl_port => 465, - starttls => 'only', - xclient => 'off', - ssl => true, - ssl_cert => '/tmp/server.crt', - ssl_key => '/tmp/server.pem', -} -``` - -## SSL configuration - -By default, creating a vhost resource will only create a HTTP vhost. To also create a HTTPS (SSL-enabled) vhost, set `ssl => true` on the vhost. You will have a HTTP server listening on `listen_port` (port `80` by default) and a HTTPS server listening on `ssl_port` (port `443` by default). Both vhosts will have the same `server_name` and a similar configuration. - -To create only a HTTPS vhost, set `ssl => true` and also set `listen_port` to the same value as `ssl_port`. Setting these to the same value disables the HTTP vhost. The resulting vhost will be listening on `ssl_port`. - -### Locations - -Locations require specific settings depending on whether they should be included in the HTTP, HTTPS or both vhosts. - -#### HTTP only vhost (default) -If you only have a HTTP vhost (i.e. `ssl => false` on the vhost) maks sure you don't set `ssl => true` on any location you associate with the vhost. - -#### HTTP and HTTPS vhost -If you set `ssl => true` and also set `listen_port` and `ssl_port` to different values on the vhost you will need to be specific with the location settings since you will have a HTTP vhost listening on `listen_port` and a HTTPS vhost listening on `ssl_port`: - -* To add a location to only the HTTP server, set `ssl => false` on the location (this is the default). -* To add a location to both the HTTP and HTTPS server, set `ssl => true` on the location, and ensure `ssl_only => false` (which is the default value for `ssl_only`). -* To add a location only to the HTTPS server, set both `ssl => true` and `ssl_only => true` on the location. - -#### HTTPS only vhost -If you have set `ssl => true` and also set `listen_port` and `ssl_port` to the same value on the vhost, you will have a single HTTPS vhost listening on `ssl_port`. To add a location to this vhost set `ssl => true` and `ssl_only => true` on the location. - -## Hiera Support - -Defining nginx resources in Hiera. - -```yaml -nginx::nginx_upstreams: - 'puppet_rack_app': - ensure: present - members: - - localhost:3000 - - localhost:3001 - - localhost:3002 -nginx::nginx_vhosts: - 'www.puppetlabs.com': - www_root: '/var/www/www.puppetlabs.com' - 'rack.puppetlabs.com': - proxy: 'http://puppet_rack_app' -nginx::nginx_locations: - 'static': - location: '~ "^/static/[0-9a-fA-F]{8}\/(.*)$"' - vhost: www.puppetlabs.com - 'userContent': - location: /userContent - vhost: www.puppetlabs.com - www_root: /var/www/html -``` - -## Nginx with precompiled Passenger - -Currently this works only for Debian family. - -```puppet -class { 'nginx': - package_source => 'passenger', - http_cfg_append => { - 'passenger_root' => '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini', - } -} -``` - -Package source `passenger` will add [Phusion Passenger repository](https://oss-binaries.phusionpassenger.com/apt/passenger) to APT sources. -For each virtual host you should specify which ruby should be used. - -```puppet -nginx::resource::vhost { 'www.puppetlabs.com': - www_root => '/var/www/www.puppetlabs.com', - vhost_cfg_append => { - 'passenger_enabled' => 'on', - 'passenger_ruby' => '/usr/bin/ruby', - } -} -``` - -### Puppet master served by Nginx and Passenger - -Virtual host config for serving puppet master: - -```puppet -nginx::resource::vhost { 'puppet': - ensure => present, - server_name => ['puppet'], - listen_port => 8140, - ssl => true, - ssl_cert => '/var/lib/puppet/ssl/certs/example.com.pem', - ssl_key => '/var/lib/puppet/ssl/private_keys/example.com.pem', - ssl_port => 8140, - vhost_cfg_append => { - 'passenger_enabled' => 'on', - 'passenger_ruby' => '/usr/bin/ruby', - 'ssl_crl' => '/var/lib/puppet/ssl/ca/ca_crl.pem', - 'ssl_client_certificate' => '/var/lib/puppet/ssl/certs/ca.pem', - 'ssl_verify_client' => 'optional', - 'ssl_verify_depth' => 1, - }, - www_root => '/etc/puppet/rack/public', - use_default_location => false, - access_log => '/var/log/nginx/puppet_access.log', - error_log => '/var/log/nginx/puppet_error.log', - passenger_cgi_param => { - 'HTTP_X_CLIENT_DN' => '$ssl_client_s_dn', - 'HTTP_X_CLIENT_VERIFY' => '$ssl_client_verify', - }, -} -``` - -### Example puppet class calling nginx::vhost with HTTPS FastCGI and redirection of HTTP - -```puppet - -$full_web_path = '/var/www' - -define web::nginx_ssl_with_redirect ( - $backend_port = 9000, - $php = true, - $proxy = undef, - $www_root = "${full_web_path}/${name}/", - $location_cfg_append = undef, -) { - nginx::resource::vhost { "${name}.${::domain}": - ensure => present, - www_root => "${full_web_path}/${name}/", - location_cfg_append => { 'rewrite' => '^ https://$server_name$request_uri? permanent' }, - } - - if !$www_root { - $tmp_www_root = undef - } else { - $tmp_www_root = $www_root - } - - nginx::resource::vhost { "${name}.${::domain} ${name}": - ensure => present, - listen_port => 443, - www_root => $tmp_www_root, - proxy => $proxy, - location_cfg_append => $location_cfg_append, - index_files => [ 'index.php' ], - ssl => true, - ssl_cert => 'puppet:///modules/sslkey/whildcard_mydomain.crt', - ssl_key => 'puppet:///modules/sslkey/whildcard_mydomain.key', - } - - - if $php { - nginx::resource::location { "${name}_root": - ensure => present, - ssl => true, - ssl_only => true, - vhost => "${name}.${::domain} ${name}", - www_root => "${full_web_path}/${name}/", - location => '~ \.php$', - index_files => ['index.php', 'index.html', 'index.htm'], - proxy => undef, - fastcgi => "127.0.0.1:${backend_port}", - fastcgi_script => undef, - location_cfg_append => { - fastcgi_connect_timeout => '3m', - fastcgi_read_timeout => '3m', - fastcgi_send_timeout => '3m' - } - } - } -} -``` - -# Call class web::nginx_ssl_with_redirect - -```puppet -web::nginx_ssl_with_redirect { 'sub-domain-name': - backend_port => 9001, - } -``` diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Rakefile deleted file mode 100644 index e0913e5864..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/Rakefile +++ /dev/null @@ -1,19 +0,0 @@ -require 'bundler' -Bundler.require(:rake) -require 'rake/clean' - -CLEAN.include('spec/fixtures/', 'doc', 'pkg') -CLOBBER.include('.tmp', '.librarian') - -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet_blacksmith/rake_tasks' -require 'rspec-system/rake_task' - -# use librarian-puppet to manage fixtures instead of .fixtures.yml -# offers more possibilities like explicit version management, forge downloads,... -task :librarian_spec_prep do - sh "librarian-puppet install --path=spec/fixtures/modules/" -end -task :spec_prep => :librarian_spec_prep - -task :default => [:clean, :spec] diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/composer.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/composer.json deleted file mode 100644 index 91f362f703..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/composer.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "jfryman/puppet-nginx", - "type": "project", - "description": "Puppet module for nginx installation", - "keywords": ["puppet", "nginx"], - "license": "Apache-2.0", - "require": { - }, - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - } -} \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/config.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/config.pp deleted file mode 100644 index f22b3a6895..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/config.pp +++ /dev/null @@ -1,146 +0,0 @@ -# Class: nginx::config -# -# This module manages NGINX bootstrap and configuration -# -# Parameters: -# -# There are no default parameters for this class. -# -# Actions: -# -# Requires: -# -# Sample Usage: -# -# This class file is not called directly -class nginx::config( - $worker_processes = $nginx::params::nx_worker_processes, - $worker_connections = $nginx::params::nx_worker_connections, - $worker_rlimit_nofile = $nginx::params::nx_worker_rlimit_nofile, - $confd_purge = $nginx::params::nx_confd_purge, - $vhost_purge = $nginx::params::nx_vhost_purge, - $server_tokens = $nginx::params::nx_server_tokens, - $proxy_set_header = $nginx::params::nx_proxy_set_header, - $proxy_cache_path = $nginx::params::nx_proxy_cache_path, - $proxy_cache_levels = $nginx::params::nx_proxy_cache_levels, - $proxy_cache_keys_zone = $nginx::params::nx_proxy_cache_keys_zone, - $proxy_cache_max_size = $nginx::params::nx_proxy_cache_max_size, - $proxy_cache_inactive = $nginx::params::nx_proxy_cache_inactive, - $proxy_http_version = $nginx::params::nx_proxy_http_version, - $names_hash_bucket_size = $nginx::params::nx_names_hash_bucket_size, - $names_hash_max_size = $nginx::params::nx_names_hash_max_size, - $types_hash_max_size = $nginx::params::nx_types_hash_max_size, - $types_hash_bucket_size = $nginx::params::nx_types_hash_bucket_size, - $client_max_body_size = $nginx::params::nx_client_max_body_size, - $proxy_buffers = $nginx::params::nx_proxy_buffers, - $http_cfg_append = $nginx::params::nx_http_cfg_append, - $nginx_error_log = $nginx::params::nx_nginx_error_log, - $http_access_log = $nginx::params::nx_http_access_log, - $proxy_buffer_size = $nginx::params::nx_proxy_buffer_size, - $gzip = $nginx::params::nx_gzip, - $conf_template = $nginx::params::nx_conf_template, - $proxy_conf_template = $nginx::params::nx_proxy_conf_template, -) inherits nginx::params { - - File { - owner => 'root', - group => 'root', - mode => '0644', - } - - file { $nginx::params::nx_conf_dir: - ensure => directory, - } - - file { "${nginx::params::nx_conf_dir}/conf.d": - ensure => directory, - } - if $confd_purge == true { - File["${nginx::params::nx_conf_dir}/conf.d"] { - purge => true, - recurse => true, - } - } - - file { "${nginx::params::nx_conf_dir}/conf.mail.d": - ensure => directory, - } - if $confd_purge == true { - File["${nginx::params::nx_conf_dir}/conf.mail.d"] { - purge => true, - recurse => true, - } - } - - file { "${nginx::params::nx_conf_dir}/conf.d/vhost_autogen.conf": - ensure => absent, - } - - file { "${nginx::params::nx_conf_dir}/conf.mail.d/vhost_autogen.conf": - ensure => absent, - } - - file {$nginx::config::nx_run_dir: - ensure => directory, - } - - file {$nginx::config::nx_client_body_temp_path: - ensure => directory, - owner => $nginx::params::nx_daemon_user, - } - - file {$nginx::config::nx_proxy_temp_path: - ensure => directory, - owner => $nginx::params::nx_daemon_user, - } - - file { "${nginx::params::nx_conf_dir}/sites-available": - ensure => directory, - } - - if $vhost_purge == true { - File["${nginx::params::nx_conf_dir}/sites-available"] { - purge => true, - recurse => true, - } - } - - file { "${nginx::params::nx_conf_dir}/sites-enabled": - ensure => directory, - } - - if $vhost_purge == true { - File["${nginx::params::nx_conf_dir}/sites-enabled"] { - purge => true, - recurse => true, - } - } - - file { '/etc/nginx/sites-enabled/default': - ensure => absent, - } - - file { "${nginx::params::nx_conf_dir}/nginx.conf": - ensure => file, - content => template($conf_template), - } - - file { "${nginx::params::nx_conf_dir}/conf.d/proxy.conf": - ensure => file, - content => template($proxy_conf_template), - } - - file { "${nginx::config::nx_temp_dir}/nginx.d": - ensure => absent, - purge => true, - recurse => true, - force => true, - } - - file { "${nginx::config::nx_temp_dir}/nginx.mail.d": - ensure => absent, - purge => true, - recurse => true, - force => true, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/init.pp deleted file mode 100644 index 9ed4169037..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/init.pp +++ /dev/null @@ -1,173 +0,0 @@ -# Class: nginx -# -# This module manages NGINX. -# -# Parameters: -# -# There are no default parameters for this class. All module parameters -# are managed via the nginx::params class -# -# Actions: -# -# Requires: -# puppetlabs-stdlib - https://github.com/puppetlabs/puppetlabs-stdlib -# -# Packaged NGINX -# - RHEL: EPEL or custom package -# - Debian/Ubuntu: Default Install or custom package -# - SuSE: Default Install or custom package -# -# stdlib -# - puppetlabs-stdlib module >= 0.1.6 -# - plugin sync enabled to obtain the anchor type -# -# Sample Usage: -# -# The module works with sensible defaults: -# -# node default { -# include nginx -# } -class nginx ( - $worker_processes = $nginx::params::nx_worker_processes, - $worker_connections = $nginx::params::nx_worker_connections, - $worker_rlimit_nofile = $nginx::params::nx_worker_rlimit_nofile, - $package_name = $nginx::params::package_name, - $package_ensure = $nginx::params::package_ensure, - $package_source = $nginx::params::package_source, - $proxy_set_header = $nginx::params::nx_proxy_set_header, - $proxy_http_version = $nginx::params::nx_proxy_http_version, - $confd_purge = $nginx::params::nx_confd_purge, - $vhost_purge = $nginx::params::nx_vhost_purge, - $proxy_cache_path = $nginx::params::nx_proxy_cache_path, - $proxy_cache_levels = $nginx::params::nx_proxy_cache_levels, - $proxy_cache_keys_zone = $nginx::params::nx_proxy_cache_keys_zone, - $proxy_cache_max_size = $nginx::params::nx_proxy_cache_max_size, - $proxy_cache_inactive = $nginx::params::nx_proxy_cache_inactive, - $configtest_enable = $nginx::params::nx_configtest_enable, - $service_restart = $nginx::params::nx_service_restart, - $service_ensure = $nginx::params::nx_service_ensure, - $mail = $nginx::params::nx_mail, - $server_tokens = $nginx::params::nx_server_tokens, - $client_max_body_size = $nginx::params::nx_client_max_body_size, - $names_hash_bucket_size = $nginx::params::nx_names_hash_bucket_size, - $names_hash_max_size = $nginx::params::nx_names_hash_max_size, - $proxy_buffers = $nginx::params::nx_proxy_buffers, - $proxy_buffer_size = $nginx::params::nx_proxy_buffer_size, - $http_cfg_append = $nginx::params::nx_http_cfg_append, - $nginx_error_log = $nginx::params::nx_nginx_error_log, - $http_access_log = $nginx::params::nx_http_access_log, - $gzip = $nginx::params::nx_gzip, - $conf_template = $nginx::params::nx_conf_template, - $proxy_conf_template = $nginx::params::nx_proxy_conf_template, - $nginx_vhosts = {}, - $nginx_upstreams = {}, - $nginx_locations = {}, - $manage_repo = $nginx::params::manage_repo, -) inherits nginx::params { - - include stdlib - - if (!is_string($worker_processes)) and (!is_integer($worker_processes)) { - fail('$worker_processes must be an integer or have value "auto".') - } - if (!is_integer($worker_connections)) { - fail('$worker_connections must be an integer.') - } - if (!is_integer($worker_rlimit_nofile)) { - fail('$worker_rlimit_nofile must be an integer.') - } - validate_string($package_name) - validate_string($package_ensure) - validate_string($package_source) - validate_array($proxy_set_header) - validate_string($proxy_http_version) - validate_bool($confd_purge) - validate_bool($vhost_purge) - if ($proxy_cache_path != false) { - validate_string($proxy_cache_path) - } - if (!is_integer($proxy_cache_levels)) { - fail('$proxy_cache_levels must be an integer.') - } - validate_string($proxy_cache_keys_zone) - validate_string($proxy_cache_max_size) - validate_string($proxy_cache_inactive) - validate_bool($configtest_enable) - validate_string($service_restart) - validate_bool($mail) - validate_string($server_tokens) - validate_string($client_max_body_size) - if (!is_integer($names_hash_bucket_size)) { - fail('$names_hash_bucket_size must be an integer.') - } - if (!is_integer($names_hash_max_size)) { - fail('$names_hash_max_size must be an integer.') - } - validate_string($proxy_buffers) - validate_string($proxy_buffer_size) - if ($http_cfg_append != false) { - validate_hash($http_cfg_append) - } - validate_string($nginx_error_log) - validate_string($http_access_log) - validate_hash($nginx_upstreams) - validate_hash($nginx_vhosts) - validate_hash($nginx_locations) - validate_bool($manage_repo) - - class { 'nginx::package': - package_name => $package_name, - package_source => $package_source, - package_ensure => $package_ensure, - notify => Class['nginx::service'], - manage_repo => $manage_repo, - } - - class { 'nginx::config': - worker_processes => $worker_processes, - worker_connections => $worker_connections, - worker_rlimit_nofile => $worker_rlimit_nofile, - proxy_set_header => $proxy_set_header, - proxy_http_version => $proxy_http_version, - proxy_cache_path => $proxy_cache_path, - proxy_cache_levels => $proxy_cache_levels, - proxy_cache_keys_zone => $proxy_cache_keys_zone, - proxy_cache_max_size => $proxy_cache_max_size, - proxy_cache_inactive => $proxy_cache_inactive, - confd_purge => $confd_purge, - vhost_purge => $vhost_purge, - server_tokens => $server_tokens, - client_max_body_size => $client_max_body_size, - names_hash_bucket_size => $names_hash_bucket_size, - names_hash_max_size => $names_hash_max_size, - proxy_buffers => $proxy_buffers, - proxy_buffer_size => $proxy_buffer_size, - http_cfg_append => $http_cfg_append, - nginx_error_log => $nginx_error_log, - http_access_log => $http_access_log, - gzip => $gzip, - conf_template => $conf_template, - proxy_conf_template => $proxy_conf_template, - require => Class['nginx::package'], - notify => Class['nginx::service'], - } - - class { 'nginx::service': - } - - create_resources('nginx::resource::upstream', $nginx_upstreams) - create_resources('nginx::resource::vhost', $nginx_vhosts) - create_resources('nginx::resource::location', $nginx_locations) - - # Allow the end user to establish relationships to the "main" class - # and preserve the relationship to the implementation classes through - # a transitive relationship to the composite class. - anchor{ 'nginx::begin': - before => Class['nginx::package'], - notify => Class['nginx::service'], - } - anchor { 'nginx::end': - require => Class['nginx::service'], - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package.pp deleted file mode 100644 index 74885b2b5e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package.pp +++ /dev/null @@ -1,79 +0,0 @@ -# Class: nginx::package -# -# This module manages NGINX package installation -# -# Parameters: -# -# There are no default parameters for this class. -# -# Actions: -# -# Requires: -# -# Sample Usage: -# -# This class file is not called directly -class nginx::package( - $package_name = 'nginx', - $package_source = 'nginx', - $package_ensure = 'present', - $manage_repo = true, -) { - - anchor { 'nginx::package::begin': } - anchor { 'nginx::package::end': } - - case $::osfamily { - 'redhat': { - class { 'nginx::package::redhat': - manage_repo => $manage_repo, - package_ensure => $package_ensure, - package_name => $package_name, - require => Anchor['nginx::package::begin'], - before => Anchor['nginx::package::end'], - } - } - 'debian': { - class { 'nginx::package::debian': - package_name => $package_name, - package_source => $package_source, - package_ensure => $package_ensure, - manage_repo => $manage_repo, - require => Anchor['nginx::package::begin'], - before => Anchor['nginx::package::end'], - } - } - 'suse': { - class { 'nginx::package::suse': - require => Anchor['nginx::package::begin'], - before => Anchor['nginx::package::end'], - } - } - 'Solaris': { - class { 'nginx::package::solaris': - package_name => $package_name, - package_source => $package_source, - package_ensure => $package_ensure, - require => Anchor['nginx::package::begin'], - before => Anchor['nginx::package::end'], - } - } - default: { - case $::operatingsystem { - 'amazon': { - # Amazon was added to osfamily RedHat in 1.7.2 - # https://github.com/puppetlabs/facter/commit/c12d3b6c557df695a7b2b009da099f6a93c7bd31#lib/facter/osfamily.rb - warning("Module ${module_name} support for ${::operatingsystem} with facter < 1.7.2 is deprecated") - warning("Please upgrade from facter ${::facterversion} to >= 1.7.2") - class { 'nginx::package::redhat': - require => Anchor['nginx::package::begin'], - before => Anchor['nginx::package::end'], - } - } - default: { - fail("Module ${module_name} is not supported on ${::operatingsystem}") - } - } - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/debian.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/debian.pp deleted file mode 100644 index b87e3c0bed..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/debian.pp +++ /dev/null @@ -1,73 +0,0 @@ -# Class: nginx::package::debian -# -# This module manages NGINX package installation on debian based systems -# -# Parameters: -# -# There are no default parameters for this class. -# -# Actions: -# -# Requires: -# -# Sample Usage: -# -# This class file is not called directly -class nginx::package::debian( - $manage_repo = true, - $package_name = 'nginx', - $package_source = 'nginx', - $package_ensure = 'present' - ) { - - - $distro = downcase($::operatingsystem) - - package { $package_name: - ensure => $package_ensure, - require => Anchor['nginx::apt_repo'], - } - - anchor { 'nginx::apt_repo' : } - - include '::apt' - - if $manage_repo { - case $package_source { - 'nginx': { - apt::source { 'nginx': - location => "http://nginx.org/packages/${distro}", - repos => 'nginx', - key => '7BD9BF62', - key_source => 'http://nginx.org/keys/nginx_signing.key', - notify => Exec['apt_get_update_for_nginx'], - } - } - 'passenger': { - ensure_resource('package', 'apt-transport-https', {'ensure' => 'present' }) - - apt::source { 'nginx': - location => 'https://oss-binaries.phusionpassenger.com/apt/passenger', - repos => "main", - key => '561F9B9CAC40B2F7', - key_source => 'https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt', - notify => Exec['apt_get_update_for_nginx'], - } - - package { 'passenger': - ensure => 'present', - require => Anchor['nginx::apt_repo'], - } - } - default: {} - } - - exec { 'apt_get_update_for_nginx': - command => '/usr/bin/apt-get update', - timeout => 240, - returns => [ 0, 100 ], - refreshonly => true, - before => Anchor['nginx::apt_repo'], - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/redhat.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/redhat.pp deleted file mode 100644 index 4cc34eea9a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/redhat.pp +++ /dev/null @@ -1,71 +0,0 @@ -# Class: nginx::package::redhat -# -# This module manages NGINX package installation on RedHat based systems -# -# Parameters: -# -# There are no default parameters for this class. -# -# Actions: -# -# Requires: -# -# Sample Usage: -# -# This class file is not called directly -class nginx::package::redhat ( - $manage_repo = true, - $package_ensure = 'present', - $package_name = 'nginx', -) { - - case $::operatingsystem { - 'fedora': { - # nginx.org does not supply RPMs for fedora - # fedora 18 provides 1.2.x packages - # fedora 19 has 1.4.x packages are in - - # fedora 18 users will need to supply their own nginx 1.4 rpms and/or repo - if $::lsbmajdistrelease and $::lsbmajdistrelease < 19 { - notice("${::operatingsystem} ${::lsbmajdistrelease} does not supply nginx >= 1.4 packages") - } - } - default: { - case $::lsbmajdistrelease { - 5, 6: { - $os_rel = $::lsbmajdistrelease - } - default: { - # Amazon uses the year as the $::lsbmajdistrelease - $os_rel = 6 - } - } - - # as of 2013-07-28 - # http://nginx.org/packages/centos appears to be identical to - # http://nginx.org/packages/rhel - # no other dedicated dirs exist for platforms under $::osfamily == redhat - if $manage_repo { - yumrepo { 'nginx-release': - baseurl => "http://nginx.org/packages/rhel/${os_rel}/\$basearch/", - descr => 'nginx repo', - enabled => '1', - gpgcheck => '1', - priority => '1', - gpgkey => 'http://nginx.org/keys/nginx_signing.key', - before => Package[$package_name], - } - - file { '/etc/yum.repos.d/nginx-release.repo': - ensure => present, - require => Yumrepo['nginx-release'], - } - } - } - } - - package { $package_name: - ensure => $package_ensure, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/solaris.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/solaris.pp deleted file mode 100644 index fb1386c95a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/solaris.pp +++ /dev/null @@ -1,29 +0,0 @@ -# Class: nginx::package::solaris -# -# This module manages NGINX package installation on solaris based systems -# -# Parameters: -# -# *package_name* -# Needs to be specified. SFEnginx,CSWnginx depending on where you get it. -# -# *package_source* -# Needed in case of Solaris 10. -# -# Actions: -# -# Requires: -# -# Sample Usage: -# -# This class file is not called directly -class nginx::package::solaris( - $package_name = undef, - $package_source = '', - $package_ensure = 'present' - ){ - package { $package_name: - ensure => $package_ensure, - source => $package_source - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/suse.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/suse.pp deleted file mode 100644 index 0c044b09f1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/package/suse.pp +++ /dev/null @@ -1,30 +0,0 @@ -# Class: nginx::package::suse -# -# This module manages NGINX package installation for SuSE based systems -# -# Parameters: -# -# There are no default parameters for this class. -# -# Actions: -# This module contains all of the required package for SuSE. Apache and all -# other packages listed below are built into the packaged RPM spec for -# SuSE and OpenSuSE. -# Requires: -# -# Sample Usage: -# -# This class file is not called directly -class nginx::package::suse { - - $suse_packages = [ - 'nginx-0.8', 'apache2', 'apache2-itk', 'apache2-utils', 'gd', 'libapr1', - 'libapr-util1', 'libjpeg62', 'libpng14-14', 'libxslt', 'rubygem-daemon_controller', - 'rubygem-fastthread', 'rubygem-file-tail', 'rubygem-passenger', - 'rubygem-passenger-nginx', 'rubygem-rack', 'rubygem-rake', 'rubygem-spruz', - ] - - package { $suse_packages: - ensure => $nginx::package_ensure, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/params.pp deleted file mode 100644 index 2dfdd2c4b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/params.pp +++ /dev/null @@ -1,123 +0,0 @@ -# Class: nginx::param -# -# This module manages NGINX paramaters -# -# Parameters: -# -# There are no default parameters for this class. -# -# Actions: -# -# Requires: -# -# Sample Usage: -# -# This class file is not called directly -class nginx::params { - - $nx_temp_dir = '/tmp' - $nx_run_dir = '/var/nginx' - - $nx_conf_template = 'nginx/conf.d/nginx.conf.erb' - $nx_proxy_conf_template = 'nginx/conf.d/proxy.conf.erb' - $nx_confd_purge = false - $nx_vhost_purge = false - $nx_worker_processes = 1 - $nx_worker_connections = 1024 - $nx_worker_rlimit_nofile = 1024 - $nx_types_hash_max_size = 1024 - $nx_types_hash_bucket_size = 512 - $nx_names_hash_bucket_size = 64 - $nx_names_hash_max_size = 512 - $nx_multi_accept = off - # One of [kqueue|rtsig|epoll|/dev/poll|select|poll|eventport] - # or false to use OS default - $nx_events_use = false - $nx_sendfile = on - $nx_keepalive_timeout = 65 - $nx_tcp_nodelay = on - $nx_gzip = on - $nx_server_tokens = on - $nx_spdy = off - $nx_ssl_stapling = off - - $nx_proxy_redirect = off - $nx_proxy_set_header = [ - 'Host $host', - 'X-Real-IP $remote_addr', - 'X-Forwarded-For $proxy_add_x_forwarded_for', - ] - $nx_proxy_cache_path = false - $nx_proxy_cache_levels = 1 - $nx_proxy_cache_keys_zone = 'd2:100m' - $nx_proxy_cache_max_size = '500m' - $nx_proxy_cache_inactive = '20m' - - $nx_client_body_temp_path = "${nx_run_dir}/client_body_temp" - $nx_client_body_buffer_size = '128k' - $nx_client_max_body_size = '1000m' - $nx_proxy_temp_path = "${nx_run_dir}/proxy_temp" - $nx_proxy_connect_timeout = '90' - $nx_proxy_send_timeout = '90' - $nx_proxy_read_timeout = '90' - $nx_proxy_buffers = '32 4k' - $nx_proxy_http_version = '1.0' - $nx_proxy_buffer_size = '8k' - - $nx_logdir = $::kernel ? { - /(?i-mx:linux)/ => '/var/log/nginx', - /(?i-mx:sunos)/ => '/var/log/nginx', - } - - $nx_pid = $::kernel ? { - /(?i-mx:linux)/ => '/var/run/nginx.pid', - /(?i-mx:sunos)/ => '/var/run/nginx.pid', - } - - $nx_conf_dir = $::kernelversion ? { - /(?i-mx:joyent)/ => '/opt/local/etc/nginx', - default => '/etc/nginx', - } - - if $::osfamily { - $solaris_nx_daemon_user = $::kernelversion ? { - /(?i-mx:joyent)/ => 'www', - default => 'webservd', - } - $nx_daemon_user = $::osfamily ? { - /(?i-mx:redhat|suse|gentoo|linux)/ => 'nginx', - /(?i-mx:debian)/ => 'www-data', - /(?i-mx:solaris)/ => $solaris_nx_daemon_user, - } - } else { - warning('$::osfamily not defined. Support for $::operatingsystem is deprecated') - warning("Please upgrade from factor ${::facterversion} to >= 1.7.2") - $nx_daemon_user = $::operatingsystem ? { - /(?i-mx:debian|ubuntu)/ => 'www-data', - /(?i-mx:fedora|rhel|redhat|centos|scientific|suse|opensuse|amazon|gentoo|oraclelinux)/ => 'nginx', - /(?i-mx:solaris)/ => 'webservd', - } - } - - # Service restart after Nginx 0.7.53 could also be just - # "/path/to/nginx/bin -s HUP" Some init scripts do a configtest, some don't. - # If configtest_enable it's true then service restart will take - # $nx_service_restart value, forcing configtest. - - $nx_configtest_enable = false - $nx_service_restart = '/etc/init.d/nginx configtest && /etc/init.d/nginx restart' - $nx_service_ensure = running - - $nx_mail = false - - $nx_http_cfg_append = false - - $nx_nginx_error_log = "${nx_logdir}/error.log" - $nx_http_access_log = "${nx_logdir}/access.log" - - # package name depends on distribution, e.g. for Debian nginx-full | nginx-light - $package_name = 'nginx' - $package_ensure = 'present' - $package_source = 'nginx' - $manage_repo = true -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/location.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/location.pp deleted file mode 100644 index c44a673793..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/location.pp +++ /dev/null @@ -1,299 +0,0 @@ -# define: nginx::resource::location -# -# This definition creates a new location entry within a virtual host -# -# Parameters: -# [*ensure*] - Enables or disables the specified location -# (present|absent) -# [*vhost*] - Defines the default vHost for this location -# entry to include with -# [*location*] - Specifies the URI associated with this location -# entry -# [*location_allow*] - Array: Locations to allow connections from. -# [*location_deny*] - Array: Locations to deny connections from. -# [*www_root*] - Specifies the location on disk for files to be -# read from. Cannot be set in conjunction with $proxy -# [*autoindex*] - Set it on 'on' to activate autoindex directory -# listing. Undef by default. -# [*index_files*] - Default index files for NGINX to read when -# traversing a directory -# [*proxy*] - Proxy server(s) for a location to connect to. -# Accepts a single value, can be used in conjunction with -# nginx::resource::upstream -# [*proxy_read_timeout*] - Override the default the proxy read timeout -# value of 90 seconds -# [*fastcgi*] - location of fastcgi (host:port) -# [*fastcgi_params*] - optional alternative fastcgi_params file to use -# [*fastcgi_script*] - optional SCRIPT_FILE parameter -# [*fastcgi_split_path*] - Allows settings of fastcgi_split_path_info so -# that you can split the script_name and path_info via regex -# [*ssl*] - Indicates whether to setup SSL bindings for -# this location. -# [*ssl_only*] - Required if the SSL and normal vHost have the -# same port. -# [*location_alias*] - Path to be used as basis for serving requests -# for this location -# [*stub_status*] - If true it will point configure module -# stub_status to provide nginx stats on location -# [*location_custom_cfg*] - Expects a hash with custom directives, cannot -# be used with other location types (proxy, fastcgi, root, or stub_status) -# [*location_cfg_prepend*] - Expects a hash with extra directives to put -# before anything else inside location (used with all other types except -# custom_cfg) -# [*location_custom_cfg_prepend*] - Expects a array with extra directives -# to put before anything else inside location (used with all other types -# except custom_cfg). Used for logical structures such as if. -# [*location_custom_cfg_append*] - Expects a array with extra directives -# to put before anything else inside location (used with all other types -# except custom_cfg). Used for logical structures such as if. -# [*location_cfg_append*] - Expects a hash with extra directives to put -# after everything else inside location (used with all other types except -# custom_cfg) -# [*try_files*] - An array of file locations to try -# [*option*] - Reserved for future use -# [*proxy_cache*] - This directive sets name of zone for caching. -# The same zone can be used in multiple places. -# [*proxy_cache_valid*] - This directive sets the time for caching -# different replies. -# [*proxy_method*] - If defined, overrides the HTTP method of the -# request to be passed to the backend. -# [*proxy_set_body*] - If defined, sets the body passed to the backend. -# [*auth_basic*] - This directive includes testing name and password -# with HTTP Basic Authentication. -# [*auth_basic_user_file*] - This directive sets the htpasswd filename for -# the authentication realm. -# [*priority*] - Location priority. Default: 500. User priority -# 401-499, 501-599. If the priority is higher than the default priority, -# the location will be defined after root, or before root. -# -# -# Actions: -# -# Requires: -# -# Sample Usage: -# nginx::resource::location { 'test2.local-bob': -# ensure => present, -# www_root => '/var/www/bob', -# location => '/bob', -# vhost => 'test2.local', -# } -# -# Custom config example to limit location on localhost, -# create a hash with any extra custom config you want. -# $my_config = { -# 'access_log' => 'off', -# 'allow' => '127.0.0.1', -# 'deny' => 'all' -# } -# nginx::resource::location { 'test2.local-bob': -# ensure => present, -# www_root => '/var/www/bob', -# location => '/bob', -# vhost => 'test2.local', -# location_cfg_append => $my_config, -# } - -define nginx::resource::location ( - $ensure = present, - $location = $name, - $vhost = undef, - $www_root = undef, - $autoindex = undef, - $index_files = [ - 'index.html', - 'index.htm', - 'index.php'], - $proxy = undef, - $proxy_read_timeout = $nginx::params::nx_proxy_read_timeout, - $fastcgi = undef, - $fastcgi_params = '/etc/nginx/fastcgi_params', - $fastcgi_script = undef, - $fastcgi_split_path = undef, - $ssl = false, - $ssl_only = false, - $location_alias = undef, - $location_allow = undef, - $location_deny = undef, - $option = undef, - $stub_status = undef, - $location_custom_cfg = undef, - $location_cfg_prepend = undef, - $location_cfg_append = undef, - $location_custom_cfg_prepend = undef, - $location_custom_cfg_append = undef, - $try_files = undef, - $proxy_cache = false, - $proxy_cache_valid = false, - $proxy_method = undef, - $proxy_set_body = undef, - $auth_basic = undef, - $auth_basic_user_file = undef, - $rewrite_rules = [], - $priority = 500 -) { - File { - owner => 'root', - group => 'root', - mode => '0644', - notify => Class['nginx::service'], - } - - validate_re($ensure, '^(present|absent)$', - "${ensure} is not supported for ensure. Allowed values are 'present' and 'absent'.") - validate_string($location) - if ($vhost != undef) { - validate_string($vhost) - } - if ($www_root != undef) { - validate_string($www_root) - } - if ($autoindex != undef) { - validate_string($autoindex) - } - validate_array($index_files) - if ($proxy != undef) { - validate_string($proxy) - } - validate_string($proxy_read_timeout) - if ($fastcgi != undef) { - validate_string($fastcgi) - } - validate_string($fastcgi_params) - if ($fastcgi_script != undef) { - validate_string($fastcgi_script) - } - if ($fastcgi_split_path != undef) { - validate_string($fastcgi_split_path) - } - validate_bool($ssl) - validate_bool($ssl_only) - if ($location_alias != undef) { - validate_string($location_alias) - } - if ($location_allow != undef) { - validate_array($location_allow) - } - if ($location_deny != undef) { - validate_array($location_deny) - } - if ($option != undef) { - warning('The $option parameter has no effect and is deprecated.') - } - if ($stub_status != undef) { - validate_bool($stub_status) - } - if ($location_custom_cfg != undef) { - validate_hash($location_custom_cfg) - } - if ($location_cfg_prepend != undef) { - validate_hash($location_cfg_prepend) - } - if ($location_cfg_append != undef) { - validate_hash($location_cfg_append) - } - if ($try_files != undef) { - validate_array($try_files) - } - if ($proxy_cache != false) { - validate_string($proxy_cache) - } - if ($proxy_cache_valid != false) { - validate_string($proxy_cache_valid) - } - if ($proxy_method != undef) { - validate_string($proxy_method) - } - if ($proxy_set_body != undef) { - validate_string($proxy_set_body) - } - if ($auth_basic != undef) { - validate_string($auth_basic) - } - if ($auth_basic_user_file != undef) { - validate_string($auth_basic_user_file) - } - if !is_integer($priority) { - fail('$priority must be an integer.') - } - validate_array($rewrite_rules) - if ($priority < 401) or ($priority > 599) { - fail('$priority must be in the range 401-599.') - } - - # # Shared Variables - $ensure_real = $ensure ? { - 'absent' => absent, - default => file, - } - - $vhost_sanitized = regsubst($vhost, ' ', '_', 'G') - $config_file = "${nginx::config::nx_conf_dir}/sites-available/${vhost_sanitized}.conf" - - $location_sanitized_tmp = regsubst($location, '\/', '_', 'G') - $location_sanitized = regsubst($location_sanitized_tmp, '\\', '_', 'G') - - ## Check for various error conditions - if ($vhost == undef) { - fail('Cannot create a location reference without attaching to a virtual host') - } - if (($www_root == undef) and ($proxy == undef) and ($location_alias == undef) and ($stub_status == undef) and ($fastcgi == undef) and ($location_custom_cfg == undef)) { - fail('Cannot create a location reference without a www_root, proxy, location_alias, fastcgi, stub_status, or location_custom_cfg defined') - } - if (($www_root != undef) and ($proxy != undef)) { - fail('Cannot define both directory and proxy in a virtual host') - } - - # Use proxy or fastcgi template if $proxy is defined, otherwise use directory template. - if ($proxy != undef) { - $content_real = template('nginx/vhost/vhost_location_proxy.erb') - } elsif ($location_alias != undef) { - $content_real = template('nginx/vhost/vhost_location_alias.erb') - } elsif ($stub_status != undef) { - $content_real = template('nginx/vhost/vhost_location_stub_status.erb') - } elsif ($fastcgi != undef) { - $content_real = template('nginx/vhost/vhost_location_fastcgi.erb') - } elsif ($www_root != undef) { - $content_real = template('nginx/vhost/vhost_location_directory.erb') - } else { - $content_real = template('nginx/vhost/vhost_location_empty.erb') - } - - if $fastcgi != undef and !defined(File['/etc/nginx/fastcgi_params']) { - file { '/etc/nginx/fastcgi_params': - ensure => present, - mode => '0770', - content => template('nginx/vhost/fastcgi_params.erb'), - } - } - - ## Create stubs for vHost File Fragment Pattern - if ($ssl_only != true) { - concat::fragment { "${vhost_sanitized}-${priority}-${location_sanitized}": - ensure => present, - target => $config_file, - content => $content_real, - order => "${priority}", - } - } - - ## Only create SSL Specific locations if $ssl is true. - if ($ssl == true) { - $ssl_priority = $priority + 300 - concat::fragment {"${vhost_sanitized}-${ssl_priority}-${location_sanitized}-ssl": - ensure => present, - target => $config_file, - content => $content_real, - order => "${ssl_priority}", - } - } - - if ($auth_basic_user_file != undef) { - #Generate htpasswd with provided file-locations - file { "${nginx::params::nx_conf_dir}/${location_sanitized}_htpasswd": - ensure => $ensure, - mode => '0644', - source => $auth_basic_user_file, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/mailhost.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/mailhost.pp deleted file mode 100644 index 89e0245d70..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/mailhost.pp +++ /dev/null @@ -1,144 +0,0 @@ -# define: nginx::resource::mailhost -# -# This definition creates a virtual host -# -# Parameters: -# [*ensure*] - Enables or disables the specified mailhost (present|absent) -# [*listen_ip*] - Default IP Address for NGINX to listen with this vHost on. Defaults to all interfaces (*) -# [*listen_port*] - Default IP Port for NGINX to listen with this vHost on. Defaults to TCP 80 -# [*listen_options*] - Extra options for listen directive like 'default' to catchall. Undef by default. -# [*ipv6_enable*] - BOOL value to enable/disable IPv6 support (false|true). Module will check to see if IPv6 -# support exists on your system before enabling. -# [*ipv6_listen_ip*] - Default IPv6 Address for NGINX to listen with this vHost on. Defaults to all interfaces (::) -# [*ipv6_listen_port*] - Default IPv6 Port for NGINX to listen with this vHost on. Defaults to TCP 80 -# [*ipv6_listen_options*] - Extra options for listen directive like 'default' to catchall. Template will allways add ipv6only=on. -# While issue jfryman/puppet-nginx#30 is discussed, default value is 'default'. -# [*index_files*] - Default index files for NGINX to read when traversing a directory -# [*ssl*] - Indicates whether to setup SSL bindings for this mailhost. -# [*ssl_cert*] - Pre-generated SSL Certificate file to reference for SSL Support. This is not generated by this module. -# [*ssl_key*] - Pre-generated SSL Key file to reference for SSL Support. This is not generated by this module. -# [*ssl_port*] - Default IP Port for NGINX to listen with this SSL vHost on. Defaults to TCP 443 -# [*starttls*] - enable STARTTLS support: (on|off|only) -# [*protocol*] - Mail protocol to use: (imap|pop3|smtp) -# [*auth_http*] - With this directive you can set the URL to the external HTTP-like server for authorization. -# [*xclient*] - wheter to use xclient for smtp (on|off) -# [*server_name*] - List of mailhostnames for which this mailhost will respond. Default [$name]. -# -# Actions: -# -# Requires: -# -# Sample Usage: -# nginx::resource::mailhost { 'domain1.example': -# ensure => present, -# auth_http => 'server2.example/cgi-bin/auth', -# protocol => 'smtp', -# listen_port => 587, -# ssl_port => 465, -# starttls => 'only', -# xclient => 'off', -# ssl => true, -# ssl_cert => '/tmp/server.crt', -# ssl_key => '/tmp/server.pem', -# } -define nginx::resource::mailhost ( - $listen_port, - $ensure = 'present', - $listen_ip = '*', - $listen_options = undef, - $ipv6_enable = false, - $ipv6_listen_ip = '::', - $ipv6_listen_port = '80', - $ipv6_listen_options = 'default ipv6only=on', - $ssl = false, - $ssl_cert = undef, - $ssl_key = undef, - $ssl_port = undef, - $starttls = 'off', - $protocol = undef, - $auth_http = undef, - $xclient = 'on', - $server_name = [$name]) { - File { - owner => 'root', - group => 'root', - mode => '0644', - } - - if !is_integer($listen_port) { - fail('$listen_port must be an integer.') - } - validate_re($ensure, '^(present|absent)$', - "${ensure} is not supported for ensure. Allowed values are 'present' and 'absent'.") - validate_string($listen_ip) - if ($listen_options != undef) { - validate_string($listen_options) - } - validate_bool($ipv6_enable) - validate_string($ipv6_listen_ip) - if !is_integer($ipv6_listen_port) { - fail('$ipv6_listen_port must be an integer.') - } - validate_string($ipv6_listen_options) - validate_bool($ssl) - if ($ssl_cert != undef) { - validate_string($ssl_cert) - } - if ($ssl_key != undef) { - validate_string($ssl_key) - } - if ($ssl_port != undef) and (!is_integer($ssl_port)) { - fail('$ssl_port must be an integer.') - } - validate_re($starttls, '^(on|only|off)$', - "${starttls} is not supported for starttls. Allowed values are 'on', 'only' and 'off'.") - if ($protocol != undef) { - validate_string($protocol) - } - if ($auth_http != undef) { - validate_string($auth_http) - } - validate_string($xclient) - validate_array($server_name) - - $config_file = "${nginx::config::nx_conf_dir}/conf.mail.d/${name}.conf" - - # Add IPv6 Logic Check - Nginx service will not start if ipv6 is enabled - # and support does not exist for it in the kernel. - if ($ipv6_enable and !$::ipaddress6) { - warning('nginx: IPv6 support is not enabled or configured properly') - } - - # Check to see if SSL Certificates are properly defined. - if ($ssl or $starttls == 'on' or $starttls == 'only') { - if ($ssl_cert == undef) or ($ssl_key == undef) { - fail('nginx: SSL certificate/key (ssl_cert/ssl_cert) and/or SSL Private must be defined and exist on the target system(s)') - } - } - - concat { $config_file: - owner => 'root', - group => 'root', - mode => '0644', - notify => Class['nginx::service'], - } - - if ($listen_port != $ssl_port) { - concat::fragment { "${name}-header": - ensure => present, - target => $config_file, - content => template('nginx/mailhost/mailhost.erb'), - order => '001', - } - } - - # Create SSL File Stubs if SSL is enabled - if ($ssl) { - concat::fragment { "${name}-ssl": - ensure => present, - target => $config_file, - content => template('nginx/mailhost/mailhost_ssl.erb'), - order => '700', - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/upstream.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/upstream.pp deleted file mode 100644 index 920aff98a1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/upstream.pp +++ /dev/null @@ -1,68 +0,0 @@ -# define: nginx::resource::upstream -# -# This definition creates a new upstream proxy entry for NGINX -# -# Parameters: -# [*members*] - Array of member URIs for NGINX to connect to. Must follow valid NGINX syntax. -# [*ensure*] - Enables or disables the specified location (present|absent) -# [*upstream_cfg_prepend*] - It expects a hash with custom directives to put before anything else inside upstream -# [*upstream_fail_timeout*] - Set the fail_timeout for the upstream. Default is 10 seconds - As that is what Nginx does normally. -# -# Actions: -# -# Requires: -# -# Sample Usage: -# nginx::resource::upstream { 'proxypass': -# ensure => present, -# members => [ -# 'localhost:3000', -# 'localhost:3001', -# 'localhost:3002', -# ], -# } -# -# Custom config example to use ip_hash, and 20 keepalive connections -# create a hash with any extra custom config you want. -# $my_config = { -# 'ip_hash' => '', -# 'keepalive' => '20', -# } -# nginx::resource::upstream { 'proxypass': -# ensure => present, -# members => [ -# 'localhost:3000', -# 'localhost:3001', -# 'localhost:3002', -# ], -# upstream_cfg_prepend => $my_config, -# } -define nginx::resource::upstream ( - $members, - $ensure = 'present', - $upstream_cfg_prepend = undef, - $upstream_fail_timeout = '10s', -) { - - validate_array($members) - validate_re($ensure, '^(present|absent)$', - "${ensure} is not supported for ensure. Allowed values are 'present' and 'absent'.") - if ($upstream_cfg_prepend != undef) { - validate_hash($upstream_cfg_prepend) - } - - File { - owner => 'root', - group => 'root', - mode => '0644', - } - - file { "/etc/nginx/conf.d/${name}-upstream.conf": - ensure => $ensure ? { - 'absent' => absent, - default => 'file', - }, - content => template('nginx/conf.d/upstream.erb'), - notify => Class['nginx::service'], - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/vhost.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/vhost.pp deleted file mode 100644 index 453984dc26..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/resource/vhost.pp +++ /dev/null @@ -1,511 +0,0 @@ -# define: nginx::resource::vhost -# -# This definition creates a virtual host -# -# Parameters: -# [*ensure*] - Enables or disables the specified vhost -# (present|absent) -# [*listen_ip*] - Default IP Address for NGINX to listen with this -# vHost on. Defaults to all interfaces (*) -# [*listen_port*] - Default IP Port for NGINX to listen with this -# vHost on. Defaults to TCP 80 -# [*listen_options*] - Extra options for listen directive like -# 'default' to catchall. Undef by default. -# [*location_allow*] - Array: Locations to allow connections from. -# [*location_deny*] - Array: Locations to deny connections from. -# [*ipv6_enable*] - BOOL value to enable/disable IPv6 support -# (false|true). Module will check to see if IPv6 support exists on your -# system before enabling. -# [*ipv6_listen_ip*] - Default IPv6 Address for NGINX to listen with -# this vHost on. Defaults to all interfaces (::) -# [*ipv6_listen_port*] - Default IPv6 Port for NGINX to listen with this -# vHost on. Defaults to TCP 80 -# [*ipv6_listen_options*] - Extra options for listen directive like 'default' -# to catchall. Template will allways add ipv6only=on. While issue -# jfryman/puppet-nginx#30 is discussed, default value is 'default'. -# [*add_header*] - Hash: Adds headers to the HTTP response when -# response code is equal to 200, 204, 301, 302 or 304. -# [*index_files*] - Default index files for NGINX to read when -# traversing a directory -# [*autoindex*] - Set it on 'on' or 'off 'to activate/deactivate -# autoindex directory listing. Undef by default. -# [*proxy*] - Proxy server(s) for the root location to connect -# to. Accepts a single value, can be used in conjunction with -# nginx::resource::upstream -# [*proxy_read_timeout*] - Override the default the proxy read timeout value -# of 90 seconds -# [*resolver*] - String: Configures name servers used to resolve -# names of upstream servers into addresses. -# [*fastcgi*] - location of fastcgi (host:port) -# [*fastcgi_params*] - optional alternative fastcgi_params file to use -# [*fastcgi_script*] - optional SCRIPT_FILE parameter -# [*ssl*] - Indicates whether to setup SSL bindings for this -# vhost. -# [*ssl_cert*] - Pre-generated SSL Certificate file to reference -# for SSL Support. This is not generated by this module. -# [*ssl_dhparam*] - This directive specifies a file containing -# Diffie-Hellman key agreement protocol cryptographic parameters, in PEM -# format, utilized for exchanging session keys between server and client. -# [*ssl_key*] - Pre-generated SSL Key file to reference for SSL -# Support. This is not generated by this module. -# [*ssl_port*] - Default IP Port for NGINX to listen with this SSL -# vHost on. Defaults to TCP 443 -# [*ssl_protocols*] - SSL protocols enabled. Defaults to 'SSLv3 TLSv1 -# TLSv1.1 TLSv1.2'. -# [*ssl_ciphers*] - SSL ciphers enabled. Defaults to -# 'HIGH:!aNULL:!MD5'. -# [*ssl_stapling*] - Bool: Enables or disables stapling of OCSP -# responses by the server. Defaults to false. -# [*ssl_stapling_file*] - String: When set, the stapled OCSP response -# will be taken from the specified file instead of querying the OCSP -# responder specified in the server certificate. -# [*ssl_stapling_responder*] - String: Overrides the URL of the OCSP -# responder specified in the Authority Information Access certificate -# extension. -# [*ssl_stapling_verify*] - Bool: Enables or disables verification of -# OCSP responses by the server. Defaults to false. -# [*ssl_trusted_cert*] - String: Specifies a file with trusted CA -# certificates in the PEM format used to verify client certificates and -# OCSP responses if ssl_stapling is enabled. -# [*spdy*] - Toggles SPDY protocol. -# [*server_name*] - List of vhostnames for which this vhost will -# respond. Default [$name]. -# [*www_root*] - Specifies the location on disk for files to be -# read from. Cannot be set in conjunction with $proxy -# [*rewrite_www_to_non_www*] - Adds a server directive and rewrite rule to -# rewrite www.domain.com to domain.com in order to avoid duplicate -# content (SEO); -# [*try_files*] - Specifies the locations for files to be -# checked as an array. Cannot be used in conjuction with $proxy. -# [*proxy_cache*] - This directive sets name of zone for caching. -# The same zone can be used in multiple places. -# [*proxy_cache_valid*] - This directive sets the time for caching -# different replies. -# [*proxy_method*] - If defined, overrides the HTTP method of the -# request to be passed to the backend. -# [*proxy_set_body*] - If defined, sets the body passed to the backend. -# [*auth_basic*] - This directive includes testing name and -# password with HTTP Basic Authentication. -# [*auth_basic_user_file*] - This directive sets the htpasswd filename for -# the authentication realm. -# [*client_max_body_size*] - This directive sets client_max_body_size. -# [*vhost_cfg_append*] - It expects a hash with custom directives to -# put after everything else inside vhost -# [*vhost_cfg_prepend*] - It expects a hash with custom directives to -# put before everything else inside vhost -# [*vhost_cfg_ssl_append*] - It expects a hash with custom directives to -# put after everything else inside vhost ssl -# [*vhost_cfg_ssl_prepend*] - It expects a hash with custom directives to -# put before everything else inside vhost ssl -# [*rewrite_to_https*] - Adds a server directive and rewrite rule to -# rewrite to ssl -# [*include_files*] - Adds include files to vhost -# [*access_log*] - Where to write access log. May add additional -# options like log format to the end. -# [*error_log*] - Where to write error log. May add additional -# options like error level to the end. -# [*passenger_cgi_param*] - Allows one to define additional CGI environment -# variables to pass to the backend application -# Actions: -# -# Requires: -# -# Sample Usage: -# nginx::resource::vhost { 'test2.local': -# ensure => present, -# www_root => '/var/www/nginx-default', -# ssl => true, -# ssl_cert => '/tmp/server.crt', -# ssl_key => '/tmp/server.pem', -# } -define nginx::resource::vhost ( - $ensure = 'present', - $listen_ip = '*', - $listen_port = '80', - $listen_options = undef, - $location_allow = [], - $location_deny = [], - $ipv6_enable = false, - $ipv6_listen_ip = '::', - $ipv6_listen_port = '80', - $ipv6_listen_options = 'default ipv6only=on', - $add_header = undef, - $ssl = false, - $ssl_cert = undef, - $ssl_dhparam = undef, - $ssl_key = undef, - $ssl_port = '443', - $ssl_protocols = 'SSLv3 TLSv1 TLSv1.1 TLSv1.2', - $ssl_ciphers = 'HIGH:!aNULL:!MD5', - $ssl_cache = 'shared:SSL:10m', - $ssl_stapling = false, - $ssl_stapling_file = undef, - $ssl_stapling_responder = undef, - $ssl_stapling_verify = false, - $ssl_trusted_cert = undef, - $spdy = $nginx::params::nx_spdy, - $proxy = undef, - $proxy_read_timeout = $nginx::params::nx_proxy_read_timeout, - $proxy_set_header = [], - $proxy_cache = false, - $proxy_cache_valid = false, - $proxy_method = undef, - $proxy_set_body = undef, - $resolver = undef, - $fastcgi = undef, - $fastcgi_params = '/etc/nginx/fastcgi_params', - $fastcgi_script = undef, - $index_files = [ - 'index.html', - 'index.htm', - 'index.php'], - $autoindex = undef, - $server_name = [$name], - $www_root = undef, - $rewrite_www_to_non_www = false, - $rewrite_to_https = undef, - $location_custom_cfg = undef, - $location_cfg_prepend = undef, - $location_cfg_append = undef, - $try_files = undef, - $auth_basic = undef, - $auth_basic_user_file = undef, - $client_max_body_size = undef, - $vhost_cfg_prepend = undef, - $vhost_cfg_append = undef, - $vhost_cfg_ssl_prepend = undef, - $vhost_cfg_ssl_append = undef, - $include_files = undef, - $access_log = undef, - $error_log = undef, - $passenger_cgi_param = undef, - $use_default_location = true, - $rewrite_rules = [], -) { - - validate_re($ensure, '^(present|absent)$', - "${ensure} is not supported for ensure. Allowed values are 'present' and 'absent'.") - validate_string($listen_ip) - if !is_integer($listen_port) { - fail('$listen_port must be an integer.') - } - if ($listen_options != undef) { - validate_string($listen_options) - } - validate_array($location_allow) - validate_array($location_deny) - validate_bool($ipv6_enable) - validate_string($ipv6_listen_ip) - if !is_integer($ipv6_listen_port) { - fail('$ipv6_listen_port must be an integer.') - } - validate_string($ipv6_listen_options) - if ($add_header != undef) { - validate_hash($add_header) - } - validate_bool($ssl) - if ($ssl_cert != undef) { - validate_string($ssl_cert) - } - if ($ssl_dhparam != undef) { - validate_string($ssl_dhparam) - } - if ($ssl_key != undef) { - validate_string($ssl_key) - } - if !is_integer($ssl_port) { - fail('$ssl_port must be an integer.') - } - validate_string($ssl_protocols) - validate_string($ssl_ciphers) - validate_string($ssl_cache) - validate_bool($ssl_stapling) - if ($ssl_stapling_file != undef) { - validate_string($ssl_stapling_file) - } - if ($ssl_stapling_responder != undef) { - validate_string($ssl_stapling_responder) - } - validate_bool($ssl_stapling_verify) - if ($ssl_trusted_cert != undef) { - validate_string($ssl_trusted_cert) - } - validate_string($spdy) - if ($proxy != undef) { - validate_string($proxy) - } - validate_string($proxy_read_timeout) - validate_array($proxy_set_header) - if ($proxy_cache != false) { - validate_string($proxy_cache) - } - if ($proxy_cache_valid != false) { - validate_string($proxy_cache_valid) - } - if ($proxy_method != undef) { - validate_string($proxy_method) - } - if ($proxy_set_body != undef) { - validate_string($proxy_set_body) - } - if ($resolver != undef) { - validate_string($resolver) - } - if ($fastcgi != undef) { - validate_string($fastcgi) - } - validate_string($fastcgi_params) - if ($fastcgi_script != undef) { - validate_string($fastcgi_script) - } - validate_array($index_files) - if ($autoindex != undef) { - validate_string($autoindex) - } - validate_array($server_name) - if ($www_root != undef) { - validate_string($www_root) - } - validate_bool($rewrite_www_to_non_www) - if ($rewrite_to_https != undef) { - validate_bool($rewrite_to_https) - } - if ($location_custom_cfg != undef) { - validate_hash($location_custom_cfg) - } - if ($location_cfg_prepend != undef) { - validate_hash($location_cfg_prepend) - } - if ($location_cfg_append != undef) { - validate_hash($location_cfg_append) - } - if ($try_files != undef) { - validate_array($try_files) - } - if ($auth_basic != undef) { - validate_string($auth_basic) - } - if ($auth_basic_user_file != undef) { - validate_string($auth_basic_user_file) - } - if ($vhost_cfg_prepend != undef) { - validate_hash($vhost_cfg_prepend) - } - if ($vhost_cfg_append != undef) { - validate_hash($vhost_cfg_append) - } - if ($vhost_cfg_ssl_prepend != undef) { - validate_hash($vhost_cfg_ssl_prepend) - } - if ($vhost_cfg_ssl_append != undef) { - validate_hash($vhost_cfg_ssl_append) - } - if ($include_files != undef) { - validate_array($include_files) - } - if ($access_log != undef) { - validate_string($access_log) - } - if ($error_log != undef) { - validate_string($error_log) - } - if ($passenger_cgi_param != undef) { - validate_hash($passenger_cgi_param) - } - validate_bool($use_default_location) - validate_array($rewrite_rules) - - # Variables - $vhost_dir = "${nginx::config::nx_conf_dir}/sites-available" - $vhost_enable_dir = "${nginx::config::nx_conf_dir}/sites-enabled" - $vhost_symlink_ensure = $ensure ? { - 'absent' => absent, - default => 'link', - } - - $name_sanitized = regsubst($name, ' ', '_', 'G') - $config_file = "${vhost_dir}/${name_sanitized}.conf" - - File { - ensure => $ensure ? { - 'absent' => absent, - default => 'file', - }, - notify => Class['nginx::service'], - owner => 'root', - group => 'root', - mode => '0644', - } - - # Add IPv6 Logic Check - Nginx service will not start if ipv6 is enabled - # and support does not exist for it in the kernel. - if ($ipv6_enable == true) and (!$ipaddress6) { - warning('nginx: IPv6 support is not enabled or configured properly') - } - - # Check to see if SSL Certificates are properly defined. - if ($ssl == true) { - if ($ssl_cert == undef) or ($ssl_key == undef) { - fail('nginx: SSL certificate/key (ssl_cert/ssl_cert) and/or SSL Private must be defined and exist on the target system(s)') - } - } - - # This was a lot to add up in parameter list so add it down here - # Also opted to add more logic here and keep template cleaner which - # unfortunately means resorting to the $varname_real thing - $access_log_real = $access_log ? { - undef => "${nginx::params::nx_logdir}/${name_sanitized}.access.log", - default => $access_log, - } - $error_log_real = $error_log ? { - undef => "${nginx::params::nx_logdir}/${name_sanitized}.error.log", - default => $error_log, - } - - concat { $config_file: - owner => 'root', - group => 'root', - mode => '0644', - notify => Class['nginx::service'], - } - - $ssl_only = ($ssl == true) and ($ssl_port == $listen_port) - - if $use_default_location == true { - # Create the default location reference for the vHost - nginx::resource::location {"${name_sanitized}-default": - ensure => $ensure, - vhost => $name_sanitized, - ssl => $ssl, - ssl_only => $ssl_only, - location => '/', - location_allow => $location_allow, - location_deny => $location_deny, - proxy => $proxy, - proxy_read_timeout => $proxy_read_timeout, - proxy_cache => $proxy_cache, - proxy_cache_valid => $proxy_cache_valid, - proxy_method => $proxy_method, - proxy_set_body => $proxy_set_body, - fastcgi => $fastcgi, - fastcgi_params => $fastcgi_params, - fastcgi_script => $fastcgi_script, - try_files => $try_files, - www_root => $www_root, - autoindex => $autoindex, - index_files => [], - location_custom_cfg => $location_custom_cfg, - notify => Class['nginx::service'], - rewrite_rules => $rewrite_rules, - } - } else { - $root = $www_root - } - - # Support location_cfg_prepend and location_cfg_append on default location created by vhost - if $location_cfg_prepend { - Nginx::Resource::Location["${name_sanitized}-default"] { - location_cfg_prepend => $location_cfg_prepend } - } - - if $location_cfg_append { - Nginx::Resource::Location["${name_sanitized}-default"] { - location_cfg_append => $location_cfg_append } - } - - if $fastcgi != undef and !defined(File['/etc/nginx/fastcgi_params']) { - file { '/etc/nginx/fastcgi_params': - ensure => present, - mode => '0770', - content => template('nginx/vhost/fastcgi_params.erb'), - } - } - - if ($listen_port != $ssl_port) { - concat::fragment { "${name_sanitized}-header": - ensure => present, - target => $config_file, - content => template('nginx/vhost/vhost_header.erb'), - order => '001', - } - } - - # Create a proper file close stub. - if ($listen_port != $ssl_port) { - concat::fragment { "${name_sanitized}-footer": - ensure => present, - target => $config_file, - content => template('nginx/vhost/vhost_footer.erb'), - order => '699', - } - } - - # Create SSL File Stubs if SSL is enabled - if ($ssl == true) { - # Access and error logs are named differently in ssl template - $ssl_access_log = $access_log ? { - undef => "${nginx::params::nx_logdir}/ssl-${name_sanitized}.access.log", - default => $access_log, - } - $ssl_error_log = $error_log ? { - undef => "${nginx::params::nx_logdir}/ssl-${name_sanitized}.error.log", - default => $error_log, - } - - concat::fragment { "${name_sanitized}-ssl-header": - target => $config_file, - content => template('nginx/vhost/vhost_ssl_header.erb'), - order => '700', - } - concat::fragment { "${name_sanitized}-ssl-footer": - target => $config_file, - content => template('nginx/vhost/vhost_ssl_footer.erb'), - order => '999', - } - - #Generate ssl key/cert with provided file-locations - $cert = regsubst($name,' ','_') - - # Check if the file has been defined before creating the file to - # avoid the error when using wildcard cert on the multiple vhosts - ensure_resource('file', "${nginx::params::nx_conf_dir}/${cert}.crt", { - owner => $nginx::params::nx_daemon_user, - mode => '0444', - source => $ssl_cert, - }) - ensure_resource('file', "${nginx::params::nx_conf_dir}/${cert}.key", { - owner => $nginx::params::nx_daemon_user, - mode => '0440', - source => $ssl_key, - }) - if ($ssl_dhparam != undef) { - ensure_resource('file', "${nginx::params::nx_conf_dir}/${cert}.dh.pem", { - owner => $nginx::params::nx_daemon_user, - mode => '0440', - source => $ssl_dhparam, - }) - } - if ($ssl_stapling_file != undef) { - ensure_resource('file', "${nginx::params::nx_conf_dir}/${cert}.ocsp.resp", { - owner => $nginx::params::nx_daemon_user, - mode => '0440', - source => $ssl_stapling_file, - }) - } - if ($ssl_trusted_cert != undef) { - ensure_resource('file', "${nginx::params::nx_conf_dir}/${cert}.trusted.crt", { - owner => $nginx::params::nx_daemon_user, - mode => '0440', - source => $ssl_trusted_cert, - }) - } - } - - file{ "${name_sanitized}.conf symlink": - ensure => $vhost_symlink_ensure, - path => "${vhost_enable_dir}/${name_sanitized}.conf", - target => $config_file, - require => Concat[$config_file], - notify => Service['nginx'], - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/service.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/service.pp deleted file mode 100644 index 9ec899395b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/manifests/service.pp +++ /dev/null @@ -1,40 +0,0 @@ -# Class: nginx::service -# -# This module manages NGINX service management and vhost rebuild -# -# Parameters: -# -# There are no default parameters for this class. -# -# Actions: -# -# Requires: -# -# Sample Usage: -# -# This class file is not called directly -class nginx::service( - $configtest_enable = $nginx::configtest_enable, - $service_restart = $nginx::service_restart, - $service_ensure = $nginx::service_ensure, -) { - - $service_enable = $service_ensure ? { - running => true, - absent => false, - stopped => false, - default => true, - } - - service { 'nginx': - ensure => $service_ensure, - enable => $service_enable, - hasstatus => true, - hasrestart => true, - } - if $configtest_enable == true { - Service['nginx'] { - restart => $service_restart, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/config_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/config_spec.rb deleted file mode 100644 index 6076e5481e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/config_spec.rb +++ /dev/null @@ -1,324 +0,0 @@ -require 'spec_helper' -describe 'nginx::config' do - - describe 'with defaults' do - [ - { :osfamily => 'debian', :operatingsystem => 'debian', }, - { :osfamily => 'debian', :operatingsystem => 'ubuntu', }, - { :osfamily => 'redhat', :operatingsystem => 'fedora', }, - { :osfamily => 'redhat', :operatingsystem => 'rhel', }, - { :osfamily => 'redhat', :operatingsystem => 'redhat', }, - { :osfamily => 'redhat', :operatingsystem => 'centos', }, - { :osfamily => 'redhat', :operatingsystem => 'scientific', }, - { :osfamily => 'redhat', :operatingsystem => 'amazon', }, - { :osfamily => 'suse', :operatingsystem => 'suse', }, - { :osfamily => 'suse', :operatingsystem => 'opensuse', }, - { :osfamily => 'gentoo', :operatingsystem => 'gentoo', }, - { :osfamily => 'linux', :operatingsystem => 'gentoo', }, - ].each do |facts| - - context "when osfamily/operatingsystem is #{facts[:osfamily]}/#{facts[:operatingsystem]}" do - - let :facts do - { - :osfamily => facts[:osfamily], - :operatingsystem => facts[:operatingsystem], - } - end - - it { should contain_class("nginx::params") } - - it { should contain_file("/etc/nginx").only_with( - :path => "/etc/nginx", - :ensure => 'directory', - :owner => 'root', - :group => 'root', - :mode => '0644' - )} - it { should contain_file("/etc/nginx/conf.d").only_with( - :path => '/etc/nginx/conf.d', - :ensure => 'directory', - :owner => 'root', - :group => 'root', - :mode => '0644' - )} - it { should contain_file("/etc/nginx/conf.mail.d").only_with( - :path => '/etc/nginx/conf.mail.d', - :ensure => 'directory', - :owner => 'root', - :group => 'root', - :mode => '0644' - )} - it { should contain_file("/etc/nginx/conf.d/vhost_autogen.conf").with_ensure('absent') } - it { should contain_file("/etc/nginx/conf.mail.d/vhost_autogen.conf").with_ensure('absent') } - it { should contain_file("/var/nginx").with( - :ensure => 'directory', - :owner => 'root', - :group => 'root', - :mode => '0644' - )} - it { should contain_file("/var/nginx/client_body_temp").with( - :ensure => 'directory', - :group => 'root', - :mode => '0644' - )} - it { should contain_file("/var/nginx/proxy_temp").with( - :ensure => 'directory', - :group => 'root', - :mode => '0644' - )} - it { should contain_file('/etc/nginx/sites-enabled/default').with_ensure('absent') } - it { should contain_file("/etc/nginx/nginx.conf").with( - :ensure => 'file', - :owner => 'root', - :group => 'root', - :mode => '0644' - )} - it { should contain_file("/etc/nginx/conf.d/proxy.conf").with( - :ensure => 'file', - :owner => 'root', - :group => 'root', - :mode => '0644' - )} - it { should contain_file("/tmp/nginx.d").with( - :ensure => 'absent', - :purge => true, - :recurse => true - )} - it { should contain_file("/tmp/nginx.mail.d").with( - :ensure => 'absent', - :purge => true, - :recurse => true - )} - end - end - end - - describe 'with defaults' do - [ - { :osfamily => 'debian', :operatingsystem => 'debian', }, - { :osfamily => 'debian', :operatingsystem => 'ubuntu', }, - ].each do |facts| - - context "when osfamily/operatingsystem is #{facts[:osfamily]}/#{facts[:operatingsystem]}" do - - let :facts do - { - :osfamily => facts[:osfamily], - :operatingsystem => facts[:operatingsystem], - } - end - it { should contain_file("/var/nginx/client_body_temp").with(:owner => 'www-data')} - it { should contain_file("/var/nginx/proxy_temp").with(:owner => 'www-data')} - it { should contain_file("/etc/nginx/nginx.conf").with_content %r{^user www-data;}} - end - end - end - - describe 'with defaults' do - [ - { :osfamily => 'redhat', :operatingsystem => 'fedora', }, - { :osfamily => 'redhat', :operatingsystem => 'rhel', }, - { :osfamily => 'redhat', :operatingsystem => 'redhat', }, - { :osfamily => 'redhat', :operatingsystem => 'centos', }, - { :osfamily => 'redhat', :operatingsystem => 'scientific', }, - { :osfamily => 'redhat', :operatingsystem => 'amazon', }, - { :osfamily => 'suse', :operatingsystem => 'suse', }, - { :osfamily => 'suse', :operatingsystem => 'opensuse', }, - { :osfamily => 'gentoo', :operatingsystem => 'gentoo', }, - { :osfamily => 'linux', :operatingsystem => 'gentoo', }, - ].each do |facts| - - context "when osfamily/operatingsystem is #{facts[:osfamily]}/#{facts[:operatingsystem]}" do - - let :facts do - { - :osfamily => facts[:osfamily], - :operatingsystem => facts[:operatingsystem], - } - end - it { should contain_file("/var/nginx/client_body_temp").with(:owner => 'nginx')} - it { should contain_file("/var/nginx/proxy_temp").with(:owner => 'nginx')} - it { should contain_file("/etc/nginx/nginx.conf").with_content %r{^user nginx;}} - end - end - end - - describe 'os-independent items' do - - let :facts do - { - :osfamily => 'debian', - :operatingsystem => 'debian', - } - end - - describe "nginx.conf template content" do - [ - { - :title => 'should set worker_processes', - :attr => 'worker_processes', - :value => '4', - :match => 'worker_processes 4;', - }, - { - :title => 'should set worker_rlimit_nofile', - :attr => 'worker_rlimit_nofile', - :value => '10000', - :match => 'worker_rlimit_nofile 10000;', - }, - { - :title => 'should set error_log', - :attr => 'nginx_error_log', - :value => '/path/to/error.log', - :match => 'error_log /path/to/error.log;', - }, - { - :title => 'should set worker_connections', - :attr => 'worker_connections', - :value => '100', - :match => ' worker_connections 100;', - }, - { - :title => 'should set access_log', - :attr => 'http_access_log', - :value => '/path/to/access.log', - :match => ' access_log /path/to/access.log;', - }, - { - :title => 'should set server_tokens', - :attr => 'server_tokens', - :value => 'on', - :match => ' server_tokens on;', - }, - { - :title => 'should set proxy_cache_path', - :attr => 'proxy_cache_path', - :value => '/path/to/proxy.cache', - :match => ' proxy_cache_path /path/to/proxy.cache levels=1 keys_zone=d2:100m max_size=500m inactive=20m;', - }, - { - :title => 'should not set proxy_cache_path', - :attr => 'proxy_cache_path', - :value => false, - :notmatch => / proxy_cache_path \/path\/to\/proxy\.cache levels=1 keys_zone=d2:100m max_size=500m inactive=20m;/, - }, - { - :title => 'should contain ordered appended directives', - :attr => 'http_cfg_append', - :value => { 'test1' => 'test value 1', 'test2' => 'test value 2', 'allow' => 'test value 3' }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2;', - ], - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :params do { param[:attr].to_sym => param[:value] } end - - it { should contain_file("/etc/nginx/nginx.conf").with_mode('0644') } - it param[:title] do - verify_contents(subject, "/etc/nginx/nginx.conf", Array(param[:match])) - Array(param[:notmatch]).each do |item| - should contain_file("/etc/nginx/nginx.conf").without_content(item) - end - end - end - end - end - - describe "proxy.conf template content" do - [ - { - :title => 'should set client_max_body_size', - :attr => 'client_max_body_size', - :value => '5m', - :match => 'client_max_body_size 5m;', - }, - { - :title => 'should set proxy_buffers', - :attr => 'proxy_buffers', - :value => '50 5k', - :match => 'proxy_buffers 50 5k;', - }, - { - :title => 'should set proxy_buffer_size', - :attr => 'proxy_buffer_size', - :value => '2k', - :match => 'proxy_buffer_size 2k;', - }, - { - :title => 'should set proxy_http_version', - :attr => 'proxy_http_version', - :value => '1.1', - :match => 'proxy_http_version 1.1;', - }, - { - :title => 'should contain ordered appended directives', - :attr => 'proxy_set_header', - :value => ['header1','header2'], - :match => [ - 'proxy_set_header header1;', - 'proxy_set_header header2;', - ], - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :params do { param[:attr].to_sym => param[:value] } end - - it { should contain_file("/etc/nginx/conf.d/proxy.conf").with_mode('0644') } - it param[:title] do - verify_contents(subject, "/etc/nginx/conf.d/proxy.conf", Array(param[:match])) - Array(param[:notmatch]).each do |item| - should contain_file("/etc/nginx/conf.d/proxy.conf").without_content(item) - end - end - end - end - end - - context "when confd_purge true" do - let(:params) {{:confd_purge => true}} - it { should contain_file('/etc/nginx/conf.d').with( - :purge => true, - :recurse => true - )} - end - - context "when confd_purge false" do - let(:params) {{:confd_purge => false}} - it { should contain_file('/etc/nginx/conf.d').without([ - 'ignore', - 'purge', - 'recurse' - ])} - end - - context "when vhost_purge true" do - let(:params) {{:vhost_purge => true}} - it { should contain_file('/etc/nginx/sites-available').with( - :purge => true, - :recurse => true - )} - it { should contain_file('/etc/nginx/sites-enabled').with( - :purge => true, - :recurse => true - )} - end - - context "when vhost_purge false" do - let(:params) {{:vhost_purge => false}} - it { should contain_file('/etc/nginx/sites-available').without([ - 'ignore', - 'purge', - 'recurse' - ])} - it { should contain_file('/etc/nginx/sites-enabled').without([ - 'ignore', - 'purge', - 'recurse' - ])} - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/nginx_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/nginx_spec.rb deleted file mode 100644 index edebfbcdc1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/nginx_spec.rb +++ /dev/null @@ -1,61 +0,0 @@ -require 'spec_helper' - -describe 'nginx' do - let :params do - { - :nginx_upstreams => { 'upstream1' => { 'members' => ['localhost:3000']} }, - :nginx_vhosts => { 'test2.local' => { 'www_root' => '/' } }, - :nginx_locations => { 'test2.local' => { 'vhost' => 'test2.local', 'www_root' => '/'} } - } - end - - shared_examples "a Linux OS" do - it { should compile.with_all_deps } - it { should contain_class('nginx') } - it { should contain_anchor('nginx::begin') } - it { should contain_nginx__package.that_requires('Anchor[nginx::begin]') } - it { should contain_nginx__config.that_requires('Class[nginx::package]') } - it { should contain_nginx__service.that_subscribes_to('Anchor[nginx::begin]') } - it { should contain_nginx__service.that_subscribes_to('Class[nginx::package]') } - it { should contain_nginx__service.that_subscribes_to('Class[nginx::config]') } - it { should contain_anchor('nginx::end').that_requires('Class[nginx::service]') } - it { should contain_class("nginx::params") } - it { should contain_nginx__resource__upstream("upstream1") } - it { should contain_nginx__resource__vhost("test2.local") } - it { should contain_nginx__resource__location("test2.local") } - end - - context "Debian OS" do - it_behaves_like "a Linux OS" do - let :facts do - { - :operatingsystem => 'Debian', - :osfamily => 'Debian', - :lsbdistcodename => 'precise', - } - end - end - end - - context "RedHat OS" do - it_behaves_like "a Linux OS" do - let :facts do - { - :operatingsystem => 'RedHat', - :osfamily => 'RedHat', - } - end - end - end - - context "Suse OS" do - it_behaves_like "a Linux OS" do - let :facts do - { - :operatingsystem => 'SuSE', - :osfamily => 'Suse', - } - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/package_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/package_spec.rb deleted file mode 100644 index 0ff2ec6cec..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/package_spec.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'spec_helper' - -describe 'nginx::package' do - - shared_examples 'redhat' do |operatingsystem| - let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'RedHat' }} - - context "using defaults" do - it { should contain_package('nginx') } - it { should contain_yumrepo('nginx-release').with( - 'baseurl' => 'http://nginx.org/packages/rhel/6/$basearch/', - 'descr' => 'nginx repo', - 'enabled' => '1', - 'gpgcheck' => '1', - 'priority' => '1', - 'gpgkey' => 'http://nginx.org/keys/nginx_signing.key' - )} - it { should contain_file('/etc/yum.repos.d/nginx-release.repo') } - it { should contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::redhat]') } - it { should contain_anchor('nginx::package::end').that_requires('Class[nginx::package::redhat]') } - end - - context "manage_repo => false" do - let(:params) {{ :manage_repo => false }} - it { should contain_package('nginx') } - it { should_not contain_yumrepo('nginx-release') } - it { should_not contain_file('/etc/yum.repos.d/nginx-release.repo') } - end - - context "lsbmajdistrelease = 5" do - let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'RedHat', :lsbmajdistrelease => 5 }} - it { should contain_package('nginx') } - it { should contain_yumrepo('nginx-release').with( - 'baseurl' => 'http://nginx.org/packages/rhel/5/$basearch/' - )} - it { should contain_file('/etc/yum.repos.d/nginx-release.repo') } - end - - describe 'installs the requested package version' do - let(:facts) {{ :operatingsystem => 'redhat', :osfamily => 'redhat' }} - let(:params) {{ :package_ensure => '3.0.0' }} - - it 'installs 3.0.0 exactly' do - should contain_package('nginx').with({ - 'ensure' => '3.0.0' - }) - end - end - end - - shared_examples 'debian' do |operatingsystem, lsbdistcodename| - let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'Debian', :lsbdistcodename => lsbdistcodename }} - - context "using defaults" do - it { should contain_package('nginx') } - it { should_not contain_package('passenger') } - it { should contain_apt__source('nginx').with( - 'location' => "http://nginx.org/packages/#{operatingsystem}", - 'repos' => 'nginx', - 'key' => '7BD9BF62', - 'key_source' => 'http://nginx.org/keys/nginx_signing.key' - )} - it { should contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::debian]') } - it { should contain_anchor('nginx::package::end').that_requires('Class[nginx::package::debian]') } - end - - context "package_source => 'passenger'" do - let(:params) {{ :package_source => 'passenger' }} - it { should contain_package('nginx') } - it { should contain_package('passenger') } - it { should contain_apt__source('nginx').with( - 'location' => 'https://oss-binaries.phusionpassenger.com/apt/passenger', - 'repos' => "main", - 'key' => '561F9B9CAC40B2F7', - 'key_source' => 'https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt' - )} - end - - context "manage_repo => false" do - let(:params) {{ :manage_repo => false }} - it { should contain_package('nginx') } - it { should_not contain_apt__source('nginx') } - it { should_not contain_package('passenger') } - end - end - - shared_examples 'suse' do |operatingsystem| - let(:facts) {{ :operatingsystem => operatingsystem, :osfamily => 'Suse'}} - [ - 'nginx-0.8', - 'apache2', - 'apache2-itk', - 'apache2-utils', - 'gd', - 'libapr1', - 'libapr-util1', - 'libjpeg62', - 'libpng14-14', - 'libxslt', - 'rubygem-daemon_controller', - 'rubygem-fastthread', - 'rubygem-file-tail', - 'rubygem-passenger', - 'rubygem-passenger-nginx', - 'rubygem-rack', - 'rubygem-rake', - 'rubygem-spruz', - ].each do |package| - it { should contain_package("#{package}") } - end - it { should contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::suse]') } - it { should contain_anchor('nginx::package::end').that_requires('Class[nginx::package::suse]') } - end - - - context 'redhat' do - it_behaves_like 'redhat', 'centos' - it_behaves_like 'redhat', 'rhel' - it_behaves_like 'redhat', 'redhat' - it_behaves_like 'redhat', 'scientific' - it_behaves_like 'redhat', 'amazon' - end - - context 'debian' do - it_behaves_like 'debian', 'debian', 'wheezy' - it_behaves_like 'debian', 'ubuntu', 'precise' - end - - context 'suse' do - it_behaves_like 'suse', 'opensuse' - it_behaves_like 'suse', 'suse' - end - - context 'amazon with facter < 1.7.2' do - let(:facts) {{ :operatingsystem => 'Amazon', :osfamily => 'Linux' }} - it { should contain_package('nginx') } - it { should contain_yumrepo('nginx-release').with( - 'baseurl' => 'http://nginx.org/packages/rhel/6/$basearch/', - 'descr' => 'nginx repo', - 'enabled' => '1', - 'gpgcheck' => '1', - 'priority' => '1', - 'gpgkey' => 'http://nginx.org/keys/nginx_signing.key' - )} - it { should contain_file('/etc/yum.repos.d/nginx-release.repo') } - it { should contain_anchor('nginx::package::begin').that_comes_before('Class[nginx::package::redhat]') } - it { should contain_anchor('nginx::package::end').that_requires('Class[nginx::package::redhat]') } - end - - context 'fedora' do - # fedora is identical to the rest of osfamily RedHat except for not - # including nginx-release - let(:facts) {{ :operatingsystem => 'Fedora', :osfamily => 'RedHat', :lsbmajdistrelease => 6 }} - it { should contain_package('nginx') } - it { should_not contain_yumrepo('nginx-release') } - it { should_not contain_file('/etc/yum.repos.d/nginx-release.repo') } - end - - context 'other' do - let(:facts) {{ :operatingsystem => 'xxx', :osfamily => 'linux' }} - it { expect { subject }.to raise_error(Puppet::Error, /Module nginx is not supported on xxx/) } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/params_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/params_spec.rb deleted file mode 100644 index a813b3a10c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/params_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'spec_helper' - -describe 'nginx::params' do - context "On a Debian OS" do - let :facts do { - :osfamily => 'debian', - :operatingsystem => 'debian', - } end - - it { should contain_nginx__params } - it { should have_class_count(1) } #only nginx::params itself - it { should have_resource_count(0) } #params class should never declare resources - - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/service_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/service_spec.rb deleted file mode 100644 index 300316e5d8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/classes/service_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -require 'spec_helper' -describe 'nginx::service' do - - let :facts do { - :osfamily => 'Debian', - :operatingsystem => 'debian', - } end - - let :params do { - :configtest_enable => false, - :service_restart => '/etc/init.d/nginx configtest && /etc/init.d/nginx restart', - :service_ensure => 'running', - } end - - context "using default parameters" do - - it { should contain_service('nginx').with( - :ensure => 'running', - :enable => true, - :hasstatus => true, - :hasrestart => true - )} - - it { should contain_service('nginx').without_restart } - - end - - describe "when configtest_enable => true" do - let(:params) {{ :configtest_enable => true, :service_restart => '/etc/init.d/nginx configtest && /etc/init.d/nginx restart'}} - it { should contain_service('nginx').with_restart('/etc/init.d/nginx configtest && /etc/init.d/nginx restart') } - - context "when service_restart => 'a restart command'" do - let(:params) {{ :configtest_enable => true, :service_restart => 'a restart command' }} - it { should contain_service('nginx').with_restart('a restart command') } - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_location_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_location_spec.rb deleted file mode 100644 index 23cc8acf34..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_location_spec.rb +++ /dev/null @@ -1,621 +0,0 @@ -require 'spec_helper' - -describe 'nginx::resource::location' do - let :title do - 'rspec-test' - end - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'debian', - } - end - let :pre_condition do - [ - 'include ::nginx::params', - 'include ::nginx::config', - ] - end - - describe 'os-independent items' do - - describe 'basic assumptions' do - let :params do { - :www_root => "/var/www/rspec", - :vhost => 'vhost1', - } end - - it { should contain_class("nginx::params") } - it { should contain_class("nginx::config") } - it { should contain_concat__fragment("vhost1-500-rspec-test").with_content(/location rspec-test/) } - it { should_not contain_file('/etc/nginx/fastcgi_params') } - it { should_not contain_concat__fragment("vhost1-800-rspec-test-ssl") } - it { should_not contain_file("/etc/nginx/rspec-test_htpasswd") } - end - - describe "vhost_location_proxy template content" do - [ - { - :title => 'should set the location', - :attr => 'location', - :value => 'my_location', - :match => ' location my_location {', - }, - { - :title => 'should contain ordered prepended directives', - :attr => 'location_cfg_prepend', - :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', - 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], - 'subtest2' => '"sub test value2"' } }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2a;', - ' test2 test value 2b;', - ' test4 subtest1 "sub test value1a";', - ' test4 subtest1 "sub test value1b";', - ' test4 subtest2 "sub test value2";', - ], - }, - { - :title => 'should set proxy_cache', - :attr => 'proxy_cache', - :value => 'value', - :match => ' proxy_cache value;', - }, - { - :title => 'should not set proxy_cache', - :attr => 'proxy_cache', - :value => false, - :notmatch => /proxy_cache/ - }, - { - :title => 'should set proxy_method', - :attr => 'proxy_method', - :value => 'value', - :match => ' proxy_method value;', - }, - { - :title => 'should set proxy_set_body', - :attr => 'proxy_set_body', - :value => 'value', - :match => ' proxy_set_body value;', - }, - { - :title => 'should set proxy_pass', - :attr => 'proxy', - :value => 'value', - :match => ' proxy_pass value;', - }, - { - :title => 'should set proxy_read_timeout', - :attr => 'proxy_read_timeout', - :value => 'value', - :match => ' proxy_read_timeout value;', - }, - { - :title => 'should contain ordered appended directives', - :attr => 'location_cfg_append', - :value => { 'test1' => ['test value 1a', 'test value 1b'], 'test2' => 'test value 2', 'allow' => 'test value 3', - 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], - 'subtest2' => '"sub test value2"' } }, - :match => [ - ' allow test value 3;', - ' test1 test value 1a;', - ' test1 test value 1b;', - ' test2 test value 2;', - ' test4 subtest1 "sub test value1a";', - ' test4 subtest1 "sub test value1b";', - ' test4 subtest2 "sub test value2";', - ], - }, - { - :title => 'should contain rewrite rules', - :attr => 'rewrite_rules', - :value => [ - '^(/download/.*)/media/(.*)\..*$ $1/mp3/$2.mp3 last', - '^(/download/.*)/audio/(.*)\..*$ $1/mp3/$2.ra last', - '^/users/(.*)$ /show?user=$1? last', - ], - :match => [ - ' rewrite ^(/download/.*)/media/(.*)\..*$ $1/mp3/$2.mp3 last;', - ' rewrite ^(/download/.*)/audio/(.*)\..*$ $1/mp3/$2.ra last;', - ' rewrite ^/users/(.*)$ /show?user=$1? last;', - ], - }, - { - :title => 'should not set rewrite_rules', - :attr => 'rewrite_rules', - :value => [], - :notmatch => /rewrite/ - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :default_params do { :location => 'location', :proxy => 'proxy_value', :vhost => 'vhost1' } end - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { should contain_concat__fragment("vhost1-500-#{params[:location]}") } - it param[:title] do - lines = subject.resource('concat::fragment', "vhost1-500-#{params[:location]}").send(:parameters)[:content].split("\n") - (lines & Array(param[:match])).should == Array(param[:match]) - Array(param[:notmatch]).each do |item| - should contain_concat__fragment("vhost1-500-#{params[:location]}").without_content(item) - end - end - end - end - - context "when proxy_cache_valid is 10m" do - let :params do { - :location => 'location', - :proxy => 'proxy_value', - :vhost => 'vhost1', - :proxy_cache => 'true', - :proxy_cache_valid => '10m', - } end - - it { should contain_concat__fragment("vhost1-500-location").with_content(/proxy_cache_valid 10m;/) } - end - end - - describe "vhost_location_alias template content" do - [ - { - :title => 'should set the location', - :attr => 'location', - :value => 'my_location', - :match => ' location my_location {', - }, - { - :title => 'should contain ordered prepended directives', - :attr => 'location_cfg_prepend', - :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', - 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], - 'subtest2' => '"sub test value2"' } }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2a;', - ' test2 test value 2b;', - ' test4 subtest1 "sub test value1a";', - ' test4 subtest1 "sub test value1b";', - ' test4 subtest2 "sub test value2";', - ], - }, - { - :title => 'should set alias', - :attr => 'location_alias', - :value => 'value', - :match => ' alias value;', - }, - { - :title => 'should contain ordered appended directives', - :attr => 'location_cfg_append', - :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', - 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], - 'subtest2' => '"sub test value2"' } }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2a;', - ' test2 test value 2b;', - ' test4 subtest1 "sub test value1a";', - ' test4 subtest1 "sub test value1b";', - ' test4 subtest2 "sub test value2";', - ], - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :default_params do { :location => 'location', :location_alias => 'location_alias_value', :vhost => 'vhost1' } end - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { should contain_concat__fragment("vhost1-500-#{params[:location]}") } - it param[:title] do - lines = subject.resource('concat::fragment', "vhost1-500-#{params[:location]}").send(:parameters)[:content].split("\n") - (lines & Array(param[:match])).should == Array(param[:match]) - Array(param[:notmatch]).each do |item| - should contain_concat__fragment("vhost1-500-#{params[:location]}").without_content(item) - end - end - end - end - end - - describe "vhost_location_stub_status template content" do - [ - { - :title => 'should set the location', - :attr => 'location', - :value => 'my_location', - :match => ' location my_location {', - }, - { - :title => 'should contain ordered prepended directives', - :attr => 'location_cfg_prepend', - :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', - 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], - 'subtest2' => '"sub test value2"' } }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2a;', - ' test2 test value 2b;', - ' test4 subtest1 "sub test value1a";', - ' test4 subtest1 "sub test value1b";', - ' test4 subtest2 "sub test value2";', - ], - }, - { - :title => 'should contain ordered appended directives', - :attr => 'location_cfg_append', - :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', - 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], - 'subtest2' => '"sub test value2"' } }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2a;', - ' test2 test value 2b;', - ' test4 subtest1 "sub test value1a";', - ' test4 subtest1 "sub test value1b";', - ' test4 subtest2 "sub test value2";', - ], - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :default_params do { :location => 'location', :stub_status => true, :vhost => 'vhost1' } end - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { should contain_concat__fragment("vhost1-500-#{params[:location]}") } - it param[:title] do - lines = subject.resource('concat::fragment', "vhost1-500-#{params[:location]}").send(:parameters)[:content].split("\n") - (lines & Array(param[:match])).should == Array(param[:match]) - Array(param[:notmatch]).each do |item| - should contain_concat__fragment("vhost1-500-#{params[:location]}").without_content(item) - end - end - end - end - end - - describe "vhost_location_fastcgi template content" do - [ - { - :title => 'should set the location', - :attr => 'location', - :value => 'my_location', - :match => ' location my_location {', - }, - { - :title => 'should contain ordered prepended directives', - :attr => 'location_cfg_prepend', - :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', - 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], - 'subtest2' => '"sub test value2"' } }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2a;', - ' test2 test value 2b;', - ' test4 subtest1 "sub test value1a";', - ' test4 subtest1 "sub test value1b";', - ' test4 subtest2 "sub test value2";', - ], - }, - { - :title => 'should set www_root', - :attr => 'www_root', - :value => '/', - :match => ' root /;' - }, - { - :title => 'should set fastcgi_split_path', - :attr => 'fastcgi_split_path', - :value => 'value', - :match => ' fastcgi_split_path_info value;' - }, - { - :title => 'should set try_file(s)', - :attr => 'try_files', - :value => ['name1','name2'], - :match => ' try_files name1 name2;', - }, - { - :title => 'should set fastcgi_params', - :attr => 'fastcgi_params', - :value => 'value', - :match => ' include value;' - }, - { - :title => 'should set fastcgi_pass', - :attr => 'fastcgi', - :value => 'value', - :match => ' fastcgi_pass value;' - }, - { - :title => 'should set fastcgi_param', - :attr => 'fastcgi_script', - :value => 'value', - :match => ' fastcgi_param SCRIPT_FILENAME value;', - }, - { - :title => 'should contain ordered appended directives', - :attr => 'location_cfg_append', - :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', - 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], - 'subtest2' => '"sub test value2"' } }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2a;', - ' test2 test value 2b;', - ' test4 subtest1 "sub test value1a";', - ' test4 subtest1 "sub test value1b";', - ' test4 subtest2 "sub test value2";', - ], - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :default_params do { :location => 'location', :fastcgi => 'localhost:9000', :vhost => 'vhost1' } end - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { should contain_concat__fragment("vhost1-500-#{params[:location]}") } - it param[:title] do - lines = subject.resource('concat::fragment', "vhost1-500-#{params[:location]}").send(:parameters)[:content].split("\n") - (lines & Array(param[:match])).should == Array(param[:match]) - Array(param[:notmatch]).each do |item| - should contain_concat__fragment("vhost1-500-#{params[:location]}").without_content(/#{item}/) - end - end - end - end - end - - describe "vhost_location_directory template content" do - [ - { - :title => 'should set the location', - :attr => 'location', - :value => 'my_location', - :match => ' location my_location {', - }, - { - :title => 'should set the allow directive', - :attr => 'location_allow', - :value => ['rule1','rule2'], - :match => [' allow rule1;', ' allow rule2;'], - }, - { - :title => 'should set the deny directive', - :attr => 'location_deny', - :value => ['rule1','rule2'], - :match => [' deny rule1;', ' deny rule2;'], - }, - { - :title => 'should contain ordered prepended directives', - :attr => 'location_cfg_prepend', - :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', - 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], - 'subtest2' => '"sub test value2"' } }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2a;', - ' test2 test value 2b;', - ' test4 subtest1 "sub test value1a";', - ' test4 subtest1 "sub test value1b";', - ' test4 subtest2 "sub test value2";', - ], - }, - { - :title => 'should set www_root', - :attr => 'www_root', - :value => '/', - :match => ' root /;' - }, - { - :title => 'should set try_file(s)', - :attr => 'try_files', - :value => ['name1','name2'], - :match => ' try_files name1 name2;', - }, - { - :title => 'should set index_file(s)', - :attr => 'index_files', - :value => ['name1','name2'], - :match => ' index name1 name2;', - }, - { - :title => 'should set auth_basic', - :attr => 'auth_basic', - :value => 'value', - :match => ' auth_basic "value";', - }, - { - :title => 'should set auth_basic_user_file', - :attr => 'auth_basic_user_file', - :value => 'value', - :match => ' auth_basic_user_file value;', - }, - { - :title => 'should contain ordered appended directives', - :attr => 'location_cfg_append', - :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3', - 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], - 'subtest2' => '"sub test value2"' } }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2a;', - ' test2 test value 2b;', - ' test4 subtest1 "sub test value1a";', - ' test4 subtest1 "sub test value1b";', - ' test4 subtest2 "sub test value2";', - ], - }, - { - :title => 'should contain rewrite rules', - :attr => 'rewrite_rules', - :value => [ - '^(/download/.*)/media/(.*)\..*$ $1/mp3/$2.mp3 last', - '^(/download/.*)/audio/(.*)\..*$ $1/mp3/$2.ra last', - '^/users/(.*)$ /show?user=$1? last', - ], - :match => [ - ' rewrite ^(/download/.*)/media/(.*)\..*$ $1/mp3/$2.mp3 last;', - ' rewrite ^(/download/.*)/audio/(.*)\..*$ $1/mp3/$2.ra last;', - ' rewrite ^/users/(.*)$ /show?user=$1? last;', - ], - }, - { - :title => 'should not set rewrite_rules', - :attr => 'rewrite_rules', - :value => [], - :notmatch => /rewrite/ - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :default_params do { :location => 'location', :www_root => '/var/www/root', :vhost => 'vhost1' } end - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { should contain_concat__fragment("vhost1-500-#{params[:location]}") } - it param[:title] do - lines = subject.resource('concat::fragment', "vhost1-500-#{params[:location]}").send(:parameters)[:content].split("\n") - (lines & Array(param[:match])).should == Array(param[:match]) - Array(param[:notmatch]).each do |item| - should contain_concat__fragment("vhost1-500-#{params[:location]}").without_content(item) - end - end - end - end - end - - describe "vhost_location_empty template content" do - [ - { - :title => 'should set the location', - :attr => 'location', - :value => 'my_location', - :match => ' location my_location {', - }, - { - :title => 'should contain ordered config directives', - :attr => 'location_custom_cfg', - :value => { 'test1' => ['test value 1a', 'test value 1b'], 'test2' => 'test value 2', 'allow' => 'test value 3', - 'test4' => { 'subtest1' => ['"sub test value1a"', '"sub test value1b"'], - 'subtest2' => '"sub test value2"' } }, - :match => [ - ' allow test value 3;', - ' test1 test value 1a;', - ' test1 test value 1b;', - ' test2 test value 2;', - ' test4 subtest1 "sub test value1a";', - ' test4 subtest1 "sub test value1b";', - ' test4 subtest2 "sub test value2";', - ], - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :default_params do { :location => 'location', :location_custom_cfg => {'test1'=>'value1'}, :vhost => 'vhost1' } end - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { should contain_concat__fragment("vhost1-500-#{params[:location]}") } - it param[:title] do - lines = subject.resource('concat::fragment', "vhost1-500-#{params[:location]}").send(:parameters)[:content].split("\n") - (lines & Array(param[:match])).should == Array(param[:match]) - Array(param[:notmatch]).each do |item| - should contain_concat__fragment("vhost1-500-#{params[:location]}").without_content(item) - end - end - end - end - end - - context 'attribute resources' do - context 'when fastcgi => "localhost:9000"' do - let :params do { :fastcgi => 'localhost:9000', :vhost => 'vhost1' } end - - it { should contain_file('/etc/nginx/fastcgi_params').with_mode('0770') } - end - - context 'when ssl_only => true' do - let :params do { :ssl_only => true, :vhost => 'vhost1', :www_root => '/', } end - it { should_not contain_concat__fragment("vhost1-500-rspec-test") } - end - - context 'when ssl_only => false' do - let :params do { :ssl_only => false, :vhost => 'vhost1', :www_root => '/', } end - - it { should contain_concat__fragment("vhost1-500-rspec-test") } - end - - context 'when ssl => true' do - let :params do { :ssl => true, :vhost => 'vhost1', :www_root => '/', } end - - it { should contain_concat__fragment("vhost1-800-rspec-test-ssl") } - end - - context 'when ssl => false' do - let :params do { :ssl => false, :vhost => 'vhost1', :www_root => '/', } end - - it { should_not contain_concat__fragment("vhost1-800-rspec-test-ssl") } - end - - context 'when auth_basic_user_file => true' do - let :params do { :auth_basic_user_file => '/path/to/file', :vhost => 'vhost1', :www_root => '/', } end - - it { should contain_file("/etc/nginx/rspec-test_htpasswd") } - end - - context 'when ensure => absent' do - let :params do { - :www_root => '/', - :vhost => 'vhost1', - :ensure => 'absent', - :ssl => true, - :auth_basic_user_file => '/path/to/file', - } end - - it { should contain_file("/etc/nginx/rspec-test_htpasswd").with_ensure('absent') } - end - - context "vhost missing" do - let :params do { - :www_root => '/', - } end - - it { expect { should contain_class('nginx::resource::location') }.to raise_error(Puppet::Error, /Cannot create a location reference without attaching to a virtual host/) } - end - - context "location type missing" do - let :params do { - :vhost => 'vhost1', - } end - - it { expect { should contain_class('nginx::resource::location') }.to raise_error(Puppet::Error, /Cannot create a location reference without a www_root, proxy, location_alias, fastcgi, stub_status, or location_custom_cfg defined/) } - end - - context "www_root and proxy are set" do - let :params do { - :vhost => 'vhost1', - :www_root => '/', - :proxy => 'http://localhost:8000/uri/', - } end - - it { expect { should contain_class('nginx::resource::location') }.to raise_error(Puppet::Error, /Cannot define both directory and proxy in a virtual host/) } - end - - context 'when vhost name is sanitized' do - let :title do 'www.rspec-location.com' end - let :params do { - :vhost => 'www rspec-vhost com', - :www_root => '/', - :ssl => true, - } end - - it { should contain_concat__fragment("www_rspec-vhost_com-500-www.rspec-location.com").with_target('/etc/nginx/sites-available/www_rspec-vhost_com.conf') } - it { should contain_concat__fragment("www_rspec-vhost_com-800-www.rspec-location.com-ssl").with_target('/etc/nginx/sites-available/www_rspec-vhost_com.conf') } - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_mailhost_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_mailhost_spec.rb deleted file mode 100644 index e59adfdabb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_mailhost_spec.rb +++ /dev/null @@ -1,401 +0,0 @@ -require 'spec_helper' - -describe 'nginx::resource::mailhost' do - let :title do - 'www.rspec.example.com' - end - let :facts do - { - :osfamily => 'debian', - :operatingsystem => 'debian', - :ipaddress6 => '::', - } - end - let :default_params do - { - :listen_port => 25, - :ipv6_enable => true, - } - end - let :pre_condition do - [ - 'include ::nginx::config', - ] - end - - describe 'os-independent items' do - - describe 'basic assumptions' do - let :params do default_params end - it { should contain_class("nginx::config") } - it { should contain_concat("/etc/nginx/conf.mail.d/#{title}.conf").with({ - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - })} - it { should contain_concat__fragment("#{title}-header") } - it { should_not contain_concat__fragment("#{title}-ssl") } - end - - describe "mailhost template content" do - [ - { - :title => 'should set the IPv4 listen IP', - :attr => 'listen_ip', - :value => '127.0.0.1', - :match => ' listen 127.0.0.1:25;', - }, - { - :title => 'should set the IPv4 listen port', - :attr => 'listen_port', - :value => 45, - :match => ' listen *:45;', - }, - { - :title => 'should set the IPv4 listen options', - :attr => 'listen_options', - :value => 'spdy default', - :match => ' listen *:25 spdy default;', - }, - { - :title => 'should enable IPv6', - :attr => 'ipv6_enable', - :value => true, - :match => ' listen [::]:80 default ipv6only=on;', - }, - { - :title => 'should not enable IPv6', - :attr => 'ipv6_enable', - :value => false, - :notmatch => / listen \[::\]:80 default ipv6only=on;/, - }, - { - :title => 'should set the IPv6 listen IP', - :attr => 'ipv6_listen_ip', - :value => '2001:0db8:85a3:0000:0000:8a2e:0370:7334', - :match => ' listen [2001:0db8:85a3:0000:0000:8a2e:0370:7334]:80 default ipv6only=on;', - }, - { - :title => 'should set the IPv6 listen port', - :attr => 'ipv6_listen_port', - :value => 45, - :match => ' listen [::]:45 default ipv6only=on;', - }, - { - :title => 'should set the IPv6 listen options', - :attr => 'ipv6_listen_options', - :value => 'spdy', - :match => ' listen [::]:80 spdy;', - }, - { - :title => 'should set servername(s)', - :attr => 'server_name', - :value => ['name1','name2'], - :match => ' server_name name1 name2;', - }, - { - :title => 'should set protocol', - :attr => 'protocol', - :value => 'test-protocol', - :match => ' protocol test-protocol;', - }, - { - :title => 'should set xclient', - :attr => 'xclient', - :value => 'test-xclient', - :match => ' xclient test-xclient;', - }, - { - :title => 'should set auth_http', - :attr => 'auth_http', - :value => 'test-auth_http', - :match => ' auth_http test-auth_http;', - }, - { - :title => 'should set starttls', - :attr => 'starttls', - :value => 'on', - :match => ' starttls on;', - }, - { - :title => 'should set starttls', - :attr => 'starttls', - :value => 'only', - :match => ' starttls only;', - }, - { - :title => 'should not enable SSL', - :attr => 'starttls', - :value => 'off', - :notmatch => / ssl_session_timeout 5m;/, - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :default_params do { - :listen_port => 25, - :ipv6_enable => true, - :ssl_cert => 'dummy.crt', - :ssl_key => 'dummy.key', - } end - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { should contain_concat__fragment("#{title}-header") } - it param[:title] do - lines = subject.resource('concat::fragment', "#{title}-header").send(:parameters)[:content].split("\n") - (lines & Array(param[:match])).should == Array(param[:match]) - Array(param[:notmatch]).each do |item| - should contain_concat__fragment("#{title}-header").without_content(item) - end - end - end - end - end - - describe "mailhost template content (SSL enabled)" do - [ - { - :title => 'should enable SSL', - :attr => 'starttls', - :value => 'on', - :match => ' ssl_session_timeout 5m;', - }, - { - :title => 'should enable SSL', - :attr => 'starttls', - :value => 'only', - :match => ' ssl_session_timeout 5m;', - }, - { - :title => 'should not enable SSL', - :attr => 'starttls', - :value => 'off', - :notmatch => / ssl_session_timeout 5m;/, - }, - { - :title => 'should set ssl_certificate', - :attr => 'ssl_cert', - :value => 'test-ssl-cert', - :match => ' ssl_certificate test-ssl-cert;', - }, - { - :title => 'should set ssl_certificate_key', - :attr => 'ssl_key', - :value => 'test-ssl-cert-key', - :match => ' ssl_certificate_key test-ssl-cert-key;', - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :default_params do { - :listen_port => 25, - :starttls => 'on', - :ssl_cert => 'dummy.crt', - :ssl_key => 'dummy.key', - } end - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { should contain_concat__fragment("#{title}-header") } - it param[:title] do - lines = subject.resource('concat::fragment', "#{title}-header").send(:parameters)[:content].split("\n") - (lines & Array(param[:match])).should == Array(param[:match]) - Array(param[:notmatch]).each do |item| - should contain_concat__fragment("#{title}-header").without_content(item) - end - end - end - end - end - - describe "mailhost_ssl template content" do - [ - { - :title => 'should set the IPv4 SSL listen port', - :attr => 'ssl_port', - :value => '45', - :match => ' listen 45;', - }, - { - :title => 'should enable IPv6', - :attr => 'ipv6_enable', - :value => true, - :match => ' listen [::]:80 default ipv6only=on;', - }, - { - :title => 'should not enable IPv6', - :attr => 'ipv6_enable', - :value => false, - :notmatch => / listen \[::\]:80 default ipv6only=on;/, - }, - { - :title => 'should set the IPv6 listen IP', - :attr => 'ipv6_listen_ip', - :value => '2001:0db8:85a3:0000:0000:8a2e:0370:7334', - :match => ' listen [2001:0db8:85a3:0000:0000:8a2e:0370:7334]:80 default ipv6only=on;', - }, - { - :title => 'should set the IPv6 listen port', - :attr => 'ipv6_listen_port', - :value => 45, - :match => ' listen [::]:45 default ipv6only=on;', - }, - { - :title => 'should set the IPv6 listen options', - :attr => 'ipv6_listen_options', - :value => 'spdy', - :match => ' listen [::]:80 spdy;', - }, - { - :title => 'should set servername(s)', - :attr => 'server_name', - :value => ['name1','name2'], - :match => ' server_name name1 name2;', - }, - { - :title => 'should set protocol', - :attr => 'protocol', - :value => 'test-protocol', - :match => ' protocol test-protocol;', - }, - { - :title => 'should set xclient', - :attr => 'xclient', - :value => 'test-xclient', - :match => ' xclient test-xclient;', - }, - { - :title => 'should set auth_http', - :attr => 'auth_http', - :value => 'test-auth_http', - :match => ' auth_http test-auth_http;', - }, - { - :title => 'should set ssl_certificate', - :attr => 'ssl_cert', - :value => 'test-ssl-cert', - :match => ' ssl_certificate test-ssl-cert;', - }, - { - :title => 'should set ssl_certificate_key', - :attr => 'ssl_key', - :value => 'test-ssl-cert-key', - :match => ' ssl_certificate_key test-ssl-cert-key;', - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :default_params do { - :listen_port => 25, - :ipv6_enable => true, - :ssl => true, - :ssl_cert => 'dummy.crt', - :ssl_key => 'dummy.key', - } end - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { should contain_concat__fragment("#{title}-ssl") } - it param[:title] do - lines = subject.resource('concat::fragment', "#{title}-ssl").send(:parameters)[:content].split("\n") - (lines & Array(param[:match])).should == Array(param[:match]) - Array(param[:notmatch]).each do |item| - should contain_concat__fragment("#{title}-ssl").without_content(item) - end - end - end - end - end - - context 'attribute resources' do - context "SSL cert missing and ssl => true" do - let :params do default_params.merge({ - :ssl => true, - :ssl_key => 'key', - }) end - - it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } - end - - context "SSL key missing and ssl => true" do - let :params do default_params.merge({ - :ssl => true, - :ssl_cert => 'cert', - }) end - - it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } - end - - context "SSL cert missing and starttls => 'on'" do - let :params do default_params.merge({ - :starttls => 'on', - :ssl_key => 'key', - }) end - - it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } - end - - context "SSL key missing and starttls => 'on'" do - let :params do default_params.merge({ - :starttls => 'on', - :ssl_cert => 'cert', - }) end - - it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } - end - - context "SSL cert missing and starttls => 'only'" do - let :params do default_params.merge({ - :starttls => 'only', - :ssl_key => 'key', - }) end - - it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } - end - - context "SSL key missing and starttls => 'only'" do - let :params do default_params.merge({ - :starttls => 'only', - :ssl_cert => 'cert', - }) end - - it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } - end - - context 'when listen_port != ssl_port' do - let :params do default_params.merge({ - :listen_port => 80, - :ssl_port => 443, - }) end - - it { should contain_concat__fragment("#{title}-header") } - end - - context 'when listen_port == ssl_port' do - let :params do default_params.merge({ - :listen_port => 80, - :ssl_port => 80, - }) end - - it { should_not contain_concat__fragment("#{title}-header") } - end - - context 'when ssl => true' do - let :params do default_params.merge({ - :ensure => 'absent', - :ssl => true, - :ssl_key => 'dummy.key', - :ssl_cert => 'dummy.cert', - }) end - - it { should contain_concat__fragment("#{title}-header") } - it { should contain_concat__fragment("#{title}-ssl") } - end - - context 'when ssl => false' do - let :params do default_params.merge({ - :ensure => 'absent', - :ssl => false, - }) end - - it { should contain_concat__fragment("#{title}-header") } - it { should_not contain_concat__fragment("#{title}-ssl") } - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_upstream_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_upstream_spec.rb deleted file mode 100644 index 8423eb4376..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_upstream_spec.rb +++ /dev/null @@ -1,93 +0,0 @@ -require 'spec_helper' - -describe 'nginx::resource::upstream' do - let :title do - 'upstream-test' - end - - let :default_params do - { - :members => ['test'], - } - end - - describe 'os-independent items' do - - describe 'basic assumptions' do - let :params do default_params end - - it { should contain_file("/etc/nginx/conf.d/#{title}-upstream.conf").with( - { - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - 'ensure' => 'file', - 'content' => /upstream #{title}/, - } - )} - end - - describe "upstream.conf template content" do - [ - { - :title => 'should contain ordered prepended directives', - :attr => 'upstream_cfg_prepend', - :value => { - 'test3' => 'test value 3', - 'test1' => 'test value 1', - 'test2' => 'test value 2', - 'test4' => ['test value 1', 'test value 2'], - 'test5' => {'subkey1' => 'subvalue1'}, - 'test6' => {'subkey1' => ['subvalue1', 'subvalue2']}, - }, - :match => [ - ' test1 test value 1;', - ' test2 test value 2;', - ' test3 test value 3;', - ' test4 test value 1;', - ' test4 test value 2;', - ' test5 subkey1 subvalue1;', - ' test6 subkey1 subvalue1;', - ' test6 subkey1 subvalue2;', - ], - }, - { - :title => 'should set server', - :attr => 'members', - :value => [ - 'test3', - 'test1', - 'test2', - ], - :match => [ - ' server test3 fail_timeout=10s;', - ' server test1 fail_timeout=10s;', - ' server test2 fail_timeout=10s;', - ], - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { should contain_file("/etc/nginx/conf.d/#{title}-upstream.conf").with_mode('0644') } - it param[:title] do - verify_contents(subject, "/etc/nginx/conf.d/#{title}-upstream.conf", Array(param[:match])) - Array(param[:notmatch]).each do |item| - should contain_file("/etc/nginx/conf.d/#{title}-upstream.conf").without_content(item) - end - end - end - end - - context 'when ensure => absent' do - let :params do default_params.merge( - { - :ensure => 'absent' - } - ) end - - it { should contain_file("/etc/nginx/conf.d/#{title}-upstream.conf").with_ensure('absent') } - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_vhost_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_vhost_spec.rb deleted file mode 100644 index 9d4ef3d903..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/defines/resource_vhost_spec.rb +++ /dev/null @@ -1,647 +0,0 @@ -require 'spec_helper' - -describe 'nginx::resource::vhost' do - let :title do - 'www.rspec.example.com' - end - let :default_params do - { - :www_root => '/', - :ipv6_enable => true, - } - end - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'debian', - :ipaddress6 => '::', - } - end - let :pre_condition do - [ - 'include ::nginx::params', - 'include ::nginx::config', - ] - end - - describe 'os-independent items' do - - describe 'basic assumptions' do - let :params do default_params end - it { should contain_class("nginx::params") } - it { should contain_class("nginx::config") } - it { should contain_concat("/etc/nginx/sites-available/#{title}.conf").with({ - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', - })} - it { should contain_concat__fragment("#{title}-header").with_content(%r{access_log[ ]+/var/log/nginx/www\.rspec\.example\.com\.access\.log}) } - it { should contain_concat__fragment("#{title}-header").with_content(%r{error_log[ ]+/var/log/nginx/www\.rspec\.example\.com\.error\.log}) } - it { should contain_concat__fragment("#{title}-footer") } - it { should contain_nginx__resource__location("#{title}-default") } - it { should_not contain_file("/etc/nginx/fastcgi_params") } - it { should contain_file("#{title}.conf symlink").with({ - 'ensure' => 'link', - 'path' => "/etc/nginx/sites-enabled/#{title}.conf", - 'target' => "/etc/nginx/sites-available/#{title}.conf" - })} - end - - describe "vhost_header template content" do - [ - { - :title => 'should set the IPv4 listen IP', - :attr => 'listen_ip', - :value => '127.0.0.1', - :match => ' listen 127.0.0.1:80;', - }, - { - :title => 'should set the IPv4 listen port', - :attr => 'listen_port', - :value => 45, - :match => ' listen *:45;', - }, - { - :title => 'should set the IPv4 listen options', - :attr => 'listen_options', - :value => 'spdy default', - :match => ' listen *:80 spdy default;', - }, - { - :title => 'should enable IPv6', - :attr => 'ipv6_enable', - :value => true, - :match => ' listen [::]:80 default ipv6only=on;', - }, - { - :title => 'should not enable IPv6', - :attr => 'ipv6_enable', - :value => false, - :notmatch => / listen \[::\]:80 default ipv6only=on;/, - }, - { - :title => 'should set the IPv6 listen IP', - :attr => 'ipv6_listen_ip', - :value => '2001:0db8:85a3:0000:0000:8a2e:0370:7334', - :match => ' listen [2001:0db8:85a3:0000:0000:8a2e:0370:7334]:80 default ipv6only=on;', - }, - { - :title => 'should set the IPv6 listen port', - :attr => 'ipv6_listen_port', - :value => 45, - :match => ' listen [::]:45 default ipv6only=on;', - }, - { - :title => 'should set the IPv6 listen options', - :attr => 'ipv6_listen_options', - :value => 'spdy', - :match => ' listen [::]:80 spdy;', - }, - { - :title => 'should set servername(s)', - :attr => 'server_name', - :value => ['name1','name2'], - :match => ' server_name name1 name2;', - }, - { - :title => 'should rewrite www servername to non-www', - :attr => 'rewrite_www_to_non_www', - :value => true, - :match => ' server_name rspec.example.com;', - }, - { - :title => 'should not rewrite www servername to non-www', - :attr => 'rewrite_www_to_non_www', - :value => false, - :match => ' server_name www.rspec.example.com;', - }, - { - :title => 'should set auth_basic', - :attr => 'auth_basic', - :value => 'value', - :match => ' auth_basic "value";', - }, - { - :title => 'should set auth_basic_user_file', - :attr => 'auth_basic_user_file', - :value => 'value', - :match => ' auth_basic_user_file value;', - }, - { - :title => 'should contain ordered prepended directives', - :attr => 'vhost_cfg_prepend', - :value => { 'test1' => ['test value 1a', 'test value 1b'], 'test2' => 'test value 2', 'allow' => 'test value 3' }, - :match => [ - ' allow test value 3;', - ' test1 test value 1a;', - ' test1 test value 1b;', - ' test2 test value 2;', - ], - }, - { - :title => 'should set root', - :attr => 'use_default_location', - :value => false, - :match => ' root /;', - }, - { - :title => 'should not set root', - :attr => 'use_default_location', - :value => true, - :notmatch => / root \/;/, - }, - { - :title => 'should set proxy_set_header', - :attr => 'proxy_set_header', - :value => ['header1','header2'], - :match => [ - ' proxy_set_header header1;', - ' proxy_set_header header2;', - ], - }, - { - :title => 'should rewrite to HTTPS', - :attr => 'rewrite_to_https', - :value => true, - :match => [ - ' if ($ssl_protocol = "") {', - ' return 301 https://$host$request_uri;', - ], - }, - { - :title => 'should not rewrite to HTTPS', - :attr => 'rewrite_to_https', - :value => false, - :notmatch => [ - /if \(\$ssl_protocol = ""\) \{/, - / return 301 https:\/\/\$host\$request_uri;/, - ], - }, - { - :title => 'should set access_log', - :attr => 'access_log', - :value => '/path/to/access.log', - :match => ' access_log /path/to/access.log;', - }, - { - :title => 'should set error_log', - :attr => 'error_log', - :value => '/path/to/error.log', - :match => ' error_log /path/to/error.log;', - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { should contain_concat__fragment("#{title}-header") } - it param[:title] do - lines = subject.resource('concat::fragment', "#{title}-header").send(:parameters)[:content].split("\n") - (lines & Array(param[:match])).should == Array(param[:match]) - Array(param[:notmatch]).each do |item| - should contain_concat__fragment("#{title}-header").without_content(item) - end - end - end - end - end - - describe "vhost_footer template content" do - [ - { - :title => 'should contain include directives', - :attr => 'include_files', - :value => [ '/file1', '/file2' ], - :match => [ - 'include /file1;', - 'include /file2;', - ], - }, - { - :title => 'should contain ordered appended directives', - :attr => 'vhost_cfg_append', - :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3' }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2a;', - ' test2 test value 2b;', - ], - }, - { - :title => 'should contain www to non-www rewrite', - :attr => 'rewrite_www_to_non_www', - :value => true, - :match => [ - ' listen *:80;', - ' server_name www.rspec.example.com;', - ' rewrite ^ http://rspec.example.com$uri permanent;', - ], - }, - { - :title => 'should not contain www to non-www rewrite', - :attr => 'rewrite_www_to_non_www', - :value => false, - :notmatch => [ - / listen \*:80;/, - / server_name www\.rspec\.example\.com;/, - / rewrite \^ http:\/\/rspec\.example\.com\$uri permanent;/, - ], - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - - it { should contain_concat__fragment("#{title}-footer") } - it param[:title] do - lines = subject.resource('concat::fragment', "#{title}-footer").send(:parameters)[:content].split("\n") - (lines & Array(param[:match])).should == Array(param[:match]) - Array(param[:notmatch]).each do |item| - should contain_concat__fragment("#{title}-footer").without_content(item) - end - end - end - end - end - - describe "vhost_ssl_header template content" do - [ - { - :title => 'should set the IPv4 listen IP', - :attr => 'listen_ip', - :value => '127.0.0.1', - :match => ' listen 127.0.0.1:443 ssl;', - }, - { - :title => 'should set the IPv4 SSL listen port', - :attr => 'ssl_port', - :value => 45, - :match => ' listen *:45 ssl;', - }, - { - :title => 'should set SPDY', - :attr => 'spdy', - :value => 'on', - :match => ' listen *:443 ssl spdy;', - }, - { - :title => 'should not set SPDY', - :attr => 'spdy', - :value => 'off', - :match => ' listen *:443 ssl;', - }, - { - :title => 'should set the IPv4 listen options', - :attr => 'listen_options', - :value => 'default', - :match => ' listen *:443 ssl default;', - }, - { - :title => 'should enable IPv6', - :attr => 'ipv6_enable', - :value => true, - :match => ' listen [::]:443 ssl default ipv6only=on;', - }, - { - :title => 'should disable IPv6', - :attr => 'ipv6_enable', - :value => false, - :notmatch => / listen \[::\]:443 ssl default ipv6only=on;/, - }, - { - :title => 'should set the IPv6 listen IP', - :attr => 'ipv6_listen_ip', - :value => '2001:0db8:85a3:0000:0000:8a2e:0370:7334', - :match => ' listen [2001:0db8:85a3:0000:0000:8a2e:0370:7334]:443 ssl default ipv6only=on;', - }, - { - :title => 'should set the IPv6 listen port', - :attr => 'ssl_port', - :value => 45, - :match => ' listen [::]:45 ssl default ipv6only=on;', - }, - { - :title => 'should set the IPv6 listen options', - :attr => 'ipv6_listen_options', - :value => 'spdy default', - :match => ' listen [::]:443 ssl spdy default;', - }, - { - :title => 'should set servername(s)', - :attr => 'server_name', - :value => ['name1','name2'], - :match => ' server_name name1 name2;', - }, - { - :title => 'should rewrite www servername to non-www', - :attr => 'rewrite_www_to_non_www', - :value => true, - :match => ' server_name rspec.example.com;', - }, - { - :title => 'should not rewrite www servername to non-www', - :attr => 'rewrite_www_to_non_www', - :value => false, - :match => ' server_name www.rspec.example.com;', - }, - { - :title => 'should set the SSL cache', - :attr => 'ssl_cache', - :value => 'shared:SSL:1m', - :match => ' ssl_session_cache shared:SSL:1m;', - }, - { - :title => 'should set the SSL protocols', - :attr => 'ssl_protocols', - :value => 'SSLv3', - :match => ' ssl_protocols SSLv3;', - }, - { - :title => 'should set the SSL ciphers', - :attr => 'ssl_ciphers', - :value => 'HIGH', - :match => ' ssl_ciphers HIGH;', - }, - { - :title => 'should set auth_basic', - :attr => 'auth_basic', - :value => 'value', - :match => ' auth_basic "value";', - }, - { - :title => 'should set auth_basic_user_file', - :attr => 'auth_basic_user_file', - :value => 'value', - :match => ' auth_basic_user_file "value";', - }, - { - :title => 'should set access_log', - :attr => 'access_log', - :value => '/path/to/access.log', - :match => ' access_log /path/to/access.log;', - }, - { - :title => 'should set error_log', - :attr => 'error_log', - :value => '/path/to/error.log', - :match => ' error_log /path/to/error.log;', - }, - { - :title => 'should contain ordered prepend directives', - :attr => 'vhost_cfg_prepend', - :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3' }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2a;', - ' test2 test value 2b;', - ] - }, - { - :title => 'should contain ordered ssl prepend directives', - :attr => 'vhost_cfg_ssl_prepend', - :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3' }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2a;', - ' test2 test value 2b;', - ] - }, - { - :title => 'should set root', - :attr => 'use_default_location', - :value => false, - :match => ' root /;', - }, - { - :title => 'should not set root', - :attr => 'use_default_location', - :value => true, - :notmatch => / root \/;/, - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :params do default_params.merge({ - param[:attr].to_sym => param[:value], - :ssl => true, - :ssl_key => 'dummy.key', - :ssl_cert => 'dummy.crt', - }) end - it { should contain_concat__fragment("#{title}-ssl-header") } - it param[:title] do - lines = subject.resource('concat::fragment', "#{title}-ssl-header").send(:parameters)[:content].split("\n") - (lines & Array(param[:match])).should == Array(param[:match]) - Array(param[:notmatch]).each do |item| - should contain_concat__fragment("#{title}-ssl-header").without_content(item) - end - end - end - end - end - - describe "vhost_ssl_footer template content" do - [ - { - :title => 'should contain include directives', - :attr => 'include_files', - :value => [ '/file1', '/file2' ], - :match => [ - 'include /file1;', - 'include /file2;', - ], - }, - { - :title => 'should contain ordered appended directives', - :attr => 'vhost_cfg_append', - :value => { 'test1' => 'test value 1', 'test2' => 'test value 2', 'allow' => 'test value 3' }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2;', - ] - }, - { - :title => 'should contain ordered ssl appended directives', - :attr => 'vhost_cfg_ssl_append', - :value => { 'test1' => 'test value 1', 'test2' => ['test value 2a', 'test value 2b'], 'allow' => 'test value 3' }, - :match => [ - ' allow test value 3;', - ' test1 test value 1;', - ' test2 test value 2a;', - ' test2 test value 2b;', - ] - }, - { - :title => 'should contain www to non-www rewrite', - :attr => 'rewrite_www_to_non_www', - :value => true, - :match => [ - ' listen *:443 ssl;', - ' server_name www.rspec.example.com;', - ' rewrite ^ https://rspec.example.com$uri permanent;', - ], - }, - { - :title => 'should not contain www to non-www rewrite', - :attr => 'rewrite_www_to_non_www', - :value => false, - :notmatch => [ - / listen \*:443 ssl;/, - / server_name www\.rspec\.example\.com;/, - / rewrite \^ https:\/\/rspec\.example\.com\$uri permanent;/, - ], - }, - ].each do |param| - context "when #{param[:attr]} is #{param[:value]}" do - let :params do default_params.merge({ - param[:attr].to_sym => param[:value], - :ssl => true, - :ssl_key => 'dummy.key', - :ssl_cert => 'dummy.crt', - }) end - - it { should contain_concat__fragment("#{title}-ssl-footer") } - it param[:title] do - lines = subject.resource('concat::fragment', "#{title}-ssl-footer").send(:parameters)[:content].split("\n") - (lines & Array(param[:match])).should == Array(param[:match]) - Array(param[:notmatch]).each do |item| - should contain_concat__fragment("#{title}-ssl-footer").without_content(item) - end - end - end - end - end - context 'attribute resources' do - context "SSL cert missing" do - let(:params) {{ :ssl => true, :ssl_key => 'key' }} - - it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } - end - - context "SSL key missing" do - let(:params) {{ :ssl => true, :ssl_cert => 'cert' }} - - it { expect { should contain_class('nginx::resource::vhost') }.to raise_error(Puppet::Error, %r{nginx: SSL certificate/key \(ssl_cert/ssl_cert\) and/or SSL Private must be defined and exist on the target system\(s\)}) } - end - - context 'when use_default_location => true' do - let :params do default_params.merge({ - :use_default_location => true, - }) end - - it { should contain_nginx__resource__location("#{title}-default") } - end - - context 'when use_default_location => false' do - let :params do default_params.merge({ - :use_default_location => false, - }) end - - it { should_not contain_nginx__resource__location("#{title}-default") } - end - - context 'when location_cfg_prepend => { key => value }' do - let :params do default_params.merge({ - :location_cfg_prepend => { 'key' => 'value' }, - }) end - - it { should contain_nginx__resource__location("#{title}-default").with_location_cfg_prepend({ 'key' => 'value' }) } - end - - context 'when location_cfg_append => { key => value }' do - let :params do default_params.merge({ - :location_cfg_append => { 'key' => 'value' }, - }) end - - it { should contain_nginx__resource__location("#{title}-default").with_location_cfg_append({ 'key' => 'value' }) } - end - - context 'when fastcgi => "localhost:9000"' do - let :params do default_params.merge({ - :fastcgi => 'localhost:9000', - }) end - - it { should contain_file('/etc/nginx/fastcgi_params').with_mode('0770') } - end - - context 'when listen_port == ssl_port' do - let :params do default_params.merge({ - :listen_port => 80, - :ssl_port => 80, - }) end - - it { should_not contain_concat__fragment("#{title}-header") } - it { should_not contain_concat__fragment("#{title}-footer") } - end - - context 'when listen_port != ssl_port' do - let :params do default_params.merge({ - :listen_port => 80, - :ssl_port => 443, - }) end - - it { should contain_concat__fragment("#{title}-header") } - it { should contain_concat__fragment("#{title}-footer") } - end - - context 'when ensure => absent' do - let :params do default_params.merge({ - :ensure => 'absent', - :ssl => true, - :ssl_key => 'dummy.key', - :ssl_cert => 'dummy.cert', - }) end - - it { should contain_nginx__resource__location("#{title}-default").with_ensure('absent') } - it { should contain_file("#{title}.conf symlink").with_ensure('absent') } - end - - context 'when ssl => true and ssl_port == listen_port' do - let :params do default_params.merge({ - :ssl => true, - :listen_port => 80, - :ssl_port => 80, - :ssl_key => 'dummy.key', - :ssl_cert => 'dummy.cert', - }) end - - it { should contain_nginx__resource__location("#{title}-default").with_ssl_only(true) } - it { should contain_concat__fragment("#{title}-ssl-header").with_content(%r{access_log[ ]+/var/log/nginx/ssl-www\.rspec\.example\.com\.access\.log}) } - it { should contain_concat__fragment("#{title}-ssl-header").with_content(%r{error_log[ ]+/var/log/nginx/ssl-www\.rspec\.example\.com\.error\.log}) } - it { should contain_concat__fragment("#{title}-ssl-footer") } - it { should contain_file("/etc/nginx/#{title}.crt") } - it { should contain_file("/etc/nginx/#{title}.key") } - end - - context 'when passenger_cgi_param is set' do - let :params do default_params.merge({ - :passenger_cgi_param => { 'test1' => 'test value 1', 'test2' => 'test value 2', 'test3' => 'test value 3' } - }) end - - it { should contain_concat__fragment("#{title}-header").with_content( /passenger_set_cgi_param test1 test value 1;/ ) } - it { should contain_concat__fragment("#{title}-header").with_content( /passenger_set_cgi_param test2 test value 2;/ ) } - it { should contain_concat__fragment("#{title}-header").with_content( /passenger_set_cgi_param test3 test value 3;/ ) } - end - - context 'when passenger_cgi_param is set and ssl => true' do - let :params do default_params.merge({ - :passenger_cgi_param => { 'test1' => 'test value 1', 'test2' => 'test value 2', 'test3' => 'test value 3' }, - :ssl => true, - :ssl_key => 'dummy.key', - :ssl_cert => 'dummy.cert', - }) end - - it { should contain_concat__fragment("#{title}-ssl-header").with_content( /passenger_set_cgi_param test1 test value 1;/ ) } - it { should contain_concat__fragment("#{title}-ssl-header").with_content( /passenger_set_cgi_param test2 test value 2;/ ) } - it { should contain_concat__fragment("#{title}-ssl-header").with_content( /passenger_set_cgi_param test3 test value 3;/ ) } - end - - context 'when vhost name is sanitized' do - let :title do 'www rspec-vhost com' end - let :params do default_params end - - it { should contain_concat('/etc/nginx/sites-available/www_rspec-vhost_com.conf') } - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/spec_helper.rb deleted file mode 100644 index a987b6e6ca..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/spec_helper.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' - -RSpec.configure do |c| - c.default_facts = { - :kernel => 'Linux', - :concat_basedir => '/var/lib/puppet/concat', - } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/spec_helper_system.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/spec_helper_system.rb deleted file mode 100644 index bfb7271d0a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/spec_helper_system.rb +++ /dev/null @@ -1,64 +0,0 @@ -require 'rspec-system/spec_helper' -require 'rspec-system-puppet/helpers' -require 'rspec-system-serverspec/helpers' -include RSpecSystemPuppet::Helpers - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Enable colour - c.tty = true - - # This is where we 'setup' the nodes before running our tests - c.before :suite do - # Install puppet - puppet_install - - # Install modules and dependencies - puppet_module_install(:source => proj_root, :module_name => 'nginx') - shell('puppet module install puppetlabs-apt') - shell('puppet module install puppetlabs-stdlib') - shell('puppet module install puppetlabs-concat') - - # Fake keys. - # Valid self-signed SSL key with 10 year expiry. - # Required for nginx to start when SSL enabled - shell('echo "-----BEGIN PRIVATE KEY----- -MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAOPchwRZRF4KmU6E -g7C6Pq9zhdLiQt9owdcLZNiZS+UVRQjeDHSy3titzh5YwSoQonlnSqd0g/PJ6kNA -O3CNOMVuzAddnAaHzW1J4Rt6sZwOuidtJC4t/hFCgz5NqOMgYOOfratQx00A7ZXK -TXMgNG79lDP5L/N06Ox53sOxhy4hAgMBAAECgYEAlfktCKi0fe0d8Hb5slUzMwmn -GCECAMeTZbXDH2jucg4ozOhRbHHaiOUEmCa0pLokJiHdGhBvVQMd5Dufo7nflZzE -mpZY0lCZE7HSeK6Bcbru/8w3vm3iBQTGK+MCaDtH5nQU7m/3cOXaenOX0ZmsTzRs -QE/V84S1fuO8bBPSz20CQQD9d4LxrBByosFxRdHsTb/nnqx/rzLEf4M3MC7uydPv -fDDbSRRSYpNxonQJfU3JrOk1WPWoXY30VQCv395s57X7AkEA5iOBT+ME8/PxuUUC -ZDjg21tAdkaiCQ5kgeVTmkD1k/gTwreOV2AexWGrrcW/MLaIhpDCpQkw37y5vrYw -UyDdkwJAAU+j8sIUF7O10nMtAc7pJjaQ59wtJA0QzbFHHN8YZI285vV60G5IGvdf -KElopJlrX2ZFZwiM2m2yIjbDPMb6DwJAbNoiUbzZHOInVTA0316fzGEu7kKeZZYv -J9lmX7GV9nUCM7lKVD2ckFOQNlMwCURs8ukJh7H/MfQ8Dt5xoQAMjQJBAOWpK6k6 -b0fTREZFZRGZBJcSu959YyMzhpSFA+lXkLNTWX8j1/D88H731oMSImoQNWcYx2dH -sCwOCDqu1nZ2LJ8= ------END PRIVATE KEY-----" > /tmp/blah.key') - shell('echo "-----BEGIN CERTIFICATE----- -MIIDRjCCAq+gAwIBAgIJAL9m0V4sHW2tMA0GCSqGSIb3DQEBBQUAMIG7MQswCQYD -VQQGEwItLTESMBAGA1UECAwJU29tZVN0YXRlMREwDwYDVQQHDAhTb21lQ2l0eTEZ -MBcGA1UECgwQU29tZU9yZ2FuaXphdGlvbjEfMB0GA1UECwwWU29tZU9yZ2FuaXph -dGlvbmFsVW5pdDEeMBwGA1UEAwwVbG9jYWxob3N0LmxvY2FsZG9tYWluMSkwJwYJ -KoZIhvcNAQkBFhpyb290QGxvY2FsaG9zdC5sb2NhbGRvbWFpbjAeFw0xMzExMzAw -NzA3NDlaFw0yMzExMjgwNzA3NDlaMIG7MQswCQYDVQQGEwItLTESMBAGA1UECAwJ -U29tZVN0YXRlMREwDwYDVQQHDAhTb21lQ2l0eTEZMBcGA1UECgwQU29tZU9yZ2Fu -aXphdGlvbjEfMB0GA1UECwwWU29tZU9yZ2FuaXphdGlvbmFsVW5pdDEeMBwGA1UE -AwwVbG9jYWxob3N0LmxvY2FsZG9tYWluMSkwJwYJKoZIhvcNAQkBFhpyb290QGxv -Y2FsaG9zdC5sb2NhbGRvbWFpbjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA -49yHBFlEXgqZToSDsLo+r3OF0uJC32jB1wtk2JlL5RVFCN4MdLLe2K3OHljBKhCi -eWdKp3SD88nqQ0A7cI04xW7MB12cBofNbUnhG3qxnA66J20kLi3+EUKDPk2o4yBg -45+tq1DHTQDtlcpNcyA0bv2UM/kv83To7Hnew7GHLiECAwEAAaNQME4wHQYDVR0O -BBYEFP5Kkot/7pStLaYPtT+vngE0v6N8MB8GA1UdIwQYMBaAFP5Kkot/7pStLaYP -tT+vngE0v6N8MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAwYYQKVRN -HaHIWGMBuXApE7t4PNdYWZ5Y56tI+HT59yVoDjc1YSnuzkKlWUPibVYoLpX/ROKr -aIZ8kxsBjLvpi9KQTHi7Wl6Sw3ecoYdKy+2P8S5xOIpWjs8XVmOWf7Tq1+9KPv3z -HLw/FDCzntkdq3G4em15CdFlO9BTY4HXiHU= ------END CERTIFICATE-----" > /tmp/blah.cert') - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/basic_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/basic_spec.rb deleted file mode 100644 index 775c8b6543..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/basic_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'spec_helper_system' - -# Here we put the more basic fundamental tests, ultra obvious stuff. -describe "basic tests:" do - context 'make sure we have copied the module across' do - # No point diagnosing any more if the module wasn't copied properly - context shell 'ls /etc/puppet/modules/nginx' do - its(:stdout) { should =~ /Modulefile/ } - its(:stderr) { should be_empty } - its(:exit_code) { should be_zero } - end - end - - #puppet smoke test - context puppet_apply 'notice("foo")' do - its(:stdout) { should =~ /foo/ } - its(:stderr) { should be_empty } - its(:exit_code) { should be_zero } - end - - it 'nginx class should work with no errors' do - pp = <<-EOS - class { 'nginx': } - EOS - - # Run it twice and test for idempotency - puppet_apply(pp) do |r| - [0,2].should include(r.exit_code) - r.refresh - r.exit_code.should be_zero - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/class_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/class_spec.rb deleted file mode 100644 index d8eff7c418..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/class_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'spec_helper_system' - -describe "nginx class:" do - case node.facts['osfamily'] - when 'RedHat' - package_name = 'nginx' - when 'Debian' - package_name = 'nginx' - when 'Suse' - package_name = 'nginx-0.8' - end - - context 'should run successfully' do - it 'should run successfully' do - pp = "class { 'nginx': }" - - puppet_apply(pp) do |r| - #r.stderr.should be_empty - [0,2].should include r.exit_code - r.refresh - #r.stderr.should be_empty - r.exit_code.should be_zero - end - end - end - - describe package(package_name) do - it { should be_installed } - end - - describe service('nginx') do - it { should be_running } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/nginx_mail_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/nginx_mail_spec.rb deleted file mode 100644 index e8cce6cf1c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/nginx_mail_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'spec_helper_system' - -describe "nginx::resource::mailhost define:" do - it 'should run successfully' do - - pp = " - class { 'nginx': - mail => true, - } - nginx::resource::vhost { 'www.puppetlabs.com': - ensure => present, - www_root => '/var/www/www.puppetlabs.com', - } - nginx::resource::mailhost { 'domain1.example': - ensure => present, - auth_http => 'localhost/cgi-bin/auth', - protocol => 'smtp', - listen_port => 587, - ssl_port => 465, - xclient => 'off', - } - " - - puppet_apply(pp) do |r| - [0,2].should include r.exit_code - r.refresh - # Not until deprecated variables fixed. - #r.stderr.should be_empty - r.exit_code.should be_zero - end - end - - describe file('/etc/nginx/conf.mail.d/domain1.example.conf') do - it { should be_file } - it { should contain "auth_http localhost/cgi-bin/auth;" } - end - - describe file('/etc/nginx/sites-available/www.puppetlabs.com.conf') do - it { should be_file } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/nginx_proxy_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/nginx_proxy_spec.rb deleted file mode 100644 index 09b1885655..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/nginx_proxy_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'spec_helper_system' - -describe "nginx::resource::upstream define:" do - it 'should run successfully' do - - pp = " - class { 'nginx': } - nginx::resource::upstream { 'puppet_rack_app': - ensure => present, - members => [ - 'localhost:3000', - 'localhost:3001', - 'localhost:3002', - ], - } - nginx::resource::vhost { 'rack.puppetlabs.com': - ensure => present, - proxy => 'http://puppet_rack_app', - } - " - - puppet_apply(pp) do |r| - [0,2].should include r.exit_code - r.refresh - r.stderr.should be_empty - r.exit_code.should be_zero - end - end - - describe file('/etc/nginx/conf.d/puppet_rack_app-upstream.conf') do - it { should be_file } - it { should contain "server localhost:3000" } - it { should contain "server localhost:3001" } - it { should contain "server localhost:3002" } - it { should_not contain "server localhost:3003" } - end - - describe file('/etc/nginx/sites-available/rack.puppetlabs.com.conf') do - it { should be_file } - it { should contain "proxy_pass http://puppet_rack_app;" } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/nginx_vhost_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/nginx_vhost_spec.rb deleted file mode 100644 index d4f3446769..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/spec/system/nginx_vhost_spec.rb +++ /dev/null @@ -1,100 +0,0 @@ -require 'spec_helper_system' - -describe "nginx::resource::vhost define:" do - context 'new vhost on port 80' do - it 'should configure a nginx vhost' do - - pp = " - class { 'nginx': } - nginx::resource::vhost { 'www.puppetlabs.com': - ensure => present, - www_root => '/var/www/www.puppetlabs.com', - } - host { 'www.puppetlabs.com': ip => '127.0.0.1', } - file { ['/var/www','/var/www/www.puppetlabs.com']: ensure => directory } - file { '/var/www/www.puppetlabs.com/index.html': ensure => file, content => 'Hello from www\n', } - " - - puppet_apply(pp) do |r| - [0,2].should include r.exit_code - r.refresh - r.stderr.should be_empty - r.exit_code.should be_zero - end - end - - describe file('/etc/nginx/sites-available/www.puppetlabs.com.conf') do - it { should be_file } - it { should contain "www.puppetlabs.com" } - end - - describe file('/etc/nginx/sites-enabled/www.puppetlabs.com.conf') do - it { should be_linked_to '/etc/nginx/sites-available/www.puppetlabs.com.conf' } - end - - describe service('nginx') do - it { should be_running } - end - - it 'should answer to www.puppetlabs.com' do - shell("/usr/bin/curl http://www.puppetlabs.com:80") do |r| - r.stdout.should == "Hello from www\n" - r.exit_code.should be_zero - end - end - end - - context 'should run successfully with ssl' do - it 'should configure a nginx SSL vhost' do - - pp = " - class { 'nginx': } - nginx::resource::vhost { 'www.puppetlabs.com': - ensure => present, - ssl => true, - ssl_cert => '/tmp/blah.cert', - ssl_key => '/tmp/blah.key', - www_root => '/var/www/www.puppetlabs.com', - } - host { 'www.puppetlabs.com': ip => '127.0.0.1', } - file { ['/var/www','/var/www/www.puppetlabs.com']: ensure => directory } - file { '/var/www/www.puppetlabs.com/index.html': ensure => file, content => 'Hello from www\n', } - " - - puppet_apply(pp) do |r| - [0,2].should include r.exit_code - r.refresh - r.stderr.should be_empty - r.exit_code.should be_zero - end - end - - describe file('/etc/nginx/sites-available/www.puppetlabs.com.conf') do - it { should be_file } - it { should contain "ssl on;" } - end - - describe file('/etc/nginx/sites-enabled/www.puppetlabs.com.conf') do - it { should be_linked_to '/etc/nginx/sites-available/www.puppetlabs.com.conf' } - end - - describe service('nginx') do - it { should be_running } - end - - it 'should answer to http://www.puppetlabs.com' do - shell("/usr/bin/curl http://www.puppetlabs.com:80") do |r| - r.stdout.should == "Hello from www\n" - r.exit_code.should == 0 - end - end - - it 'should answer to https://www.puppetlabs.com' do - # use --insecure because it's a self-signed cert - shell("/usr/bin/curl --insecure https://www.puppetlabs.com:443") do |r| - r.stdout.should == "Hello from www\n" - r.exit_code.should == 0 - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/conf.d/nginx.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/conf.d/nginx.conf.erb deleted file mode 100644 index 62e49e2a31..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/conf.d/nginx.conf.erb +++ /dev/null @@ -1,55 +0,0 @@ -user <%= scope.lookupvar('nginx::config::nx_daemon_user') %>; -worker_processes <%= @worker_processes %>; -worker_rlimit_nofile <%= @worker_rlimit_nofile %>; - -error_log <%= @nginx_error_log %>; -pid <%= scope.lookupvar('nginx::params::nx_pid')%>; - -events { - worker_connections <%= @worker_connections -%>; -<% if scope.lookupvar('nginx::params::nx_multi_accept') == 'on' %>multi_accept on;<% end -%> -<% if scope.lookupvar('nginx::params::nx_events_use') %>use <%= scope.lookupvar('nginx::params::nx_events_use')%>;<% end -%> -} - -http { - include <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/mime.types; - default_type application/octet-stream; - - access_log <%= @http_access_log %>; - - sendfile <%= scope.lookupvar('nginx::params::nx_sendfile')%>; - - server_tokens <%= @server_tokens %>; - - types_hash_max_size <%= scope.lookupvar('nginx::params::nx_types_hash_max_size')%>; - types_hash_bucket_size <%= scope.lookupvar('nginx::params::nx_types_hash_bucket_size')%>; - - server_names_hash_bucket_size <%= @names_hash_bucket_size %>; - server_names_hash_max_size <%= @names_hash_max_size %>; - - keepalive_timeout <%= scope.lookupvar('nginx::params::nx_keepalive_timeout')%>; - tcp_nodelay <%= scope.lookupvar('nginx::params::nx_tcp_nodelay')%>; - -<% if @gzip == 'on' %> - gzip on; - gzip_disable "MSIE [1-6]\.(?!.*SV1)"; -<% end -%> - -<% if @proxy_cache_path -%> - proxy_cache_path <%= @proxy_cache_path %> levels=<%= @proxy_cache_levels %> keys_zone=<%= @proxy_cache_keys_zone %> max_size=<%= @proxy_cache_max_size %> inactive=<%= @proxy_cache_inactive %>; -<% end -%> - -<% if @http_cfg_append -%><% @http_cfg_append.sort_by{|k,v| k}.each do |key,value| -%> - <%= key %> <%= value %>; -<% end -%> -<% end -%> - - include <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/conf.d/*.conf; - include <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/sites-enabled/*; - -} -<% if scope.lookupvar('nginx::mail') %> -mail { - include <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/conf.mail.d/*.conf; -} -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/conf.d/proxy.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/conf.d/proxy.conf.erb deleted file mode 100644 index fcd7e1d5b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/conf.d/proxy.conf.erb +++ /dev/null @@ -1,11 +0,0 @@ -proxy_redirect <%= scope.lookupvar('nginx::params::nx_proxy_redirect') %>; -client_max_body_size <%= @client_max_body_size %>; -client_body_buffer_size <%= scope.lookupvar('nginx::params::nx_client_body_buffer_size') %>; -proxy_connect_timeout <%= scope.lookupvar('nginx::params::nx_proxy_connect_timeout') %>; -proxy_send_timeout <%= scope.lookupvar('nginx::params::nx_proxy_send_timeout') %>; -proxy_read_timeout <%= scope.lookupvar('nginx::params::nx_proxy_read_timeout') %>; -proxy_buffers <%= @proxy_buffers %>; -proxy_buffer_size <%= @proxy_buffer_size %>; -proxy_http_version <%= @proxy_http_version %>; -<% @proxy_set_header.each do |header| %> -proxy_set_header <%= header %>;<% end %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/conf.d/upstream.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/conf.d/upstream.erb deleted file mode 100644 index a96121ab22..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/conf.d/upstream.erb +++ /dev/null @@ -1,15 +0,0 @@ -upstream <%= @name %> { -<% if @upstream_cfg_prepend -%><% @upstream_cfg_prepend.sort_by{|k,v| k}.each do |key,value| %> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> - <% @members.each do |i| %> - server <%= i %> fail_timeout=<%= @upstream_fail_timeout %>;<% end %> -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/mailhost/mailhost.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/mailhost/mailhost.erb deleted file mode 100644 index a6bab3f93b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/mailhost/mailhost.erb +++ /dev/null @@ -1,23 +0,0 @@ - -server { - listen <%= @listen_ip %>:<%= @listen_port %><% if @listen_options %> <%= @listen_options %><% end %>; - <% # check to see if ipv6 support exists in the kernel before applying %> - <% if @ipv6_enable && (defined? @ipaddress6) %> - listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %><% if @ipv6_listen_options %> <%= @ipv6_listen_options %><% end %>; - <% end %> - server_name <%= @server_name.join(" ") %>; - protocol <%= @protocol %>; - xclient <%= @xclient %>; - auth_http <%= @auth_http %>; - starttls <%= @starttls %>; - <% if @starttls == 'on' || @starttls == 'only' %> - ssl_certificate <%= @ssl_cert %>; - ssl_certificate_key <%= @ssl_key %>; - - ssl_session_timeout 5m; - - ssl_protocols SSLv3 TLSv1; - ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; - ssl_prefer_server_ciphers on; - <%- end -%> -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/mailhost/mailhost_ssl.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/mailhost/mailhost_ssl.erb deleted file mode 100644 index 98d193f8f5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/mailhost/mailhost_ssl.erb +++ /dev/null @@ -1,23 +0,0 @@ - -server { - listen <%= @ssl_port %>; - <% # check to see if ipv6 support exists in the kernel before applying %> - <% if @ipv6_enable && (defined? @ipaddress6) %> - listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %>; - <% end %> - server_name <%= @server_name.join(" ") %>; - protocol <%= @protocol %>; - xclient <%= @xclient %>; - auth_http <%= @auth_http %>; - - ssl on; - ssl_certificate <%= @ssl_cert %>; - ssl_certificate_key <%= @ssl_key %>; - - ssl_session_timeout 5m; - - ssl_protocols SSLv3 TLSv1; - ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP; - ssl_prefer_server_ciphers on; - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/fastcgi_params.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/fastcgi_params.erb deleted file mode 100644 index fe8bc20f0d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/fastcgi_params.erb +++ /dev/null @@ -1,27 +0,0 @@ -# This file managed by puppet on host <%= @fqdn %> - -fastcgi_param QUERY_STRING $query_string; -fastcgi_param REQUEST_METHOD $request_method; -fastcgi_param CONTENT_TYPE $content_type; -fastcgi_param CONTENT_LENGTH $content_length; - -fastcgi_param SCRIPT_FILENAME $request_filename; -fastcgi_param SCRIPT_NAME $fastcgi_script_name; -fastcgi_param REQUEST_URI $request_uri; -fastcgi_param DOCUMENT_URI $document_uri; -fastcgi_param DOCUMENT_ROOT $document_root; -fastcgi_param SERVER_PROTOCOL $server_protocol; - -fastcgi_param GATEWAY_INTERFACE CGI/1.1; -fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; - -fastcgi_param REMOTE_ADDR $remote_addr; -fastcgi_param REMOTE_PORT $remote_port; -fastcgi_param SERVER_ADDR $server_addr; -fastcgi_param SERVER_PORT $server_port; -fastcgi_param SERVER_NAME $server_name; - -fastcgi_param HTTPS $https; - -# PHP only, required if PHP was built with --enable-force-cgi-redirect -fastcgi_param REDIRECT_STATUS 200; diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_footer.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_footer.erb deleted file mode 100644 index b4a4d7eb64..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_footer.erb +++ /dev/null @@ -1,25 +0,0 @@ -<% if @include_files %><% @include_files.each do |file| -%> -include <%= file %>; -<% end -%><% end -%> -<%# make sure that allow comes before deny by forcing the allow key (if it -%> -<%# exists) to be first in the output order. The hash keys also need to be -%> -<%# sorted so that the ordering is stable. -%> -<% if @vhost_cfg_append -%><% @vhost_cfg_append.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -} -<% if @rewrite_www_to_non_www -%> -server { - listen <%= @listen_ip %>:<%= @listen_port %>; - server_name www.<%= @name.gsub(/^www\./, '') %>; - rewrite ^ http://<%= @name.gsub(/^www\./, '') %>$uri permanent; -} -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_header.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_header.erb deleted file mode 100644 index 8fd7615aef..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_header.erb +++ /dev/null @@ -1,54 +0,0 @@ -server { - listen <%= @listen_ip %>:<%= @listen_port %><% if @listen_options %> <%= @listen_options %><% end %>; -<% # check to see if ipv6 support exists in the kernel before applying %> -<% if @ipv6_enable && (defined? @ipaddress6) %> - listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %>; -<% end %> - server_name <%= @rewrite_www_to_non_www ? @name.gsub(/^www\./, '') : @server_name.join(" ") %>; -<% if defined? @auth_basic -%> - auth_basic "<%= @auth_basic %>"; -<% end -%> -<% if defined? @auth_basic_user_file -%> - auth_basic_user_file <%= @auth_basic_user_file %>; -<% end -%> -<% if defined? @client_max_body_size -%> - client_max_body_size <%= @client_max_body_size %>; -<% end -%> -<%# make sure that allow comes before deny by forcing the allow key (if it -%> -<%# exists) to be first in the output order. The hash keys also need to be -%> -<%# sorted so that the ordering is stable. -%> -<% if @vhost_cfg_prepend -%><% @vhost_cfg_prepend.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @root -%> - root <%= @root %>; -<% end -%> -<% if @passenger_cgi_param -%><% @passenger_cgi_param.keys.sort.each do |key| -%> - passenger_set_cgi_param <%= key %> <%= @passenger_cgi_param[key] %>; -<% end -%><% end -%> -<% @proxy_set_header.each do |header| -%> - proxy_set_header <%= header %>; -<% end -%> -<% if @add_header -%><% @add_header.each do |key,value| -%> - add_header <%= key %> <%= value %>; -<% end -%><% end -%> -<% if @rewrite_to_https -%> - if ($ssl_protocol = "") { - return 301 https://$host$request_uri; - } -<% end -%> -<% if @index_files.count > 0 -%> - index <% Array(@index_files).each do |i| %> <%= i %><% end %>; -<% end -%> - - access_log <%= @access_log_real %>; - error_log <%= @error_log_real %>; - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_alias.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_alias.erb deleted file mode 100644 index ccd47f8df5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_alias.erb +++ /dev/null @@ -1,47 +0,0 @@ - location <%= @location %> { -<% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> - alias <%= @location_alias %>; -<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @location_custom_cfg_append -%><% @location_custom_cfg_append.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> - } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_directory.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_directory.erb deleted file mode 100644 index c5f6f01af3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_directory.erb +++ /dev/null @@ -1,65 +0,0 @@ - location <%= @location %> { -<% if @location_allow -%><% @location_allow.each do |allow_rule| -%> - allow <%= allow_rule %>; -<% end -%><% end -%> -<% if @location_deny -%><% @location_deny.each do |deny_rule| -%> - deny <%= deny_rule %>; -<% end -%><% end -%> -<% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |value| -%> - <%= value %> -<% end -%><% end -%> -<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if defined? @www_root -%> - root <%= @www_root %>; -<% end -%> -<% if @try_files -%> - try_files<% @try_files.each do |try| -%> <%= try %><% end -%>; -<% end -%> -<% if defined? @autoindex -%> - autoindex <%= @autoindex %>; -<% end -%> -<% if @index_files.count > 0 -%> - index <% Array(@index_files).each do |i| %> <%= i %><% end %>; -<% end -%> -<% @rewrite_rules.each do |rewrite_rule| -%> - rewrite <%= rewrite_rule %>; -<% end -%> -<% if defined? @auth_basic -%> - auth_basic "<%= @auth_basic %>"; -<% end -%> -<% if defined? @auth_basic_user_file -%> - auth_basic_user_file <%= @auth_basic_user_file %>; -<% end -%> -<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @location_custom_cfg_append -%><% @location_custom_cfg_append.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> - } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_empty.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_empty.erb deleted file mode 100644 index 10f0d3c6cf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_empty.erb +++ /dev/null @@ -1,13 +0,0 @@ - location <%= @location %> { -<% if @location_custom_cfg -%><% @location_custom_cfg.sort_by {|k,v| k}.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> - } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_fastcgi.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_fastcgi.erb deleted file mode 100644 index 015e1d7d58..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_fastcgi.erb +++ /dev/null @@ -1,66 +0,0 @@ - location <%= @location %> { -<% if @location_allow -%><% @location_allow.each do |allow_rule| -%> - allow <%= allow_rule %>; -<% end -%><% end -%> -<% if @location_deny -%><% @location_deny.each do |deny_rule| -%> - deny <%= deny_rule %>; -<% end -%><% end -%> -<% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if defined? @www_root -%> - root <%= @www_root %>; -<% end -%> -<% if @fastcgi_split_path -%> - fastcgi_split_path_info <%= @fastcgi_split_path %>; -<% end -%> -<% if @try_files -%> - try_files<% @try_files.each do |try| -%> <%= try %><% end -%>; -<% end -%> - include <%= @fastcgi_params %>; - fastcgi_pass <%= @fastcgi %>; -<% if defined? @fastcgi_script %> - fastcgi_param SCRIPT_FILENAME <%= @fastcgi_script %>; -<% end -%> -<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @location_custom_cfg_append -%><% @location_custom_cfg_append.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> - } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_proxy.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_proxy.erb deleted file mode 100644 index 6b8acc2dbd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_proxy.erb +++ /dev/null @@ -1,67 +0,0 @@ - location <%= @location %> { -<% if @location_allow -%><% @location_allow.each do |allow_rule| -%> - allow <%= allow_rule %>; -<% end -%><% end -%> -<% if @location_deny -%><% @location_deny.each do |deny_rule| -%> - deny <%= deny_rule %>; -<% end -%><% end -%> -<% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%=subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @proxy_cache -%> - proxy_cache <%= @proxy_cache %>; - proxy_cache_valid <%= @proxy_cache_valid %>; -<% end -%> - proxy_pass <%= @proxy %>; - proxy_read_timeout <%= @proxy_read_timeout %>; -<% if @proxy_method -%> - proxy_method <%= @proxy_method %>; -<% end -%> -<% if @proxy_set_body -%> - proxy_set_body <%= @proxy_set_body %>; -<% end -%> -<% @rewrite_rules.each do |rewrite_rule| -%> - rewrite <%= rewrite_rule %>; -<% end -%> -<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @location_custom_cfg_append -%><% @location_custom_cfg_append.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> - } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_stub_status.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_stub_status.erb deleted file mode 100644 index c560933e88..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_location_stub_status.erb +++ /dev/null @@ -1,47 +0,0 @@ - location <%= @location %> { -<% if @location_custom_cfg_prepend -%><% @location_custom_cfg_prepend.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @location_cfg_prepend -%><% @location_cfg_prepend.sort_by {|k,v| k}.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> - stub_status on; -<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @location_custom_cfg_append -%><% @location_custom_cfg_append.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> - } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_footer.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_footer.erb deleted file mode 100644 index 86419a232c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_footer.erb +++ /dev/null @@ -1,33 +0,0 @@ -<% if @include_files %><% @include_files.each do |file| -%> -include <%= file %>; -<% end -%><% end -%> -<% if @vhost_cfg_append -%><% @vhost_cfg_append.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @vhost_cfg_ssl_append -%><% @vhost_cfg_ssl_append.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -} -<% if @rewrite_www_to_non_www -%> -server { - listen <%= @listen_ip %>:<%= @ssl_port %> ssl; - server_name www.<%= @name.gsub(/^www\./, '') %>; - rewrite ^ https://<%= @name.gsub(/^www\./, '') %>$uri permanent; -} -<% end %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_header.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_header.erb deleted file mode 100644 index e165b71234..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/templates/vhost/vhost_ssl_header.erb +++ /dev/null @@ -1,84 +0,0 @@ -server { - listen <%= @listen_ip %>:<%= @ssl_port %> ssl<% if @spdy == 'on' %> spdy<% end %><% if @listen_options %> <%= @listen_options %><% end %>; - <% if @ipv6_enable && (defined? @ipaddress6) %> - listen [<%= @ipv6_listen_ip %>]:<%= @ssl_port %> ssl<% if @spdy == 'on' %> spdy<% end %><% if @ipv6_listen_options %> <%= @ipv6_listen_options %><% end %>; - <% end %> - server_name <%= @rewrite_www_to_non_www ? @name.gsub(/^www\./, '') : @server_name.join(" ") %>; - - ssl on; - - ssl_certificate <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.crt; - ssl_certificate_key <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.key; -<% if defined? @ssl_dhparam -%> - ssl_dhparam <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.dh.pem; -<% end -%> - ssl_session_cache <%= @ssl_cache %>; - ssl_session_timeout 5m; - ssl_protocols <%= @ssl_protocols %>; - ssl_ciphers <%= @ssl_ciphers %>; - ssl_prefer_server_ciphers on; -<% if @ssl_stapling -%> - ssl_stapling on; -<% end -%> -<% if defined? @ssl_stapling_file -%> - ssl_stapling_file <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.ocsp.resp; -<% end -%> -<% if defined? @ssl_stapling_responder -%> - ssl_stapling_responder <%= @ssl_stapling_responder %>; -<% end -%> -<% if @ssl_stapling_verify -%> - ssl_stapling_verify on; -<% end -%> -<% if defined? @ssl_trusted_cert -%> - ssl_trusted_certificate <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.trusted.crt; -<% end -%> -<% if defined? @resolver -%> - resolver <%= @resolver %>; -<% end -%> -<% if defined? @auth_basic -%> - auth_basic "<%= @auth_basic %>"; -<% end -%> -<% if defined? @auth_basic_user_file -%> - auth_basic_user_file "<%= @auth_basic_user_file %>"; -<% end -%> -<% if @index_files.count > 0 -%> - index <% Array(@index_files).each do |i| %> <%= i %><% end %>; -<% end -%> - - access_log <%= @ssl_access_log %>; - error_log <%= @ssl_error_log %>; - -<% if @vhost_cfg_prepend -%><% @vhost_cfg_prepend.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @vhost_cfg_ssl_prepend -%><% @vhost_cfg_ssl_prepend.sort_by{ |k, v| k.to_s == 'allow' ? '' : k.to_s }.each do |key,value| -%> -<% if value.is_a?(Hash) -%><% value.each do |subkey,subvalue| -%> -<% Array(subvalue).each do |asubvalue| -%> - <%= key %> <%= subkey %> <%= asubvalue %>; -<% end -%> -<% end -%><% else -%> -<% Array(value).each do |asubvalue| -%> - <%= key %> <%= asubvalue %>; -<% end -%> -<% end -%> -<% end -%><% end -%> -<% if @root -%> - root <%= @root %>; -<% end -%> -<% if @passenger_cgi_param -%><% @passenger_cgi_param.each do |key,value| -%> - passenger_set_cgi_param <%= key %> <%= value %>; -<% end -%><% end -%> -<% @proxy_set_header.each do |header| -%> - proxy_set_header <%= header %>; -<% end -%> -<% if @add_header -%><% @add_header.each do |key,value| -%> - add_header <%= key %> <%= value %>; -<% end -%><% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/init.pp deleted file mode 100644 index 41cc19dec3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/init.pp +++ /dev/null @@ -1,9 +0,0 @@ -# The notify before should always come BEFORE all resources -# managed by the nginx class -# and the notify last should always come AFTER all resources -# managed by the nginx class. -node default { - notify { 'before': } - -> class { 'nginx': } - -> notify { 'last': } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/location_alias.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/location_alias.pp deleted file mode 100644 index ac774bafe9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/location_alias.pp +++ /dev/null @@ -1,8 +0,0 @@ -include nginx - -nginx::resource::location { 'www.test.com-alias': - ensure => present, - location => '/some/url', - location_alias => '/new/url/', - vhost => 'www.test.com', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/upstream.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/upstream.pp deleted file mode 100644 index 8cc323b1cb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/upstream.pp +++ /dev/null @@ -1,10 +0,0 @@ -include nginx - -nginx::resource::upstream { 'proxypass': - ensure => present, - members => [ - 'localhost:3000', - 'localhost:3001', - 'localhost:3002', - ], -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/vhost.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/vhost.pp deleted file mode 100644 index cce5657d40..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/vhost.pp +++ /dev/null @@ -1,16 +0,0 @@ -include nginx - -nginx::resource::vhost { 'test.local test': - ensure => present, - ipv6_enable => true, - proxy => 'http://proxypass', -} - -nginx::resource::vhost { 'test.local:8080': - ensure => present, - listen_port => 8080, - server_name => ['test.local test'], - ipv6_enable => true, - proxy => 'http://proxypass', -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/vhost_ssl.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/vhost_ssl.pp deleted file mode 100644 index f11c967732..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/nginx/tests/vhost_ssl.pp +++ /dev/null @@ -1,17 +0,0 @@ -include nginx - -nginx::resource::vhost { 'test2.local test2': - ensure => present, - www_root => '/var/www/nginx-default', - ssl => true, - ssl_cert => 'puppet:///modules/sslkey/whildcard_mydomain.crt', - ssl_key => 'puppet:///modules/sslkey/whildcard_mydomain.key' -} - -nginx::resource::location { 'test2.local-bob': - ensure => present, - www_root => '/var/www/bob', - location => '/bob', - vhost => 'test2.local test2', -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/.fixtures.yml deleted file mode 100644 index a4b980143e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/.fixtures.yml +++ /dev/null @@ -1,5 +0,0 @@ -fixtures: - repositories: - "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" - symlinks: - "ntp": "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/.nodeset.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/.nodeset.yml deleted file mode 100644 index cbd0d57b83..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/.nodeset.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -default_set: 'centos-64-x64' -sets: - 'centos-59-x64': - nodes: - "main.foo.vm": - prefab: 'centos-59-x64' - 'centos-64-x64': - nodes: - "main.foo.vm": - prefab: 'centos-64-x64' - 'fedora-18-x64': - nodes: - "main.foo.vm": - prefab: 'fedora-18-x64' - 'debian-607-x64': - nodes: - "main.foo.vm": - prefab: 'debian-607-x64' - 'debian-70rc1-x64': - nodes: - "main.foo.vm": - prefab: 'debian-70rc1-x64' - 'ubuntu-server-10044-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-10044-x64' - 'ubuntu-server-12042-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-12042-x64' - 'sles-11sp1-x64': - nodes: - "main.foo.vm": - prefab: 'sles-11sp1-x64' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/.travis.yml deleted file mode 100644 index fe5850a5d9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -branches: - only: - - master -language: ruby -bundler_args: --without development -script: "bundle exec rake spec SPEC_OPTS='--format documentation'" -rvm: -- 1.8.7 -- 1.9.3 -- 2.0.0 -env: - matrix: - - PUPPET_GEM_VERSION="~> 2.7.0" - - PUPPET_GEM_VERSION="~> 3.0.0" - - PUPPET_GEM_VERSION="~> 3.1.0" - - PUPPET_GEM_VERSION="~> 3.2.0" -matrix: - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 3.0.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 3.1.0" - - rvm: 1.8.7 - env: PUPPET_GEM_VERSION="~> 3.2.0" -notifications: - email: false diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/CHANGELOG.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/CHANGELOG.md deleted file mode 100644 index cfcac4292e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/CHANGELOG.md +++ /dev/null @@ -1,152 +0,0 @@ -##2014-04-09 - Supported Release 3.0.4 -###Summary -This is a supported release. - -The only functional change in this release is to split up the restrict -defaults to be per operating system so that we can provide safer defaults -for AIX, to resolve cases where IPv6 are disabled. - -####Features -- Rework restrict defaults. - -####Bugfixes -- Fix up a comment. -- Fix a test to work better on PE. - -#####Known Bugs -* No known bugs - -##2014-03-04 - Supported Release 3.0.3 -###Summary -This is a supported release. Correct stdlib compatibility - -####Bugfixes -- Remove `dirname()` call for correct stdlib compatibility. -- Improved tests - -####Known Bugs -* No known bugs - - -## 2014-02-13 - Release 3.0.2 -###Summary - -No functional changes: Update the README and allow custom gem sources. - -## 2013-12-17 - Release 3.0.1 -### Summary - -Work around a packaging bug with symlinks, no other functional changes. - -## 2013-12-13 - Release 3.0.0 -### Summary - -Final release of 3.0, enjoy! - - -## 2013-10-14 - Version 3.0.0-rc1 - -###Summary - -This release changes the behavior of restrict and adds AIX osfamily support. - -####Backwards-incompatible Changes: - -`restrict` no longer requires you to pass in parameters as: - -restrict => [ 'restrict x', 'restrict y' ] - -but just as: - -restrict => [ 'x', 'y' ] - -As the template now prefixes each line with restrict. - -####Features -- Change the behavior of `restrict` so you no longer need the restrict -keyword. -- Add `udlc` parameter to enable undisciplined local clock regardless of the -machines status as a virtual machine. -- Add AIX support. - -####Fixes -- Use class{} instead of including and then anchoring. (style) -- Extend Gentoo coverage to Facter 1.7. - ---- -##2013-09-05 - Version 2.0.1 - -###Summary - -Correct the LICENSE file. - -####Bugfixes -- Add in the appropriate year and name in LICENSE. - - -##2013-07-31 - Version 2.0.0 - -###Summary - -The 2.0 release focuses on merging all the distro specific -templates into a single reusable template across all platforms. - -To aid in that goal we now allow you to change the driftfile, -ntp keys, and perferred_servers. - -####Backwards-incompatible changes - -As all the distro specific templates have been removed and a -unified one created you may be missing functionality you -previously relied on. Please test carefully before rolling -out globally. - -Configuration directives that might possibly be affected: -- `filegen` -- `fudge` (for virtual machines) -- `keys` -- `logfile` -- `restrict` -- `restrictkey` -- `statistics` -- `trustedkey` - -####Features: -- All templates merged into a single template. -- NTP Keys support added. -- Add preferred servers support. -- Parameters in `ntp` class: - - `driftfile`: path for the ntp driftfile. - - `keys_enable`: Enable NTP keys feature. - - `keys_file`: Path for the NTP keys file. - - `keys_trusted`: Which keys to trust. - - `keys_controlkey`: Which key to use for the control key. - - `keys_requestkey`: Which key to use for the request key. - - `preferred_servers`: Array of servers to prefer. - - `restrict`: Array of restriction options to apply. - ---- -###2013-07-15 - Version 1.0.1 -####Bugfixes -- Fix deprecated warning in `autoupdate` parameter. -- Correctly quote is_virtual fact. - - -##2013-07-08 - Version 1.0.0 -####Features -- Completely refactored to split across several classes. -- rspec-puppet tests rewritten to cover more options. -- rspec-system tests added. -- ArchLinux handled via osfamily instead of special casing. -- parameters in `ntp` class: - - `autoupdate`: deprecated in favor of directly setting package_ensure. - - `panic`: set to false if you wish to allow large clock skews. - ---- -##2011-11-10 Dan Bode - 0.0.4 -* Add Amazon Linux as a supported platform -* Add unit tests - - -##2011-06-16 Jeff McCune - 0.0.3 -* Initial release under puppetlabs diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/CONTRIBUTING.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/CONTRIBUTING.md deleted file mode 100644 index a2b1d77bc8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/CONTRIBUTING.md +++ /dev/null @@ -1,9 +0,0 @@ -Puppet Labs modules on the Puppet Forge are open projects, and community contributions -are essential for keeping them great. We can’t access the huge number of platforms and -myriad of hardware, software, and deployment configurations that Puppet is intended to serve. - -We want to keep it as easy as possible to contribute changes so that our modules work -in your environment. There are a few guidelines that we need contributors to follow so -that we can have a chance of keeping on top of things. - -You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/Gemfile deleted file mode 100644 index 7f86b2d6bd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/Gemfile +++ /dev/null @@ -1,19 +0,0 @@ -source ENV['GEM_SOURCE'] || "https://rubygems.org" - -group :development, :test do - gem 'rake', :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'puppet-lint', :require => false - gem 'serverspec', :require => false - gem 'beaker', :require => false - gem 'beaker-rspec', :require => false - gem 'specinfra', '>=0.7.0' -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end - -# vim:ft=ruby diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/LICENSE deleted file mode 100644 index bc1c718de5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [2013] [Puppet Labs] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/Modulefile deleted file mode 100644 index fc436324af..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/Modulefile +++ /dev/null @@ -1,11 +0,0 @@ -name 'puppetlabs-ntp' -version '3.0.4' -source 'git://github.com/puppetlabs/puppetlabs-ntp' -author 'Puppet Labs' -license 'Apache Version 2.0' -summary 'NTP Module' -description 'NTP Module for Debian, Ubuntu, CentOS, RHEL, OEL, Fedora, FreeBSD, ArchLinux and Gentoo.' -project_page 'http://github.com/puppetlabs/puppetlabs-ntp' - -## Add dependencies, if any: -dependency 'puppetlabs/stdlib', '>= 0.1.6' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/README.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/README.markdown deleted file mode 100644 index e25e3c43ba..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/README.markdown +++ /dev/null @@ -1,227 +0,0 @@ -#ntp - -####Table of Contents - -1. [Overview](#overview) -2. [Module Description - What the module does and why it is useful](#module-description) -3. [Setup - The basics of getting started with ntp](#setup) - * [What ntp affects](#what-ntp-affects) - * [Setup requirements](#setup-requirements) - * [Beginning with ntp](#beginning-with-ntp) -4. [Usage - Configuration options and additional functionality](#usage) -5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) -5. [Limitations - OS compatibility, etc.](#limitations) -6. [Development - Guide for contributing to the module](#development) - -##Overview - -The ntp module installs, configures, and manages the NTP service. - -##Module Description - -The ntp module handles installing, configuring, and running NTP across a range of operating systems and distributions. - -##Setup - -###What ntp affects - -* ntp package. -* ntp configuration file. -* ntp service. - -###Beginning with ntp - -`include '::ntp'` is enough to get you up and running. If you wish to pass in -parameters specifying which servers to use, then: - -```puppet -class { '::ntp': - servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ], -} -``` - -##Usage - -All interaction with the ntp module can do be done through the main ntp class. -This means you can simply toggle the options in `::ntp` to have full functionality of the module. - -###I just want NTP, what's the minimum I need? - -```puppet -include '::ntp' -``` - -###I just want to tweak the servers, nothing else. - -```puppet -class { '::ntp': - servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ], -} -``` - -###I'd like to make sure I restrict who can connect as well. - -```puppet -class { '::ntp': - servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ], - restrict => ['127.0.0.1'], -} -``` - -###I'd like to opt out of having the service controlled; we use another tool for that. - -```puppet -class { '::ntp': - servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ], - restrict => ['127.0.0.1'], - manage_service => false, -} -``` - -###Looks great! But I'd like a different template; we need to do something unique here. - -```puppet -class { '::ntp': - servers => [ 'ntp1.corp.com', 'ntp2.corp.com' ], - restrict => ['127.0.0.1'], - manage_service => false, - config_template => 'different/module/custom.template.erb', -} -``` - -##Reference - -###Classes - -####Public Classes - -* ntp: Main class, includes all other classes. - -####Private Classes - -* ntp::install: Handles the packages. -* ntp::config: Handles the configuration file. -* ntp::service: Handles the service. - -###Parameters - -The following parameters are available in the ntp module: - -####`autoupdate` - -**Deprecated:** This parameter determined whether the ntp module should be -automatically updated to the latest version available. Replaced by `package_ensure`. - -####`config` - -Sets the file that ntp configuration is written into. - -####`config_template` - -Determines which template Puppet should use for the ntp configuration. - -####`driftfile` - -Sets the location of the drift file for ntp. - -####`keys_controlkey` - -The key to use as the control key. - -####`keys_enable` - -Whether the ntp keys functionality is enabled. - -####`keys_file` - -Location of the keys file. - -####`keys_requestkey` - -Which of the keys is the request key. - -#### `keys_trusted` - -Array of trusted keys. - -####`package_ensure` - -Sets the ntp package to be installed. Can be set to 'present', 'latest', or a specific version. - -####`package_name` - -Determines the name of the package to install. - -####`panic` - -Determines if ntp should 'panic' in the event of a very large clock skew. -This defaults to false for virtual machines, as they don't do a great job with keeping time. - -####`preferred_servers` - -List of ntp servers to prefer. Will append 'prefer' for any server in this list -that also appears in the servers list. - -####`restrict` - -Sets the restrict options in the ntp configuration. The lines are -prefixed with 'restrict', so you just need to list the rest of the restriction. - -####`servers` - -Selects the servers to use for ntp peers. - -####`service_enable` - -Determines if the service should be enabled at boot. - -####`service_ensure` - -Determines if the service should be running or not. - -####`service_manage` - -Selects whether Puppet should manage the service. - -####`service_name` - -Selects the name of the ntp service for Puppet to manage. - -####`udlc` - -Enables configs for undisciplined local clock, regardless of -status as a virtual machine. - - -##Limitations - -This module has been built on and tested against Puppet 2.7 and higher. - -The module has been tested on: - -* RedHat Enterprise Linux 5/6 -* Debian 6/7 -* CentOS 5/6 -* Ubuntu 12.04 -* Gentoo -* Arch Linux -* FreeBSD - -Testing on other platforms has been light and cannot be guaranteed. - -##Development - -Puppet Labs modules on the Puppet Forge are open projects, and community -contributions are essential for keeping them great. We can’t access the -huge number of platforms and myriad of hardware, software, and deployment -configurations that Puppet is intended to serve. - -We want to keep it as easy as possible to contribute changes so that our -modules work in your environment. There are a few guidelines that we need -contributors to follow so that we can have a chance of keeping on top of things. - -You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) - -###Contributors - -The list of contributors can be found at: [https://github.com/puppetlabs/puppetlabs-ntp/graphs/contributors](https://github.com/puppetlabs/puppetlabs-ntp/graphs/contributors) diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/Rakefile deleted file mode 100644 index cd3d379958..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/Rakefile +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/config.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/config.pp deleted file mode 100644 index fbb01fe8ea..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/config.pp +++ /dev/null @@ -1,24 +0,0 @@ -# -class ntp::config inherits ntp { - - if $keys_enable { - # Workaround for the lack of dirname() in stdlib 3.2. - $directory = inline_template('<%= File.dirname(keys_file) %>') - file { $directory: - ensure => directory, - owner => 0, - group => 0, - mode => '0755', - recurse => true, - } - } - - file { $config: - ensure => file, - owner => 0, - group => 0, - mode => '0644', - content => template($config_template), - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/init.pp deleted file mode 100644 index 74c9d7c4f9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/init.pp +++ /dev/null @@ -1,56 +0,0 @@ -class ntp ( - $autoupdate = $ntp::params::autoupdate, - $config = $ntp::params::config, - $config_template = $ntp::params::config_template, - $driftfile = $ntp::params::driftfile, - $keys_enable = $ntp::params::keys_enable, - $keys_file = $ntp::params::keys_file, - $keys_controlkey = $ntp::params::keys_controlkey, - $keys_requestkey = $ntp::params::keys_requestkey, - $keys_trusted = $ntp::params::keys_trusted, - $package_ensure = $ntp::params::package_ensure, - $package_name = $ntp::params::package_name, - $panic = $ntp::params::panic, - $preferred_servers = $ntp::params::preferred_servers, - $restrict = $ntp::params::restrict, - $servers = $ntp::params::servers, - $service_enable = $ntp::params::service_enable, - $service_ensure = $ntp::params::service_ensure, - $service_manage = $ntp::params::service_manage, - $service_name = $ntp::params::service_name, - $udlc = $ntp::params::udlc -) inherits ntp::params { - - validate_absolute_path($config) - validate_string($config_template) - validate_absolute_path($driftfile) - validate_bool($keys_enable) - validate_re($keys_controlkey, ['^\d+$', '']) - validate_re($keys_requestkey, ['^\d+$', '']) - validate_array($keys_trusted) - validate_string($package_ensure) - validate_array($package_name) - validate_bool($panic) - validate_array($preferred_servers) - validate_array($restrict) - validate_array($servers) - validate_bool($service_enable) - validate_string($service_ensure) - validate_bool($service_manage) - validate_string($service_name) - validate_bool($udlc) - - if $autoupdate { - notice('autoupdate parameter has been deprecated and replaced with package_ensure. Set this to latest for the same behavior as autoupdate => true.') - } - - # Anchor this as per #8040 - this ensures that classes won't float off and - # mess everything up. You can read about this at: - # http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html#known-issues - anchor { 'ntp::begin': } -> - class { '::ntp::install': } -> - class { '::ntp::config': } ~> - class { '::ntp::service': } -> - anchor { 'ntp::end': } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/install.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/install.pp deleted file mode 100644 index 098949c398..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/install.pp +++ /dev/null @@ -1,9 +0,0 @@ -# -class ntp::install inherits ntp { - - package { 'ntp': - ensure => $package_ensure, - name => $package_name, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/params.pp deleted file mode 100644 index b8ae5032ca..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/params.pp +++ /dev/null @@ -1,185 +0,0 @@ -class ntp::params { - - $autoupdate = false - $config_template = 'ntp/ntp.conf.erb' - $keys_enable = false - $keys_controlkey = '' - $keys_requestkey = '' - $keys_trusted = [] - $package_ensure = 'present' - $preferred_servers = [] - $service_enable = true - $service_ensure = 'running' - $service_manage = true - $udlc = false - - # On virtual machines allow large clock skews. - $panic = str2bool($::is_virtual) ? { - true => false, - default => true, - } - - case $::osfamily { - 'AIX': { - $config = '/etc/ntp.conf' - $keysfile = '/etc/ntp.keys' - $driftfile = '/etc/ntp.drift' - $package_name = [ 'bos.net.tcp.client' ] - $restrict = [ - 'default nomodify notrap nopeer noquery', - '127.0.0.1', - ] - $service_name = 'xntpd' - $servers = [ - '0.debian.pool.ntp.org iburst', - '1.debian.pool.ntp.org iburst', - '2.debian.pool.ntp.org iburst', - '3.debian.pool.ntp.org iburst', - ] - } - 'Debian': { - $config = '/etc/ntp.conf' - $keys_file = '/etc/ntp/keys' - $driftfile = '/var/lib/ntp/drift' - $package_name = [ 'ntp' ] - $restrict = [ - 'default kod nomodify notrap nopeer noquery', - '-6 default kod nomodify notrap nopeer noquery', - '127.0.0.1', - '-6 ::1', - ] - $service_name = 'ntp' - $servers = [ - '0.debian.pool.ntp.org iburst', - '1.debian.pool.ntp.org iburst', - '2.debian.pool.ntp.org iburst', - '3.debian.pool.ntp.org iburst', - ] - } - 'RedHat': { - $config = '/etc/ntp.conf' - $driftfile = '/var/lib/ntp/drift' - $keys_file = '/etc/ntp/keys' - $package_name = [ 'ntp' ] - $restrict = [ - 'default kod nomodify notrap nopeer noquery', - '-6 default kod nomodify notrap nopeer noquery', - '127.0.0.1', - '-6 ::1', - ] - $service_name = 'ntpd' - $servers = [ - '0.centos.pool.ntp.org', - '1.centos.pool.ntp.org', - '2.centos.pool.ntp.org', - ] - } - 'SuSE': { - $config = '/etc/ntp.conf' - $driftfile = '/var/lib/ntp/drift/ntp.drift' - $keys_file = '/etc/ntp/keys' - $package_name = [ 'ntp' ] - $restrict = [ - 'default kod nomodify notrap nopeer noquery', - '-6 default kod nomodify notrap nopeer noquery', - '127.0.0.1', - '-6 ::1', - ] - $service_name = 'ntp' - $servers = [ - '0.opensuse.pool.ntp.org', - '1.opensuse.pool.ntp.org', - '2.opensuse.pool.ntp.org', - '3.opensuse.pool.ntp.org', - ] - } - 'FreeBSD': { - $config = '/etc/ntp.conf' - $driftfile = '/var/db/ntpd.drift' - $keys_file = '/etc/ntp/keys' - $package_name = ['net/ntp'] - $restrict = [ - 'default kod nomodify notrap nopeer noquery', - '-6 default kod nomodify notrap nopeer noquery', - '127.0.0.1', - '-6 ::1', - ] - $service_name = 'ntpd' - $servers = [ - '0.freebsd.pool.ntp.org iburst maxpoll 9', - '1.freebsd.pool.ntp.org iburst maxpoll 9', - '2.freebsd.pool.ntp.org iburst maxpoll 9', - '3.freebsd.pool.ntp.org iburst maxpoll 9', - ] - } - 'Archlinux': { - $config = '/etc/ntp.conf' - $driftfile = '/var/lib/ntp/drift' - $keys_file = '/etc/ntp/keys' - $package_name = [ 'ntp' ] - $restrict = [ - 'default kod nomodify notrap nopeer noquery', - '-6 default kod nomodify notrap nopeer noquery', - '127.0.0.1', - '-6 ::1', - ] - $service_name = 'ntpd' - $servers = [ - '0.pool.ntp.org', - '1.pool.ntp.org', - '2.pool.ntp.org', - ] - } - # Gentoo was added as its own $::osfamily in Facter 1.7.0 - 'Gentoo': { - $config = '/etc/ntp.conf' - $driftfile = '/var/lib/ntp/drift' - $keys_file = '/etc/ntp/keys' - $package_name = ['net-misc/ntp'] - $restrict = [ - 'default kod nomodify notrap nopeer noquery', - '-6 default kod nomodify notrap nopeer noquery', - '127.0.0.1', - '-6 ::1', - ] - $service_name = 'ntpd' - $servers = [ - '0.gentoo.pool.ntp.org', - '1.gentoo.pool.ntp.org', - '2.gentoo.pool.ntp.org', - '3.gentoo.pool.ntp.org', - ] - } - 'Linux': { - # Account for distributions that don't have $::osfamily specific settings. - # Before Facter 1.7.0 Gentoo did not have its own $::osfamily - case $::operatingsystem { - 'Gentoo': { - $config = '/etc/ntp.conf' - $driftfile = '/var/lib/ntp/drift' - $keys_file = '/etc/ntp/keys' - $package_name = ['net-misc/ntp'] - $restrict = [ - 'default kod nomodify notrap nopeer noquery', - '-6 default kod nomodify notrap nopeer noquery', - '127.0.0.1', - '-6 ::1', - ] - $service_name = 'ntpd' - $servers = [ - '0.gentoo.pool.ntp.org', - '1.gentoo.pool.ntp.org', - '2.gentoo.pool.ntp.org', - '3.gentoo.pool.ntp.org', - ] - } - default: { - fail("The ${module_name} module is not supported on an ${::operatingsystem} distribution.") - } - } - } - default: { - fail("The ${module_name} module is not supported on an ${::osfamily} based system.") - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/service.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/service.pp deleted file mode 100644 index 3f1ada0b72..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/manifests/service.pp +++ /dev/null @@ -1,18 +0,0 @@ -# -class ntp::service inherits ntp { - - if ! ($service_ensure in [ 'running', 'stopped' ]) { - fail('service_ensure parameter must be running or stopped') - } - - if $service_manage == true { - service { 'ntp': - ensure => $service_ensure, - enable => $service_enable, - name => $service_name, - hasstatus => true, - hasrestart => true, - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/metadata.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/metadata.json deleted file mode 100644 index 81b2675dbb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/metadata.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "operatingsystem_support": [ - { - "operatingsystem": "RedHat", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "CentOS", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "OracleLinux", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "Scientific", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "SLES", - "operatingsystemrelease": [ - "11 SP1" - ] - }, - { - "operatingsystem": "Debian", - "operatingsystemrelease": [ - "6", - "7" - ] - }, - { - "operatingsystem": "Ubuntu", - "operatingsystemrelease": [ - "10.04", - "12.04" - ] - }, - { - "operatingsystem": "AIX", - "operatingsystemrelease": [ - "5.3", - "6.1", - "7.1" - ] - } - ], - "requirements": [ - { - "name": "pe", - "version_requirement": "3.2.x" - }, - { - "name": "puppet", - "version_requirement": "3.x" - } - ], - "name": "puppetlabs-ntp", - "version": "3.0.4", - "source": "git://github.com/puppetlabs/puppetlabs-ntp", - "author": "Puppet Labs", - "license": "Apache Version 2.0", - "summary": "NTP Module", - "description": "NTP Module for Debian, Ubuntu, CentOS, RHEL, OEL, Fedora, FreeBSD, ArchLinux and Gentoo.", - "project_page": "http://github.com/puppetlabs/puppetlabs-ntp", - "dependencies": [ - { - "name": "puppetlabs/stdlib", - "version_requirement": ">= 0.1.6" - } - ] -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/class_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/class_spec.rb deleted file mode 100644 index e61f9db5bc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/class_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'ntp class:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - it 'should run successfully' do - pp = "class { 'ntp': }" - - # Apply twice to ensure no errors the second time. - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stderr).to eq("") - end - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stderr).to eq("") - expect(r.exit_code).to be_zero - end - end - - context 'service_ensure => stopped:' do - it 'runs successfully' do - pp = "class { 'ntp': service_ensure => stopped }" - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stderr).to eq("") - end - end - end - - context 'service_ensure => running:' do - it 'runs successfully' do - pp = "class { 'ntp': service_ensure => running }" - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stderr).to eq("") - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64-pe.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64-pe.yml deleted file mode 100644 index 7d9242f1b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64-pe.yml +++ /dev/null @@ -1,12 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - - database - - dashboard - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: pe diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64.yml deleted file mode 100644 index 05540ed8c5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-64-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-65-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-65-x64.yml deleted file mode 100644 index 4e2cb809e8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/centos-65-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-65-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-65-x64-vbox436-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/default.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/default.yml deleted file mode 100644 index 05540ed8c5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/fedora-18-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/fedora-18-x64.yml deleted file mode 100644 index 1361649830..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/fedora-18-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - fedora-18-x64: - roles: - - master - platform: fedora-18-x86_64 - box : fedora-18-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/sles-11-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/sles-11-x64.yml deleted file mode 100644 index 41abe2135e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/sles-11-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - sles-11-x64.local: - roles: - - master - platform: sles-11-x64 - box : sles-11sp1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml deleted file mode 100644 index 5ca1514e40..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-10044-x64: - roles: - - master - platform: ubuntu-10.04-amd64 - box : ubuntu-server-10044-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml deleted file mode 100644 index d065b304f8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_config_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_config_spec.rb deleted file mode 100644 index 196ba76584..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_config_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper_acceptance' - -case fact('osfamily') -when 'FreeBSD' - line = '0.freebsd.pool.ntp.org iburst maxpoll 9' -when 'Debian' - line = '0.debian.pool.ntp.org iburst' -when 'RedHat' - line = '0.centos.pool.ntp.org' -when 'SuSE' - line = '0.opensuse.pool.ntp.org' -when 'Gentoo' - line = '0.gentoo.pool.ntp.org' -when 'Linux' - case fact('operatingsystem') - when 'ArchLinux' - line = '0.pool.ntp.org' - when 'Gentoo' - line = '0.gentoo.pool.ntp.org' - end -when 'AIX' - line = '0.debian.pool.ntp.org iburst' -end - -describe 'ntp::config class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - it 'sets up ntp.conf' do - apply_manifest(%{ - class { 'ntp': } - }, :catch_failures => true) - end - - describe file('/etc/ntp.conf') do - it { should be_file } - it { should contain line } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_install_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_install_spec.rb deleted file mode 100644 index 1a451bbb23..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_install_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -require 'spec_helper_acceptance' - -case fact('osfamily') -when 'FreeBSD' - packagename = 'net/ntp' -when 'Gentoo' - packagename = 'net-misc/ntp' -when 'Linux' - case fact('operatingsystem') - when 'ArchLinux' - packagename = 'ntp' - when 'Gentoo' - packagename = 'net-misc/ntp' - end -when 'AIX' - packagename = 'bos.net.tcp.client' -else - packagename = 'ntp' -end - -describe 'ntp::install class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - it 'installs the package' do - apply_manifest(%{ - class { 'ntp': } - }, :catch_failures => true) - end - - describe package(packagename) do - it { should be_installed } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_parameters_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_parameters_spec.rb deleted file mode 100644 index 71a6b202aa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_parameters_spec.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'spec_helper_acceptance' - -case fact('osfamily') -when 'FreeBSD' - packagename = 'net/ntp' -when 'Gentoo' - packagename = 'net-misc/ntp' -when 'Linux' - case fact('operatingsystem') - when 'ArchLinux' - packagename = 'ntp' - when 'Gentoo' - packagename = 'net-misc/ntp' - end -when 'AIX' - packagename = 'bos.net.tcp.client' -else - packagename = 'ntp' -end - -describe "ntp class:", :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - it 'applies successfully' do - pp = "class { 'ntp': }" - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stderr).to eq("") - end - end - - describe 'autoconfig' do - it 'raises a deprecation warning' do - pp = "class { 'ntp': autoupdate => true }" - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/autoupdate parameter has been deprecated and replaced with package_ensure/) - end - end - end - - describe 'config' do - it 'sets the ntp.conf location' do - pp = "class { 'ntp': config => '/etc/antp.conf' }" - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/antp.conf') do - it { should be_file } - end - end - - describe 'config_template' do - it 'sets up template' do - modulepath = default['distmoduledir'] - shell("mkdir -p #{modulepath}/test/templates") - shell("echo 'testcontent' >> #{modulepath}/test/templates/ntp.conf") - end - - it 'sets the ntp.conf location' do - pp = "class { 'ntp': config_template => 'test/ntp.conf' }" - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/ntp.conf') do - it { should be_file } - it { should contain 'testcontent' } - end - end - - describe 'driftfile' do - it 'sets the driftfile location' do - pp = "class { 'ntp': driftfile => '/tmp/driftfile' }" - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/ntp.conf') do - it { should be_file } - it { should contain 'driftfile /tmp/driftfile' } - end - end - - describe 'keys' do - it 'enables the key parameters' do - pp = <<-EOS - class { 'ntp': - keys_enable => true, - keys_file => '/etc/ntp/keys', - keys_controlkey => '/etc/ntp/controlkey', - keys_requestkey => '1', - keys_trusted => [ '1', '2' ], - } - EOS - # Rely on a shell command instead of a file{} here to avoid loops - # within puppet when it tries to manage /etc/ntp/keys before /etc/ntp. - shell("mkdir -p /etc/ntp && echo '1 M AAAABBBB' >> /etc/ntp/keys") - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/ntp.conf') do - it { should be_file } - it { should contain 'keys /etc/ntp/keys' } - it { should contain 'controlkey /etc/ntp/controlkey' } - it { should contain 'requestkey 1' } - it { should contain 'trustedkey 1 2' } - end - end - - describe 'package' do - it 'installs the right package' do - pp = <<-EOS - class { 'ntp': - package_ensure => present, - package_name => ['#{packagename}'], - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe package(packagename) do - it { should be_installed } - end - end - - describe 'panic => false' do - it 'enables the tinker panic setting' do - pp = <<-EOS - class { 'ntp': - panic => false, - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/ntp.conf') do - it { should contain 'tinker panic' } - end - end - - describe 'panic => true' do - it 'disables the tinker panic setting' do - pp = <<-EOS - class { 'ntp': - panic => true, - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/ntp.conf') do - it { should_not contain 'tinker panic 0' } - end - end - - describe 'udlc' do - it 'adds a udlc' do - pp = "class { 'ntp': udlc => true }" - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/ntp.conf') do - it { should be_file } - it { should contain '127.127.1.0' } - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_service_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_service_spec.rb deleted file mode 100644 index cac12de5dc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/ntp_service_spec.rb +++ /dev/null @@ -1,63 +0,0 @@ -require 'spec_helper_acceptance' - -case fact('osfamily') -when 'RedHat', 'FreeBSD', 'Linux', 'Gentoo' - servicename = 'ntpd' -when 'AIX' - servicename = 'xntpd' -else - servicename = 'ntp' -end - -describe 'ntp::service class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - describe 'basic test' do - it 'sets up the service' do - apply_manifest(%{ - class { 'ntp': } - }, :catch_failures => true) - end - - describe service(servicename) do - it { should be_enabled } - it { should be_running } - end - end - - describe 'service parameters' do - it 'starts the service' do - pp = <<-EOS - class { 'ntp': - service_enable => true, - service_ensure => running, - service_manage => true, - service_name => '#{servicename}' - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(servicename) do - it { should be_running } - it { should be_enabled } - end - end - - describe 'service is unmanaged' do - it 'shouldnt stop the service' do - pp = <<-EOS - class { 'ntp': - service_enable => false, - service_ensure => stopped, - service_manage => false, - service_name => '#{servicename}' - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - describe service(servicename) do - it { should be_running } - it { should be_enabled } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/preferred_servers_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/preferred_servers_spec.rb deleted file mode 100644 index 7994acedbe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/preferred_servers_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'preferred servers', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - pp = <<-EOS - class { '::ntp': - servers => ['a', 'b', 'c', 'd'], - preferred_servers => ['c', 'd'], - } - EOS - - it 'applies cleanly' do - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stderr).to eq("") - end - end - - describe file('/etc/ntp.conf') do - it { should be_file } - it { should contain 'server a' } - it { should contain 'server b' } - it { should contain 'server c prefer' } - it { should contain 'server d prefer' } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/restrict_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/restrict_spec.rb deleted file mode 100644 index 753b1b3d01..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/restrict_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'spec_helper_acceptance' - -describe "ntp class with restrict:", :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'should run successfully' do - pp = "class { 'ntp': restrict => ['test restrict']}" - - it 'runs twice' do - 2.times do - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stderr).to be_empty - end - end - end - end - - describe file('/etc/ntp.conf') do - it { should contain('test restrict') } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/unsupported_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/unsupported_spec.rb deleted file mode 100644 index 5f4490dee6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/acceptance/unsupported_spec.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - it 'should fail' do - pp = <<-EOS - class { 'ntp': } - EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/is not supported on an/i) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/classes/ntp_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/classes/ntp_spec.rb deleted file mode 100644 index 5535d9b25e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/classes/ntp_spec.rb +++ /dev/null @@ -1,272 +0,0 @@ -require 'spec_helper' - -describe 'ntp' do - - ['Debian', 'RedHat','SuSE', 'FreeBSD', 'Archlinux', 'Gentoo', 'Gentoo (Facter < 1.7)'].each do |system| - if system == 'Gentoo (Facter < 1.7)' - let(:facts) {{ :osfamily => 'Linux', :operatingsystem => 'Gentoo' }} - else - let(:facts) {{ :osfamily => system }} - end - - it { should include_class('ntp::install') } - it { should include_class('ntp::config') } - it { should include_class('ntp::service') } - - describe "ntp::config on #{system}" do - it { should contain_file('/etc/ntp.conf').with_owner('0') } - it { should contain_file('/etc/ntp.conf').with_group('0') } - it { should contain_file('/etc/ntp.conf').with_mode('0644') } - - describe 'allows template to be overridden' do - let(:params) {{ :config_template => 'my_ntp/ntp.conf.erb' }} - it { should contain_file('/etc/ntp.conf').with({ - 'content' => /server foobar/}) - } - end - - describe "keys for osfamily #{system}" do - context "when enabled" do - let(:params) {{ - :keys_enable => true, - :keys_file => '/etc/ntp/ntp.keys', - :keys_trusted => ['1', '2', '3'], - :keys_controlkey => '2', - :keys_requestkey => '3', - }} - - it { should contain_file('/etc/ntp').with({ - 'ensure' => 'directory'}) - } - it { should contain_file('/etc/ntp.conf').with({ - 'content' => /trustedkey 1 2 3/}) - } - it { should contain_file('/etc/ntp.conf').with({ - 'content' => /controlkey 2/}) - } - it { should contain_file('/etc/ntp.conf').with({ - 'content' => /requestkey 3/}) - } - end - end - - context "when disabled" do - let(:params) {{ - :keys_enable => false, - :keys_file => '/etc/ntp/ntp.keys', - :keys_trusted => ['1', '2', '3'], - :keys_controlkey => '2', - :keys_requestkey => '3', - }} - - it { should_not contain_file('/etc/ntp').with({ - 'ensure' => 'directory'}) - } - it { should_not contain_file('/etc/ntp.conf').with({ - 'content' => /trustedkey 1 2 3/}) - } - it { should_not contain_file('/etc/ntp.conf').with({ - 'content' => /controlkey 2/}) - } - it { should_not contain_file('/etc/ntp.conf').with({ - 'content' => /requestkey 3/}) - } - end - - describe 'preferred servers' do - context "when set" do - let(:params) {{ - :servers => ['a', 'b', 'c', 'd'], - :preferred_servers => ['a', 'b'] - }} - - it { should contain_file('/etc/ntp.conf').with({ - 'content' => /server a prefer\nserver b prefer\nserver c\nserver d/}) - } - end - context "when not set" do - let(:params) {{ - :servers => ['a', 'b', 'c', 'd'], - :preferred_servers => [] - }} - - it { should_not contain_file('/etc/ntp.conf').with({ - 'content' => /server a prefer/}) - } - end - end - - describe "ntp::install on #{system}" do - let(:params) {{ :package_ensure => 'present', :package_name => ['ntp'], }} - - it { should contain_package('ntp').with( - :ensure => 'present', - :name => 'ntp' - )} - - describe 'should allow package ensure to be overridden' do - let(:params) {{ :package_ensure => 'latest', :package_name => ['ntp'] }} - it { should contain_package('ntp').with_ensure('latest') } - end - - describe 'should allow the package name to be overridden' do - let(:params) {{ :package_ensure => 'present', :package_name => ['hambaby'] }} - it { should contain_package('ntp').with_name('hambaby') } - end - end - - describe 'ntp::service' do - let(:params) {{ - :service_manage => true, - :service_enable => true, - :service_ensure => 'running', - :service_name => 'ntp' - }} - - describe 'with defaults' do - it { should contain_service('ntp').with( - :enable => true, - :ensure => 'running', - :name => 'ntp' - )} - end - - describe 'service_ensure' do - describe 'when overridden' do - let(:params) {{ :service_name => 'ntp', :service_ensure => 'stopped' }} - it { should contain_service('ntp').with_ensure('stopped') } - end - end - - describe 'service_manage' do - let(:params) {{ - :service_manage => false, - :service_enable => true, - :service_ensure => 'running', - :service_name => 'ntpd', - }} - - it 'when set to false' do - should_not contain_service('ntp').with({ - 'enable' => true, - 'ensure' => 'running', - 'name' => 'ntpd' - }) - end - end - end - end - - context 'ntp::config' do - describe "for operating system Gentoo (Facter < 1.7)" do - let(:facts) {{ :operatingsystem => 'Gentoo', - :osfamily => 'Linux' }} - - it 'uses the NTP pool servers by default' do - should contain_file('/etc/ntp.conf').with({ - 'content' => /server \d.gentoo.pool.ntp.org/, - }) - end - end - - describe "on osfamily Gentoo" do - let(:facts) {{ :osfamily => 'Gentoo' }} - - it 'uses the NTP pool servers by default' do - should contain_file('/etc/ntp.conf').with({ - 'content' => /server \d.gentoo.pool.ntp.org/, - }) - end - end - - describe "on osfamily Debian" do - let(:facts) {{ :osfamily => 'debian' }} - - it 'uses the debian ntp servers by default' do - should contain_file('/etc/ntp.conf').with({ - 'content' => /server \d.debian.pool.ntp.org iburst/, - }) - end - end - - describe "on osfamily RedHat" do - let(:facts) {{ :osfamily => 'RedHat' }} - - it 'uses the redhat ntp servers by default' do - should contain_file('/etc/ntp.conf').with({ - 'content' => /server \d.centos.pool.ntp.org/, - }) - end - end - - describe "on osfamily SuSE" do - let(:facts) {{ :osfamily => 'SuSE' }} - - it 'uses the opensuse ntp servers by default' do - should contain_file('/etc/ntp.conf').with({ - 'content' => /server \d.opensuse.pool.ntp.org/, - }) - end - end - - describe "on osfamily FreeBSD" do - let(:facts) {{ :osfamily => 'FreeBSD' }} - - it 'uses the freebsd ntp servers by default' do - should contain_file('/etc/ntp.conf').with({ - 'content' => /server \d.freebsd.pool.ntp.org iburst maxpoll 9/, - }) - end - end - - describe "on osfamily ArchLinux" do - let(:facts) {{ :osfamily => 'ArchLinux' }} - - it 'uses the NTP pool servers by default' do - should contain_file('/etc/ntp.conf').with({ - 'content' => /server \d.pool.ntp.org/, - }) - end - end - - describe "for operating system family unsupported" do - let(:facts) {{ - :osfamily => 'unsupported', - }} - - it { expect{ subject }.to raise_error( - /^The ntp module is not supported on an unsupported based system./ - )} - end - end - - describe 'for virtual machines' do - let(:facts) {{ :osfamily => 'Archlinux', - :is_virtual => 'true' }} - - it 'should not use local clock as a time source' do - should_not contain_file('/etc/ntp.conf').with({ - 'content' => /server.*127.127.1.0.*fudge.*127.127.1.0 stratum 10/, - }) - end - - it 'allows large clock skews' do - should contain_file('/etc/ntp.conf').with({ - 'content' => /tinker panic 0/, - }) - end - end - - describe 'for physical machines' do - let(:facts) {{ :osfamily => 'Archlinux', - :is_virtual => 'false' }} - - it 'disallows large clock skews' do - should_not contain_file('/etc/ntp.conf').with({ - 'content' => /tinker panic 0/, - }) - end - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/fixtures/modules/my_ntp/templates/ntp.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/fixtures/modules/my_ntp/templates/ntp.conf.erb deleted file mode 100644 index 40cf67c6d0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/fixtures/modules/my_ntp/templates/ntp.conf.erb +++ /dev/null @@ -1,4 +0,0 @@ -#my uber ntp config -# - -server foobar diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/spec.opts b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/spec.opts deleted file mode 100644 index 91cd6427ed..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/spec.opts +++ /dev/null @@ -1,6 +0,0 @@ ---format -s ---colour ---loadby -mtime ---backtrace diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/spec_helper.rb deleted file mode 100644 index 2c6f56649a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/spec_helper_acceptance.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/spec_helper_acceptance.rb deleted file mode 100644 index 3d99cc368d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/spec_helper_acceptance.rb +++ /dev/null @@ -1,34 +0,0 @@ -require 'beaker-rspec' - -UNSUPPORTED_PLATFORMS = [ 'windows', 'Solaris' ] - -unless ENV['RS_PROVISION'] == 'no' - hosts.each do |host| - # Install Puppet - if host.is_pe? - install_pe - else - install_package host, 'rubygems' - on host, 'gem install puppet --no-ri --no-rdoc' - on host, "mkdir -p #{host['distmoduledir']}" - end - end -end - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Readable test descriptions - c.formatter = :documentation - - # Configure all nodes in nodeset - c.before :suite do - # Install module and dependencies - puppet_module_install(:source => proj_root, :module_name => 'ntp') - hosts.each do |host| - shell("/bin/touch #{default['puppetpath']}/hiera.yaml") - shell('puppet module install puppetlabs-stdlib', :acceptable_exit_codes => [0,1]) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/unit/puppet/provider/README.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/unit/puppet/provider/README.markdown deleted file mode 100644 index 7025850210..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/unit/puppet/provider/README.markdown +++ /dev/null @@ -1,4 +0,0 @@ -Provider Specs -============== - -Define specs for your providers under this directory. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/unit/puppet/type/README.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/unit/puppet/type/README.markdown deleted file mode 100644 index 1ee19ac840..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/spec/unit/puppet/type/README.markdown +++ /dev/null @@ -1,4 +0,0 @@ -Resource Type Specs -=================== - -Define specs for your resource types in this directory. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/templates/ntp.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/templates/ntp.conf.erb deleted file mode 100644 index d24126c221..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/templates/ntp.conf.erb +++ /dev/null @@ -1,43 +0,0 @@ -# ntp.conf: Managed by puppet. -# -<% if @panic == false -%> -# Keep ntpd from panicking in the event of a large clock skew -# when a VM guest is suspended and resumed. -tinker panic 0 -<% end -%> - -<% if @restrict != [] -%> -# Permit time synchronization with our time source, but do not -# permit the source to query or modify the service on this system. -<% @restrict.flatten.each do |restrict| -%> -restrict <%= restrict %> -<% end %> -<% end -%> - -<% [@servers].flatten.each do |server| -%> -server <%= server %><% if @preferred_servers.include?(server) -%> prefer<% end %> -<% end -%> - -<% if scope.lookupvar('::is_virtual') == "false" or @udlc -%> -# Undisciplined Local Clock. This is a fake driver intended for backup -# and when no outside source of synchronized time is available. -server 127.127.1.0 -fudge 127.127.1.0 stratum 10 -restrict 127.127.1.0 -<% end -%> - -# Driftfile. -driftfile <%= @driftfile %> - -<% if @keys_enable -%> -keys <%= @keys_file %> -<% unless @keys_trusted.empty? -%> -trustedkey <%= @keys_trusted.join(' ') %> -<% end -%> -<% if @keys_requestkey != '' -%> -requestkey <%= @keys_requestkey %> -<% end -%> -<% if @keys_controlkey != '' -%> -controlkey <%= @keys_controlkey %> -<% end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/tests/init.pp deleted file mode 100644 index e6d9b537fb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/ntp/tests/init.pp +++ /dev/null @@ -1,11 +0,0 @@ -node default { - - notify { 'enduser-before': } - notify { 'enduser-after': } - - class { 'ntp': - require => Notify['enduser-before'], - before => Notify['enduser-after'], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.fixtures.yml deleted file mode 100644 index ca9960712c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.fixtures.yml +++ /dev/null @@ -1,10 +0,0 @@ -fixtures: - repositories: - "puppi": "git://github.com/example42/puppi.git" - "monitor": "git://github.com/example42/puppet-monitor.git" - "firewall": "git://github.com/example42/puppet-firewall.git" - "iptables": "git://github.com/example42/puppet-iptables.git" - "concat": "git://github.com/example42/puppet-concat.git" - symlinks: - "php": "#{source_dir}" - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.gemfile deleted file mode 100644 index 459723a8e5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.gemfile +++ /dev/null @@ -1,6 +0,0 @@ -source :rubygems - -puppetversion = ENV['PUPPET_VERSION'] -gem 'puppet', puppetversion, :require => false -gem 'puppet-lint' -gem 'puppetlabs_spec_helper', '>= 0.1.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.project b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.project deleted file mode 100644 index 12b382826a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - php - - - - - - com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - - com.puppetlabs.geppetto.pp.dsl.ui.puppetNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.travis.yml deleted file mode 100644 index dffeca9874..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: ruby -rvm: - - 1.8.7 - - 1.9.3 -script: - - "rake spec SPEC_OPTS='--format documentation'" -env: - - PUPPET_VERSION="~> 2.6.0" - - PUPPET_VERSION="~> 2.7.0" - - PUPPET_VERSION="~> 3.0.0" - - PUPPET_VERSION="~> 3.1.0" -matrix: - exclude: - - rvm: 1.9.3 - env: PUPPET_VERSION="~> 2.6.0" - gemfile: .gemfile - -gemfile: .gemfile -notifications: - email: - - al@lab42.it diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/LICENSE deleted file mode 100644 index f41da01857..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/LICENSE +++ /dev/null @@ -1,17 +0,0 @@ -Copyright (C) 2013 Alessandro Franceschi / Lab42 - -for the relevant commits Copyright (C) by the respective authors. - -Contact Lab42 at: info@lab42.it - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/Modulefile deleted file mode 100644 index 55ae20813f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/Modulefile +++ /dev/null @@ -1,9 +0,0 @@ -name 'example42-php' -version '2.0.17' -author 'Alessandro Franceschi' -license 'Apache2' -project_page 'http://www.example42.com' -source 'https://github.com/example42/puppet-php' -summary 'Puppet module for php' -description 'This module installs and manages php. Check README.rdoc for details. Puppi is required for some common functions: you can install them without using the whole module. Monitor and firewall dependencies are needed only if the relevant features are enabled' -dependency 'example42/puppi', '>= 2.0.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/README.md deleted file mode 100644 index a211dcbc2d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/README.md +++ /dev/null @@ -1,157 +0,0 @@ -# Puppet module: php - -This is a Puppet module for php based on the second generation layout ("NextGen") of Example42 Puppet Modules. - -Made by ALessandro Franceschi / Lab42 - -Official site: http://www.example42.com - -Official git repository: http://github.com/example42/puppet-php - -Released under the terms of Apache 2 License. - -This module requires functions provided by the Example42 Puppi module (you need it even if you don't use and install Puppi) - -For detailed info about the logic and usage patterns of Example42 modules check the DOCS directory on Example42 main modules set. - -## USAGE - Basic management - -* Install php with default settings - - class { 'php': } - -* Install a specific version of php package - - class { 'php': - version => '1.0.1', - } - -* Remove php package - - class { 'php': - absent => true - } - -* Enable auditing without without making changes on existing php configuration files - - class { 'php': - audit_only => true - } - -* Install php in an nginx environment - - class { 'php': - service => 'nginx' - } - -## USAGE - Module installation - -* Install a new module - - php::module { "imagick": } - -* Install a specific version of a module: - - php::module { "imagick": - version => '1.0.1'; - } - -* Remove php module - - php::module { "imagick": - absent => true, - } - -* By default module package name is php-$title for RedHat and php5-$title . You can override this prefix. - - php::module { "apc": - module_prefix => "php-" - } - - -## USAGE - Pear Management - -* Install a pear package - - php::pear::module { "XML_Util": } - -* Install a pear package from a remote repository - - php::pear::module { 'PHPUnit': - repository => 'pear.phpunit.de', - use_package => 'no', - } - -* Install a pear package will all dependencies (--alldeps) - - php::pear::module { 'PHPUnit': - repository => 'pear.phpunit.de', - alldeps => 'true', - } - -* Set a config option - - php::pear::config { http_proxy: value => "myproxy:8080" } - - -## USAGE - Pecl Management - -* Install a pecl package - - php::pecl::module { "XML_Util": } - -* Install a pecl package from source specifying the preferred state (note that you must have the package 'make' installed on your system) - - php::pecl::module { "xhprof": - use_package => 'false', - preferred_state => 'beta', - } - -* Set a config option - - php::pecl::config { http_proxy: value => "myproxy:8080" } - - -## USAGE - Overrides and Customizations -* Use custom sources for main config file. - - class { 'php': - source => [ "puppet:///modules/lab42/php/php.conf-${hostname}" , "puppet:///modules/lab42/php/php.conf" ], - } - -* Manage php.ini files on Debian and Suse derivatives. Here the main config file path (managed with the source/template params) defaults to /etc/php5/apache2/php.ini. To manage other files, either set a different path in config_file or use the php::conf define. - - class { 'php': - config_file => '/etc/php5/apache2/php.ini', # Default value on Ubuntu/Suse - template => 'example42/php/php.ini-apache2.erb', - } - - php::conf { 'php.ini-cli': - path => '/etc/php5/cli/php.ini', - template => 'example42/php/php.ini-cli.erb', - } - -* Use custom source directory for the whole configuration dir - - class { 'php': - source_dir => 'puppet:///modules/lab42/php/conf/', - source_dir_purge => false, # Set to true to purge any existing file not present in $source_dir - } - -* Use custom template for main config file. Note that template and source arguments are alternative. - - class { 'php': - template => 'example42/php/php.conf.erb', - } - -* Automatically include a custom subclass - - class { 'php': - my_class => 'php::example42', - } - - - - - -[![Build Status](https://travis-ci.org/example42/puppet-php.png?branch=master)](https://travis-ci.org/example42/puppet-php) diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/Rakefile deleted file mode 100644 index 1a8a8a0c30..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/Rakefile +++ /dev/null @@ -1,5 +0,0 @@ -require 'rubygems' -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint' -PuppetLint.configuration.send("disable_80chars") -PuppetLint.configuration.send('disable_class_parameter_defaults') diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/lib/facter/php_fact_extension_dir.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/lib/facter/php_fact_extension_dir.rb deleted file mode 100644 index 7138a3277e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/lib/facter/php_fact_extension_dir.rb +++ /dev/null @@ -1,5 +0,0 @@ -Facter.add("php_fact_extension_dir") do - setcode do - Facter::Util::Resolution.exec('php-config --extension-dir') || nil - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/lib/facter/php_fact_version.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/lib/facter/php_fact_version.rb deleted file mode 100644 index c164c345f7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/lib/facter/php_fact_version.rb +++ /dev/null @@ -1,5 +0,0 @@ -Facter.add("php_fact_version") do - setcode do - Facter::Util::Resolution.exec('php-config --version') || nil - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/augeas.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/augeas.pp deleted file mode 100644 index 722d65dd35..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/augeas.pp +++ /dev/null @@ -1,76 +0,0 @@ -# = Define: php::augeas -# -# Manage php.ini through augeas -# -# Here's an example how to find the augeas path to a variable: -# -# # augtool --noload -# augtool> rm /augeas/load -# rm : /augeas/load 781 -# augtool> set /augeas/load/myfile/lens @PHP -# augtool> set /augeas/load/myfile/incl /usr/local/etc/php5/cgi/php.ini -# augtool> load -# augtool> print -# ... -# /files/usr/local/etc/php5/cgi/php.ini/soap/soap.wsdl_cache_limit = "5" -# /files/usr/local/etc/php5/cgi/php.ini/ldap/ldap.max_links = "-1" -# ... -# augtool> exit -# # -# -# The part after 'php.ini/' is what you need to use as 'entry'. -# -# == Parameters -# -# [*entry*] -# Augeas path to entry to be modified. -# -# [*ensure*] -# Standard puppet ensure variable -# -# [*target*] -# Which php.ini to manipulate. Default is $php::config_file -# -# [*value*] -# Value to set -# -# == Examples -# -# php::augeas { -# 'php-memorylimit': -# entry => 'PHP/memory_limit', -# value => '128M'; -# 'php-error_log': -# entry => 'PHP/error_log', -# ensure => absent; -# 'php-sendmail_path': -# entry => 'mail function/sendmail_path', -# value => '/usr/sbin/sendmail -t -i -f info@example.com'; -# 'php-date_timezone': -# entry => 'Date/date.timezone', -# value => 'Europe/Amsterdam'; -# } -# -define php::augeas ( - $entry, - $ensure = present, - $target = $php::config_file, - $value = '', - ) { - - include php - - $service = $php::service - - $changes = $ensure ? { - present => [ "set '${entry}' '${value}'" ], - absent => [ "rm '${entry}'" ], - } - - augeas { "php_ini-${name}": - incl => $target, - lens => 'Php.lns', - changes => $changes, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/conf.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/conf.pp deleted file mode 100644 index 12514dbf55..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/conf.pp +++ /dev/null @@ -1,112 +0,0 @@ -# -# = Define: php::conf -# -# With this define you can manage any php configuration file -# You have 3 parameters to provide it: source, template and content. -# -# == Parameters -# -# [*template*] -# String. Optional. Default: undef. Alternative to: source, content. -# Sets the module path of a custom template to use as content of -# the config file -# When defined, config file has: content => content($template), -# Example: template => 'site/php/my.conf.erb', -# -# [*content*] -# String. Optional. Default: undef. Alternative to: template, source. -# Sets directly the value of the file's content parameter -# When defined, config file has: content => $content, -# Example: content => "# File Managed by Puppet \n", -# -# [*source*] -# String. Optional. Default: undef. Alternative to: template, content. -# Sets the value of the file's source parameter -# When defined, config file has: source => $source, -# Example: source => 'puppet:///site/php/my.conf', -# -# [*ensure*] -# String. Default: present -# Manages config file presence. Possible values: -# * 'present' - Create and manages the file. -# * 'absent' - Remove the file. -# -# [*path*] -# String. Optional. Default: $config_dir/$title -# The path of the created config file. If not defined a file -# name like the the name of the title a custom template to use as content of configfile -# If defined, configfile file has: content => content("$template") -# -# [*mode*] [*owner*] [*group*] [*notify*] [*replace*] -# String. Optional. Default: undef -# All these parameters map directly to the created file attributes. -# If not defined the module's defaults are used. -# If defined, config file file has, for example: mode => $mode -# -# [*options_hash*] -# Hash. Default undef. Needs: 'template'. -# An hash of custom options to be used in templates to manage any key pairs of -# arbitrary settings. -# -define php::conf ( - - $source = undef, - $template = undef, - $content = undef, - - $path = undef, - $mode = undef, - $owner = undef, - $group = undef, - $notify = undef, - $replace = undef, - - $options_hash = undef, - - $ensure = present ) { - - validate_re($ensure, ['present','absent'], 'Valid values are: present, absent. WARNING: If set to absent the conf file is removed.') - - include php - - $managed_path = $path ? { - undef => "${php::config_dir}/${name}", - default => $path, - } - - $managed_content = $content ? { - undef => $template ? { - undef => undef, - default => template($template), - }, - default => $content, - } - - $managed_mode = $mode ? { - undef => $php::config_file_mode, - default => $mode, - } - - $managed_owner = $owner ? { - undef => $php::config_file_owner, - default => $owner, - } - - $managed_group = $group ? { - undef => $php::config_file_group, - default => $group, - } - - file { "php_conf_${name}": - ensure => $ensure, - source => $source, - content => $managed_content, - path => $managed_path, - mode => $managed_mode, - owner => $managed_owner, - group => $managed_group, - notify => $notify, - replace => $replace, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/devel.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/devel.pp deleted file mode 100644 index 634f35ea2d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/devel.pp +++ /dev/null @@ -1,13 +0,0 @@ -# Class php::devel -# -# Installs php devel package -# -class php::devel { - - if $php::package_devel != '' - and ! defined(Package[$php::package_devel]) { - package { $php::package_devel : - ensure => $php::manage_package, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/ini.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/ini.pp deleted file mode 100644 index 2851aa4c67..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/ini.pp +++ /dev/null @@ -1,26 +0,0 @@ -# = Define: php::ini -# -define php::ini ( - $value = '', - $template = 'extra-ini.erb', - $target = 'extra.ini', - $service = $php::service, - $config_dir = $php::config_dir -) { - - include php - - file { "${config_dir}/conf.d/${target}": - ensure => 'present', - content => template("php/${template}"), - require => Package['php'], - notify => Service[$service], - } - - file { "${config_dir}/cli/conf.d/${target}": - ensure => 'present', - content => template("php/${template}"), - require => Package['php'], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/init.pp deleted file mode 100644 index 7370528657..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/init.pp +++ /dev/null @@ -1,298 +0,0 @@ -# = Class: php -# -# This is the main php class -# -# -# == Parameters -# -# Module specific parameters -# [*package_devel*] -# Name of the php-devel package -# -# [*package_pear*] -# Name of the php-pear package -# -# Standard class parameters -# Define the general class behaviour and customizations -# -# [*my_class*] -# Name of a custom class to autoload to manage module's customizations -# If defined, php class will automatically "include $my_class" -# Can be defined also by the (top scope) variable $php_myclass -# -# [*service*] -# The service that runs the php interpreter. Defines what service gets -# notified. Default: apache2|httpd. -# -# [*source*] -# Sets the content of source parameter for main configuration file -# If defined, php main config file will have the param: source => $source -# Can be defined also by the (top scope) variable $php_source -# -# [*source_dir*] -# If defined, the whole php configuration directory content is retrieved -# recursively from the specified source -# (source => $source_dir , recurse => true) -# Can be defined also by the (top scope) variable $php_source_dir -# -# [*source_dir_purge*] -# If set to true (default false) the existing configuration directory is -# mirrored with the content retrieved from source_dir -# (source => $source_dir , recurse => true , purge => true, force => true) -# Can be defined also by the (top scope) variable $php_source_dir_purge -# -# [*template*] -# Sets the path to the template to use as content for main configuration file -# If defined, php main config file has: content => content("$template") -# Note source and template parameters are mutually exclusive: don't use both -# Can be defined also by the (top scope) variable $php_template -# -# [*augeas*] -# If set to true (default false), the php.ini will be managed through -# augeas. This will make php::pecl automatically add extensions to the -# php.ini. -# Can be defined also by the (top scope) variable $php_augeas -# -# [*options*] -# An hash of custom options to be used in templates for arbitrary settings. -# Can be defined also by the (top scope) variable $php_options -# -# [*version*] -# The package version, used in the ensure parameter of package type. -# Default: present. Can be 'latest' or a specific version number. -# Note that if the argument absent (see below) is set to true, the -# package is removed, whatever the value of version parameter. -# -# [*absent*] -# Set to 'true' to remove package(s) installed by module -# Can be defined also by the (top scope) variable $php_absent -# -# [*puppi*] -# Set to 'true' to enable creation of module data files that are used by puppi -# Can be defined also by the (top scope) variables $php_puppi and $puppi -# -# [*puppi_helper*] -# Specify the helper to use for puppi commands. The default for this module -# is specified in params.pp and is generally a good choice. -# You can customize the output of puppi commands for this module using another -# puppi helper. Use the define puppi::helper to create a new custom helper -# Can be defined also by the (top scope) variables $php_puppi_helper -# and $puppi_helper -# -# [*debug*] -# Set to 'true' to enable modules debugging -# Can be defined also by the (top scope) variables $php_debug and $debug -# -# [*audit_only*] -# Set to 'true' if you don't intend to override existing configuration files -# and want to audit the difference between existing files and the ones -# managed by Puppet. -# Can be defined also by the (top scope) variables $php_audit_only -# and $audit_only -# -# Default class params - As defined in php::params. -# Note that these variables are mostly defined and used in the module itself, -# overriding the default values might not affected all the involved components. -# Set and override them only if you know what you're doing. -# Note also that you can't override/set them via top scope variables. -# -# [*package*] -# The name of php package -# -# [*config_dir*] -# Main configuration directory. Used by puppi -# -# [*config_file*] -# Main configuration file path -# -# [*config_file_mode*] -# Main configuration file path mode -# -# [*config_file_owner*] -# Main configuration file path owner -# -# [*config_file_group*] -# Main configuration file path group -# -# [*config_file_init*] -# Path of configuration file sourced by init script -# -# [*pid_file*] -# Path of pid file. Used by monitor -# -# [*data_dir*] -# Path of application data directory. Used by puppi -# -# [*log_dir*] -# Base logs directory. Used by puppi -# -# [*log_file*] -# Log file(s). Used by puppi -# -# == Examples -# -# You can use this class in 2 ways: -# - Set variables (at top scope level on in a ENC) and "include php" -# - Call php as a parametrized class -# -# See README for details. -# -# -class php ( - $package_devel = params_lookup( 'package_devel' ), - $package_pear = params_lookup( 'package_pear' ), - $my_class = params_lookup( 'my_class' ), - $service = params_lookup( 'service' ), - $service_autorestart = params_lookup( 'service_autorestart' ), - $source = params_lookup( 'source' ), - $source_dir = params_lookup( 'source_dir' ), - $source_dir_purge = params_lookup( 'source_dir_purge' ), - $template = params_lookup( 'template' ), - $augeas = params_lookup( 'augeas' ), - $options = params_lookup( 'options' ), - $version = params_lookup( 'version' ), - $absent = params_lookup( 'absent' ), - $monitor = params_lookup( 'monitor' , 'global' ), - $monitor_tool = params_lookup( 'monitor_tool' , 'global' ), - $monitor_target = params_lookup( 'monitor_target' , 'global' ), - $puppi = params_lookup( 'puppi' , 'global' ), - $puppi_helper = params_lookup( 'puppi_helper' , 'global' ), - $debug = params_lookup( 'debug' , 'global' ), - $audit_only = params_lookup( 'audit_only' , 'global' ), - $package = params_lookup( 'package' ), - $module_prefix = params_lookup( 'module_prefix' ), - $config_dir = params_lookup( 'config_dir' ), - $config_file = params_lookup( 'config_file' ), - $config_file_mode = params_lookup( 'config_file_mode' ), - $config_file_owner = params_lookup( 'config_file_owner' ), - $config_file_group = params_lookup( 'config_file_group' ), - $config_file_init = params_lookup( 'config_file_init' ), - $pid_file = params_lookup( 'pid_file' ), - $data_dir = params_lookup( 'data_dir' ), - $log_dir = params_lookup( 'log_dir' ), - $log_file = params_lookup( 'log_file' ), - $port = params_lookup( 'port' ), - $protocol = params_lookup( 'protocol' ) - ) inherits php::params { - - $bool_service_autorestart=any2bool($service_autorestart) - $bool_source_dir_purge=any2bool($source_dir_purge) - $bool_augeas=any2bool($augeas) - $bool_absent=any2bool($absent) - $bool_monitor=any2bool($monitor) - $bool_puppi=any2bool($puppi) - $bool_debug=any2bool($debug) - $bool_audit_only=any2bool($audit_only) - - ### Definition of some variables used in the module - $manage_package = $php::bool_absent ? { - true => 'absent', - false => $php::version, - } - - $manage_file = $php::bool_absent ? { - true => 'absent', - default => 'present', - } - - if $php::bool_absent == true { - $manage_monitor = false - } else { - $manage_monitor = true - } - - $manage_audit = $php::bool_audit_only ? { - true => 'all', - false => undef, - } - - $manage_file_replace = $php::bool_audit_only ? { - true => false, - false => true, - } - - if ($php::source and $php::template) { - fail ('PHP: cannot set both source and template') - } - if ($php::source and $php::bool_augeas) { - fail ('PHP: cannot set both source and augeas') - } - if ($php::template and $php::bool_augeas) { - fail ('PHP: cannot set both template and augeas') - } - - $manage_file_source = $php::source ? { - '' => undef, - default => $php::source, - } - - $manage_file_content = $php::template ? { - '' => undef, - default => template($php::template), - } - - ### Managed resources - package { 'php': - ensure => $php::manage_package, - name => $php::package, - } - - file { 'php.conf': - ensure => $php::manage_file, - path => $php::config_file, - mode => $php::config_file_mode, - owner => $php::config_file_owner, - group => $php::config_file_group, - require => Package['php'], - source => $php::manage_file_source, - content => $php::manage_file_content, - replace => $php::manage_file_replace, - audit => $php::manage_audit, - } - - # The whole php configuration directory can be recursively overriden - if $php::source_dir { - file { 'php.dir': - ensure => directory, - path => $php::config_dir, - require => Package['php'], - source => $php::source_dir, - recurse => true, - purge => $php::bool_source_dir_purge, - force => $php::bool_source_dir_purge, - replace => $php::manage_file_replace, - audit => $php::manage_audit, - } - } - - - ### Include custom class if $my_class is set - if $php::my_class { - include $php::my_class - } - - - ### Provide puppi data, if enabled ( puppi => true ) - if $php::bool_puppi == true { - $classvars=get_class_args() - puppi::ze { 'php': - ensure => $php::manage_file, - variables => $classvars, - helper => $php::puppi_helper, - } - } - - - ### Debugging, if enabled ( debug => true ) - if $php::bool_debug == true { - file { 'debug_php': - ensure => $php::manage_file, - path => "${settings::vardir}/debug-php", - mode => '0640', - owner => 'root', - group => 'root', - content => inline_template('<%= scope.to_hash.reject { |k,v| k.to_s =~ /(uptime.*|path|timestamp|free|.*password.*|.*psk.*|.*key)/ }.to_yaml %>'), - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/module.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/module.pp deleted file mode 100644 index 714c1de283..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/module.pp +++ /dev/null @@ -1,85 +0,0 @@ -# = Define: php::module -# -# This define installs and configures php modules -# On Debian and derivatives it install module named php5-${name} -# On RedHat and derivatives it install module named php-${name} -# If you need a custom prefix you can overload default $module_prefix parameter -# -# == Parameters -# -# [*version*] -# Version to install. -# -# [*absent*] -# true to ensure package isn't installed. -# -# [*notify_service*] -# If you want to restart a service automatically when -# the module is applied. Default: true -# -# [*service_autorestart*] -# whatever we want a module installation notify a service to restart. -# -# [*service*] -# Service to restart. -# -# [*module_prefix*] -# If package name prefix isn't standard. -# -# == Examples -# php::module { 'gd': } -# -# php::module { 'gd': -# ensure => absent, -# } -# -# This will install php-apc on debian instead of php5-apc -# -# php::module { 'apc': -# module_prefix => "php-", -# } -# -# Note that you may include or declare the php class when using -# the php::module define -# -define php::module ( - $version = 'present', - $service_autorestart = '', - $module_prefix = '', - $absent = '' - ) { - - include php - - if $absent { - $real_version = 'absent' - } else { - $real_version = $version - } - - $real_service_autorestart = $service_autorestart ? { - true => "Service[${php::service}]", - false => undef, - '' => $php::service_autorestart ? { - true => "Service[${php::service}]", - false => undef, - } - } - - $real_module_prefix = $module_prefix ? { - '' => $php::module_prefix, - default => $module_prefix, - } - - $real_install_package = "${real_module_prefix}${name}" - - if defined(Package[$real_install_package]) == false { - package { "PhpModule_${name}": - ensure => $real_version, - name => $real_install_package, - notify => $real_service_autorestart, - require => Package['php'], - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/params.pp deleted file mode 100644 index 4db3267d90..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/params.pp +++ /dev/null @@ -1,108 +0,0 @@ -# Class: php::params -# -# This class defines default parameters used by the main module class php -# Operating Systems differences in names and paths are addressed here -# -# == Variables -# -# Refer to php class for the variables defined here. -# -# == Usage -# -# This class is not intended to be used directly. -# It may be imported or inherited by other classes -# -class php::params { - - $package_devel = $::operatingsystem ? { - /(?i:Ubuntu|Debian|Mint)/ => 'php5-dev', - /(?i:SLES|OpenSuSe)/ => 'php5-devel', - default => 'php-devel', - } - - $package_pear = $::operatingsystem ? { - /(?i:Ubuntu|Debian|Mint)/ => 'php-pear', - /(?i:SLES|OpenSuSe)/ => 'php5-pear', - default => 'php-pear', - } - - ### Application related parameters - $module_prefix = $::operatingsystem ? { - /(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => 'php5-', - default => 'php-', - } - - $pear_module_prefix = $::operatingsystem ? { - /(?i:Ubuntu|Debian|Mint)/ => 'php-', - /(?i:SLES|OpenSuSe)/ => 'php5-pear-', - /(?i:CentOS|RedHat|Scientific|Linux)/ => 'php-pear-', - default => 'pear-', - } - - $package = $::operatingsystem ? { - /(?i:Ubuntu|Debian|Mint)/ => 'php5', - /(?i:SLES|OpenSuSE)/ => [ 'php5','apache2-mod_php5'], - default => 'php', - } - - # Here it's not the php service script name but - # web service name like apache2, nginx, etc. - $service = $::operatingsystem ? { - /(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => 'apache2', - default => 'httpd', - } - - $config_dir = $::operatingsystem ? { - /(?i:Ubuntu|Debian|Mint|SLES|OpenSuSE)/ => '/etc/php5', - default => '/etc/php.d', - } - - $config_file = $::operatingsystem ? { - /(?i:Ubuntu|Debian|Mint)/ => '/etc/php5/php.ini', - /(?i:SLES|OpenSuSE)/ => '/etc/php5/apache2/php.ini', - default => '/etc/php.ini', - } - - $config_file_mode = $::operatingsystem ? { - default => '0644', - } - - $config_file_owner = $::operatingsystem ? { - default => 'root', - } - - $config_file_group = $::operatingsystem ? { - default => 'root', - } - - $data_dir = $::operatingsystem ? { - default => '', - } - - $log_dir = $::operatingsystem ? { - default => '', - } - - $log_file = $::operatingsystem ? { - default => '', - } - - # General Settings - $my_class = '' - $source = '' - $source_dir = '' - $source_dir_purge = false - $augeas = false - $template = '' - $options = '' - $version = 'present' - $service_autorestart = true - $absent = false - - ### General module variables that can have a site or per module default - $puppi = false - $puppi_helper = 'standard' - $debug = false - $audit_only = false - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pear.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pear.pp deleted file mode 100644 index a333a8448b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pear.pp +++ /dev/null @@ -1,38 +0,0 @@ -# Class: php::pear -# -# Installs Pear for PHP module -# -# Usage: -# include php::pear -# -# == Parameters -# -# Standard class parameters -# Define the general class behaviour and customizations -# -# [*package*] -# Name of the package to install. Defaults to 'php-pear' -# -# [*version*] -# Version to install. Defaults to 'present' -# -# [*install_package*] -# Boolean. Determines if any package should be installed to support the PEAR functionality. -# Can be false if PEAR was already provided by another package or module. -# Default: true -# -class php::pear ( - $package = $php::package_pear, - $install_package = true, - $version = 'present', - $path = '/usr/bin:/usr/sbin:/bin:/sbin' - ) inherits php { - - if ( $install_package ) { - package { 'php-pear': - ensure => $version, - name => $package, - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pear/config.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pear/config.pp deleted file mode 100644 index 41c5b75091..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pear/config.pp +++ /dev/null @@ -1,19 +0,0 @@ -# Define: php::pear::config -# -# Configures pear -# -# Usage: -# php::pear::config { http_proxy: value => "myproxy:8080" } -# -define php::pear::config ($value) { - - include php::pear - - exec { "pear-config-set-${name}": - command => "pear config-set ${name} ${value}", - path => $php::pear::path, - unless => "pear config-get ${name} | grep ${value}", - require => Package['php-pear'], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pear/module.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pear/module.pp deleted file mode 100644 index 4d11b16f19..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pear/module.pp +++ /dev/null @@ -1,119 +0,0 @@ -# Define: php::pear::module -# -# Installs the defined php pear component -# -# Variables: -# [*use_package*] -# (default=true) - Tries to install pear module with the relevant OS package -# If set to "no" it installs the module via pear command -# -# [*preferred_state*] -# (default="stable") - Define which preferred state to use when installing -# Pear modules via pear via command line (when use_package=false) -# -# [*alldeps*] -# (default="false") - Define if all the available (optional) modules should -# be installed. (when use_package=false) -# -# Usage: -# php::pear::module { packagename: } -# Example: -# php::pear::module { Crypt-CHAP: } -# -define php::pear::module ( - $service = '', - $use_package = true, - $preferred_state = 'stable', - $alldeps = false, - $version = 'present', - $repository = 'pear.php.net', - $service_autorestart = '', - $module_prefix = '', - $path = '/usr/bin:/usr/sbin:/bin:/sbin', - $ensure = 'present', - $timeout = 300 - ) { - - include php::pear - - $bool_use_package = any2bool($use_package) - $bool_alldeps = any2bool($alldeps) - $manage_alldeps = $bool_alldeps ? { - true => '--alldeps', - false => '', - } - - $pear_source = $version ? { - 'present' => "${repository}/${name}", - default => "${repository}/${name}-${version}", - } - - $pear_exec_command = $ensure ? { - present => "pear -d preferred_state=${preferred_state} install ${manage_alldeps} ${pear_source}", - absent => "pear uninstall -n ${pear_source}", - } - - $pear_exec_require = $repository ? { - 'pear.php.net' => Package['php-pear'], - default => [ Package['php-pear'],Php::Pear::Config['auto_discover'] ], - } - - $pear_exec_unless = $ensure ? { - present => "pear info ${pear_source}", - absent => undef - } - - $pear_exec_onlyif = $ensure ? { - present => undef, - absent => "pear info ${pear_source}", - } - - $real_service = $service ? { - '' => $php::service, - default => $service, - } - - $real_service_autorestart = $service_autorestart ? { - true => "Service[${real_service}]", - false => undef, - '' => $php::service_autorestart ? { - true => "Service[${real_service}]", - false => undef, - } - } - - $real_module_prefix = $module_prefix ? { - '' => $php::pear_module_prefix, - default => $module_prefix, - } - $package_name = "${real_module_prefix}${name}" - - - case $bool_use_package { - true: { - package { "pear-${name}": - ensure => $ensure, - name => $package_name, - notify => $real_service_autorestart, - } - } - default: { - if $repository != 'pear.php.net' { - if !defined (Php::Pear::Config['auto_discover']) { - php::pear::config { 'auto_discover': - value => '1', - } - } - } - exec { "pear-${name}": - command => $pear_exec_command, - path => $path, - unless => $pear_exec_unless, - onlyif => $pear_exec_onlyif, - require => $pear_exec_require, - timeout => $timeout, - } - } - } # End Case - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pecl/config.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pecl/config.pp deleted file mode 100644 index 437a2ab10a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pecl/config.pp +++ /dev/null @@ -1,23 +0,0 @@ -# Define: php::pecl::config -# -# Configures pecl -# -# Usage: -# php::pecl::config { http_proxy: value => "myproxy:8080" } -# -define php::pecl::config ( - $value, - $layer = 'user', - $path = '/usr/bin:/bin:/usr/sbin:/sbin' - ) { - - include php::pear - - exec { "pecl-config-set-${name}": - command => "pecl config-set ${name} ${value} ${layer}", - path => $path, - unless => "pecl config-get ${name} | grep ${value}", - require => Package['php-pear'], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pecl/module.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pecl/module.pp deleted file mode 100644 index b47b10b5d7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/pecl/module.pp +++ /dev/null @@ -1,126 +0,0 @@ -# Define: php::pecl::module -# -# Installs the defined php pecl component -# -# == Parameters -# -# [*service_autorestart*] -# wathever we want a module installation notify a service to restart. -# -# [*service*] -# Service to restart. -# -# [*use_package*] -# Tries to install pecl module with the relevant package. -# If set to "no" it installs the module via pecl command. Default: true -# -# [*preferred_state*] -# Define which preferred state to use when installing Pear modules via pecl -# command line (when use_package=no). Default: true -# -# [*auto_answer*] -# The answer(s) to give to pecl prompts for unattended install -# -# [*verbose*] -# (Optional) - If you want to see verbose pecl output during installation. -# This can help to debug installation problems (missing packages) during -# installation process. Default: false -# -# == Examples -# php::pecl::module { 'intl': } -# -# This will install xdebug from pecl source instead of using the package -# -# php::pecl::module { 'xdebug':. -# use_package => "no", -# } -# -define php::pecl::module ( - $service_autorestart = $php::bool_service_autorestart, - $service = $php::service, - $use_package = 'yes', - $preferred_state = 'stable', - $auto_answer = '\\n', - $ensure = present, - $path = '/usr/bin:/usr/sbin:/bin:/sbin', - $verbose = false, - $version = '', - $config_file = $php::config_file) { - - include php - include php::pear - include php::devel - - $manage_service_autorestart = $service_autorestart ? { - true => $service ? { - '' => undef, - default => "Service[${service}]", - }, - false => undef, - undef => undef, - } - - $real_package_name = $::operatingsystem ? { - ubuntu => "php5-${name}", - debian => "php5-${name}", - default => "php-${name}", - } - - case $use_package { - yes: { - package { "php-${name}": - ensure => $ensure, - name => $real_package_name, - notify => $manage_service_autorestart, - } - } - default: { - - $bool_verbose = any2bool($verbose) - - $pecl_exec_logoutput = $bool_verbose ? { - true => true, - false => undef, - } - - if $version != '' { - $new_version = "-${version}" - } else { - $new_version = '' - } - - $pecl_exec_command = $ensure ? { - present => "printf \"${auto_answer}\" | pecl -d preferred_state=${preferred_state} install ${name}${new_version}", - absent => "pecl uninstall -n ${name}", - } - - $pecl_exec_unless = $ensure ? { - present => "pecl info ${name}", - absent => undef - } - - $pecl_exec_onlyif = $ensure ? { - present => undef, - absent => "pecl info ${name}", - } - - exec { "pecl-${name}": - command => $pecl_exec_command, - unless => $pecl_exec_unless, - onlyif => $pecl_exec_onlyif, - logoutput => $pecl_exec_logoutput, - path => $path, - require => [ Class['php::pear'], Class['php::devel']], - } - if $php::bool_augeas == true { - php::augeas { "augeas-${name}": - ensure => $ensure, - entry => "PHP/extension[. = \"${name}.so\"]", - value => "${name}.so", - notify => $manage_service_autorestart, - target => $config_file, - } - } - } - } # End Case -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/spec.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/spec.pp deleted file mode 100644 index 3be06f47f8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/manifests/spec.pp +++ /dev/null @@ -1,22 +0,0 @@ -# Class: php::spec -# -# This class is used only for rpsec-puppet tests -# Can be taken as an example on how to do custom classes but should not -# be modified. -# -# == Usage -# -# This class is not intended to be used directly. -# Use it as reference -# -class php::spec inherits php { - - # This just a test to override the arguments of an existing resource - # Note that you can achieve this same result with just: - # class { "php": template => "php/spec.erb" } - - File['php.conf'] { - content => template('php/spec.erb'), - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/classes/php_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/classes/php_spec.rb deleted file mode 100644 index be9a4e327f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/classes/php_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'php' do - - let(:title) { 'php' } - let(:node) { 'rspec.example42.com' } - let(:facts) { { :ipaddress => '10.42.42.42' } } - - describe 'Test standard installation' do - it { should contain_package('php').with_ensure('present') } - it { should contain_file('php.conf').with_ensure('present') } - end - - describe 'Test installation of a specific version' do - let(:params) { {:version => '1.0.42' } } - it { should contain_package('php').with_ensure('1.0.42') } - end - - describe 'Test decommissioning - absent' do - let(:params) { {:absent => true, :monitor => true } } - - it 'should remove Package[php]' do should contain_package('php').with_ensure('absent') end - it 'should remove php configuration file' do should contain_file('php.conf').with_ensure('absent') end - end - - describe 'Test customizations - template' do - let(:params) { {:template => "php/spec.erb" , :options => { 'opt_a' => 'value_a' } } } - - it 'should generate a valid template' do - content = catalogue.resource('file', 'php.conf').send(:parameters)[:content] - content.should match "fqdn: rspec.example42.com" - end - it 'should generate a template that uses custom options' do - content = catalogue.resource('file', 'php.conf').send(:parameters)[:content] - content.should match "value_a" - end - - end - - describe 'Test customizations - source' do - let(:params) { {:source => "puppet://modules/php/spec" , :source_dir => "puppet://modules/php/dir/spec" , :source_dir_purge => true } } - - it 'should request a valid source ' do - content = catalogue.resource('file', 'php.conf').send(:parameters)[:source] - content.should == "puppet://modules/php/spec" - end - it 'should request a valid source dir' do - content = catalogue.resource('file', 'php.dir').send(:parameters)[:source] - content.should == "puppet://modules/php/dir/spec" - end - it 'should purge source dir if source_dir_purge is true' do - content = catalogue.resource('file', 'php.dir').send(:parameters)[:purge] - content.should == true - end - end - - describe 'Test customizations - custom class' do - let(:params) { {:my_class => "php::spec" } } - it 'should automatically include a custom class' do - content = catalogue.resource('file', 'php.conf').send(:parameters)[:content] - content.should match "fqdn: rspec.example42.com" - end - end - - describe 'Test Puppi Integration' do - let(:params) { {:puppi => true, :puppi_helper => "myhelper"} } - - it 'should generate a puppi::ze define' do - content = catalogue.resource('puppi::ze', 'php').send(:parameters)[:helper] - content.should == "myhelper" - end - end - - -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/defines/php_module_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/defines/php_module_spec.rb deleted file mode 100644 index 614f0a1087..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/defines/php_module_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'php::module' do - - let(:title) { 'php::module' } - let(:node) { 'rspec.example42.com' } - let(:facts) { { 'operatingsystem' => 'Ubuntu' } } - - describe 'Test standard installation' do - let(:params) { { 'name' => 'ps', } } - it 'should create a package with the default OS prefix' do - should contain_package('PhpModule_ps').with_name('php5-ps') - end - it 'should notify the default service' do - should contain_package('PhpModule_ps').with_notify('Service[apache2]') - end - end - - describe 'Test custom params' do - let(:params) { { 'name' => 'ps', 'module_prefix' => 'my-' , 'service_autorestart' => false } } - it 'should create a package with custom prefix' do - should contain_package('PhpModule_ps').with( - 'ensure' => 'present', - 'name' => 'my-ps' - ) - should contain_package('PhpModule_ps').without('notify') - end - end - - describe 'Test uninstallation' do - let(:params) { { 'name' => 'ps', 'absent' => 'true' } } - it 'should remove the package' do - should contain_package('PhpModule_ps').with_ensure('absent') - end - end - -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/defines/php_pear_module_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/defines/php_pear_module_spec.rb deleted file mode 100644 index b093a8acfe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/defines/php_pear_module_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'php::pear::module' do - - let(:title) { 'php::pear::module' } - let(:node) { 'rspec.example42.com' } - let(:facts) { { 'operatingsystem' => 'Ubuntu' } } - - describe 'Test standard installation' do - let(:params) { { 'name' => 'Crypt-CHAP', } } - it 'should install pear module with default OS package' do - should contain_package('pear-Crypt-CHAP').with_name('php-Crypt-CHAP') - end - it 'should notify the default service' do - should contain_package('pear-Crypt-CHAP').with_notify('Service[apache2]') - end - end - - describe 'Test custom params' do - let(:params) { { 'name' => 'Crypt-CHAP', 'module_prefix' => 'my-' , 'service_autorestart' => false } } - it 'should create a package with custom prefix' do - should contain_package('pear-Crypt-CHAP').with( - 'ensure' => 'present', - 'name' => 'my-Crypt-CHAP' - ) - should contain_package('pear-Crypt-CHAP').without('notify') - end - end - - describe 'Test uninstallation' do - let(:params) { { 'name' => 'Crypt-CHAP', 'ensure' => 'absent' } } - it 'should remove the package' do - should contain_package('pear-Crypt-CHAP').with_ensure('absent') - end - end - - describe 'Test installation via exec' do - let(:params) { { 'name' => 'Crypt-CHAP', 'use_package' => 'false' } } - it 'should install pear module with exec commands' do - should contain_exec('pear-Crypt-CHAP').with( - 'command' => 'pear -d preferred_state=stable install pear.php.net/Crypt-CHAP', - 'unless' => 'pear info pear.php.net/Crypt-CHAP' - ) - end - end - - -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/spec_helper.rb deleted file mode 100644 index 2c6f56649a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/templates/extra-ini.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/templates/extra-ini.erb deleted file mode 100644 index e0e7087e89..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/templates/extra-ini.erb +++ /dev/null @@ -1,11 +0,0 @@ -; File Managed by Puppet - -<% if @value != "" -%> -<% if @value.is_a? Array -%> -<% @value.each do |name| -%> -<%= name %> -<% end %> -<% else -%> -<%= value %> -<% end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/templates/spec.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/templates/spec.erb deleted file mode 100644 index 87b8c1e65d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/php/templates/spec.erb +++ /dev/null @@ -1,8 +0,0 @@ -# This is a template used only for rspec tests - -# Yaml of the whole scope -<%= scope.to_hash.reject { |k,v| !( k.is_a?(String) && v.is_a?(String) ) }.to_yaml %> - -# Custom Options -<%= options['opt_a'] %> -<%= options['opt_b'] %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.fixtures.yml deleted file mode 100644 index 5dbd5d048d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.fixtures.yml +++ /dev/null @@ -1,8 +0,0 @@ -fixtures: - repositories: - apt: "https://github.com/puppetlabs/puppetlabs-apt.git" - stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git" - firewall: "https://github.com/puppetlabs/puppetlabs-firewall.git" - concat: "https://github.com/puppetlabs/puppetlabs-concat.git" - symlinks: - postgresql: "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.nodeset.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.nodeset.yml deleted file mode 100644 index 767f9cd2f6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.nodeset.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -default_set: 'centos-64-x64' -sets: - 'centos-59-x64': - nodes: - "main.foo.vm": - prefab: 'centos-59-x64' - 'centos-64-x64': - nodes: - "main.foo.vm": - prefab: 'centos-64-x64' - 'fedora-18-x64': - nodes: - "main.foo.vm": - prefab: 'fedora-18-x64' - 'debian-607-x64': - nodes: - "main.foo.vm": - prefab: 'debian-607-x64' - 'debian-70rc1-x64': - nodes: - "main.foo.vm": - prefab: 'debian-70rc1-x64' - 'ubuntu-server-10044-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-10044-x64' - 'ubuntu-server-12042-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-12042-x64' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.project b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.project deleted file mode 100644 index a680a0bce7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - postgresql - - - - - - org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - - org.cloudsmith.geppetto.pp.dsl.ui.puppetNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.travis.yml deleted file mode 100644 index 795fa6fcd1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -language: ruby -bundler_args: --without development -script: bundle exec rake spec SPEC_OPTS='--format documentation' -after_success: - - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-release - - .forge-release/publish -rvm: -- 1.8.7 -- 1.9.3 -- 2.0.0 -env: - matrix: - - PUPPET_GEM_VERSION="~> 2.7.0" - - PUPPET_GEM_VERSION="~> 3.2.0" - - PUPPET_GEM_VERSION="~> 3.4.0" - global: - - PUBLISHER_LOGIN=puppetlabs - - secure: jY81Y/csdcDjjXRzX9VA3fbb5db+/KraLRPErHjYANO15DZjh3b9tBwo/ybLCLCGJE8ej1yXzTxs1dJhokySQL12m1VW1i8dM26kMc4x+wOnIFKny7VB78Tcbp8RV1iV1kWN3UcuAbQ5hvMrI3rzoWkD22zF0k3nFEcv1kpix1w= -matrix: - fast_finish: true - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" -notifications: - email: false diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/CHANGELOG.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/CHANGELOG.md deleted file mode 100644 index 5f70a34dcd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/CHANGELOG.md +++ /dev/null @@ -1,550 +0,0 @@ -##2014-03-04 - Supported Release 3.3.3 -###Summary - -This is a supported release. This release removes a testing symlink that can -cause trouble on systems where /var is on a seperate filesystem from the -modulepath. - -####Features -####Bugfixes -####Known Bugs -* SLES is not supported. - -##2014-03-04 - Supported Release 3.3.2 -###Summary -This is a supported release. It fixes a problem with updating passwords on postgresql.org distributed versions of PostgreSQL. - -####Bugfixes -- Correct psql path when setting password on custom versions. -- Documentation updates -- Test updates - -####Known Bugs -* SLES is not supported. - - -##2014-02-12 - Version 3.3.1 -####Bugfix: -- Allow dynamic rubygems host - - -##2014-01-28 - Version 3.3.0 - -###Summary - -This release rolls up a bunch of bugfixes our users have found and fixed for -us over the last few months. This improves things for 9.1 users, and makes -this module usable on FreeBSD. - -This release is dedicated to 'bma', who's suffering with Puppet 3.4.1 issues -thanks to Puppet::Util::SUIDManager.run_and_capture. - -####Features - - Add lc_ config entry settings - - Can pass template at database creation. - - Add FreeBSD support. - - Add support for customer `xlogdir` parameter. - - Switch tests from rspec-system to beaker. (This isn't really a feature) - -####Bugfixes - - Properly fix the deprecated Puppet::Util::SUIDManager.run_and_capture errors. - - Fix NOREPLICATION option for Postgres 9.1 - - Wrong parameter name: manage_pg_conf -> manage_pg_hba_conf - - Add $postgresql::server::client_package_name, referred to by install.pp - - Add missing service_provider/service_name descriptions in ::globals. - - Fix several smaller typos/issues throughout. - - Exec['postgresql_initdb'] needs to be done after $datadir exists - - Prevent defined resources from floating in the catalog. - - Fix granting all privileges on a table. - - Add some missing privileges. - - Remove deprecated and unused concat::fragment parameters. - - -##2013-11-05 - Version 3.2.0 - -###Summary - -Add's support for Ubuntu 13.10 (and 14.04) as well as x, y, z. - -####Features -- Add versions for Ubuntu 13.10 and 14.04. -- Use default_database in validate_db_connection instead of a hardcoded -'postgres' -- Add globals/params layering for default_database. -- Allow specification of default database name. - -####Bugs -- Fixes to the README. - - -##2013-10-25 - Version 3.1.0 - -###Summary - -This is a minor feature and bug fix release. - -Firstly, the postgresql_psql type now includes a new parameter `search_path` which is equivalent to using `set search_path` which allows you to change the default schema search path. - -The default version of Fedora 17 has now been added, so that Fedora 17 users can enjoy the module. - -And finally we've extended the capabilities of the defined type postgresql::validate_db_connection so that now it can handle retrying and sleeping between retries. This feature has been monopolized to fix a bug we were seeing with startup race conditions, but it can also be used by remote systems to 'wait' for PostgreSQL to start before their Puppet run continues. - -####Features -- Defined $default_version for Fedora 17 (Bret Comnes) -- add search_path attribute to postgresql_psql resource (Jeremy Kitchen) -- (GH-198) Add wait and retry capability to validate_db_connection (Ken Barber) - -####Bugs -- enabling defined postgres user password without resetting on every puppet run (jonoterc) -- periods are valid in configuration variables also (Jeremy Kitchen) -- Add zero length string to join() function (Jarl Stefansson) -- add require of install to reload class (cdenneen) -- (GH-198) Fix race condition on postgresql startup (Ken Barber) -- Remove concat::setup for include in preparation for the next concat release (Ken Barber) - - -##2013-10-14 - Version 3.0.0 - -Final release of 3.0, enjoy! - - -##2013-10-14 - Version 3.0.0-rc3 - -###Summary - -Add a parameter to unmanage pg_hba.conf to fix a regression from 2.5, as well -as allowing owner to be passed into x. - -####Features -- `manage_pg_hba_conf` parameter added to control pg_hba.conf management. -- `owner` parameter added to server::db. - - -##2013-10-09 - Version 3.0.0-rc2 - -###Summary - -A few bugfixes have been found since -rc1. - -####Fixes -- Special case for $datadir on Amazon -- Fix documentation about username/password for the postgresql_hash function - - -##2013-10-01 - Version 3.0.0-rc1 - -###Summary - -Version 3 was a major rewrite to fix some internal dependency issues, and to -make the new Public API more clear. As a consequence a lot of things have -changed for version 3 and older revisions that we will try to outline here. - -(NOTE: The format of this CHANGELOG differs to normal in an attempt to -explain the scope of changes) - -* Server specific objects now moved under `postgresql::server::` namespace: - -To restructure server specific elements under the `postgresql::server::` -namespaces the following objects were renamed as such: - -`postgresql::database` -> `postgresql::server::database` -`postgresql::database_grant` -> `postgresql::server::database_grant` -`postgresql::db` -> `postgresql::server::db` -`postgresql::grant` -> `postgresql::server::grant` -`postgresql::pg_hba_rule` -> `postgresql::server::pg_hba_rule` -`postgresql::plperl` -> `postgresql::server::plperl` -`postgresql::contrib` -> `postgresql::server::contrib` -`postgresql::role` -> `postgresql::server::role` -`postgresql::table_grant` -> `postgresql::server::table_grant` -`postgresql::tablespace` -> `postgresql::server::tablespace` - -* New `postgresql::server::config_entry` resource for managing configuration: - -Previously we used the `file_line` resource to modify `postgresql.conf`. This -new revision now adds a new resource named `postgresql::server::config_entry` -for managing this file. For example: - -```puppet - postgresql::server::config_entry { 'check_function_bodies': - value => 'off', - } -``` - -If you were using `file_line` for this purpose, you should change to this new -methodology. - -* `postgresql_puppet_extras.conf` has been removed: - -Now that we have a methodology for managing `postgresql.conf`, and due to -concerns over the file management methodology using an `exec { 'touch ...': }` -as a way to create an empty file the existing postgresql\_puppet\_extras.conf -file is no longer managed by this module. - -If you wish to recreate this methodology yourself, use this pattern: - -```puppet - class { 'postgresql::server': } - - $extras = "/tmp/include.conf" - - file { $extras: - content => 'max_connections = 123', - notify => Class['postgresql::server::service'], - }-> - postgresql::server::config_entry { 'include': - value => $extras, - } -``` - -* All uses of the parameter `charset` changed to `encoding`: - -Since PostgreSQL uses the terminology `encoding` not `charset` the parameter -has been made consisent across all classes and resources. - -* The `postgresql` base class is no longer how you set globals: - -The old global override pattern was less then optimal so it has been fixed, -however we decided to demark this properly by specifying these overrides in -the class `postgresql::global`. Consult the documentation for this class now -to see what options are available. - -Also, some parameter elements have been moved between this and the -`postgresql::server` class where it made sense. - -* `config_hash` parameter collapsed for the `postgresql::server` class: - -Because the `config_hash` was really passing data through to what was in -effect an internal class (`postgresql::config`). And since we don't want this -kind of internal exposure the parameters were collapsed up into the -`postgresql::server` class directly. - -* Lots of changes to 'private' or 'undocumented' classes: - -If you were using these before, these have changed names. You should only use -what is documented in this README.md, and if you don't have what you need you -should raise a patch to add that feature to a public API. All internal classes -now have a comment at the top indicating them as private to make sure the -message is clear that they are not supported as Public API. - -* `pg_hba_conf_defaults` parameter included to turn off default pg\_hba rules: - -The defaults should be good enough for most cases (if not raise a bug) but if -you simply need an escape hatch, this setting will turn off the defaults. If -you want to do this, it may affect the rest of the module so make sure you -replace the rules with something that continues operation. - -* `postgresql::database_user` has now been removed: - -Use `postgresql::server::role` instead. - -* `postgresql::psql` resource has now been removed: - -Use `postgresql_psql` instead. In the future we may recreate this as a wrapper -to add extra capability, but it will not match the old behaviour. - -* `postgresql_default_version` fact has now been removed: - -It didn't make sense to have this logic in a fact any more, the logic has been -moved into `postgresql::params`. - -* `ripienaar/concat` is no longer used, instead we use `puppetlabs/concat`: - -The older concat module is now deprecated and moved into the -`puppetlabs/concat` namespace. Functionality is more or less identical, but -you may need to intervene during the installing of this package - as both use -the same `concat` namespace. - ---- -##2013-09-09 Release 2.5.0 - -###Summary - -The focus of this release is primarily to capture the fixes done to the -types and providers to make sure refreshonly works properly and to set -the stage for the large scale refactoring work of 3.0.0. - -####Features - - -####Bugfixes -- Use boolean for refreshonly. -- Fix postgresql::plperl documentation. -- Add two missing parameters to config::beforeservice -- Style fixes - - -##2013-08-01 Release 2.4.1 - -###Summary - -This minor bugfix release solves an idempotency issue when using plain text -passwords for the password_hash parameter for the postgresql::role defined -type. Without this, users would continually see resource changes everytime -your run Puppet. - -####Bugfixes -- Alter role call not idempotent with cleartext passwords (Ken Barber) - - -##2013-07-19 Release 2.4.0 - -###Summary - -This updates adds the ability to change permissions on tables, create template -databases from normal databases, manage PL-Perl's postgres package, and -disable the management of `pg_hba.conf`. - -####Features -- Add `postgresql::table_grant` defined resource -- Add `postgresql::plperl` class -- Add `manage_pg_hba_conf` parameter to the `postgresql::config` class -- Add `istemplate` parameter to the `postgresql::database` define - -####Bugfixes -- Update `postgresql::role` class to be able to update roles when modified -instead of only on creation. -- Update tests -- Fix documentation of `postgresql::database_grant` - - -##2.3.0 - -This feature release includes the following changes: - -* Add a new parameter `owner` to the `database` type. This can be used to - grant ownership of a new database to a specific user. (Bruno Harbulot) -* Add support for operating systems other than Debian/RedHat, as long as the - user supplies custom values for all of the required paths, package names, etc. - (Chris Price) -* Improved integration testing (Ken Barber) - - -##2.2.1 - -This release fixes a bug whereby one of our shell commands (psql) were not ran from a globally accessible directory. This was causing permission denied errors when the command attempted to change user without changing directory. - -Users of previous versions might have seen this error: - - Error: Error executing SQL; psql returned 256: 'could not change directory to "/root" - -This patch should correct that. - -#### Detail Changes - -* Set /tmp as default CWD for postgresql_psql - - -##2.2.0 - -This feature release introduces a number of new features and bug fixes. - -First of all it includes a new class named `postgresql::python` which provides you with a convenient way of install the python Postgresql client libraries. - - class { 'postgresql::python': - } - -You are now able to use `postgresql::database_user` without having to specify a password_hash, useful for different authentication mechanisms that do not need passwords (ie. cert, local etc.). - -We've also provided a lot more advanced custom parameters now for greater control of your Postgresql installation. Consult the class documentation for PuppetDB in the README. - -This release in particular has largely been contributed by the community members below, a big thanks to one and all. - -#### Detailed Changes - -* Add support for psycopg installation (Flaper Fesp and Dan Prince) -* Added default PostgreSQL version for Ubuntu 13.04 (Kamil Szymanski) -* Add ability to create users without a password (Bruno Harbulot) -* Three Puppet 2.6 fixes (Dominic Cleal) -* Add explicit call to concat::setup when creating concat file (Dominic Cleal) -* Fix readme typo (Jordi Boggiano) -* Update postgres_default_version for Ubuntu (Kamil Szymanski) -* Allow to set connection for noew role (Kamil Szymanski) -* Fix pg_hba_rule for postgres local access (Kamil Szymanski) -* Fix versions for travis-ci (Ken Barber) -* Add replication support (Jordi Boggiano) -* Cleaned up and added unit tests (Ken Barber) -* Generalization to provide more flexability in postgresql configuration (Karel Brezina) -* Create dependent directory for sudoers so tests work on Centos 5 (Ken Barber) -* Allow SQL commands to be run against a specific DB (Carlos Villela) -* Drop trailing comma to support Puppet 2.6 (Michael Arnold) - - -##2.1.1 - - -This release provides a bug fix for RHEL 5 and Centos 5 systems, or specifically systems using PostgreSQL 8.1 or older. On those systems one would have received the error: - - Error: Could not start Service[postgresqld]: Execution of ‘/sbin/service postgresql start’ returned 1: - -And the postgresql log entry: - - FATAL: unrecognized configuration parameter "include" - -This bug is due to a new feature we had added in 2.1.0, whereby the `include` directive in `postgresql.conf` was not compatible. As a work-around we have added checks in our code to make sure systems running PostgreSQL 8.1 or older do not have this directive added. - -#### Detailed Changes - -2013-01-21 - Ken Barber -* Only install `include` directive and included file on PostgreSQL >= 8.2 -* Add system tests for Centos 5 - - -##2.1.0 - -This release is primarily a feature release, introducing some new helpful constructs to the module. - -For starters, we've added the line `include 'postgresql_conf_extras.conf'` by default so extra parameters not managed by the module can be added by other tooling or by Puppet itself. This provides a useful escape-hatch for managing settings that are not currently managed by the module today. - -We've added a new defined resource for managing your tablespace, so you can now create new tablespaces using the syntax: - - postgresql::tablespace { 'dbspace': - location => '/srv/dbspace', - } - -We've added a locale parameter to the `postgresql` class, to provide a default. Also the parameter has been added to the `postgresql::database` and `postgresql::db` defined resources for changing the locale per database: - - postgresql::db { 'mydatabase': - user => 'myuser', - password => 'mypassword', - encoding => 'UTF8', - locale => 'en_NG', - } - -There is a new class for installing the necessary packages to provide the PostgreSQL JDBC client jars: - - class { 'postgresql::java': } - -And we have a brand new defined resource for managing fine-grained rule sets within your pg_hba.conf access lists: - - postgresql::pg_hba { 'Open up postgresql for access from 200.1.2.0/24': - type => 'host', - database => 'app', - user => 'app', - address => '200.1.2.0/24', - auth_method => 'md5', - } - -Finally, we've also added Travis-CI support and unit tests to help us iterate faster with tests to reduce regression. The current URL for these tests is here: https://travis-ci.org/puppetlabs/puppet-postgresql. Instructions on how to run the unit tests available are provided in the README for the module. - -A big thanks to all those listed below who made this feature release possible :-). - -#### Detailed Changes - -2013-01-18 - Simão Fontes & Flaper Fesp -* Remove trailing commas from params.pp property definition for Puppet 2.6.0 compatibility - -2013-01-18 - Lauren Rother -* Updated README.md to conform with best practices template - -2013-01-09 - Adrien Thebo -* Update postgresql_default_version to 9.1 for Debian 7.0 - -2013-01-28 - Karel Brezina -* Add support for tablespaces - -2013-01-16 - Chris Price & Karel Brezina -* Provide support for an 'include' config file 'postgresql_conf_extras.conf' that users can modify manually or outside of the module. - -2013-01-31 - jv -* Fix typo in README.pp for postgresql::db example - -2013-02-03 - Ken Barber -* Add unit tests and travis-ci support - -2013-02-02 - Ken Barber -* Add locale parameter support to the 'postgresql' class - -2013-01-21 - Michael Arnold -* Add a class for install the packages containing the PostgreSQL JDBC jar - -2013-02-06 - fhrbek -* Coding style fixes to reduce warnings in puppet-lint and Geppetto - -2013-02-10 - Ken Barber -* Provide new defined resource for managing pg_hba.conf - -2013-02-11 - Ken Barber -* Fix bug with reload of Postgresql on Redhat/Centos - -2013-02-15 - Erik Dalén -* Fix more style issues to reduce warnings in puppet-lint and Geppetto - -2013-02-15 - Erik Dalén -* Fix case whereby we were modifying a hash after creation - - -##2.0.1 - -Minor bugfix release. - -2013-01-16 - Chris Price - * Fix revoke command in database.pp to support postgres 8.1 (43ded42) - -2013-01-15 - Jordi Boggiano - * Add support for ubuntu 12.10 status (3504405) - -##2.0.0 - -Many thanks to the following people who contributed patches to this -release: - -* Adrien Thebo -* Albert Koch -* Andreas Ntaflos -* Brett Porter -* Chris Price -* dharwood -* Etienne Pelletier -* Florin Broasca -* Henrik -* Hunter Haugen -* Jari Bakken -* Jordi Boggiano -* Ken Barber -* nzakaria -* Richard Arends -* Spenser Gilliland -* stormcrow -* William Van Hevelingen - -Notable features: - - * Add support for versions of postgres other than the system default version - (which varies depending on OS distro). This includes optional support for - automatically managing the package repo for the "official" postgres yum/apt - repos. (Major thanks to Etienne Pelletier and - Ken Barber for their tireless efforts and patience on this - feature set!) For example usage see `tests/official-postgresql-repos.pp`. - - * Add some support for Debian Wheezy and Ubuntu Quantal - - * Add new `postgres_psql` type with a Ruby provider, to replace the old - exec-based `psql` type. This gives us much more flexibility around - executing SQL statements and controlling their logging / reports output. - - * Major refactor of the "spec" tests--which are actually more like - acceptance tests. We now support testing against multiple OS distros - via vagrant, and the framework is in place to allow us to very easily add - more distros. Currently testing against Cent6 and Ubuntu 10.04. - - * Fixed a bug that was preventing multiple databases from being owned by the - same user - (9adcd182f820101f5e4891b9f2ff6278dfad495c - Etienne Pelletier ) - - * Add support for ACLs for finer-grained control of user/interface access - (b8389d19ad78b4fb66024897097b4ed7db241930 - dharwood ) - - * Many other bug fixes and improvements! - ---- -##1.0.0 - -2012-09-17 - Version 0.3.0 released - -2012-09-14 - Chris Price - * Add a type for validating a postgres connection (ce4a049) - -2012-08-25 - Jari Bakken - * Remove trailing commas. (e6af5e5) - -2012-08-16 - Version 0.2.0 released diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/Gemfile deleted file mode 100644 index cb5deeccef..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/Gemfile +++ /dev/null @@ -1,20 +0,0 @@ -source ENV['GEM_SOURCE'] || "https://rubygems.org" - -group :development, :test do - gem 'rake' - gem 'pry', :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'rspec-puppet', '< 1.0' - gem 'puppet-lint', '~> 0.3.2' - gem 'beaker', :require => false - gem 'beaker-rspec', :require => false - gem 'serverspec', :require => false -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end - -# vim:ft=ruby diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/LICENSE deleted file mode 100644 index 7a29c73c87..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2013 Puppet Labs - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/Modulefile deleted file mode 100644 index e0e93541b3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/Modulefile +++ /dev/null @@ -1,13 +0,0 @@ -name 'puppetlabs-postgresql' -version '3.3.3' -source 'git://github.com/puppetlabs/puppet-postgresql.git' -author 'Inkling/Puppet Labs' -description 'PostgreSQL defined resource types' -summary 'PostgreSQL defined resource types' -license 'ASL 2.0' -project_page 'https://github.com/puppetlabs/puppet-postgresql' - -dependency 'puppetlabs/stdlib', '>=3.2.0 <5.0.0' -dependency 'puppetlabs/firewall', '>= 0.0.4' -dependency 'puppetlabs/apt', '>=1.1.0 <2.0.0' -dependency 'puppetlabs/concat', '>= 1.0.0 <2.0.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/NOTICE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/NOTICE deleted file mode 100644 index c01b4637bc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/NOTICE +++ /dev/null @@ -1,14 +0,0 @@ -Puppetlabs postgresql module - -Copyright 2012 Inkling Systems Inc -Copyright 2012-2013 Puppet Labs Inc -Copyright 2012-2013 Camptocamp SA. - -This product includes software developed by: - The Puppet Labs Inc (http://www.puppetlabs.com/). - -This product includes also software developed by: - Camptocamp SA (http://www.camptocamp.com/) - -This product includes also software developed by: - Inkling Systems Inc (https://www.inkling.com/) diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/README.md deleted file mode 100644 index 7a26cb9f4a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/README.md +++ /dev/null @@ -1,901 +0,0 @@ -postgresql -========== - -Table of Contents ------------------ - -1. [Overview - What is the PostgreSQL module?](#overview) -2. [Module Description - What does the module do?](#module-description) -3. [Setup - The basics of getting started with PostgreSQL module](#setup) - * [PE 3.2 supported module](#pe-3.2-supported-module) - * [Configuring the server](#configuring-the-server) -4. [Usage - How to use the module for various tasks](#usage) -5. [Upgrading - Guide for upgrading from older revisions of this module](#upgrading) -6. [Reference - The classes, defines,functions and facts available in this module](#reference) -7. [Limitations - OS compatibility, etc.](#limitations) -8. [Development - Guide for contributing to the module](#development) -9. [Disclaimer - Licensing information](#disclaimer) -10. [Transfer Notice - Notice of authorship change](#transfer-notice) -11. [Contributors - List of module contributors](#contributors) - -Overview --------- - -The PostgreSQL module allows you to easily manage postgres databases with Puppet. - -Module Description -------------------- - -PostgreSQL is a high-performance, free, open-source relational database server. The postgresql module allows you to manage PostgreSQL packages and services on several operating systems, while also supporting basic management of PostgreSQL databases and users. The module offers support for managing firewall for postgres ports on RedHat-based distros, as well as support for basic management of common security settings. - -Setup ------ - -**What puppetlabs-PostgreSQL affects:** - -* package/service/configuration files for PostgreSQL -* listened-to ports -* system firewall (optional) -* IP and mask (optional) - -**Introductory Questions** - -The postgresql module offers many security configuration settings. Before getting started, you will want to consider: - -* Do you want/need to allow remote connections? - * If yes, what about TCP connections? -* Would you prefer to work around your current firewall settings or overwrite some of them? -* How restrictive do you want the database superuser's permissions to be? - -Your answers to these questions will determine which of the module's parameters you'll want to specify values for. - -###PE 3.2 supported module - -PE 3.2 introduces Puppet Labs supported modules. The version of the postgresql module that ships within PE 3.2 is supported via normal [Puppet Enterprise support](http://puppetlabs.com/services/customer-support) channels. If you would like to access the [supported module](http://forge.puppetlabs.com/supported) version, you will need to uninstall the shipped module and install the supported version from the Puppet Forge. You can do this by first running - - # puppet module uninstall puppetlabs-postgresql -and then running - - # puppet module install puppetlabs/postgresql - -###Configuring the server - -The main configuration you'll need to do will be around the `postgresql::server` class. The default parameters are reasonable, but fairly restrictive regarding permissions for who can connect and from where. To manage a PostgreSQL server with sane defaults: - - class { 'postgresql::server': } - -For a more customized configuration: - - class { 'postgresql::server': - ip_mask_deny_postgres_user => '0.0.0.0/32', - ip_mask_allow_all_users => '0.0.0.0/0', - listen_addresses => '*', - ipv4acls => ['hostssl all johndoe 192.168.0.0/24 cert'], - manage_firewall => true, - postgres_password => 'TPSrep0rt!', - } - -Once you've completed your configuration of `postgresql::server`, you can test out your settings from the command line: - - $ psql -h localhost -U postgres - $ psql -h my.postgres.server -U - -If you get an error message from these commands, it means that your permissions are set in a way that restricts access from where you're trying to connect. That might be a good thing or a bad thing, depending on your goals. - -For more details about server configuration parameters consult the [PostgreSQL Runtime Configuration docs](http://www.postgresql.org/docs/9.2/static/runtime-config.html). - -Usage ------ - -###Creating a database - -There are many ways to set up a postgres database using the `postgresql::server::db` class. For instance, to set up a database for PuppetDB: - - class { 'postgresql::server': } - - postgresql::server::db { 'mydatabasename': - user => 'mydatabaseuser', - password => postgresql_password('mydatabaseuser', 'mypassword'), - } - -###Managing users, roles and permissions - -To manage users, roles and permissions: - - class { 'postgresql::server': } - - postgresql::server::role { 'marmot': - password_hash => postgresql_password('marmot', 'mypasswd'), - } - - postgresql::server::database_grant { 'test1': - privilege => 'ALL', - db => 'test1', - role => 'marmot', - } - - postgresql::server::table_grant { 'my_table of test2': - privilege => 'ALL', - table => 'my_table', - db => 'test2', - role => 'marmot', - } - -In this example, you would grant ALL privileges on the test1 database and on the `my_table` table of the test2 database to the user or group specified by dan. - -At this point, you would just need to plunk these database name/username/password values into your PuppetDB config files, and you are good to go. - -Upgrading ---------- - -###Upgrading from 2.x to version 3 - -*Note:* if you are upgrading for 2.x, you *must* read this, as just about everything has changed. - -Version 3 was a major rewrite to fix some internal dependency issues, and to make the new Public API more clear. As a consequence a lot of things have changed for version 3 and older revisions that we will try to outline here. - -####Server specific objects now moved under `postgresql::server::` namespace - -To restructure server specific elements under the `postgresql::server::` namespaces the following objects were renamed as such: - -* `postgresql::database` -> `postgresql::server::database` -* `postgresql::database_grant` -> `postgresql::server::database_grant` -* `postgresql::db` -> `postgresql::server::db` -* `postgresql::grant` -> `postgresql::server::grant` -* `postgresql::pg_hba_rule` -> `postgresql::server::pg_hba_rule` -* `postgresql::plperl` -> `postgresql::server::plperl` -* `postgresql::contrib` -> `postgresql::server::contrib` -* `postgresql::role` -> `postgresql::server::role` -* `postgresql::table_grant` -> `postgresql::server::table_grant` -* `postgresql::tablespace` -> `postgresql::server::tablespace` - -####New `postgresql::server::config_entry` resource for managing configuration - -Previously we used the `file_line` resource to modify `postgresql.conf`. This new revision now adds a new resource named `postgresql::server::config_entry` for managing this file. For example: - - postgresql::server::config_entry { 'check_function_bodies': - value => 'off', - } - -If you were using `file_line` for this purpose, you should change to this new methodology. - -####`postgresql_puppet_extras.conf` has been removed - -Now that we have a methodology for managing `postgresql.conf`, and due to concerns over the file management methodology using an `exec { 'touch ...': }` as a way to create an empty file the existing postgresql\_puppet\_extras.conf file is no longer managed by this module. - -If you wish to recreate this methodology yourself, use this pattern: - - class { 'postgresql::server': } - - $extras = "/tmp/include.conf" - - file { $extras: - content => 'max_connections = 123', - notify => Class['postgresql::server::service'], - }-> - postgresql::server::config_entry { 'include': - value => $extras, - } - -####All uses of the parameter `charset` changed to `encoding` - -Since PostgreSQL uses the terminology `encoding` not `charset` the parameter has been made consisent across all classes and resources. - -####The `postgresql` base class is no longer how you set globals - -The old global override pattern was less then optimal so it has been fixed, however we decided to demark this properly by specifying these overrides in the class `postgresql::globals`. Consult the documentation for this class now to see what options are available. - -Also, some parameter elements have been moved between this and the `postgresql::server` class where it made sense. - -####`config_hash` parameter collapsed for the `postgresql::server` class - -Because the `config_hash` was really passing data through to what was in effect an internal class (`postgresql::config`). And since we don't want this kind of internal exposure the parameters were collapsed up into the `postgresql::server` class directly. - -####Lots of changes to 'private' or 'undocumented' classes - -If you were using these before, these have changed names. You should only use what is documented in this README.md, and if you don't have what you need you should raise a patch to add that feature to a public API. All internal classes now have a comment at the top indicating them as private to make sure the message is clear that they are not supported as Public API. - -####`pg_hba_conf_defaults` parameter included to turn off default pg\_hba rules - -The defaults should be good enough for most cases (if not raise a bug) but if you simply need an escape hatch, this setting will turn off the defaults. If you want to do this, it may affect the rest of the module so make sure you replace the rules with something that continues operation. - -####`postgresql::database_user` has now been removed - -Use `postgresql::server::role` instead. - -####`postgresql::psql` resource has now been removed - -Use `postgresql_psql` instead. In the future we may recreate this as a wrapper to add extra capability, but it will not match the old behaviour. - -####`postgresql_default_version` fact has now been removed - -It didn't make sense to have this logic in a fact any more, the logic has been moved into `postgresql::params`. - -####`ripienaar/concat` is no longer used, instead we use `puppetlabs/concat` - -The older concat module is now deprecated and moved into the `puppetlabs/concat` namespace. Functionality is more or less identical, but you may need to intervene during the installing of this package - as both use the same `concat` namespace. - -Reference ---------- - -The postgresql module comes with many options for configuring the server. While you are unlikely to use all of the below settings, they allow you a decent amount of control over your security settings. - -Classes: - -* [postgresql::client](#class-postgresqlclient) -* [postgresql::globals](#class-postgresqlglobals) -* [postgresql::lib::devel](#class-postgresqllibdevel) -* [postgresql::lib::java](#class-postgresqllibjava) -* [postgresql::lib::python](#class-postgresqllibpython) -* [postgresql::server](#class-postgresqlserver) -* [postgresql::server::plperl](#class-postgresqlserverplperl) -* [postgresql::server::contrib](#class-postgresqlservercontrib) - -Resources: - -* [postgresql::server::config_entry](#resource-postgresqlserverconfigentry) -* [postgresql::server::db](#resource-postgresqlserverdb) -* [postgresql::server::database](#resource-postgresqlserverdatabase) -* [postgresql::server::database_grant](#resource-postgresqlserverdatabasegrant) -* [postgresql::server::pg_hba_rule](#resource-postgresqlserverpghbarule) -* [postgresql::server::role](#resource-postgresqlserverrole) -* [postgresql::server::table_grant](#resource-postgresqlservertablegrant) -* [postgresql::server::tablespace](#resource-postgresqlservertablespace) -* [postgresql::validate_db_connection](#resource-postgresqlvalidatedbconnection) - -Functions: - -* [postgresql\_password](#function-postgresqlpassword) -* [postgresql\_acls\_to\_resources\_hash](#function-postgresqlaclstoresourceshashaclarray-id-orderoffset) - - -###Class: postgresql::globals -*Note:* most server specific defaults should be overriden in the `postgresql::server` class. This class should only be used if you are using a non-standard OS or if you are changing elements such as `version` or `manage_package_repo` that can only be changed here. - -This class allows you to configure the main settings for this module in a global way, to be used by the other classes and defined resources. On its own it does nothing. - -For example, if you wanted to overwrite the default `locale` and `encoding` for all classes you could use the following combination: - - class { 'postgresql::globals': - encoding => 'UTF8', - locale => 'en_NG', - }-> - class { 'postgresql::server': - } - -That would make the `encoding` and `locale` the default for all classes and defined resources in this module. - -If you want to use the upstream PostgreSQL packaging, and be specific about the version you wish to download, you could use something like this: - - class { 'postgresql::globals': - manage_package_repo => true, - version => '9.2', - }-> - class { 'postgresql::server': } - -####`client_package_name` -This setting can be used to override the default postgresql client package name. If not specified, the module will use whatever package name is the default for your OS distro. - -####`server_package_name` -This setting can be used to override the default postgresql server package name. If not specified, the module will use whatever package name is the default for your OS distro. - -####`contrib_package_name` -This setting can be used to override the default postgresql contrib package name. If not specified, the module will use whatever package name is the default for your OS distro. - -####`devel_package_name` -This setting can be used to override the default postgresql devel package name. If not specified, the module will use whatever package name is the default for your OS distro. - -####`java_package_name` -This setting can be used to override the default postgresql java package name. If not specified, the module will use whatever package name is the default for your OS distro. - -####`plperl_package_name` -This setting can be used to override the default postgresql PL/perl package name. If not specified, the module will use whatever package name is the default for your OS distro. - -####`python_package_name` -This setting can be used to override the default postgresql Python package name. If not specified, the module will use whatever package name is the default for your OS distro. - -####`service_name` -This setting can be used to override the default postgresql service name. If not specified, the module will use whatever service name is the default for your OS distro. - -####`service_provider` -This setting can be used to override the default postgresql service provider. If not specified, the module will use whatever service provider is the default for your OS distro. - -####`service_status` -This setting can be used to override the default status check command for your PostgreSQL service. If not specified, the module will use whatever service status is the default for your OS distro. - -####`default_database` -This setting is used to specify the name of the default database to connect with. On most systems this will be "postgres". - -####`initdb_path` -Path to the `initdb` command. - -####`createdb_path` -Path to the `createdb` command. - -####`psql_path` -Path to the `psql` command. - -####`pg_hba_conf_path` -Path to your `pg\_hba.conf` file. - -####`postgresql_conf_path` -Path to your `postgresql.conf` file. - -####`pg_hba_conf_defaults` -If false, disables the defaults supplied with the module for `pg\_hba.conf`. This is useful if you disagree with the defaults and wish to override them yourself. Be sure that your changes of course align with the rest of the module, as some access is required to perform basic `psql` operations for example. - -####`datadir` -This setting can be used to override the default postgresql data directory for the target platform. If not specified, the module will use whatever directory is the default for your OS distro. - -####`confdir` -This setting can be used to override the default postgresql configuration directory for the target platform. If not specified, the module will use whatever directory is the default for your OS distro. - -####`bindir` -This setting can be used to override the default postgresql binaries directory for the target platform. If not specified, the module will use whatever directory is the default for your OS distro. - -####`xlogdir` -This setting can be used to override the default postgresql xlog directory. If not specified the module will use initdb's default path. - -####`user` -This setting can be used to override the default postgresql super user and owner of postgresql related files in the file system. If not specified, the module will use the user name 'postgres'. - -####`group` -This setting can be used to override the default postgresql user group to be used for related files in the file system. If not specified, the module will use the group name 'postgres'. - -####`version` -The version of PostgreSQL to install/manage. This is a simple way of providing a specific version such as '9.2' or '8.4' for example. - -Defaults to your operating system default. - -####`needs_initdb` -This setting can be used to explicitly call the initdb operation after server package is installed and before the postgresql service is started. If not specified, the module will decide whether to call initdb or not depending on your OS distro. - -####`encoding` -This will set the default encoding encoding for all databases created with this module. On certain operating systems this will be used during the `template1` initialization as well so it becomes a default outside of the module as well. Defaults to the operating system default. - -####`locale` -This will set the default database locale for all databases created with this module. On certain operating systems this will be used during the `template1` initialization as well so it becomes a default outside of the module as well. Defaults to `undef` which is effectively `C`. - -#####Debian - -On Debian you'll need to ensure that the 'locales-all' package is installed for full functionality of Postgres. - -####`firewall_supported` -This allows you to override the automated detection to see if your OS supports the `firewall` module. - -####`manage_package_repo` -If `true` this will setup the official PostgreSQL repositories on your host. Defaults to `false`. - -###Class: postgresql::server -The following list are options that you can set in the `config_hash` parameter of `postgresql::server`. - -####`ensure` -This value default to `present`. When set to `absent` it will remove all packages, configuration and data so use this with extreme caution. - -####`version` -This will set the version of the PostgreSQL software to install. Defaults to your operating systems default. - -####`postgres_password` -This value defaults to `undef`, meaning the super user account in the postgres database is a user called `postgres` and this account does not have a password. If you provide this setting, the module will set the password for the `postgres` user to your specified value. - -####`package_name` -The name of the package to use for installing the server software. Defaults to the default for your OS distro. - -####`package_ensure` -Value to pass through to the `package` resource when creating the server instance. Defaults to `undef`. - -####`plperl_package_name` -This sets the default package name for the PL/Perl extension. Defaults to utilising the operating system default. - -####`service_name` -This setting can be used to override the default postgresql service name. If not specified, the module will use whatever service name is the default for your OS distro. - -####`service_name` -This setting can be used to override the default postgresql service provider. If not specified, the module will use whatever service name is the default for your OS distro. - -####`service_status` -This setting can be used to override the default status check command for your PostgreSQL service. If not specified, the module will use whatever service name is the default for your OS distro. - -####`default_database` -This setting is used to specify the name of the default database to connect with. On most systems this will be "postgres". - -####`listen_addresses` -This value defaults to `localhost`, meaning the postgres server will only accept connections from localhost. If you'd like to be able to connect to postgres from remote machines, you can override this setting. A value of `*` will tell postgres to accept connections from any remote machine. Alternately, you can specify a comma-separated list of hostnames or IP addresses. (For more info, have a look at the `postgresql.conf` file from your system's postgres package). - -####`ip_mask_deny_postgres_user` -This value defaults to `0.0.0.0/0`. Sometimes it can be useful to block the superuser account from remote connections if you are allowing other database users to connect remotely. Set this to an IP and mask for which you want to deny connections by the postgres superuser account. So, e.g., the default value of `0.0.0.0/0` will match any remote IP and deny access, so the postgres user won't be able to connect remotely at all. Conversely, a value of `0.0.0.0/32` would not match any remote IP, and thus the deny rule will not be applied and the postgres user will be allowed to connect. - -####`ip_mask_allow_all_users` -This value defaults to `127.0.0.1/32`. By default, Postgres does not allow any database user accounts to connect via TCP from remote machines. If you'd like to allow them to, you can override this setting. You might set it to `0.0.0.0/0` to allow database users to connect from any remote machine, or `192.168.0.0/16` to allow connections from any machine on your local 192.168 subnet. - -####`ipv4acls` -List of strings for access control for connection method, users, databases, IPv4 addresses; see [postgresql documentation](http://www.postgresql.org/docs/9.2/static/auth-pg-hba-conf.html) about `pg_hba.conf` for information (please note that the link will take you to documentation for the most recent version of Postgres, however links for earlier versions can be found on that page). - -####`ipv6acls` -List of strings for access control for connection method, users, databases, IPv6 addresses; see [postgresql documentation](http://www.postgresql.org/docs/9.2/static/auth-pg-hba-conf.html) about `pg_hba.conf` for information (please note that the link will take you to documentation for the most recent version of Postgres, however links for earlier versions can be found on that page). - -####`initdb_path` -Path to the `initdb` command. - -####`createdb_path` -Path to the `createdb` command. - -####`psql_path` -Path to the `psql` command. - -####`pg_hba_conf_path` -Path to your `pg\_hba.conf` file. - -####`postgresql_conf_path` -Path to your `postgresql.conf` file. - -####`pg_hba_conf_defaults` -If false, disables the defaults supplied with the module for `pg\_hba.conf`. This is useful if you di -sagree with the defaults and wish to override them yourself. Be sure that your changes of course alig -n with the rest of the module, as some access is required to perform basic `psql` operations for exam -ple. - -####`user` -This setting can be used to override the default postgresql super user and owner of postgresql related files in the file system. If not specified, the module will use the user name 'postgres'. - -####`group` -This setting can be used to override the default postgresql user group to be used for related files in the file system. If not specified, the module will use the group name 'postgres'. - -####`needs_initdb` -This setting can be used to explicitly call the initdb operation after server package is installed and before the postgresql service is started. If not specified, the module will decide whether to call initdb or not depending on your OS distro. - -####`encoding` -This will set the default encoding encoding for all databases created with this module. On certain operating systems this will be used during the `template1` initialization as well so it becomes a default outside of the module as well. Defaults to the operating system default. - -####`locale` -This will set the default database locale for all databases created with this module. On certain operating systems this will be used during the `template1` initialization as well so it becomes a default outside of the module as well. Defaults to `undef` which is effectively `C`. - -#####Debian - -On Debian you'll need to ensure that the 'locales-all' package is installed for full functionality of Postgres. - -####`manage_firewall` -This value defaults to `false`. Many distros ship with a fairly restrictive firewall configuration which will block the port that postgres tries to listen on. If you'd like for the puppet module to open this port for you (using the [puppetlabs-firewall](http://forge.puppetlabs.com/puppetlabs/firewall) module), change this value to true. Check the documentation for `puppetlabs/firewall` to ensure the rest of the global setup is applied, to ensure things like persistence and global rules are set correctly. - -####`manage_pg_hba_conf` -This value defaults to `true`. Whether or not manage the pg_hba.conf. If set to `true`, puppet will overwrite this file. If set to `false`, puppet will not modify the file. - - -###Class: postgresql::client - -This class installs postgresql client software. Alter the following parameters if you have a custom version you would like to install (Note: don't forget to make sure to add any necessary yum or apt repositories if specifying a custom version): - -####`package_name` -The name of the postgresql client package. - -####`package_ensure` -The ensure parameter passed on to postgresql client package resource. - - -###Class: postgresql::server::contrib -Installs the postgresql contrib package. - -####`package_name` -The name of the postgresql contrib package. - -####`package_ensure` -The ensure parameter passed on to postgresql contrib package resource. - - -###Class: postgresql::lib::devel -Installs the packages containing the development libraries for PostgreSQL. - -####`package_ensure` -Override for the `ensure` parameter during package installation. Defaults to `present`. - -####`package_name` -Overrides the default package name for the distribution you are installing to. Defaults to `postgresql-devel` or `postgresql-devel` depending on your distro. - - -###Class: postgresql::lib::java -This class installs postgresql bindings for Java (JDBC). Alter the following parameters if you have a custom version you would like to install (Note: don't forget to make sure to add any necessary yum or apt repositories if specifying a custom version): - -####`package_name` -The name of the postgresql java package. - -####`package_ensure` -The ensure parameter passed on to postgresql java package resource. - - -###Class: postgresql::lib::python -This class installs the postgresql Python libraries. For customer requirements you can customise the following parameters: - -####`package_name` -The name of the postgresql python package. - -####`package_ensure` -The ensure parameter passed on to postgresql python package resource. - - -###Class: postgresql::server::plperl -This class installs the PL/Perl procedural language for postgresql. - -####`package_name` -The name of the postgresql PL/Perl package. - -####`package_ensure` -The ensure parameter passed on to postgresql PL/Perl package resource. - - -###Resource: postgresql::server::config\_entry -This resource can be used to modify your `postgresql.conf` configuration file. - -Each resource maps to a line inside your `postgresql.conf` file, for example: - - postgresql::server::config_entry { 'check_function_bodies': - value => 'off', - } - -####`namevar` -Name of the setting to change. - -####`ensure` -Set to `absent` to remove an entry. - -####`value` -Value for the setting. - - -###Resource: postgresql::server::db -This is a convenience resource that creates a database, user and assigns necessary permissions in one go. - -For example, to create a database called `test1` with a corresponding user of the same name, you can use: - - postgresql::server::db { 'test1': - user => 'test1', - password => 'test1', - } - -####`namevar` -The namevar for the resource designates the name of the database. - -####`user` -User to create and assign access to the database upon creation. Mandatory. - -####`password` -Password for the created user. Mandatory. - -####`encoding` -Override the character set during creation of the database. Defaults to the default defined during installation. - -####`locale` -Override the locale during creation of the database. Defaults to the default defined during installation. - -####`grant` -Grant permissions during creation. Defaults to `ALL`. - -####`tablespace` -The name of the tablespace to allocate this database to. If not specifies, it defaults to the PostgreSQL default. - -####`istemplate` -Define database as a template. Defaults to `false`. - - -###Resource: postgresql::server::database -This defined type can be used to create a database with no users and no permissions, which is a rare use case. - -####`namevar` -The name of the database to create. - -####`dbname` -The name of the database, defaults to the namevar. - -####`owner` -Name of the database user who should be set as the owner of the database. Defaults to the $user variable set in `postgresql::server` or `postgresql::globals`. - -####`tablespace` -Tablespace for where to create this database. Defaults to the defaults defined during PostgreSQL installation. - -####`encoding` -Override the character set during creation of the database. Defaults to the default defined during installation. - -####`locale` -Override the locale during creation of the database. Defaults to the default defined during installation. - -####`istemplate` -Define database as a template. Defaults to `false`. - - -###Resource: postgresql::server::database\_grant -This defined type manages grant based access privileges for users, wrapping the `postgresql::server::database_grant` for database specific permissions. Consult the PostgreSQL documentation for `grant` for more information. - -####`namevar` -Used to uniquely identify this resource, but functionality not used during grant. - -####`privilege` -Can be one of `SELECT`, `TEMPORARY`, `TEMP`, `CONNECT`. `ALL` is used as a synonym for `CREATE`. If you need to add multiple privileges, a space delimited string can be used. - -####`db` -Database to grant access to. - -####`role` -Role or user whom you are granting access for. - -####`psql_db` -Database to execute the grant against. This should not ordinarily be changed from the default, which is `postgres`. - -####`psql_user` -OS user for running `psql`. Defaults to the default user for the module, usually `postgres`. - - -###Resource: postgresql::server::pg\_hba\_rule -This defined type allows you to create an access rule for `pg_hba.conf`. For more details see the [PostgreSQL documentation](http://www.postgresql.org/docs/8.2/static/auth-pg-hba-conf.html). - -For example: - - postgresql::server::pg_hba_rule { 'allow application network to access app database': - description => "Open up postgresql for access from 200.1.2.0/24", - type => 'host', - database => 'app', - user => 'app', - address => '200.1.2.0/24', - auth_method => 'md5', - } - -This would create a ruleset in `pg_hba.conf` similar to: - - # Rule Name: allow application network to access app database - # Description: Open up postgresql for access from 200.1.2.0/24 - # Order: 150 - host app app 200.1.2.0/24 md5 - -####`namevar` -A unique identifier or short description for this rule. The namevar doesn't provide any functional usage, but it is stored in the comments of the produced `pg_hba.conf` so the originating resource can be identified. - -####`description` -A longer description for this rule if required. Defaults to `none`. This description is placed in the comments above the rule in `pg_hba.conf`. - -####`type` -The type of rule, this is usually one of: `local`, `host`, `hostssl` or `hostnossl`. - -####`database` -A comma separated list of databases that this rule matches. - -####`user` -A comma separated list of database users that this rule matches. - -####`address` -If the type is not 'local' you can provide a CIDR based address here for rule matching. - -####`auth_method` -The `auth_method` is described further in the `pg_hba.conf` documentation, but it provides the method that is used for authentication for the connection that this rule matches. - -####`auth_option` -For certain `auth_method` settings there are extra options that can be passed. Consult the PostgreSQL `pg_hba.conf` documentation for further details. - -####`order` -An order for placing the rule in `pg_hba.conf`. Defaults to `150`. - -####`target` -This provides the target for the rule, and is generally an internal only property. Use with caution. - - -###Resource: postgresql::server::role -This resource creates a role or user in PostgreSQL. - -####`namevar` -The role name to create. - -####`password_hash` -The hash to use during password creation. If the password is not already pre-encrypted in a format that PostgreSQL supports, use the `postgresql_password` function to provide an MD5 hash here, for example: - - postgresql::role { "myusername": - password_hash => postgresql_password('myusername', 'mypassword'), - } - -####`createdb` -Whether to grant the ability to create new databases with this role. Defaults to `false`. - -####`createrole` -Whether to grant the ability to create new roles with this role. Defaults to `false`. - -####`login` -Whether to grant login capability for the new role. Defaults to `false`. - -####`superuser` -Whether to grant super user capability for the new role. Defaults to `false`. - -####`replication` -If `true` provides replication capabilities for this role. Defaults to `false`. - -####`connection_limit` -Specifies how many concurrent connections the role can make. Defaults to `-1` meaning no limit. - -####`username` -The username of the role to create, defaults to `namevar`. - - -###Resource: postgresql::server::table\_grant -This defined type manages grant based access privileges for users. Consult the PostgreSQL documentation for `grant` for more information. - -####`namevar` -Used to uniquely identify this resource, but functionality not used during grant. - -####`privilege` -Can be one of `SELECT`, `INSERT`, `UPDATE`, `REFERENCES`. `ALL` is used as a synonym for `CREATE`. If you need to add multiple privileges, a space delimited string can be used. - -####`table` -Table to grant access on. - -####`db` -Database of table. - -####`role` -Role or user whom you are granting access for. - -####`psql_db` -Database to execute the grant against. This should not ordinarily be changed from the default, which is `postgres`. - -####`psql_user` -OS user for running `psql`. Defaults to the default user for the module, usually `postgres`. - - -###Resource: postgresql::server::tablespace -This defined type can be used to create a tablespace. For example: - - postgresql::tablespace { 'tablespace1': - location => '/srv/space1', - } - -It will create the location if necessary, assigning it the same permissions as your -PostgreSQL server. - -####`namevar` -The tablespace name to create. - -####`location` -The path to locate this tablespace. - -####`owner` -The default owner of the tablespace. - -####`spcname` -Name of the tablespace. Defaults to `namevar`. - - -###Resource: postgresql::validate\_db\_connection -This resource can be utilised inside composite manifests to validate that a client has a valid connection with a remote PostgreSQL database. It can be ran from any node where the PostgreSQL client software is installed to validate connectivity before commencing other dependent tasks in your Puppet manifests, so it is often used when chained to other tasks such as: starting an application server, performing a database migration. - -Example usage: - - postgresql::validate_db_connection { 'validate my postgres connection': - database_host => 'my.postgres.host', - database_username => 'mydbuser', - database_password => 'mydbpassword', - database_name => 'mydbname', - }-> - exec { 'rake db:migrate': - cwd => '/opt/myrubyapp', - } - -####`namevar` -Uniquely identify this resource, but functionally does nothing. - -####`database_host` -The hostname of the database you wish to test. Defaults to 'undef' which generally uses the designated local unix socket. - -####`database_port` -Port to use when connecting. Default to 'undef' which generally defaults to 5432 depending on your PostgreSQL packaging. - -####`database_name` -The name of the database you wish to test. Defaults to 'postgres'. - -####`database_username` -Username to connect with. Defaults to 'undef', which when using a unix socket and ident auth will be the user you are running as. If the host is remote you must provide a username. - -####`database_password` -Password to connect with. Can be left blank, but that is not recommended. - -####`run_as` -The user to run the `psql` command with for authenticiation. This is important when trying to connect to a database locally using Unix sockets and `ident` authentication. It is not needed for remote testing. - -####`sleep` -Upon failure, sets the number of seconds to sleep for before trying again. - -####`tries` -Upon failure, sets the number of attempts before giving up and failing the resource. - -####`create_db_first` -This will ensure the database is created before running the test. This only really works if your test is local. Defaults to `true`. - - -###Function: postgresql\_password -If you need to generate a postgres encrypted password, use `postgresql_password`. You can call it from your production manifests if you don't mind them containing the clear text versions of your passwords, or you can call it from the command line and then copy and paste the encrypted password into your manifest: - - $ puppet apply --execute 'notify { "test": message => postgresql_password("username", "password") }' - -###Function: postgresql\_acls\_to\_resources\_hash(acl\_array, id, order\_offset) -This internal function converts a list of `pg_hba.conf` based acls (passed in as an array of strings) to a format compatible with the `postgresql::pg_hba_rule` resource. - -**This function should only be used internally by the module**. - -Limitations ------------- - -Works with versions of PostgreSQL from 8.1 through 9.2. - -Current it is only actively tested with the following operating systems: - -* Debian 6.x and 7.x -* Centos 5.x and 6.x -* Ubuntu 10.04 and 12.04 - -Although patches are welcome for making it work with other OS distros, it is considered best effort. - -Development ------------- - -Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can't access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve. - -We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. - -You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) - -### Tests - -There are two types of tests distributed with the module. Unit tests with rspec-puppet and system tests using rspec-system. - -For unit testing, make sure you have: - -* rake -* bundler - -Install the necessary gems: - - bundle install --path=vendor - -And then run the unit tests: - - bundle exec rake spec - -The unit tests are ran in Travis-CI as well, if you want to see the results of your own tests regsiter the service hook through Travis-CI via the accounts section for your Github clone of this project. - -If you want to run the system tests, make sure you also have: - -* vagrant > 1.2.x -* Virtualbox > 4.2.10 - -Then run the tests using: - - bundle exec rake spec:system - -To run the tests on different operating systems, see the sets available in .nodeset.yml and run the specific set with the following syntax: - - RSPEC_SET=debian-607-x64 bundle exec rake spec:system - -Transfer Notice ----------------- - -This Puppet module was originally authored by Inkling Systems. The maintainer preferred that Puppet Labs take ownership of the module for future improvement and maintenance as Puppet Labs is using it in the PuppetDB module. Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of Inkling. - -Previously: [https://github.com/inkling/puppet-postgresql](https://github.com/inkling/puppet-postgresql) - -Contributors ------------- - - * Andrew Moon - * [Kenn Knowles](https://github.com/kennknowles) ([@kennknowles](https://twitter.com/KennKnowles)) - * Adrien Thebo - * Albert Koch - * Andreas Ntaflos - * Bret Comnes - * Brett Porter - * Chris Price - * dharwood - * Etienne Pelletier - * Florin Broasca - * Henrik - * Hunter Haugen - * Jari Bakken - * Jordi Boggiano - * Ken Barber - * nzakaria - * Richard Arends - * Spenser Gilliland - * stormcrow - * William Van Hevelingen diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/Rakefile deleted file mode 100644 index 3e7d0059eb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/Rakefile +++ /dev/null @@ -1,11 +0,0 @@ -require 'rubygems' -require 'bundler/setup' - -Bundler.require :default - -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' - -task :default do - sh %{rake -T} -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/files/RPM-GPG-KEY-PGDG b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/files/RPM-GPG-KEY-PGDG deleted file mode 100644 index 065274e0d9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/files/RPM-GPG-KEY-PGDG +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.7 (GNU/Linux) - -mQGiBEeD8koRBACC1VBRsUwGr9gxFFRho9kZpdRUjBJoPhkeOTvp9LzkdAQMFngr -BFi6N0ov1kCX7LLwBmDG+JPR7N+XcH9YR1coSHpLVg+JNy2kFDd4zAyWxJafjZ3a -9zFg9Yx+0va1BJ2t4zVcmKS4aOfbgQ5KwIOWUujalQW5Y+Fw39Gn86qjbwCg5dIo -tkM0l19h2sx50D027pV5aPsD/2c9pfcFTbMhB0CcKS836GH1qY+NCAdUwPs646ee -Ex/k9Uy4qMwhl3HuCGGGa+N6Plyon7V0TzZuRGp/1742dE8IO+I/KLy2L1d1Fxrn -XOTBZd8qe6nBwh12OMcKrsPBVBxn+iSkaG3ULsgOtx+HHLfa1/p22L5+GzGdxizr -peBuA/90cCp+lYcEwdYaRoFVR501yDOTmmzBc1DrsyWP79QMEGzMqa393G0VnqXt -L4pGmunq66Agw2EhPcIt3pDYiCmEt/obdVtSJH6BtmSDB/zYhbE8u3vLP3jfFDa9 -KXxgtYj0NvuUVoRmxSKm8jtfmj1L7zoKNz3jl+Ba3L0WxIv4+bRBUG9zdGdyZVNR -TCBSUE0gQnVpbGRpbmcgUHJvamVjdCA8cGdzcWxycG1zLWhhY2tlcnNAcGdmb3Vu -ZHJ5Lm9yZz6IYAQTEQIAIAUCR4PySgIbIwYLCQgHAwIEFQIIAwQWAgMBAh4BAheA -AAoJEB8W0uFELfD4jnkAoMqd6ZwwsgYHZ3hP9vt+DJt1uDW7AKDbRwP8ESKFhwdJ -8m91RPBeJW/tMLkCDQRHg/JKEAgA64+ZXgcERPYfZYo4p+yMTJAAa9aqnE3U4Ni6 -ZMB57GPuEy8NfbNya+HiftO8hoozmJdcI6XFyRBCDUVCdZ8SE+PJdOx2FFqZVIu6 -dKnr8ykhgLpNNEFDG3boK9UfLj/5lYQ3Y550Iym1QKOgyrJYeAp6sZ+Nx2PavsP3 -nMFCSD67BqAbcLCVQN7a2dAUXfEbfXJjPHXTbo1/kxtzE+KCRTLdXEbSEe3nHO04 -K/EgTBjeBUOxnciH5RylJ2oGy/v4xr9ed7R1jJtshsDKMdWApwoLlCBJ63jg/4T/ -z/OtXmu4AvmWaJxaTl7fPf2GqSqqb6jLCrQAH7AIhXr9V0zPZwADBQgAlpptNQHl -u7euIdIujFwwcxyQGfee6BG+3zaNSEHMVQMuc6bxuvYmgM9r7aki/b0YMfjJBk8v -OJ3Eh1vDH/woJi2iJ13vQ21ot+1JP3fMd6NPR8/qEeDnmVXu7QAtlkmSKI9Rdnjz -FFSUJrQPHnKsH4V4uvAM+njwYD+VFiwlBPTKNeL8cdBb4tPN2cdVJzoAp57wkZAN -VA2tKxNsTJKBi8wukaLWX8+yPHiWCNWItvyB4WCEp/rZKG4A868NM5sZQMAabpLd -l4fTiGu68OYgK9qUPZvhEAL2C1jPDVHPkLm+ZsD+90Pe66w9vB00cxXuHLzm8Pad -GaCXCY8h3xi6VIhJBBgRAgAJBQJHg/JKAhsMAAoJEB8W0uFELfD4K4cAoJ4yug8y -1U0cZEiF5W25HDzMTtaDAKCaM1m3Cbd+AZ0NGWNg/VvIX9MsPA== -=au6K ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/files/validate_postgresql_connection.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/files/validate_postgresql_connection.sh deleted file mode 100644 index f126d99be4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/files/validate_postgresql_connection.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -# usage is: validate_db_connection 2 50 psql - -SLEEP=$1 -TRIES=$2 -PSQL=$3 - -STATE=1 - -for (( c=1; c<=$TRIES; c++ )) -do - echo $c - if [ $c -gt 1 ] - then - echo 'sleeping' - sleep $SLEEP - fi - - /bin/echo "SELECT 1" | $PSQL - STATE=$? - - if [ $STATE -eq 0 ] - then - exit 0 - fi -done - -echo 'Unable to connect to postgresql' - -exit 1 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_acls_to_resources_hash.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_acls_to_resources_hash.rb deleted file mode 100644 index 7fa785486c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_acls_to_resources_hash.rb +++ /dev/null @@ -1,76 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:postgresql_acls_to_resources_hash, :type => :rvalue, :doc => <<-EOS - This internal function translates the ipv(4|6)acls format into a resource - suitable for create_resources. It is not intended to be used outside of the - postgresql internal classes/defined resources. - - This function accepts an array of strings that are pg_hba.conf rules. It - will return a hash that can be fed into create_resources to create multiple - individual pg_hba_rule resources. - - The second parameter is an identifier that will be included in the namevar - to provide uniqueness. It must be a string. - - The third parameter is an order offset, so you can start the order at an - arbitrary starting point. - EOS - ) do |args| - func_name = "postgresql_acls_to_resources_hash()" - - raise(Puppet::ParseError, "#{func_name}: Wrong number of arguments " + - "given (#{args.size} for 3)") if args.size != 3 - - acls = args[0] - raise(Puppet::ParseError, "#{func_name}: first argument must be an array") \ - unless acls.instance_of? Array - - id = args[1] - raise(Puppet::ParseError, "#{func_name}: second argument must be a string") \ - unless id.instance_of? String - - offset = args[2].to_i - raise(Puppet::ParseError, "#{func_name}: third argument must be a number") \ - unless offset.instance_of? Fixnum - - resources = {} - acls.each do |acl| - index = acls.index(acl) - - parts = acl.split - - raise(Puppet::ParseError, "#{func_name}: acl line #{index} does not " + - "have enough parts") unless parts.length >= 4 - - resource = { - 'type' => parts[0], - 'database' => parts[1], - 'user' => parts[2], - 'order' => format('%03d', offset + index), - } - if parts[0] == 'local' then - resource['auth_method'] = parts[3] - if parts.length > 4 then - resource['auth_option'] = parts.last(parts.length - 4).join(" ") - end - else - if parts[4] =~ /^\d/ - resource['address'] = parts[3] + ' ' + parts[4] - resource['auth_method'] = parts[5] - - if parts.length > 6 then - resource['auth_option'] = parts.last(parts.length - 6).join(" ") - end - else - resource['address'] = parts[3] - resource['auth_method'] = parts[4] - - if parts.length > 5 then - resource['auth_option'] = parts.last(parts.length - 5).join(" ") - end - end - end - resources["postgresql class generated rule #{id} #{index}"] = resource - end - resources - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_escape.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_escape.rb deleted file mode 100644 index 4089a4e94d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_escape.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'digest/md5' - -module Puppet::Parser::Functions - newfunction(:postgresql_escape, :type => :rvalue, :doc => <<-EOS - Safely escapes a string using $$ using a random tag which should be consistent - EOS - ) do |args| - - raise(Puppet::ParseError, "postgresql_escape(): Wrong number of arguments " + - "given (#{args.size} for 1)") if args.size != 1 - - password = args[0] - - if password !~ /\$\$/ - retval = "$$#{password}$$" - else - escape = Digest::MD5.hexdigest(password)[0..5].gsub(/\d/,'') - until password !~ /#{escape}/ - escape = Digest::MD5.hexdigest(escape)[0..5].gsub(/\d/,'') - end - retval = "$#{escape}$#{password}$#{escape}$" - end - retval - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_password.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_password.rb deleted file mode 100644 index 0689e0e5b0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/parser/functions/postgresql_password.rb +++ /dev/null @@ -1,18 +0,0 @@ -# hash a string as mysql's "PASSWORD()" function would do it -require 'digest/md5' - -module Puppet::Parser::Functions - newfunction(:postgresql_password, :type => :rvalue, :doc => <<-EOS - Returns the postgresql password hash from the clear text username / password. - EOS - ) do |args| - - raise(Puppet::ParseError, "postgresql_password(): Wrong number of arguments " + - "given (#{args.size} for 2)") if args.size != 2 - - username = args[0] - password = args[1] - - 'md5' + Digest::MD5.hexdigest(password + username) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_conf/parsed.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_conf/parsed.rb deleted file mode 100644 index c9366b5200..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_conf/parsed.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'puppet/provider/parsedfile' - -Puppet::Type.type(:postgresql_conf).provide( - :parsed, - :parent => Puppet::Provider::ParsedFile, - :default_target => '/etc/postgresql.conf', - :filetype => :flat -) do - desc "Set key/values in postgresql.conf." - - text_line :comment, :match => /^\s*#/ - text_line :blank, :match => /^\s*$/ - - record_line :parsed, - :fields => %w{name value comment}, - :optional => %w{comment}, - :match => /^\s*([\w\.]+)\s*=?\s*(.*?)(?:\s*#\s*(.*))?\s*$/, - :to_line => proc { |h| - - # simple string and numeric values don't need to be enclosed in quotes - dontneedquote = h[:value].match(/^(\w+|[0-9.-]+)$/) - dontneedequal = h[:name].match(/^(include|include_if_exists)$/i) - - str = h[:name].downcase # normalize case - str += dontneedequal ? ' ' : ' = ' - str += "'" unless dontneedquote && !dontneedequal - str += h[:value] - str += "'" unless dontneedquote && !dontneedequal - str += " # #{h[:comment]}" unless (h[:comment].nil? or h[:comment] == :absent) - str - }, - :post_parse => proc { |h| - h[:name].downcase! # normalize case - h[:value].gsub!(/(^'|'$)/, '') # strip out quotes - } - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_psql/ruby.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_psql/ruby.rb deleted file mode 100644 index b86fb62a6e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/provider/postgresql_psql/ruby.rb +++ /dev/null @@ -1,93 +0,0 @@ -Puppet::Type.type(:postgresql_psql).provide(:ruby) do - - def command() - if ((! resource[:unless]) or (resource[:unless].empty?)) - if (resource.refreshonly?) - # So, if there's no 'unless', and we're in "refreshonly" mode, - # we need to return the target command here. If we don't, - # then Puppet will generate an event indicating that this - # property has changed. - return resource[:command] - end - - # if we're not in refreshonly mode, then we return nil, - # which will cause Puppet to sync this property. This - # is what we want if there is no 'unless' value specified. - return nil - end - - if Puppet::PUPPETVERSION.to_f < 4 - output, status = run_unless_sql_command(resource[:unless]) - else - output = run_unless_sql_command(resource[:unless]) - status = output.exitcode - end - - if status != 0 - puts status - self.fail("Error evaluating 'unless' clause: '#{output}'") - end - result_count = output.strip.to_i - if result_count > 0 - # If the 'unless' query returned rows, then we don't want to execute - # the 'command'. Returning the target 'command' here will cause - # Puppet to treat this property as already being 'insync?', so it - # won't call the setter to run the 'command' later. - return resource[:command] - end - - # Returning 'nil' here will cause Puppet to see this property - # as out-of-sync, so it will call the setter later. - nil - end - - def command=(val) - output, status = run_sql_command(val) - - if status != 0 - self.fail("Error executing SQL; psql returned #{status}: '#{output}'") - end - end - - - def run_unless_sql_command(sql) - # for the 'unless' queries, we wrap the user's query in a 'SELECT COUNT', - # which makes it easier to parse and process the output. - run_sql_command('SELECT COUNT(*) FROM (' << sql << ') count') - end - - def run_sql_command(sql) - if resource[:search_path] - sql = "set search_path to #{Array(resource[:search_path]).join(',')}; #{sql}" - end - - command = [resource[:psql_path]] - command.push("-d", resource[:db]) if resource[:db] - command.push("-t", "-c", sql) - - if resource[:cwd] - Dir.chdir resource[:cwd] do - run_command(command, resource[:psql_user], resource[:psql_group]) - end - else - run_command(command, resource[:psql_user], resource[:psql_group]) - end - end - - def run_command(command, user, group) - if Puppet::PUPPETVERSION.to_f < 3.4 - Puppet::Util::SUIDManager.run_and_capture(command, user, group) - else - output = Puppet::Util::Execution.execute(command, { - :uid => user, - :gid => group, - :failonfail => false, - :combine => true, - :override_locale => true, - :custom_environment => {} - }) - [output, $CHILD_STATUS.dup] - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_conf.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_conf.rb deleted file mode 100644 index f227fd7824..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_conf.rb +++ /dev/null @@ -1,31 +0,0 @@ -module Puppet - newtype(:postgresql_conf) do - - @doc = "This type allows puppet to manage postgresql.conf parameters." - - ensurable - - newparam(:name) do - desc "The postgresql parameter name to manage." - isnamevar - - newvalues(/^[\w\.]+$/) - end - - newproperty(:value) do - desc "The value to set for this parameter." - end - - newproperty(:target) do - desc "The path to postgresql.conf" - defaultto { - if @resource.class.defaultprovider.ancestors.include?(Puppet::Provider::ParsedFile) - @resource.class.defaultprovider.default_target - else - nil - end - } - end - - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_psql.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_psql.rb deleted file mode 100644 index 8646914d6e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/lib/puppet/type/postgresql_psql.rb +++ /dev/null @@ -1,89 +0,0 @@ -Puppet::Type.newtype(:postgresql_psql) do - - newparam(:name) do - desc "An arbitrary tag for your own reference; the name of the message." - isnamevar - end - - newproperty(:command) do - desc 'The SQL command to execute via psql.' - - defaultto { @resource[:name] } - - def sync(refreshing = false) - # We're overriding 'sync' here in order to do some magic - # in support of providing a 'refreshonly' parameter. This - # is kind of hacky because the logic for 'refreshonly' is - # spread between the type and the provider, but this is - # the least horrible way that I could determine to accomplish - # it. - # - # Note that our overridden version of 'sync' takes a parameter, - # 'refreshing', which the parent version doesn't take. This - # allows us to call the sync method directly from the 'refresh' - # method, and then inside of the body of 'sync' we can tell - # whether or not we're refreshing. - - if (!@resource.refreshonly? || refreshing) - # If we're not in 'refreshonly' mode, or we're not currently - # refreshing, then we just call the parent method. - super() - else - # If we get here, it means we're in 'refreshonly' mode and - # we're not being called by the 'refresh' method, so we - # just no-op. We'll be called again by the 'refresh' - # method momentarily. - nil - end - end - end - - newparam(:unless) do - desc "An optional SQL command to execute prior to the main :command; " + - "this is generally intended to be used for idempotency, to check " + - "for the existence of an object in the database to determine whether " + - "or not the main SQL command needs to be executed at all." - end - - newparam(:db) do - desc "The name of the database to execute the SQL command against." - end - - newparam(:search_path) do - desc "The schema search path to use when executing the SQL command" - end - - newparam(:psql_path) do - desc "The path to psql executable." - defaultto("psql") - end - - newparam(:psql_user) do - desc "The system user account under which the psql command should be executed." - defaultto("postgres") - end - - newparam(:psql_group) do - desc "The system user group account under which the psql command should be executed." - defaultto("postgres") - end - - newparam(:cwd, :parent => Puppet::Parameter::Path) do - desc "The working directory under which the psql command should be executed." - defaultto("/tmp") - end - - newparam(:refreshonly, :boolean => true) do - desc "If 'true', then the SQL will only be executed via a notify/subscribe event." - - defaultto(:false) - newvalues(:true, :false) - end - - def refresh() - # All of the magic for this type is attached to the ':command' property, so - # we just need to sync it to accomplish a 'refresh'. - self.property(:command).sync(true) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/client.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/client.pp deleted file mode 100644 index bdb821d73b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/client.pp +++ /dev/null @@ -1,29 +0,0 @@ -# Install client cli tool. See README.md for more details. -class postgresql::client ( - $package_name = $postgresql::params::client_package_name, - $package_ensure = 'present' -) inherits postgresql::params { - validate_string($package_name) - - package { 'postgresql-client': - ensure => $package_ensure, - name => $package_name, - tag => 'postgresql', - } - - $file_ensure = $package_ensure ? { - 'present' => 'file', - true => 'file', - 'absent' => 'absent', - false => 'absent', - default => 'file', - } - file { "/usr/local/bin/validate_postgresql_connection.sh": - ensure => $file_ensure, - source => "puppet:///modules/postgresql/validate_postgresql_connection.sh", - owner => 0, - group => 0, - mode => 0755, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/globals.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/globals.pp deleted file mode 100644 index ebc117d47e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/globals.pp +++ /dev/null @@ -1,94 +0,0 @@ -# Class for setting cross-class global overrides. See README.md for more -# details. -class postgresql::globals ( - $ensure = undef, - - $client_package_name = undef, - $server_package_name = undef, - $contrib_package_name = undef, - $devel_package_name = undef, - $java_package_name = undef, - $plperl_package_name = undef, - $python_package_name = undef, - - $service_name = undef, - $service_provider = undef, - $service_status = undef, - $default_database = undef, - - $initdb_path = undef, - $createdb_path = undef, - $psql_path = undef, - $pg_hba_conf_path = undef, - $postgresql_conf_path = undef, - - $pg_hba_conf_defaults = undef, - - $datadir = undef, - $confdir = undef, - $bindir = undef, - $xlogdir = undef, - - $user = undef, - $group = undef, - - $version = undef, - - $needs_initdb = undef, - - $encoding = undef, - $locale = undef, - - $manage_firewall = undef, - $manage_pg_hba_conf = undef, - $firewall_supported = undef, - - $manage_package_repo = undef -) { - # We are determining this here, because it is needed by the package repo - # class. - $default_version = $::osfamily ? { - /^(RedHat|Linux)/ => $::operatingsystem ? { - 'Fedora' => $::operatingsystemrelease ? { - /^(18|19|20)$/ => '9.2', - /^(17)$/ => '9.1', - default => undef, - }, - 'Amazon' => '9.2', - default => $::operatingsystemrelease ? { - /^6\./ => '8.4', - /^5\./ => '8.1', - default => undef, - }, - }, - 'Debian' => $::operatingsystem ? { - 'Debian' => $::operatingsystemrelease ? { - /^6\./ => '8.4', - /^(wheezy|7\.)/ => '9.1', - default => undef, - }, - 'Ubuntu' => $::operatingsystemrelease ? { - /^(14.04)$/ => '9.3', - /^(11.10|12.04|12.10|13.04|13.10)$/ => '9.1', - /^(10.04|10.10|11.04)$/ => '8.4', - default => undef, - }, - default => undef, - }, - 'Archlinux' => $::operatingsystem ? { - /Archlinux/ => '9.2', - default => '9.2', - }, - 'FreeBSD' => '93', - default => undef, - } - $globals_version = pick($version, $default_version, 'unknown') - - # Setup of the repo only makes sense globally, so we are doing this here. - if($manage_package_repo) { - class { 'postgresql::repo': - ensure => $ensure, - version => $globals_version - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/lib/devel.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/lib/devel.pp deleted file mode 100644 index 0c446d439c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/lib/devel.pp +++ /dev/null @@ -1,15 +0,0 @@ -# This class installs postgresql development libraries. See README.md for more -# details. -class postgresql::lib::devel( - $package_name = $postgresql::params::devel_package_name, - $package_ensure = 'present' -) inherits postgresql::params { - - validate_string($package_name) - - package { 'postgresql-devel': - ensure => $package_ensure, - name => $package_name, - tag => 'postgresql', - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/lib/java.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/lib/java.pp deleted file mode 100644 index e9ee53dabe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/lib/java.pp +++ /dev/null @@ -1,15 +0,0 @@ -# This class installs the postgresql jdbc connector. See README.md for more -# details. -class postgresql::lib::java ( - $package_name = $postgresql::params::java_package_name, - $package_ensure = 'present' -) inherits postgresql::params { - - validate_string($package_name) - - package { 'postgresql-jdbc': - ensure => $package_ensure, - name => $package_name, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/lib/python.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/lib/python.pp deleted file mode 100644 index bfe0585487..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/lib/python.pp +++ /dev/null @@ -1,13 +0,0 @@ -# This class installs the python libs for postgresql. See README.md for more -# details. -class postgresql::lib::python( - $package_name = $postgresql::params::python_package_name, - $package_ensure = 'present' -) inherits postgresql::params { - - package { 'python-psycopg2': - ensure => $package_ensure, - name => $package_name, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/params.pp deleted file mode 100644 index 4f5ae97eba..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/params.pp +++ /dev/null @@ -1,175 +0,0 @@ -# PRIVATE CLASS: do not use directly -class postgresql::params inherits postgresql::globals { - $ensure = true - $version = $globals_version - $listen_addresses = 'localhost' - $ip_mask_deny_postgres_user = '0.0.0.0/0' - $ip_mask_allow_all_users = '127.0.0.1/32' - $ipv4acls = [] - $ipv6acls = [] - $user = pick($user, 'postgres') - $group = pick($group, 'postgres') - $encoding = $encoding - $locale = $locale - $service_provider = $service_provider - $manage_firewall = $manage_firewall - $manage_pg_hba_conf = pick($manage_pg_hba_conf, true) - - # Amazon Linux's OS Family is 'Linux', operating system 'Amazon'. - case $::osfamily { - 'RedHat', 'Linux': { - $needs_initdb = pick($needs_initdb, true) - $firewall_supported = pick($firewall_supported, true) - - if $version == $default_version { - $client_package_name = pick($client_package_name, 'postgresql') - $server_package_name = pick($server_package_name, 'postgresql-server') - $contrib_package_name = pick($contrib_package_name,'postgresql-contrib') - $devel_package_name = pick($devel_package_name, 'postgresql-devel') - $java_package_name = pick($java_package_name, 'postgresql-jdbc') - $plperl_package_name = pick($plperl_package_name, 'postgresql-plperl') - $service_name = pick($service_name, 'postgresql') - $bindir = pick($bindir, '/usr/bin') - $datadir = $::operatingsystem ? { - 'Amazon' => pick($datadir, '/var/lib/pgsql9/data'), - default => pick($datadir, '/var/lib/pgsql/data'), - } - $confdir = pick($confdir, $datadir) - } else { - $version_parts = split($version, '[.]') - $package_version = "${version_parts[0]}${version_parts[1]}" - $client_package_name = pick($client_package_name, "postgresql${package_version}") - $server_package_name = pick($server_package_name, "postgresql${package_version}-server") - $contrib_package_name = pick($contrib_package_name,"postgresql${package_version}-contrib") - $devel_package_name = pick($devel_package_name, "postgresql${package_version}-devel") - $java_package_name = pick($java_package_name, "postgresql${package_version}-jdbc") - $plperl_package_name = pick($plperl_package_name, "postgresql${package_version}-plperl") - $service_name = pick($service_name, "postgresql-${version}") - $bindir = pick($bindir, "/usr/pgsql-${version}/bin") - $datadir = $::operatingsystem ? { - 'Amazon' => pick($datadir, "/var/lib/pgsql9/${version}/data"), - default => pick($datadir, "/var/lib/pgsql/${version}/data"), - } - $confdir = pick($confdir, $datadir) - } - $psql_path = pick($psql_path, "${bindir}/psql") - - $service_status = $service_status - $python_package_name = pick($python_package_name, 'python-psycopg2') - } - - 'Archlinux': { - # Based on the existing version of the firewall module, this is normally - # true for Archlinux, but archlinux users want more control. - # so they can set it themself - $firewall_supported = pick($firewall_supported, true) - $needs_initdb = pick($needs_initdb, true) - - # Archlinux doesn't have a client-package but has a libs package which - # pulls in postgresql server - $client_package_name = pick($client_package_name, 'postgresql') - $server_package_name = pick($server_package_name, 'postgresql-libs') - $java_package_name = pick($java_package_name, 'postgresql-jdbc') - # Archlinux doesn't have develop packages - $devel_package_name = pick($devel_package_name, 'postgresql-devel') - # Archlinux does have postgresql-contrib but it isn't maintained - $contrib_package_name = pick($contrib_package_name,'undef') - # Archlinux postgresql package provides plperl - $plperl_package_name = pick($plperl_package_name, 'undef') - $service_name = pick($service_name, 'postgresql') - $bindir = pick($bindir, '/usr/bin') - $datadir = pick($datadir, '/var/lib/postgres/data') - $confdir = pick($confdir, $datadir) - $psql_path = pick($psql_path, "${bindir}/psql") - - $service_status = $service_status - $python_package_name = pick($python_package_name, 'python-psycopg2') - } - - 'Debian': { - - if $manage_package_repo == true { - $needs_initdb = pick($needs_initdb, true) - $service_name = pick($service_name, 'postgresql') - } else { - $needs_initdb = pick($needs_initdb, false) - $service_name = $::operatingsystem ? { - 'Debian' => pick($service_name, 'postgresql'), - 'Ubuntu' => $::lsbmajdistrelease ? { - '10' => pick($service_name, "postgresql-${version}"), - default => pick($service_name, 'postgresql'), - }, - default => undef - } - } - - $client_package_name = pick($client_package_name, "postgresql-client-${version}") - $server_package_name = pick($server_package_name, "postgresql-${version}") - $contrib_package_name = pick($contrib_package_name, "postgresql-contrib-${version}") - $devel_package_name = pick($devel_package_name, 'libpq-dev') - $java_package_name = pick($java_package_name, 'libpostgresql-jdbc-java') - $plperl_package_name = pick($plperl_package_name, "postgresql-plperl-${version}") - $python_package_name = pick($python_package_name, 'python-psycopg2') - - $bindir = pick($bindir, "/usr/lib/postgresql/${version}/bin") - $datadir = pick($datadir, "/var/lib/postgresql/${version}/main") - $confdir = pick($confdir, "/etc/postgresql/${version}/main") - $service_status = pick($service_status, "/etc/init.d/${service_name} status | /bin/egrep -q 'Running clusters: .+|online'") - $psql_path = pick($psql_path, "/usr/bin/psql") - - $firewall_supported = pick($firewall_supported, true) - } - - 'FreeBSD': { - - $client_package_name = pick($client_package_name, "databases/postgresql${version}-client") - $server_package_name = pick($server_package_name, "databases/postgresql${version}-server") - $contrib_package_name = pick($contrib_package_name, "databases/postgresql${version}-contrib") - $devel_package_name = pick($devel_package_name, 'databases/postgresql-libpqxx3') - $java_package_name = pick($java_package_name, 'databases/postgresql-jdbc') - $plperl_package_name = pick($plperl_package_name, "databases/postgresql${version}-plperl") - $python_package_name = pick($python_package_name, 'databases/py-psycopg2') - - $service_name = pick($service_name, 'postgresql') - $bindir = pick($bindir, '/usr/local/bin') - $datadir = pick($datadir, '/usr/local/pgsql/data') - $confdir = pick($confdir, '/usr/local/share/postgresql') - $service_status = pick($service_status, "/usr/local/etc/rc.d/${service_name} status") - $psql_path = pick($psql_path, "${bindir}/psql") - - $firewall_supported = pick($firewall_supported, false) - $needs_initdb = pick($needs_initdb, true) - } - - default: { - # Based on the existing version of the firewall module, this is normally - # false for other OS, but this allows an escape hatch to override it. - $firewall_supported = pick($firewall_supported, false) - - $psql_path = pick($psql_path, "${bindir}/psql") - - # Since we can't determine defaults on our own, we rely on users setting - # parameters with the postgresql::globals class. Here we are checking - # that the mandatory minimum is set for the module to operate. - $err_prefix = "Module ${module_name} does not provide defaults for osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}; please specify a value for ${module_name}::globals::" - if ($needs_initdb == undef) { fail("${err_prefix}needs_initdb") } - if ($service_name == undef) { fail("${err_prefix}service_name") } - if ($client_package_name == undef) { fail("${err_prefix}client_package_name") } - if ($server_package_name == undef) { fail("${err_prefix}server_package_name") } - if ($bindir == undef) { fail("${err_prefix}bindir") } - if ($datadir == undef) { fail("${err_prefix}datadir") } - if ($confdir == undef) { fail("${err_prefix}confdir") } - } - } - - $initdb_path = pick($initdb_path, "${bindir}/initdb") - $createdb_path = pick($createdb_path, "${bindir}/createdb") - $pg_hba_conf_path = pick($pg_hba_conf_path, "${confdir}/pg_hba.conf") - $pg_hba_conf_defaults = pick($pg_hba_conf_defaults, true) - $postgresql_conf_path = pick($postgresql_conf_path, "${confdir}/postgresql.conf") - $default_database = pick($default_database, 'postgres') - - if($version == 'unknown') { - fail('No preferred version defined or automatically detected.') - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/repo.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/repo.pp deleted file mode 100644 index 2e2cbd3f41..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/repo.pp +++ /dev/null @@ -1,22 +0,0 @@ -# PRIVATE CLASS: do not use directly -class postgresql::repo ( - $ensure = $postgresql::params::ensure, - $version = undef -) inherits postgresql::params { - case $::osfamily { - 'RedHat', 'Linux': { - if $version == undef { - fail("The parameter 'version' for 'postgresql::repo' is undefined. You must always define it when osfamily == Redhat or Linux") - } - class { 'postgresql::repo::yum_postgresql_org': } - } - - 'Debian': { - class { 'postgresql::repo::apt_postgresql_org': } - } - - default: { - fail("Unsupported managed repository for osfamily: ${::osfamily}, operatingsystem: ${::operatingsystem}, module ${module_name} currently only supports managing repos for osfamily RedHat and Debian") - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/repo/apt_postgresql_org.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/repo/apt_postgresql_org.pp deleted file mode 100644 index 610eb4724b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/repo/apt_postgresql_org.pp +++ /dev/null @@ -1,30 +0,0 @@ -# PRIVATE CLASS: do not use directly -class postgresql::repo::apt_postgresql_org inherits postgresql::repo { - if($ensure == 'present' or $ensure == true) { - # Here we have tried to replicate the instructions on the PostgreSQL site: - # - # http://www.postgresql.org/download/linux/debian/ - # - apt::pin { 'apt.postgresql.org': - originator => 'apt.postgresql.org', - priority => 500, - }-> - apt::source { 'apt.postgresql.org': - location => 'http://apt.postgresql.org/pub/repos/apt/', - release => "${::lsbdistcodename}-pgdg", - repos => "main ${version}", - key => 'ACCC4CF8', - key_source => 'http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc', - include_src => false, - } - - Apt::Source['apt.postgresql.org']->Package<|tag == 'postgresql'|> - } else { - apt::source { 'apt.postgresql.org': - ensure => absent, - } - apt::pin { 'apt.postgresql.org': - ensure => absent, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/repo/yum_postgresql_org.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/repo/yum_postgresql_org.pp deleted file mode 100644 index 9cdfd4af66..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/repo/yum_postgresql_org.pp +++ /dev/null @@ -1,38 +0,0 @@ -# PRIVATE CLASS: do not use directly -class postgresql::repo::yum_postgresql_org inherits postgresql::repo { - $version_parts = split($version, '[.]') - $package_version = "${version_parts[0]}${version_parts[1]}" - $gpg_key_path = "/etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-${package_version}" - - if ($ensure == 'present' or $ensure == true) { - file { $gpg_key_path: - source => 'puppet:///modules/postgresql/RPM-GPG-KEY-PGDG', - before => Yumrepo['yum.postgresql.org'] - } - - if($::operatingsystem == 'Fedora') { - $label1 = 'fedora' - $label2 = $label1 - } else { - $label1 = 'redhat' - $label2 = 'rhel' - } - - yumrepo { 'yum.postgresql.org': - descr => "PostgreSQL ${version} \$releasever - \$basearch", - baseurl => "http://yum.postgresql.org/${version}/${label1}/${label2}-\$releasever-\$basearch", - enabled => 1, - gpgcheck => 1, - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG-${package_version}", - } - - Yumrepo['yum.postgresql.org'] -> Package<|tag == 'postgresql'|> - } else { - yumrepo { 'yum.postgresql.org': - enabled => absent, - }-> - file { $gpg_key_path: - ensure => absent, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server.pp deleted file mode 100644 index 4d5baab497..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server.pp +++ /dev/null @@ -1,73 +0,0 @@ -# This installs a PostgreSQL server. See README.md for more details. -class postgresql::server ( - $ensure = $postgresql::params::ensure, - - $version = $postgresql::params::version, - - $postgres_password = undef, - - $package_name = $postgresql::params::server_package_name, - $client_package_name = $postgresql::params::client_package_name, - $package_ensure = $ensure, - - $plperl_package_name = $postgresql::params::plperl_package_name, - - $service_name = $postgresql::params::service_name, - $service_provider = $postgresql::params::service_provider, - $service_status = $postgresql::params::service_status, - $default_database = $postgresql::params::default_database, - - $listen_addresses = $postgresql::params::listen_addresses, - $ip_mask_deny_postgres_user = $postgresql::params::ip_mask_deny_postgres_user, - $ip_mask_allow_all_users = $postgresql::params::ip_mask_allow_all_users, - $ipv4acls = $postgresql::params::ipv4acls, - $ipv6acls = $postgresql::params::ipv6acls, - - $initdb_path = $postgresql::params::initdb_path, - $createdb_path = $postgresql::params::createdb_path, - $psql_path = $postgresql::params::psql_path, - $pg_hba_conf_path = $postgresql::params::pg_hba_conf_path, - $postgresql_conf_path = $postgresql::params::postgresql_conf_path, - - $datadir = $postgresql::params::datadir, - $xlogdir = $postgresql::params::xlogdir, - - $pg_hba_conf_defaults = $postgresql::params::pg_hba_conf_defaults, - - $user = $postgresql::params::user, - $group = $postgresql::params::group, - - $needs_initdb = $postgresql::params::needs_initdb, - - $encoding = $postgresql::params::encoding, - $locale = $postgresql::params::locale, - - $manage_firewall = $postgresql::params::manage_firewall, - $manage_pg_hba_conf = $postgresql::params::manage_pg_hba_conf, - $firewall_supported = $postgresql::params::firewall_supported -) inherits postgresql::params { - $pg = 'postgresql::server' - - if ($ensure == 'present' or $ensure == true) { - # Reload has its own ordering, specified by other defines - class { "${pg}::reload": require => Class["${pg}::install"] } - - anchor { "${pg}::start": }-> - class { "${pg}::install": }-> - class { "${pg}::initdb": }-> - class { "${pg}::config": }-> - class { "${pg}::service": }-> - class { "${pg}::passwd": }-> - class { "${pg}::firewall": }-> - anchor { "${pg}::end": } - } else { - anchor { "${pg}::start": }-> - class { "${pg}::firewall": }-> - class { "${pg}::passwd": }-> - class { "${pg}::service": }-> - class { "${pg}::install": }-> - class { "${pg}::initdb": }-> - class { "${pg}::config": }-> - anchor { "${pg}::end": } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/config.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/config.pp deleted file mode 100644 index a59f1793d2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/config.pp +++ /dev/null @@ -1,108 +0,0 @@ -# PRIVATE CLASS: do not call directly -class postgresql::server::config { - $ensure = $postgresql::server::ensure - $ip_mask_deny_postgres_user = $postgresql::server::ip_mask_deny_postgres_user - $ip_mask_allow_all_users = $postgresql::server::ip_mask_allow_all_users - $listen_addresses = $postgresql::server::listen_addresses - $ipv4acls = $postgresql::server::ipv4acls - $ipv6acls = $postgresql::server::ipv6acls - $pg_hba_conf_path = $postgresql::server::pg_hba_conf_path - $postgresql_conf_path = $postgresql::server::postgresql_conf_path - $pg_hba_conf_defaults = $postgresql::server::pg_hba_conf_defaults - $user = $postgresql::server::user - $group = $postgresql::server::group - $version = $postgresql::server::version - $manage_pg_hba_conf = $postgresql::server::manage_pg_hba_conf - - if ($ensure == 'present' or $ensure == true) { - - if ($manage_pg_hba_conf == true) { - # Prepare the main pg_hba file - concat { $pg_hba_conf_path: - owner => 0, - group => $group, - mode => '0640', - warn => true, - notify => Class['postgresql::server::reload'], - } - - if $pg_hba_conf_defaults { - Postgresql::Server::Pg_hba_rule { - database => 'all', - user => 'all', - } - - # Lets setup the base rules - $local_auth_option = $version ? { - '8.1' => 'sameuser', - default => undef, - } - postgresql::server::pg_hba_rule { 'local access as postgres user': - type => 'local', - user => $user, - auth_method => 'ident', - auth_option => $local_auth_option, - order => '001', - } - postgresql::server::pg_hba_rule { 'local access to database with same name': - type => 'local', - auth_method => 'ident', - auth_option => $local_auth_option, - order => '002', - } - postgresql::server::pg_hba_rule { 'allow localhost TCP access to postgresql user': - type => 'host', - user => $user, - address => '127.0.0.1/32', - auth_method => 'md5', - order => '003', - } - postgresql::server::pg_hba_rule { 'deny access to postgresql user': - type => 'host', - user => $user, - address => $ip_mask_deny_postgres_user, - auth_method => 'reject', - order => '004', - } - - # ipv4acls are passed as an array of rule strings, here we transform - # them into a resources hash, and pass the result to create_resources - $ipv4acl_resources = postgresql_acls_to_resources_hash($ipv4acls, - 'ipv4acls', 10) - create_resources('postgresql::server::pg_hba_rule', $ipv4acl_resources) - - postgresql::server::pg_hba_rule { 'allow access to all users': - type => 'host', - address => $ip_mask_allow_all_users, - auth_method => 'md5', - order => '100', - } - postgresql::server::pg_hba_rule { 'allow access to ipv6 localhost': - type => 'host', - address => '::1/128', - auth_method => 'md5', - order => '101', - } - - # ipv6acls are passed as an array of rule strings, here we transform - # them into a resources hash, and pass the result to create_resources - $ipv6acl_resources = postgresql_acls_to_resources_hash($ipv6acls, - 'ipv6acls', 102) - create_resources('postgresql::server::pg_hba_rule', $ipv6acl_resources) - } - } - - # We must set a "listen_addresses" line in the postgresql.conf if we - # want to allow any connections from remote hosts. - postgresql::server::config_entry { 'listen_addresses': - value => $listen_addresses, - } - } else { - file { $pg_hba_conf_path: - ensure => absent, - } - file { $postgresql_conf_path: - ensure => absent, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/config_entry.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/config_entry.pp deleted file mode 100644 index c6cd1a7adf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/config_entry.pp +++ /dev/null @@ -1,43 +0,0 @@ -# Manage a postgresql.conf entry. See README.md for more details. -define postgresql::server::config_entry ( - $ensure = 'present', - $value = undef, - $path = false -) { - $postgresql_conf_path = $postgresql::server::postgresql_conf_path - - $target = $path ? { - false => $postgresql_conf_path, - default => $path, - } - - case $name { - /data_directory|hba_file|ident_file|include|listen_addresses|port|max_connections|superuser_reserved_connections|unix_socket_directory|unix_socket_group|unix_socket_permissions|bonjour|bonjour_name|ssl|ssl_ciphers|shared_buffers|max_prepared_transactions|max_files_per_process|shared_preload_libraries|wal_level|wal_buffers|archive_mode|max_wal_senders|hot_standby|logging_collector|silent_mode|track_activity_query_size|autovacuum_max_workers|autovacuum_freeze_max_age|max_locks_per_transaction|max_pred_locks_per_transaction|restart_after_crash|lc_messages|lc_monetary|lc_numeric|lc_time/: { - Postgresql_conf { - notify => Class['postgresql::server::service'], - before => Class['postgresql::server::reload'], - } - } - - default: { - Postgresql_conf { - notify => Class['postgresql::server::reload'], - } - } - } - - case $ensure { - /present|absent/: { - postgresql_conf { $name: - ensure => $ensure, - target => $target, - value => $value, - require => Class['postgresql::server::initdb'], - } - } - - default: { - fail("Unknown value for ensure '${ensure}'.") - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/contrib.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/contrib.pp deleted file mode 100644 index fe6309e17b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/contrib.pp +++ /dev/null @@ -1,27 +0,0 @@ -# Install the contrib postgresql packaging. See README.md for more details. -class postgresql::server::contrib ( - $package_name = $postgresql::params::contrib_package_name, - $package_ensure = 'present' -) inherits postgresql::params { - validate_string($package_name) - - package { 'postgresql-contrib': - ensure => $package_ensure, - name => $package_name, - tag => 'postgresql', - } - - if($package_ensure == 'present' or $package_ensure == true) { - anchor { 'postgresql::server::contrib::start': }-> - Class['postgresql::server::install']-> - Package['postgresql-contrib']-> - Class['postgresql::server::service']-> - anchor { 'postgresql::server::contrib::end': } - } else { - anchor { 'postgresql::server::contrib::start': }-> - Class['postgresql::server::service']-> - Package['postgresql-contrib']-> - Class['postgresql::server::install']-> - anchor { 'postgresql::server::contrib::end': } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/database.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/database.pp deleted file mode 100644 index adeabde797..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/database.pp +++ /dev/null @@ -1,76 +0,0 @@ -# Define for creating a database. See README.md for more details. -define postgresql::server::database( - $dbname = $title, - $owner = $postgresql::server::user, - $tablespace = undef, - $template = 'template0', - $encoding = $postgresql::server::encoding, - $locale = $postgresql::server::locale, - $istemplate = false -) { - $createdb_path = $postgresql::server::createdb_path - $user = $postgresql::server::user - $group = $postgresql::server::group - $psql_path = $postgresql::server::psql_path - $version = $postgresql::server::version - - # Set the defaults for the postgresql_psql resource - Postgresql_psql { - psql_user => $user, - psql_group => $group, - psql_path => $psql_path, - } - - # Optionally set the locale switch. Older versions of createdb may not accept - # --locale, so if the parameter is undefined its safer not to pass it. - if ($version != '8.1') { - $locale_option = $locale ? { - undef => '', - default => "--locale=${locale} ", - } - $public_revoke_privilege = 'CONNECT' - } else { - $locale_option = '' - $public_revoke_privilege = 'ALL' - } - - $encoding_option = $encoding ? { - undef => '', - default => "--encoding '${encoding}' ", - } - - $tablespace_option = $tablespace ? { - undef => '', - default => "--tablespace='${tablespace}' ", - } - - $createdb_command = "${createdb_path} --owner='${owner}' --template=${template} ${encoding_option}${locale_option}${tablespace_option} '${dbname}'" - - postgresql_psql { "Check for existence of db '${dbname}'": - command => 'SELECT 1', - unless => "SELECT datname FROM pg_database WHERE datname='${dbname}'", - require => Class['postgresql::server::service'] - }~> - exec { $createdb_command : - refreshonly => true, - user => $user, - logoutput => on_failure, - }~> - - # This will prevent users from connecting to the database unless they've been - # granted privileges. - postgresql_psql {"REVOKE ${public_revoke_privilege} ON DATABASE \"${dbname}\" FROM public": - db => $user, - refreshonly => true, - } - - Exec [ $createdb_command ]-> - postgresql_psql {"UPDATE pg_database SET datistemplate = ${istemplate} WHERE datname = '${dbname}'": - unless => "SELECT datname FROM pg_database WHERE datname = '${dbname}' AND datistemplate = ${istemplate}", - } - - # Build up dependencies on tablespace - if($tablespace != undef and defined(Postgresql::Server::Tablespace[$tablespace])) { - Postgresql::Server::Tablespace[$tablespace]->Exec[$createdb_command] - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/database_grant.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/database_grant.pp deleted file mode 100644 index 5973144127..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/database_grant.pp +++ /dev/null @@ -1,18 +0,0 @@ -# Manage a database grant. See README.md for more details. -define postgresql::server::database_grant( - $privilege, - $db, - $role, - $psql_db = undef, - $psql_user = undef -) { - postgresql::server::grant { "database:${name}": - role => $role, - db => $db, - privilege => $privilege, - object_type => 'DATABASE', - object_name => $db, - psql_db => $psql_db, - psql_user => $psql_user, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/db.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/db.pp deleted file mode 100644 index 5cc7954c3e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/db.pp +++ /dev/null @@ -1,38 +0,0 @@ -# Define for conveniently creating a role, database and assigning the correct -# permissions. See README.md for more details. -define postgresql::server::db ( - $user, - $password, - $encoding = $postgresql::server::encoding, - $locale = $postgresql::server::locale, - $grant = 'ALL', - $tablespace = undef, - $template = 'template0', - $istemplate = false, - $owner = undef -) { - postgresql::server::database { $name: - encoding => $encoding, - tablespace => $tablespace, - template => $template, - locale => $locale, - istemplate => $istemplate, - owner => $owner, - } - - if ! defined(Postgresql::Server::Role[$user]) { - postgresql::server::role { $user: - password_hash => $password, - } - } - - postgresql::server::database_grant { "GRANT ${user} - ${grant} - ${name}": - privilege => $grant, - db => $name, - role => $user, - } - - if($tablespace != undef and defined(Postgresql::Server::Tablespace[$tablespace])) { - Postgresql::Server::Tablespace[$tablespace]->Postgresql::Server::Database[$name] - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/firewall.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/firewall.pp deleted file mode 100644 index afe3797415..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/firewall.pp +++ /dev/null @@ -1,21 +0,0 @@ -# PRIVATE CLASS: do not use directly -class postgresql::server::firewall { - $ensure = $postgresql::server::ensure - $manage_firewall = $postgresql::server::manage_firewall - $firewall_supported = $postgresql::server::firewall_supported - - if ($manage_firewall and $firewall_supported) { - if ($ensure == 'present' or $ensure == true) { - # TODO: get rid of hard-coded port - firewall { '5432 accept - postgres': - port => '5432', - proto => 'tcp', - action => 'accept', - } - } else { - firewall { '5432 accept - postgres': - ensure => absent, - } - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/grant.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/grant.pp deleted file mode 100644 index d24130ca28..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/grant.pp +++ /dev/null @@ -1,85 +0,0 @@ -# Define for granting permissions to roles. See README.md for more details. -define postgresql::server::grant ( - $role, - $db, - $privilege = undef, - $object_type = 'database', - $object_name = $db, - $psql_db = $postgresql::server::user, - $psql_user = $postgresql::server::user -) { - $group = $postgresql::server::group - $psql_path = $postgresql::server::psql_path - - ## Munge the input values - $_object_type = upcase($object_type) - $_privilege = upcase($privilege) - - ## Validate that the object type is known - validate_string($_object_type, - #'COLUMN', - 'DATABASE', - #'FOREIGN SERVER', - #'FOREIGN DATA WRAPPER', - #'FUNCTION', - #'PROCEDURAL LANGUAGE', - #'SCHEMA', - #'SEQUENCE', - 'TABLE', - #'TABLESPACE', - #'VIEW', - ) - - ## Validate that the object type's privilege is acceptable - # TODO: this is a terrible hack; if they pass "ALL" as the desired privilege, - # we need a way to test for it--and has_database_privilege does not - # recognize 'ALL' as a valid privilege name. So we probably need to - # hard-code a mapping between 'ALL' and the list of actual privileges that - # it entails, and loop over them to check them. That sort of thing will - # probably need to wait until we port this over to ruby, so, for now, we're - # just going to assume that if they have "CREATE" privileges on a database, - # then they have "ALL". (I told you that it was terrible!) - case $_object_type { - 'DATABASE': { - $unless_privilege = $_privilege ? { - 'ALL' => 'CREATE', - default => $_privilege, - } - validate_string($unless_privilege,'CREATE','CONNECT','TEMPORARY','TEMP', - 'ALL','ALL PRIVILEGES') - $unless_function = 'has_database_privilege' - $on_db = $psql_db - } - 'TABLE': { - $unless_privilege = $_privilege ? { - 'ALL' => 'INSERT', - default => $_privilege, - } - validate_string($unless_privilege,'SELECT','INSERT','UPDATE','DELETE', - 'TRUNCATE','REFERENCES','TRIGGER','ALL','ALL PRIVILEGES') - $unless_function = 'has_table_privilege' - $on_db = $db - } - default: { - fail("Missing privilege validation for object type ${_object_type}") - } - } - - $grant_cmd = "GRANT ${_privilege} ON ${_object_type} \"${object_name}\" TO \"${role}\"" - postgresql_psql { $grant_cmd: - db => $on_db, - psql_user => $psql_user, - psql_group => $group, - psql_path => $psql_path, - unless => "SELECT 1 WHERE ${unless_function}('${role}', '${object_name}', '${unless_privilege}')", - require => Class['postgresql::server'] - } - - if($role != undef and defined(Postgresql::Server::Role[$role])) { - Postgresql::Server::Role[$role]->Postgresql_psql[$grant_cmd] - } - - if($db != undef and defined(Postgresql::Server::Database[$db])) { - Postgresql::Server::Database[$db]->Postgresql_psql[$grant_cmd] - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/initdb.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/initdb.pp deleted file mode 100644 index a56f19c39b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/initdb.pp +++ /dev/null @@ -1,76 +0,0 @@ -# PRIVATE CLASS: do not call directly -class postgresql::server::initdb { - $ensure = $postgresql::server::ensure - $needs_initdb = $postgresql::server::needs_initdb - $initdb_path = $postgresql::server::initdb_path - $datadir = $postgresql::server::datadir - $xlogdir = $postgresql::server::xlogdir - $encoding = $postgresql::server::encoding - $locale = $postgresql::server::locale - $group = $postgresql::server::group - $user = $postgresql::server::user - - if($ensure == 'present' or $ensure == true) { - # Make sure the data directory exists, and has the correct permissions. - file { $datadir: - ensure => directory, - owner => $user, - group => $group, - mode => '0700', - } - - if($xlogdir) { - # Make sure the xlog directory exists, and has the correct permissions. - file { $xlogdir: - ensure => directory, - owner => $user, - group => $group, - mode => '0700', - } - } - - if($needs_initdb) { - # Build up the initdb command. - # - # We optionally add the locale switch if specified. Older versions of the - # initdb command don't accept this switch. So if the user didn't pass the - # parameter, lets not pass the switch at all. - $ic_base = "${initdb_path} --encoding '${encoding}' --pgdata '${datadir}'" - $ic_xlog = $xlogdir ? { - undef => $ic_base, - default => "${ic_base} --xlogdir '${xlogdir}'" - } - $initdb_command = $locale ? { - undef => $ic_xlog, - default => "${ic_xlog} --locale '${locale}'" - } - - # This runs the initdb command, we use the existance of the PG_VERSION - # file to ensure we don't keep running this command. - exec { 'postgresql_initdb': - command => $initdb_command, - creates => "${datadir}/PG_VERSION", - user => $user, - group => $group, - logoutput => on_failure, - require => File[$datadir], - } - } - } else { - # Purge data directory if ensure => absent - file { $datadir: - ensure => absent, - recurse => true, - force => true, - } - - if($xlogdir) { - # Make sure the xlog directory exists, and has the correct permissions. - file { $xlogdir: - ensure => absent, - recurse => true, - force => true, - } - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/install.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/install.pp deleted file mode 100644 index 1e912a8b1d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/install.pp +++ /dev/null @@ -1,49 +0,0 @@ -# PRIVATE CLASS: do not call directly -class postgresql::server::install { - $package_ensure = $postgresql::server::package_ensure - $package_name = $postgresql::server::package_name - $client_package_name = $postgresql::server::client_package_name - - # This is necessary to ensure that the extra client package that was - # installed automatically by the server package is removed and all - # of its dependencies are removed also. Without this later installation - # of the native Ubuntu packages will fail. - if($::operatingsystem == 'Ubuntu' and $package_ensure == 'absent') { - # This is an exec, because we want to invoke autoremove. - # - # An alternative would be to have a full list of packages, but that seemed - # more problematic to maintain, not to mention the conflict with the - # client class will create duplicate resources. - exec { 'apt-get-autoremove-postgresql-client-XX': - command => "apt-get autoremove --purge --yes ${client_package_name}", - onlyif => "dpkg -l ${client_package_name} | grep -e '^ii'", - logoutput => on_failure, - path => '/usr/bin:/bin:/usr/sbin/:/sbin', - } - - # This will clean up anything we miss - exec { 'apt-get-autoremove-postgresql-client-brute': - command => "dpkg -P postgresql*", - onlyif => "dpkg -l postgresql* | grep -e '^ii'", - logoutput => on_failure, - path => '/usr/bin:/bin:/usr/sbin/:/sbin', - } - } - - $_package_ensure = $package_ensure ? { - true => 'present', - false => 'purged', - 'absent' => 'purged', - default => $package_ensure, - } - - package { 'postgresql-server': - ensure => $_package_ensure, - name => $package_name, - - # This is searched for to create relationships with the package repos, be - # careful about its removal - tag => 'postgresql', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/passwd.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/passwd.pp deleted file mode 100644 index 5777b03354..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/passwd.pp +++ /dev/null @@ -1,35 +0,0 @@ -# PRIVATE CLASS: do not call directly -class postgresql::server::passwd { - $ensure = $postgresql::server::ensure - $postgres_password = $postgresql::server::postgres_password - $user = $postgresql::server::user - $group = $postgresql::server::group - $psql_path = $postgresql::server::psql_path - - if($ensure == 'present' or $ensure == true) { - if ($postgres_password != undef) { - # NOTE: this password-setting logic relies on the pg_hba.conf being - # configured to allow the postgres system user to connect via psql - # without specifying a password ('ident' or 'trust' security). This is - # the default for pg_hba.conf. - $escaped = postgresql_escape($postgres_password) - $env = "env PGPASSWORD='${postgres_password}'" - exec { 'set_postgres_postgrespw': - # This command works w/no password because we run it as postgres system - # user - command => "${psql_path} -c 'ALTER ROLE \"${user}\" PASSWORD ${escaped}'", - user => $user, - group => $group, - logoutput => true, - cwd => '/tmp', - # With this command we're passing -h to force TCP authentication, which - # does require a password. We specify the password via the PGPASSWORD - # environment variable. If the password is correct (current), this - # command will exit with an exit code of 0, which will prevent the main - # command from running. - unless => "${env} ${psql_path} -h localhost -c 'select 1' > /dev/null", - path => '/usr/bin:/usr/local/bin:/bin', - } - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/pg_hba_rule.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/pg_hba_rule.pp deleted file mode 100644 index ea300d1baa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/pg_hba_rule.pp +++ /dev/null @@ -1,52 +0,0 @@ -# This resource manages an individual rule that applies to the file defined in -# $target. See README.md for more details. -define postgresql::server::pg_hba_rule( - $type, - $database, - $user, - $auth_method, - $address = undef, - $description = 'none', - $auth_option = undef, - $order = '150', - - # Needed for testing primarily, support for multiple files is not really - # working. - $target = $postgresql::server::pg_hba_conf_path -) { - - if $postgresql::server::manage_pg_hba_conf == false { - fail('postgresql::server::manage_pg_hba_conf has been disabled, so this resource is now unused and redundant, either enable that option or remove this resource from your manifests') - } else { - validate_re($type, '^(local|host|hostssl|hostnossl)$', - "The type you specified [${type}] must be one of: local, host, hostssl, hostnosssl") - - if($type =~ /^host/ and $address == undef) { - fail('You must specify an address property when type is host based') - } - - $allowed_auth_methods = $postgresql::server::version ? { - '9.3' => ['trust', 'reject', 'md5', 'sha1', 'password', 'gss', 'sspi', 'krb5', 'ident', 'peer', 'ldap', 'radius', 'cert', 'pam'], - '9.2' => ['trust', 'reject', 'md5', 'sha1', 'password', 'gss', 'sspi', 'krb5', 'ident', 'peer', 'ldap', 'radius', 'cert', 'pam'], - '9.1' => ['trust', 'reject', 'md5', 'sha1', 'password', 'gss', 'sspi', 'krb5', 'ident', 'peer', 'ldap', 'radius', 'cert', 'pam'], - '9.0' => ['trust', 'reject', 'md5', 'sha1', 'password', 'gss', 'sspi', 'krb5', 'ident', 'ldap', 'radius', 'cert', 'pam'], - '8.4' => ['trust', 'reject', 'md5', 'sha1', 'password', 'gss', 'sspi', 'krb5', 'ident', 'ldap', 'cert', 'pam'], - '8.3' => ['trust', 'reject', 'md5', 'sha1', 'crypt', 'password', 'gss', 'sspi', 'krb5', 'ident', 'ldap', 'pam'], - '8.2' => ['trust', 'reject', 'md5', 'crypt', 'password', 'krb5', 'ident', 'ldap', 'pam'], - '8.1' => ['trust', 'reject', 'md5', 'crypt', 'password', 'krb5', 'ident', 'pam'], - default => ['trust', 'reject', 'md5', 'password', 'gss', 'sspi', 'krb5', 'ident', 'peer', 'ldap', 'radius', 'cert', 'pam', 'crypt'] - } - - $auth_method_regex = join(['^(', join($allowed_auth_methods, '|'), ')$'],'') - validate_re($auth_method, $auth_method_regex, - join(["The auth_method you specified [${auth_method}] must be one of: ", join($allowed_auth_methods, ', ')],'')) - - # Create a rule fragment - $fragname = "pg_hba_rule_${name}" - concat::fragment { $fragname: - target => $target, - content => template('postgresql/pg_hba_rule.conf'), - order => $order, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/plperl.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/plperl.pp deleted file mode 100644 index c338f16570..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/plperl.pp +++ /dev/null @@ -1,27 +0,0 @@ -# This class installs the PL/Perl procedural language for postgresql. See -# README.md for more details. -class postgresql::server::plperl( - $package_ensure = 'present', - $package_name = $postgresql::server::plperl_package_name -) { - package { 'postgresql-plperl': - ensure => $package_ensure, - name => $package_name, - tag => 'postgresql', - } - - if($package_ensure == 'present' or $package_ensure == true) { - anchor { 'postgresql::server::plperl::start': }-> - Class['postgresql::server::install']-> - Package['postgresql-plperl']-> - Class['postgresql::server::service']-> - anchor { 'postgresql::server::plperl::end': } - } else { - anchor { 'postgresql::server::plperl::start': }-> - Class['postgresql::server::service']-> - Package['postgresql-plperl']-> - Class['postgresql::server::install']-> - anchor { 'postgresql::server::plperl::end': } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/reload.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/reload.pp deleted file mode 100644 index 6b11ebfc1b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/reload.pp +++ /dev/null @@ -1,15 +0,0 @@ -# PRIVATE CLASS: do not use directly -class postgresql::server::reload { - $ensure = $postgresql::server::ensure - $service_name = $postgresql::server::service_name - $service_status = $postgresql::server::service_status - - if($ensure == 'present' or $ensure == true) { - exec { 'postgresql_reload': - path => '/usr/bin:/usr/sbin:/bin:/sbin', - command => "service ${service_name} reload", - onlyif => $service_status, - refreshonly => true, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/role.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/role.pp deleted file mode 100644 index 971191f5d5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/role.pp +++ /dev/null @@ -1,85 +0,0 @@ -# Define for creating a database role. See README.md for more information -define postgresql::server::role( - $password_hash = false, - $createdb = false, - $createrole = false, - $db = $postgresql::server::user, - $login = true, - $superuser = false, - $replication = false, - $connection_limit = '-1', - $username = $title -) { - $psql_user = $postgresql::server::user - $psql_group = $postgresql::server::group - $psql_path = $postgresql::server::psql_path - $version = $postgresql::server::version - - $login_sql = $login ? { true => 'LOGIN', default => 'NOLOGIN' } - $createrole_sql = $createrole ? { true => 'CREATEROLE', default => 'NOCREATEROLE' } - $createdb_sql = $createdb ? { true => 'CREATEDB', default => 'NOCREATEDB' } - $superuser_sql = $superuser ? { true => 'SUPERUSER', default => 'NOSUPERUSER' } - $replication_sql = $replication ? { true => 'REPLICATION', default => '' } - if ($password_hash != false) { - $password_sql = "ENCRYPTED PASSWORD '${password_hash}'" - } else { - $password_sql = '' - } - - Postgresql_psql { - db => $db, - psql_user => $psql_user, - psql_group => $psql_group, - psql_path => $psql_path, - require => [ Postgresql_psql["CREATE ROLE \"${username}\" ${password_sql} ${login_sql} ${createrole_sql} ${createdb_sql} ${superuser_sql} ${replication_sql} CONNECTION LIMIT ${connection_limit}"], Class['postgresql::server'] ], - } - - postgresql_psql {"CREATE ROLE \"${username}\" ${password_sql} ${login_sql} ${createrole_sql} ${createdb_sql} ${superuser_sql} ${replication_sql} CONNECTION LIMIT ${connection_limit}": - unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}'", - require => Class['Postgresql::Server'], - } - - postgresql_psql {"ALTER ROLE \"${username}\" ${superuser_sql}": - unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolsuper=${superuser}", - } - - postgresql_psql {"ALTER ROLE \"${username}\" ${createdb_sql}": - unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolcreatedb=${createdb}", - } - - postgresql_psql {"ALTER ROLE \"${username}\" ${createrole_sql}": - unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolcreaterole=${createrole}", - } - - postgresql_psql {"ALTER ROLE \"${username}\" ${login_sql}": - unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolcanlogin=${login}", - } - - if(versioncmp($version, '9.1') >= 0) { - if $replication_sql == '' { - postgresql_psql {"ALTER ROLE \"${username}\" NOREPLICATION": - unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolreplication=${replication}", - } - } else { - postgresql_psql {"ALTER ROLE \"${username}\" ${replication_sql}": - unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolreplication=${replication}", - } - } - } - - postgresql_psql {"ALTER ROLE \"${username}\" CONNECTION LIMIT ${connection_limit}": - unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolconnlimit=${connection_limit}", - } - - if $password_hash { - if($password_hash =~ /^md5.+/) { - $pwd_hash_sql = $password_hash - } else { - $pwd_md5 = md5("${password_hash}${username}") - $pwd_hash_sql = "md5${pwd_md5}" - } - postgresql_psql {"ALTER ROLE \"${username}\" ${password_sql}": - unless => "SELECT usename FROM pg_shadow WHERE usename='${username}' and passwd='${pwd_hash_sql}'", - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/service.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/service.pp deleted file mode 100644 index 598acd876a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/service.pp +++ /dev/null @@ -1,45 +0,0 @@ -# PRIVATE CLASS: do not call directly -class postgresql::server::service { - $ensure = $postgresql::server::ensure - $service_name = $postgresql::server::service_name - $service_provider = $postgresql::server::service_provider - $service_status = $postgresql::server::service_status - $user = $postgresql::server::user - $default_database = $postgresql::server::default_database - - $service_ensure = $ensure ? { - present => true, - absent => false, - default => $ensure - } - - anchor { 'postgresql::server::service::begin': } - - service { 'postgresqld': - ensure => $service_ensure, - name => $service_name, - enable => $service_ensure, - provider => $service_provider, - hasstatus => true, - status => $service_status, - } - - if($service_ensure) { - # This blocks the class before continuing if chained correctly, making - # sure the service really is 'up' before continuing. - # - # Without it, we may continue doing more work before the database is - # prepared leading to a nasty race condition. - postgresql::validate_db_connection { 'validate_service_is_running': - run_as => $user, - database_name => $default_database, - sleep => 1, - tries => 60, - create_db_first => false, - require => Service['postgresqld'], - before => Anchor['postgresql::server::service::end'] - } - } - - anchor { 'postgresql::server::service::end': } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/table_grant.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/table_grant.pp deleted file mode 100644 index 643416e0d0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/table_grant.pp +++ /dev/null @@ -1,20 +0,0 @@ -# This resource wraps the grant resource to manage table grants specifically. -# See README.md for more details. -define postgresql::server::table_grant( - $privilege, - $table, - $db, - $role, - $psql_db = undef, - $psql_user = undef -) { - postgresql::server::grant { "table:${name}": - role => $role, - db => $db, - privilege => $privilege, - object_type => 'TABLE', - object_name => $table, - psql_db => $psql_db, - psql_user => $psql_user, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/tablespace.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/tablespace.pp deleted file mode 100644 index 22523773c1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/server/tablespace.pp +++ /dev/null @@ -1,42 +0,0 @@ -# This module creates tablespace. See README.md for more details. -define postgresql::server::tablespace( - $location, - $owner = undef, - $spcname = $title -) { - $user = $postgresql::server::user - $group = $postgresql::server::group - $psql_path = $postgresql::server::psql_path - - Postgresql_psql { - psql_user => $user, - psql_group => $group, - psql_path => $psql_path, - } - - if ($owner == undef) { - $owner_section = '' - } else { - $owner_section = "OWNER \"${owner}\"" - } - - $create_tablespace_command = "CREATE TABLESPACE \"${spcname}\" ${owner_section} LOCATION '${location}'" - - file { $location: - ensure => directory, - owner => $user, - group => $group, - mode => '0700', - } - - $create_ts = "Create tablespace '${spcname}'" - postgresql_psql { "Create tablespace '${spcname}'": - command => $create_tablespace_command, - unless => "SELECT spcname FROM pg_tablespace WHERE spcname='${spcname}'", - require => [Class['postgresql::server'], File[$location]], - } - - if($owner != undef and defined(Postgresql::Server::Role[$owner])) { - Postgresql::Server::Role[$owner]->Postgresql_psql[$create_ts] - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/validate_db_connection.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/validate_db_connection.pp deleted file mode 100644 index f70af1e4ef..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/manifests/validate_db_connection.pp +++ /dev/null @@ -1,75 +0,0 @@ -# This type validates that a successful postgres connection can be established -# between the node on which this resource is run and a specified postgres -# instance (host/port/user/password/database name). -# -# See README.md for more details. -define postgresql::validate_db_connection( - $database_host = undef, - $database_name = undef, - $database_password = undef, - $database_username = undef, - $database_port = undef, - $run_as = undef, - $sleep = 2, - $tries = 10, - $create_db_first = true -) { - require postgresql::client - include postgresql::params - - $psql_path = $postgresql::params::psql_path - - $cmd_init = "${psql_path} --tuples-only --quiet " - $cmd_host = $database_host ? { - default => "-h ${database_host} ", - undef => "", - } - $cmd_user = $database_username ? { - default => "-U ${database_username} ", - undef => "", - } - $cmd_port = $database_port ? { - default => "-p ${database_port} ", - undef => "", - } - $cmd_dbname = $database_name ? { - default => "--dbname ${database_name} ", - undef => "--dbname ${postgresql::params::default_database} ", - } - $env = $database_password ? { - default => "PGPASSWORD=${database_password}", - undef => undef, - } - $cmd = join([$cmd_init, $cmd_host, $cmd_user, $cmd_port, $cmd_dbname]) - $validate_cmd = "/usr/local/bin/validate_postgresql_connection.sh ${sleep} ${tries} '${cmd}'" - - # This is more of a safety valve, we add a little extra to compensate for the - # time it takes to run each psql command. - $timeout = (($sleep + 2) * $tries) - - $exec_name = "validate postgres connection for ${database_host}/${database_name}" - exec { $exec_name: - command => "echo 'Unable to connect to defined database using: ${cmd}' && false", - unless => $validate_cmd, - cwd => '/tmp', - environment => $env, - logoutput => 'on_failure', - user => $run_as, - path => '/bin', - timeout => $timeout, - require => Package['postgresql-client'], - } - - # This is a little bit of puppet magic. What we want to do here is make - # sure that if the validation and the database instance creation are being - # applied on the same machine, then the database resource is applied *before* - # the validation resource. Otherwise, the validation is guaranteed to fail - # on the first run. - # - # We accomplish this by using Puppet's resource collection syntax to search - # for the Database resource in our current catalog; if it exists, the - # appropriate relationship is created here. - if($create_db_first) { - Postgresql::Server::Database<|title == $database_name|> -> Exec[$exec_name] - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/metadata.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/metadata.json deleted file mode 100644 index 3da197dcc9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/metadata.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "operatingsystem_support": [ - { - "operatingsystem": "RedHat", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "CentOS", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "OracleLinux", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "Scientific", - "operatingsystemrelease": [ - "5", - "6" - ] - }, - { - "operatingsystem": "Debian", - "operatingsystemrelease": [ - "6", - "7" - ] - }, - { - "operatingsystem": "Ubuntu", - "operatingsystemrelease": [ - "10.04", - "12.04" - ] - } - ], - "requirements": [ - { - "name": "pe", - "version_requirement": "3.2.x" - }, - { - "name": "puppet", - "version_requirement": "3.x" - } - ], - "name": "puppetlabs-postgresql", - "version": "3.3.3", - "source": "git://github.com/puppetlabs/puppet-postgresql.git", - "author": "Inkling/Puppet Labs", - "license": "ASL 2.0", - "summary": "PostgreSQL defined resource types", - "description": "PostgreSQL defined resource types", - "project_page": "https://github.com/puppetlabs/puppet-postgresql", - "dependencies": [ - { - "name": "puppetlabs/stdlib", - "version_requirement": ">=3.2.0 <5.0.0" - }, - { - "name": "puppetlabs/firewall", - "version_requirement": ">= 0.0.4" - }, - { - "name": "puppetlabs/apt", - "version_requirement": ">=1.1.0 <2.0.0" - }, - { - "name": "puppetlabs/concat", - "version_requirement": ">= 1.0.0 <2.0.0" - } - ] -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/client_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/client_spec.rb deleted file mode 100644 index eaff5263d4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/client_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::client:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::client': package_ensure => purged }", - :catch_failures => true) - end - - it 'test loading class with no parameters' do - pp = <<-EOS.unindent - class { 'postgresql::client': } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/common_patterns_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/common_patterns_spec.rb deleted file mode 100644 index 441da70e86..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/common_patterns_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'common patterns:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - describe 'postgresql.conf include pattern' do - after :all do - pp = <<-EOS.unindent - class { 'postgresql::server': ensure => absent } - - file { '/tmp/include.conf': - ensure => absent - } - EOS - apply_manifest(pp, :catch_failures => true) - end - - it "should support an 'include' directive at the end of postgresql.conf" do - pending('no support for include directive with centos 5/postgresql 8.1', - :if => (fact('osfamily') == 'RedHat' and fact('lsbmajdistrelease') == '5')) - - pp = <<-EOS.unindent - class { 'postgresql::server': } - - $extras = "/etc/postgresql-include.conf" - - file { $extras: - content => 'max_connections = 123', - seltype => 'postgresql_db_t', - seluser => 'system_u', - notify => Class['postgresql::server::service'], - } - - postgresql::server::config_entry { 'include': - value => $extras, - require => File[$extras], - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - psql('--command="show max_connections" -t', 'postgres') do |r| - expect(r.stdout).to match(/123/) - expect(r.stderr).to eq('') - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/contrib_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/contrib_spec.rb deleted file mode 100644 index d6dbb956a3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/contrib_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::server::contrib:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran, remove both contrib and server as contrib - # pulls in the server based packages. - pp = <<-EOS.unindent - class { 'postgresql::server': - ensure => absent, - } - class { 'postgresql::server::contrib': - package_ensure => purged, - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'test loading class with no parameters' do - pp = <<-EOS.unindent - class { 'postgresql::server': } - class { 'postgresql::server::contrib': } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/lib/devel_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/lib/devel_spec.rb deleted file mode 100644 index 51a5ea988e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/lib/devel_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::lib::devel:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::lib::devel': package_ensure => purged }", :catch_failures => true) - end - - it 'test loading class with no parameters' do - pp = <<-EOS.unindent - class { 'postgresql::lib::devel': } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/lib/java_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/lib/java_spec.rb deleted file mode 100644 index c943bed54e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/lib/java_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::lib::java:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::lib::java': package_ensure => purged }", :catch_failures => true) - end - - it 'test loading class with no parameters' do - pending('libpostgresql-java-jdbc not available natively for Ubuntu 10.04 and Debian 6', - :if => (fact('osfamily') == 'Debian' and ['6', '10'].include?(fact('lsbmajdistrelease')))) - - pp = <<-EOS.unindent - class { 'postgresql::lib::java': } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/lib/python_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/lib/python_spec.rb deleted file mode 100644 index 173204e715..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/lib/python_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::lib::python:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::lib::python': package_ensure => purged }", :catch_failures => true) - end - - it 'test loading class with no parameters' do - pending('psycopg2 not available natively for centos 5', :if => (fact('osfamily') == 'RedHat' and fact('lsbmajdistrelease') == '5')) - - pp = <<-EOS.unindent - class { 'postgresql::lib::python': } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-510-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-510-x64.yml deleted file mode 100644 index 12c9e7893a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-510-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-510-x64: - roles: - - master - platform: el-5-x86_64 - box : centos-510-x64-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-510-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-59-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-59-x64.yml deleted file mode 100644 index 2ad90b86aa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-59-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-59-x64: - roles: - - master - platform: el-5-x86_64 - box : centos-59-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64-pe.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64-pe.yml deleted file mode 100644 index 7d9242f1b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64-pe.yml +++ /dev/null @@ -1,12 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - - database - - dashboard - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: pe diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64.yml deleted file mode 100644 index 0639835490..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/centos-64-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-607-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-607-x64.yml deleted file mode 100644 index 4c8be42d03..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-607-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - debian-607-x64: - roles: - - master - platform: debian-6-amd64 - box : debian-607-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-73-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-73-x64.yml deleted file mode 100644 index 3e31a82760..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/debian-73-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - debian-73-x64: - roles: - - master - platform: debian-7-amd64 - box : debian-73-x64-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/default.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/default.yml deleted file mode 100644 index 0639835490..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml deleted file mode 100644 index 5047017e62..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-10044-x64: - roles: - - master - platform: ubuntu-10.04-amd64 - box : ubuntu-server-10044-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml deleted file mode 100644 index 1c7a34ccba..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/postgresql_psql_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/postgresql_psql_spec.rb deleted file mode 100644 index 5c03a7a874..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/postgresql_psql_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql_psql:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - it 'should run some SQL when the unless query returns no rows' do - pp = <<-EOS.unindent - class { 'postgresql::server': } - - postgresql_psql { 'foobar': - db => 'postgres', - psql_user => 'postgres', - command => 'select 1', - unless => 'select 1 where 1=2', - require => Class['postgresql::server'], - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) - end - - it 'should not run SQL when the unless query returns rows' do - pp = <<-EOS.unindent - class { 'postgresql::server': } - - postgresql_psql { 'foobar': - db => 'postgres', - psql_user => 'postgres', - command => 'select * from pg_database limit 1', - unless => 'select 1 where 1=1', - require => Class['postgresql::server'], - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/config_entry_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/config_entry_spec.rb deleted file mode 100644 index a58903acb5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/config_entry_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::server::config_entry:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - it 'should change setting and reflect it in show all' do - pp = <<-EOS.unindent - class { 'postgresql::server': } - - postgresql::server::config_entry { 'check_function_bodies': - value => 'off', - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - psql('--command="show all" postgres') do |r| - expect(r.stdout).to match(/check_function_bodies.+off/) - expect(r.stderr).to eq('') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_grant_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_grant_spec.rb deleted file mode 100644 index 99ce44ddae..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_grant_spec.rb +++ /dev/null @@ -1,48 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::server::database_grant:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - it 'should grant access so a user can create objects in a database' do - begin - pp = <<-EOS.unindent - $db = 'postgres' - $user = 'psql_grant_tester' - $password = 'psql_grant_pw' - - class { 'postgresql::server': } - - # Since we are not testing pg_hba or any of that, make a local user for ident auth - user { $user: - ensure => present, - } - - postgresql::server::role { $user: - password_hash => postgresql_password($user, $password), - } - - postgresql::server::database { $db: } - - postgresql::server::database_grant { 'grant create test': - privilege => 'CREATE', - db => $db, - role => $user, - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - # Check that the user can create a table in the database - psql('--command="create table foo (foo int)" postgres', 'psql_grant_tester') do |r| - expect(r.stdout).to match(/CREATE TABLE/) - expect(r.stderr).to eq('') - end - ensure - psql('--command="drop table foo" postgres', 'psql_grant_tester') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_spec.rb deleted file mode 100644 index 7f227d1686..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/database_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::server::database:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - it 'should idempotently create a db that we can connect to' do - begin - pp = <<-EOS.unindent - $db = 'postgresql_test_db' - class { 'postgresql::server': } - - postgresql::server::database { $db: } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - psql('--command="select datname from pg_database" postgresql_test_db') do |r| - expect(r.stdout).to match(/postgresql_test_db/) - expect(r.stderr).to eq('') - end - ensure - psql('--command="drop database postgresql_test_db" postgres') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/db_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/db_spec.rb deleted file mode 100644 index 0287976a85..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/db_spec.rb +++ /dev/null @@ -1,138 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::server::db', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - it 'should idempotently create a db that we can connect to' do - begin - pp = <<-EOS.unindent - $db = 'postgresql_test_db' - class { 'postgresql::server': } - - postgresql::server::db { $db: - user => $db, - password => postgresql_password($db, $db), - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - psql('--command="select datname from pg_database" postgresql_test_db') do |r| - expect(r.stdout).to match(/postgresql_test_db/) - expect(r.stderr).to eq('') - end - ensure - psql('--command="drop database postgresql_test_db" postgres') - end - end - - it 'should take a locale parameter' do - pending('no support for locale parameter with centos 5', :if => (fact('osfamily') == 'RedHat' and fact('lsbmajdistrelease') == '5')) - begin - pp = <<-EOS.unindent - class { 'postgresql::server': } - postgresql::server::db { 'test1': - user => 'test1', - password => postgresql_password('test1', 'test1'), - encoding => 'UTF8', - locale => 'en_NG.UTF-8', - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - psql('-c "show lc_ctype" test1') do |r| - expect(r.stdout).to match(/en_NG/) - end - - psql('-c "show lc_collate" test1') do |r| - expect(r.stdout).to match(/en_NG/) - end - ensure - psql('--command="drop database test1" postgres') - end - end - - it 'should take an istemplate parameter' do - begin - pp = <<-EOS.unindent - $db = 'template2' - class { 'postgresql::server': } - - postgresql::server::db { $db: - user => $db, - password => postgresql_password($db, $db), - istemplate => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - psql('--command="select datname from pg_database" template2') do |r| - expect(r.stdout).to match(/template2/) - expect(r.stderr).to eq('') - end - ensure - psql('--command="drop database template2" postgres', 'postgres', [1,2]) do |r| - expect(r.stdout).to eq('') - expect(r.stderr).to match(/cannot drop a template database/) - end - end - end - - it 'should update istemplate parameter' do - begin - pp = <<-EOS.unindent - $db = 'template2' - class { 'postgresql::server': } - - postgresql::server::db { $db: - user => $db, - password => postgresql_password($db, $db), - istemplate => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - psql('--command="select datname from pg_database" template2') do |r| - expect(r.stdout).to match(/template2/) - expect(r.stderr).to eq('') - end - ensure - psql('--command="drop database template2" postgres') - end - end - - it 'should take a template parameter' do - begin - pp = <<-EOS.unindent - $db = 'postgresql_test_db' - class { 'postgresql::server': } - - postgresql::server::db { $db: - user => $db, - template => 'template1', - password => postgresql_password($db, $db), - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - psql('--command="select datname from pg_database" postgresql_test_db') do |r| - expect(r.stdout).to match(/postgresql_test_db/) - expect(r.stderr).to eq('') - end - ensure - psql('--command="drop database postgresql_test_db" postgres') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/grant_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/grant_spec.rb deleted file mode 100644 index d34523a60f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/grant_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::server::grant:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - it 'should grant access so a user can create in a database' do - begin - pp = <<-EOS.unindent - $db = 'postgres' - $user = 'psql_grant_tester' - $password = 'psql_grant_pw' - - class { 'postgresql::server': } - - # Since we are not testing pg_hba or any of that, make a local user for ident auth - user { $user: - ensure => present, - } - - postgresql::server::role { $user: - password_hash => postgresql_password($user, $password), - } - - postgresql::server::database { $db: } - - postgresql::server::grant { 'grant create test': - object_type => 'database', - privilege => 'CREATE', - db => $db, - role => $user, - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - # Check that the user can create a table in the database - psql('--command="create table foo (foo int)" postgres', 'psql_grant_tester') do |r| - expect(r.stdout).to match(/CREATE TABLE/) - expect(r.stderr).to eq('') - end - ensure - psql('--command="drop table foo" postgres', 'psql_grant_tester') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/pg_hba_rule_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/pg_hba_rule_spec.rb deleted file mode 100644 index bbc8e9464f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/pg_hba_rule_spec.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::server::pg_hba_rule:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - it 'should create a ruleset in pg_hba.conf' do - pp = <<-EOS.unindent - class { 'postgresql::server': } - postgresql::server::pg_hba_rule { "allow application network to access app database": - type => "host", - database => "app", - user => "app", - address => "200.1.2.0/24", - auth_method => md5, - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) - - shell("grep '200.1.2.0/24' /etc/postgresql/*/*/pg_hba.conf || grep '200.1.2.0/24' /var/lib/pgsql/data/pg_hba.conf") - end - - it 'should create a ruleset in pg_hba.conf that denies db access to db test1' do - pp = <<-EOS.unindent - class { 'postgresql::server': } - - postgresql::server::db { "test1": - user => "test1", - password => postgresql_password('test1', 'test1'), - grant => "all", - } - - postgresql::server::pg_hba_rule { "allow anyone to have access to db test1": - type => "local", - database => "test1", - user => "test1", - auth_method => reject, - order => '001', - } - - user { "test1": - shell => "/bin/bash", - managehome => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - - shell('su - test1 -c \'psql -U test1 -c "\q" test1\'', :acceptable_exit_codes => [2]) - end - - it 'should fail catalogue if postgresql::server::manage_pga_conf is disabled' do - pp = <<-EOS.unindent - class { 'postgresql::server': - manage_pg_hba_conf => false, - } - postgresql::server::pg_hba_rule { 'foo': - type => "local", - database => "test1", - user => "test1", - auth_method => reject, - order => '001', - } - EOS - - apply_manifest(pp, :expect_failures => true) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/plperl_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/plperl_spec.rb deleted file mode 100644 index 7331284525..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/plperl_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'server plperl:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - pp = <<-EOS.unindent - class { 'postgresql::server': ensure => absent } - class { 'postgresql::server::plperl': package_ensure => purged } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'test loading class with no parameters' do - pending('no support for plperl with default version on centos 5', - :if => (fact('osfamily') == 'RedHat' and fact('lsbmajdistrelease') == '5')) - pp = <<-EOS.unindent - class { 'postgresql::server': } - class { 'postgresql::server::plperl': } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/role_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/role_spec.rb deleted file mode 100644 index 2bd2b70db0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/role_spec.rb +++ /dev/null @@ -1,88 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::server::role:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - it 'should idempotently create a user who can log in' do - pp = <<-EOS.unindent - $user = "postgresql_test_user" - $password = "postgresql_test_password" - - class { 'postgresql::server': } - - # Since we are not testing pg_hba or any of that, make a local user for ident auth - user { $user: - ensure => present, - } - - postgresql::server::role { $user: - password_hash => postgresql_password($user, $password), - } - EOS - - apply_manifest(pp, :catch_failures => true) - - # Check that the user can log in - psql('--command="select datname from pg_database" postgres', 'postgresql_test_user') do |r| - expect(r.stdout).to match(/template1/) - expect(r.stderr).to eq('') - end - end - - it 'should idempotently alter a user who can log in' do - pp = <<-EOS.unindent - $user = "postgresql_test_user" - $password = "postgresql_test_password2" - - class { 'postgresql::server': } - - # Since we are not testing pg_hba or any of that, make a local user for ident auth - user { $user: - ensure => present, - } - - postgresql::server::role { $user: - password_hash => postgresql_password($user, $password), - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - # Check that the user can log in - psql('--command="select datname from pg_database" postgres', 'postgresql_test_user') do |r| - expect(r.stdout).to match(/template1/) - expect(r.stderr).to eq('') - end - end - - it 'should idempotently create a user with a cleartext password' do - pp = <<-EOS.unindent - $user = "postgresql_test_user2" - $password = "postgresql_test_password2" - - class { 'postgresql::server': } - - # Since we are not testing pg_hba or any of that, make a local user for ident auth - user { $user: - ensure => present, - } - - postgresql::server::role { $user: - password_hash => $password, - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - # Check that the user can log in - psql('--command="select datname from pg_database" postgres', 'postgresql_test_user2') do |r| - expect(r.stdout).to match(/template1/) - expect(r.stderr).to eq('') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/table_grant_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/table_grant_spec.rb deleted file mode 100644 index 6a779d9f63..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/table_grant_spec.rb +++ /dev/null @@ -1,124 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::server::table_grant:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - it 'should grant all accesses to a user' do - begin - pp = <<-EOS.unindent - $db = 'table_grant' - $user = 'psql_grant_tester' - $password = 'psql_table_pw' - - class { 'postgresql::server': } - - # Since we are not testing pg_hba or any of that, make a local user for ident auth - user { $user: - ensure => present, - } - - postgresql::server::role { $user: - password_hash => postgresql_password($user, $password), - } - - postgresql::server::database { $db: } - - # Create a rule for the user - postgresql::server::pg_hba_rule { "allow ${user}": - type => 'local', - database => $db, - user => $user, - auth_method => 'ident', - order => 1, - } - - postgresql_psql { 'Create testing table': - command => 'CREATE TABLE "test_table" (field integer NOT NULL)', - db => $db, - unless => "SELECT * FROM pg_tables WHERE tablename = 'test_table'", - require => Postgresql::Server::Database[$db], - } - - postgresql::server::table_grant { 'grant insert test': - privilege => 'ALL', - table => 'test_table', - db => $db, - role => $user, - require => Postgresql_psql['Create testing table'], - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - ## Check that the user can create a table in the database - psql('--command="create table foo (foo int)" postgres', 'psql_grant_tester') do |r| - expect(r.stdout).to match(/CREATE TABLE/) - expect(r.stderr).to eq('') - end - ensure - psql('--command="drop table foo" postgres', 'psql_grant_tester') - end - end - - it 'should grant access so a user can insert in a table' do - begin - pp = <<-EOS.unindent - $db = 'table_grant' - $user = 'psql_grant_tester' - $password = 'psql_table_pw' - - class { 'postgresql::server': } - - # Since we are not testing pg_hba or any of that, make a local user for ident auth - user { $user: - ensure => present, - } - - postgresql::server::role { $user: - password_hash => postgresql_password($user, $password), - } - - postgresql::server::database { $db: } - - # Create a rule for the user - postgresql::server::pg_hba_rule { "allow ${user}": - type => 'local', - database => $db, - user => $user, - auth_method => 'ident', - order => 1, - } - - postgresql_psql { 'Create testing table': - command => 'CREATE TABLE "test_table" (field integer NOT NULL)', - db => $db, - unless => "SELECT * FROM pg_tables WHERE tablename = 'test_table'", - require => Postgresql::Server::Database[$db], - } - - postgresql::server::table_grant { 'grant insert test': - privilege => 'INSERT', - table => 'test_table', - db => $db, - role => $user, - require => Postgresql_psql['Create testing table'], - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - ## Check that the user can create a table in the database - psql('--command="create table foo (foo int)" postgres', 'psql_grant_tester') do |r| - expect(r.stdout).to match(/CREATE TABLE/) - expect(r.stderr).to eq('') - end - ensure - psql('--command="drop table foo" postgres', 'psql_grant_tester') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/tablespace_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/tablespace_spec.rb deleted file mode 100644 index c633d6da7b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server/tablespace_spec.rb +++ /dev/null @@ -1,67 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::server::tablespace:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - it 'should idempotently create tablespaces and databases that are using them' do - pp = <<-EOS.unindent - class { 'postgresql::server': } - - file { '/tmp/postgres/pg_tablespaces': - ensure => 'directory', - owner => 'postgres', - group => 'postgres', - mode => '0700', - } - - postgresql::server::tablespace { 'tablespace1': - location => '/tmp/postgres/pg_tablespaces/space1', - } - postgresql::server::database { 'tablespacedb1': - encoding => 'utf8', - tablespace => 'tablespace1', - } - postgresql::server::db { 'tablespacedb2': - user => 'dbuser2', - password => postgresql_password('dbuser2', 'dbuser2'), - tablespace => 'tablespace1', - } - - postgresql::server::role { 'spcuser': - password_hash => postgresql_password('spcuser', 'spcuser'), - } - postgresql::server::tablespace { 'tablespace2': - location => '/tmp/postgres/pg_tablespaces/space2', - owner => 'spcuser', - } - postgresql::server::database { 'tablespacedb3': - encoding => 'utf8', - tablespace => 'tablespace2', - } - EOS - - shell('mkdir -p /tmp/postgres') - # Apply appropriate selinux labels - if fact('osfamily') == 'RedHat' - if shell('getenforce').stdout =~ /Enforcing/ - shell('chcon -Rv --type=postgresql_db_t /tmp/postgres') - end - end - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - # Check that databases use correct tablespaces - psql('--command="select ts.spcname from pg_database db, pg_tablespace ts where db.dattablespace = ts.oid and db.datname = \'"\'tablespacedb1\'"\'"') do |r| - expect(r.stdout).to match(/tablespace1/) - expect(r.stderr).to eq('') - end - - psql('--command="select ts.spcname from pg_database db, pg_tablespace ts where db.dattablespace = ts.oid and db.datname = \'"\'tablespacedb3\'"\'"') do |r| - expect(r.stdout).to match(/tablespace2/) - expect(r.stderr).to eq('') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server_spec.rb deleted file mode 100644 index b8456ee76d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/server_spec.rb +++ /dev/null @@ -1,188 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'server:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - # Cleanup after tests have ran - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - it 'test loading class with no parameters' do - pp = <<-EOS.unindent - class { 'postgresql::server': } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - - describe port(5432) do - it { should be_listening } - end - - describe 'setting postgres password' do - it 'should install and successfully adjust the password' do - pp = <<-EOS.unindent - class { 'postgresql::server': - postgres_password => 'foobarbaz', - ip_mask_deny_postgres_user => '0.0.0.0/32', - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/\[set_postgres_postgrespw\]\/returns: executed successfully/) - end - apply_manifest(pp, :catch_changes => true) - - pp = <<-EOS.unindent - class { 'postgresql::server': - postgres_password => 'TPSR$$eports!', - ip_mask_deny_postgres_user => '0.0.0.0/32', - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/\[set_postgres_postgrespw\]\/returns: executed successfully/) - end - apply_manifest(pp, :catch_changes => true) - - end - end -end - -describe 'server without defaults:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - context 'test installing non-default version of postgresql' do - after :all do - psql('--command="drop database postgresql_test_db" postgres', 'postgres') - pp = <<-EOS.unindent - if $::osfamily == 'Debian' { - class { 'apt': } - # XXX Need to purge postgresql-common after uninstalling 9.3 because - # it leaves the init script behind. Poor packaging. - package { 'postgresql-common': - ensure => purged, - require => Class['postgresql::server'], - } - } - class { 'postgresql::globals': - ensure => absent, - manage_package_repo => true, - version => '9.3', - } - class { 'postgresql::server': - ensure => absent, - } - EOS - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq('') - end - - it 'perform installation and create a db' do - pp = <<-EOS.unindent - if $::osfamily == 'Debian' { - class { 'apt': } - } - class { "postgresql::globals": - version => "9.3", - manage_package_repo => true, - encoding => 'UTF8', - locale => 'en_US.UTF-8', - xlogdir => '/tmp/pg_xlogs', - } - class { "postgresql::server": } - postgresql::server::db { "postgresql_test_db": - user => "foo1", - password => postgresql_password('foo1', 'foo1'), - } - postgresql::server::config_entry { 'port': - value => '5432', - } - EOS - - expect(apply_manifest(pp, :catch_failures => true).stderr).to eq('') - apply_manifest(pp, :catch_changes => true) - - shell('test -d /tmp/pg_xlogs') do |r| - expect(r.stdout).to eq('') - expect(r.stderr).to eq('') - end - - psql('postgresql_test_db --command="select datname from pg_database limit 1"') - end - - describe port(5432) do - it { should be_listening } - end - end - - unless ((fact('osfamily') == 'RedHat' and fact('lsbmajdistrelease') == '5') || - fact('osfamily') == 'Debian') - - context 'override locale and encoding' do - after :each do - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - it 'perform installation with different locale and encoding' do - pp = <<-EOS.unindent - class { 'postgresql::server': - locale => 'en_NG', - encoding => 'UTF8', - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - - # Remove db first, if it exists for some reason - shell('su postgres -c "dropdb test1"', :acceptable_exit_codes => [0,1,2]) - shell('su postgres -c "createdb test1"') - shell('su postgres -c \'psql -c "show lc_ctype" test1\'') do |r| - expect(r.stdout).to match(/en_NG/) - end - - shell('su postgres -c \'psql -c "show lc_collate" test1\'') do |r| - expect(r.stdout).to match(/en_NG/) - end - end - end - end -end - -describe 'server with firewall:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - context 'test installing postgresql with firewall management on' do - it 'perform installation and make sure it is idempotent' do - pending('no support for firewall with fedora', :if => (fact('operatingsystem') == 'Fedora')) - pp = <<-EOS.unindent - class { 'firewall': } - class { "postgresql::server": - manage_firewall => true, - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - end -end - -describe 'server without pg_hba.conf:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - after :all do - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - context 'test installing postgresql without pg_hba.conf management on' do - it 'perform installation and make sure it is idempotent' do - pp = <<-EOS.unindent - class { "postgresql::server": - manage_pg_hba_conf => false, - } - EOS - - apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/unsupported_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/unsupported_spec.rb deleted file mode 100644 index 1f64a1fa5e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/unsupported_spec.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - it 'should fail for client' do - pp = <<-EOS - class { 'postgresql::client': } - EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/does not provide defaults for osfamily/i) - end - it 'should fail for server' do - pp = <<-EOS - class { 'postgresql::server': } - EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/does not provide defaults for osfamily/i) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/validate_db_connection_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/validate_db_connection_spec.rb deleted file mode 100644 index 0bfe509d27..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/acceptance/validate_db_connection_spec.rb +++ /dev/null @@ -1,79 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'postgresql::validate_db_connection:', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do - before :all do - # Setup postgresql server and a sample database for tests to use. - pp = <<-EOS.unindent - $db = 'foo' - class { 'postgresql::server': } - - postgresql::server::db { $db: - user => $db, - password => postgresql_password($db, $db), - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - after :all do - # Remove postgresql server after all tests have ran. - apply_manifest("class { 'postgresql::server': ensure => absent }", :catch_failures => true) - end - - it 'should run puppet with no changes declared if socket connectivity works' do - pp = <<-EOS.unindent - postgresql::validate_db_connection { 'foo': - database_name => 'foo', - run_as => 'postgres', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should keep retrying if database is down' do - # So first we shut the db down, then background a startup routine with a - # sleep 10 in front of it. That way the tests should continue while - # the pause and db startup happens in the background. - shell("/etc/init.d/postgresql* stop") - shell('nohup bash -c "sleep 10; /etc/init.d/postgresql* start" > /dev/null 2>&1 &') - - pp = <<-EOS.unindent - postgresql::validate_db_connection { 'foo': - database_name => 'foo', - tries => 30, - sleep => 1, - run_as => 'postgres', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should run puppet with no changes declared if db ip connectivity works' do - pp = <<-EOS.unindent - postgresql::validate_db_connection { 'foo': - database_host => 'localhost', - database_name => 'foo', - database_username => 'foo', - database_password => 'foo', - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should fail catalogue if database connectivity fails' do - pp = <<-EOS.unindent - postgresql::validate_db_connection { 'foobarbaz': - database_host => 'localhost', - database_name => 'foobarbaz', - database_username => 'foobarbaz', - database_password => 'foobarbaz', - } - EOS - - apply_manifest(pp, :expect_failures => true) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/spec_helper.rb deleted file mode 100644 index b4c44aa851..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/spec_helper.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' - -RSpec.configure do |c| - c.mock_with :rspec do |mock| - mock.syntax = [:expect, :should] - end - c.include PuppetlabsSpec::Files - - c.before :each do - # Ensure that we don't accidentally cache facts and environment - # between test cases. - Facter::Util::Loader.any_instance.stubs(:load_all) - Facter.clear - Facter.clear_messages - - # Store any environment variables away to be restored later - @old_env = {} - ENV.each_key {|k| @old_env[k] = ENV[k]} - end - - c.after :each do - PuppetlabsSpec::Files.cleanup - end -end - -# Convenience helper for returning parameters for a type from the -# catalogue. -def param(type, title, param) - param_value(catalogue, type, title, param) -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/spec_helper_acceptance.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/spec_helper_acceptance.rb deleted file mode 100644 index 4984da6b52..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/spec_helper_acceptance.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'beaker-rspec/spec_helper' -require 'beaker-rspec/helpers/serverspec' - -class String - # Provide ability to remove indentation from strings, for the purpose of - # left justifying heredoc blocks. - def unindent - gsub(/^#{scan(/^\s*/).min_by{|l|l.length}}/, "") - end -end - -def shellescape(str) - str = str.to_s - - # An empty argument will be skipped, so return empty quotes. - return "''" if str.empty? - - str = str.dup - - # Treat multibyte characters as is. It is caller's responsibility - # to encode the string in the right encoding for the shell - # environment. - str.gsub!(/([^A-Za-z0-9_\-.,:\/@\n])/, "\\\\\\1") - - # A LF cannot be escaped with a backslash because a backslash + LF - # combo is regarded as line continuation and simply ignored. - str.gsub!(/\n/, "'\n'") - - return str -end - -def psql(psql_cmd, user = 'postgres', exit_codes = [0], &block) - psql = "psql #{psql_cmd}" - shell("su #{shellescape(user)} -c #{shellescape(psql)}", :acceptable_exit_codes => exit_codes, &block) -end - -unless ENV['RS_PROVISION'] == 'no' - hosts.each do |host| - if host.is_pe? - install_pe - else - install_puppet - on host, "mkdir -p #{host['distmoduledir']}" - end - end -end - -UNSUPPORTED_PLATFORMS = ['AIX','windows','Solaris','Suse'] - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Readable test descriptions - c.formatter = :documentation - - # Configure all nodes in nodeset - c.before :suite do - # Install module and dependencies - puppet_module_install(:source => proj_root, :module_name => 'postgresql') - hosts.each do |host| - on host, "/bin/touch #{default['puppetpath']}/hiera.yaml" - on host, 'chmod 755 /root' - if fact('osfamily') == 'Debian' - on host, "echo \"en_US ISO-8859-1\nen_NG.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\n\" > /etc/locale.gen" - on host, '/usr/sbin/locale-gen' - on host, '/usr/sbin/update-locale' - end - on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } - on host, puppet('module','install','puppetlabs-firewall'), { :acceptable_exit_codes => [0,1] } - on host, puppet('module','install','puppetlabs-apt'), { :acceptable_exit_codes => [0,1] } - on host, puppet('module','install','puppetlabs-concat'), { :acceptable_exit_codes => [0,1] } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/client_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/client_spec.rb deleted file mode 100644 index dd24dbfd4a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/client_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::client', :type => :class do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - } - end - - describe 'with parameters' do - let :params do - { - :package_ensure => 'absent', - :package_name => 'mypackage', - } - end - - it 'should modify package' do - should contain_package("postgresql-client").with({ - :ensure => 'absent', - :name => 'mypackage', - :tag => 'postgresql', - }) - end - end - - describe 'with no parameters' do - it 'should create package with postgresql tag' do - should contain_package('postgresql-client').with({ - :tag => 'postgresql', - }) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/globals_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/globals_spec.rb deleted file mode 100644 index f8feb2f782..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/globals_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::globals', :type => :class do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - :lsbdistid => 'Debian', - } - end - - describe 'with no parameters' do - it 'should work' do - should contain_class("postgresql::globals") - end - end - - describe 'manage_package_repo => true' do - let(:params) do - { - :manage_package_repo => true, - } - end - it 'should pull in class postgresql::repo' do - should contain_class("postgresql::repo") - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/devel_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/devel_spec.rb deleted file mode 100644 index 8c289fc54f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/devel_spec.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::lib::devel', :type => :class do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - } - end - it { should contain_class("postgresql::lib::devel") } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/java_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/java_spec.rb deleted file mode 100644 index 7541bf586f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/java_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::lib::java', :type => :class do - - describe 'on a debian based os' do - let :facts do { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - } - end - it { should contain_package('postgresql-jdbc').with( - :name => 'libpostgresql-jdbc-java', - :ensure => 'present' - )} - end - - describe 'on a redhat based os' do - let :facts do { - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '6.4', - } - end - it { should contain_package('postgresql-jdbc').with( - :name => 'postgresql-jdbc', - :ensure => 'present' - )} - describe 'when parameters are supplied' do - let :params do - {:package_ensure => 'latest', :package_name => 'somepackage'} - end - it { should contain_package('postgresql-jdbc').with( - :name => 'somepackage', - :ensure => 'latest' - )} - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/python_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/python_spec.rb deleted file mode 100644 index ab3fd3207d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/lib/python_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::lib::python', :type => :class do - - describe 'on a redhat based os' do - let :facts do { - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '6.4', - } - end - it { should contain_package('python-psycopg2').with( - :name => 'python-psycopg2', - :ensure => 'present' - )} - end - - describe 'on a debian based os' do - let :facts do { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - } - end - it { should contain_package('python-psycopg2').with( - :name => 'python-psycopg2', - :ensure => 'present' - )} - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/params_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/params_spec.rb deleted file mode 100644 index 730fd1097a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/params_spec.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::params', :type => :class do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - } - end - it { should contain_class("postgresql::params") } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/repo_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/repo_spec.rb deleted file mode 100644 index e7e286f642..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/repo_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::repo', :type => :class do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - :lsbdistid => 'Debian', - } - end - - describe 'with no parameters' do - it 'should instantiate apt_postgresql_org class' do - should contain_class('postgresql::repo::apt_postgresql_org') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server/contrib_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server/contrib_spec.rb deleted file mode 100644 index 9fbab060f0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server/contrib_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::server::contrib', :type => :class do - let :pre_condition do - "class { 'postgresql::server': }" - end - - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - :kernel => 'Linux', - :concat_basedir => tmpfilename('contrib'), - } - end - - describe 'with parameters' do - let(:params) do - { - :package_name => 'mypackage', - :package_ensure => 'absent', - } - end - - it 'should create package with correct params' do - should contain_package('postgresql-contrib').with({ - :ensure => 'absent', - :name => 'mypackage', - :tag => 'postgresql', - }) - end - end - - describe 'with no parameters' do - it 'should create package with postgresql tag' do - should contain_package('postgresql-contrib').with({ - :tag => 'postgresql', - }) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server/initdb_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server/initdb_spec.rb deleted file mode 100644 index bcf2dbe1bc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server/initdb_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::server::initdb', :type => :class do - let (:pre_condition) do - "include postgresql::server" - end - describe 'on RedHat' do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystem => 'CentOS', - :operatingsystemrelease => '6.0', - :concat_basedir => tmpfilename('server'), - } - end - it { should contain_file('/var/lib/pgsql/data').with_ensure('directory') } - end - describe 'on Amazon' do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystem => 'Amazon', - :concat_basedir => tmpfilename('server'), - } - end - it { should contain_file('/var/lib/pgsql9/data').with_ensure('directory') } - end -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server/plperl_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server/plperl_spec.rb deleted file mode 100644 index 785ed9a7f0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server/plperl_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::server::plperl', :type => :class do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - :kernel => 'Linux', - :concat_basedir => tmpfilename('plperl'), - } - end - - let :pre_condition do - "class { 'postgresql::server': }" - end - - describe 'with no parameters' do - it { should contain_class("postgresql::server::plperl") } - it 'should create package' do - should contain_package('postgresql-plperl').with({ - :ensure => 'present', - :tag => 'postgresql', - }) - end - end - - describe 'with parameters' do - let :params do - { - :package_ensure => 'absent', - :package_name => 'mypackage', - } - end - - it { should contain_class("postgresql::server::plperl") } - it 'should create package with correct params' do - should contain_package('postgresql-plperl').with({ - :ensure => 'absent', - :name => 'mypackage', - :tag => 'postgresql', - }) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server_spec.rb deleted file mode 100644 index 203eecb51d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/classes/server_spec.rb +++ /dev/null @@ -1,100 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::server', :type => :class do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - :concat_basedir => tmpfilename('server'), - :kernel => 'Linux', - } - end - - describe 'with no parameters' do - it { should contain_class("postgresql::params") } - it { should contain_class("postgresql::server") } - it 'should validate connection' do - should contain_postgresql__validate_db_connection('validate_service_is_running') - end - end - - describe 'manage_firewall => true' do - let(:params) do - { - :manage_firewall => true, - :ensure => true, - } - end - - it 'should create firewall rule' do - should contain_firewall("5432 accept - postgres") - end - end - - describe 'ensure => absent' do - let(:params) do - { - :ensure => 'absent', - :datadir => '/my/path', - :xlogdir => '/xlog/path', - } - end - - it 'should make package purged' do - should contain_package('postgresql-server').with({ - :ensure => 'purged', - }) - end - - it 'stop the service' do - should contain_service('postgresqld').with({ - :ensure => false, - }) - end - - it 'should remove datadir' do - should contain_file('/my/path').with({ - :ensure => 'absent', - }) - end - - it 'should remove xlogdir' do - should contain_file('/xlog/path').with({ - :ensure => 'absent', - }) - end - end - - describe 'package_ensure => absent' do - let(:params) do - { - :package_ensure => 'absent', - } - end - - it 'should remove the package' do - should contain_package('postgresql-server').with({ - :ensure => 'purged', - }) - end - - it 'should still enable the service' do - should contain_service('postgresqld').with({ - :ensure => true, - }) - end - end - - describe 'needs_initdb => true' do - let(:params) do - { - :needs_initdb => true, - } - end - - it 'should contain proper initdb exec' do - should contain_exec('postgresql_initdb') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/config_entry_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/config_entry_spec.rb deleted file mode 100644 index 4c25c67916..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/config_entry_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::server::config_entry', :type => :define do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '6.4', - } - end - - let(:title) { 'config_entry'} - - let :target do - tmpfilename('postgresql_conf') - end - - context "syntax check" do - let(:params) { { :ensure => 'present'} } - it { should contain_postgresql__server__config_entry('config_entry') } - end -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_grant_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_grant_spec.rb deleted file mode 100644 index 2e481df9fb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_grant_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::server::database_grant', :type => :define do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - } - end - - let :title do - 'test' - end - - let :params do - { - :privilege => 'ALL', - :db => 'test', - :role => 'test', - } - end - - it { should contain_postgresql__server__database_grant('test') } - it { should contain_postgresql__server__grant('database:test') } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_spec.rb deleted file mode 100644 index a703827fec..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/database_spec.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::server::database', :type => :define do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - } - end - let :title do - 'test' - end - it { should contain_postgresql__server__database('test') } - it { should contain_postgresql_psql("Check for existence of db 'test'") } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/db_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/db_spec.rb deleted file mode 100644 index 60fa9a9315..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/db_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::server::db', :type => :define do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - } - end - - let :title do - 'test' - end - - let :params do - { - :user => 'test', - :password => 'test', - :owner => 'tester', - } - end - - it { should contain_postgresql__server__db('test') } - it { should contain_postgresql__server__database('test').with_owner('tester') } - it { should contain_postgresql__server__role('test') } - it { should contain_postgresql__server__database_grant('GRANT test - ALL - test') } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/grant_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/grant_spec.rb deleted file mode 100644 index 43eeb8c01d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/grant_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::server::grant', :type => :define do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - } - end - - let :title do - 'test' - end - - let :params do - { - :db => 'test', - :role => 'test', - } - end - - it { should contain_postgresql__server__grant('test') } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/pg_hba_rule_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/pg_hba_rule_spec.rb deleted file mode 100644 index b01e338a4b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/pg_hba_rule_spec.rb +++ /dev/null @@ -1,161 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::server::pg_hba_rule', :type => :define do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - :concat_basedir => tmpfilename('pg_hba'), - } - end - let :title do - 'test' - end - let :target do - tmpfilename('pg_hba_rule') - end - - context 'test template 1' do - let :params do - { - :type => 'host', - :database => 'all', - :user => 'all', - :address => '1.1.1.1/24', - :auth_method => 'md5', - :target => target, - } - end - it do - content = param('concat::fragment', 'pg_hba_rule_test', 'content') - content.should =~ /host\s+all\s+all\s+1\.1\.1\.1\/24\s+md5/ - end - end - - context 'test template 2' do - let :params do - { - :type => 'local', - :database => 'all', - :user => 'all', - :auth_method => 'ident', - :target => target, - } - end - it do - content = param('concat::fragment', 'pg_hba_rule_test', 'content') - content.should =~ /local\s+all\s+all\s+ident/ - end - end - - context 'test template 3' do - let :params do - { - :type => 'host', - :database => 'all', - :user => 'all', - :address => '0.0.0.0/0', - :auth_method => 'ldap', - :auth_option => 'foo=bar', - :target => target, - } - end - it do - content = param('concat::fragment', 'pg_hba_rule_test', 'content') - content.should =~ /host\s+all\s+all\s+0\.0\.0\.0\/0\s+ldap\s+foo=bar/ - end - end - - context 'validation' do - context 'validate type test 1' do - let :params do - { - :type => 'invalid', - :database => 'all', - :user => 'all', - :address => '0.0.0.0/0', - :auth_method => 'ldap', - :target => target, - } - end - it 'should fail parsing when type is not valid' do - expect {subject}.to raise_error(Puppet::Error, - /The type you specified \[invalid\] must be one of/) - end - end - - context 'validate auth_method' do - let :params do - { - :type => 'local', - :database => 'all', - :user => 'all', - :address => '0.0.0.0/0', - :auth_method => 'invalid', - :target => target, - } - end - - it 'should fail parsing when auth_method is not valid' do - expect {subject}.to raise_error(Puppet::Error, - /The auth_method you specified \[invalid\] must be one of/) - end - end - - context 'validate unsupported auth_method' do - let :pre_condition do - <<-EOS - class { 'postgresql::globals': - version => '9.0', - } - class { 'postgresql::server': } - EOS - end - - let :params do - { - :type => 'local', - :database => 'all', - :user => 'all', - :address => '0.0.0.0/0', - :auth_method => 'peer', - :target => target, - } - end - - it 'should fail parsing when auth_method is not valid' do - expect {subject}.to raise_error(Puppet::Error, - /The auth_method you specified \[peer\] must be one of: trust, reject, md5, sha1, password, gss, sspi, krb5, ident, ldap, radius, cert, pam/) - end - end - - context 'validate supported auth_method' do - let :pre_condition do - <<-EOS - class { 'postgresql::globals': - version => '9.2', - } - class { 'postgresql::server': } - EOS - end - - let :params do - { - :type => 'local', - :database => 'all', - :user => 'all', - :address => '0.0.0.0/0', - :auth_method => 'peer', - :target => target, - } - end - - it do - content = param('concat::fragment', 'pg_hba_rule_test', 'content') - content.should =~ /local\s+all\s+all\s+0\.0\.0\.0\/0\s+peer/ - end - end - - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/role_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/role_spec.rb deleted file mode 100644 index a50ca1448c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/role_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::server::role', :type => :define do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - } - end - - let :title do - 'test' - end - - let :params do - { - :password_hash => 'test', - } - end - - it { should contain_postgresql__server__role('test') } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/table_grant_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/table_grant_spec.rb deleted file mode 100644 index 15136a71e2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/table_grant_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::server::table_grant', :type => :define do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - } - end - - let :title do - 'test' - end - - let :params do - { - :privilege => 'ALL', - :db => 'test', - :role => 'test', - :table => 'foo', - } - end - - it { should contain_postgresql__server__table_grant('test') } - it { should contain_postgresql__server__grant('table:test') } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/tablespace_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/tablespace_spec.rb deleted file mode 100644 index eb29f1e577..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/server/tablespace_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::server::tablespace', :type => :define do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - } - end - - let :title do - 'test' - end - - let :params do - { - :location => '/srv/data/foo', - } - end - - it { should contain_postgresql__server__tablespace('test') } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/validate_db_connection_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/validate_db_connection_spec.rb deleted file mode 100644 index 7a248f6c09..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/defines/validate_db_connection_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'spec_helper' - -describe 'postgresql::validate_db_connection', :type => :define do - let :facts do - { - :osfamily => 'Debian', - :operatingsystem => 'Debian', - :operatingsystemrelease => '6.0', - } - end - - let :title do - 'test' - end - - describe 'should work with only default parameters' do - it { should contain_postgresql__validate_db_connection('test') } - end - - describe 'should work with all parameters' do - let :params do - { - :database_host => 'test', - :database_name => 'test', - :database_password => 'test', - :database_username => 'test', - :database_port => 5432, - :run_as => 'postgresq', - :sleep => 4, - :tries => 30, - } - end - it { should contain_postgresql__validate_db_connection('test') } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_acls_to_resources_hash_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_acls_to_resources_hash_spec.rb deleted file mode 100644 index 0ac1d1bfda..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_acls_to_resources_hash_spec.rb +++ /dev/null @@ -1,137 +0,0 @@ -require 'spec_helper' - -describe 'postgresql_acls_to_resources_hash', :type => :puppet_function do - context 'individual transform tests' do - it do - input = 'local all postgres ident' - result = { - "postgresql class generated rule test 0"=>{ - "type"=>"local", - "database"=>"all", - "user"=>"postgres", - "auth_method"=>"ident", - "order"=>"100", - }, - } - - should run.with_params([input], 'test', 100).and_return(result) - end - - it do - input = 'local all root ident' - result = { - "postgresql class generated rule test 0"=>{ - "type"=>"local", - "database"=>"all", - "user"=>"root", - "auth_method"=>"ident", - "order"=>"100", - }, - } - - should run.with_params([input], 'test', 100).and_return(result) - end - - it do - input_array = [ - 'local all all ident', - ] - result = { - "postgresql class generated rule test 0"=>{ - "type"=>"local", - "database"=>"all", - "user"=>"all", - "auth_method"=>"ident", - "order"=>"100", - }, - } - - should run.with_params(input_array, 'test', 100).and_return(result) - end - - it do - input = 'host all all 127.0.0.1/32 md5' - result = { - "postgresql class generated rule test 0"=>{ - "type"=>"host", - "database"=>"all", - "user"=>"all", - "address"=>"127.0.0.1/32", - "auth_method"=>"md5", - "order"=>"100", - }, - } - - should run.with_params([input], 'test', 100).and_return(result) - end - - it do - input = 'host all all 0.0.0.0/0 md5' - result = { - "postgresql class generated rule test 0"=>{ - "type"=>"host", - "database"=>"all", - "user"=>"all", - "address"=>"0.0.0.0/0", - "auth_method"=>"md5", - "order"=>"100", - }, - } - - should run.with_params([input], 'test', 100).and_return(result) - end - - it do - input = 'host all all ::1/128 md5' - result = { - "postgresql class generated rule test 0"=>{ - "type"=>"host", - "database"=>"all", - "user"=>"all", - "address"=>"::1/128", - "auth_method"=>"md5", - "order"=>"100", - }, - } - - should run.with_params([input], 'test', 100).and_return(result) - end - - it do - input = 'host all all 1.1.1.1 255.255.255.0 md5' - result = { - "postgresql class generated rule test 0"=>{ - "type"=>"host", - "database"=>"all", - "user"=>"all", - "address"=>"1.1.1.1 255.255.255.0", - "auth_method"=>"md5", - "order"=>"100", - }, - } - - should run.with_params([input], 'test', 100).and_return(result) - end - - it do - input = 'host all all 1.1.1.1 255.255.255.0 ldap ldapserver=ldap.example.net ldapprefix="cn=" ldapsuffix=", dc=example, dc=net"' - result = { - "postgresql class generated rule test 0"=>{ - "type"=>"host", - "database"=>"all", - "user"=>"all", - "address"=>"1.1.1.1 255.255.255.0", - "auth_method"=>"ldap", - "auth_option"=>"ldapserver=ldap.example.net ldapprefix=\"cn=\" ldapsuffix=\", dc=example, dc=net\"", - "order"=>"100", - }, - } - - should run.with_params([input], 'test', 100).and_return(result) - end - end - - it 'should return an empty hash when input is empty array' do - should run.with_params([], 'test', 100).and_return({}) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_escape_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_escape_spec.rb deleted file mode 100644 index ee1157d0e7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_escape_spec.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'spec_helper' - -describe 'postgresql_escape', :type => :puppet_function do - it { should run.with_params('foo'). - and_return('$$foo$$') } -end -describe 'postgresql_escape', :type => :puppet_function do - it { should run.with_params('fo$$o'). - and_return('$ed$fo$$o$ed$') } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_password_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_password_spec.rb deleted file mode 100644 index 0d043f8734..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/functions/postgresql_password_spec.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'spec_helper' - -describe 'postgresql_password', :type => :puppet_function do - it { should run.with_params('foo', 'bar'). - and_return('md596948aad3fcae80c08a35c9b5958cd89') } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/provider/postgresql_conf/parsed_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/provider/postgresql_conf/parsed_spec.rb deleted file mode 100644 index 2e2bfbe2d0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/provider/postgresql_conf/parsed_spec.rb +++ /dev/null @@ -1,112 +0,0 @@ -require 'spec_helper' -require "tempfile" - -provider_class = Puppet::Type.type(:postgresql_conf).provider(:parsed) - -describe provider_class do - let(:title) { 'postgresql_conf' } - let(:provider) { - conf_class = Puppet::Type.type(:postgresql_conf) - provider = conf_class.provider(:parsed) - conffile = tmpfilename('postgresql.conf') - provider.any_instance.stubs(:target).returns conffile - provider - } - - before do - end - - after :each do - provider.initvars - end - - describe "simple configuration that should be allowed" do - it "should parse a simple ini line" do - provider.parse_line("listen_addreses = '*'").should == - { :name=>"listen_addreses", :value=>"*", :comment=>nil, :record_type=>:parsed } - end - - it "should parse a simple ini line (2)" do - provider.parse_line(" listen_addreses = '*'").should == - { :name=>"listen_addreses", :value=>"*", :comment=>nil, :record_type=>:parsed } - end - - it "should parse a simple ini line (3)" do - provider.parse_line("listen_addreses = '*' # dont mind me").should == - { :name=>"listen_addreses", :value=>"*", :comment=>"dont mind me", :record_type=>:parsed } - end - - it "should parse a comment" do - provider.parse_line("# dont mind me").should == - { :line=>"# dont mind me", :record_type=>:comment } - end - - it "should parse a comment (2)" do - provider.parse_line(" \t# dont mind me").should == - { :line=>" \t# dont mind me", :record_type=>:comment } - end - - it "should allow includes" do - provider.parse_line("include puppetextra").should == - { :name=>"include", :value=>"puppetextra", :comment=>nil, :record_type=>:parsed } - end - - it "should allow numbers thorugh without quotes" do - provider.parse_line("wal_keep_segments = 32").should == - { :name=>"wal_keep_segments", :value=>"32", :comment=>nil, :record_type=>:parsed } - end - - it "should allow blanks thorugh " do - provider.parse_line("").should == - { :line=>"", :record_type=>:blank } - end - - it "should parse keys with dots " do - provider.parse_line("auto_explain.log_min_duration = 1ms").should == - { :name => "auto_explain.log_min_duration", :value => "1ms", :comment => nil, :record_type => :parsed } - end - end - - describe "configuration that should be set" do - it "should set comment lines" do - provider.to_line({ :line=>"# dont mind me", :record_type=>:comment }).should == - '# dont mind me' - end - - it "should set blank lines" do - provider.to_line({ :line=>"", :record_type=>:blank }).should == - '' - end - - it "should set simple configuration" do - provider.to_line({:name=>"listen_addresses", :value=>"*", :comment=>nil, :record_type=>:parsed }).should == - "listen_addresses = '*'" - end - - it "should set simple configuration with period in name" do - provider.to_line({:name => "auto_explain.log_min_duration", :value => '100ms', :comment => nil, :record_type => :parsed }).should == - "auto_explain.log_min_duration = 100ms" - end - - it "should set simple configuration even with comments" do - provider.to_line({:name=>"listen_addresses", :value=>"*", :comment=>'dont mind me', :record_type=>:parsed }).should == - "listen_addresses = '*' # dont mind me" - end - - it 'should quote includes' do - provider.to_line( {:name=>"include", :value=>"puppetextra", :comment=>nil, :record_type=>:parsed }).should == - "include 'puppetextra'" - end - - it 'should quote multiple words' do - provider.to_line( {:name=>"archive_command", :value=>"rsync up", :comment=>nil, :record_type=>:parsed }).should == - "archive_command = 'rsync up'" - end - - it 'shouldn\'t quote numbers' do - provider.to_line( {:name=>"wal_segments", :value=>"32", :comment=>nil, :record_type=>:parsed }).should == - "wal_segments = 32" - end - end -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb deleted file mode 100644 index 325e3dbd4b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/puppet/provider/postgresql_psql/ruby_spec.rb +++ /dev/null @@ -1,140 +0,0 @@ -require 'spec_helper' - -describe Puppet::Type.type(:postgresql_psql).provider(:ruby) do - let(:name) { 'rspec psql test' } - let(:resource) do - Puppet::Type.type(:postgresql_psql).new({ :name => name, :provider => :ruby }.merge attributes) - end - - let(:provider) { resource.provider } - - context("#run_sql_command") do - describe "with default attributes" do - let(:attributes) do { :db => 'spec_db' } end - - it "executes with the given psql_path on the given DB" do - expect(provider).to receive(:run_command).with(['psql', '-d', - attributes[:db], '-t', '-c', 'SELECT something'], 'postgres', - 'postgres') - - provider.run_sql_command("SELECT something") - end - end - describe "with psql_path and db" do - let(:attributes) do { - :psql_path => '/opt/postgres/psql', - :psql_user => 'spec_user', - :psql_group => 'spec_group', - :cwd => '/spec', - :db => 'spec_db' - } end - - it "executes with the given psql_path on the given DB" do - expect(Dir).to receive(:chdir).with(attributes[:cwd]).and_yield - expect(provider).to receive(:run_command).with([attributes[:psql_path], - '-d', attributes[:db], '-t', '-c', 'SELECT something'], - attributes[:psql_user], attributes[:psql_group]) - - provider.run_sql_command("SELECT something") - end - end - describe "with search_path string" do - let(:attributes) do { - :search_path => "schema1" - } end - - it "executes with the given search_path" do - expect(provider).to receive(:run_command).with(['psql', '-t', '-c', - 'set search_path to schema1; SELECT something'], - 'postgres', 'postgres') - - provider.run_sql_command("SELECT something") - end - end - describe "with search_path array" do - let(:attributes) do { - :search_path => ['schema1','schema2'], - } end - - it "executes with the given search_path" do - expect(provider).to receive(:run_command).with(['psql', '-t', '-c', - 'set search_path to schema1,schema2; SELECT something'], - 'postgres', - 'postgres' - ) - - provider.run_sql_command("SELECT something") - end - end - - end - - context("#command") do - context "when unless is specified" do - [:true, :false, true, false].each do |refresh| - context "and refreshonly is #{refresh}" do - let(:attributes) { { - :command => 'SELECT something', - :db => 'spec_db', - :unless => 'SELECT something', - :refreshonly => refresh - } } - - it "does not fail when the status is successful" do - expect(provider).to receive(:run_unless_sql_command).and_return ["1 row returned", 0] - provider.command - end - - it "returns the given command when rows are returned" do - expect(provider).to receive(:run_unless_sql_command).and_return ["1 row returned", 0] - expect(provider.command).to eq("SELECT something") - end - - it "does not return the given command when no rows are returned" do - expect(provider).to receive(:run_unless_sql_command).and_return ["0 rows returned", 0] - expect(provider.command).to_not eq("SELECT something") - end - - it "raises an error when the sql command fails" do - allow(provider).to receive(:run_unless_sql_command).and_return ["Something went wrong", 1] - expect { provider.command }.to raise_error(Puppet::Error, /Something went wrong/) - end - end - end - end - - context "when unless is not specified" do - context "and refreshonly is true" do - let(:attributes) do { - :command => 'SELECT something', - :db => 'spec_db', - :refreshonly => :true - } end - it "does not run unless sql command" do - expect(provider).to_not receive(:run_unless_sql_command) - provider.command - end - - it "returns the given command do disable sync" do - expect(provider.command).to eq("SELECT something") - end - end - - context "and refreshonly is false" do - let(:attributes) do { - :command => 'SELECT something', - :db => 'spec_db', - :refreshonly => :false - } end - it "does not run unless sql command" do - expect(provider).to_not receive(:run_unless_sql_command) - provider.command - end - - it "does not return the command so as to enable sync" do - expect(provider.command).to_not eq("SELECT something") - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/puppet/type/postgresql_psql_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/puppet/type/postgresql_psql_spec.rb deleted file mode 100644 index e89c05fedf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/puppet/type/postgresql_psql_spec.rb +++ /dev/null @@ -1,92 +0,0 @@ -require 'spec_helper' - -describe Puppet::Type.type(:postgresql_psql), "when validating attributes" do - [:name, :unless, :db, :psql_path, :psql_user, :psql_group].each do |attr| - it "should have a #{attr} parameter" do - expect(Puppet::Type.type(:postgresql_psql).attrtype(attr)).to eq(:param) - end - end - - [:command].each do |attr| - it "should have a #{attr} property" do - expect(Puppet::Type.type(:postgresql_psql).attrtype(attr)).to eq(:property) - end - end -end - -describe Puppet::Type.type(:postgresql_psql), :unless => Puppet.features.microsoft_windows? do - subject do - Puppet::Type.type(:postgresql_psql).new({:name => 'rspec'}.merge attributes) - end - - describe "available attributes" do - { - :name => "rspec", - :command => "SELECT stuff", - :unless => "SELECT other,stuff", - :db => "postgres", - :psql_path => "/bin/false", - :psql_user => "postgres", - :psql_group => "postgres", - :cwd => "/var/lib", - :refreshonly => :true, - :search_path => [ "schema1", "schema2"] - }.each do |attr, value| - context attr do - let(:attributes) do { attr => value } end - its([attr]) { should == value } - end - end - - context "default values" do - let(:attributes) do {} end - its([:psql_path]) { should eq("psql") } - its([:psql_user]) { should eq("postgres") } - its([:psql_group]) { should eq("postgres") } - its([:cwd]) { should eq("/tmp") } - its(:refreshonly?) { should be_false } - end - end - - describe "#refreshonly" do - [true, :true].each do |refreshonly| - context "=> #{refreshonly.inspect}" do - let(:attributes) do { :refreshonly => refreshonly } end - it "has a value of true" do - expect(subject.refreshonly?).to be_true - end - it "will not enforce command on sync because refresh() will be called" do - expect(subject.provider).to_not receive(:command=) - subject.property(:command).sync - end - end - end - - [false, :false].each do |refreshonly| - context "=> #{refreshonly.inspect}" do - let(:attributes) do { :refreshonly => refreshonly } end - it "has a value of false" do - expect(subject.refreshonly?).to be_false - end - it "will enforce command on sync because refresh() will not be called" do - expect(subject.provider).to receive(:command=) - subject.property(:command).sync - end - end - end - end - - ## If we refresh the resource, the command should always be run regardless of - ## refreshonly - describe "when responding to refresh" do - [true, :true, false, :false].each do |refreshonly| - context "with refreshonly => #{refreshonly.inspect}" do - let(:attributes) do { :refreshonly => refreshonly } end - it "will enforce command on sync" do - expect(subject.provider).to receive(:command=) - subject.refresh - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/type/postgresql_conf_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/type/postgresql_conf_spec.rb deleted file mode 100644 index 45242033a0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/spec/unit/type/postgresql_conf_spec.rb +++ /dev/null @@ -1,50 +0,0 @@ -#! /usr/bin/env ruby -require 'spec_helper' - -describe Puppet::Type.type(:postgresql_conf) do - before do - @provider_class = described_class.provide(:simple) { mk_resource_methods } - @provider_class.stubs(:suitable?).returns true - described_class.stubs(:defaultprovider).returns @provider_class - end - - describe "namevar validation" do - it "should have :name as its namevar" do - described_class.key_attributes.should == [:name] - end - it "should not invalid names" do - expect { described_class.new(:name => 'foo bar') }.to raise_error(Puppet::Error, /Invalid value/) - end - it "should allow dots in names" do - expect { described_class.new(:name => 'foo.bar') }.to_not raise_error - end - end - - describe "when validating attributes" do - [:name, :provider].each do |param| - it "should have a #{param} parameter" do - described_class.attrtype(param).should == :param - end - end - - [:value, :target].each do |property| - it "should have a #{property} property" do - described_class.attrtype(property).should == :property - end - end - end - - describe "when validating values" do - describe "ensure" do - it "should support present as a value for ensure" do - expect { described_class.new(:name => 'foo', :ensure => :present) }.to_not raise_error - end - it "should support absent as a value for ensure" do - expect { described_class.new(:name => 'foo', :ensure => :absent) }.to_not raise_error - end - it "should not support other values" do - expect { described_class.new(:name => 'foo', :ensure => :foo) }.to raise_error(Puppet::Error, /Invalid value/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/templates/pg_hba_rule.conf b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/templates/pg_hba_rule.conf deleted file mode 100644 index af54db5b2a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/postgresql/templates/pg_hba_rule.conf +++ /dev/null @@ -1,5 +0,0 @@ - -# Rule Name: <%=@name%> -# Description: <%=@description%> -# Order: <%=@order%> -<%=@type%> <%=@database%> <%=@user%> <%=@address%> <%=@auth_method%> <%=@auth_option%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/LICENSE deleted file mode 100644 index 9914a458b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Juan Treminio and other contributors -https://puphpet.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/README.md deleted file mode 100644 index 6f3403c1b3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Puppet module: puphpet - -This is a Puppet module for [PuPHPet](https://puphpet.com)-related code diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/files/xdebug_cli_alias.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/files/xdebug_cli_alias.erb deleted file mode 100644 index 4d0967e888..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/files/xdebug_cli_alias.erb +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -XDEBUG_CONFIG="idekey=xdebug" php -dxdebug.remote_host=`echo $SSH_CLIENT | cut -d "=" -f 2 | awk '{print $1}'` "$@" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_equals.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_equals.rb deleted file mode 100644 index 118c4b6487..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_equals.rb +++ /dev/null @@ -1,36 +0,0 @@ -# -# hash_key_equals.rb -# - -module Puppet::Parser::Functions - - newfunction(:hash_key_equals, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| - - Returns true if the variable passed to this function is a hash, - it contains the key requested, and the key matches value. - ENDHEREDOC - - unless args.length == 3 - raise Puppet::ParseError, ("hash_key_equals(): wrong number of arguments (#{args.length}; must be 3)") - end - - hashVar = args[0] - keyVar = args[1] - expectedValue = args[2] - - unless hashVar.is_a?(Hash) - return false - end - - unless hashVar.has_key?(keyVar) - return false - end - - unless hashVar[keyVar].to_i == expectedValue.to_i - return false - end - - return true - - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_true.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_true.rb deleted file mode 100644 index fd495f8f14..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/hash_key_true.rb +++ /dev/null @@ -1,42 +0,0 @@ -# -# hash_key_true.rb -# - -module Puppet::Parser::Functions - - newfunction(:hash_key_true, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| - - Returns true if the key within hash is truthy - ENDHEREDOC - - unless args.length == 2 - raise Puppet::ParseError, ("hash_key_true(): wrong number of arguments (#{args.length}; must be 2)") - end - - arr = args[0] - key = args[1] - - unless arr.is_a?(Hash) - return false - end - - unless arr.has_key?(key) - return false - end - - if arr[key].nil? - return false - end - - if arr[key].empty? - return false - end - - if arr[key] == 'false' - return false - end - - return true - - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/value_true.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/value_true.rb deleted file mode 100644 index d50c2d8304..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/lib/puppet/parser/functions/value_true.rb +++ /dev/null @@ -1,45 +0,0 @@ -# -# value_true.rb -# - -module Puppet::Parser::Functions - - newfunction(:value_true, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| - - Returns true if value is truthy - ENDHEREDOC - - unless args.length == 1 - raise Puppet::ParseError, ("value_true(): wrong number of arguments (#{args.length}; must be 1)") - end - - value = args[0] - - if value.nil? - return false - end - - if value == false - return false - end - - if value == 0 - return false - end - - if value == '0' - return false - end - - if value == 'false' - return false - end - - if value.empty? - return false - end - - return true - - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/adminer.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/adminer.pp deleted file mode 100644 index 0d23275bcc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/adminer.pp +++ /dev/null @@ -1,23 +0,0 @@ -class puphpet::adminer( - $location, - $owner = 'www-data', - $php_package = 'php' -) { - - if ! defined(File[$location]) { - file { $location: - replace => no, - ensure => directory, - mode => 775, - require => Package[$php_package] - } - } - - exec{ "download adminer to ${location}": - command => "wget http://www.adminer.org/latest.php -O ${location}/index.php", - require => File[$location], - creates => "${location}/index.php", - returns => [ 0, 4 ], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/apache/modpagespeed.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/apache/modpagespeed.pp deleted file mode 100644 index 9597949904..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/apache/modpagespeed.pp +++ /dev/null @@ -1,50 +0,0 @@ -# This depends on puppetlabs/apache: https://github.com/puppetlabs/puppetlabs-apache - -class puphpet::apache::modpagespeed ( - $url = $puphpet::params::apache_mod_pagespeed_url, - $package = $puphpet::params::apache_mod_pagespeed_package, - $ensure = 'present' -) { - - $download_location = $::osfamily ? { - 'Debian' => '/.puphpet-stuff/mod-pagespeed.deb', - 'Redhat' => '/.puphpet-stuff/mod-pagespeed.rpm' - } - - $provider = $::osfamily ? { - 'Debian' => 'dpkg', - 'Redhat' => 'yum' - } - - exec { "download apache mod-pagespeed to ${download_location}": - creates => $download_location, - command => "wget ${url} -O ${download_location}", - timeout => 30, - path => '/usr/bin' - } - - package { $package: - ensure => $ensure, - provider => $provider, - source => $download_location, - notify => Service['httpd'] - } - - file { [ - "${apache::params::mod_dir}/pagespeed.load", - "${apache::params::mod_dir}/pagespeed.conf", - "${apache::params::confd_dir}/pagespeed_libraries.conf" - ] : - purge => false, - } - - if $apache::params::mod_enable_dir != undef { - file { [ - "${apache::params::mod_enable_dir}/pagespeed.load", - "${apache::params::mod_enable_dir}/pagespeed.conf" - ] : - purge => false, - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/apache/modspdy.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/apache/modspdy.pp deleted file mode 100644 index 6cee775b50..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/apache/modspdy.pp +++ /dev/null @@ -1,86 +0,0 @@ -# This depends on puppetlabs/apache: https://github.com/puppetlabs/puppetlabs-apache - -class puphpet::apache::modspdy ( - $url = $puphpet::params::apache_mod_spdy_url, - $package = $puphpet::params::apache_mod_spdy_package, - $php_package = 'php', - $ensure = 'present' -) { - - class { 'apache::mod::php': - package_ensure => 'purged' - } - - if $php_package == 'php' and ! defined(Package[$puphpet::params::apache_mod_spdy_cgi]) { - package { $puphpet::params::apache_mod_spdy_cgi: - ensure => present, - notify => Service[$apache::params::service_name] - } - } - - if ! defined(Class['apache::mod::fastcgi']) { - class { 'apache::mod::fastcgi': } - } - - if ! defined(Class['apache::mod::cgi']) { - class { 'apache::mod::cgi': } - } - - $download_location = $::osfamily ? { - 'Debian' => '/.puphpet-stuff/mod-spdy.deb', - 'Redhat' => '/.puphpet-stuff/mod-spdy.rpm' - } - - $provider = $::osfamily ? { - 'Debian' => 'dpkg', - 'Redhat' => 'yum' - } - - exec { "download apache mod-spdy to ${download_location}": - creates => $download_location, - command => "wget ${url} -O ${download_location}", - timeout => 30, - path => '/usr/bin' - } - - package { $package: - ensure => $ensure, - provider => $provider, - source => $download_location, - notify => Service[$apache::params::service_name] - } - - file { [ - "${apache::params::mod_dir}/spdy.load", - "${apache::params::mod_dir}/spdy.conf", - "${apache::params::mod_dir}/php5filter.conf" - ] : - purge => false, - } - - if $apache::params::mod_enable_dir != undef { - file { [ - "${apache::params::mod_enable_dir}/spdy.load", - "${apache::params::mod_enable_dir}/spdy.conf", - "${apache::params::mod_enable_dir}/php5filter.conf" - ] : - purge => false, - } - } - - file { "${apache::params::confd_dir}/spdy.conf": - content => template("${module_name}/apache/mod/spdy/spdy_conf.erb"), - ensure => $ensure, - purge => false, - require => Package[$package] - } - - file { '/usr/local/bin/php-wrapper': - content => template("${module_name}/apache/mod/spdy/php-wrapper.erb"), - ensure => $ensure, - mode => 0775, - purge => false, - require => Package[$package] - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/hhvm.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/hhvm.pp deleted file mode 100644 index 3b27ab90af..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/hhvm.pp +++ /dev/null @@ -1,147 +0,0 @@ -# This depends on -# puppetlabs/apt: https://github.com/puppetlabs/puppetlabs-apt -# example42/puppet-yum: https://github.com/example42/puppet-yum -# puppetlabs/puppetlabs-apache: https://github.com/puppetlabs/puppetlabs-apache (if apache) - -class puphpet::hhvm( - $nightly = false, - $webserver -) { - - $real_webserver = $webserver ? { - 'apache' => 'apache2', - 'httpd' => 'apache2', - 'apache2' => 'apache2', - 'nginx' => 'nginx', - 'fpm' => 'fpm', - 'cgi' => 'cgi', - 'fcgi' => 'cgi', - 'fcgid' => 'cgi', - undef => undef, - } - - if $nightly == true { - $package_name_base = $puphpet::params::hhvm_package_name_nightly - } else { - $package_name_base = $puphpet::params::hhvm_package_name - } - - if $nightly == true and $::osfamily == 'Redhat' { - warning('HHVM-nightly is not available for RHEL distros. Falling back to normal release') - } - - case $::operatingsystem { - 'debian': { - if $::lsbdistcodename != 'wheezy' { - fail('Sorry, HHVM currently only works with Debian 7+.') - } - - $sources_list = '/etc/apt/sources.list' - - $deb_srcs = [ - 'deb http://http.us.debian.org/debian wheezy main', - 'deb-src http://http.us.debian.org/debian wheezy main', - 'deb http://security.debian.org/ wheezy/updates main', - 'deb-src http://security.debian.org/ wheezy/updates main', - 'deb http://http.us.debian.org/debian wheezy-updates main', - 'deb-src http://http.us.debian.org/debian wheezy-updates main' - ] - - each( $deb_srcs ) |$value| { - exec { "add contrib non-free to ${value}": - cwd => '/etc/apt', - command => "perl -p -i -e 's#${value}#${value} contrib non-free#gi' ${sources_list}", - unless => "grep -Fxq '${value} contrib non-free' ${sources_list}", - path => [ '/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/' ], - notify => Exec['apt_update'] - } - } - } - 'ubuntu': { - if ! ($lsbdistcodename in ['precise', 'raring', 'trusty']) { - fail('Sorry, HHVM currently only works with Ubuntu 12.04, 13.10 and 14.04.') - } - - apt::key { '5D50B6BA': key_server => 'hkp://keyserver.ubuntu.com:80' } - - if $lsbdistcodename in ['lucid', 'precise'] { - apt::ppa { 'ppa:mapnik/boost': require => Apt::Key['5D50B6BA'], options => '' } - } - } - 'centos': { - $jemalloc_url = 'http://files.puphpet.com/centos6/jemalloc-3.6.0-1.el6.x86_64.rpm' - $jemalloc_download_location = '/.puphpet-stuff/jemalloc-3.6.0-1.el6.x86_64.rpm' - - $require = defined(Class['my_fw::post']) ? { - true => Class['my_fw::post'], - default => [], - } - - exec { "download jemalloc to ${download_location}": - creates => $download_location, - command => "wget --quiet --tries=5 --connect-timeout=10 -O '${jemalloc_download_location}' '${jemalloc_url}'", - timeout => 30, - path => '/usr/bin', - require => $require - } - - package { 'jemalloc': - ensure => latest, - provider => yum, - source => $download_location, - require => Exec["download jemalloc to ${download_location}"], - } - - yum::managed_yumrepo { 'hop5': - descr => 'hop5 repository', - baseurl => 'http://www.hop5.in/yum/el6/', - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-HOP5', - enabled => 1, - gpgcheck => 0, - priority => 1, - } - } - } - if $real_webserver == 'apache2' { - if ! defined(Class['apache::mod::mime']) { - class { 'apache::mod::mime': } - } - if ! defined(Class['apache::mod::fastcgi']) { - class { 'apache::mod::fastcgi': } - } - if ! defined(Class['apache::mod::alias']) { - class { 'apache::mod::alias': } - } - if ! defined(Class['apache::mod::proxy']) { - class { 'apache::mod::proxy': } - } - if ! defined(Class['apache::mod::proxy_http']) { - class { 'apache::mod::proxy_http': } - } - if ! defined(Apache::Mod['actions']) { - apache::mod{ 'actions': } - } - } - - $os = downcase($::operatingsystem) - - case $::osfamily { - 'debian': { - apt::key { 'hhvm': - key => '16d09fb4', - key_source => 'http://dl.hhvm.com/conf/hhvm.gpg.key', - } - - apt::source { 'hhvm': - location => "http://dl.hhvm.com/${os}", - repos => 'main', - required_packages => 'debian-keyring debian-archive-keyring', - include_src => false, - require => Apt::Key['hhvm'] - } - } - } - - ensure_packages( [ $package_name_base ] ) - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/ini.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/ini.pp deleted file mode 100644 index 50f471bacb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/ini.pp +++ /dev/null @@ -1,305 +0,0 @@ -# Defines where we can expect PHP ini files and paths to be located. -# -# Different OS, OS version, webserver and PHP versions all contributes -# to making a mess of where we can expect INI files to be found. -# -# I have listed a bunch of places: -# -# 5.3 -# DEBIAN 6 - squeeze -# CLI -# /etc/php5/cli/conf.d -> /etc/php5/conf.d -# APACHE -# FOLDERS: apache2/ cli/ conf.d/ php.ini -# /etc/php5/apache2/conf.d -> /etc/php5/conf.d -# NGINX -# FOLDERS: cli/ conf.d/ fpm/ -# /etc/php5/fpm/conf.d -> /etc/php5/conf.d -# DEBIAN 7 - wheezy -# APACHE -# NOT CORRECT; PHP 5.4 INSTALLED -# NGINX -# NOT CORRECT; PHP 5.4 INSTALLED -# UBUNTU 10.04 - lucid -# CLI -# /etc/php5/cli/conf.d -> /etc/php5/conf.d -# APACHE -# FOLDERS: apache2/ cli/ conf.d/ php.ini -# /etc/php5/apache2/conf.d -> /etc/php5/conf.d -# NGINX -# FOLDERS: cli/ conf.d/ fpm/ -# /etc/php5/fpm/conf.d -> /etc/php5/conf.d -# UBUNTU 12.04 - precise -# CLI -# /etc/php5/cli/conf.d -> /etc/php5/conf.d -# APACHE -# FOLDERS: apache2/ cli/ conf.d/ php.ini -# /etc/php5/apache2/conf.d -> /etc/php5/conf.d -# NGINX -# FOLDERS: cli/ conf.d/ fpm/ -# /etc/php5/fpm/conf.d -> /etc/php5/conf.d -# UBUNTU 14.04 - trusty -# APACHE -# NOT CORRECT; PHP 5.5 INSTALLED -# NGINX -# NOT CORRECT; PHP 5.5 INSTALLED -# 5.4 -# CENTOS 6 -# CLI -# /etc/php.d -# APACHE -# /etc/php.d -# DEBIAN 6 - squeeze -# CLI -# /etc/php5/cli/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* -# APACHE -# FOLDERS: apache2/ cli/ conf.d/ mods-available/ php.ini -# /etc/php5/apache2/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* -# NGINX -# FOLDERS: cli/ conf.d/ fpm/ mods-available/ -# /etc/php5/fpm/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* -# DEBIAN 7 - wheezy -# CLI -# /etc/php5/cli/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* -# APACHE -# FOLDERS: apache2/ cli/ conf.d/ mods-available/ php.ini -# /etc/php5/apache2/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* -# NGINX -# FOLDERS: cli/ conf.d/ fpm/ mods-available/ -# /etc/php5/fpm/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* -# UBUNTU 10.04 - lucid -# CLI -# /etc/php5/cli/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* -# APACHE -# FOLDERS: apache2/ cli/ conf.d/ mods-available/ php.ini -# /etc/php5/apache2/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* -# NGINX -# FOLDERS: cli/ conf.d/ fpm/ mods-available/ -# /etc/php5/fpm/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* -# UBUNTU 12.04 - precise -# CLI -# /etc/php5/cli/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* -# APACHE -# FOLDERS: apache2/ cli/ conf.d/ mods-available/ php.ini -# /etc/php5/apache2/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* -# NGINX -# FOLDERS: cli/ conf.d/ fpm/ mods-available/ -# /etc/php5/fpm/conf.d -> /etc/php5/conf.d/* -> /etc/php5/mods-available/* -# UBUNTU 14.04 - trusty -# APACHE -# NOT CORRECT; PHP 5.5 INSTALLED -# NGINX -# NOT CORRECT; PHP 5.5 INSTALLED -# 5.5 -# DEBIAN 6 - squeeze -# APACHE -# NOT A VALID OPTION -# NGINX -# NOT A VALID OPTION -# DEBIAN 7 - wheezy -# CLI -# /etc/php5/cli/conf.d/* -> /etc/php5/mods-available/* -# APACHE -# FOLDERS: apache2/ cli/ mods-available/ php.ini -# /etc/php5/apache2/conf.d/* -> /etc/php5/mods-available/* -# NGINX -# FOLDERS: cli/ fpm/ mods-available/ -# /etc/php5/fpm/conf.d/* -> /etc/php5/mods-available/* -# UBUNTU 10.04 - lucid -# APACHE -# NOT A VALID OPTION -# NGINX -# NOT A VALID OPTION -# UBUNTU 12.04 - precise -# CLI -# /etc/php5/cli/conf.d/* -> /etc/php5/mods-available/* -# APACHE -# FOLDERS: cli/ apache2/ mods-available/ -# /etc/php5/apache2/conf.d/* -> /etc/php5/mods-available/* -# NGINX -# FOLDERS: cli/ fpm/ mods-available/ -# /etc/php5/fpm/conf.d/* -> /etc/php5/mods-available/* -# UBUNTU 14.04 - trusty -# CLI -# /etc/php5/cli/conf.d/* -> /etc/php5/conf.d/* -# APACHE -# FOLDERS: apache2/ cli/ mods-available/ php.ini -# /etc/php5/cli/conf.d/* -> /etc/php5/mods-available/* -# /etc/php5/apache2/conf.d/* -> /etc/php5/mods-available/* -# NGINX -# FOLDERS: cli/ fpm/ mods-available/ -# /etc/php5/cli/conf.d/* -> /etc/php5/mods-available/* -# /etc/php5/fpm/conf.d/* -> /etc/php5/mods-available/* -# -# This depends on example42/puppet-php: https://github.com/example42/puppet-php -# -define puphpet::ini ( - $php_version, - $webserver, - $ini_filename = 'zzzz_custom.ini', - $entry, - $value = '', - $ensure = present - ) { - - $real_webserver = $webserver ? { - 'apache' => 'apache2', - 'httpd' => 'apache2', - 'apache2' => 'apache2', - 'nginx' => 'fpm', - 'php5-fpm' => 'fpm', - 'php-fpm' => 'fpm', - 'fpm' => 'fpm', - 'cgi' => 'cgi', - 'fcgi' => 'cgi', - 'fcgid' => 'cgi', - undef => undef, - } - - case $php_version { - '5.3', '53': { - case $::osfamily { - 'debian': { - $target_dir = '/etc/php5/conf.d' - $target_file = "${target_dir}/${ini_filename}" - - if ! defined(File[$target_file]) { - file { $target_file: - replace => no, - ensure => present, - require => Package['php'] - } - } - } - 'redhat': { - $target_dir = '/etc/php.d' - $target_file = "${target_dir}/${ini_filename}" - - if ! defined(File[$target_file]) { - file { $target_file: - replace => no, - ensure => present, - require => Package['php'] - } - } - } - default: { fail('This OS has not yet been defined for PHP 5.3!') } - } - } - '5.4', '54': { - case $::osfamily { - 'debian': { - $target_dir = '/etc/php5/mods-available' - $target_file = "${target_dir}/${ini_filename}" - - if ! defined(File[$target_file]) { - file { $target_file: - replace => no, - ensure => present, - require => Package['php'] - } - } - - $symlink = "/etc/php5/conf.d/${ini_filename}" - - if ! defined(File[$symlink]) { - file { $symlink: - ensure => link, - target => $target_file, - require => File[$target_file], - } - } - } - 'redhat': { - $target_dir = '/etc/php.d' - $target_file = "${target_dir}/${ini_filename}" - - if ! defined(File[$target_file]) { - file { $target_file: - replace => no, - ensure => present, - require => Package['php'] - } - } - } - default: { fail('This OS has not yet been defined for PHP 5.4!') } - } - } - '5.5', '55': { - case $::osfamily { - 'debian': { - $target_dir = '/etc/php5/mods-available' - $target_file = "${target_dir}/${ini_filename}" - - $webserver_ini_location = $real_webserver ? { - 'apache2' => '/etc/php5/apache2/conf.d', - 'cgi' => '/etc/php5/cgi/conf.d', - 'fpm' => '/etc/php5/fpm/conf.d', - undef => undef, - } - $cli_ini_location = '/etc/php5/cli/conf.d' - - if ! defined(File[$target_file]) { - file { $target_file: - replace => no, - ensure => present, - require => Package['php'] - } - } - - if $webserver_ini_location != undef and ! defined(File["${webserver_ini_location}/${ini_filename}"]) { - file { "${webserver_ini_location}/${ini_filename}": - ensure => link, - target => $target_file, - require => File[$target_file], - } - } - - if ! defined(File["${cli_ini_location}/${ini_filename}"]) { - file { "${cli_ini_location}/${ini_filename}": - ensure => link, - target => $target_file, - require => File[$target_file], - } - } - } - 'redhat': { - $target_dir = '/etc/php.d' - $target_file = "${target_dir}/${ini_filename}" - - if ! defined(File[$target_file]) { - file { $target_file: - replace => no, - ensure => present, - require => Package['php'] - } - } - } - default: { fail('This OS has not yet been defined for PHP 5.5!') } - } - } - default: { fail('Unrecognized PHP version') } - } - - if $real_webserver != undef { - if $real_webserver == 'cgi' { - $webserver_service = 'apache2' - } else { - $webserver_service = $webserver - } - - $notify_service = Service[$webserver_service] - } else { - $notify_service = [] - } - - php::augeas{ "${entry}-${value}" : - target => $target_file, - entry => $entry, - value => $value, - ensure => $ensure, - require => File[$target_file], - notify => $notify_service, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/init.pp deleted file mode 100644 index 17c999a761..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/init.pp +++ /dev/null @@ -1 +0,0 @@ -class puphpet inherits puphpet::params {} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/mariadb.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/mariadb.pp deleted file mode 100644 index e68968f543..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/mariadb.pp +++ /dev/null @@ -1,50 +0,0 @@ -# This depends on -# puppetlabs/apt: https://github.com/puppetlabs/puppetlabs-apt -# example42/puppet-yum: https://github.com/example42/puppet-yum - -class puphpet::mariadb( - $distro = $::operatingsystem, - $release = $::lsbdistcodename, - $arch = $::architecture, - $version = '10.0', - $url = $puphpet::params::apache_mod_pagespeed_url, - $package = $puphpet::params::apache_mod_pagespeed_package -) { - - $arch_package_name = $::architecture ? { - 'i386' => 'x86', - 'amd64' => 'amd64', - 'x86_64' => 'amd64' - } - - case $::osfamily { - 'debian': { - $os = downcase($::operatingsystem) - - apt::source { 'mariadb': - location => "http://mirror.jmu.edu/pub/mariadb/repo/${version}/${os}", - release => $release, - repos => 'main', - required_packages => 'debian-keyring debian-archive-keyring', - key => '1BB943DB', - key_server => 'keyserver.ubuntu.com', - include_src => true - } - - apt::pin { 'mariadb': - packages => '*', - priority => 1000, - origin => 'mirror.jmu.edu', - } - } - 'redhat': { - yum::managed_yumrepo { 'MariaDB': - descr => 'MariaDB - mariadb.org', - baseurl => "http://yum.mariadb.org/${version}/centos6-${arch_package_name}", - enabled => 1, - gpgcheck => 0, - priority => 1 - } - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/nginx.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/nginx.pp deleted file mode 100644 index 7a28797dfa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/nginx.pp +++ /dev/null @@ -1,38 +0,0 @@ -class puphpet::nginx( - $fastcgi_pass = '127.0.0.1:9000', - $webroot = $puphpet::params::nginx_webroot_location -) inherits puphpet::params { - - $conf_file = $::osfamily ? { - 'debian' => '/etc/nginx/conf.d/default.conf', - 'redhat' => '/etc/nginx/conf.d/default.conf', - default => '/etc/nginx/conf.d/default.conf', - } - - file { [ - '/var/log', - '/var/log/nginx', - '/var/log/nginx/log' - ]: - ensure => directory, - recurse => true, - } - - file { [ - '/var/log/nginx/log/host.access.log', - '/var/log/nginx/log/host.error.log' - ]: - ensure => present, - mode => 0777, - replace => 'no', - require => File['/var/log/nginx/log'] - } - - file {"${conf_file} puphpet::nginx override": - ensure => present, - path => $conf_file, - replace => 'yes', - content => template('puphpet/nginx/default_conf.erb') - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/params.pp deleted file mode 100644 index e266f862cd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/params.pp +++ /dev/null @@ -1,92 +0,0 @@ -class puphpet::params { - - $xdebug_package = $::osfamily ? { - 'Debian' => 'php5-xdebug', - 'Redhat' => 'php-pecl-xdebug' - } - - $xhprof_package = $::osfamily ? { - 'Debian' => $::operatingsystem ? { - 'ubuntu' => false, - 'debian' => 'php5-xhprof' - }, - 'Redhat' => 'xhprof' - } - - $apache_webroot_location = $::osfamily ? { - 'Debian' => '/var/www', - 'Redhat' => '/var/www/html' - } - - $apache_mod_pagespeed_url = $::osfamily ? { - 'Debian' => $::architecture ? { - 'i386' => 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.deb', - 'amd64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb', - 'x86_64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb' - }, - 'Redhat' => $::architecture ? { - 'i386' => 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.rpm', - 'amd64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm', - 'x86_64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm' - }, - } - - $apache_mod_pagespeed_package = 'mod-pagespeed-stable' - - $apache_mod_spdy_url = $::osfamily ? { - 'Debian' => $::architecture ? { - 'i386' => 'https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_i386.deb', - 'amd64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_amd64.deb', - 'x86_64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_amd64.deb' - }, - 'Redhat' => $::architecture ? { - 'i386' => 'https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_i386.rpm', - 'amd64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_x86_64.rpm', - 'x86_64' => 'https://dl-ssl.google.com/dl/linux/direct/mod-spdy-beta_current_x86_64.rpm' - }, - } - - $apache_mod_spdy_package = 'mod-spdy-beta' - - $apache_mod_spdy_cgi = $::osfamily ? { - 'Debian' => 'php5-cgi', - 'Redhat' => 'php-cgi' - } - - $nginx_default_conf_location = $::osfamily ? { - 'Debian' => '/etc/nginx/conf.d/default.conf', - 'Redhat' => '/etc/nginx/conf.d/default.conf' - } - - $nginx_webroot_location = $::osfamily ? { - 'Debian' => '/var/www/html', - 'Redhat' => '/var/www/html' - } - - $mariadb_package_client_name = $::osfamily ? { - 'Debian' => 'mariadb-client', - 'Redhat' => 'MariaDB-client', - } - - $mariadb_package_server_name = $::osfamily ? { - 'Debian' => 'mariadb-server', - 'Redhat' => 'MariaDB-server', - } - - $hhvm_package_name = 'hhvm' - $hhvm_package_name_nightly = $::osfamily ? { - 'Debian' => 'hhvm-nightly', - 'Redhat' => 'hhvm' - } - - $ssl_cert_location = $::osfamily ? { - 'Debian' => '/etc/ssl/certs/ssl-cert-snakeoil.pem', - 'Redhat' => '/etc/ssl/certs/ssl-cert-snakeoil' - } - - $ssl_key_location = $::osfamily ? { - 'Debian' => '/etc/ssl/private/ssl-cert-snakeoil.key', - 'Redhat' => '/etc/ssl/certs/ssl-cert-snakeoil' - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/extra_repos.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/extra_repos.pp deleted file mode 100644 index 6461f62112..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/extra_repos.pp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Some PHP packages require extra repos. - * ex: PECL mongo is best to fetch Mongo's official repo - */ - -define puphpet::php::extra_repos { - - $downcase_name = downcase($name) - - if $downcase_name == 'mongo' and ! defined(Class['mongodb::globals']) { - class { 'mongodb::globals': - manage_package_repo => true, - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/module.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/module.pp deleted file mode 100644 index 2d37ad56d5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/module.pp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This "translates" PHP module package names into system-specific names. - */ - -define puphpet::php::module ( - $service_autorestart -){ - - $package = $::osfamily ? { - 'Debian' => { - 'mbstring' => false, # Comes packaged with PHP, not available in repos - }, - 'Redhat' => { - # - } - } - - $downcase_name = downcase($name) - - if has_key($package, $downcase_name) { - $package_name = $package[$downcase_name] - } - else { - $package_name = $name - } - - if $package_name and ! defined(::Php::Module[$package_name]) { - ::php::module { $package_name: - service_autorestart => $service_autorestart, - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/pear.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/pear.pp deleted file mode 100644 index 4582e67a17..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/pear.pp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This returns PEAR packages requiring beta stability - */ - -define puphpet::php::pear ( - $service_autorestart -){ - - $package = { - 'auth_sasl2' => 'beta', - 'config_lite' => 'beta', - 'console_getoptplus' => 'beta', - 'mdb2_driver_mysql' => false, - 'mdb2_driver_mysqli' => false, - 'pear_command_packaging' => 'alpha', - 'pear_frontend_gtk2' => false, - 'php_beautifier' => 'beta', - 'php_parser_docblockparser' => 'alpha', - 'testing_selenium' => 'beta', - 'versioncontrol_git' => 'alpha', - 'versioncontrol_svn' => 'alpha', - 'xml_parser2' => 'beta', - 'xml_util2' => 'alpha', - } - - $downcase_name = downcase($name) - - if has_key($package, $downcase_name) { - $package_name = $name - $preferred_state = $package[$downcase_name] - } - else { - $package_name = $name - $preferred_state = 'stable' - } - - if $package_name and $preferred_state and ! defined(::Php::Pear::Module[$package_name]) { - ::php::pear::module { $name: - use_package => false, - preferred_state => $preferred_state, - service_autorestart => $php_webserver_restart, - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/pecl.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/pecl.pp deleted file mode 100644 index dfa04232f4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/php/pecl.pp +++ /dev/null @@ -1,120 +0,0 @@ -/* - * This "translates" PECL package names into system-specific names. - * For example, APCu does not install correctly on CentOS via PECL, - * but there is a system package for it that works well. Use that - * instead of the PECL package. - */ - -define puphpet::php::pecl ( - $service_autorestart -){ - - $ignore = { - 'date_time' => true, - 'mysql' => true, - } - - $pecl = $::osfamily ? { - 'Debian' => { - 'mongo' => $::lsbdistcodename ? { - 'precise' => 'mongo', - default => false, - }, - }, - 'Redhat' => { - # - } - } - - $pecl_beta = $::osfamily ? { - 'Debian' => { - 'augeas' => 'augeas', - 'zendopcache' => $::operatingsystem ? { - 'debian' => false, - 'ubuntu' => 'ZendOpcache', - }, - }, - 'Redhat' => { - # - } - } - - $package = $::osfamily ? { - 'Debian' => { - 'apc' => $::operatingsystem ? { - 'debian' => 'php5-apc', - 'ubuntu' => 'php5-apcu', - }, - 'apcu' => 'php5-apcu', - 'imagick' => 'php5-imagick', - 'memcache' => 'php5-memcache', - 'memcached' => 'php5-memcached', - 'mongo' => $::lsbdistcodename ? { - 'precise' => false, - default => 'php5-mongo', - }, - 'zendopcache' => 'php5-zendopcache', - }, - 'Redhat' => { - 'apc' => 'php-pecl-apcu', - 'apcu' => 'php-pecl-apcu', - 'imagick' => 'php-pecl-imagick', - 'memcache' => 'php-pecl-memcache', - 'memcached' => 'php-pecl-memcached', - 'mongo' => 'php-pecl-mongo', - 'zendopcache' => 'php-pecl-zendopcache', - } - } - - $auto_answer_hash = { - 'mongo' => 'no\n' - } - - $downcase_name = downcase($name) - - if has_key($auto_answer_hash, $downcase_name) { - $auto_answer = $auto_answer_hash[$downcase_name] - } else { - $auto_answer = '\\n' - } - - if has_key($ignore, $downcase_name) and $ignore[$downcase_name] { - $pecl_name = $pecl[$downcase_name] - $package_name = false - $preferred_state = 'stable' - } - elsif has_key($pecl, $downcase_name) and $pecl[$downcase_name] { - $pecl_name = $pecl[$downcase_name] - $package_name = false - $preferred_state = 'stable' - } - elsif has_key($pecl_beta, $downcase_name) and $pecl_beta[$downcase_name] { - $pecl_name = $pecl_beta[$downcase_name] - $package_name = false - $preferred_state = 'beta' - } - elsif has_key($package, $downcase_name) and $package[$downcase_name] { - $pecl_name = false - $package_name = $package[$downcase_name] - } - else { - $pecl_name = $name - $package_name = false - } - - if $pecl_name and ! defined(::Php::Pecl::Module[$pecl_name]) { - ::php::pecl::module { $pecl_name: - use_package => false, - preferred_state => $preferred_state, - auto_answer => $auto_answer, - service_autorestart => $service_autorestart, - } - } - elsif $package_name and ! defined(Package[$package_name]) { - package { $package_name: - ensure => present, - require => Class['Php::Devel'], - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/phpmyadmin.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/phpmyadmin.pp deleted file mode 100644 index e227aaa978..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/phpmyadmin.pp +++ /dev/null @@ -1,46 +0,0 @@ -# This depends on -# puppetlabs/apt: https://github.com/puppetlabs/puppetlabs-apt - -class puphpet::phpmyadmin( - $dbms = 'mysql::server', - $webroot_location = '/var/www' -) inherits puphpet::params { - - if $::osfamily == 'debian' { - if $::operatingsystem == 'ubuntu' { - apt::key { '80E7349A06ED541C': key_server => 'hkp://keyserver.ubuntu.com:80' } - apt::ppa { 'ppa:nijel/phpmyadmin': require => Apt::Key['80E7349A06ED541C'] } - } - - $phpMyAdmin_package = 'phpmyadmin' - $phpMyAdmin_folder = 'phpmyadmin' - } elsif $::osfamily == 'redhat' { - $phpMyAdmin_package = 'phpMyAdmin.noarch' - $phpMyAdmin_folder = 'phpMyAdmin' - } else { - error('phpMyAdmin module currently only works with Debian or RHEL families') - } - - if ! defined(Package[$phpMyAdmin_package]) { - package { $phpMyAdmin_package: - require => Class[$dbms] - } - } - - if ! defined(File[$webroot_location]) { - file { $webroot_location: - ensure => directory, - require => Package[$phpMyAdmin_package] - } - } - - exec { 'cp phpmyadmin to webroot': - command => "cp -LR /usr/share/${phpMyAdmin_folder} ${webroot_location}/phpmyadmin", - onlyif => "test ! -d ${mysql_pma_webroot_location}/phpmyadmin", - require => [ - Package[$phpMyAdmin_package], - File[$webroot_location] - ] - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/python/pip.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/python/pip.pp deleted file mode 100644 index 14b13fe08c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/python/pip.pp +++ /dev/null @@ -1,22 +0,0 @@ -class puphpet::python::pip { - - Exec { path => [ '/usr/bin/', '/usr/local/bin', '/bin', '/usr/local/sbin', '/usr/sbin', '/sbin' ] } - - if ! defined(Package['python-setuptools']) { - package { 'python-setuptools': } - } - - exec { 'easy_install pip': - unless => 'which pip', - require => Package['python-setuptools'], - } - - if $::osfamily == 'RedHat' { - exec { 'rhel pip_provider_name_fix': - command => 'alternatives --install /usr/bin/pip-python pip-python /usr/bin/pip 1', - subscribe => Exec['easy_install pip'], - unless => 'which pip-python', - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/ssl_cert.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/ssl_cert.pp deleted file mode 100644 index 2389d60af8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/ssl_cert.pp +++ /dev/null @@ -1,36 +0,0 @@ -class puphpet::ssl_cert - inherits puphpet::params { - - case $::osfamily { - 'debian': { - if ! defined(Package['ssl-cert']) { - package { 'ssl-cert': - ensure => latest, - } - } - - exec { 'make-ssl-cert generate-default-snakeoil --force-overwrite': - creates => [ - $puphpet::params::ssl_cert_location, - $puphpet::params::ssl_key_location - ], - require => Package['ssl-cert'], - path => [ '/bin/', '/usr/bin/', '/usr/sbin/' ] - } - } - 'redhat': { - if ! defined(Package['openssl']) { - package { 'openssl': - ensure => latest, - } - } - - exec { "make-dummy-cert ${puphpet::params::ssl_cert_location}": - creates => $puphpet::params::ssl_cert_location, - require => Package['openssl'], - path => [ '/bin/', '/usr/bin/', '/usr/sbin/', '/etc/pki/tls/certs/' ] - } - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/xdebug.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/xdebug.pp deleted file mode 100644 index 3c1985228e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/xdebug.pp +++ /dev/null @@ -1,32 +0,0 @@ -class puphpet::xdebug ( - $install_cli = true, - $webserver, - $ensure = present -) inherits puphpet::params { - - if $webserver != undef { - $notify_service = Service[$webserver] - } else { - $notify_service = [] - } - - if defined(Package[$puphpet::params::xdebug_package]) == false { - package { 'xdebug': - name => $puphpet::params::xdebug_package, - ensure => installed, - require => Package['php'], - notify => $notify_service, - } - } - - # shortcut for xdebug CLI debugging - if $install_cli and defined(File['/usr/bin/xdebug']) == false { - file { '/usr/bin/xdebug': - ensure => present, - mode => '+X', - source => 'puppet:///modules/puphpet/xdebug_cli_alias.erb', - require => Package['php'] - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/xhprof.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/xhprof.pp deleted file mode 100644 index 0649ab684f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/manifests/xhprof.pp +++ /dev/null @@ -1,93 +0,0 @@ -class puphpet::xhprof ( - $php_version = '54', - $webroot_location = '/var/www', - $webserver_service -) inherits puphpet::params { - - exec { 'delete-xhprof-path-if-empty-folder': - command => "rm -rf ${webroot_location}/xhprof", - onlyif => "test ! -f ${webroot_location}/xhprof/extension/config.m4" - } - - vcsrepo { "${webroot_location}/xhprof": - ensure => present, - provider => git, - source => 'https://github.com/facebook/xhprof.git', - require => Exec['delete-xhprof-path-if-empty-folder'] - } - - file { "${webroot_location}/xhprof/xhprof_html": - ensure => directory, - mode => 0775, - require => Vcsrepo["${webroot_location}/xhprof"] - } - - if $::operatingsystem == 'ubuntu' and $php_version != '53' { - exec { 'configure xhprof': - cwd => "${webroot_location}/xhprof/extension", - command => 'phpize && ./configure && make && make install', - require => [ - Vcsrepo["${webroot_location}/xhprof"], - Class['Php::Devel'] - ], - path => [ '/bin/', '/usr/bin/' ] - } - - puphpet::ini { 'add xhprof ini extension': - php_version => $php_version, - webserver => $webserver_service, - ini_filename => '20-xhprof-custom.ini', - entry => 'XHPROF/extension', - value => 'xhprof.so', - ensure => 'present', - require => Exec['configure xhprof'] - } - - puphpet::ini { 'add xhprof ini xhprof.output_dir': - php_version => $php_version, - webserver => $webserver_service, - ini_filename => '20-xhprof-custom.ini', - entry => 'XHPROF/xhprof.output_dir', - value => '/tmp', - ensure => 'present', - require => Exec['configure xhprof'] - } - - composer::exec { 'xhprof-composer-run': - cmd => 'install', - cwd => "${webroot_location}/xhprof", - require => [ - Class['composer'], - Exec['configure xhprof'] - ] - } - } else { - $xhprof_package = $puphpet::params::xhprof_package - - if $webserver_service != undef and is_string($webserver_service) { - $xhprof_package_notify = [Service[$webserver_service]] - } elsif $webserver_service != undef { - $xhprof_package_notify = $webserver_service - } else { - $xhprof_package_notify = [] - } - - if ! defined(Package[$xhprof_package]) { - package { $xhprof_package: - ensure => installed, - require => Package['php'], - notify => $xhprof_package_notify, - } - } - - composer::exec { 'xhprof-composer-run': - cmd => 'install', - cwd => "${webroot_location}/xhprof", - require => [ - Class['composer'], - File["${webroot_location}/xhprof/xhprof_html"] - ] - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/custom_fragment.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/custom_fragment.erb deleted file mode 100644 index 7a1312528b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/custom_fragment.erb +++ /dev/null @@ -1 +0,0 @@ -<%= @vhost['custom_fragment'] %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/hhvm-httpd.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/hhvm-httpd.conf.erb deleted file mode 100644 index af276cbe14..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/hhvm-httpd.conf.erb +++ /dev/null @@ -1,6 +0,0 @@ -<%= scope.function_template(['apache/httpd.conf.erb']) -%> - -FastCgiExternalServer <%= @docroot %>/hhvm.external -host <%= @hhvm_values['settings']['host'] %>:<%= @hhvm_values['settings']['port'] %> -AddHandler hhvm .php -Action hhvm /usr/lib/cgi-bin/hhvm.external -Alias /usr/lib/cgi-bin/ <%= @docroot %>/ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/php-wrapper.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/php-wrapper.erb deleted file mode 100644 index 54df3f7479..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/php-wrapper.erb +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -PHP_FCGI_MAX_REQUESTS=10000 -export PHP_FCGI_MAX_REQUESTS - -exec <%= @phpcgi %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/spdy_conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/spdy_conf.erb deleted file mode 100644 index 64603c101d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/apache/mod/spdy/spdy_conf.erb +++ /dev/null @@ -1,8 +0,0 @@ -# FcgidMaxRequestsPerProcess should be <= PHP_FCGI_MAX_REQUESTS -FcgidMaxRequestsPerProcess 10000 - - - AddHandler fcgid-script .php - Options +ExecCGI - FcgidWrapper /usr/local/bin/php-wrapper .php - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/nginx/default_conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/nginx/default_conf.erb deleted file mode 100644 index cc2d6f032f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puphpet/templates/nginx/default_conf.erb +++ /dev/null @@ -1,29 +0,0 @@ -server { - listen 80; - server_name localhost; - - index index.php index.html index.htm; - - access_log /var/log/nginx/log/host.access.log; - error_log /var/log/nginx/log/host.error.log; - - location / { - root <%= @webroot %>; - try_files $uri $uri/ /index.php?$args ; - index index.html index.htm index.php; - } - - location ~ \.php$ { - root <%= @webroot %>; - try_files $uri $uri/ /index.php?$args ; - index index.html index.htm index.php; - - fastcgi_index index.php; - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_pass <%= @fastcgi_pass %>; - fastcgi_split_path_info ^(.+\.php)(/.+)$; - include fastcgi_params; - } - } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.fixtures.yml deleted file mode 100644 index 96cb39d1b8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.fixtures.yml +++ /dev/null @@ -1,6 +0,0 @@ -fixtures: - repositories: - "concat": "git://github.com/puppetlabs/puppetlabs-concat.git" - "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" - symlinks: - "puppi": "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.gemfile deleted file mode 100644 index 9309493452..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.gemfile +++ /dev/null @@ -1,7 +0,0 @@ -source 'https://rubygems.org' - -puppetversion = ENV['PUPPET_VERSION'] -gem 'puppet', puppetversion, :require => false -gem 'puppet-lint' -gem 'puppetlabs_spec_helper', '>= 0.1.0' -gem 'puppet-blacksmith', '>= 2.0.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.project b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.project deleted file mode 100644 index b6061843aa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - puppi - - - - - - org.cloudsmith.geppetto.pp.dsl.ui.modulefileBuilder - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - - org.cloudsmith.geppetto.pp.dsl.ui.puppetNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.travis.yml deleted file mode 100644 index dffeca9874..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: ruby -rvm: - - 1.8.7 - - 1.9.3 -script: - - "rake spec SPEC_OPTS='--format documentation'" -env: - - PUPPET_VERSION="~> 2.6.0" - - PUPPET_VERSION="~> 2.7.0" - - PUPPET_VERSION="~> 3.0.0" - - PUPPET_VERSION="~> 3.1.0" -matrix: - exclude: - - rvm: 1.9.3 - env: PUPPET_VERSION="~> 2.6.0" - gemfile: .gemfile - -gemfile: .gemfile -notifications: - email: - - al@lab42.it diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/LICENSE deleted file mode 100644 index f41da01857..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/LICENSE +++ /dev/null @@ -1,17 +0,0 @@ -Copyright (C) 2013 Alessandro Franceschi / Lab42 - -for the relevant commits Copyright (C) by the respective authors. - -Contact Lab42 at: info@lab42.it - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/Modulefile deleted file mode 100644 index d69331f33a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/Modulefile +++ /dev/null @@ -1,9 +0,0 @@ -name 'example42-puppi' -version '2.1.8' - -author 'lab42' -license 'Apache' -project_page 'http://www.example42.com' -source 'git://github.com/example42/puppi' -summary 'Installs and configures Puppi' -description 'This module provides the Puppi libraries required by Example42 modules and, if explicitely included, the puppi command, its working environment, the defines and procedures to deploy applications' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README.md deleted file mode 100644 index 1f6ed569eb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README.md +++ /dev/null @@ -1,257 +0,0 @@ -# Puppi: Puppet Knowledge to the CLI - -Puppi One and Puppi module written by Alessandro Franceschi / al @ lab42.it - -Puppi Gem by Celso Fernandez / Zertico - -Source: http://www.example42.com - -Licence: Apache 2 - -Puppi is a Puppet module and a CLI command. -It's data is entirely driven by Puppet code. -It can be used to standardize and automate the deployment of web applications -or to provides quick and standard commands to query and check your system's resources - -Its structure provides FULL flexibility on the actions required for virtually any kind of -application deployment and information gathering. - -The module provides: - -* Old-Gen and Next-Gen Puppi implementation - -* A set of scripts that can be used in chain to automate any kind of deployment - -* Puppet defines that make it easy to prepare a puppi set of commands for a project deployment - -* Puppet defines to populate the output of the different actions - - -## HOW TO INSTALL - -Download Puppi from GitHub and place it in your modules directory: - - git clone https://github.com/example42/puppi.git /etc/puppet/modules/puppi - -To use the Puppi "Original, old and widely tested" version, just declare or include the puppi class - - class { 'puppi': } - -To test the Next-Gen version you can perform the following command. Please note that this module is -not stable yet: - class { 'puppi': - version => '2', - } - -If you have resources conflicts, do not install automatically the Puppi dependencies (commands and packages) - - class { 'puppi': - install_dependencies => false, - } - - -## HOW TO USE - -Once Puppi is installed you can use it to: - -* Easily define in Puppet manifests Web Applications deploy procedures. For example: - - puppi::project::war { "myapp": - source => "http://repo.example42.com/deploy/prod/myapp.war", - deploy_root => "/opt/tomcat/myapp/webapps", - } - -* Integrate with your modules for puppi check, info and log - -* Enable Example42 modules integration - - -## HOW TO USE WITH EXAMPLE42 MODULES - -The Example42 modules provide (optional) Puppi integration. -Once enabled for each module you have puppi check, info and log commands. - -To eanble Puppi in OldGen Modules, set in the scope these variables: - - $puppi = yes # Enables puppi integration. - $monitor = yes # Enables automatic monitoring - $monitor_tool = "puppi" # Sets puppi as monitoring tool - -For the NextGen modules set the same parameters via Hiera, at Top Scope or as class arguments: - - class { 'openssh': - puppi => yes, - monitor => yes, - monitor_tool => 'puppi', - } - - -## USAGE OF THE PUPPI COMMAND (OLD GEN) - - puppi [ -options ] - -The puppi command has these possibile actions: - -First time initialization of the defined project (if available) - puppi init - -Deploy the specified project - puppi deploy - -Rollback to a previous deploy state - puppi rollback - -Run local checks on system and applications - puppi check - -Tail system or application logs - puppi log - -Show system information (for all or only the specified topic) - puppi info [topic] - -Show things to do (or done) manually on the system (not done via Puppet) - puppi todo - -In the deploy/rollback/init actions, puppi runs the commands in /etc/puppi/projects/$project/$action, logs their status and then run the commands in /etc/puppi/projects/$project/report to provide reporting, in whatever, pluggable, way. - -You can also provide some options: - -* -f : Force puppi commands execution also on CRITICAL errors - -* -i : Interactively ask confirmation for every command - -* -t : Test mode. Just show the commands that should be executed without doing anything - -* -d : Debug mode. Show debugging info during execution - -* -o "parameter=value parameter2=value2" : Set manual options to override defaults. The options must be in parameter=value syntax, separated by spaces and inside double quotes. - - -Some common puppi commnds when you log for an application deployment: - - puppi check - puppi log & # (More readable if done on another window) - puppi deploy myapp - puppi check - puppi info myapp - - -## THE PUPPI MODULE - -The set of commands needed for each of these actions are entirely managed with specific -Puppet "basic defines": - -Create the main project structure. One or more different deployment projects can exist on a node. - puppi::project - -Create a single command to be placed in the init sequence. It's not required for every project. - puppi::initialize - -Create a single command to be placed in the deploy sequence. More than one is generally needed for each project. - puppi::deploy - -Create a single command to be placed in the rollback sequence. More than one is generally needed for each project. - puppi::rollback - -Create a single check (based on Nagios plugins) for a project or for the whole host (host wide checks are auto generated by Example42 monitor module) - puppi::check - -Create a reporting command to be placed in the report sequence. - puppi::report - -Create a log filename entry for a project or the whole hosts. - puppi::log - -Create an info entry with the commands used to provide info on a topic - puppi::info - -Read details in the relevant READMEs - - -## FILE PATHS (all of them are provided, and can be configured, in the puppi module): - -A link to the actual version of puppi enabled - /usr/sbin/puppi - -The original puppi bash command. - /usr/sbin/puppi.one - -Puppi (one) main config file. Various puppi wide paths are defined here. - /etc/puppi/puppi.conf - -Directory where by default all the host wide checks can be placed. If you use the Example42 monitor module and have "puppi" as $monitor_tool, this directory is automatically filled with Nagios plugins based checks. - /etc/puppi/checks/ ($checksdir) - -Directory that containts projects subdirs, with the commands to be run for deploy, rollback and check actions. They are completely built (and purged) by the Puppet module. - /etc/puppi/projects/ ($projectsdir) - -The general-use scripts directory, these are used by the above commands and may require one or more arguments. - /etc/puppi/scripts/ ($scriptsdir) - -The general-use directory where files are placed which contain the log paths to be used by puppi log - /etc/puppi/logs/ ($logssdir) - -The general-use directory where files are placed which contain the log paths to be used by puppi log - /etc/puppi/info/ ($infodir) - -Where all data to rollback is placed. - /var/lib/puppi/archive/ ($archivedir) - -Where logs and reports of the different commands are placed. - /var/log/puppi/ ($logdir) - -Temporary, scratchable, directory where Puppi places temporary files. - /tmp/puppi/ ($workdir) - -A runtime configuration file, which is used by all all the the scripts invoked by puppi to read and write dynamic variables at runtime. This is necessary to mantain "state" information that changes on every puppi run (such as the deploy datetime, used for backups). - /tmp/puppi/$project/config - - -## HOW TO CUSTOMIZE -It should be clear that with puppi you have full flexibility in the definition of a deployment -procedure, since the puppi command is basically a wrapper that executes arbitrary scripts with -a given sequence, in pure KISS logic. - -The advantanges though, are various: -* You have a common syntax to manage deploys and rollbacks on an host - -* In your Puppet manifests, you can set in simple, coherent and still flexible and customizable - defines all the elements, you need for your application deployments. - Think about it: with just a Puppet define you build the whole deploy logic - -* Reporting for each deploy/rollback is built-in and extensible - -* Automatic checks can be built in the deploy procedure - -* You have a common, growing, set of general-use scripts for typical actions - -* You have quick and useful command to see what's happening on the system (puppi check, log, info) - -There are different parts where you can customize the behaviour of puppi: - -* The set of general-use scripts in /etc/puppi/scripts/ ( this directory is filled with the content - of puppi/files/scripts/ ) can/should be enhanced. These can be arbitrary scripts in whatever - language. If you want to follow puppi's logic, though, consider that they should import the - common and runtime configuration files and have an exit code logic similar to the one of - Nagios plugins: 0 is OK, 1 is WARNING, 2 is CRITICAL. Note that by default a script that - exits with WARNING doesn't block the deploy procedure, on the other hand, if a script exits - with CRITICAL (exit 2) by default it blocks the procedure. - Take a second, also, to explore the runtime config file created by the puppi command that - contains variables that can be set and used by the scripts invoked by puppi. - -* The custom project defines that describe deploy templates. These are placed in - puppi/manifests/project/ and can request all the arguments you want to feed your scripts with. - Generally is a good idea to design a standard enough template that can be used for all the - cases where the deployment procedure involves similar steps. Consider also that you can handle - exceptions with variables (see the $loadbalancer_ip usage in puppi/manifests/project/maven.pp) - - -## (NO) DEPENDENCIES AND CONFLICTS -Puppi is self contained. It doesn't require other modules. -(And is required by all Example42 modules). - -For correct functionality by default some extra packages are installed. -If you have conflicts with your existing modules, set the argument: - install_dependencies => false - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_check.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_check.md deleted file mode 100644 index e63204ca0e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_check.md +++ /dev/null @@ -1,67 +0,0 @@ -# PUPPI CHECK INSTRUCTIONS -Documentation and examples related to the puppi action check - -## SYNOPSIS (cli) - puppi check [project_name] [-r yes|no|fail] - -## EXAMPLES (cli) -Run host-wide checks. - puppi check -Run project "myapp" specific tests AND host-wide checks - puppi check myapp - -Run checks and send reports only if some of them fail - puppi check -r fail - -Run checks and send reports - puppi check -r yes - -Run checks and show only failed ones - puppi check -s fail - -## EXAMPLES (puppet) -The basic define related to a check is: - puppi::check - Creates a single command to be placed in the check sequence. - -A simple example might be: - puppi::check { 'Port_Apache': - command => "check_tcp -H ${fqdn} -p 80" , - } - -but also something that uses variables Puppet already knows - puppi::check { 'apache_process': - command => "check_procs -c 1: -C ${apache::params::processname}" , - } - -To avoid repetitions you can include the relevant checks in defines you already have -to manage, for example, virtualhosts, and use the data you already provide to configure -their local puppi checks. - puppi::check { "Url_$name": - enable => $enable, - command => "check_http -I '${target}' -p '${port}' -u '${url}' -s '${pattern}'" , - } - -You can also use custom scripts for your checks. They should behave similarly to Nagios plugins inn their exit codes: 0 for SUCCESS, 1 for WARNINGS, 2 for CRITICAL. In this case you've to specify the directory there the scripts stays: - puppi::check { 'my_stack': - command => 'stack_check.sh', - bade_dir => '/usr/bin', - } - - -## EXAMPLES (with example42 puppet modules) -If you use the whole Example42 modules set you get automatically many service related checks out of the box. -Just set (via an ENC, facts or manifests) these puppet variables: - $monitor="yes" # To enable automagic monitoring - $monitor_tool = "puppi" # As monitoring tool define at least puppi. If you like Nagios, you may use: - $monitor_tool = ["nagios","puppi"] # This enables the below checks both for Puppi and Nagios - $puppi=yes # To enable puppi extensions autoloading - -To the port and service checks automatically added for the included modules, you can add custom url checks -with something like: - monitor::url { "URL_Check_Database_Connection": - url => "http://www.example42.com/check/db", - pattern => 'SUCCESS', - port => '80', - target => "${fqdn}", - } - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_deploy.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_deploy.md deleted file mode 100644 index 683f48bfb2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_deploy.md +++ /dev/null @@ -1,263 +0,0 @@ -# PUPPI DEPLOY INSTRUCTIONS -Documentation and examples related to the puppi actions: deploy, rollback and init - -## SYNOPSIS (COMMAND LINE) -Shell command to launch a deploy: - puppi deploy - puppi deploy [-f] [-i] [-t] [-d yes|full] [-r yes|no|fail] [-p "parameter=value parameter2=value2"] - -Shell command to launch a rollback: - puppi rollback - -Shell command to launch the first deploy: - puppi init - - -## EXAMPLES (cli) - -Deploy myapp with the standard logic/parameters defined in Puppet: - puppi deploy myapp - -Deploy myapp and doesn't stop in case of Critical errors: - puppi deploy myapp -f - -Deploy myapp in interactive mode. Confirmation is asked for each step - puppi deploy myapp -i - -Test mode. Just show the commands that would be executed - puppi deploy myapp -t - -Deploy myapp with full debugging output - puppi deploy myapp -d full - -Deploy myapp in interactive mode and sets some custom options that override the standard Puppet params. -Note that these parameters change according to the script you use (and the scripts must honour this override in order to make this option work). - puppi deploy myapp -i -o "version=1.1 source_url=http://dev.example42.com/code/my_app/" - -Make the first deploy of "myapp". Can be optional and may require a subsequent puppi deploy myapp - puppi init myapp - -Rollback myapp to a previous archived state. User is asked to choose which deploy to override. Note that by default you have 5 backups to rollback from. Older backups are automatically removed. - puppi rollback myapp - -Automatically rollback to the latest saved state (unattended). - puppi rollback myapp latest - - -## EXAMPLES (puppet) -Here follow some sample defines you can use out of the box in your manifests once you include puppi. -Get a war from $source and deploy it in $deploy_root: - puppi::project::war { 'myapp': - source => 'http://repo.example42.com/deploy/prod/myapp.war', - deploy_root => '/store/tomcat/myapp/webapps', - } - -Get a tarball from $source, unpack it in $deploy_root, restart service called apache and send a mail -to $report_mail (you can have a comma separated list of destination addresses): - puppi::project::tar { 'mysite': - source => 'rsync://repo.example42.com/deploy/prod/release.tgz', - init_script => 'apache', - deploy_root => '/var/www/html/', - report_email => 'sysadmins@example42.com', - enable => 'true', # Redundant - } - -Get a tarfile with a .sql query file and apply to to you local Mysql with the credentials provided: - puppi::project::mysql { 'myweb_sql': - source => 'http://repo.example42.com/deploy/prod/database.sql.gz', - mysql_user => 'myweb', - mysql_password => $secret::mysql_myweb_pw, - mysql_host => 'localhost', - mysql_database => 'myweb', - report_email => 'sysadmins@example42.com,dbadmins@example42.com', - enable => 'true', - } - -Get a list of files from $source, retrieve the actual files from $source_baseurl and place them -in $deploy_root - puppi::project::files { 'gfxupdates': - source => 'http://deploy.example42.com/prod/website2/list.txt', - source_baseurl => 'http://design.example42.com/website2/gfx/', - deploy_root => '/var/www/html/gfx', - report_email => 'sysadmins@example42.com,designers@example42.com', - enable => 'true', - } - -Deploy from a Nexus repository (retrieve maven-metadata.xml from dir specified in $source), get the war -(version is achieved from the "release" tag in the xml) and deploy it in $deploy_root and then restart tomcat. - puppi::project::maven { 'supersite': - source => 'http://nexus.example42.com/nexus/content/repositories/releases/it/example42/supersite/', - deploy_root => '/usr/local/tomcat/supersite/webapps', - init_script => 'tomcat', - report_email => 'sysadmins@example42.com', - enable => 'true', - } - -Get the maven-metadata.xml from a Nexus repository and deploy: -- The release war in $deploy_root -- A configurations tarball tagged with the Maven qualifier $config_suffix in $config_root -- A static files tarball tagged with the Maven qualifier $document_suffix in $document_root - puppi::project::maven { 'supersite': - source => 'http://nexus.example42.com/nexus/content/repositories/releases/it/example42/supersite/', - deploy_root => '/usr/local/tomcat/supersite/webapps', - config_suffix => 'cfg', - config_root => '/srv/htdocs/supersite', - document_suffix => 'css', - document_root => '/srv/htdocs/supersite', - init_script => 'tomcat', - report_email => 'sysadmins@example42.com', - enable => 'true', - } - -The same deploy Nexus repository with some more options: -- A Source dir to be used to deploy static files when issuing "puppi init supersite" -- A block from a loadbalancer IP (managing different sites addresess) -- Some more elaborate rsync exclusion rules -- A backup retention of 3 archives (instead of the default 5) - puppi::project::maven { 'supersite': - source => 'http://nexus.example42.com/nexus/content/repositories/releases/it/example42/supersite/', - deploy_root => '/usr/local/tomcat/supersite/webapps', - config_suffix => 'cfg', - config_root => '/srv/htdocs/supersite', - document_suffix => 'css', - document_root => '/srv/htdocs/supersite', - document_init_source => 'rsync://backup.example42.com/initdir/supersite/', - firewall_src_ip => $site ? { - dr => '192.168.101.1/30', - main => '192.168.1.1/30', - }, - backup_rsync_options => '--exclude .snapshot --exclude /doc_root/autojs/*** --exclude /doc_root/autocss/*** --exclude /doc_root/xsl', - backup_retention => '3', - init_script => 'tomcat', - report_email => 'sysadmins@example42.com', - enable => 'true', - } - -An elaborated war deploy: -- get from $source, -- execute /usr/local/bin/mychecks.sh as root before the deploy -(or better with sequence number 39) -- deploy to /data/tomcat/myapp/webapps as user pippo -- stop and start tomcat-myapp but also monit and puppet -- backup passing $backup_rsync_options to rsync: - puppi::project::war { 'myapp': - source => 'http://repo.example42.com/deploy/prod/myapp.war', - deploy_root => '/store/tomcat/myapp/webapps', - predeploy_customcommand => '/usr/local/bin/mychecks.sh', - predeploy_priority => '39', - predeploy_user => 'root', - backup_rsync_options => '--exclude logs/', - user => 'pippo', - init_script => 'tomcat-myapp', - deploy_root => '/data/tomcat/myapp/webapps', - report_email => 'sysadmins@example42.com', - disable_services => 'monit puppet', - } -An example of usage of the generic builder define to deploy a zip file, with an example custom -post deploy command executed as root (as all puppi commands, if not specified otherwise) - puppi::project::builder { 'cms': - source => 'http://repo.example42.com/deploy/cms/cms.zip', - source_type => 'zip', - user => 'root', - deploy_root => '/var/www', - postdeploy_customcommand => 'chown -R www-data /var/www/files', - postdeploy_user => 'root', - postdeploy_priority => '41', - report_email => 'sysadmins@example42.com', - enable => 'true', - } - -These are just examples, possibilities are many, refer to the docs in puppi/manifests/project/*.pp -to have a full list of the available options. - - -## BASIC PUPPI DEFINES -The above puppi::projects defines manage more or less complex deployments procedures for different kind of projects. They are just samples of possible procedures and you may create your one ones, if the ones provided there don't fit your needs. -They will have to contain one or more of these basic puppi defines. - -Create the main project structure. One or more different deployment projects can exist on a node. - puppi::project - -Create a single command to be placed in the init sequence. It's not required for every project. - puppi::initialize - -Create a single command to be placed in the deploy sequence. More than one is generally needed for each project. - puppi::deploy - -Create a single command to be placed in the rollback sequence. More than one is generally needed for each project. - puppi::rollback - -These defines have generally a standard structure and similar arguments. -Every one is reversable (enable => false) but you can wipe out the whole /etc/puppi directory -to have it rebuilt from scratch. Here is an example for a single deploy command: - puppi::deploy { 'Retrieve files': # The $name of the define is used in the file name - command => 'get_curl.sh', # The name of the general-use script to use - argument => 'file:///storage/file', # The argument(s) passed to the above script - priority => '10', # Lower priority scripts are executed first - user => 'root', # As what user we run the script - project => 'my-web.app', # The name of the project to use - } - -This define creates a file named: - /etc/puppi/projects/${project}/deploy/${priority}-${name} -Its content is, simply: - su - ${user} -c "export project=${project} && /etc/puppi/scripts/${command} ${arguments}" - - -## DEPLOY PROCEDURES DEFINES -The puppi module provides some examples of deploy workflows they are in the puppi/manifests/project -directory and contain simple to use defines that contain one puppi::project and several puppi::deploy and -puppi::rollback defines to design a specific workflow using the builtin commands present in -puppi/files/scripts. -Note that if you need to design your own deploy procedure you have different options: -- Verify if you can reuse the existing ones, using optional arguments as pre/postdeploy_commands -- Use the existing ones as a base to make you own custom defines, reusing parts of their logic - and the builtin commands (puppi/files/scripts/*) they use -- Write your own commands (in whatever language) and integrate them in your own procedure. - -Here follow the main and most reusable deploy workflows defines available in puppi/manifests/project/. -The have generally a set of common arguments that make you manage if to stop and restart specific -services, if you want to isolate your server from a loadbalancer during the deploy procedure, what to backup, -how many backup copies to mantain, if to send a report mail to specific addresses and if you need -to run custom commands during the standard procedure. -For all of the you have to specify a source from where to get the source files (http/ftp/rsync/file..) -a directory where to place them and the user that has to own the deploy files. -Full documentation is available in the relevant .pp files - -- puppi::project::tar - Use this to retrieve and deploy a simple tar file -- puppi::project::war - Use this to retrieve and deploy a war -- puppi::project::files - Use this to deploy one or more files based on a provided list -- puppi::project::dir - Use this to syncronize a remote directory to a local deploy one -- puppi::project::mysql - Use this to retrive and apply a .sql file for mysql schema updates -- puppi::project::maven - Use this to deploy war and tar files generated via Maven released on Nexus or similar. A good source of Open Source Java artifacts is http://www.artifact-repository.org/ -- puppi::project::builder - This is a general purpose define that incorporates most the of cases provided by the above procedures - - -## BUILTIN COMMANDS -The puppi/files/scripts directory in the module contains some general usage "native" bash scripts -that can be used in custom deployments. They are generally made to work together according to a -specific logic, which is at the base of the deploy procedures defines in puppi/manifests/project/ -but you're free to write your own scripts, in whatever language, according to your needs. - -The default scripts are engineered to follow these steps for a deployment: -- Remote files are downloaded in /tmp/puppi/$project/store or directly in the predeploy - directory: /tmp/puppi/$project/deploy -- If necessary the downloaded files are expanded in one or more predeploy directories - (default:/tmp/puppi/$project/deploy). -- Runtime configuration entries might be saved in /tmp/puppi/$project/config -- Files are eventually backed from the deploy directory (Apache' docroot, Tomcat webapps or whatever) - to the archive directory (/var/lib/puppi/archive/$project). Older backups are deleted (by default - there's a retention of 5 backups). -- Files are copied from the predeploy directory to the deploy dir. -- Relevant services are eventually stopped and started - -The most used common scripts are (they might have different arguments, some of them are quite simple): -- get_file.sh - Retrieves a file via ssh/http/rsync/svn and places it in a temp dir (store or predeploy) -- deploy.sh - Copies the files in the predeploy dir to deploy dir -- archive.sh - Backups and restores files in deploy dir -- service.sh - Stops or starts one or more services -- wait.sh - Waits for the presence or absence of a file, for the presence of a string in a file or a defined number or seconds. -- get_metadata.sh - Extracts metadata from various sources in order to provide info to other scripts. These info are save in the Runtime configuration file (/tmp/puppi/$project/config) -- report_mail.sh - Sends a mail with the report of the operations done - -General functions, used by both the puppi command and these scripts, are in puppi/files/scripts/functions diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_info.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_info.md deleted file mode 100644 index ff45eb3780..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_info.md +++ /dev/null @@ -1,60 +0,0 @@ -# PUPPI INFO README -The puppi info commands executes scripts in /etc/puppi/info/ which are generated by templates provided by the puppi::info define -These scripts are supposed to show status details on the omonimous info topic. - -## SYNOPSIS (cli) - puppi info [topic] [-i] - -## EXAMPLES (cli) -Show host-wide infos. Much stuff. - puppi info - -Show info about apache (connections, processes, config, logs...) - puppi info apache - -Interactively select the info topics you want to show - puppi info -i - -Show complete info and send reports (email, rest ... ) - puppi info -r yes - -Grep the output with the string defined - puppi info -g - - -## EXAMPLES (puppet) -The basic define related to a info is puppi::info, it creates a script executed -when running "puppi info $name" based on the provided template. -Customize the template to customize the info you want to see. - -A sample that just runs commands using the default template: - puppi::info { 'network': - description => 'Network settings and stats' , - run => [ 'ifconfig' , 'route -n' , 'cat /etc/resolv.conf' , 'netstat -natup | grep LISTEN' ], - } - -You can have more useful and dedicated info topics using a custom puppi::info define inside your -own defines. For example in a define that creates a tomcat instance you can add something like: - puppi::info::instance { "tomcat-${instance_name}": - servicename => "tomcat-${instance_name}", - processname => "${instance_name}", - configdir => "${tomcat::params::storedir}/${instance_name}/conf/", - bindir => "${tomcat::params::storedir}/${instance_name}/bin/", - pidfile => "${instance_rundir}/tomcat-${instance_name}.pid", - datadir => "${instance_path}/webapps", - logdir => "${instance_logdir}", - httpport => "${instance_httpport}", - controlport => "${instance_controlport}", - ajpport => "${instance_ajpport}", - templatefile=> "puppi/info/instance.erb", - description => "Info for ${instance_name} Tomcat instance" , - } -which has custom arguments, feeded by the data you provided to the define, and a custom -template file that uses these variables. - -## EXAMPLES (with example42 puppet modules) -If you use the old Example42 modules set you get automatically many service related infos out of the box to be used with Puppi One. -NextGen modules are supposed to provide pupi info intergration on Puppi Two (TO DO) -Just set (via an ENC, facts or manifests) $puppi=yes to enable puppi extensions autoloading. -This will automatically deploy info topics related to the modules you use. - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_log.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_log.md deleted file mode 100644 index 8fe806ea02..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/README_log.md +++ /dev/null @@ -1,44 +0,0 @@ -# PUPPI LOG README -Documentation and examples related to the puppi action log - -## SYNOPSIS (cli) - puppi log [topic] [-i] - -## EXAMPLES (cli) - -Tails (tail -10f) all the known logs. - puppi log - -Tails only the logs related to the given topic - puppi log apache - -Choose interactively which logs to show - puppi log - -Grep the output with the string defined - puppi log -g - -## EXAMPLES (puppet) -The basic define related to a log is: - puppi::log -it creates a file in /etc/puppi/logs/ with one or more logs paths. - -A simple, operating system aware, example might be: - puppi::log { 'auth': - description => 'Users and authentication' , - log => $::operatingsystem ? { - redhat => '/var/log/secure', - darwin => '/var/log/secure.log', - ubuntu => ['/var/log/user.log','/var/log/auth.log'], - } - } - -but also something that uses variables Puppet already knows - puppi::log { "tomcat-${instance_name}": - log => "${tomcat::params::storedir}/${instance_name}/logs/catalina.out" - } - -EXAMPLES (with example42 puppet modules) -If you use the old Example42 modules set you get automatically many service related logs out of the box to be used with Puppi One. -NextGen modules are supposed to provide puppi log intergration on Puppi Two (TO DO) - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/Rakefile deleted file mode 100644 index 8fcea70edb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/Rakefile +++ /dev/null @@ -1,6 +0,0 @@ -require 'rubygems' -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet_blacksmith/rake_tasks' -require 'puppet-lint' -PuppetLint.configuration.send("disable_80chars") -PuppetLint.configuration.send('disable_class_parameter_defaults') diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/composer.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/composer.json deleted file mode 100644 index f56438cd23..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/composer.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "example42/puppi", - "description": "Puppet driven applications deployment tool", - "homepage": "https://github.com/example42/puppi", - "type": "library", - "license": "Apache License, Version 2.0", - "authors": [ - { - "name": "Example42", - "homepage": "http://www.example42.com/" - } - ] -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/info/readme/readme b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/info/readme/readme deleted file mode 100644 index 08778cc69c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/info/readme/readme +++ /dev/null @@ -1,2 +0,0 @@ -Default ReadMe File. -Edit puppi/files/info/readme/readme to change this message diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/info/readme/readme-default b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/info/readme/readme-default deleted file mode 100644 index 187d6f3a10..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/info/readme/readme-default +++ /dev/null @@ -1,4 +0,0 @@ -No extra node or role related info available. -To have node or role specific extar info, create -modules/puppi/files/info/readme/readme--$hostname or -modules/puppi/files/info/readme/readme-$role diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mailpuppicheck b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mailpuppicheck deleted file mode 100644 index fbde3bfda7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mailpuppicheck +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash -# File Managed by Puppet -# Possible Usage: -# Run this command at the end of each Puppet run to be -# immediately notified if a Puppet Runs has broken some service -# -# Options: -# -m destination_email -# -i (in seconds) before retrying a Puppi check -# -r how many attempts to retry if there are failures -# -# In puppet.conf add something like: -# postrun_command = "/usr/bin/mailpuppicheck -m roots@example.com" -# -retries=1 -interval=2 -workdir="/tmp" -counter=0 -while [ $# -gt 0 ]; do - case "$1" in - -m) - mail=$2 - shift 2 ;; - -i) - internal=$2 - shift 2 ;; - -r) - retries=$2 - shift 2 ;; - esac -done - -if [ ! $mail ] ; then - echo "Provide at least an email addess" - exit 1 -fi - -# randfile="$(mktemp)" -lastrunfile=$workdir/puppicheck_lastrun -savedfile=$workdir/puppicheck_saved - -while [ $counter -lt $retries ] ; do - puppi check | grep FAILED > $lastrunfile - if [ "x$?" == "x0" ] ; then - errors="yes" - sleep $interval - else - errors="no" - echo "Run $counter - Errors $errors" - echo > $savedfile - exit 0 - fi - echo "Run $counter - Errors $errors" - let counter=$counter+1 -done - -diff $lastrunfile $savedfile -if [ "x$?" == "x0" ] ; then - echo "No changes detected" -else - echo "Changes detected" - notify="yes" -fi - -cp $lastrunfile $savedfile -if [ "x$notify" == "xyes" ] ; then - # Yes, it's ugly - cat -v $lastrunfile | sed -e 's:\^\[\[60G\[\^\[\[0;31m: :g' | sed -e 's:\^\[\[0;39m\]\^M: :g' | mail -s "[puppet] Errors after Puppet run on $(hostname -f)" $mail - echo "Sent notification" -fi - -exit 0 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/mc-puppi b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/mc-puppi deleted file mode 100755 index 26f1e45a40..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/mc-puppi +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env ruby - -# Client program for the mcollective puppi agent -# -# Released under Apache License 2.0 - -require 'mcollective' - -include MCollective::RPC - -options = rpcoptions do |parser, options| - options[:timeout] = 180 - - parser.define_head "Execute Puppi commands" - parser.banner = "Usage: mc-puppi [filters] command [project] [puppioptions]" - parser.separator "" - parser.separator "Available commands:" - parser.separator " check [project] - Run puppi check" - parser.separator " info [topic] - Run puppi info. For all or specified topic" - parser.separator " log [topic] - Run puppi log. For all or specified topic" - parser.separator " todo - Run puppi todo" - parser.separator " deploy - Run puppi deploy on the defined project" - parser.separator " configure - Run puppi configure on the defined project" - parser.separator " rollback - Run puppi rollback latest on the defined project" - parser.separator " init - Run puppi init on the defined project" -end - -if MCollective::Util.empty_filter?(options[:filter]) - print("Do you really want to operate on services unfiltered? (y/n): ") - STDOUT.flush - - exit unless STDIN.gets.chomp =~ /^y$/ -end - -if ARGV.length >= 1 - command = ARGV.shift - project = ARGV.shift - puppioptions = ARGV.shift - - unless command =~ /^(check|deploy|rollback|init|configure|info|log|todo)$/ - puts("Command has to be check|info|log|deploy|rollback|init|configure|todo") - exit 1 - end -else - puts("Please specify at least a command") - exit 1 -end - -mc = rpcclient("puppi", :options => options) -mc.progress = true -# mc.send(command, {:project => project}) do |resp| -args = {}; -args[:project] = project if project -args[:puppioptions] = puppioptions if puppioptions -mc.send(command, args) do |resp| - begin -# puts resp[:serverid] - puts resp[:body][:data] -# puts resp[:body][:exitcode] - - rescue RPCError => er - puts "RPC Agent error: #{er}" - end -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppi.ddl b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppi.ddl deleted file mode 100644 index f86ec468fe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppi.ddl +++ /dev/null @@ -1,68 +0,0 @@ -metadata :name => "SimpleRPC Agent For PUPPI Commands", - :description => "Agent to query PUPPI commands via MCollective", - :author => "Al @ Lab42", - :license => "Apache License 2.0", - :version => "0.3", - :url => "http://www.example42.com/", - :timeout => 600 - -[ "check" , "log" , "info" ].each do |myact| - action myact, :description => "Run puppi myact" do - display :always - - input :project, - :prompt => "Project", - :description => "PUPPI project", - :type => :string, - :validation => '^[a-zA-Z\-\.=_\d]+$', - :optional => true, - :maxlength => 50 - - input :puppioptions, - :prompt => "Puppi options", - :description => "PUPPI options", - :type => :string, - :validation => '^[a-zA-Z\-\.=_\d]+$', - :optional => true, - :maxlength => 50 - - output :data, - :description => "Output from the Puppi run", - :display_as => "Output" - - output :exitcode, - :description => "Exit Code from the Puppi run", - :display_as => "Exit Code" - end -end - -[ "deploy" , "rollback" , "init" , "configure" ].each do |myact| - action myact, :description => "Run puppi myact" do - display :always - - input :project, - :prompt => "Project", - :description => "PUPPI project", - :type => :string, - :validation => '^[a-zA-Z\-\.=_\d]+$', - :optional => false, - :maxlength => 50 - - input :puppioptions, - :prompt => "Puppi options", - :description => "PUPPI options", - :type => :string, - :validation => '^[a-zA-Z\-\.=_\d]+$', - :optional => true, - :maxlength => 50 - - output :data, - :description => "Output from the Puppi run", - :display_as => "Output" - - output :exitcode, - :description => "Exit Code from the Puppi run", - :display_as => "Exit Code" - end -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppi.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppi.rb deleted file mode 100644 index ee0b3289f2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppi.rb +++ /dev/null @@ -1,83 +0,0 @@ -module MCollective - module Agent - class Puppi "SimpleRPC Agent For PUPPI Commands", - :description => "Agent to execute PUPPI actions via MCollective", - :author => "Al @ Lab42", - :license => "Apache License 2.0", - :version => "0.3", - :url => "http://www.example42.com/", - :timeout => 600 - - def check_action -# validate :project, :shellsafe - project = request[:project] if request[:project] - reply.data = %x[puppi check #{project}].chomp - if ($?.exitstatus > 0) - reply.fail "FAILED: #{reply.data}" - end - end - - def info_action -# validate :project, :shellsafe - project = request[:project] if request[:project] - reply.data = %x[puppi info #{project}].chomp - if ($?.exitstatus > 0) - reply.fail "FAILED: #{reply.data}" - end - end - - def log_action -# validate :project, :shellsafe - project = request[:project] if request[:project] - reply.data = %x[puppi log #{project} -c 10].chomp - if ($?.exitstatus > 0) - reply.fail "FAILED: #{reply.data}" - end - end - - def deploy_action - validate :project, :shellsafe - project = request[:project] if request[:project] - if (!File.directory? "/etc/puppi/projects/#{project}") - reply.fail "No such project #{project}" - return - end - puppioptions = request[:puppioptions] - reply.data = %x[puppi deploy #{project} -o "#{puppioptions}"].chomp - if ($?.exitstatus > 0) - reply.fail "FAILED: #{reply.data}" - end - end - - def rollback_action - validate :project, :shellsafe - project = request[:project] if request[:project] - reply.data = %x[puppi rollback #{project} latest].chomp - if ($?.exitstatus > 0) - reply.fail "FAILED: #{reply.data}" - end - end - - def init_action - validate :project, :shellsafe - project = request[:project] if request[:project] - reply.data = %x[puppi init #{project}].chomp - if ($?.exitstatus > 0) - reply.fail "FAILED: #{reply.data}" - end - end - - def configure_action - validate :project, :shellsafe - project = request[:project] if request[:project] - reply.data = %x[puppi configure #{project}].chomp - if ($?.exitstatus > 0) - reply.fail "FAILED: #{reply.data}" - end - end - - end - end -end -# vi:tabstop=4:expandtab:ai diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppicheck b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppicheck deleted file mode 100644 index 988d310fad..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppicheck +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# File Managed by Puppet -PATH=$PATH:/usr/local/bin - -if [ ! $1 ] ; then - echo "Provide at least a match pattern. For example:" - echo "role=fep-pgol" - exit 1 -fi - -filtered=$(echo $* | sed "s/[^a-Z0-9= _.\-]//Ig") - -randfile="$(mktemp)" - -trap "rm -f $randfile" SIGINT SIGTERM EXIT - -myarg=$(echo $filtered | sed -e "s/ / -F /g") - -mc-puppi check -F $myarg | tee $randfile -grep FAILED $randfile && exit 1 -exit 0 - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppideploy b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppideploy deleted file mode 100644 index 2f722d6c3e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/mcollective/puppideploy +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# File Managed by Puppet -PATH=$PATH:/usr/local/bin - -if [ ! $2 ] ; then - echo "Provide the hostname and the project you want to deploy:" - echo "superdeploy web01.example42.com myapp" - exit 1 -fi - -filtered=$(echo $* | sed "s/[^a-Z0-9= _.\-]//Ig") - -randfile="$(mktemp)" - -trap "rm -f $randfile" SIGINT SIGTERM EXIT - -myarg=$(echo $filtered | sed -e "s/ / -F /g") - -mc-puppi deploy -I $1 $2 | tee $randfile -grep FAILED $randfile && exit 1 -exit 0 - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/archive.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/archive.sh deleted file mode 100644 index 7448613d39..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/archive.sh +++ /dev/null @@ -1,168 +0,0 @@ -#!/bin/bash -# archive.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script is used to backup or restore contents to/from puppi archivedir" - echo "It has the following options:" - echo "-b - Backups the files to be changed in the defined directory" - echo "-r - Recovers file to the provided destination" - echo "-s - Specifies the backup strategy (move or copy files)" - echo "-t - Specifies a tag to be used for the backup" - echo "-d - Specifies the runtime variable that defines the predeploy dir" - echo "-c - Specifies if you want compressed (tar.gz) archives. Default: yes" - echo "-o 'options' - Specifies the rsync options to use during backup. Use it to specify custom " - echo " exclude patterns of files you don't want to archive, for example" - echo "-m - Specifies the backup type: 'full' backups all the files in backup_source," - echo " 'diff' backups only the files deployed" - echo "-n - Number of copies of backups to keep on the filesystem. Default 5" - echo - echo "Examples:" - echo "archive.sh -b /var/www/html/my_app -t html -c yes" -} - -# Arguments check -if [ "$#" = "0" ] ; then - showhelp - exit -fi - -# Default settings -compression=yes -backuptag=all -strategy=copy -backupmethod=full -bakret=5 - -while [ $# -gt 0 ]; do - case "$1" in - -b) - backuproot=$2 -# [ $deploy_root ] && backuproot=$deploy_root # This is needed to allow override of $deploy_root via puppi cmd. But breaks on puppi::project::maven - action=backup - shift 2 ;; - -r) - backuproot=$2 -# [ $deploy_root ] && backuproot=$deploy_root # This is needed to allow override of $deploy_root via puppi cmd. But breaks on puppi::project::maven - action=recovery - shift 2 ;; - -t) - backuptag=$2 - shift 2 ;; - -s) - case "$2" in - mv) strategy="move" ;; - move) strategy="move" ;; - *) strategy="copy" ;; - esac - shift 2 ;; - -m) - case "$2" in - diff) backupmethod="diff" ;; - *) backupmethod="full" ;; - esac - shift 2 ;; - -c) - case "$2" in - yes) compression="yes" ;; - y) compression="yes" ;; - *) compression="none" ;; - esac - shift 2 ;; - -d) - predeploydir="$(eval "echo \${$(echo $2)}")" - shift 2 ;; - -o) - rsync_options=$2 - shift 2 ;; - -n) - bakret=$2 - shift 2 ;; - *) - showhelp - exit - ;; - esac -done - - -# Backup and Restore functions -backup () { - mkdir -p $archivedir/$project/$tag/$backuptag - if [ $archivedir/$project/latest ] ; then - rm -f $archivedir/$project/latest - fi - ln -sf $archivedir/$project/$tag $archivedir/$project/latest - - filelist=$storedir/filelist - cd $predeploydir - find . | cut -c 3- | grep -v "^$" > $filelist - - if [ "$strategy" = "move" ] ; then - for file in $(cat $filelist) ; do - mv $backuproot/$file $archivedir/$project/$tag/$backuptag/ - done - if [ "$backupmethod" = "full" ] ; then - rsync -a $rsync_options $backuproot/ $archivedir/$project/$tag/$backuptag/ - fi - else - if [ "$backupmethod" = "full" ] ; then - rsync -a $rsync_options $backuproot/ $archivedir/$project/$tag/$backuptag/ - else - rsync -a $rsync_options --files-from=$filelist $backuproot/ $archivedir/$project/$tag/$backuptag/ - fi - fi - - if [ "$compression" = "yes" ] ; then - cd $archivedir/$project/$tag/$backuptag/ - tar -czf ../$backuptag.tar.gz . - cd $archivedir/$project/$tag/ - rm -rf $archivedir/$project/$tag/$backuptag/ - fi -} - -recovery () { - if [ ! $rollbackversion ] ; then - echo "Variable rollbackversion must exist!" - exit 2 - fi - - if [ -d $archivedir/$project ] ; then - cd $archivedir/$project - else - echo "Can't find archivedir for this project" - exit 2 - fi - - if [ "$compression" = "yes" ] ; then - cd $backuproot/ - tar -xzf $archivedir/$project/$rollbackversion/$backuptag.tar.gz . - else - rsync -a $rsync_options $rollbackversion/$backuptag/* $backuproot - fi - -} - -delete_old () { - # We don't count the "latest" symlink - bakret=$(expr $bakret + 1 ) - - cd $archivedir/$project - - ddirs=$(ls -1p 2>/dev/null | wc -l) - while [ $ddirs -gt $bakret ] - do - victim=$(ls -tr 2>/dev/null | head -1) - rm -rf $victim && echo "Deleted old $archivedir/$project/$victim" - ddirs=$(ls -1p 2>/dev/null | wc -l) - done -} - -# Action! -case "$action" in - backup) backup ; delete_old ;; - recovery) recovery ;; -esac diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/check_project.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/check_project.sh deleted file mode 100644 index 1f1c1d6d9b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/check_project.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# check_project.sh - Made for Puppi -# This script runs the checks defined in $projectsdir/$project/check and then in $checksdir -# It can be used to automatically run tests during the deploy procedure - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Main functions -handle_check () { - RETVAL=$? - if [ "$RETVAL" = "1" ] ; then - EXITWARN="1" - fi - if [ "$RETVAL" = "2" ] ; then - EXITCRIT="1" - fi -} - -check () { - for command in $(ls -v1 $projectsdir/$project/check) ; do - "$projectsdir/$project/check/$command" - handle_check - done - - for command in $(ls -v1 $checksdir) ; do - "$checksdir/$command" - handle_check - done -} - -# For nicer output when launched via cli -echo -n "\n" - -# Run checks -check - -# Manage general return code -if [ "$EXITCRIT" = "1" ] ; then - exit 1 -fi - -if [ "$EXITWARN" = "1" ] ; then - exit 1 -fi diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/checkwardir.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/checkwardir.sh deleted file mode 100644 index 7e1b79228e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/checkwardir.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# checkwardir.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script is used to check if a webapp directory is successfully created or removed" - echo " after the (un)deploy of a war file" - echo "It implies that a directory with the name of the war file is created in the same path" - echo "-p - Waits until war created dir is present" - echo "-a - Wait until war created dir is absent" - echo "-s - Wait some more seconds after the check" - echo "-c - Name of the runtime config variable that contains the warname" - echo "Examples:" - echo "checkwardir.sh -p /store/tomcat/myapp/webapps/myapp.war" - echo "checkwardir.sh -a /store/tomcat/myoldapp/webapps/myoldapp.war" -} - -seconds=2 - -while [ $# -gt 0 ]; do - case "$1" in - -s) - seconds=$2 - shift 2 - ;; - -p) - check="present" - warname=$2 - shift 2 - ;; - -a) - check="absent" - warname=$2 - shift 2 - ;; - -c) - warname="$(eval "echo \${$(echo ${2})}")" - shift 2 - ;; - *) - showhelp - exit - ;; - esac -done - -checkdir () { - wardir=${warname%\.*} - while true - do - if [ $check == absent ] ; then - [ ! -d $wardir ] && break - else - [ -f $wardir/WEB-INF/web.xml ] && break - fi - sleep $seconds - done -} - -checkdir diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/clean_filelist.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/clean_filelist.sh deleted file mode 100644 index 40edae9920..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/clean_filelist.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# clean_filelist.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script is used to cleanup a list of files to download from unwanted data" - echo "It has 1 optional argument:" - echo "The prefix, present in the list, to cut out when defining files to deploy" - echo "The list file is defined as $downloadedfile , these variables are gathered from the Puppi runtime" - echo " config file." - echo - echo "Example:" - echo "clean_filelist.sh http://svn.example42.com/myproject" -} - - -if [ $1 ] ; then - prefix=$1 -else - prefix="" -fi - -deployfilelist=$downloadedfile - -# Clean list -cleanlist () { - - sed -i "s/^$prefix//g" $deployfilelist - -} - -cleanlist diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/database.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/database.sh deleted file mode 100644 index f8d89399d3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/database.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/bash -# database.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script executes database queries and dumps" - echo "It integrates and uses variables provided by other core Puppi scripts" - echo "It has the following options:" - echo "-t The database type. Currently only mysql is suppoerted" - echo "-a The action to perform:" - echo " run - Run a mysql command based on a given .sql file" - echo " dump - Dump the specified database in the archive dir" - echo " restore - Restore the specified database from the archive dir" - echo "-d The database name to manage" - echo "-u The database user used to run the queries" - echo "-p The user password" - echo "-h The database server hostname" -} - -# Arguments defaults -db_type=mysql -db_action=run -db_user=root -db_host=localhost -db_password="" - -# Check Arguments -while [ $# -gt 0 ]; do - case "$1" in - -t) - db_type=$2 - shift 2 ;; - -a) - db_action=$2 - shift 2 ;; - -d) - db_name=$2 - shift 2 ;; - -u) - db_user=$2 - shift 2 ;; - -p) - db_password=$2 - shift 2 ;; - -h) - db_host=$2 - shift 2 ;; - esac -done - - - -mysql_run () { - case "$db_action" in - run) - file $downloadedfile | grep gzip &>/dev/null 2>&1 && sqlfile_type="gzip" - file $downloadedfile | grep Zip &>/dev/null 2>&1 && sqlfile_type="zip" - case "$sqlfile_type" in - gzip) - zcat $downloadedfile | mysql -u $db_user -p$db_password -h $db_host $db_name - check_retcode ;; - zip) - unzip -p $downloadedfile | mysql -u $db_user -p$db_password -h $db_host $db_name - check_retcode ;; - *) - mysql -u $db_user -p$db_password -h $db_host $db_name < $downloadedfile - check_retcode ;; - esac - ;; - dump) - mkdir -p $archivedir/$project/$tag - if [ $archivedir/$project/latest ] ; then - rm -f $archivedir/$project/latest - fi - ln -sf $archivedir/$project/$tag $archivedir/$project/latest - - mysqldump -u $db_user -p$db_password -h $db_host --add-drop-table --databases $db_name | gzip > $archivedir/$project/$tag/$db_name.sql.gz - check_retcode ;; - restore) - zcat $archivedir/$project/$rollbackversion/$db_name.sql.gz | mysql -u $db_user -p$db_password -h $db_host $db_name - check_retcode ;; - esac -} - -case "$db_type" in - mysql) - mysql_run - ;; - *) - showhelp - ;; -esac - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/delete.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/delete.sh deleted file mode 100644 index d255c6a832..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/delete.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# delete.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Manage script variables -if [ $1 ] ; then - tobedeleted=$1 -else - echo "You must provide a file or directory to delete!" - exit 2 -fi - -if [ "$tobedeleted" = "/" ] ; then - echo "Be Serious!" - exit 2 -fi - -# Move file -move () { - mkdir -p $workdir/$project/deleted - mv $tobedeleted $workdir/$project/deleted -} - -move diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/deploy.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/deploy.sh deleted file mode 100644 index 96d3b64c57..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/deploy.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# deploy.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script deploys the files present in the \$predeploydir to the deploy destination dir" - echo "It has the following options:" - echo "\$1 (Required) - Destination directory where to deploy files" - echo "\$2 (Optional) - Name of the variable that identifies a specific predeploydir" - echo - echo "Examples:" - echo "deploy.sh /var/www/html/my_app" - echo "deploy.sh /var/www/html/my_app/conf config" -} - -# Check arguments -if [ $1 ] ; then - deploy_destdir=$1 -# This breaks on projects::maven when using more than one deploy destinations -# [ $deploy_root ] && deploy_destdir=$deploy_root -else - showhelp - exit 2 -fi - -# Obtain the value of the variable with name passed as second argument -# If no one is given, we take all the files in $predeploydir -if [ $2 ] ; then - deployfilevar=$2 - deploy_sourcedir="$(eval "echo \${$(echo ${deployfilevar})}")" - if [ "$deploy_sourcedir" = "" ] ; then - exit 0 - fi -else - deploy_sourcedir="$predeploydir" -fi - -# Copy files -deploy () { - case "$debug" in - yes) - rsync -rlptDv $deploy_sourcedir/ $deploy_destdir/ - check_retcode - ;; - full) - rsync -rlptDv $deploy_sourcedir/ $deploy_destdir/ - check_retcode - ;; - *) - rsync -rlptD $deploy_sourcedir/ $deploy_destdir/ - check_retcode - ;; - esac -} - -deploy diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/deploy_files.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/deploy_files.sh deleted file mode 100644 index 95bb4ff150..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/deploy_files.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -# deploy_files.sh - Made for Puppi -# This is an extended version of the deploy script -# It accepts more options to better handle how files are deployed -# in the destination directory - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script deploys the files present in the \$predeploydir to the deploy destination dir" - echo "It has the following options:" - echo "-d (Required) - Destination directory where to deploy files" - echo "-p (Optional) - Name of the variable that identifies a specific predeploydir" - echo "-c (Default: false) - If to enabled the --delete option to the rsync command" - echo - echo "Examples:" - echo "deploy_files.sh -d /var/www/html/my_app" - echo "deploy_files.sh -d /var/www/html/my_app/conf -p config" - echo "deploy_files.sh -d /var/www/html/my_app/conf -c true" -} - -deploy_sourcedir="$predeploydir" -clean_destdir="false" - -while [ $# -gt 0 ]; do - case "$1" in - -d) - deploy_destdir=$2 - shift 2 ;; - -p) - deployfilevar=$2 - deploy_sourcedir="$(eval "echo \${$(echo ${deployfilevar})}")" - shift 2 ;; - -c) - clean_destdir=$2 - shift 2 ;; - *) - showhelp - exit - ;; - esac -done - -rsync_delete="" -if [ x$clean_destdir == "xtrue" ] ; then - rsync_delete="--delete" -fi - -# Copy files -deploy () { - case "$debug" in - yes) - rsync -rlptDv $rsync_delete $deploy_sourcedir/ $deploy_destdir/ - check_retcode - ;; - full) - rsync -rlptDv $rsync_delete $deploy_sourcedir/ $deploy_destdir/ - check_retcode - ;; - *) - rsync -rlptD $rsync_delete $deploy_sourcedir/ $deploy_destdir/ - check_retcode - ;; - esac -} - -deploy diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/execute.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/execute.sh deleted file mode 100644 index e63d305054..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/execute.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# execute.sh - Made for Puppi -# This script just executes what is passed as argument - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -#parse variables -command=$(eval "echo "$*"") - -#execute command -eval "${command}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/firewall.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/firewall.sh deleted file mode 100644 index 382542c6e3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/firewall.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# firewall.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script places a temporary firewall (iptables) rule to block access from the IP defined" - echo "It has the following options:" - echo "\$1 (Required) - Remote Ip address to block (Generally a load balancer" - echo "\$2 (Required) - Local port to block (0 for all ports" - echo "\$3 (Required) - Set on or off to insert or remove the blocking rule" - echo "\$4 (Required) - Number of seconds to sleep after having set the rule" - echo - echo "Examples:" - echo "firewall.sh 10.42.0.1 0 on" - echo "firewall.sh 10.42.0.1 0 off" -} - -# Check arguments -if [ $2 ] ; then - ip=$1 - port=$2 -else - showhelp - exit 2 -fi - -if [ $3 ] ; then - if [ "$3" = "on" ] ; then - action="-I" - elif [ "$3" = "off" ] ; then - action="-D" - else - showhelp - exit 2 - fi -else - showhelp - exit 2 -fi - -if [ $4 ] ; then - delay=$4 -else - delay="1" -fi - -# Block -run_iptables () { - if [ "$port" = "0" ] ; then - iptables $action INPUT -s $ip -j DROP - else - iptables $action INPUT -s $ip -p tcp --dport $port -j DROP - fi -} - -run_iptables -echo "Sleeping for $delay seconds" -sleep $delay - -# Sooner or later this script will have multiOS support diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/functions b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/functions deleted file mode 100644 index 38bedcad3f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/functions +++ /dev/null @@ -1,229 +0,0 @@ -#!/bin/bash -# General Puppi functions - -BOOTUP=color -RES_COL=75 -MOVE_TO_COL="echo -en \\033[${RES_COL}G" -SETCOLOR_SUCCESS="echo -en \\033[0;32m" -SETCOLOR_FAILURE="echo -en \\033[0;31m" -SETCOLOR_WARNING="echo -en \\033[0;33m" -SETCOLOR_NORMAL="echo -en \\033[0;39m" -SETCOLOR_TITLE="echo -en \\033[0;35m" -SETCOLOR_BOLD="echo -en \\033[0;1m" - -echo_success() { - [ "$BOOTUP" = "color" ] && $MOVE_TO_COL - echo -n "[" - [ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS - echo -n $" OK " - [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL - echo -n "]" - echo -ne "\r" - return 0 -} - -echo_dontdeploy() { - [ "$BOOTUP" = "color" ] && $MOVE_TO_COL - echo -n "[" - [ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS - echo -n $" NO NEED TO DEPLOY " - [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL - echo -n "]" - echo -ne "\r" - return 0 -} - -echo_failure() { - [ "$BOOTUP" = "color" ] && $MOVE_TO_COL - echo -n "[" - [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE - echo -n $"FAILED" - [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL - echo -n "]" - echo -ne "\r" - return 1 -} - -echo_passed() { - [ "$BOOTUP" = "color" ] && $MOVE_TO_COL - echo -n "[" - [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING - echo -n $"PASSED" - [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL - echo -n "]" - echo -ne "\r" - return 1 -} - -echo_warning() { - [ "$BOOTUP" = "color" ] && $MOVE_TO_COL - echo -n "[" - [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING - echo -n $"WARNING" - [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL - echo -n "]" - echo -ne "\r" - return 1 -} - -echo_title () { - echo - echo - [ "$BOOTUP" = "color" ] && $SETCOLOR_TITLE - echo "$1" - [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL -} - -check_retcode () { - if [ $? = "0" ] ; then - true - else - exit 2 - fi -} - -handle_result () { - RETVAL=$? - if [ "$RETVAL" = "0" ] ; then - showresult="echo_success" - result="OK" - fi - if [ "$RETVAL" = "1" ] ; then - showresult="echo_warning" - EXITWARN="1" - result="WARNING" - fi - if [ "$RETVAL" = "2" ] ; then - showresult="echo_failure" - EXITCRIT="1" - result="CRITICAL" - fi - if [ "$RETVAL" = "99" ] ; then - showresult="echo_dontdeploy" - DONTDEPLOY="1" - result="OK" - fi - if [ x$show == "xyes" ] ; then - $showresult - echo - echo -e "$output" - echo - elif [ x$show == "xfail" ] && [ x$RETVAL != "x0" ] ; then - $showresult - echo - echo -e "$output" - echo - fi - - # Output to file - if [ ! -d $logdir/$project/$tag ] ; then - mkdir -p $logdir/$project/$tag - fi - let counter=counter+1 - echo $title > $logdir/$project/$tag/$counter-$command - echo $code >> $logdir/$project/$tag/$counter-$command - echo $result >> $logdir/$project/$tag/$counter-$command - echo $output >> $logdir/$project/$tag/$counter-$command - -} - - -# Function taken from http://www.threadstates.com/articles/parsing_xml_in_bash.html -xml_parse () { - local tag=$1 - local xml=$2 - - # Find tag in the xml, convert tabs to spaces, remove leading spaces, remove the tag. - grep $tag $xml | \ - tr '\011' '\040' | \ - sed -e 's/^[ ]*//' \ - -e 's/^<.*>\([^<].*\)<.*>$/\1/' -} - -# Stores the passed arguments in Project runtime config file -# Only if the parameter is not already defined -# Usage: -# save_runtime_config parameter=value # Sets or overrides parameter -# save_runtime_config parameter=value notforce # Sets parameters only if is not already set -save_runtime_config () { - parameter=$(echo $1 | cut -d '=' -f1) - value=$(echo $1 | cut -d '=' -f2-) - force=$2 - - if [[ ! $(grep $parameter $workdir/$project/config) ]] ; then - echo >> $workdir/$project/config - echo "# Added by $0" >> $workdir/$project/config - echo "$parameter=\"$value\"" >> $workdir/$project/config - else -# sed -i "/^$parameter=/d" $workdir/$project/config # No real need to remove lines with old configs - if [[ x$force == xnotforce ]] ; then - echo >> $workdir/$project/config - echo "# CHANGE NOT FORCED by $0" >> $workdir/$project/config - echo "# $parameter=\"$value\"" >> $workdir/$project/config - else - echo >> $workdir/$project/config - echo "# CHANGED by $0" >> $workdir/$project/config - echo "$parameter=\"$value\"" >> $workdir/$project/config - fi - fi - -} - -# Adds a runtime comment to Project runtime config file -save_runtime_comment () { - echo >> $workdir/$project/config - echo "# Added by $0" >> $workdir/$project/config - echo " ## $1" >> $workdir/$project/config -} - - -# Stores the passed arguments in Project runtime config file -# Forces parameter overwrite if already defined -overwrite_runtime_config () { - echo "$1" >> $workdir/$project/config -} - -ask_interactive () { - if [ x$show == "xyes" ] ; then - echo -n $title - fi - - if [ "$interactive" = "yes" ] ; then - echo - echo "INTERACTIVE MODE: Press 'x' to exit or just return to go on" - read press - case $press in - x) exit 2 ;; - *) return - esac - fi -} - -# Shows or executes a command -show_command () { - echo - $SETCOLOR_BOLD ; echo "$HOSTNAME: $*" ; $SETCOLOR_NORMAL - - bash -c "$*" - -# Grep filter at show_command level -# if [ ! -z "$greppattern" ] ; then -# bash -c "$*" | grep $greppattern -# else -# bash -c "$*" -# fi -} - -# Filtering out only: $ ; ` | < > -shell_filter () { - echo $1 | sed 's/\$//g' | sed 's/;//g' | sed 's/`//g' | sed 's/|//g' | sed 's///g' -} - -shell_filter_strict () { -# Filtering out: $ ; ` | < > = ! { } [ ] / \ # & - echo $1 | sed 's/\$//g' | sed 's/;//g' | sed 's/`//g' | sed 's/|//g' | sed 's///g' | sed 's/=//g' | sed 's/!//g' | sed 's/{//g' | sed 's/}//g' | sed 's/\[//g' | sed 's/\]//g' | sed 's/\///g' | sed 's/\\//g' | sed 's/#//g' | sed 's/&//g' - -# Filtering out: all but accepted chars -# echo $1 | sed "s/[^a-Z0-9_\-]//Ig" -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_file.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_file.sh deleted file mode 100644 index 9afe577e2c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_file.sh +++ /dev/null @@ -1,165 +0,0 @@ -#!/bin/bash -# get_file.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script is used to retrieve the file defined after the -s parameter" - echo "The source specified can be any of these:" - echo " file://local/file/path" - echo " http(s)://my.server/file/path" - echo " ssh://user@my.server/file/path" - echo " svn://user:password@my.server/file/path" - echo "Note: Avoid using chars like : / and @ outside the Uri standards paths" - echo - echo "It has the following options:" - echo "-s - The URL of the file to get" - echo "-t - The type of file that is retrieved: list|tarball|maven-metadata|dir" - echo "-d - An alternative destination directory (default is automatically chosen)" - echo "-a - If 'no' return a special error code (99) if the download checksum is the same of the one previously downloaded" - echo "-u - in case of type http, specify a http_user for curl" - echo "-p - in case of type http, specifiy http_user for curl" - echo "-k - tell curl not to validate ssl certs" - echo " This option can be used for automatic deploys (ie via cron) that actually deploy only new changes" -} - -while [ $# -gt 0 ]; do - case "$1" in - -s) - type=$(echo $2 | cut -d':' -f1) - url=$2 - downloadfilename=$(basename $2) - downloaddir=$predeploydir - shift 2 ;; - -t) - case $2 in - # This logic is applied: - # In $predeploydir go ($workdir/$project/deploy) go file that have to be deployed - # In $storedir go ($workdir/$project/store) go support files as tarballs or lists - list) - downloaddir=$storedir - save_runtime_config "source_type=list" - ;; - tarball) - downloaddir=$storedir - save_runtime_config "source_type=tarball" - ;; - tar) - downloaddir=$storedir - save_runtime_config "source_type=tar" - ;; - zip) - downloaddir=$storedir - save_runtime_config "source_type=zip" - ;; - maven-metadata) - downloaddir=$storedir - save_runtime_config "source_type=maven" - ;; - dir) - downloaddir=$predeploydir - save_runtime_config "source_type=dir" - ;; - war) - downloaddir=$predeploydir - save_runtime_config "source_type=war" - ;; - mysql) - downloaddir=$storedir - save_runtime_config "source_type=mysql" - ;; - gz) - downloaddir=$storedir - save_runtime_config "source_type=gz" - ;; - esac - shift 2 ;; - -d) - # Enforces and overrides and alternative downloaddir - downloaddir=$2 - shift 2 ;; - -a) - alwaysdeploy=$2 - shift 2 ;; - -u) - http_user=$2 - shift 2 ;; - -p) - http_password=$2 - shift 2 ;; - -k) - ssl_arg=$1 - shift 1 ;; - *) - showhelp - exit - ;; - esac -done - -# Define what to use for downloads -cd $downloaddir - -case $type in - s3) - s3cmd get $url - check_retcode - save_runtime_config "downloadedfile=$downloaddir/$downloadfilename" - ;; - ssh|scp) - # ssh://user@my.server/file/path - scpuri=$(echo $url | cut -d'/' -f3-) - scpconn=$(echo $scpuri | cut -d'/' -f1) - scppath=/$(echo $scpuri | cut -d'/' -f2-) - rsync -rlptD -e ssh $scpconn:$scppath . - check_retcode - save_runtime_config "downloadedfile=$downloaddir/$downloadfilename" - ;; - http|https) - if [ -z "$http_password" ] ; then - curl $ssl_arg -s -f -L "$url" -O - else - curl $ssl_arg -s -f -L --anyauth --user $http_user:$http_password "$url" -O - fi - check_retcode - save_runtime_config "downloadedfile=$downloaddir/$downloadfilename" - ;; - svn) - svnuri=$(echo $url | cut -d'/' -f3-) - svnusername=$(echo $svnuri | cut -d':' -f1) - svnpassword=$(echo $svnuri | cut -d':' -f2 | cut -d'@' -f1) - svnserver=$(echo $svnuri | cut -d'@' -f2 | cut -d'/' -f1) - svnpath=/$(echo $svnuri | cut -d'@' -f2 | cut -d'/' -f2-) - mkdir -p $(dirname $svnpath) - svn export --force --username="$svnusername" --password="$svnpassword" svn://$svnserver/$svnpath $downloaddir - check_retcode - save_runtime_config "downloadedfile=$downloaddir/$downloadfilename" - ;; - file) - # file:///file/path - filesrc=$(echo $url | cut -d '/' -f3-) - rsync -rlptD $filesrc . - check_retcode - save_runtime_config "downloadedfile=$downloaddir/$downloadfilename" - ;; - rsync) - rsync -a "$url" . - # rsync -rlptD $url . # Why not preserving users/groups? - check_retcode - save_runtime_config "downloadedfile=$downloaddir/$downloadfilename" - ;; - -esac - -if [ x$alwaysdeploy == "xno" ] ; then - # Here is checked the md5sum of the downloaded file against a previously save one - # If the sums are the same the scripts exits 99 and puppi will stop the deploy without any warning or notification - [ -d $archivedir/$project ] || mkdir -p $archivedir/$project - touch $archivedir/$project/md5sum - md5sum $downloaddir/$downloadfilename > $workdir/$project/md5sum_downloaded - cat $archivedir/$project/md5sum > $workdir/$project/md5sum_deployed - diff $workdir/$project/md5sum_downloaded $workdir/$project/md5sum_deployed && exit 99 - md5sum $downloaddir/$downloadfilename > $archivedir/$project/md5sum -fi diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_filesfromlist.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_filesfromlist.sh deleted file mode 100644 index 2f5eea1794..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_filesfromlist.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -# get_filesfromlist.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script is used to retrieve the files present in a text file list." - echo "It has 1 required argument:" - echo "First argument (\$1 - required) is the base url (in URI format) from where to retrieve the files defined in the list" - echo "The list file is defined as \$downloadedfile , these variables are gathered from the Puppi runtime" - echo " config file." - echo - echo "Examples: " - echo "get_filesfromlist.sh http://svn.example42.com/myproject" - echo "get_filesfromlist.sh file:///mount/wwwdata/myproject" - echo "get_filesfromlist.sh ssh://user@server/var/www/myproject" - echo "get_filesfromlist.sh svn://user:password@server/repo/myproject" -} - - -if [ $1 ] ; then - baseurl=$1 - type=$(echo $1 | cut -d':' -f1) -else - showhelp - exit 2 -fi - - -# Download files -downloadfiles () { - - cd $predeploydir - - for file in $(cat $downloadedfile | grep -v "^#" | grep -v "^$" ) ; do - filepath=$file - filedir=$(dirname $filepath) - mkdir -p $filedir - check_retcode - - case $type in - ssh|scp) - scp "$baseurl:$filepath" $filepath - check_retcode - ;; - http|https|file) - curl -s -f "$baseurl/$filepath" -o $filepath - check_retcode - ;; - svn) - svnuri=$(echo $baseurl/$filepath | cut -d'/' -f3-) - svnusername=$(echo $svnuri | cut -d':' -f1) - svnpassword=$(echo $svnuri | cut -d':' -f2 | cut -d'@' -f1) - svnserver=$(echo $svnuri | cut -d'@' -f2 | cut -d'/' -f1) - svnpath=/$(echo $svnuri | cut -d'@' -f2 | cut -d'/' -f2-) - mkdir -p $(dirname $svnpath) - svn export --force --username="$svnusername" --password="$svnpassword" http://$svnserver/$svnpath $(dirname $svnpath) - check_retcode - ;; - esac - - done -} - -downloadfiles diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_maven_files.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_maven_files.sh deleted file mode 100644 index 43e5647561..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_maven_files.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/bash -# get_maven_files.sh - Made for Puppi -# This script retrieves the files to deploy from a Maven repository. -# It uses variables defined in the general and project runtime configuration files. -# It uses curl to retrieve files so the $1 argument (base url of the maven repository) -# has to be in curl friendly format -# It has the following options: -# -u - in case of type http, specify a http_user for curl -# -p - in case of type http, specifiy http_user for curl - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -while [ $# -gt 0 ]; do - case "$1" in - -u) - http_user=$2 - shift 2 ;; - -p) - http_password=$2 - shift 2 ;; - *) - url=$1 - ftype=$2 - shift 2 ;; - esac -done - -# Obtain the value of the variable with name passed as second argument -# If no one is given, we take all the files in storedir - -#echo "Download and deploy $2 ? (Y/n)" -#read press -#case $press in -# Y|y) true ;; -# N|n) save_runtime_config "predeploydir_$2=" ; exit 0 -#esac - -if [ $debug ] ; then - tarcommand="tar -xvf" -else - tarcommand="tar -xf" -fi - -if [ $debug ] ; then - zipcommand="unzip" -else - zipcommand="unzip -q" -fi - -cd $storedir - -if [ -z "$http_password" ] ; then - authparam="" -else - authparam="--anyauth --user $http_user:$http_password" -fi - -case $ftype in - warfile) - curl -s -f $authparam "$url/$version/$warfile" -O - check_retcode - cp -a $warfile $predeploydir/$artifact.war - save_runtime_config "deploy_warpath=$deploy_root/$artifact.war" - ;; - jarfile) - curl -s -f $authparam "$url/$version/$jarfile" -O - check_retcode - cp -a $jarfile $predeploydir/$artifact.jar - save_runtime_config "deploy_jarpath=$deploy_root/$artifact.jar" - ;; - configfile) - curl -s -f $authparam "$url/$version/$configfile" -O - check_retcode - mkdir $workdir/$project/deploy_configfile - cd $workdir/$project/deploy_configfile - $tarcommand $storedir/$configfile - check_retcode - save_runtime_config "predeploydir_configfile=$workdir/$project/deploy_configfile" - ;; - srcfile) - curl -s -f $authparam "$url/$version/$srcfile" -O - check_retcode - mkdir $workdir/$project/deploy_srcfile - cd $workdir/$project/deploy_srcfile - $tarcommand $storedir/$srcfile - check_retcode - save_runtime_config "predeploydir_srcfile=$workdir/$project/deploy_srcfile" - ;; - zipfile) - curl -s -f $authparam "$url/$version/$zipfile" -O - check_retcode - mkdir $workdir/$project/deploy_zipfile - cd $workdir/$project/deploy_zipfile - $zipcommand $storedir/$zipfile - check_retcode - save_runtime_config "predeploydir_zipfile=$workdir/$project/deploy_zipfile" - ;; -esac diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_metadata.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_metadata.sh deleted file mode 100644 index 79dc97ca38..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/get_metadata.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/bash -# get_metadata.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script retrieves some metadata from the downwloaded files " - echo "The metadatasource is automatically detected from the \$source_type runtime config" - echo - echo "It has some, not required, options:" - echo "-m - The string to use as *fix in custom metadata info provided " - echo "-mc - The string to use as qualifier for Maven metadata config tars" - echo "-mj - The string to use as qualifier for Maven metadata jars" - echo "-mw - The string to use as qualifier for Maven metadata wars" - echo "-mz - The string to use as qualifier for Maven metadata zips" - echo "-at - The type to obtain the artifact, should be \"release\", " - echo " \"latest\", \"snapshot\" or a specific version (e.g. \"2.5.0\")" -} - -while [ $# -gt 0 ]; do - case "$1" in - -m) - suffix=$2 - shift 2 ;; - -mc) - config_suffix=$2 - shift 2 ;; - -mj) - jar_suffix=$2 - shift 2 ;; - -mw) - war_suffix=$2 - shift 2 ;; - -mz) - zip_suffix=$2 - shift 2 ;; - -at) - artifact_type=$2 - shift 2 ;; - -h) - showhelp ;; - esac -done - -# validating input -# see http://docs.codehaus.org/display/MAVEN/Repository+Metadata for specs -case $artifact_type in - release) - ;; - latest) - ;; - snapshot) - ;; - *) - # defaulting to version - version=$artifact_type - ;; -esac - -case $source_type in - list) - if [ -z $suffix ] ; then - suffix="####" - fi - # TODO Make this more secure, for God's sake! - for param in $(cat $downloadedfile | grep "^$suffix" ) ; do - save_runtime_comment $param - done - ;; - tarball) - ;; - maven) - [ ${#version} -eq 0 ] && version=$(xml_parse $artifact_type $downloadedfile ) - artifact=$(xml_parse artifactId $downloadedfile ) - - # Definition of qualifiers for Maven has changed from the (wrong) assumption - # of having cfg-$suffix and src-$suffix for staticfiles and config tarballs - # to a more flexible management of qualifiers names with two different params (-m and -mc) - # The "suffixnotset" string is passed by default by the Puppi maven define - # YES, it's crap. - if [[ x$suffix != "xsuffixnotset" ]] ; then - srcfile=$artifact-$version-$suffix.tar - else - srcfile=$artifact-$version.tar - fi - - if [[ x$config_suffix != "xsuffixnotset" ]] ; then - configfile=$artifact-$version-$config_suffix.tar - else - configfile=$artifact-$version.tar - fi - - if [[ x$jar_suffix != "xsuffixnotset" ]] ; then - jarfile=$artifact-$version-$jar_suffix.jar - else - jarfile=$artifact-$version.jar - fi - - if [[ x$war_suffix != "xsuffixnotset" ]] ; then - warfile=$artifact-$version-$war_suffix.war - else - warfile=$artifact-$version.war - fi - - if [[ x$zip_suffix != "xsuffixnotset" ]] ; then - zipfile=$artifact-$version-$zip_suffix.zip - else - zipfile=$artifact-$version.zip - fi - - # Store metadata - save_runtime_config "version=$version" - save_runtime_config "artifact=$artifact" - # Store filenames - save_runtime_config "zipfile=$zipfile" - save_runtime_config "warfile=$warfile" - save_runtime_config "jarfile=$jarfile" - save_runtime_config "srcfile=$srcfile" - save_runtime_config "configfile=$configfile" - ;; -esac - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/git.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/git.sh deleted file mode 100644 index 08b8c338a4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/git.sh +++ /dev/null @@ -1,176 +0,0 @@ -#!/bin/bash -# git.sh - Made for Puppi - -# All variables are exported -set -a - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script performs the git operations required by puppi::project::git" - echo "It integrates and uses variables provided by other core Puppi scripts" - echo "It has the following options:" - echo "-a (Optional) What action to perform. Available options: deploy (default), rollback" - echo "-s (Required) Git source repo to use" - echo "-d (Required) Directory where files are deployed" - echo "-u (Optional) User that performs the deploy operations. Default root" - echo "-gs (Optional) If only a specific subdir of the gitrepo has to be copied to the install destination" - echo "-t (Optional) Tag to deploy" - echo "-b (Optional) Branch to deploy" - echo "-c (Optional) Commit to deploy" - echo "-v (Optional) If verbose" - echo "-k (Optional) If .git dir is kept on deploy_root" - echo - echo "Examples:" - echo "git.sh -a deploy -s $source -d $deploy_root -u $user -gs $git_subdir -t $tag -b $branch -c $commit -v $bool_verbose -k $bool_keep_gitdata" -} - -verbose="true" - -# Check Arguments -while [ $# -gt 0 ]; do - case "$1" in - -a) - case $2 in - rollback) - action="rollback" - ;; - *) - action="install" - ;; - esac - shift 2 ;; - -s) - if [ $source ] ; then - source=$source - else - source=$2 - fi - shift 2 ;; - -d) - if [ $deploy_root ] ; then - deploy_root=$deploy_root - else - deploy_root=$2 - fi - shift 2 ;; - -u) - if [ $user ] ; then - deploy_user=$user - else - deploy_user=$2 - fi - shift 2 ;; - -gs) - if [ $git_subdir ] ; then - git_subdir=$git_subdir - else - git_subdir=$2 - fi - shift 2 ;; - -t) - if [ $git_tag ] ; then - git_tag=$git_tag - else - git_tag=$2 - fi - shift 2 ;; - -b) - if [ $branch ] ; then - branch=$branch - else - branch=$2 - fi - shift 2 ;; - -c) - if [ $commit ] ; then - commit=$commit - else - commit=$2 - fi - shift 2 ;; - -v) - if [ $verbose ] ; then - verbose=$verbose - else - verbose=$2 - fi - shift 2 ;; - -k) - if [ $keep_gitdata ] ; then - keep_gitdata=$keep_gitdata - else - keep_gitdata=$2 - fi - shift 2 ;; - *) - showhelp - exit ;; - esac -done - -if [ "x$verbose" == "xtrue" ] ; then - verbosity="" -else - verbosity="--quiet" -fi - -cd / - -gitsubdir="" -gitdir=$deploy_root -if [ "x$keep_gitdata" != "xtrue" ] ; then - if [ ! -d $archivedir/$project-git ] ; then - mkdir $archivedir/$project-git - chown -R $deploy_user:$deploy_user $archivedir/$project-git - fi - gitdir=$archivedir/$project-git/gitrepo -fi -if [ "x$git_subdir" != "xundefined" ] ; then - if [ ! -d $archivedir/$project-git ] ; then - mkdir $archivedir/$project-git - chown -R $deploy_user:$deploy_user $archivedir/$project-git - fi - gitdir=$archivedir/$project-git - gitsubdir="$git_subdir/" -fi - -do_install () { - if [ -d $gitdir/.git ] ; then - cd $gitdir - git pull $verbosity origin $branch - git checkout $verbosity $branch - if [ "x$?" != "x0" ] ; then - git checkout -b $verbosity $branch - fi - else - git clone $verbosity --branch $branch --recursive $source $gitdir - cd $gitdir - fi - - if [ "x$git_tag" != "xundefined" ] ; then - git checkout $verbosity $git_tag - fi - - if [ "x$commit" != "xundefined" ] ; then - git checkout $verbosity $commit - fi - - if [ "x$gitdir" == "x$archivedir/$project-git" ] ; then - rsync -a --exclude=".git" $gitdir/$gitsubdir $deploy_root/ - fi - -} - -do_rollback () { - - echo "Rollback not yet supported" -} - -# Action! -case "$action" in - install) export -f do_install ; su $deploy_user -c do_install ;; - rollback) do_rollback ;; -esac diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/header b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/header deleted file mode 100644 index 9b04824109..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/header +++ /dev/null @@ -1,25 +0,0 @@ -configfile="/etc/puppi/puppi.conf" - -# Load general configurations -if [ ! -f $configfile ] ; then - echo "Config file: $configfile not found" - exit 2 -else - . $configfile - . $scriptsdir/functions -fi - -# Load project runtime configuration -projectconfigfile="$workdir/$project/config" -if [ ! -f $projectconfigfile ] ; then - echo "Project runtime config file: $projectconfigfile not found" - exit 2 -else - . $projectconfigfile -fi - -# Activate debug -case "$debug" in - yes) set -x ;; - full) set -xv ;; -esac diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/predeploy.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/predeploy.sh deleted file mode 100644 index 0af50314ff..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/predeploy.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/bash -# predeploy.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script prepares the contents of the predeploy directory" - echo "It integrates and uses variables provided by other core Puppi scripts" - echo "It has the following options:" - echo "-v (optional) Name of the variable that identifies the file to untar/unzip" - echo " By default is used $downloadedfile" - echo "-t (optional) The type of file that is retrieved: zip|tarball" - echo " By default is used $source_type " - echo "-m (optional) The prefix (directory) you may not want to put in the deploy" - echo " Use this if the zip or tar contain a base dir (as often) and you want to copy" - echo " to the deploy dir only its contents and not the whole directory" - echo - echo "Examples:" - echo "predeploy.sh " - echo "predeploy.sh -t zip" - echo "predeploy.sh -t zip -v myz" -} - - -# Check Arguments -while [ $# -gt 0 ]; do - case "$1" in - -v) - downloadedfile="$(eval "echo \${$(echo ${2})}")" - shift 2 ;; - -t) - source_type=$2 - shift 2 ;; - -m) - predeploy_dirprefix=$2 - shift 2 ;; - esac -done - - - -predeploy () { - cd $predeploydir - case "$source_type" in - tarball) - case "$debug" in - yes|full) - tar -zxvf $downloadedfile - check_retcode - ;; - *) - tar -zxf $downloadedfile - check_retcode - ;; - esac - ;; - zip) - case "$debug" in - yes|full) - unzip $downloadedfile - check_retcode - ;; - *) - unzip -qq $downloadedfile - check_retcode - ;; - esac - ;; - gz) - case "$debug" in - yes|full) - gzip -d $downloadedfile - check_retcode - ;; - *) - gzip -d -q $downloadedfile - check_retcode - ;; - esac - ;; - war) - cp $downloadedfile . - check_retcode - ;; - esac -} - -predeploy - -# Updates predeploydir if a directory prefix exists -if [[ x$predeploy_dirprefix != "x" ]] ; then - save_runtime_config "predeploydir=$predeploydir/$predeploy_dirprefix" -fi diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/predeploy_tar.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/predeploy_tar.sh deleted file mode 100644 index 91d28a6b4a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/predeploy_tar.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# predeploy_tar.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script unpacks (tar) file from the download dir (storedir) to the predeploydir" - echo "It has the following options:" - echo "\$1 (Required) - Name of the variable that identifies the tar to predeploy" - echo - echo "Examples:" - echo "predeploy_tar.sh tarfile" -} - -# Check Arguments -if [ $1 ] ; then - deployfilevar=$1 - deployfile="$(eval "echo \${$(echo ${deployfilevar})}")" -else - showhelp - exit 2 -fi - -# Untar file -untar () { - cd $predeploydir -# file $deployfile | grep gzip 2>&1>/dev/null -# if [ $? == "0"] ; then - tar -zxf $deployfile -# else -# tar -xvf $deployfile -# fi -} - -untar diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/report_mail.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/report_mail.sh deleted file mode 100644 index 749462e9f9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/report_mail.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# report_mail.sh - Made for Puppi -# This script sends a summary mail to the recipients defined in $1 -# Use a comma separated list for multiple emails - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Check arguments & eventually apply runtimeconfig overwrite -recipients=$1 -[ $report_email ] && recipients=$report_email - -# Main functions -mail_send () { - result=$(grep result $logdir/$project/$tag/summary | awk '{ print $NF }') - cat $logdir/$project/$tag/summary | mail -s "[puppi] $result $action of $project on $(hostname)" $recipients -} - -mail_send - -if [ "$EXITCRIT" = "1" ] ; then - exit 2 -fi - -if [ "$EXITWARN" = "1" ] ; then - exit 1 -fi diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/report_mongo.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/report_mongo.sh deleted file mode 100644 index c68ed7d043..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/report_mongo.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/bash - -# report_mongodb.sh - Made for Puppi -# e.g. somemongohost/dbname - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - - -# Show help -showhelp () { - echo "This script reports deployments to a mongo DB." - echo "It has the following options:" - echo "-e - Facter key to identify server environment (default: env)." - echo "If no facter key can be found, the fallback is ''environment''." - echo - echo "Examples:" - echo "deploy_files.sh mongodb://someuser:hispassword@somehost/somedb" - echo "deploy_files.sh -e env mongodb://someuser:hispassword@somehost/somedb" -} - - -env_key="env" -fallback_key="environment" - -while [ $# -gt 0 ]; do - case "$1" in - -e) - env_key=$2 - echo "env_key" - shift 2 ;; - *) - mongourl=$1 - shift 1 - ;; - esac -done - -if [ "$EXITCRIT" = "1" ] ; then - proposed_exit=2 -fi - -if [ "$EXITWARN" = "1" ] ; then - proposed_exit=1 -fi - -# check prerequisites -mongo -version > /dev/null -if [ $? -ne 0 ]; then - echo "mongo-client is not installed, aborting" - exit $proposed_exit -fi - -fqdn=$(facter fqdn) - -environment=$(facter ${env_key} -p) - -if [ -z "${environment} ] -then - environment=$(facter ${fallback_key} -p) -fi - - -# something like mongodb://someuser:hispassword@somehost/somedb - - -if [[ ! $mongourl =~ "mongodb://" ]]; then - echo "WARNING: mongourl invalid! Please use a valid monurl!" - showhelp - exit $proposed_exit -fi - -if [[ $mongourl =~ @ ]]; then - # ok we have to deal with passwords - # you HAVE to provide a password if you provide a user - mongodb=`echo $mongourl | sed 's/.*@//'` - mongouser=`echo $mongourl | sed 's/mongodb:\/\///' | sed 's/:.*//' ` - mongopassword=`echo $mongourl | sed 's/mongodb:\/\///' | sed 's/[^:]*://' | sed 's/@.*//' ` - mongoarguments="--username $mongouser --password $mongopassword" -else - mongodb=`echo $mongourl | sed 's/mongodb:\/\///'` -fi - -result=$(grep result $logdir/$project/$tag/summary | awk '{ print $NF }') -summary=$(cat $logdir/$project/$tag/summary) - -mcmd="db.deployments.insert({ts:new Date(),result:\"${result}\",fqdn:\"${fqdn}\",project:\"${project}\",source:\"${source}\",tag:\"${tag}\",version:\"${version}\",artifact:\"${artifact}\",testmode:\"${testmode}\",warfile:\"${warfile}\",environment:\"${environment}\"}); quit(0)" - - -mongo $mongoarguments $mongodb --eval "$mcmd" - -# Now do a reporting to enable "most-recent-versions on all servers" - -read -r -d '' mcmd <<'EOF' -var map = function() { - project=this.project ; - emit( this.fqdn +":"+ this.project, {project:this.project, fqdn:this.fqdn, ts:this.ts,version:this.version,environment:this.environment} ); -}; -var reduce = function(k,vals) { - result = vals[0]; - vals.forEach(function(val) { if (val.ts > result.ts) result=val } ) ; - return result; -}; -db.deployments.mapReduce( - map, - reduce, - {out:{replace:"versions"}}) -EOF - -mongo $mongoarguments $mongodb --eval "$mcmd" - -exit $proposed_exit diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/service.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/service.sh deleted file mode 100644 index 1105d25d6c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/service.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# service.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script is used to manage one or more services" - echo "It requires AT LEAST 2 arguments:" - echo "First argument (\$1 - required) is the script command (stop|start|restart|reload)" - echo "Second argument and following (\$2 - required) is the space separated list of sevices to manage" - echo - echo "Examples:" - echo "service.sh stop monit puppet" -} - -# Check arguments -if [ $1 ] ; then - servicecommand=$1 -else - showhelp - exit 2 -fi - - -if [ $# -ge 2 ] ; then - shift - services=$@ -else - showhelp - exit 2 -fi - -# Manage service -service () { - for serv in $services ; do - /etc/init.d/$serv $servicecommand - done -} - -service diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/svn.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/svn.sh deleted file mode 100644 index a2dd4bcf73..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/svn.sh +++ /dev/null @@ -1,215 +0,0 @@ -#!/bin/bash -# svn.sh - Made for Puppi - -# All variables are exported -set -a - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script performs the svn operations required by puppi::project::svn" - echo "It integrates and uses variables provided by other core Puppi scripts" - echo "It has the following options:" - echo "-a (Optional) What action to perform. Available options: deploy (default), rollback" - echo "-s (Required) Subversion source repo to use" - echo "-d (Required) Directory where files are deployed" - echo "-u (Optional) User that performs the deploy operations. Default root" - echo "-su (Optional) Username for access to private svn repo" - echo "-sp (Optional) Password for access to private svn repo" - echo "-gs (Optional) If only a specific subdir of the svnrepo has to be copied to the install destination" - echo "-t (Optional) Tag to deploy" - echo "-b (Optional) Branch to deploy" - echo "-c (Optional) Commit to deploy" - echo "-v (Optional) If verbose" - echo "-k (Optional) If .svn dir is kept on deploy_root" - echo "-e (Optional) If use export instead of checkout for svn operations" - echo - echo "Examples:" - echo "svn.sh -a deploy -s $source -d $deploy_root -u $user -gs $svn_subdir -t $tag -b $branch -c $commit -v $bool_verbose -k $bool_keep_svndata" -} - -verbose="true" - -# Check Arguments -while [ $# -gt 0 ]; do - case "$1" in - -a) - case $2 in - rollback) - action="rollback" - ;; - *) - action="install" - ;; - esac - shift 2 ;; - -s) - if [ $source ] ; then - source=$source - else - source=$2 - fi - shift 2 ;; - -d) - if [ $deploy_root ] ; then - deploy_root=$deploy_root - else - deploy_root=$2 - fi - shift 2 ;; - -u) - if [ $user ] ; then - deploy_user=$user - else - deploy_user=$2 - fi - shift 2 ;; - -gs) - if [ $svn_subdir ] ; then - svn_subdir=$svn_subdir - else - svn_subdir=$2 - fi - shift 2 ;; - -su) - if [ $svn_user ] ; then - svn_user=$svn_user - else - svn_user=$2 - fi - shift 2 ;; - -sp) - if [ $svn_password ] ; then - svn_password=$svn_password - else - svn_password=$2 - fi - shift 2 ;; - -t) - if [ $svn_tag ] ; then - svn_tag=$svn_tag - else - svn_tag=$2 - fi - shift 2 ;; - -b) - if [ $branch ] ; then - branch=$branch - else - branch=$2 - fi - shift 2 ;; - -c) - if [ $commit ] ; then - commit=$commit - else - commit=$2 - fi - shift 2 ;; - -v) - if [ $verbose ] ; then - verbose=$verbose - else - verbose=$2 - fi - shift 2 ;; - -k) - if [ $keep_svndata ] ; then - keep_svndata=$keep_svndata - else - keep_svndata=$2 - fi - shift 2 ;; - -e) - if [ $svn_export ] ; then - svn_export=$svn_export - else - svn_export=$2 - fi - shift 2 ;; - *) - showhelp - exit ;; - esac -done - -if [ "x$verbose" == "xtrue" ] ; then - verbosity="" -else - verbosity="--quiet" -fi - -cd / - -if [ "x$branch" == "xundefined" ] ; then - branch="trunk" -fi - -real_source="$source/$branch" - -if [ "x$svn_tag" != "xundefined" ] ; then - real_source="$source/$svn_tag" -fi - -if [ "x$svn_user" != "xundefined" ] && [ "x$svn_password" != "xundefined" ] ; then - svn_auth="--username=$svn_user --password=$svn_password" -else - svn_auth="" -fi - -svnsubdir="" -svndir=$deploy_root - - -do_install () { - if [ "x$keep_svndata" != "xtrue" ] ; then - if [ ! -d $archivedir/$project-svn ] ; then - mkdir $archivedir/$project-svn - chown -R $user:$user $archivedir/$project-svn - fi - svndir=$archivedir/$project-svn/svnrepo - fi - if [ "x$svn_subdir" != "xundefined" ] ; then - if [ ! -d $archivedir/$project-svn ] ; then - mkdir $archivedir/$project-svn - chown -R $user:$user $archivedir/$project-svn - fi - svndir=$archivedir/$project-svn - svnsubdir="$svn_subdir/" - fi - - if [ -d $svndir/.svn ] ; then - cd $svndir - svn up $verbosity $svn_auth --non-interactive - else - svn co $verbosity $real_source $svndir $svn_auth --non-interactive - cd $svndir - fi - - if [ "x$svndir" == "x$archivedir/$project-svn" ] ; then - rsync -a --exclude=".svn" $svndir/$svnsubdir $deploy_root/ - fi -} - -do_export () { - svn export $verbosity $svn_auth --force --non-interactive $real_source/$svn_subdir $deploy_root -} - -do_rollback () { - echo "Rollback not yet supported" -} - -# Action! -case "$action" in - install) - if [ "x$svn_export" == "xtrue" ] ; then - export -f do_export ; su $user -c do_export - else - export -f do_install ; su $user -c do_install - fi - ;; - rollback) do_rollback ;; -esac - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/wait.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/wait.sh deleted file mode 100644 index 4e2fe6152d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/wait.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash -# wait.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script is used to introduce pauses during the deploy workflow" - echo - echo "It has the following options:" - echo "-s - The number of seconds to wait" - echo "-p - Wait until filename is present" - echo "-a - Wait until filename is absent" - echo "-f - Wait until is found the pattern in the filename" -} - -while [ $# -gt 0 ]; do - case "$1" in - -s) - sleep $2 - exit 0 - ;; - -p) - while true - do - [ -e $2 ] && break - sleep 1 - done - exit 0 - ;; - -a) - while true - do - [ ! -e $2 ] && break - sleep 1 - done - exit 0 - ;; - -f) - while true - do - grep $2 $3 && break - sleep 1 - done - exit 0 - ;; - *) - showhelp - exit - ;; - esac -done - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/yant.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/yant.sh deleted file mode 100644 index f9934619ea..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/yant.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# yant.sh - Made for Puppi -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script is used to call ant in a hybris-system" - echo "It requires AT LEAST 2 arguments:" - echo "First the \${hybris_parent_dir} where it can find a hybris-directory" - echo "Second argument: Everything you want to pass through to ant" - echo "The script assumes that hybris is located in \${hybris_parent_dir}/hybris" - echo - echo "Examples:" - echo "yant.sh /home/hybris clean all" -} - -# Unfortunately, showhelp will never be called - -cd $1/hybris/bin/platform -. ./setantenv.sh - -# somehow dirty ... -shift - -if [ -d /opt/hybris/config ]; then - template="" -else - template=-Dinput.template=develop -fi - -if [ $debug ] ; then - ant -Dinput.template=develop $* -else - ant $* > /dev/null -fi - -handle_result diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/yum.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/yum.sh deleted file mode 100644 index f649bad93c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/files/scripts/yum.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/bash -# yum.sh - Made for Puppi - -# Sources common header for Puppi scripts -. $(dirname $0)/header || exit 10 - -# Show help -showhelp () { - echo "This script performs the yum operations required by puppi::project::yum" - echo "It integrates and uses variables provided by other core Puppi scripts" - echo "It has the following options:" - echo "-a (Optional) What action to perform. Available options: deploy (default), rollback, remove" - echo "-n (Required) Name of the package to handle" - echo "-v (Optional) The version of the rpm to manage. Default: latest" - echo "-r (Optional) The Instll root path. Default: /" - echo - echo "Examples:" - echo "yum.sh -a deploy -n ${rpm} -r ${install_root} -v ${rpm_version}" -} - -rpm_version="latest" -install_root="/" - -# Check Arguments -while [ $# -gt 0 ]; do - case "$1" in - -a) - case $2 in - rollback) - action="rollback" - ;; - remove) - action="remove" - ;; - *) - action="install" - ;; - esac - shift 2 ;; - -n) - rpm_name=$2 - shift 2 ;; - -v) - rpm_version=$2 - shift 2 ;; - -r) - install_root=$2 - shift 2 ;; - *) - showhelp - exit ;; - esac -done - - -do_install () { - if [ x$rpm_version == "xlatest" ] ; then - full_rpm_name=$rpm_name - else - full_rpm_name=$rpm_name-$rpm_version - fi - - # Archives version of the rpm to update - oldversion=$(rpm -q $rpm_name --qf "%{VERSION}-%{RELEASE}\n") - if [ "$?" = "0" ]; then - mkdir -p $archivedir/$project/$oldversion - if [ $archivedir/$project/latest ] ; then - rm -f $archivedir/$project/latest - fi - ln -sf $archivedir/$project/$oldversion $archivedir/$project/latest - fi - - if [ x$install_root != "x/" ] ; then - yum install -y -q --installroot=$install_root $full_rpm_name - else - yum install -y -q $full_rpm_name - fi -} - -do_rollback () { - yum downgrade -y -q $rpm_name-$rollbackversion -} - -do_remove () { - yum remove -y -q $rpm_name -} - -# Action! -case "$action" in - install) do_install ;; - rollback) do_rollback ;; - remove) do_remove ;; -esac diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/facter/last_run.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/facter/last_run.rb deleted file mode 100644 index 19869842d9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/facter/last_run.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'facter' -Facter.add("last_run") do - confine :kernel => [ 'Linux' , 'SunOS' , 'FreeBSD' , 'Darwin' ] - setcode do - Facter::Util::Resolution.exec('date') - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/facter/puppi_projects.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/facter/puppi_projects.rb deleted file mode 100755 index ccd3e3f22b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/facter/puppi_projects.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'facter' -Facter.add("puppi_projects") do - confine :kernel => [ 'Linux' , 'SunOS' , 'FreeBSD' , 'Darwin' ] - setcode do - Facter::Util::Resolution.exec('ls `grep projectsdir /etc/puppi/puppi.conf | sed \'s/projectsdir="\([^"]*\)"/\1/\'` | tr \'\n\' \',\' | sed \'s/,$//\'') if File.exists?("/etc/puppi/puppi.conf") - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/facter/windows_common_appdata.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/facter/windows_common_appdata.rb deleted file mode 100644 index 7a7ca23265..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/facter/windows_common_appdata.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'facter' -Facter.add(:windows_common_appdata) do - confine :operatingsystem => :windows - if Facter.value(:osfamily) == "windows" - require 'win32/dir' - end - setcode do - Dir::COMMON_APPDATA - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/any2bool.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/any2bool.rb deleted file mode 100644 index a2652cbae2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/any2bool.rb +++ /dev/null @@ -1,44 +0,0 @@ -# -# any2bool.rb -# -# This define is heavily based on PuppetLabs' stdlib str2bool -# -module Puppet::Parser::Functions - newfunction(:any2bool, :type => :rvalue, :doc => <<-EOS -This converts any input to a boolean. This attempt to convert strings that -contain things like: y, 1, t, true to 'true' and strings that contain things -like: 0, f, n, false, no to 'false'. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "any2bool(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - string = arguments[0] - -# unless string.is_a?(String) -# raise(Puppet::ParseError, 'str2bool(): Requires either ' + -# 'string to work with') -# end - - # We consider all the yes, no, y, n and so on too ... - result = case string - # - # This is how undef looks like in Puppet ... - # We yield false in this case. - # - when false then false - when true then true - when /^$/, '' then false # Empty string will be false ... - when /^(1|t|y|true|yes)$/ then true - when /^(0|f|n|false|no)$/ then false - when /^(undef|undefined)$/ then false # This is not likely to happen ... - else - raise(Puppet::ParseError, 'any2bool(): Unknown type of boolean given') - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/bool2ensure.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/bool2ensure.rb deleted file mode 100644 index 0ebe275e19..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/bool2ensure.rb +++ /dev/null @@ -1,32 +0,0 @@ -# -# bool2ensure.rb -# -# This define return present/absent accroding to the boolean value passed -# -module Puppet::Parser::Functions - newfunction(:bool2ensure, :type => :rvalue, :doc => <<-EOS -This converts any input similar to a boolean to the stringpresent or absent - EOS - ) do |arguments| - - raise(Puppet::ParseError, "bool2ensure(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - string = arguments[0] - - result = case string - when false then "absent" - when true then "present" - when /^$/, '' then "present" - when /^(1|t|y|true|yes)$/ then "present" - when /^(0|f|n|false|no)$/ then "absent" - when /^(undef|undefined)$/ then "present" - else - raise(Puppet::ParseError, 'bool2ensure(): Unknown type of boolean given') - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_class_args.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_class_args.rb deleted file mode 100644 index 1aad859b3a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_class_args.rb +++ /dev/null @@ -1,32 +0,0 @@ -# This function is based on Ken Barber's get_scope_args -# It has been slightly changed and renamed to avoid naming clash - -module Puppet::Parser::Functions - newfunction(:get_class_args, :type => :rvalue, :doc => <<-EOS -This function will return all arguments passed to the current scope. This could -be a class or defined resource. - EOS - ) do |arguments| - - if (arguments.size != 0) then - raise(Puppet::ParseError, "validate_resource(): Wrong number of arguments "+ - "given #{arguments.size} for 0") - end - - # Grab the current scope, turn it to a hash but do not be recursive - # about it. - classhash = to_hash(recursive=false) - - # Strip bits that do not matter for validation -# classhash.delete("name") -# classhash.delete("title") -# classhash.delete("caller_module_name") -# classhash.delete("module_name") - - # Return munged classhash - classhash - end -end - -# vim: set ts=2 sw=2 et : - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_magicvar.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_magicvar.rb deleted file mode 100644 index 65a03560b5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_magicvar.rb +++ /dev/null @@ -1,23 +0,0 @@ -# -# get_magicvar.rb -# -# This define return the value of the the provided var name -# -module Puppet::Parser::Functions - newfunction(:get_magicvar, :type => :rvalue, :doc => <<-EOS -This returns the value of the input variable. For example if you input role -it returns the value of $role'. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "get_magicvar(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - my_var = arguments[0] - result = lookupvar("#{my_var}") - result = 'all' if ( result == :undefined || result == '' ) - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_module_path.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_module_path.rb deleted file mode 100644 index 1421b91f52..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/get_module_path.rb +++ /dev/null @@ -1,17 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:get_module_path, :type =>:rvalue, :doc => <<-EOT - Returns the absolute path of the specified module for the current - environment. - - Example: - $module_path = get_module_path('stdlib') - EOT - ) do |args| - raise(Puppet::ParseError, "get_module_path(): Wrong number of arguments, expects one") unless args.size == 1 - if module_path = Puppet::Module.find(args[0], compiler.environment.to_s) - module_path.path - else - raise(Puppet::ParseError, "Could not find module #{args[0]} in environment #{compiler.environment}") - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/nslookup.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/nslookup.rb deleted file mode 100644 index 33a2f8e7d7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/nslookup.rb +++ /dev/null @@ -1,44 +0,0 @@ -# -# nslookup.rb -# -# This fuction looks up the ip address of a hostname. -# -# Params: -# * Hostname: (string) The hostname to lookup -# * Type: (string) The DNS type to lookup. Optional. Default: 'AAAA' -# -# Returns: an array with the ip addresses that belong to this hostname -# -# Dolf Schimmel - Freeaqingme -# -module Puppet::Parser::Functions - newfunction(:nslookup, :type => :rvalue, :doc => <<-EOS -Lookup a hostname and return its ip addresses - EOS - ) do |vals| - hostname, type = vals - raise(ArgumentError, 'Must specify a hostname') unless hostname - type = 'AAAA' unless type - - require 'ipaddr' - - if (ip = IPAddr.new(hostname) rescue nil) - if (ip.ipv6? and type == 'AAAA') or (ip.ipv4? and type != 'AAAA') - return hostname - else - return [] - end - end - - typeConst = Resolv::DNS::Resource::IN.const_get "#{type.upcase}" - out = [] - - Resolv::DNS.open do |dns| - dns.getresources(hostname, typeConst).collect {|r| - out << IPAddr::new_ntoh(r.address.address).to_s - } - end - - return out - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/options_lookup.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/options_lookup.rb deleted file mode 100644 index 2acf87ca48..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/options_lookup.rb +++ /dev/null @@ -1,56 +0,0 @@ -# -# options_lookup.rb -# -# This fuction takes two arguments (option, and default value) and looks for the given -# option key in the calling modules options hash, and returns the value. -# The function is intended to be used in templates. -# If no option is found in the options hash, default value (second argument), is returned. -# -# Example usages: -# -# Default value of no -# <%= scope.function_options_lookup(['PasswordAuthentication', 'no']) %> -# Empty default value -# <%= scope.function_options_lookup(['PasswordAuthentication', '']) %> -# Fact or param based default value -# <%= scope.function_options_lookup(['Listen', ipaddress]) %> -# Lookup inside a custom hash - in this case client_options -# <%= scope.function_options_lookup(['PasswordAuthentication', 'no', 'client_options']) %> -# -# -# Michal Nowak -# -module Puppet::Parser::Functions - newfunction(:options_lookup, :type => :rvalue, :doc => <<-EOS -This fuction takes two arguments (option, and default value) and looks for the given -option key in the calling modules options hash, and returns the value. -The function is intended to be used in templates. -If no option is found in the options hash, default value (second argument), is returned. - -Default value of no - <%= scope.function_options_lookup(['PasswordAuthentication', 'no']) %> -Empty default value - <%= scope.function_options_lookup(['PasswordAuthentication', '']) %> -Fact or param based default value - <%= scope.function_options_lookup(['Listen', ipaddress]) %> -Lookup inside a custom hash - in this case client_options - <%= scope.function_options_lookup(['PasswordAuthentication', 'no', 'client_options']) %> - -EOS - ) do |args| - - raise ArgumentError, ("options_lookup(): wrong number of arguments (#{args.length}; must be 2 or 3)") if (args.length != 2 and args.length != 3) - - value = '' - option_name = args[0] - default_val = args[1] - hash_name = args[2] - module_name = parent_module_name - - hash_name = "options" if (hash_name == :undefined || hash_name == '' || hash_name == nil) - value = lookupvar("#{module_name}::#{hash_name}")["#{option_name}"] if (lookupvar("#{module_name}::#{hash_name}").size > 0) - value = "#{default_val}" if (value == :undefined || value == '' || value == nil) - - return value - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/params_lookup.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/params_lookup.rb deleted file mode 100644 index 53aad84d76..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/params_lookup.rb +++ /dev/null @@ -1,77 +0,0 @@ -# -# params_lookup.rb -# -# This function lookups for a variable value in various locations -# following this order (first match is returned) -# - Hiera backend (if present) for modulename_varname -# - Hiera backend (if present) for varname (if second argument is 'global') -# - Top Scope Variable ::modulename_varname -# - Top Scope Variable ::varname (if second argument is 'global') -# - Module default: ::modulename::params::varname -# -# It's based on a suggestion of Dan Bode on how to better manage -# Example42 NextGen modules params lookups. -# Major help has been given by Brice Figureau, Peter Meier -# and Ohad Levy during the Fosdem 2012 days (thanks guys) -# -# Tested and adapted to Puppet 2.6.x and later -# -# Alessandro Franceschi al@lab42.it -# -module Puppet::Parser::Functions - newfunction(:params_lookup, :type => :rvalue, :doc => <<-EOS -This fuction looks for the given variable name in a set of different sources: -- Hiera, if available ('modulename_varname') -- Hiera, if available (if second argument is 'global') -- ::modulename_varname -- ::varname (if second argument is 'global') -- ::modulename::params::varname -If no value is found in the defined sources, it returns an empty string ('') - EOS - ) do |arguments| - - raise(Puppet::ParseError, "params_lookup(): Define at least the variable name " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = '' - var_name = arguments[0] - module_name = parent_module_name - - # Hiera Lookup - if Puppet::Parser::Functions.function('hiera') - value = function_hiera(["#{module_name}_#{var_name}", '']) - return value if (not value.nil?) && (value != :undefined) && (value != '') - - value = function_hiera(["#{var_name}", '']) if arguments[1] == 'global' - return value if (not value.nil?) && (value != :undefined) && (value != '') - end - - # Top Scope Variable Lookup (::modulename_varname) - value = lookupvar("::#{module_name}_#{var_name}") - return value if (not value.nil?) && (value != :undefined) && (value != '') - - # Look up ::varname (only if second argument is 'global') - if arguments[1] == 'global' - value = lookupvar("::#{var_name}") - return value if (not value.nil?) && (value != :undefined) && (value != '') - end - - # needed for the next two lookups - classname = self.resource.name.downcase - loaded_classes = catalog.classes - - # self::params class lookup for default value - if loaded_classes.include?("#{classname}::params") - value = lookupvar("::#{classname}::params::#{var_name}") - return value if (not value.nil?) && (value != :undefined) && (value != '') - end - - # Params class lookup for default value - if loaded_classes.include?("#{module_name}::params") - value = lookupvar("::#{module_name}::params::#{var_name}") - return value if (not value.nil?) && (value != :undefined) && (value != '') - end - - return '' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/url_parse.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/url_parse.rb deleted file mode 100644 index 5af9953f50..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/lib/puppet/parser/functions/url_parse.rb +++ /dev/null @@ -1,44 +0,0 @@ -require 'uri' - -Puppet::Parser::Functions::newfunction(:url_parse, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| - Returns information about an url - - This function expects two arguments, an URL and the part of the url you want to retrieve. - - Example: - $source_filename = url_parse($source_url,path) - - Given an url like: https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0 - You obtain the following results according to the second argument: - scheme : https - userinfo : my_user:my_pass - user : my_user - password : my_pass - host : www.example.com - port : 8080 - path : /path/to/file.php - query : id=1&ret=0 - filename : file.php - filetype : php - filedir : file - - - ENDHEREDOC - raise ArgumentError, ("url_parse(): wrong number of arguments (#{args.length}; must be 2)") if args.length != 2 - url=URI.parse args[0] - case args[1] - when 'scheme' then url.scheme - when 'userinfo' then url.userinfo - when 'user' then url.user - when 'password' then url.password - when 'host' then url.host - when 'port' then url.port - when 'path' then url.path - when 'query' then url.query - when 'filename' then File.basename url.path - when 'filetype' then File.extname url.path - when 'filedir' then (File.basename url.path).chomp(File.extname(url.path)) - else url - end -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/check.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/check.pp deleted file mode 100644 index f652d09365..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/check.pp +++ /dev/null @@ -1,50 +0,0 @@ -# Define puppi::check -# -# This define creates a file with a check command that can be used locally. -# It uses Nagios plugins for all checks so that $command is just the -# plugin name with its arguments -# -# == Usage -# Basic Usage: -# puppi::check { "checkname": -# command => "check_tcp -H localhost -p 80" -# } -# -# :include:../README.check -# -define puppi::check ( - $command, - $base_dir = '', - $hostwide = 'no', - $priority = '50', - $project = 'default', - $enable = true ) { - - require puppi - require puppi::params - - $ensure = bool2ensure($enable) - $bool_hostwide = any2bool($hostwide) - - $real_base_dir = $base_dir ? { - '' => $puppi::params::checkpluginsdir, - default => $base_dir, - } - - $path = $bool_hostwide ? { - true => "${puppi::params::checksdir}/${priority}-${name}" , - false => "${puppi::params::projectsdir}/${project}/check/${priority}-${name}", - } - - file { "Puppi_check_${project}_${priority}_${name}": - ensure => $ensure, - path => $path, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => Class['puppi'], - content => "${real_base_dir}/${command}\n", - tag => 'puppi_check', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/configure.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/configure.pp deleted file mode 100644 index c827fd77f2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/configure.pp +++ /dev/null @@ -1,40 +0,0 @@ -# Define puppi::deploy -# -# This define creates a file with a deploy command that can be used locally. -# -# == Usage: -# puppi::configure { "Retrieve files": -# command => "get_file.sh", -# argument => "/remote/dir/file", -# priority => "10", -# user => "root", -# project => "spysite", -# } -# -# :include:../README.deploy -# -define puppi::configure ( - $command, - $project, - $arguments = '', - $priority = '50', - $user = 'root', - $enable = true ) { - - require puppi - require puppi::params - - $ensure = bool2ensure($enable) - - file { "${puppi::params::projectsdir}/${project}/configure/${priority}-${name}": - ensure => $ensure, - mode => '0750', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => Class['puppi'], - content => "su - ${user} -c \"export project=${project} && ${puppi::params::scriptsdir}/${command} ${arguments}\"\n", - tag => 'puppi_deploy', - } - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/dependencies.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/dependencies.pp deleted file mode 100644 index 828b86d783..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/dependencies.pp +++ /dev/null @@ -1,38 +0,0 @@ -# Class puppi::dependencies -# -# This class provides commands and tools needed for full Puppi -# functionality. Since you might already have these package -# resources in your modules, to avoid conflicts you may decide -# to include the needed packages somewhere else and avoid the -# direct inclusion of puppi::dependencies with the parameter: -# install_dependencies => false -# -class puppi::dependencies { - - require puppi::params - - if ! defined(Package['curl']) { - package { 'curl' : ensure => present } - } - - if ! defined(Package['wget']) { - package { 'wget' : ensure => present } - } - - if ! defined(Package['unzip']) { - package { 'unzip' : ensure => present } - } - - if ! defined(Package['rsync']) { - package { 'rsync' : ensure => present } - } - - if ! defined(Package[$puppi::params::package_nagiosplugins]) { - package { $puppi::params::package_nagiosplugins : ensure => present } - } - - if ! defined(Package[$puppi::params::package_mail]) { - package { $puppi::params::package_mail : ensure => present } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/deploy.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/deploy.pp deleted file mode 100644 index b2633ccecd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/deploy.pp +++ /dev/null @@ -1,40 +0,0 @@ -# Define puppi::deploy -# -# This define creates a file with a deploy command that can be used locally. -# -# == Usage: -# puppi::deploy { "Retrieve files": -# command => "get_file.sh", -# argument => "/remote/dir/file", -# priority => "10", -# user => "root", -# project => "spysite", -# } -# -# :include:../README.deploy -# -define puppi::deploy ( - $command, - $project, - $arguments = '', - $priority = '50', - $user = 'root', - $enable = true ) { - - require puppi - require puppi::params - - $ensure = bool2ensure($enable) - - file { "${puppi::params::projectsdir}/${project}/deploy/${priority}-${name}": - ensure => $ensure, - mode => '0750', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => Class['puppi'], - content => "su - ${user} -c \"export project=${project} && ${puppi::params::scriptsdir}/${command} ${arguments}\"\n", - tag => 'puppi_deploy', - } - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/extras.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/extras.pp deleted file mode 100644 index 5b81e97e29..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/extras.pp +++ /dev/null @@ -1,208 +0,0 @@ -# Class puppi::extras -# -# Default extras class with predefined puppi -# check, log , info content. -# You can provide a custom extra class to use instead of this -# with a parameter like: -# extra_class=> 'example42::puppi::extras', -# -class puppi::extras { - - # Default Checks - - puppi::check { 'NTP_Sync': - command => "check_ntp -H ${puppi::params::ntp}" , - priority => '99' , - hostwide => 'yes' , - } - - puppi::check { 'Disks_Usage': - command => 'check_disk -w 20% -c 10% -L -X tmpfs' , - priority => '10' , - hostwide => 'yes' , - } - - puppi::check { 'System_Load': - command => 'check_load -w 15,10,5 -c 30,25,20' , - priority => '10' , - hostwide => 'yes' , - } - - puppi::check { 'Zombie_Processes': - command => 'check_procs -w 5 -c 10 -s Z' , - priority => '10' , - hostwide => 'yes' , - } - - puppi::check { 'Local_Mail_Queue': - command => 'check_mailq -w 2 -c 5' , - priority => '10' , - hostwide => 'yes' , - } - - puppi::check { 'Connected_Users': - command => 'check_users -w 5 -c 10' , - priority => '10' , - hostwide => 'yes' , - } - - puppi::check { 'DNS_Resolution': - command => 'check_dns -H example.com' , - priority => '15' , - hostwide => 'yes' , - } - - - # Info Pages - $network_run = $::operatingsystem ? { - Solaris => [ 'ifconfig -a' , 'netstat -nr' , 'cat /etc/resolv.conf' , 'arp -an' , 'netstat -na' ], - default => [ 'ifconfig' , 'route -n' , 'cat /etc/resolv.conf' , 'arp -an' , 'netstat -natup | grep LISTEN' ], - } - - puppi::info { 'network': - description => 'Network settings and stats' , - run => $network_run, - } - - $users_run = $::operatingsystem ? { - Solaris => [ 'who' , 'last' ], - default => [ 'who' , 'last' , 'LANG=C lastlog | grep -v \'Never logged in\'' ], - } - - puppi::info { 'users': - description => 'Users and logins information' , - run => $users_run, - } - - $perf_run = $::operatingsystem ? { - Solaris => [ 'uptime' , 'vmstat 1 5' ], - default => [ 'uptime' , 'free' , 'vmstat 1 5' ], - } - - puppi::info { 'perf': - description => 'System performances and resources utilization' , - run => $perf_run, - } - - $disks_run = $::operatingsystem ? { - Solaris => [ 'df -h' , 'mount' ], - default => [ 'df -h' , 'mount' , 'blkid' , 'fdisk -l' ], - } - - puppi::info { 'disks': - description => 'Disks and filesystem information' , - run => $disks_run, - } - - $hardware_run = $::operatingsystem ? { - Solaris => [ 'find /devices/' ], - default => [ 'lspci' , 'cat /proc/cpuinfo' ], - } - - puppi::info { 'hardware': - description => 'Hardware information' , - run => $hardware_run, - } - - $packages_run = $::operatingsystem ? { - /(?i:RedHat|CentOS|Scientific|Amazon|Linux)/ => [ 'yum repolist' , 'rpm -qa' ] , - /(?i:Debian|Ubuntu|Mint)/ => [ 'apt-config dump' , 'apt-cache stats' , 'apt-key list' , 'dpkg -l' ], - /(Solaris)/ => [ 'pkginfo' ], - /(Archlinux)/ => [ 'pacman -Qet' ], - default => [ 'echo' ], - } - - puppi::info { 'packages': - description => 'Packages information' , - run => $packages_run, - } - - puppi::info::module { 'puppi': - configfile => ["${puppi::params::basedir}/puppi.conf"], - configdir => [$puppi::params::basedir], - datadir => [$puppi::params::archivedir], - logdir => [$puppi::params::logdir], - description => 'What Puppet knows about puppi' , - verbose => 'yes', -# run => "ls -lR ${puppi::params::logdir}/puppi-data/", - } - - ### Default Logs - case $::operatingsystem { - - Debian,Ubuntu: { - puppi::log { 'system': - description => 'General System Messages', - log => ['/var/log/syslog'], - } - puppi::log { 'auth': - description => 'Users and authentication', - log => ['/var/log/user.log','/var/log/auth.log'], - } - puppi::log { 'mail': - description => 'Mail messages', - log => ['/var/log/mail.log'], - } - } - - RedHat,CentOS,Scientific,Amazon,Linux: { - puppi::log { 'system': - description => 'General System Messages', - log => ['/var/log/messages'], - } - puppi::log { 'auth': - description => 'Users and authentication', - log => ['/var/log/secure'], - } - puppi::log { 'mail': - description => 'Mail messages', - log => ['/var/log/maillog'], - } - } - - SLES,OpenSuSE: { - puppi::log { 'system': - description => 'General System Messages', - log => ['/var/log/messages'], - } - puppi::log { 'mail': - description => 'Mail messages', - log => ['/var/log/mail'], - } - puppi::log { 'zypper': - description => 'Zypper messages', - log => ['/var/log/zypper.log'], - } - } - - Solaris: { - puppi::log { 'system': - description => 'General System Messages', - log => ['/var/adm/messages'], - } - puppi::log { 'auth': - description => 'Users and authentication', - log => ['/var/log/authlog'], - } - } - - Archlinux: { - puppi::log { 'system': - description => 'General System Messages', - log => ['/var/log/messages.log','/var/log/syslog.log'], - } - puppi::log { 'auth': - description => 'Users and authentication', - log => ['/var/log/user.log','/var/log/auth.log'], - } - puppi::log { 'mail': - description => 'Mail messages', - log => ['/var/log/mail.log'], - } - } - - default: { } - - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/helper.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/helper.pp deleted file mode 100644 index d87c198d58..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/helper.pp +++ /dev/null @@ -1,29 +0,0 @@ -# Define puppi::helper -# -# The Puppi 2.0 define that creates an helper file that contains -# the commands to execute, for the different puppi actions, using -# the variables present in the datafile -# -# == Usage -# Basic Usage: -# puppi::helper { "myhelper": -# template => 'myproject/puppi/helpers/myhelper.erb', -# } -# -define puppi::helper ( - $template, - $ensure = 'present' ) { - - require puppi - require puppi::params - - file { "puppi_helper_${name}": - ensure => $ensure, - path => "${puppi::params::helpersdir}/${name}.yml", - mode => '0644', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - content => template($template), - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/helpers.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/helpers.pp deleted file mode 100644 index b8cd2f4805..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/helpers.pp +++ /dev/null @@ -1,16 +0,0 @@ -# Class puppi::helpers -# -# A class that defines all the default helpers used by Example42 -# modules -# -# == Usage -# Automatically included by Puppi -# -class puppi::helpers { - - # Standard helper for Example42 modules - puppi::helper { 'standard': - template => 'puppi/helpers/standard.yml.erb', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info.pp deleted file mode 100644 index 7ae750d7c1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info.pp +++ /dev/null @@ -1,46 +0,0 @@ -# Define puppi::info -# -# This define creates a basic info file that simply contains a set -# of commands that show infos about custom topics. -# To be used by the puppi info command. -# By default it builds the info script based on the minimal puppi/info.erb -# template but you can choose a custom template. -# Other info defines are used to gather and create puppi info scripts with -# different arguments and contents. -# Check puppi/manifests/info/ for alternative puppi::info:: plugins -# -# == Usage: -# puppi::info { "network": -# description => "Network status and information" , -# run => [ "ifconfig" , "route -n" ], -# } -# -# :include:../README.info -# -define puppi::info ( - $description = '', - $templatefile = 'puppi/info.erb', - $run = '' ) { - - require puppi - require puppi::params - - $array_run = is_array($run) ? { - false => $run ? { - '' => [], - default => split($run, ','), - }, - default => $run, - } - - file { "${puppi::params::infodir}/${name}": - ensure => present, - mode => '0750', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => Class['puppi'], - content => template($templatefile), - tag => 'puppi_info', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info/instance.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info/instance.pp deleted file mode 100644 index 9d9d9926b4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info/instance.pp +++ /dev/null @@ -1,33 +0,0 @@ -# Define puppi::info::instance -# -# This is a puppi info plugin specific for the tomcat::instance define -# -define puppi::info::instance ( - $servicename = '', - $processname = '', - $configdir = '', - $bindir = '', - $pidfile = '', - $datadir = '', - $logdir = '', - $httpport = '', - $controlport = '', - $ajpport = '', - $description = '', - $run = '', - $verbose = 'no', - $templatefile = 'puppi/info/instance.erb' ) { - - require puppi - require puppi::params - - file { "${puppi::params::infodir}/${name}": - ensure => present, - mode => '0750', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - content => template($templatefile), - tag => 'puppi_info', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info/module.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info/module.pp deleted file mode 100644 index df6f3c63cb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info/module.pp +++ /dev/null @@ -1,59 +0,0 @@ -# Define puppi::info::module -# -# This is a puppi info plugin that provides automatic info to modules -# It uses a default template puppi/info/module.erb that can be changed -# and adapted -# -# == Usage -# (Sample from Example42 apache module where there's wide use of -# qualified variables, note that you can provide direct values to it -# without using variables): -# -# puppi::info::module { "apache": -# packagename => "${apache::params::packagename}", -# servicename => "${apache::params::servicename}", -# processname => "${apache::params::processname}", -# configfile => "${apache::params::configfile}", -# configdir => "${apache::params::configdir}", -# pidfile => "${apache::params::pidfile}", -# datadir => "${apache::params::datadir}", -# logfile => "${apache::params::logfile}", -# logdir => "${apache::params::logdir}", -# protocol => "${apache::params::protocol}", -# port => "${apache::params::port}", -# description => "What Puppet knows about apache" , -# run => "httpd -V", -# } -# -define puppi::info::module ( - $packagename = '', - $servicename = '', - $processname = '', - $configfile = '', - $configdir = '', - $initconfigfile = '', - $pidfile = '', - $datadir = '', - $logfile = '', - $logdir = '', - $protocol = '', - $port = '', - $description = '', - $run = '', - $verbose = 'no', - $templatefile = 'puppi/info/module.erb' ) { - - require puppi - require puppi::params - - file { "${puppi::params::infodir}/${name}": - ensure => present, - mode => '0750', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => Class['puppi'], - content => template($templatefile), - tag => 'puppi_info', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info/readme.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info/readme.pp deleted file mode 100644 index 5cf9950b46..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/info/readme.pp +++ /dev/null @@ -1,69 +0,0 @@ -# Define puppi::info::readme -# -# This is a puppi info plugin that provides a Readme text which can be -# used to show local info on the managed server and eventually run custom commands. -# -# puppi::info::readme { "myapp": -# description => "Guidelines for myapp setup", -# readme => "myapp/readme.txt" , -# run => "myapp -V", -# } -# -define puppi::info::readme ( - $description = '', - $readme = '', - $autoreadme = 'no', - $run = '', - $source_module = 'undefined', - $templatefile = 'puppi/info/readme.erb' ) { - - require puppi - require puppi::params - - $bool_autoreadme = any2bool($autoreadme) - - file { "${puppi::params::infodir}/${name}": - ensure => present, - mode => '0750', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => Class['puppi'], - content => template($templatefile), - tag => 'puppi_info', - } - - $readme_source = $readme ? { - '' => 'puppet:///modules/puppi/info/readme/readme', - default => $readme, - } - - file { "${puppi::params::readmedir}/${name}": - ensure => present, - mode => '0644', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_readmedir'], - source => $readme_source, - tag => 'puppi_info', - } - - if $bool_autoreadme == true { - file { "${puppi::params::readmedir}/${name}-custom": - ensure => present, - mode => '0644', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_readmedir'], - source => [ - "puppet:///modules/${source_module}/puppi/info/readme/readme-${::hostname}" , - "puppet:///modules/${source_module}/puppi/info/readme/readme-${::role}" , - "puppet:///modules/${source_module}/puppi/info/readme/readme-default" , - "puppet:///modules/puppi/info/readme/readme-${::hostname}" , - "puppet:///modules/puppi/info/readme/readme-${::role}" , - 'puppet:///modules/puppi/info/readme/readme-default' - ], - tag => 'puppi_info', - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/init.pp deleted file mode 100644 index be2043f740..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/init.pp +++ /dev/null @@ -1,77 +0,0 @@ -# = Class: puppi -# -# This is Puppi NextGen -# Includes both first generation of Puppi and the -# NextGen developments and modules integration -# -# == Parameters -# -# [*version*] -# Define the Puppi version to use: -# 1 - First generation of Puppi, compatible with old modules -# 2 - NextGen version. Intended to work with NextGen modules -# Default: 1 , for the moment -# -# [*install_dependencies*] -# Set to false if you want to manage the sofware puppi needs -# with your local modules. -# -# [*template*] -# Sets the path to a custom template for /etc/puppi/puppi.conf -# -# [*helpers_class*] -# Name of the class there default helpers are defined -# (Used on in Puppi 2) -# -# [*logs_retention_days*] -# Number of days for retenton of puppi logs. Default 30 -# This option creates a script in /etc/cron.daily that purges -# all the old logs. Set to false or to 0 to remove the purge script. -# -# [*extra_class*] -# Name of the class where extra puppi resources are added -# Here, by default are placed general system commands for -# puppi info, check and log -# -class puppi ( - $version = params_lookup( 'version' ), - $install_dependencies = params_lookup( 'install_dependencies' ), - $template = params_lookup( 'template' ), - $helpers_class = params_lookup( 'helpers_class' ), - $logs_retention_days = params_lookup( 'logs_retention_days' ), - $extra_class = params_lookup( 'extra_class' ) - ) inherits puppi::params { - - $bool_install_dependencies=any2bool($install_dependencies) - - # Manage Version - $puppi_ensure = $puppi::version ? { - 1 => '/usr/sbin/puppi.one', - 2 => '/usr/local/bin/puppi', - } - - file { 'puppi.link': - ensure => $puppi_ensure, - path => '/usr/sbin/puppi', - } - - # Puppi version one is always installed - include puppi::one - - # Puppi 2 gem (still experimental) is installed only when forced - if $puppi::version == '2' { - include puppi::two - } - - # Create Puppi common dirs and scripts - include puppi::skel - - # Include extra resources - include $puppi::extra_class - - # Include some packages needed by Puppi - if $bool_install_dependencies { - include puppi::dependencies - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/initialize.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/initialize.pp deleted file mode 100644 index 0fe66afe5d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/initialize.pp +++ /dev/null @@ -1,37 +0,0 @@ -# Define puppi::initialize -# -# This define creates a file with a initialize command that can be used locally. -# -# Usage: -# puppi::initialize { "Retrieve files": -# command => "get_file.sh", -# argument => "/remote/dir/file", -# priority => "10", -# user => "root", -# project => "spysite", -# } -# -define puppi::initialize ( - $command, - $project, - $arguments = '', - $priority = '50', - $user = 'root', - $enable = true ) { - - require puppi - require puppi::params - - $ensure = bool2ensure($enable) - - file { "${puppi::params::projectsdir}/${project}/initialize/${priority}-${name}": - ensure => $ensure, - mode => '0750', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => Class['puppi'], - content => "su - ${user} -c \"export project=${project} && ${puppi::params::scriptsdir}/${command} ${arguments}\"\n", - tag => 'puppi_initialize', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/install_packages.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/install_packages.pp deleted file mode 100644 index 6338e8adfa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/install_packages.pp +++ /dev/null @@ -1,83 +0,0 @@ -# = Define: puppi::install_packages -# -# This define installs a list of packages without manging them as Puppet -# resources. It's useful when you need a set of packages installed, -# for example as prerequisites to build code from source, but you don't want -# to create Puppet package resources for them (since they may conflict with -# existing classes that provide the same packages. -# -# == Parameters: -# -# [*packages*] -# String. Required. -# A space separated list of of the packages to install -# -# [*template*] -# String. Optional. Default: 'puppi/install_packages.erb' -# The template to use to generate the script that installs the packages -# -# [*scrips_dir*] -# String. Optional. Default: '/root/puppi_install_packages' -# The directory where you place the scripts created by the define. -# -# [*autorun*] -# Boolean. Default: true. -# Define if to automatically execute the script when Puppet runs. -# -# [*refreshonly*] -# Boolean. Optional. Default: true -# Defines the logic of execution of the script when Puppet runs. -# Maps to the omonymous Exec type argument. -# -# [*timeout*] -# String. Optional. Default: '600' -# Exec timeout in seconds. -# -# [*ensure*] -# Define if the runscript script and eventual cron job -# must be present or absent. Default: present. -# -# == Examples -# -# - Minimal setup -# puppi::install_packages { 'build_tools': -# source => 'build-essential vim git-core curl bison', -# } -# -define puppi::install_packages ( - $packages, - $template = 'puppi/install_packages.erb', - $scripts_dir = '/root/puppi_install_packages', - $autorun = true, - $refreshonly = true, - $timeout = '600', - $ensure = 'present' ) { - - if ! defined(File[$scripts_dir]) { - file { $scripts_dir: - ensure => directory, - mode => '0755', - owner => 'root', - group => 'root', - } - } - - file { "install_packages_${name}": - ensure => $ensure, - path => "${scripts_dir}/${name}", - mode => '0755', - owner => 'root', - group => 'root', - content => template($template), - } - - if $autorun == true { - exec { "install_packages_${name}": - command => "${scripts_dir}/${name}", - refreshonly => $refreshonly, - subscribe => File["install_packages_${name}"], - timeout => $timeout, - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/log.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/log.pp deleted file mode 100644 index 8cfe08ab12..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/log.pp +++ /dev/null @@ -1,36 +0,0 @@ -# Define puppi::log -# -# This define creates a basic log file that simply contains -# the list of logs to show when issuing the puppi log command. -# -# == Usage: -# puppi::log { "system": -# description => "General System Logs" , -# log => [ "/var/log/syslog" , "/var/log/messages" ], -# } -# -# :include:../README.log -# -define puppi::log ( - $log, - $description = '' ) { - - require puppi - require puppi::params - - $array_log = is_array($log) ? { - false => split($log, ','), - default => $log, - } - - file { "${puppi::params::logsdir}/${name}": - ensure => 'present', - mode => '0644', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => Class['puppi'], - content => template('puppi/log.erb'), - tag => 'puppi_log', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/mcollective/client.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/mcollective/client.pp deleted file mode 100644 index a15d0ca259..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/mcollective/client.pp +++ /dev/null @@ -1,60 +0,0 @@ -# = Class puppi::mcollective::client -# -# This class installs the mc puppi command for mcollective clients -# (Note that in mcollective terminology a client is an host from -# where you can manage mcollective servers) -# -# The class installs also the puppideploy and puppicheck commands -# that are simple wrappers about mco puppi that correctly trap -# remote errors and can be used in automatic procedures or -# to give limited access (typically via sudo) to mc puppi commands -# -# They can be integrated, for example, in Jenkins as remote ssh -# commands to manage deployments or tests -# -# == Usage: -# include puppi::mcollective::client -# -# :include:../README.mcollective -# -class puppi::mcollective::client { - - require puppi::params - require puppi::mcollective::server - -# OLD STYLE mc-puppi command - file { '/usr/local/bin/mc-puppi': - ensure => 'present', - mode => '0755', - owner => 'root', - group => 'root', - source => 'puppet:///modules/puppi/mcollective/mc-puppi', - require => Class['mcollective'], - } - -# mco application TODO -# file { "${puppi::params::mcollective}/application/puppi.rb": -# ensure => 'present', -# mode => '0644', -# owner => 'root', -# group => 'root', -# source => 'puppet:///modules/puppi/mcollective/mcpuppi.rb', -# } - - file { '/usr/bin/puppicheck': - ensure => 'present', - mode => '0750', - owner => $puppi::params::mcollective_user, - group => $puppi::params::mcollective_group, - source => 'puppet:///modules/puppi/mcollective/puppicheck', - } - - file { '/usr/bin/puppideploy': - ensure => 'present', - mode => '0750', - owner => $puppi::params::mcollective_user, - group => $puppi::params::mcollective_group, - source => 'puppet:///modules/puppi/mcollective/puppideploy', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/mcollective/server.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/mcollective/server.pp deleted file mode 100644 index 40def160a1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/mcollective/server.pp +++ /dev/null @@ -1,34 +0,0 @@ -# = Class puppi::mcollective::server -# -# This class installs the puppi agent on mcollective servers -# (Note that in mcollective terminology a server is an host -# managed by a mcollective client) -# -# == Usage: -# include puppi::mcollective::server -# -# :include:../README.mcollective -# -class puppi::mcollective::server { - - require puppi::params - - file { "${puppi::params::mcollective}/agent/puppi.ddl": - ensure => 'present', - mode => '0644', - owner => 'root', - group => 'root', - source => 'puppet:///modules/puppi/mcollective/puppi.ddl', - require => Class['mcollective'], - } - - file { "${puppi::params::mcollective}/agent/puppi.rb": - ensure => 'present', - mode => '0644', - owner => 'root', - group => 'root', - source => 'puppet:///modules/puppi/mcollective/puppi.rb', - require => Class['mcollective'], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/netinstall.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/netinstall.pp deleted file mode 100644 index a7b7ed6d08..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/netinstall.pp +++ /dev/null @@ -1,169 +0,0 @@ -# Define: puppi::netinstall -# -# This defines simplifies the installation of a file -# downloaded from the web. It provides arguments to manage -# different kind of downloads and custom commands. -# It's used, among the others, by NextGen modules of webapps -# when the argument install is set to => source -# -# == Variables -# -# [*url*] -# The Url of the file to retrieve. Required. -# Example: http://www.example42.com/file.tar.gz -# -# [*destination_dir*] -# The final destination where to unpack or copy what has been -# downloaded. Required. -# Example: /var/www/html -# -# [*retrieve_args*] -# A string of arguments to pass to wget. -# -# [*extracted_dir*] -# The name of a directory or file created after the extraction -# Needed only if its name is different from the downloaded file name -# (without suffixes). Optional. -# -# [*owner*] -# The user owner of the directory / file created. Default: root -# -# [*group*] -# The group owner of the directory / file created. Default: root -# -# [*timeout*] -# The timeout in seconds for each command executed -# -# [*work_dir*] -# A temporary work dir where file is downloaded. Default: /var/tmp -# -# [*path*] -# Define the path for the exec commands. -# Default: /bin:/sbin:/usr/bin:/usr/sbin -# -# [*exec_env*] -# Define any additional environment variables to be used with the -# exec commands. Note that if you use this to set PATH, it will -# override the path attribute. Multiple environment variables -# should be specified as an array. -# -# [*extract_command*] -# The command used to extract the downloaded file. -# By default is autocalculated accoring to the file extension -# Set 'rsync' if the file has to be placed in the destination_dir -# as is (for example for war files) -# -# [*preextract_command*] -# An optional custom command to run before extracting the file. -# -# [*postextract_command*] -# An optional custom command to run after having extracted the file. -# -define puppi::netinstall ( - $url, - $destination_dir, - $extracted_dir = '', - $retrieve_command = 'wget', - $retrieve_args = '', - $owner = 'root', - $group = 'root', - $timeout = '3600', - $work_dir = '/var/tmp', - $path = '/bin:/sbin:/usr/bin:/usr/sbin', - $extract_command = '', - $preextract_command = '', - $postextract_command = '', - $postextract_cwd = '', - $exec_env = [] - ) { - - $source_filename = url_parse($url,'filename') - $source_filetype = url_parse($url,'filetype') - $source_dirname = url_parse($url,'filedir') - - $real_extract_command = $extract_command ? { - '' => $source_filetype ? { - '.tgz' => 'tar -zxf', - '.gz' => 'tar -zxf', - '.bz2' => 'tar -jxf', - '.tar' => 'tar -xf', - '.zip' => 'unzip', - default => 'tar -zxf', - }, - default => $extract_command, - } - - $extract_command_second_arg = $real_extract_command ? { - /^cp.*/ => '.', - /^rsync.*/ => '.', - default => '', - } - - $real_extracted_dir = $extracted_dir ? { - '' => $real_extract_command ? { - /(^cp.*|^rsync.*)/ => $source_filename, - /(^tar -zxf*|^tar -jxf*)/ => regsubst($source_dirname,'.tar',''), - default => $source_dirname, - }, - default => $extracted_dir, - } - - $real_postextract_cwd = $postextract_cwd ? { - '' => "${destination_dir}/${real_extracted_dir}", - default => $postextract_cwd, - } - - if $preextract_command { - exec { "PreExtract ${source_filename} in ${destination_dir}": - command => $preextract_command, - subscribe => Exec["Retrieve ${url} in ${work_dir}"], - refreshonly => true, - path => $path, - environment => $exec_env, - timeout => $timeout, - } - } - - exec { "Retrieve ${url} in ${work_dir}": - cwd => $work_dir, - command => "${retrieve_command} ${retrieve_args} ${url}", - creates => "${work_dir}/${source_filename}", - timeout => $timeout, - path => $path, - environment => $exec_env, - } - - exec { "Extract ${source_filename} from ${work_dir}": - command => "mkdir -p ${destination_dir} && cd ${destination_dir} && ${real_extract_command} ${work_dir}/${source_filename} ${extract_command_second_arg}", - unless => "ls ${destination_dir}/${real_extracted_dir}", - creates => "${destination_dir}/${real_extracted_dir}", - timeout => $timeout, - require => Exec["Retrieve ${url} in ${work_dir}"], - path => $path, - environment => $exec_env, - notify => Exec["Chown ${source_filename} in ${destination_dir}"], - } - - exec { "Chown ${source_filename} in ${destination_dir}": - command => "chown -R ${owner}:${group} ${destination_dir}/${real_extracted_dir}", - refreshonly => true, - timeout => $timeout, - require => Exec["Extract ${source_filename} from ${work_dir}"], - path => $path, - environment => $exec_env, - } - - if $postextract_command { - exec { "PostExtract ${source_filename} in ${destination_dir}": - command => $postextract_command, - cwd => $real_postextract_cwd, - subscribe => Exec["Extract ${source_filename} from ${work_dir}"], - refreshonly => true, - timeout => $timeout, - require => [Exec["Retrieve ${url} in ${work_dir}"],Exec["Chown ${source_filename} in ${destination_dir}"]], - path => $path, - environment => $exec_env, - } - } -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/one.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/one.pp deleted file mode 100644 index 47574bcb7a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/one.pp +++ /dev/null @@ -1,31 +0,0 @@ -# Class: puppi::one -# -# Installs Puppi 1.0 -# -class puppi::one { - - require puppi::params - - # Main configuration file - file { 'puppi.conf': - ensure => present, - path => "${puppi::params::basedir}/puppi.conf", - mode => '0644', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - content => template($puppi::template), - require => File['puppi_basedir'], - } - - # The Puppi 1.0 command - file { 'puppi': - ensure => present, - path => '/usr/sbin/puppi.one', - mode => '0750', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - content => template('puppi/puppi.erb'), - require => File['puppi_basedir'], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/params.pp deleted file mode 100644 index 721eae1412..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/params.pp +++ /dev/null @@ -1,104 +0,0 @@ -# Class: puppi::params -# -# Sets internal variables and defaults for puppi module -# -class puppi::params { - -## PARAMETERS - $version = '1' - $install_dependencies = true - $template = 'puppi/puppi.conf.erb' - $helpers_class = 'puppi::helpers' - $logs_retention_days = '30' - $extra_class = 'puppi::extras' - - -## INTERNALVARS - $basedir = '/etc/puppi' - $scriptsdir = '/etc/puppi/scripts' - $checksdir = '/etc/puppi/checks' - $logsdir = '/etc/puppi/logs' - $infodir = '/etc/puppi/info' - $tododir = '/etc/puppi/todo' - $projectsdir = '/etc/puppi/projects' - $datadir = '/etc/puppi/data' - $helpersdir = '/etc/puppi/helpers' - $libdir = '/var/lib/puppi' - $readmedir = '/var/lib/puppi/readme' - $logdir = '/var/log/puppi' - - $archivedir = $::puppi_archivedir ? { - '' => '/var/lib/puppi/archive', - default => $::puppi_archivedir, - } - - $workdir = $::puppi_workdir ? { - '' => '/tmp/puppi', - default => $::puppi_workdir, - } - - $configfile_mode = '0644' - $configfile_owner = 'root' - $configfile_group = 'root' - -# External tools -# Directory where are placed the checks scripts -# By default we use Nagios plugins - $checkpluginsdir = $::operatingsystem ? { - /(?i:RedHat|CentOS|Scientific|Amazon|Linux)/ => $::architecture ? { - x86_64 => '/usr/lib64/nagios/plugins', - default => '/usr/lib/nagios/plugins', - }, - default => '/usr/lib/nagios/plugins', - } - - $package_nagiosplugins = $::operatingsystem ? { - /(?i:RedHat|CentOS|Scientific|Amazon|Linux|Fedora)/ => 'nagios-plugins-all', - default => 'nagios-plugins', - } - - $package_mail = $::operatingsystem ? { - /(?i:Debian|Ubuntu|Mint)/ => 'bsd-mailx', - default => 'mailx', - } - - $ntp = $::ntp_server ? { - '' => 'pool.ntp.org' , - default => is_array($::ntp_server) ? { - false => $::ntp_server, - true => $::ntp_server[0], - default => $::ntp_server, - } - } - -# Mcollective paths -# TODO: Add Paths for Puppet Enterprise: -# /opt/puppet/libexec/mcollective/mcollective/ - $mcollective = $::operatingsystem ? { - debian => '/usr/share/mcollective/plugins/mcollective', - ubuntu => '/usr/share/mcollective/plugins/mcollective', - centos => '/usr/libexec/mcollective/mcollective', - redhat => '/usr/libexec/mcollective/mcollective', - default => '/usr/libexec/mcollective/mcollective', - } - - $mcollective_user = 'root' - $mcollective_group = 'root' - - -# Commands used in puppi info templates - $info_package_query = $::operatingsystem ? { - /(?i:RedHat|CentOS|Scientific|Amazon|Linux)/ => 'rpm -qi', - /(?i:Ubuntu|Debian|Mint)/ => 'dpkg -s', - default => 'echo', - } - $info_package_list = $::operatingsystem ? { - /(?i:RedHat|CentOS|Scientific|Amazon|Linux)/ => 'rpm -ql', - /(?i:Ubuntu|Debian|Mint)/ => 'dpkg -L', - default => 'echo', - } - $info_service_check = $::operatingsystem ? { - default => '/etc/init.d/', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project.pp deleted file mode 100644 index 4cf23313e8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project.pp +++ /dev/null @@ -1,100 +0,0 @@ -# Define puppi::project -# -# This define creates and configures a Puppi project -# You must use different puppi::deploy and puppi::rollback defines -# to to build up the commands list -# -define puppi::project ( - $enable = true ) { - - require puppi::params - - $ensure = any2bool($enable) ? { - false => 'absent', - default => 'directory', - } - - $ensurefile = bool2ensure($enable) - - # Create Project subdirs - file { - "${puppi::params::projectsdir}/${name}": - ensure => $ensure, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - force => true; - - "${puppi::params::projectsdir}/${name}/check": - ensure => $ensure, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - force => true, - recurse => true, - purge => true, - require => File["${puppi::params::projectsdir}/${name}"]; - - "${puppi::params::projectsdir}/${name}/rollback": - ensure => $ensure, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - force => true, - recurse => true, - purge => true, - require => File["${puppi::params::projectsdir}/${name}"]; - - "${puppi::params::projectsdir}/${name}/deploy": - ensure => $ensure, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - force => true, - recurse => true, - purge => true, - require => File["${puppi::params::projectsdir}/${name}"]; - - "${puppi::params::projectsdir}/${name}/initialize": - ensure => $ensure, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - force => true, - recurse => true, - purge => true, - require => File["${puppi::params::projectsdir}/${name}"]; - - "${puppi::params::projectsdir}/${name}/configure": - ensure => $ensure, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - force => true, - recurse => true, - purge => true, - require => File["${puppi::params::projectsdir}/${name}"]; - - "${puppi::params::projectsdir}/${name}/report": - ensure => $ensure, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - force => true, - recurse => true, - purge => true, - require => File["${puppi::params::projectsdir}/${name}"]; - } - - # Create Project configuration file - file { - "${puppi::params::projectsdir}/${name}/config": - ensure => $ensurefile, - content => template('puppi/project/config.erb'), - mode => '0644', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File["${puppi::params::projectsdir}/${name}"]; - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/README b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/README deleted file mode 100644 index ea75c5da38..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/README +++ /dev/null @@ -1,31 +0,0 @@ -In this directory you find some examples of deploy procedures -for general purposes deploys (single wars, single files, tarballs, list -of files from a list...) described in a single define. - -They are made in order to be generic enough to adapt to different -environments and scenarious but you might need to design your -own deployment process. - -In order to do that you can create a new define that includes: -- All the variables, required or optional, you may want -- One puppi:project statement -- All the puppi::deploy statements you need (each one runs a command) -- All the puppi::rollback statements you need -- One or more puppi::report statements for reporting - -The examples provided here make use of the scripts provided in -puppi/files/scripts and tend to split the deploy procedures in many -different, reusable, scripts (one gets the source file(s), another -archives the current content, another one actually copies the files -to deploy and so on) but you can use just a single new script or -whatever combination you might prefer. - -The default puppi scripts and the general ordering of commands -execution in these sample deploy defines follow this scheme: -Priority - Kind of operations -1x - Pre Deploy checks -2x - Files retrieving and preparation -3x - Operations to accomplish before the deploy (Archiving, Services stopping..) -40 - Deploy.sh - The script that actually copied the files on deploy dir -4x - Operations to accomplish after the deploy (Services start...) -8x - Post Deploy checks diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/archive.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/archive.pp deleted file mode 100644 index 34d25f0dee..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/archive.pp +++ /dev/null @@ -1,406 +0,0 @@ -# = Define puppi::project::archive -# -# This is a puppi deployment project to be used for archives -# like tarballs and zips -# -# -# It uses different "core" defines (puppi::project, puppi:deploy (many), -# puppi::rollback (many)) to build a full featured template project for -# automatic deployments. -# If you need to customize it, either change the template defined here or -# build up your own custom ones. -# -# == Variables: -# -# [*source*] -# The full URL of the main file to retrieve. -# Format should be in URI standard (http:// file:// ssh:// rsync://). -# -# [*deploy_root*] -# The destination directory where the retrieved file(s) are deployed. -# -# [*user*] -# (Optional) - The user to be used for deploy operations. -# -# [*predeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute before the deploy. The command is executed as $predeploy_user. -# -# [*predeploy_user*] -# (Optional) - The user to be used to execute the $predeploy_customcommand. -# By default is the same of $user. -# -# [*predeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $predeploy_customcommand is executed -# Default: 39 (immediately before the copy of files on the deploy root). -# -# [*postdeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute after the deploy. The command is executed as $postdeploy_user. -# -# [*postdeploy_user*] -# (Optional) - The user to be used to execute the $postdeploy_customcommand. -# By default is the same of $user. -# -# [*postdeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $postdeploy_customcommand is executed -# Default: 41 (immediately after the copy of files on the deploy root). -# -# [*disable_services*] -# (Optional) - The names (space separated) of the services you might want to -# stop during deploy. By default is blank. Example: "apache puppet monit". -# -# [*firewall_src_ip*] -# (Optional) - The IP address of a loadbalancer you might want to block out -# during a deploy. -# -# [*firewall_dst_port*] -# (Optional) - The local port to block from the loadbalancer during deploy -# (Default all). -# -# [*firewall_delay*] -# (Optional) - A delay time in seconds to wait after the block of -# $firewall_src_ip. Should be at least as long as the loadbalancer check -# interval for the services stopped during deploy (Default: 1). -# -# [*report_email*] -# (Optional) - The (space separated) email(s) to notify of deploy/rollback -# operations. If none is specified, no email is sent. -# -# [*clean_deploy*] -# (Optional, default false) - If during the deploy procedure, all the -# existing files that are not on the source have to be deleted. -# (When true, a --delete option is added to the rsync command) -# Do not set to true if source files are incremental. -# -# [*backup_enable*] -# (Optional, default true) - If the backup of files in the deploy dir -# is done (before deploy). If set to false, rollback is disabled. -# -# [*backup_rsync_options*] -# (Optional) - The extra options to pass to rsync for backup operations. Use -# it, for example, to exclude directories that you don't want to archive. -# IE: "--exclude .snapshot --exclude cache --exclude www/cache". -# -# [*backup_retention*] -# (Optional) - Number of backup archives to keep. (Default 5). -# Lower the default value if your backups are too large and may fill up the -# filesystem. -# -# [*run_checks*] -# (Optional) - If you want to run local puppi checks before and after the -# deploy procedure. Default: "true". -# -# [*always_deploy*] -# (Optional) - If you always deploy what has been downloaded. Default="yes", -# if set to "no" a checksum is made between the files previously downloaded -# and the new files. If they are the same the deploy is not done. -# -# [*auto_deploy*] -# (Optional) - If you want to automatically run this puppi deploy when -# Puppet runs. Default: 'false' -# -define puppi::project::archive ( - $source, - $deploy_root, - $user = 'root', - $predeploy_customcommand = '', - $predeploy_user = '', - $predeploy_priority = '39', - $postdeploy_customcommand = '', - $postdeploy_user = '', - $postdeploy_priority = '41', - $disable_services = '', - $firewall_src_ip = '', - $firewall_dst_port = '0', - $firewall_delay = '1', - $report_email = '', - $clean_deploy = false, - $backup_enable = true, - $backup_rsync_options = '--exclude .snapshot', - $backup_retention = '5', - $run_checks = true, - $always_deploy = true, - $auto_deploy = false, - $enable = true ) { - - require puppi - require puppi::params - - # Set default values - $predeploy_real_user = $predeploy_user ? { - '' => $user, - default => $predeploy_user, - } - - $postdeploy_real_user = $postdeploy_user ? { - '' => $user, - default => $postdeploy_user, - } - - $real_always_deploy = any2bool($always_deploy) ? { - false => 'no', - true => 'yes', - } - - - $bool_run_checks = any2bool($run_checks) - $bool_clean_deploy = any2bool($clean_deploy) - $bool_backup_enable = any2bool($backup_enable) - $bool_auto_deploy = any2bool($auto_deploy) - - $source_type = url_parse($source,filetype) - - $real_source_type = $source_type ? { - '.tar' => 'tar', - '.tar.gz' => 'tarball', - '.gz' => 'tarball', - '.tgz' => 'tarball', - '.zip' => 'zip', - } - -### CREATE PROJECT - puppi::project { $name: - enable => $enable , - } - -### DEPLOY SEQUENCE - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_PRE-Checks": - priority => '10' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - # Here source file is retrieved - puppi::deploy { "${name}-Retrieve_Archive": - priority => '20' , - command => 'get_file.sh' , - arguments => "-s ${source} -t ${real_source_type} -a ${real_always_deploy}" , - user => 'root' , - project => $name , - enable => $enable , - } - - puppi::deploy { "${name}-PreDeploy_Archive": - priority => '25' , - command => 'predeploy.sh' , - user => 'root' , - project => $name , - enable => $enable , - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_backup_enable == true) { - puppi::deploy { "${name}-Backup_existing_Files": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${deploy_root} -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Disable_extra_services": - priority => '36' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - # Here is done the deploy on $deploy_root - puppi::deploy { "${name}-Deploy": - priority => '40' , - command => 'deploy_files.sh' , - arguments => "-d ${deploy_root} -c ${bool_clean_deploy}", - user => $user , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### ROLLBACK PROCEDURE - - if ($bool_backup_enable == true) { - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Disable_extra_services": - priority => '37' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - puppi::rollback { "${name}-Recover_Files_To_Deploy": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${deploy_root} -o '${backup_rsync_options}'" , - user => $user , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::rollback { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - } - -### REPORTING - - if ($report_email != '') { - puppi::report { "${name}-Mail_Notification": - priority => '20' , - command => 'report_mail.sh' , - arguments => $report_email , - user => 'root', - project => $name , - enable => $enable , - } - } - -### AUTO DEPLOY DURING PUPPET RUN - if ($bool_auto_deploy == true) { - puppi::run { $name: } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/builder.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/builder.pp deleted file mode 100644 index c76cd1777a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/builder.pp +++ /dev/null @@ -1,561 +0,0 @@ -# = Define puppi::project::builder -# -# This is a shortcut define to build a puppi project for the deploy of web -# applications based on different sources: a war file, a tar file, a source dir, -# a list of files or a nexus maven repository -# It uses different "core" defines (puppi::project, puppi:deploy (many), -# puppi::rollback (many)) to build a full featured template project for -# automatic deployments. -# If you need to customize it, either change the template defined here or -# build up your own custom ones. -# -# == Variables: -# -# [*source*] -# The full URL of the main file to retrieve. -# Format should be in URI standard (http:// file:// ssh:// rsync://). -# -# [*source_type*] -# The type of file that is retrieved. Accepted values: tarball, zip, list, -# war, dir, maven-metadata. -# -# [*deploy_root*] -# The destination directory where the retrieved file(s) are deployed. -# -# [*init_source*] -# (Optional) - The full URL to be used to retrieve, for the first time, -# the project files. They are copied directly to the $deploy_root -# Format should be in URI standard (http:// file:// ssh:// svn://). -# -# [*magicfix*] -# (Optional) - A string that is used as prefix or suffix according to the -# context and the scripts used in the deploy procedure. -# -# [*user*] -# (Optional) - The user to be used for deploy operations. -# -# [*predeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute before the deploy. The command is executed as $predeploy_user. -# -# [*predeploy_user*] -# (Optional) - The user to be used to execute the $predeploy_customcommand. -# By default is the same of $user. -# -# [*predeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $predeploy_customcommand is executed -# Default: 39 (immediately before the copy of files on the deploy root). -# -# [*postdeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute after the deploy. The command is executed as $postdeploy_user. -# -# [*postdeploy_user*] -# (Optional) - The user to be used to execute the $postdeploy_customcommand. -# By default is the same of $user. -# -# [*postdeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $postdeploy_customcommand is executed -# Default: 41 (immediately after the copy of files on the deploy root). -# -# [*disable_services*] -# (Optional) - The names (space separated) of the services you might want to -# stop during deploy. By default is blank. Example: "apache puppet monit". -# -# [*firewall_src_ip*] -# (Optional) - The IP address of a loadbalancer you might want to block out -# during a deploy. -# -# [*firewall_dst_port*] -# (Optional) - The local port to block from the loadbalancer during deploy -# (Default all). -# -# [*firewall_delay*] -# (Optional) - A delay time in seconds to wait after the block of -# $firewall_src_ip. Should be at least as long as the loadbalancer check -# interval for the services stopped during deploy (Default: 1). -# -# [*report_email*] -# (Optional) - The (space separated) email(s) to notify of deploy/rollback -# operations. If none is specified, no email is sent. -# -# [*backup*] -# (Optional) - How backups of files are made. Default: "full". Options: -# "full" - Make full backup of the deploy_root before making the deploy -# "diff" - Backup only the files that are going to be deployed. Note that -# in order to make reliable rollbacks of versions older that the latest -# you've to individually rollback every intermediate deploy -# "false" - Do not make backups. This disables the option to make rollbacks -# -# [*backup_rsync_options*] -# (Optional) - The extra options to pass to rsync for backup operations. Use -# it, for example, to exclude directories that you don't want to archive. -# IE: "--exclude .snapshot --exclude cache --exclude www/cache". -# -# [*backup_retention*] -# (Optional) - Number of backup archives to keep. (Default 5). -# Lower the default value if your backups are too large and may fill up the -# filesystem. -# -# [*run_checks*] -# (Optional) - If you want to run local puppi checks before and after the -# deploy procedure. Default: "true". -# -# [*always_deploy*] -# (Optional) - If you always deploy what has been downloaded. Default="yes", -# if set to "no" a checksum is made between the files previously downloaded -# and the new files. If they are the same the deploy is not done. -# -# == Usage -# A sample deploy of a zip with custom postdeploy command and mail notification -# puppi::project::builder { "cms": -# source => "http://repo.example42.com/deploy/cms/cms.zip", -# source_type => "zip", -# user => "root", -# deploy_root => "/var/www", -# postdeploy_customcommand => "chown -R www-data /var/www/files", -# postdeploy_user => "root", -# postdeploy_priority => "41", -# report_email => "sysadmins@example42.com", -# enable => "true", -# } -# -# [*auto_deploy*] -# (Optional) - If you want to automatically run this puppi deploy when -# Puppet runs. Default: 'false' -# -define puppi::project::builder ( - $source, - $source_type, - $deploy_root, - $init_source = '', - $user = 'root', - $magicfix = '', - $predeploy_customcommand = '', - $predeploy_user = '', - $predeploy_priority = '39', - $postdeploy_customcommand = '', - $postdeploy_user = '', - $postdeploy_priority = '41', - $disable_services = '', - $firewall_src_ip = '', - $firewall_dst_port = '0', - $firewall_delay = '1', - $report_email = '', - $backup = 'full', - $backup_rsync_options = '--exclude .snapshot', - $backup_retention = '5', - $run_checks = true, - $always_deploy = true, - $auto_deploy = false, - $enable = true ) { - - require puppi - require puppi::params - - # Autoinclude the puppi class - include puppi - - # Set default values - $predeploy_real_user = $predeploy_user ? { - '' => $user, - default => $predeploy_user, - } - - $postdeploy_real_user = $postdeploy_user ? { - '' => $user, - default => $postdeploy_user, - } - - $real_source_type = $source_type ? { - 'dir' => 'dir', - 'tarball' => 'tarball', - 'zip' => 'zip', - 'gz' => 'gz', - 'maven-metadata' => 'maven-metadata', - 'maven' => 'maven-metadata', - 'war' => 'war', - 'list' => 'list', - } - - $real_always_deploy = any2bool($always_deploy) ? { - false => 'no', - true => 'yes', - } - - $bool_run_checks = any2bool($run_checks) - $bool_auto_deploy = any2bool($auto_deploy) - - $source_filename = url_parse($source,'filename') - -# Create Project - puppi::project { $name: enable => $enable } - - -### INIT SEQUENCE - if ($init_source != '') { - puppi::initialize { "${name}-Deploy_Files": - priority => '40' , - command => 'get_file.sh' , - arguments => "-s ${init_source} -d ${deploy_root}" , - user => $user , - project => $name , - enable => $enable , - } - } - - -### DEPLOY SEQUENCE - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_PRE-Checks": - priority => '10' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - # Here source file is retrieved - puppi::deploy { "${name}-Retrieve_SourceFile": - priority => '20' , - command => 'get_file.sh' , - arguments => "-s ${source} -t ${real_source_type} -a ${real_always_deploy}" , - user => 'root' , - project => $name , - enable => $enable , - } - - $args_magicfix = $magicfix ? { - '' => '', - default => "-m ${magicfix}" , - } - - if ($real_source_type == 'tarball') { - puppi::deploy { "${name}-PreDeploy_Tar": - priority => '25' , - command => 'predeploy.sh' , - arguments => $args_magicfix, - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($real_source_type == 'zip') { - - puppi::deploy { "${name}-PreDeploy_Zip": - priority => '25' , - command => 'predeploy.sh' , - arguments => $args_magicfix, - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($real_source_type == 'list') { - puppi::deploy { "${name}-Extract_File_Metadata": - priority => '22' , - command => 'get_metadata.sh' , - arguments => $args_magicfix, - user => 'root' , - project => $name , - enable => $enable , - } - - $clean_file_list_magicfix = $magicfix ? { - '' => '', - default => $magicfix, - } - - puppi::deploy { "${name}-Clean_File_List": - priority => '24' , - command => 'clean_filelist.sh' , - arguments => $clean_file_list_magicfix, - user => 'root' , - project => $name , - enable => $enable , - } - puppi::deploy { "${name}-Retrieve_Files": - priority => '25' , - command => 'get_filesfromlist.sh' , - arguments => $source , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($backup == 'full') or ($backup == 'diff') { - puppi::deploy { "${name}-Backup_existing_Files": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${deploy_root} -m ${backup} -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Block": - priority => '34' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($real_source_type == 'war') { - puppi::deploy { "${name}-Remove_existing_WAR": - priority => '35' , - command => 'delete.sh' , - arguments => "${deploy_root}/${source_filename}" , - user => 'root' , - project => $name , - enable => $enable , - } - puppi::deploy { "${name}-Check_undeploy": - priority => '36' , - command => 'checkwardir.sh' , - arguments => "-a ${deploy_root}/${source_filename}" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Disable_extra_services": - priority => '37' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - # Here is done the deploy on $deploy_root - puppi::deploy { "${name}-Deploy": - priority => '40' , - command => 'deploy.sh' , - arguments => $deploy_root , - user => $user , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($real_source_type == 'war') { - puppi::deploy { "${name}-Check_deploy": - priority => '45' , - command => 'checkwardir.sh' , - arguments => "-p ${deploy_root}/${source_filename}" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### ROLLBACK PROCEDURE - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Block": - priority => '34' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($real_source_type == 'war') { - puppi::rollback { "${name}-Remove_existing_WAR": - priority => '35' , - command => 'delete.sh' , - arguments => "${deploy_root}/${source_filename}" , - user => 'root' , - project => $name , - enable => $enable , - } - puppi::rollback { "${name}-Check_undeploy": - priority => '36' , - command => 'checkwardir.sh' , - arguments => "-a ${deploy_root}/${source_filename}" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Disable_extra_services": - priority => '37' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($backup == 'full') or ($backup == 'diff') { - puppi::rollback { "${name}-Recover_Files_To_Deploy": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${deploy_root} -m ${backup} -o '${backup_rsync_options}'" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($postdeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($real_source_type == 'war') { - puppi::rollback { "${name}-Check_deploy": - priority => '45' , - command => 'checkwardir.sh' , - arguments => "-p ${deploy_root}/${source_filename}" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::rollback { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### REPORTING - - if ($report_email != '') { - puppi::report { "${name}-Mail_Notification": - priority => '20' , - command => 'report_mail.sh' , - arguments => $report_email , - user => 'root', - project => $name , - enable => $enable , - } - } - -### AUTO DEPLOY DURING PUPPET RUN - if ($bool_auto_deploy == true) { - puppi::run { $name: } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/dir.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/dir.pp deleted file mode 100644 index a56ad64552..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/dir.pp +++ /dev/null @@ -1,450 +0,0 @@ -# = Define puppi::project::dir -# -# This is a shortcut define to build a puppi project for a deploy based -# on the syncronization of a directory. -# It uses different "core" defines (puppi::project, puppi:deploy (many), -# puppi::rollback (many)) to build a full featured template project for -# automatic deployments. -# If you need to customize it, either change the template defined here or -# build up your own custom ones. -# -# == Variables: -# -# [*source*] -# The full URL of the main file to retrieve. -# Format should be in URI standard (http:// file:// ssh:// rsync://). -# -# [*deploy_root*] -# The destination directory where the retrieved file(s) are deployed. -# -# [*init_source*] -# (Optional) - The full URL to be used to retrieve, for the first time, -# the project files. They are copied directly to the $deploy_root -# Format should be in URI standard (http:// file:// ssh:// svn://). -# -# [*user*] -# (Optional) - The user to be used for deploy operations. -# -# [*predeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute before the deploy. The command is executed as $predeploy_user. -# -# [*predeploy_user*] -# (Optional) - The user to be used to execute the $predeploy_customcommand. -# By default is the same of $user. -# -# [*predeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $predeploy_customcommand is executed -# Default: 39 (immediately before the copy of files on the deploy root). -# -# [*postdeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute after the deploy. The command is executed as $postdeploy_user. -# -# [*postdeploy_user*] -# (Optional) - The user to be used to execute the $postdeploy_customcommand. -# By default is the same of $user. -# -# [*postdeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $postdeploy_customcommand is executed -# Default: 41 (immediately after the copy of files on the deploy root). -# -# [*init_script*] -# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your -# Application server. If you define it, the AS is stopped and then started -# during deploy. This option is deprecated, you can use $disable_services -# for the same functionality -# -# [*disable_services*] -# (Optional) - The names (space separated) of the services you might want to -# stop during deploy. By default is blank. Example: "apache puppet monit". -# -# [*firewall_src_ip*] -# (Optional) - The IP address of a loadbalancer you might want to block out -# during a deploy. -# -# [*firewall_dst_port*] -# (Optional) - The local port to block from the loadbalancer during deploy -# (Default all). -# -# [*firewall_delay*] -# (Optional) - A delay time in seconds to wait after the block of -# $firewall_src_ip. Should be at least as long as the loadbalancer check -# interval for the services stopped during deploy (Default: 1). -# -# [*report_email*] -# (Optional) - The (space separated) email(s) to notify of deploy/rollback -# operations. If none is specified, no email is sent. -# -# [*backup_rsync_options*] -# (Optional) - The extra options to pass to rsync for backup operations. Use -# it, for example, to exclude directories that you don't want to archive. -# IE: "--exclude .snapshot --exclude cache --exclude www/cache". -# -# [*backup_retention*] -# (Optional) - Number of backup archives to keep. (Default 5). -# Lower the default value if your backups are too large and may fill up the -# filesystem. -# -# [*run_checks*] -# (Optional) - If you want to run local puppi checks before and after the -# deploy procedure. Default: "true". -# -# [*skip_predeploy*] -# For large data to deploy predeploy copy in /tmp/puppi might full the -# filesystem. Set to "yes" to deploy directly to $deploy_root. Default: no -# (files are first predeployed in /tmp/puppi then copied to $deploy_root) -# -# [*auto_deploy*] -# (Optional) - If you want to automatically run this puppi deploy when -# Puppet runs. Default: 'false' -# -define puppi::project::dir ( - $source, - $deploy_root, - $init_source = '', - $user = 'root', - $predeploy_customcommand = '', - $predeploy_user = '', - $predeploy_priority = '39', - $postdeploy_customcommand = '', - $postdeploy_user = '', - $postdeploy_priority = '41', - $init_script = '', - $disable_services = '', - $firewall_src_ip = '', - $firewall_dst_port = '0', - $firewall_delay = '1', - $report_email = '', - $backup_rsync_options = '--exclude .snapshot', - $backup_retention = '5', - $run_checks = true, - $skip_predeploy = false, - $auto_deploy = false, - $enable = true ) { - - require puppi - require puppi::params - - # Set default values - $predeploy_real_user = $predeploy_user ? { - '' => $user, - default => $predeploy_user, - } - - $postdeploy_real_user = $postdeploy_user ? { - '' => $user, - default => $postdeploy_user, - } - - $bool_run_checks = any2bool($run_checks) - $bool_skip_predeploy = any2bool($skip_predeploy) - $bool_auto_deploy = any2bool($auto_deploy) - -### CREATE PROJECT - puppi::project { $name: - enable => $enable , - } - - -### INIT SEQUENCE - if ($init_source != '') { - puppi::initialize { "${name}-Deploy_Files": - priority => '40' , - command => 'get_file.sh' , - arguments => "-s ${init_source} -d ${deploy_root}" , - user => $user , - project => $name , - enable => $enable , - } - } - - -### DEPLOY SEQUENCE - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_PRE-Checks": - priority => '10' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($bool_skip_predeploy == false) { - puppi::deploy { "${name}-Sync_Files": - priority => '20' , - command => 'get_file.sh' , - arguments => "-s ${source} -t dir" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - puppi::deploy { "${name}-Backup_existing_Files": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${deploy_root} -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Disable_extra_services": - priority => '36' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - # Here is done the deploy on $deploy_root - if ($bool_skip_predeploy == false) { - puppi::deploy { "${name}-Deploy": - priority => '40' , - command => 'deploy.sh' , - arguments => $deploy_root , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($bool_skip_predeploy == true) { - puppi::deploy { "${name}-Deploy": - priority => '40' , - command => 'get_file.sh' , - arguments => "-s ${source} -d ${deploy_root}" , - user => $user , - project => $name , - enable => $enable , - } - } - # End deploy - - if ($postdeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_start": - priority => '42' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### ROLLBACK SEQUENCE - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Disable_extra_services": - priority => '37' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - puppi::rollback { "${name}-Recover_Files_To_Deploy": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${deploy_root} -o '${backup_rsync_options}'" , - user => $user , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_start": - priority => '42' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::rollback { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### REPORTING - - if ($report_email != '') { - puppi::report { "${name}-Mail_Notification": - priority => '20' , - command => 'report_mail.sh' , - arguments => $report_email , - user => 'root', - project => $name , - enable => $enable , - } - } - -### AUTO DEPLOY DURING PUPPET RUN - if ($bool_auto_deploy == true) { - puppi::run { $name: } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/files.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/files.pp deleted file mode 100644 index 1c625b9819..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/files.pp +++ /dev/null @@ -1,482 +0,0 @@ -# = Define puppi::project::files -# -# This is a sample define to build a puppi project for the deploy of -# one or more files based on a provided list containing, one per line, -# the full path of the files to deploy. -# The place (url) from where to get the files is defined by the -# $source_baseurl variable. -# You can strip out some beginning chars from each line with the -# (optional) $files_prefix variable. -# Files are then copied to the $deploy_root you define. -# -# Many different variables are optional in order to adapt the define -# to different cases and needs, if you still need to customize it, -# you can clone this puppi::project into another file and change the -# define name. -# -# == Variables: -# -# [*source*] -# The full URL of the main file to retrieve. -# Format should be in URI standard (http:// file:// ssh:// rsync://). -# -# [*deploy_root*] -# The destination directory where the retrieved file(s) are deployed. -# -# [*source_baseurl*] -# The full URL, in URI standard format, to prepend to the entries i -# the files list in order to retrieve the relative files. -# -# [*init_source*] -# (Optional) - The full URL to be used to retrieve, for the first time, -# the project files. They are copied directly to the $deploy_root -# Format should be in URI standard (http:// file:// ssh:// svn://). -# -# [*prefix*] -# (Optional) - The prefix that might be present in the filelist to -# define custom metadata -# -# [*files_prefix*] -# (Optional) The prefix to remove from the list entries in order to -# determine the files path on the deploy_root -# We suggest to place in the files list just the deploy_root relative -# paths of the files, and in this case the $files_prefix is null -# -# [*user*] -# (Optional) - The user to be used for deploy operations. -# -# [*predeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute before the deploy. The command is executed as $predeploy_user. -# -# [*predeploy_user*] -# (Optional) - The user to be used to execute the $predeploy_customcommand. -# By default is the same of $user. -# -# [*predeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $predeploy_customcommand is executed -# Default: 39 (immediately before the copy of files on the deploy root). -# -# [*postdeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute after the deploy. The command is executed as $postdeploy_user. -# -# [*postdeploy_user*] -# (Optional) - The user to be used to execute the $postdeploy_customcommand. -# By default is the same of $user. -# -# [*postdeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $postdeploy_customcommand is executed -# Default: 41 (immediately after the copy of files on the deploy root). -# -# [*init_script*] -# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your -# Application server. If you define it, the AS is stopped and then started -# during deploy. This option is deprecated, you can use $disable_services -# for the same functionality -# -# [*disable_services*] -# (Optional) - The names (space separated) of the services you might want to -# stop during deploy. By default is blank. Example: "apache puppet monit". -# -# [*firewall_src_ip*] -# (Optional) - The IP address of a loadbalancer you might want to block out -# during a deploy. -# -# [*firewall_dst_port*] -# (Optional) - The local port to block from the loadbalancer during deploy -# (Default all). -# -# [*firewall_delay*] -# (Optional) - A delay time in seconds to wait after the block of -# $firewall_src_ip. Should be at least as long as the loadbalancer check -# interval for the services stopped during deploy (Default: 1). -# -# [*report_email*] -# (Optional) - The (space separated) email(s) to notify of deploy/rollback -# operations. If none is specified, no email is sent. -# -# [*backup_rsync_options*] -# (Optional) - The extra options to pass to rsync for backup operations. Use -# it, for example, to exclude directories that you don't want to archive. -# IE: "--exclude .snapshot --exclude cache --exclude www/cache". -# -# [*backup_retention*] -# (Optional) - Number of backup archives to keep. (Default 5). -# Lower the default value if your backups are too large and may fill up the -# filesystem. -# -# [*run_checks*] -# (Optional) - If you want to run local puppi checks before and after the -# deploy procedure. Default: "true". -# -# [*auto_deploy*] -# (Optional) - If you want to automatically run this puppi deploy when -# Puppet runs. Default: 'false' -# -define puppi::project::files ( - $source, - $source_baseurl, - $deploy_root, - $init_source = '', - $files_prefix = '', - $prefix = '', - $user = 'root', - $predeploy_customcommand = '', - $predeploy_user = '', - $predeploy_priority = '39', - $postdeploy_customcommand = '', - $postdeploy_user = '', - $postdeploy_priority = '41', - $init_script = '', - $disable_services = '', - $firewall_src_ip = '', - $firewall_dst_port = '0', - $firewall_delay = '1', - $report_email = '', - $backup_rsync_options = '--exclude .snapshot', - $backup_retention = '5', - $run_checks = true, - $auto_deploy = false, - $enable = true ) { - - require puppi - require puppi::params - - # Set default values - $predeploy_real_user = $predeploy_user ? { - '' => $user, - default => $predeploy_user, - } - - $postdeploy_real_user = $postdeploy_user ? { - '' => $user, - default => $postdeploy_user, - } - - $bool_run_checks = any2bool($run_checks) - $bool_auto_deploy = any2bool($auto_deploy) - -### CREATE PROJECT - puppi::project { $name: - enable => $enable , - } - - -### INIT SEQUENCE - if ($init_source != '') { - puppi::initialize { "${name}-Deploy_Files": - priority => '40' , - command => 'get_file.sh' , - arguments => "-s ${init_source} -d ${deploy_root}" , - user => $user , - project => $name , - enable => $enable , - } - } - - -### DEPLOY SEQUENCE - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_PRE-Checks": - priority => '10' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - puppi::deploy { "${name}-Retrieve_File_List": - priority => '20' , - command => 'get_file.sh' , - arguments => "-s ${source} -t list" , - user => 'root' , - project => $name , - enable => $enable , - } - - $args_prefix = $prefix ? { - '' => '', - default => "-m ${prefix}", - } - - puppi::deploy { "${name}-Extract_File_Metadata": - priority => '22' , - command => 'get_metadata.sh' , - arguments => $args_prefix, - user => 'root' , - project => $name , - enable => $enable , - } - - puppi::deploy { "${name}-Clean_File_List": - priority => '24' , - command => 'clean_filelist.sh' , - arguments => $files_prefix , - user => 'root' , - project => $name , - enable => $enable , - } - - puppi::deploy { "${name}-Retrieve_Files": - priority => '25' , - command => 'get_filesfromlist.sh' , - arguments => $source_baseurl , - user => 'root' , - project => $name , - enable => $enable , - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - puppi::deploy { "${name}-Backup_existing_Files": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${deploy_root} -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Disable_extra_services": - priority => '36' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - # Here is done the deploy on $deploy_root - puppi::deploy { "${name}-Deploy": - priority => '40' , - command => 'deploy.sh' , - arguments => $deploy_root , - user => $user , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_start": - priority => '42' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### ROLLBACK SEQUENCE - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Disable_extra_services": - priority => '36' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - puppi::rollback { "${name}-Recover_Files_To_Deploy": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${deploy_root} -o '${backup_rsync_options}'" , - user => $user , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_start": - priority => '42' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::rollback { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### REPORTING - - if ($report_email != '') { - puppi::report { "${name}-Mail_Notification": - priority => '20' , - command => 'report_mail.sh' , - arguments => $report_email , - user => 'root', - project => $name , - enable => $enable , - } - } - -### AUTO DEPLOY DURING PUPPET RUN - if ($bool_auto_deploy == true) { - puppi::run { $name: } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/git.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/git.pp deleted file mode 100644 index ac48e301a1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/git.pp +++ /dev/null @@ -1,418 +0,0 @@ -# == Define puppi::project::git -# -# This is a shortcut define to build a puppi project for the deploy of -# file from a git repo. -# It uses different "core" defines (puppi::project, puppi:deploy (many), -# puppi::rollback (many)) to build a full featured template project for -# automatic deployments. -# If you need to customize it, either change the template defined here or -# build up your own custom ones. -# -# == Variables: -# -# [*source*] -# The full URL of the git repo to retrieve. -# Format should be in git friendly standard (http:// git:// ssh:// ..). -# -# [*deploy_root*] -# The destination directory where the retrieved file(s) are deployed. -# -# [*install_git*] -# If the git package hs to be installed. Default true. -# Set to false if you install git via other modules and have resource -# conflicts. -# -# [*git_subdir*] -# (Optional) - If you want to copy to the deploy_root only a subdir -# of the specified git repo, specify here the path of the directory -# relative to the repo root. Default undefined -# -# [*tag*] -# (Optional) - A specific tag you may want to deploy. Default undefined -# You can override the default value via command-line with: -# puppi deploy myapp -o "tag=release" -# -# [*branch*] -# (Optional) - A specific branch you may want to deploy. Default: master -# You can override the default value via command-line with: -# puppi deploy myapp -o "branch=devel" -# -# [*commit*] -# (Optional) - A specific commit you may want to use. Default undefined -# You can override the default value via command-line with: -# puppi deploy myapp -o "commit=1061cb731bc75a1188b58b889b74ce1505ccb412" -# -# [*keep_gitdata*] -# (Optional) - Define if you want to keep git metadata directory (.git) -# in the deploy root. According to this value backup and rollback -# operations change (with keep_gitdata set to true no real backups are done -# and operations are made on the git tree, if set to false, file are copied -# and the $backup_* options used. Default is true -# -# [*verbose*] -# (Optional) - If you want to see verbose git utput (file names) during -# the deploy. Default is true. -# -# [*user*] -# (Optional) - The user to be used for deploy operations. -# If different from root (default) it must have write permissions on -# the $deploy_root dir. -# -# [*predeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute before the deploy. The command is executed as $predeploy_user. -# -# [*predeploy_user*] -# (Optional) - The user to be used to execute the $predeploy_customcommand. -# By default is the same of $user. -# -# [*predeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $predeploy_customcommand is executed -# Default: 39 (immediately before the copy of files on the deploy root). -# -# [*postdeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute after the deploy. The command is executed as $postdeploy_user. -# -# [*postdeploy_user*] -# (Optional) - The user to be used to execute the $postdeploy_customcommand. -# By default is the same of $user. -# -# [*postdeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $postdeploy_customcommand is executed -# Default: 41 (immediately after the copy of files on the deploy root). -# -# [*disable_services*] -# (Optional) - The names (space separated) of the services you might want to -# stop during deploy. By default is blank. Example: "apache puppet monit". -# -# [*firewall_src_ip*] -# (Optional) - The IP address of a loadbalancer you might want to block out -# during a deploy. -# -# [*firewall_dst_port*] -# (Optional) - The local port to block from the loadbalancer during deploy -# (Default all). -# -# [*firewall_delay*] -# (Optional) - A delay time in seconds to wait after the block of -# $firewall_src_ip. Should be at least as long as the loadbalancer check -# interval for the services stopped during deploy (Default: 1). -# -# [*report_email*] -# (Optional) - The (space separated) email(s) to notify of deploy/rollback -# operations. If none is specified, no email is sent. -# -# [*backup_rsync_options*] -# (Optional) - The extra options to pass to rsync for backup operations. Use -# it, for example, to exclude directories that you don't want to archive. -# IE: "--exclude .snapshot --exclude cache --exclude www/cache". -# This option is used when $keep_gitmeta is set to false -# -# [*backup_retention*] -# (Optional) - Number of backup archives to keep. (Default 5). -# Lower the default value if your backups are too large and may fill up the -# filesystem. -# This option is used when $keep_gitmeta is set to false -# -# [*run_checks*] -# (Optional) - If you want to run local puppi checks before and after the -# deploy procedure. Default: "true". -# -# [*auto_deploy*] -# (Optional) - If you want to automatically run this puppi deploy when -# Puppet runs. Default: 'false' -# -define puppi::project::git ( - $source, - $deploy_root, - $install_git = true, - $git_subdir = 'undefined', - $tag = 'undefined', - $branch = 'master', - $commit = 'undefined', - $keep_gitdata = true, - $verbose = true, - $user = 'root', - $predeploy_customcommand = '', - $predeploy_user = '', - $predeploy_priority = '39', - $postdeploy_customcommand = '', - $postdeploy_user = '', - $postdeploy_priority = '41', - $disable_services = '', - $firewall_src_ip = '', - $firewall_dst_port = '0', - $firewall_delay = '1', - $report_email = '', - $backup_rsync_options = '--exclude .snapshot', - $backup_retention = '5', - $run_checks = true, - $auto_deploy = false, - $enable = true ) { - - require puppi - require puppi::params - - # Set default values - $predeploy_real_user = $predeploy_user ? { - '' => $user, - default => $predeploy_user, - } - - $postdeploy_real_user = $postdeploy_user ? { - '' => $user, - default => $postdeploy_user, - } - - $bool_install_git = any2bool($install_git) - $bool_keep_gitdata = any2bool($keep_gitdata) - $bool_verbose = any2bool($verbose) - $bool_run_checks = any2bool($run_checks) - $bool_auto_deploy = any2bool($auto_deploy) - -### INSTALL GIT - if ($bool_install_git == true) { - if ! defined(Package['git']) { package { 'git': ensure => installed } } - } - -### CREATE PROJECT - puppi::project { $name: - enable => $enable , - } - - -### DEPLOY SEQUENCE - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_PRE-Checks": - priority => '10' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_keep_gitdata == true) { - puppi::deploy { "${name}-Backup_existing_data": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${deploy_root} -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Disable_extra_services": - priority => '36' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - # Here is done the deploy on $deploy_root - puppi::deploy { "${name}-Deploy_Files": - priority => '40' , - command => 'git.sh' , - arguments => "-a deploy -s ${source} -d ${deploy_root} -u ${user} -gs ${git_subdir} -t ${tag} -b ${branch} -c ${commit} -v ${bool_verbose} -k ${bool_keep_gitdata}" , - user => 'root' , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### ROLLBACK PROCEDURE - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Disable_extra_services": - priority => '37' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($bool_keep_gitdata == true) { - puppi::rollback { "${name}-Recover_Files_To_Deploy": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${deploy_root} -o '${backup_rsync_options}'" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($bool_keep_gitdata != true) { - puppi::rollback { "${name}-Rollback_Files": - priority => '40' , - command => 'git.sh' , - arguments => "-a rollback -s ${source} -d ${deploy_root} -gs ${git_subdir} -t ${tag} -b ${branch} -c ${commit} -v ${bool_verbose} -k ${bool_keep_gitdata}" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($postdeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::rollback { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### REPORTING - - if ($report_email != '') { - puppi::report { "${name}-Mail_Notification": - priority => '20' , - command => 'report_mail.sh' , - arguments => $report_email , - user => 'root', - project => $name , - enable => $enable , - } - } - -### AUTO DEPLOY DURING PUPPET RUN - if ($bool_auto_deploy == true) { - puppi::run { $name: } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/maven.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/maven.pp deleted file mode 100644 index a1979dae47..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/maven.pp +++ /dev/null @@ -1,814 +0,0 @@ -# = Define puppi::project::maven -# -# This is a shortcut define to build a puppi project for the -# deploy of war and tar files generated via Maven and published on -# a repository like Sonar. -# -# It uses different "core" defines (puppi::project, puppi:deploy (many), -# puppi::rollback (many)) to build a full featured template project for -# automatic deployments. -# If you need to customize it, either change the template defined here or -# build up your own custom ones. -# -# == Variables: -# -# [*source*] -# The full URL of the maven-metadata.xml file to retrieve. -# Format should be in URI standard (http:// file:// ssh:// rsync://). -# -# [*http_password*] -# The http_password to use for authentication to the source in case of http. -# -# [*http_user*] -# The http_user to use for authentication to the source in case of http. -# -# [*artifact_type*] -# The artifact_type to parse the maven-metadata.xml. Either "release", "latest" or -# a specific version (e.g. "2.5.0") -# Default is "release". With artifactory, don't use the -# "Maven Snapshot Version Behavior" "unique" for your repository. -# -# [*deploy_root*] -# The destination directory where file(s) are deployed. -# -# [*user*] -# (Optional) - The user to be used for deploy operations. -# -# [*war_suffix*] -# (Optional) - The suffix (Maven qualifier) that might be appended to the war -# -# [*zip_root*] -# (Optional) - The destination directory where the zip is unpacked -# -# [*zip_user*] -# (Optional) - The user to be used for deploy operations of the zip -# -# [*zip_suffix*] -# (Optional) - The suffix (Maven qualifier) that might be appended to the zip -# -# [*jar_root*] -# (Optional) - The destination directory where the jar is copied. -# If set a jar file is searched in Maven -# -# [*jar_user*] -# (Optional) - The user to be used for deploy operations of the jar -# (owner of the files deployed in $jar_root) -# -# [*jar_suffix*] -# (Optional) - The suffix (Maven qualifier) that might be appended to the jar -# -# [*document_root*] -# (Optional) - The destination directory where the eventual tarball generated -# via Maven containing static files ("src tar") is unpacked -# -# [*document_suffix*] -# (Optional) - The suffix (Maven qualifier) that might be appended to the -# static files tarballs ("src tar") -# -# [*document_init_source*] -# (Optional) - The full URL to be used to retrieve, for the first time, the -# project files present in the source tarball. They are copied to the -# $document_root. Format should be in URI standard (http:// file:// ...) -# -# [*document_user*] -# (Optional) - The user to be used for deploy operations of the tarball -# (owner of the files in $document_root) -# -# [*config_root*] -# (Optional) - The destination directory where the cfg tar is unpacked -# -# [*config_suffix*] -# (Optional) - The suffix (Maven qualifier) that might be appended to -# configuration tarballs ("cfg tar") -# -# [*config_init_source*] -# (Optional) - The full URL to be used to retrieve, for the first time, the -# project files present in the cfg tar. They are copied to the $config_root. -# Format should be in URI standard (http:// file:// ssh:// svn://) -# -# [*config_user*] -# (Optional) - The user to be used for deploy operations of cfg tar -# (owner of the files in $config_root) -# -# [*predeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute before the deploy. The command is executed as $predeploy_user. -# -# [*predeploy_user*] -# (Optional) - The user to be used to execute the $predeploy_customcommand. -# By default is the same of $user. -# -# [*predeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $predeploy_customcommand is executed -# Default: 39 (immediately before the copy of files on the deploy root). -# -# [*postdeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute after the deploy. The command is executed as $postdeploy_user. -# -# [*postdeploy_user*] -# (Optional) - The user to be used to execute the $postdeploy_customcommand. -# By default is the same of $user. -# -# [*postdeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $postdeploy_customcommand is executed -# Default: 41 (immediately after the copy of files on the deploy root). -# -# [*init_script*] -# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your -# Application server. If you define it, the AS is stopped and then started -# during deploy. This option is deprecated, you can use $disable_services -# for the same functionality -# -# [*disable_services*] -# (Optional) - The names (space separated) of the services you might want to -# stop during deploy. By default is blank. Example: "apache puppet monit". -# -# [*firewall_src_ip*] -# (Optional) - The IP address of a loadbalancer you might want to block out -# during a deploy. -# -# [*firewall_dst_port*] -# (Optional) - The local port to block from the loadbalancer during deploy -# (Default all). -# -# [*firewall_delay*] -# (Optional) - A delay time in seconds to wait after the block of -# $firewall_src_ip. Should be at least as long as the loadbalancer check -# interval for the services stopped during deploy (Default: 1). -# -# [*report_email*] -# (Optional) - The (space separated) email(s) to notify of deploy/rollback -# operations. If none is specified, no email is sent. -# -# [*report_mongo*] -# (Optional) - A mongourl with optional user:password to report to. Append the -# database with a slash ("mongodb://user:password@mymongo.mydomain.com/theNameOfDb") -# -# [*backup_rsync_options*] -# (Optional) - The extra options to pass to rsync for backup operations. Use -# it, for example, to exclude directories that you don't want to archive. -# IE: "--exclude .snapshot --exclude cache --exclude www/cache". -# -# [*backup_retention*] -# (Optional) - Number of backup archives to keep. (Default 5). -# Lower the default value if your backups are too large and may fill up the -# filesystem. -# -# [*run_checks*] -# (Optional) - If you want to run local puppi checks before and after the -# deploy procedure. Default: "true". -# -# [*always_deploy*] -# (Optional) - If you always deploy what has been downloaded. Default="yes", -# if set to "no" a checksum is made between the files previously downloaded -# and the new files. If they are the same the deploy is not done. -# -# [*check_deploy*] -# (Optional) - Checks if the war is deployed (Default yes). Set to no if -# you deploy on Jboss or the deployed dir is different for the war filename -# -# [*auto_deploy*] -# (Optional) - If you want to automatically run this puppi deploy when -# Puppet runs. Default: 'false' -# -define puppi::project::maven ( - $source, - $http_user = '', - $http_password = '', - $artifact_type = 'release', - $deploy_root = '', - $user = 'root', - $war_suffix = 'suffixnotset', - $zip_root = '', - $zip_user = '', - $zip_suffix = 'suffixnotset', - $jar_root = '', - $jar_user = '', - $jar_suffix = 'suffixnotset', - $document_root = '', - $document_user = '', - $document_suffix = 'suffixnotset', - $document_init_source = '', - $config_root = '', - $config_user = '', - $config_suffix = 'suffixnotset', - $config_init_source = '', - $predeploy_customcommand = '', - $predeploy_user = '', - $predeploy_priority = '39', - $postdeploy_customcommand = '', - $postdeploy_user = '', - $postdeploy_priority = '41', - $init_script = '', - $disable_services = '', - $firewall_src_ip = '', - $firewall_dst_port = '0', - $firewall_delay = '1', - $report_email = '', - $report_mongo = '', - $backup_rsync_options = '--exclude .snapshot', - $backup_retention = '5', - $run_checks = true, - $always_deploy = true, - $check_deploy = true, - $auto_deploy = false, - $enable = true ) { - - require puppi - require puppi::params - - # Set default values - $predeploy_real_user = $predeploy_user ? { - '' => $user, - default => $predeploy_user, - } - - $postdeploy_real_user = $postdeploy_user ? { - '' => $user, - default => $postdeploy_user, - } - - $config_real_user = $config_user ? { - '' => $user, - default => $config_user, - } - - $document_real_user = $document_user ? { - '' => $user, - default => $document_user, - } - - $jar_real_user = $jar_user ? { - '' => $user, - default => $jar_user, - } - - $zip_real_user = $zip_user ? { - '' => $user, - default => $zip_user, - } - - $real_always_deploy = any2bool($always_deploy) ? { - false => 'no', - true => 'yes', - } - - $bool_run_checks = any2bool($run_checks) - $bool_check_deploy = any2bool($check_deploy) - $bool_auto_deploy = any2bool($auto_deploy) - - -### CREATE PROJECT - puppi::project { $name: - enable => $enable , - } - - -### INIT SEQUENCE - if ($document_init_source != '') { - puppi::initialize { "${name}-Deploy_Files": - priority => '40' , - command => 'get_file.sh' , - arguments => "-s ${document_init_source} -d ${deploy_root}" , - user => $document_real_user , - project => $name , - enable => $enable , - } - } - - if ($config_init_source != '') { - puppi::initialize { "${name}-Deploy_CFG_Files": - priority => '40' , - command => 'get_file.sh' , - arguments => "-s ${config_init_source} -d ${deploy_root}" , - user => $config_real_user , - project => $name , - enable => $enable , - } - } - -### DEPLOY SEQUENCE - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_PRE-Checks": - priority => '10' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - $metadata_arguments = $http_password ? { - '' => "-s ${source}/maven-metadata.xml -t maven-metadata -a ${real_always_deploy}", - default => "-s ${source}/maven-metadata.xml -t maven-metadata -a ${real_always_deploy} -u ${http_user} -p ${http_password}" - } - - puppi::deploy { "${name}-Get_Maven_Metadata_File": - priority => '20' , - command => 'get_file.sh' , - arguments => $metadata_arguments, - user => 'root' , - project => $name , - enable => $enable , - } - - puppi::deploy { "${name}-Extract_Maven_Metadata": - priority => '22' , - command => 'get_metadata.sh' , - arguments => "-m ${document_suffix} -mc ${config_suffix} -mj ${jar_suffix} -mw ${war_suffix} -mz ${zip_suffix} -at ${artifact_type}" , - user => 'root' , - project => $name , - enable => $enable , - } - - # Files retrieval - if ($deploy_root != '') { - $war_arguments = $http_password ? { - '' => "${source} warfile", - default => "-u ${http_user} -p ${http_password} ${source} warfile" - } - - puppi::deploy { "${name}-Get_Maven_Files_WAR": - priority => '25' , - command => 'get_maven_files.sh' , - arguments => $war_arguments, - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($jar_root != '') { - puppi::deploy { "${name}-Get_Maven_Files_JAR": - priority => '25' , - command => 'get_maven_files.sh' , - arguments => "${source} jarfile" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($config_root != '') { - puppi::deploy { "${name}-Get_Maven_Files_Config": - priority => '25' , - command => 'get_maven_files.sh' , - arguments => "${source} configfile" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($document_root != '') { - puppi::deploy { "${name}-Get_Maven_Files_SRC": - priority => '25' , - command => 'get_maven_files.sh' , - arguments => "${source} srcfile" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($zip_root != '') { - $real_arguments = $http_password ? { - '' => "${source} zipfile", - default => "-u ${http_user} -p ${http_password} ${source} zipfile" - } - - puppi::deploy { "${name}-Get_Maven_Files_ZIP": - priority => '25' , - command => 'get_maven_files.sh' , - arguments => $real_arguments, - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Block": - priority => '30' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - # Existing files backup - if ($deploy_root != '') { - puppi::deploy { "${name}-Backup_Existing_WAR": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${deploy_root} -t war -s move -m diff -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($jar_root != '') { - puppi::deploy { "${name}-Backup_Existing_JAR": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${jar_root} -t jar -s move -m diff -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($config_root != '') { - puppi::deploy { "${name}-Backup_Existing_ConfigDir": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${config_root} -t config -d predeploydir_configfile -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($document_root != '') { - puppi::deploy { "${name}-Backup_Existing_DocumentDir": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${document_root} -t docroot -d predeploydir_configfile -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($zip_root != '') { - puppi::deploy { "${name}-Backup_Existing_ZipDir": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${zip_root} -t ziproot -d predeploydir_zipfile -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($bool_check_deploy == true) and ($deploy_root != '') { - puppi::deploy { "${name}-Check_undeploy": - priority => '31' , - command => 'checkwardir.sh' , - arguments => "-a ${deploy_root} -c deploy_warpath" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Disable_extra_services": - priority => '36' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - # Deploys - if ($deploy_root != '') { - puppi::deploy { "${name}-Deploy_Maven_WAR": - priority => '40' , - command => 'deploy.sh' , - arguments => $deploy_root , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($jar_root != '') { - puppi::deploy { "${name}-Deploy_Maven_JAR": - priority => '40' , - command => 'deploy.sh' , - arguments => $jar_root , - user => $jar_real_user , - project => $name , - enable => $enable , - } - } - - if ($config_root != '') { - puppi::deploy { "${name}-Deploy_ConfigDir": - priority => '40' , - command => 'deploy.sh' , - arguments => "${config_root} predeploydir_configfile" , - user => $config_real_user , - project => $name , - enable => $enable , - } - } - - if ($document_root != '') { - puppi::deploy { "${name}-Deploy_DocumentDir": - priority => '40' , - command => 'deploy.sh' , - arguments => "${document_root} predeploydir_srcfile" , - user => $document_real_user , - project => $name , - enable => $enable , - } - } - - if ($zip_root != '') { - puppi::deploy { "${name}-Deploy_Zip": - priority => '40' , - command => 'deploy.sh' , - arguments => "${zip_root} predeploydir_zipfile" , - user => $zip_real_user , - project => $name , - enable => $enable , - } - } - - if ($postdeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_start": - priority => '42' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_check_deploy == true) and ($deploy_root != '') { - puppi::deploy { "${name}-Check_deploy": - priority => '45' , - command => 'checkwardir.sh' , - arguments => "-p ${deploy_root} -c deploy_warpath" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### ROLLBACK PROCEDURE - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Disable_extra_services": - priority => '37' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($deploy_root != '') { - puppi::rollback { "${name}-Recover_WAR": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${deploy_root} -t war -o '${backup_rsync_options}'" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($jar_root != '') { - puppi::rollback { "${name}-Recover_JAR": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${jar_root} -t jar -o '${backup_rsync_options}'" , - user => $jar_real_user , - project => $name , - enable => $enable , - } - } - - if ($config_root != '') { - puppi::rollback { "${name}-Recover_ConfigDir": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${config_root} -t config -o '${backup_rsync_options}'" , - user => $config_real_user , - project => $name , - enable => $enable , - } - } - - if ($document_root != '') { - puppi::rollback { "${name}-Recover_DocumentDir": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${document_root} -t docroot -o '${backup_rsync_options}'" , - user => $document_real_user , - project => $name , - enable => $enable , - } - } - - if ($postdeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_start": - priority => '42' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_check_deploy == true) { - puppi::rollback { "${name}-Check_deploy": - priority => '45' , - command => 'checkwardir.sh' , - arguments => "-p ${deploy_root} -c deploy_warpath" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::rollback { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### REPORTING - - if ($report_email != '') { - puppi::report { "${name}-Mail_Notification": - priority => '20' , - command => 'report_mail.sh' , - arguments => $report_email , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($report_mongo != '') { - puppi::report { "${name}-Mongo_Store": - priority => '30' , - command => 'report_mongo.sh' , - arguments => $report_mongo , - user => 'root', - project => $name , - enable => $enable , - } - } - -### AUTO DEPLOY DURING PUPPET RUN - if ($bool_auto_deploy == true) { - puppi::run { $name: } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/mysql.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/mysql.pp deleted file mode 100644 index aa787d80ac..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/mysql.pp +++ /dev/null @@ -1,425 +0,0 @@ -# = Define puppi::project::mysql -# -# This is a shortcut define to build a puppi project for the -# management of mysql queries, contained in the .sql file defined -# as $source -# -# == Variables: -# -# [*source*] -# The full URL of the main sql file to retrieve. -# Format should be in URI standard (http:// file:// ssh:// rsync://). -# -# [*mysql_database*] -# (Required) - The Mysql database to work on -# Default: root -# -# [*mysql_user*] -# (Optional) - The Mysql user to be used to run the queries -# Default: root -# -# [*mysql_password*] -# (Optional) - The password to use for the specified mysql user -# Default: '' (blank) -# -# [*mysql_host*] -# (Optional) - The Mysql server. Use ip or hostname -# Default: localhost -# -# [*init_source*] -# (Optional) - The full URL to be used to retrieve a sql file to -# process only for the first time, -# -# [*predeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute before the deploy. The command is executed as $predeploy_user. -# -# [*predeploy_user*] -# (Optional) - The user to be used to execute the $predeploy_customcommand. -# By default is the same of $user. -# -# [*predeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $predeploy_customcommand is executed -# Default: 39 (immediately before the copy of files on the deploy root). -# -# [*postdeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute after the deploy. The command is executed as $postdeploy_user. -# -# [*postdeploy_user*] -# (Optional) - The user to be used to execute the $postdeploy_customcommand. -# By default is the same of $user. -# -# [*postdeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $postdeploy_customcommand is executed -# Default: 41 (immediately after the copy of files on the deploy root). -# -# [*disable_services*] -# (Optional) - The names (space separated) of the services you might want to -# stop during deploy. By default is blank. Example: "apache puppet monit". -# -# [*firewall_src_ip*] -# (Optional) - The IP address of a loadbalancer you might want to block out -# during a deploy. -# -# [*firewall_dst_port*] -# (Optional) - The local port to block from the loadbalancer during deploy -# (Default all). -# -# [*firewall_delay*] -# (Optional) - A delay time in seconds to wait after the block of -# $firewall_src_ip. Should be at least as long as the loadbalancer check -# interval for the services stopped during deploy (Default: 1). -# -# [*report_email*] -# (Optional) - The (space separated) email(s) to notify of deploy/rollback -# operations. If none is specified, no email is sent. -# -# [*backup*] -# (Optional) - If and how backups of existing databases are made. -# Default: true -# -# [*backup_retention*] -# (Optional) - Number of backup archives to keep. (Default 5). -# Lower the default value if your backups are too large and may fill up the -# filesystem. -# -# [*run_checks*] -# (Optional) - If you want to run local puppi checks before and after the -# deploy procedure. Default: "true". -# -# [*always_deploy*] -# (Optional) - If you always deploy what has been downloaded. Default="yes", -# if set to "no" a checksum is made between the files previously downloaded -# and the new files. If they are the same the deploy is not done. -# -# [*auto_deploy*] -# (Optional) - If you want to automatically run this puppi deploy when -# Puppet runs. Default: 'false' -# -define puppi::project::mysql ( - $source, - $mysql_database, - $mysql_user = 'root', - $mysql_host = 'localhost', - $mysql_password = '', - $init_source = '', - $predeploy_customcommand = '', - $predeploy_user = '', - $predeploy_priority = '39', - $postdeploy_customcommand = '', - $postdeploy_user = '', - $postdeploy_priority = '41', - $disable_services = '', - $firewall_src_ip = '', - $firewall_dst_port = '0', - $firewall_delay = '1', - $report_email = '', - $backup = true, - $backup_retention = '5', - $run_checks = true, - $always_deploy = true, - $auto_deploy = false, - $enable = true ) { - - require puppi - require puppi::params - - # Set default values - $predeploy_real_user = $predeploy_user ? { - '' => 'root', - default => $predeploy_user, - } - - $postdeploy_real_user = $postdeploy_user ? { - '' => 'root', - default => $postdeploy_user, - } - - $init_real_source = $init_source ? { - '' => $source, - default => $init_source, - } - - $real_always_deploy = any2bool($always_deploy) ? { - false => 'no', - true => 'yes', - } - - $bool_run_checks = any2bool($run_checks) - $bool_backup = any2bool($backup) - $real_source_type = 'mysql' - $bool_auto_deploy = any2bool($auto_deploy) - - $source_filename = url_parse($source,'filename') - -### CREATE PROJECT - puppi::project { $name: - enable => $enable , - } - - -### INIT SEQUENCE - if ($init_source != '') { - puppi::initialize { "${name}-Deploy_Files": - priority => '40' , - command => 'get_file.sh' , - arguments => "-s ${init_source} -t ${real_source_type}" , - user => root , - project => $name , - enable => $enable , - } - puppi::initialize { "${name}-Run_SQL": - priority => '42' , - command => 'database.sh' , - arguments => "-t mysql -a run -u ${mysql_user} -p '${mysql_password}' -d ${mysql_database} -h ${mysql_host}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### DEPLOY SEQUENCE - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_PRE-Checks": - priority => '10' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - puppi::deploy { "${name}-Retrieve_SQLFile": - priority => '20' , - command => 'get_file.sh' , - arguments => "-s ${source} -t ${real_source_type} -a ${real_always_deploy}" , - user => 'root' , - project => $name , - enable => $enable , - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_backup == true) { - puppi::deploy { "${name}-Backup_Database": - priority => '30' , - command => 'database.sh' , - arguments => "-t mysql -a dump -u ${mysql_user} -p '${mysql_password}' -d ${mysql_database} -h ${mysql_host}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Disable_extra_services": - priority => '36' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - # Here is done the db change - puppi::deploy { "${name}-Run_SQL": - priority => '40' , - command => 'database.sh' , - arguments => "-t mysql -a run -u ${mysql_user} -p '${mysql_password}' -d ${mysql_database} -h ${mysql_host}" , - user => 'root' , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### ROLLBACK PROCEDURE - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_backup == true) { - puppi::rollback { "${name}-Backup_Database_PreRollback": - priority => '30' , - command => 'database.sh' , - arguments => "-t mysql -a dump -u ${mysql_user} -p '${mysql_password}' -d ${mysql_database} -h ${mysql_host}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Disable_extra_services": - priority => '37' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($bool_backup == true) { - puppi::rollback { "${name}-Recover_Database": - priority => '40' , - command => 'database.sh' , - arguments => "-t mysql -a restore -u ${mysql_user} -p '${mysql_password}' -d ${mysql_database} -h ${mysql_host}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($postdeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::rollback { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### REPORTING - - if ($report_email != '') { - puppi::report { "${name}-Mail_Notification": - priority => '20' , - command => 'report_mail.sh' , - arguments => $report_email , - user => 'root', - project => $name , - enable => $enable , - } - } - -### AUTO DEPLOY DURING PUPPET RUN - if ($bool_auto_deploy == true) { - puppi::run { $name: } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/service.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/service.pp deleted file mode 100644 index 62eb6c8b95..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/service.pp +++ /dev/null @@ -1,352 +0,0 @@ -# = Define puppi::project::service -# -# This is a shortcut define to build a case-limit puppi project -# that just manages services and custom commands without deploying -# any file. It doesn't require any parameter but you should at least -# provide one among predeploy_customcommand, postdeploy_customcommand, -# init_script, disable_services to make something useful. -# The rollback option is kept for coherency with the standard puppi -# deploy approach, but actually should not be used since there is no -# data to rollback. -# -# == Variables: -# -# [*user*] -# (Optional) - The user to be used for deploy operations. -# -# [*predeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute before the deploy. The command is executed as $predeploy_user. -# -# [*predeploy_user*] -# (Optional) - The user to be used to execute the $predeploy_customcommand. -# By default is the same of $user. -# -# [*predeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $predeploy_customcommand is executed -# Default: 39 (immediately before the copy of files on the deploy root). -# -# [*postdeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute after the deploy. The command is executed as $postdeploy_user. -# -# [*postdeploy_user*] -# (Optional) - The user to be used to execute the $postdeploy_customcommand. -# By default is the same of $user. -# -# [*postdeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $postdeploy_customcommand is executed -# Default: 41 (immediately after the copy of files on the deploy root). -# -# [*init_script*] -# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your -# Application server. If you define it, the AS is stopped and then started -# during deploy. This option is deprecated, you can use $disable_services -# for the same functionality -# -# [*disable_services*] -# (Optional) - The names (space separated) of the services you might want to -# stop during deploy. By default is blank. Example: "apache puppet monit". -# -# [*firewall_src_ip*] -# (Optional) - The IP address of a loadbalancer you might want to block out -# during a deploy. -# -# [*firewall_dst_port*] -# (Optional) - The local port to block from the loadbalancer during deploy -# (Default all). -# -# [*firewall_delay*] -# (Optional) - A delay time in seconds to wait after the block of -# $firewall_src_ip. Should be at least as long as the loadbalancer check -# interval for the services stopped during deploy (Default: 1). -# -# [*report_email*] -# (Optional) - The (space separated) email(s) to notify of deploy/rollback -# operations. If none is specified, no email is sent. -# -# [*run_checks*] -# (Optional) - If you want to run local puppi checks before and after the -# deploy procedure. Default: "true". -# -# [*auto_deploy*] -# (Optional) - If you want to automatically run this puppi deploy when -# Puppet runs. Default: 'false' -# -define puppi::project::service ( - $user = 'root', - $predeploy_customcommand = '', - $predeploy_user = '', - $predeploy_priority = '39', - $postdeploy_customcommand = '', - $postdeploy_user = '', - $postdeploy_priority = '41', - $init_script = '', - $disable_services = '', - $firewall_src_ip = '', - $firewall_dst_port = '0', - $firewall_delay = '1', - $report_email = '', - $run_checks = true, - $auto_deploy = false, - $enable = true ) { - - require puppi - require puppi::params - - # Set default values - $predeploy_real_user = $predeploy_user ? { - '' => $user, - default => $predeploy_user, - } - - $postdeploy_real_user = $postdeploy_user ? { - '' => $user, - default => $postdeploy_user, - } - - $bool_run_checks = any2bool($run_checks) - $bool_auto_deploy = any2bool($auto_deploy) - -### CREATE PROJECT - puppi::project { $name: - enable => $enable , - } - - -### DEPLOY SEQUENCE - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_PRE-Checks": - priority => '10' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Disable_extra_services": - priority => '36' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - - if ($postdeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_start": - priority => '42' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### ROLLBACK PROCEDURE - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Disable_extra_services": - priority => '37' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($postdeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_start": - priority => '42' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::rollback { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### REPORTING - - if ($report_email != '') { - puppi::report { "${name}-Mail_Notification": - priority => '20' , - command => 'report_mail.sh' , - arguments => $report_email , - user => 'root', - project => $name , - enable => $enable , - } - } - -### AUTO DEPLOY DURING PUPPET RUN - if ($bool_auto_deploy == true) { - puppi::run { $name: } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/svn.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/svn.pp deleted file mode 100644 index 0affd38de4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/svn.pp +++ /dev/null @@ -1,438 +0,0 @@ -# == Define puppi::project::svn -# -# This is a shortcut define to build a puppi project for the deploy of -# file from a svn repo. -# It uses different "core" defines (puppi::project, puppi:deploy (many), -# puppi::rollback (many)) to build a full featured template project for -# automatic deployments. -# If you need to customize it, either change the template defined here or -# build up your own custom ones. -# -# == Variables: -# -# [*source*] -# The full URL of the svn repo to retrieve. -# Format should be in svn friendly standard (http:// svn:// ..). -# -# [*svn_user*] -# Name of the user to access a private svn repo. Optional. -# -# [*svn_password*] -# Name of the password to access a private svn repo. Optional. -# -# [*deploy_root*] -# The destination directory where the retrieved file(s) are deployed. -# -# [*install_svn*] -# If the svn package has to be installed. Default true. -# Set to false if you install svn via other modules and have resource -# conflicts. -# -# [*svn_subdir*] -# (Optional) - If you want to copy to the deploy_root only a subdir -# of the specified svn repo, specify here the path of the directory -# relative to the repo root. Default undefined -# -# [*svn_export*] -# (Optional) - If to use a svn export command instead of checkout -# Default: false (A checkout is done) -# -# [*tag*] -# (Optional) - A specific tag you may want to deploy. Default undefined -# You can override the default value via command-line with: -# puppi deploy myapp -o "tag=release" -# -# [*branch*] -# (Optional) - A specific branch you may want to deploy. Default: master -# You can override the default value via command-line with: -# puppi deploy myapp -o "branch=devel" -# -# [*commit*] -# (Optional) - A specific commit you may want to use. Default undefined -# You can override the default value via command-line with: -# puppi deploy myapp -o "commit=1061cb731bc75a1188b58b889b74ce1505ccb412" -# -# [*keep_svndata*] -# (Optional) - Define if you want to keep svn metadata directory (.svn) -# in the deploy root. According to this value backup and rollback -# operations change (with keep_svndata set to true no real backups are done -# and operations are made on the svn tree, if set to false, file are copied -# and the $backup_* options used. Default is true -# -# [*verbose*] -# (Optional) - If you want to see verbose svn utput (file names) during -# the deploy. Default is true. -# -# [*user*] -# (Optional) - The user to be used for deploy operations. -# If different from root (default) it must have write permissions on -# the $deploy_root dir. -# -# [*predeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute before the deploy. The command is executed as $predeploy_user. -# -# [*predeploy_user*] -# (Optional) - The user to be used to execute the $predeploy_customcommand. -# By default is the same of $user. -# -# [*predeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $predeploy_customcommand is executed -# Default: 39 (immediately before the copy of files on the deploy root). -# -# [*postdeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute after the deploy. The command is executed as $postdeploy_user. -# -# [*postdeploy_user*] -# (Optional) - The user to be used to execute the $postdeploy_customcommand. -# By default is the same of $user. -# -# [*postdeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $postdeploy_customcommand is executed -# Default: 41 (immediately after the copy of files on the deploy root). -# -# [*disable_services*] -# (Optional) - The names (space separated) of the services you might want to -# stop during deploy. By default is blank. Example: "apache puppet monit". -# -# [*firewall_src_ip*] -# (Optional) - The IP address of a loadbalancer you might want to block out -# during a deploy. -# -# [*firewall_dst_port*] -# (Optional) - The local port to block from the loadbalancer during deploy -# (Default all). -# -# [*firewall_delay*] -# (Optional) - A delay time in seconds to wait after the block of -# $firewall_src_ip. Should be at least as long as the loadbalancer check -# interval for the services stopped during deploy (Default: 1). -# -# [*report_email*] -# (Optional) - The (space separated) email(s) to notify of deploy/rollback -# operations. If none is specified, no email is sent. -# -# [*backup_enable*] -# (Optional, default true) - If the backup of files in the deploy dir -# is done (before deploy). If set to false, rollback is disabled. -# -# [*backup_rsync_options*] -# (Optional) - The extra options to pass to rsync for backup operations. Use -# it, for example, to exclude directories that you don't want to archive. -# IE: "--exclude .snapshot --exclude cache --exclude www/cache". -# This option is used when $keep_svnmeta is set to false -# -# [*backup_retention*] -# (Optional) - Number of backup archives to keep. (Default 5). -# Lower the default value if your backups are too large and may fill up the -# filesystem. -# This option is used when $keep_svnmeta is set to false -# -# [*run_checks*] -# (Optional) - If you want to run local puppi checks before and after the -# deploy procedure. Default: "true". -# -# [*auto_deploy*] -# (Optional) - If you want to automatically run this puppi deploy when -# Puppet runs. Default: 'false' -# -define puppi::project::svn ( - $source, - $deploy_root, - $install_svn = true, - $svn_user = 'undefined', - $svn_password = 'undefined', - $svn_subdir = 'undefined', - $svn_export = false, - $tag = 'undefined', - $branch = 'master', - $commit = 'undefined', - $keep_svndata = true, - $verbose = true, - $user = 'root', - $predeploy_customcommand = '', - $predeploy_user = '', - $predeploy_priority = '39', - $postdeploy_customcommand = '', - $postdeploy_user = '', - $postdeploy_priority = '41', - $disable_services = '', - $firewall_src_ip = '', - $firewall_dst_port = '0', - $firewall_delay = '1', - $report_email = '', - $backup_enable = true, - $backup_rsync_options = '--exclude .snapshot', - $backup_retention = '5', - $run_checks = true, - $auto_deploy = false, - $enable = true ) { - - require puppi - require puppi::params - - # Set default values - $predeploy_real_user = $predeploy_user ? { - '' => $user, - default => $predeploy_user, - } - - $postdeploy_real_user = $postdeploy_user ? { - '' => $user, - default => $postdeploy_user, - } - - $bool_install_svn = any2bool($install_svn) - $bool_svn_export = any2bool($svn_export) - $bool_keep_svndata = any2bool($keep_svndata) - $bool_verbose = any2bool($verbose) - $bool_backup_enable = any2bool($backup_enable) - $bool_run_checks = any2bool($run_checks) - $bool_auto_deploy = any2bool($auto_deploy) - -### INSTALL GIT - if ($bool_install_svn == true) { - if ! defined(Package['subversion']) { package { 'subversion': ensure => installed } } - } - -### CREATE PROJECT - puppi::project { $name: - enable => $enable , - } - - -### DEPLOY SEQUENCE - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_PRE-Checks": - priority => '10' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_keep_svndata == true and $bool_backup_enable == true) { - puppi::deploy { "${name}-Backup_existing_data": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${deploy_root} -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Disable_extra_services": - priority => '36' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - # Here is done the deploy on $deploy_root - puppi::deploy { "${name}-Deploy_Files": - priority => '40' , - command => 'svn.sh' , - arguments => "-a deploy -s ${source} -d ${deploy_root} -u ${user} -gs ${svn_subdir} -su ${svn_user} -sp ${svn_password} -t ${tag} -b ${branch} -c ${commit} -v ${bool_verbose} -k ${bool_keep_svndata} -e ${bool_svn_export}" , - user => 'root' , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### ROLLBACK PROCEDURE - - if ($bool_backup_enable == true) { - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Disable_extra_services": - priority => '37' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($bool_keep_svndata == true) { - puppi::rollback { "${name}-Recover_Files_To_Deploy": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${deploy_root} -o '${backup_rsync_options}'" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($bool_keep_svndata != true) { - puppi::rollback { "${name}-Rollback_Files": - priority => '40' , - command => 'svn.sh' , - arguments => "-a rollback -s ${source} -d ${deploy_root} -gs ${svn_subdir} -t ${tag} -b ${branch} -c ${commit} -v ${bool_verbose} -k ${bool_keep_svndata}" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($postdeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::rollback { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - } - -### REPORTING - - if ($report_email != '') { - puppi::report { "${name}-Mail_Notification": - priority => '20' , - command => 'report_mail.sh' , - arguments => $report_email , - user => 'root', - project => $name , - enable => $enable , - } - } - -### AUTO DEPLOY DURING PUPPET RUN - if ($bool_auto_deploy == true) { - puppi::run { $name: } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/tar.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/tar.pp deleted file mode 100644 index 3206864f1f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/tar.pp +++ /dev/null @@ -1,479 +0,0 @@ -# = Define puppi::project::tar -# -# This is a shortcut define to build a puppi project for the -# deploy of a tar.gz file into a deploy root -# -# It uses different "core" defines (puppi::project, puppi:deploy (many), -# puppi::rollback (many)) to build a full featured template project for -# automatic deployments. -# If you need to customize it, either change the template defined here or -# build up your own custom ones. -# -# == Variables: -# -# [*source*] -# The full URL of the main file to retrieve. -# Format should be in URI standard (http:// file:// ssh:// rsync://). -# -# [*deploy_root*] -# The destination directory where the retrieved file(s) are deployed. -# -# [*init_source*] -# (Optional) - The full URL to be used to retrieve, for the first time, -# the project files. They are copied directly to the $deploy_root -# Format should be in URI standard (http:// file:// ssh:// svn://). -# -# [*user*] -# (Optional) - The user to be used for deploy operations. -# -# [*predeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute before the deploy. The command is executed as $predeploy_user. -# -# [*predeploy_user*] -# (Optional) - The user to be used to execute the $predeploy_customcommand. -# By default is the same of $user. -# -# [*predeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $predeploy_customcommand is executed -# Default: 39 (immediately before the copy of files on the deploy root). -# -# [*postdeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute after the deploy. The command is executed as $postdeploy_user. -# -# [*postdeploy_user*] -# (Optional) - The user to be used to execute the $postdeploy_customcommand. -# By default is the same of $user. -# -# [*postdeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $postdeploy_customcommand is executed -# Default: 41 (immediately after the copy of files on the deploy root). -# -# [*init_script*] -# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your -# Application server. If you define it, the AS is stopped and then started -# during deploy. This option is deprecated, you can use $disable_services -# for the same functionality -# -# [*disable_services*] -# (Optional) - The names (space separated) of the services you might want to -# stop during deploy. By default is blank. Example: "apache puppet monit". -# -# [*firewall_src_ip*] -# (Optional) - The IP address of a loadbalancer you might want to block out -# during a deploy. -# -# [*firewall_dst_port*] -# (Optional) - The local port to block from the loadbalancer during deploy -# (Default all). -# -# [*firewall_delay*] -# (Optional) - A delay time in seconds to wait after the block of -# $firewall_src_ip. Should be at least as long as the loadbalancer check -# interval for the services stopped during deploy (Default: 1). -# -# [*report_email*] -# (Optional) - The (space separated) email(s) to notify of deploy/rollback -# operations. If none is specified, no email is sent. -# -# [*clean_deploy*] -# (Optional, default false) - If during the deploy procedure, all the -# existing files that are not on the source have to be deleted. -# (When true, a --delete option is added to the rsync command) -# Do not set to true if source files are incremental. -# -# [*backup_enable*] -# (Optional, default true) - If the backup of files in the deploy dir -# is done (before deploy). If set to false, rollback is disabled. -# -# [*backup_rsync_options*] -# (Optional) - The extra options to pass to rsync for backup operations. Use -# it, for example, to exclude directories that you don't want to archive. -# IE: "--exclude .snapshot --exclude cache --exclude www/cache". -# -# [*backup_retention*] -# (Optional) - Number of backup archives to keep. (Default 5). -# Lower the default value if your backups are too large and may fill up the -# filesystem. -# -# [*run_checks*] -# (Optional) - If you want to run local puppi checks before and after the -# deploy procedure. Default: "true". -# -# [*always_deploy*] -# (Optional) - If you always deploy what has been downloaded. Default="yes", -# if set to "no" a checksum is made between the files previously downloaded -# and the new files. If they are the same the deploy is not done. -# -# [*auto_deploy*] -# (Optional) - If you want to automatically run this puppi deploy when -# Puppet runs. Default: 'false' -# -define puppi::project::tar ( - $source, - $deploy_root, - $init_source = '', - $user = 'root', - $predeploy_customcommand = '', - $predeploy_user = '', - $predeploy_priority = '39', - $postdeploy_customcommand = '', - $postdeploy_user = '', - $postdeploy_priority = '41', - $init_script = '', - $disable_services = '', - $firewall_src_ip = '', - $firewall_dst_port = '0', - $firewall_delay = '1', - $report_email = '', - $clean_deploy = false, - $backup_enable = true, - $backup_rsync_options = '--exclude .snapshot', - $backup_retention = '5', - $run_checks = true, - $always_deploy = true, - $auto_deploy = false, - $verify_ssl = true, - $enable = true ) { - - require puppi - require puppi::params - - # Set default values - $predeploy_real_user = $predeploy_user ? { - '' => $user, - default => $predeploy_user, - } - - $postdeploy_real_user = $postdeploy_user ? { - '' => $user, - default => $postdeploy_user, - } - - $init_real_source = $init_source ? { - '' => $source, - default => $init_source, - } - - $real_always_deploy = any2bool($always_deploy) ? { - false => 'no', - true => 'yes', - } - - $bool_clean_deploy = any2bool($clean_deploy) - $bool_backup_enable = any2bool($backup_enable) - $bool_run_checks = any2bool($run_checks) - $bool_auto_deploy = any2bool($auto_deploy) - - if ($verify_ssl) { - $ssl_arg = '' - }else{ - $ssl_arg = '-k' - } - - -### CREATE PROJECT - puppi::project { $name: - enable => $enable , - } - - -### INIT SEQUENCE - if ($init_source != '') { - puppi::initialize { "${name}-Deploy_Files": - priority => '40' , - command => 'get_file.sh' , - arguments => "${ssl_arg} -s '${init_source}' -d ${deploy_root}" , - user => $user , - project => $name , - enable => $enable , - } - } - - -### DEPLOY SEQUENCE - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_PRE-Checks": - priority => '10' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - # Here source file is retrieved - puppi::deploy { "${name}-Retrieve_TarBall": - priority => '20' , - command => 'get_file.sh' , - arguments => "${ssl_arg} -s '${source}' -t tarball -a ${real_always_deploy}" , - user => 'root' , - project => $name , - enable => $enable , - } - - puppi::deploy { "${name}-PreDeploy_TarBall": - priority => '25' , - command => 'predeploy_tar.sh' , - arguments => 'downloadedfile' , - user => 'root' , - project => $name , - enable => $enable , - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_backup_enable == true) { - puppi::deploy { "${name}-Backup_existing_Files": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${deploy_root} -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Disable_extra_services": - priority => '36' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - # Here is done the deploy on $deploy_root - puppi::deploy { "${name}-Deploy": - priority => '40' , - command => 'deploy_files.sh' , - arguments => "-d ${deploy_root} -c ${bool_clean_deploy}", - user => $user , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_start": - priority => '42' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### ROLLBACK PROCEDURE - - if ($bool_backup_enable == true) { - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Disable_extra_services": - priority => '37' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - puppi::rollback { "${name}-Recover_Files_To_Deploy": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${deploy_root} -o '${backup_rsync_options}'" , - user => $user , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_start": - priority => '42' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::rollback { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - } - -### REPORTING - - if ($report_email != '') { - puppi::report { "${name}-Mail_Notification": - priority => '20' , - command => 'report_mail.sh' , - arguments => $report_email , - user => 'root', - project => $name , - enable => $enable , - } - } - -### AUTO DEPLOY DURING PUPPET RUN - if ($bool_auto_deploy == true) { - puppi::run { $name: } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/war.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/war.pp deleted file mode 100644 index f9ec025d07..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/war.pp +++ /dev/null @@ -1,525 +0,0 @@ -# == Define puppi::project::war -# -# This is a shortcut define to build a puppi project for the deploy of warfiles -# It uses different "core" defines (puppi::project, puppi:deploy (many), -# puppi::rollback (many)) to build a full featured template project for -# automatic deployments. -# If you need to customize it, either change the template defined here or -# build up your own custom ones. -# -# == Variables: -# -# [*source*] -# The full URL of the main file to retrieve. -# Format should be in URI standard (http:// file:// ssh:// rsync://). -# -# [*deploy_root*] -# The destination directory where the retrieved file(s) are deployed. -# -# [*init_source*] -# (Optional) - The full URL to be used to retrieve, for the first time, -# the project files. They are copied directly to the $deploy_root -# Format should be in URI standard (http:// file:// ssh:// svn://). -# -# [*user*] -# (Optional) - The user to be used for deploy operations. -# -# [*predeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute before the deploy. The command is executed as $predeploy_user. -# -# [*predeploy_user*] -# (Optional) - The user to be used to execute the $predeploy_customcommand. -# By default is the same of $user. -# -# [*predeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $predeploy_customcommand is executed -# Default: 39 (immediately before the copy of files on the deploy root). -# -# [*postdeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute after the deploy. The command is executed as $postdeploy_user. -# -# [*postdeploy_user*] -# (Optional) - The user to be used to execute the $postdeploy_customcommand. -# By default is the same of $user. -# -# [*postdeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $postdeploy_customcommand is executed -# Default: 41 (immediately after the copy of files on the deploy root). -# -# [*init_script*] -# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your -# Application server. If you define it, the AS is stopped and then started -# during deploy. This option is deprecated, you can use $disable_services -# for the same functionality -# -# [*disable_services*] -# (Optional) - The names (space separated) of the services you might want to -# stop during deploy. By default is blank. Example: "apache puppet monit". -# -# [*firewall_src_ip*] -# (Optional) - The IP address of a loadbalancer you might want to block out -# during a deploy. -# -# [*firewall_dst_port*] -# (Optional) - The local port to block from the loadbalancer during deploy -# (Default all). -# -# [*firewall_delay*] -# (Optional) - A delay time in seconds to wait after the block of -# $firewall_src_ip. Should be at least as long as the loadbalancer check -# interval for the services stopped during deploy (Default: 1). -# -# [*report_email*] -# (Optional) - The (space separated) email(s) to notify of deploy/rollback -# operations. If none is specified, no email is sent. -# -# [*clean_deploy*] -# (Optional, default false) - If during the deploy procedure, all the -# existing files that are not on the source have to be deleted. -# (When true, a --delete option is added to the rsync command) -# Do not set to true if source files are incremental. -# -# [*backup_enable*] -# (Optional, default true) - If the backup of files in the deploy dir -# is done (before deploy). If set to false, rollback is disabled. -# -# [*backup_rsync_options*] -# (Optional) - The extra options to pass to rsync for backup operations. Use -# it, for example, to exclude directories that you don't want to archive. -# IE: "--exclude .snapshot --exclude cache --exclude www/cache". -# -# [*backup_retention*] -# (Optional) - Number of backup archives to keep. (Default 5). -# Lower the default value if your backups are too large and may fill up the -# filesystem. -# -# [*run_checks*] -# (Optional) - If you want to run local puppi checks before and after the -# deploy procedure. Default: "true". -# -# [*always_deploy*] -# (Optional) - If you always deploy what has been downloaded. Default="yes", -# if set to "no" a checksum is made between the files previously downloaded -# and the new files. If they are the same the deploy is not done. -# -# [*check_deploy*] -# (Optional) - Checks if the war is deployed (Default yes). Set to no if -# you deploy on Jboss or the deployed dir is different for the war filename -# -# [*auto_deploy*] -# (Optional) - If you want to automatically run this puppi deploy when -# Puppet runs. Default: 'false' -# -define puppi::project::war ( - $source, - $deploy_root, - $init_source = '', - $user = 'root', - $predeploy_customcommand = '', - $predeploy_user = '', - $predeploy_priority = '39', - $postdeploy_customcommand = '', - $postdeploy_user = '', - $postdeploy_priority = '41', - $init_script = '', - $disable_services = '', - $firewall_src_ip = '', - $firewall_dst_port = '0', - $firewall_delay = '1', - $report_email = '', - $clean_deploy = false, - $backup_enable = true, - $backup_rsync_options = '--exclude .snapshot', - $backup_retention = '5', - $run_checks = true, - $always_deploy = true, - $check_deploy = true, - $auto_deploy = false, - $enable = true ) { - - require puppi - require puppi::params - - # Set default values - $predeploy_real_user = $predeploy_user ? { - '' => $user, - default => $predeploy_user, - } - - $postdeploy_real_user = $postdeploy_user ? { - '' => $user, - default => $postdeploy_user, - } - - # Unless explicitely defined, we assume that the WAR file to use - # for initialization is the same to use for deploys - $init_real_source = $init_source ? { - '' => $source, - default => $init_source, - } - - $real_always_deploy = any2bool($always_deploy) ? { - false => 'no', - true => 'yes', - } - - $bool_run_checks = any2bool($run_checks) - $bool_clean_deploy = any2bool($clean_deploy) - $bool_backup_enable = any2bool($backup_enable) - $bool_check_deploy = any2bool($check_deploy) - $bool_auto_deploy = any2bool($auto_deploy) - - $war_file = url_parse($source,'filename') - - -### CREATE PROJECT - puppi::project { $name: - enable => $enable , - } - - -### INIT SEQUENCE - if ($init_source != '') { - puppi::initialize { "${name}-Deploy_Files": - priority => '40' , - command => 'get_file.sh' , - arguments => "-s ${init_source} -d ${deploy_root}" , - user => $user , - project => $name , - enable => $enable , - } - } - - -### DEPLOY SEQUENCE - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_PRE-Checks": - priority => '10' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - # Here source file is retrieved - puppi::deploy { "${name}-Retrieve_WAR": - priority => '20' , - command => 'get_file.sh' , - arguments => "-s ${source} -a ${real_always_deploy}" , - user => 'root' , - project => $name , - enable => $enable , - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_backup_enable == true) { - puppi::deploy { "${name}-Backup_existing_WAR": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${deploy_root} -t war -s move -m diff -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } -} - - if ($bool_check_deploy == true) { - puppi::deploy { "${name}-Check_undeploy": - priority => '32' , - command => 'checkwardir.sh' , - arguments => "-a ${deploy_root}/${war_file}" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Disable_extra_services": - priority => '36' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - # Here is done the deploy on $deploy_root - puppi::deploy { "${name}-Deploy_WAR": - priority => '40' , - command => 'deploy_files.sh' , - arguments => "-d ${deploy_root} -c ${bool_clean_deploy}", - user => $user , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_start": - priority => '42' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_check_deploy == true) { - puppi::deploy { "${name}-Check_deploy": - priority => '45' , - command => 'checkwardir.sh' , - arguments => "-p ${deploy_root}/${war_file}" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### ROLLBACK PROCEDURE - - if ($bool_backup_enable == true) { - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - puppi::rollback { "${name}-Remove_existing_WAR": - priority => '30' , - command => 'delete.sh' , - arguments => "${deploy_root}/${war_file}" , - user => 'root' , - project => $name , - enable => $enable , - } - - if ($bool_check_deploy == true) { - puppi::rollback { "${name}-Check_undeploy": - priority => '36' , - command => 'checkwardir.sh' , - arguments => "-a ${deploy_root}/${war_file}" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Disable_extra_services": - priority => '37' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - puppi::rollback { "${name}-Recover_Files_To_Deploy": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${deploy_root} -t war -o '${backup_rsync_options}'" , - user => $user , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_start": - priority => '42' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_check_deploy == true) { - puppi::rollback { "${name}-Check_deploy": - priority => '45' , - command => 'checkwardir.sh' , - arguments => "-p ${deploy_root}/${war_file}" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::rollback { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - } - -### REPORTING - - if ($report_email != '') { - puppi::report { "${name}-Mail_Notification": - priority => '20' , - command => 'report_mail.sh' , - arguments => $report_email , - user => 'root', - project => $name , - enable => $enable , - } - } - -### AUTO DEPLOY DURING PUPPET RUN - if ($bool_auto_deploy == true) { - puppi::run { $name: } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/y4maven.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/y4maven.pp deleted file mode 100644 index ec48cf419e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/y4maven.pp +++ /dev/null @@ -1,723 +0,0 @@ -# = Define puppi::project::y4maven -# -# This is a shortcut define to build a puppi project for the -# deploying hybris-production-zips via Maven and published on -# a repository like artifactory. -# -# It uses different "core" defines (puppi::project, puppi:deploy (many), -# puppi::rollback (many)) to build a full featured template project for -# automatic deployments. -# If you need to customize it, either change the template defined here or -# build up your own custom ones. -# -# == Variables: -# -# [*source*] -# The full URL of the maven-metadata.xml file to retrieve. -# Format should be in URI standard (http:// file:// ssh:// rsync://). -# -# [*http_password*] -# The http_password to use for authentication to the source in case of http. -# -# [*http_user*] -# The http_user to use for authentication to the source in case of http. -# -# [*artifact_type*] -# The artifact_type to parse the maven-metadata.xml. Either "release" or "latest" -# Default is "release". With artifactory, don't use the -# "Maven Snapshot Version Behavior" "unique" for your repository. -# -# [*deploy_root*] -# The destination directory where file(s) are deployed. -# -# [*user*] -# (Optional) - The user to be used for deploy operations. -# -# [*war_suffix*] -# (Optional) - The suffix (Maven qualifier) that might be appended to the war -# -# [*zip_suffix*] -# (Optional) - The suffix (Maven qualifier) that might be appended to the zip -# -# [*jar_root*] -# (Optional) - The destination directory where the jar is copied. -# If set a jar file is searched in Maven -# -# [*jar_user*] -# (Optional) - The user to be used for deploy operations of the jar -# (owner of the files deployed in $jar_root) -# -# [*jar_suffix*] -# (Optional) - The suffix (Maven qualifier) that might be appended to the jar -# -# [*document_root*] -# (Optional) - The destination directory where the eventual tarball generated -# via Maven containing static files ("src tar") is unpacked -# -# [*document_suffix*] -# (Optional) - The suffix (Maven qualifier) that might be appended to the -# static files tarballs ("src tar") -# -# [*document_init_source*] -# (Optional) - The full URL to be used to retrieve, for the first time, the -# project files present in the source tarball. They are copied to the -# $document_root. Format should be in URI standard (http:// file:// ...) -# -# [*document_user*] -# (Optional) - The user to be used for deploy operations of the tarball -# (owner of the files in $document_root) -# -# [*config_root*] -# (Optional) - The destination directory where the cfg tar is unpacked -# -# [*config_suffix*] -# (Optional) - The suffix (Maven qualifier) that might be appended to -# configuration tarballs ("cfg tar") -# -# [*config_init_source*] -# (Optional) - The full URL to be used to retrieve, for the first time, the -# project files present in the cfg tar. They are copied to the $config_root. -# Format should be in URI standard (http:// file:// ssh:// svn://) -# -# [*config_user*] -# (Optional) - The user to be used for deploy operations of cfg tar -# (owner of the files in $config_root) -# -# [*predeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute before the deploy. The command is executed as $predeploy_user. -# -# [*predeploy_user*] -# (Optional) - The user to be used to execute the $predeploy_customcommand. -# By default is the same of $user. -# -# [*predeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $predeploy_customcommand is executed -# Default: 39 (immediately before the copy of files on the deploy root). -# -# [*postdeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute after the deploy. The command is executed as $postdeploy_user. -# -# [*postdeploy_user*] -# (Optional) - The user to be used to execute the $postdeploy_customcommand. -# By default is the same of $user. -# -# [*postdeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $postdeploy_customcommand is executed -# Default: 41 (immediately after the copy of files on the deploy root). -# -# [*init_script*] -# (Optional - Obsolete) - The name (ex: tomcat) of the init script of your -# Application server. If you define it, the AS is stopped and then started -# during deploy. This option is deprecated, you can use $disable_services -# for the same functionality -# -# [*disable_services*] -# (Optional) - The names (space separated) of the services you might want to -# stop during deploy. By default is blank. Example: "apache puppet monit". -# -# [*firewall_src_ip*] -# (Optional) - The IP address of a loadbalancer you might want to block out -# during a deploy. -# -# [*firewall_dst_port*] -# (Optional) - The local port to block from the loadbalancer during deploy -# (Default all). -# -# [*firewall_delay*] -# (Optional) - A delay time in seconds to wait after the block of -# $firewall_src_ip. Should be at least as long as the loadbalancer check -# interval for the services stopped during deploy (Default: 1). -# -# [*report_email*] -# (Optional) - The (space separated) email(s) to notify of deploy/rollback -# operations. If none is specified, no email is sent. -# -# [*backup_rsync_options*] -# (Optional) - The extra options to pass to rsync for backup operations. Use -# it, for example, to exclude directories that you don't want to archive. -# IE: "--exclude .snapshot --exclude cache --exclude www/cache". -# -# [*backup_retention*] -# (Optional) - Number of backup archives to keep. (Default 5). -# Lower the default value if your backups are too large and may fill up the -# filesystem. -# -# [*run_checks*] -# (Optional) - If you want to run local puppi checks before and after the -# deploy procedure. Default: "true". -# -# [*always_deploy*] -# (Optional) - If you always deploy what has been downloaded. Default="yes", -# if set to "no" a checksum is made between the files previously downloaded -# and the new files. If they are the same the deploy is not done. -# -# [*check_deploy*] -# (Optional) - Checks if the war is deployed (Default yes). Set to no if -# you deploy on Jboss or the deployed dir is different for the war filename -# -# [*auto_deploy*] -# (Optional) - If you want to automatically run this puppi deploy when -# Puppet runs. Default: 'false' -# -define puppi::project::y4maven ( - $source, - $http_user = '', - $http_password = '', - $artifact_type = 'release', - $deploy_root = '', - $user = 'root', - $war_suffix = 'suffixnotset', - $zip_suffix = 'suffixnotset', - $jar_root = '', - $jar_user = '', - $jar_suffix = 'suffixnotset', - $document_root = '', - $document_user = '', - $document_suffix = 'suffixnotset', - $document_init_source = '', - $config_root = '', - $config_user = '', - $config_suffix = 'suffixnotset', - $config_init_source = '', - $predeploy_customcommand = '', - $predeploy_user = '', - $predeploy_priority = '39', - $postdeploy_customcommand = '', - $postdeploy_user = '', - $postdeploy_priority = '41', - $init_script = '', - $disable_services = '', - $firewall_src_ip = '', - $firewall_dst_port = '0', - $firewall_delay = '1', - $report_email = '', - $backup_rsync_options = '--exclude .snapshot', - $backup_retention = '5', - $run_checks = true, - $always_deploy = true, - $check_deploy = true, - $auto_deploy = false, - $enable = true ) { - - require puppi - require puppi::params - - # Set default values - $predeploy_real_user = $predeploy_user ? { - '' => $user, - default => $predeploy_user, - } - - $postdeploy_real_user = $postdeploy_user ? { - '' => $user, - default => $postdeploy_user, - } - - $config_real_user = $config_user ? { - '' => $user, - default => $config_user, - } - - $document_real_user = $document_user ? { - '' => $user, - default => $document_user, - } - - $jar_real_user = $jar_user ? { - '' => $user, - default => $jar_user, - } - - $real_always_deploy = any2bool($always_deploy) ? { - false => 'no', - true => 'yes', - } - - $bool_run_checks = any2bool($run_checks) - $bool_check_deploy = any2bool($check_deploy) - $bool_auto_deploy = any2bool($auto_deploy) - - -### CREATE PROJECT - puppi::project { $name: - enable => $enable , - } - - -### INIT SEQUENCE - if ($document_init_source != '') { - puppi::initialize { "${name}-Deploy_Files": - priority => '40' , - command => 'get_file.sh' , - arguments => "-s ${document_init_source} -d ${deploy_root}" , - user => $document_real_user , - project => $name , - enable => $enable , - } - } - - if ($config_init_source != '') { - puppi::initialize { "${name}-Deploy_CFG_Files": - priority => '40' , - command => 'get_file.sh' , - arguments => "-s ${config_init_source} -d ${deploy_root}" , - user => $config_real_user , - project => $name , - enable => $enable , - } - } - -### DEPLOY SEQUENCE - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_PRE-Checks": - priority => '10' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - # First: hybrisServer-Platform - $platform_metadata_arguments = $http_password ? { - '' => "-s ${source}/hybrisServer-Platform/maven-metadata.xml -t maven-metadata -a ${real_always_deploy}" , - default => "-s ${source}/hybrisServer-Platform/maven-metadata.xml -t maven-metadata -a ${real_always_deploy} -u ${http_user} -p ${http_password}" - } - - puppi::deploy { "${name}-Get_Maven_Metadata_hybrisServer-Platform_File": - priority => '20' , - command => 'get_file.sh' , - arguments => $platform_metadata_arguments, - user => 'root' , - project => $name , - enable => $enable , - } - - puppi::deploy { "${name}-Extract_Maven_Metadata_hybrisServer-Platform": - priority => '21' , - command => 'get_metadata.sh' , - arguments => "-m ${document_suffix} -mc ${config_suffix} -mj ${jar_suffix} -mw ${war_suffix} -mz ${zip_suffix} -at ${artifact_type}" , - user => 'root' , - project => $name , - enable => $enable , - } - - # Files retrieval - $platform_zipfile_arguments = $http_password ? { - '' => "${source}/hybrisServer-Platform zipfile", - default => "-u ${http_user} -p ${http_password} ${source}/hybrisServer-Platform zipfile", - } - - if ($deploy_root != '') { - puppi::deploy { "${name}-Get_Maven_Files_ZIP_hybrisServer-Platform": - priority => '22' , - command => 'get_maven_files.sh' , - arguments => $platform_zipfile_arguments, - user => 'root' , - project => $name , - enable => $enable , - } - } - - # Second: hybrisServer-AllExtensions - $extensions_metadata_arguments = $http_password ? { - '' => "-s ${source}/hybrisServer-AllExtensions/maven-metadata.xml -t maven-metadata -a ${real_always_deploy}", - default => "-s ${source}/hybrisServer-AllExtensions/maven-metadata.xml -t maven-metadata -a ${real_always_deploy} -u ${http_user} -p ${http_password}", - } - - puppi::deploy { "${name}-Get_Maven_Metadata_hybrisServer-AllExtensions_File": - priority => '23' , - command => 'get_file.sh' , - arguments => $extensions_metadata_arguments, - user => 'root' , - project => $name , - enable => $enable , - } - - puppi::deploy { "${name}-Extract_Maven_Metadata_hybrisServer-AllExtensions": - priority => '24' , - command => 'get_metadata.sh' , - arguments => "-m ${document_suffix} -mc ${config_suffix} -mj ${jar_suffix} -mw ${war_suffix} -mz ${zip_suffix} -at ${artifact_type}" , - user => 'root' , - project => $name , - enable => $enable , - } - - # Files retrieval - if ($deploy_root != '') { - $extensions_zipfile_arguments = $http_password ? { - '' => "${source}/hybrisServer-AllExtensions zipfile", - default => "-u ${http_user} -p ${http_password} ${source}/hybrisServer-AllExtensions zipfile", - } - - puppi::deploy { "${name}-Get_Maven_Files_ZIP_hybrisServer-AllExtensions": - priority => '25' , - command => 'get_maven_files.sh' , - arguments => $extensions_zipfile_arguments, - user => 'root' , - project => $name , - enable => $enable , - } - } - - - if ($config_root != '') { - # Third: config-tarball (optional, right now not supported) - $config_metadata_arguments = $http_password ? { - '' => "-s ${source}/config/maven-metadata.xml -t maven-metadata -a ${real_always_deploy}", - default => "-s ${source}/config/maven-metadata.xml -t maven-metadata -a ${real_always_deploy} -u ${http_user} -p ${http_password}" - } - - puppi::deploy { "${name}-Get_Maven_Metadata_config-tarball_File": - priority => '26' , - command => 'get_file.sh' , - arguments => $config_metadata_arguments, - user => 'root' , - project => $name , - enable => $enable , - } - - puppi::deploy { "${name}-Extract_Maven_Metadata_config-tarball": - priority => '27' , - command => 'get_metadata.sh' , - arguments => "-m ${document_suffix} -mc ${config_suffix} -mj ${jar_suffix} -mw ${war_suffix} -mz ${zip_suffix} -at ${artifact_type}" , - user => 'root' , - project => $name , - enable => $enable , - } - - puppi::deploy { "${name}-Get_Maven_Files_Config": - priority => '28' , - command => 'get_maven_files.sh' , - arguments => "${source} configfile" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Block": - priority => '30' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - # Existing files backup - if ($deploy_root != '') { - puppi::deploy { "${name}-Backup_Existing_WAR": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${deploy_root} -t war -s move -m diff -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($jar_root != '') { - puppi::deploy { "${name}-Backup_Existing_JAR": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${jar_root} -t jar -s move -m diff -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($config_root != '') { - puppi::deploy { "${name}-Backup_Existing_ConfigDir": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${config_root} -t config -d predeploydir_configfile -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($document_root != '') { - puppi::deploy { "${name}-Backup_Existing_DocumentDir": - priority => '30' , - command => 'archive.sh' , - arguments => "-b ${document_root} -t docroot -d predeploydir_configfile -o '${backup_rsync_options}' -n ${backup_retention}" , - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Disable_extra_services": - priority => '36' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - # Deploys - if ($deploy_root != '') { - puppi::deploy { "${name}-Deploy_Maven_ZIP": - priority => '40' , - command => 'deploy.sh' , - arguments => "${deploy_root} predeploydir_zipfile ", - user => $user , - project => $name , - enable => $enable , - } - } - - if ($config_root != '') { - puppi::deploy { "${name}-Deploy_ConfigDir": - priority => '40' , - command => 'deploy.sh' , - arguments => "${config_root} predeploydir_configfile" , - user => $config_real_user , - project => $name , - enable => $enable , - } - } - - puppi::deploy { "${name}-yant": - priority => '42' , - command => 'yant.sh' , - arguments => "${deploy_root} clean all" , - user => $user , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::deploy { "${name}-Service_start": - priority => '44' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Enable_extra_services": - priority => '45' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Unblock": - priority => '47' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### ROLLBACK PROCEDURE - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Disable_extra_services": - priority => '37' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_stop": - priority => '38' , - command => 'service.sh' , - arguments => "stop ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($deploy_root != '') { - puppi::rollback { "${name}-Recover_ZIP": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${deploy_root} -t zip -o '${backup_rsync_options}'" , - user => $user , - project => $name , - enable => $enable , - } - } - - if ($config_root != '') { - puppi::rollback { "${name}-Recover_ConfigDir": - priority => '40' , - command => 'archive.sh' , - arguments => "-r ${config_root} -t config -o '${backup_rsync_options}'" , - user => $config_real_user , - project => $name , - enable => $enable , - } - } - - if ($postdeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($init_script != '') { - puppi::rollback { "${name}-Service_start": - priority => '42' , - command => 'service.sh' , - arguments => "start ${init_script}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::rollback { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### REPORTING - - if ($report_email != '') { - puppi::report { "${name}-Mail_Notification": - priority => '20' , - command => 'report_mail.sh' , - arguments => $report_email , - user => 'root', - project => $name , - enable => $enable , - } - } - -### AUTO DEPLOY DURING PUPPET RUN - if ($bool_auto_deploy == true) { - puppi::run { $name: } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/yum.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/yum.pp deleted file mode 100644 index 5379ebeea5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/project/yum.pp +++ /dev/null @@ -1,347 +0,0 @@ -# = Define puppi::project::yum -# -# This is a shortcut define to build a puppi project for the -# deploy of applications packaged as rpm and retrievable via yum -# -# It uses different "core" defines (puppi::project, puppi:deploy (many), -# puppi::rollback (many)) to build a full featured template project for -# automatic deployments. -# If you need to customize it, either change the template defined here or -# build up your own custom ones. -# -# == Variables: -# -# [*rpm*] -# The name of the rpm to install -# -# [*rpm_version*] -# (Optional) - The version to install (default: latest) -# -# [*install_root*] -# (Optional) - The rpm installation root (default: / ) -# -# [*predeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute before the deploy. The command is executed as $predeploy_user. -# -# [*predeploy_user*] -# (Optional) - The user to be used to execute the $predeploy_customcommand. -# By default is the same of $user. -# -# [*predeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $predeploy_customcommand is executed -# Default: 39 (immediately before the copy of files on the deploy root). -# -# [*postdeploy_customcommand*] -# (Optional) - Full path with arguments of an eventual custom command to -# execute after the deploy. The command is executed as $postdeploy_user. -# -# [*postdeploy_user*] -# (Optional) - The user to be used to execute the $postdeploy_customcommand. -# By default is the same of $user. -# -# [*postdeploy_priority*] -# (Optional) - The priority (execution sequence number) that defines when, -# during the deploy procedure, the $postdeploy_customcommand is executed -# Default: 41 (immediately after the copy of files on the deploy root). -# -# [*disable_services*] -# (Optional) - The names (space separated) of the services you might want to -# stop during deploy. By default is blank. Example: "apache puppet monit". -# -# [*firewall_src_ip*] -# (Optional) - The IP address of a loadbalancer you might want to block out -# during a deploy. -# -# [*firewall_dst_port*] -# (Optional) - The local port to block from the loadbalancer during deploy -# (Default all). -# -# [*firewall_delay*] -# (Optional) - A delay time in seconds to wait after the block of -# $firewall_src_ip. Should be at least as long as the loadbalancer check -# interval for the services stopped during deploy (Default: 1). -# -# [*report_email*] -# (Optional) - The (space separated) email(s) to notify of deploy/rollback -# operations. If none is specified, no email is sent. -# -# [*run_checks*] -# (Optional) - If you want to run local puppi checks before and after the -# deploy procedure. Default: "true". -# -# [*checks_required*] -# (Optional) - Set to "true" if you want to block the installation if -# preliminary checks fail. Default: "false" -# -# [*always_deploy*] -# (Optional) - If you always deploy what has been downloaded. Default="yes", -# if set to "no" a checksum is made between the files previously downloaded -# and the new files. If they are the same the deploy is not done. -# -# [*auto_deploy*] -# (Optional) - If you want to automatically run this puppi deploy when -# Puppet runs. Default: 'false' -# -define puppi::project::yum ( - $rpm, - $rpm_version = 'latest', - $install_root = '/', - $predeploy_customcommand = '', - $predeploy_user = '', - $predeploy_priority = '39', - $postdeploy_customcommand = '', - $postdeploy_user = '', - $postdeploy_priority = '41', - $disable_services = '', - $firewall_src_ip = '', - $firewall_dst_port = '0', - $firewall_delay = '1', - $report_email = '', - $run_checks = true, - $checks_required = false, - $always_deploy = true, - $auto_deploy = false, - $enable = true ) { - - require puppi - require puppi::params - - # Set default values - $predeploy_real_user = $predeploy_user ? { - '' => 'root', - default => $predeploy_user, - } - - $postdeploy_real_user = $postdeploy_user ? { - '' => 'root', - default => $postdeploy_user, - } - - $real_always_deploy = any2bool($always_deploy) ? { - true => 'yes', - default => 'no', - } - - $real_checks_required = any2bool($checks_required) ? { - true => 'yes', - default => 'no', - } - - $bool_run_checks = any2bool($run_checks) - $bool_auto_deploy = any2bool($auto_deploy) - -### CREATE PROJECT - puppi::project { $name: - enable => $enable , - } - -### DEPLOY SEQUENCE - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_PRE-Checks": - priority => '10' , - command => 'check_project.sh' , - arguments => "${name} ${real_checks_required}", - user => 'root' , - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Disable_extra_services": - priority => '36' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - # Here is done the deploy on $deploy_root - puppi::deploy { "${name}-Deploy": - priority => '40' , - command => 'yum.sh' , - arguments => "-a deploy -n ${rpm} -r ${install_root} -v ${rpm_version}" , - user => root , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::deploy { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::deploy { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::deploy { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::deploy { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### ROLLBACK PROCEDURE - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Block": - priority => '25' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} on ${firewall_delay}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Disable_extra_services": - priority => '37' , - command => 'service.sh' , - arguments => "stop ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($predeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PreDeploy_Script": - priority => $predeploy_priority , - command => 'execute.sh' , - arguments => $predeploy_customcommand , - user => $predeploy_real_user , - project => $name , - enable => $enable , - } - } - - puppi::rollback { "${name}-Rollback": - priority => '40' , - command => 'yum.sh' , - arguments => "-a rollback -n ${rpm} -r ${install_root} -v ${rpm_version}" , - user => 'root' , - project => $name , - enable => $enable , - } - - if ($postdeploy_customcommand != '') { - puppi::rollback { "${name}-Run_Custom_PostDeploy_Script": - priority => $postdeploy_priority , - command => 'execute.sh' , - arguments => $postdeploy_customcommand , - user => $postdeploy_real_user , - project => $name , - enable => $enable , - } - } - - if ($disable_services != '') { - puppi::rollback { "${name}-Enable_extra_services": - priority => '44' , - command => 'service.sh' , - arguments => "start ${disable_services}" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($firewall_src_ip != '') { - puppi::rollback { "${name}-Load_Balancer_Unblock": - priority => '46' , - command => 'firewall.sh' , - arguments => "${firewall_src_ip} ${firewall_dst_port} off 0" , - user => 'root', - project => $name , - enable => $enable , - } - } - - if ($bool_run_checks == true) { - puppi::rollback { "${name}-Run_POST-Checks": - priority => '80' , - command => 'check_project.sh' , - arguments => $name , - user => 'root' , - project => $name , - enable => $enable , - } - } - - -### REPORTING - - if ($report_email != '') { - puppi::report { "${name}-Mail_Notification": - priority => '20' , - command => 'report_mail.sh' , - arguments => $report_email , - user => 'root', - project => $name , - enable => $enable , - } - } - -### AUTO DEPLOY DURING PUPPET RUN - if ($bool_auto_deploy == true) { - puppi::run { $name: } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/report.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/report.pp deleted file mode 100644 index 4f8651e93f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/report.pp +++ /dev/null @@ -1,38 +0,0 @@ -# Define puppi::report -# -# This define creates a file with a report command that can be used locally. -# -# Usage: -# puppi::report { "Retrieve files": -# command => "report_mail.sh", -# argument => "roots@example42.com", -# priority => "10", -# user => "root", -# project => "spysite", -# } -# -define puppi::report ( - $project, - $command, - $arguments = '', - $priority = '50', - $user = 'root', - $enable = true ) { - - require puppi::params - - # Autoinclude the puppi class - include puppi - - $ensure = bool2ensure($enable) - - file { "${puppi::params::projectsdir}/${project}/report/${priority}-${name}": - ensure => $ensure, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - content => "su - ${user} -c \"export project=${project} && ${puppi::params::scriptsdir}/${command} ${arguments}\"\n", - tag => 'puppi_report', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/rollback.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/rollback.pp deleted file mode 100644 index b09692df63..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/rollback.pp +++ /dev/null @@ -1,36 +0,0 @@ -# Define puppi::rollback -# -# This define creates a file with a rollback command that can be used locally. -# -# Usage: -# puppi::rollback { "Retrieve files": -# command => "get_file.sh", -# argument => "/remote/dir/file", -# priority => "10", -# user => "root", -# project => "spysite", -# } -# -define puppi::rollback ( - $project, - $command, - $arguments = '', - $priority = '50', - $user = 'root', - $enable = true ) { - - require puppi - require puppi::params - - $ensure = bool2ensure($enable) - - file { "${puppi::params::projectsdir}/${project}/rollback/${priority}-${name}": - ensure => $ensure, - mode => '0750', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - content => "su - ${user} -c \"export project=${project} && ${puppi::params::scriptsdir}/${command} ${arguments}\"\n", - tag => 'puppi_rollback', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/run.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/run.pp deleted file mode 100644 index 01556d663f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/run.pp +++ /dev/null @@ -1,31 +0,0 @@ -# Define puppi::run -# -# This define triggers a puppi deploy run directly during Puppet -# execution. It can be used to automate FIRST TIME applications -# deployments directly during the first Puppet execution -# -# == Variables -# -# [*name*] -# The title/name you use has to be the name of an existing puppi::project -# procedure define -# -# == Usage -# Basic Usage: -# puppi::run { "myapp": } -# -define puppi::run ( - $project = '', - $timeout = 300) { - - require puppi - - exec { "Run_Puppi_${name}": - command => "puppi deploy ${name}; [ $? -le \"1\" ] && touch ${puppi::params::archivedir}/puppirun_${name}", - path => '/bin:/sbin:/usr/sbin:/usr/bin', - creates => "${puppi::params::archivedir}/puppirun_${name}", - timeout => $timeout, - # require => File[ tag == 'puppi_deploy' ], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/runscript.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/runscript.pp deleted file mode 100644 index 01aa36c20e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/runscript.pp +++ /dev/null @@ -1,154 +0,0 @@ -# = Define: puppi::runscript -# -# This define creates, executes and optionally crontabs a -# simple whose content is directly managed by arguments. -# The script content is provided either with $source or $content arguments. -# It's placed in: -# $destination_path , if provided, or in /usr/local/sbin/${name} -# -# Cron execution times are defined by the $cron argument (Default empty). -# Automatic execution of the script via Puppet is managed by the $autorun -# parameter (default: true). -# Conditional execution of the script at subsequent puppet runs is -# defined by the $refreshonly, $creates, $unless $onlyif parameters -# that map the omonimous exec type arguments. -# -# == Parameters: -# -# [*source*] -# String. Optional. Default: undef. Alternative to content. -# Source of the script file to provide for execuution. -# Sample: source => 'puppet:///modules/site/scripts/my_script', -# -# [*content*] -# String. Optional. Default: undef. Alternative to source. -# Content of the script file to provide for execuution. -# This parameter is alternative to source. -# Sample: content => 'template(site/scripts/my_script.erb'), -# -# [*destination_path*] -# String. Optional. Default: '' -# Path of the provided script. If not provided the script in saved in -# /usr/local/sbin/${name} -# -# [*parameters*] -# String. Optional. Default: '' -# Optional parameters to pass to the script when executing it. -# -# [*autorun*] -# Boolean. Default: true. -# Define if to automatically execute the script when Puppet runs. -# -# [*refreshonly*] -# Boolen. Optional. Default: true -# Defines the logic of execution of the script when Puppet runs. -# Maps to the omonymous Exec type argument. -# -# [*creates*] -# String. Optional. Default: undef -# Defines the logic of execution of the script when Puppet runs. -# Maps to the omonymous Exec type argument. -# -# [*onlyif*] -# String. Optional. Default: undef -# Defines the logic of execution of the script when Puppet runs. -# Maps to the omonymous Exec type argument. -# -# [*unless*] -# String. Optional. Default: undef -# Defines the logic of execution of the script when Puppet runs. -# Maps to the omonymous Exec type argument. -# -# [*basedir*] -# String. Optional. Default: /usr/local/sbin -# Directory where the runscript scripts are created when destination_path -# is empty. -# -# [*cron*] -# String. Optional. Default: '' -# Optional cron schedule to crontab the execution of the -# script. Format must be in standard cron style. -# Example: '0 4 * * *' . -# By default no cron is scheduled. -# -# [*cron_user*] -# String. Optional. Default: 'root' -# When cron is enabled the user that executes the cron job. -# -# [*owner*] -# Owner of the created script. Default: root. -# -# [*group*] -# Group of the created script. Default: root. -# -# [*mode*] -# Mode of the created script. Default: '7550'. -# NOTE: Keep the execution flag! -# -# [*ensure*] -# Define if the runscript script and eventual cron job -# must be present or absent. Default: present. -# -# == Examples -# -# - Minimal setup -# puppi::runscript { 'my_script': -# source => 'puppet:///modules/site/scripts/my_script.sh', -# destination_path => '/usr/local/bin/my_script.sh', -# } -# -define puppi::runscript ( - $source = undef, - $content = undef, - $destination_path = '', - $parameters = '', - $autorun = true, - $refreshonly = true, - $creates = undef, - $onlyif = undef, - $unless = undef, - $basedir = '/usr/local/sbin', - $cron = '', - $cron_user = 'root', - $owner = 'root', - $group = 'root', - $mode = '0755', - $ensure = 'present' ) { - - $real_command = $destination_path ? { - '' => "${basedir}/${name}", - default => $destination_path, - } - - file { "runscript_${name}": - ensure => $ensure, - path => $real_command, - mode => $mode, - owner => $owner, - group => $group, - content => $content, - source => $source, - } - - if $autorun == true { - exec { "runscript_${name}": - command => $real_command, - refreshonly => $refreshonly, - creates => $creates, - onlyif => $onlyif, - unless => $unless, - subscribe => File["runscript_${name}"], - } - } - - if $cron != '' { - file { "runscript_cron_${name}": - ensure => $ensure, - path => "/etc/cron.d/runscript_${name}", - mode => '0644', - owner => 'root', - group => 'root', - content => "${cron} ${cron_user} ${real_command} ${parameters}\n", - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/skel.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/skel.pp deleted file mode 100644 index 6be5cc94ff..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/skel.pp +++ /dev/null @@ -1,184 +0,0 @@ -# -# Class puppi::skel -# -# Creates the base Puppi dirs -# -class puppi::skel { - - require puppi::params - - file { 'puppi_basedir': - ensure => directory, - path => $puppi::params::basedir, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - } - - file { 'puppi_checksdir': - ensure => directory, - path => $puppi::params::checksdir, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_basedir'], - recurse => true, - purge => true, - force => true, - } - - file { 'puppi_logsdir': - ensure => directory, - path => $puppi::params::logsdir, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_basedir'], - recurse => true, - purge => true, - force => true, - } - - file { 'puppi_helpersdir': - ensure => directory, - path => $puppi::params::helpersdir, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_basedir'], - } - - file { 'puppi_infodir': - ensure => directory, - path => $puppi::params::infodir, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_basedir'], - recurse => true, - purge => true, - force => true, - } - - file { 'puppi_tododir': - ensure => directory, - path => $puppi::params::tododir, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_basedir'], - recurse => true, - purge => true, - force => true, - } - - file { 'puppi_projectsdir': - ensure => directory, - path => $puppi::params::projectsdir, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_basedir'], - recurse => true, - purge => true, - force => true, - } - - file { 'puppi_datadir': - ensure => directory, - path => $puppi::params::datadir, - mode => '0750', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_basedir'], - recurse => true, - purge => true, - force => true, - } - - file { 'puppi_workdir': - ensure => directory, - path => $puppi::params::workdir, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_basedir'], - } - - file { 'puppi_archivedir': - ensure => directory, - path => $puppi::params::archivedir, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_libdir'], - } - - file { 'puppi_readmedir': - ensure => directory, - path => $puppi::params::readmedir, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_libdir'], - } - - file { 'puppi_libdir': - ensure => directory, - path => $puppi::params::libdir, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_basedir'], - } - - file { 'puppi_logdir': - ensure => directory, - path => $puppi::params::logdir, - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => File['puppi_basedir'], - } - - # MailPuppiCheck script - file { '/usr/bin/mailpuppicheck': - ensure => 'present', - mode => '0750', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - source => 'puppet:///modules/puppi/mailpuppicheck', - } - - # Puppi common scripts - file { 'puppi.scripts': - ensure => present, - path => "${puppi::params::scriptsdir}/", - mode => '0755', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - source => 'puppet:///modules/puppi/scripts/', - recurse => true, -# purge => true, - ignore => '.svn', - } - - # Logs cleanup script - if $::kernel == 'Linux' { - if $puppi::logs_retention_days - and $puppi::logs_retention_days != '0' { - $purge_cron_ensure = 'present' - } else { - $purge_cron_ensure = 'absent' - } - - file { 'puppi_cron_logs_purge': - ensure => $purge_cron_ensure, - path => '/etc/cron.daily/puppi_clean', - mode => '0755', - owner => 'root', - group => 'root', - content => template('puppi/puppi_clean.erb'), - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/todo.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/todo.pp deleted file mode 100644 index 6fff3805b7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/todo.pp +++ /dev/null @@ -1,57 +0,0 @@ -# Define puppi::todo -# -# This define creates a basic todo file that simply contains informations -# on how to complete tasks that for time or other reasons could not be -# entirely automated by Puppet. -# The basic idea is to have a quick way to document and check if are completed -# some specific operations that are required to bring a new, puppettized system -# to full operative status. -# This can be useful for cases hard to automate with Puppet: -# - First setup and import of a database needed by an application (module) -# - Installation of a legacy application that involves user interaction -# - Run of any kind of setup/configuration/init command that can't be automated -# It can also be used as a quick reminder on things done by hand and not -# Puppettized for lack of time or skill. -# -# Use the command puppi todo to show the todo present in your node. -# The exit status can be: -# 0 - OK - The task to do has been accomplished because the command specified -# as check_command returns true (exit status 0) -# 1- WARNING - User hasn't specified a check_command to verify if the todo as -# been accomplished, so it can't be notified if the todo has been done -# 2- ERROR - The task to do has not been accomplished becuase the command -# specified as check_command returns an error (exit status different from 0) -# -# == Usage: -# puppi::todo { "cacti_db_install": -# description => "Manual cacti db installation" , -# } -# -define puppi::todo ( - $description = '', - $notes = '', - $check_command = '', - $run = '' ) { - - require puppi - require puppi::params - - $array_run = is_array($run) ? { - false => $run ? { - '' => [], - default => split($run, ','), - }, - default => $run, - } - - file { "${puppi::params::tododir}/${name}": - ensure => present, - mode => '0750', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - require => Class['puppi'], - content => template('puppi/todo.erb'), - tag => 'puppi_todo', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/two.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/two.pp deleted file mode 100644 index 1bbe5fca4a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/two.pp +++ /dev/null @@ -1,13 +0,0 @@ -# Class: puppi::two -# -# Installs Puppi NextGen -# -class puppi::two { - - # The Puppi command - package { 'puppi': - ensure => present, - provider => 'gem', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/ze.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/ze.pp deleted file mode 100644 index 5f62e1d738..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/manifests/ze.pp +++ /dev/null @@ -1,35 +0,0 @@ -# Define puppi::ze -# -# The Puppi 2.0 define that transforms any class variable in data -# you can use with Puppi -# -# == Usage -# Basic Usage: -# puppi::ze { "openssh": -# variables => get_class_args(), -# } -# -# puppi::ze { "openssh": -# variables => get_class_args(), -# filter => '.*content.*|.*key.*', -# } -# -define puppi::ze ( - $variables, - $helper = 'standard', - $filter = '.*content.*|.*password.*', - $ensure = 'present' ) { - - require puppi - require puppi::params - - file { "puppize_${name}": - ensure => $ensure, - path => "${puppi::params::datadir}/${helper}_${name}.yml", - mode => '0644', - owner => $puppi::params::configfile_owner, - group => $puppi::params::configfile_group, - content => inline_template("---\n<%= Hash[@variables].reject{ |k,v| k.to_s =~ /(${filter})/ }.keys.sort.map{|k| Array({k => @variables[k]}.to_yaml)[1..-1].join}.join(\"\n\") %>\n"), - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/classes/puppi_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/classes/puppi_spec.rb deleted file mode 100644 index f6c072f9f2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/classes/puppi_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'puppi' do - - let(:node) { 'rspec.example42.com' } - let(:node) { 'rspec.example42.com' } - let(:facts) { { :ipaddress => '10.42.42.42' } } - - describe 'Test standard installation' do - it { should contain_file('puppi').with_ensure('present') } - it { should contain_file('puppi.conf').with_ensure('present') } - it { should contain_file('puppi.scripts').with_ensure('present') } - it { should contain_file('puppi_basedir').with_ensure('directory') } - it { should contain_file('puppi_datadir').with_ensure('directory') } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_check_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_check_spec.rb deleted file mode 100644 index ba050bb79e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_check_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'puppi::check' do - - let(:title) { 'puppi::check' } - let(:node) { 'rspec.example42.com' } - let(:facts) { { :arch => 'i386' } } - let(:params) { - { 'enable' => 'true', - 'name' => 'get', - 'command' => 'echo', - 'priority' => '50', - 'project' => 'myapp', - } - } - - describe 'Test puppi check step file creation' do - it 'should create a puppi::check step file' do - should contain_file('Puppi_check_myapp_50_get').with_ensure('present') - end - it 'should populate correctly the puppi::check step file' do - should contain_file('Puppi_check_myapp_50_get').with_content(/\/usr\/lib\/nagios\/plugins\/echo/) - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_deploy_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_deploy_spec.rb deleted file mode 100644 index a1969bae76..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_deploy_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'puppi::deploy' do - - let(:title) { 'puppi::deploy' } - let(:node) { 'rspec.example42.com' } - let(:params) { - { 'enable' => 'true', - 'name' => 'get', - 'command' => 'echo', - 'priority' => '50', - 'project' => 'myapp', - } - } - - describe 'Test puppi deploy step file creation' do - it 'should create a puppi::deploy step file' do - should contain_file('/etc/puppi/projects/myapp/deploy/50-get').with_ensure('present') - end - it 'should populate correctly the puppi::deploy step file' do - should contain_file('/etc/puppi/projects/myapp/deploy/50-get').with_content("su - root -c \"export project=myapp && /etc/puppi/scripts/echo \"\n") - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_helper_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_helper_spec.rb deleted file mode 100644 index 8e5ae9bcc6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_helper_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'puppi::helper' do - - let(:title) { 'spec' } - let(:node) { 'rspec.example42.com' } - let(:params) { - { 'template' => 'puppi/helpers/standard.yml.erb' } - } - - describe 'Test puppi helper file creation' do - it 'should create a puppi helper file' do - should contain_file('puppi_helper_spec').with_ensure('present') - end - it 'should populate correctly the helper file' do - should contain_file('puppi_helper_spec').with_content(/info/) - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_info_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_info_spec.rb deleted file mode 100644 index 7dcc99fe93..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_info_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'puppi::info' do - - let(:title) { 'puppi::info' } - let(:node) { 'rspec.example42.com' } - let(:params) { - { 'name' => 'sample', - 'description' => 'Sample Info', - 'templatefile' => 'puppi/info.erb', - 'run' => 'myownscript', - } - } - - describe 'Test puppi info step file creation' do - it 'should create a puppi::info step file' do - should contain_file('/etc/puppi/info/sample').with_ensure('present') - end - it 'should populate correctly the puppi::info step file' do - should contain_file('/etc/puppi/info/sample').with_content(/myownscript/) - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_initialize_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_initialize_spec.rb deleted file mode 100644 index 158a600572..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_initialize_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'puppi::initialize' do - - let(:title) { 'puppi::initialize' } - let(:node) { 'rspec.example42.com' } - let(:params) { - { 'enable' => 'true', - 'name' => 'get', - 'command' => 'echo', - 'priority' => '50', - 'project' => 'myapp', - } - } - - describe 'Test puppi initialize step file creation' do - it 'should create a puppi::initialize step file' do - should contain_file('/etc/puppi/projects/myapp/initialize/50-get').with_ensure('present') - end - it 'should populate correctly the puppi::initialize step file' do - should contain_file('/etc/puppi/projects/myapp/initialize/50-get').with_content("su - root -c \"export project=myapp && /etc/puppi/scripts/echo \"\n") - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_log_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_log_spec.rb deleted file mode 100644 index 7fd8e9119b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_log_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'puppi::log' do - - let(:title) { 'mylog' } - let(:node) { 'rspec.example42.com' } - let(:params) { - { 'log' => '/var/log/mylog.log', - 'description' => 'My Log', - } - } - - describe 'Test puppi log file creation' do - it 'should create a puppi::log file' do - should contain_file('/etc/puppi/logs/mylog').with_ensure('present') - end - it 'should populate correctly the puppi::log step file' do - should contain_file('/etc/puppi/logs/mylog').with_content(/mylog.log/) - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_project_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_project_spec.rb deleted file mode 100644 index fbbf8ba709..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_project_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'puppi::report' do - - let(:title) { 'puppi::report' } - let(:node) { 'rspec.example42.com' } - let(:params) { - { 'enable' => 'true', - 'name' => 'get', - 'command' => 'echo', - 'priority' => '50', - 'project' => 'myapp', - } - } - - describe 'Test puppi report step file creation' do - it 'should create a puppi::report step file' do - should contain_file('/etc/puppi/projects/myapp/report/50-get').with_ensure('present') - end - it 'should populate correctly the puppi::report step file' do - should contain_file('/etc/puppi/projects/myapp/report/50-get').with_content("su - root -c \"export project=myapp && /etc/puppi/scripts/echo \"\n") - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_report_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_report_spec.rb deleted file mode 100644 index fbbf8ba709..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_report_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'puppi::report' do - - let(:title) { 'puppi::report' } - let(:node) { 'rspec.example42.com' } - let(:params) { - { 'enable' => 'true', - 'name' => 'get', - 'command' => 'echo', - 'priority' => '50', - 'project' => 'myapp', - } - } - - describe 'Test puppi report step file creation' do - it 'should create a puppi::report step file' do - should contain_file('/etc/puppi/projects/myapp/report/50-get').with_ensure('present') - end - it 'should populate correctly the puppi::report step file' do - should contain_file('/etc/puppi/projects/myapp/report/50-get').with_content("su - root -c \"export project=myapp && /etc/puppi/scripts/echo \"\n") - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_rollback_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_rollback_spec.rb deleted file mode 100644 index 2d4cbe5b51..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_rollback_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'puppi::rollback' do - - let(:title) { 'puppi::rollback' } - let(:node) { 'rspec.example42.com' } - let(:params) { - { 'enable' => 'true', - 'name' => 'get', - 'command' => 'echo', - 'priority' => '50', - 'project' => 'myapp', - } - } - - describe 'Test puppi rollback step file creation' do - it 'should create a puppi::rollback step file' do - should contain_file('/etc/puppi/projects/myapp/rollback/50-get').with_ensure('present') - end - it 'should populate correctly the puppi::rollback step file' do - should contain_file('/etc/puppi/projects/myapp/rollback/50-get').with_content("su - root -c \"export project=myapp && /etc/puppi/scripts/echo \"\n") - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_run_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_run_spec.rb deleted file mode 100644 index 692711c583..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_run_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'puppi::run' do - - let(:title) { 'myapp' } - let(:node) { 'rspec.example42.com' } - let(:params) { - { - 'project' => 'myapp', - } - } - - describe 'Test puppi run exe creation' do - it { should contain_exec('Run_Puppi_myapp').with_command(/puppi deploy myapp/) } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_todo_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_todo_spec.rb deleted file mode 100644 index 483852202d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_todo_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'puppi::todo' do - - let(:title) { 'mytodo' } - let(:node) { 'rspec.example42.com' } - let(:params) { - { 'notes' => 'Test Notes', - 'description' => 'Test Description', - 'check_command' => 'check_test', - 'run' => 'test', - } - } - - describe 'Test puppi todo file creation' do - it 'should create a puppi::todo file' do - should contain_file('/etc/puppi/todo/mytodo').with_ensure('present') - end - it 'should populate correctly the puppi::todo step file' do - should contain_file('/etc/puppi/todo/mytodo').with_content(/check_test/) - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_ze_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_ze_spec.rb deleted file mode 100644 index 1791368691..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/defines/puppi_ze_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'puppi::ze' do - - let(:title) { 'sample' } - let(:node) { 'rspec.example42.com' } - let(:params) { - { 'helper' => 'mytest', - 'variables' => { 'var1' => 'get', 'var2' => 'got' }, - 'name' => 'sample', - } - } - - describe 'Test puppi ze data file creation' do - it 'should create a puppi::ze step file' do - should contain_file('puppize_sample').with_ensure('present') - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/functions/any2bool_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/functions/any2bool_spec.rb deleted file mode 100644 index bc9a5ee945..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/functions/any2bool_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'any2bool' do - - describe 'Test Any2True' do - it { should run.with_params(true).and_return(true) } - it { should run.with_params('true').and_return(true) } - it { should run.with_params('yes').and_return(true) } - it { should run.with_params('y').and_return(true) } - end - - describe 'Test Any2false' do - it { should run.with_params(false).and_return(false) } - it { should run.with_params('false').and_return(false) } - it { should run.with_params('no').and_return(false) } - it { should run.with_params('n').and_return(false) } - end - - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/functions/bool2ensure_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/functions/bool2ensure_spec.rb deleted file mode 100644 index 967d36c3b5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/functions/bool2ensure_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'bool2ensure' do - - describe 'Test true2present' do - it { should run.with_params(true).and_return('present') } - it { should run.with_params('true').and_return('present') } - it { should run.with_params('yes').and_return('present') } - it { should run.with_params('y').and_return('present') } - end - - describe 'Test false2absent' do - it { should run.with_params(false).and_return('absent') } - it { should run.with_params('false').and_return('absent') } - it { should run.with_params('no').and_return('absent') } - it { should run.with_params('n').and_return('absent') } - end - - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/functions/url_parse_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/functions/url_parse_spec.rb deleted file mode 100644 index 3388e9ae9c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/functions/url_parse_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'url_parse' do - - describe 'Test Url Components parsing' do - it 'should return correct scheme' do - should run.with_params('ftp://www.example.com/test','scheme').and_return('ftp') - end - it 'should return correct userinfo' do - should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','userinfo').and_return('my_user:my_pass') - end - it 'should return correct user' do - should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','user').and_return('my_user') - end - it 'should return correct password' do - should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','password').and_return('my_pass') - end - it 'should return correct host' do - should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','host').and_return('www.example.com') - end - it 'should return correct port' do - should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','port').and_return(8080) - end - it 'should return correct path' do - should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','path').and_return('/path/to/file.php') - end - it 'should return correct query' do - should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','query').and_return('id=1&ret=0') - end - it 'should return correct filename' do - should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','filename').and_return('file.php') - end - it 'should return correct filetype' do - should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','filetype').and_return('.php') - end - it 'should return correct filedir' do - should run.with_params('https://my_user:my_pass@www.example.com:8080/path/to/file.php?id=1&ret=0','filedir').and_return('file') - end - - end - -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/spec_helper.rb deleted file mode 100644 index 2c6f56649a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/helpers/standard.yml.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/helpers/standard.yml.erb deleted file mode 100644 index 5b090700a1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/helpers/standard.yml.erb +++ /dev/null @@ -1,49 +0,0 @@ ---- -:info: - - - :command: "<%= scope.lookupvar('puppi::params::info_package_query') %> %{package}" - :description: "Package info" - - - :command: "<%= scope.lookupvar('puppi::params::info_package_list') %> %{package} | egrep '(/bin|^/etc|/sbin|log$)'" - :description: "Interesting files from package" - - - :command: "head %{config_file}" - :description: "Main configuration file" - - - :command: "ls -latr %{config_dir}" - :description: "Configuration directory" - - - :command: "ls -latr %{data_dir}" - :description: "Data directory" - - - :command: "ls -latr %{log_dir}" - :description: "Logs directory" - - - :command: "tail %{log_file}" - :description: "Latest log entries" - - - :command: "service %{service status}" - :description: "Service status" - - - :command: "ps -adef | grep %{process} | grep -v grep | head -20" - :description: "Running process" - - - :command: "netstat -natup | grep %{port} | head -20" - :description: "Network connections" - -:check: - - - :command: "service %{service} status" - :description: "Service status" - - - :command: "check_tcp %{port}" - :description: "Check listening port" - - - :command: "check_procs c 1: -C %{process}" - :description: "Check process" - -:log: - - - :command: "tail -f %{log_file}" - :description: "Tailing logs" - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info.erb deleted file mode 100644 index f866f7a56b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info.erb +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# <%= @description %> -# Script generated by Puppet. It's executed when you run: -# puppi info <%= @name %> -# -# Sources common header for Puppi scripts -. <%= scope.lookupvar('puppi::params::scriptsdir') %>/header || exit 10 - -echo_title "$HOSTNAME - <%= @description %>" -<% @array_run.each do |cmd| %>show_command "<%= cmd %>" -<% end %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/instance.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/instance.erb deleted file mode 100644 index d74f7e601c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/instance.erb +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash -# <%= @description %> -# Script generated by Puppet. It's executed when you run: -# puppi info <%= @name %> -# -# Sources common header for Puppi scripts -. <%= scope.lookupvar('puppi::params::scriptsdir') %>/header || exit 10 - -<% if @configdir != "" -%> -# Show config info -echo_title "$HOSTNAME - <%= @name %>: Configurations directory: <%= @configdir %>" -show_command "ls -latr <%= @configdir %>" -<% end -%> - -<% if @datadir != "" -%> -# Show data dir -echo_title "$HOSTNAME - <%= @name %>: Application data are in: <% datadir.each do |item| %><%= item %><% end %>" -<% @datadir.each do |item| -%> -show_command "ls -latr <%= item %>" -<% end -%> -<% end -%> - -<% if @bindir != "" -%> -# Show bin dir -echo_title "$HOSTNAME - <%= @name %>: Startup scripts are in: <% bindir.each do |item| %><%= item %><% end %>" -<% @bindir.each do |item| -%> -show_command "ls -latr <%= item %>" -<% end -%> -<% end -%> - -<% if @logdir != "" -%> -# Show log dir -echo_title "$HOSTNAME - <%= @name %>: Logs are in: <% logdir.each do |item| %><%= item %><% end %>" -<% @logdir.each do |item| -%> -show_command "ls -latr <%= item %>" -show_command "tail -30 <%= item %>/catalina.out" -<% end -%> -<% end -%> - -<% if @run != "" -%> -echo_title "$HOSTNAME - <%= @name %>: Extra info" -<% @run.each do |cmd| %>show_command "<%= cmd %>" -<% end -%> -<% end -%> - - -<% if @servicename != "" -%> -# Show service info -echo_title "$HOSTNAME - <%= @name %>: Services: <% @servicename.each do |item| %><%= item %><% end %>" -<% @servicename.each do |item| -%> -show_command "/etc/init.d/<%= item %> status" -<% end -%> -<% if @verbose == "yes" -%> -show_command "ps -adef | grep java | grep <%= @processname %>" -<% else -%> -show_command "ps -adef | grep java | grep <%= @processname %> | head -20" -<% end -%> -<% end -%> - -<% if @httpport != "" -%> -# Show port info -echo_title "$HOSTNAME - <%= @name %>: httpport - <%= @httpport %>" -<% if @verbose == "yes" -%> -show_command "netstat -natup | grep ':<%= @httpport %> '" -<% else -%> -show_command "netstat -natup | grep ':<%= @httpport %> ' | head -20" -<% end -%> -<% end -%> - -<% if @controlport != "" -%> -# Show port info -echo_title "$HOSTNAME - <%= @name %>: controlport - <%= @controlport %>" -<% if @verbose == "yes" -%> -show_command "netstat -natup | grep ':<%= @controlport %> '" -<% else -%> -show_command "netstat -natup | grep ':<%= @controlport %> ' | head -20" -<% end -%> -<% end -%> - -<% if @ajpport != "" -%> -# Show port info -echo_title "$HOSTNAME - <%= @name %>: ajpport - <%= @ajpport %>" -<% if @verbose == "yes" -%> -show_command "netstat -natup | grep ':<%= @ajpport %> '" -<% else -%> -show_command "netstat -natup | grep ':<%= @ajpport %> ' | head -20" -<% end -%> -<% end -%> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/module.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/module.erb deleted file mode 100644 index aa53d25cce..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/module.erb +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash -# <%= @description %> -# Script generated by Puppet. It's executed when you run: -# puppi info <%= @name %> -# -# Sources common header for Puppi scripts -. <%= scope.lookupvar('puppi::params::scriptsdir') %>/header || exit 10 - -<% if @packagename != "" -%> -# Show packages info -echo_title "$HOSTNAME - <%= @name %>: Packages Installed: <% @packagename.each do |item| %><%= item %><% end %>" -<% @packagename.each do |item| -%> -show_command "<%= scope.lookupvar('puppi::params::info_package_query') %> <%= item %>" -<% if @verbose == "yes" -%> -show_command "<%= scope.lookupvar('puppi::params::info_package_list') %> <%= item %>" -<% else -%> -show_command "<%= scope.lookupvar('puppi::params::info_package_list') %> <%= item %> | egrep '(/bin|^/etc|/sbin|log$)'" -<% end -%> -<% end -%> -<% end -%> - -<% if @configfile != "" -%> -# Show config info -echo_title "$HOSTNAME - <%= @name %>: Configuration Files managed: <% @configfile.each do |item| %><%= item %><% end %>" -<% @configfile.each do |item| -%> -<% if @verbose == "yes" -%> -show_command "cat <%= item %>" -<% else -%> -show_command "head <%= item %>" -<% end -%> -<% end -%> -<% end -%> - -<% if @datadir != "" -%> -# Show data dir -echo_title "$HOSTNAME - <%= @name %>: Application data are in: <% @datadir.each do |item| %><%= item %><% end %>" -<% @datadir.each do |item| -%> -show_command "ls -latr <%= item %>" -show_command "df <%= item %>" -<% end -%> -<% end -%> - -<% if @logdir != "" -%> -# Show log dir -echo_title "$HOSTNAME - <%= @name %>: Logs are in: <% @logdir.each do |item| %><%= item %><% end %>" -<% @logdir.each do |item| -%> -show_command "ls -latr <%= item %>" -show_command "df <%= item %>" -<% end -%> -<% end -%> - -<% if @logfile != "" -%> -# Show logs -echo_title "$HOSTNAME - <%= @name %>: Last log entries: <% @logfile.each do |item| %><%= item %><% end %>" -<% @logfile.each do |item| -%> -<% if @verbose == "yes" -%> -show_command "tail -30 <%= item %>" -<% else -%> -show_command "tail -10 <%= item %>" -<% end -%> -<% end -%> -<% end -%> - -<% if @run != "" -%> -echo_title "$HOSTNAME - <%= @name %>: Extra info" -<% @run.each do |cmd| %>show_command "<%= cmd %>" -<% end -%> -<% end -%> - - -<% if @servicename != "" -%> -# Show service info -echo_title "$HOSTNAME - <%= @name %>: Services: <% @servicename.each do |item| %><%= item %><% end %>" -<% @servicename.each do |item| -%> -show_command "/etc/init.d/<%= item %> status" -<% end -%> -<% if @verbose == "yes" -%> -show_command "ps -adef | grep <%= @processname %> | grep -v grep" -<% else -%> -show_command "ps -adef | grep <%= @processname %> | grep -v grep | head -20" -<% end -%> -<% @port.each do |mport| -%> -<% if @verbose == "yes" -%> -show_command "netstat -natup | grep ':<%= mport %> '" -<% else -%> -show_command "netstat -natup | grep ':<%= mport %> ' | head -20" -<% end -%> -<% end -%> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/puppet.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/puppet.erb deleted file mode 100644 index 8f377ca12c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/puppet.erb +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# <%= @description %> -# Script generated by Puppet. It's executed when you run: -# puppi info <%= @name %> -# -# Sources common header for Puppi scripts -. <%= scope.lookupvar('puppi::params::scriptsdir') %>/header || exit 10 - -# Show Puppet info -echo_title "$HOSTNAME - <%= @name %>: Information on management with Puppet" -echo "Where to configure this node in Puppet:" -echo "manifests/nodes/<%= @site %>.pp - Node's definition" -echo "manifests/roles/role_<%= @role %>.pp - Role's definition" -echo "modules//manifests/init.pp - Main class for each module" -echo - -# Show ReadMe file -echo_title "$HOSTNAME - <%= @name %>: ReadMe" -show_command "cat <%= scope.lookupvar('puppi::params::readmedir') %>/<%= @name %>" - -<% if @autoreadme == "yes" %> -echo_title "$HOSTNAME - <%= @name %>: ReadMe Custom" -show_command "cat <%= scope.lookupvar('puppi::params::readmedir') %>/<%= @name %>-custom" -<% end %> - -<% if @run != "" %> -echo_title "$HOSTNAME - <%= @name %>: Extra info" -<% @run.each do |cmd| %>show_command "<%= cmd %>" -<% end %> -<% end %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/readme.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/readme.erb deleted file mode 100644 index 4e4b1357b5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/info/readme.erb +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# <%= @description %> -# Script generated by Puppet. It's executed when you run: -# puppi info <%= @name %> -# -# Sources common header for Puppi scripts -. <%= scope.lookupvar('puppi::params::scriptsdir') %>/header || exit 10 - -# Show ReadMe file -echo_title "$HOSTNAME - <%= @name %>: ReadMe" -show_command "cat <%= scope.lookupvar('puppi::params::readmedir') %>/<%= @name %>" - -<% if @autoreadme == "yes" %> -echo_title "$HOSTNAME - <%= @name %>: ReadMe Custom" -show_command "cat <%= scope.lookupvar('puppi::params::readmedir') %>/<%= @name %>-custom" -<% end %> - -<% if @run != "" %> -echo_title "$HOSTNAME - <%= @name %>: Extra info" -<% @run.each do |cmd| %>show_command "<%= cmd %>" -<% end %> -<% end %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/install_packages.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/install_packages.erb deleted file mode 100644 index 906d15e8a5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/install_packages.erb +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# File Managed by Puppet -export PATH=$PATH:/bin:/sbin:/usr/bin:usr/sbin -<% if scope.lookupvar('::operatingsystem') == 'Debian' or scope.lookupvar('::operatingsystem') == 'Ubuntu' -%> -apt-get update ; apt-get install -y <%= @packages %> -<% elsif scope.lookupvar('::operatingsystem') == 'Centos' or scope.lookupvar('::operatingsystem') == 'RedHat' -%> -yum install -y <%= @packages %> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/log.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/log.erb deleted file mode 100644 index 5ca47bbf51..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/log.erb +++ /dev/null @@ -1,2 +0,0 @@ -<% @array_log.each do |path| %><%= path %> -<% end %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/project/config.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/project/config.erb deleted file mode 100644 index 4e8a952bdf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/project/config.erb +++ /dev/null @@ -1,33 +0,0 @@ -# File Managed by Puppet -# This is the base configuration file for project <%= scope.lookupvar('name') %> -# During a puppi deploy it's copied into the runtime configuration -# used by the scripts executed by puppi -# -# Do not edit this file. You can modify these variables: -# Permanently: directly on your puppi manifests (When you use the puppi:project:: defines) -# Temporarily: using the puppi option -o to override them. -# example: puppi deploy $name -o "source=http://alt.com/file deploy_root=/var/tmp" - -# Common variables for project defines -project="<%= @name %>" -source="<%= @source %>" -deploy_root="<%= @deploy_root %>" -user="<%= @user %>" -predeploy_customcommand="<%= @predeploy_customcommand %>" -postdeploy_customcommand="<%= @postdeploy_customcommand %>" -init_script="<%= @init_script %>" -disable_services="<%= @disable_services %>" -firewall_src_ip="<%= @firewall_src_ip %>" -firewall_dst_port="<%= @firewall_dst_port %>" -report_email="<%= @report_email %>" -enable="<%= @enable %>" - -# Variables used by project::files -files_prefix="<%= @files_prefix %>" -source_baseurl="<%= @source_baseurl %>" - -# Variables used by project::maven -document_root="<%= @document_root %>" -config_root="<%= @config_root %>" - -# Variables added during runtime puppi operations diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/puppi.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/puppi.conf.erb deleted file mode 100644 index b167c036e4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/puppi.conf.erb +++ /dev/null @@ -1,15 +0,0 @@ -# General configuration file for Puppi tools -# This file is managed by Puppet - -# Directory locations -basedir="<%= scope.lookupvar('puppi::params::basedir') %>" -checksdir="<%= scope.lookupvar('puppi::params::checksdir') %>" -workdir="<%= scope.lookupvar('puppi::params::workdir') %>" -projectsdir="<%= scope.lookupvar('puppi::params::projectsdir') %>" -scriptsdir="<%= scope.lookupvar('puppi::params::scriptsdir') %>" -libdir="<%= scope.lookupvar('puppi::params::libdir') %>" -archivedir="<%= scope.lookupvar('puppi::params::archivedir') %>" -logdir="<%= scope.lookupvar('puppi::params::logdir') %>" -logsdir="<%= scope.lookupvar('puppi::params::logsdir') %>" -infodir="<%= scope.lookupvar('puppi::params::infodir') %>" -tododir="<%= scope.lookupvar('puppi::params::tododir') %>" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/puppi.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/puppi.erb deleted file mode 100644 index 7248a2a112..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/puppi.erb +++ /dev/null @@ -1,517 +0,0 @@ -#!/bin/bash -configfile="<%= scope.lookupvar('puppi::params::basedir') %>/puppi.conf" - -# This is the actual command used to run the different scripts -# Use cat for debugging noop purposes -# runcommand="cat" -runcommand="" - -# Define defaults -verbosity="max" -show="yes" - -# Define action tag -export tag=$(date +%Y%m%d-%H%M%S) - -counter=0 - -# Load general configurations -if [ ! -f $configfile ] ; then - echo "Config file: $configfile not found" - exit 1 -else - . $configfile - . $scriptsdir/functions -fi - -# Main functions -check_host () { - for command in $(ls -1 $checksdir) ; do - title="$HOSTNAME check: $command" - code=$(cat "$checksdir/$command") - ask_interactive - output=$($runcommand "$checksdir/$command" 2>&1) - handle_result - done -} - -check () { - for command in $(ls -1 $projectsdir/$project/check) ; do - title="$HOSTNAME check: $command" - code=$(cat "$projectsdir/$project/check/$command") - ask_interactive - output=$($runcommand "$projectsdir/$project/check/$command" 2>&1) - handle_result - done - - check_host - # show_report -} - -log () { - tailcommand="tail" - which colortail >/dev/null 2>&1 && tailcommand="colortail" - - if [ "x$project" != "xdefault" ] ; then - if [ $logsdir/$project ] ; then - alllog="$alllog $(cat $logsdir/$project)" - else - echo "WARNING: $logsdir/$project does not exist!" - exit 1 - fi - else - if [ "$interactive" = "yes" ] ; then - echo "Choose one or more log topics to show. Select the last number (done) to end selection" - PS3="Type one number to add a log topic to the show list." - all_choices="" - select choice in $( ls $logsdir ) done - do - echo "You selected $choice [$REPLY]" - [[ $choice == "done" ]] && break - all_choices="$all_choices $choice" - echo "Your choices: $all_choices" - done - for log in $all_choices ; do - alllog="$alllog $(cat $logsdir/$log)" - done - else - for log in $(ls $logsdir) ; do - alllog="$alllog $(cat $logsdir/$log)" - done - fi - fi - - # So, show something - if [ ! -z "$counts" ] ; then - if [ ! -z "$greppattern" ] ; then - $tailcommand -n $counts $alllog | grep $greppattern - else - $tailcommand -n $counts $alllog - fi - else - if [ ! -z "$greppattern" ] ; then - $tailcommand -f $alllog | grep $greppattern - else - $tailcommand -f $alllog - fi - fi -} - -info () { - if [ "x$project" != "xdefault" ] ; then - if [ $infodir/$project ] ; then - $infodir/$project - else - echo "WARNING: $infodir/$project does not exist!" - exit 1 - fi - else - if [ "$interactive" = "yes" ] ; then - echo "Choose one or more topics to show. Select the last number (done) to end selection" - PS3="Type one number to add an info topic to the show list." - all_choices="" - select choice in $( ls $infodir ) done - do - echo "You selected $choice [$REPLY]" - [[ $choice == "done" ]] && break - all_choices="$all_choices $choice" - echo "Your choices: $all_choices" - done - for info in $all_choices ; do - if [ ! -z "$greppattern" ] ; then - $infodir/$info | grep $greppattern - else - $infodir/$info - fi - done - else - for info in $(ls $infodir) ; do - if [ ! -z "$greppattern" ] ; then - $infodir/$info | grep $greppattern - else - $infodir/$info - fi - done - fi - fi -} - - -todo () { - for todo in $(ls $tododir) ; do - $tododir/$todo - done -} - - -rollback () { - if [ ! -z $rollbackversion ] ; then - save_runtime_config "rollbackversion=$rollbackversion" || initerr=1 - else - echo "Choose deploy to rollback:" - ls -1 $archivedir/$project - read rollbackversion - save_runtime_config "rollbackversion=$rollbackversion" || initerr=1 - fi - - for command in $(ls -1 $projectsdir/$project/rollback) ; do - title="$HOSTNAME Rollback: $command" - code=$(cat "$projectsdir/$project/rollback/$command") - ask_interactive - output=$($runcommand "$projectsdir/$project/rollback/$command" 2>&1) - handle_result - done - - send_reports - show_report - [ "$result" = "OK" ] && exit 0 -} - -deploy () { - for command in $(ls -1 $projectsdir/$project/deploy) ; do - title="$HOSTNAME Deploy: $command" - code=$(cat "$projectsdir/$project/deploy/$command") - ask_interactive - output=$($runcommand "$projectsdir/$project/deploy/$command" 2>&1) - handle_result - [ "$EXITCRIT" = "1" ] && [ "$force" != "yes" ] && break - if [ "$DONTDEPLOY" = "1" ] ; then - echo "No need to deploy: source file has not changed" - echo "Type 'rm $archivedir/$project/md5sum' and run puppi again to force deployment" - exit 0 - fi - done - - send_reports - show_report - [ "$result" = "OK" ] && exit 0 -} - -initialize () { - for command in $(ls -1 $projectsdir/$project/initialize) ; do - title="$HOSTNAME Init: $command" - code=$(cat "$projectsdir/$project/initialize/$command") - ask_interactive - output=$($runcommand "$projectsdir/$project/initialize/$command" 2>&1) - handle_result - [ "$EXITCRIT" = "1" ] && [ "$force" != "yes" ] && break - done - - send_reports - show_report - [ "$result" = "OK" ] && exit 0 -} - -configure () { - for command in $(ls -1 $projectsdir/$project/configure) ; do - title="$HOSTNAME Init: $command" - code=$(cat "$projectsdir/$project/configure/$command") - ask_interactive - output=$($runcommand "$projectsdir/$project/configure/$command" 2>&1) - handle_result - [ "$EXITCRIT" = "1" ] && [ "$force" != "yes" ] && break - done - - send_reports - show_report - [ "$result" = "OK" ] && exit 0 -} - -save_summary () { - tagend=$(date +%Y%m%d-%H%M%S) - - result="OK" - if [ "$EXITWARN" = "1" ] ; then - result="WARNING" - fi - if [ "$EXITCRIT" = "1" ] ; then - result="ERROR" - fi - - echo "Report for $action on $project" > $logdir/$project/$tag/summary - echo "Job start: $tag" >> $logdir/$project/$tag/summary - echo "Job end: $tagend" >> $logdir/$project/$tag/summary - echo "Job result: $result" >> $logdir/$project/$tag/summary - echo "Actions executed:" >> $logdir/$project/$tag/summary - cd $logdir/$project/$tag/ - for message in $(ls -1 $logdir/$project/$tag/ | grep -v summary ) ; do - msg_title=$(head -1 $message) - msg_code=$(head -2 $message | tail -1) - msg_result=$(head -3 $message | tail -1) - echo "[$msg_result] $msg_title : $msg_code" >> $logdir/$project/$tag/summary - done - - # Copy runtime config in archive - cp $workdir/$project/config $logdir/$project/$tag/ - - # Write runtime config on Summary - echo >> $logdir/$project/$tag/summary - echo "RUNTIME CONFIGURATION" >> $logdir/$project/$tag/summary - cat $workdir/$project/config | grep -vE "^#|^$" >> $logdir/$project/$tag/summary - -} - -send_reports () { - if [[ "x$report" == "xyes" ]] ; then - save_summary - for command in $(ls -1 $projectsdir/$project/report) ; do - title="Reporting: $command" - code=$(cat "$projectsdir/$project/report/$command") - echo -n $title - output=$($runcommand "$projectsdir/$project/report/$command" 2>&1) - # handle_result # This breaks the overall exit code when deploy fails - done - fi -} - -show_report () { - echo - echo "REPORT FOR PUPPI - STATUS $result" - echo "Summary of operations is: $logdir/$project/$tag/summary " - echo "Details are in: $logdir/$project/$tag/" - echo "Temporary workdir has been: $workdir/$project/ (Will be rewritten at the next puppi run)" - echo "Runtime config file is: $workdir/$project/config" - echo "Files have been archived in: $archivedir/$project/$tag" - test "$testmode" = "yes" && echo "This was a TEST RUN! Nothing has been done for real." -} - - -create_runtime_conf () { - if [[ ( ! -e $projectsdir/$project ) && ( ! -e $infodir/$project ) && ( ! -e $logsdir/$project ) ]] ; then - showhelp - exit 1 - fi - - initerr=0 - - # When project is unset we set it to default - [ ! -z "$project" ] || export project="default" - - # Clean up and Create runtime configuration file -# command="00-$project-RuntimeConfig-Initialization" -# title="Puppi setup: $command" -# code="rm -rf $workdir/$project && touch $workdir/$project/config [...]" -# echo -n $title - - echo $workdir | grep tmp >/dev/null 2>&1 || ( echo "Workdir must contain string tmp" ; exit 1 ) - rm -rf $workdir/$project || initerr=1 - - mkdir -p $workdir/$project || initerr=1 - touch $workdir/$project/config || initerr=1 - - test -r "$projectsdir/$project/config" && cp $projectsdir/$project/config $workdir/$project/ - chmod 644 $workdir/$project/config || initerr=1 - - save_runtime_config "project=$project" || initerr=1 - save_runtime_config "tag=$tag" || initerr=1 - save_runtime_config "action=$action" || initerr=1 - - storedir=$workdir/$project/store || initerr=1 - mkdir -p $storedir || initerr=1 - save_runtime_config "storedir=$storedir" || initerr=1 - - predeploydir=$workdir/$project/deploy || initerr=1 - mkdir -p $predeploydir || initerr=1 - save_runtime_config "predeploydir=$predeploydir" || initerr=1 - - save_runtime_config "force=$force" || initerr=1 - save_runtime_config "testmode=$testmode" || initerr=1 - save_runtime_config "interactive=$interactive" || initerr=1 - save_runtime_config "debug=$debug" || initerr=1 - save_runtime_config "report=$report" || initerr=1 - save_runtime_config "show=$show" || initerr=1 - save_runtime_config "counts=$counts" || initerr=1 - save_runtime_config "greppattern=$greppattern" || initerr=1 - - for oopt in $(echo $options) ; do - save_runtime_config "$(echo $oopt)" || initerr=1 - done - - echo $initerr | grep "0" 2>&1 > /dev/null -# handle_result -} - - -showhelp () { - echo "Usage: puppi [project|topic] [options]" - echo " " - echo "Available commands:" - echo "check [project] [-s ] - Run puppi checks host or project wide" - echo "log [topic] [-i] [-g ] - Show system and application specific logs" - echo "info [topic] [-i] [-g ] - Show informations about the system" - echo "todo - Show todo's checklist of the system" - echo "init [-i] [-f] [-t] - First time project initialization and setup" - echo "configure [-i] [-f] [-t] - Project configuration deployment." - echo "deploy [-i] [-f] [-t] [-o ...] - Deploy the specified project" - echo "rollback [state] [-i] [-f] [-t] - Rollback the specified project. " - echo " " - echo "Available options:" - echo "-f - Force puppi commands execution flow also on CRITICAL errors" - echo "-i - Interactively ask confirmation for every step" - echo "-t - Test mode. Just show the commands that should be executed" - echo "-d - Debug mode. Show debug of what is done." - echo "-r - Enable reporting: yes/no/only on failures. Default depends on action" - echo "-s - Show output: yes/no/only for failures. Default: yes" - echo "-g - Grep command output with the selected pattern" - echo "-o \"parameter=value parameter2=value2\" - Set manual options to override defaults" - echo " " - echo "Available deploy projects:" - ls -1 $projectsdir - echo - echo "Available info topics:" - ls $infodir - echo - echo "Available log topics:" - ls $logsdir -} - -# Check Input -if [ "$#" = "0" ] ; then - showhelp - exit -fi - -while [ $# -gt 0 ]; do - case "$1" in - deploy|init|configure) - report="yes" - export action=$1 - if [ -n "$2" ] ; then - echo "$2" | egrep -q "^-.$" - if [ "$?" != "0" ] ; then - export project=$(shell_filter_strict $2) - shift 2 - else - shift - fi - else - showhelp - exit - shift - fi - ;; - rollback) - report="yes" - export action=$1 - if [ -n "$3" ] ; then - echo "$3" | egrep -q "^-.$" - if [ "$?" != "0" ] ; then - export project=$(shell_filter_strict $2) - export rollbackversion=$(shell_filter_strict $3) - shift 3 - else - shift 2 - fi - elif [ -n "$2" ] ; then - echo "$2" | egrep -q "^-.$" - if [ "$?" != "0" ] ; then - export project=$(shell_filter_strict $2) - shift 2 - else - shift - fi - else - showhelp - exit - shift - fi - ;; - check) - report="no" - export action="checkhost" - if [ -n "$2" ] ; then - echo "$2" | egrep -q "^-.$" - if [ "$?" != "0" ] ; then - export project=$(shell_filter_strict $2) - export action="check" - shift 2 - else - shift - fi - else - shift - fi - ;; - log) - report="no" - export action="log" - if [ -n "$2" ] ; then - echo "$2" | egrep -q "^-.$" - if [ "$?" != "0" ] ; then - export project=$(shell_filter_strict $2) - shift 2 - else - shift - fi - else - shift - fi - ;; - info) - report="no" - export action="info" - if [ -n "$2" ] ; then - echo "$2" | egrep -q "^-.$" - if [ "$?" != "0" ] ; then - export project=$(shell_filter_strict $2) - shift 2 - else - shift - fi - else - shift - fi - ;; - todo) - report="no" - export action="todo" - shift ;; - -i) - interactive="yes" - shift ;; - -f) - force="yes" - shift ;; - -t) - testmode="yes" - runcommand="cat" - shift ;; - -o) - options="$2" - shift 2;; - -d) - debug="$(shell_filter_strict $2)" - shift 2;; - -r) - report="$(shell_filter_strict $2)" - shift 2;; - -s) - show="$(shell_filter_strict $2)" - shift 2;; - -c) - counts="$(shell_filter_strict $2)" - shift 2;; - -g) - greppattern="$(shell_filter_strict $2)" - # greppattern="$(shell_filter $2)" # This allows partial regexp usage - # greppattern="$2" # This allows full regexp usage but is highly insecure if you sudo puppi - shift 2;; - *) - showhelp - exit - ;; - esac -done - -# Action! -case $action in - check) check ;; - checkhost) check_host ;; - log) create_runtime_conf ; log ;; - info) create_runtime_conf ; info ;; - todo) create_runtime_conf ; todo ;; - rollback) create_runtime_conf ; rollback ;; - deploy) create_runtime_conf ; deploy ;; - init) create_runtime_conf ; initialize ;; - configure) create_runtime_conf ; configure ;; -esac diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/puppi_clean.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/puppi_clean.erb deleted file mode 100644 index f6a0eaa0da..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/puppi_clean.erb +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# This scripts cleans puppi log files older than <%= scope.lookupvar('puppi::logs_retention_days') %> -seconds=$(( (RANDOM%60+1)*60 )) -sleep $seconds - -if [ "<%= scope.lookupvar('puppi::params::logdir') %>" == "/" ] || [ "x<%= scope.lookupvar('puppi::params::logdir') %>" == "x" ]; then - exit 1 -fi -find <%= scope.lookupvar('puppi::params::logdir') %> -type f -mtime +<%= scope.lookupvar('puppi::logs_retention_days') %> -exec rm '{}' '+' >/dev/null 2>&1 -find <%= scope.lookupvar('puppi::params::logdir') %> -type d -mtime +<%= scope.lookupvar('puppi::logs_retention_days') %> -exec rmdir '{}' '+' >/dev/null 2>&1 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/todo.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/todo.erb deleted file mode 100644 index 3eaf03fc34..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/puppi/templates/todo.erb +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# Script generated by Puppet. It's executed when you run: -# puppi todo <%= name %> -# -# Sources common header for Puppi scripts -. <%= scope.lookupvar('puppi::params::scriptsdir') %>/header || exit 10 - -echo_title "$HOSTNAME - <%= name %>" - -<% if @description != "" -%> -cat < -EOF -<% end -%> - -<% if @notes != "" -%> -cat < -EOF -<% end -%> - -<% if @run != "" -%> -<% array_run.each do |cmd| %>show_command "<%= cmd -%>" -<% end -%> -<% end -%> - -<% if @check_command != "" -%> -<%= @check_command %> -if [ "x$?" = "x0" ] ; then - echo_success - result="OK" -else - echo_failure - result="CRITICAL" - EXITCRIT="1" -fi -<% else -%> -echo_warning -result="WARNING" -EXITWARN="1" -<% end -%> - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/.fixtures.yml deleted file mode 100644 index 1d111f9752..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/.fixtures.yml +++ /dev/null @@ -1,9 +0,0 @@ -fixtures: - repositories: - "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" - "apt": "git://github.com/puppetlabs/puppetlabs-apt.git" - "staging": "git://github.com/nanliu/puppet-staging.git" - erlang: - repo: "https://github.com/garethr/garethr-erlang.git" - symlinks: - "rabbitmq": "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/.nodeset.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/.nodeset.yml deleted file mode 100644 index cbd0d57b83..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/.nodeset.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -default_set: 'centos-64-x64' -sets: - 'centos-59-x64': - nodes: - "main.foo.vm": - prefab: 'centos-59-x64' - 'centos-64-x64': - nodes: - "main.foo.vm": - prefab: 'centos-64-x64' - 'fedora-18-x64': - nodes: - "main.foo.vm": - prefab: 'fedora-18-x64' - 'debian-607-x64': - nodes: - "main.foo.vm": - prefab: 'debian-607-x64' - 'debian-70rc1-x64': - nodes: - "main.foo.vm": - prefab: 'debian-70rc1-x64' - 'ubuntu-server-10044-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-10044-x64' - 'ubuntu-server-12042-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-12042-x64' - 'sles-11sp1-x64': - nodes: - "main.foo.vm": - prefab: 'sles-11sp1-x64' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/.travis.yml deleted file mode 100644 index 9f68e1fe0d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -branches: - only: - - master -language: ruby -bundler_args: --without development -script: bundle exec rake spec SPEC_OPTS='--format documentation' -after_success: - - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-releng - - .forge-releng/publish -rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 - - 2.1.1 -env: - matrix: - - PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" - - PUPPET_GEM_VERSION="~> 3.4.0" - - PUPPET_GEM_VERSION="~> 3.5.0" - global: - - PUBLISHER_LOGIN=puppetlabs - - secure: |- - mSHk+9ReN6wxJ9sOgySOSKEjaXOdtT9B1BtvsOGcm/FQI3p57meid3B6z37r\nNv9PbxwGb - mcZafMxNAfwr8nUb/bqxeXnZaGiY0E9pvg9aRr3g4knczn+siW+\nDkKlvM0rex2zzF0PDc - 495e61kP5cxcKNVdDJSiUPPK6fNGQ1xX8= -matrix: - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" - - rvm: 2.1.1 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" - - rvm: 2.1.1 - env: PUPPET_GEM_VERSION="~> 3.4.0" -notifications: - email: false diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/CHANGELOG b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/CHANGELOG deleted file mode 100644 index 2a6e7d81ac..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/CHANGELOG +++ /dev/null @@ -1,115 +0,0 @@ -2014-05-16 - Version 4.0.0 - -Summary: - -This release includes many new features and bug fixes. With the exception of -erlang management this should be backwards compatible with 3.1.0. - -Backwards-incompatible Changes: -- erlang_manage was removed. You will need to manage erlang separately. See -the README for more information on how to configure this. - -Features: -- Improved SSL support -- Add LDAP support -- Add ability to manage RabbitMQ repositories -- Add ability to manage Erlang kernel configuration options -- Improved handling of user tags -- Use nanliu-staging module instead of hardcoded 'curl' -- Switch to yum or zypper provider instead of rpm -- Add ability to manage STOMP plugin installation. -- Allow empty permission fields -- Convert existing system tests to beaker acceptance tests. - -Bugfixes: -- exchanges no longer recreated on each puppet run if non-default vhost is used -- Allow port to be UNSET -- Re-added rabbitmq::server class -- Deprecated previously unused manage_service variable in favor of - service_manage -- Use correct key for rabbitmq apt::source -- config_mirrored_queues variable removed - - It previously did nothing, will now at least throw a warning if you try to - use it -- Remove unnecessary dependency on Class['rabbitmq::repo::rhel'] in - rabbitmq::install - - -2013-09-14 - Version 3.1.0 - -Summary: - -This release focuses on a few small (but critical) bugfixes as well as extends -the amount of custom RabbitMQ configuration you can do with the module. - -Features: -- You can now change RabbitMQ 'Config Variables' via the parameter `config_variables`. -- You can now change RabbitMQ 'Environment Variables' via the parameter `environment_variables`. -- ArchLinux support added. - -Fixes: -- Make use of the user/password parameters in rabbitmq_exchange{} -- Correct the read/write parameter order on set_permissions/list_permissions as - they were reversed. -- Make the module pull down 3.1.5 by default. - -* 2013-07-18 3.0.0 -Summary: -This release heavily refactors the RabbitMQ and changes functionality in -several key ways. Please pay attention to the new README.md file for -details of how to interact with the class now. Puppet 3 and RHEL are -now fully supported. The default version of RabbitMQ has changed to -a 3.x release. - -Bugfixes: -- Improve travis testing options. -- Stop reimporting the GPG key on every run on RHEL and Debian. -- Fix documentation to make it clear you don't have to set provider => each time. -- Reference the standard rabbitmq port in the documentation instead of a custom port. -- Fixes to the README formatting. - -Features: -- Refactor the module to fix RHEL support. All interaction with the module -is now done through the main rabbitmq class. -- Add support for mirrored queues (Only on Debian family distributions currently) -- Add rabbitmq_exchange provider (using rabbitmqadmin) -- Add new `rabbitmq` class parameters: - - `manage_service`: Boolean to choose if Puppet should manage the service. (For pacemaker/HA setups) -- Add SuSE support. - -Incompatible Changes: -- Rabbitmq::server has been removed and is now rabbitmq::config. You should -not use this class directly, only via the main rabbitmq class. - -* 2013-04-11 2.1.0 -- remove puppetversion from rabbitmq.config template -- add cluster support -- escape resource names in regexp - -* 2012-07-31 Jeff McCune 2.0.2 -- Re-release 2.0.1 with $EDITOR droppings cleaned up - -* 2012-05-03 2.0.0 -- added support for new-style admin users -- added support for rabbitmq 2.7.1 - -* 2011-06-14 Dan Bode 2.0.0rc1 -- Massive refactor: -- added native types for user/vhost/user_permissions -- added apt support for vendor packages -- added smoke tests - -* 2011-04-08 Jeff McCune 1.0.4 -- Update module for RabbitMQ 2.4.1 and rabbitmq-plugin-stomp package. - -2011-03-24 1.0.3 -- Initial release to the forge. Reviewed by Cody. Whitespace is good. - -2011-03-22 1.0.2 -- Whitespace only fix again... ack '\t' is my friend... - -2011-03-22 1.0.1 -- Whitespace only fix. - -2011-03-22 1.0.0 -- Initial Release. Manage the package, file and service. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/Gemfile deleted file mode 100644 index 02e632165f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/Gemfile +++ /dev/null @@ -1,26 +0,0 @@ -source 'https://rubygems.org' - -group :development, :test do - gem 'rake', '10.1.1', :require => false - gem 'rspec-puppet', '>=1.0.0', :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'puppet-lint', :require => false - gem 'serverspec', :require => false - gem 'beaker', :require => false - gem 'beaker-rspec', :require => false - gem 'pry', :require => false -end - -if facterversion = ENV['FACTER_GEM_VERSION'] - gem 'facter', facterversion, :require => false -else - gem 'facter', :require => false -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end - -# vim:ft=ruby diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/LICENSE deleted file mode 100644 index 297f85cfa8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2013 Puppet Labs - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/Modulefile deleted file mode 100644 index 5301dbce61..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/Modulefile +++ /dev/null @@ -1,13 +0,0 @@ -name 'puppetlabs-rabbitmq' -version '4.0.0' -source 'git://github.com/puppetlabs/puppetlabs-rabbitmq.git' -author 'puppetlabs' -license 'Apache' -summary 'RabbitMQ Puppet Module' -description 'This module manages RabbitMQ. Tested on Debian, Ubuntu, and RedHat' -project_page 'http://github.com/puppetlabs/puppetlabs-rabbitmq' - -## Add dependencies, if any: -dependency 'puppetlabs/stdlib', '>= 2.0.0' -dependency 'puppetlabs/apt', '>= 1.0.0' -dependency 'nanliu/staging', '>= 0.3.1' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/README.md deleted file mode 100644 index d956bdedcf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/README.md +++ /dev/null @@ -1,394 +0,0 @@ -#rabbitmq - -####Table of Contents - -1. [Overview](#overview) -2. [Module Description - What the module does and why it is useful](#module-description) -3. [Setup - The basics of getting started with rabbitmq](#setup) - * [What rabbitmq affects](#what-rabbitmq-affects) - * [Setup requirements](#setup-requirements) - * [Beginning with rabbitmq](#beginning-with-rabbitmq) -4. [Usage - Configuration options and additional functionality](#usage) -5. [Reference - An under-the-hood peek at what the module is doing and how](#reference) -5. [Limitations - OS compatibility, etc.](#limitations) - * [RedHat module dependencies](#redhat-module-dependecies) -6. [Development - Guide for contributing to the module](#development) - -##Overview - -This module manages RabbitMQ (www.rabbitmq.com) - -##Module Description -The rabbitmq module sets up rabbitmq and has a number of providers to manage -everything from vhosts to exchanges after setup. - -This module has been tested against 2.7.1 and is known to not support -all features against earlier versions. - -##Setup - -###What rabbitmq affects - -* rabbitmq repository files. -* rabbitmq package. -* rabbitmq configuration file. -* rabbitmq service. - -###Beginning with rabbitmq - -```puppet -include '::rabbitmq' -``` - -##Usage - -All options and configuration can be done through interacting with the parameters -on the main rabbitmq class. These are documented below. - -##rabbitmq class - -To begin with the rabbitmq class controls the installation of rabbitmq. In here -you can control many parameters relating to the package and service, such as -disabling puppet support of the service: - -```puppet -class { '::rabbitmq': - service_manage => false, - port => '5672', - delete_guest_user => true, -} -``` - -### Environment Variables -To use RabbitMQ Environment Variables, use the parameters `environment_variables` e.g.: - -```puppet -class { 'rabbitmq': - port => '5672', - environment_variables => { - 'RABBITMQ_NODENAME' => 'node01', - 'RABBITMQ_SERVICENAME' => 'RabbitMQ' - } -} -``` - -### Variables Configurable in rabbitmq.config -To change RabbitMQ Config Variables in rabbitmq.config, use the parameters `config_variables` e.g.: - -```puppet -class { 'rabbitmq': - port => '5672', - config_variables => { - 'hipe_compile' => true, - 'frame_max' => 131072, - 'log_levels' => "[{connection, info}]" - } -} -``` - -To change Erlang Kernel Config Variables in rabbitmq.config, use the parameters -`config_kernel_variables` e.g.: - -```puppet -class { 'rabbitmq': - port => '5672', - config_kernel_variables => { - 'inet_dist_listen_min' => 9100, - 'inet_dist_listen_max' => 9105, - } -} -``` - -### Clustering -To use RabbitMQ clustering facilities, use the rabbitmq parameters -`config_cluster`, `cluster_nodes`, and `cluster_node_type`, e.g.: - -```puppet -class { 'rabbitmq': - config_cluster => true, - cluster_nodes => ['rabbit1', 'rabbit2'], - cluster_node_type => 'ram', -} -``` - -**NOTE:** If you are using a version of RabbitMQ less than 3.0, -you still need to use `x-ha-policy: all` in your client -applications for any particular queue to take advantage of H/A via -mirrored queues. - -If you are using a version of RabbitMQ >= 3.0 You should set the -'config_mirrored_queues' parameter if you plan -on using RabbitMQ Mirrored Queues within your cluster: - -```puppet -class { 'rabbitmq': - config_cluster => true, - config_mirrored_queues => true, - cluster_nodes => ['rabbit1', 'rabbit2'], -} -``` - -##Reference - -##Classes - -* rabbitmq: Main class for installation and service management. -* rabbitmq::config: Main class for rabbitmq configuration/management. -* rabbitmq::install: Handles package installation. -* rabbitmq::params: Different configuration data for different systems. -* rabbitmq::service: Handles the rabbitmq service. -* rabbitmq::repo::apt: Handles apt repo for Debian systems. -* rabbitmq::repo::rhel: Handles yum repo for Redhat systems. - -###Parameters - -####`admin_enable` - -If enabled sets up the management interface/plugin for RabbitMQ. - -####`cluster_disk_nodes` - -DEPRECATED AND REPLACED BY CLUSTER_NODES. - -####`cluster_node_type` - -Choose between disk and ram nodes. - -####`cluster_nodes` - -An array of nodes for clustering. - -####`config` - -The file to use as the rabbitmq.config template. - -####`config_cluster` - -Boolean to enable or disable clustering support. - -####`config_mirrored_queues` - -DEPRECATED - -Configuring queue mirroring should be done by setting the according policy for -the queue. You can read more about it -[here](http://www.rabbitmq.com/ha.html#genesis) - -####`config_path` - -The path to write the RabbitMQ configuration file to. - -####`config_stomp` - -Boolean to enable or disable stomp. - -####`delete_guest_user` - -Boolean to decide if we should delete the default guest user. - -####`env_config` - -The template file to use for rabbitmq_env.config. - -####`env_config_path` - -The path to write the rabbitmq_env.config file to. - -####`erlang_cookie` - -The erlang cookie to use for clustering - must be the same between all nodes. - -####`config_variables` - -To set config variables in rabbitmq.config - -####`node_ip_address` - -The value of RABBITMQ_NODE_IP_ADDRESS in rabbitmq_env.config - -####`environment_variables` - -RabbitMQ Environment Variables in rabbitmq_env.config - -####`package_ensure` - -Determines the ensure state of the package. Set to installed by default, but could -be changed to latest. - -####`package_name` - -The name of the package to install. - -####`package_provider` - -What provider to use to install the package. - -####`package_source` - -Where should the package be installed from? - -####`plugin_dir` - -Location of RabbitMQ plugins. - -####`port` - -The RabbitMQ port. - -####`management_port` - -The port for the RabbitMQ management interface. - -####`service_ensure` - -The state of the service. - -####`service_manage` - -Determines if the service is managed. - -####`service_name` - -The name of the service to manage. - -####`ssl` - -Configures the service for using SSL. - -####`ssl_only` - -Configures the service to only use SSL. No cleartext TCP listeners will be created. -Requires that ssl => true also. - -####`stomp_port` - -The port to use for Stomp. - -####`stomp_ensure` - -Boolean to install the stomp plugin. - -####`wipe_db_on_cookie_change` - -Boolean to determine if we should DESTROY AND DELETE the RabbitMQ database. - -####`version` - -Sets the version to install. - -##Native Types - -### rabbitmq\_user - -query all current users: `$ puppet resource rabbitmq_user` - -``` -rabbitmq_user { 'dan': - admin => true, - password => 'bar', -} -``` -Optional parameter tags will set further rabbitmq tags like monitoring, policymaker, etc. -To set the administrator tag use admin-flag. -```puppet -rabbitmq_user { 'dan': - admin => true, - password => 'bar', - tags => ['monitoring', 'tag1'], -} -``` - - -### rabbitmq\_vhost - -query all current vhosts: `$ puppet resource rabbitmq_vhost` - -```puppet -rabbitmq_vhost { 'myhost': - ensure => present, -} -``` - -### rabbitmq\_exchange - -```puppet -rabbitmq_exchange { 'myexchange@myhost': - user => 'dan', - password => 'bar', - type => 'topic', - ensure => present, -} -``` - -### rabbitmq\_user\_permissions - -```puppet -rabbitmq_user_permissions { 'dan@myhost': - configure_permission => '.*', - read_permission => '.*', - write_permission => '.*', -} -``` - -### rabbitmq\_plugin - -query all currently enabled plugins `$ puppet resource rabbitmq_plugin` - -```puppet -rabbitmq_plugin {'rabbitmq_stomp': - ensure => present, -} -``` - -##Limitations - -This module has been built on and tested against Puppet 2.7 and higher. - -The module has been tested on: - -* RedHat Enterprise Linux 5/6 -* Debian 6/7 -* CentOS 5/6 -* Ubuntu 12.04 - -Testing on other platforms has been light and cannot be guaranteed. - -### Module dependencies -To have a suitable erlang version installed on RedHat and Debian systems, -you have to install another puppet module from http://forge.puppetlabs.com/garethr/erlang with: - - puppet module install garethr-erlang - -This module handles the packages for erlang. -To use the module, add the following snippet to your site.pp or an appropriate profile class: - -For RedHat systems: - - include 'erlang' - class { 'erlang': epel_enable => true} - -For Debian systems: - - include 'erlang' - package { 'erlang-base': - ensure => 'latest', - } - -##Development - -Puppet Labs modules on the Puppet Forge are open projects, and community -contributions are essential for keeping them great. We can’t access the -huge number of platforms and myriad of hardware, software, and deployment -configurations that Puppet is intended to serve. - -We want to keep it as easy as possible to contribute changes so that our -modules work in your environment. There are a few guidelines that we need -contributors to follow so that we can have a chance of keeping on top of things. - -You can read the complete module contribution guide [on the Puppet Labs wiki.](http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing) - -### Authors -* Jeff McCune -* Dan Bode -* RPM/RHEL packages by Vincent Janelle -* Puppetlabs Module Team diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/Rakefile deleted file mode 100644 index 5868545f20..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/Rakefile +++ /dev/null @@ -1,10 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' - -PuppetLint.configuration.fail_on_warnings -PuppetLint.configuration.send('disable_80chars') -PuppetLint.configuration.send('disable_class_inherits_from_params_class') -PuppetLint.configuration.send('disable_class_parameter_defaults') -PuppetLint.configuration.send('disable_documentation') -PuppetLint.configuration.send('disable_single_quote_string_with_variables') -PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/TODO b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/TODO deleted file mode 100644 index 8ae578e9e3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/TODO +++ /dev/null @@ -1,10 +0,0 @@ -provider TODO - - - password should be a property and not a param - - what if we tried to log in as that user? - - can permissions from list_user_permissions contain whitespace? - - what about defaultfor :true? - - prefetching for performance - - rabbit plugin should require rabbitmq class - - rabbitmq class should be renamed server?? - - service name should default to -server - - cannot find stomp package diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/files/README.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/files/README.markdown deleted file mode 100644 index be52188c47..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/files/README.markdown +++ /dev/null @@ -1,22 +0,0 @@ -Files -===== - -Puppet comes with both a client and server for copying files around. The file -serving function is provided as part of the central Puppet daemon, -puppetmasterd, and the client function is used through the source attribute of -file objects. Learn more at -http://projects.puppetlabs.com/projects/puppet/wiki/File_Serving_Configuration - -You can use managed files like this: - - class myclass { - package { mypackage: ensure => latest } - service { myservice: ensure => running } - file { "/etc/myfile": - source => "puppet://$servername/modules/mymodule/myfile" - } - } - -The files are searched for in: - - $modulepath/mymodule/files/myfile diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/files/plugins/amqp_client-2.3.1.ez b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/files/plugins/amqp_client-2.3.1.ez deleted file mode 100644 index 6ef6d4ff148f4bbba71800a8941c26f25bd393d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 151912 zcma%?bC58+ljp~_ZQHhO+qP}nwr$(C&1Ytwv8{V|@9OS$Ykzx}s-%*tq^qma-~5qJ zw}Lb<2o%7-HF|SlzJH(muK@-C6~NHe(LvwX#?sWzgISh0$D}ww06QakR}f5F^B@DJU=;8X|@$kAG|5*!Wm3IXo3{dY#lL22vL8y zOu+L9XiKSvZVw&0)usXHY-+R=MA@aM^6f3rnP3gwHIPAT6VHiiDXAQyvR8m4Q&OOj zwK-ix1UTnpR?(QdE_WgdSt~nulSVvk9OT52Dyh01GIur;!)G517KCZWXzmfLgQjM? ze1v{gop@PbkJ*Uaa5h@y1Qy!?Y0sUj55MQuwM)(s5by~8+lE_VXM?Zv(F;swq(>&f zkEpuHHGq;Rhw^+5L(oEy#wrgOE3tEyn!KKr0IeMJE`i=geyXb z3F9y;SG-H~cmidE<>{P=YCII?E0G6&_~nDaTTSuU|0MZ$#SoIO4! zE>{Eh&kj&u)Eq)pv$&Nn{D!rhiJ~n8?J>}`LrY7hq+;iJmpbaNbx}+8{Oknt#p9rD z(;Yu`^0w|ZE=Ko`wNJHem2QquLc1PC%rLvLe!uR0KdRxs#GIG@9bX$9=~U%qmg)^k zN{DpJD65Rf(C2!S!XB53To(j9@oa?nK&cnM2lfK9>%zvc>48#4;^^_G~m%>RKS3VbaomQ=uM4BU3?ovM!vH~v z8&LQj4*SZD=Pm-7yir0vb$AbZsxwEO;k%mgF+x0&^v@ zb&a^%XIy!IqaPxOs3ZO%3?>MPByfN+F}U#`4xGd!U44&mH4$XuLS$m%sxbgKgd`Er z786rflCBq%SC$uB$1GYeEH7oRLWkfWhv}X7@-lD*D~fLU%_S323eO;zpeGiVkP?5< zxAOk26@&cYciM4ja@qRrH^C@GLg3{SB7OU%gAB$C*~0;HAxi;)Eh;Yo1|F6fOd0?u z_~2n+5Pu;|?8+lS1ksQ^AOJYf7V?!Dycjr)CdKHekaJOFRJL;_3Lu3uc6Ias+xr{6 z`F8XLK|mCc0kD9d{S+@N2tW!b0Q48K;M15{$A|lO9PAwAi(YmDKkqc&myzyUIQ{|O z>kml6ccknC`O7E(Cb1)WRySqy8zW(QT|@?_tVbaPZpKs zt1Z}%ZPd~2=Ea&8GJr8YdNqG5u*HD`#*hidxocu4Hv}BP!*CHDng9w0fbRbJ+wNb) zj=Z~p*Pch>kz*rZP?$rwXW@?nMt|F2;Gazs9v%PyTHq9F!I)Qi*`sLn37-Y@Sg22a zI3jfa4)OuLA^51o0ncL6pP!yl0}ml~B=v;!#Gm8)7t~?zVFn0#`oH}=7CbZ1=MVM~ z{ht9D(d(ksoe;to!Q+Tnh2#Jq`7tDc0fdU^hXE4u0AKuAkdaRJL&Jy;0Hip8!`<^=as3xTq&a!eL&ykU z__Juyj)`x-KdMI|wISU_fWt=s0A*Pc&Hw}a)CZR7!;*hP>h!hC<EBp2Vs&!N^kOd-x+FwYAH&yY2T}Fl(R@>0@xI@ESY3{W-8pM6 z!F^}wYscrS{i{f*)hMS*=-7G2_qu8$F^|3-gM;-d2S5A_LZ3et%8V0pUe2sLQd?qF ztd^O6UwmJaPwkU8)i1qZ)D)CiMW99fuuE!VRNs)q0^^lz+z%47Xz>$2e+UM5j~cm| zx7>J?(sMo1fKJtK$A^UZNJ-%#)appGO!U=d9kp`RB}ZwkYeB8H>-F9fuP4hFTz;>Z zcX8T6sNY>L%K&B#Y`TcM$@PDLJ2$TlRk~n!oKV57KC?~>jL%Mxg!P6nO|wR~svPK# zrv_}MPfv=xD%TYn%N%X$eIzE256iVgnjIgUpn`C zzSm~!oj5<_;5l&#r{vNY*-W%IRFv71!^_tl71eF8hK2KLYs4WQ9PLId9Av_`6ELGI zoVy-BDJL(6MIOF5zIQwi%wyLNpIMmg{t~LZU76_u8~J01fpp{F4yZj?q)DmV)KV0~ zK&V!HTt)C6MfeVM6o&i3B|Ci;BP?v8YYr%sx(eLuwpQ%P^%6CFEoGi=FJM=bCKd!3 znoKtYlox+I9RMr#TRQP20wpR@ViBcFGd87E4u>)l)YSg4dcSzxeOxXb zI9B$}mieHmLdu&mdB)(8mE~!(x>MymS*A#46=P6MjWB&>dosl&B8sIEsK_|Wb{9wc z^RFLQ)^m@O?Dj-*%X|ngAGxN`z&e`2x7I)UOpml|2-Fb!HcxPztR?13N#U9%yj;N^ zxEj6yWo0t@^bUTsJ}}}XW*?u5PO8*J;u!*s>c=6+0rI5sEdrt}#@pt{qNoa0ffk^I z-5%NPns|e~Fl{&Xkx`roc4=QwS$zG`9FetT&%Z4%Lt&I3o%Xm}-HcFQYpm(JfvHzb zC&;X7a?FOHbWJN|dCl{Wfprk~(&S`sj8P@(7 zHS4M=%=(nc9LAp@-xWL5XvhomRQKZh$R&u#nZ0#=$MM_Zc(67VNA+HzJyWxiUbnfH zvge5wx*!m>9|KC}z4RlDc{-V6+=R$yYSzuLZN!ovb`NBAkp>zqIaQW`W24CMQ`gzM zGmhLvnz$sWZ)c;Ip_zPh$t>ZeK2a~%CtmIjP>K${+qqFnZ7MA#UkDTE#Z9N6otu}! zo;0ZZg2+KS(?WJks=vWE;kS?JB$ji*-QFAcVlEJ^F>`1y$;v!vtUhqKdkEpjr&)iv60vR&UpeiX9>ShT2Wj&~sf@ z;UX_)D~|9Ct=3~EmbBt>7A0)GL=vAkmMkt}Ux5ql!PH5eHcnk_w@?>05;rgFKPGO! zJR-Y6+N)Xgo`yCXhd;X+Vi&}O-ai9x-&ymLx4QZAN*zn0cKN#ZY1YfY&!BgLC1EyH z^V@mpT;UgM2ANpQOwzd&>E9pJ#+2WFbwgxcDG~ZO!{FOp8H;RX)vtXSD)$Rv9-r6$ zeG=b|mzX^2I|B=sJl#VgQ-GZLQ?>m(&Ddyk_Q1@2T$UwIF_lQ(h>1cq$*S&xSopMB z7)LjsnxV9S_OTvvHFYac?fQ2xh_JTr)R=UV8{o`xLnZM(sg#zX25$HCCgJ8A&xM_P z^+mL^xFKCuX3Uo1GCE5;NfP6OaZHhIHV;znlf6Hclj9_+qWvC zg(*PAg*nwCMP7wMK8k&A=($(Z{zj`Wbe2Vl*~w1(*D-YXXLl-7#(fznIU`0BD>D{K z-ygzjVn(E6J3qxbkduOARr1*o_&x9^*$0mUE6<(M95~Uafa! zC0h4=4h3S3ty#cKDw6&>pqc&-TJuWI;IoLhPBlsQIY>;a;AM1qDtLU=nCnX#?e?=W zhj8|a8LVChn<(R!cR18WTxB!N1H?|^%3@xGx;2)GCIw5Usj@NvD)L`;vBKc4v$D@$ z-IvZI+iQ+qqhjQz^@4A0Yx5Hs75MDW1#lr+UEH;mPFhBd0}Q1za*NU9?8{quv`iPp zkk=Z4k&ENGS)cXIVpu0p33X&p@f1(=ie-7&f9pxpBlSPNT^9kF%%wt^%l7z+zR(TZ zsQM%G@BBPo?mhuvAjuB0QXo)#ZoKH2UJ8cMfCCS+Qm>9QaDy@l=5z-v99FI9?#}PL)4S^Q7 z*56f@P8unLv25N=wS=90GUZAZmeBh#si0r-=NWJs=KCoTp$<0?2hI6;v`)64PV6`l z@A(8jICaUo%Aw>a1{3L6Qy(1`2C|WRfzg#0bKFmkdGIb*`tl=+Ek-tLX0;dYM?Obs zLifJ!rYjo$oC16ZzB_&@@5SX0lPw^f00%cZA6_wM+w*UmIaXvJqtRwW!ZLq*-@Rlb zD;4IAx;`p7>e!`+;NdWt@t1b9c4U0F=w=qxtCW(+F)aXj(IW_Z-LX0r(>F70TkQym zE}o$K2evgC{ZyNx(kib@#S(~8)wnc7xv{0d=pSO)>TZ+#ePKGU`uSrlY-qI#@-xkO{1*MrQiA@wS(ni7fq;SH7G^n;n1^5=!Uy1-mjC`j@KBQp4{zO)-Yk> z9L%1V!kWM%0lkZs=PGk?QK+BcC=;b+Tu*tQn3^mdKO|2L^QN>oxVoCu z10;K+jdu2=i>L2dyVOihnSm=_E*OPonQ?){a(~B-f!|HnRq&R-Z?AL8Bh;; zw?xGEe7RP#ad%{tZmb_e7yj=BKE6pZ` zCk2VMuCo;e7S$B8HGNZ|X_smTZ{gnW6|6kmE?Q^v2<7=~at0y#)eH5UZLBh*m6Y4# zrHOk;|ZbRS5V$ z{pnLtu5fqZ~|LE~F` zkDsvE?t1eW_e%`Va5ytCDm8kU?;gdX3~g*oT4BErVJ3GzC)um3F>xdFy6zu-mu0Se zIWdN$WwZ>_As`E&m+b%@YZ$y{0fn=gTY0s6e|IBB(-@$W4$EC#^*|NPwV{s zNVUhtCDxb%wa_y|>;0N4T^(8T@7Mmojkj=ERHj zKKSMXjE+tYYJ`B+oY^zL94p^i_Qzyl0JFE2>R0G#pQiensO^A^1cjubRD{cPUjGx^ zJcVRH_H2na_R3bDb{Pq`BG0^`WRu}9Dy>>7v{j$F0jc5`zHg^iaSB_3wO^!GpQdk& zL%nDB+7Tq8^HaIxcfgTh4BX0`ZJ35|w(Ml$W95vpEuL)f`&L{=rTpZuq-aC!w0u-p zi$=;IFgYjMQqiA|})P$zo15<5qw(dJ3XsyKk_cX2v$yFs7 zqdN848L|G=98ULQex*9DlGa^Me&%tp^f&d$M@8ot8Ocf<01VvcS)6Utf8{_3AQL{BmgdksBVN`4{RkdBbSd`K6NKOT=7GEX) zEi(q@@nz1%+>emM>qUe#6<5w>(VUSwuLSn>#6{NBmHv~2YG2|FYg?hgp*rJS!IY0% zb%qlgk0|l*<#7yFEfBu&wEqJ|eTq^OM|7STeZM<-GNNnCaiozU5X=?6ma@c2+FSyi zf}gg*^Y*VP586i(BGx6%=A5WeCHM4KC`>VDoF3}0R*k?MrOZcAv!nh(8Yfjf=G(!P zdox7mm;B2OWsN6Gt&s8vl(Uu3#LV?v(&06DxY0v)WG#8w{wvN`iR&@;*%+?wD=yxR zR0hAYjx3A;PhFK;s@t#WI*LD$u|2N|yYm7?PvgOt_duOA8@kIJB!M>CC@-hWiYFt8 zom`^+Ijqo6OiIHc~r`&z{^bJ%AyIxJUbca74M#$8kE?I#2hvM-;R8Xr^}D#jTZ{J6&$Q4@T5}KfwW}`ku-v(NxqQvK=%nJb zQ5W2wjIMh@z@*PqjmEb&JVkeq3(f_cS7OFFJ_tyKtL1X! zeY!zYO5HhlO2V~e?yEa)$}Cw&uN$8~84u||vz7zXNL;xGF6znM-b{VKy1nK1h~X`V z36%0_G7;lI+jC9FEX&DPW#IyR&-a7Z?7&J2!k;TXM~PkWly9^tJ8S6q!`+H??qAXy zaoW`9UGer-GZ)cY2{~@77MbVF7y9j<@;R$_MaE2luztUcd6wZW56hl>4u>s~?N@~9 zom~0m1<%ZjYoTls@V-bkf4!rNKqW)I*+6M7%zO3&&77&d7V(-OW?ki}bHfZeSBsG7 z#m2-J3vbs+GU?6I$}RA4>_S?>EV6#bsA$(sGyWLQzB!vkM$Kvwm)3H(*6ygdn^L1t zEmxKxl~7}nWBU1BtUi6IhtLt((pm$4p~sYVtM0iGue|J{ckDk5gw8%E>B{_An7+&pkf$Z-n{*Rj6EuGla;hF?i#9#{NsrFPgQg$g zx~<%)L9c!Ae6(l$oKNAYP^injvD?x?W@*uW@3MDUy>0|n4!&Q8pF)|Qa8`xe6|j(- zrlE<_xj?dzpIe9iNOW**m^YDlX-8~!lWchQfAofLfcTDzD~!+>VvZ}{z_Ei zRM(S5GRuU($64j`IPrCrKWoZ=ot}Kv26wm5f6fQ!S+%fl9GM#9!=daPK=Rw3>zT&88D=*GXz!*sa0u~JCulSR+!?wO<()?@E0#zJ$(tj zbH;y2!pf;yrZWr5)!yvhyF1KTe95AG9UA|_rN2Yvr0Rvvl%(uVcCY9+#$>l>Ws4(i zmCJXafbPQCt$#ffX4tai!O$Z6D?#uZFiy7?8Q_pB&2M2BK0vX2-05a@jYl+d z6B3*r`0kz*s;BU0@>pX_eVbs&XK%#hqiMYes+ah+ccnVx~iJgG4+)70^$#+@S|88e(rf-YRh zlV-kBCDZV;|AmrF2GLE-X1bwpER2tWwlbrHMygWEydH6nwdwVho9YV{#p*Kxp*2}gEJutudHMR7F%ATZzv21che^&BRyc@N8 zMq+JWb|(PNUk{1KaI{k=Dj3$)I4_-aRP(iO=`oEwDNL@Rb^-{L-KbV~c6aawmU*oucr~m&Afm7C&Krux5F*kGXt@&dXCP`>5Db&%el@*Fu z-IqJ^xe!{*X-;{m;EQWP*-o|VXy#O${qiLkg5S&(lQiLB}12@J0dku6H%Aq zBHxh;-^=yj`0MO*&VO!((_F3Y*&NV7miq1_{ZBO!JU{?Mqua!~R3O3lLXefJ3PrUW zg(MDg2o*8ZVpx@hQVk&}hnN9v6qQuR#Fl5`5(n1+#A;D&8Ye}_k#GxEhDb3GwMdkh z8F3J>3{NS98wmC30P-o&%(*Oq6fVHDNFMTI8W4CJoIC;UhFQJL%m4{bA)>){3;}r? zxF=lAvh>UXq&Zn2Qmy)l6R#s9{W%->pb*yPcWXY{oY%Mh!bB0)16e6E$|nE~Q}QfC!498-pNV4`=1R-5zNli)fh9 z*LiPT+%;e$i7qfP48`PF1}K?4F^-rIO&XPA6Xw_)v~Q^tiu0m}bb=sl3N#fjB88WV zo0`-EvyON8#FivfulR;WLv@j|i_;q-vZWZApbk{j zo)$@nPfi%aKvq)Jj6w;^6j?xxD6&?B#=)_LBBBbDt3R;_uJ{D?$E}od+hIx zdg=S|;v`$yPjdl7Eq~fdFK1PL)ZM7w5BqxVAA`wt$ldg=r1Pcax{dH{@a({8i)B%l z>*l{k_;2WWw%YjT-)?lu`q49Qy)5!x7EjD+dX_FQ?dg(;qPO9EBXyN?y$|||4z4gg z%+2mm>&|4AMZE^EUBAMIS*KlFz4Fgulp)REtWb$-vCrW1t!6u7Q#bZeZ$A_9v!wV? z+?5qqSbqc`7skzgh1T-gj3l|#{FYMltR&o1KN-8c#}~H~!B>*Y@*FnD&(!JbxcW`T z_2wH6j`mC&r%j}R&VQ+Km0Hi&pNFHB%}~){+S^Wes^a#0vs99Ni{ZS%{zsX{)A-FhM|omC<;ko zsYnS)At0sSB?Sr!NC_xuVR64Z>CW%}?Edv*HqY%{YtHLk+q%r@jgP7u6}R;QFiP$3$quu#@Os5kekc9iAjFw-~$(W{cn1uA$$m_&xY{`W^Zwc?atH zMC_UTNI%ay;URtBfEI5`PAk6T1VCcs>ND#%q)P|;l2@a)-NvJZbpbF~EIZ#!V zur^18}r3e5Nf>K~GYUf?3c;`Jzl?kE%&mH!KXhEwWSt_b38LjP16e13w zYY<|x(KIQLkU39R^cPw0>bDR?0P{9TP0}SBw zDEK)56>DPv4VLO40*lQ7FFGgz4rV8?w{RplApuzMz#0GuB=J(9CXfIsMid?_h{CW6 zNC86-o-_{tk`+P36&4ymaK*qH5S5ouRR~N~YNm)WIvi5*LSQF=01GA<5jji^90>?y z(U68r2Ez;2fd^s4!4@!pKnz!a4q+suF@q6}IR;1@Tn7-OQ3n`<>GHXW0iy&I8-U^I ziJ{BSvNg`18Oadj60Cd#Vii^{77;53z}{vH`x~pgJJY## z`L~q$rsqh5g0fs=WVD z;YXGJJ=QNadDlRL-FL8Su(1V)xBfD56k>*bd2MS8%g&ZJ9&1RJLU-DKeG+guS?Zde z$oO@(q6}U9mQ<+-^i_*DtA@14KR=)RIR) zz!ZGoMXdM-gM#5;X$u{*p2=830xtyp${T?)BS{ZoKtO$xy;=Ea7JO@!y91pwX`|U6IyI|O z84sLH;5-2^24IpDC^qOtAl_fMje_%e?+!#42Woh~dR0*#+odeVaZPh&p0`OzDYt@! zZ>IUb3nSGaC(nu>l#X)a$NpGnSUplv*tFNyeLleC3`-nUUDdX7d>nM27b?p=ZUm}g za*N+yTH|8FB1Kn8KbPAz_uoxSzTq9|+u@rKUuL_tl1a{(hrxJt5&3?hM9CzXxc03@ zC{J1^8Z(5@ujXw=L=R@Y>1OR*aLlH6lWgV8LE`+Z(zUBpb)S@=F;;%lVnVe$WAo)^ z*6Of-G!_Dvvt-U=?gd*z4|BdIf{jMUKZNg>bZ4H_e)(e~fK zEm31jcu=#pT!P8NlgP_Ql9A7PL$$j(dYl?pGB~mImo#UoOEd$g=AFnhLYI>wx>htc zk;t<){+bAOy6Sf}OFEI0EH*1PdpJu2e2ER?qR&%%W2vi)I)zc_^Z<3|u&k1ZIE@%C zZ!`7{i&#oKHH%l9FRoUvhiw*v=FG;ZF5moRYWV3&-XLSy3Odw%VF$8IgtN3Fthoj< zScBxh=}RrxK!H9snR;x@QSac6uzB&(KVANta5@T)EFyZW>-%`pai*WF?{^GgIg``C zbtPE-ifpKA8c={=cGO33C)!ST;X59#8c136Q zlyr;TOi>$HbV841l&@-3@>M6u8G8rscJ>5J{@Olw9>OF4T`3hcpakFgr&nu&GR%$} z3A?^8LBBR4_f@?>M#TNlr}q^N_S_Ne5`Zl)RfTDf{Ac7wP+NqzS^3(3I`M|QLTXDSBfnKuv%OdO^CRYqYXx4%&vIj!;o zqb{mc5}S}T%j2We6%+|84ck}Ul~4&C{HxHq8tEC8PK4;MEbbE|lUQRtt=((v?r>>I z|4nH#+&^FK3$ToBh_d^OZG%-P?dqGti-ip$3Y9bUzb?e$-9cuJ5Cc6ui5Mr!mGcG6 z5-YIwC8~2}W3Fy3+UU{5A3sOH{@2G?U39~Ll(A?LlWCcen$$;DgHH`>6v|kmINwkK zJ2BF?#?QYrW}$$pw9TWZ+z>(mFXJN5Uc(^|qx?dwUGW{;b=B4shrY}A*_1S*`=kME zk@w&^mkv=~=#X3RsCSJ;PJxG1)@;HG?HeRiS}y*uxPpy6OZMWLLu90EGUvo}cBA<{ zJ#ES|2;S=<6sC2FKn~ye@bi(wMHp!iL>=|;X6y1$gIce=U{4Cqj_Q8{>6#rC?Y}7h zy%By;2G9Z@mg`Hrwns}i4Sxi+$2!3e|AFi4 zO;xqTbsQ=P)N9v4xNb6=yDubX*vB5xtv1kd**qjXZ^dz4+T=3jh%vfX{CrAUPkQm- z{^Pgi5&xe46+qSAUhxDUSc;Y~{;Wxwv@v(2stzxep5Bb3a)bQpvqcYm{Z9@PuXUa# zNAxx3^`rlhHsqt^w@_;-HjiGM@7IsKgv+^Gg~sG1yrExI7KajA;4_*&=5dmS$8=eK zmj6nvsOBmK(YPOiY%{?kePe{s@Uoh$G=4$%wsO$E-3QmMA@)e-n*$(j#Dp4av5z)t zj4tDAnG?omXI4GY=~lP@h8gZ0+#)Bu#uP1si7uH%iduxEOdq~xBD=y{cL4t z<&gIqmvKzzM9%$qT&#;F19#@~`6?7I2^W%l zM7j;Sk?DRSTyKjcVkInOTGYn^wjT~-V7hAj3i-n~Y)*g0C8@Uiyf*h%TLy-zvwX9! zdi$p?Mtw}=f)`8RcgOWn=bY~_HIMx)(m!StHBf~2N#Ct2Y)7woFxSoX43vOHmXck$bI`bmh&v62$>XI2dAjPRc{qU zIsXKB? z1xF^qXJd?P6SH9rEsP-%&VPRL2%-ET9TA?VbHt;IcsRJ^RY`*gEF_Ifd{6V;Kgrb^ zZEq!uAp$4oBZsH#wUgAYLcS2&7>_bV>_Hp%zPCBvEXRAjKORXt9**0htf9GBgAE$g z0QI5&;6|iJ0v>6ibn%pMK_h2Mo+9y*_uuv2N_^GQx7VAEhx4c~^QY;YKx0wLb6A08 zUyvcblqrj`f8hi1y&Zl z$9mD*xf*lqDYGi!3M#Ww;w^uQ)^#cbOX}d!DRvj_3ci~S73n%|48jPjqIB?e5z)*o zYPKk9?m~JEQBFFNw%;{%zMQBkN$^$+p{2ekudR1}+rE$fjS|&u>vOT#Wpg~u1XEL( zFD{b)B&T_?+tsX3fh*>?Y?OChx4Ks?--ub0$>5@fA@gmk3t7M}0?N60 zGu==-C6R-L?&+Fm!q_aYCPk52pM(lc(~jIvpGFwbj8t`~hdRTZej7$uuA*)IJ}yT5x)XoTTG<$EE3E{_!Hl>h(uqws&_a;rbQ!Qz_&O} zu;+jScbQ(*fU$6o?$4Ka#CdzPT^KNWat>#=+DswZ_FjcvnE%Zz!YDP*FgtUNSVK)e z3%~En)K=JelV~LBz@#trX~;4I{4l>y%x(IKCN9O$5^ZNyK|7%!RWj%6O@U3*6MZ6Wv)jC%=uZ3!f& zLNNN7S!dS5$}i*f84snhhQ>I4J#;XHfuN zI8DDpzyS_TaystE3ja}{JM`tt^*m%<4AhdszM(aZckRZ?93On&Jc6vhvvrmTqREg4 zwXl1(3Bj$B_5s8F%SAW2u~eDpBiTFT{3GRtDvX!th{TbsPf>!RxQvWWcl4$r8e@dS=x4dzC;iE`_Dei)WhaO*(*g?0-TB?Sb94!&;ArYF zc~|_ZT0gX-&+FF5Ri)hH7*5Nw-&`UFZE!akllo!d^qQccnL(GUI>y6ugcPCTBigP< zwi5U^Z>>pHw|35mb<%~+yqo%leYIy(X{?zW4zltqH0G>N0)*^_VO+x*i2S)YY#jA1 znvXI%<=?w9rcP00ZRSjud;{g%@Uz|rkSVo$cQc%?1oP8pBUA+apGI3GjnU%ahCSD@ zD3@n&OU7B7@%`wV_vCUMGSHhj=&h^XO#6$*rH8)$rH09G;6nJOiMKQJF_8Rw<~SY) z3B#g^DGM(!&zz}%11~#ehRqAhB=|zh3Jgy1JeX1V`(U8n(d{%wifl)Pp)F&##$9Fh z;a3wQOyswmk!FSdiC(D8keJjy9R`$RoIj^3$CLC1ZH@jp_AoCK_Ng@nAEBatwn#&ZAOeK#Y;)m zv4*3X7xTr$mh#s$5H)M}xdiKZUV}WE7;QY;>fb}`Ma5=~bYx(L__@S8=ryGcmD|>0 zV)D|g&uex8d3C;fG$fM;6N~gYj(0~ZQ?;m_fe8%%MS7gfl@qd3qv5SgQbHurN8kSzl?%!az^NA zIO|LQSw@W^iY{KX09(vIncjwI<+si#OtrmHlPKcy5IR$*#Ljcgx~_n_VtG#m z+{P<|h1RmfDef!DP5|1T#dwM%?CnEQ*%gi{H=vpNs5=0%BcQUC?6^S%|LGRwdJjrtrwe_}y^gJ?~cL%$S~i zu;%^jS*)mQ|YF1!c*( zGZXRZ?h=?9{2Zqa=K6exPo_1s`RQgIzBD2k!&~m#$}}fNtcUyn#0xDebNw1|H5;*UM0QK3C0 zpNiX2P~rZxHgUs^)Vlhu#Cfx-gKwdhHYF6Dq$R~JDlbDWaZPUa05O#D2w{-~?6_;W z9c=Kmcd1UI2^0i})SEpxx|9=PuY{4j>k8fetD-3FH{RJ<@!4er2H`IqL0N*HoE4Sc zHXae(N9OM{X?6Nr-@dR8`t7tLBg&M>27bj5^5NrJjqgcDMQk2_B-`y@)cO16xf1m3 zpoZu5vto6;ZgfNON9CgA!BF3DD=S#*^iO!2Es@OwOz+5<+ajGf`Cz83tTT}_45jqQ zDq{S7O?vh(LUoG;cI0jT;dTDynuNCF;XdW26W-gy<>NzTuG^Kji^&0MvR8xKwdb#7 z$X2a~v$T=cFt2`|>auFN8yayqIL~yP8*K@u{7e3Q64znvcKGDI6%{9bv1PZ^1TELm zqq*OvB5!)kfKRpoje1XB)MBN6UimrR^0em27dEB3)}-s83EqQS zmE15tbQ15(V8DUT28Br9eEt^8XGF9l@scMTWu!t`6)n@}bmsQbR3S;cPu> z&p%A_uP>?I@gWuYc;{+OJVL$j5=Z7S8md*;MSEAn&x?0w-N`x_v2_!;bueqyhjzkc z+?hgk9ge~4L!vhe*RN(DIVDYglD?LryXLHaTjSj4rU7qp)!#;(*MzcP1cnrPK{EI0 z-jquk#F$cldH5s770y(BD&Dg8A^jlfBpaB<%X8#mRtx*iE=zHCj=h>RITOY0_;%#B zu;t7mc)q}1#GmUfqI;%faY!qv3IkPr&o|TqtG;Q*VS5`egT9b_M1n)OHfvem`!b5q zMJ}{+Zp(t^ry^Ed>1)A9&FQ>Ca6k7?*cM0F?=0Wu{SR}YsLuYFFS$#R)Xd>yykO*6 z-0+{(iYjy>9>ON{7nE9&KY5Q z*p@w782{6BJ&OcU`SVj`+yT@ppu}*Vgu~`G2oi|;x(@!#Z4*V6$_13^hRsCe-l(7b zM~z3euh<;SW?O}nDat{VjE{Q5@lXe?w-zTsBh#!la`Zrj;n4{)qxh4qja$0-8$H)? zcsq&b{{3_Xf9Sh^>)C8tvZ53?ljFUy!glvBY%D1|y-hjDC<$z{jwIciK&CiKuG;2@ zXER1%FPwi6Iz9jZ*}rCU z7KZKhZYRjfn0y z+%<(>O0QCDDK@9%N)SF`^Y->%IrnZqzaM+!j-B<_zd7eGdH7#F^~PN|qhE)(77BTNdlWgi*=gX!PsHzBhCPp6)70id1M<|lnxW@7IuM% z!w3KXirR_3AfR8I1@p>e0iX~?21rSuk6B3xB7p#CET$lUFhc->BO?pGfCOGC4gB6R z2!KHr0fmkXepv)!2*E%T1SiBGj96gCAcQj|3^58saUjuv1BVhK{8D1_BI_^I-yzp4 z!!8S5O+L9ct9}4N5NlZ4KpVxGX|Dx{*3|=N?g7SI%duy6bW@@^cra6 zqhP?&CjkKvP-R#k3!2c7%7Fx%2)P+-{DNL0q&mQLCRLFvs|+p=N}^tto*^ZaL`p15 z&sL`itq@?GLQvs9mV_pP5e%B<05B3?&7yFYQ2>JoS`JNYKpUCmKysv8zVMb+k?Oa=bMBn5MQU9X9!Fhf6E!1 zXH2LNw*i8bh9VUx0^s)UwHOdhl^T$xg@%S?2S-u+r{M7q5rHzKicBhw6S*0iB%I{~ zJR%E&X}`L4nRoo%qHCw6hHcYp>h1va(>=1=WGz=fuwOUZJX;&XTKicc6qyBCFeX@u z4V8ie0Roin=9-p)Uqx~~IJn#0hwBEy4_V%ipZ^r!-JpPhO<~T|?Y^2;}asuZI(w zPKcQy`iI%l0y`>CYJI*tH*1Fps!kwwB!qC<%RjITla zeF6>Vfd;cOd8GQrR5~#)Z+Ea8oO)V@roGkJ+-9~@8_*GRZ(Rubq2Z-fgio& zB71j+W%56dBHio$b{sl>eKNPQ+kF^UH(_cL8SqRbw)E zfMdrOizfD8MGSg%`2G2N-$Aw1i!MX&7`6qFm{7{0sj&T`lmoESWxU@h4g$m{j zQWSLfu8l(P@PWf%^PlrmsYxpfI_~>hBORwb7Ag#QeFOtoXCI6P1o%VnQ=F>-;6u~d zBY-BBb;dXQ>0-JL2#A32GQW7SwP%dR`g~j&GMl= zOUXazEXf<6<@$GfKc_mX9@EF~_VBL#8;|9)}VG7-(F^lhIzwPQ>t-%&t zvR8!gtNHx;qlC=VV}5|`85zw7XYft6%k(8|5H~d|7R3NZ0d9fM=d4o^oDtoBR##c~ zuEw4IvFwb1eZu>=#OPE?v>`X&PUUm1>uU+VC!A_>mx?+9nEg4al%}-ipbB7i#}GUM`RPvwB7A zc0|K3bb~vPeu}N21Z?EHyVZpvR>_B4x^{d1rnRof-mS%(-22h_+6(s67=xP>qXUV~ zgwdBvw7A@M;$>2eWAuYy&>QE`=uz>~5PN<$6mRxdBz{AR;*S)0D54>%mjCk{G=9%CLL znVBTXAE#w&t}`LU_86fNn`r-ZWtS4*}^6!Wa3710R zVXyNYV|7bP0F+t|<5)e5&Iv-bN!!j;-Xd`FyRlc>2z7*X?R?vR{l2BKw&z9>HhJ|X z!Ck+!PatFVAldg1NB-a@>3}#dmKgtEfkha`+nMLsU2u@!=fBd~FX}yD-*rz{NJZw| zg+B@4a@z*QYLSCKq%T9|_pzw`N^0M!7faC`Y)`fs98L10;*8z!a|=_4c{oigSIsq@ zva9v}`UsgNQ8~r*H)l-ZtWRh@LY<LdFU$4*J_~10PS2n zg@s#pQzau?LreGT6qOnWk@a#z%x(s&=B)&fi~9@bgTe%f{cJnCY`i=ytmsA)Pg+*d zE)RVVjtfki{8um0{6+vX-k`;Dy`2=6*T%MQ!&9Tt5J-eF_O-CHC^R@Dc))LW!(cuV zqM^fwtHH>S$|v&im0EKuCpcSH?ZMmN!1`vYl{KU?-k|BRfm6oW;1eUEOz}iviat3N zh*MYWpzAXQ#J#SZK}I*7{3Y4NXgrL|eu?&bjC+Uo8u?~HwJt&$;q;N67E8a3I)2KR zL=+he@sf0doDU-UtftTX!%Qh8W8#(H+VTNXOL)`z4;E6*5dMJue_ro6d8VP%)`!s_ zzq;uRJNeZpq8jr{J&-X-N@Ydk0$NJLex|x63D%%u!TBz+j!a=nW3;^yBE747n&WX7oGkA#aT-|wyWx~ zIa2PfbusHEzR{C_(xw_-pt_CfhNYA0_~BB%HGZV-tNE@eOZ1k(_u;0#+bUQu(_xk} z@2qfIB5%DJ;zlRsFX1@`uD+qfjwE|H!OMUgdM~wNkmM)Yfnl>!YF*@}6m6tNU?a(M zMcizc&0ta7gstuX>5`B(3`iVJUkxJOtqax(E8Kr=g@ey())^$6uY_lJ) zQ*Aykc_on9dO7(qtsg$TOI>Yr_hT96(u^_5Z_xB6^Dk;Dt&80LCpWPDudkF5U5!w3 z#)MOxJ@yuO_#@gQ1Y$#%D-0P~LRqJz``P)8XTi92EHG#I0Vv$=0WHOWkRf}t<$S)O zUC>WVYm3@9QM-Cv--Kf~`yoA+-(p$xinJ9%S#DT)(o=xs0jjbsAmnFUK(~}-^$NCh z`LmV^tawr);>QZ$=bP~NyB&Zim>-1jtRZEy;c&5kn~nptmi|^L6gPjf%CZz_BaR7R zuwwouU9Ja&{79&FKN_+Kvw5NXJ6FBQIbu@1_NZ*6YToed!9J57oa5c{3+-VqwUC$a z9g2{AAq93Mt)cXHU{#lFd}UgVqN}EZl;Yq=Jk4`~%BB3KL3X68$n|%O4m>hCo^UkC z9!KjyRc2k#gxcn{6vtxy>@hMOi1ekAe$(G1eR7>L5~TyN||umQb6}eqg6aO5^@> z>OijKa%SGaaB9r;Lp_G*-wXt#$S`Xg8mwxxZI$XYsJiP7+ytm1n>Un6RzlBf;h(SO zO7h87BH(1dT=647Qu%ro!I|hGIJ991Im^P(V&Z_haPX(ik>~-A4X`AIyKXZ+#4OHv zI_d^fg&BQ;6A|Y!%J}}}5!G?9Ifa)5E`0KSwk{~unz?83P2C1Y4RKi1;HG)`reP_q z244m0z1q0Xe_s*5D)fmy0{XA~dhAksw5~g%g}k@#lLIu8N-n?KiKN#xF7kVf?}u$o z=VgKQo@TRc1+`&@jklfPjJaBwOXKnu*XgW2%j^Vrjj~ z*WVpCJOvgLAvWfx%*bb!vDvNYoIC`_F2R?|KDx~_^L^D0oV4TZ>_5~{-k*R+?QLuz zufPXnyrk%XHIWE4G1Y(1lFOGi`;xyCb1u72a?$*#vgAs8>8*UI?Iwryz8;iK>YRxl zUjFGhWQ*qtPX8%2bd9=chmtZCen_?xM1YYJ+b}a*{Y0{|-e(o?Dwuy6hV*Y1;ySiC zSM;5eFdUR%8tYsntmLuJb;q1d>JjhPmNy>L+0f zYe!n=7WP7(TC8|?^nBLI>`YrGc5~#hC#v0qt(c{?ZjTL^qi5mVaOPN-e9JYpS86Iz zyvCkJ-$b%25Ivk&C4S+OBKTP+zE^AYNG#^btoM=*nvM=`%vWmPO{xgRKg zE32g<)(l;Nl)w6@BaRU=6NwW=m;{(Nt?;jNHMw=Mn*LG94?VRA@mRm9n&GB`MXOPf zuhI~)1)t^CD!XN!!DUqiQq6z+t5wX8eyxU)wx=ipKR6~3RShK?)|pmLbR0hgt&U6F zS7%jOO(>Y8xsNE>n0jX5p8GD9d2K^^@dg=1tQEg`n~st(l)8ebsUePQs+g<-fhz@~ zeEw+e#S!R#oQ1Fu?r!J@O}oh3Kn0Yl8Kj^P6rcca_f7@c`Hz@x-v@yp#Fthm`x#3yt)>-Q=~~OMYl%5@YI!=S03k4M$ZI^OT}IkwtT;bK-1Q4X}i{y z>$V_tSK(N$u|K3@mMvKsP*bT-Tqn|Ox0FHGvE5>38Cl^;CStHR6`suL`)M+kR;ltw zR=p1)@GK|bISF%dmDS{bIDHzVuR&j@h96q!LFK44K=No*`1AHn~A_=LfE6 z-y)Jx=2_oLyGPqNWQmuF+F#&DgsZFB6Wc>RwemqmNp%1NuHw2UUg3abADWyf&Qt^T z%lPGtNLyuN#r8ry;Pq5{Q3ik13Wgc`ErST~BI}ZINUKK8wQ1db5A1NN7w=KnM-+d~bt#bH2Lli}N~FH{jKF7sWRww~t2ntgHIdd0?H zA$!=O;m&_=jM8$Z^S5AT39-yLN42qB9z&v1k#+3!35Ta|S5*+uOJG)8Roi3qw6OoO zZi6WDa(@cVlF~iVSMS-}%jR+VFHpGJuVB|#AF+bJiC=KKtilPT{`(fyyL&~T@K-=} zW-bpbt+7Jrh_Y(s#Ki)Hs_IY#S_gk#ttsDkUOx_8>Ys}c+oR;{+rX6fV5c4#9f`pe z{45Ml`(D#2PUoSv8_Ko<>c2iimMEqK zn^*+Iej6Dzo&((Ay^PvyAuX+W{Vb2JL(tD!Uio;;zUj*9O|A81HWSew%9gjX<{Q8{ z{>{{}Er83aoNTRGB6(|QyH#}3p7qWIa0VAnt`+oVt)Q2gG@l-*H=^sf1h7Q#GmgQf z;Xae#-|2GXG~liQzn+AxitlDfTwM8`S`fbq=Mqjpc+?ujqv(FVkRKOXxAA$hIvARM zWiKaP$-HBuqh@*9t}nAxdE?nB)nY9>x4x{5xpNn<4^EP>)?M@S$83v?`d3ugA|KNb zl_fV3QH{N!7@PQ{e1xYdrzBdM&$f5BXV-1c*tK0X3}7ifj0WbypaS?XXH_vdf)|_z zJgYrN`Jl*CH>fQ^!?lbWiGKyA8%@k}J+Qcn4Tf5k+xZtZBDQBh0dree5M)2fGyASAcr#^Y! zb2Mw0O27}ZE1&!R$3c!?|H)Itr7I8VhTI1A#9Inqe^niaKx!>o}m>sj7 zD9^fvq_Ww8Lwn*(p1nQzZ^vzUccEOHfQ5erXEflOapOQ^`Nt7!mDZP{-U^8u*2 z4w1X&W|GRtSSg(O@SZ`jQ0B4yH9Rb|0>uQsuXG`^M(IV)V9vek+}lTxH7I!5!;!Cu zm~aW{4#kOGu%J5kRy`pa%+MoGIDVRlLTzrO0*_nXZ*GOqnVDkKMbA!&?fi1`Z5C$p zrPZxI`H)(8z~h#zu|gww8l+=$V54;3up0if1i$u+bC-{Dh&U^;r86}d@NJ!Qz5Uml z0hwXdWt;Dim#vS^M`@96^Kb_Y(Z&aV2U9ULgZh`l868rn+)n`c_cK4<;_e@mkJ_AO z__x&Dom$6GoJx0`L;8HWErP|Ndj{O)npwZ|+})d$khq1VUW>y&W_ z#b~C7u?LCw)fYn&E9hNNK@w z>-y+tN`d*4+=C~<%#td?54)yWpz~&x7_YG_|+VtxA zl32|JpR59KUwRcNd!jZFIz)5v3Xd5?MbvBE>kDgJchM3@|>?}ud}p3_{KA5<91 z!;gmHGKkeFxf5T~C1w0;2gu$Li9v1IWx5w+8Nxj6^z{M!7}OH8&GlaO>QUX!T1lr^ zzWm?>mnM^m=ny8z@Hu&dZpDGCct)Xt@dQT=4l>RK+r%Gc4enSpou!G*U7p;77n)W< zigryG&_SXk+QaJfmM-|~n}&gVNwuhEq}sunq=0o%xBN7h|74Tt2b;+|{)~s7FfA9n zKo~g&my49SC+vX}|I~WUS70!02vBUe-AS3dpd-b}jVN$102%f$?y)aMCAyG{`T-rvtaq%}6!!8k zOCmoLm~!D9{ZU;$dJM5YL2OT&-Nt=&unvZE#fZ#p3;$m4G6@3$nk7tQg$(bR%t@z! z7k|WrtbP#v-}}$hd0S`Lj%o85O}%RrU|f?7Eb!Mnn19Tr7b7}0M6=}x&qZKeks=Ms zfcP$3=GA;V9F6g1zl`Ra+a(%pPjn(hZ_kqw-HBOD?Fr01yCj~mdB^&G* zyq-N-4HYuvR$iK>Aj12*0sY+d<;E;qNS>z5>c2&OqfMFBif1Id+d2!S2eMFFVJ_RD zI;0Lk_j!Q_RwSmx3JlC-O>T*`*_8p@@N!D>qbPnJoaWem&@0Ndq=Sf z3aMghosQc-XlgeQ38MelO%WMXNh!+0m=IiGKg|s(Q)&S0LkwU`V~}X|h-isYJ8dW> zJ#5$RT7|r3X;wOIW;pa!4e<|i*4#U{7Ueqn8%dx$W{Q{?5jcN-%Ebeqb38w6Srsy! z@Tk0%Og_$|MMlMz<*eM>3IJ^1i#6UXg_qM6!)Cd@#`1Cco7!^vZH|8Bt|_Ffn#H%H zQq!^|MTx2MH~NADk|PY`13Y}yaWYmyu-VpDPbPc84ggVEeJ@{&Tq<8>(J+cR2$k;! zNsn9!MwW@gmZ1Q+&ZZnU8hD?4MWX+P)cdyFZm*P%HwEiW zweQbrjI+6hpBmKFQpP9~Ich$hJX|jS4Fh^_L1atPb~M)1u?Mv+<7s84h{!`VYSf*> z2faRi#06P-fc-zf{~c*cjnion{U`Dy5&2K%`F}>5wkFPQc8*qhM*kn|u)~8p`R6}$P%6(m#=S6FApzn$!F(`bB*JS^UPz`WoD-Tx*P{Jg|{xYx3z+mV?Hl3k}M)JaxyMx zA0Ou!iJwReB=o%#0T>uaT)5FqA7GlRKWiEZLm0}Q&=V10Z7u}i5K|Iak}O_g`8MGE zFMJZ=2S`YQHlVk;7=cgF{~vYo@mT{MbNsm!QJ4H_H!!!(`0j6UKRqK+GRpp~;5|W- zVE%2u<2XWKRunrCVPTbU#IN@`0q`_OfIYBqR(V zXi{)6hF^zRlnWWr+n#;x?H-BSZZ9$&B8Xk%NNBtOLRvp3-%iJXxrVF<#m1c+lk z-@$Q00}?FwKt1w^uRdX&K_Kx20sSKqw?6XDo}B=l1PNafKSh8H&iORcHJ;~OrUF`h zv)^4n0_)o^K?%ZxVgz(a>mG{eJ;{r|1b_D-^3`)5L5N@dwP5j2KklG}qCjzHuLwhD z;&!D+L{SC_p;su#==?XhdkE(TQjw6wo03oiwiW@9d@2+)1PuPdCy)&i_P=@p%!RrZ>{D*`ek`Ev3_Ab7GfVl(qnDGL9Z+)fz zNajg{g<;CjOZ6ilkYujph`c~Mmu?R7e%)OBXBxlD6t#V)=x=YQg7$B~w~dJqBJwK( zSmWsB)dK%&_D=fH?$G$={3PPLha|d2E^mP*QwI3vd0;?d6@jOdZ@yn=Kzre5Agt=ER+Rnx z#~hSonpnCorRs2p3RQ^>Rf)%Ju*2_$go>&}gi%=T`zN(Q>lJIDD8OI6e@9S`mUUdRTBDgQb{W z6BmIrS{|1ffJ_mivMI~8eZPE8Z-%rHthbNFRtY0J` z%upHO-M5=Cl!yjwcO;;?9ZL}gL=r}Fptu$e#SSu1WH}%;RFY`K84)Q_yh1*hgqRls zUS+r_@b49n-p6Y@Ew4AVJNI~39xz4mum>jB%q=G=g*TEwmTuDzvSUI*>Xr|=YrnhZ;#5@ zw=Q1bz@aOB1hW&{a3$Vx@X|lfIk;jzQJkY0P8Y*H&cs1(;NWkM3#cH~1Qv*EP+<`S zTm>j#>IOE5z}~}%9HbV&kqG=fQkuLQ9i{?gh*+iDEek?>0z7o^0EWIFSXbzoRti&m z3fKabrMNMWGoJt#G+qESxr9VfLoE#Pt}~5M$m#jcIN*4}fRQwzQXT|;gk!&uo*6VO z@F4!u(!UDsJdb?eKpqQ65qdeX67gOJR$U3m0x-}rKX}Y<2?rF&y&Mm(0BFQ0>kP-!3={;4z{AG49=Wi3_iI64^CeQJTjg?!wBY{z^O9STu4Yw2n3uTItnjd z?4Sb1-ZRuXG%|FM+8Tw)Js9h`ZEbVEo8K}B7}x_L48($0oPjc8S(JELp1o3sA@r82rC zzGzMUTxotjUA6zJ8i)}OeXC->V!mJmTNGXtDsHVVss+$WXko*C#L6h;d0<&>Yb~h) zqJ^Nc5T2_VI7;!6EZ~I!fMPRkNr1ZH0~*1br+YQ3?iz0Xf52d5K{lzezbYe45O?5Y zF=KxaZ#8gcXi5PdDTp~eNz-Tm2JWtqBMykIAY>OscsMP)P;5D&%s{HlUv?|G{iY#5 zoXh|!upQhyBrQefpgX7tXC-Yn(I&Ep9Ox$u%>F#G&;V7rWjSpLeuKs#YC+hH+gCZJ zye+`wur{m(*q}}8)-9@Y{tLmePQF1pg}-`d=Whjpzs1fDua$*J7*;>FY2gLE9fj6X zQ8NtGx`TKl<)R^*xuv+&ejO3m8U=ys)O=Uvj^J zkO6z;GAa#q{`R|6pcN6$;M!=(^{$M_Nhp_)^bUlFDC<{w5vHbPB+m(0N3XJFI&P^-R~ zM0tVJF18$XS+Ug3!@Jjd`(qd;2taP)8E^ru_NA{Al-VR+McY-#>1|!CN$R zEbTB9_#=6YWZq;f$qFQY5D^^!Ff1oy5`LX@BF5~+xS@b>Kqwms7BD(Q{yK2-VsRB? zYI1$4`2$1h6+i=wpg?EpfeDj{#!Z%HudPLuVdNKbHPU$q{e1ZTw}bdG3J)$g#^Hcy zAh$nr2yRRCC#Ym%6!v`Z5_W)FmW4mVBh(kgdv=WUViItEVT^2FdLL$#$w=VZk^KmH zO?t?HF-jsi|IU!bKvCcT{4$i;h(0z4B6^Wzmw=0ZQ}{zXn8cA+URH5Hjo(snD|(*R zzmH45beL^@-mY6mO2<2Z1FxgGeh)r>ix*;;S7M5XqA6YI*n_*?^SkMfbozF6^*v?l zczH;~)48?*JcZF8uMmysdbK=z8~_YA6Y|yz*D)4vr-WXt5=O@?GPtGd0Bzo`*@;(ZAh0ZXPZ31#8Ug)m?kNV*4(JgFt*L!>-3J7%Ic z6M2x9ZRP%0d*4)-`xHbc(mBk6-dygP>i4ohOyQF@K!Y?@A z)z5rJKRjlwzJ%by{5iDB5sjeQObZipRg&F1ig69h-VBDNx@VBf29oiYVfMsbf=f8r z6^L^}?rz*9Nxb;Lo)v%f-{9U}`WLnto>zM;i16kR`iEY6(@v5bm~ktcD}Zrhn3EMh zn3vTI;KgkX50JQ(+$cu;=&q)up2BWY*)-Kn%nIPd-9!~Y;uf}&C+bkHtfviQ#^KU} zuq0dlYatl=<^8<>&MLxx*GM+q14adSzDsqaF!hetqQ2xo&UeIhgYED7>*IA8+$f)K z!!~!|tN*;WUjP>tc~Afj1!&rzr&DGPEXHdzWt=Xf4gRP-IOCSH~Z-uyWGO*P!If; z5~(LUq-;A6v2INLSuF7@oQ(_@#c?} zlI{+)y0X>8-I~wD=HHg8U1nEix+z%=0pVitIvlET=>qA@uhQu<*2rm`bgUv1?i+5-vtKX@;%S%kZo? zH4E@mcc?UWy2ukiG?X<)P)sv;AlcFod+mAQ8cc}0S9L#pt8s%SAE&pwb2X#%PR14g z^fxiA_Q%i6Xd6u|jr8NT5fM0+{66gL*`D}MuSmrE!;NuDK!SF9Z8 z?%~sTzGSs6p}B1?G=7cPC>R;rhr&k~&`Cjs zgvptP#q_4nP--Ng0y|MZak#D!T>tT;+&hWaL+SFhbnNj)eQ4VEURg_4TD^ETO$c>8 zQetx0a+)uU4iOZ^u^H+aCZ$`|y6Hgl{mvivH~qX@21PB+s3KgDXg&m^_MNMh7<}dS zoHIA}5}K=aY*@oX8F3_ z{}_V#u+Ma(_Tjw!8~7lLbN9ZTElYhZ4#8@`(du4Y1$aA$lEo>{xbJmJuoWDZA%F6H zHy3jeYXHf(0JEATF}fU?svPN58$LSC>U3C}M8V%@w^4Pk(i5#%RCn25;t6`mqxYnV zgr~XG^OoF~iG-IpU70}eKLTUE8m`KLSwfX574FRz>!g2X0ztKB;lJ7z)0f2hHlK}Z zJXK}R(lTD3vC}G>I^Wh=C$ME}^SbOQq0u*z3}PCkfVl>iApEC}FF{_`-D@hApYV|> ze<>7{tdxk~K`?QO{})O1=Z!=w;M|+?^86u|C0OQXNkGTPvdT7O9b40EDCaG8R@i5# z<#bkUMy^cl5wg&9ZVg44sX1#hI~MBjJXj%J8lDAdGX|ygmQmas%2%se0o6p9e9jUa z>vK|Zos~8p*Q|Q>+9L`o(#p(T(@Se-8%lw*)n}OVZ`tpHTaFhVS%7<^_Y*KOPwmg! z6KjD$SAOsBzr<0{!hffdJJ0`i6xow!xr%I|8^HKAtOW0FQH_#^Yx|RSgFKGT69fOm zR&5BejNwz0&i5ijoy{>(L+h?m&SGJ#BnS3tajJmz;cMMa{;fx(AZ9E^1Q7V~RYt z6R_`*+ZajhW34OAY8_cwtpf%g;Mr~{OTH6flDbFIg)UE)H6Kyi-iI}WNhM5fieq=r z#M5Csc{6|4eM*1b>PFhLPxB#M8di!&r40Wiw0EZ0ewLD8r3kYdXy;X*)33IEvhbsl zd3*EI2<^=S=8Tg?^$+Kf4?A-SeYvE+?dxB=^@2{4EG7AzMN$`&b#opUkUE)4zpRKA z;a?ygkYKl~V30XxQ8Jc5yahRLIOdIKC15+9ty=UmdZ$wui!Kqj=@vuF`;4i!aLj9- zafQxpCT7R3H|$uRPMqrW_WlLZTB~xZN}^>cY*O!~%f8#r(yFbPp&ts1v;ReGma- z-Z!95VLk7{92jf(jTdUtJqybCRLMw5di~~3K**|9urxBMtYbB$SLX8tIULKr^2YMIOKiKO-8U6nfuEn;Uc~J)J}rKTR|9Sr z9GCR9iwD|v|B77uX==5&7KnNl>;iYIT#&Ka7?*GN?7YqNlYP32FU@ugw`8BE^o-hA zGBxZ}H)3_)T|{fgJAM;C1F4M?Vmu!|scUG%*2K$Cac_iV9`w%4^G@s~0^FM;;>roW^C*Zq*I3ZR{Spsq9Q zOvyVbs4$VkKVfb_@L$wwvURH+X5(o#OSk^AWf0G&_Svc|Yy7ddXiFh5{T{0pYGP zyT@+Zv{*FZWwF{KRJTPY!PLT`CCtz=dSB#z3cgL<1y>Tw&s(qed~aG?P4e&7?Flzi z5z6PQjPC(|$oDzd!qm;DKAhU342?!iLM1c4;+!=boLPA2MTff^$8{GrP@g`F454ID^7Sp`- zCwLM>s-qtFR+e~kZHTp>iaef{EN(xLSCVY0n6(ck<3Q63^R8GX796jW6dmMFTE`1+1#41pM(|S|ddz)do zS=nXuwCLVrN6-(}OW$+Q+{6s2&QGF`f>VXW4#N~X?6ESY&@M#I>8>m0HoO)c?@l;c z(W`~ubk1x~E1E7Vx`@ZAp>eB*!UdTEw4p)YYn|gF^ntFcBywa9ubz^>>ODn2= zyG#J9pl%B0Jn4?RK6v0JB3>?_Quh3>s^s%lnQZ<1-1UnLlP;nwi9-!4(Y>^i%X($n zf@;0IKY7t#uf{24%$lW}JxOVwyZ(dbBhXt`j(xP<)W-6q$%7_qpof|gQX8*XhBC^w zRCWG)`h!-rCgHi0j#LgDrP#lNcM&MNR<}W~UV8SFmgan4HQ(XK!glWHCPeV^(Ghp> zZD5j8W>%6XMkb14=yo11EiG17rMqc16rCywVL9J7)_*M}=6asqj+3ptgU|BvX)(7e zrzP`Fr{S#r$U^^2=1CqJN|}*2Y9+%CI!z|kw{uf(P7)S%J*K$MHm{&lbkIX*RRwdF zewvYZPsh<_RwBn@Mt(hOgp~&KGkhOhPXKJJoKCi&$*OBzQji|u4+c~`GipCgT0x&_ z2AwQ8fbniDf&zH=&aj(&+#PYKl|8bwE)yxc zyh{<8CoB{`>f&-8^DWY!&|sl(i)xJZeBAmV2i329`u)f=SCs&h%-&+9_zIE!W^3J1 zzAkon5(m0-e3NC&4kRawV(_kkCIT5W@02|BZM9G(i^S<}$9?y5y++_LOw(frF$TVB z`#WG$Rood~z}u9Rdk23Gq!@{K7&W=8nA+4~bfYmt>iquMKQp!Ucus1MubAFTJTG0B zE4U{BDQ^WmJ~N*kbCP1cicB2uUtm2vjg1cD#r5DCXnEdsHTnt4^@%!K+dR|O{LFsX zYiVg~HRRCS^aZW{cOQ3Ahbernn(ty=HDklrHhk=9yl}*U`1EyX=FQ{vxw_u%p!D1mq2POI6EZIYO4JD zU&~(ebCLF;nQ!dV*-p>ebt22lx77;WnA2NN;hL7@Y|Y;w&$nlmS!?{1K-1H->Xh{T z4i_!?+vNCKK)7`I-d4zhlC$;Ee8`iPa_hO4ib`Ro4mY-P{DyX~B3;4uss}Or=L}G&&wIwG7fYS_7K_ z(ie+ZiOL0Pc_E<4T<%jyPG5`pqBHDm**(3!S=s@#36nCF+ut4Ys|S@oCb4cBy$a(b z?dG7MFbs?>Zxs@}D(>CWP)>JN;=AQfK1=tM>Wxs&%kRjRAvG;dh#PMT1N>MGT@i25 zTjA0$z~3*Ex2RaLIo4sBE?+j|w%EM=bGV7TFngD-18ntX7-#9(cjmn-6D^*x|EdGu znrL2q)Ttl2R)ZW9j+bOH92*^YPjiomj;*-C0X9?*E2~%NfjKkC!WKG8QgroRV{ZD7 z!O1V`y*3vOy$@Y6S;=i&P94v!-=ClvYT9GOmW^j(eICU_Ts4F6XAnCr$9x$N{!yc? zTaNlf@0eN_op;Pz;AAsb-!e>kz$1FP$~*@4Ioj%2=!EMpqeL-s&q5_11b!Wd2rtD7 z!6dFo7DZ1#6DYLfLx-)>mYdnCNv9QTZQd-l+*(z^Uiw~U_7z3d< z?hs;=zp`P`2F82ilQUO_G6GRJ+$lo?c zzVf2GRV7P$D#NXsu(jYP|EzWJc{r9FAP@(#?{ljxZo4_j3P^i?Als-8B=;xedfLKj2Nd`GmYvN$+THBpCpF`hOqb?3`w@sH4xFauAzZzWM> zNyt0zaS^$`a5)Hhe}#UVM8lBOE`%%tkG0 zIUE+^&>3G|r1d`=1*S*1$=E-u zltmaT=iBQ4`b)poC&b4(Koj3WMWNh+qP|I;)!kBwr$(CZJT$_ z$MfOdx>fxLx~liC>fQaU<=P{E6%%_JBVSW#kbX{Vt=G|G;(h|uvjoC7;8h)KzBs1t z`7#jSQhv{;uA#}EWT!J&>l%{P)y1tuUZA?($t`~EQBvM{3DvN=S()6eXOmXs0l>k< zBi8;V-T0hMB_Hgt zIEHej*=0ehXT-XkfQN3saB*@f`U{#vJEVXKFk*L&HVgWO7)y0sQ@+nE~#`7WEC zARCrTP0gX>^9xb3hQ$L} z`nh8@&y#~zksY{Np0sKcj(^Iiltz9YHUp|YK|Z0JoePDu$Q%!AZI<&6sY=`+y4&Z+ zHyp}20{vG5&m9X|;-|1N2)5%LQ9WYmUet&0>tqLtNZQ__1ukEQ5$v1}5NjZ9PKddp zHF_fGMwB=LT6odUD~0P+c;j%=?8m$=*lrojyeLNG{Gf-E!`q z?*?vH?PL^Hh?Z}!TGF-N;;!Z}QE!ZhnyQV4n~9oAwba*+bzqS%uCTL#t=Vh5#Y<8y zGFTpA>ji5LA%XE0r{g)#=XG@f%9Uj28FR_sZoEsO6?xrsc3I8a^cdd`?n#2IC$gpB zn0<=FA;Y%oB=86f_>r=&?Yj1#uBsUzqLs_JeMh2q@WoPG$~3^dAygId3tzIJlCc}7 zlkI_Hpt?m-OgAH@vyX?HY=`&R;tgEY?sAf+4dzkTG8^M+pY3sck;o8svOh<<&y#BD^P3(-Z-NfETgh=Y(`hN@Eoj3P%?Vd& zeHkz66yv>y=aWzu{nS$;ao2D#8ggy*+3#W<)R1eY;1!o6>$9G;DZi;q-08aHU&qz& zNL%cRwS4DI`}dsB3l&V$ATFDf2{Izfv)Q#1<7<;VS}g`&UmvQ(tuArM%3ZK3>xi$8 z>GFudL@doDP5X{Reb9F*p!F^e9~iXP(LY6bC9rWW27 ztxU{=rk@*03PBgNJ+BOjTw?HQ8>2W5uj{k%#|xhAHL;z8sv#&Ioc}b&$t8dq!Z6&F z+GvoU^dE*!4Tjg)b@2z>bmGTE`-B9 zL3Mzj3{yT`Z|Uj@N5jHyL1hfu$l%xR(`h#7^Aq$C2ph@~HI1fj)E<*f%>)pnxDOKt z(aLK*b|$?_O?EzoZ4alm5sNjm!dI8g+l?)Z%*(N`PCd`e3}M#PCyIVjVdCakKfm9z z7s&rwZtqT|T!hypw9v!c5|89qa%)$6%Uo#NGayRPq3-ZmJi$Umb1u|&!qmF}$Xy=I2>?gP5cN+S9 z{PaYVQ1O<9PC9#r-%p`FsqR4;i3i_EEC=?C|9JUP7v1EEH=@@l9gQlTn`W5hnT*O@ zlbBXJ^j2q}Tc3HRKrE4FTfh;-D^pZU;EqqeljCeAK=((l&Uyk84)Y~nv4R|uMV%b~uDnXG4&G8NpZ z<%ymTap&pSMc;=Nz*lE}0%x2lXv`M1fU2HGr}I{2ViG%)RiG=|m3J~DgPf%kK@NZ_ ziS-s`P_sS7I_jILg+pr`{JN!o7{bUuDi!NU;i zFygWYH1V7=J7U*OI?^KdHxmQ0lzUOLG1fEB++^!ekgc96AY4Plpmi;)yw>nJZE;?x*coZ#KepXb5-SO1Y&&KNiRiM@?fMNVZaM;i0D!Ewii=e7CYi+bVzp6dfydV-9AF++J{=sC zz>@4lJNOiNi9xrIPU!-!tv%VL(?7 z_A5WCW(gwCov3@u{xNkn?sC#(N_Akvt(f-kcyo>e=4Dv;h%>Z2WcL}+WV?d-zhZeyPR0FY*-J2cX>-oUTVpE;>CD<8Mx?Qdvp zOnD^*s~k6q$=FUdKLwxZc;{Hny2a`#RCc)V=ayupB?W7IzhaZMYpzT3TT=S{mW#F! zCqqWd^QxSQ<9L4cIaIgl&&1w^ zKhwYAO04%8O0o-cI?m%Vab6>RB+uh=ZbrK-R;o--LjO%g;`FCizDjO*yht=>RMtvT zc764%^TsGk3mB)*_v7)E6Y<#gg1Fb(@RS?79sao5;sI9GdF)s<<=YNot3WtnPV3e|L zY{x!F2{Nc%4V`16E5Pk)x<9?S5@TfkTz_xemJ|sZB$#+JlxVcfBwLBheKm%%fA0mB zjKu7LAmu<8oXK6DV872U)E4Cta?pMcQ@*4n{GC)wD-M|aBIj_V-G5&QZ+mFQ4@q`y z6@Ey0EU1>#q}RT7sHeuF^0&Q1(D~Z!V+lLNrO`U(`!NM?b056$jLbi|z}TQWDB=E{ z2)gwMg)ufFq3NCJqIv@ziSbgwrRWoTyVN}Qc(m2H!C=Cu=cTD9=QQqFQM%{+KCArL zN%BmwSJ-Lew?^Gf0P|8^Z=-vK^lCg9$ZeOL)Q^uEDofIXs#HGhdN4a7sl-E6r$hZ| zGd~Mn5$|oD1{HcHdj4D>U3@WG+vpY;ay~Vqvpe zfj_M3z;Sws4r0j3rJbbkio;{`BTA05!E>e3;*pb(PBKes!kXxnwA?G=*hS0itoy1X z?L}5Fm7Mv>4%bnV&!y7o!(io!sH z|1Ui!t+zA;JaaXIOj;?Q{EX=z8QjQ73sv!vp}d~@3EpuCmUeq*cPLz>x8$r^6u}Om z`70-%3(^8awpCpxD=}S5-CeBce~_)+3GCDM3Ww#$+Imj5%)m2ITyhrmiZ zYp(&UySD8eeYy8>+0sy9$(ih|tyt9H%-lP}=BWLf0vX(6zL#ft?i%rdhZo+Z^dpZs zo`0m+`|tuXCYCauW|!`|%Y3o89#5nmPb)M|3p&j~KCi8YeJ=aLJC(vEo2S`*Idp0> z*f~?>(|~7+l|RTBZ`AXQGb+U*v$#?idn+??V|5A|@lNj1ZPX8v6eY)3a?U7r7#o_a z^By}$SxtbNbh}e^qPRSTQ!Ywu#a~XHqpmOJ#s@r)+C5vkVZIrw z7Ff0yS#}m#s+VM3#us(s+(}l?F=&^a5|7_!64Xyy4xQTQ!21+uR8}p4Rd(LUid~S} z_Wv5(%>#MiB+2SpbP;`DjF?Y9k#SQs8*>EKp?V2>P9ZNSHa#(SiJ7n-S+iy3Z+xgX zhCcI`AAo^-+^@!@t+{dn!!>G^C-^g@r}#8x`eckgb`4<_(7#cpI(4<2UQm%tbtTGa zxg?)9D<$2-eEcCAehoc7*BL^M20riX*zmeh7I`aMg{e+qNO{$rGJ9H@^v4|)BG<)Bam#`Q{`(oIVSKn2(aS`Z6-CJgAuFKo!ZPH z{j``I?mX^oT9+|6chm@Dn%aRbDl5%dC5+@m8&4G`DK6PIubE9RMJ`*jG56g#`+YN;VC*#oNQCID%E~| zJ6!}>^Q&lf-yEhT7@FYxD>5Nd4TV+Z`OUtiTlZbj;Q6pJe+pxu>V8hyaIj>u@mg;q zO|3Cb{gmPUko+8ZyCDq}rtKFC^9f;)ME@fMX>}h)Eu|$Ic^qKxYLyK;$M&>CYuc}C zO1AK!le{+O@mcQuqguLCA$lqMZ@RiHv;5LEMobILAz2p-nFS9V)o5M9nZDK_ev>;g zb1u7F6W(Hu^V&njiqMI<%%H?xd&W~{H2lZbMy$r%rRQz|ne`{0mIve6U_yWi>_q6J zrBeiA@-_W6oV7#p5N!vk+|_X#8v8nxz1DWa=80vIs!?UKtJsRYp-et5#AjyDR0#zU z&%;c1bMG;B%KtVOc=&Cer<#D&jrg}mAE)z%OF!68 z8mi7P&r||;{56)1Q1o?yjA**q7_!Yr`=qciUIr_8qvCZ&HLFnw_6aFvlcYj7!@R(Mo+_ z-HLp@7)xPbZHhgwY}y!{x3!cFjEC$ThU&#RO?nK-*WIobXoazg=(PhAA0sQb%_zB>+-IDoNm?&oG!%_w^_WTh`@$xFEh*W=QnTKPO&B* zJ$HMlA^9abn13l&{*e4AF7|Is(Nu?pW~~yIL=U4E#QDEkYUDRf^aqGnFFwg#cRAGY zg`5vV_0e&?4|(HvKMJeX_8y75b(rPTT15|GrtCoOqyi2S5bOwON%_R3o$SL)Ph`B` z+xW{%OGm3$+cZD**AB}5sN^4WH8XR?w>C#RcA>nJzIKm02gF%1;bB+{vHNFDII`Lt z6zg0gRp>ZG)PvN+axLkQCZIffAuS2L%~Vp?+t6?#UDhpc=Tz7wdeEMLc8iN9qjCvT zA4$kq3rA`DCu7D`i-@B=OvCeVOBju8oXQ;T8tyP8eQHp&@}ecql)q23Z1xEwpw;Z0 zdd_mZEl&fT$SqovKU%43*N<;+kkPmy@XA2$IGS=j>C%nT@*NDQH=o@fTtq6KB-xN$ z_WT_F-a77PILl0>ns#V$go?XA4ksxqKW$@Dramqc3Cw!2`1r>KT=6RMxH$H4{2hgr zw6MO?z<@BD{72%$Hj6nK83(eme+TXJ77t5^*6(X-@PpLiWB1 zd4pABr^W}WH7R{*Q0r0D!r<`S@@XG=Bdo$s?wWvVCAQED)8;_k!JOw;2%Q2EZi_Nj z%-_L}2u-gK#l8ELCNl8X2&U?fa=Jl@I`~bNK<&v-a8gg+E@7wp>Z(f4wWGv=zegQd zbO+Nc8T6g9kqaJ&B(gt)L*+AbY>O9yDJ}Koyg2LH+@}qZ9Nk%_hII+YlT|f!O0PEb z7pH9~ZtKIy2kcFPUwimU9~m_2+UJx?@5s8z7yD-@)5~Npj7l0hc9|-eF#YPNtz+Es z^vJM{qpeoN;y69F2h~Kzt$a_4D#$`-$c3KuH;q98rP7LkR~uoz?2)>DO^^0v{+SF|$oP$~xzRO+4L9QHPuC^@nokozT`#Fvkd;>Gr^!r`P2; zf1KYC&f68-+%74%*>|;_SVBUH(_9OVxRgS~*O*2I!J=gY2A&d@=>VajsiJ!!LobK5 zenvbYHl0Rh=jLu+{IG7lL7Hu!q-~|)ePhpFn{+Nb&wYjdnRnV*Y?zoA9M-WaOwgjv zI>MSXM?Lt$H~eLnZ@&~N>}bBl9`HK2HDm$K6HU*$NErJBvF@DqsMBRuJCosQ*|_LsD@3LQ3Gq7sj#toPKpWU&(JnBB&)I4)ruv zQ6pQJU4+?-Y#$+ilj0#x+gpPo?@65QL%%pSHwY45={Q`z^TU2z?hEz%$g>w(yS(q ztgI$9td1OvG_>gS!SG~Qu#pC|hQ6c_U`BC9tp@RV0L(sD1$r3K{VIrIir9g7HXQ&A zz->QlzQ?Nkc;CfL#MaL%VgnNJP}2o+TNC5z%G=WW8pBasf5T^W^nJYd9fk6l1@e8o z|9Rx_T>$aC)9wnQ1hVI@M*e_q)ZO;`?nWRBSXfd|y%(5;#vh`(T`7nTqeI}%)TEzH zXCLJ`yjJXsw*&}a)jKZWX_u1wq3gI9(r39E-L`s6BD8`M7m%ca(gzEjP0pfzE*F}R z;OJmqu{b4Z$S#h3uS=oqQ~md^8^qD<5Wn(0}wVRLXr)%Ok$$RQ7pLd&s3>ciGF9{nDG#tz{yE5HvF1W|rCuMmEI zK}f-%cRP8^ZlnX$Gc_w9imiVM=1C44_ckZp(W!IEAAA108FP(~rS2wqx4nJqY~tVt zMZKBVp4^wCrv)y2XJIIczyu_Kh}+#jx26051p@{BeWJDX!K1BL-er24^=G2hy)P4~ z`A2M5&-s3xllU?=+ttQiyNi1dG7+WsxMwYF2R@j8yJ>)*9ccGwNfxrOssUpY9-h#5 zqpvgj`{Cv54`u7N3q{NZu?sLjS}GB14#S3qT`8w?f$2SE%b)fsRGVDHG~|%e@8A20kB88pSr4JM=(5eA<2+t>JK_mk4;Br2oSiXcUwze`Afys0zmKfiJEZpDOkS0DyL0bYEQ6#rN5AqorMu?fL>EtaAkVS>2J(5 z?AY@0lpd2dU34thc&X{Q^zK}k(NN284$<~b`wa0{Z&y|Do*8JYXcCgK?2rvYgui@v zl7q={s!2AHe%6g#s3y*NqQDk4y#!)wOHtP9ZExI@xI%#cZSy9cm8$jc9QgUbLs46 z(Ppxz6FRJZGrXm>ja6ynS2Ut{OR3>=Zen$A8ZrR#38k*T2aY*CoK;?)5G&M2!e%&F?CUNmX1sRx*`+F<=rlf?NADf)e^11VDG5F3W zH19^*0H_CHJ9Jous0l z9Se5zz4O`A9u zgF+U4;eomySyMKbA!4G7yn@s3xCjX}#9NVP70pSYWcDP%Bw}_Vmr$YN#1B)$;-9lq zLI)}l`LyFmx{zV#JORv1yJiPzx34{DkzVZlvd58$@ z1d#F$uB(Rgoi5KME>e$y%&7Yt8%I<_F(%rIUR;SVe8ghSu2b2^-ntze`Nw-WRdK(T zI3dkJ^&X7xQG~yl$vg_Bh8so1k6Q_Nw1)VhD_wvibdWTl;eZ~mKTjjWkF&`RCK&44 z`k}3_?nL*Ld5h=wUwQ*)M0M<|IMB%GR>F`W^=_arwqnf(7iuHVckT&+c8I@RPgEK4 zH4_;>MW}3jn}a8mYEtFs>$DsvO5}a3$kj%M*dyaX2u{-C*dMqK)*4A6Ox89!KBF2} zPbhIq^24xJj`uLj7`3~EoI}3pW%r3v8tbnKP+md<;&n_S zj^5dq<#=#UmSnQ`2F@(ys~C%<_x39sxoKA7czbg&PEg$Y$O{*~0QKxvB4`RkVG}n?u=XA2+aGW}F z%zBWtrggpJO_ub{$|BE5Kk~rpnl;9F<>mW?Yuzktq_T=h+&W#g)km{r2x!nys#2VZ z&AC7H+efr>s?3J6D-I`EA~^!h8uw(!dT>qXU7T8Vb6flERak?bZM^t9SG*sDIsM2F zdyGZsb5a<4LCG}CrpR;C;(U$%X%stAMW<|yqkRSuk;9`4>tuV#$}-0_r*QnIdoSs! zwwX+=1_9-vK1Z+jxKALhtjKqHUCgqGG7H6-AL}ioe0;nHjJ8xl0dsPI zpAX40zvk#5sTPxJvU`2BEi9Nq%Au;YK33W^AccX74#j=%&;F20<8g=!mt4q0?_QkO zxD?o;i$U_VvNRUn@HWnPQqpU=S+X&PztyV^#AJ4o;TQQ#w)R7nt~v<;o18@>0&lk5 zH|=NQuqRPAr%iVJbiG<*(8yQ|CH1^>kmU+SmQ90=zB<-6lcKHpT@#M0F>l5|#hltA zZM^+5aH~c%u)JBJ7ld$N{-!V7N@7&j@8Mkk;S>t~QEa8ZE-@vyUkOk_>pU`PQ?? zpjXWNOsUDPy9j%z=v)13d@*Egk2t};f~OG?C>7Tnml$=ikuat zieHVyq=2EwVr-bfvHMb%V?QC{+E(HFUO#WTIoLdCl$Xg#V$z8JOFIaKOmA?p*aku; zen2r;n~a|zTZ|Py7PZjQV6YR_eS@oIlcfNOTpiOI%~`oDFj@*LdOUbawAT~?T65p; zWtI9C|A4_w9J|^f*2DR6tHzC9-eo?R8Lz9q(nB(DS}_x4&!A{ofKiSa&-hh{J{Vtu zbh1~MDB(?*66G=ImshR?*T)RRPQ;ua?V5;OVPB$dMeG8USe{~4Q{GA}4ID-d!klJK z;4h$$2gv9td!ZQ7Xc-`zAWbow->OmEUPkJ=wkeIEBTULFSP&*%-Ou95%-eQWwnChTfW``*$V}rCHj0<=?pAF7V|O?f67Yc% zgob;F?qw5KA?~%60X#zcz8{wp8I=o*pHZXzJ^RI9T5P)hFaCkOVpQaS-dq};IxD4m z*nB^$oFBYwjCT) z6U}ZQolk4E1p@x>*=J6PQYR*65|Okm;^ds3G?wTlqVB#+Ei;D@hb)i2q=F|s9n2UNnRm#%t45vmSWpznAM`PD*|HHRTq z&y^XD#(`yBp)q8bb1S)>ra9?F|Fk8@GGatkLJ4OVyA9%3rEP(;WcWWA)Gq6??dPHeDN3byQGe2m+5j+3&bx>jxDJF!7Bt@5 zSj`^3mUY9xF2FFGd@H#hS>dMX)6Z>aBAS0#+uNw%$ys-SMz(9U;)ht{BZp$~O#U~x&`o8CA* zCC5sghUkBBkoiaIh~()hXR^=9bFW+c2#f#2EyltmKP^gB;W1Tqwk^+vl{>mNe&Qc-c9*#MSY--Ahxn~&4&B270jQDyGpBB7=|$}vlVF=-nULF< zkuG6M9h&W#wvGAd#Y31l2)e6JV0~MSp0^Y$iMq2z7&M@$guVW#u&an5;|9R7=Cse;7Y0DG(HbmCz>WiHmq_Xt$&aD1n z1&8jnc1@1==h4{QOq{0!?AAKgpn}x!( zIrJaZ@3xwy;?g2sC5I(-{4hO^XAY-D!#sqetK=F0K`L}b^Pf|cGBq9IPfQGf8#8VbuxTI7s@}=SJH#ot+hNl7tx^orz0MyDi zJQ3~eDVYQeNfsaIe*;L0P%enl-`Tk}1` zb$>986p+3k;!C9Nd0A1feVo8$*+T_~#yJA z=W(xfo|L1Gqs_4lRC^cSVWW`s!$S?XUM$Xo}=jc#jbxT1Fs8S9SZeh6cyF|3j=PZ>^Snk`U#Vq zu_fEOINMp2@!t9-hC&Kmt^tSlGdUM$4V2ftlp76A*9L?CyPPJYfibFy3lh{abaN9X z`m#5>DHar;4IEGokd>p;tx`du4W|Ig4}0=Xt+#l(+h>H^TPG}J^EmiYP%eT!mmhs5 z%XJlw+$v}w?me>kEQ?JpG#c$ItJ_Mk*&itJpt@eDtGC42V z%C+;>XH`*t8Lt9X+ZOoIBvl2*cDX4vX9IC{9RiNjqbM><%baz<#N5-q1#r=dm9Oz@ z3hOo3a?l>u0wY#DBHp^?I_Z9NKC+H6H;=xG*)2xquP0Q9Efc|43mGew?h5#d58zAQ z@&(*SSA@rG@R&z#$@;u)X3rjNdAxy;GLaHe$zdWL!$r5C#2d+&2{=;DO?Iua<#evJlm`t}fJY}EQ3ek%(LW-0n|zLiu5DBf;DI@R$1#`A ztES5HO}(s6Qgm zmYFb-lfZXldjF^TCcmZ+M!cODMwJL2x@oCfUM>B!jPgT5Nq~g67~P(6BEClGw-u1b zD?Cix3!%29LVLr4LiKT;#nnKNx`~n$s-7H^*`s+s3}k>|6HJYeAeQ}?z?h4uP4;%` z<+?+)s}BbcS7BcRO2>V|Z+1DpJ4@E-)F`4)T!U+w1?q2U%jI!VnCZz|4RGnvsT2X_ zanb;jPbFss=jD;-x0gEMR>keiOvz>O6|vGfJS}C>Vf{rHo8E!LHI@l@YbO9bO%V@L z_PE#G``&Vc`Vg5}x5E%ng1|iO-S%SusI!_Viqybp1KU9~%(5!C#p80q^IDIghj#8s ztIid+zzDVvZZ%|fFJTR+h&2m@#}jTH9`%RoS80VdV{nOX`;J@#BhF&LitO4-^xUTM z8T}UKyZ{ohTFNU?V~ zi3&y{Ou#F_f4?$(w=@lmvI78%`~U#u|N6>cW@7vQW1PCX6DIDw{6yA88ek50!yD;| z8R?C{f)jC(cGTfa5Y`K?nLwGykRl;#2*#5NDvqxk%FGKYYDhl)72Up(+nIU!xT)cM z*gVPnGsE$cxx(`@ZR|9t2?g5E(~ooh4`c)Z;m6-7jtFTS;)DPV=kP=nr^6F4W*l$U zsz;9{3gwCb;|ljk3^AL~54<(T+lZ=|%NAKKLKGwt-;W8OnCES5$5*fC##~kMSD)~Y zJ>*h!4HqE{sItHR=9n&XAJF6nFZ^qxGO4WI3q75hqPn_$YQ;{E5`Z|-zB&NImp~Sp zxC7!_!RX^)m1Q($U*O(3hQyr+0hO}aS2vbmjVJR^$L)>)ZmNBq1Y2ui=lUUV`81#s^_R<*P?n;Jbiwj4>n=1N~}H zhhFej72F)y44|Or3%~ID=7WKQ0zpPYzZT2yeMWoX>EG(|8~RqFn(ld!1j3Eo@)9?w zPqaVgqeOsx20~4fZ4HS7im4VrC3q)PY_+S!pyf#YywNNjGvvU8h@(L5 zWk2XCGrfm>{&m%HN96ZK$QjQ0Q;NTccSpcYd8rn3W#`n|9`Yu?`-5HbF8cify0Qxh z4mfPU#{@GBcS3l45CmRwC^FrN(R}(^j63ZFA*Sf2`9WcQyv8>`BHGi2koc;h-28!2 z_Id3zxW>o#-mBi`w<(2MpJ5tS8BhuP;NJ%#A)-ldw-YzG-s3m$-}FNkagP@)y;}$l z5s6)WzPK$Zt^TOpFM55GC;pfb{D~v}o`ZpUfPn{j{wFGqywzW!kLMyyl}6a58|8_; z$)WkNyIpVt191b3Z$v;Y&eg984WO!j2ju-@h*JMxXrtBL`(+#c#uOoSkK_&oB%*=( z=YV*C06(6{Ve^Lp!u*k#FY}Z2QS(RQk&KPRbBQnwq11(#(XB#3N5Kgp(ZdP^4pxcK zF+nkf2Cn@82lfW$nGo~90l-@GwI_MKwv~`WB6i8~H}Uf$8$=`>M|hW8xr%3EfDs0-(5n zVMTWJFF#-@aC!yud*z=4dJRTI|7tjM0XO{YfNL4|Q-yoQ% zJ8Yp~u*mfG4wdNWzo(-re5Lx?cjxs>3&FK8zlE>in4fB!q}UsU%NA;qOE;U$K6K2!aCN zYhLngKPGX|Lfq@~C^53RyK`-3@Z7CO^>h2vfM*VSREEqF#_3^zSS=6iyswd;w84)o zPjYyN5NrTE=4y|GG&77 zv*=AK?N!YO*20H?u>AEC0|KiJRTfkjp1uoBkE)FXtD+BT;Lt2?nbEgitntgYu$)lv zxel%oix~EOCLZX<$FU-`Rv2^dc@7%r+fn|{HTW%qPXGZzAK*+yuz%1`zcwAPcdL$A zE0ScbUmr<$9zB?s%F86x!>!Q$=}|^W_VCNv*)vmlq(j2Oex# zma7ELPY&@2hX&Wm7%OQ4$pTFX42lR84xo<%psa<80TT-C17ayb2>HxhyN zvLJzgI;3gZX+q*bU&E))zyFoM)UQUzroRB^0$tJdzvxA@*P&O&sg>|Ga8QTjfwqMS zKJQhqO@>(ZV-*Kf8qGoA+bbhL;+hjo_49{wJU>*xh~Y}V(RodLh5Fhf+MDJ6oB~x7 z(!1o+JVLUA!43gYtAh70isi}&BU<(pHGASp2epTQ^~rM+s(~Hyv)uk$A4~iPalIa~ z6aW%8W_hGo(k6m_9DF99Jt@vaIUz2IQ)R2j}j<_DuRuq|vt za7M53ZZSROt3fKsCM+z=vac3Em*%;P|5lt$UrytaO{W|y;U`{~HRT%OBW4kJ4kS3;sy7PIHs@p3ds+iq`jY_!Lsd$H2&I3Dq<@#r z|C@$oR}2tK@Yd0QpXahn%%36DUvA;fv-mnIk<~9{Aq3@I zj`Lan4ScFhk*l;feMx=KVB}b4Rzfb%Yr`B3+?SPSi?ZwaesU@;M1)Ci^kX*D1eCuB zBxzg$%M$8R6z+C(*ssLkT=$nJdku4GNdS*lisWM zw~V?`dyWpFDCes8E*!BEz{!xF#4}YfSxrs>%dW5&b#<)E=R4 zKQWG-f%zJJ_BLsOzLd`uPe>EHk_h5i?s%|F00ubhmcu;1x9$ce&=$UOKn_F}{C*dv z@9V_(5o{V2b~9xi)T<3e|J~jP69^yBxWJ!E#0?4iG;*f&VhFHr1IG7bM>;2l91-=3 z^*ck{_2@g5@PYyFR0rt#&ISO{_5Ix4lW+8Wl&I0$dw?0y`YlBGj{LH|RY$cC2Sw4> ztiP4V879KLgj`ak0LBo!DlyN8n?rF!0I}8rZl=V(rSEmYEWGo{j#l0b0irY%0LtKm z=J#CW-H&qv-u3sr2aT1B3lalDl852niwz3d=!Ja&G7cI-LLnrgz;gq|#QsK@K-s1D z_qEN67`E`;?ocoogbx#uAUq{5Gf>1Z3K@$L=fE@vZ4gke? z@^fy^uauBX;6(^PzYml{BY;A<9D3s9@qkwH_)fgIpG1MQ+1NuHgT+S)YDyCKpcV(o z2<0J(LG8cjMFf56^jY@|niuJe$pnacQKa!4frZiL@IBQEKthjw#qfj>h9?1i0zPC4 zZ~4w@w>1ps`qkY0&=BvKzKP%I6%O>p=i=W*Gyg2YhCXK(c#%GzB8z31!kruE8rS1SPu+V_?Y!LU$zSQ><5`IgFKd?ZGJhd_a@i+ZSgxLMQ z)OPSkziv?eUl6Qi+|>aLI|AEfM%e)jr~K0n`XTSa_>pS}q2+R4vQsX-W*lxmCA>5c zMymqTrJRot!dX&(dpBz8()8HTK+<|^8OmvX)vTcA2a1>3vT&PHkQ?idwHDU2E?O=8 zB@2&QB4q_)vRZbpSe*FOu*sW9{!v_MpSj)$CXH^fAiJ*I_(Y$p}rw9JiS-za;oJ0=BBUKK{LQB@X zo;5xPm22h2b6J9)-*oDc`itw7ZY`?`yrlCy!rL`l(-LEjx8`A?i)vJ2qEFqNTcM>u zGdeTG)|~{Fcx%T)ZTA|Tz`X5r;af{UzqLm9`l)~ZOh<+!xYLsAr$L&cN3w9e;L}0e zGAX#`RZ5M3X|1C6o?4_6f)XqOw8G~@LwcuJpk8i@e>&CkED$+`GViZZ;z(4? z({BP<@j$WMoRc4-*9W7fPP1HsFkD$@Ap%^a>mv+wfaA~4nMB;-o>*}^$Oo8j=Xa0C zJ@H>~QMWkX%)fEmzdWCPrZ(uHL1I0jWA_1wS@r(m{?JKcIM*1$_eC!NKTO^Bg;t@> zv@MoRu;&Lspz;$5Xn@Fc5snh3R>xfc=NS6eZc>{a$Jir9nxrT@~jsFd2BBTDsUpH*w0F zOAm7@;1M>Xc0vAKn?#@2fyb-pr~EKxVDuyWc&{Mbrm5crsjuN?Ool*JUCHX&EBuXK z<%ao#mihzK+TK;lRd_V#Ih*Mrs(LbH>{Wy(e?i2viSUZ23F`QO!GyKjUkhPH&DHja zN78}k`l6OaVP^Sw28&+fV$kzNU3fpFze(QQJS@s?KsfE?0dkeyh&063PH*MPcJc}8 z`bNvBZ8IkDOD^8igH6H?ts#t&f!eY@@UJX1-2l}IsIehzO7A9IdPqB7i|!j+^pZnV zDuSs)A>S_N1boLdFZSIziKZdNXM0soRyRpbYZ#Vi zoRaV>u%dOqT|xE)3kDdHnO$sy@T9R|@qx{=)kwcponb;JOYu9;08*Bm891Fu&!~sx za^m#rDlwEqVy5G@uHs(8hOxKmZ#GZ!e*cQ&@65YaV;@J`*%;K{FETZDzf^7{6?(XjH1g8T82=4Cg?$9(p?(W*b-Q9z` zySuwP+`Qo(+&4JGT4$}ARn`9Xp4#@2HFmuRqPB(zyU5l`nUcr~2e}vv=+WF=VnjW{ zU%ZU!lvvk%Mp}@HNi*cXRA8sCN`9Q1;jw{ZVrq%`i4Z{OO0!JnIeA`YzOVPSI*+kd zX|=p8GNI7z8bdYFKvU|XwIqD7fgOiV_kM`#RKF)_*XMfgM)!YeT?itzddL64E)qeK z#{4BJGLdJhWKWG!K#wdQT3z?1a(Y8vyVT(vq=Q#~)W;2pwESp39hp7H1Y%F&lnr>4 z*|}2Kf49?b8?TLSB>Ty2{y?2kKl<@`XuE_ol?p{2PJFviTAj`#?oE1tSP>VsZ#5EN zP}OWo{fquSOjsVf^N#Y)`VWv-P<1G|Qx@+f3}=wTUv8c$(J=v!9>ocTsY)p00!zyU z=a7ZoeK}#Q(wkW_o$UNZo8`n`z{0_6LB>oU%$V#k2!#Hluk!A@%~I_2M5Lg{$NkBd zda~NcpRX6_()hT0flG}^y7u?(I7i2!84nc3To%)==#!;bbvAl=LWk$6JxAU97jkB) zZIR!2a>7~Wtt{`(h$m4v{ET!yW-LP^?8w*D0}@#pA348)6{;wcE1oTsl&MeW2sM4b z>&HBrNt=jwL81)LXOU2O@nx{okoapVst|*BVxYBrg0bg?FSmWo(Ikh(FfM}b&o^S{ zI~}ofuixp6A}4&=b$r=)c8*iu3A#rXUW?|S^)S!)RdI&v=%AS`wIyEs1_CjttHjHg#~n;|(3r=hxw$N|->p0#d7@?p4fB z8QSI8koo)xn?#}m%!}@KF1|fSMw@eE_#;&V%{~?SVy3QC;J}rn&Ydc}NEH6oxMx&c z63Z`yt>F~iQ&gD4wwZlF^4=jrPWMs(Zu}-pE6Y*}*Vx1XD`iH%MNAt0&!MAr5Z3c7mr1o&LB#kl!Mfy4Nkz zC%mg6e(7J-@hx8Yh-8Xp^$qLCBU@|I)#1ki`a!k#pxyMp33$p$soB)d}VmVB?Q=H7m9+iw-Q3%6JPxV;Z8V?X?kieO@XSPGRhhBcvLvi+VX)8Yt zglVN7%W6>*GW>_4+9&zEbn1r2vL#=YMDNT!^37NOjkf=6I+-x#j54c-??1RAVQCiD*no0$_TW&n}m6|yFB3#EL2SZ@$2Nn({5q0Bs_ywmZ z6{G!AWSc?{wHLCUk(_O~(rGf76Kt(8Rtfd`CL*dB*nF|l&3ioknmvx{)!U-mC_Y8I zN)B2E*qE?DwuQ}g56=_-#dN8eEZn)>XQ2#k)>$#7oC-ghU|pHYk-pVuq3)An-_;A1 zI@-&0uBny?cD{&T7IWT>vEUDM>E~2c!W_U}H=T*k0KG3rH*Xf?>{ifk<@{CwZ~6{z z6C?X#r;U3BdmrfzF&i4C?^YIeru*tQR@Om1@%HFFJ~=p_r$^)+A9J`o6*{pAKh9M; z3JzjLEIj$%SjXWvPOLQKbDzSlj!MUNXMFkQ>9nx>->m1ZL#HhHD5Ci+>cqElV>Vy% z@*c6K+hJwLQ>?^IilaTedRqdYid0U;8#Wz^Z5Iu^_FNx~GW!dcAjCf=wp}0=UB6#_rln{k>Zua&E^bZ39J^dxnhPo67&emb-(~Dx{)Wc zS5J;oLN|@Hfq~0|^t9mqul7OS<#M)IXg4h}wv@Ap9Vxl*!3#E8efUM*cWoJo;>OB& z4g-HASrWzdW>B7UZP`BTLJ{@ESa^(snfExe4l=egLKTLR;`;dX*Wc?hsy~FJ?W)|U zm<*%v*z_*|!q1;7&Q04P1FjX71Y05pO70w!AJ^yUEck06%BQQT}q|PE10kE66#c+dFFb*HVe#03W_>^ z{SUtzS=^LH2Agzim>ETn})1e4QMpnVQp2 z#4apco1i7N&Atp-wwz8U_Aa8|)>^)c@`^jsox1;kd)o|#JyC(W8+2HV-s)v`PzRe= zw@5I`zunkKcY2)Np^3;EVv-7sjis>wI-M5n&e42k1r~A^DNB$87>sO49?W5e6hh+W z=UDnpl!+rX&CzLg&VEO3T~`|%v3`#|w(?=GstmoK@TS0!mMyan9Qp{=)~Bb2FTYXS z$&g72sjsl9*QQ#i7)u0hB@+&(CliKAk&rY4L?@1a`iwWw_k2 zNni*?x6sD@DP`_BoZ zWta6#uBnn5Fv_7~d*-BmT64m>d?Z{%>O@bniipYsRf2yZVu*746XtaoC)gLD=LJsMIJVM z?QD7T*Y3pFl&L)EAF+}bSbK4sMsAHY$JB4<6iXX_yNN&|3F=;VX3AYgUGwE& z+JlYj``R3O^x5?n+qRl|A8I9n`GguW`Xp~XR{n<1uZ*33GI*S2;pXTvO=GU?{!VJ% zdYDJWNy(8<_nfw1&uO3>nfs6S5#F^3TeS6Ui^?EA0}~g_PPDGfb|5En6SjlX?;%g7 zpQRxqs+OtB+bf*&Hjxofp%xzT$J zV-`B}FROJ|F-f2~?C4QxE&OV~w%Uz;LL#(M2h|LfKqth~2cTwGdjP-@>gDYhwHfz# z`MCLe+jdsIQpH^6akM)XIpC7BRx35`Vd*ynDSaNLmhVxbQ^rYmy~?I$taqb2!46gx zP28yRfyo$GmD=RwiItPtL137W;4{l@5FWvwW)hDojZqJKcA>X=xYPeVhRGftNAMLz z7qLF(`-z{+dEI(E9QlJK$a)?2Y?L0WRj_|V=c6l&zH_Hq&@!7T+FD&CS43hgbbJ*x zy`AMecgbn<$@zTbu(4bBtn(Z51>0&8)~>!kp4zPuo{am`D9IjUK+_)|)Clh7O%P!r>dn3P;i0Y;ocF zJhgsDnqYy~y&4tn!9aIcB^GT4 z9kiFBPCR!QZr6{8eI(wOi#?38N5bFz=l$N?sjm?C2O+nRh55T{0O+fDG0pO z@8~(Kd5CDuuhK}TNNeWCSDrdeZTnmAk0Iq9f-^!>lMzuP=+hO!4-RHX7qh|ZmJ`|| zt=2Cn3cY(A)skSr?8dK8G9>p5Pc%l#*H*UTNuZ+WF1xo8aFtHwl_vybU6NaLe4$<6 zFckA$NppKl6`D>of{+ z>ID>4mbjZf8{f_*vZ+ijr!zm?DIMLz)*g}OY~Z9dwGBFuK?+7*$N-Q$vTPzQosF($ zi2=cmS$;r4&%+x=H1WQr9Jj)xv4qH;_FPeIUHymh zC-2lX`NAZamvB|!d|~p$c5P}`Cdf{x*${n(n_SaLgp(QiF&wQcPwm7v7EOqmH>t`| zLjf>g$ZmgpY4WkxSQ}e!?|4|45pFBdyhfe4Koq0LP%+gG9_wz&ajzqB^%DCVIQ zR5IhzTwx`7iHBalp)=8!_3qjpjqypF;ogzxK^&{tTYkbzE-%5rwaaCg>XhhODm5S} z@xgaG&=oydkg$SHaS@9w4APXbO6f!mUWU3)jsUO{t7#E6a`RO2>ecOh?6zrVE2T=* z@ZG;~>kvZ~>F?U#u3#>i_SX#rOvyo^Zv9tlWIqUysoD80?Rg3|eF~J27yoUE8evO*fymqoBbUMj(cQ%HJp zcEc`SBN>I`josPT?w2(A1g#T0(2mNX-jU}AWA0{+SkRkYL{rYHb56Qb$JS1^ciWnf zNHqUa%)>gdH+8)H`UpnfC>9jvUM~|D$!vjREEMkQZ56EuE7wR*v{#Fzbe$-kq4aFy z)QJLKH*XIn7KN5NU0s?Z!vgZ054%DHT7Sc60Xc_JO-YSvIgGColiNfqbHE#V;=?l1 z@PEu5ina~4+T*KaW?_d3e~o}A88&UCSK-v-Wn!x_UQz`!z^t9ViM#Sm3-qV?Ef-|| zK~(Fn01Lxv($J&hFC1O={G-UdQT=yl@+J29>Q6`G7*zouDTBunD030m`C~pB?KF~n zQ^I79q(a-0$BMJ`o2GH`v8zmLMZVUjM@g}j!*bSwDEdyn_z%cdp+8%~=SKSAc3-US zQ9O2o=CgpevQX{qFruDk>{nd44%Y8mTvDdR@8Uq}3ag2|;Q{;j$y5iwuoyEO&3 z;xct7@c!|9!b&>8HE^O=g4QPCEOac36jo^s(twIv=1olZM09b|(RYa={(E!)G=D{o#AmJ4kyNDFSF?=-D5xQSc%CWCQ;ou8KDV+#{#@y{HO|yl@ z0tj#9D@hDJ9^agxoeULYstXUh)n^f_JS_0O++YP6NYH%CxfS~7fF`qoLOs2K_C*K; zv=YxGOnsDm=RS>#m?Z0ul`vnAv3M_fHaEBdKgLKtm1Bc&p=DN87c{LP zxX)*hn9)#kqrOuSXxJJ~rZNTOIrI$jwl+wwnAMpm<4s{*Zc7&0Cg%2*0K%(pkIdAs3JO;NC>xEVyC4cHWGNam!ay|HQKo$Z&} z6QHOUXk8ZFXR;7yl66cC0;Xfo>Jb!Dw=kKI!|=dAkJXQ%fyuAv)Me&N%}m#KKyej8||z80yv%rS6bn_ z2m`4fTX{HF7QBh)Y~W6bf@9&BJM z*$sO{C_Yyzus;Pj`f9!WtGEG~20Q}<46$<6D}I_akJ21Ou3;v{-!6p&Q_A68$bbCd zwNI4jGir6}!-7>N9E(*?`^n$Ry-cG}*B(9>xwp9T;}U&=e=CAC=c(_KYV81FopL2e zV8Frt3DM~$2Yq0AQuZUl6F|C;C8jDP=)vidX{6xK{#GK}CbqvY@_Y8i!~N5zo5%)6 zE)vUU%?>#tt0CD>yQR5d%Mi7EYP$j3m`Q)Sv^2EYiWIO*WUzwU# zR;R;1pl8U>g~pZ}@O2x0bwY#5YQ7WjX*c5UHq<77W+6O>GWDlk`J3%x)w?>9{fWOl zIagu*szuO{Hh)yMJ|kGeFm!6ai*x*LZJlMh8;y$+O#*QD+|$h1Jhkg$dxdcUWo{u` za0JKUVwu3IGSW-~I^sso4Gu#NU09;L%ui`ay9-x?h5^_=1LVr@Egg;Wl``B<9I{h{ z*Ww0_Z*Qc$an~H8Docm1=-+hE!t;^oIbw5`lF8o2IVoH!l7%%^CpHj<7cAO`MtP^= z-ovLgQfDXYTmMKRs42@rcNM@f+Y+I6tt{qUj-Q?sCbEAbTM*BXc(iQv@^lZV1+Q0D zY%v>u?O9`;iJrGx#j5Yv?A^S0aX8LZdiD+fjp_T*sGh$Q{OojuRF65E-(8WpRl2C2 zO+U`3@i5yG1YCHNUsUAvTddXoUMk*LhVLBEnh{;f#6?L|TlMtA` zUtXS5;yy2^l9L;YLN(58aD`Dr_;gkwzPTZlem!?uf{?Lzi57+OUBWgcH^eOk#~8_; zu@Mm~_A(>?iq51c74DIwc(se2PLsN7ZE@~LOW1t#ezRab9`^$Olg!v%tDb*8-mncr z&ReqNfBi^$&o=Tm?dBFBU(AqTHCdj+g`)tg?|j>7@2fLW>8kpJ8I!rA?RwuxcL%;x z`(Cwhs9)tM+_WEI{j&`MumdCC&%KT;4qm)fLXu`$uN%%)-^`JLz8Q2oAGe1RF}!|K z#r4lQ@dxtiUv%wN$F-)emR-D?Mg=j%)tcXrdi4%0InfUyceW!%OizLw^9zJGop*z% zcf}ovxE{v{7~sGCsU#&DbDFl?QLgD$Q>@Feov6n}iWSwlA$>;{e%3G{5nClDBjC9Z zB|us$PF-J4axl*>ODcim?!rLuE!*_dcHU5Ldoz33@Ofa976z&H8mbu|G6n>$@ApI6 zB<_-(xx`gtmF+FI40G!5s~E;CRY?u^UUGrSa43(|yNGgH?vEZMDPzj@`6sUnMy;O0 z3<0-MNt%uvbz#$SR@^IuD^9`|I-Qk2jt(x8c%ymzuP$`bqs9WfTbB^A)~`d~uaotb z$|#QE^tHo6wfE`6U4`d3tO$7CZfNQRV;LPXVd|Jq82gLEcT|DKWZa0kCU z1dJI?)fxQLHLHVlu#+ib9hMq9KVLv{)`?lC1#dEkW}>ubF6@(4O_Hd ze;mL0{P3_}WmF`+(oS=&7VJ9Jy?jbMPv7e6mN~vOYXLf5=cv~6w^BNpU?`A!n%plN zqI53>u$1XG(=xy0yvA49hJ>pn*=uoC(c`2hP8dGk*8^WuI^;YnDq0SOUZyrg2o2V1 zRsqm*DGho4k|4KcCX=ky!qdw(x`~O|>s(IM)IGFA7ot!q;g_eNV$A zJQ1yPlN{HEdX`p3WO8L$$46oaq?2KfVQm&^B$}#8{cSH77>pn5q6l_nkY^z156`Z* z<(FDh>3qwuQ|B$VyyDajpR0dKy=i6rRXTU`aUc|{_Uz?5sc_r~8ez>CPF&?M2O1djhWJVOa>;0IIw7eyHJdwnzdD}1dW^m3Whc0(h=wetYG_pz z3O%yvBkxfB5l9kvlpN2L*V94y3_9=oc}5EcU+bE#hhE@KP8EJ4kGI5R_ZeBKeL?F8d=Q)Q3M+-Yn*3)M>9t!RCSH+LxuY;UAi! zRFxJOo^Vy)Y_Yde!}P16D$+)0e2e`I~zVE&UhM!k4Kee#~WgwL9wp^vWG1~e=$S1W_)<8iI?&<4un+GRCaU|rmLi@j%*q} zp$ClXiEK6=BijrMHopQ@#zG+uZ&j3mG2IyEP4g-`z}#ar_MLKpakJWRgWRFSh(=%T zBmsJEk87#eNDtlyV3{Gzjt#rj`%~=vNq%S+9m za`ZnL8SShr1?nhJZT+_5N`7@8E%ITjH*RW@)Yyb%6KGfVWQh8XZXT;BZRi z!Ma&K{cD-r7pOPfq`rKqEBSEB0hbsifei zJ+)jV5Olrp164CW8`Ey6cnmEh*YE2ODx}5vJaw)*S_*2LDC{oj9htnxS{x1?KJGWG z2UNa$1a79DdMK1lBJn)tSeCTnnrvbTwXO2`(z(9{@8vx%DCG5JFQr&y5uyOx=;z(D zb3WXMoP~_fOK-|21Y~dzR^JM}_r82vr!7~4rEx{{uFNM*mX8Z%A?HZp_ ze!IK(#TDbipfdw&XpLA#KsxEziL`yT7!jB=C;oTth!JRcU^&{`nlP|pql^KQC;9X8 zgUmI5{sYul_*dm2Ocsdd z;}rO((?w;@KBuaVo};Wp)$doV)T_q!{9z)9ax+ur*OTYNYIUWTztX5BDEH21etG`#Ek`SKwKE*DSf*RQ`;para>0c4pdb zQITQ`#xz(T?`0KH?ROPPjr~zAmZEgQv&T}td=hgZg>!j{-OqxIA*E6-yW=EVqA#{zBkj#N-gc~KL;tzx4{~1X-PjQ%XZ-x9@ z@GLQ;G2Fu!lyImQbLp1ODj8ChRQ~z1x6Fg7Sb~ZBK?4P!k=JO@a<}*W z4nerm3LvRQucryaPjl&59jDhh2V?E5+p?(C@{?1 zQ=rzEP_b4H>uKUAch}VS8IB{{*=H4ZcWaDS>zv*zSpA<7T8{rjMSx418JAk#G>5*C zv;5yrN{j1YVc(h5KsPxSSxejnDxDLOw@D>cmoA=18yQ3ezLUX84IGSy+|9z5w*Mk3 zILz>pS3w_KLh`o zGSzE`4&B?Y>p81xp!Xhju*&$ej$LrgJp@p^*xxY0@JN0}3O_LGzP3A9y$ZO$Q8-A$ zcIg?pj$#~j$l-Ufrrw;=9Vcc*4Ph$XFGi$S=)0|b>>?Il5sh|sGpTg(xYu?z2;wp zU*eS>riIsARJKLgCesBr88ysNF~|)4@=r@8!MA-S}+h!X+2VRcOeA1B353^=4hYR#j zdKk%g7-6DqzYw>lgh?BsSW%o1Q}Xb7;7yKz4lo2p*@a*-OPO%{B*mJoho{)~f}>Il z?%`V2H500xbGu&?7&&Ly?=~C-ro?=e+go~KdKx`HYo5;QxkGao8bfJU1m@s!W)qiU zQ&e@hUAWrP7;cF`sRwLP+BKgKTA7qV8o*qsObN&YT94#Q&t$#s{yRjlOGp(|%x^&V z^`mYaOs|;Or&*d`xwN;=3cb@JB<;ujkC`mG6(~rpt*J*r$e0%kGe8Id61Qpv*WeKT zPq`0mQ|G8t4D~ab8nV48jVpDA$jtLBDetO0Kw0a;)8^xa881N7gCq5FUXWsI5O){O zPpw6lz11b{d!!3OQK^p#ngAnA{iEVq>UL85haZ#Sz zA&(edxg;u-tkY2yqK;~gDSL94O)T+h7p?;u+}?{?9xMvCqgJ@cTx~sT=sga4Uowv=DX(U`;iBAuqYT#l3)Ruf^glM;Jz&~z zpfAAxW+cB~CQ@HRKtK$AgMc9WKN(3ATPrhrR~92jM>SP=i0}MG(sKXrsd+;ED}{gv zPUx}jV?zqL@2DI|igsj|0+~Jd11`ug1g_@K994ibjd7iLPV+g{Iey2{+lvBXcWR*Na9f+G!i5^ z(#Qn^U4$P@-Q>CH%oG{7uHvc2y}-DLQ|pRBXOHjyyM^#qauspJ5D-7fARws!&lWm6 zni#m4IlG%V|9?C!-8}@?u9iR)68{7gA&Nfp`qaijt3I(oWc^Wk+Vv&M`Auah>d~v^ z+%nkWI?Uo1c?&5F%-m3&Z>>f*ET6)0U(+H`f1#@53_ZTs0M5oitOQ>G2HDq#VSXDv6HoazzNj2IT+Bo*knmhzn8ZgRG zSV3`SqMC4uKMhC2$&&m1WWaFZqSA%vj>;QIbY9KmfQd<;X(&2Eix0Le z;d`=#DCEj-x&kElVD9h(Qx*2v^hbs(3{`h{KpYeVoRniQB|K!EaXT3U4wNe443v0( zU|8|n(R&yN-*-5uarl`J^2j`65vAJCq15|s|F4(RHVo832|@mwZCN@7cU5o|7m@ft zRD!sFg3&A-jq!I~@-RPwzaryvl0gYZarK*0-zPIf2Er-Kf`0lx%}|MA$?} z_&_Wp#)o8IiRJ#~G3Fyc~%|dW-p$EKKBITnTqa=}K7u`l%=XU-?2qQ=YEB^8ZN%vUZS;fUACyLU%hywHEJ) zUk8cDL0_RTJ$Js7E??(;@?8FRz=~gcfa)n(t}Yi+X|83y&>f(ha}Fjj=S~)LrB&h4 z!GfB-9~x|BC@_bue|~s+dMeKa)-cuLf~Zsc+m+kBwjz9zjyJKr{il9$U~h_|^Y=RB zAH{&Jm2bzekb=)%Xm=FMpDEu$Z&HiE;vAb6P|`??h{O?hsPL~cF0k)w6PFiqK@ImG zf?*@eUx!peh`HCOyzS%gUx@#$_pbXw#3<(;la(57L6nkl!2}|v{0-W^zD$TfsN*;a zbNKTsjFkp1awz{R_`TC_;}bymwf>1=?@6@C`doq33b-j6fPR6P{z^?QsKLwH(&8hV zgx&u1(}q7f3PE)m!tl9_83^+H?7aHw!a^{ha`miso&-50al5&yi$tY7xiJfTrN>(!+^G)x%)L_Wox!)%H)!+aDS`z z;bg_#^If=NtU?sTD`O~G_{H}x?y7TXe(EK-bL45o|FYva5hV_9sNo@`D%RlIRa=#j zd257-#ZF_)r87SbBb<(VMOf{o{ejn5i+@<3+e0{HJwX=GS!ASl#muS^VK)$Am=Lje z#>T&CGZU(>L8|-qQ3PTiaGG&BDm=S?EX?zra0}ygFuAu`WooHEi(lMMTi0ZM@_>0` z7_3@&^rR-Q#&<~-#a7QJmpg{G|{Pc7;#^7`h~ z3_ZibMtQ9`UWMuLllWvEuEvJIq~ka7x&U2EgL6fRA)Zw>m&!$R!=_DMGgZUX8PKj2 z zIT#AaVv0Tg%2G7Kej7+*(%O@-E`yZ5L+`kYUq7#$K|NGw4Lf({DfRT~ykqmZQO#ao zeTs_<_L!wqgp9;$^iW52@Qu%3V%$gQ`HAt+nNa22zWTj;P|&nut!)#`R=6dCyE=^T zd5X4SEy12Y{n^STV%F(3<@+=tS@tu@5WYCGhuYieMFWEmvfwzha&V|Z>rMFr`ng@S z(gvv=JVN)h_g70x&o%T(Du2i+v$b$hD(^-}OGZeon??f9&ydj_Tcpw;!9J&syP{M< zs`)l_#<@zfbyF5!S^(|gyhZ-D-ufZ5`3lO}YW+0jm`T$i;MY4P`1%9o{>t~wEhaV; z|JzQlXw!W2jq7GD>*aOpKa|Y@_vDA{xE^0p1IOOlv^`li6akO7_&%v9FCg&XxasfK z$>9|;V=ffUP8%bf=G?a+`;P>n3-q-s9|E5C{o<0MT^s432~7W~AH{e}#bsRGy^8zP zmHHAN4C`x$Hbe$~+=v~Pp6KYsySfIHF#4a{oTG2|uqN5(J8Nhe>X6(MUOUr6dGsf* z(SfT{17@}XHvn704HhH;TCEYdmufKYQG5cQj*aidLSqi8$_OsLY@l?j@$;tEz*1_d z-rsAxV`gI8p!p8?ESw;>8qQK_2AAAT`TMSqKj~W*+F}0FVIj`p!5oL*a8yt!T*NZK zL%|sqrMS9uv&wlCwHO-mhsObA(yh40z5K_zjw3Go-NQ2nreMbxj&&vtZCZfBa+Cgl zCF>K7s+;8laoiQ8%IoFRDeI72$9iJ&TT?z*Qz!i1V?kHb+k82YDHIF>LWKSr&P$f7rfs;_rWXj#+p$qB?UUe5O*iej_wUq{7i{3n z@@Z1_9MzQV8P)Rqjez&@ZSF#u#0puRPHObe+r`h9wVtc9g~^$GRN_Un@#bAmw~v}B zkZd^W&|=cV6EPt#kObm)RE}f7C5p;OEt;@UqLLk_f-;CS<)Q;+EV_)ShV+7Xc$~0G zsq1eNm~Y2vE;W2!V1ZSE6@iI04+8#N04jVcvF8x?&@pxGJyD^wzRhTAaIqO3)AQCs zLu=J07sX&6u^HvDTm9qZT2Er{!*cD4->nW61$RW1No@qrV&pQMVXjPZA!}3^U!AbC zuftv3^Bn!OCrY^j(;OtnYh4h1LoTm%+lQf!9#~hdZg2LGF$roLZq^7uE&0v1eYq3U zgl^%K!x@e$XPLk0c^|T^$n(f@H*X=ZMDr{xK*RanY_EpT@LEfmBmJ_^e6O=zOz7XI zF@dxWf^7n#&L6tjd3Wm}C~62cL&o!HsHEk|7< zPxMuRGtX|^l{L1uy}!55BOKlZu+&>8VyGIf^}fv(7*ImzB=p9d@0796V(B;!8$YVH zXv?>b27e|~yfC9@FuB4AWjBvj!F~U)ocrs#X}C558-hk_{8VP;-mCb@r~SG9T`IJn zrPIH)B}ljW$5OL^bb#^HL8tle`mL*mr7ESA9?DA!z65gV zz%7L02Y`zxgwtW2aU&G9-POcXl$v*MwS88ZIxig=Ye{-4~aA^$q zYN@Y1mA1-g+h58qWFm3-U3@;~ZkrXD#@(Xzl*(O)BoH&CSNQ`nrrDS`$kE>@A{l}a zGJ?y-38Mb_!j_!8-mi&NMsR)Saai`4pZJSAg0yDERs4Md;|68pc`gH=PU_Hk+b!7b zaYT8lw_im5*Jd^x3_B@Ch`nFu_rmNo+aW3Wg^y_T&%DU238l|i_qIXg_Dqr;ad!k$ zt9M{unzMNwz6=RmnVJEL1M}}|zp*-}mUpZVamj_(;LKvBM$@V9=IT$is>!YLC_A4G z4vkJC>Z9!9l&pbhPEI0_CzZ6L7av_st~D`)A`sils|ng_`f9)HIva2-nv7$#R9vqE zBVUWE^3O?c&B|H4aTaMz9aZoS{YYwc3TwMYDb`iE@@q6-69Iy@8~Mn5c;jG0c~swg^={-u=5BxDq9u{MW0LB>3#DI{NzucFIo z`1W?&>hFMvR@Q!_zYNZ}2}(P@wep%c(w{Z-mY`;bJ`8lo5MEdd%Xw@jb>IH5XJV=+ zTvM;%jFW28pRS~LVYl}pRMcH0wUiZjHofh%J8RpOn~$USE#wf1*>axn${Da-^Z2z3 z>ah0jbGb~$%m8b3)F!)_?&dkP&JucKkk%I)bdb)8{VqA5-Rw)RkBJ zgPE}3b75uT#|9`;D>~S~bY!o0asfUkUI8sbyX8Mxzsu?hT#PAn6o4knfBT@UmQ%Ae zuIm5PoPLJqv&L#`A8-6wgmR(dn9{j(M%G0|9GjYbcyST&xcYW%A%%mu`B03$LJxkF}e(USdtr})tomJWLZcxO1>angW zE(NoirXaQsh#Fwm=t}e@uR=dw-TYmaRXsbFG%LC~4(rRAc5g6cPkCX3%&bnJ_33Qmm@$KOXSZ$)OzKZ3pE( zkimE+ORE1wkWq6}=g7_(0aDZ&p;cYjik5nkQuj&W`-1)9GCr;ESSV zGfSV`rqxh>Ik&{i{^1=R?vT`Y_|IfQ=*8PfRr@&Reg9h3sOmuR;KP|Jul7CGaD5+@ zcOl|^Fx#Oyb~Y=;5;7HG{-E#iW0|*9-BMhC#=ab{B4iTqWxsT-lkE0I`;sB$tnrWN z$_yMTY^I8trnA4{v+6n0D9A=`p@(<*CireWU{|q3dI{+0boKX9SAs(P*FP;Rq@3n? z?I%yza7L5~V$Q2Ep#?)un$FbxDi~9B!?u0K-h$#$_}s zI0f>?PM#@b;DCCpd|iktTwCRr$gb{mc!_8sRc`CNB>y$6t%>buWvjFP zZYqU8JL!w~88PNY_9IMr^k>K=gj01uUEVVqvUSjiiEi#n!rZ21igQ?uYHaI$Ib~PS z=gcePra5$DFrfCE-+$(B#wMCqns4d#{G;=Q?=b&J}w(aruV;g$>d_~;XctL^+30W)#gBGnrPDMYbl4z;wf9P zw%4XRIT`^?vdZ`^HXLF6SsDdu)1%i+Xb}|aZ@!W|7z`X990}3-OSrF_^ufW9+Ch0strNPUBtN4@kspt`1mWnPI%GC;34RGB;;o=6?-^tt5|K zt{1<(+W&UuokN8L|EiW8eLWk`Gyf4g>I8*x;AFYGfz%ag?wy}#>OReO*ASUZ@4GnX z8v_$kdkeqL!%GF=yGY}>?bsU5kiPWQmDS1r>M1UShpXyw^XiD+Z%SD}xAT5uKJzhM z)tP+Fh*(gK5F8~E_vc=dYTk;eG${>$;8~qrKIP zOjq`f^Jx*@LiH(iUO^ibp$SOmM?X+rB%FH4N^nbR3Cu`Kn9t03D7-f^6=vt8@n*UE zfQj(c!pwM)e{&>g7SEI;c8J$4i53u4!S7YAl<`|X%H!MwAU6|m?JF8yw0XBF;4lX+ zou$uo;}4=D_MUn^5PDStlNYYm7-^5P%wPu1=etyWt?avGdfDeX< ze#sMVwI`b$F;q~4MA3f|2NLmvodgjfr+o_hXZ&v{=97VyPTaS59(S=%AXqM`-!zIawLWOB;#dth=eBq_hd0@|%_WLoFxLeOvhs0c@YWdA~`UBIz zlqIWl<~D&^iq+F_6!o**pok4=f6T1-c}M{t(U^YLsS2?v9C*IjC+Fh)16c5P)!!Os z{hxyLfSBKJzX8DdvbU8St3__1DR|}?4$Yl_4DZ&p8=)BN*F0S5%Ql2&u4k??io6be zC0e}EjXa)jmsE4(olGzB^p0Fyuxj0;;ijga$&O>?vKxXI*XWZ_f+pBNcx3}>S0WG2 zbN{sez@KVeqc-OCr2S^fBNWWkF3fwa=T2|= znW{DfPs!jU939BFy``#+Ce_a>IeWuY8J3@7$V77+N597{GWv&>;O!R+>CeR^CGBCa zSuLfGSkq16^MS#j0UWUoB?BseurgHnGCW}0e(j;bjG5KIpQ<7C}jL3*m)FJ(y zk62qTOUnHLpaHZ{5z8Y_Wck=sP+ccDh;={s&-FU60z(A)jY%67B!v?edSP z;?O_*5F@dPd&N3tZM}2JL%7|IpfY07l8UHuP;s>u70Ua?mK!9umd+e-yK5yYJLIo= z*c_3f$xUSltT?t8(t}{QZShRkiJ#ZMNIbEz$Ppz($Wo^Mh2(BsAgv!i!qp&_rti{aVVTF^YXj+6XQq{`5V1R3C!vf6&*)aQ_6N`GD1W zp)p!TP-Y1T(wd-k%J`Gg`?W*&^0zj3t{&lSwbwdx#EvQwFQ44w9+zn}*Q1CFnx;^0 zY05k=2;ery8T{MadUgD&XS_!r(5wGiY%+{3{}-DbY9;Yedl6^o(mKPnjK=^E+KZ|2 zd0l3$lq|-=mTL;c-Kywt=JOW*kyh%f%5V9(XHA>K?92Ez(15HE65)#z#I06CW&l%L z>-&Dlb!?G3l1%Cu9ZeEx=Ik^sbq$t}oO)mpnQNZ6;2IB0yb^3CR16v z>i>tZb86Cr3BqjKwrz9Twr$(p)3&E=+qP}nwr%5W?02y@yRrBI6;V-FmHA|zqiWIM zwI)m!RK^xG#uj9exo4V}^*CQes&CJ%@4~z*bTQ<9a*#J!p4cUio#03R2;Q82@NPlw zxm2fS@t2j5k#AM_>F* znc*feg|Xx-{(LvBm%`~GGu&V(|MSqCrGv90l!x&y>(h*woFJIs#)%=b5bzK80Nu4@6;}gp|`-aD4n+9wCj9no66|@9(?KI z`tiCvyPwn9JvC2Guf4PoU^~Pn23Ij|TOJ7vG5cDTEFU6biCwS&)LU5z5P!7>zaKoi zN8v}WU1+r%f?>>w_-cbBginhH#E@CBUeba}S7u9Z<8k=IN$Oc6_;aS|rf_6&6k7Yn zCw+kF?OE#E)K}Qg>wl4#J|e)2xi93{;LCF)|H;xxssy+CwS_mrFmJH2r(sY)yrb@D z8mPR*(OGVZv1JV2iYa;`him++4nzxy;FonMV7^qs=KmK`C5<|G#10Eloqhux7Czcp zaLwUOeUuo1n~%40PmNC>g=E3G{VDQ5zc1np%z*#jXoKNIY#wuf;46Lo*8KSS>Kty5 zFK`|_fnOPqK|ehIZzEpzwblg7|IG{Cu8Q3T(wZp!KKYxmVCHU6^D z!m6}AH(Z!wp_6rvNxgw7W=Oj*vzVu(`VKh@0RJ+gFco7?sMo0CvHG(8avVyPFag!(P|OkaznuYTU0#)aCQ=TfQa6DR5>E^{T~n! zd6&8o`36b0Ys0sK<23eeYRks!OB8kMfevdD8}Ylefv%542vB(mDS2{pIp~u$xfeE( z!<_r5-)BWH`g%d1iEwV`R{I}X^kt*R7^ORy7fQBoXLHxGt3c81e#)#Fql#4Z z&2EzDL+7y8%yuUkP!@lnmm>RL!4iRZe$M9~Vn`i!w2jA#$e{J&2vLrWNZzOHPs&DS zjPzc9clwY9Fq@Y|9hLlSAax$4w=LWVjETg$iWn1eZ69U-230O@8EC5M-46(io&4M6 zov>1T6ST)TGH=5a!cV@nOraL-#doKFz+|TjZo^uh7vsDc)j`a?4{+t!Kf+r28HyFK zW%Okx!ol3CNQ8wu)ngcdl3en*T%NseQmWc6oBg(c}v@}TLen>R{hwfD9m9CzSsqmg5{;{QEbKMT_G?sD#1OEkJ(=9xkXhF@X4X5a*JYm^j#~! zb;7z;(fDAX_63LY73exTV#`nRg|medTd$PfGxQCW>E4&jY;SCSv6*^~ZT2fDV0>`wo~@>_kYWI>rXC0zlni> ze8~TQIq(0B%Z<&9?Ea5=d5fDTZ}Q#eZ*+!Hv>g^8(MVD$nqG%xlx4$Rsg;?+G{fkc zhnQxAguGD(woy$~IJHr%Q9^4m$TnpDZefh8?8)2rm+#4|cFk8{&9A5Ks^e^xojDCW zaQOS4J5xN<4~-ECiWdST&~zhQpI=qNfMz1$_(J~mHF)7Gyw?v(qp^)N<{DSH z(8>>uW_t(F-PP7*z?3Zd{A^m5@cjkM!?MD%4q)C$x(5Ge@;!zaaVYonMgkDFGM#&(n-$IEk@^gPtf9ayu7=!du55FYxRAF@4W->9(vjq%M!* zvFhWFWW*MKeJObteyjQ@^C3#+$T&Wee=sjq44g!K4D(0=#r_`e)xX^pv|>u63=ua6 z5oO3V9rH!P>ZbMw%7;{EEIjiUW$W|50iLIV^z4Y|+X3b^I-Bq#<5(vY8TBU0DApV7g4j2$EY>)pfK9e?oENp)#{AcJ)4&eHEK>)D=jwC{2LpWzf zd7fhgCUOkW9FXKjP-4TH0U0cCRdjjeM)E|9MF>6$U@{baidmPN@|HyP&6^l_K#C~;zq0F>_Yo}W*Xwt!=nAZO9KKkR zWF88NfQUnnE;L}D91VqtlOD*g>@QaMne;79J%SCF3Z9*_mm-c!e!hxjmKQ z0}N5}G6W4gWWpGA{$FFPY{dNH_y92$!v<}|aB4^t@Sj*xL*l=tFbHsvUNK0*K?m29 zbduo|U?ITj(G=qPGJ)U~Bax#AiUC}dpeza@A)tjY^Zwd%gAIG$RG{T3*dfa$g-}*t z=YIG=o!MYez|*rC0iqzUilz|r@>GxHD6orSB2XS6E&|Y;kn^0JFyV|r5JOyQnu=6v z0p%WOP{9(!CncJS>1_Y)cv!-MHe#Ru{KOA*0QtgUz@4cZ9RNQbd?v;5#>b_i!KQUH zvW}wx!9?bW7$Ff0LchL?G#D`LZh~NJW z9wz#4m5IQt69Nmal$mD$SdiY)hDw(fES(`6oYGz#4iflOE(>@E(FYA$QU&6f4Fz&> z1Y|_!hT|VTRuUK+#(V7F?EYmSZ!*wNzz-zY02z@GCkd0r`Y$Mh5S?NnPH0FTWEkfx z$-j7WF0fEoVn<88YhWJ$75=Bg{6FA%(}34}V8;F`sQXCpz=Oj61Ec7Fpw6KiXF#;^ z?ACb^p-mzIB4dMdYfisNi%*5Ob*Mm&K+TMWJeqG22ZmyJ*KcOiKn-~JZ*R7cXV`~~ zgyDU*Z?5kMwjaPK?@^3UNLcwIK+uHOZ?5zHA86lE{?Bz^WWSG|*LB;bh|j+*WlPYX zDn~z_Q(#E1f(&l;kod##T=!jsI*0vxezjqUuK;#K1ebPT6s~<|5Hgqjq;JOTSB-UG zLbrZ^Na(E};Nu-A8N-F=_7XQWO0#&?aVmKRyrf>jun){+PfMLCXyhEnB!vZZsrkMm zp8K9vaXmBV3$UkM?enKiCT{q(-}9_l!L>xA+q=Dz;fl~>z}Nci=mK}oUq}Xaa7HA{ zc2Qs?oxCk$gWSXV{9;BZN`*W!ARzQV%*{0^q-#Ec`YPxrru}^|Ur}jZ-rY~S?(_EC zcFZg|7<9hpU0*;?LcSmV8wkqkOX*SThYuhK`7Oj3T->4&m$^UZ@D3m`1OB{rb211X zP*QT{OYnE}ZH&@o?_Z$s&Tm`UcNQ=)c&A6ewJAt=FN>ePDz-skQ&ZQTqlLe_0;W|7 z>Z21R9%J6okN#}0se;0xKc~MvUh%KU{haIBy8uVkH`6nkzW}DY0V2|aKeklp_4REJ zA;R@7u+vALxYHYj=Vw`$#f1EGKBAW(n;DA6m>09rA63HqC-qJTSNBW@2X zQ{|B;H_5+oSyf_~?|~2qmpIW^ppS2brjn0D)1N*-En9wr0BPndo5223Yr7>32>B+& zj$g$s0cUa6#OnB*L zsbe#aQyDg(kWb>R)14q0UK5}~v1Gp1wVE=!^4s{6p@sIyL~TgXvL{~)ctTbutw7!G z>!W(4yBYH8&xtPdGoqU+8$s&smM?xzuER zrY4yFFmgYcfX!iF>p!fQc~z-;alJ^Sj#epb;20L^1W}!F0nnO&Ecdcj__a#g@F<~l z7#3Z;a$cERf_i&hTkaeYCoV=PmsI%-(dM!Ro;mPsvNti)Eib9$S|=_6?^AN^f2tm) zuiazUGij(gshxY0JM<2qjGWAH56fdv9bVpsaksn$fjaYh)^&s>dloNZyL(F3G$FLDV^(+mH7;N!k?(qS3K zH-kGd*E(4E@|$f97Q!JvoeQx{pP3XCWhi+~>a+$a^!R52L4&qKe zV{JZ`>GVPofsMVV;e7mb8dRJ|6tAk#Y`#ZW)V|Fz*)#)J6b|1%iV)wA?E_DzoyTGC z$XpD&o!ICyIqlNp7-8hH8}z+ijW>(oPBwjypwTlymAXm%-u3@)RsrxH<>iYXu2TWPM4GgZSe)|NHC z#VzQKVhLmAhc-B0By<1fXXyyqlb@=c!OS)uLgvS2^RQPQv7Nz6p`UBueeq z(5rR8`mUhkWf~Y?CbHOFDcSni=4D>@o)@oJ2qF)8$@%IJF^934(=Xncup}KCu?Ojp zw?qnbQF~bkj&}8?j|&jczM4xmHdtJTDwlW?mD$}Sn`wgXLBCIKh}5V5R*eruOdL-K zhs)%mwWZVxR%>c>`7l?dAGzbwZQC4HvU-UHT53LHmRuqb~dwruQ_eAHEh=g_D4 zhof$+i$B8N@KhtKM~;NI+=mvsk(Cgwg0_q~yq)W({c4=~GqZ%`zLZCZxG_@JgnhGh z-OaMQ-0jx>+_cZ~#8T!)$v0NeoW91F91&|05@gS@xGw%d_fWA2?cQ23Wb7n)#GsF6 zzDhk+XOWNBq1xY;+2U!jdEQwmFVEPS$Wp6;Z-C zS$kq4Xq#ua_<7WLJy%&&t*V{ieL206EMDz?`vSFf#lxLliZ@FE!t~ z!x!IrshaOX(Q#g8XQ6O2&Ns2FGmmhPs*)x7#5sefF4dN%PrFI`M? z{U;VC#qL~(c@r&L1gwqL;AmurJKV#^umcwyj}T^nuzL)tkOKeNfXM!HpMYyYN&y?1 zEbnE{cN>Z5v)`jQOvm0@=1H(8(IljIt!=ss5RB zuj^2^JA8PA`nzdzB@|p=#!u-H0vb!6Eb{Mel3!o7Drpe~$DNr6Yl2zsQ|n=a8C5?~ zg}VcpP4;!Ky@#%@Idm9bxsE+ccnhn@Yh)dp*6w~aTuKjK*IFNuuGvxV9XMp@S1J96 zgq{73obe-B^&|2qK1X<08NzVSqz};c@U|QLi2;$Vv;94v%xakv4jGBCjvQXL8zl_$ z4IIdagXzJjR6KBxH|!i~egyjHG`T8CKKPnRxT{9onSXfBC;!7-u%$6ijyRSpejOVH z=R`W(J~+MfodS=l=WTHGqw2}^uJ7)9Yt2=2Oqv5F1;L3Uvbv*DlQcD~`x zOEA7>Qb8x1RswgXx*E|S@d`4|2vdF!gTnF=znvFBOB2t@`Dd-Tsd5yda`)NT?G9Ey zQld1#{l#eJ52ZoVI(g~j=l><77AcuS{h7(g%@SMZ^TowThg*Z7of=eW`Y&az6vVg-7oZ3f!zeZ=xkCioI;F4vMCBY(RO>N~| z{=1C(K9kX;!QEABgnnLfBwO9icMp3qZ6qUBKBHoP(TB0PsawGXR~09j%w$BvN-)i5 zg*L4ek39KME|5;za&CHGL)dg%bWvg;!ijRU96ZNxMSc!mLj(4FkByy{9QChae(5-9 zr3F76F4gR&A+;DMBDPCP0%aGQ#(4o2voV{S4(T=jDvhvoe}{V z_9SnuZ&F}4qsr8stg_p!og+k4YV@_{XDwfPsn&1!zIRqfQ_9eZ#wv3hTtXyUlnEL` zM(f9EQ%A-4isEtn@U!FSomXQB_7(2Z)kLs)SuwPZP?FbnZ{lsWW%JD=!CsX27=zw( z18Q%iY*-t>2N#A;ho1j34g?%8Lg(40C5MchCGuG~+y}x9{n&7&Uc7TIP~T>qvL+d5>3=X$N+qn{m{kDpO&=tc^HlM4aX{~Shi(aTsl;mNH$*BLK-IbR6O`dKU12%^ zLR<||jEk`wr|KDBVwthEve7W7Xoy1e|CBL~6Hd_2J1tqvFjip(R(eS7(GYa>0Jfw& zGlkq;(XFja8gdKAHEwsGvUcwYl1R6>aO3L!qxK7kjzNi-q4d~B$o4UPB{OM{X6Uc` zi~!7+bmwbg$&7|24&o$PL*7rP5EXjpe+0{i-MIV-HhE&UyP^!bjXPXCI&{uF6ngS9 zE}oY1QeDVE#q2lm3|^`QZn(>f66wEd&;FjN@#H}X55J8>#HlTUNOlmB#6ew9=ACSL z96_hv=UVI0tB6gAOjLL-(Q0KLeN*e(JM@svTT8NWRYty2X>MN2$ro)6?T_xTxriPn z*+Uibzcoc72sn3fgXl{gGruB#NU%6Xy#nixsx>(jYyTr>Ul+7NBtM7Hw zd4#>rx^n&TXl#Li>3GzwHUl`RJ6?Ke2gwfs*t{nd%k_1jcV=o-UKKjTM{q_Zgnd)S z=u=wEixi68>DsY>3+w!fMA~5l4$3zGT zyX+}F@#)8E4R((SUXF81^%jp5
  • +ISg5XS(jGV>i@`2(w{j$SS3sol8uZa>t(Oa z=jnJuJ%2rS;QPL1sq~|^EiFW=3EyuWXe@5apycUQx%4$N6{zp|%q|a{iz9if;Zc#$ zERJ+nqT%y1#&@`|tvYEx>7;n!{SH>?e(8DgSsv8@$~>7LKCC!>*@tiWhS)&Qyi!Dq zQX$Bq3jf)X{+!SR*{n}t(IX4LBb_^aZY8wdFft>etW1tJ?&{k>V_P+J9TM`PQMza; zdI8Q=s6FykC#qwqR`x0RIBXwIs>GST0(Fjd29U&UJozR@frHb@pV|Z0QV_|^*F5Z* z%(nw(65hhq_zH)P$Dk*;NnoG$noA==!bw)4J?6bluE0P&$!kQ?nr01Han@Cu0FgK* zs-^zsP?%b>ViYzLOc9cZ2=wDxgX3 z1i)3HrKM9!Arc|zETeED!ae89p@c;pGir&IVTKh zCPm{%a26;w%JSJ#k^~ik(K!jq+`+~6zG0&NrvTSGGy?p@^SBbJoYg+wn%j+K`*p_8Qoht2r{g!bfl*}uytJ%WMG_V$0BinT!Uy^s#UiV#U} z%Hh}u2GvuMTCk5>BCL}`w}9Ck@AdkBtgl%cYDuU^2CbWFX7|*9hiB21{)v0=jvWMeK%g%pivrxS zUz|jkwOqmOS;#(D`>ILGHq2fbSqPd}R=))6*K&g3Ufx9uNB7C0Bt{WYFO?Mget`z= z?YNwCzi9U5M}&wsi0hXtu)!K>PN&3pL5aJz*m9w_EQuHyfd3%oD9>CJ)^@FiC1(4e z!YJ8p(Y~FBi`LsIgQIPiYE zf{!_iCl%$gpv6VN?NvEveOZgLG$P$Gie~*Y<@P9((tx6_m)p2?tS?>O`{cil!nAqa zpF8xFf$dYZ6p&0y(7vkWLYHFtSNm{5tWo;L`qz-qq@e@N#au;Mo@Wl_th*o|=q=l7 zt3M?1IrHTkzk|2u+eu+)g?uchynLVP1mLFxd*vP?s!CZltV{7G)6S7Q->1g74gOq? zO%hfOr59-;XVxC!*$nt4>hq-TRQ2AcU}aZek4w~Lel3$vPTyB6s;7BK0|0!ftG-!g z$ou9uKB*L;2R{L@Pm1bgsUHs-eF2SO%p}il`4Bn90}-VX|jUE?Yp=8>@Wbx8!UevCHnUpikHUxa42Dav~iiktCZ=Q#X|o zi3!|Vq>Uv1DkZG~5F>e3%vzW?bXX-k0X05N2>xwLyq!+CPyzqDU`I=dCbR4F9cCv# z61dhZug61+^?oPHHFdDF%UXB?%Et%>ZCISxRjPoU$G|Jz- zuWY!k*OpeD{hYi29GV@$z9pn4T!ykNwTTL*R!4rd+3egwEr*azO4A@#*dSKdV0KMw zR8n}lqJex%XKKYsrFMv)J*hcep_$tZo;@Na;y)8Ai%@n9|MGxTu(Gzaev%jVUellS zWrl0ZR+b!})^T=e{<(slrui(=(ieG=U*cc6PI%n;-Tw&IJL5Uw)rIu3Xj zy}()iJwpWCfbs9dL{vc1a?eaTR_b_q#_|R(v>0YYxue!ok(+PmP;CNkRsCii3ae6* z&{*fO2~QQ}iJje_eLVDRV+1p>g(4OoY@Rbt9ey>UcD&)F9xop}gF*9WoXxbkD$3Gh zKQe{Rz3#)EIhIcPH&+!7QUi2E_B*?OJpeHy5=(-=3BQkAr&9pNI!F9ETfjtUHU5n(jRM+Ee@r&j_`X% z&8FG~QGOn<&C4|!AHBQ>m!MRG11KLj7zJ%m;wzDf)M^w~%BJ8!Lgph<+EsK50S6%}L78o$+hJbB(~zE%%m z^p2&-rL$*YH2-a`S5Qu!fcEhXt)_-vqrDpKEpdw6APZ1GXkT4U+__^LwE9gp`HHPH z-I1@IG4J*6N;(+t5hjztnY}TN=yLIoS+AFJoaX(wdHhLLe7dNXi8)1`xp>Q=Jv-x? zV|z{EH^8*Qqub09p*Ap3AXw+&t?l2kKjLPYe5p{vH+Y36=C?M*)!A392pyIa0| zK0sbf8@t`>P2J4vJRamHFL~U-+b&|JT6c`S7;SDFoy7gb?{Ikw& z9U+x}r=y56d;U+-O!h`|V!ZP2)0!)GRHPV$f79Qd}y${X5mV<`VfJeiwqq@-Ro!vw6~0u-d6^O5%iER zcos7vlG8Z0LX!<)X=t6@rLN2wzeMN4ACJPc;*xvK^ziQ;-t}`z(;F7{+=wO?79SU# zkF0AMhu^xHV7ET+Uc|J15X z4?$doXV>eYkDtB>fdMCXsYAy&iBFIvb8Y( zof4D9d*pBHks@15{4c7>*U!4>wyeFTk?*QP(CZe3Vu4_r?9sbP3^lzz5?bUn+OTor zr^?>Y1{?_~C7qWp-0UP|1hJ|c;WlyD-N!d zkHHu6{%CH4(&Q-2Hwl`$RyI8(c8s1osH}(D!P)+i%od-$@Jb`XFGFqdi1z8SdzqMcL!n)URBJ@ z>c~GeD|zPw8U);AbXgex(lA;e3(>iROLx;1q@8=E(;Mx*&6AS~U3<)VPutccQlafc zfvkjh0?06FT>mqPHurvFkD8MRyd43~h3%0W3V8!JOZ>DQ5OV2z1AG3^)N{$6Y4$*T zhvmFTi^j$<+p-d$w_ZzJX5SRKBY-_l?~wnzE=F6H z7lG0aX3dOb!E+BYo%VtINpDAb^&z8}DN`?!?32m^5d2E8vk8;$&2+1(r4ZS-aab3< zXuIO!ZP`3+cbXAuYN!FmRh8$F`8wa^*9RiojUUyOIIM6Lb&G!ETVkTKXWeZ#JmlRi z+TOC=nl#-#Hu72p?d1RQbk6jh*K-x%_BQXA_TuBRYWVVhA^%r+0E`b33=;N#j%pkr zAe#RxJiy4+#nQme%*4{j-pbj|`Ts!>aCc|Z-CO%%^1|l}$LN{;PoTIEc23S6OgxQc zw;aBUDkK_#vp@nttW+o?8ck$I;-_& zjh!h80%ZGbovG+cH9Ca~1eAOvGzInc{NNSx(N|S z>L}V_PX2}P9P&NL^&^8aK*PHc|BvM>#QEM4MilTDE%KUs-wTd<687da?7{3Igomrc z1TTAg;qRUyBnKGI0qmH^$Ksb66eQd>bO@0Mm=RL1C1>Q~($olH$lt#bU0w^F#7qdk zdGLyFPC`IHU?}e&K|sHr!Vmca!RbJvlK!y5{q&Py-Sjj=Ri%~iKrBdtXz5tDOw4c< z%s|DdVEu~55&_)7n9T9O&x{=3Qx6UVNb^ZpP>x_gc0xclhviTK zpTESV+S_oOf_D095I$~d!k-pMAf!ri-DHQ_DF58KX)IZ`7rq=4GnFZp^W`Pf^hxNU z6m_z604c2%6!Gywup}il@B=!RnaXg2%1BUPz~2&qP<4Wc#zglN#e{)KqT!!M>@2nH zst-67L{OqpxOwA}S!sd$wf?y)=^)~;#5EM|lvCqssJ4rjk ze@jk)OqnC0e~{1w#r^=Qhy2f}y6@)S7*uPBZyxoR&Rzd2za53|G|->Z_ST0=AQs;7 z-^VMD!M^PKT%J?zIA((Jd|nF)2?^fQgy2};VNy+ylQM84^~#KGbLPCz6G4<7RMly; zT~#(V%I01$SHezvqm()~m_e^BJI@u{B1U_DWxL$#=XT(CZrNXmy!+g=rj5N8;C!rT z#$Mz|alN@`-~w16to^W`HNjvY#Osd)7rk0)-PcXAc3?p7HIOI1tvrZ?cN6F7 zX*%qu*=DlwWGp4zQS}G*Vloutu_bA zz1JUYHG^Ii32?vp1nY-DquCcY;jTF`b23*wIh)3#vbMRgE+##sy#6T>hxoEfI7vv6s)y zMQgHL&W3?KZNn3jV!a!z(eIW^bUiDk-Li`aISgbr9zhqS9YpriaZ;8L)YlUxsV*~v zt|(D^Yz^HPC2kccq|CP*c>}#!$SvE*X~-nPTOU4&VQq}YGhDIIoFLM-<(v0pcFelj zNIn?!k(K^ST@{%ao;nR`B;`Gsm7&5`xs3iy632J}#N3vw+xCfFL8o=dE+u6PV19?C z8<*8&bS7R>#51dd1EU&Ksy24$6GmdMhYIL1YAHA~G1%15MdY9s9I)DsTDL1}NhMYU z=$APZm){hL-A}c)B8=P~jXa&7dIXUxkxi=Q!>D&cmU$H|i^svC<5M;_s#WRqlFC%_ zVRCRU)Tc7y3cii?17P=mX*8!OYjD+h-9{$>An^naImY%*3W&tvnBX00A*q}T(Cs5m zlfo@2A1#tX|Hi{R9`izBa;-%gIR}tvl+JryNqe4I2x-m~hs&^1M2Im62Q@!%iqkEi z*zbyq93%;&{Et*#7sr&n70RiQDIIWHK72F@jt8mN@GqPbPw=1)U;^nia3dh>I`FNc z!><=Qs+hXzh7(lF@c~<&vD*c^!_Sv26VWws;td#0TnP?rAsc@k-BnD4_6zwsr7QMK ze#qc`j1}K-M^oM+OA1@H{E>3cc_#u}dozsX++Bk$Y*!}nLpzYGa7|;%A~k1sTC2X^ zk7HdD^$zq8`50PnkK8w)*F;u+f@j+mBNWKBruq$AR>!>hOuc7(KpFNY zd?{b);!Sgox=@L9v4d1jwrt2Jm57Y2twjeP zzQP^1!YzJ^pa0#k49|}=i_3=1ny_d(mJVFhs>WOPzL%tUwR4S)lBv?-hc`1AUiR^M zmG%1*zTh&hy%`QqT_|dJYrAU%RBig3h@@W3LdiFJT1ZXA3E!kw4}Kega}xDlAdcrI zp7X`z)}KVEf_Wc?`;?vyxf=H&t(B`hhox`xnryp|9ck04Wxa5-5EseHuvMhJPk5Ys zaXPl3{;TLF8RJV<$fc@Mva>y4cO|3JNPv^}hW@qQNf2;}Za(!=2h?R~>@3nXnN{~C8O{byrCwIPQsPHD~U?k0UjUHt0 z<*KekahEjs4HlwWu0Z)rSLZAHS@vkvBMr*_mNAT0QkH&As@(F-FV?d1l&Wihj2+uR zibfw(7gxVP(ze3~otVCiHB3moIWgDQNw609soi{+==$u6NDRQSfy4Uwhv!&y6SDSE zjfrVsz>%s3wN8Skr)rZZyA>sGQY$FT3=h}_@h>H}@&23DGS1__n3RRLO!`1bSzB19 zOKdhNd@4D@nTJa?FZg*dhq`)9&rs}Quy-nE{t2rVauPHBljfP2tFBzxK2YNr9%`H|34Kte1oDrBpR%oNNCEHR5){aS_{r#1g@4Jfnv)Z6vX2jr58t-b{ zhQQN?^0+nI&e&9}c(C*(8Ib!8+f@iov87Px>iEX7tzb2;H@r`z>Lv-1MAiMeL;Fj_r_Ejws&YEA91B(KSpmc}u&Iw3-4m;mzB&_;e zI1kYd+9q| z`IP{b--Sk8mM5Dz54#0E-xZ6Va>Jwcx>y)}++qk3(G8}X!3SZgCC%D%ePBM;V9~Pq zyGo5_6Hm(0Hac-RqN2f_1!4ZLV4pwegdQ?4A+lSuf=FK~Z)x^)MSQf$_S6f*IFj{a z1rICB4h`!j%DxYS27qNWgixAbq6;;}5oT$BJ=a%nLlYKu4E)ph4w((Na%PYjHm|>OUi_;-lN#@Jn;r zf$$U!Jr<~&eX9|Bu9BClIw%?@hG(g9ZmHJD{rxSf%)!ymd6ucKh z8_Ds@4ni5k5g`$gmuvIW4A$1!6>tLnISHz~vuIC4Uvh(G8I9Nyr?pJM@p#!(HY$1~ zgo6{xr&eOc?kT1A%PJsrimqI=(?)nq;%gG3&C2%Zg@ssOw#lWStB#h&4}ElN9fI<; zv5PJ^=(-2C?|e_rbKq6By&7n)zk~Q@1zpT%T>;$5!1SF{uWK)kLg629rFvS>l8T!E z%sHWi`~gTrn)WpO<`H`Jt^`@}UE*D~2kflxWYHk=Vb+)8P=JBm%$IB@$sl_EziDRl z8|_F#d=DGX@l4%U&&HjvA}INF-PpqnMG&=XzpjPM$2{I26zL0y)XH5M$HS`CWL5}N z#`~)=b))X7h1`8ePPa)^-^Xw9@Nbg|ohl*Z8XO^4)K?BC45^husbEE#95TV}r-}OT zcjA0uxHByFxOg5X&1>h06GDPJDedb6n2zqE&w6T%H=>3c5Gqw#BzMm;PamXbH*C=S3|{N~uHsGAEi!8n zqvlmg)PoC&jc9H^tKatIjxlT0`MHaZj(L-~H~t5LAf5=_th`~|X4@257hmv_N-tx~a4V$I0UzUK5sXu6109E;6U$@*#4wGM_ z|MH^-Oq?Cde_!bl5GoZQNZ}BhJn&*W;1Aj?t*3~K;ZKS;cmu}{Y6h#BKAK)`|`AL>< zB{_@E7;)x^rNJWh8W6j;ryCWK-x(=ZewiDIFbMM;lesbc%xL)%~dNE#duS%El$j=4#)x@ zkYB434nQ6cFcQ7#5Sv-rcUuEn@lLhkp!#4gk|#<6-t7N9`EdDe(@CM~u+@`&^6FE7 zZxiZ*9pY;ivW*y+^^d*<6$~cbEK)M>Z-O8RJnVq?WULvAI`X*T{8sckNXR66qN!+h zGae9bWwmx=xb~(RX^2`bD0^(-Lhc71Q^cX`?TSro>wfmuE@s>;x!VR9{3O@gj*&Zt zC_{>j-}KtiJV#yh-ltFPGq@d*OM^wh$)4;un_R~u;Tk@rQz~gP-Ubc6r=c(Tg*l-r8DHc4)%$X0%Y)3x^q1uI;gktU98eXJ*(yKoG z^OF-h_u-nG3rdH{{(!uU@%W8M`N+YFfj~DarggBil5Jh!r0EQ`Y&(s(rgr#UJLCVx zzl^{BNTxE4NidA10He0;be-(xv1PVN-89iny%pJ zXMz}9s9IwN`y&e~D`AGcvV-EF05-!T?t3IbJs~lK60l`Bd$k*+1*O2;SL1l8m31XcboG4y~y z?Zk2Apv0b&+_)~Bh8$P!Qt}QvjgM7aSH2|?gg7wDq1(Es1U1I+3r+|ocZ+cq6a-mK zy$K=y%Ggf=`JaX~W-Ot-*H;9YlQtS)qUY#d@ zu`5gc1C{>rk|Qy!pZ*&f1E;@Zj)Jybz4Td;S?EG3)8zf@Mgm~@*Zcq&+bFVevbs)e zzhoGZmi{r?fN>wI7~{G42+Uql!1|B#)h_bjOS8~E@Has5L*r|2?sUqIJF0k>P`;hl z+6CSL>sc+5e?lw`=w#)3!8YDIgdACp!?tjJq~Nur_ky%GDCX%TDg$6Nn0uZe;pOG( zdnSub>BS!;8+Tc9hx@lXg}z!pG^V_NGY~=Sq;$YiR@PtN`n* z0{?(VIr_@IdA%{NdoNu~rZY>-F>b8(4QY(@#hQ(GetE>?tNL|=>5-jq-oYjYZ2^43 zx<=%KQouKxz1`UD7_}L(Ae>+|sOkZSYytUsRP#Ti1wG>Pf(>kug8FAO?q$h*CG42X zDRW)g{1oSB1B?w3iZa0OI6gLeroZ*kI7!& zOE2*2dtWN|dfHDo+@#U*fqLFNz;KGS`f|Y3%@yAL=cWDw{oi4Wgw~D@(0@i`jsF_F zWdCQ_Vq<7&tM6!PX!8G8HJhs_>$cenQ4k_P1QSU>l055`Aa^oLF^9T?iK|p{YiR|-uci-^Z*XF+Vf@C8Ppo={ZeSB_ob$NCU=s@JYiUisL z45TfuEUmy_US4=}fem>(#KzY8zUG4PW5i-yM}T`j0Fvn0n)o;22P`j5B?(-J-@n+u zfRw7Z(~}4C{$kB8g$RK1OO{@DmTfAztJ`~KAe znz|3@1RTHmB`y7=ed@zv4y>(BrQzJ&ijr^)MCiG*8=T}}hLokz4{Y(Kf69Etkq)fk zmcxmWyd!Qy;(^HXH}=u^hwSh6>bV0YSlnGlJrUGr-+VbAUS1gerExoWd3Z%QnNz#d z!^7ue<--sS3@zmBLyvhJZU+fN{DI_mivbLBA=&$m_w|;69QE+<2Jm)zdMy47we*Bh zFC^H*q6^pudK~@E!17Ps&rve|YOhh&{0d;^pZKp=VA(qM!@4E>W#kgzN$DQ=DjAW)K^fy9!A zXG8)I7?C_*K{Tk&h7o}c6q%aHUzu0Ja%95#hh^r@iP?>ni$O_?EExkklv&sy0kH}m z5fX1yf>CdVL8F){ghOZts95ixzf4F_91qF_^ng%&=z7HLoUpzR%DoXld`bxk#e)A9^ zM;Dh8mj!8CP6%E&zn>VwE}0Fg2DoS`;JYbuRgh@Fsh^4$s++bCLQx~wAV6zgD9QpO z5eKvkSQrq?0EU7gSq?AOp90|BDj!ZzqC$9>HFzJQA4x+9NLm8ig=Aa?H=@6aST?*r zQIqPvUmEbMjCh0yvmOhhI=PuAJGUIboG`KqSrEa62&h6%q#)%$f+1NCLIK?fI$>Ri zr4<1v6ewVW0SZ9j5+gpD3#@<;&OAveIk1V**f82Y6oLa8W0C;GeA%CIVn`Dc1%RWR z8Nd)zL4uHjn&c(f8G|_yPMCbg9|1h45t6%X$X<#(`N7XsFg(kEwfOIGxUk3p3jp?= znV=ic?zlqk6aO~e+%Wxn-x`aIph@7JlNsC@0|Fn^oDCWn6j&Z1RS+sle2H=1P@=&e zjz;9N8Q5PfJ`_MC8;}2+r~l%k3CurFTnvC!5|~wzyIeYm;Llp{GdWI!1|lj*A-o9T zFucztdno{*Wg*BPD%~!9V7-6d>DQi(Im{je!jH;bnFxX4umVLaLdc&e2oTaaiAIwr z@pcdCzF30@4Euv0J+MDe?oHBjGxSe#nNo6Gg$8(j;%~1|<2l@bf?5q6B!H-1gW;KH zzDI$L7Y1Vz&KU(f{~$iBNtzPCULg(0vRt}gI(YvYt77>OuB<0e%*Zg?q8f$rUcUf= z9Wk(ofWcOfgB%#6DoDVHFdSy>>=6QVn2`rCUZzzh5v%>CTcJu7cVR0Tk8PnE=+m=hq9IRmx-<1c<= z?pn@tbV&n10ib=>dLDqmoUI$+9Uwku$BpL?QT%@TO+Q0~`rM9p7k~l~BD>}(XCj~3 z@3U#W+5GLI0)`*>*qZ)7L(a)Y_OUg8u{opUoU@-euzKH8_iY)(WC*;(yhx;SQjE&T zqP4ReA1kVjI&{R{-E6eL1lyuuaC*HYTl%;fU_-dEdwaTP4jJ-L7fH2y|OcwGwaANhPFk^ZCs2f(>H0<4FD?0b!T z@pg^=x(P&aesp(oMCiw*By%l!yhXlwaeN?eZ`=P?-M_dyyAJ=tLj3qZMec8F`_20; zu^j3B_{r7v*%5C2n3FID7FM2EaMxF0kDvQ8CsvT}Ztp|@INXRhKD)ku;NHC`Pyjwe z{EgTVGMdYy%cm=1m*-Z3>|_4RU>7WLAmIXwMkkKe{~m=vitz8#W8qi=>7XVqPzZJMXY|T;)>A{2W()dP4o%0p^+;8}} zEP1wG^u&j&4}Dn1_|L_vq^>r%J3ZX$cd>ifm@pSyg}MEtpRA1gZjz6+i-HKgZO zCp|rf%6mvdet{DHLM3hoGfDg|;?t~s><0K2J}!RTx_laK?|Nq8<_E3#M2iMW$u2MF z(eB2h4a1S?72Ydw=qWZ(qStz4j|7P# z^JJz}r#DSE?+divo+Mw+JWNH6 zxV(>OE3{E9)Mr?dnpx+|t(rGgwDVi(CK&1#7zPqM>`)xqBWb17^13mt>>`i2XG7#p zQ;L8|KX?oA7PCQ64sluMo%lszi&IkkwCB9p(Ylyn_?Y>r;d-qB({*CVcX2ywA?wN)V+ z_FSr3FSdpc?p|@UL`^eEIs0zdBRyIUm2plY=8o*pJ8hUv~nct8tO~WUFD) z^{x3OWG@bW$ZMNHz5nH&b8a#N8>oe0v5J| zuBq4Q{Ca8^+_&5D41F(vlH`tGoi?x^ow*O{?ic2q+6kQo8N}-Csn`bPQ*LaqvB6du-Z`^Uw8^xtK2l8hsk9DU}q+t|(i>a3mS}O6 zO07^FHDAajR?>hyXcDzduUCSze#>igq$Cvvq59|r#%&*xXK;7m8Ot6SNhgfoQ(PD7 zJ{P+e7_6&^1!(jnAzq!j{g$s#^Qax3RgW}8m(eXFBH#~;1Yf3@q}b3WO{LwFla9^o z>q6xzC`;Pud*AnueE*P8{gyokMXJq`If8GS(kmJfELG=gxecUHXjARFyva`QtqI-&_#G_~+xbtvhyxb}^ zepWyx#X58+tT%cokW4Pe$}fi@st>wgKRGtV8F`PlA5uvnNBRWN^(7GTyZ1Qw{eTu) z!;X3Vx4o|>m+ zh+HBwZ3EE9*ktu8AzhfW^Uz+1MiUeQC}s4$bZfXHJBS^Hm|Jb0qcsKdse2Dx)n>=> zw#sb7c4+5o8@ALd_&i(XDXsJ9AoYDo88s>KypB?yIl{ylUcA(<+YW9pgfL`mHa8EaL-; z3tI&>{?&HBKE?+}ODlymTOW#e7*$IL{;3RaP6^*ZrL=(?#X35Pha{sQQ@@bMAmu7* zK?>vhx~})?Mx14T1jsCX1+#?>NopHUeAdv3Zw*m1^bBxFhLQTyn?mUsD$NntcdmG?<~AXzZb zZnT&G9o+z%(t$vO=UJKba`F_9(ov)pPxui0UXq$zw=&Hg3jG<6*~l4EQyp~UcXxS& zL`9AS1(<#mXvh7F{Lf_AGwTu78IhZ4_F3drKSwE#Ut|>)=z*N7$UYu@1K?)MJ zTQ0NE<7**KzO(yP(37+7>ZBQM=t1RDXw=JjPAz?giox2uYPaK5m#=pOX`)b^3EDZa z2y1PxiByO-kiJiWnLqbAMkixQm*}kkLg^;+W8#{?0%kWVEq17`sRQ0?uY{OettF^37$N*=_T4>p{Dn4 zHOAN_hpTzD$>IPr?Zl`ReX(O)$adr*1tlYEvs}?VYhl&MsO*H9UaZ` zJD_`?NoT~>h>r6nrARSWB2kjpxTbo4J;dRL{H=_?R%0Y~r>(HY)ikL+t_o}+L$PXg zt{DP09%|@d%R%*3L4Mfv6JLZ%ec5GbAH!1bWNLz-~dp^aI z`3A_?EB-r{xt1L5;=&~4L=wuPiU*Rvh62Zlp!mtjG97PI-47)nrc9itA2HIiDme-3 z(68|B?AL@)_+G((OO?*tRngN2K!9Jp@)K4K3EwBZ#HV@xqUV9a?-*-haS8J@dtYh? z0eDySG*RT*|F>R3)-2*vwBeoPW+idu68-njbfM9_p&^8h?A}dOPZ-Iqam>1#1^vFhv7Z1B;(&mu+pCw5o8= zNx@+knZC>X;;MXLBV@qxse-5UjK;e-uN5Kh?h6Gv0!lW+X!U|3V zg*BrZOb`~u&ZQcBWOD`_Hl@1HK!_!{wuc@^{NORCIw#1eRH>ro)Z?5__d-odrmxOY zwarYo)vU)(T>l59>v{4$vaG;*uJl@v?+ROUls$ZZu~szi)Q%Y6q^OBCeGLl^*`sJ` zS|b}#@NgiAIbj;uO$@meejo8-d7RT3)bUv!%cl~*CM4Ee`b+D-C!`u#~eub>0@JT4JT(W(Hd-dD%` z1t7FrO8l5OUI=~)&{kHhs(i3kzVao3>NG96vLthow)7eE9z!{_Z4po@3|<2JM5Z9D z#}S?$A(PT!*T~ETJrdN2v_3kkQSNcE>4HyWuNoD8+a!hihm>Uzd4k9)p=q~9pg{wi05TWyK4fEd&lmWIcAH2MTgbZ z%bPgW$?U`F?1=WKEPwFg4H4v|4ya8GSP5-6kg7v=_mWg^Ya5cU+EdbO=`UW#{qpO- zYCl4vYthWSUk$Ocj{#8O zF30AWn*5R$_Z%CMpe+x z5KuJnW)iEV4Z8}!{r#y_Tz-u}er$u)H03@z^u29uxjk`E4d2!PiltpNtWUOz9G$;o zbjF(}e5|?9!}Ik}ednw1MD-{)cjhc-8Dr<(tl#jK&rqYD-N6q!W9pI1|4N^12qSCF zPhklmd=KEB@&SWq7X#88nGaD^i3>l|yK@FjxmhlCiBX$U>h7Bi33FG4f9aXI%gZ8T z&HNgTegr;1%$>+)N83xOnY(Icjx-5AmIZrq$3psS7PLO9SveoSk{5Y`HuzbGa&4;sB ztjbl|`tGPhVKH`2ki9!pv!=wkW$ui}4dt63WhVuO*Kps02ZH|sO7bgVMlTe+?APuo zX4XB*#woA%M_OLifFwbr!}3dmA`6cqe<4F9L6e@k;P8I1UUZt(mycMhmHD+f6>x)+ zq^2tx)0J`BscaysG$e_a!=*qjmktZRW6A9&bT)w-TKf88ceMiN{ei=$ z$_@d0iB5QMFbCA|VmkbgG~w2m6g9MnWoDMNoB&gjsYTb*o5p@G0FcSW$^?aLwHhUAgb`?_;pACE%RnfYp=z-A8JX=U?r; zSn!_eMSdEsHu|M4FkIL zI^>ehHbNIhmVNp^gZ@A+dkBpVT_5+W#TeW-=qsCXdf7oa4>>=r=F~jxFFCSGnG&8n zmhDX_@7JrfYK23kOOsU%+g+WM4CR0ffqCkn9)+oqA>GIQ*_tR~uBDnwFZLERKiEWa zR+*w8_9}Gvvg14|Xj0z?;d3Vi{A8CsEM_L(8D~;H?{`d9qq?<$w)~qhnJOA5>k?3< zt`bf~r!A4w-7%KeIL`9Tw(B`k%HUI%(0?4ggC_t+CT9+MZw`72?Be$4&@5L@=hLF9 zDPiq&#&&K;>Y1X}%bZD)mY({t>9*zBJWc3ys%klf88S4I%8TJAxoWpJRLpWY&2qWT zy=9jF$SK{=T_CmQM~xAa^Op&h+>#&_SF5UK z6q4ra8u&YxRq8!K9UL~^QsaUrIgwwJ2RZ1qEagF7d6;qC(YX3biyIMAlU#?tNUj`{ zy76>8?~4!ObyAu7={@aQw`b4Xw|c14qXyQIc?M{OKKT2T;9(%^q?7y4Im z>=-p&+k7{U+R=|iM^)fwgSE7`F>7!M-_IA6JRqeYiUa*pQ^*8GZf``yo3-FD|2{V; zdETlfHCy$sYXQ$scdriGMSXt634=Qbp=;;Owo-p+N*`A#$0#So>N=ozi%Q}n4ij>3 z55;!0r$R%;bnN&y2;v^6F!m{{xbniLXKiv+-Xz2y!iac;~e zc|fSD7ctg`D*TwAx+WQ9h3-k{&6BO{tWF-EaL1OPix?WdaUh^Q`NX}uyIq--lb<4K zWwXLnsJMNV6$?rGLM~z+#iip#*e!3~Bnu8BLyKJlSv8#1*JajiS~^C84Pz-&9O0UA15vfG zS`NShL5G!qHfdl(0seUO! zL$fACm89wt8IPA(`SA`q;Qt$g&hUJe_L}QQ5sqLpaZI~r+P`IT$4}a+*$(o69p$=T&jK_Y`6Yt^7HV>=4;>GxK&sEn%`a8by(f*4(LlfKlgz+XH~;l{czU(XAUAzvETaTFeOD6nH+5#CcF};IJA2WImteO# z-?wz-%Z#2?CiYj#%OJ_wGxKl#h6r?{iB{z<&o@roxHP;F2`ut+xq4M zszw*>-Br=havDDK2PM%l5g)T zWyyScoVUnT8sRm@XWN9wR)uihsOG1^4Is|Mn{_kL+G*Z>*e^8iB)9N7I_G2zRd2K2 z%SF%gnR7f}r6=e7Xng`GIbo*a%nl#EoS`1{sO9sfB6u?-s7)3Ro-e*b%70H2^Cw#H^DlDuSkx+in92w za&(MAI0Ux-rO7{*?0m`}Aqe0lI|SM+mzB%~w-uGlMF?CKuU4_K^&1~Ij%&EqJHzjv zU5*=zK_+j%QxVD0fY|cwF4)m4+uN_wcMyh%|CZ?o)_qlc%XMnuN!uV~z7@&7_*?CJ zX$sj5(>cgcecQ4I>uV6jc#R7m@lOG1z)kB=l?OwUKT$gn;Kzo9>DbWB;Z4c`6j(-} zVd6nJe-t)2933~dd~|G#{R`~N87*Z!g#q9-gcx)`Fz`D9FHFur=J zzqnQzF|Y=VQWAx$MI6(wGaMU+se6iIy7B=Y3z&c1x~`ucM9ax$*?-Z<}^ zYMpl1I_!$fZAsw+%3G0LT4Y)V1Azz;K8YYe4u>!BFp#bQbW18z~=@R3jv zu}BM6X#hkPn}um35F z%142{J=nt*B}x>)Z1q3u`Q{ojKv56zGrBAMkU22Lpc{Sz9(kW^u+7xK@EA1@X_B8`qfYPJ~>C{zk6_p=`84LWz3 zhR0<2vc^=J{KMe4E!_sCP&VM)Xw)x2A@E+=72bsSi1ka?WC@`_03P#tL?p2 zsk?EFpT8X#@Y`8mb@&PUiKVPTVL|)ZQl7ObzG(z{;`gY(0RZ_7@r?K0A?`;L1Q+-( zZ6~=D2jnhhG}}_`UrIa1+=q&MrVseD>_-3WJ9q!H{^nl~`33*f_aypHeT?U8m``@A zM?!Tb*Y#Ji*$O*#CmSE+-QQ4<6G5=nuYlj`H(ySI-=|P-MzFx*U+S;)Hwsnu-7$9# zDgllGgM}gWx%M*$dH5~<^rlz{{}S~J9fN~{0+22S>1zJnV-jvp9+tHJS0>01k~^Bw zw+QhHw6fv)-GlPs#PFAV&kr4XPZr|w*$Eb3DC7nT<`Ht29lgV6fbi`Sll1W?JV7}g z&nv2H@A$~XftlJT4+l~R8%qz;I0Z0Gg>wAXr}E$N3Kvjxz9zz;02A#$FTA+#WZ=mZ z2qUc@nzl!vh>gt&4?x(Byh0LV2c=Rcx*)FEFkf65Mh#xN0?g*y{apzJ_O*XXj1_ z{xk3`HO>-0jL_Z2rYI+ zJpYOFS@`+<$>4)JzM9GxC=3t0ByN9MwBcYuksT9@I}j2uxB&?vhtVz;WMzwkGAk&s zM8`Qm3g3RLBV{=H%#A!jRumRJTc0Uh#GpKlLB14AMcC)8O4LBWeNo{oMD z|&_D#3sV8z4!@$N-Y*KZdkzD8m7b0#_0SCLId!0{dkxnc~I-Z%bA zY2$E=0AN{!5XAaIYaE$&1Jq&;0i-=LAb~-HlK4Xl5OReemEi`Ac&N;9QA5aQ_e^vx z7Sxaea)KN|U`qiALkwgxJXDwsI=C{vFg!Rh=xl!cz`YxVA8~7 zp~(S+Ln;Z*d4i4`FvAE7oZRqMfUlIHz#k(Tfd$CTXAlf<AA!LL`0vmP;Z~mI_$oz0e0~3k{ z0R@@zIS@7$1~o7c9)T{v>|{*^jCdeqs8}Vz%D|k;zb#FNVyK@#C4$Wc6JW+q^ zCBwd6KDhgUQ9fB9@KgZdKQm-tzzR?R2mpx$fDo&IhBjc3SSnX+=&)t7a3Cid3(zbJ zDlkx%+P<)`hrCZn0BbEX5&t5P`)1YnPYV~8#rQ0L;Y)*fPla~4bJTRqP!-)1g!nMEB&soYyQGM8A3Y zo6Y(C(-7B^$j$>Apq3z=mLSl-PKOZ;?A<7f5HSKr@nX$Bm^MjMAn{WuQ0yC!#+|&j zZDWjZmV!t5pbT4KEWo9w3hkHycrpwe;Nb>xPwTZspfz2o1odbH$th5aNb@_7@H>hG z<)kr}`RWXt3WWQd7BQP}2I9~LZMgkdAoT%*HI_a_;7MR03j&)$2W(q6+pB&hgh0TgS;cS%wutxZ7sNjUb-}J~^v8l%eIgl`!z8J^QxtI1|eFd^)5iv5S!LR>^I3_5Z0$v;6baDdN%*l{ff zas)(t1hmaji;?yI=h}cj4;s@%egNqQBNref0YsPSzXLZ$h5-#E=e0pE-0$hfnhFkb zLN<86sn^&v83A@R_D>Bf4K&=~fJkkwv056k-&z^~4Q2*v&{d76^XH)R3kSxd*VsH7 zG5wM}X#I%>C@BXy^3H*pkw=20Tvt&($?S1 zfF!+OR_Fk)e->ulqmqEvKWA*u70>T_|68FQouL^31?c4s2<7q9%}9!{#{wk~p|y$oHRJ z-4T$ddERO zY_~Ph^?(X|K~F>BK7hZ}l0SDr^FhB{7X6@t`+vpvz^sGGaR>}(up&@k65t_xVDth~ zK&6BC9aj`ySoEO9lCU4XL&UFygyshX$Yf87X1-|%*e1B5&3U~-Sm2-m_GTEG1_1+s zbJt$W!S^++UMIUZ{kwf@fpxdlZ-LkA^~Kddfqd@vLcfc*-;kkhV_|LS>;GhhiGCXr zKP73u()3SjSa0aD-?Lh%;hSdT*aG%k=+RWQdMpxk&io;H^smZ$F(Ez|MM4NPthPBZl)DJHZI z4Kez5eO7E&c-0YV5B}*O9*d7(03fi#4&-pcl#W`gtzCGKFgZ}4M2q*N76@`i?OgVRgv7iEZQNsyfJHz z+`W_BR_C#K>#=%{VdyMgiZ%5NRPSs&f~7kzB~O95@ ztpzIb9eG;-h0@>^_-X-+a5iRo^iU`E2_#=k5O-rF%Dr2OLN-gO_XMuO=p1yJ5%3 z>@GKZv~(%X?x3&6*9>Y;tS z&xwYiS~l2HBS4NqGo z@1S$%xyN+qD^{r9gDlW;h6wXi!aK8qAf-=p5YJ^>{1CdwiQ84^<9|BIGN9rNxhbLc8XBZuDQvl5Tsn@IJOeceJrL~ZTl6l?BDd>k>>md%wT zP6BJyLM)rEURMNj+-8zuyH|2M?w-PoQD?N? z!4kx%d(!^lxbWMW?(`%mvWIu_P;gzFzdq{p%j64N|BZjeQP54F~qX+HFs|3nO%}dZfOLQA;NkEneKRdld0haZK!i6-B{0{YqGC zFwtpMhVz?yaGj64JG2{|v8AVu>)yL zgc`@+$JTCRv!$kAN`o%1WQ8d;RSAr5IM<%f&DjM7YTZBpb!uj(7Y9tZ99Cy}nFhGeDsf zL$ee)9zAtftreqtFQuc0BVECF|5I_UHKMu8<5v8}fkmD1D{^mtFrEo9$u$E;r}=&r zCYO+!Qw^Y)jqE){cS48c*Mbl$j<~MthL7TdLe;s=}t;5U+yz=)*%WW(qC47rw1bH2UNUJ45y{+YFobyUMrD#ZVf&aM5Uq4}ls zKCI2J>9KnHsjG)!E`S;0S{aAKkrR70f5>XZC_yByPk~4IBW(P6=prgXUO5`8FOHf$ z00+^0Lov_T#gq0!k$EAa1j#isJ7jv5=0_bT4Lz<7UJ9+VWSlE_Pbqx23}) zK@=$$oRQBQYf!T!EmONzPoncB=2kSCy|42Nt@=%gw@*A zW|mVoe=-^cwKL*1GPyEeI;aVGB5 zg?JwiOI}qDuz%14c#V8D^*0o_SyZ?TDghc zzL<_+wx4$Cqi!5JUwxg{D$3#5C-y#x6s_acyx@>yc#kzJSwEk67P&TZ{XYsr# zd8voCkmFL}a(k`2f&B)ie@p3|US!d5n$P$Xiy(r+)&{t1VwXRq3pcaqZsl6bc}P27 zvYRh}&fz_4nd8htbMm2MA2U)i?Uri$((D|pCWgxbkImuHL|Ny*%gjbu)1l*z5oi1= zce3C3^}pYub1n0X)u1@2JuCUhP?@ksf$n-en^keO+()>Q_|Ui(YE=%G@%spnnvg1d zz3`G}z_Cso4^CFr-V!1Rt7f`~#&Cj0wiip^d1WMyj;h`j$~1Bu-esG^)QC>YZG9k2 z$u+sK;Y{*nX6SWUs5_i+k8tOMY_G>li~H0G#$=- zKjg+qfpk0ohs~rX=i>>|Mzzr%$pxH-jimq)8ZX{?CYI$L zH=PjKnul;=>iSugP{g}+5_Xetv-!Zza?(3^ogY@HY*BQLJEidd+tXalLFmih`*~d8 zx|@2YE#KgVWKWykzTlm~f!&>qQ@$|rp#QXQY|N~H`XJ|yBFti*&gG${mLp-tU}DC% zL9I>a_Qwr5%}9mp8|j(tVhEhO(l8_>8&-Cw|1Az1aq&pA;iE-!zx*OwYt*eW%%of< zu&j;G`@vc~y8pCj%kjiYcxK-h}dVaCEa^Uqg?ag;M>DZVwvTEz$bT&^Qy%Fp3dzM~ZO6YS zDIi5x6b~&mtaJhs18>%e#&o}eVq765*Se0^AG?Vr4YQ`H4i34gX?5q0?rk6q8PC3L zYWZ-O{Ft%--T|hH1Q%*i><(`m0!F7^<MoN+#Fm-dOtk>fZt`h<{WJigE>G$bIPlO`X88(Hx>eE;C8Qe;d;ia;Vcy|aNGF-+l zF#Y6M(Jm}7l7?__F4_rS$&L?P-qBt6F*%q3pK%?!r~I+fAwD7=da7p#=+!FtlJaIg zyF+M&IbB0X};8>C(<&V&CTq{Ynl@lV`lGxf8vix}Evj)Se{!@r{?tYlZit@J&0)jZY?}+4RA1Q zMIolI%`s+ii7jkfoQW{yAQjlcoG6v1V~eDn8UZ}}c?+iV z>B<>+)*Z^MwCrw^pz-wY{SQUyG=T%lvvmH5)%T8~I&Hk?U~9iN3~0mi7;V*)MozHV znsfDa_d5lHw2f`WU!jDRWf&F`@iy#(+>po*3N;JIYlNQxW^FXZ(IRREo zi*?QB9@O`>gN{;o73`KZ%@dUnrGJW_UF=OK5y=!-OiyB_>Z9EH z6MAhgVcNUdpA;{F|G}@n%ygue-c2yzFtA>`sbHRI37=;0KG1YTaecjabe@}z+&$2X zjl^rpcUlJSn5>!Zpypz17(fp!YMg5+-r@eMC^a{gG0QZuM6hYpLNQs<8B&WE3r>#! z=NVVz+4sm0|IJXI?9jJ3QGDQHSt+K36!#85MUyEoxlDkj&UH$8vZTc2K5CiLEHAJg z*=aWdrHc5mofqR_BUzt8l_GlP0oj{^2o7A1VbQRHoBQ&Zl)OXaj-aT3RFDu7u>#2|bt_^#!AB$pYi^HT9G>XpCAT9sAO`;_a@2c3Q?qOoRI}1#_23>ydwwvv7 z<^Oop8!H0KQQ12k2QL$?-FO7`NbXC9z+q;ASMPENYN@S%DsO+%67i6Wmmgueik}Tw zs|^`0q_6v->l+(~#kan$P?=U@PRSq4p2S~9Dc?D!|LwO!*_qj+rIMwC;bKQ1!PTJ9 z;qG#ky4J)YVj|t$_;ScT-mUoz)6X_nA~oK^j+U3Z%%ya~laeJ6r)MvD^Kp3P?>Vk} zZ&xUw`v=@$wDG0p+7U5d)U^Ho_&SFuL7*gyrfu7{?MmCWZQHhOv(mP0+qOM5=gg)T z(~G~4?T@(czNaUg()Q1SDe@EX!;KT&7)r_Zw({;&4<$e&cVa`|`5OwvE+cQA-0~_$ z(sG6jC6|}*GhCk{iAx7r#JC7OoPT*f`;&h3yAuc&4Tssygm&HR+2O(!!BKW1%aHC@ zwg|Q~+$egJU@CoVFQDDwW;-sIh-VfDIuuHiILT8SAtr7`M=Y|3&7Kd=MA{MfI=)N0 z_(|1~M`jW|__?W>$V+b=ec_%b#r^Fv?FchK^m0=quU7AvURB1kZV!C#CGl3BZm&T| zgC5r!5kV$u@z2v}a9CzI@){1#p*o_Yjp z5;XlzN(_LR`Ks3QoHN`MEJ@};D;AQhcFS1qyoB`#7Z~q*bYSby{YQE#)c4m*@)jrt z6cgd~52m6$(MGrO?iniz-tdplea5^!P6=KFtIcc8i+e%J;33Yo91Rb&!>#nbx7~U7 zp;Du$e;BpeFG{Aj8c?NEc6~WBg(04`10;122W5r@@o9t>=_6_RTFyr<|H8RLqWo@I z-RVfy+-)98NYfga5A(4+roT@w4HOx*g2IKjI51B~lvHf7Mfr@_KKt-1!0mYYT2u2e zeh!!XWO>=)?}`T-qf%H}-pi8C(1ekR$>x6)Bqz`4EiPXF!C<}Yb8yE8KSaD|9Uh((_`*jyCUo2h%ve#JDf`IMh zenJ|+ydoo+<*nNh9ek>6DHo!%BFABKat+eBV!zy+bp2ufr)B>N5GcVwaa*}qJ>vF? zNv(4;=Ie^9YIlAx)js$*Lp(k%=QUrvn>JXDh$1gh!F(zXsd~2I{_+1#;$hG_IO&ICL{M1`DA~guM=Lo8983=IEz0(=;v{c?s3=LqC;7u z+2LDBxMh1ScwD6VG$Iy@K5N@YuY)ho+6vo?<0I>0IiCM38MIN6Q1pJhds+8g?uY71 z{6zP%lOlEg4n8UdMFHO!jIo?up@tTvlQ)CsnZCvCM#Lch^$>IXDbxykBlxMPGK+p6 zVs`jqElc84FPlMwy0y&b0gul7s}Xa^Yq!EQd1%MZb@%y^8vT*lbK%#(gqii6dLx;^64eO7*Y z!c|JqGtFDucm9eiFs;IuOA)GRq79%7?O!C^OK`thEg^r;%$DMa* zpc?ikEiHFLYp0`^R4pMaH|{K*jYFV?oz06&3wv8P<4eX!omz)6R7ek%5RHh`3C^dC z?%l^eae0zK>*rx&F>K-H)Z4;p<|+&`ZB^CBqv7XUH}`t1&{^`cD7~M}Y9}J*c0Rbp zxpx7oN{gNes8(ERyys-JJA)t{?=`b{9#PeMAPK5V9Ogw6@r{EVY@;ElF*dEP7q8$M(pE`F(!-;R!V>+g{@rgT%nry+pjeU%7`Rkqn&#k0$CX8DjM4CY_ zupqlp-=>Y6Zs(eTI)zgxj%!8#jjiy#x|>RykBAcJz*VSIu6fL6NtXrhXuo-cq&ePm zX|mt0`)a|3J!6ppKJBRFrgQyB(p7&Y8#2F}bv%<=K(%Myu~l0o}h zu0((9ahY8S=$rgh*~>wx)&~c8NAZNJ8se4i%l2a=^N3q z!{|lV4?U3^M580_HY_@AlJ*JhP!`@0Ezgubmv4f}ph@yOU|o%OIz8b+-*G?Wf^J&g z54kw$XB!<)T0_^K@$T=w=|RQhd>v9J=|4GbN+~pIS_m(vuG!LY{G)QB+Vi7W81W7I z0&?uO0MC<|$Jy*W7mlhz((SB8nk~4CqJ5Q-bKPQR-C@XDIcCFnG6sT*Ep~Hw+j_Tv zo4I+R*M&XTTi*T=N58Jdfj}#fRNXd83Ny+Sru>hKY5HN$L?KB%fhR(lu1lVtRTmRb z2G8*8@g3iAbrXEpW$C05H2Q;LgmVp2zAC-yMzt;lGzBgi7dC`*I z$waTsRoPpE#?-@4Bu8V-*`>@1|LW2?V%$vBTs>55o&DH2ziGz9Z)T%eu+W(2z;Mo{uGC9E*eJ9zJf*%TYK!gc;ZuinLC?VCpO!vDFouE+Hfgp{A)U9| za8jVL20C<+3#(R6rI)Ma>#n{S#3cO*5X>{X?;*-95@HLxyV2h5Hf#Eq-&_BaN zQb@pvQhmwhB^_2xm`Of#r^J5>+ZJRix3;NOAX;+6n_w0XTP$*$ba$8}NbxE%WgK^Nl|>q4tf4c@$(siiTaHs+?opLE?Rd3U zY|(z@SdMSCZz`;gt~q8EiL}a}Zk=18NVTa^E4iPn=aaVGzf@GswewsC-^S|c`c8kZ zmGG=vL?AxaJXZgQ9C=e`bk@(emHA$@0Gt~QZBAeT9)*NpWuU9@L>CxHt2Q$*A0;il z<>OWDtdv5V?%sN%>Yw?9XX7JBn8QT+b@sKnxtT7VN_9-w(%YcE#OBBZP;Y1XHT7o% zNKEDU^LMYX&fq^wPFg3-SnFQoFw^CbUz~Psxa5(>ZRw@ejlbQ~DV&T@4o2>xJfM$K z1{x-uJv^H}Rh_kQk=;Y~m&Vjv?fT)_xFLRE{=L7M#I2tHQiEK`sBC&vt-2>~=7SqE zbLo+7`XCFX&d$%%p$vyN!lr%0`7_+vd&_!GqbVg6BB}kuImf@u%8^iHVR?-j&b5~ys^lRd2{O&&4ZBC(V+kLFGCbhMJQKqy}Y95 zaPpsKiU&&$dRI!9j|+!E2MXpxQnTgIo0<67EcmL1Z4x+Ak(XZW2yX&>x9%CHeQGUi z7IKQc?Z+KppGvmW_$*86xxLH47|YHf#Vj8?vEri%5lanvBq?%9sB({F@|iXgm4BJ# zL!T(b!;(MH-Q<;cF+8gWf>kA=hUi56sq{>2&})++c@|tPpEI>{%+HH~`-;;}sQeCg zHl!nbc)XXdxXU!3+v4|~mV5fDMsd!;Eqk!8PErAnWV@5^pfM!mO4TcHiM6=iyB%5C zUMgkhP&uJ6ztny`5!-X@%Q!FSnRf1W9r<86SimIAr*t$Eupe8ra;6=bQ$qn=_ExXU z1G+(q^_B^&X}RN02^#EiI0rN=#WulmV#O!*91;8krA&VL4v(TakBiQYu zSnZ?OV&h562K=DNs;rSoJLs}y`fhq{-;)N;sO(Kx*`2aB^X0)bhi8ejbtr=OM<}^c zl=92l8wP>x3~HZ*uvJ{|HA^2BEzhN4YwR)+S!DdQc8?=#**u;%9b+UOFCB|2}FuKRnX^ro@VW6gW~+uy>^1SgUaGr`!(L!izeMxQ61ac0mV~dQB_qB zF~C@8*^hBCbt7CU`0eRkKOx;$ks<~(_eb+YsUG(}9=80wbHr)$*E9Ed4GQ!_w2($g zX~m^wJ^N#2d1klA^YIYT(-&WJ)42}ol6)IyNAr$o)w=fc@Pl@Yup_Ex&#Z7q@h+=% zmrJ*;t2@)nBI8_ok{sPf>>^ye%x$ZC`Ozcu-ph$~&xoQO$d`gOv{>Y|5LHI6I8u1* zv2@RgS%=;AeV<3Qv$_4GDYU#VdgDH3nOVa&APs_bu zzKp*Q%;pbIt(YH3F{cGO`-AZ0B6AMsyEDE~s&KS8p5X@rt?o{?ZHrr~5$38BsApVJQOMh+jm?dXJiLIYa2;S{I zWJ0$vA$(`{{^!e95^F=b(G~d?R&FipKITb%x;7q~^O|Y(fu}-|Ulz5jZDH>uZevSK z$Z%*W!akxHK!Tk29$hH;p7txWafSko9bQDU6^@^$WeT)fBld92HAs~rJZ z0pFP&c)!6%#uDz-frny16yizmtX^MNcllP$PIsc!J+zqI+Pd6c)lJo1TH`_NYRHLQT4QOvzMMc7qv=DX17UuecI63#hIQz!5uZj$@lA@bu0($$?vv0_lGrju#Wjs z8|17&H$Ej#;**Xs)u{%msOc0Mp{{wg(Vm2j#wN1U>7;4jRU9k%%pDR!$((BZ9WC8F zc3MhfE}aPieJ=se_e@OtdfT0xa_hHROl`j~GtoU}*F5u^Rar$pSGO|%C@IF6yWr_t zqAGG}B0y{0U}&LyO?7}&wI%QM^j6AztXCdH+Bi8iFipyiQvBO_QVJiZ0gGRJG7Kp* z;n#_)?heBwS*pho@Qhj*)suMq58Aj1*}nQ-i*IW?Ypbdyw0%9eG>*0PM!UcbB?*Wv$8 z(mJ-*n$}n+vc8J|b$_o%dL2_G~P0 zw&!BBgzR{~9g#Oud2(J4N4{$hz7G!9hmT&bRxBij8Q~z|>EL59y(aOMpZV?zd*pRW zt^-$wB!u<{fvX^r`e+_hKf>JBdg2-L2S!>Odg|uV;cKvO@~H9g&UlpP8GjBo@A_%p zJY8h{K}PfFnh;TAnpH0z9%WkjVK`rm+o+>VVY_6Oe~Av+=k@KK?K!?>d@Guzc)l#q(c~kJqs6v~cj(Yt0cKNzFPm*E zH7c6vgve)E*&eNhjDe{=49B-0Tn)YoC!@hCM$dna z;;tVzlf9{L+F|vVm9*Don2`Q?POQCbd#iE_z9`En3*1eE`2x)2 zqLsj`h47idND6WE3;3U@6|g{Y21bm3rquu1KKFmA6+I^x`~Q9arG3uDjU`*>^(B4& z@=Wk)CjyOCAxt>+l}g0lSVZSNfeGyx=--%if`Y&<4kB9XTtW%r7y}d2 zxIVy!>@+Ar%|d+%GbF2YFo%F{e++Kqf5Lv$n8tri_8_>mIgnyOe}9j~e@u`K4Cu^J zz#{L->igS_3LvP>IDiDd_@M-nnIoVlW^e%;1BtH{-WXtjBAxT?{S9hoBn zqw500yv@$FgN?J^+4l)h!7;#Lr^8mm0V(d50iFK^v>)KT5iBQ+i02W91p#WK zgIv%r3Ki&EWn@Drh8B{E2?A4$0k+TG6%SaqKd9qnke%_F^J^Lw0PyESGqP`#phbV0 zrtyH?veFg<=<98(zyH}dVt;jn&GuUtaH;cK+4;>9dtsOTTJ6CMUhVsxJp7dcezn`i z#w&*%-C3IN2#r)Lt!Zv*zgo+6%inslZ16cRm-~^r$;myZTsD{==0dB4jFbc8Rs>4& z1_df4D6d#flYE}%F||z+vzO?;6PYD#N}q~og++++y=P$r4K{qaO5`cA7MF!E z&hhFQ*qPZ3P%@uE9Fuu`J#&>$PSUL&dBdeZQW{%jo~?St8mG|zp}+V zZFXZ&*W$t_+f0+i<@AUXG)lHbn)jN&P2A+FWiW($$?Zj)^p zd$;W%z>bUoxsDQ5VmiUt*S+X5hrd+$I6~+Q1)r;-tO)8bS4E5u|F!-!W3-a>tIYMe z^b<qQz9^fqdrfMr)K@+`1k+4*}4XlO&tj7A-{WWxY(0eyuQVRfY=>+) zCDNb-_pub8@ktX!6F){Ou3^yIASeBECI!Z@;Rz6~Y=?K6p^d1){$P@eM-Lx3QhH~i zU5?CggMmIx*N2!0&$B6V>;uKQsNl+CZ_*%j$gVZp_I$KLv5oG!@~J38PvG^~%(ZbN z??AX-#}@#g)*9cJ-ipNS^3)vo0BbC?+cCFR*b)^czN-mnTYew~JV3R6f)wc) zqLa*S#JcwKy&PMKipU{^*7eL!WSIj-*7|Qadd2(Z$pmGeB$2^GJXl4YC@Y5X_A2H{ zG&E(d+mEJNXZ!P53W;j5?tw%Db$tRs(Pk4}O}>xZP7#{?mn7>=)vF5z^hDJvMt*if=4vRDz+0vvxzj&`?zUIgXox(V{&|D8(X0F^_3U1WcgsdL(!2OJ~?Q;@q{9UKU$ zqcM9WcTrx5*cq7pTnI-wv~*|DS94rZ8}F9P6~d9axstm1W>X^RkBpeT#lsl}E4zGa zo-vR0{D7UK09^!Pk?<8`FP}w&Q1OxZApqd^1)A=8G@v^p)|*g9;8_>k3hc(o{0hGn zptpiL;BBaQcg)Adsz+2jeo4?~*D*BWS4wp=D(5u$5Rp*t)&=5`fZR!ZMo}P4+3>yx zOY0JWTwXr6XF|WbPMy-mv&QvpQ@^;Y4l}%M60SNmHZ~E_Ww{9pOibJ-kf>YPs>_EM z3E+2c&u&pcdiO0~z0rRl_w!q;tZzPTo(E^ z>TXg<2Z4uWvX;}D@>W(zFY+-G!sD@NbM3?JK+1M1F+O1e4G^0CRHy}Uh zd=e(uV?a7mx~%N{U}Ac+LsIRAo83s3mRiPzAw1;~AqKMwKtvQ6#4+S<6*V;GB#R)_nF7IePS2A(`ByIXlX^`&n>g5ZH{9GQ{zci zJn+Nh+I$GC8w})E;5`%kk~lwU)IE%Vk+aYyx%>bheogd0N>xZ^Tw%2`T87NLH&aJv1GZ?Yn9*-Bzf(6E5DW|L znY7N-lV0sPhMHb+IoybKElV%6O>|xBXx?_g`;eOf`GGWcI-aeC)@|%6g$1|Bl4l0K z=*#mL*WJGB>m;pWk)*?*eCY|ewA14B(XpR*K)@%l*y|7ZZkh`#P@jYq-W83><~p8v zh1S_onT|5G{m5@UuUiKSGN+v@y~CUyfqR1lhXXa-q+hw~|(n&4?9OM?TEFWj-qDZojWk_cZkYySFV+R z)QeO}R(+?jtFT%suE?+WNRAM;t^i}<-jC))k8^>Zcm`Vr+?CgR$z!~+H8UY~=*QB7 zwTKduHGh#$E3K|jWKstDE7{%k8zvj&i;*dmpHATNr{zhPgwy9xe&WUciaG?#%mz^FnG06_Fszd^-9qM+jQ;ijGrt>XZ`rCnZ z7W+mI*nty&=lWJOc!ixMi-M|XV#tq@aED^Fi|E~>mdO!M#4dc$(#OA8mtsoOk_*5^ z*S~n_f!cz1G_78eo`zXsJ2qLK|N!qFm49p3F#kc6*! zJ?XQdV>OF&B4li|Ugb9Gz1l7T69%Ox=$%>|iu-q%CQ2#Pgj6zn-UF58=~lUSTm-BTVA<&9Rz1NIj4Ob2?XfVFb#7Vd=cvsDB~) zI2gckJuGoc>+hALh64`gKr8tu2RBFPQwAQK)yhYW9M;0#+X;I*25zv1K{}|MyD{NbWF6WA2E_n+> zd+IXwft<`?IzeNdF06vJz#|}(cfmFlmi;{paN!VhZ*r3)GpJkn>(5R*za^lRZ%}5} z4Gx8%T&I>%yDw(&50-ULehe!AZbkOR{>h&e=tR#9*k|ymZ(fz$95jC3j@_e@j1G_XIP+0Wn~&xbhk1aGd%LDg~kdKABM~*6fZ_Ij(|Z@%{6X zs_>70%*HKG41_#nKQtf7Bo2+yLd8G(DWT*|E}W`$V1|CMfC@pgwac|Kg>AVj%laPK zv0+AQ`xZSW(|6oOt^2AW`r^vTv+Fv z_FUFYvouV5Uj*E1ErgRi5Q3x8i6&+hJVsKuhS6l+7qr?2zAn3ZiOfV(Vq&r`)PWun zbA+8@JJ$M%4bxMIVw01B*r#QZ7Z0=%q+hJEIhTKkMh+So6T7+JxKqst3J~=@eAyo$ zemFwNuygRVKGZFLg4LKl`^uzmU^0xB#WpSOwV55I!}z zM&}yI{|E-~8d-#GBHt&AJ~k#kGyenCluxAK`LcCvuq>1oj66<|XIdb=rBsKZ-0S|C zY;0Gnp7Yw6K3M6p+AsYN2X_EHqTZt-HByQ^Kr%b63pU*`BOE34{>l=rmcsJYmLBy) z*4Qg=kil=MRNR5quQrRw-+-=t-D`gx?i^}T(W8R}0=HbZRewjk!rH4UDoEN#g|&xY!ri^!Tcs%$Mkul4V;(EFHygw>E1J=^xDy{l&mzb zsaG_XGcjrnQ3@Dm2rBjC>!nLeb{+Z>%AJ$I?$pKQnQHyjzxeZ^jh3RY(4WI#3DBpK4>p# zd{ZUatxnf|fm~30S6kQ#(~5FwIJmGHo3EZTQYI4{q2~jz#@wqH=cHyXivY+^=`SZtl^@{ zXm6;^gEZ8AT9$>4Kz5wE`PA2NnmE2CzGVE;rJ!#H=t*e2K%4>H1q4XoEVTB7O#BQK z7S1`1<|fPEpPqN@vZSEucgGFABqh37M4x;C8i*v^Ha?CtleQl3k@3-!HUa4 zM0UU{(a7~?Yge`nqjvyDyX8kSdpHA<0*hm1;c5NDiNtU|WU%Myiy@+&1jyO(<rQ5IiS)OLB&Oe90wqxEj%>IiyoANnjNYd@O$^$utrG;-x{Lo6yiujs8g zsIX;EC#lY?byh?0Zz9zv66$Xo2a{GXK_u%BWPw|do%q?3lhrC0_bONDS;vaXBZVBV zJsWlN#Wuraov9Jc2T3}Rz{hyCmtwqyOdV7FA(x->V#rd7@g8g9a z<>h->X2LP&3(OV3zWd`y+0rtQ{Hr^!KHLn`4cZ-LBPZnKKOG;*A``8g{)_tApUZ`lui7lZF_AlHf0uC^_>SncD6&k@aP-n^ z{5~qH;=H=;;?s_2JoN%_ps%znfgtQNXVw3{CHDrowiJJeXw+$U&WTl}OmcTFw|c!7`k_>>L7+T`H(DZ`a5OP;)-$sEXVNlqwy?APFZT!)Gxa2$B-sKf$Y9++ zx83ZJ1wkl?hzKx*!B|4#5Gn%aA_+SnsKS{j3JJC41oYhy;)sBP2*Sk>;tFhU4ZAmS z-<`8A+nkS6Q|)EhNgmNPHmHCA0YbqEJte;Rz5m8!`FA^Ea81?&z&pQ@>B|RBF!#fW z?ehFQr08L&dPElVDb+pG#JA)s5h4N1Ipp{Fe3nq7%;T>J%o8Gg@740D*utm+krjy z%_Kdy^B15G^kb-DpBcnIkAfss%v*N7vFmn60X!Bn=74^_b!7mID-}q3uNdPo&Hy{T zjdgg1AIW)qbR$oI<~=ri7y=>sUFGiczXAd9e;Dfy2Ke!*9z!4r!h-;;hY<8&-?C@z00F|r^zRp) z&@WG5NbXt&8#06j?ikn}W5OE}@&~jNxMMI%|0~f1xuyjC_qCB)d!vl zJD>?WPzzxIpxyx(oexgYS1@63K%uRH5euY54L|^eV1%(WGz|h17N`LrzlYog31STz z0KhFklSkNRFirPYb=8j?lAPS4h-Mp9WNvWJo&i)F14hlXB(#sfzOT1mLxw_KUw)4# zJR}wqZ0jqF9Jbw;3k@SaR3kG0R2n>Fu|C&QW5#f?{u|a7Q~_W?U_2KGfB=?y3&ize zP}KJ{7}#Qs6?3gm(-dOirpuU1m*J{6tFEsPdO4Ko&ath7(SGip z(LR>R9?*hg%y+<;-vFaMXad3j0#rLhyFL^B^ zmcpey`|)ku(2(=-F~kYzTNu|C$8-tY064VjkdZR%J%(tdH`O3SH*WYSW<=YUI8B5Mq-ZM-CBNm zaV`j80>o|W>HQT&WL0FJmBkRxuEXvN9f|b@F;O5uMdyoH6uSIAg-G&gOUOkbFfB}N}At6pN;pb9GUgFWD?k@H|T}jHH^x+>9%k^GuRDL&GBhEfv zO10N^etLH{8>BH$nSlq+k^Sz~sy4bnez?j>f3{-sZ!tmS4sCmu_H%FpLT92_saR{l zH$v^)3w}2CAh>-Q@V`2{x(gn8jsEnHTZip<)BH+TtKBVKKUvjEb8U0rHomTxQXb&r zu(Z9vGlTkI^Mwk(&xBoX3uiIhKd=4_`Jlg@D|cad?r%^fEp}u6t8#obn78XCTyPjW zyO}DB&7TihfR7H4h(z7Gw%zC@o%?l$_bZC_rrojqac(fnCk~)zqevqs0zuMWf1)T@ zCV;s1!dU!U>taVhv3^hkW2D}+3aUN?!f3A>>pGsEN0H4`^0_}at*X%VF>Vt&+k9xd zOYg>>$cC;F%PNax+7lw>HLku}J&NSVt?cc>i6 z==(}1@bR`4G@YF`*BytHx5yjz%E4qj{I0s7wGvbg5_SBqUliGXMq(@48_&Gu^Ip+e zUu;)H-BJ5NM=`cpB-VwFow~ff1+#?tH?gE6*8!proum-7cOtu**gGHGv?hu*&t6=w zoscEJxP}yl(x@tsE0#ywEP|tw4R}z)BCHgLOrsCGw|aO-RRe4J+d1gGSbD zh`H^0B-Ouv=mM>={(IFDr32PoDnaM65NKN3(m^aM-+WV~7A#zLGm|#-w6wrFY)LdQ zd8PH%@pbkdljC=+WcRf=ZDp4#66G1|aQ6w%XUn4foc0-HQ>I$Hv`P&B?}oyIXCcp` zub?}RMjLVC>_mJ7e=D{j%l8p;>h=X^M7kSgh}a zXTC4zh%CeYU)AX>`pn|yr*bt1>t%wVs_akb8ab=t2!Lv(=RdhzzPeADr?V4wQ0k5G z=Cn(Rz@b_6;FHOPrG(XIf0~c)u4>ipS$n9K)f+JTKeS>SH?%=6qBL_6w%LD1st%msPt}uKsl3wRcJAg%J+h)f3G4}u# z6n?u7Id}(va^TK5VaEF^X~pNnkC6#3420P6#tv@4TPwF;Wxvdwz036k+pSZ}NG5l# zUfVj``R1TrZaQf9C)cLf)Xc`&0smYIpOWTledMi;w`@hS!}Ke=o&rr3)g-!33u}^* z0!{E9BwX2w=Njk@JyWG1ZxUsN1fJgT1Cl0l=`vRv;GmtehoX= za#XgaL4Q1Z)!D(E!T{Cj=ucJkBofXru~IYt!Zcin!Yyc4*w%O|u^tS+T?~_xivv_s zbN9>SU54^4$|s;^H-51-@tP3KL@I2M@2;aJv@qn%L@fHn-uCVub5T0bIj!%!=zOewfI)bwp)~gC?&Bs zDOrE1cjIs{#wV1-3p!$6ss_cnAX$sg4;*aRJ!Av9>S31ZK0?hz>=C*`h+CMOJHJcE zO$I=0hsx{2d{YxyN&UdMPB)J7Ms;6JEFr5XWsQ!eDZuSEepq$lYGW~g#T7P=Z-iX0 zjq4tZ$&QIneYn%T6C=3Q-pHJ32HGw#Ng+vIce2;%#NrGZt>!K(d!!X*j{E!V5g z{!}fCxjbD}RCrc}tQQBoLbbd=MISipYH%VX5t%dO^@+zC3lA zTCm(S3#01MFsOxhJ2iza-_1r@Ppr_|X}eUnmD+M1jK9f;MH?Zmb+tS3&z86M^h_OZ ztH@j_cAa>;%C5Ep&lV@9L0Or`#uXy!jfUZ~z3|=9IgrsoN{n`(!QF+WF^D_SbGLI}8n)-adI;rndGQx1`>~=1zr! zQ~Y$#RSWr`tCHxo*EO<@k)h8y$80r$IW0+Ev$&r=80Tm1#||U*+c33h6J zuyf@U*R8PX(c3R?-#1nxQ$4ANfGT;*YCZ=tMa1Wx=e&eI7k`>F)Tac*{BHR|EfO8f zx#X2g*h&bxhXyYT9kY&w!F<59h#wF2aB5^tv4RGnvEUEUKYiwiMEHGnAsbamqPG{0 zOlwJ&_6;Tdy5EGBA3MtP3|L&4nR+~|&H}c<%rmC5D!mjxBQCT=j8>+d-n`OC4S_}B zt?6pSHfw_38aSx%hB~4y7I(C_+$%dIa$;l8k-cc%jwL$1cY>Klg)mZ#ng*(+_YrX^ z2%P#(T2G08%x2MfNOmvyw@(N&M`}~=+emG2BC0PmlJk_&zdS@W>*-B)FKco;@>1{R znhrg4MY`Hq>iX;a`&kg)RLsccU+Pbs$rz=y=jt_ha>$gj*9+N`-n6}kXFTn_)rMZQ zISlN#rM-7+ zsEkACbqB6`h{X6iCC;B{M>{pFczWhuZ@<4F8gi_9SRs@0m%8+odHvs!*cQs(^VzJ* zT(4Uf)}jvi={B<2Vt@k;Y6#gJ7Jy9NE_e%Cc0pC>T3oIQxkWX*aZ>(Cjgh)>s*uDx z!&WcZr`D%Sx-bnamirZ2x9Lv1e728<&8;m(>nWOA(QMuFlb093=VaZuBRv9b6JYJD ziB6bzt{RI1sOtkAyJ_QJ8W5+O;}(j@#hhrPOxH3o>c;Z`wY_vQoC$t4TUw^= zBLpb{una{7Qq^0qPn^skbQAF@J58`2Mv}No?4fBbqR$B~}Ng zpG0>v)s{iC3O5h8-d>sEZo6iXZ|}ACsO86`$ri_LTGne>KvE*XPElHB+8}J$8E@17u{sKd^;rn{IAWRQz)uQ_(4)Xq)cY23lCG2$GjT-ilT~~3x=5;E}2k`BDmI1 zHgL;5HQ1i3INfMSf|_~Kr7acKHjA^(rXalzH)t)=!8C+bPN(u|(Nh0a{yhOSVZ~c& zGaB^Msj7$Elrj;Y<+oVk#O$A0k%uu6n%ch5! zF;gk(d4r?+b5Hp6GfYyNyT1@n$70Ke@=O~WQJurhU@|qFtV^gZ^o*SvRfIXC)~JN6 zUDj%xM++57M!SN}2b&tw-PXgU*#h%t+sW<8TrzzEP{t3<_{X_K>C{yZ_p_CHU;1J@?7x~RMU*L7Afe89$oUusYS03nP~*oYsK2G zXx2((jIJjF!*KhKh7E_gOOZ7XIn4lZl!z$wOhLs=yirZ=X?v@vGamN=d#6HMjrc<= z(ig~>Y5jMHkW+2$ooxgw=Qo4w^lS7|Y7i=m3viVprs7VR+6V0lvG^}9>7gq>3CqCe z_j|&L&tz6V+CCNCxv1W{;HU>7Z^_NdM*;8!Q)8Mr6}RCC!@hInFU#2oY^T{=a0L`Z zfvv+xme?j}Jyuerx)V2W1kHq<=Hi*kFsch|$I96{-16FFDZ z)z_4dwETc=`9^I6+zp&4@xRkgg**m&QnF86-M;q>*q`Qg^4%+YhT;#`HUEi?sU#qY zGVhD7p%Wv?0;_egHiQgpMidFbiDNqFx+$4^GoI;x+ zdURrV@n9i%^m^R)FZk(a?&>36ai@QF;r_tZV5PMqVq!re$MXGU&B)e9ies`ml|LQ+ zS%MIQC1FwV%r-%=dqM2j67{*A&63h?nO<6kOFBK!d?cHrp3C)CCz!p1n+*~MPHB$A1!J{f=CtznUr zssVS&`>Wmrw)}$)cq`!K@sZ^|?B*CPS>ZAS0S=$sY2ePKd=)#9*jAe6BU*d(8!*(; z?QI*{{Xwc3iaD}E+$wg=6kg?J;eG3kQGbx}2cDdFns?-cMN;;;RsoNiE18hia{ALa z)$5jq>2_%D)djZXY!2n5WG#HW1=U!+dO4Nij@M`1@DfpKS#Jl#RrYg$4Zkp~)w&gj z^*4L*wHl_1t#);0y*+Jf^{HNnRcEC>JH^{i8NMp%FXHrQ!`sTHxLUfpp+F=7Xae(7 zm8L#e?i$9O=)}cnC$-IDSMKRtXT>Q$b||a0|n49lJBkELAVizFtw8!AB+N-5Wp2 z97nG+ml9vx=?l|9}agh+J=&#pAcj{HR62Zr-lA1JlEJEGFjac<8H(<)hmI z6;@_4j*h#C^FDtU3l^NK zYR$Ud>J(%vZYUgU!<-Iz38{M~#|BCauI+Sjqsd!nsrjvXU$DLOa<_Q6h7BLWKtKN& z&VF^T0y31K;5_b^aTE7_uYI=}f;j~Gogt!c2TN-Pqf4g==rr>h2~VMM#QZ#;F!b(- zZCK1(Wq8vLVp{)cS7*n>`Tg(X<6f6UwdZ7RvNI;+;m_SlvvzEE4Bs0jR-U7ZOzML3 z3(-N+?Rn&IKvOCzStBc^f;L^e4Nxn34oYXR#o>zrJ z?ZP&E)YbYQ&V9uD7c9+~a^INgTDUdRsSbVOE)fv@|GjkjaE5SG0Vj$qQ~kg>J8C24 z10=M$pL^g)F_7Nfl@-5dLR&}(u$gYkRS{rN=vNOjpoqv@tCtZBw0`3)*W32+eoR&0 zQ2NJm-vvL#_>IckK@XK^&csdmYPI{A0n3CR<>tFUs%b{Aa`_zJXJX|d_Q7L1%IS-| z3OTANL*%%*C6O@yHvVNSdYAph&3bxU;TnMmlw{_I|sv@kBJ0AHgO+Fg^xXqxfi zVlM7%>!fk+AJE>s;KXe9MVpBKEDRanZ3#b#$icHE`(@r~rCdcw zFqDO_>T3=R-|@tg)aNUItKKoZq}uwaz)d8!iMrLvRT{3al+@i7g6LnnXGos?KC!js z6wvG@fcE83{BiRmpJ@I3rO2n=6^7Ng-mS+m#(XB3%Ueq?D}?vs{L0?<`yl;HXu{(l z&q#pl2`jBf4h`nY&R1toS4B?_b<|TzUAO;EckG4l$zcp3QOqf#+!*0_#BN-6bZrN!i9is<*Yq~;;_vrPXFJqh=5V_ zX}-gdL0GuI2gyU#t6zg0=`~k-zVPzSB!kWZr^U{^BIgW5&3nAU)(FZ;7ZJ3NQaMUZ zn}0T$x{eWrJZf$&bJRfpt_QSX^DC`itTc@DbX^tynTYMi^iy{qDK4{nOtoW--n#~S zeC^1VxItDg=`=o7)TnefTLX8l5^18LNAKZuGlSaRxoX*#-r@G` zjo=97Uh(>#>7Q+M%bRVoa?=xb_cA^l>0CV#H-vxPaVR_RJURsZcwTScgKjV4yrf=L zWqP}t9AwRQYP8HOm>Y9nD^RCApI`fZ0|gz|b26edbn8d0f5W%B&GvpwWoM0yKB9V+ zIVILj@-g_77zqta6=YZL#xAdCmqg#SnFrMT{-%_*NstoA<(=$%MyfqvG2)cPQH^%ld*n(z~!*2w-o$4NGO0nC$N&& z_=V1*^+y(My~tl6_L9Z)lQ#FWSEt`ICWB*qO|@G@<#$_+lktsD1jdgx@7+6K7x{)! zMwD-@DPKg6(+(;-c@hy1si|xBA4@XECF!P!RbXl9VowhRvV4plOG_f0O+NYL76lz>gkKa<2=^=yT3RimQL zAro71292BT+lR+T>)?xJFAwu=b!Bzi15OM?_PDwi>+HAA7k zW`4fxoWf2n>djO>jA(y+TsF=c&4n~RE)u?Q`CEH3k8B0XM318+I|Y5W)PDUxZg>hs z%kK>d;A*~|h>;l4$!YaM(<+!SK5WXmZ==c0{bBu{C`2`T>k zoi@nwIGl|pogl$Es92myg6*`F#q9nTLDX(OL|D|Z(C!@6U~V%*hYi`_f5MU|lV@t@zW zD85j(C+t)8&p4SIF&iX4Jpy{1|9gxV_f(Qlx2}yB5 zwOzjAFK0-=CzdxCP^6 zX2-@vHK=Y40IkoCn6 zLgc-cF^91)DtuVG!^n|Gj+i?TKD76CBXdw*#0w49z*T}7IK18muM{$ZqC}efqy-$y zJhx}=A-ivKl{}b>#p$O_{NNzt)8zJICOAqSjX@LdEx3)1j>Rc_6kZhj4&n}r&c-;^ zgkzGtis<95`)Z^EMS+7l0z+j)k}3lG&>>5{YB|18CgeVQP+BoYdRk&n&SQCh0`7a> zEI)rU#Df4qAECU)GCj>W9Jk2?`KK0fq*GErYp!1Z9VG}^9$7JPh$L3{{s3i9itGpi z*hFcu;CM3>3U(M+(}F-?GKR=F97!1z3}6lrV2lQbg6JSj0874-N-ciU%c(*|BZ?t5 z0u|UGXc&e)cgZ4>cgBKE*o0%{n-P;FRgT;Ye2?$cgqjAEB#zg?@ zcM%n#z`f_gu!2|#EfZ;4OK37eU`)cE9YzI!weu&kxQ(S-XB70hQ$U15h|1jZi;?zH zQ&2)6FeLfGi52dWz|>_F8-W4dWe?kcp+IV-IHTROa!6V55b$!@rDF3iV0i`(pi&u+ zf|i&qmS9$RO6XRKGbNw4^aRhvq;Kl;3LCOR4{X$sIO69t@ICWE5qd*Z+F&Wa@| zu-Jl%QWTN2{@y=ek>LTrf@c1JKP?y77`WR*4+xQEsY{dtgq@2h$phZaCp~Q@rPz-C zaWki3ep>`Ckf5%kuqpfurV_&sep!;!5yD^uU0ckH$!<|VzEtLL`K^!jirx+0wotP~ z|3xJ2>jj%5=@O0KCfUV<@sEcBP8J6EC+6V=#PquL@yWo*!3>F=L7ljLL$TnYr9#q2 z3Fq+FjDT2J2v~G>5!Qc{6_ZU|&@}V=`%CHFaz+k~D-i&y2kFk-S~kBb_5}RKx!maC zIg}MsL`xNRjrM!`jSMbJ;`i_ibR%7Q5CY=QU0}b?OZki=jKBMyifw)PYWmL2jgsy{ zxr=<29CdmvKvNqYb7~s#J9~;^b!p?Ypx&p+tl@!_y=f#v2ZL?DqZ!y*au(`Xcz!>| zmm#}){8r|Lx<@+o1)~UnF4KNfp~TF1btrA1sJuAbJz#bYkv;B~rt|xp{2K2O9x|9$ zXVTu<*S`-TL!`*uxX^yu;`>HnL;Ka;i~h)?J}86LqvMiQZlDtwVtsXlU_ZI2l~!WK z^EJJKr;|JRw^Bc)HJXN)rmvVbN7xZxa|?9mG_5__eOQ?PJo za9`lh&4xI?&V;Yk*Qa88kEvG-5z{C~F)!1tPM98}Cx1T!i|J{Ae<{&+fW+{7RMN*{ z@c7i{1N!M}4_tgsTo-)r_hEd6c+&Rv36$C9X05{HYV6aeL=Azk`1c~m$M`#^Ka@re zJP$n_R|d^IRa<`Ux9|N44Ffp_P`~YHwmQR$qb4BzzwA8|`&LbEe_#1)Vf%mjEumxC zhut@ftb$uzvNjvU_Ao6PDiqueqX@`Sx`HW>%G1lxXP=EmXlX{HmoNfE9&r^yp$bmt z055Kvihi~(C@-QT z?~lb~=8z5j+^FS!7lTJ5+n&8ldn%~tavK?U6;vdu$2n#+5&QM2)YX)&%Qra zcllDEKlf*4Rfhd1yxY;LY!~akSO(7@11|yti>7xQL+7q5ejMhlF%%|}Ns(8^QW_xp z2v@1TO8w}`E#ox4E5l0T7_@G?G+fx#Z3sBPRiJzFxZ;Y0TJcm0gQ~|On4_tQi?mw$ z$12;I73IkBtN(w zFMIY?I#XWO6AP3o{+0K-;i=m#>6e|D`Z-Z+mD2qCten*5>~8QT~@hoUW}Xy^Wso1&Uhk&oEXekvZL|}I}`d`h1^r=&u1`{of)KLDwT{` z`y$RsYl{v-_jHf^9Twd*r<|s_d6^(Z#Jp2&+OgcTgRq=VaGTg>cBfhxVr!k!?N_0f zH!dqi-luXhczg9LS_M08kS{Lbv(e3R``o;HCigoGoKo$_DoRY-=qNo&f{B^4k8!PI zvplkk(Fe)kdluOZV@yplDmQ2vc+vC7Vap+>5I!<1c*| z4Cc|=oJFuzcx|2}7hj&E+{d3YJ^>j~e67C;X^^6VLs!!|ncO=Te(-17K1jMc7lk_< zz(`|i{c+vK86YgCTw<8UCNsEhWXO@UEU_NT`!+KwHB-IK`Gq}Mu3)e9)v^EUJy+m- zYPAGP^>S7T974ykVbzIxPY4u_1EDa9pW=lT5=Xox9loT$7YSBA<7IW{aIsqUbK+~U z6X$;XoV*%8r8d)%l2OL=o79W0PQqJ}yR!e@!8p5pvd7A|qgE{LIsNC_;i^P0&ULGM z@eLd~6zs0jV0&IWEG7>hIf_$fVRgpwo%#xxxrL1_1ovb!hZ-X@#Z1eb{Js%`%IYj)w zo@pcHo~&KXX#yMiT1kQ7vtRD4fpJ|m=!;bD5~{HY zxG;Ooi}Yq$H54;Ox^nG`4A1F3^U~+xc1G7$CWy}?>&$fBJsb&&!KuW94xK@INPrN> z6g%$F0&g6HCr9eLyhCj|`&_t1xIHsGz4eBRI((|%3ILZ|I5t?G>^#GHCMN_&`G3oN zzABMwrz|*e-L4z!wP70IX{1k#u*Z+8Bde#ShnQVYmCmjE7;H97c_~u>)Ck|_ZDl&x zY-e?f0#{M9PD6c%84f(k2?s0}c{9^5Flpz*3tmk(9PCw~~m8xq*tw%e`(h}aKTM=lo!VQJ_elpE?`}8`8I;F*n zA{lyq;(?!2pRM8f3=Y$rY$jTp7sJ9Om&IjHC}wNw>i#(cmB7BH2YuY>fZnR)QPR9J z@W|W=v(mr)*7%Bty%~)#58C^{irM4^ZD2L&<2yd8@r?6r0EgS~u^{p^ z3(CHxz5S@}toJ?c-K~mh{YSHke-Kj0r7}Mro|*v+!`USnzj-!}c46m98@t}PF3~pt zQB>Z0sma&azQ22O-bD>6ru_L-3k>&F1Y^lu1%m(SNxJi&TvddKVcZqlO>gqIH7gcP zPGP$)R}xW9$Ok9_H{31Mv3H4iR#%y^g@)_BX!%gl#AJ8|)c3oNku$h-6quXcQp-m8ScC{R*;qjetNL+o|nt8)?$H)sc>$6>f7pb z`V)=eL0WSw!>db)y{e@1nDp^LWcT=7M|R}z9fF-cTlx`&NkW7i``@uuSl9|Np3a=* zx~*|+?T*Jg6-`5Bo^fi7XeO^VKlRwcewPY!ILqlS7Z)?TfHN{me;1u>+G1p=fj0S5 zUGvXLRqi7JfS5wpu+80~!$WnjOK@AtV_AA-Wm8^aO5XY~D*N8tJ9#Ci0HyHs%KnCo z!{^~ zR_$I*Gy3th2~(G>p1-lrp~O837FAC0mQDnAj$MQ(iCthWS_fWG(S4_>pBPWV)Sqsb zYfU-%sNNpAvgu1aL%#WO4b%#<=^)4@?BR&$U_JU`^MLa_pplX-OW_$*uK9zmT%Ymy zi)MCn*Q{w>wLf?onZ4mhS*7I;+3A)os;g|EwDZb=z5wpBRjGXW4fsqPQ^{5F%YFpK zR(wq{%w8K)Nj=3(VI#b$TROb>QZhkH$X&2nN`Ez11?04+F9bJdqSyFqxs7?giUH-k zC*?eNMvP94&Kc&~8&&$!L<%EYNOEnMG*t{5^XgV&+5txudvJDTNc@GnmoTLn}^q)KN`8`n+VnW`Nz0BVI za8DY9-m#6jPCxg&X%?c)Ly|i|dM-Xja53x}_t>k$MxW7Y=TFfx?0ysbw)^s}BPvjl zer9CU;jB?*qxzF!*;+3Z(iM6fj-cJR8G5`Ek676MoO(J$V2qyCD?=~UsUIh~@+#Pv z;|G+J^sRb0hEem#e(v9;+F^-c4fUS(noM?dy)1aMC{201gUGOCVxCK9=z@2zuDvzV+-@w z4zeyj4mIivb5^gU`1(1Yzy6zFiCGMd(dOPV+PL}LpOhWC@o8Gwf?S67T-H=7M?1g2 z85Ruo%xA>umZw{-l0iA)hBd}kx}IY?x#ibeLDNB7$$Tu5Efro1>mXF|_pka&TtIAg zk$kIL){KzhorR+0;PHi}xz1RkCo|K?VCY74wZ7}gtlsfio$8%VTf`tCV)s;DSRuP3 zH-XJSeOka$i;K9cmNkO0Gw@qnmto4H(yrS+IS1`uS0Iyn`(l*Gd-5ehhnKK3wL;W- zRBPM{#*%xjP#JmZ&i7WH_~Wag&(JTTioycTDit@fYmM~%<&p|>@+D@U1w_%BD_hLQ z+6QZf8OQa|$md`iNcrhDsComuh5%MN7z3Ov7?0Ok>5|v)Njqo z7#2z<`7XA`JzbV|Gi^`ENQqH5zU`bXDqz33z!GuvuPa_?tX6pcD<)E5x#rCKkc+an z_#Ia>(?eU@=AnfctRX8rbDqjKIAu2KDj^~@VNqewQWg6mp!`{DU>wzS{vDD;RIV~f z>+N&&lO|q#*y`>!OpEg2fGf%2n3-rt>orLevR;Nv&*u<2?F)gLMv0`O^q0!pA_p;g* zT#Ls_;_}~7rO^Eeba_@^5(mf09LLw88S}V7JE3B@IxRm=Bv9#hjf>Vz@f0lD8%|Om z%0R)0wA$Efin}L7tQb7544*JMKG--8mAkR)Csr5C`}?2l4Ijv9`}p9eSWnmQ%B~#m zAuMk9bM9q7EHV}EwTC`9zC?0fwv?=nH@Z8FVGpKPVNy;$nd<~Ic})`=xFJU&c=ahI zT%yD!I=R6icKmQGS!sA>Het$qvKxE+_DJYCXNE1W0?+3}=a%KBTGeNp8a;q7o(jDc zB0$||flIu5QTKgC_eoP&n~9YUQ7$)=*oG92{BBkQ^V3JT<8>*qVHF+u*cO9NN{+WQ z>!}O7;CmjmW^dOP)vv~$uTI6ChgAKQqv+`fPi@t=?cWU#f_JFT-!wo72bV(C%RLbG zALe)3tjY&a<-EE+-*W^jIeB^OYe-l0&zQ%rKD9C${b@8kUli5 zaof)XR*SupSCvi@QCrHSES8$?2be}D3$(#s6l?l^el99G_{E)_dF_QfZzhl2cFjDs zIY#$G?@18;5#U`Py!K(w9KZaKY#1@GdFGsZ!taQ`+LR{TyN?;=s*c(6#j?_~bRI*- z^X)ooHTXlTHK$D~=rXVs?i^KzJhMOCEFR5(C=?jjxmdb-iBDMtA;46-;6f%{?1QDu^BWuFcCBCgh+z;qz;VrM1oSkV9^}RcT;Vpvo@^`A3h3S(ZmHSmkL|4~ zX|Lc}V`MhrHgF%Pmx#fa=qTKC z$*;(v_1pL3*#63-BGc-xywtQ?pC!E8Lxf-34Rxwr@DzNujk;c7((^_Wu~MOMH5VwHlml(K{)l<^NJDlyj-E=7LmUB}4%+-c(txJ-^P>^X} z!0Dr&@38-jrha89)4Mw&OR-@*$UkbqYg@B?L;S3gnw8& zWvW$~FJCG5J0~+vZP=BLd6u3hdCP(zTyu2sCIUufuMZ{~-?{Y)9F2VybVIkwa6qmvIzqm75QyN{Cy6SMb&%bH=10*V|nqo zG(3PigmT~qOu7o2N85hgWFHPkW)6p5i{juJ6 zjEzlE3%+{4-bp&M$1iehPku6=2sZs<>23wBOe;uJ{~X)S5@x58uWc~XXKd;*T0QWi zH@}WYTWBxbhfR-pRGk&v0E<-WO^)-I$U657368+W2dmTDll z&=O@KKw{oG-AA*JaI;6FAoDZP1vD*TL)cG904=O@6p=X8fL$48&B^__Ut3xG6q{=EyaOI zOZy6wo1#44^Gd>7e){$27EXgp^Ft)1TD2D_-^ zIp183zb)2W)L1J(j|D=kWn`ckhX0ZRgcd{lLXY0Nfwrfx-OY9Yua3QrZn6jIuOCjI z+9RA1`GHh7#*&?DWg5?2vo!ZQsRvhuLn|v3#onf^XNSY!AHU9MrzQxP5Bc6Uw(g)K zvIn+vMeevGp>YV=Z*<%gwcvj&NYXaARtv4LWy@EoqGxN(F-?YxNYE`3Qh4*i5psLU z44F*D>2-ixrSaTeB!CjPQwr}Sq`$KTtPVdjy!}&m^!1}GZPt^ zg+A9F$uEEVus!WK1E(U10FaAtad$Me#2b#Kzw#(%a#sZLyKVWc5*g-s9GnO8Kq%X` zbHxtT^r05^XOm)h&o&LR@5%k0)hMj+u_{fet@9!;j_Z? zzeu_+)RI3Yo-XL&asuj+po!$PSBSX>ZJLzCrwtcw*xe!RC(6un2UIBiRM?Os5$Ue4 zBrOCZn&3K(XF1RhF`;$$;fakeQMi(=e+u}O_MT0iyzz2#=njPy@^`mjGiP|OF{KL4 z@3l>+ki|Z(u+)(YC3>y;x;i>=Gym!84X2M{_?RsKyJ)Jxh_uC=_#v5WC^ywrn3zDS zsYOO(r<7_Sqt;dN@v_?6$Wn!#x{(vws+K%f(LcP3i-%Mf+?;6f7@p1bhoQ}oo>?~@C*1p>% zCooH`^_1p@K8yN^OR&mNs7wygh-Y45dvCh8vA?W+>)ZuWi z?qP2e4HtiIHGgqDW^n%`o=2MF>cnx+V`ya&q`rj5t3McT>nsp#&X{7?KH09oc7sH; zPL^p@s)ue_5eLoRHeW@-u;^74R9}sVDM4<>jfkZtQg_RheiJu#)BkhhGeo= zsQG)o4^KAzA40K$I&0A&Arcx+|-uhIMC z|7i2JLu(~X%?p2np@aww@F$V1$X}cdR_6GXz$ByMdCmAxC{qg;=+BWrMIwVK!3PuQ z|6MJUgho<=j}GpvCE($CRyUHG`_dAsr7VeiSv>57PafE99Y**Hl7wwuP4G=GMhVvz5ojM&owl)=e+U$|=e!aszB`FHaFzo*&wt zLrOVr7cVni@#yMs>-yO{BNNkOOJ{@QJpFS1-TSJwSJg#O{R34al}Fl^)YgqVJFb#3 zD6P7Se0pPfVsm17V`O5AfWiF09wpi9pWc@~6Q=j{0Wt|0gnW@Bn=d3vz_ zQ!)M;a>PT|(<7^cr=2%x&9hCbeJyGChyI0CUu#zNpO&JItbd9LX%V;QIv4Uj`>4f* zk>wGrGmCR+lLM-%yTW8 zykO_tOigWV%rW_&iNv=>b#!%AW0&NWq~X^Ew9!w0g{PIIq!hLAI(!BY(jdPE5N~y6 zbQ0?S{5iSh(>e9YK-hK5jwE1rb@j0lpA&^Vy=Qcxj0?Amqbbd8B#}-&y}7(J!0*2` zF|ht2B4Cgsp2>SNM68JR0Yy{2_45aE@#+Q}O0%~Wl(W4X@GAWEwHy`)6_^VtL`f3u zFAO8RWM6r}DT(q6jn7>iE%Ylt3E~*XO8(+R3JSxe84*weolD->&{Y4>@VoyU!5dQK z*u)J2WO8_g7_BuY^*#d<{cAi`yg?HoO zaH$(b1@_HP;Td6cg1Xvzc8~)%wlW}s@rdqHd2}lV%EPSpPYT42UaVXotm=7xUD-!{ zSUMyT8KL>2z^A$b%*%GF{D$DWqB=Sn<3)H#uFwQ*Va#HMAtgoT|c@&U+AY& zJ_q65TPO!HtyiA*)eqmICfB+@u3RlnjxDZK)ae-?yHm@dR}RtsoWSH0z!m6jk~AR@ zz%GrC7x-AM&)~@8%q_2}TbA8KfY|p|6U#%d3oUP`iyyl479aq|g{Vm4kBm|ZqdC#j zDHVBN_uyRg%cbR(^zRt?Q}gzbUl%+4SD2NtiYPxZx9C5#%qYKvM3u=df&?1j7dH4h zmX#O^1uG*pe=uQ$xu$4Txl=`H^sgI*RD1pL6hna!`xl(R0q~t_0p`e3Q-9I?A2|c~* z%O!@?WSxb=3=1F1qEVbH+}gg7l!fAmUG9yYP8Lj(Vi=^&kjL_P)T0m#i@p%+pHLK>kl-hU6K=f|fGX8L+TkY^i@IP3 zR-GPSUjtjQ-*~HAHa&f&~F`pfE9?qb15vQ)rSKo z5O=^0kS4tHM?^UVBv;2+;2?{Ff&*%e(%Z!2JSHqkxj4XT<5j7$ZA=jwWRz%pxP{WGcHR^33Z=Hp) zgNc?0lcOjFNYdSr^9=5el*jXFVZdr&gs2B6=A$}l(X3*_!^s1OoD$+2z5J0F(PaL9 z2`Ye%*Mvc-nh*LfDk~1cGDFNLKrnys>{CFv0w*X#B^`|)Z}vy)!r@VHW_l7PNm;i2 z$hAd{sLSKA+yx)LxCIph{uHo5^TUbX^r^u3!bBqn?d~Q*AxahXLN@)a;M*i1N2@Ff zgt9PJRaZL%{^Ku%&j$bL3sp~0Mq}uQkC3XU11E2+6sxD9VMN_U2OJ#$U{D50Aa0J( zd$W{aVt5b(V8QqS=ww5)Fkno$Oe~8?#}Y6D)~IBhFmsB*t1x08gknG-`Y_3?$$WkR z=HSh+6#e%HqCt{bXroA7Oh_y-@_H?x zD~?iy1Qb=a&?5+pFMk=K*Lsl+F2)pt111f2=%R*jGxTCYP=#PZwn2Zx24579HmR$) zP{v_HZq>tU%|#Y4XMw@&JTJjzSVe8H3eH9X7DKJ=*xr&Cx9xsFkbI^xJlAH*9B?K; zWx|k5_r9W9lGd@icQ%sSkk&PVN->_U%i)xpa)B7OpJ_0n!2)_P1qcCSK`EGf)GRR8 z$sAU_8Z>0tKss7Iu#~hye>^&6k)Mk|B7*D$;sTVKFcBSh<@`Q7+2rbow&cgw*5m>` zz`GRVG(SKv{t5qRpw^_UogeXTsmJIh*X_N!f zzwr}KMO*d0^uzpd+XMeqE23H|=C!+J5z~JrS|17M{H4Wo6=W77P0JBVC_B9!D}hc} zY~re(7!+Ir> zj-cQk= zS|#f%Ja%V8Oil+)XD|L<;A=TZRBC|fbH!^>K;o5rgWinX7n_^iySz=CS_=Sr%ES#M zy(iN}IshEX=jYD+Nqv0lFtS649bw@t`$)c>6pMmG6_N+i&8io?pi%)4aDo#OtI+yk z@}8J=NDxTsqTuA*i*ZEv8npN@QbXbWLQVN^WD>-2#Eqc*h7Vs*Lup|A2f(&if|ChD zCFUFgv_V`$FgGGb!!I!r;GoEnx}pFNsd@@MceEUwRD8T3syAlpMM~d6b32vdp#a+a zL1lAF8a3RI78U-wjPD3oul5#w?`Lc*IdFI(+|X(%NX&5dsOUhaUnDH5KycVHj{M`k zbljW2+PkvO5bMAw%!6U4x$+a5ivD^L09-OLiZ{+KJITsk{bwezG1x_<8&kehRDkMx z&voCvy-Vw@8b`iPAmw3Sq6SVdr5aunMLZrX?cBh>%jN0FQoUm~v{0K=P>Ffzimid^ zl97R{KfrLHBI4+3;d+q(NWF>|BIrzf0HGfNLd)w=S^F`FalL0HL>1?On%Ht={&k8W z?2zOa@hq8Yi?qRnaKL~7hzkpH(;x?a7$kfYf@YL-M5w(A3Phdxf(iYCS1n4TXHo%* zWUB}3A6A{#-|O$(g-r{}S7AE6tOu>hM%Rp+aDt%$*(0R8fK>ryl6!!FXdfzeKc#z?9KBmUfU^lKWSsY%9p{+x|nEEEf!wBb1J) z5fdoD>m!|B12c3GTo@VX%x@1K&<4V)a3V=2fQ1r(=>u!e1*BI1(hYEesr~bgNk1?! z2kZXf!IUI<$O8#&1C(4nDd?<}?f1q1*5wX)eL2XJfSnKlgOIGG#DQom!a!)q)RLe? zGSmPP+XInjk_eBW$7!%YWT-vF`PS#2Vn=&#Jn4f*`sDZg^a66|6-b1B;^1iEWWrzs zI5l)Ve?aM5(dw-m3nWH2(j#_I9<-UHh=v3`4cckIn+{;Fk~;EGDnLGhXm%MKct1q) z;jjAvQ=UM)2QByu9u^zsWI$mT6RL$+I50xw>sc7OiV*Oi0c|Nk0)+}_g7pWYLZ2Cl z1{{F>LIx0(4x8L&{=-jE`IdR$>>|GF-qVZR*Y$8B^Un$(SP{AAx3vb6p;hFM#`dQ@ zZ0fx@p{1)M_>oEPDw#P1;bpb)vD07U_Zq$pbP05UDTWMWh~ z=sU2leXzjPSgDU*oIadEP6rA7cU2ZWatwq`J=Rq}PAQnL+(5|f4&Z}i-ye~qJ!w76 zFx!I}2X%*xfhdUKHaH0<@Pthfif7`4P3XN6_z>wOVnhlGhfFdBZT=DPw>0U~kAkZN z|AEL5{ajhd!!wRG8*bK_lZ4DBD^TYGgusehBrT)}VV!jlSFhU*?kf1daD0J8*oSIi;NFJ<$BK|y6x9psMMIu)0f*yG76(Yy9_&D($SU)s zyMUhtFzek&3%Ak*(F+xv1r_-JQkL--NBw8KFjN|%03dW$1`IRbuz-z);>$%!6$1js z+{Jewbh)8)mHJ2`Z$p_Ztfa}l*N5v`Nn}Ej1ra*xLOWsu<%f3SUr~ol9K>&!m1&)}Qt#=|ev>JnHcc-3(Fcesbv0g@p zLFk~}rm#6tP*{-AW!&ln$S+c1#BjaJjNyk^$gtmJFEk~#5VVQP zW-r24FoyhZIbg*h2*vTe1%?BKlpKnI5RO~YtbYn+&B1w)uoV(W!g?>3Q(-|uM$k!hjW_*S^a>YoUihxRz>0m@6ru6 za0v92LGtdmC^4cFFaeaFm7>Nlbl*i{aKIs4-qfNQ1*R`yJ1+#fwjTO&6F$ z^EP3m7e2(%%E6Y_L8Rf?IZ%BXKmjL)=n*3EY1|OdcSc0ks- z{9(raBVf<=D7&g0M9?HlbDwRTVEwxwDu!#n$a0Wb$9rvFISfsI|4)=x2Zllz-~J%;pQw4}XQa8rt=h+!j)*>J> z3;`h>lJy@kB6V~0#fpjkLt}Zk8~>09MI$r=*Y&1Asd1uFzX}4jrV~3}KP!SJn662~ zXHRzM9QJz1KCp)q{e*rb?{`3RD&T%4cgM~AI3#IY3#f-fC?p^$`KUz`2MbZUID|GI z7A1)ybXQ7v&o?VC4B99{Ro`UW45u^Nf)9r#>ChB2LhePu@I}Z|+%?gIHsp;{5dw~e zu$rPQ0bG{+lr{gM_w?TL3tOKInYL2=WHE%3!%5$)Zb6cNcUCNQc9}ZoDnYa+HvTFE z0V+1E;hrc;kF$QSTmx}s$AN|t`St(S#g&~L4t(fb(|OyF9Qqwzj1Ti$g97j^z~kot zlAzcz@aUxiks)X|sDKX?VC6vn&j4m3GI3-@7@Ag}xleqGGrt{6eYJvM(wd-|5JY!P zAs}1_a0s6@TpF+*_eC&e6@Ml!THzNgoST4UDT7jNC6QGaO;(7=Glh7Ia}{e9+Dmj# zo~c|I7C~4{pusCa53w8!ns<~D8;B*2&wNE?^t-JmMA7{^0@tt=^a=-YQRqMuqeNEF z2+Xes#2VyZo%WKf2Z*kNFhW?ow{4~OFeMIp5FA98B3QzidKVtuEH1?M?9X$0w{rY8 zw`3jM*t!jX4g8>2i20C~3G_NDq_V{rQ30?M-#h57M!*(+Z;}$AeF#<1M5~pX#>s-T zj_6~>0cAdtA`JG8R=Mcfp7ZSnHuL;uVnp=@4y_KRFzxU2$f*ItX4p+gF>=qjr3kp; zZiX+yKJLwAqi}8pWTi0w&A8}X@n}d7EUL}2Lcc3iubFWE7YP(AV3GJm-p6+ku*W{# zN4@Ab9U+{Q7c};@`x;2h3V{h(fvAE?3P!@q5^h{qZcM{ZBjbC04*34{B0NDbIKr~+ zPA(#Xg2ECh+6jR!^(D#@4$SX`fxC+1#>7^OA{>Sd=z=H?3NZ+X=rfwBWes<%JHGX! z#TeL8qr9H_mkgDOta4dkL5w1uzweq(QR0=PQN=79)a7zmnbb?}K68 zLfEmm0^wGKvfIL+SJBdO!EWxrg0z60@?joP#Ptw&m?U70OoU?L%5V&OwZRmZ;4K8^WjI3b z^}CJ4Up3-k4b+8wJI(H(&x1{AU;^$ZG*QL;q;0&Pk(9%5I>pFtc)l*6r$Wo66&_! zLIkXzZ3*c|7p9W1*zRxWOPYY`8%^Swfu|L{+@812;I@}9+F6o(*q~6Vn{ayo#9(0>I1nFXV)nfHgo$A^*Td4CT#TKn3;9-6J_z$N*}{&?^M>?}2$d z`iWYwP%aWR-ymml?>qiMPo6s;?3}PWwZ^UE0`*CF9QKGb%*^A2qOJGZMuELKwfX(c5*8divV+{-*~AKymuO!2CEtiy?eH0%4; zPOI9Z74or&4WTFBk~$4A`AvAYmSZQ3WhQO1N6TO#?@zMCJd~Kr+MBB5Y^yyf{qNbQ z`PG$8IMr4aieyEYJ<86GlqMZjcb^$uMz?!0CBRy*Pi7*6iRuDHoCIgvp0YrC`F@t% zJ^1`cM${WE_u?6*MkUMw0sY0qNp`=;qDzI~(CIGAUp;*0yjXb_<~#<-AWm(Zg4&%{ zK^|=ji5%01v z+`~0u-;O;iF4nrsnnkDm!|}93Y#nab6xmak!iDTE?R_bfbXA`*xY(J+Fd~ZgT$;2R zcmgJ-vCC8W@CV~L-5v{njfAfr6BWl(2j3Q7h6zv2bFgs#3qL@>zcIt{N^aO*j*F_|+I&}PJQQDBTV5O~ zwbkDePkmEuyueLeXTyATAkhieWxw}nB4PFOU56swwtZ5vtZLyK55rK8Yd2?d^Gcj(h zBSX>cdhO+#av9oZR-5y0tP0)m3-P7Qys*49@nr6DMxUZ6H*L4_u|bVOtntE-eGbmc z*{ybk?P~Ny#jUlxl$D;7^7xl6N`^y)jYs)0%A1+_4k8`!s zZ_dkh`^5VEq;~k$rpvnJ&guNi=X8tG5jJ;LgUJO~mTFmrWISg!AD?C%wdWNSyLSXS zSmc?e{&bfNl|{|Ea?#`Wo+i04{@S3weSxBff+|HgL&q5lE2Py+rJK)Xul zzX2_n5Hqg{ISNl71O?g5epUck@`sScX6Z#kAy}j{# zYT+(;2@b?IL{MLx8~z32h9n~Oe({d{u1fnRnaRflF_m9Vcm|4t-zqt}`**8Yh59Q!@mDc~mz~Rqp1+85iZQZ=_%aFPIc-uI7ITKm_-&{%9 z*2>WhzZ}HTnaJk<>Pn7o)-FCaw!r2#wpKp&2R|b_a0)pvJ`R}JnTS+eNJ2;gPb0zq zAl88l_?~>qlGqYzNo9$#WIC`54tUSn)|trj|Ejh)FKgkyf4?mRh5EvF1>*6>Er zqPIetr91TZQa@e4?qchuDv^b|WS=eN>ZCK$VCVI)vS5DEtDf(afsEG#)wcY|t@X_8 zKHKSF+w-UI^j&0?WS{1DUbQH%4K(%Qli@EV(pZV58e&dTOWdydt;F%o^_0tOKdkB_g|i$EoH1#Z$A4 zq*5wzt(TUy{KjvaNv`Y6Lg_cIy;H5P%vh0cW})&wmOE(39oy*LtIygUSk)QmA)tr! z@E;aRC!Zg4YkHFtbD9pqvx~%T4CP<`*q_!vp)iA8<$za|Os1Zim#H;;>%d&ozZcPPMv|&#K`I<3`sM+AV)fTqxr6KA~&P)B|Bs2^7Z~ zi$o;o?LLKcqU7nFG05AD*NeOHmhy?K2uQlFW;QH5$Q>V>`A(L zSx8^~*cj5{x~?Egio-+XqgKiONLLbWYY300DEF`_f74r`F^jPj`p!N`r&8Xt$5xy} z7Weob_nB~-)P5+2J3bw3G*ODIQtT8uNm11&vY&dXJ%b6)*^aM?r ziDGtcaZ>E1@W^oKiC_j>WT(W=RAU)syi)dE(=qRin=o=8bz4bR)nV^Q-^UsO;e0C3 z*ky}d9>><8EK{k5n7!Ii^a{o=Zg8ks__VA&=FYHtDri^}aM{-;RRVTd*d<>ewxZu2 z_a!#t?lH7F)=Lb1TJa$os+&U8k0ZBKkf-TkXS8u4vvWC01!;6K-m$-;((mn1OZU+@ zw-%F-&#t499$vM{3L#<26pV8jqme_rZ-SXu>u^Q|(0bpdZpt1k+#@+XwT@!U)xKb) zygFxjau)O`7YQ}cew%R#L@O$mvl_t-N z`bkB^MHjN}oqUt;WO_nRBZ5ZC^Zq>rJ=Cz-lZ_E+MR#0TCokXW&l3Tv`?^+7V%Td# zLLQ_%Y^0`BczyA;=yjMSQ@>Sn??O4!#lu2@ZjBPYMyc>JWI-r-?19=6rI9r5u2%DK z<7Ga2jqv_P_~x4`NuIkz#1c);@tDiXc|A1_vTto)tg4kwj4v5HrlfYd;QcTo{`5E| z4!z9#lnUw!znmqK7=}fNPT8`sDM<7|lp3wR(u??PLwpLLMUE4#9Y2@&_h}=M)&`86 z$;U`!*w-IxVOA3hx-+zQ9(*5*(vmUcdB^KRILX}hBiUhf2wScJ|QOibjJV!xA@ z$lKl5F*wDjNOM=~q7@1j)qllMpGL7YH*6^_+?MIhLfWTN-?A^06SAe#N}s8nZ_tL1 zUBSrYsn}DjB35y>_Q`@@15_^aj*teG&Es_Z!aYJp^8Jmn zx((T?@8l~Jv9Cn;!_M`82qnyYSMqef_CXkzR9*Q~lp(j$65bsx`8YdoC)j^HW$p{Wqj zn9YBaG2tgk=ud3e86APqPKvTflz43S5h@iYgnrpKi+AiCdhXObLtVyqdLy;xiHXW7 zm*T(Nw`<_1YU+B(|Hy7%$5Px%B#FK21e0LKqwJ1h_zKgb@*oPJUNfu)}Pc zf6(w7{~27V`j#cP6(b#jb1GP;qpKJHK5(2Yx?ZuXH~S)8Zl|7qoYvf_hr0fJ!X3{| zEZc`Z=hNI5bh&p&DP4FYLA`EKi4Jji{^n8944XI4_$iC{4#W1f=VkE>fp5nx`m+W$T+wMvEc0Wiy zHEy9-#|T;82;41v7QUcx_Q56dQx{RrWDg$wqJL%e~jA-yz;ZEf@WPQX;~?0upXsSrbafEL3|ob%7$v~rCf~A z?4aj0x9gOFdWl!=nHR`)l9j3nqAzoml~uf2wZGWx(s<`p$N9x8uU+ZBCFE4>qa+?) zY)5knwx9l@oRMkCY)!nYF#f_xqR?aiXA-hrho(MB@>yiIZl{xo3I!yqCTH2H^^z~E zj>}CZPU`-kyNFD5Q6c8~@8V5WCOma;rGjA3?+-!;sKBIKYE*` z+{0x?ym}`Qn~8R$y*n=+AYIuv>Z6%!cAtmF*eK;*mIRodDa(3)kt$sKdzqzoBgyx| z205j5%V?dlw3B6N8<{4Zno1o`2s8EM_Vf*6^L)x+wF=^B!Qtb$SmSpke9I!v51uU~ zN*FFSO=aFkq3-86Ia#S!b!StAlU8LoY^Cfj-Y&}#^I3f=k2o^6E*i<#;6i;@wKtJ3 zZ1?7o>wRv~{gr1XL^jJzIoy{jnsaKsj1a~FGVTkjk8d@MN#BeV?B*s%CMEj)LUrEc zj!vwec1ft>u})Yux^M3}*N^;|Mm%oER&ONeb35%s8lP9%7Ee{G7{my1yZwUMh`NuO zaK*)u7_7i@QSrd4ixl-3w`DG$^yN7@<|dw=HYzR8NDfYoq}$4~w(vbsvzPr+x?N7^ zUiSOz3XdwclpE-Fr9Gkwx;^p0a)BeiX3DUhw)3R|`5gz9~#j$wH2uCXwUT)E#@i^Ajb}C=h%#GqSq=i(P4WZoI1t zy+*;c#M{svzE{ur3YFiq2V}R{e+upyJeJ1%La+Bl7mtEeRJ)SF((N}J!HgN+H3Kep zDv@{Yw107W?$;uRTX0istGi@rKDf6A2$mABE=SDNWqvJw^;ojv!K*9_YnL0_!Y)VF zo+rj>&V=%XBbrJ?4a_rZCvRRZP1}lk*i+Y;sbzHBTE1h;C^OyiQo7~i*WSdZ$*H)h zbqs}$z97x^A!n{YOic;v^a@)LUls6p6q$7df_&6CPc|E95G-$Vg2J^shP=W0=#9Yz z5mUGBq^INX>Oq;-LCl%*C~4QM2KLJh>`ey3N+j>D44n?pC0|ljpq7uYEiY8GTs@~R zOR`A+*3v+>{CI)?8?86SlrZMA-hCb+Npv?P1;olN?ew9?8r78M>FMWGCV7&nD!(T@ z_^#oarNr_)DRS*cZq`t7-*m_1=-|ZMz%hg4BfKB_j(%3terjVU#8w_OAd@Lx?v{UB zezs$V4@ZBrCjMoPhpsR;zg|*S)9Tja;GVp9T9HjD&Q+t_F+xHD=XM_QJ>q@q+2re* zjb<8j|dJvDf0Hhr)-5-F=Tmw!zS@!$ERn?%{#&)MOSqzYWb@gGjzF060**Ww?B$J-Pp-u^)}DL z{am(*eEViN8*Jc4wPc1MiNTFzYByfD1casafE!oJ_uHzK%=D9qo{HBKO+J$Gi-BkH z%%at6Nh`8S2L3_@-j7F!N9P8*qvi%qpra@&k?#}G?shC+Xd}07jyHd!)e5ZgHJLF{ z{5-TjTEu>RRonKax4G5GRFOwj1^1J}=`0Hsns%pH${CK*oo5&t%*#P&A%Nk@gw5q-Gh(IP%^y zTfS~3)$noi*chXw>tSgQg2#f z`nEz7EI9IvVTN2Ny~0dekB6Nh4|U1Lux&d?!+8uzIP8J$IptST@T(lW5ll>_@r@r5 zVW%TCl2_^Sjq6L!Yw8ol7Q>9n%k1 zADviim4Zpie$?9=-xJ{2NwPY1`J^rXz&<$%3rB0}n`{Q=aefly4EwiJ+z{%|5AKL% zdn)G5osOPgd{q>nmK2rsJ?T>m|8Po{Yh8RdQ+wSi-T1y6@uK0|+y~{|>~Bx}d|#<) z^(YHsVjXnp`M2GrUWyP&{_k#D;x;goaE>mxonn-SNO3IDU_BYc8UdS2?R>Yc6dCH7 z7IjI|`A3k{%Wts_9Btoo74}+`Y~^Q}Qc3wUZjsJerIJDh$BeJA!S3FbTh*CrBc*(% z?Slw=to$%oorNE%HDlQ3n=_|i0-NMUEoQP08b)&^uoi`_+PDN#eD?kHyoT*5);jyw z3bW)>_BiTDrtS89Jh&vqA~!K7;VE^t^{ffoTeg`jrw=!wwM{$!mcE-@2NeSbzYqH9Sg!I1TMhahG9S79ncR;_ubf3(RLaL`H&Q&owc=PRYS8biML1*nVf& z@=51@fV9SamK` zvb=OSE49bzz@&*_1Gl2B`tN;XL0k1iJ4xdG#?R}{`fp7+A8lh5 zY5$xJxdodPXyMLU7Z^WUY$2PMH&f8wWmkH~r{e{(;8!hmffJ-8nEKhP>s~6sey4Ux zh}JmVHr7sU-#&6B#pzB#1&fJSQ;pf;qBhIDkn8HHQ(O)U;rY*I7QB1PP>!z@^ULI; z+#iH+SI9}PKcH7x6~5Sed2*Z7iT%#K&pj#?WOt=mpMMy!n~TRF6r6wFUV=JgLfIM| z2jcg`rY?Jz6U!LPG@09uIPD(SDA0RGHbc^JiQee`zQI6Y__5)dxQz;V-(f@Kr*ONVUitRnPR< z@#Q@kn%RVZ@E>jLOmgV>te;QowL)dpw_K?HlBelQ8sS&Co=G!{VJ>se z{=}HMZ#~qa^5>qPt)JCBUs1kEwXW5lo9l4r(GB-oLJ0p^{q_5wy(+E5WmYAs;HM{b zN{`}*O-V>rKE5J;%%1e?Xr!6Al6PgzlG)g3ICm}2N0nHc*I3Rm^i5;vNgaz04be0M zwe+KJRG*)}|K#BR5rr2!NBDFvsWVmN6&suV(0w33|LTZf>78W5wuzf$-V^PKkIP-i zh!rdfpx~M0()l=0!b%N#_XN!`m$;h(oZ*@}7qb|Tx#S0q(^-pU`82j`@|K&NuJxK2 zcxEehv)@i2eK7U)pmc?isQE=>PMSf(f+E@@FAV9GBkUgyO(Ca`my-mM&hvh}_@L@e zg37qz2G=M49m`GnmeLM$0lMt#K0;StQ{((|o`q0EkI6GtTBiy>`#2RA8Cha+`@@M? zs`}-?=zg{GnTG0WE9U!OUC*sgDHQJnCOvoM$jM8?XuWYbcQGo&Vf;Lg za<3*?@|(g~rN&N89d4SFib8Wvye#50cD@SB>n}5D3nh0Z=ta)FDZR?(o0*;Hyd88U zKl7HAMwU^Js{q zjTBUOnQ|7Za+KZ>wW77o{72B z&Q2Q$9r;GabyxCT*sH9^{xkaJ&5p^sSHr?Aiv@fzeo0lJndsPR|DAvX)v9EWa z`DU4yzM%vz4R3^wpBNU<+AUi9bc-@3>B|R&$pXenYvjmrEH`}O-FtM%>x-HU>%*5{ z&aEhKy_zV1M$xV7e%dsrxhI=sBb_NWQ*ec5`Km)k=ZQiQga%z_)ffCJ0ynO7l&x$3qxBv3 z&b2c+(;;!qA!NQ^s~x+}bUz?YiMU3KbN>~KdR~P(b7mNp#?;!Rph4MZ9@24&--_v@=xAU>@&AsnCLbcA{^>i@V4WB1}>3foY^oB8A(3Myh zmdIk(r&eFu#5HeivxizCGcHr>QoWm3LK_pMbZeYnma0IHbD)ymGHr~+rcPQ6GRm?u zj)w&%S4Xb)){qt{u<V#^y7TR7p*hjsVbI~M9tEe>%hoDERDt2Mkz%!6{~c7 zx zQ@N7tq*pAwxt5`!mR1_b7+!z1k_)hR!pSeuX;qeSXnlG?cPdXPT)Ek;3u7d&4RJcf)Tz{PC%!zVun>`-tm2ty_e3Hy&bjWZx690C z?g0Hx@dCYKAZ39ulWM{3OBLBeQcUM7v^3>aOOc#qM5R*f|S@xjEki{68mb-h}B!5psPBxs(P=etJ+&g_9RcpsF7Lt`y{fb5T*A6 zOf2>d}XHS{_|&sJ(A zw9+e@g)Rqh-Xbd2(br3OmYrXad!b46p2dFg^eHAcX_|zWm|MC_`p*Vm7OK4>f(_iy zcehj4QjE(co6POu_qvqLd2cf=yGN&FH&<&@L(<9f@pZqz)l1peH*1-_#h*BoF)h23 z6|@~oy>aZ}z<09H{dOCbY+`#((&r?JFXri`#I&x71&}^}GJooUy)Jic!emwvSI)(z zFLsvupB|h*RG*2zuJ0#W@HoY>mHkfV8rSqzpNoA+jb*U6mq`zrTwKz=t!5r0a16Jb z{G7!)(1VF9ZnWf#c6<&uHGAeu5|Qs#N9CCviZx?H>s7qAPPeG-bhNJpM@@fAo&L5p z;N$o39Ua*g60JRl2*zcMx{* zM;X7F_inT$ZM7jc**Md*-GqEry*S>6$65OuD+L%AZqjlZ)6J7WH&7RPB*Y>33V=ZIri~KSv{;2iZ zaYkGk$IBdg-s?qq!$o^1t``X$Q~##Z@bYBRLISqAh73F9B|=MFdveRXRj1E4>~1*` zv-eRx2Zt56XyYedX*&yK6hihqrkoTHi1Z(f3sXF>=rih2_aHr6T0?8g#1E0<&v|+7 zSBd51+GXh1PV%=|Asld~ZF<^%Lo3e*RNb*R6LBRgxdkVfnWAtBX;pF65f@)d7?eJ| zS=V%$GJ?C6HOWkeb|=T!X~j$-t=wQU+3RBVjcoEuXSJ!sI$L$P!p^P9o_5Q%x49xg zKkLLRp_RMhGZN{fOeI>j;1+;Wexy)&*OWCqzBoCuP@c*G!KJV|3*UIvzgBXcq@h14iPRXR=6b>{7GCiyy>`&MU)^|R@_}(@y{_l6vPV={es|ODs%P0JO+UOE zwtGjn#NOTE_B2*6JEdIep5#MOHBZR0U{2%(^+&SDYIN_5nzo~;&I;YrU^rEq!dIK3 zXJ-S=3_IbL{l;vKW-3$u1rVfG41QEekdl(w+09gD*_m&5Cs_;NYbF16=U zPUIYXhI=J)(VI_MsVT9Yibr~_w-TPtmp+|8cB2n2mW8p}`*C)O9~v4D z!HyHH@IxOvkR{Q+CpxBj412vMP5RlTf`al_o0S#Qy05MF7Zn>Ip&jZ%HqG-2A5Sod znt5?--lPl=rs?Kd`j+zgjqe>w&Dqz59VRSUrks(ch@PSmQ^ zecD#-dv79UGwVnwInh2w|J&vT|0A()PkL9V_oa3hoj*DhBdp2u^8$9NXx9!l{w%4e zd%$=`BH5$0o7V-U^NYvkX%<#-HZ8ct`&@lFi2H|aYVL2-A#?+aCFdhNYEd&0gZ`6t zN^^E5uRb|urO3JB+?}L%>WWrf1&_b5@;7tqW8f1!ULa^ia=er!;H7QoY(Ehq-P3xb zKQQ#X&={$IfDKRfPQA{uYpj9dqveN!jP+--wYiKg6>0{Q_un=*Z(CM4!&w|J9}^|LaBEkT{kdQzckPq>$=RLT7<*;RjkxgR z8cS%-ZE~c$YQv(55E#x(Uaq zI^9=I1NOJ`q+6Q3!BE<-p9kPGpS`U<1^$YOjrtmRlgyOuk^|i{eJxzL*+sKcpOU?0 zhn^sk;+W5!^$LI2bZwc>gSqM|N#P9E_w1KlJMzeFK^3XDagRo&YuuB+3SN8Ow(vCS zxb1q`#|EEv_pzD#SDDc}tKZn+Rn$ZYylBsqb+_rE`qw7xk1%F^gCt%&8)J3LOet+dd17ePCfJm(`^j}5H|1mF6-3Jwp5W03T1%-h z8j7n~NHD$0@S}b=Cyr&tW?RsU0k_iA>}gR8)oFnuYr|?Iyo$Ip#CXvdU z6Vi)}Hd}r>#n+>F?yS;A&1o`IGP|GhJ|F+pwe6vDm#=+<;QX>yxVTQd-J)k5fLU$>?_7ZE!I2;N1#qDq(oj9n@i}GS!$>ozrv-JjS0-YdMJ{sjJ7E2;iaxt; z8+bqHwyp22ou5kNKVsj^zRL-X{FZoNmg9w~qvkgj&vRGcN&Bg1 zg6Y}6Ii4h@?t4LW^A3e3j3T|iL-R-A^KG%kNoC`oxX`(!pD8L{{^xY}O$yU2@;ul) zX7`AS_h@^xzA8ImAD$a(79J6lWUY?BKIBLGo~_5+S66u4_S~?qWyvm`D?|Sap{P5i z2|v~prUWI()_EP@{3zkK-EF?p6S>!zyK}`_JMe0A%Gq|7rUlj?*LrWHDxL`qUWWuP zU7UaN#EgwdLv9wWeVL3U#@(ks!yaWUF!?_A(vO}Kk+<^e$QefEe}zZYJ~`r8OBMGk z8VPHv*+@DgU1mMu53AZtnlrdOZt!08NJRHnHlnvztJ1fe#!0Y0-ZY=h((w2}JNx~_ zBmIkA9A_iK_-jYIk3buO8S_G>-a`N#coh zPvk7_?GKT+oX(!W?WnL(xX{hHmMyY2h-LY)8ck=4k;C58m{gm!eo!Y?8G_&D_g8vO zuXF8e*;t797O~LxGb-I%j5#tFJ(oS1(vL4~-+Jm;c*W#};m%0%T-uxk4{~?qeNWw* zVd}1VhYykW{&x!2b(Dgp`WuMEk>W-nGAfs(c(47sr>M{}-bW|Ll0Oq~qLP=F(@j;R z>ZtZ9eqPh4`#|wrTlQ3b=Irndtt4eC!^sM5w+&_FlN>))HPc_R2rMkr7obtI_HS;9_M1K$vquWe(zh-!^_Uz z4RI}jT}{axt7H+qdtciHXE=B|+$+`BPmEU(HyF_ERLK2WK{%V991D_DteCs~2>pYZ zsrYJF^zvIBwr>dLV&&z#fmG^KjW?ZTR+I*`4Es0cC*2b`_KctP*6Q}Y7PzeVrTqN+ zN7ZvU=})-8=24$r7KaO=i6b`xgEW%gyvLN4E>Y2Zz(~j(DcqBN)wTWj_|C}eVs*^? zk_a~VTwv~t)ZDRmG?zsIEC_<9I|w z08Qg&JW*GCHgnsDVGe7W`b36O*Jg*RM23q-@~<~(Kewb){TNkeH>d=I^DnI;hF*`ve$WU^G&_%jxk=>$zJ_P)?y~zEjr-x}2}5 z^}6Mw*zBkKN;0zfhkrTl9H4@t^n1C`_j0=)Mn&(^<73?zvA21A7|J zznnq&&D`@`3OTdZto`o!Uc%?r7hgu!S1Mmw&~Zx2#ox$c`;f;ryXx60b(W}3J&7wn?-_y5pAN))vTioT zM%zgjhG^*R!6^57PmhLtKdm?JxvH2}eZ)}Q$7C;ob?i)ZBTSqVQuou3X#4B9+sb+% z^VJ&yoQ-ce6B(_4yuJ8@Lv8IWXQaV~Te2bej-RM(NsisVSyCs=gjo#Rdq)S_L>OmVYz zLB`3l8%(K3R!Ys6rEtO%X!z8A>jxRodw_C0BxyDq;qjAq1ie{pkUTCZ`;csuLI8iSCTHJm4h z*;#vCRuU)H`NGWUhuzsZ4MkP+k`G_Hu)fTazR)DeGp;CjCDz1tE7GlWD8EHP>5?>K zop%*#nyi%aIuU|8t+n8%{N>Yi)b-b>j~Gakh|D9cu}tc(q))p+x<)FU((^uVpO56M z>Zz`>W{%f8Zp<%kuV2p0F3oS9Sa2%RoJ?lW^Q0&Tlv&kEFkSb26_zX}PVpEYb&);` zlXm28Fi~q-4DY-SiX&Pif<=V_Lxswx*hlLr2)6C!CNjxoD(%wmeeHC$1FhU|Uj2CI1+3tH8wbK~fqA&Xn&_sr2J`R&!w#*7QQX2+s#@l= zHITaQ=AkbvtKC6{+jy|L{oGUFB1^5%TFg^Ilue^cJ| zlWwqc6t!g6Tbi=eqZAfowCz+w@2Iqh#F|V1EO?#0YEmz!q%5>vRVdTu43vo-o>GJ58MNe(oRc|qDk{5>f>S56&2%i2 zD<(59{JF@Jcnte@V%FUJuAEMxsc&eSj(aa_BJ~t*zgeJz-n!?Yizs=o@1%5(Y2>+{ zNNV*}#AP}9uNsr&qas&UC^aNy7(Q#^l;6usIxmU23Du|PP=3f|9_@dgxNN(0zArHG zu9mM*%2J-Hkj~qe#o_hKOrzb1na(5&^3*q89AoRmT~$b-6wA6&D*a>MWL@UBsTRew z?T>GWnv-X_kC%K>RBnbDp8ndfmA@CAIK1V@fK-QD}r;AdLPIog>YvKLe&`PO;RTt3-_@>-+WPY&PBaI%GsWN0jmK_>@56vg2WyWt;I`FAIDKR=Sq&2tazSMFkzFaa zB;PYlSdUhrf$ijqClHmi0>LBM+5>(P%MAwGKVCb1x_!U#DQBvC1^mo z-IwBhQ?!YE)OGK?nKZ2uFCCeMVUXiF(6*}Y^20WQA|$$jP@q|Z;v(@2%Kh59di z$Q<1#dO_Ftvd3hm$D|<9NA&dTSdF`*4%Rt5%qupo<&+$2=j%ltwcX?2tbkF_ZqHPX zaidSu^FQ`1|8PBsNAU`2Gk=RssaZ|4S&d2ys1=XUn%_ua`nYo920hmqiGU}9)yZ~& zMuR(?FI)ODuQ>!cZ~QcSz8Cbq`D}DETXU_|!n@|P>7RZyUQPTO&hI8z75@68b&L7i z5&?PfSB`6Mqu-p>9u#!2)6XRzbEN{;=rnxJ`lXc95gP(^y)GCu|A!%PAUC*yWLhQ*W zURQIh^*GygfFBo5m`9k!u-c#gbj1ZZP*}wxfQx=@U_+E*b>jp(cW^+XKqWTAw zF!lMU)8B?T1#eBg*}br)rN46F373CZ=gk|&Lz1s;H+9yJ88_ADSA6)8B`-|>t0e^D z1fSDUJ(547S?#Wt-|8XevprZ$u3SF&nDg}58Nr6zvrAv{+*Rx`9*>$5hF5I$E7Pk3 zTM{NDDeg1A3c_4iU&vcqXbu$CHdtSH*S2U{aw;NRcRg)<>_l>4!-dao5@mk(AIwxd zyzj@~@uJkvIV`YE!{kT5gK(ME3cvp9)+wqQ;Sc<3FGkd3GMY}8S8m?;v}M{mc8-Cw zY_!48wsbRqV&y#R)_LB=NYo0muB&G3TXvbXZx5E3u{v)(US8j;^3;7TZq8}UdG=)l z)cxU@&Z`#;cXqnUlZVYC_gDBrKbJkKes;0X`quqGy{B81{bWrc3%F51Gs^i~?-eKP zhgW&4_a|ujUP(_G$_!*_y?(VZU+#mbTXjBnFDMaPThcrvgegh=^uDR5t^??_obi)*TiSN0GeTyt zGLgGSa5=Uz`ew+@X<{kX?AKw5Cias^!8_MQnp?Trj(xG}OktT~6m+9(A*E;Pkr_jM zsgxvp&RnwZZn1C`x++C7o8e-X5$o~5srbUJr@J*mRej7XYZq}VQM>FxwG9nvXUBcS zHlwm8JUa(BEYgo6-L$hj@9ch0^ll1NKu|@Zyfwz2vvizSOg~bnEQd!S3YIs-1Mf|f-VDGg9rQFa; zMaKKfgMrf>RrTRD_0X!L@1`yFSE!%7rcMyNUcvfF?x>kFzb>Spm-R7crpBqRaxra`#g_LfZOhP^CQPnb)vNCokY#thQI=JB$(r`M zK^J>#`j*Bo)6kzy?Kz8=cmf$#5Psp${A8m1kPGSI+mSI%UY9gKp`K2wWxR>4kHa4K zx_aXJgV z0IiHNI*V)WkBT=AeEq{d;eyoKRjs~n7|nNzk2IS@_brUvsdXHX7{e z8wgXCv?0x%h<2{ZRNaB!$f#JPv5}Z9r8G{yG{|**d3==1?tTFGYw4YP=yFx(hU=;j z%Nv;_UmWs%WFN4;_@bxJ62x{-cg^!@^ZIwgImw7c3fkg3LwXJ>DcYSgYigW6-}sb* zN_7MZIy+XsJT~cw8k?u|)|s2V3o~{#LK|(Q{p?d+4{n^BQ?DF$c!;|6OYg(J%pJOG zhP*a8QJi+4N@J!nkyJw86|g5cC(!j9cXqF7&#?bY;rnscn(CcnxcsL@yAHoGZo!St zYvqbX4`mE4kwADWrm>gAdHu zIrYcQ_7m|wwwp#MVLy_-0#S zBM-Hg@QHq8Gm@Qumh1R;$*MBSW8d86^XzA~SVZO*8zQpaZoS^PTr07E+90lN)NKj+ z;A>Eq_2w0lZq(zpC55-^o2~($6x#c}2fo&%F!3Vy`enZVup+&esraJs($x=|4~2xA z1Y!R5eqYsw_ESGUWs~tyR6i|DtCIDcVn4ay=Z%37Evj#oI$P$R7Ya^%`+45~q`uM@ z{+8146BEai3f(hrw;E!;n{~TeZ|=0HEC&s$g{X`$$SFGHZ$1p|fq6U==SsZFdFsiX zx(Pk$)}LY@0)A4#_Hh-G{XZsRTa4F)U(WneAfGsIaP@8t?Z%xG-l^Ta<2COWGn()= z{>jxXtN%pR#8zb)c-$~*E&6rSf9mw-S4%IQ&s92?Z}j`}U5n4PYd$jloLX15RC{t} z{;Jln1@qs}swuSnxx?}8tM$Lyl>a)t+XlJV%>etd8^$H z?kX+fNzzZ;>=Qk6)?wkIBZ}SuX6gw%azD=@|n2S z^p_jL>t|_R{J8f~pHuoeH|0Z3MjLo9I<0*za)dR?_IPuCjm^J(nV-JO#RhH;dDp!3 z;!1z@8>&;Hm+k+>^5zMrJMWJL zF5U7x?uuluuk5m| zUOuO**Yxb-J(5Xn6Hhy?$-8zqZP|+j*{*(nE;$}H{+WB4|9Ry0x0>^xtlbv7`oF80 zYi?ni#NMSFUYpj`ocNy3le6-4#j;pUy?ljD?~X0@eb~2EfN!T}Xy5rzrbQ=qU6e3p z{XU`5`p)j2?5LB<_of){WZi#kTfO79Jl7!MzxDy%j7;LpTnr$fpYCi2Wze^pP z&pgtTW?)zVyrNnUZWhR;aoEg)I5Qu3+<0F!l&rQeU_S1)7 zX;;Yr-41lA8jAS_z~q7CRDE!OLj)j)vJ)3L-Y4{B3 zlF{o8xC~BD%_GV2%4B9BZ2v5gl0m%8lyAO)va})Ct(}}T#t;xf{5SRxT zFv5y=76Ds8nVGl@?b$H>oeeNSEdiDoIw)S5y$P2kDVasUQkA4Eu`H!V{2|a99bno* z&30xNa9M*WFNpIB>KzowS-bchPCHO;q(CWIS=oR=54_4klwm)xa-8f5%*+e`>rC2+ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/files/plugins/rabbit_stomp-2.3.1.ez b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/files/plugins/rabbit_stomp-2.3.1.ez deleted file mode 100644 index 4a28b72f832b0b738a5ea30cad7f8897e05845d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 55937 zcmag@Wl$VW6y}Z23^F)_5AN>nFu1!USdd`B-EDApO>hYw2o?w)+#P~zaEB0__rF`W z>fXJz?`~JMeCTufR9AQZp6=FEK|n+U{Eq~)k&*bHjsH)92_OKtnOj(V@-TJxaCUUz z)YC-;AiVpktoA>$o)6;x?5FwvYLEN>Z*OJs$?5;y3I2cXQ2u8SyOGh4Lr4HXD;NNv z{ogwI{|$@7!phw7e;Zn}uCFHEJ81A1Ow{l``WY>wDjdx!CPXA8r1e6w&|C^1YKK&$ zOuF_lYrIP`se2joSRXyZ0YWqi0;^-7cKB%qYP$ov?}KLrH>5+H7jiPN@B5(9|BiH#k?Nd zKz$*=!wyh|AqS_y9}w$6!1whD#~lza)Q+iywc;iW$3e!pk&0twag6CU!>O-)D5_xE za@TGl_3D5v$s%o40^Jbxb&;M0{lig&3uNRnpJ9TY1$L5t}+Pm#kNNfDDn z;p2CoJtFfM>MWORO3U<0rtC5IoA4cLQUmi3DAW-UbWiDMDmnoy;vRIKaTKA|J*gIn zz~nz~DRSn*`fslSl-~q88`TISX~V-3-XN>7!uXu06A|yfG=3aLmdw&&VccR%^--3u z2~3Yu^ed%Z-0`JufPIW`An|6T@{>QEIDgN4i7aR&o}Wd2dNHb&y3Qi``J)Salc<}> zp5Ml~!^El#*3!F(8+L{4J9(R^#tEW8KYKAE`Eh63`O~bA=i&vfEDx1gH!aV}zXZR3 ztdjp~N@0SIm)&Q3fLWnuJ!Vq1?~665b%G&1NK8WxV`ngYPsN9vZ^HS3LRTj7&Q5H; zjrS_R{;SzmAvG@w`argDbq*FrM@LT1CD!EExx(V9V;we!6rP$wzCb!n#};+${Rcyo z$t=N!t_#yS#DpB4!+@`<`Ft~j&_;&r1d>EPXml{~Vhw!zRlz(kKGYxepoM>tNi{It{5h43atd9TrX^UhvXtV8u?X`m16Dqy3~ zyOzDfTGjh}#=WcH2X3%fx?jmIJ;W<%&8NZT2@A=~c zA6vnEd(9Ak?ss&F#u-T*%B5uk0=wXUDaE!18<`#43;F+0-`t7K#Zga0zqT@p%8m|s zM*bTYJ2&94TYnOfgm;?0bEKRc7w-5LEP3W~F16?8yntro?zU<+HAFOTj~h!dV8YhQ z5+~GB=^ra5*)1xx?F&xCEEMTZ&mO)92TI7Os zUpjI<<631j{g5au{oUHnhqSsgxpgBFc?ymZZ^tpAGlTjIW?XHYpLR(rn>R2Oldat= zf){k3tX~(r)v@jwvj|T{bfl3{{(SH1))X^tPrp!@YMDbl6hGASj+{b>cpYvDE&jG_ zZP`aul}VV^dBe9c$u7M2*>{1NTxeNLN27qi|e zLK8+Iwn38C!Qnd+FWZOx{^+*>`p>U9i;^`}-?~zoci_(*O7iONqYTC zj4VPI8I9cJD2RC0Z`!T;()6vf>s?>QlZ|S=L=NY7Hf&d)4^N+CH#0|Le_ZF#WNl>%%4%RQ}*nqS|dP zBGK6P>9kh7Od(HzNNt=qQ@&X+W<#Cq@qkk6GEe zKZH*Ihft3H>nxdmbogZD^dIIuUH(rr zwf~Q%_#3B@r5%=P^@V4@)8jLxl|q5|{SAdmqeeIt(E@wl;q)3_g1}EWKyn}ff!uhvh&|*+dGniEo{Ik zEl%p?ZNl(81@exrt$|LK;>1BAQr{j2Ds}o8j2s%yj;2Ts_+3VRvp% zLZ(-tl^a9MHEZCk`^B?@jMp}v4S$IlC~A7qlAE|3hL_gk&u~llr-f*e;J-u8M^H-fxun#z}>go%hiQwMV3%Y z9GvjY20FIL{K;{`l+?cHzq)>_}Gtb*Y~7xo9n(KzkwZjcGe zK|hhe^7C(M@!f}F)_Rx11)j}1-IbKYCyyF&?q4p11cU5gHs|WO!rtz>*rHsgJ7%_Ga}>Ht&$jaXqu1H4Fi1iRTEQK>xX@ z-b|j?30()FP9WHt0ic@1XIo*3VWiH$ZceI3XUzxUL{-eFT?EBQ$AO4a{n9Rdjh>h% zbd%5-z%h)=#DSRw26g>fdFoe`A9+|kvyU$qwVjdqFJ~RIx!ID zKsOsBXxUO_ywzI#Tcz?D`yQ(=%>)IGQm&yaWrQv$5JWW4r$i+SKfbWCQp1x5kS+|3 zNUolyUmqO$sKTO)o_t}Mh4>A(>yIP8rn4r)x~Xz#sUMu_v(lM*a-#$%_oj~$;ul}? zeN0i>YOe^jfdG+7T`W1H8)e=CKptLbrW)sm<+&6=9td7pO=WO^PhV{{xPizzZ+X7` z;}waIyR4Re=GjV1rnTK9F zDP0(2!IEScxtEq<1dcZpuLyL$=EbwZR7Ma2Uk}v=Td9AkXs&(Jj8aDr*fas^=hY2{ zV_6|aSnL-nXY3wpzXj{eCi*{V6`UkSFif5B|E04&ca9E9ACSiOTB4+t>=dRrnhMOE z^%E|%hd)o6A`F`=5b+2EEev0WElwaMQcmo(`)sl;np(Ap(SN?FL-J^oxO4DmdvW=3 zX_32NSYKNCGjigmce$mJ9jP*|)!MS0hG>oXp2)iw+Np@Pj1MGW^%6_p@xz~wnHLsD z&ffn11Ai3XBz{wT$ReGxQ_l-tgu2n2A6ov}s5h{n^IsDdPYtZD56(Sa(wohoD5i{h zH>~k>!OQV)&GNCZf#l=4C$I0}L7h=bI`YG!+CTh(&tHEtOC`m0GB$7^@%_jm`YS$u z?8zi333~XKC4VlQC%BhcP!r4`yz{QP*yAW6>dUn?KbhyMTjMv&r_R*;pQ*sEI4)BM z@oh=g398{ktU6}q0LX3^vfmYWLt_h_GA8P(OMbIJ-ty1ZF&?8t4a;0M8l-H^- z{exXp$YJwp8@u5P@2J>w)vg}J`+a}Y2>fqt!RyXOI*!stA6_aC12>&dH@KHm!v`Z6 zy#L-N=@oERi%{O5VQH={BL*L3yq4dhkX6s@eygPiJ2j0vW*Zr{-2HNvT*v$}`==WG ziuAuSLHxJMuc-g7dSaLW0L%ZK32s*AmR4^62OjA88sjYy=8yE#$%e`>AVRX{VFX%0 z)P`uTaC#7q4xyG5^%wx|ppFYE3%RZ!)rUj*x_mNAB|}0Lqi*FQqLST+WrhHI0u`~cT9tr7t;WaTL7EIi zrT6=z%9Ut`rO3Y?#T);jM;cbmS2P)t&rvPWkLekT7r{b?`ETfM{iY*xHLY=CEe#Uk z)7U;!vbFT6428-SDEvj-E|RRDV&+q8u!SF$Fb-`*HEZ>tda?~UXN7#zD~ut-8U1%H&@{jqDS!YeZP$|2{s399TE&)U8Bi# zNC;I)BUvlt$%q+mL9w$`<+tq6zKlq1Q#$$-I%BO_PD$f*f1m>#H4ph_iJ$izOsKW} zwNMomHIA(Jg|598sZsyB;W28Z9NLjX`q(QBRhL7)eD6T9cIE=IE==5-BE)Yv=*4IW ziO8{`NH{h_-XCfhcm}#qBVR>8r&OYS!&|>QJgAP7@I`95!X(0F4hZhQp8{Dk#R~^^ zeCkilkPmiS4ep?GGf4wwj|f}REdLp_qTo&U5Z+L&;fY=1B3Ff(MXuYdN#$Z3d=vt6 zf%&U?b?*7lksHij3|zvyp>msyzf!Qzinzk!;=~}xkF>Vq61Z?;timz#!bIBNRx`GE z<4^~EfC8gCboy$N_B%4qWQP*%yvR)_VGnW$8W#WnGy}W`YO?X*0g$06W{xQanL;=G z!wvr?URwYTaT}*Y-`6Jmz;Q{!UiD>}X@5)}3Mn6zUbo*Eb$;#Nxeu}%M;V-|6D|h` z2Wh((mLWSFC0V2}Ta@+Y+EDj=ZL|Nw%*;HSo{qa<&|33b>(s8+aQ3tz^1gS$Z+ugD zLUO#POi+!*P(@++D#6MIi#T>==2^0^c(O|-YNsmc4hf&U5dWp)J7?u#h{F&(0t~A9 zbZlqnd_p}L9Xq!XfqfoLJMb+nNh zN7wMG?}ddvRY+$nr>bkg6f-}}bx#*2AKMzv*c$b21UQp$2Hiz+^6*I0@KyHQecddu zyDJalHK<%Tlw^VUw$R|kx=*F1o+CF;zPtd1^sRNP@OJ|kd=h@x&btqiEbydiR+hfa z9mexyXuo1dzTV8`=6~fU!B^(N`+ViB>%wTMoY00*GajD$nt`UAU~HueL5r@WvK(xB z-4!nhPBlQR1ec75BclxZCfx{}R3MjqRxBT(iViYSPNC7ZuPpGecq6+tq-AF0pZ%-Ol<`L%B-)NTf5H);$Z$~+4-P3~Y!>T_u+^jUaA6beWiY@MR zNgQi6D6+(|2!pmo^5Q6Hq+2WzcTY8?-9}SN#|2|yc{&d_8 z>W*pY#|OLp{@K}NGy4v&fYRi}CCFv2?P+Q7y|1;4kT-{r-avc*Y?mEsU-hS($~Iai zTxa#ZbUlvA-H&#-8R(=*2YZ;P<6k5$J{MQi#kx~luoIofkcrKe2~al%B@@(&-c`4B ze`w+>qc2b#`-ko!BKa(p{A}>&Og;A%Q6V4Za~=(_-c;9zyI-DlcxK`0E2_?P%e^i%Uvsyy{#CRp|Pn zYQ1z?AoQ4Te_F?i?mw@7?VIE#v|fFo8_PfRSi_92orK~7D5uvt zM7*u4>W0e7(&|G`*32Kcd+Ikun@+#bhj$ak`K(Tcn=YkKXBR)vDD$qx#TNCYA()NVvqa`aTJGt55lfw{YOTt2Q^$3l z!On0m{qF@2DE*7*4`RFhrIy-{6!8lM$6{?6`i+4(OJ`VDr%Hl}HCG-SV&7XD*A+b| zg;=J%Ok6JWDqgfsSle}e1hrj`4ab?N1TfY**oPl+S()MMs8*z-6wpO60D z<|(!=nfBxtsP6Q)n`hDi>UoMud6?-ETR>x}OU)4hYlZpXSZb4GIbXG1x5D{Z{`aY#@_$J92!ER~Bnkl$5{%dFa#!~kC?$Q^{h2l@MVIR6~T0UFSlQ$}C zIHSA;zOD^mw2ujTch~#sYRKB-dGothQ}i#*H*&N@PP}_Zz_&ILC$yjGSF<28%e*jB zMx5tCl$YN1bQIc`@zv;TMbOh6+-BwY?0h__>E*-O+EICb&9J_S@zhV7^24Og_)A9m zzeT6hu5-urxv|!X2}ABwB27riajf9=>$TL$krU^O*elbfw^LX@^TlLXk(q5+ zRNQoY7qqB(qc^=ZlAf@jtXRFn zZ@?eLt<=oa{`8PHmA#>``S0QNb?I;Sx6P-Hp@ZC~wF8NNLFev@tCy{O1bVQf$jnEa zzW`?q78Ybz7M3b`EJ;y+|0MuvFyQ9<)zys`)x(qj6ZH$i=`+Yd%(!zcWs;7QG&t21 zGJ-9a^TYMJ@rI7usgC;JC$iIL1Y6@yV+32!Ge`*o7~~}(PzqTBh@=)oIODT3J3so2|OmIc5~$ofGPv$C2;9kO?Dbc{q5&*AkUk%EpinyE1?igkpwhoNU7 zZI2uZLlF4;zh%f?)CP(qb0ib%cu{JilazFpWEefS z>@|3uH8l&V2IEmJ?P6s?BjPE!VzUKX!6Iu36wraRxq<&EX(qX4EPTxA=nr$W_vVYawB-}{J ze3k;YBe(t*0;x%T1%(^5_-+7u5&hcyeZl@ONbY~p8g5)X*HC4I{8oK@MBDwi{aYUq z(EV3`hY@#cZb1_13@Nci-*E~wqdzU0F;LgoM<17&a*I`aS`izYY&5eh+gmtfqCbmVC!)<5n<9aQVkh;{b7) zBLvk&Nvl*mW_f`%WDmok-H{Wy&;eJIZ6w9qsIhC~6=irj9|nqis|l@Ush$N;cYJzQ zqEN5sHcquS3JmJ`QS?Hc73sCU554CSZxSCFOF@3@eH`KqnR`rr1{o{8;@e5U?_e<; zY*;~bTXh1K6pBEOjbJDOKz}rMNiq#T_>#5_NdMg@CAV|r+zBCIlhOrtrcnI%-<1od z+1GnSO*Yh4JhYvGNL;s~_E)avTD)NS>(e{rrev#^qZdVp9By~FidhKl9&xZ3y6h|# z>5P!Czfdt;{tP4z3W=v{_%|2Yia}QdQ@*<1#G(?#Zt0d!Z(Z@4Am@!2eRQ$W2E>V@ z`mCyBv}%|ESefYnJ3ip-h2GUUJfA@JsHt_T?Ga|0~ ziNq_4m^Yr#^mxQ!65Ltbw|GYK{BctJR9p@q*(f-Qx? zZi{76YtefI{T+dXFIPb{E+Q-}K}4FoMU^dYMA$3;?Km@AJAGdKc`$R4uLdt!$2eq0O4Hy-_Y z0UNVXk1wLSkNdrxPK^kmMmj$|4=Mx&O7hDWW1A;8#HNG@Qds`0h_bkumRqDzgipkN z?`^B_`zQ1s&tzM2jA{V#zRX0dB~FMOE|-f4-zZ)t+F%W+o~8_^^%}((hJf`RUUC&n zYerf8y&pv@Lg<&08CTZ;>@=L8DG^#tDtaH6AjFl;lz3nLq)--$UoKpRum0OIUVLQplVIT%D~E3FT}rd0i*Vj(WVV-d3Kk&`&91N)2NA`1EMx>3 zzzGnvFt7 zMr4s3q8Wt%l5o7|?|g{qlw_XI8w8CTqt4oDW?`%vy&xwA-WAyg3|Kp&n* z4+Eku62^BU)B&(0io%sEt_u?fD3&O4>#^|*vN0e@=E_``Ynm?=b09&s@c$$#wD*^2c+0!Ag{$CJjvstP2 zUP)yP`g3d=1bT`xiVS^_{3ndh4NOcVQ&L62?rwh(lpatdyX(C3LP&SfcEE%SY77>z2P&C)Qw z<~Y749x5+@5^g>X!r*Rr=}VcxN_2R0p?l`su`9d-t)GTb-@Oie+crI=c#AW^tAF<- zX|#;HMdc7UEHQxWNPyU~@{fo=u%70)fIvbtJ1$&bF_hrxjSH*~P5bv|^ODltDtt{O z=oie4z2kUZkViApQT96VW!O}d{KcMex7&;7zbfIs>UCAM|4m@->P-M|Ioshl-XZ=p zo(vKlxSCCN98VUX8{bY1IcVYb=7m2ez!9VlXL`E1nm|m#$+)s_79TF&eu-Ui?qj}L zydG|jQ@%LwH@|-I-3jK!uKbd+Tfi5BKieBxA$CcWW*E#}c|(-u7tHN@>pZ1QZ&Y{a zd=m2_XY|6k(%)@+@qSqAz_Zp&!YckDJqph z8@f>4_QAl#)Fu^QQ9zAANNdeY6XHVcF(V=)1be~l&5)uI)iB@{BQz?Ukjn5>po-;| z{Hh9K4=yo=c6!KwPU|9~RSW}qLKmPvl`B^+8#&=xM_TCxod`TFM3%0@?`c`2I~Iww zlg}SYUE0G&#w?#a0I*|gV1p&<4kO#@0<#B-kSdxirPRv807LwwnoOZcv$n+9X$*Dg z&)~3(Q20X_bqTtg0EO~e1FTZJ2hB~H$>0z%^$#6N;hrlK5>%Q( zmnpe$6%jFMOEUwTnJ#qWcnsb~VQ-`FX%7P;Zn1lON|`>J$x_YQ?)FgA)zVgnrBg%T zKT27O@PRl3d9wJuG1x&CR@8kXAW{d`@9#G@)jEEjkBm*I8TS_aPr7aUMU=745LK7BASIL)Z z2SP57WB_`=`z8`R_~np4&e~fm=dw3H+|p2#es1N?q&|c~ycTi)_45$iSCh>aZUM)Z z0}Oz0BB=mur&4T)_^`@dO%kr~$CeK>usTDZQe49x#W+PmJ8U^7iU!RP;RMO-9<)JA z2P?i_LbJZ+_@dj8t+JY}r^Zl}1o-YOgjyit`y--0NKyH-*_CPHh=u{vrA-lGsib2e zK0%=>Iej_@L@kT$GXextDD4}<9`VnfDGzQ?&s1^GIyGiUNwV$NVH!dbLIFbaP|4h6 z)BqJ3iy0!NOB#htD#Q_ybg!bv1ffSLWB_sAGv=)s1rXwd^|5CG9XuZf zJ_ZVKQIn!$|ItSzw1_f6Ewd@cFf5HkC6LD`i^_>;;Gy~!Lr;bM2eu*T8;A6x-n&Hdzl0wG5l(Q((ZJ7kvUk1|LxORg-20tR%sYtIggE zr1LUJwt(9r#?t~RV3$eA%!{Pc;;=*;ykXm1iwatoJsdM{y?HI@&TxTcN39cWp>Rpw zu>j~;o)iuxSY!YoP$CV6<6@wvXBF+SV%&?N*#fW;_GUB}Ua>LFVPOdnKrTjWJdW7!{2AP%@%SbEQ!v})k5^P7o=YnG-pJY{GbV=sUTgD1+1MGO21)XD>VXIzSL$$N?L zTtK2cB|F>+ANLROuLnedktB1+<59_4(XcWQQ2K!8Ml6oBRJj$2w2(wKg=`2WefQga zHLVIC)vxMso_Sqlc5N9vH*A?LiqFX(c6BOS<`~kuE6h;(-k>}LkzAn|z8KJ14Cr+$ z?lE+DbErQ2Oos%_GsI1Uh_o**FTlygik1C08$qbO=myA&@%~fn#_O7$;C4pB*3pRSRjE+!vm{!0KJKe< zNdgcvEl+?KK51Lg^(%y)YX42746e&C&5Zd=J~MaRcI!%BcT4|3c_tY(eMXgfA{X#k z7%9<^mwp}x2ttoNY zAS5R1sOoB_Lc(@b$PnU(utjjE6>&*WLlW_ksY4)$@ zs%b*K$g$-k{Miqlyx1E$uaM|?xEPxZw`j*Yb;N{7NrR;ui-9Tv$u%uz*x)UImok$P zY=O`Ty#g1gSIA;?-Mm5Q6LLn04Y>sOV%jMfZ6UQ(?(u47Ly)eKa@|lK?QyqOtwP1A z4(ijCz-~EPfVJ^$jT`{E4OXFQh!~|$4OfsTdSf=s3IwD^6xZ(g!MTYdW`N-`{X2|5 z-F-bgfMZ0PYmX{kKV%!Aw2wkZ3wO_x?IKE65f^*#0=OZ_A*e&pH0v92M^S(O{xpP+ zK8h-ej>JNN;6{ZS=>pe;=No5ea=@rL-Ymtq)6rcsLl~w1(7iW{FXEMM>w`E=gSOnx zRSOY8jD)_<6%{nn8%gx-DEiUvQ>1QEZ4pjey1Y!K_7CGIO*zTW|qt>ie1 z^;fnmEK@u{BAhJu4(N8#gXNIPPnM#2q^=X*YPrUb3f_KzZNib8>kRu@1OUt@J z&?@IkZ*fQ-19r$WuEL$l9*~^P7cW@`M8zo^>)5S`2pdF0ycL7{g=M=S#xj~S;ZR^i zN1oD=fN024L&$zVg7$3E%>a=gBXAL*^9$_Ab*K!nNUfU_FZaI+HbW0qEi4QAQ zMOpdrPMEd6#Dj2~o0vR7r zbj-mXF%R=?#BEC-8I6!>3HWr!RLtSfO<2O=AW2lh0V$#-644CLlT1m{5%S;@qHQsi zD>=OQLS>HE=1N6cbTIL3k#OQ-gc2Z$G1Z!LyZ?u;*`5&^MtHwjmmF2*VT^(_wC zR12_VYsEso9+%W`B`RzxKtx1CLRKM^G70ZRpQ;s2M;MD+j#LV+C$qWQwE7aAcyov!P^-Lz*Tp z7NNw+kdNsB(fQ@+G<$a80eLHvac^V!Ta1~=2_?l2sxs;t#6r3(bZ#sLd#tcMRp?GE zE(?K6+M_~^uGsY{WeV?`)%jc2ut9QO1ALzrzVDu{xg275CwV~@uW+hZTCDMcMQ z8ukr*cvkayES#67T*|dtl)ewAck=* zmc!GpPtmV0VTO*mR=%Zy8WQOQU8RRn^MT!raYQl-)u@iiqR2GCDnY2yClJp|zyV87 z49J2Y?FKO&EY(Gbphm_XvRGWi01m^FCh%kU_Atd7)X{V2&S|9~KyEoN$=O98LPtsE ziz!mLSUCMHgj$)JYO4%Gq;>IfYq%0|$IOIB z5z6xgaV1*$3*deqK?G#QEF8pA^k=KTnx^`F_A_A=yeZy>*8QoV(HN@yl^~?duATi?OP6vtccR=8AYbo73T_mk@Qu-&`ZiI z%cX%{mysnTuLy9XU%Dcyqb{I0_}CxBxS=EPh5y8Qx!V?TIl!OCv}8F(#&9)3_0)M! z%oiHTMPMug#dHY53nEL;vMd8shmJ*HNhj3cCVw8bvqijx9bw6=-6OQ2x}fYekPZi+ zi@-kvp0auhb5Nsb%LTX3=22oLg)H5H;e5AG+@thZ>Rs5!RP((inHaOvMKd(g57_O2 z)QqVrw6Hp)VsySGw3ks#pNAIIOTOTah)6dPK7@sJ+>Lz z+H1mCAfOB6a1D6$q#~h4kP!=~f^`T)QvuMZF1h+?0pp+^FA%QGs|i&x0<59;M;dB^ zglyO`$idEn>ZK22Vzv;jNQkr3MrKC{(F^kBE8xKSeIV5>4rTNQhGG1EL9gqlnbdGI zG)81LQXd*uE$#cI^+O#$TVFD zs$Jk062McB10BqlCd?irny)P#h-m)L^`LJ_;c)we_F>x|HAbGj529jGk@Vh@T^RbF zZ)6*mhy>(oqnMMjg`?B$U9ALf$Y-Gri(mi^u%q1C0Mb&Z&7c;8W#V<#)e9bxy?1m> ztqwoZDmW0Sl9;TJxLRmJPEx9w)Px?~=OAe zYI^hM!cSVZ(t(a>U0Ak1)4M2aqr6YY6yP!qP|ZWw6Uq7Sli&Y+laF>m3gksE)x3v; zEWm3P;Fm!BR(4x2Q5OfV!)Y8olIdKS``4P65*eY0t`jWZw?nj@2^)n?XYdrY=%aah z5T7l#=;cS|z{3k}TqYq1Hj&q5f$EVd;zVw!J8@GJ`7N*a^!OTZY8^PF^9XqX#j+(k zf7pa?qHNnnz=BjfKZDw(4VL7OWZwJ%hR6|v;?uLtFQSFtbq>FW4E_ugKrc%IB;-q{ zB^G-hlbgEDVcmkndYrUv=QXz|nV$L%w|9~$b#)FqN&+g)INIBK%42^`txDcj#EBMm z2UnKHA28o=-LrENT(TFPzJd4*ud&{_QA>8o!!}VtJW#QObj!!K73GW|pE+@)|g#jeI2F`q@k-dURpkUAn2a3AFTo8Uh zBeUOW>B_4SHFR9+l=j|QYwHYO^w$>Nt>!q9_I-f-UqTezN^X-(yLL< z!ZEi={35%4r4-qb>qxzzFZa1V3OTa*pPcs2Ig-uVa*xGO;un_nqpT-ubjsSvZYzqn z-(IGlnLAdE&&;#^hgHrQ9-r}|y|BI-=dGAx=Y3fu4XKqp)Xp_LtKVwl-u-8n%U=7z29g$noD!tjaRT14$po^ zt&6mIE*h*!HKgNxe;n+`eNf|EaFkirc1#WPz6qf!Z~ZGZ$0{(VR~LtlWjZyF#$#*k z|NRqv_yjjoh9vC~kCyOdiqV>p)7j|P43Ek#-Z=f1Zm))4X->7tW!L>CO7AHDERolt z;dkx%e;RzTSw^i>xRE#S@~KX*FbsC$#uC3fZ{c}3XeE@m*I28)m<i*pJ9mRkKj!GT){110gPUyMvCmM?8~cM3}TgYDgB zzHX9tu5EEP3T&4R_jz9+TQ84))ER0We||5-dQ{(JqPIDf_R+T9Xy?@ZP z{u(_E8Ij^S8U80%zIuAwj{6ahZ8omT#6{}~6?MHKjAE1GcMjhRq39=7ux$GEjCz20)Q2u&0si_Jv*?+o${t!_LO@xHp6 z`15Bs4jeU7L#iA<1yx@=U4JvCh@5S6-VFM627w|8BqEA*b`G{8uQcn+smFZ0wq&-3$Vd!kp0Dh!M{tq-A*OS)}|flrlI0N#&#k!3EW_t zT3*!yHo}LXR1%+46rM`>4+P!S03@8c|3u}@WNrs9_QiOo=*_`oZX55#*?5BJ&E=$V zCvV;P|7dPck~Q;Eo{z(Y@$>y(6|mNF{&8s8wrD?2uUJo~GTo9g1)`K=HOZop&8m?t z+_h=T9nEQa^e7x%anobZXsc}7f*SjGi?6ngwci=^pJ$oBESAxx!h z#5^cu_$xt3SP!*iR;Cq$8O76ZvtRgRO4Ik1ua(6AG#^iofxzT(Kdofs3X=-*$}Oqa z50;)jMU@^ux$L!OfJc4=QAvwCT<1;@P?-400LSox=yX#2zGCyPDPx<|DDAPYuoPSJ zr&*ZFVdqHj*!deJV2%3sOx~z0%kZQIOV6Bw-IH?&{V9TpI2k>`-W3miba|a@VRDPszLq$mKB68`0}eK$ z2d9c=yuIOZyu6T=zP@aJQ%ZdnTbn<7ky5QnR3O&s?XRcy{YPWm$R>(lQk54~&{}a4 zyV@vgFdc8opy`jsXKdbg!9UF{3Pbb?UEHwW>gDH5hl8MsgxjklmTAgXB}#x8aKd$&DOyO?67zlTRZ03#qkQSqlOGo~hXSwj3C}H7AgN zPGtR^DfIbvDqWmvkhGQa)r7J6Tvb#cztxUaaH5JMcJ|-Nv*+4jLqED*!mUZHO_fHx z9#5xQ$Mx?h7MVZ#F9hGO%#+;40vOX1{)W(&Xg}=C44n#ExMflb=*!ddqb(|F8Rh$X zmUvk2x89aSj1S&(L>e*pQe@n1uVr9J{tX`G8B2OcAzGsM^)7RwPh4Z|?5nkMfq+-t zE_YViEtuUrAXWF3R*7!#d0<%h?kM@=ByE}_as=@Ui(&a8dMwSqfAeQ4do@A@#WUG_ zJx&YuoY7K=_`($wEjr>Z(&0*1Em5C5zwNrEFxSEN^Q#nd<{IwUn|Jd6Fh23(9(8D| zx7uPR`ROJSomX}1dq`d$$p4NG8CxXx9m5WKr#iBDw6iJiV$ zOBJ~BX4s(`nwmf?bo; zOeEtAL-H8kpWs)q>NmWBC5u2mL*P-{s~*GPQ$*sLG}$M12^))CuPZQZ1AkoUS--9G z$!XTDkrK8(RW2KwE~TEP43`6smzg`W%2kr`$G1o84%h=qO;6=>@o=TiaA#7T*#~h4 zMaSVv-8CI%cS#A8pRS9gb3B5{F}~Z|kT_UP)&QO7rNs=#sTe+U~b^O-6lS ztvywdj6BWbyjih+_owez2I%Xy-jn8dT3~{e*1xgqQi-um{^n|oypw<82XdG&1@Au@ zK8D}Dvo7CF`u#^Vhih&`Og&#IPxXVN%k<8H3u(^$hV%2Rv9Sz zo1&8}ECoNS{FMC-$iqB0Oty&T(_Lu&jSHM`JYSln;`Bw6AKCJB+lQ1T!pOU*(vW$X#igyi?4~oZip1SAf9Jeh10$XX2tL#Hq!>dn%11^IVyIkCl%{2&}c# z;-rMMnb$s7$Z@8=*#7EE;vz0Q5zE3EN4w6(J>>c5NhmxNHfKYw?>wg3Z*=d`yuxXS zuv;jqPVqkZQNI5`*m%Bbp+82=>$aRL>faKaw{CxFZS+PEPd+izS5PUwMxn-aZPZ;q zb)C-lShXx+=lw!8WRSM*RwJHPKti?=>#ybgwOBtl7xA=_uxh;Qxpd%gjTpmYw}oWN znV%%^4wcShZPY`3%_!rocHr{cn&a-MM;LliH}$*V`{5+RUx#aFu1ISiXFhjqEf7YN(#er-yl2Vz^27nR}17kqv!G%2DS{Als7tlIW^J zQpePYI5cxGN1!14f+2B9`?jRjSJECgcBv}0AJ(PfWK!-y;lKY&l_B51@!g*Qo7V)) zYb$l%nVi7W+P#5&u>XWo@2k~ss|}t+#9jX}o;un!ESn`y7pf-8D3Y;;LqU_y8cp|E z*B_%zN)zpPdfoCyaSF~~f^@Sn#{4hSUR#ty|H>i=NEWO6#*DGB*q7a{UjZ{KXzyZC z?R=<*;#HPD?E1t}` ztJ@|g-t7`6Srf~+pqw%#bxtL9!^yX3=$f$d_+n4s+rRjJcI$gGFh(JJayM>mIsbFY zBP4$?y`q0>&?v?oiqPL*38ka0#Y&)B)u8X!Akpn_JW=I-b>MzYF=@Q4JxNI^?>~eF zE1Yb6-${&@Me-*^r%=5qw@dN)t97)JQ4!Z#CbJ&&EvcL2lxChAo{9|KZJlR&fvg|Ra!((5L?LIhzy#MdtC$<_)@fc!1njfyAD+Z6c z6X%gBCLH${rpSivEZ_tkBF_(#6dtX~wiJ|8;%m|AepkEhfjQJV3hMt4VdvBs2^*x* zL7Yr%PHfu~+qP{x`C@xw+crD4ZCf38k`8vR_hR=)yr`;E&+$0Zi!D=6TLOqX z0mpu~1p(?pZ8l*F>cibicJBMJEs7*UC8^|oOP_{^MG=V;6xHt6Kh@h%_#@F)xmN0& zbo;cfoNOCl3@4)0eKH!Jhcq_82ccEcNk5Od1)m7raFMqgsE&pKX?KrB`|BCM7CLwg5Nnh8-CLDW1H);&+&KQ$l5h{ol>KHBivYdA z=uWoj)ZwsGtB?+7bO({s+N=%YQ`X~Q@-MwD;7ENNC7~0YMFOV3o1`g`jU=3Rp_m0# zDJr|A$N+ zM$h;p(EHS(GjDC%?Ybp9P;M^fk+&*7@r8W*-FjSJWoFe%J$b`czsMnuys_s3y=&5Q z&%VViW^f-U#VA=6Rjc-)6$tmxq}K+j{&#ynO&V3gZ z4j$_Cij!YoP7|i+b?+laFW3yjwt_5*VzO?kYt;pQNqgUZiq7UJHpIiT^TDm5)x9Z% z(roGKz_Qv*@!0R7!8UPqt;cpb%Z<}pO^g?a1Wg)MT+>r#xM6frpX-n|bmEP`3Zh5l%V-It0RC4`SG1ebTOp%0H(bUyMl{z2pNN&_XZ>R8I) z1sZb~c?MmhxbJ7xoE;a0^mdsCW4G{^`)hZG|w{jO9h-*cG3!oY)PW94ghnWyRN@74_(uuNV#--gVdBxte zxtA*6Moxw{B?H<}v)Uq~cDb{oJ1g}HtbX^5c|hP7ZTJACL3hk$MOQQC?96J&Im|{0 zqNtve8Td-4u#4)Yf|%Mwq?v*wkn?z}Et=@AAG+ryOk*)#KG)cAa5^0S&0^Y zp2g{qf9*+a{Tv;tYOR3xKzuMMR}e|&%_aOeF9<#0J;To$v4u;`J-+vAcmRz7Qh@xf zt_O$J>^PU@rF~E7U?7)Nb=itRzDtKkP121O*Ff3f;Q8VS0?DR|4FyesxEDcQnC8ysS&rSd~9$EY96y&6-sT=!pYVXXeP(VSABhSD=@@2Gqtk351(R}GKE7h3@0 zRWTK>@(H_K%!@1lRm~wWWbm;$B=?W|ruOc>^MZh2g>GrQ|D^qdSWcdNdBDI7UYS|N zg8#o}Qjdx~+hB9m>p_Te!YjB?twCZA7M8~wQ^-_|a^TVY3|!thjXm1NLU!NHtH&v4MnO4ZGzG`aYr zl&It8vBoI-P?}-nF*2Aq`93fq3Tc-N%)`~G8AajU@qvrUl|)&|ZrYjS+r#?-9G2^w zB&Bo*`izb4&ANai9-ofnu3^Q1XImco18BqmJjLBZKEZ%8PRY!HAMrWh!p*-ma2|e* zuH!!q42}*Bvs{{raRf)3lur)!tx}iyIEOg|IFzbxcSxDXs;xebZBBHMZhA6}ITKus z75ThdQ^mh^78Dlce7 zoY08n^{m^uw2Dy?K$P!U4L75t+hm}yaPv2m=rvJz!ST3xct?9)d!@uVbi#^*jdNa? z6EMQXG6ABwr0XE7Xy@WQJw2UXQ`QQy7pTLdO7*HWyRE$hsv(>X85Q=w@QV|0q;nnE zyO(I3R1=hKjNRL2+?%3KSMd@nWZ?|n==c#TjvF5%y-xT2cClA+{xIAM*^T*9y{8W{ zFt0P$OY1#9x(~X6Zc7IOi>6oGB~TED#5`IVZ>mMHN^yHw$GvTCs%X#FM-L1fh*uq$ zv%k)YP40hk>|?ly3)OIq5k;$F$6e%hX1z13e|{2N@^2FyE>?wgQpfoAcWgJ;Dp)Gt z;1}4$Bxm8z-b>B5FHQ$*Wi+f>qRN@By}NqCWQB^ zbAi)*U`HX0%!0%C1f&wX@-Qeg+GD1%TPA&u^NjK&59|;TRa)E;9O}UX>n-+LUnz2h zcz4uN6(GNC-B#qw_g({4Ra?O1k z1X*c?Ct8Q!r$Qy5_4T*vRW1yoWgF8N8VxPYhp|_WAl_63qsj%ucli#%@=TWcp%ifE zX4O^f-HeO%B>NYW2N>YPwyWG&+(=2yScZ6+NXtPhr;FLt#5P@3P>+{s>G+!)Gpflo zPK-?&jsg{Rqm!m`diOt$oPC7CtSQa|=Jiq7FM#2+?!Dly9SaCWb8}<7nV>tc+uyc* zD+EQWnFr(k*|0u!Qm~@hZk+EqbY{f0p)Sb95wQDFqyao&r>&FP?ezsP_>tCsUu@g$ z`q(GGem4#|dR=7bEl+msjt@q}-qJ8sR-9pu^Ks(w^GG+jG-Fl~9LEF9_IDn-pvDU3 zgq>Q8$`{RG5n8lNPxG@xW}A2J3O@*_AF@zJ5I}84qnE^eo$)DpL?|7s{y|( zuRSTeqG+)dz_DM)tIK6zQA$!|w;GzY=|#byUB|p_^pBQ8#>+8N97-;UQ_-vYM25wp z3x}vs?)-zYMX>pY%M}sLg-IT07aZ#S^*K5S+bjohccEbCW6@=0W+o1)%Or6X>Tw{; zAmJvw9A|?K?Gfw!8KxFl&YySweId4=y zXpRk+hYkB5x*FNdKy?#08naR+z0JT?FHfU4IJtf}kqbBxU2AWGe^qI}>puU6>gn8= z53nk>5EPfWguC|1WZZDW)|vf`oz zG-P(7ek2A3iMC?yEOxiHf&f}x z>skYzSiX*`3fXQ8Qdc&kY9}M^ew@3i86V+30>vjSu(7a40$4J!mL*zmoa+?6J|*2> zW)-v>{qKnbX|!dGn=LJxlxr7iTmQ%c3Pg88!OOqXCDg0EoLLjP+TUGPTs6WpRqklg ztX9vV6*y(?GxJb?&5+mY$YaNnRnGBP?fgZOPXVIIDjq9l59P4TcZF)L!gLRkAzVZk0s5}?V?>F|ojZc`4 zQT@^P7WeH-p5d-ISRd>-Z01~qj~xDq>9_A~ziVpDWB_|C4(Z zU_0z36SSv5HRaHctcXg&>q#eb%kbcPoa#)pVv?jaIJyXVuxKp`fb#@ zaEHa7nCHU3?oD+2KulC`f$Y8SO8<)2gC^ziKlAHN8s)NZ@Wlm`ab+l?0(G6Y)!kz( zDh`LP<$$|N6@~ao{y>cVIaBEH9sRv|s4{o>uZ1q04fg=7cwGl+VYxdR7SEBqH4Q&3 zw~-T{6cr=4LCN@V$M5lK>RQEScC)%kbGirL3OGdq^-8D9MdoG8to0Dpl=6Nfvm44c z>+bvW6Y0z=QSJL@W?4?gwDVJnvs;Ey)wV5X`*~jt#HSl@`&e)+lbVaOyAM|r0lchx z=igIaUv`E>vxKs>|^U=^K z2pKQ10L=jJm%lJ|73Fs|l32V%EL(CGy<@L>%O8HvPdYQ&cE&AyRV6{G4nMmpFf&pL z5A<^|ai+J;(nf;2RhxJlSiX1sYt2(jS#<0t2P!^RqJbXIx%$UMvZug#L(N3F4tdS0 zk7Fi$ZU1unrs!E@o%`2_lYep}TXjl42@Oyg+c}(%+vjb7gd$EFWQ>JotD+|B?;MYT zpEzo0_&p~MvT~Cf&Fun9{3vxd@H%`9yKZDEQ}Po`r&ViDjfZxwqs71cvv)ZO6|>HU zEg3zqp4>}?&Bq?Cxs?TTiXTju1iDsc#`#C3Psgh>vP5!w&T(jZs`0Nd3NX97bz&*y zA}ZQO2h`Kotd}ZYz1G%IU+Xk}6kQLc{*wBE#xLP>tPu&-Ooj%Q@Obl>^W;6 za(NM2eYiAMkV0VoPvE+Eyc&ME4SpXqHKz`H z2GsZ%ox(+zxsA;ji>+;)`zQQ|FpJ-YB8v%2JwEXQBclUZXC(MLq%B_U4d{Ly&=>h^ z@w^N+S61dOvjz1O##3F@G+;0ky+2=m|5B+*qii(aBPD8%YUi|0_l#2U5LBRk_02CA zbHp6k@8ZD7>(18;VCTAZmWUYOwqIB_pPrpI=&Cg6u4dBfQdMeo=g&&O@XA|)6 zAFgZ~GM{vop{2rzN!_cevjI(bE4fxF;X zigs?i=L!9pe&f~mdC95zH#dw&f|1YA zP23K?-L+@&ZiA23$0gKRsd!l+%(OIY%)opttba61ye$QX#?(AbP|$zedf>0#(CAxT z!g(Q2cyM4eXb&0XdahgD>Vi`a4T^3A5ZOI6bGY@~XkQ*)HJB^kvcGS9yccc6Z+5Zd z8lo|tTgtaZ^_sbRV^jX_dL<|TOeFC|6Zpor@!=$WI+C4hCQwlT&%zd9=|(NiNoTuO zX#g>r)PT!W0_kyz5qFd5PG0^@M`9XI@C+PdRL`9qijEyl=UI@6zBx`tb4W%i+hv>q zk7q*#hwx#G)cwzS=+tN@MvfnJ0RBhwp7PowI{UK$Kkf24J1ehqvdx-B+z}OQyOg=Z zUY)o~A)5gofbOFH!sRL*@(w4NtLQ^jFv7Wab+Sb z>Eoh{nLuGmD?E(TkIzuFxMizK1l?1qbT{$q+F#8s zF6J>tpaW!4;Q$Wr<8)`=$bC8QldAH5-*?o%^gsZsqemIgG)^*T_G16d=Qix;I39Nn5H!J$L}9^E?YFGKU&LIvvM_bxO^x| zs`l8`1y2qU?8aB|YEx8*D)%Ne~O|yrzFo{ zNy)B8#`~D~Yi|~^$i{-`?cM*3{Ju%_P(xY+ys%DrJjFptskinKbg)7**JObeW2dj} zyH1YI-Z0`ra?|2hlqG8eKB+n%s}Uyd+(l5}v+%~N^4DMWQBK#cPpRKrBYbrwU9_{? z4V1|`9#c5pD6l~4Zs=^Tb!1|DY*Q|1v?>jHnp=k$b;#Zrm1`qho8%?%HgW$-c>h&xN#!~pU=5GH9pvTe$6FykR&hJm3!k2Ad(X!#Kq>9O=;E@HGz`H04L7U3V zdXyvzJmPMnbl>r&1^oR=AF`Te%m^oZ{hBM-`~oj*9$gNWFA8>P<+|yp`=*+Ara%HR z1{j9p4Q4T&+8VMHy0t&Aj)8}5{%O)#wu$I&x{Ulg24=k33m zA`1~Q8wyQ<>n)`fhwl52AQfAS*K7BuPydzz@&x=R?U>gX(AA?k&sNjt!>=K%_x!C5 zqyh2QxzeWjOX2w;;ngI!ZV%J*-5dj{SDYbWF87OcVdZ=Np2 zRoCQSp4J%!(d{c%E{8U8m^4eLj3lmX0g73kwHiF*b^<=muX zjDYK~P`fXC?CH-|&!ilM*bLHTshshGB=IjzxV!5hv@(C77H`h-rg)muQ0JUl*y^}1 z=y0<)!d}c~o;z6gK^zeLsiz^x6I$AdJgoc3>5$t7=$aZY`Pk_0>ja# zwfuV!+0}X3GxE!S&gXH^dOvdEF4i**8Zg+!zwn^!pC`$TI^(+bE=wW8(r(E`is`*K zRtGvzCt~uiWI~=6Koza3N|k;M0D95RjWYvpJlNSDEPi@>_4O4YK8mkenF)1Bgr`r^af*Vf{-rjsl# z2L?lzADqP4+-bI<3Z7|2SRCd|K9n4BqvE#v0~;M%RX5;gs8-hBC)mDazB7y?arnyK zan3%?s>MyC8#jvibLr@6r!KE!oS9QSu)=1TLtA~hh}Rm|%r)I?0PKp{?5Vf*>RDbs zFI{R@k*li9x{t)wj(bblU`?l6i=GI`(dXz2cABfF15lI>2?UO#?kNJJf5bWc$y8@} zAtIlbBm+3KegsqFPpN$}9B_Yb6Et1ha=hM?)XQi5UN73s!^_!NeVUj&3VryWO6c$| ze*CZPY`)8njuc+A^8?!8j3Gv6i>>?T4eq=2xUJHTS)u9PeVZlH|JpMi-n&1~=H+Du z6IX(03?c^^xy?CI8JO|cqYYT3T$pK8(P9pizYCzg&89ywo0m$$Q50@lOg7X6DecF<2MHfOb#{wN-*`xyb@ z=}2RDrd$Hzl2uGsr7Ec@vHI>sHkBuE(RiM%N0^gMmN<@7)*u*_!ZFLx6NSY1j_{55 zrA5gGeFdbl9c15!0so4|oHO#LZvlBb6*cfs=UVa z^0tiSxEwZj`pKPH>pT@RxZAJiPOb@uRp}{_uGaxxo;>|@Ds9XE6r|HE$_-1wMIJ$w zae2XaTzhiTZR9v|IFtqDdLR8#OP&T{ciM=xE4$^l$N8@1EQ@8!OPlM6;desqc8PO> zV?a(Kph*EKJpw5mHqG?+d4%5$qqk-%vI)UQ_w+PZU|OwE&i!1;L;*$ZDC zbLY6vsCv9uBkJ>g>ZSExIb}LcoSy6?nl?!Z5QeCpp3rM1}{wn--aWR0BQQ&{UpWfYpqfsi$yXh7-qF%3uq3ZwjZx z>pRexYP3H6t^VxS?&vp!p@xw)}5bx&2vR|GZv^)AGi` z+-!kaAz;TGzFkoKG&yL8bMKvf)D4Hd7GdYGrh_jYQTeUWV=gk8!>Oo><7kM)1R7kF z7_v|`7-~EbyhJA^BmBzK-g&ykPT_z;_3)!Exb!=b`gJDv3mT(AP)B3#uRd(XRI~L# zUiDffJq;)8hcwKXgq4Wf9KO2_mxa}ph|v9d@_EO@GN7(UJB@sk@mEv>DUsR++97S0 za3d%c-J5-4zz0J@*@oR4pUA0BuT#JH<%x^+K3~gc+rKb4#P|Fk_Ngp%(uO6Nkatuv zT%({3d(dW1R`cipEjjh(IU`-0`+j2l88swD>Tyx*}ANun!)CWvFIi?cjSRS|{ z!5p~<2T#VDTr|?=P5=k01iP6x!4a1W&B6g|;kn5Y*toCQcr}w*HOz697G}@c*a*7; z=Nr)cgB$nXR+!o%#`(Qe6T>$c-EM?r3y_J7b(VrtX_m z-cD;wP*&ux6$}=kBw3_~tk&TcbTj5vtEi-?Q=ee82ruF+|5o?qv@R358Q)>|ct&(_ zj2({1kZZ*0m5l-s)mv_Q2CQ=g8%$f>bHR&=Z-iR9G|w?wycwi ze-;+fC~9x3{n|oj8)NaBPn2SbMBz3)&sUUVC+>6`qAAR-H(~~}+sh&_@mShP(^axn z%!s=-;d~Qu7S3m4e&NMJd7d47p!Wy%i-vy-N7?F5;WmSDsNLl!# zr_OCIc%(CtbrCk^N~SknNE$__9e4zvayt(DK;J`8PtR&0_#8r_kILzLC7HBQPBB7@TPEI!ORp z?qHR79H1yevU{kdXtKUu`lqvh8-&F2lF7$9G@XeV8pt|nAf=rn-lc=(4WG5+j|!;u zHWuKzd79nO1qr>qVL42qeMfD4HXEcIYKa+VU3TJ1B*C2S5zp^w6wd{t!57XIX zS)4v-f>g#e1A^&#D$V@Tr*4_iy_!f5?)AktASUXfi!;kZ&rimm)(IRFegp74hMycm zbpoaJY`p0}6@s8)54Z6?f2f3q_!D)~v5y?h_MglEw=k}1J94j^~S;bxMXqQ|H7NQ#XXQoC&jBc<6F^;(M2^MT0us=&(lUK;4M zMi^V_T{PL-7gwrqp6Qceo0%CRztXxhTFS0n=lsVgjwmcTb0k|_xJUuKsy(Jn-@%qUV2~DB&O|wO3GcN z$lb=ZQrztF0WIP)oyVg!oq;n)qe?Bj7e&CWi}wh_c@j|&%DHvsJDe+XU_(P!95;iX zmzb|tR446;VN#;?P9YRgba7E?6KIquhK3H32iE3YoA_Pg-rI_2#ILyC0Lz)%zoMfj z3f|18Uj-$p__U3ZUz)$u#@1duB-2$}WXAa8`g(NtBb=E7bJwz*l#S5itnq7s51k4> zwc}KOc1Lm$@^BxG%Ix_D8epJT$`1p*1p)yvE~cX-E4rIG8I^58=!r2p3V<+hRDwgCz+_5xIEb+X=FPwF>M8~vk5t6emJ5bxYjNOzV(z#QuIO{sjN46Ni< z0QT1Sm|+V|afAAM)CY|Bf$+4zC8vjZi}Z{RrJQJ(^y>WPl?nmyh3_LB+_DtAh?HCX zW!wG8>~eF7Qxe$Fgfh0Kw>TnN-RO>byu&oi%Ff|Gi0qoouQY$&UlT|JAJ?;nsW%ZMO`?i8?F6ZN ztnVUn6DopJ?k@i(tA%VlAha~%Y}B4;w_3{8dI($S!+*9DnGv>r9bE1e6M+cqM{A|@ zKS(O>mM@h)ANEW$SAAIHYf|;s(KQkB=#D*~ZiIA)gKrjl3P~K6bDuC3b}32fzz7c4 z6TPgi0o9L_jD^XM3dRtYw7ZnI-;mySk=Vyt>u8{#T zT1U!R-Cd$fL)4F2-Hz(pk5BQI1vt?OVCJ5Owa-yUeWC>p)Za!8{|uCj>)ENg6~I+i zlhrkdheJR=lN#&Qm1l#M+gCkytRW7||LyP7`C$|O{tDoIGH7f?WOpQP=&_&$KhtiimU2-d^uem7K*4$dr{Wgh29JXJ+>8B#d$jlN1&7qkM?crCD# zrpNfhVbIuw;@#Xk!G|VF`;P+Rz!b)Ykh>FE(mX40lme%-pYMm*o2Od84jZ%o${1O1 z00S~7Z|)kdDtXyDeb*wXe>d+buBXjh#VZHC)cJ6lo#D1&mj`(0E=_(Fdr0046)0A7 zxxE7^k0lacOe>?Jy-+nwQ;IF*=^*GMXG>W5xE#J{oqlrbi$1=}9SD8aiur**#1^>T z*9z_>@ebOj39nzh-A@krW{ZPdWzc^N)h{O#`z z>sB^02b~*SpF*b>TN00bmumA9tl870HoE&bckhgFdJQ@+cukq5mt|SGv(tD8_-`2N zcfSNqDTTinK2W!UK5*DgHpP8iW9+bFbtj;VRV}e?9R8C-R2fg3T~V){jw?x=jbe{x z{*ST-;s|*MFiS`9UfH2ar~VLU&$c}8(b&wlH!{WJvXi3A4I8?3D_-)wjX3gUn%0P2 zezj4;O=4TVbop;aX^I8gY4&Xbc;m9quNjo{{uE64z@#DPAl>jJKavU|Sl@|B4m5ia zr6a}Xowog*AUNXJ>BUhs|B{rksCM#9*Sd4}J$MxucRh$oZy7Gbr$Wjcb_j$5Xk0xX znJ{)75Bg+tUT7^$B|4TKwr$*a)NR;A!J99&hcQHh6s_Q~9gYyd-t#)%ZygsN01Uzcxk2VeX!%FSm*i85b<+bID$O zj;P(?-}Jllp9QX6l8iwYsPQgu+7a%%+1Y-e*tqB!ec5>S6&oy0b-zTdd0Vb|1AI>F zY!PQ3bu%$6N532QNZCQ~N5_D0cQ9VgGdeg|+M$5)k&2ZMOY5^DYnJCxVy@-yhX|wS z#}BzTOi$M6?zA--LHL_bu33A&%SXRC>cA1V`AQ|Ht<{og0l~X>Hj5$1S$?W4L+ zV==(?1x^$SRLf#gClsgU&=*<~sjqsF21oB7fGuutZ=yH@H`nK!o?F=kp^?X0c zp1N(oe&pAF7lJ}Q6q~E)jc+MCnT=piKfRaV^yC*`#I3js*4hux;o_a&EYjyP?(aBa zR8Y_Vgd^u>&a`m#w)^H;t_8NS9MgSBMDj^6&DL>$ur(71%xS-j)G+21Nia5U-s#_{ zFhFkqzW&3#vjzHI9{(LN$r&@}VKjC$2XlG-jgJK$f|Aqs0s^5LAff*HVx0r$uo=M4 z6L$$-r?Q9)c?)zoYcoJ1aJWa#1U|4%uO$0t(dcEIX;a#bTP7SGj0Wa;XRbXShhLn9 zy&ya-N}`;49K;(szX^s3da?d?H$XTd*6%{MHkkX&pnum87m_keoD}le&@Ft5Txfee zW;)DoJ1GRj45>}$7M(+hyVJ&TBkKeBlqDT%O(n@aT@B@x&MTN_Kc|Cp`|m5m1cQc- zI*IHFbSWgowg4|DqlL=|-o^O?HT?ncd$&3P!2|JG_a>_kyPo<1eO#s7p8^%OY`xEx z^0}#ElCQ+O`4Z;Gi7FDDSJF|Iw&_IPd3Xoiy3N&2dUr0kqeK7PFoa#et-HF8j~|d9 z=K}Qrpc~Ob{Fk8%A!TB|D?O_T^=@C`^!j6x?l^gJs47~xjk?*HOxPozAe;C}1os-e zE18lXb%*kdjPq&S6hR9${3ipNx!<2W?+Z`x&+U^ic)~o|YA7AI$q&Ys7D+_%a~m!@ zRiK1Du~!?aTjEKkLikLiX3mk<_zjsgsvqy4K^g^yh}O+y&tEwM3z{rpJRYO0PcQyB zr;iZ95(CgWwJ?44ceA{_zQu@oS&;zWj<$1-mLuWpL5A9BlGSMkAV~Q=3F9*1pz6g; zHTE<;YbrWyhG#Jod>R=Kj->MmeY&)8;2_BeA(*cG3Cyk*Yl(MVZ?SwB?G)_rq7&vumY$9>ux5o{@(kCf{^^RT;f7?9)VM5~e6+~xwvcP8Z%nIM38?#> zI;EWS`p0vx6s6Hhq=Rg6*Fn~txi+$7x-C=`^$x}!d-TY|KL7! zRgAnY>c&?r*2ABRQ#Q(sw|6Lm|L^%lz>b*RnCBVaY~S(u^Q4m$kZ|;3h9BPKj5WP_ zuH3s?h_ff__XeY_z$2fUjk3zXV*MNU^mMFA?Y675-1!z??hom*94>l>x16k677aX( zC3ikrT2VN6)E$;2wA{8m2L5tDRS`R4DrPU92d}&y)1tq@%%;x8>yRa&n>XG-GTfig z+KXUv$c$+2_f{|1k%*^;R(iqbo1XC2=>1ZGH>gNzX3=G~OK?_aF)ScC&T`rR(4*_R zP)O!3hc}YeJ~M45tWjarUDEZRZLj99763odpy4g3rB&bTW1E(Y=F90~=BZ%*n+Avy zD^BaIRICn4E2TNxwtJeCvJdMtV%d^UeC_G8ol|bt)fy#!y^B=ud-2Fm_^5wx%9Ed< zEF1@(WYRw-0xv{QldD{fe?r5adndxZ_iul1b{;rgU6AkW&(n0r;lE)V?yPkM=>+gV zyan-GcZbs3L^8y6SVXAvxFJ0XvMJgKjS$Fq=vytZ!80fk$$i94OuM6my+SM4vbOYZ z^cmS5>At^Ya}??o+hd&s{9UT+uQ(CVQDONc0Q}y(FOZmlX5{pX&$^gyvtP%*Ice-p zCd`?Zo%UcD5zAA>fEkHi0qyD>kM}{4UTd#wXoE2uFlnRrdQdspG$LVv6GwL995z!* zXaM*eQPmirGZGt`a!{zd!}nf$+>5qu7VGYRlWUqe+Oe+I9qhwuI~ur{W6kWne17`$ zu5}T7gTXmpFI8gkFL?^4P`XFDu%Od6k$TudN*oYNA#z6lnbzW^oqW(<_lWyz z&KI=&c6h#^V!5*T>jymAkNrC|#-b1dqu@v%!P*k7fn6rFm{QmXQ1`|hnNQZtQqGh9P3Z(peB?2GTAJtYRG0~T zJ{%8lDxugz-R(8%H=7jewNLm(Ih~I7X1DHIeo>u$Mp$cKIQqo9w&8VtHOV|Lx_NNu zek7Xo?IY>Figayguh)(_V3^-;cHukIeTI?NZXPo>M}tPE({Ky|7BzMzSW!KOLUwBp z6dRmGA0h4Kx{^*BIfb>;K=_i+|27~g4Ga&7`mOJD6{neFEP01_ENq$w2;P@#(+v#8 z@EKnQ_S@4e{-e>eC~vQRK_!azfr}wxE+3gHoM@A*y8auaws}TGlp*6H^dtj|DF8^a zZm0O*n+~>Gbh>}U#k*{qu)%8uPOQ>QLczhYsJel0H&Q~#{pSd5$ua;R6rEUJ;?{bt zmsz%3Z(Us(?qL>J!f2pu^*v@Adjdze8Rme8)=|M(9MHCw)1lQ7gMO^C+QEWCtqsA9 zFdwJRSb#O#&o)aJ*B(#wnMc!lknX~2fklODwLPGCY8#+u>7-X?%|pysr@K@kM|4p8 zRzDdjK>Nu_9IsA)bAptM2exvmoQY_29zb9fd>EhoJ50B`C4ON z6S^}GZx;L1%a?6?KpCCA+6ix%*Sqel=gQA!WwEErG{@f%8}5SD3}~~{eqRiH?`cdP z$k|m3iH|+)$cs9^%m7Y4J`G(IhR44Cmt0YwvY=a( z@Sm-i;@das|6ej-?rdad_J4S^JiYjqHov}NK!%n(xZ*2JG2~>yiQ-59lAgi1iCQs! zIXE_|?HwidkyP4r^nd>{; zn(upB&QP#YD&Fu(Q-?4i5mw&VY5#sVjJtF;lPtOl1+fw~W@360G6Vay=Sqz25m#iS z6Q6q!SE;k>567f$jUpM6-;A{x$dT`h&`8MVB^GSiBAJX1kO(@ymO{DbVQu}xJjp;J zUfPwnMc&y%w=w4nQe|XA6lA63l1`{j5#tP3la6cg_|l!(@yj*>?YMEypn7v!j@N{kd`K{@@I2-_E3 zi5##I(bQi?Caa-m{l-iyz|2P;2Tg;L$i@w;dN58ZZK8#It?}uqh8-tGtu-{#POd2CVWXz0~5`}{Xd2c$f$^c=qLty zAwnW__$X1kzPWWszvG;u7>Oo@9m$4JlE`=)>ZKxzAP*#jED==8FQci1;plWUQM#W0 z{WKEBbd?}(XVXM}QxfaK#F`dR$qoHRB!k8mcIxxeLQY1uz>GZaJ7OhIM@}AS{w6QP z#L{~Eb-fr4MeB?LFBx?eQuD5%292t=_ec01Us8XVgq4O#=L+6>@Sb}dFc=uQ2BkfU zL{#(DCmEjNwDO-OA{W9R8H@t5D;$dNDP39r=Ch`RsBL}sFyG9=-ca1G)9?RL&d6f0>J(kW73)Pg0lVk{(Ek_!eL zhFCRM{k;L-@*DK8y>C^f2vzS`i0~9_J@WdRe2M>66!+ij7HX8R{$OTgc}O3Yg@;6d zjZTA>Dm2n8Wa^O}%Rpd;&LEpF9w5=2AJ_@n=WWW*PY_j%^wGSdXu3qW6adxrzX)`;@n}(&6bQGMUX&mh!kR1)R!ax^W}WC&j>QdyD^Xcjtsv8kYq z%1&X;?o3aFt0i)DQ;fg~U7qUi3mRA@3g6Fz)s)M0AvWRL7ryb4@j??9{FE~+fS_wW ztEZ@+3rVnoXQ`hn9-~2Hf-x5Q-f2i$un9%+lm33HF-gkzcgZ*EP}yQ-0xD5>bdcB` zZZgU`cS6LXxQJ4NC&7&zT@a^QVS{UODlh{!AKD zApS%T|K4Zxhq&lBWi%utxs!r}OpAbhw9|Wil z;n3Fz(Gvf0>fJU&YYGJq2Ac;B^L{HJ9E%eQC+Jh=R_w;7!iKNcMSzA|Ukwz7WJHIC z*CH@kOOzR{9`1w52vxL%k-~E2pp^Upy^&3|rj0C%f=U_uQ;ukINi10ioJ^XSeFVXr zZ#!O0R@)6p;Qpf^TeLvbD8`5~tQs+K*!j6I{{(pv%hd)|5)zx2Se9`t7>0@GXEl_e zQAV^O=X}=|wtIo$c|E+PAp=?6`AzsY2Zla84E-qQ-o_0Gk|28(B_-QPnE4DEZAS{k z(D2rQl5)c5uc{N_@Ejqs(~QJyoHMxk@_Jfqx}W`X_sLX-Zc^oxG*d70LPiu+J+ze} zV(HaZ@so|@S~h;i{Wb}KxZmZV9v#f>+16f(YE}uB29T@spuY$A8$AwzHCN775$_>z zNAk7zj1Q$6|0S?a!2Iw@-v36ogLnP3cZ~#h7TL=IzjH1+6b9%d{&&t7vFL?8u7sk5D$nWyBf4iuCva=vqA36a zZFDyo&`lg$x|?7bic#L@mv9zvD_e|+oI)%NKZExpkT#QKU=9+`9L1Yf=szSgN9ONc zM7rvI8(x8OT|bN{A`L=_&oU4pCs~LP)ED*@9ZN;T_-}|lMWhUskQu$QEd?VOkkK>Q z8ju6&=BkoOAe(Vrg)_Bb|A-p@$vJXbID%qg`fsp4YOj+Vsn)V4-&`Kqg?>CzOY+Bc z;QtVI4uO?0VHS>0Pe_8G{~%1L6?wcLmkXT)IqDfX z^aPdHPbh#4T8Eyhh^kBtCpTO|3S7j3Wc{_yC=sz+3zQLCMJy9Mh>^Niq?ho$Y=m3@ z)-NB54Huap5rL>CGXoML>NJwole;k<=iN_oy5zot)w346TYw0bSfrWGxtT7;! zGp|TAZ-4Bbusc+>6D9zO$V-Uru3KojBw!-&B<7eF6g$Sx2b2Zv(i4OQc`7S#+~i9< zkZq(LBic)C3@{TQ`M(2)ARe0ZLwWwZo}TL$l9rY-&3(rBv^@Te z+Zxj4UmM7`PFL@7%268Za&2ARt%sfCi0tml$eMS|)8BG8Q;y1Ax6*xdTbP5fi_tVe_$ly^rVh@+J*2Lr% z>oEE6?i%8!K>M+sx~UAlt{YAr|7H0u@4+5xwFju1)Zvz~f1^|ztt6kPZRvSyPpv~y zN-%=Oy5q1T`>KzTIqxWaQp`yzIlzbY!GP*S6+}DoP3umlkndF>o*DH4PssaVlV$ix z^7uKB$^?LsSk-=Vmal~N;Bp-%BG9S$aG*3p73GMKN+X5*3ndbZo>xQ^ly)?=<7DNS z<41DN!~}~0_CF(gnbHK&r!v%((1j@2-~zD791Mb(J63t~2l=o&>GGvMjVwo%;=@5q zE&66AOxc4Jd6ffhUjse7j|?*EFjUN$uMF6QInh5pmBVPpo@{~`sE>V-Mw5qPl!e9( z3yqnHKhmLR5cYa9T#R_6xU+|)V$uHTQU9rN6zUlZ>kk{LnbS~?daB$JNSVp3!G#B0`6jC-o839KjQ@cX=HXr z$0vJFE6LcAgW+Dv3SJyTBk@WDd~PH;sUzQ_@-Clx&SzsE)%ifLy!**(o1KnR?S#eI zzK_4}$~tY=W0&LHaVMyBDT2YH+|b(Ibz@b18s%WK|ikXs97*2o>63X)>E?HtZ&L`k@}|1CXv?d4Hc0e6>6U>b?Zy#EpFZ?F~7p zI~>|{lco+Ik%Uc8r{zbCUGc;H@!Y?h02C8Fq;zpm0Z{-`^fSf4yLn1WzM5ZbmfJ+1 zv@6#uwrL-jc-ceAXxT1yv}@@Q@iVu642x~{YxFvl85kMIIAKC_B546k<_AkzT3hws)~w;>1#H|UpD z(rz)H*mszGB+)NG+9Y@eSbdBczS`d3TdZGmb0P%h_3I2?RmaC>-?!&9yqMuHGlOCb z1>#n_CX(6fSUSZ&ROHhP{4~;+LS2P#5E*0o`8H1-e`xD2&9iF^lgxiB-zlvb2cUm# z4?S_mG@X(aoIf)@piGXYdhn;|1c>>tDO}5&Cm#cf%K}VV?cr}oS1xyq&#ATUOWg$# zIRfx@-iOb=_qz0F=hT0EG27%TDaNe&l6j4FO#u^r#~k6YNPsc3Szw}@GjNh#pxkoz z^~p$~R^s8jq-(nkot;o2N^$LttnYYw$nR;aS}>2V{d!?%GkaL+WaI<965uXL)J2-H z?y*ywM)x)Qgj=8_2yiobO?3aN!S~3x0RnkD`O8dS$R%?sNU0+FQM2z?5@x!RNcusqQk37F?Sp^u*4=VIu}R=$sz0Z# zdF;5@#=>GN>A8oBAEw)i(iw33OZBSUIGby=os9}rh3O$rRqeg)6BR_;(ALD-kD>L{ z%)%1@HZ&>_N2(Eccu&wCQP%%cNymu2X93n#2FKj^Cp;k`(uIZ?5X|X*8%c^51k<0l z!F-=!{>u6KK3SIexB^za`hzIVAZ4zwDz5&Lb7=#th6o;zy$Gc`@^s?3cc) z!u62(N(v!_O)gR*d`upzmm)ds_qcvVvfB=G9M6lM2Mn2OV^YcZ*&h zigRD@C&L6_R5Vo_mpbOc%w-J5uF`DP1b=m7H{QDRxb3^cdG&1>|J%q_fqrW4uOSMh zh1ZU}riWjNpP4lrvr2aJn~C1=yv(N3E&H!H6h;4w?=p{WDpg*&XFv_(#fL54~2gY z&}OS7jQW&DF^9jmPbtlN(cY1>M#5r+u{@et|-O8sNmtPK}vq zgauKnRlV^cMUle2lDgc&I>hQyP5p+UOB<6CS638muBwhF#q?vZZgxkrY6!I8y>`ud zA)zi|h>#zZ*I(*Oy8!m1WgBP+4mX#Y83&<+^Y6Y59y!heV@Mgx*D}>#&H>jhvhT2|*PgYrHP^Yw zh4W6PJW!5TajqjS4f{Hi=Tr$fvAURoyX#cvx}StR*6+vwQ z`WA{0qOU(8gIpd=r_$e>D-8aG=qj=&$FHW#Zw`UJqVbHDweGK}e^n7#M&G)-lAFma zqJJf}SnVF}vZp&;d+EF1YeGnf6CQ@*2e*e$8XuzB?u?aNErlf``%$Z&3*F$rFbSzR znS}i;XaimQTA%frJS73n=bhuiCtb86ybl5&nHfW=<^Xxqra9v!q0_Z)QB-l}3c4y< zuCQ21^J`sAA3h7zxvOj*w6K>Hn{$ohtuKKo9to~Xt-h6}+|<~_dk?kKw6eLs6xFh| zCu3&0fBbYTP@3rYjX}3~ximLad|>P?k^J6AGm_jJ=3A;qs`{3I?p^^o5Zx4~de0fY z8~Al6<(h^t&xl;<>Vycpyw4339g4<6I}-X&^W-+$zde0Z4r}m6-o+W(*wBuQe(*1s zJ(yr^yx#I7$X6d+&&mR@mSne1(yK6>rV!4{E?vuj?Ei)5|2fJzes~St{l&m(x%ANU z7CK6)Tzh#cI97W#+P2O353lC^SFQ6hefN`FJfJrIYuGyRVleB8a7DlGeH=bs-6%Qi zF8(jKibjw@U>h76!tS4cmyX89l!_0>+sbk0J^I|`tt*2B_;yAYBJ9f;Xr6m(SHJ)g zJ4te~x826{cg60$=lPZV{2H%#*9I8Y_%&mjz(3l01f)0opL?Y}dmNWa*u@6Iu5*?W z1OQJr#`|Y*(!#f$qr=?x(&TG%AA;Z2=hnvVd212xq7{};bBOirjos%2EY6azMRnCL zp>7(@UIA6sU$4$Dtnez$YZLBsG3YKy4`2L=hbn*L%iCdao&v*ie8$K3b(+i!@~O~l^P zeSb;Ps~H#}&^xkqK|!z`*ydImK+?K1%V5|lDZT0iyPqa61<+`-tH@*YE2ltelt&Vj zuG?gmSx`s;u9vE(<;GWQu`ryyl5*KQ*q8gEM9l|C2o%HmChIskAA)9|9)RTyxak%8r-@&f`mx2lY(vyY_wK%cfD6WQIin>r!hA=ddgMe0KR39 z6q_#p5+kxMqa*c*(-(^fw*rZ)=Yj{iZ+i>r^7^gqt-JSgYgw&36?P5LwP+W6v6Zj$ zp-g<8rL{Z*CU)mlw_0iM9jA#)C*8j0OgY#L+(+t-=d@Oq>pp|oP5Is~@{MhU$q<*n z0LIbR{T$4=vCB&ICveFacTHCJJ&*I;Nw^1odR4A=dj8T~5-X;SP8X^aBF+{j>Gp%k zqHagvpibUKPX!K@>K!->`d2BIL{0vnDyO$!?Zs$kv9PMmPD?(&!kjrv9HMo0FIqar zNX;1y7JNL9Pp_-re-@1~S7jNyDjs}NJ5{eQWe36;`RW4i_#>-+0zd?xzp)AkThki{ zSbKD?bvQWl<8;fGAN1}D^-yj~v*})>NlS-jK4m&3ZEGd_5Y)v0KLpIZ9k;VRr(JN( zt~d(2{YAKr__c*z4-MG`nrX065_S9D+sKbNMhL+>?OgrPeJ0lI{){8%xW~n zar<(GA-NAvyXo_V(`3D!6L%{kS3SF67Ws^S%ghPr5OHIgpwImkaQoNBGRA2m?~J0P z!9%=vy|c2vkqhmKCsAr!iqX@1i1szKS9QW>3!$F1Am4Lhhl{|v4IOalEOBir(!W}p zo{&zg;DD6*+;nSctOkm{zE`>H!JV--v=Z|G%W;9lbM-$U{!Yv9smy>{0Cze5YKF~Z zqvGmMT>}lNs05FN?Ws(q>6X43jeJ-+TDGomdcSgqZP#&>(KXp8`}TKB`vP}s6=yg& zP!Jn#g04fAfQy0NlW2M#Dcix-kA}%xB%tDjp`_w#k@6>Zt$WcUpox+Dm*{-eOi#j0 z)@6X_gI|rtgL+F9{}43PT)|ypdptUYnK1z_!8_0W^F7q;tb@fS<^HGB6K0A)e*HdR z*dg2;XsEVY-^jt|Cb`+5!{hIaUvj7gcrx{R1N-6iu!0(Q=yZca-W`tuTw42U*uFnrv~ef54=Zht?OQn*J-OMSGD0IxQH z&Wy7z%!fE^FI9~22Dyf<65tdonWsqfuz-6dM)}DyhleeXGM^Ah>$p_h9^2MTi`nbM z$G9GqjJrI+)qa3;OqDX;$M%)~e8sUY*SQn1F+q+?HbZr)!Nj9}YqOecr=Kj~oA@U< zVZsNBv8{y;|0ff$;hfd(Ejx3bxzys_jHq}4K|RLvK-NR!&zWCVq-WM35DE4TyI5@q z&qpZk&;7;BvuQI$NWt9xQOlg^e_7YQ13augL-(sB*sVH8@0<;QNr#AA%DuNy#I$6* z@Z{{gzA27xD~WCjM`)8+wViyu-E^C4baSvWoXgYopJaV57mFE7?xheu}?7lTTOG9mFx0a|LNl2@=>$_f#)2;w_MiiA2X)vx17)N$+`Ce zo{sui9ccySX&Cx1x{cAh47xPTqu zm(}fAS_xa$Hhm2h{}$i*h|>8Ct=&#aP$^eP<0Nj915dtP_7M}tP4v}7KwIVU%AcW} zkWp|X*}nIrXXXy;IUi^Z zNGuxo=4#*?1I+=GfQ`+Y_1um7g`N(F7k|%T$jEHkm{HMA+0uqH;T40!$JOm|&ykC% zZ!7$rtiu3&(}N;KJ|5tr3Kco4(P!dse|4NrKMNow-xnTe>rPH?{qXkcDG+lBzu|$>&mavHYex`xFU- zdLY}UhN$SPCQ(N2OlKugL(X#X#al6?l3n$%yf#HsKgMtsf-nn4DGNu>PAQ}J1vytm z+hoXn+oS3NdQNkgK3vP4FE(y9>iaDi@7^FY zc}Az?N%0)^+V_6*<&YI9;(*}`L{UM+F~QR=@|iy1^=-=r3V|ycsYT`QUXX+4iGNpF zW3jaJ!BALtZ9$$Hl!H%a9PUxLy22(T#gva?8n!>K+briz_mEwmO9<+wt2686-GnRd z%fDAL@?mZ2^O3Aqo;>KkFBR3RVom?=d^!n(A&-F-1Z0~R1cd7U&!^p7t!)2~c$&wH zXnD7-$r!4{_)0rm_}S0!UtQ({1qI5~&?1puyTpuA*PODL&Pw@j8eP#ihIo-ma&56V zkoD~4@&f?u`60MD1vC}-%yyjm|DNohR)K<0@u@4Rw=2d+IYR;ywh&ySTtV zkb`m*o-HB<_&?eQfgULZkW6rg?oB)*{e_O&Q!ITZLD`NXlPY9nPdbu>xi!0eporj# zfZ*x!hDMh951E-+Ovos*Nz%wNkT-YlT&$ZD$fHOpak3;ZX|;i(VI>lEDWk+TTpqT5PNG}2{@p9Q4;kqo zAz}zmFyT8GvNxde`U|z0!w*qkfR^|TDoDL(Bq*_^Q3^nK);|!423aTM_c|yF9%;rY zg8bi!G@@G>coi|4lJJ7xcna3RC#J8~0pVn+8QJGHL~d!2wob6-fnYdvp;ssrh%3a# z7Ah4XQ8^t-K$)n_b08w|e@L>Q30DM(=49U<+076wf(yH8QiD>Tb2#4-F?v5)#=9Ux z1-3xm?|@qwSt2AFp91t!_*_C{m=5q{&1sdbK2I@Zv))2HQZ)SwlMbgs^6#pM>RNsEO^b&&7h z4=I!*V&i&X^zZ9??fE&Nq-mqDq&!lKY&jtUOVy=qrq%Ht*3kvYQ|I60H-$H;HHCpa zUWL34ljlj*x}*@#L@bk!C^juMMX@O}EtOhewpwCdC_2vsg}~WIB+6_#&pg*U(*lK< z%7>}uz^BE>#pew)5)B1~akt}f=RxFA02yc;8>o~YllI7rhZn*FEDe;&kBN`TkAV}l zQ-72lE|eb@9hMD&z!*S)3K=z@Gr9V@eu4xe?Njc`j3o?>-PrZ0^|nAq%x&v(f+^pG zGO?HRE2d=po&&Hqgu$>$^??!dR(d8lOQ3Zhx>A#e*|#AR)mTN97p|bASO{g z0!^bc1Zj}M!R18^5GHCkJ0mPWhq9c!m6&qFl#!&;=tlT$*vJ*RYMuxKb{2fH20MR* zLkp>+28~6(iBJ}NDhG{Ge~g?LJ|+fFZcOLf^{7m52KE(0SttnTL4~^d~3-yf~Jo%sssuLic4dJe`(Fet1 zB!c#BQ!!w}qDVK2UPpT@P5}?+02hB?N9#*y$up${GZ{2m0_f0&Q}eXX4$LfQdw=NQ z!e1fKK-BqZI7@+PkY;ASTx|IeW=&ydQT3oZV0`3}gf0zfM0A=FsNajtYS-i!w6AJ-UMAC9qn$^UX- z^PROR=tnRv!NLsadH8n5!162gKm#06YVZEgKuUYT@4)I&pIZFzQCKCOE@rsf++>hF zDwS9m5QzpQ8Uz(790W`VwRL_uIUh$~-*&lN#E2JcHAB^3vjQV~(Vx0RmdlL<{1 zWy}trgN>nuyO=`7<00?#k2f!1m)NGWH?(YBFF zDL3F2qU@nUa)95$sCX)M-b)GZSe6!gmFKSfS4y-Fx6ap33T2y%wBF9e57%Vz0F*01 zWDvs2PyaFGB+>&z9snarK9I6{`~#)}C!YkFeXt8n&>FD)0#Ql^GTP@U^8=p1<_HLq zhMK2`QLDZB_PS-OP=ki}m0=H&=nQfPlSt>~9m__(vF^tx8)WE51yO~h#(k>;5^_^N z|2}>8Rjdqh6bkAkZeBVH=%EW=79uSLu>^Xj30aRmiGkqL5%!hQkO~h3w0K z41MRtEH{XRg3o`~#w-(&Zi86<0K~12h`RqBPQr&-w*#4M9 z*VV+TZ9EtfR93}I4l74mcH@yZfB^dtDZ#a4KQDLy6fp^en}b0treHYq?Y~5yn7swE|INKb`hPb1uv^~(Us-?9{o!DdEYm@sf49HH!&>YDk0kmz;=XT= zBrIk3#6U3ODwU*gk+JNX*Mt(l7XJn|H?rKX3v1(x0t>!O`1ro#Kp)R96p&_)D5`ma&q!NJbF+CWyvj?hz zIdV)&=~6jXwG{anGk`KZk(bscPk=Yew&JauF%hviGEkNoK+b_Y;=rIr|K?+j>;~C8895Tvcm)l-X8(kZV zPm6ktpJWTh0#KcfvNMM1+(W0J41Fe6Mr%LWQP5_NjVv z1i4v#E?*x0Er`xX-@Er89tuCRhr1oBJpHQ9^d1cykl|MYn^;&Z&^Dq*QiS6d;D_Tu zNU0ALp8cXpLj<={1j{_;^4tY{&^B=Re*JUh_$VU9xmlq-GEc$nA%(_Af&4@ukdvPX zDMZHSYZVeOp*8cL~n*Lf3~PS3=><_u!6|Y4+zOx ze%Swp+WcuN=qgPv&b7^gIz3lk?Y#SFc$qKDbh>;+`zQyRXB^iN`5cFA>>n`_FSkKb3w>zh~a9@%?-} zZS>J5s|>npDJC-u(GoX|VB?!Z4m}Ggu@*-i%?@b&upU=Hr&y$8^L^5=sSbayUgPZR zZZJX|LwsskrTTEuws|=lr2C}vdf|`CZNAE@ zjTIDId>n3qF!T*@dYp*0Me}Z&WoctAuZcnvJ6!F`{L9sfbpJPkV zkgn~U-s|n!yEXBKaxmUg|2x9zTfv-)b)D?ce}U*+Kvoz1XSv#- z90{6`E>eD)YhLm|A}8pAKf@3cJR@Rg*=yTv_o2)jZ8|Aml)We30;hVVe`B^5$;+o) zvr|u`#6*$FC!sk2$8BEAaFH;gS7al%K_{>6_LBegzOKCHL-YqvBd^doqXW1m=5?1{|4?V5x6QAgh!8w5cFqSk@tu>*fuwvz z`r>~?`&2ZR?aj9oRg4J#+SP7(PsnXUq|f@X4q5+;J$7c{FOrSEYj&+ch|`=oU1Q99 zArnxGWtDI1(nC++mbdMve|O|A<3A8{S|oBHp;|bPG2YzYG^>06-u0V1 z!+PAl4u80>UX>izra=@BY!$&re_}OT}liBX%v&od$^)BO3a0^u9zXn zQ^|ge-VjvDbY2N#Gkks~W=HXv_z;?%CLTPIn}VN%F3l8Vn0+#2#ss{+gYx+u7dmaY zGdL^OWVPj@`KNaRbj2lHfEgQ$)n^7x1|7$hp8>0E*mD=|sN175R5YwRaTl!Om<~Y{ zL(V|VSk_}m`;OcNN?IOqh9pJ8?T+JhR;S+Z;HGGDao=y7Q>)k(>pmOK3#X?P@mk34 zv8g8>-HMK_$Fwr`44Y7052q4)>T5XGigM2Z2=Mj$_PHm5R$(H?IS4Z)-?8`?`BELE z1^1S?A_+s;6R5@s9eMYubp@#H_eyV@%yT~l&rO<^=cybIytn^Uz6k75=-L;L)nDKW zgx^o;{yKQTZ_?tUR@jZBU)sUC&$QI^&LQFt7^1zeXhvWD$%R3y@6ROc_|Ki;MoIe! zG4y9J8hrURRql7^n&~rVpMIQwU*)ov>rI-k7!1|MuCWk;^Y1jZL=d3RjBHO5;A`|%)4{n&)2Eq06Zu#=~#DtS3{Z|GK- z{bV@5aGfQ<2IdJj%QhD7dfp)GSy%I%=Q|F~dI|fCsd@P)diI~t&t~erTKy2Sbjp8H zUI(Rh23OL&r9erSSCc(af3!*4cc@Zh(GcMc=5yBQW$KZCIztgWtnP6YwR4kx()&^$3Moa%5qVGFbDs=zrzg6K%bjAPP?=Mg$ z3S5f|(pQA9{84LTJGTysjdBl{Ezs{M2j0{SRekTSobl&mQEC#TvApxDdGlNrma4SJ znD(KgA559;F{X*^tkOGddI ze0wL2TP_#*__;4;7+x2<{t5Ld4vAsD^7m3p)U;wJUneIa7l7+Zd7fqH>*7@6#3i`8 zemdfax?A+j08uvv&-bdRT7|9)c9Z9J+lBU;+C&F1 zzc=n5g>T@o3Ec$z-zvSgmU`fFg2EC02g5>)TVM94UOL^JgM9a$^rp$zDp(QUzO&)n zkYb%7gYV+l*lJxjvGYGtCug2?)qzyTenN^2pe6w*Gv$@6cf_J~%+juRVJSoYhcl83 zuHZfM#AtC~VHEjhZF*vu3Ds>)w*=C8hgB6>U^P*SVPFQct3dy}0nc($BbT2CIW(E; zFx)oznekxiIUDt016|jD$9STL*8SiAxv^+xI5=X^{j`1J^mSA!L76#T%snz{ z^)S~aZFQ}Cx-O%dG~doLw~1Cs(8AJdL|HI8^`&UHoH+ShFL`t)2)zWY#1TbyJyB6{ zfLU_K4kek^!Y_~b@v6c?9dVrodWQw@cdG z6C{#QSu7zOIJE2umEvfLW>2p2UjN8fYt<6l*mGs-+EvZrxEg|jrt>gS3ogeOer_*d zl_gQ`7-~2zM(FL8Y?alQJTYEuJC$LQ(>hd9<#|*e;bvPDq8ZaFY&Ci+*B&AHfXmvC z!S&7Mb@Bw|D?|%rb8p_VF~|-z=cH>}FHeO!_-vnYt<1=MzMly)h#QB>OLMn4q;eDs zj?U_lZ#P~wIaU1WVyeP@d*@Y7Lo`Agvj?7zh^OnAsB@%wWLNJcq9E||_al``HUDNZ zz&Y{P(<0~fjUa@>haBYgn(;*-S%unEKgFj=O7}({@)_Pj%yYpogkj7Ae}H5DgTbcm zkW=T__>6MS6_7($^%?}uoMoEldc{3|?8wt@#5s?i;M$(4MlW~)&Y?+NQ?5jz)FSiP z!*D^4|EHL>mWsh~@}>NrH7er|JW~}mr$&JO;p$%}LiAf#yg!82e%x-6HU0O_+FM-~ zewW#M?=3D!vS$oV9_qS5Mw*^Ck=ss2PU%$jvHbZ2#4}qc`zs`BUGHKbqO$T$$p=5S4^DR5v4;(1i zeRJn@&g5qpdyJNG;jM`Gu+p91QCMuyN=Spx@x-YMSYg+=OxC)r&I<^XyX%+~T?SE_ zwUo;_D9>GeeyXT&2t-LMN>v!f|BB+NOFiho7#&DF6^}k=b!6e`9vL)1l6Gir8+f+K z(@&YxkaCIGV{L=U(RNxk^u0exJ$M!1s9N63+(s%%4bVr!3J8uC@=j3J-B#zp@Yph_ zJ$uLL zH^~9bwsg#$Y>F(mw)-khsN+<9Xv+M!weqajrFwAT?jJqaZ99VeBl^bd!|})$`NV{) zh;P8*xL8PvMlc5_i8CihOU}*izX3wA_~7EEzKj3Bgpm!Qn}T!diRi;Vy`HB~HmWg+ z)g@sNvA^=!-Xgn6gJmVULdyxhrQ2|+v2lEX^yw*E!J7YQG!R++lNp!T35wH;l48#j zDIHCHG&8*S@ns$p)3g`;)wewU6QJBY{^;~`XyQmVQ*DPiOW{Z}d_NoOOy8(#nPo|K z=@Y#1dCyqo5tzMm_bFY<(N@1{vb{N67+$?I(|nic4}-9SlfN?R1+#RK5MY ztGygQUt>}pYDl$eQ=Q{hge0;YbU0Y8VfWFR1*l8mm;~uxtjAw&AAAl-D-7E?`MEB{ z-adt3mJCs3RmqU_igCb*z4c8RIR1f`KJ$T@HuX2NM;AxAjFT?8mre&p5D`Md3oe3( z^zUi^w@b9PtuYSZvdZOuvp2C^v?ej8AxV{c0r-D}x-XbQ;rKMR;>z$AM2BRPkv%#a zR&|_NxW!OVPs9dHrs`AIS{?e^%Rfwiy7>$`Hg7&qw$YA~T1p+e7R<1`(G3d9CL}7q z6_ZmUP*{F+R4aQ7By*Uvih7}rU(u7PUlv!=<=TFJJ3qhd+fyh+IxPHyw_{zwfxq6Q zJh%*!xVV>XC6o1(^^YoU#8l)P`>mr*GK(u*R3F6gj;)zls9v$MqeK&^*?hlvlwS3XjEPh7v^(%O zoDQ#-W+JIz8I3kdLBahbk2q0*gmRw-*Znd1bLTZ57T(xj7rYlYp1qa#Zu~gH=;5|q zpZlj^>TWU+=ojuU+YZDK`8rk?IZVl?qbDKDTZ>a+M&~6x<-A~y9AMG)J9s((h z#OqoHez!70w5bi8lkK~`>D`N5X$SsxNbXltWpYf4&8F3G! z9BNL+A1;@B<3r{aqvu+X@67azsX2u_mR3XdUuW`OcHPKITRlb3?)>wgDC@5)30l{? z+YSlJnBq<4eg2MA0eIG3ce26n1oA*B+kDt;zZqDzvi)TC=UcX}Guj>TkmAjuscb-+ zptF3Kq9k5;m>e!E897 z%jv~UXiiQ=mIV9M!9GCqMj0+p7ih5jyW2b9lE;_LGPdH))m1%oI`*i?!eGyorre3Y zz=}ywz4Edr6U9H9aP=a9-0_*f!Gdb>=DRD`^7H9i6~Cjvqsz&Hm)z*D_afWhs1O*` zOwCTP?mZ?3ajB>$*EpCf>8j763|d3W;EPx*a5u$(DD>ALTAKlgg;XCX;%k0U&^pyH_i!i+<8_n_X?{7vGefxBIf(03=Y6DT8UZ;jugXazN z*h%NW;1Zo3{xDMbD}%L(7#V`0cTRSz&koc;Mej~Z|3vyFiCKMCl@Mb0vY3RtEl7Sn z_8#UTj#u|#+})h~L`e*fD`PFEO!Wo6cZRb?6Xdm*a(Kvu;5I0Kng|qAyr4N*%u;K7 z4U*H-WQ4iL^V&*7FI=YpBbP3V|Niy=Z-j4XYR*_iToGp)j5fkC@Pu6?6GeXs@bP(* zII2nBj;2>7*-RAob6(Dn9v_w}523Q+XIx-($~Yr{pYSSAH0^cu25-%5GCa!c=Lyy9?*P1#e65a3Ykx zCc5}ZhzkehSH(pAb}XkVqKkL9UU8BT&@D9Ab~jzQ0;pTbtPD@DJV^)bt4x&wL}RJG zbm5Rix zBWnE~me`-d^c69+PvxUDi=#eBV;elZFL%9I+o@7DulB1_)bhbZTHXoKW(nskx*30? zTBWC4{*BbR`ufrQP+=QQFLz;6t%ZHhYkXrk$YpL~iEa=Oo!I3w7=L>tXN);SucN;N zMZQL9`g^RJ$0V+K`#<00aB08yf179LYu%Dj!Kmix&eG4dqS8DGj~ZuJ=N`R}P8?Ku zqYk|mRbTyV28~c1rq0uNt>B;l`cK_0Qb8!S09Fw!>YFnO1@*p z^W~+ouC_c*yO!|+{B*;SGYcLK=iFWVe;_^AWDVkfkrVHOLh86mp@)Wb`Xr*0-xo3$ z#!q`&$d8>wt%kzD4LoLAo~TF|-9x@>Z39N65~wU=&B))Gl4w@HnO0wp@&6WfTvgsn zl@|y57f_XxIyC;9>jIk*kM99jwM zb9v6EZ3K-VD z7j?05OvNi1eL(i%p|zbuM={yT$P0>oY6HHuHfg0T!7e-O=8=L8bj@hO#5Y>Oj^@Uw6?O zN=myIm|Du15s#`i7Pu!ro4V`6ZxsFsO2-$iZdJESITRlO5s5{v0lc1h-|zi2->?L= zdVKB^UF8{G5!IkS=w-o`{ndGEjHdU{q%=m1_5S5yK!Wo3JPNX7O{C4}b})8d54M|k zShU5mOSxHJ$)6!sjo|kTYq^P$=1G3*$kX$ghYBEAz-cdi#F`(trtm8PmmbVdfU=91(zj9-s4U0vazzp9#JXQ*^dC{V;O7& zBc$%9^cmUxar>njm&oc4p5GNmAeu|N56fPPaLDD_#ns`)edc4o#O<2!yP~3oKF>f_ z%ka81)_VDheEVcf*Aam0aO8sz<9TRXXjMN16?X``bT4wIsxF zPbMy+tm$m=cjm)q_`~^UYhAIwZ-Q1TYFv)aGW_K@F*(f>oi_wlS=(Sgl}?h!jyav^?Mg1js$gMjhfEd9!H`8QL9=uM+@!hfK~Khtv}P6ZCyPE5DqrobnKl#5Kzk>!kNBjZ#>S?=lg%7sW`eiK+T#7RIl5O~M-;XHO}& zO=<_ns3tEq{sS|SIHR@f3(@8Ct&R{I#8t$E%lgwe{I7)FELw85bic38!J#JY%F1gx!7hNZerweeRE-uAw?d;K@zr zOjYNOk=4m>&E?;E^oLj6uNN-E7Z08@lGhmM#_RVDa7&6%a4Q;|iq7eIa$YoEZq}M z5G7|2keo)4oP%UR$w3%$7KWT9OOi0aA%g^gAr3GC0+Pc>&KV>QIrHY+bKbqjd+$5G zwb$OOyVu&^S6y8{s(N)*yHvp@cy4eHIHS0Z>C8z}syhf?SqfcG(bOg=zA&oO*?f6j zyrSDrG!&9vfT5W@lEC%R6GyTx!Q4WJWb5KVOBP-G|u z@Nt)KRfAYODPrK!qN{T|{O-$9_G`#wVt+WMUp$$aYXpYXQL$I%aeUrInMa;l4Pm5} zr}rz@NM=v;N1GM-jXR-PSFfDvnCsaIZ`IL1yfKBQId!(hxCF^9j;@#9*}LT=>CyM6e+aV5lbYsdJM%joQ-pLH3wf@vi1H)%y8rn2iPd+|EFm(e#RvIqk{Nh;n)cj0EzBP?|qJhpESl8CjfEI>GZ=x=Ll zghaE?$5o$o)V+*BZ?BLXdnd)?)jLNo?G8!|@tt}1E_ro5JhN8i(i(PxSc@zST43+| z(ZSb#JQ(v`&_WOEKp#69;5S8aU90PmPI)^sTpIQn96%_Z;FP3we=D1i(4Zl(`k-vO z8(E@X0X5u+9o*`F<@bg1a#G7^mcNQwoFsQZIr@un|H+PT%habN3!@Q5TS~!I7qXPH)JC1AOWovU z$XHhud!L_Yif>YHMl$c!iULI}w@{LlWXgpj&~{P z=XwLL`EIR^8aYB5cAm~8<|11rKPZS8r(oSm^yJY(Gwcw0XOQpp0UC!k%An;^t+^Qj z*5V5OAXla6C_%Iq4zTfR+koXtQ)DIkYsyLa)OAtsl-i8Q&eguMhb3R@l=eP`$PU;Q ziBGF<`uPaXvCEFgQ~DX!7|xu&ugvZ*bUQYP70fz_+K?@dbqxn^)wsO5#l?>JEZgMV zZEB{I*p@ffB|Rg^1=P|E@_% zVkAWtLSJq8#i1X{V~=zo$jhYk>K`MDTA+6oRZ@&2$o~;>{sk$=g+?}@BfD4BajgTw zpNTO&M-tpfIW~yH55lWAI&+XGIlpze`}VcZbA0I;Zw^8Od5rakwWsI24blJE1S%5X+Y{1|`JW}(U1$8+B`B7lAb z6h4%ZxUI&=B4P)8rXF1n-KZp{2N32O2)@j)fRZ`?ik3TDTamoV;Lf2_reGYGt@wHj z*JN&}HtvN5ZR!_>bOU`aCIMeEu&||;16eOLA$|heo5x_M=>{nc72539kq!8^uaTX0 zYj)>NwDo&q@YF|7Bsh^#lE4< zn<26)^D*+1-{`Sz*ka&jLjJw)757ez=yU9Hvi3-$=6JzwC2m%$7Ueuf6}(X^FGq&u zZWB1lL*1hby&z%MhV5_`XXz%yt2<4i3r;I@WjHDU$IG(BKRjIW>MU1rw-gNv2U-$~ zn?@Ggi|k727DDDuf|T|fu84>fq2$yvFP=N#s|c(QmmZNUncg?v*IBH0kbyxxrCvvP zxNh))*U@b}SsIS`&=;|F!OGN!gz`sZXU=gC?RD@GKn40MkQ`dMgl3Cf~mP9*u}|5 zj~m@}GeT#u;+J8LWzqAm#_%U58Y;_DqIVTz3@0Bs++}+Prk@`OU*%P%y0S4x%A2$m^-M1ww~DolSeOyPOrM4sx&0vg_V@p6RXhF zZd7mL4gf&+%S0Sb6GumFEnEP)Zh@l8@2|Ee2I^-3z$d<+u#M)f|DG5oQaQPg5$3&* zdGt0pWY{MBuDl5>t{Jv)6&c~kKCi1d&60soe4kyq81?m8(a@!_T$kYXlRM1}t2&L( zqtMZ4J}e8P$03WWRq8QzI+>i&R?!xBki}1s9h?-F$vV{BBHGN?d8_d(DGxv5 z9{x;x(nfQBpcD%Lb#oKGrn<u$*|&0ENVwdn=nCD6#! zGpKVza14^QxF;2%XK{(+>q@N!i-0uXYGAK@C-eU<2$H6IL zAJN!t^aJtEKQF>CSIi@gv`4a5nxf4g3eCQEC>5!%BLL!U{&0Kk^qV*mBa zkFf_Yx!Z^rfOnZ`7$k98C9%|k+dTcn??)M0anQa|FiVI%2f5661y(-!;UfR`pit3iIIhOnG@mVn9pXaZj-FG0Lx@ z)d4RC^2#qfl4g;lQ4Y>VyVrJlEEFWO*h0P=x3b@ zev)OL>KRZBD+@yiIKb&p(u!sQSx*Fd<7{75>5j@#6=W z)866AOPBYbio^gH$kQCP``lxqj9m49pBhX|VuleDvBRyr9cps_H~$48l5z~Dh%Ov) zGo}5nfyB>1Rn+6Su6HUi!T{A7H$}LwEb?>^*f8bX!eTUk zOn<<$zQp9o3gnn&W+y{6r0hIq2#94&1b}z)_O&Ef8)g9G*(tu@`CHZ2@E;y^VSeV` z61Kb&49!n1WJTDv^KHG&yeCT`0VY4=t?#}(bmy1l!?mlLLKmhg1xkN47KgaUw>pa| z#aZaWKW0|Xx1@^p)|zY=8yz;Xsfc)MTyIQx4m#{J_d$P@wlFJQUW_8kj+%@*+Ouoa}Q9_EHg*iq`t3KO0ve zflK+F#lM~XenWn1jzoU(7p)U-gx(Zr7=4)0bQEzNFtBx&i_WR%z8Yw7h3G;q+LxTR zB;V|1qNN6FR|`r?x`>T3ebY-nQZgg z;NdYhh)*GtDLP7{WOPKF&nrP$rRR3A?Q2wCyTK1-SxklE?2mA|pgIj%n@zrF#es8| zN<4A;4O4mQfpct$JeqA^m!A!TKdC780Q8FkpI$XxHD6g%BIIonBa(UcLC5l_Qgk-- zZ)gb8HiGVCe0W_P$mge!gr&H9yI z!&)^FS2U`}V!ydLwyE^rfRNBB!yg?Ld@R$#!9is&NTC5mwQf5@Z^57OSetkFq|E-8vPu zi3PrDbsdnS(jxUbY#JZ@DALaV!&Sz{BDe$@5L>#1&T;R}-t!@NVY8dIl(m|v(N_Y>Mav~jvV`PkP(AWpW1SL5r}Q1RS50)+Ts zkaWRalA9M2MXW<43Hp>=lD0Uir=w6>z||%{GFqhG z5UY;N4N=f^7KHbFdydYlA)953PFP{m42`>o_ zLbeCx9*rCiQ!|$F*}0Wdr5-}6$-Ji7kA9@GnC-Os!Kc^Mb>bf%gH}$^J4kD8mIi#- z-~1p+vsu0@&D^~?Htf2-;(&`&gL){-r#Vj%Mk3-jIcLMsH+veIX(e8e(6p|QNRHuZ z2~bJuhX7Vq?+b+K`>*%K*D1?-XLofY1X3GI$~$Xz)AtrM5oY}EXPI{Psy$u1^dKF= zGKI#uC&?l->8|g3>aNXNPDRK#B=93u8)lGvqnEyuM%2qvn|RVA_vVAU3ScT>SGAOa z*S5T1u@cK7p~jvPf(!TEK6Pd{Rt;zCIXnfqb($Pqy9I_u%V6K|U=PE`LT4_>DG<7D zBNpKWcvdVZofJZAr~DiyCPk4@ncGx?l(txoXcO~^UtJy|t;^}8uIoS5^Adp9UHKx< z2f5~yh$iWV%bzw=!n6c|D*?96u27kCUW(!te#_=ov`8|p19;y=w{=TejgIHxq<+}R z(e}i23s;Xr;uv-OHY~M%P5Rom`)HCYhX1?Yryn-nsFUFp)gl7R7wx5mRJ1Nn53nt9 z!`?-+HgiEDxz0pcDA=wjd3d~aDJfVfgvSq5O?TBY&D)V4yI6gjYC}My+{oF4+Z)nT zzx=2ch$dMrP80d>Y3X;+$k6fr;l%##5C5a_=Z645@Mnt{up{w%)7iw-)Y{buwfSu4 z$fd1?`G+H{?Fj(<9nSrqa9;d7j)keU{eJ`dmy^C68h+7*2>{e%0|4~@1Oou_0z&>P z*k8r`(;@v2QU8TL3EWm3K;cZGLIB1;(NRqldJfjVP5B?9{)CPS2so|n|BEXAh3{)> zd|8c>eh4K!=TFjqLyi0ujq5+~jm&JVE$mSm|EFjDHxqe2q0|sz#N5L9*V zlIO4W{QpK_KUZP+D@RAlFFF2Fli_bDevU8yp!mbMRC|9#@kg}zH{d^qXMdI7w(nQq Y|CdQ&qHG=jz(+kqsL=NH*zdjn0iQ?}8vp %w[Debian RedHat Suse] - - setcode do - if File.exists?('/var/lib/rabbitmq/.erlang.cookie') - File.read('/var/lib/rabbitmq/.erlang.cookie') - else - nil - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_exchange/rabbitmqadmin.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_exchange/rabbitmqadmin.rb deleted file mode 100644 index 8e0d6ab862..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_exchange/rabbitmqadmin.rb +++ /dev/null @@ -1,89 +0,0 @@ -require 'puppet' -Puppet::Type.type(:rabbitmq_exchange).provide(:rabbitmqadmin) do - - commands :rabbitmqctl => '/usr/sbin/rabbitmqctl' - has_command(:rabbitmqadmin, '/usr/local/bin/rabbitmqadmin') do - environment( { 'HOME' => '' }) - end - defaultfor :feature => :posix - - def should_vhost - if @should_vhost - @should_vhost - else - @should_vhost = resource[:name].split('@')[1] - end - end - - def self.all_vhosts - vhosts = [] - parse_command(rabbitmqctl('list_vhosts')).collect do |vhost| - vhosts.push(vhost) - end - vhosts - end - - def self.all_exchanges(vhost) - exchanges = [] - parse_command(rabbitmqctl('list_exchanges', '-p', vhost, 'name', 'type')) - end - - def self.parse_command(cmd_output) - # first line is: - # Listing exchanges/vhosts ... - # while the last line is - # ...done. - # - cmd_output.split(/\n/)[1..-2] - end - - def self.instances - resources = [] - all_vhosts.each do |vhost| - all_exchanges(vhost).collect do |line| - name, type = line.split() - if type.nil? - # if name is empty, it will wrongly get the type's value. - # This way type will get the correct value - type = name - name = '' - end - exchange = { - :type => type, - :ensure => :present, - :name => "%s@%s" % [name, vhost], - } - resources << new(exchange) if exchange[:type] - end - end - resources - end - - def self.prefetch(resources) - packages = instances - resources.keys.each do |name| - if provider = packages.find{ |pkg| pkg.name == name } - resources[name].provider = provider - end - end - end - - def exists? - @property_hash[:ensure] == :present - end - - def create - vhost_opt = should_vhost ? "--vhost=#{should_vhost}" : '' - name = resource[:name].split('@')[0] - rabbitmqadmin('declare', 'exchange', vhost_opt, "--user=#{resource[:user]}", "--password=#{resource[:password]}", "name=#{name}", "type=#{resource[:type]}") - @property_hash[:ensure] = :present - end - - def destroy - vhost_opt = should_vhost ? "--vhost=#{should_vhost}" : '' - name = resource[:name].split('@')[0] - rabbitmqadmin('delete', 'exchange', vhost_opt, "--user=#{resource[:user]}", "--password=#{resource[:password]}", "name=#{name}") - @property_hash[:ensure] = :absent - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_plugin/rabbitmqplugins.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_plugin/rabbitmqplugins.rb deleted file mode 100644 index eefc9fb254..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_plugin/rabbitmqplugins.rb +++ /dev/null @@ -1,47 +0,0 @@ -Puppet::Type.type(:rabbitmq_plugin).provide(:rabbitmqplugins) do - - if Puppet::PUPPETVERSION.to_f < 3 - if Facter.value(:osfamily) == 'RedHat' - commands :rabbitmqplugins => '/usr/lib/rabbitmq/bin/rabbitmq-plugins' - else - commands :rabbitmqplugins => 'rabbitmq-plugins' - end - else - if Facter.value(:osfamily) == 'RedHat' - has_command(:rabbitmqplugins, '/usr/lib/rabbitmq/bin/rabbitmq-plugins') do - environment :HOME => "/tmp" - end - else - has_command(:rabbitmqplugins, 'rabbitmq-plugins') do - environment :HOME => "/tmp" - end - end - end - - defaultfor :feature => :posix - - def self.instances - rabbitmqplugins('list', '-E').split(/\n/).map do |line| - if line.split(/\s+/)[1] =~ /^(\S+)$/ - new(:name => $1) - else - raise Puppet::Error, "Cannot parse invalid plugins line: #{line}" - end - end - end - - def create - rabbitmqplugins('enable', resource[:name]) - end - - def destroy - rabbitmqplugins('disable', resource[:name]) - end - - def exists? - rabbitmqplugins('list', '-E').split(/\n/).detect do |line| - line.split(/\s+/)[1].match(/^#{resource[:name]}$/) - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb deleted file mode 100644 index ef284bdcdc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user/rabbitmqctl.rb +++ /dev/null @@ -1,98 +0,0 @@ -require 'puppet' -require 'set' -Puppet::Type.type(:rabbitmq_user).provide(:rabbitmqctl) do - - if Puppet::PUPPETVERSION.to_f < 3 - commands :rabbitmqctl => 'rabbitmqctl' - else - has_command(:rabbitmqctl, 'rabbitmqctl') do - environment :HOME => "/tmp" - end - end - - defaultfor :feature => :posix - - def self.instances - rabbitmqctl('list_users').split(/\n/)[1..-2].collect do |line| - if line =~ /^(\S+)(\s+\[.*?\]|)$/ - new(:name => $1) - else - raise Puppet::Error, "Cannot parse invalid user line: #{line}" - end - end - end - - def create - rabbitmqctl('add_user', resource[:name], resource[:password]) - if resource[:admin] == :true - make_user_admin() - end - if !resource[:tags].nil? - set_user_tags(resource[:tags]) - end - end - - def destroy - rabbitmqctl('delete_user', resource[:name]) - end - - def exists? - rabbitmqctl('list_users').split(/\n/)[1..-2].detect do |line| - line.match(/^#{Regexp.escape(resource[:name])}(\s+(\[.*?\]|\S+)|)$/) - end - end - - - def tags - get_user_tags.entries.sort - end - - - def tags=(tags) - if ! tags.nil? - set_user_tags(tags) - end - end - - def admin - if usertags = get_user_tags - (:true if usertags.include?('administrator')) || :false - else - raise Puppet::Error, "Could not match line '#{resource[:name]} (true|false)' from list_users (perhaps you are running on an older version of rabbitmq that does not support admin users?)" - end - end - - def admin=(state) - if state == :true - make_user_admin() - else - usertags = get_user_tags - usertags.delete('administrator') - rabbitmqctl('set_user_tags', resource[:name], usertags.entries.sort) - end - end - - def set_user_tags(tags) - is_admin = get_user_tags().member?("administrator") \ - || resource[:admin] == :true - usertags = Set.new(tags) - if is_admin - usertags.add("administrator") - end - rabbitmqctl('set_user_tags', resource[:name], usertags.entries.sort) - end - - def make_user_admin - usertags = get_user_tags - usertags.add('administrator') - rabbitmqctl('set_user_tags', resource[:name], usertags.entries.sort) - end - - private - def get_user_tags - match = rabbitmqctl('list_users').split(/\n/)[1..-2].collect do |line| - line.match(/^#{Regexp.escape(resource[:name])}\s+\[(.*?)\]/) - end.compact.first - Set.new(match[1].split(/, /)) if match - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user_permissions/rabbitmqctl.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user_permissions/rabbitmqctl.rb deleted file mode 100644 index 83bd808e2e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_user_permissions/rabbitmqctl.rb +++ /dev/null @@ -1,105 +0,0 @@ -Puppet::Type.type(:rabbitmq_user_permissions).provide(:rabbitmqctl) do - - if Puppet::PUPPETVERSION.to_f < 3 - commands :rabbitmqctl => 'rabbitmqctl' - else - has_command(:rabbitmqctl, 'rabbitmqctl') do - environment :HOME => "/tmp" - end - end - - defaultfor :feature=> :posix - - # cache users permissions - def self.users(name, vhost) - @users = {} unless @users - unless @users[name] - @users[name] = {} - rabbitmqctl('list_user_permissions', name).split(/\n/)[1..-2].each do |line| - if line =~ /^(\S+)\s+(\S*)\s+(\S*)\s+(\S*)$/ - @users[name][$1] = - {:configure => $2, :read => $4, :write => $3} - else - raise Puppet::Error, "cannot parse line from list_user_permissions:#{line}" - end - end - end - @users[name][vhost] - end - - def users(name, vhost) - self.class.users(name, vhost) - end - - def should_user - if @should_user - @should_user - else - @should_user = resource[:name].split('@')[0] - end - end - - def should_vhost - if @should_vhost - @should_vhost - else - @should_vhost = resource[:name].split('@')[1] - end - end - - def create - resource[:configure_permission] ||= "''" - resource[:read_permission] ||= "''" - resource[:write_permission] ||= "''" - rabbitmqctl('set_permissions', '-p', should_vhost, should_user, resource[:configure_permission], resource[:write_permission], resource[:read_permission]) - end - - def destroy - rabbitmqctl('clear_permissions', '-p', should_vhost, should_user) - end - - # I am implementing prefetching in exists b/c I need to be sure - # that the rabbitmq package is installed before I make this call. - def exists? - users(should_user, should_vhost) - end - - def configure_permission - users(should_user, should_vhost)[:configure] - end - - def configure_permission=(perm) - set_permissions - end - - def read_permission - users(should_user, should_vhost)[:read] - end - - def read_permission=(perm) - set_permissions - end - - def write_permission - users(should_user, should_vhost)[:write] - end - - def write_permission=(perm) - set_permissions - end - - # implement memoization so that we only call set_permissions once - def set_permissions - unless @permissions_set - @permissions_set = true - resource[:configure_permission] ||= configure_permission - resource[:read_permission] ||= read_permission - resource[:write_permission] ||= write_permission - rabbitmqctl('set_permissions', '-p', should_vhost, should_user, - resource[:configure_permission], resource[:write_permission], - resource[:read_permission] - ) - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_vhost/rabbitmqctl.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_vhost/rabbitmqctl.rb deleted file mode 100644 index 2ee45c3111..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/provider/rabbitmq_vhost/rabbitmqctl.rb +++ /dev/null @@ -1,35 +0,0 @@ -Puppet::Type.type(:rabbitmq_vhost).provide(:rabbitmqctl) do - - if Puppet::PUPPETVERSION.to_f < 3 - commands :rabbitmqctl => 'rabbitmqctl' - else - has_command(:rabbitmqctl, 'rabbitmqctl') do - environment :HOME => "/tmp" - end - end - - def self.instances - rabbitmqctl('list_vhosts').split(/\n/)[1..-2].map do |line| - if line =~ /^(\S+)$/ - new(:name => $1) - else - raise Puppet::Error, "Cannot parse invalid user line: #{line}" - end - end - end - - def create - rabbitmqctl('add_vhost', resource[:name]) - end - - def destroy - rabbitmqctl('delete_vhost', resource[:name]) - end - - def exists? - out = rabbitmqctl('list_vhosts').split(/\n/)[1..-2].detect do |line| - line.match(/^#{Regexp.escape(resource[:name])}$/) - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_exchange.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_exchange.rb deleted file mode 100644 index 6a96520c68..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_exchange.rb +++ /dev/null @@ -1,54 +0,0 @@ -Puppet::Type.newtype(:rabbitmq_exchange) do - desc 'Native type for managing rabbitmq exchanges' - - ensurable do - defaultto(:present) - newvalue(:present) do - provider.create - end - newvalue(:absent) do - provider.destroy - end - end - - newparam(:name, :namevar => true) do - desc 'Name of exchange' - newvalues(/^\S*@\S+$/) - end - - newparam(:type) do - desc 'Exchange type to be set *on creation*' - newvalues(/^\S+$/) - end - - newparam(:user) do - desc 'The user to use to connect to rabbitmq' - defaultto('guest') - newvalues(/^\S+$/) - end - - newparam(:password) do - desc 'The password to use to connect to rabbitmq' - defaultto('guest') - newvalues(/\S+/) - end - - validate do - if self[:ensure] == :present and self[:type].nil? - raise ArgumentError, "must set type when creating exchange for #{self[:name]} whose type is #{self[:type]}" - end - end - - autorequire(:rabbitmq_vhost) do - [self[:name].split('@')[1]] - end - - autorequire(:rabbitmq_user) do - [self[:user]] - end - - autorequire(:rabbitmq_user_permissions) do - ["#{self[:user]}@#{self[:name].split('@')[1]}"] - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_plugin.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_plugin.rb deleted file mode 100644 index 497ced4e6b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_plugin.rb +++ /dev/null @@ -1,19 +0,0 @@ -Puppet::Type.newtype(:rabbitmq_plugin) do - desc 'manages rabbitmq plugins' - - ensurable do - defaultto(:present) - newvalue(:present) do - provider.create - end - newvalue(:absent) do - provider.destroy - end - end - - newparam(:name, :namevar => true) do - 'name of the plugin to enable' - newvalues(/^\S+$/) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user.rb deleted file mode 100644 index be5219d5c9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user.rb +++ /dev/null @@ -1,46 +0,0 @@ -Puppet::Type.newtype(:rabbitmq_user) do - desc 'Native type for managing rabbitmq users' - - ensurable do - defaultto(:present) - newvalue(:present) do - provider.create - end - newvalue(:absent) do - provider.destroy - end - end - - autorequire(:service) { 'rabbitmq-server' } - - newparam(:name, :namevar => true) do - desc 'Name of user' - newvalues(/^\S+$/) - end - - # newproperty(:password) do - newparam(:password) do - desc 'User password to be set *on creation*' - end - - newproperty(:admin) do - desc 'rather or not user should be an admin' - newvalues(/true|false/) - munge do |value| - # converting to_s incase its a boolean - value.to_s.to_sym - end - defaultto :false - end - - newproperty(:tags, :array_matching => :all) do - desc 'additional tags for the user' - end - - validate do - if self[:ensure] == :present and ! self[:password] - raise ArgumentError, 'must set password when creating user' unless self[:password] - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user_permissions.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user_permissions.rb deleted file mode 100644 index 493d47c88a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_user_permissions.rb +++ /dev/null @@ -1,59 +0,0 @@ -Puppet::Type.newtype(:rabbitmq_user_permissions) do - desc 'Type for managing rabbitmq user permissions' - - ensurable do - defaultto(:present) - newvalue(:present) do - provider.create - end - newvalue(:absent) do - provider.destroy - end - end - - autorequire(:service) { 'rabbitmq-server' } - - newparam(:name, :namevar => true) do - desc 'combination of user@vhost to grant privileges to' - newvalues(/^\S+@\S+$/) - end - - newproperty(:configure_permission) do - desc 'regexp representing configuration permissions' - validate do |value| - resource.validate_permissions(value) - end - end - - newproperty(:read_permission) do - desc 'regexp representing read permissions' - validate do |value| - resource.validate_permissions(value) - end - end - - newproperty(:write_permission) do - desc 'regexp representing write permissions' - validate do |value| - resource.validate_permissions(value) - end - end - - autorequire(:rabbitmq_vhost) do - [self[:name].split('@')[1]] - end - - autorequire(:rabbitmq_user) do - [self[:name].split('@')[0]] - end - - # I may want to dissalow whitespace - def validate_permissions(value) - begin - Regexp.new(value) - rescue RegexpError - raise ArgumentError, "Invalid regexp #{value}" - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_vhost.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_vhost.rb deleted file mode 100644 index 9dd0982dca..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/lib/puppet/type/rabbitmq_vhost.rb +++ /dev/null @@ -1,19 +0,0 @@ -Puppet::Type.newtype(:rabbitmq_vhost) do - desc 'manages rabbitmq vhosts' - - ensurable do - defaultto(:present) - newvalue(:present) do - provider.create - end - newvalue(:absent) do - provider.destroy - end - end - - newparam(:name, :namevar => true) do - 'name of the vhost to add' - newvalues(/^\S+$/) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/config.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/config.pp deleted file mode 100644 index 8894280f6d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/config.pp +++ /dev/null @@ -1,121 +0,0 @@ -class rabbitmq::config { - - $cluster_disk_nodes = $rabbitmq::cluster_disk_nodes - $cluster_node_type = $rabbitmq::cluster_node_type - $cluster_nodes = $rabbitmq::cluster_nodes - $config = $rabbitmq::config - $config_cluster = $rabbitmq::config_cluster - $config_path = $rabbitmq::config_path - $config_stomp = $rabbitmq::config_stomp - $default_user = $rabbitmq::default_user - $default_pass = $rabbitmq::default_pass - $env_config = $rabbitmq::env_config - $env_config_path = $rabbitmq::env_config_path - $erlang_cookie = $rabbitmq::erlang_cookie - $node_ip_address = $rabbitmq::node_ip_address - $plugin_dir = $rabbitmq::plugin_dir - $port = $rabbitmq::port - $service_name = $rabbitmq::service_name - $ssl = $rabbitmq::ssl - $ssl_only = $rabbitmq::ssl_only - $ssl_cacert = $rabbitmq::ssl_cacert - $ssl_cert = $rabbitmq::ssl_cert - $ssl_key = $rabbitmq::ssl_key - $ssl_management_port = $rabbitmq::ssl_management_port - $ssl_stomp_port = $rabbitmq::ssl_stomp_port - $ssl_verify = $rabbitmq::ssl_verify - $ssl_fail_if_no_peer_cert = $rabbitmq::ssl_fail_if_no_peer_cert - $stomp_port = $rabbitmq::stomp_port - $wipe_db_on_cookie_change = $rabbitmq::wipe_db_on_cookie_change - $config_variables = $rabbitmq::config_variables - $config_kernel_variables = $rabbitmq::config_kernel_variables - $cluster_partition_handling = $rabbitmq::cluster_partition_handling - $default_env_variables = { - 'RABBITMQ_NODE_PORT' => $port, - 'RABBITMQ_NODE_IP_ADDRESS' => $node_ip_address - } - - # Handle env variables. - $environment_variables = merge($default_env_variables, $rabbitmq::environment_variables) - - # Handle deprecated option. - if $cluster_disk_nodes != [] { - notify { 'cluster_disk_nodes': - message => 'WARNING: The cluster_disk_nodes is deprecated. - Use cluster_nodes instead.', - } - $r_cluster_nodes = $cluster_disk_nodes - } else { - $r_cluster_nodes = $cluster_nodes - } - - file { '/etc/rabbitmq': - ensure => directory, - owner => '0', - group => '0', - mode => '0644', - } - - file { '/etc/rabbitmq/ssl': - ensure => directory, - owner => '0', - group => '0', - mode => '0644', - } - - file { 'rabbitmq.config': - ensure => file, - path => $config_path, - content => template($config), - owner => '0', - group => '0', - mode => '0644', - notify => Class['rabbitmq::service'], - } - - file { 'rabbitmq-env.config': - ensure => file, - path => $env_config_path, - content => template($env_config), - owner => '0', - group => '0', - mode => '0644', - notify => Class['rabbitmq::service'], - } - - - if $config_cluster { - - file { 'erlang_cookie': - ensure => 'present', - path => '/var/lib/rabbitmq/.erlang.cookie', - owner => 'rabbitmq', - group => 'rabbitmq', - mode => '0400', - content => $erlang_cookie, - replace => true, - before => File['rabbitmq.config'], - notify => Class['rabbitmq::service'], - } - - # rabbitmq_erlang_cookie is a fact in this module. - if $erlang_cookie != $::rabbitmq_erlang_cookie { - # Safety check. - if $wipe_db_on_cookie_change { - exec { 'wipe_db': - command => "puppet resource service ${service_name} ensure=stopped; rm -rf /var/lib/rabbitmq/mnesia", - path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin', - } - File['erlang_cookie'] { - require => Exec['wipe_db'], - } - } else { - fail("ERROR: The current erlang cookie is ${::rabbitmq_erlang_cookie} and needs to change to ${erlang_cookie}. In order to do this the RabbitMQ database needs to be wiped. Please set the parameter called wipe_db_on_cookie_change to true to allow this to happen automatically.") - } - } - - } - - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/init.pp deleted file mode 100644 index c96128a792..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/init.pp +++ /dev/null @@ -1,176 +0,0 @@ - # -class rabbitmq( - $admin_enable = $rabbitmq::params::admin_enable, - $cluster_disk_nodes = $rabbitmq::params::cluster_disk_nodes, - $cluster_node_type = $rabbitmq::params::cluster_node_type, - $cluster_nodes = $rabbitmq::params::cluster_nodes, - $config = $rabbitmq::params::config, - $config_cluster = $rabbitmq::params::config_cluster, - $config_mirrored_queues = $rabbitmq::params::config_mirrored_queues, - $config_path = $rabbitmq::params::config_path, - $config_stomp = $rabbitmq::params::config_stomp, - $default_user = $rabbitmq::params::default_user, - $default_pass = $rabbitmq::params::default_pass, - $delete_guest_user = $rabbitmq::params::delete_guest_user, - $env_config = $rabbitmq::params::env_config, - $env_config_path = $rabbitmq::params::env_config_path, - $erlang_cookie = $rabbitmq::params::erlang_cookie, - $management_port = $rabbitmq::params::management_port, - $node_ip_address = $rabbitmq::params::node_ip_address, - $package_apt_pin = $rabbitmq::params::package_apt_pin, - $package_ensure = $rabbitmq::params::package_ensure, - $package_gpg_key = $rabbitmq::params::package_gpg_key, - $package_name = $rabbitmq::params::package_name, - $package_provider = $rabbitmq::params::package_provider, - $package_source = $rabbitmq::params::package_source, - $manage_repos = $rabbitmq::params::manage_repos, - $plugin_dir = $rabbitmq::params::plugin_dir, - $port = $rabbitmq::params::port, - $service_ensure = $rabbitmq::params::service_ensure, - $service_manage = $rabbitmq::params::service_manage, - $service_name = $rabbitmq::params::service_name, - $ssl = $rabbitmq::params::ssl, - $ssl_only = $rabbitmq::params::ssl_only, - $ssl_cacert = $rabbitmq::params::ssl_cacert, - $ssl_cert = $rabbitmq::params::ssl_cert, - $ssl_key = $rabbitmq::params::ssl_key, - $ssl_management_port = $rabbitmq::params::ssl_management_port, - $ssl_stomp_port = $rabbitmq::params::ssl_stomp_port, - $ssl_verify = $rabbitmq::params::ssl_verify, - $ssl_fail_if_no_peer_cert = $rabbitmq::params::ssl_fail_if_no_peer_cert, - $stomp_ensure = $rabbitmq::params::stomp_ensure, - $ldap_auth = $rabbitmq::params::ldap_auth, - $ldap_server = $rabbitmq::params::ldap_server, - $ldap_user_dn_pattern = $rabbitmq::params::ldap_user_dn_pattern, - $ldap_use_ssl = $rabbitmq::params::ldap_use_ssl, - $ldap_port = $rabbitmq::params::ldap_port, - $ldap_log = $rabbitmq::params::ldap_log, - $stomp_port = $rabbitmq::params::stomp_port, - $version = $rabbitmq::params::version, - $wipe_db_on_cookie_change = $rabbitmq::params::wipe_db_on_cookie_change, - $cluster_partition_handling = $rabbitmq::params::cluster_partition_handling, - $environment_variables = $rabbitmq::params::environment_variables, - $config_variables = $rabbitmq::params::config_variables, - $config_kernel_variables = $rabbitmq::params::config_kernel_variables, -) inherits rabbitmq::params { - - validate_bool($admin_enable) - # Validate install parameters. - validate_re($package_apt_pin, '^(|\d+)$') - validate_string($package_ensure) - validate_string($package_gpg_key) - validate_string($package_name) - validate_string($package_provider) - validate_bool($manage_repos) - validate_re($version, '^\d+\.\d+\.\d+(-\d+)*$') # Allow 3 digits and optional -n postfix. - # Validate config parameters. - validate_array($cluster_disk_nodes) - validate_re($cluster_node_type, '^(ram|disc)$') - validate_array($cluster_nodes) - validate_string($config) - validate_absolute_path($config_path) - validate_bool($config_cluster) - validate_bool($config_mirrored_queues) - validate_bool($config_stomp) - validate_string($default_user) - validate_string($default_pass) - validate_bool($delete_guest_user) - validate_string($env_config) - validate_absolute_path($env_config_path) - validate_string($erlang_cookie) - validate_re($management_port, '\d+') - validate_string($node_ip_address) - validate_absolute_path($plugin_dir) - validate_re($port, ['\d+','UNSET']) - validate_re($stomp_port, '\d+') - validate_bool($wipe_db_on_cookie_change) - # Validate service parameters. - validate_re($service_ensure, '^(running|stopped)$') - validate_bool($service_manage) - validate_string($service_name) - validate_bool($ssl) - validate_bool($ssl_only) - validate_string($ssl_cacert) - validate_string($ssl_cert) - validate_string($ssl_key) - validate_string($ssl_management_port) - validate_re($ssl_management_port, '\d+') - validate_string($ssl_stomp_port) - validate_re($ssl_stomp_port, '\d+') - validate_bool($stomp_ensure) - validate_bool($ldap_auth) - validate_string($ldap_server) - validate_string($ldap_user_dn_pattern) - validate_bool($ldap_use_ssl) - validate_re($ldap_port, '\d+') - validate_bool($ldap_log) - validate_hash($environment_variables) - validate_hash($config_variables) - validate_hash($config_kernel_variables) - - if $ssl_only and ! $ssl { - fail('$ssl_only => true requires that $ssl => true') - } - - include '::rabbitmq::install' - include '::rabbitmq::config' - include '::rabbitmq::service' - include '::rabbitmq::management' - - if $rabbitmq::manage_repos == true { - case $::osfamily { - 'RedHat', 'SUSE': - { include '::rabbitmq::repo::rhel' } - 'Debian': - { include '::rabbitmq::repo::apt' } - default: - { } - } - } - - if $admin_enable and $service_manage { - include '::rabbitmq::install::rabbitmqadmin' - - rabbitmq_plugin { 'rabbitmq_management': - ensure => present, - require => Class['rabbitmq::install'], - notify => Class['rabbitmq::service'], - provider => 'rabbitmqplugins' - } - - Class['::rabbitmq::service'] -> Class['::rabbitmq::install::rabbitmqadmin'] - } - - if $stomp_ensure { - rabbitmq_plugin { 'rabbitmq_stomp': - ensure => $stomp_ensure, - require => Class['rabbitmq::install'], - notify => Class['rabbitmq::service'], - provider => 'rabbitmqplugins' - } - } - - if ($ldap_auth) { - rabbitmq_plugin { 'rabbitmq_auth_backend_ldap': - ensure => present, - require => Class['rabbitmq::install'], - notify => Class['rabbitmq::service'], - provider => 'rabbitmqplugins', - } - } - - # Anchor this as per #8040 - this ensures that classes won't float off and - # mess everything up. You can read about this at: - # http://docs.puppetlabs.com/puppet/2.7/reference/lang_containment.html#known-issues - anchor { 'rabbitmq::begin': } - anchor { 'rabbitmq::end': } - - Anchor['rabbitmq::begin'] -> Class['::rabbitmq::install'] - -> Class['::rabbitmq::config'] ~> Class['::rabbitmq::service'] - -> Class['::rabbitmq::management'] -> Anchor['rabbitmq::end'] - - # Make sure the various providers have their requirements in place. - Class['::rabbitmq::install'] -> Rabbitmq_plugin<| |> - Class['::rabbitmq::install::rabbitmqadmin'] -> Rabbitmq_exchange<| |> - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/install.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/install.pp deleted file mode 100644 index 09fe3b3213..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/install.pp +++ /dev/null @@ -1,21 +0,0 @@ -class rabbitmq::install { - - $package_ensure = $rabbitmq::package_ensure - $package_name = $rabbitmq::package_name - $package_provider = $rabbitmq::package_provider - $package_source = $rabbitmq::package_source - - package { 'rabbitmq-server': - ensure => $package_ensure, - name => $package_name, - provider => $package_provider, - notify => Class['rabbitmq::service'], - } - - if $package_source { - Package['rabbitmq-server'] { - source => $package_source, - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/install/rabbitmqadmin.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/install/rabbitmqadmin.pp deleted file mode 100644 index aae05f928c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/install/rabbitmqadmin.pp +++ /dev/null @@ -1,23 +0,0 @@ -# -class rabbitmq::install::rabbitmqadmin { - - $management_port = $rabbitmq::management_port - - staging::file { 'rabbitmqadmin': - target => '/var/lib/rabbitmq/rabbitmqadmin', - source => "http://localhost:${management_port}/cli/rabbitmqadmin", - require => [ - Class['rabbitmq::service'], - Rabbitmq_plugin['rabbitmq_management'] - ], - } - - file { '/usr/local/bin/rabbitmqadmin': - owner => 'root', - group => 'root', - source => '/var/lib/rabbitmq/rabbitmqadmin', - mode => '0755', - require => Staging::File['rabbitmqadmin'], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/management.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/management.pp deleted file mode 100644 index 078e9a95f0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/management.pp +++ /dev/null @@ -1,19 +0,0 @@ -# -class rabbitmq::management { - - $delete_guest_user = $rabbitmq::delete_guest_user - - if $delete_guest_user { - rabbitmq_user{ 'guest': - ensure => absent, - provider => 'rabbitmqctl', - } - } - - if $rabbitmq::config_mirrored_queues { - rabbitmq::policy { 'ha-all': - pattern => '.*', - definition => '{"ha-mode":"all","ha-sync-mode":"automatic"}' - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/params.pp deleted file mode 100644 index 63e2e491ee..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/params.pp +++ /dev/null @@ -1,98 +0,0 @@ - # Class: rabbitmq::params -# -# The RabbitMQ Module configuration settings. -# -class rabbitmq::params { - - case $::osfamily { - 'Archlinux': { - $package_ensure = 'installed' - $package_name = 'rabbitmq' - $service_name = 'rabbitmq' - $package_source = '' - $version = '3.1.3-1' - $base_version = regsubst($version,'^(.*)-\d$','\1') - # This must remain at the end as we need $base_version and $version defined first - } - 'Debian': { - $package_ensure = 'installed' - $package_name = 'rabbitmq-server' - $service_name = 'rabbitmq-server' - $package_provider = 'apt' - $package_source = '' - $version = '3.1.5' - } - 'RedHat': { - $package_ensure = 'installed' - $package_name = 'rabbitmq-server' - $service_name = 'rabbitmq-server' - $package_provider = 'yum' - $version = '3.1.5-1' - $base_version = regsubst($version,'^(.*)-\d$','\1') - # This must remain at the end as we need $base_version and $version defined first. - $package_source = "http://www.rabbitmq.com/releases/rabbitmq-server/v${base_version}/rabbitmq-server-${version}.noarch.rpm" - } - 'SUSE': { - $package_ensure = 'installed' - $package_name = 'rabbitmq-server' - $service_name = 'rabbitmq-server' - $package_provider = 'zypper' - $version = '3.1.5-1' - $base_version = regsubst($version,'^(.*)-\d$','\1') - # This must remain at the end as we need $base_version and $version defined first. - $package_source = "http://www.rabbitmq.com/releases/rabbitmq-server/v${base_version}/rabbitmq-server-${version}.noarch.rpm" - } - default: { - fail("The ${module_name} module is not supported on an ${::osfamily} based system.") - } - } - - #install - $admin_enable = true - $management_port = '15672' - $package_apt_pin = '' - $package_gpg_key = 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc' - $manage_repos = true - $service_ensure = 'running' - $service_manage = true - #config - $cluster_disk_nodes = [] - $cluster_node_type = 'disc' - $cluster_nodes = [] - $config = 'rabbitmq/rabbitmq.config.erb' - $config_cluster = false - $config_mirrored_queues = false - $config_path = '/etc/rabbitmq/rabbitmq.config' - $config_stomp = false - $default_user = 'guest' - $default_pass = 'guest' - $delete_guest_user = false - $env_config = 'rabbitmq/rabbitmq-env.conf.erb' - $env_config_path = '/etc/rabbitmq/rabbitmq-env.conf' - $erlang_cookie = 'EOKOWXQREETZSHFNTPEY' - $node_ip_address = 'UNSET' - $plugin_dir = "/usr/lib/rabbitmq/lib/rabbitmq_server-${version}/plugins" - $port = '5672' - $ssl = false - $ssl_only = false - $ssl_cacert = 'UNSET' - $ssl_cert = 'UNSET' - $ssl_key = 'UNSET' - $ssl_management_port = '5671' - $ssl_stomp_port = '6164' - $ssl_verify = 'verify_none' - $ssl_fail_if_no_peer_cert = 'false' - $stomp_ensure = false - $ldap_auth = false - $ldap_server = 'ldap' - $ldap_user_dn_pattern = 'cn=${username},ou=People,dc=example,dc=com' - $ldap_use_ssl = false - $ldap_port = '389' - $ldap_log = false - $stomp_port = '6163' - $wipe_db_on_cookie_change = false - $cluster_partition_handling = 'ignore' - $environment_variables = {} - $config_variables = {} - $config_kernel_variables = {} -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/policy.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/policy.pp deleted file mode 100644 index 204fb36a9c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/policy.pp +++ /dev/null @@ -1,15 +0,0 @@ -define rabbitmq::policy ( - $pattern, - $definition, - $vhost = '/', - $priority = 0, -) { - - exec { "rabbitmq policy: ${title}": - command => "rabbitmqctl set_policy -p ${vhost} '${name}' '${pattern}' '${definition}' ${priority}", - unless => "rabbitmqctl list_policies | grep -qE '^${vhost}\\s+${name}\\s+${pattern}\\s+${definition}\\s+${priority}$'", - path => ['/bin','/sbin','/usr/bin','/usr/sbin'], - require => Class['rabbitmq::service'], - before => Anchor['rabbitmq::end'] - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/repo/apt.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/repo/apt.pp deleted file mode 100644 index 28635f6783..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/repo/apt.pp +++ /dev/null @@ -1,33 +0,0 @@ -# requires -# puppetlabs-apt -# puppetlabs-stdlib -class rabbitmq::repo::apt( - $location = 'http://www.rabbitmq.com/debian/', - $release = 'testing', - $repos = 'main', - $include_src = false, - $key = '056E8E56', - $key_source = 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc', - ) { - - $pin = $rabbitmq::package_apt_pin - - Class['rabbitmq::repo::apt'] -> Package<| title == 'rabbitmq-server' |> - - apt::source { 'rabbitmq': - location => $location, - release => $release, - repos => $repos, - include_src => $include_src, - key => $key, - key_source => $key_source, - } - - if $pin { - validate_re($pin, '\d\d\d') - apt::pin { 'rabbitmq': - packages => 'rabbitmq-server', - priority => $pin, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/repo/rhel.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/repo/rhel.pp deleted file mode 100644 index f2271cd467..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/repo/rhel.pp +++ /dev/null @@ -1,12 +0,0 @@ -class rabbitmq::repo::rhel { - - $package_gpg_key = $rabbitmq::package_gpg_key - - Class['rabbitmq::repo::rhel'] -> Package<| title == 'rabbitmq-server' |> - - exec { "rpm --import ${package_gpg_key}": - path => ['/bin','/usr/bin','/sbin','/usr/sbin'], - onlyif => 'test `rpm -qa | grep gpg-pubkey-056e8e56-468e43f2 | wc -l` -eq 0', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/server.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/server.pp deleted file mode 100644 index 8ad26cb5bb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/server.pp +++ /dev/null @@ -1,100 +0,0 @@ -# Class: rabbitmq::server -# -# This module manages the installation and config of the rabbitmq server -# it has only been tested on certain version of debian-ish systems -# Parameters: -# [*port*] - port where rabbitmq server is hosted -# [*delete_guest_user*] - rather or not to delete the default user -# [*version*] - version of rabbitmq-server to install -# [*package_name*] - name of rabbitmq package -# [*service_name*] - name of rabbitmq service -# [*service_ensure*] - desired ensure state for service -# [*stomp_port*] - port stomp should be listening on -# [*node_ip_address*] - ip address for rabbitmq to bind to -# [*config*] - contents of config file -# [*env_config*] - contents of env-config file -# [*config_cluster*] - whether to configure a RabbitMQ cluster -# [*config_mirrored_queues*] - DEPRECATED (doesn't do anything) -# [*cluster_disk_nodes*] - DEPRECATED (use cluster_nodes instead) -# [*cluster_nodes*] - which nodes to cluster with (including the current one) -# [*cluster_node_type*] - Type of cluster node (disc or ram) -# [*erlang_cookie*] - erlang cookie, must be the same for all nodes in a cluster -# [*wipe_db_on_cookie_change*] - whether to wipe the RabbitMQ data if the specified -# erlang_cookie differs from the current one. This is a sad parameter: actually, -# if the cookie indeed differs, then wiping the database is the *only* thing you -# can do. You're only required to set this parameter to true as a sign that you -# realise this. -# Requires: -# stdlib -# Sample Usage: -# -# This module is used as backward compability layer for modules -# which require rabbitmq::server instead of rabbitmq class. -# It's still common uasge in many modules. -# -# -# [Remember: No empty lines between comments and class definition] -class rabbitmq::server( - $port = $rabbitmq::params::port, - $delete_guest_user = $rabbitmq::params::delete_guest_user, - $package_name = $rabbitmq::params::package_name, - $version = $rabbitmq::params::version, - $service_name = $rabbitmq::params::service_name, - $service_ensure = $rabbitmq::params::service_ensure, - $service_manage = $rabbitmq::params::service_manage, - $config_stomp = $rabbitmq::params::config_stomp, - $stomp_port = $rabbitmq::params::stomp_port, - $config_cluster = $rabbitmq::params::config_cluster, - $cluster_disk_nodes = $rabbitmq::params::cluster_disk_nodes, - $cluster_nodes = $rabbitmq::params::cluster_nodes, - $cluster_node_type = $rabbitmq::params::cluster_node_type, - $node_ip_address = $rabbitmq::params::node_ip_address, - $config = $rabbitmq::params::config, - $env_config = $rabbitmq::params::env_config, - $erlang_cookie = $rabbitmq::params::erlang_cookie, - $wipe_db_on_cookie_change = $rabbitmq::params::wipe_db_on_cookie_change, - # DEPRECATED - $manage_service = undef, - $config_mirrored_queues = undef, -) inherits rabbitmq::params { - - if $manage_service != undef { - warning('The $manage_service parameter is deprecated; please use $service_manage instead') - $_service_manage = $manage_service - } else { - $_service_manage = $service_manage - } - - if $config_mirrored_queues != undef { - warning('The $config_mirrored_queues parameter is deprecated in this class, use the rabbitmq class') - } - - anchor {'before::rabbimq::class': - before => Class['rabbitmq'], - } - - anchor {'after::rabbimq::class': - require => Class['rabbitmq'], - } - - class { 'rabbitmq': - port => $port, - delete_guest_user => $delete_guest_user, - package_name => $package_name, - version => $version, - service_name => $service_name, - service_ensure => $service_ensure, - service_manage => $_service_manage, - config_stomp => $config_stomp, - stomp_port => $stomp_port, - config_cluster => $config_cluster, - cluster_disk_nodes => $cluster_disk_nodes, - cluster_nodes => $cluster_nodes, - cluster_node_type => $cluster_node_type, - node_ip_address => $node_ip_address, - config => $config, - env_config => $env_config, - erlang_cookie => $erlang_cookie, - wipe_db_on_cookie_change => $wipe_db_on_cookie_change, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/service.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/service.pp deleted file mode 100644 index c01aa64ad3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/manifests/service.pp +++ /dev/null @@ -1,40 +0,0 @@ -# Class: rabbitmq::service -# -# This class manages the rabbitmq server service itself. -# -# Parameters: -# -# Actions: -# -# Requires: -# -# Sample Usage: -# -class rabbitmq::service( - $service_ensure = $rabbitmq::service_ensure, - $service_manage = $rabbitmq::service_manage, - $service_name = $rabbitmq::service_name, -) inherits rabbitmq { - - validate_re($service_ensure, '^(running|stopped)$') - validate_bool($service_manage) - - if ($service_manage) { - if $service_ensure == 'running' { - $ensure_real = 'running' - $enable_real = true - } else { - $ensure_real = 'stopped' - $enable_real = false - } - - service { 'rabbitmq-server': - ensure => $ensure_real, - enable => $enable_real, - hasstatus => true, - hasrestart => true, - name => $service_name, - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/README.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/README.markdown deleted file mode 100644 index 286d3417dc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/README.markdown +++ /dev/null @@ -1,7 +0,0 @@ -Specs -===== - -The Puppet project uses RSpec for testing. - -For more information on RSpec, see http://rspec.info/ - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/class_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/class_spec.rb deleted file mode 100644 index c0b5576736..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/class_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'rabbitmq class:' do - case fact('osfamily') - when 'RedHat' - package_name = 'rabbitmq-server' - service_name = 'rabbitmq-server' - when 'SUSE' - package_name = 'rabbitmq-server' - service_name = 'rabbitmq-server' - when 'Debian' - package_name = 'rabbitmq-server' - service_name = 'rabbitmq-server' - when 'Archlinux' - package_name = 'rabbitmq' - service_name = 'rabbitmq' - end - - context "default class inclusion" do - it 'should run successfully' do - pp = <<-EOS - class { 'rabbitmq': } - if $::osfamily == 'RedHat' { - class { 'erlang': epel_enable => true} - Class['erlang'] -> Class['rabbitmq'] - } - EOS - - # Apply twice to ensure no errors the second time. - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_changes => true).exit_code).to be_zero - end - - describe package(package_name) do - it { should be_installed } - end - - describe service(service_name) do - it { should be_enabled } - it { should be_running } - end - end - - context "disable and stop service" do - it 'should run successfully' do - pp = <<-EOS - class { 'rabbitmq': - service_ensure => 'stopped', - } - if $::osfamily == 'RedHat' { - class { 'erlang': epel_enable => true} - Class['erlang'] -> Class['rabbitmq'] - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { should_not be_enabled } - it { should_not be_running } - end - end - - context "service is unmanaged" do - it 'should run successfully' do - pp_pre = <<-EOS - class { 'rabbitmq': } - if $::osfamily == 'RedHat' { - class { 'erlang': epel_enable => true} - Class['erlang'] -> Class['rabbitmq'] - } - EOS - - pp = <<-EOS - class { 'rabbitmq': - service_manage => false, - service_ensure => 'stopped', - } - if $::osfamily == 'RedHat' { - class { 'erlang': epel_enable => true} - Class['erlang'] -> Class['rabbitmq'] - } - EOS - - - apply_manifest(pp_pre, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { should be_enabled } - it { should be_running } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/clustering_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/clustering_spec.rb deleted file mode 100644 index 04627fa6ff..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/clustering_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'rabbitmq clustering' do - context 'rabbitmq::config_cluster => true' do - it 'should run successfully' do - pp = <<-EOS - class { 'rabbitmq': - config_cluster => true, - cluster_nodes => ['rabbit1', 'rabbit2'], - cluster_node_type => 'ram', - wipe_db_on_cookie_change => true, - } - if $::osfamily == 'RedHat' { - class { 'erlang': epel_enable => true} - Class['erlang'] -> Class['rabbitmq'] - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/etc/rabbitmq/rabbitmq.config') do - it { should be_file } - it { should contain 'cluster_nodes' } - it { should contain 'rabbit@rabbit1' } - it { should contain 'rabbit@rabbit2' } - it { should contain 'ram' } - end - - describe file('/var/lib/rabbitmq/.erlang.cookie') do - it { should be_file } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/delete_guest_user_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/delete_guest_user_spec.rb deleted file mode 100644 index d480e88438..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/delete_guest_user_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'rabbitmq with delete_guest_user' do - context 'delete_guest_user' do - it 'should run successfully' do - pp = <<-EOS - class { 'rabbitmq': - port => '5672', - delete_guest_user => true, - } - if $::osfamily == 'RedHat' { - class { 'erlang': epel_enable => true} - Class['erlang'] -> Class['rabbitmq'] - } - EOS - - apply_manifest(pp, :catch_failures => true) - shell('rabbitmqctl list_users > /tmp/rabbitmqctl_users') - end - - describe file('/tmp/rabbitmqctl_users') do - it { should be_file } - it { should_not contain 'guest' } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/default.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/default.yml deleted file mode 100644 index ce47212a8c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - log_level: debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml deleted file mode 100644 index f4b2366f3b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1310-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-1310-x64: - roles: - - master - platform: ubuntu-13.10-amd64 - box : ubuntu-server-1310-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-1310-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - log_level : debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml deleted file mode 100644 index 4cb4ad4309..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-1404-x64: - roles: - - master - platform: ubuntu-14.04-amd64 - box : trusty-server-cloudimg-amd64-vagrant-disk1 - box_url : https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box - hypervisor : vagrant -CONFIG: - log_level : debug - type: git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/rabbitmqadmin_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/rabbitmqadmin_spec.rb deleted file mode 100644 index 618f820342..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/rabbitmqadmin_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'rabbitmq::install::rabbitmqadmin class' do - context 'does nothing if service is unmanaged' do - it 'should run successfully' do - pp = <<-EOS - class { 'rabbitmq': - admin_enable => true, - service_manage => false, - } - if $::osfamily == 'RedHat' { - class { 'erlang': epel_enable => true} - Class['erlang'] -> Class['rabbitmq'] - } - EOS - - shell('rm -f /var/lib/rabbitmq/rabbitmqadmin') - apply_manifest(pp, :catch_failures => true) - end - - describe file('/var/lib/rabbitmq/rabbitmqadmin') do - it { should_not be_file } - end - end - - context 'downloads the cli tools' do - it 'should run successfully' do - pp = <<-EOS - class { 'rabbitmq': - admin_enable => true, - service_manage => true, - } - if $::osfamily == 'RedHat' { - class { 'erlang': epel_enable => true} - Class['erlang'] -> Class['rabbitmq'] - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe file('/var/lib/rabbitmq/rabbitmqadmin') do - it { should be_file } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/server_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/server_spec.rb deleted file mode 100644 index d99f995db5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/acceptance/server_spec.rb +++ /dev/null @@ -1,96 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'rabbitmq server:' do - case fact('osfamily') - when 'RedHat' - package_name = 'rabbitmq-server' - service_name = 'rabbitmq-server' - when 'SUSE' - package_name = 'rabbitmq-server' - service_name = 'rabbitmq-server' - when 'Debian' - package_name = 'rabbitmq-server' - service_name = 'rabbitmq-server' - when 'Archlinux' - package_name = 'rabbitmq' - service_name = 'rabbitmq' - end - - context "default class inclusion" do - it 'should run successfully' do - pp = <<-EOS - class { 'rabbitmq::server': } - if $::osfamily == 'RedHat' { - class { 'erlang': epel_enable => true} - Class['erlang'] -> Class['rabbitmq::server'] - } - EOS - - # Apply twice to ensure no errors the second time. - apply_manifest(pp, :catch_failures => true) - expect(apply_manifest(pp, :catch_changes => true).exit_code).to be_zero - end - - describe package(package_name) do - it { should be_installed } - end - - describe service(service_name) do - it { should be_enabled } - it { should be_running } - end - end - - context "disable and stop service" do - it 'should run successfully' do - pp = <<-EOS - class { 'rabbitmq::server': - service_ensure => 'stopped', - } - if $::osfamily == 'RedHat' { - class { 'erlang': epel_enable => true} - Class['erlang'] -> Class['rabbitmq::server'] - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { should_not be_enabled } - it { should_not be_running } - end - end - - context "service is unmanaged" do - it 'should run successfully' do - pp_pre = <<-EOS - class { 'rabbitmq::server': } - if $::osfamily == 'RedHat' { - class { 'erlang': epel_enable => true} - Class['erlang'] -> Class['rabbitmq::server'] - } - EOS - - pp = <<-EOS - class { 'rabbitmq::server': - service_manage => false, - service_ensure => 'stopped', - } - if $::osfamily == 'RedHat' { - class { 'erlang': epel_enable => true} - Class['erlang'] -> Class['rabbitmq::server'] - } - EOS - - - apply_manifest(pp_pre, :catch_failures => true) - apply_manifest(pp, :catch_failures => true) - end - - describe service(service_name) do - it { should be_enabled } - it { should be_running } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/classes/rabbitmq_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/classes/rabbitmq_spec.rb deleted file mode 100644 index ff93fd4e3f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/classes/rabbitmq_spec.rb +++ /dev/null @@ -1,531 +0,0 @@ -require 'spec_helper' - -describe 'rabbitmq' do - - context 'on unsupported distributions' do - let(:facts) {{ :osfamily => 'Unsupported' }} - - it 'we fail' do - expect { subject }.to raise_error(/not supported on an Unsupported/) - end - end - - context 'on Debian' do - let(:facts) {{ :osfamily => 'Debian', :lsbdistid => 'Debian', :lsbdistcodename => 'squeeze' }} - it 'includes rabbitmq::repo::apt' do - should contain_class('rabbitmq::repo::apt') - end - - describe 'apt::source default values' do - let(:facts) {{ :osfamily => 'Debian' }} - it 'should add a repo with defaults values' do - contain_file('/etc/apt/sources.list.d/rabbitmq.list')\ - .with_content(%r|deb http\://www\.rabbitmq.com/debian/ testing main|) - end - end - - describe 'apt::source custom values' do - let(:params) { - { :location => 'http://www.foorepo.com/debian', - :release => 'unstable', - :repos => 'main' - }} - it 'should add a repo with custom new values' do - contain_file('/etc/apt/sources.list.d/rabbitmq.list')\ - .with_content(%r|deb http\://www\.foorepo.com/debian/ unstable main|) - end - end - end - - context 'on Debian' do - let(:params) {{ :manage_repos => false }} - let(:facts) {{ :osfamily => 'Debian', :lsbdistid => 'Debian', :lsbdistcodename => 'squeeze' }} - it 'does not include rabbitmq::repo::apt when manage_repos is false' do - should_not contain_class('rabbitmq::repo::apt') - end - end - - context 'on Redhat' do - let(:facts) {{ :osfamily => 'RedHat' }} - it 'includes rabbitmq::repo::rhel' do - should contain_class('rabbitmq::repo::rhel') - end - end - - context 'on Redhat' do - let(:params) {{ :manage_repos => false }} - let(:facts) {{ :osfamily => 'RedHat' }} - it 'does not include rabbitmq::repo::rhel when manage_repos is false' do - should_not contain_class('rabbitmq::repo::rhel') - end - end - - ['Debian', 'RedHat', 'SUSE', 'Archlinux'].each do |distro| - context "on #{distro}" do - let(:facts) {{ - :osfamily => distro, - :rabbitmq_erlang_cookie => 'EOKOWXQREETZSHFNTPEY', - :lsbdistcodename => 'squeeze', - :lsbdistid => 'Debian' - }} - - it { should contain_class('rabbitmq::install') } - it { should contain_class('rabbitmq::config') } - it { should contain_class('rabbitmq::service') } - - - context 'with admin_enable set to true' do - let(:params) {{ :admin_enable => true }} - context 'with service_manage set to true' do - it 'we enable the admin interface by default' do - should contain_class('rabbitmq::install::rabbitmqadmin') - should contain_rabbitmq_plugin('rabbitmq_management').with( - 'require' => 'Class[Rabbitmq::Install]', - 'notify' => 'Class[Rabbitmq::Service]' - ) - end - end - context 'with service_manage set to false' do - let(:params) {{ :admin_enable => true, :service_manage => false }} - it 'should do nothing' do - should_not contain_class('rabbitmq::install::rabbitmqadmin') - should_not contain_rabbitmq_plugin('rabbitmq_management') - end - end - end - - context 'deprecated parameters' do - describe 'cluster_disk_nodes' do - let(:params) {{ :cluster_disk_nodes => ['node1', 'node2'] }} - - it { should contain_notify('cluster_disk_nodes') } - end - end - - describe 'manages configuration directory correctly' do - it { should contain_file('/etc/rabbitmq').with( - 'ensure' => 'directory' - )} - end - - describe 'manages configuration file correctly' do - it { should contain_file('rabbitmq.config') } - end - - context 'configures config_cluster' do - let(:facts) {{ :osfamily => distro, :rabbitmq_erlang_cookie => 'ORIGINAL', :lsbdistid => 'Debian' }} - let(:params) {{ - :config_cluster => true, - :cluster_nodes => ['hare-1', 'hare-2'], - :cluster_node_type => 'ram', - :erlang_cookie => 'TESTCOOKIE', - :wipe_db_on_cookie_change => false - }} - - describe 'with defaults' do - it 'fails' do - expect{subject}.to raise_error(/^ERROR: The current erlang cookie is ORIGINAL/) - end - end - - describe 'with wipe_db_on_cookie_change set' do - let(:params) {{ - :config_cluster => true, - :cluster_nodes => ['hare-1', 'hare-2'], - :cluster_node_type => 'ram', - :erlang_cookie => 'TESTCOOKIE', - :wipe_db_on_cookie_change => true - }} - it 'wipes the database' do - should contain_exec('wipe_db') - should contain_file('erlang_cookie') - end - end - - describe 'correctly when cookies match' do - let(:params) {{ - :config_cluster => true, - :cluster_nodes => ['hare-1', 'hare-2'], - :cluster_node_type => 'ram', - :erlang_cookie => 'ORIGINAL', - :wipe_db_on_cookie_change => true - }} - it 'and doesnt wipe anything' do - should contain_file('erlang_cookie') - end - end - - describe 'and sets appropriate configuration' do - let(:params) {{ - :config_cluster => true, - :cluster_nodes => ['hare-1', 'hare-2'], - :cluster_node_type => 'ram', - :erlang_cookie => 'ORIGINAL', - :wipe_db_on_cookie_change => true - }} - it 'for cluster_nodes' do - should contain_file('rabbitmq.config').with({ - 'content' => /cluster_nodes.*\['rabbit@hare-1', 'rabbit@hare-2'\], ram/, - }) - end - - it 'for erlang_cookie' do - should contain_file('erlang_cookie').with({ - 'content' => 'ORIGINAL', - }) - end - end - end - - describe 'rabbitmq-env configuration' do - let(:params) {{ :environment_variables => { - 'RABBITMQ_NODE_IP_ADDRESS' => '1.1.1.1', - 'RABBITMQ_NODE_PORT' => '5656', - 'RABBITMQ_NODENAME' => 'HOSTNAME', - 'RABBITMQ_SERVICENAME' => 'RabbitMQ', - 'RABBITMQ_CONSOLE_LOG' => 'RabbitMQ.debug', - 'RABBITMQ_CTL_ERL_ARGS' => 'verbose', - 'RABBITMQ_SERVER_ERL_ARGS' => 'v', - 'RABBITMQ_SERVER_START_ARGS' => 'debug' - }}} - it 'should set environment variables' do - should contain_file('rabbitmq-env.config') \ - .with_content(/RABBITMQ_NODE_IP_ADDRESS=1.1.1.1/) \ - .with_content(/RABBITMQ_NODE_PORT=5656/) \ - .with_content(/RABBITMQ_NODENAME=HOSTNAME/) \ - .with_content(/RABBITMQ_SERVICENAME=RabbitMQ/) \ - .with_content(/RABBITMQ_CONSOLE_LOG=RabbitMQ.debug/) \ - .with_content(/RABBITMQ_CTL_ERL_ARGS=verbose/) \ - .with_content(/RABBITMQ_SERVER_ERL_ARGS=v/) \ - .with_content(/RABBITMQ_SERVER_START_ARGS=debug/) - end - end - - context 'delete_guest_user' do - describe 'should do nothing by default' do - it { should_not contain_rabbitmq_user('guest') } - end - - describe 'delete user when delete_guest_user set' do - let(:params) {{ :delete_guest_user => true }} - it 'removes the user' do - should contain_rabbitmq_user('guest').with( - 'ensure' => 'absent', - 'provider' => 'rabbitmqctl' - ) - end - end - end - - context 'configuration setting' do - describe 'node_ip_address when set' do - let(:params) {{ :node_ip_address => '172.0.0.1' }} - it 'should set RABBITMQ_NODE_IP_ADDRESS to specified value' do - contain_file('rabbitmq-env.config').with({ - 'content' => 'RABBITMQ_NODE_IP_ADDRESS=172.0.0.1', - }) - end - end - - describe 'stomp by default' do - it 'should not specify stomp parameters in rabbitmq.config' do - contain_file('rabbitmq.config').without({ - 'content' => /stomp/,}) - end - end - describe 'stomp when set' do - let(:params) {{ :config_stomp => true, :stomp_port => 5679 }} - it 'should specify stomp port in rabbitmq.config' do - contain_file('rabbitmq.config').with({ - 'content' => /rabbitmq_stomp.*tcp_listeners, \[5679\]/, - }) - end - end - describe 'stomp when set with ssl' do - let(:params) {{ :config_stomp => true, :stomp_port => 5679, :ssl_stomp_port => 5680 }} - it 'should specify stomp port and ssl stomp port in rabbitmq.config' do - contain_file('rabbitmq.config').with({ - 'content' => /rabbitmq_stomp.*tcp_listeners, \[5679\].*ssl_listeners, \[5680\]/, - }) - end - end - end - - describe 'configuring ldap authentication' do - let :params do - { :config_stomp => true, - :ldap_auth => true, - :ldap_server => 'ldap.example.com', - :ldap_user_dn_pattern => 'ou=users,dc=example,dc=com', - :ldap_use_ssl => false, - :ldap_port => '389', - :ldap_log => true - } - end - - it { should contain_rabbitmq_plugin('rabbitmq_auth_backend_ldap') } - - it 'should contain ldap parameters' do - verify_contents(subject, 'rabbitmq.config', - ['[', ' {rabbit, [', ' {auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},', ' ]}', - ' {rabbitmq_auth_backend_ldap, [', ' {other_bind, anon},', - ' {servers, ["ldap.example.com"]},', - ' {user_dn_pattern, "ou=users,dc=example,dc=com"},', ' {use_ssl, false},', - ' {port, 389},', ' {log, true}']) - end - end - - describe 'configuring ldap authentication' do - let :params do - { :config_stomp => false, - :ldap_auth => true, - :ldap_server => 'ldap.example.com', - :ldap_user_dn_pattern => 'ou=users,dc=example,dc=com', - :ldap_use_ssl => false, - :ldap_port => '389', - :ldap_log => true - } - end - - it { should contain_rabbitmq_plugin('rabbitmq_auth_backend_ldap') } - - it 'should contain ldap parameters' do - verify_contents(subject, 'rabbitmq.config', - ['[', ' {rabbit, [', ' {auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},', ' ]}', - ' {rabbitmq_auth_backend_ldap, [', ' {other_bind, anon},', - ' {servers, ["ldap.example.com"]},', - ' {user_dn_pattern, "ou=users,dc=example,dc=com"},', ' {use_ssl, false},', - ' {port, 389},', ' {log, true}']) - end - end - - describe 'default_user and default_pass set' do - let(:params) {{ :default_user => 'foo', :default_pass => 'bar' }} - it 'should set default_user and default_pass to specified values' do - contain_file('rabbitmq.config').with({ - 'content' => /default_user, <<"foo">>.*default_pass, <<"bar">>/, - }) - end - end - - describe 'ssl options' do - let(:params) { - { :ssl => true, - :ssl_management_port => 3141, - :ssl_cacert => '/path/to/cacert', - :ssl_cert => '/path/to/cert', - :ssl_key => '/path/to/key' - } } - - it 'should set ssl options to specified values' do - contain_file('rabbitmq.config').with({ - 'content' => %r|ssl_listeners, \[3141\].* - ssl_options, \[{cacertfile,"/path/to/cacert".* - certfile="/path/to/cert".* - keyfile,"/path/to/key|, - }) - end - end - - describe 'ssl options with ssl_only' do - let(:params) { - { :ssl => true, - :ssl_only => true, - :ssl_management_port => 3141, - :ssl_cacert => '/path/to/cacert', - :ssl_cert => '/path/to/cert', - :ssl_key => '/path/to/key' - } } - - it 'should set ssl options to specified values' do - contain_file('rabbitmq.config').with({ - 'content' => %r|tcp_listeners, \[\].* - ssl_listeners, \[3141\].* - ssl_options, \[{cacertfile,"/path/to/cacert".* - certfile="/path/to/cert".* - keyfile,"/path/to/key|, - }) - end - end - - describe 'config_variables options' do - let(:params) {{ :config_variables => { - 'hipe_compile' => true, - 'vm_memory_high_watermark' => 0.4, - 'frame_max' => 131072, - 'collect_statistics' => "none", - 'auth_mechanisms' => "['PLAIN', 'AMQPLAIN']", - }}} - it 'should set environment variables' do - should contain_file('rabbitmq.config') \ - .with_content(/\{hipe_compile, true\}/) \ - .with_content(/\{vm_memory_high_watermark, 0.4\}/) \ - .with_content(/\{frame_max, 131072\}/) \ - .with_content(/\{collect_statistics, none\}/) \ - .with_content(/\{auth_mechanisms, \['PLAIN', 'AMQPLAIN'\]\}/) - end - end - - describe 'config_kernel_variables options' do - let(:params) {{ :config_kernel_variables => { - 'inet_dist_listen_min' => 9100, - 'inet_dist_listen_max' => 9105, - }}} - it 'should set config variables' do - should contain_file('rabbitmq.config') \ - .with_content(/\{inet_dist_listen_min, 9100\}/) \ - .with_content(/\{inet_dist_listen_max, 9105\}/) - end - end - - context 'delete_guest_user' do - describe 'should do nothing by default' do - it { should_not contain_rabbitmq_user('guest') } - end - - describe 'delete user when delete_guest_user set' do - let(:params) {{ :delete_guest_user => true }} - it 'removes the user' do - should contain_rabbitmq_user('guest').with( - 'ensure' => 'absent', - 'provider' => 'rabbitmqctl' - ) - end - end - end - - ## - ## rabbitmq::service - ## - describe 'service with default params' do - it { should contain_service('rabbitmq-server').with( - 'ensure' => 'running', - 'enable' => 'true', - 'hasstatus' => 'true', - 'hasrestart' => 'true' - )} - end - - describe 'service with ensure stopped' do - let :params do - { :service_ensure => 'stopped' } - end - - it { should contain_service('rabbitmq-server').with( - 'ensure' => 'stopped', - 'enable' => false - ) } - end - - describe 'service with ensure neither running neither stopped' do - let :params do - { :service_ensure => 'foo' } - end - - it 'should raise an error' do - expect { - should contain_service('rabbitmq-server').with( - 'ensure' => 'stopped' ) - }.to raise_error(Puppet::Error, /validate_re\(\): "foo" does not match "\^\(running\|stopped\)\$"/) - end - end - - describe 'service with service_manage equal to false' do - let :params do - { :service_manage => false } - end - - it { should_not contain_service('rabbitmq-server') } - end - - end - end - - ## - ## rabbitmq::install - ## - context "on RHEL" do - let(:facts) {{ :osfamily => 'RedHat' }} - let(:params) {{ :package_source => 'http://www.rabbitmq.com/releases/rabbitmq-server/v3.2.3/rabbitmq-server-3.2.3-1.noarch.rpm' }} - it 'installs the rabbitmq package' do - should contain_package('rabbitmq-server').with( - 'ensure' => 'installed', - 'name' => 'rabbitmq-server', - 'provider' => 'yum', - 'source' => 'http://www.rabbitmq.com/releases/rabbitmq-server/v3.2.3/rabbitmq-server-3.2.3-1.noarch.rpm' - ) - end - end - - context "on Debian" do - let(:facts) {{ :osfamily => 'Debian', :lsbdistid => 'Debian', :lsbdistcodename => 'precise' }} - it 'installs the rabbitmq package' do - should contain_package('rabbitmq-server').with( - 'ensure' => 'installed', - 'name' => 'rabbitmq-server', - 'provider' => 'apt' - ) - end - end - - context "on Archlinux" do - let(:facts) {{ :osfamily => 'Archlinux' }} - it 'installs the rabbitmq package' do - should contain_package('rabbitmq-server').with( - 'ensure' => 'installed', - 'name' => 'rabbitmq') - end - end - - describe 'repo management on Debian' do - let(:facts) {{ :osfamily => 'Debian', :lsbdistid => 'Debian' }} - - context 'with no pin' do - let(:params) {{ :package_apt_pin => '' }} - describe 'it sets up an apt::source' do - - it { should contain_apt__source('rabbitmq').with( - 'location' => 'http://www.rabbitmq.com/debian/', - 'release' => 'testing', - 'repos' => 'main', - 'include_src' => false, - 'key' => '056E8E56' - ) } - end - end - - context 'with pin' do - let(:params) {{ :package_apt_pin => '700' }} - describe 'it sets up an apt::source and pin' do - - it { should contain_apt__source('rabbitmq').with( - 'location' => 'http://www.rabbitmq.com/debian/', - 'release' => 'testing', - 'repos' => 'main', - 'include_src' => false, - 'key' => '056E8E56' - ) } - - it { should contain_apt__pin('rabbitmq').with( - 'packages' => 'rabbitmq-server', - 'priority' => '700' - ) } - - end - end - end - - ['RedHat', 'SuSE'].each do |distro| - describe "repo management on #{distro}" do - describe 'imports the key' do - let(:facts) {{ :osfamily => distro }} - let(:params) {{ :package_gpg_key => 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc' }} - - it { should contain_exec("rpm --import #{params[:package_gpg_key]}").with( - 'path' => ['/bin','/usr/bin','/sbin','/usr/sbin'] - ) } - end - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/spec.opts b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/spec.opts deleted file mode 100644 index 91cd6427ed..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/spec.opts +++ /dev/null @@ -1,6 +0,0 @@ ---format -s ---colour ---loadby -mtime ---backtrace diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/spec_helper.rb deleted file mode 100644 index 2c6f56649a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/spec_helper_acceptance.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/spec_helper_acceptance.rb deleted file mode 100644 index 1dbc82a865..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/spec_helper_acceptance.rb +++ /dev/null @@ -1,38 +0,0 @@ -require 'beaker-rspec' - -UNSUPPORTED_PLATFORMS = [] - -unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' - if hosts.first.is_pe? - install_pe - else - install_puppet - end - hosts.each do |host| - on hosts, "mkdir -p #{host['distmoduledir']}" - end -end - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Readable test descriptions - c.formatter = :documentation - c.before :suite do - puppet_module_install(:source => proj_root, :module_name => 'rabbitmq') - hosts.each do |host| - - shell("/bin/touch #{default['puppetpath']}/hiera.yaml") - shell('puppet module install puppetlabs-stdlib', { :acceptable_exit_codes => [0,1] }) - if fact('osfamily') == 'Debian' - shell('puppet module install puppetlabs-apt', { :acceptable_exit_codes => [0,1] }) - end - shell('puppet module install nanliu-staging', { :acceptable_exit_codes => [0,1] }) - if fact('osfamily') == 'RedHat' - shell('puppet module install garethr-erlang', { :acceptable_exit_codes => [0,1] }) - end - end - end -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/facts/rabbitmq_erlang_cookie_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/facts/rabbitmq_erlang_cookie_spec.rb deleted file mode 100644 index f4daf79bd6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/facts/rabbitmq_erlang_cookie_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'spec_helper' - -describe 'rabbitmq_erlang_cookie', :type => :fact do - before(:each) { Facter.clear } - - it 'works correctly' do - Facter.fact(:osfamily).stubs(:value).returns('RedHat') - File.stubs(:exists?).with('/var/lib/rabbitmq/.erlang.cookie').returns(true) - File.stubs(:read).with('/var/lib/rabbitmq/.erlang.cookie').returns('THISISACOOKIE') - Facter.fact(:rabbitmq_erlang_cookie).value.should == 'THISISACOOKIE' - end - - it 'fails if file doesnt exist' do - Facter.fact(:osfamily).stubs(:value).returns('RedHat') - File.stubs(:exists?).with('/var/lib/rabbitmq/.erlang.cookie').returns(false) - Facter.fact(:rabbitmq_erlang_cookie).value.should == nil - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_exchange/rabbitmqadmin_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_exchange/rabbitmqadmin_spec.rb deleted file mode 100644 index ac68970cf7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_exchange/rabbitmqadmin_spec.rb +++ /dev/null @@ -1,65 +0,0 @@ -require 'puppet' -require 'mocha' -RSpec.configure do |config| - config.mock_with :mocha -end -provider_class = Puppet::Type.type(:rabbitmq_exchange).provider(:rabbitmqadmin) -describe provider_class do - before :each do - @resource = Puppet::Type::Rabbitmq_exchange.new( - {:name => 'amq.direct@/', - :type => :topic} - ) - @provider = provider_class.new(@resource) - end - - it 'should return instances' do - provider_class.expects(:rabbitmqctl).with('list_vhosts').returns <<-EOT -Listing vhosts ... -/ -...done. -EOT - provider_class.expects(:rabbitmqctl).with('list_exchanges', '-p', '/', 'name', 'type').returns <<-EOT -Listing exchanges ... - direct - amq.direct direct - amq.fanout fanout - amq.headers headers - amq.match headers - amq.rabbitmq.log topic - amq.rabbitmq.trace topic - amq.topic topic - ...done. -EOT - instances = provider_class.instances - instances.size.should == 8 - end - - it 'should call rabbitmqadmin to create' do - @provider.expects(:rabbitmqadmin).with('declare', 'exchange', '--vhost=/', '--user=guest', '--password=guest', 'name=amq.direct', 'type=topic') - @provider.create - end - - it 'should call rabbitmqadmin to destroy' do - @provider.expects(:rabbitmqadmin).with('delete', 'exchange', '--vhost=/', '--user=guest', '--password=guest', 'name=amq.direct') - @provider.destroy - end - - context 'specifying credentials' do - before :each do - @resource = Puppet::Type::Rabbitmq_exchange.new( - {:name => 'amq.direct@/', - :type => :topic, - :user => 'colin', - :password => 'secret', - } - ) - @provider = provider_class.new(@resource) - end - - it 'should call rabbitmqadmin to create' do - @provider.expects(:rabbitmqadmin).with('declare', 'exchange', '--vhost=/', '--user=colin', '--password=secret', 'name=amq.direct', 'type=topic') - @provider.create - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user/rabbitmqctl_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user/rabbitmqctl_spec.rb deleted file mode 100644 index 2c13b886a8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user/rabbitmqctl_spec.rb +++ /dev/null @@ -1,236 +0,0 @@ -require 'puppet' -require 'mocha' -RSpec.configure do |config| - config.mock_with :mocha -end -provider_class = Puppet::Type.type(:rabbitmq_user).provider(:rabbitmqctl) -describe provider_class do - before :each do - @resource = Puppet::Type::Rabbitmq_user.new( - {:name => 'foo', :password => 'bar'} - ) - @provider = provider_class.new(@resource) - end - it 'should match user names' do - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -foo -...done. -EOT - @provider.exists?.should == 'foo' - end - it 'should match user names with 2.4.1 syntax' do - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -foo bar -...done. -EOT - @provider.exists?.should == 'foo bar' - end - it 'should not match if no users on system' do - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -...done. -EOT - @provider.exists?.should be_nil - end - it 'should not match if no matching users on system' do - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -fooey -...done. -EOT - @provider.exists?.should be_nil - end - it 'should match user names from list' do - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -one -two three -foo -bar -...done. -EOT - @provider.exists?.should == 'foo' - end - it 'should create user and set password' do - @resource[:password] = 'bar' - @provider.expects(:rabbitmqctl).with('add_user', 'foo', 'bar') - @provider.create - end - it 'should create user, set password and set to admin' do - @resource[:password] = 'bar' - @resource[:admin] = 'true' - @provider.expects(:rabbitmqctl).with('add_user', 'foo', 'bar') - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -foo [] -icinga [monitoring] -kitchen [] -kitchen2 [abc, def, ghi] -...done. -EOT - @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ['administrator']) - @provider.create - end - it 'should call rabbitmqctl to delete' do - @provider.expects(:rabbitmqctl).with('delete_user', 'foo') - @provider.destroy - end - it 'should be able to retrieve admin value' do - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -foo [administrator] -...done. -EOT - @provider.admin.should == :true - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -one [administrator] -foo [] -...done. -EOT - @provider.admin.should == :false - end - it 'should fail if admin value is invalid' do - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -foo fail -...done. -EOT - expect { @provider.admin }.to raise_error(Puppet::Error, /Could not match line/) - end - it 'should be able to set admin value' do - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -foo [] -icinga [monitoring] -kitchen [] -kitchen2 [abc, def, ghi] -...done. -EOT - @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ['administrator']) - @provider.admin=:true - end - it 'should not interfere with existing tags on the user when setting admin value' do - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -foo [bar, baz] -icinga [monitoring] -kitchen [] -kitchen2 [abc, def, ghi] -...done. -EOT - @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ['bar','baz', 'administrator'].sort) - @provider.admin=:true - end - it 'should be able to unset admin value' do - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -foo [administrator] -guest [administrator] -icinga [] -...done. -EOT - @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', []) - @provider.admin=:false - end - it 'should not interfere with existing tags on the user when unsetting admin value' do - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -foo [administrator, bar, baz] -icinga [monitoring] -kitchen [] -kitchen2 [abc, def, ghi] -...done. -EOT - @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ['bar','baz'].sort) - @provider.admin=:false - end - - it 'should clear all tags on existing user' do - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -one [administrator] -foo [tag1,tag2] -icinga [monitoring] -kitchen [] -kitchen2 [abc, def, ghi] -...done. -EOT - @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', []) - @provider.tags=[] - end - - it 'should set multiple tags' do - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -one [administrator] -foo [] -icinga [monitoring] -kitchen [] -kitchen2 [abc, def, ghi] -...done. -EOT - @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ['tag1','tag2']) - @provider.tags=['tag1','tag2'] - end - - it 'should clear tags while keep admin tag' do - @resource[:admin] = true - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -one [administrator] -foo [administrator, tag1, tag2] -icinga [monitoring] -kitchen [] -kitchen2 [abc, def, ghi] -...done. -EOT - @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ["administrator"]) - @provider.tags=[] - end - - it 'should change tags while keep admin tag' do - @resource[:admin] = true - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -one [administrator] -foo [administrator, tag1, tag2] -icinga [monitoring] -kitchen [] -kitchen2 [abc, def, ghi] -...done. -EOT - @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ["administrator","tag1","tag3","tag7"]) - @provider.tags=['tag1','tag7','tag3'] - end - - it 'should create user with tags and without admin' do - @resource[:tags] = [ "tag1", "tag2" ] - @provider.expects(:rabbitmqctl).with('add_user', 'foo', 'bar') - @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ["tag1","tag2"]) - @provider.expects(:rabbitmqctl).with('list_users').returns <<-EOT -Listing users ... -foo [] -...done. -EOT - @provider.create - end - - it 'should create user with tags and with admin' do - @resource[:tags] = [ "tag1", "tag2" ] - @resource[:admin] = true - @provider.expects(:rabbitmqctl).with('add_user', 'foo', 'bar') - @provider.expects(:rabbitmqctl).with('list_users').twice.returns <<-EOT -Listing users ... -foo [] -...done. -EOT - @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ["administrator"]) - @provider.expects(:rabbitmqctl).with('set_user_tags', 'foo', ["administrator","tag1","tag2"]) - @provider.create - end - - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user_permissions/rabbitmqctl_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user_permissions/rabbitmqctl_spec.rb deleted file mode 100644 index a8824fdf42..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_user_permissions/rabbitmqctl_spec.rb +++ /dev/null @@ -1,109 +0,0 @@ -require 'puppet' -require 'mocha' -RSpec.configure do |config| - config.mock_with :mocha -end -describe 'Puppet::Type.type(:rabbitmq_user_permissions).provider(:rabbitmqctl)' do - before :each do - @provider_class = Puppet::Type.type(:rabbitmq_user_permissions).provider(:rabbitmqctl) - @resource = Puppet::Type::Rabbitmq_user_permissions.new( - {:name => 'foo@bar'} - ) - @provider = @provider_class.new(@resource) - end - after :each do - @provider_class.instance_variable_set(:@users, nil) - end - it 'should match user permissions from list' do - @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT -Listing users ... -bar 1 2 3 -...done. -EOT - @provider.exists?.should == {:configure=>"1", :write=>"2", :read=>"3"} - end - it 'should match user permissions with empty columns' do - @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT -Listing users ... -bar 3 -...done. -EOT - @provider.exists?.should == {:configure=>"", :write=>"", :read=>"3"} - end - it 'should not match user permissions with more than 3 columns' do - @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT -Listing users ... -bar 1 2 3 4 -...done. -EOT - expect { @provider.exists? }.to raise_error(Puppet::Error, /cannot parse line from list_user_permissions/) - end - it 'should not match an empty list' do - @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT -Listing users ... -...done. -EOT - @provider.exists?.should == nil - end - it 'should create default permissions' do - @provider.instance_variable_set(:@should_vhost, "bar") - @provider.instance_variable_set(:@should_user, "foo") - @provider.expects(:rabbitmqctl).with('set_permissions', '-p', 'bar', 'foo', "''", "''", "''") - @provider.create - end - it 'should destroy permissions' do - @provider.instance_variable_set(:@should_vhost, "bar") - @provider.instance_variable_set(:@should_user, "foo") - @provider.expects(:rabbitmqctl).with('clear_permissions', '-p', 'bar', 'foo') - @provider.destroy - end - {:configure_permission => '1', :write_permission => '2', :read_permission => '3'}.each do |k,v| - it "should be able to retrieve #{k}" do - @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT -Listing users ... -bar 1 2 3 -...done. -EOT - @provider.send(k).should == v - end - end - {:configure_permission => '1', :write_permission => '2', :read_permission => '3'}.each do |k,v| - it "should be able to retrieve #{k} after exists has been called" do - @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT -Listing users ... -bar 1 2 3 -...done. -EOT - @provider.exists? - @provider.send(k).should == v - end - end - {:configure_permission => ['foo', '2', '3'], - :read_permission => ['1', '2', 'foo'], - :write_permission => ['1', 'foo', '3'] - }.each do |perm, columns| - it "should be able to sync #{perm}" do - @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT -Listing users ... -bar 1 2 3 -...done. -EOT - @provider.resource[perm] = 'foo' - @provider.expects(:rabbitmqctl).with('set_permissions', '-p', 'bar', 'foo', *columns) - @provider.send("#{perm}=".to_sym, 'foo') - end - end - it 'should only call set_permissions once' do - @provider.class.expects(:rabbitmqctl).with('list_user_permissions', 'foo').returns <<-EOT -Listing users ... -bar 1 2 3 -...done. -EOT - @provider.resource[:configure_permission] = 'foo' - @provider.resource[:read_permission] = 'foo' - @provider.expects(:rabbitmqctl).with('set_permissions', '-p', 'bar', 'foo', 'foo', '2', 'foo').once - @provider.configure_permission='foo' - @provider.read_permission='foo' - end -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_vhost/rabbitmqctl_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_vhost/rabbitmqctl_spec.rb deleted file mode 100644 index a1f89ad2ce..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/provider/rabbitmq_vhost/rabbitmqctl_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -require 'puppet' -require 'mocha' -RSpec.configure do |config| - config.mock_with :mocha -end -provider_class = Puppet::Type.type(:rabbitmq_vhost).provider(:rabbitmqctl) -describe provider_class do - before :each do - @resource = Puppet::Type::Rabbitmq_vhost.new( - {:name => 'foo'} - ) - @provider = provider_class.new(@resource) - end - it 'should match vhost names' do - @provider.expects(:rabbitmqctl).with('list_vhosts').returns <<-EOT -Listing vhosts ... -foo -...done. -EOT - @provider.exists?.should == 'foo' - end - it 'should not match if no vhosts on system' do - @provider.expects(:rabbitmqctl).with('list_vhosts').returns <<-EOT -Listing vhosts ... -...done. -EOT - @provider.exists?.should be_nil - end - it 'should not match if no matching vhosts on system' do - @provider.expects(:rabbitmqctl).with('list_vhosts').returns <<-EOT -Listing vhosts ... -fooey -...done. -EOT - @provider.exists?.should be_nil - end - it 'should call rabbitmqctl to create' do - @provider.expects(:rabbitmqctl).with('add_vhost', 'foo') - @provider.create - end - it 'should call rabbitmqctl to create' do - @provider.expects(:rabbitmqctl).with('delete_vhost', 'foo') - @provider.destroy - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_exchange_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_exchange_spec.rb deleted file mode 100644 index c4c2caa98b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_exchange_spec.rb +++ /dev/null @@ -1,54 +0,0 @@ -require 'puppet' -require 'puppet/type/rabbitmq_exchange' -describe Puppet::Type.type(:rabbitmq_exchange) do - before :each do - @exchange = Puppet::Type.type(:rabbitmq_exchange).new( - :name => 'foo@bar', - :type => :topic - ) - end - it 'should accept an exchange name' do - @exchange[:name] = 'dan@pl' - @exchange[:name].should == 'dan@pl' - end - it 'should require a name' do - expect { - Puppet::Type.type(:rabbitmq_exchange).new({}) - }.to raise_error(Puppet::Error, 'Title or name must be provided') - end - it 'should not allow whitespace in the name' do - expect { - @exchange[:name] = 'b r' - }.to raise_error(Puppet::Error, /Valid values match/) - end - it 'should not allow names without @' do - expect { - @exchange[:name] = 'b_r' - }.to raise_error(Puppet::Error, /Valid values match/) - end - - it 'should accept an exchange type' do - @exchange[:type] = :direct - @exchange[:type].should == :direct - end - it 'should require a type' do - expect { - Puppet::Type.type(:rabbitmq_exchange).new(:name => 'foo@bar') - }.to raise_error(/.*must set type when creating exchange.*/) - end - it 'should not require a type when destroying' do - expect { - Puppet::Type.type(:rabbitmq_exchange).new(:name => 'foo@bar', :ensure => :absent) - }.to_not raise_error - end - - it 'should accept a user' do - @exchange[:user] = :root - @exchange[:user].should == :root - end - - it 'should accept a password' do - @exchange[:password] = :PaSsw0rD - @exchange[:password].should == :PaSsw0rD - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_permissions_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_permissions_spec.rb deleted file mode 100644 index 7cb66eac36..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_permissions_spec.rb +++ /dev/null @@ -1,55 +0,0 @@ -require 'puppet' -require 'puppet/type/rabbitmq_user_permissions' -describe Puppet::Type.type(:rabbitmq_user_permissions) do - before :each do - @perms = Puppet::Type.type(:rabbitmq_user_permissions).new(:name => 'foo@bar') - end - it 'should accept a valid hostname name' do - @perms[:name] = 'dan@bar' - @perms[:name].should == 'dan@bar' - end - it 'should require a name' do - expect { - Puppet::Type.type(:rabbitmq_user_permissions).new({}) - }.to raise_error(Puppet::Error, 'Title or name must be provided') - end - it 'should fail when names dont have a @' do - expect { - @perms[:name] = 'bar' - }.to raise_error(Puppet::Error, /Valid values match/) - end - [:configure_permission, :read_permission, :write_permission].each do |param| - it 'should not default to anything' do - @perms[param].should == nil - end - it "should accept a valid regex for #{param}" do - @perms[param] = '.*?' - @perms[param].should == '.*?' - end - it "should accept an empty string for #{param}" do - @perms[param] = '' - @perms[param].should == '' - end - it "should not accept invalid regex for #{param}" do - expect { - @perms[param] = '*' - }.to raise_error(Puppet::Error, /Invalid regexp/) - end - end - {:rabbitmq_vhost => 'dan@test', :rabbitmq_user => 'test@dan'}.each do |k,v| - it "should autorequire #{k}" do - if k == :rabbitmq_vhost - vhost = Puppet::Type.type(k).new(:name => "test") - else - vhost = Puppet::Type.type(k).new(:name => "test", :password => 'pass') - end - perm = Puppet::Type.type(:rabbitmq_user_permissions).new(:name => v) - config = Puppet::Resource::Catalog.new :testing do |conf| - [vhost, perm].each { |resource| conf.add_resource resource } - end - rel = perm.autorequire[0] - rel.source.ref.should == vhost.ref - rel.target.ref.should == perm.ref - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_spec.rb deleted file mode 100644 index 92e6905579..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_user_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'puppet' -require 'puppet/type/rabbitmq_user' -describe Puppet::Type.type(:rabbitmq_user) do - before :each do - @user = Puppet::Type.type(:rabbitmq_user).new(:name => 'foo', :password => 'pass') - end - it 'should accept a user name' do - @user[:name] = 'dan' - @user[:name].should == 'dan' - @user[:admin].should == :false - end - it 'should accept a password' do - @user[:password] = 'foo' - @user[:password].should == 'foo' - end - it 'should require a password' do - expect { - Puppet::Type.type(:rabbitmq_user).new(:name => 'foo') - }.to raise_error(/must set password/) - end - it 'should require a name' do - expect { - Puppet::Type.type(:rabbitmq_user).new({}) - }.to raise_error(Puppet::Error, 'Title or name must be provided') - end - it 'should not allow whitespace in the name' do - expect { - @user[:name] = 'b r' - }.to raise_error(Puppet::Error, /Valid values match/) - end - [true, false, 'true', 'false'].each do |val| - it "admin property should accept #{val}" do - @user[:admin] = val - @user[:admin].should == val.to_s.to_sym - end - end - it 'should not accept non-boolean values for admin' do - expect { - @user[:admin] = 'yes' - }.to raise_error(Puppet::Error, /Invalid value/) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_vhost_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_vhost_spec.rb deleted file mode 100644 index 70b8e37414..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/spec/unit/puppet/type/rabbitmq_vhost_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'puppet' -require 'puppet/type/rabbitmq_vhost' -describe Puppet::Type.type(:rabbitmq_vhost) do - before :each do - @vhost = Puppet::Type.type(:rabbitmq_vhost).new(:name => 'foo') - end - it 'should accept a vhost name' do - @vhost[:name] = 'dan' - @vhost[:name].should == 'dan' - end - it 'should require a name' do - expect { - Puppet::Type.type(:rabbitmq_vhost).new({}) - }.to raise_error(Puppet::Error, 'Title or name must be provided') - end - it 'should not allow whitespace in the name' do - expect { - @vhost[:name] = 'b r' - }.to raise_error(Puppet::Error, /Valid values match/) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/templates/README.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/templates/README.markdown deleted file mode 100644 index 575bbeaef8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/templates/README.markdown +++ /dev/null @@ -1,23 +0,0 @@ -Templates -========= - -Puppet supports templates and templating via ERB, which is part of the Ruby -standard library and is used for many other projects including Ruby on Rails. -Templates allow you to manage the content of template files, for example -configuration files that cannot yet be managed as a Puppet type. Learn more at -http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Templating - -You can use templates like this: - - class myclass { - package { mypackage: ensure => latest } - service { myservice: ensure => running } - file { "/etc/myfile": - content => template("mymodule/myfile.erb") - } - } - -The templates are searched for in: - - $templatedir/mymodule/myfile.erb - $modulepath/mymodule/templates/myfile.erb diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/templates/rabbitmq-env.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/templates/rabbitmq-env.conf.erb deleted file mode 100644 index 0c6b5d1984..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/templates/rabbitmq-env.conf.erb +++ /dev/null @@ -1,5 +0,0 @@ -<%- @environment_variables.keys.sort.each do |key| -%> -<%- if @environment_variables[key] != 'UNSET' -%> -<%= key %>=<%= @environment_variables[key] %> -<%- end -%> -<%- end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/templates/rabbitmq.config.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/templates/rabbitmq.config.erb deleted file mode 100644 index 2d7f81bf21..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/templates/rabbitmq.config.erb +++ /dev/null @@ -1,56 +0,0 @@ -% This file managed by Puppet -% Template Path: <%= @module_name %>/templates/rabbitmq.config -[ - {rabbit, [ -<% if @ldap_auth -%> - {auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]}, -<% end -%> -<% if @config_cluster -%> - {cluster_nodes, {[<%= @r_cluster_nodes.map { |n| "\'rabbit@#{n}\'" }.join(', ') %>], <%= @cluster_node_type %>}}, - {cluster_partition_handling, <%= @cluster_partition_handling %>}, -<% end -%> -<%- if @ssl_only -%> - {tcp_listeners, []}, -<%- end -%> -<%- if @ssl -%> - {ssl_listeners, [<%= @ssl_management_port %>]}, - {ssl_options, [{cacertfile,"<%= @ssl_cacert %>"}, - {certfile,"<%= @ssl_cert %>"}, - {keyfile,"<%= @ssl_key %>"}, - {verify,<%= @ssl_verify %>}, - {fail_if_no_peer_cert,<%= @ssl_fail_if_no_peer_cert %>}]}, -<%- end -%> -<% if @config_variables -%> -<%- @config_variables.keys.sort.each do |key| -%> - {<%= key %>, <%= @config_variables[key] %>}, -<%- end -%> -<%- end -%> - {default_user, <<"<%= @default_user %>">>}, - {default_pass, <<"<%= @default_pass %>">>} - ]}<% if @config_kernel_variables -%>, - {kernel, [ - <%= @config_kernel_variables.sort.map{|k,v| "{#{k}, #{v}}"}.join(",\n ") %> - ]} -<%- end -%> -<% if @config_stomp -%>, -% Configure the Stomp Plugin listening port - {rabbitmq_stomp, [ - {tcp_listeners, [<%= @stomp_port %>]} - <%- if @ssl_stomp_port -%>, - {ssl_listeners, [<%= @ssl_stomp_port %>]} - <%- end -%> - ]} -<% end -%> -<%- if @ldap_auth -%>, -% Configure the LDAP authentication plugin - {rabbitmq_auth_backend_ldap, [ - {other_bind, anon}, - {servers, ["<%= @ldap_server %>"]}, - {user_dn_pattern, "<%= @ldap_user_dn_pattern %>"}, - {use_ssl, <%= @ldap_use_ssl %>}, - {port, <%= @ldap_port %>}, - {log, <%= @ldap_log %>} - ]} -<%- end -%> -]. -% EOF diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/erlang_deps.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/erlang_deps.pp deleted file mode 100644 index d34d9441f1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/erlang_deps.pp +++ /dev/null @@ -1,5 +0,0 @@ -# install first the garethr-erlang module. See README.md -include 'erlang' - -class { 'erlang': epel_enable => true} -Class['erlang'] -> Class['rabbitmq'] diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/full.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/full.pp deleted file mode 100644 index c6dfc5cf0c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/full.pp +++ /dev/null @@ -1,21 +0,0 @@ -class { 'rabbitmq::repo::apt': - pin => '900', -}-> -class { 'rabbitmq::server': - delete_guest_user => true, -# version => '2.4.1', -}-> -rabbitmq_user { 'dan': - admin => true, - password => 'pass', - provider => 'rabbitmqctl', -}-> -rabbitmq_vhost { 'myhost': - provider => 'rabbitmqctl', -} -rabbitmq_user_permissions { 'dan@myhost': - configure_permission => '.*', - read_permission => '.*', - write_permission => '.*', - provider => 'rabbitmqctl', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/permissions/add.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/permissions/add.pp deleted file mode 100644 index fb71af1431..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/permissions/add.pp +++ /dev/null @@ -1,9 +0,0 @@ -rabbitmq_user { 'blah7': - password => 'foo', -} -rabbitmq_vhost { 'test5': } -rabbitmq_user_permissions { 'blah7@test5': - configure_permission => 'config2', - read_permission => 'ready', - #write_permission => 'ready', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/plugin.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/plugin.pp deleted file mode 100644 index 6c5605b9e2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/plugin.pp +++ /dev/null @@ -1,11 +0,0 @@ -class { 'rabbitmq::server': - config_stomp => true, -} - -$rabbitmq_plugins = [ 'amqp_client', 'rabbitmq_stomp' ] - -rabbitmq_plugin { $rabbitmq_plugins: - ensure => present, - require => Class['rabbitmq::server'], - provider => 'rabbitmqplugins', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/repo/apt.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/repo/apt.pp deleted file mode 100644 index f1373737fd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/repo/apt.pp +++ /dev/null @@ -1,2 +0,0 @@ -# requires pupetlabs-apt -include rabbitmq::repo::apt diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/server.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/server.pp deleted file mode 100644 index caea893772..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/server.pp +++ /dev/null @@ -1,5 +0,0 @@ -class { 'rabbitmq::server': - port => '5672', - delete_guest_user => true, - version => 'latest', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/service.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/service.pp deleted file mode 100644 index 9a00d2b6d3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/service.pp +++ /dev/null @@ -1 +0,0 @@ -class { 'rabbitmq::service': } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/site.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/site.pp deleted file mode 100644 index 75ebcfed32..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/site.pp +++ /dev/null @@ -1,16 +0,0 @@ -node default { - - $rabbitmq_plugins = [ 'amqp_client', 'rabbitmq_stomp' ] - - class { 'rabbitmq::server': - config => '[ {rabbit_stomp, [{tcp_listeners, [1234]} ]} ].', - } - - # Required for MCollective - rabbitmq_plugin { $rabbitmq_plugins: - ensure => present, - require => Class['rabbitmq::server'], - provider => 'rabbitmqplugins', - } -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/user/add.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/user/add.pp deleted file mode 100644 index 2c3a87096a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/user/add.pp +++ /dev/null @@ -1,4 +0,0 @@ -rabbitmq_user { ['blah2', 'blah3', 'blah4']: - password => 'phoey!', - #provider => 'rabbitmqctl', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/vhosts/add.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/vhosts/add.pp deleted file mode 100644 index d818a1923d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/rabbitmq/tests/vhosts/add.pp +++ /dev/null @@ -1 +0,0 @@ -rabbitmq_vhost { ['fooey', 'blah']: } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/.travis.yml deleted file mode 100644 index 079eb44c72..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -language: ruby -rvm: -- 1.8.7 -- 1.9.3 -script: -- git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-releng -- .forge-releng/publish -branches: - only: - - master -env: - global: - - PUBLISHER_LOGIN=fsalum - - secure: "DENnYQVOgU9VOxYGjKsCdsoCNeZ42yf751SFhK9s7Fmu790KiQvnY7Vjs+Sj\nrQ3xYXProkMYtx+KVbtzQo02oSYRF+sVYyBza3066bir0GK1YPdgrpT9Q3vo\nuT4+kfaeJK8StiBRWvPlyY3QrDbVsnIuQ+NxBFxjnZdDg350G8Q=" - matrix: - - PUPPET_VERSION=2.7.25 - - PUPPET_VERSION=3.1.1 - - PUPPET_VERSION=3.2.4 - - PUPPET_VERSION=3.3.2 - - PUPPET_VERSION=3.4.2 -notifications: - email: false -gemfile: Gemfile diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/CHANGELOG b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/CHANGELOG deleted file mode 100644 index 02800f976d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/CHANGELOG +++ /dev/null @@ -1,63 +0,0 @@ -## fsalum-redis changelog - -Release notes for the fsalum-redis module. - ------------------------------------------- - -#### 0.0.11 - 2014-02-19 - -* system_sysctl parameter for redis class (@tehmaspc) - -#### 0.0.10 - 2014-02-19 - -* Allow conf_bind to be unset (@stevelacey) -* Changing default of glueoutputbuf to UNSET (@tehmaspc) - -#### 0.0.9 - 2014-01-09 - -* Add quotes around all instances of UNSET (@charlesdunbar) - -#### 0.0.8 - 2013-12-20 - -* Setting mode permission for conf_dir (@KlavsKlavsen) - -#### 0.0.7 - 2013-12-11 - -* Add glueoutputbuf config option (@kryptx) -* Add support for Amazon Linux AMI (@mattboston) - -#### 0.0.6 - 2013-08-01 - -* Install package before poking config (@doismellburning) - -#### 0.0.5 - 2013-06-06 - -* Fix Puppet 3.2.1 deprecation warnings (@ripienaar) -* Fix duplicate entry for logrotate on Debian/RHEL using different paths (@arthurfurlan) -* Add $conf_nosave parameter (@fsalum) -* Minor changes to params variables (@fsalum) -* Update CHANGELOG format - ------------------------------------------- - -#### 0.0.4 - 2013-04-18 - -* Creates conf_dir directory if it doesn't exist - ------------------------------------------- - -#### 0.0.3 - 2013-02-25 - -* Fixing redis.conf less options on Debian - ------------------------------------------- - -#### 0.0.2 - 2013-02-25 - -* Fixing redis.conf location for Debian - ------------------------------------------- - -#### 0.0.1 - 2013-02-25 - -* Initial Forge release diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Gemfile deleted file mode 100644 index 2df03ec63c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Gemfile +++ /dev/null @@ -1,7 +0,0 @@ -source :rubygems - -puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7'] - -gem 'rake' -gem 'puppet-lint' -gem 'puppet', puppetversion diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/LICENSE deleted file mode 100644 index f31e47dd22..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -Copyright (C) 2012 Felipe Salum - -Felipe Salum can be contacted at: fsalum@gmail.com - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Modulefile deleted file mode 100644 index 3d9432ecc9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Modulefile +++ /dev/null @@ -1,13 +0,0 @@ -name 'fsalum-redis' -version '0.0.11' -source 'git://github.com/fsalum/puppet-redis.git' -author 'Felipe Salum' -license 'Apache License, Version 2.0' -summary 'Puppet module for Redis Server' -description 'Module to install and configure a Redis server' -project_page 'https://github.com/fsalum/puppet-redis' - -## Add dependencies, if any: - -# https://forge.puppetlabs.com/thias/sysctl -dependency 'thias/sysctl', '0.3.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/README.md deleted file mode 100644 index 3fcd7d4d65..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/README.md +++ /dev/null @@ -1,57 +0,0 @@ -Redis Module for Puppet -======================= -[![Build Status](https://secure.travis-ci.org/fsalum/puppet-redis.png)](http://travis-ci.org/fsalum/puppet-redis) - -This module installs and manages a Redis server. All redis.conf options are -accepted in the parameterized class. - -Operating System ----------------- - -Tested on CentOS 6.3 and Debian Squeeze. - -Quick Start ------------ - -Use the default parameters: - - class { 'redis': } - -To change the port and listening network interface: - - class { 'redis': - conf_port => '6379', - conf_bind => '0.0.0.0', - } - -Parameters ----------- - -Check the [init.pp](https://github.com/fsalum/puppet-redis/blob/master/manifests/init.pp) file for a complete list of parameters accepted. - -To enable and set important Linux kernel sysctl parameters as described in the [Redis Admin Guide](http://redis.io/topics/admin) - use the following configuration option: - - class { 'redis': - system_sysctl => true - } - -By default, this sysctl parameter will not be enabled. Furthermore, you will need the sysctl module defined in the [Modulefile](https://github.com/fsalum/puppet-redis/blob/master/Modulefile) file. - -Copyright and License ---------------------- - -Copyright (C) 2012 Felipe Salum - -Felipe Salum can be contacted at: fsalum@gmail.com - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Rakefile deleted file mode 100644 index d29667f8ca..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Rakefile +++ /dev/null @@ -1,6 +0,0 @@ -require 'puppet-lint/tasks/puppet-lint' - -PuppetLint.configuration.send("disable_80chars") -PuppetLint.configuration.send('disable_class_parameter_defaults') - -task :default => :lint diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Vagrantfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Vagrantfile deleted file mode 100644 index 2c687ecd45..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/Vagrantfile +++ /dev/null @@ -1,18 +0,0 @@ -VAGRANTFILE_API_VERSION = "2" -Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - config.vbguest.auto_update = false - config.hostmanager.enabled = false - - config.vm.define 'redis' do |node| - node.vm.box = "centos65" - node.vm.hostname = "redis.local" - node.vm.network :private_network, ip: "192.168.100.100" - node.vm.provision :shell, :inline => "yum install -y git && gem install librarian-puppet --no-ri --no-rdoc" - node.vm.provision :shell, :inline => "cd /vagrant ; librarian-puppet install --clean --path /etc/puppet/modules" - node.vm.provision :puppet do |puppet| - puppet.manifests_path = ["vm", "/etc/puppet/modules/redis/tests"] - puppet.manifest_file = "init.pp" - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/manifests/init.pp deleted file mode 100644 index 41854941ee..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/manifests/init.pp +++ /dev/null @@ -1,160 +0,0 @@ -# == Class: redis -# -# Install and configure a Redis server -# -# === Parameters -# -# All the redis.conf parameters can be passed to the class. -# See below for a complete list of parameters accepted. -# -# Check the README.md file for any further information about parameters for this class. -# -# === Examples -# -# class { redis: -# conf_port => '6380', -# conf_bind => '0.0.0.0', -# } -# -# === Authors -# -# Felipe Salum -# -# === Copyright -# -# Copyright 2013 Felipe Salum, unless otherwise noted. -# -class redis ( - $package_ensure = 'present', - $service_ensure = 'running', - $service_enable = true, - $system_sysctl = false, - $conf_daemonize = 'yes', - $conf_pidfile = 'UNSET', - $conf_port = '6379', - $conf_bind = '127.0.0.1', - $conf_timeout = '0', - $conf_loglevel = 'notice', - $conf_logfile = 'UNSET', - $conf_syslog_enabled = 'UNSET', - $conf_syslog_ident = 'UNSET', - $conf_syslog_facility = 'UNSET', - $conf_databases = '16', - $conf_save = 'UNSET', - $conf_nosave = 'UNSET', - $conf_rdbcompression = 'yes', - $conf_dbfilename = 'dump.rdb', - $conf_dir = '/var/lib/redis/', - $conf_slaveof = 'UNSET', - $conf_masterauth = 'UNSET', - $conf_slave_server_stale_data = 'yes', - $conf_repl_ping_slave_period = '10', - $conf_repl_timeout = '60', - $conf_requirepass = 'UNSET', - $conf_maxclients = 'UNSET', - $conf_maxmemory = 'UNSET', - $conf_maxmemory_policy = 'UNSET', - $conf_maxmemory_samples = 'UNSET', - $conf_appendonly = 'no', - $conf_appendfilename = 'UNSET', - $conf_appendfsync = 'everysec', - $conf_no_appendfsync_on_rewrite = 'no', - $conf_auto_aof_rewrite_percentage = '100', - $conf_auto_aof_rewrite_min_size = '64mb', - $conf_slowlog_log_slower_than = '10000', - $conf_slowlog_max_len = '1024', - $conf_vm_enabled = 'no', - $conf_vm_swap_file = '/tmp/redis.swap', - $conf_vm_max_memory = '0', - $conf_vm_page_size = '32', - $conf_vm_pages = '134217728', - $conf_vm_max_threads = '4', - $conf_hash_max_zipmap_entries = '512', - $conf_hash_max_zipmap_value = '64', - $conf_list_max_ziplist_entries = '512', - $conf_list_max_ziplist_value = '64', - $conf_set_max_intset_entries = '512', - $conf_zset_max_ziplist_entries = '128', - $conf_zset_max_ziplist_value = '64', - $conf_activerehashing = 'yes', - $conf_include = 'UNSET', - $conf_glueoutputbuf = 'UNSET', -) { - - include redis::params - - $conf_template = $redis::params::conf_template - $conf_redis = $redis::params::conf - $conf_logrotate = $redis::params::conf_logrotate - $package = $redis::params::package - $service = $redis::params::service - - $conf_pidfile_real = $conf_pidfile ? { - 'UNSET' => $::redis::params::pidfile, - default => $conf_pidfile, - } - - $conf_logfile_real = $conf_logfile ? { - 'UNSET' => $::redis::params::logfile, - default => $conf_logfile, - } - - package { 'redis': - ensure => $package_ensure, - name => $package, - } - - service { 'redis': - ensure => $service_ensure, - name => $service, - enable => $service_enable, - hasrestart => true, - hasstatus => true, - require => Package['redis'], - } - - file { $conf_redis: - path => $conf_redis, - content => template("redis/${conf_template}"), - owner => root, - group => root, - mode => '0644', - require => Package['redis'], - notify => Service['redis'], - } - - file { $conf_logrotate: - path => $conf_logrotate, - content => template('redis/redis.logrotate.erb'), - owner => root, - group => root, - mode => '0644', - } - - exec { $conf_dir: - path => '/bin:/usr/bin:/sbin:/usr/sbin', - command => "mkdir -p ${conf_dir}", - user => root, - group => root, - creates => $conf_dir, - before => Service['redis'], - require => Package['redis'], - notify => Service['redis'], - } - - file { $conf_dir: - ensure => directory, - owner => redis, - group => redis, - mode => 0755, - before => Service['redis'], - require => Exec[$conf_dir], - } - - if ( $system_sysctl == true ) { - # add necessary kernel parameters - # see the redis admin guide here: http://redis.io/topics/admin - sysctl { 'vm.overcommit_memory': value => '1' } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/manifests/params.pp deleted file mode 100644 index 8983eeadf7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/manifests/params.pp +++ /dev/null @@ -1,39 +0,0 @@ -# Class: redis::params -# -# This class configures parameters for the puppet-redis module. -# -# Parameters: -# -# Actions: -# -# Requires: -# -# Sample Usage: -# -class redis::params { - - case $::operatingsystem { - 'centos', 'redhat', 'fedora', 'amazon': { - $package = 'redis' - $service = 'redis' - $conf = '/etc/redis.conf' - $conf_template = 'redis.rhel.conf.erb' - $conf_logrotate = '/etc/logrotate.d/redis' - $pidfile = '/var/run/redis/redis.pid' - $logfile = '/var/log/redis/redis.log' - } - 'ubuntu', 'debian': { - $package = 'redis-server' - $service = 'redis-server' - $conf = '/etc/redis/redis.conf' - $conf_template = 'redis.debian.conf.erb' - $conf_logrotate = '/etc/logrotate.d/redis-server' - $pidfile = '/var/run/redis/redis-server.pid' - $logfile = '/var/log/redis/redis-server.log' - } - default: { - fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian") - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/spec/spec_helper.rb deleted file mode 100644 index 5fda58875b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/spec/spec_helper.rb +++ /dev/null @@ -1,17 +0,0 @@ -dir = File.expand_path(File.dirname(__FILE__)) -$LOAD_PATH.unshift File.join(dir, 'lib') - -require 'mocha' -require 'puppet' -require 'rspec' -require 'spec/autorun' - -Spec::Runner.configure do |config| - config.mock_with :mocha -end - -# We need this because the RAL uses 'should' as a method. This -# allows us the same behaviour but with a different method name. -class Object - alias :must :should -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/templates/redis.debian.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/templates/redis.debian.conf.erb deleted file mode 100644 index e6706d061d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/templates/redis.debian.conf.erb +++ /dev/null @@ -1,221 +0,0 @@ -# Redis configuration file example - -# By default Redis does not run as a daemon. Use 'yes' if you need it. -# Note that Redis will write a pid file in /var/run/redis.pid when daemonized. -daemonize <%= @conf_daemonize %> - -# When run as a daemon, Redis write a pid file in /var/run/redis.pid by default. -# You can specify a custom pid file location here. -pidfile <%= @conf_pidfile_real %> - -# Accept connections on the specified port, default is 6379 -port <%= @conf_port %> - -# If you want you can bind a single interface, if the bind option is not -# specified all the interfaces will listen for connections. -# -<% if @conf_bind != 'UNSET' %> -bind <%= @conf_bind %> -<% end %> - -# Close the connection after a client is idle for N seconds (0 to disable) -timeout <%= @conf_timeout %> - -# Set server verbosity to 'debug' -# it can be one of: -# debug (a lot of information, useful for development/testing) -# notice (moderately verbose, what you want in production probably) -# warning (only very important / critical messages are logged) -loglevel <%= @conf_loglevel %> - -# Specify the log file name. Also 'stdout' can be used to force -# the demon to log on the standard output. Note that if you use standard -# output for logging but daemonize, logs will be sent to /dev/null -logfile <%= @conf_logfile_real %> - -# Set the number of databases. The default database is DB 0, you can select -# a different one on a per-connection basis using SELECT where -# dbid is a number between 0 and 'databases'-1 -databases <%= @conf_databases %> - -################################ SNAPSHOTTING ################################# -# -# Save the DB on disk: -# -# save -# -# Will save the DB if both the given number of seconds and the given -# number of write operations against the DB occurred. -# -# In the example below the behaviour will be to save: -# after 900 sec (15 min) if at least 1 key changed -# after 300 sec (5 min) if at least 10 keys changed -# after 60 sec if at least 10000 keys changed -<% if @conf_nosave != 'UNSET' %> -#do not persist to disk: -#save 900 1 -#save 300 10 -#save 60 10000 -<% else %> - <% if @conf_save != 'UNSET' %> - save <%= @conf_save %> - <% else %> - save 900 1 - save 300 10 - save 60 10000 - <% end %> -<% end %> - -# Compress string objects using LZF when dump .rdb databases? -# For default that's set to 'yes' as it's almost always a win. -# If you want to save some CPU in the saving child set it to 'no' but -# the dataset will likely be bigger if you have compressible values or keys. -rdbcompression <%= @conf_rdbcompression %> - -# The filename where to dump the DB -dbfilename <%= @conf_dbfilename %> - -# For default save/load DB in/from the working directory -# Note that you must specify a directory not a file name. -dir <%= @conf_dir %> - -################################# REPLICATION ################################# - -# Master-Slave replication. Use slaveof to make a Redis instance a copy of -# another Redis server. Note that the configuration is local to the slave -# so for example it is possible to configure the slave to save the DB with a -# different interval, or to listen to another port, and so on. -# -# slaveof -<% if @conf_slaveof != 'UNSET' %> -slaveof <%= @conf_slaveof %> -<% end %> - -# If the master is password protected (using the "requirepass" configuration -# directive below) it is possible to tell the slave to authenticate before -# starting the replication synchronization process, otherwise the master will -# refuse the slave request. -# -# masterauth -<% if @conf_masterauth != 'UNSET' %> -masterauth <%= @conf_masterauth %> -<% end %> - - -################################## SECURITY ################################### - -# Require clients to issue AUTH before processing any other -# commands. This might be useful in environments in which you do not trust -# others with access to the host running redis-server. -# -# This should stay commented out for backward compatibility and because most -# people do not need auth (e.g. they run their own servers). -# -# requirepass foobared -<% if @conf_requirepass != 'UNSET' %> -requirepass <%= @conf_requirepass %> -<% end %> - - -################################### LIMITS #################################### - -# Set the max number of connected clients at the same time. By default there -# is no limit, and it's up to the number of file descriptors the Redis process -# is able to open. The special value '0' means no limts. -# Once the limit is reached Redis will close all the new connections sending -# an error 'max number of clients reached'. -# -# maxclients 128 -<% if @conf_maxclients != 'UNSET' %> -maxclients <%= @conf_maxclients %> -<% end %> - -# Don't use more memory than the specified amount of bytes. -# When the memory limit is reached Redis will try to remove keys with an -# EXPIRE set. It will try to start freeing keys that are going to expire -# in little time and preserve keys with a longer time to live. -# Redis will also try to remove objects from free lists if possible. -# -# If all this fails, Redis will start to reply with errors to commands -# that will use more memory, like SET, LPUSH, and so on, and will continue -# to reply to most read-only commands like GET. -# -# WARNING: maxmemory can be a good idea mainly if you want to use Redis as a -# 'state' server or cache, not as a real DB. When Redis is used as a real -# database the memory usage will grow over the weeks, it will be obvious if -# it is going to use too much memory in the long run, and you'll have the time -# to upgrade. With maxmemory after the limit is reached you'll start to get -# errors for write operations, and this may even lead to DB inconsistency. -# -# maxmemory -<% if @conf_maxmemory != 'UNSET' %> -maxmemory <%= @conf_maxmemory %> -<% end %> - -############################## APPEND ONLY MODE ############################### - -# By default Redis asynchronously dumps the dataset on disk. If you can live -# with the idea that the latest records will be lost if something like a crash -# happens this is the preferred way to run Redis. If instead you care a lot -# about your data and don't want to that a single record can get lost you should -# enable the append only mode: when this mode is enabled Redis will append -# every write operation received in the file appendonly.log. This file will -# be read on startup in order to rebuild the full dataset in memory. -# -# Note that you can have both the async dumps and the append only file if you -# like (you have to comment the "save" statements above to disable the dumps). -# Still if append only mode is enabled Redis will load the data from the -# log file at startup ignoring the dump.rdb file. -# -# The name of the append only file is "appendonly.log" -# -# IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append -# log file in background when it gets too big. - -appendonly <%= @conf_appendonly %> - -# The fsync() call tells the Operating System to actually write data on disk -# instead to wait for more data in the output buffer. Some OS will really flush -# data on disk, some other OS will just try to do it ASAP. -# -# Redis supports three different modes: -# -# no: don't fsync, just let the OS flush the data when it wants. Faster. -# always: fsync after every write to the append only log . Slow, Safest. -# everysec: fsync only if one second passed since the last fsync. Compromise. -# -# The default is "always" that's the safer of the options. It's up to you to -# understand if you can relax this to "everysec" that will fsync every second -# or to "no" that will let the operating system flush the output buffer when -# it want, for better performances (but if you can live with the idea of -# some data loss consider the default persistence mode that's snapshotting). - -appendfsync <%= @conf_appendfsync %> -# appendfsync everysec -# appendfsync no - -############################### ADVANCED CONFIG ############################### - -# Glue small output buffers together in order to send small replies in a -# single TCP packet. Uses a bit more CPU but most of the times it is a win -# in terms of number of queries per second. Use 'yes' if unsure. -<% if @conf_glueoutputbuf != 'UNSET' %> -glueoutputbuf <%= @conf_glueoutputbuf %> -<% end %> - -# Use object sharing. Can save a lot of memory if you have many common -# string in your dataset, but performs lookups against the shared objects -# pool so it uses more CPU and can be a bit slower. Usually it's a good -# idea. -# -# When object sharing is enabled (shareobjects yes) you can use -# shareobjectspoolsize to control the size of the pool used in order to try -# object sharing. A bigger pool size will lead to better sharing capabilities. -# In general you want this value to be at least the double of the number of -# very common strings you have in your dataset. -# -# WARNING: object sharing is experimental, don't enable this feature -# in production before of Redis 1.0-stable. Still please try this feature in -# your development environment so that we can test it better. -# shareobjects no -# shareobjectspoolsize 1024 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/templates/redis.logrotate.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/templates/redis.logrotate.erb deleted file mode 100644 index b9ba724a59..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/templates/redis.logrotate.erb +++ /dev/null @@ -1,9 +0,0 @@ -<%= @conf_logfile_real %> { - weekly - rotate 10 - copytruncate - delaycompress - compress - notifempty - missingok -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/templates/redis.rhel.conf.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/templates/redis.rhel.conf.erb deleted file mode 100644 index 51d1e07e16..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/templates/redis.rhel.conf.erb +++ /dev/null @@ -1,549 +0,0 @@ -# Redis configuration file example - -# Note on units: when memory size is needed, it is possible to specifiy -# it in the usual form of 1k 5GB 4M and so forth: -# -# 1k => 1000 bytes -# 1kb => 1024 bytes -# 1m => 1000000 bytes -# 1mb => 1024*1024 bytes -# 1g => 1000000000 bytes -# 1gb => 1024*1024*1024 bytes -# -# units are case insensitive so 1GB 1Gb 1gB are all the same. - -# By default Redis does not run as a daemon. Use 'yes' if you need it. -# Note that Redis will write a pid file in /var/run/redis.pid when daemonized. -daemonize <%= @conf_daemonize %> - -# When running daemonized, Redis writes a pid file in /var/run/redis.pid by -# default. You can specify a custom pid file location here. -pidfile <%= @conf_pidfile_real %> - -# Accept connections on the specified port, default is 6379. -# If port 0 is specified Redis will not listen on a TCP socket. -port <%= @conf_port %> - -# If you want you can bind a single interface, if the bind option is not -# specified all the interfaces will listen for incoming connections. -# -<% if @conf_bind != 'UNSET' %> -bind <%= @conf_bind %> -<% end %> - -# Specify the path for the unix socket that will be used to listen for -# incoming connections. There is no default, so Redis will not listen -# on a unix socket when not specified. -# -# unixsocket /tmp/redis.sock -# unixsocketperm 755 - -# Close the connection after a client is idle for N seconds (0 to disable) -timeout <%= @conf_timeout %> - -# Set server verbosity to 'debug' -# it can be one of: -# debug (a lot of information, useful for development/testing) -# verbose (many rarely useful info, but not a mess like the debug level) -# notice (moderately verbose, what you want in production probably) -# warning (only very important / critical messages are logged) -loglevel <%= @conf_loglevel %> - -# Specify the log file name. Also 'stdout' can be used to force -# Redis to log on the standard output. Note that if you use standard -# output for logging but daemonize, logs will be sent to /dev/null -logfile <%= @conf_logfile_real %> - -# To enable logging to the system logger, just set 'syslog-enabled' to yes, -# and optionally update the other syslog parameters to suit your needs. -<% if @conf_syslog_enabled != 'UNSET' %> -syslog-enabled <%= @conf_syslog_enabled %> -<% else %> -# syslog-enabled no -<% end %> - -# Specify the syslog identity. -<% if @conf_syslog_ident != 'UNSET' %> -syslog-ident <%= @conf_syslog_ident %> -<% else %> -# syslog-ident redis -<% end %> - -# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7. -<% if @conf_syslog_facility != 'UNSET' %> -syslog-facility <%= @conf_syslog_facility %> -<% else %> -# syslog-facility local0 -<% end %> - -# Set the number of databases. The default database is DB 0, you can select -# a different one on a per-connection basis using SELECT where -# dbid is a number between 0 and 'databases'-1 -databases <%= @conf_databases %> - -################################ SNAPSHOTTING ################################# -# -# Save the DB on disk: -# -# save -# -# Will save the DB if both the given number of seconds and the given -# number of write operations against the DB occurred. -# -# In the example below the behaviour will be to save: -# after 900 sec (15 min) if at least 1 key changed -# after 300 sec (5 min) if at least 10 keys changed -# after 60 sec if at least 10000 keys changed -# -# Note: you can disable saving at all commenting all the "save" lines. - -<% if @conf_nosave != 'UNSET' %> -#do not persist to disk: -#save 900 1 -#save 300 10 -#save 60 10000 -<% else %> - <% if @conf_save != 'UNSET' %> - save <%= @conf_save %> - <% else %> - save 900 1 - save 300 10 - save 60 10000 - <% end %> -<% end %> - -# Compress string objects using LZF when dump .rdb databases? -# For default that's set to 'yes' as it's almost always a win. -# If you want to save some CPU in the saving child set it to 'no' but -# the dataset will likely be bigger if you have compressible values or keys. -rdbcompression <%= @conf_rdbcompression %> - -# The filename where to dump the DB -dbfilename <%= @conf_dbfilename %> - -# The working directory. -# -# The DB will be written inside this directory, with the filename specified -# above using the 'dbfilename' configuration directive. -# -# Also the Append Only File will be created inside this directory. -# -# Note that you must specify a directory here, not a file name. -dir <%= @conf_dir %> - -################################# REPLICATION ################################# - -# Master-Slave replication. Use slaveof to make a Redis instance a copy of -# another Redis server. Note that the configuration is local to the slave -# so for example it is possible to configure the slave to save the DB with a -# different interval, or to listen to another port, and so on. -# -<% if @conf_slaveof != 'UNSET' %> -slaveof <%= @conf_slaveof %> -<% else %> -# slaveof -<% end %> - -# If the master is password protected (using the "requirepass" configuration -# directive below) it is possible to tell the slave to authenticate before -# starting the replication synchronization process, otherwise the master will -# refuse the slave request. -# -<% if @conf_masterauth != 'UNSET' %> -masterauth <%= @conf_masterauth %> -<% else %> -# masterauth -<% end %> - -# When a slave lost the connection with the master, or when the replication -# is still in progress, the slave can act in two different ways: -# -# 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will -# still reply to client requests, possibly with out of data data, or the -# data set may just be empty if this is the first synchronization. -# -# 2) if slave-serve-stale data is set to 'no' the slave will reply with -# an error "SYNC with master in progress" to all the kind of commands -# but to INFO and SLAVEOF. -# -slave-serve-stale-data <%= @conf_slave_server_stale_data %> - -# Slaves send PINGs to server in a predefined interval. It's possible to change -# this interval with the repl_ping_slave_period option. The default value is 10 -# seconds. -# -# repl-ping-slave-period 10 -repl-ping-slave-period <%= @conf_repl_ping_slave_period %> - -# The following option sets a timeout for both Bulk transfer I/O timeout and -# master data or ping response timeout. The default value is 60 seconds. -# -# It is important to make sure that this value is greater than the value -# specified for repl-ping-slave-period otherwise a timeout will be detected -# every time there is low traffic between the master and the slave. -# -# repl-timeout 60 -repl-timeout <%= @conf_repl_timeout %> - -################################## SECURITY ################################### - -# Require clients to issue AUTH before processing any other -# commands. This might be useful in environments in which you do not trust -# others with access to the host running redis-server. -# -# This should stay commented out for backward compatibility and because most -# people do not need auth (e.g. they run their own servers). -# -# Warning: since Redis is pretty fast an outside user can try up to -# 150k passwords per second against a good box. This means that you should -# use a very strong password otherwise it will be very easy to break. -# -<% if @conf_requirepass != 'UNSET' %> -requirepass <%= @conf_requirepass %> -<% else %> -# requirepass foobared -<% end %> - -# Command renaming. -# -# It is possilbe to change the name of dangerous commands in a shared -# environment. For instance the CONFIG command may be renamed into something -# of hard to guess so that it will be still available for internal-use -# tools but not available for general clients. -# -# Example: -# -# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52 -# -# It is also possilbe to completely kill a command renaming it into -# an empty string: -# -# rename-command CONFIG "" - -################################### LIMITS #################################### - -# Set the max number of connected clients at the same time. By default there -# is no limit, and it's up to the number of file descriptors the Redis process -# is able to open. The special value '0' means no limits. -# Once the limit is reached Redis will close all the new connections sending -# an error 'max number of clients reached'. -# -# maxclients 128 -<% if @conf_maxclients != 'UNSET' %> -maxclients <%= @conf_maxclients %> -<% end %> - -# Don't use more memory than the specified amount of bytes. -# When the memory limit is reached Redis will try to remove keys -# accordingly to the eviction policy selected (see maxmemmory-policy). -# -# If Redis can't remove keys according to the policy, or if the policy is -# set to 'noeviction', Redis will start to reply with errors to commands -# that would use more memory, like SET, LPUSH, and so on, and will continue -# to reply to read-only commands like GET. -# -# This option is usually useful when using Redis as an LRU cache, or to set -# an hard memory limit for an instance (using the 'noeviction' policy). -# -# WARNING: If you have slaves attached to an instance with maxmemory on, -# the size of the output buffers needed to feed the slaves are subtracted -# from the used memory count, so that network problems / resyncs will -# not trigger a loop where keys are evicted, and in turn the output -# buffer of slaves is full with DELs of keys evicted triggering the deletion -# of more keys, and so forth until the database is completely emptied. -# -# In short... if you have slaves attached it is suggested that you set a lower -# limit for maxmemory so that there is some free RAM on the system for slave -# output buffers (but this is not needed if the policy is 'noeviction'). -# -# maxmemory -<% if @conf_maxmemory != 'UNSET' %> -maxmemory <%= @conf_maxmemory %> -<% end %> - -# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory -# is reached? You can select among five behavior: -# -# volatile-lru -> remove the key with an expire set using an LRU algorithm -# allkeys-lru -> remove any key accordingly to the LRU algorithm -# volatile-random -> remove a random key with an expire set -# allkeys->random -> remove a random key, any key -# volatile-ttl -> remove the key with the nearest expire time (minor TTL) -# noeviction -> don't expire at all, just return an error on write operations -# -# Note: with all the kind of policies, Redis will return an error on write -# operations, when there are not suitable keys for eviction. -# -# At the date of writing this commands are: set setnx setex append -# incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd -# sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby -# zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby -# getset mset msetnx exec sort -# -# The default is: -# -# maxmemory-policy volatile-lru -<% if @conf_maxmemory_policy != 'UNSET' %> -maxmemory-policy <%= @conf_maxmemory_policy %> -<% end %> - -# LRU and minimal TTL algorithms are not precise algorithms but approximated -# algorithms (in order to save memory), so you can select as well the sample -# size to check. For instance for default Redis will check three keys and -# pick the one that was used less recently, you can change the sample size -# using the following configuration directive. -# -# maxmemory-samples 3 -<% if @conf_maxmemory_samples != 'UNSET' %> -maxmemory-samples <%= @conf_maxmemory_samples %> -<% end %> - -############################## APPEND ONLY MODE ############################### - -# By default Redis asynchronously dumps the dataset on disk. If you can live -# with the idea that the latest records will be lost if something like a crash -# happens this is the preferred way to run Redis. If instead you care a lot -# about your data and don't want to that a single record can get lost you should -# enable the append only mode: when this mode is enabled Redis will append -# every write operation received in the file appendonly.aof. This file will -# be read on startup in order to rebuild the full dataset in memory. -# -# Note that you can have both the async dumps and the append only file if you -# like (you have to comment the "save" statements above to disable the dumps). -# Still if append only mode is enabled Redis will load the data from the -# log file at startup ignoring the dump.rdb file. -# -# IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append -# log file in background when it gets too big. - -appendonly <%= @conf_appendonly %> - -# The name of the append only file (default: "appendonly.aof") -# appendfilename appendonly.aof -<% if @conf_appendfilename != 'UNSET' %> -appendfilename <%= @conf_appendfilename %> -<% end %> - -# The fsync() call tells the Operating System to actually write data on disk -# instead to wait for more data in the output buffer. Some OS will really flush -# data on disk, some other OS will just try to do it ASAP. -# -# Redis supports three different modes: -# -# no: don't fsync, just let the OS flush the data when it wants. Faster. -# always: fsync after every write to the append only log . Slow, Safest. -# everysec: fsync only if one second passed since the last fsync. Compromise. -# -# The default is "everysec" that's usually the right compromise between -# speed and data safety. It's up to you to understand if you can relax this to -# "no" that will will let the operating system flush the output buffer when -# it wants, for better performances (but if you can live with the idea of -# some data loss consider the default persistence mode that's snapshotting), -# or on the contrary, use "always" that's very slow but a bit safer than -# everysec. -# -# If unsure, use "everysec". - -# appendfsync always -appendfsync <%= @conf_appendfsync %> -# appendfsync no - -# When the AOF fsync policy is set to always or everysec, and a background -# saving process (a background save or AOF log background rewriting) is -# performing a lot of I/O against the disk, in some Linux configurations -# Redis may block too long on the fsync() call. Note that there is no fix for -# this currently, as even performing fsync in a different thread will block -# our synchronous write(2) call. -# -# In order to mitigate this problem it's possible to use the following option -# that will prevent fsync() from being called in the main process while a -# BGSAVE or BGREWRITEAOF is in progress. -# -# This means that while another child is saving the durability of Redis is -# the same as "appendfsync none", that in pratical terms means that it is -# possible to lost up to 30 seconds of log in the worst scenario (with the -# default Linux settings). -# -# If you have latency problems turn this to "yes". Otherwise leave it as -# "no" that is the safest pick from the point of view of durability. -no-appendfsync-on-rewrite <%= @conf_no_appendfsync_on_rewrite %> - -# Automatic rewrite of the append only file. -# Redis is able to automatically rewrite the log file implicitly calling -# BGREWRITEAOF when the AOF log size will growth by the specified percentage. -# -# This is how it works: Redis remembers the size of the AOF file after the -# latest rewrite (or if no rewrite happened since the restart, the size of -# the AOF at startup is used). -# -# This base size is compared to the current size. If the current size is -# bigger than the specified percentage, the rewrite is triggered. Also -# you need to specify a minimal size for the AOF file to be rewritten, this -# is useful to avoid rewriting the AOF file even if the percentage increase -# is reached but it is still pretty small. -# -# Specify a precentage of zero in order to disable the automatic AOF -# rewrite feature. - -auto-aof-rewrite-percentage <%= @conf_auto_aof_rewrite_percentage %> -auto-aof-rewrite-min-size <%= @conf_auto_aof_rewrite_min_size %> - -################################## SLOW LOG ################################### - -# The Redis Slow Log is a system to log queries that exceeded a specified -# execution time. The execution time does not include the I/O operations -# like talking with the client, sending the reply and so forth, -# but just the time needed to actually execute the command (this is the only -# stage of command execution where the thread is blocked and can not serve -# other requests in the meantime). -# -# You can configure the slow log with two parameters: one tells Redis -# what is the execution time, in microseconds, to exceed in order for the -# command to get logged, and the other parameter is the length of the -# slow log. When a new command is logged the oldest one is removed from the -# queue of logged commands. - -# The following time is expressed in microseconds, so 1000000 is equivalent -# to one second. Note that a negative number disables the slow log, while -# a value of zero forces the logging of every command. -slowlog-log-slower-than <%= @conf_slowlog_log_slower_than %> - -# There is no limit to this length. Just be aware that it will consume memory. -# You can reclaim memory used by the slow log with SLOWLOG RESET. -slowlog-max-len <%= @conf_slowlog_max_len %> - -################################ VIRTUAL MEMORY ############################### - -### WARNING! Virtual Memory is deprecated in Redis 2.4 -### The use of Virtual Memory is strongly discouraged. - -# Virtual Memory allows Redis to work with datasets bigger than the actual -# amount of RAM needed to hold the whole dataset in memory. -# In order to do so very used keys are taken in memory while the other keys -# are swapped into a swap file, similarly to what operating systems do -# with memory pages. -# -# To enable VM just set 'vm-enabled' to yes, and set the following three -# VM parameters accordingly to your needs. - -#vm-enabled <%= @conf_vm_enabled %> -# vm-enabled yes - -# This is the path of the Redis swap file. As you can guess, swap files -# can't be shared by different Redis instances, so make sure to use a swap -# file for every redis process you are running. Redis will complain if the -# swap file is already in use. -# -# The best kind of storage for the Redis swap file (that's accessed at random) -# is a Solid State Disk (SSD). -# -# *** WARNING *** if you are using a shared hosting the default of putting -# the swap file under /tmp is not secure. Create a dir with access granted -# only to Redis user and configure Redis to create the swap file there. -#vm-swap-file <%= @conf_vm_swap_file %> - -# vm-max-memory configures the VM to use at max the specified amount of -# RAM. Everything that deos not fit will be swapped on disk *if* possible, that -# is, if there is still enough contiguous space in the swap file. -# -# With vm-max-memory 0 the system will swap everything it can. Not a good -# default, just specify the max amount of RAM you can in bytes, but it's -# better to leave some margin. For instance specify an amount of RAM -# that's more or less between 60 and 80% of your free RAM. -#vm-max-memory <%= @conf_vm_max_memory %> - -# Redis swap files is split into pages. An object can be saved using multiple -# contiguous pages, but pages can't be shared between different objects. -# So if your page is too big, small objects swapped out on disk will waste -# a lot of space. If you page is too small, there is less space in the swap -# file (assuming you configured the same number of total swap file pages). -# -# If you use a lot of small objects, use a page size of 64 or 32 bytes. -# If you use a lot of big objects, use a bigger page size. -# If unsure, use the default :) -#vm-page-size <%= @conf_vm_page_size %> - -# Number of total memory pages in the swap file. -# Given that the page table (a bitmap of free/used pages) is taken in memory, -# every 8 pages on disk will consume 1 byte of RAM. -# -# The total swap size is vm-page-size * vm-pages -# -# With the default of 32-bytes memory pages and 134217728 pages Redis will -# use a 4 GB swap file, that will use 16 MB of RAM for the page table. -# -# It's better to use the smallest acceptable value for your application, -# but the default is large in order to work in most conditions. -#vm-pages <%= @conf_vm_pages %> - -# Max number of VM I/O threads running at the same time. -# This threads are used to read/write data from/to swap file, since they -# also encode and decode objects from disk to memory or the reverse, a bigger -# number of threads can help with big objects even if they can't help with -# I/O itself as the physical device may not be able to couple with many -# reads/writes operations at the same time. -# -# The special value of 0 turn off threaded I/O and enables the blocking -# Virtual Memory implementation. -#vm-max-threads <%= @conf_vm_max_threads %> - -############################### ADVANCED CONFIG ############################### - -# Hashes are encoded in a special way (much more memory efficient) when they -# have at max a given numer of elements, and the biggest element does not -# exceed a given threshold. You can configure this limits with the following -# configuration directives. -#hash-max-zipmap-entries <%= @conf_hash_max_zipmap_entries %> -#hash-max-zipmap-value <%= @conf_hash_max_zipmap_value %> - -# Similarly to hashes, small lists are also encoded in a special way in order -# to save a lot of space. The special representation is only used when -# you are under the following limits: -list-max-ziplist-entries <%= @conf_list_max_ziplist_entries %> -list-max-ziplist-value <%= @conf_list_max_ziplist_value %> - -# Sets have a special encoding in just one case: when a set is composed -# of just strings that happens to be integers in radix 10 in the range -# of 64 bit signed integers. -# The following configuration setting sets the limit in the size of the -# set in order to use this special memory saving encoding. -set-max-intset-entries <%= @conf_set_max_intset_entries %> - -# Similarly to hashes and lists, sorted sets are also specially encoded in -# order to save a lot of space. This encoding is only used when the length and -# elements of a sorted set are below the following limits: -zset-max-ziplist-entries <%= @conf_zset_max_ziplist_entries %> -zset-max-ziplist-value <%= @conf_zset_max_ziplist_value %> - -# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in -# order to help rehashing the main Redis hash table (the one mapping top-level -# keys to values). The hash table implementation redis uses (see dict.c) -# performs a lazy rehashing: the more operation you run into an hash table -# that is rhashing, the more rehashing "steps" are performed, so if the -# server is idle the rehashing is never complete and some more memory is used -# by the hash table. -# -# The default is to use this millisecond 10 times every second in order to -# active rehashing the main dictionaries, freeing memory when possible. -# -# If unsure: -# use "activerehashing no" if you have hard latency requirements and it is -# not a good thing in your environment that Redis can reply form time to time -# to queries with 2 milliseconds delay. -# -# use "activerehashing yes" if you don't have such hard requirements but -# want to free memory asap when possible. -activerehashing <%= @conf_activerehashing %> - -################################## INCLUDES ################################### - -# Include one or more other config files here. This is useful if you -# have a standard template that goes to all redis server but also need -# to customize a few per-server settings. Include files can include -# other files, so use this wisely. -# -# include /path/to/local.conf -# include /path/to/other.conf -<% if @conf_include != 'UNSET' %> -include <%= @conf_include %> -<% end %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/tests/init.pp deleted file mode 100644 index b9859818e8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/redis/tests/init.pp +++ /dev/null @@ -1,15 +0,0 @@ -node default { - - package { 'epel-release': - ensure => present, - source => 'http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm', - provider => rpm, - } - - class { 'redis': - conf_port => '6379', - conf_bind => '0.0.0.0', - system_sysctl => true, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/Modulefile deleted file mode 100644 index 19228ff3db..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/Modulefile +++ /dev/null @@ -1,13 +0,0 @@ -name 'puppetlabs-sqlite' -version '0.0.1' -source 'https://github.com/puppetlabs/puppetlabs-sqlite/' -author 'puppetlabs' -license 'Apache' -summary 'Manage a sqlite installation and databases' -description 'This module provides a sqlite class to manage -the installation of sqlite on a node. It also provides -a sqlite::db defined type to manage databases on a system' -project_page 'http://projects.puppetlabs.com/projects/modules/issues' - -## Add dependencies, if any: -# dependency 'username/name', '>= 1.2.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/README.md deleted file mode 100644 index 1eb43afa55..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/README.md +++ /dev/null @@ -1,32 +0,0 @@ -sqlite -====== - -Author: Carl Caum -Copyright (c) 2011, Puppet Labs Inc. - -ABOUT -===== - -This module manages [sqlite](http://www.sqlite.org). Through declarion of the `sqlite` class, sqlite will be installed on the system. - -The `sqlite::db` defined type allows for the management of a sqlite database on the node - -CONFIGURATION -============= - -The main class (sqlite) only needs to be declared. No class parameters or top scope variables are needed. - -The `sqlite::db` defined type can be used to manage a sqlite database on the system. -The following parameters are available for the resources declaration: - -location What directory the database should go in. The presence of the directory must be managed separately of the defined type. -owner The owner of the sqlite database file on disk -group The group owning the sqlite database file on disk -mode The mode of the sqlite database file on disk -ensure Whether the database should be `present` or `absent`. Default to `present` -sqlite_cmd The sqlite command for the node's platform. Defaults to `sqlite3` - -TODO -==== - - * Allow for sql commands to be based to sqlite::db for use during creation diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/manifests/db.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/manifests/db.pp deleted file mode 100644 index 8b780462e9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/manifests/db.pp +++ /dev/null @@ -1,44 +0,0 @@ -# Define: sqlite::db -# -# This define allows for managing the existance of a sqlite database -# -# Parameters: -# $location: -# The location on disk to store the sqlite database -# $owner: -# The owner of the sqlite database file on disk -# $group: -# The group owning the sqlite database file on disk -# $mode: -# The mode of the sqlite datbase file on disk -# $ensure: -# Whether the database should be `present` or `absent`. Defaults to `present` -# $sqlite_cmd: -# The sqlite command for the node's platform. Defaults to `sqlite3` -define sqlite::db( - $location = '', - $owner = 'root', - $group = 0, - $mode = '755', - $ensure = present, - $sqlite_cmd = 'sqlite3' - ) { - - $safe_location = $location ? { - '' => "/var/lib/sqlite/${name}.db", - default => $location, - } - - file { $safe_location: - ensure => $ensure, - owner => $owner, - group => $group, - notify => Exec["create_${name}_db"], - } - - exec { "create_${name}_db": - command => "${sqlite_cmd} $safe_location", - path => '/usr/bin:/usr/local/bin', - refreshonly => true, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/manifests/init.pp deleted file mode 100644 index 46b2506281..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/manifests/init.pp +++ /dev/null @@ -1,16 +0,0 @@ -# Class: sqlite -# -# This class manages the installation of the sqlite -# database. -# -# Sample Usage: -# class { 'sqlite': } -class sqlite { - package { 'sqlite': - ensure => installed, - } - - file { '/var/lib/sqlite/': - ensure => directory, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/metadata.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/metadata.json deleted file mode 100644 index 8ce7797ff3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/metadata.json +++ /dev/null @@ -1,12 +0,0 @@ -/* -+-----------------------------------------------------------------------+ -| | -| ==> DO NOT EDIT THIS FILE! <== | -| | -| You should edit the `Modulefile` and run `puppet-module build` | -| to generate the `metadata.json` file for your releases. | -| | -+-----------------------------------------------------------------------+ -*/ - -{} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/spec/spec.opts b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/spec/spec.opts deleted file mode 100644 index 91cd6427ed..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/spec/spec.opts +++ /dev/null @@ -1,6 +0,0 @@ ---format -s ---colour ---loadby -mtime ---backtrace diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/spec/spec_helper.rb deleted file mode 100644 index a4aeeae232..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/spec/spec_helper.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'pathname' -dir = Pathname.new(__FILE__).parent -$LOAD_PATH.unshift(dir, dir + 'lib', dir + '../lib') - -require 'mocha' -require 'puppet' -gem 'rspec', '=1.2.9' -require 'spec/autorun' - -Spec::Runner.configure do |config| - config.mock_with :mocha -end - -# We need this because the RAL uses 'should' as a method. This -# allows us the same behaviour but with a different method name. -class Object - alias :must :should -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/tests/init.pp deleted file mode 100644 index 520d095142..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sqlite/tests/init.pp +++ /dev/null @@ -1 +0,0 @@ -include sqlite diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/.fixtures.yml deleted file mode 100644 index d64f95571e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/.fixtures.yml +++ /dev/null @@ -1,5 +0,0 @@ -fixtures: - repositories: - stdlib: 'git://github.com/puppetlabs/puppetlabs-stdlib.git' - symlinks: - staging: "#{source_dir}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/.travis.yml deleted file mode 100644 index 1a4302e6df..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: ruby -script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'" -before_install: - - gem update bundler - - bundle --version - - gem update --system 2.1.11 - - gem --version -rvm: - - 1.8.7 - - 1.9.3 -env: - - PUPPET_GEM_VERSION="~> 3.2.0" - - PUPPET_GEM_VERSION=">= 3.0.0" -branches: - only: - - master -matrix: - exclude: - - rvm: 1.8.7 - env: PUPPET_GEM_VERSION=">= 3.0.0" -notifications: - email: false diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Gemfile deleted file mode 100644 index dbc5ead104..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Gemfile +++ /dev/null @@ -1,25 +0,0 @@ -source "https://rubygems.org" - -group :development, :test do - gem 'rake' - gem 'rspec', "~> 2.11.0", :require => false - gem 'mocha', "~> 0.10.5", :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'rspec-puppet', :require => false - gem 'puppet-lint' -end - -facterversion = ENV['GEM_FACTER_VERSION'] -if facterversion - gem 'facter', facterversion -else - gem 'facter', :require => false -end - -ENV['GEM_PUPPET_VERSION'] ||= ENV['PUPPET_GEM_VERSION'] -puppetversion = ENV['GEM_PUPPET_VERSION'] -if puppetversion - gem 'puppet', puppetversion -else - gem 'puppet', :require => false -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/LICENSE deleted file mode 100644 index 51fca54c2a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Modulefile deleted file mode 100644 index 3750abc30c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Modulefile +++ /dev/null @@ -1,10 +0,0 @@ -name 'nanliu-staging' -version '0.4.0' -source 'git@github.com:nanliu/puppet-staging.git' -author 'nanliu' -license 'Apache License Version 2.0' -summary 'Compressed file staging and deployment' -description 'Manages compressed file staging and deployment.' -project_page 'https://github.com/nanliu/puppet-staging' - -## Add dependencies, if any: diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/README.md deleted file mode 100644 index a0d3e37ccb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# Staging module for Puppet - -Manages staging directory, along with download/extraction of compressed files. - -[![Build Status](https://secure.travis-ci.org/nanliu/puppet-staging.png?branch=master)](http://travis-ci.org/nanliu/puppet-staging) - -WARNING: Version 0.2.0 no longer uses hiera functions. The same behavior should be available in Puppet 3.0. - -## Usage - -Specify a different default staging path (must be declared before using resource): - - class { 'staging': - path => '/var/staging', - owner => 'puppet', - group => 'puppet', - } - -Staging files from various sources: - - staging::file { 'sample': - source => 'puppet://modules/staging/sample', - } - - staging::file { 'apache-tomcat-6.0.35': - source => 'http://apache.cs.utah.edu/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz', - } - - -Staging and extracting files: - - staging::file { 'sample.tar.gz': - source => 'puppet:///modules/staging/sample.tar.gz' - } - - staging::extract { 'sample.tar.gz': - target => '/tmp/staging', - creates => '/tmp/staging/sample', - require => Staging::File['sample.tar.gz'], - } - -Staging files currently support the following source: - -* http(s):// -* puppet:// -* ftp:// -* local (though this doesn't serve any real purpose.) - -## Contributor - -* Adrien Thebo -* gizero -* Harald Skoglund -* Hunter Haugen -* Justin Clayton -* Owen Jacobson -* Reid Vandewiele diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Rakefile deleted file mode 100644 index 5bc13983e8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Rakefile +++ /dev/null @@ -1,51 +0,0 @@ -require 'rubygems' -require 'puppetlabs_spec_helper/rake_tasks' - -def io_popen(command) - IO.popen(command) do |io| - io.each do |line| - print line - yield line if block_given? - end - end -end - -# Customize lint option -task :lint do - PuppetLint.configuration.send("disable_80chars") - PuppetLint.configuration.send("disable_class_parameter_defaults") -end - -desc "Validate manifests, templates, and ruby files in lib." -task :validate do - Dir['manifests/**/*.pp'].each do |manifest| - sh "puppet parser validate --noop #{manifest}" - end - Dir['lib/**/*.rb'].each do |lib_file| - sh "ruby -c #{lib_file}" - end - Dir['templates/**/*.erb'].each do |template| - sh "erb -P -x -T '-' #{template} | ruby -c" - end -end - -# Initialize vagrant instance for testing -desc "Powers on Vagrant VMs with specific manifests" -task :vagrant, :manifest do |t, args| - Rake::Task["spec_prep"].execute - - prefix = "VAGRANT_MANIFEST='#{args[:manifest]||'init.pp'}'" - - puts args[:manifest] - provision = false - io_popen("export #{prefix}; vagrant up --provider=vmware_fusion") do |line| - provision = true if line =~ /Machine is already running./ - end - io_popen("export #{prefix}; vagrant provision") if provision -end - -# Cleanup vagrant environment -task :vagrant_clean do - `vagrant destroy -f` - Rake::Task["spec_clean"].execute -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Vagrantfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Vagrantfile deleted file mode 100644 index 9f9ac91e71..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/Vagrantfile +++ /dev/null @@ -1,29 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant.configure("2") do |config| - # All Vagrant configuration is done here. The most common configuration - # options are documented and commented below. For a complete reference, - # please see the online documentation at vagrantup.com. - - #config.vm.synced_folder "manifests", "/tmp/manifests", "tests" - config.vm.synced_folder "./", "/etc/puppet/modules/staging" - - config.vm.define :staging do |m| - m.vm.box = "centos63" - m.vm.box_url = "https://dl.dropbox.com/s/eqdrqnla4na8qax/centos63.box" - - m.vm.hostname = 'staging' - m.vm.provider :vmware_fusion do |v| - v.vmx["displayName"] = "staging" - v.vmx["memsize"] = 512 - v.vmx["numvcpus"] = 4 - end - - m.vm.provision :puppet do |puppet| - puppet.manifests_path = "tests" - puppet.module_path = "spec/fixtures/modules/" - puppet.manifest_file = "init.pp" - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/deploy.html b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/deploy.html deleted file mode 100644 index fdcdc34e18..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/deploy.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - deploy.pp - - - -
    -
    -
    - Jump To … - -
    - - - - - - - - - - - - -

    deploy.pp

    -
    - -
    -

    Define: staging::deploy

    - -

    The define resource extracts compressed file to a staging location.

    - -

    Parameters:

    - -
      -
    • [source]: the source file location, supports local files, puppet://, http://, https://, ftp:// (default: )
    • -
    • [target]: the target extraction directory (default: )
    • -
    • [staging_path]: the staging location for compressed file. defaults to ${staging::path}/${caller_module_name} (default: undef)
    • -
    • [username]: https or ftp username (default: undef)
    • -
    • [certificate]: https certifcate file (default: undef)
    • -
    • [password]: https or ftp user password or https certificate password (default: undef)
    • -
    • [environment]: environment variable for settings such as http_proxy (default: undef)
    • -
    • [timeout]: the time to wait for the file transfer to complete (default: undef)
    • -
    • [user]: extract file as this user (default: undef)
    • -
    • [group]: extract group as this group (default: undef)
    • -
    • [creates]: the file/folder created after extraction. if unspecified defaults to ${target}/${name} (default: undef)
    • -
    • [unless]: alternative way to conditionally extract file (default: undef)
    • -
    • [onlyif]: alternative way to conditionally extract file (default: undef)
    • -
    - - -

    Usage:

    - -
    staging::deploy { 'sample.tar.gz':
    -  source => 'puppet:///modules/staging/sample.tar.gz',
    -  target => '/usr/local',
    -}
    -
    - -
    -
    define staging::deploy (
    -  $source,               
    -  $target,               
    -  $staging_path = undef, 
    -  $username     = undef, 
    -  $certificate  = undef, 
    -  $password     = undef, 
    -  $environment  = undef, 
    -  $timeout      = undef, 
    -  $user         = undef, 
    -  $group        = undef, 
    -  $creates      = undef, 
    -  $unless       = undef, 
    -  $onlyif       = undef  
    -) {
    -
    -  staging::file { $name:
    -    source      => $source,
    -    target      => $staging_path,
    -    username    => $username,
    -    certificate => $certificate,
    -    password    => $password,
    -    environment => $environment,
    -    subdir      => $caller_module_name,
    -    timeout     => $timeout,
    -  }
    -
    -  staging::extract { $name:
    -    target      => $target,
    -    source      => $staging_path,
    -    user        => $user,
    -    group       => $group,
    -    environment => $environment,
    -    subdir      => $caller_module_name,
    -    creates     => $creates,
    -    unless      => $unless,
    -    onlyif      => $onlyif,
    -    require     => Staging::File[$name],
    -  }
    -
    -}
    -
    -
    - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/extract.html b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/extract.html deleted file mode 100644 index 0f46958a3d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/extract.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - extract.pp - - - -
    -
    -
    - Jump To … - -
    - - - - - - - - - - - - - - - - -

    extract.pp

    -
    - -
    -

    Define: staging::extract

    - -

    Define resource to extract files from staging directories to target directories.

    - -

    Parameters:

    - -
      -
    • [target]: the target extraction directory (default: )
    • -
    • [source]: the source compression file, supports tar, tar.gz, zip, war (default: undef)
    • -
    • [creates]: the file created after extraction. if unspecified defaults ${staging::path}/${caller_module_name}/${name} ${target}/${name} (default: undef)
    • -
    • [unless]: alternative way to conditionally check whether to extract file. (default: undef)
    • -
    • [onlyif]: alternative way to conditionally check whether to extract file. (default: undef)
    • -
    • [user]: extract file as this user. (default: undef)
    • -
    • [group]: extract file as this group. (default: undef)
    • -
    • [environment]: environment variables. (default: undef)
    • -
    • [subdir]: subdir per module in staging directory. (default: $caller_module_name)
    • -
    - - -

    Usage:

    - -
    $caller_module_name = 'demo'
    -
    -class { 'staging':
    -  path => '/tmp/staging',
    -}
    -
    -staging::file { 'sample.tar.gz':
    -  source => 'puppet:///modules/staging/sample.tar.gz'
    -}
    -
    -staging::extract { 'sample.tar.gz':
    -  target  => '/tmp/staging',
    -  creates => '/tmp/staging/sample',
    -  require => Staging::File['sample.tar.gz'],
    -}
    -
    -
    -
    define staging::extract (
    -  $target,              
    -  $source      = undef, 
    -  $creates     = undef, 
    -  $unless      = undef, 
    -  $onlyif      = undef, 
    -  $user        = undef, 
    -  $group       = undef, 
    -  $environment = undef, 
    -  $subdir      = $caller_module_name 
    -) {
    -
    -  include staging
    -
    -  if $source {
    -    $source_path = $source
    -  } else {
    -    $source_path = "${staging::path}/${subdir}/${name}"
    -  }
    -
    -
    - -
    -

    Use user supplied creates path, set default value if creates, unless or -onlyif is not supplied.

    - -
    -
      if $creates {
    -    $creates_path = $creates
    -  } elsif ! ($unless or $onlyif) {
    -    if $name =~ /.tar.gz$/ {
    -      $folder       = staging_parse($name, 'basename', '.tar.gz')
    -      $creates_path = "${target}/${folder}"
    -    } else {
    -      $folder       = staging_parse($name, 'basename')
    -      $creates_path = "${target}/${folder}"
    -    }
    -  }
    -
    -  if scope_defaults('Exec','path') {
    -    Exec{
    -      cwd         => $target,
    -      user        => $user,
    -      group       => $group,
    -      environment => $environment,
    -      creates     => $creates_path,
    -      unless      => $unless,
    -      onlyif      => $onlyif,
    -      logoutput   => on_failure,
    -    }
    -  } else {
    -    Exec{
    -      path        => $::path,
    -      cwd         => $target,
    -      user        => $user,
    -      group       => $group,
    -      environment => $environment,
    -      creates     => $creates_path,
    -      unless      => $unless,
    -      onlyif      => $onlyif,
    -      logoutput   => on_failure,
    -    }
    -  }
    -
    -  case $name {
    -    /.tar$/: {
    -      $command = "tar xf ${source_path}"
    -    }
    -
    -    /(.tgz|.tar.gz)$/: {
    -      if $::osfamily == 'Solaris' {
    -        $command = "gunzip -dc < ${source_path} | tar xf - "
    -      } else {
    -        $command = "tar xzf ${source_path}"
    -      }
    -    }
    -
    -    /.zip$/: {
    -      $command = "unzip ${source_path}"
    -    }
    -
    -    /.war$/: {
    -      $command = "jar xf ${source_path}"
    -    }
    -
    -    default: {
    -      fail("staging::extract: unsupported file format ${name}.")
    -    }
    -  }
    -
    -  exec { "extract ${name}":
    -    command => $command,
    -  }
    -}
    -
    -
    - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/file.html b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/file.html deleted file mode 100644 index 38aa0da55c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/file.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - file.pp - - - -
    -
    -
    - Jump To … - -
    - - - - - - - - - - - - -

    file.pp

    -
    - -
    -

    Define: staging::file

    - -

    Overview:

    - -

    Define resource to retrieve files to staging directories. It is -intententionally not replacing files, as these intend to be large binaries -that are versioned.

    - -

    Notes:

    - -

    If you specify a different staging location, please manage the file - resource as necessary.

    - -

    Parameters:

    - -
      -
    • [source]: the source file location, supports local files, puppet://, http://, https://, ftp:// (default: )
    • -
    • [target]: the target staging directory, if unspecified ${staging::path}/${caller_module_name} (default: undef)
    • -
    • [username]: https or ftp username (default: undef)
    • -
    • [certificate]: https certificate file (default: undef)
    • -
    • [password]: https or ftp user password or https certificate password (default: undef)
    • -
    • [environment]: environment variable for settings such as http_proxy, https_proxy, of ftp_proxy (default: undef)
    • -
    • [timeout]: the the time to wait for the file transfer to complete (default: undef)
    • -
    • [subdir]: (default: $caller_module_name)
    • -
    - - -

    Usage:

    - -
    $caller_module_name = 'demo'
    -
    -class { 'staging':
    -  path => '/tmp/staging',
    -}
    -
    -staging::file { 'sample':
    -  source => 'puppet:///modules/staging/sample',
    -}
    -
    -staging::file { 'passwd':
    -  source => '/etc/passwd',
    -}
    -
    -staging::file { 'manpage.html':
    -  source => 'http://curl.haxx.se/docs/manpage.html',
    -}
    -
    - -
    -
    define staging::file (
    -  $source,              
    -  $target      = undef, 
    -  $username    = undef, 
    -  $certificate = undef, 
    -  $password    = undef, 
    -  $environment = undef, 
    -  $timeout     = undef, 
    -  $subdir      = $caller_module_name
    -) {
    -
    -  include staging
    -
    -  if $target {
    -    $target_file = $target
    -    $staging_dir = staging_parse($target, 'parent')
    -  } else {
    -    $staging_dir = "${staging::path}/${subdir}"
    -    $target_file = "${staging_dir}/${name}"
    -
    -    if ! defined(File[$staging_dir]) {
    -      file { $staging_dir:
    -        ensure=>directory,
    -      }
    -    }
    -  }
    -
    -  Exec {
    -    path        => '/usr/local/bin:/usr/bin:/bin',
    -    environment => $environment,
    -    cwd         => $staging_dir,
    -    creates     => $target_file,
    -    timeout     => $timeout,
    -    logoutput   => on_failure,
    -  }
    -
    -  case $source {
    -    /^\//: {
    -      file { $target_file:
    -        source  => $source,
    -        replace => false,
    -      }
    -    }
    -
    -    /^puppet:\/\//: {
    -      file { $target_file:
    -        source  => $source,
    -        replace => false,
    -      }
    -    }
    -
    -    /^http:\/\//: {
    -      exec { $target_file:
    -        command     => "curl -L -o ${name} ${source}",
    -      }
    -    }
    -
    -    /^https:\/\//: {
    -      if $username {
    -        $command = "curl -L -o ${name} -u ${username}:${password} ${source}"
    -      } elsif $certificate {
    -        $command = "curl -L -o ${name} -E ${certificate}:${password} ${source}"
    -      } else {
    -        $command = "curl -L -o ${name} ${source}"
    -      }
    -
    -      exec { $target_file:
    -        command     => $command,
    -      }
    -    }
    -
    -    /^ftp:\/\//: {
    -      if $username {
    -        $command = "curl -o ${name} -u ${username}:${password} ${source}"
    -      } else {
    -        $command = "curl -o ${name} ${source}"
    -      }
    -
    -      exec { $target_file:
    -        command     => $command,
    -      }
    -    }
    -
    -    default: {
    -      fail("stage::file: do not recognize source ${source}.")
    -    }
    -  }
    -
    -}
    -
    -
    - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/init.html b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/init.html deleted file mode 100644 index da5b2be9a9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/docs/init.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - init.pp - - - -
    -
    -
    - Jump To … - -
    - - - - - - - - - - - - -

    init.pp

    -
    - -
    -

    Class: staging

    - -

    This module manages staging and extraction of files from various sources.

    - -

    Actions:

    - -

    Creates the root staging directory. By default files will be created in a subdirectory matching the caller_module_name.

    - -

    /opt/staging/

    - -
              |-- puppet
    -          |   `-- puppet.enterprise.2.0.tar.gz
    -          `-- tomcat
    -              `-- tomcat.5.0.tar.gz
    -
    - -

    Parameters:

    - -
      -
    • [path]: staging directory filepath (default: ‘/opt/staging’)
    • -
    • [owner]: staging directory owner (default: ‘0’)
    • -
    • [group]: staging directory group (default: ‘0’)
    • -
    • [mode]: staging directory permission (default: ‘0755’)
    • -
    - - -

    Usage:

    - -
    include staging
    -
    - -
    -
    class staging (
    -  $path  = '/opt/staging', 
    -  $owner = '0',            
    -  $group = '0',            
    -  $mode  = '0755'          
    -) {
    -
    -  file { $path:
    -    ensure => directory,
    -    owner  => $owner,
    -    group  => $group,
    -    mode   => $mode,
    -  }
    -
    -}
    -
    -
    - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/files/sample b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/files/sample deleted file mode 100644 index 01e34c31d9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/files/sample +++ /dev/null @@ -1 +0,0 @@ -sample file to test module. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/files/sample.tar.bz2 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/files/sample.tar.bz2 deleted file mode 100644 index f7fbcf229f0fc0c218a89c7de41d9b62ef6406b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 27984 zcmV($K;yqcT4*^jL0KkKSxQcpxd7Ple}(dp0RVsh|NsC0|Nj5~|N8&}AP@iuV3NLh z_QP%hk8;A99oghyk_A`9`rW>=fj|_X4_C92g1QT^S66m)g(`FwvCS>Z1&?_6NlaPMyd-g-IR8=y?rcN|p!=p5~A-$s;P-romz zj6*9uzM7tZdv_UkPOh~ygR#c3cDfE4RgUIe&34JvX5F-xHEA; z%_-*q$HPqs2m%2B0%@V5V?<=hrlSdyWj2bQ(LE{Yphg;G2q6SUfDlPMDt=V;GgAks zN2!o##AGr6XlTMg5+oBr1k)oafgY4SMu({NG&C9qqyPW_0SQSE5i$m;`VyYd#YRV{ z)714cY>}FSKn8|^pa2MxAP@uu(8;MhfSFA+%_d@sc-1x|O$|>deu{b~6VwuFLIi1~ z1WeFsX{myrq}4r7(^CjXsj_CI007Vce~5p#{~z7|A1`b0$TD}3CW0;o9}9B07H{VI zbHA^yL8V2bK%r><_@6h|&&G>eFZ+L|wEw0*W?<9=XV@4%{v(JDQ8f)w8&Kqm34(`V z&VVAMbdHTW_Lu2@Txb|$;C_#}` zsyj8H&k9)%ZRN02K=<}fIa1OQ1Wh7R%uj2$K|*}eok2?x&4icA7k0*aj&O7h5$j}N zsAIz^g1ci?4vjUfW~Ig}b;L6PD#1ad##PTcGReboT^6X?lZw=_dSoET$qNEIfKP-) z|L3nLC;0bay*+{8mpVW???eD|Tqv9VPq){r!D<9XbBJve`yHswg_1U36Pfy^d!T zUYi}%UGmW4)IyHR;B5Zbk3y37AniP_-R)JyZq8ee01eNl`W>dPkSBusEYo1`loB}q zRT)8V|T5N_^kL&sdW%uMx0X9n5vLtn;?Tgz(fx|xd+s)(D+ihS|@I2 zU9b?CC*j&PFQ{=OJNpM(Ll`|_2X#mC+fCY^5kdTeT7{inc{bIn6=_7KFMS)$R{~j@8yx*?@+unWzSq*GOiL*>wkhh^mMF~K=`WTH}wq371z1kI{ zj*V2&twE1}vhBHM4>=)4O9C~U7yzP{#fY%lcQhuPMlnbcf#xTtn*J-}u+&c~Q%gWa zq0nhEllmnCmuPfpW>2vBP5C742dQ~&pCjOpj$DnIVjSLg|0S7*kro_d1&*;)z0ya1 zvSnu*!Rr2_h_ zNQYxaizYPTMWM<3OgnZOo9Inw;pOr&j~fmoNLBB?BSqb45r~JnWg^KG9Py0Eo2?sp zDkemfGSVWVO_o}HNW5N-ZPh;%Ygo&*Orp^aYbcAY=5O;`)>sQhF{2}I$l9h*EJN(( zWReJqhdJTG6(UdI?pH;-m*Y9sI+e#*#`<1ipS8?t4G@QSal7iS8|ooZVYZ=4KV)6E zyPE-cIAA6;Sja(Wg=6gc?b>Q1S-+qjHSTOmOL0jH#{e)Jt)dSD%Z!5-g!$Ce41w^K zmiG5a#+kwE3xTcfFi{3Wfut?43mJ!y)1`hrfnm%?B6RK%&=7Kh{p?=~UW{pqs>7471V-w$b3-CmoCJgaag_ zDU9k?5!|u$;?ktQh}Xqu9iyl+a99&b7CEzlXz?)f=EgWdduO6v`NbJuMZx+b|4S?0 z);B6myiUv%sE<&Hg|F1meL#q|zN=zTJ_;l=GzukXXj&D$5oQoe%3Mb&6+luJDE&$) z-|Bbo?us?GSzDWg@ELlc>MLHE*qRtJl21rqm&cO)XW%0_kNvZUu|Q2={I5z9M2m>8%pDE5c`{&DzZ}Ic+N+TY%kfG<96VD=On0 z&9o!u1q@rV8HREVlEiMzX}s8KLlRiRv14)=_`7C)yIJzjF9+M_mPut4VeAgJ+uO^$ zZ;_I%gAn2nxxEz^$`ijc`cfoMoN5D38QUq(q+;UP(*|U)&Z$|%D$%)8M$(Wxipm$y?M+Qp1dp>lWb+;wg4Oax<^i93I|A!2XmF=jFcbeKlpTsppRk z;=ulKhr%8eM>VbiQHyZ=->9gmZ6s5RYd~PJvX3%VX?2SCK+K9GF$BA~BAvk@nGd$! zNUMF|PwBDA?ncgtJYNdafWIeJ0BfObNkYl#GyEhQf0Q4U1>kR(-# z6<HV7RcbfvU)cBNE&$G?;1;HltDs9}OYe8=DeG zJK@@x`z|)aBgvzhuIkAx#}NG5L_Sm$eCi%$R0>XE5;H}>E&5u?Yf$B5(cGR?d=_^5;<8G|qelTb4?+5frLqFh+BiF`qX8`G)dsc;TG#$PtWrwc%x zyZjT1zb-+B7Ylqn8hBOnJF%a>;^MpRsvdp>SvVV4mpmXm1$jFsS2+caD_~{boKdg@ zN?~7G&=eex9Q|ZtBb+aRTo4K1?1gaS*m0YH=>cbgGJ6ml&#_W(YbW4F>;%JjbME$2 z^7~MZ=#Y$swCBwi!YjbB8_RZ^DEWp9X~`v@lwC~aai$j9?QVhmAa26Rq?*t2k?#2; zdIRS7*boPzO?%n{pYQcVA74~4j+{j=#;g}fY({f33RBArehbtA?ydX0h4} zKe2~t9PN9$_jt_mM(H=i&@gm9knB4V$qOhC%&G)lp9|Zp2nOPT6p=`<3M;!a>*#Fr zHh#GXh+I?;)@DEA-t}KE*U~s7k7c}zo^{6I{ct|X@11EZud`brA=rRzRcuY|-s|T< z!W@~CmUY<6ZJtHx)e?v8y>r?#PK+(Syft!h)%Z$#m=`F%UY@6=#UmE|2<`jeareA$ zbk19XN`)=J-3(0g$-ILkuZd_NKSM5EF{Y4oAchMv-Wf%OE!xnpijT2qle*knY~w5l zm5a8Kad9hNVC;8R$qK`mhYxfXZdI^mMN8r1aGl_76}EvYkltzj(!0le!=xf2U}mcs zm=9rG7A7t00j>k_Emq?#s5tfyRMfzj@zukfYXM zVA(M2jKdH>p4ALA-I}nqp4Xug1;VP4n@~qQ;3pU&h*W&{^fQt#`Db(Y>yN)}Y5-Pn zy(rnuWyA#dhtDLz8m@V?~utT~N3CT2H*1l4> z?dLtefJ2>x*(mUm<#{Z>Ie+fJdLIcG{-HegoN#8yz~S4_j~RTRNIt&>)$u1ku>1D1?0D46e8J|l-%Bo$4;afUE7GZ%v12FK_n6(7NQN< zc)Ab8rg=}pCTA{1?j6{S9T4jxz*`}ZG#BFBPdr_LzxKP5&VcU2p4YqGuy$|>(U>6z zh{&_)V$bvnu={ovLBqOH4kt9RRDWWYfij+VyK<+cGxODOf^Iy%bM|$HrgBLaZeLFj z=5bHYNLE3K4jw5FMf35ok>b@3bGu!?XWn3q7_-H2S7tbyK!%^?841?IRgLkM(#d5f<&-#dL&HjR|{;&KgU zL{>lIg`@GVD+$6gk2GR+q^OKa4paAU>*Ve2YQQKJ`m}gjS})M-M0c?1)#aFu>V<9y zxU21pY=?W>-kfh(#*h;h;)^Sw8ByTh^mv;$Avt#~^UrxGCJ=Rnvd%>C`n?Rb1cDCq zXvr;;>-Itn@nWlGj04@)(fO7c5$5K=wI#;k#4V^xdPC`rNDzz+u7d%mPw-*1t;#(T z)Mi5Hh=l{)@l717=nnnb1NTgD)pde5&U5{Rxe=J|R{ZiCR=_SF3&O@UBK4n ze|CF%ZwAcw5rFO|;e{USaJH7(mJEnvF`42u)nA|&y$V3);|4?*ly0v~!pcFyli%F; zQ??5o)DQUM(P5#k&<-yCv&g9;=`S^}LPEn+fQjkdq|dw2Ond$@iQdzlY_-W)D_70x zalcJb3fR(}(EFKpb*8LK&9O!op+GY#0sD|LJrbLGMFoG_{rkR0E`~Gz1!+emZ29^1 zCD%9kV)C_8>~h2ulABoU1x|t_Kkn*3!tadYj-S`V>VO^Zj3tiM z7rH>G`)e;2@ox23sP6t{mQ!9AwR5`|pa617Jnc4L^c{0K?3wKX#@GxReAj8t*i@lk zt-Tt_`W^W|ejiWIeqdNLG_-nw&KnZA{GDn)Uju_dwvgQf{Np#e6ObgM^VV$keI*!* zEOB4U<6R#He7EDHAJa0?>gt7L9mIi1M2Q%ekPt*1$0Md2h~9eJstCEO>N#h4 zfrcO{i5zeQ?_qK=5FnAGMU{HlFfXa><6H8rb4{JBd3B&MikrUyg`6f4Y|?l$Z@_sW z=xDQi;y!+?-M(G;DKJAzu!s&ECfP#UJB?%dcj?QbX_uIIKf<;&AHB48kx4jR5^r$V2bx_3_PG%b}=XfzGX% zyNgso9pUH7xN;D!bdxeNDts}<`**MzRp=7zS|ApQYsqc1aA*3T98u5Ftgxk!cQn0Q zik#c{(3~!`p|X9lyyJ)NMV7>CM2H4ICkvd*L;>vXJ89+1@6zB{E!H@OZ2xgJc0we; z8i2kv)dy7yCKOk0YlRE+)JgJd$KN(t`#k6Nwy`#H^=?se4(h4c{Bd zPmBm6QGv{Y6K_!#4xWM(6Zcw54u&%Lm=D!+({(&Iw{F|FAcLY2aTj#9>e2)E1Ukv7 zXB)X_LnQUI`JsUCN)GzX9_JS0IqkY=7I5Hf+@?kM$S(&X(Q+thKB!Zj09@VhD{>A@ zyVR_75X(_e;I0VnZ$j@RRVU%>HSaJT^f=El2vF7#mJ$>3fmgLxm~8RYX=8Ug2V4Nm z2s#UHW%;gfFh%jI{WHXf++gigp1PU3ZDPk2mZ8>TBshg820>3*_*{xG9r1wTUw{;b zsLX4wbMK7MBS>cUBa7t=esmVHsBIcA~dfSX$0a33-=M?+l^4wmW zO0k_kh`?FVd0KKQM+0Q{ht!6_Yf>%Woko}(^G4&gr(9tRA{HP} zUL_ZKdvV@}ZV@Dk?VO?Ny51}u_(40lq%%Z{?jsIhv+olF3_mAwZlqV->|FOZqmIA9 zfxL^uRJH$#-q}!^p2ey4LbHZ|JrH0S@85LK1z@r89Rh@=**=pERFx5$tzQhWYrpU# z$1OC<#_AKJ>^P@^_FR^1U1P5ws?M@JHO~(KY%u_{Fa}FJaq8%<1#jIYC6Mo@WN3Q;L}Eo;ze9qG|DYA3yRhiZw%ru&3H9~fc9oyc^E-V68`jt z+XFfN-{q@}8!;+K>{SO;9;Pul^Diw~uhXx~+%hrr)}eZlKc{N;H%X1y&fsSNMw23P zei2yrL@^s4o7Gs{l^9Z5=Y^I`K-fPp{A_SlRze(hUFd&_#c`eW#}IunSVOyy!a_0^ zAII5q^;3Loo_(XK`+9ccdp61ac#mFnsb?=%`JLNeTu0%4|~(CGT~ z9J`kn-plVQeBHmeNV@`5wygcFLs2Ezc*9|jzWK11VfrRjfw3Z-i=j?&2ai zWB`vIDg!$8gbRq@WB`)UfHmC~y>x~!5#SK}(}^HxBpShGrJ@{{aOpTR>VSg!PWJmI zjE9J-2qR%rw+#{1(TwSvi9{Aip>~i`XQf{1WW-lrI%m9P0Em!D=9{)`2bfghZQ!lFAphYAoQ6tLjF(aPx$n@RK zu|1!L_0p#8!}9TD&s_lsAHqT#(tm&R;GmR(i<+3cHwY7k*qcL{6==BupT_&}5i&K_ z?^xRn9D@-;PQxVlLxXc^_4hzHlujlDQi5j7umDXV?=0jRKd#)11uvh|`rdlG!w-`3 zUX7r){9m*7RoujUsfOitr`9KL=^`YAcVf(XVYcLOjU;+MCt;m|p!1x&nEWTyKh5AL z97aowHGa7K=Yr;qUu5lB=W&cIU_NqagIGT&VOqsjlOadhI9VFHq`Kc82ZM~-!$YKq zk)A=fUkNqx{@J7Ipdrm!8X?Mo0--~Xz~{HueTCL-<<-&-L$}Xq&eN;2MW< z!EohOCP5b3sIn%IkV6>=LFS$nbC|J_*1fWBh9}6?jTx;$u+rN_qLa8zJ$Xj6gv6ir zLT>d_p_{$@tiSM|hsou}GWS{e#) z?HIu2pK+e^5Xd3|em{?Q=&#gG^O-L#C5ouW2F`{W(RdNP zbTG?V_5(-Em}9KQS;-9BQG0&z`rXqZeq5|eMu)^_%RSmbOyEy+Ir_mzR6qH-@V1hmJ2%Zt6D@1B^Yn` z`7yTpY^QCF?!8zZ-rVZrDP1=X+MB4w?ax0&|HpsH{XY*cKbPU=^M3w*zvbKA+x|X2 zKb!RV{yu)cA76W?&DY!C|BqLL$KB=g`n;Xp-mg!m)#?AAPovTFdjE&l5$lwFcXR#= zyyF3=Q+-ESqPwg3UboO$yc>8R3@_9aQJiJli zDoG#`h#>_=B8or|sse^80zaGH75r5JE7U*nzcKeX z0RSKK*cD4nNA{r5M)f|%8%gZZ&AqFTYgMoMtoF$B%ZT`#-ovKRF?y*Aek3UoLX*NX zb%{NwK+F(;1t^DTP*9L<-TQvj_Fv2L9Sgtt!|?M+e_>}2 zi(U7Bb<`U_!+VQ|Xh6#-?GOp0l5m^=PpF|n0Ch%{Cc#5c?%DvlAaOulG z-rRws0w9Q}EMW)!KTBvyVg7iKDM=ypajrMlj=BU+`To7{C%E~DIRy%YuevPWl8js+PwXu8Ej3UGK{KZU|f)Id70X~0s2Ke6DzWBq9 zN7y~?!;jI1g!#kn;OgA}O+*#Pk;XrY$T7aWDZ$GfTf@a6I=|r3f51-PCH)p^f^(X1 z3;0u^G@id$;servAPkL%t55gn;^vk)FPF2<2g`%Xg*cFWhp>Ex@E*@!+&a@oH^DuF zlhg3s=tTE+CxCuFf$#c$Bp~+>&!?b#z6d^FA8%myk8h{D)A9NHzfZh=p#F*V0s4MF zeLXvVkT3J+)6-?;=T~yMdd7bq$I(_YODa98(96G?|Ifad@$Ro@FmVs zoT8sRhn7nccSb-NyB^okV7a2Fk9ro+_vRgySFpojTm2GYFSollh2%$DhiXDT+oXw* zhqMvBuCVf|B`3c8XaGfPJ`Ab7`Tsxb$HzB}PY=gGFiM<5v%YSue6<_6GTvbc0rCzMy^Z5>b{~UO_a$#TQgYQBJ zyzW8>;g|KwepB;@?(zQync*+c`|q;S)Ivoht}%`SrG*08Hai@Ok|`wzDsUkphR+L} z&c=A#VAabuEbum}+jC&x7S_pHc8(iURda4w;@WaYWU7Uzk`~%ggBfg1jsu9G;M0*);wYs4qk`+qoql1n~Re=ccJ(IpPKKfciDF5O}_E7jfMNXy$@0;F?m^ z_WnaN4b^TEV;vQ#bV%P~-B~ayu?@GvOGO7Q4jdCB!U%SR zHxMcW-MkA6o_UrI4j^_emkl4eqCON#uHU<#K4wP;(?2Szs#-h^_&Px0(4bF@SF?8O zA4rz9jx*f!qSaW0IzNfuYM&0EAH*|v73N{lgBnG@h^OK7`;RcV?fPr)(elWXbDue2 zmx}d0Gc2+)4*qY2NT>D&!G%FogxE<+g1`CkHba$iINO6$f>@(0vM+OFI1ng3)KE5J z_Q4$U%(Yb}q%ktc@(YJJC8h~6fE+c~Qy(q4OEuB?%ddLM4}3CtPDfL7HRW$cUy-$VebRS0r%^-g5|vDV|!|*_mC=O z{8(WS%p5_On}uu*ZagF@T-E!Ck;U3lQ|EP|(#RLj5NfXQ9lNT)!dg~N?3c`?j^gsA z{!+5de?+eZ$h#{zf?)lO8wSjzIZYi#Oq1f?kowFv2<++K`9r>;HhI$LNK!09{db23 zp~8sr>xYifjrQe5&bHZPuUvymKXvz&Ca`O9(f=73B=5%xA~)On_VZ*qUrYY7=L^A6 z7JtW%vb;;(M_{mE+nb1*{Tb^C-UX=&NnV> z!@6T0SNkF;E|f3~GgY=x1Quqs!}AsC->bP&lRVn10gCtH-!l+sWo>A|a;p{Xhu0Vt z2JnslL(%b9P+QQ`c#797;bseNYh2U^wMs9a3$!dqjxtWN&{ct|*#V{tzgf&I;u{5l z%6UB9R_NKX4a44c^I1WS8;=HPV79n}1|gt;^VZ1QiuvntvdqGo?49o7();b|x-|w; z0S9Q^5P}^75ku+rO&{q4#U3E}GeH25%^gWRV5GSJ&3?CsCBIkh<2bBgNE!Y~tC$t@ z(4(yE{Ke(PRQL2b9{@MwGoOzd?|w&#$rBPCezQ|l^7u*W`gzU9`S8oT%fsCWht1{e z^zWj|{EqrY$$`uNpTPouVh8I_sgNK7av2XFA0`*q1;7vXf|`z(DBN`WWrOT~d})4K zUM0juan??EH<=h1nyLoa7J;11;oYc)m^Gv`1;D`6plWd-Q6G$^*#N(Xu>RP3DhBMP zLU1>Uy%84(eA0i&y~?ViTVsrxKX*hqUYp)(|0SUXJNE7RcVY?wk)j9N9PpR=(r| zSK2;bexK~B6%bGHpaI(fVS0Q0z3Vr?KqzwvGv!0Hsn+{wx|2?C-S|2cUVROBAAgS?0Pn|h z2+YxN5oFnFGL|q}ZdZ}w zB$7@UYk;oO`otyH9mc7W(f>@$r&|A}RJ~Q;3pYOvuU$9Kb|kC6325Cdnk$F--FOwE zSGMmK<{ia2a+bVuw>v3d1B%U-;!4@8ozndEsVg?cCeWAy5@4j7u2-h9zgp(C_KS=4jMaSd<{MVF3Y<4*%Lr6&&lex`P$3%nVl$qCX78a+;; zgcT}1WLY2avyX9JJ{}HEk2?5nom_l>P39N8m%a&r0CGBb_f;d-7mebY(%S>-deAqF zC)YW6*Ieat7Q;S`%Hzfs)@ZiRtqVfs56Z@@vS>Wqi`S>RJ?%Zud)oROIXO8dPo)f; zoSzpb(CW!{?v6hS(ZRA!n>arcqbEYt9Gsn*Hgragzna0p!NI}V$;r{l$;oRXzJHMY zmsujZ(30G9GW8-)1+eeQf|CaoMY1t9hsjwmqC$w9&*$e)j#DVccOs6xFhfQ_qhNr-fGxMJdH z)F3-8Hwznth_0O?rT{{iz*&IJyC|(Zjl@8_6)`dt)elHpfBAeZ%g2ZAmoE?Uj{BaX z0u(=d`O70v8t(LcUXR?^Q?J6k-*s#!Ux(GCW?zTAvFCN!&pGXFl;wnc+>w3>st37X zMPQ?iR>F(j=!?%ftu@#0}*1N*x6d;Pz2`RJx6`uHMk z2o8lmh?8>A58myq&)3bvbFQ9;waV?GL29C;Aex8(y8WMCKspxa!-YW|4lykwUON>^ z$UYDlgR2N2Qa~sZW9$I~`*+IYaYQH=l(5^~J?$f;i4ui0w0L8W1M7g$zhNiBfnI)& zCODucmn5L`W+H-$0M*J71bW6ENH}Bx2(eZqER+Ef93O`F*xy+lAn@jX))nRQv`P&( z3&Q}Q{QSKK%+jdZx^U}3{++$k(k5~MU0Q?@3mfU1Z|sGumMr72}8mXfJ3Qldji zq^dF^gqomeps|@jC{RK{?P~To>~Iex9r-ZB$0e-p0KPX z2&fAsi*fun73`s`2c72T4`~lSx3^Amx^&~j{=ND$>^_ZukAIDg!|P<-of-sOkwfxi z7y@x2NiHqk+oxAX)g}MvkG)(<*q|liSNe3wm?1TQ@By?AG0YfU`^G7N@TF=3ZqzOu zTXt#?019P_?QRFY?Ht4E=S3!@wfJ~qSib%o3V{y_PZ-!Jz+ojlY6rYdLZJro(~DXt zi|ouj*Q^NCsz50O=sK4iu}2!%DAA$dcw_R9U9cJ~@!`zVp-qjGuo^| ze;9ByK3>UKMZSrn=k<|cq~lR;;qoBC(r45>@CJ<6kwHmrN14;S&+o@SGaS#i**e@e zn}~}AKv+SGAVw-83lu?C9_ng^?`kOy^7K^pq37gzn?2{auN3LF#F8fCx7KoZTm9wB z#t9>8Br!8O$?>pzqYz<>V3Et5!YST`DFz<;avhD4L(}Su4@rtYVOYym;Wt{WqKFb& zvx+(ZA*2v#fHC2>&qd5HDCATd0%KV?HjxyGql&R&-O$dDMBq3r)vpR%JzhSl>pUlK_;coGG@W%hlgppXT-F%qrGm(8G=Y;?*IcFWaH+^Ms0QO>yHfJE0 z(u!7lk=wwaaWl$5@Gek9UDu~RJ(fIe8+hlh;j?l`92D9};7b83p$(Fybbp?~y@WxG z{oXU)mb*-$6ym7XPXpu7>@>?Grw0>KixS=5<06P|10&Bqhn0}1AjpPJ#0j}M^Ok}r ztYGpv3dgEciWzoMJpDcNi6e0s#=)^22Z=yn!Bn;t!-`L(v3dfVwxLybXJ3hgQw8GCB2%s*4|8wY9KXwzaKN6pDxZW}ugz3=q_j$aKs>7L5M8ht7Mif6{$_TQ%z-@w|t#rcIGkEF&Sg@!eNV zbDZ7`WJG{@Xr+NVtZiaM2q-9;klh7QFg1B-Y>q9$J$luj;q)&)IP-V=$LW#;fg>a# z5|E;%C`q6ohA5z>B%q{XNNF$47^=mB9g{#?HpLRfM9C!tRa*zldV79fM{o%3eU9Bb z`6eMEM3G4bMT|m1NkLQ;P}4+FQ3O!cBTzzLM!_i1QBy@xF(joW7{Q`RKcD?r?$ zlScT4oqRp#=fFRF1I7k%8(a4M#lb)695Lot5A)bNow{d{+t$ijsH&uwl?G_CQ-;^6;)76Akb&-zo+rzWdL+o zN8Bw5!UgO1d%gb!Plx62t-W8$z&$tLDSh1Bsoy-w(apT`3G4MQzv)#?gnc4qjx7HS zSuuLE z1tbS!_Us0O|B@djMF+@<{YIwlI)(x0A}jaOf3N*cI{1t=G5n|Jq-O8bZLnA~rH>rt zIC{T8j(m%B@5#-ljFoF89`KF{9YOn!zAr1*Awzt6bPlss8Nl%j}Q%>`8S64ig# z?1yzw+ZyQ~5V3wiqz~~*Qz9HESt$=@1wZw7`o&GE9dM#0sZ*_i~R`=dEiDcUbCFjSY(W0Nm}@r%s+Usk;@|^jn;KY zGN@;R^#{}YJiDRkEiaUj5Ay9C$y#u1YlnU3{y%PG;yvvI)g1uyG!vSLaAD1;0m?<9 zjTw>E3nAeZT38gpm{2-7xE=+|iWv%xI}04IN;LCkHyN{7?= z^WFK4bb;%L2!j?Ni7J4kq$-4{kQF-&cJW8v{vG**fdU3bFN>FI3PgJ?-dTE~2nm29 z2U~>$F&1_%_i%*jNeDWr(ay-Co&CPP3ic=PjSNatN=Zb8SDUpDGMS`8W+EgSIBLSh zQ3RI6%yhfgiCUfcy0Bm>0A$m$1) zA-`RNmqG8o(Ny8KVFA*l!&cw)5IC*@#8Y0Kc%R*l#m-vKzj$ym^XOxs8*!lqC<`C0 z3I&Om!>tVJv^c8?5KVyfpRN$a9$}5AXfayGxNtBL5ggkFT-c2f5Ez$F1qMQU_+ES-U~skg2w1+?#=et4&T_bE*Cf@hL5!3ZBw`|LZN!@xR96e(9sW%!JdSXu!waj=337N@Krw6PQ>!&^Ws{JZzOJO1XtnreqbfZm4tR-2k zo@cWcn8C0(Fdqik+f(QE??YJ)-SxKkt92f4*U;r80PqORZG9(V3U?W4BbQrJBT%&z zENxb^W`eAU+SqY|hza^3Q8WbRoHZ?RVj>8Pa3rW_QZrHzuwlo=OQ>7v1R`YoDDH|U zT4@tlrxFRublV}Gfl+EkQY5{wpmfCsA&L5a2LM&28WQq4{~vrb`Y^V!Mus1U)}XB! z(@~1cW_P;bz6IC;a!A@f2YK3F>7WsOKP?Jv0I?F`)a}W|w{(iK81OMPUyKbzjUiN> ztt1Q-o;wCLlSxUTq{vj!NRO_Z9FT_eS(q}Y#@NQ=gB!{~c9sdY9Xw@V+8YUF%rhGqRWjm(X|@Oo$kO9P z8XH+4+TKdBki070n!%?2yFpQ9X8C2&$M;NLqiYR?*{0gB8qkaJ-9@FvmtB(8m9-FyPX3`AZ;|sORZ_o z>dP!vl{JSdizU(+TCZ|r<3z&BdHvOuv1rkRA`NLBF$WpdLL9JcHOV;?kqH(fsl{Yi z7Z9O>%5L2OmU#~oncrxJS?T#iU*AL3T)^_Qq1^H034l6*eu0J;MutdmRLXui_bN$& zo`*iauzpCg(uDwC*%#&~)1WczG*vlZWc;!_8=;Hxa|MVs(l}|_P)D##Aj$3FvbjL# zHdXp5RN68zVex0n29(IcgSZa@)L2u&A#n@BsO^Cp86oIS($pPWFsuSUA+4}IJ^*tG z>>J`Pq4SJcoKdF5D%*ODB!G6H^7HJOzGvC`v$5ReK9|$U`Sj)*GPXC?z})+K zz=;~S8Y6*}X%BV@f+T}v>h8|F2Rm|LilFVWP^VV#Ld_!fS4P4Q+}EeN6G`doZeKbN z*D0~Wy6a?l*HM>(NtY}Z%)>?yEZAm=vZdH9(d2DOnvB4b&J%R<0B;^sAgW=|k-zlW50hV$rVNMfX^O?Sb2exewspqyaJ%V`@1on<69&)fCW-P7=n{ zz+|%yxFeuJNKqoNz&=3R?3SnK`_}q9!3@u4*xmYo=TSr-}XpuT_EaQo}*G0J- zI}e*v+qAtHcjp{~$QU@iVabNv#0x7phVZ89{Nr#dF~Lg*iqtyo-h9?WXR`nrNXZ%n zksDY}#PmWwJOlix7&?M*12v z(sb9VH{VQT>zVL(Kz+q`fE}*gA-5715L_UL;NLdlOimw%?AhdUcpyHL)$h@x^tsaL*U197%&nQM|#zz4*;W#6L;D)*Z#~ySZ3>(-*;Sv}U zBpHD!`5sFUaC_xayuD1Zh~e^ZMY3mcQn`DU(ar=SXFbmM#{#mCXmJIAo0^McGOUjM z@bzei=?>c+U^7@?co>Z16UB2m0$7AWNO5XR9iE~GLX^ID%QO;cB4PVhr!4f&<+rMA zXF9-rbOd5aU0}L~Y2qyt>Sa=T-0|0A;NCUgVUK-ji&{$vUjI92pp0Y4g_R!Bj4a>Ms~P&_caE;uwN* zL#Xc!V3;VDpHr@a8#|%a6>OeFMk6j_$e88Xoy8x<?Th z;!a?sc)V{OrKllbIF~OGKEeon)|(_aI?)z>TA17* znJRHU?v}fwV=3qD!JH7v2aun%uU&sx@K{ged7i-dW)HT(*Lq_G0FE8NRRru2>tov3 zqY@7@N|Ya_)h8|2Q@NKBMd`bnw;u@MJ)otM8XV#%NK{rBD!Yt`Bj+`jdnw>C^PWG&$f!KpA5P@7hBZKbab4KA1Xog9w5$ zpF~DeAqaVK20aY%eE8njFxzLI3~jBXO47!TvG2WsFbIdvgqc2*6F)(L1t6?R+un$l zC@AbmZ5-}eSeRgJ5GJPW{Q>=2CYXwYhzGI?Qu2f72c!=pvllExH>1eloR;!s>vZ10 z_=G!M8~<{}j9C{l$a@AMr6+1~4e5`LavsJqsFWfI$}ILqN1zv4@#%B9lt#Huv*?PQ z62)(8g2*9E>wa9r&1tu{i5s;R#z z(`lxCr-R%SdJJPjJs&g3@~kA{hp2cH=`KUVkVEpp;TX*7IpBwSFAtf)g03f5$(|^n zje}pe)oFd;B*q>eui#FC#jL5hDhO4kTpE9#v8{y>3Uar=4DU!<*R@8uH_JmohcI zM2dD{RXGw^Q5zs9u_oe2!P|<#gn%;>9G0pWcT8Ns?ocm~tY>#z+Rm;l}3sU!8<8gJm{fng*Eo z@}xT}dTXYkpiz-UFRXU7W8Y;oAer0Zrt~CE{0YU}yTB)iFS2FdwwYvZmzTpGIyM}< znZCT>@$v5oTqds0Zn!gcow8?c!5kmpl|8J;ez@4mI(LwWeDKU7uo)68V~Ak5$0u9O z4-Y3!+zZ^llX92wnmW+Nu&cZV{k!_fMy2@}gsJ`JI08)oaQ9e_b5+P9=)n;IXRT3T zG9e=@Eym6tSp}MtVNY9CLhH6@4i_!Req!zU7~-NcA)ghYdaeYH2H<;6Z&Zfx5zdq8 zJ`G}>_W{T;i%>|xLTOH+!_f<6|k7ZmQywd@`nkQ{iJnmQK{ zywg}sYn94R9E}#BC)ose0fbVJ`eWc7))^tB@$x?ZhrE5HAEL39pfM(j)LMH{FXU@5 zh*5(RAjHWe8M5}5s^z-jW1P*4EjlzBqAh6(D3%&Ci#1lO6O|pxoRg;$3Wcx$M@iR#xnK48tV4x&IsEm|AZnd%R zf&BzA9H3R+D$0a0{`?CHAYQ3M1rr0hkpn>E3P7?Y2P?FIePj^*aR!J0S-f=Sn4yGV zH;5n8`?9-=Oz~vTv-qWl{c83sO`^FF3xwbxfdC;PUG+lI8z*mgati?E9sh>bL4RBo zaU^6Wiszgx%<9X=i4%MSI2m;;QoRxxs{>>RQWlUq&qpz3N(uW6gRnpj-UxA6L{&NR z%Tr=~Dt8*L!tZtufCGYrKM6zQ3jQ(|sKEl@q$*R&ef4_F)UPB%u>u7^NdeuJ9rmDo z(Jvoe5vM{IhMVqcxgS_NJSL06d?S?4R#^!k>5*+$)EWC&4G#@9NAI;_Xl?is&(Yd5 zRw)jY9sP!wlUc7b3c#R}i;U#9FfP&-vw(@{ANUMFG6oq|2X_1n)xq_l$6sz1_7Z*| z_uv=A0Pe}ih<|zfL5lzT^t=bLzaca~s1+~^?(hz2@5o3*{SlB>Kx9!86-8ImoNP6T zqJpU)f|y{Yj$;*aQ%Dt?5K%V9u0{!b|Ig9}?a|pI`0vey*jvH95-ALt1is1p3>B;X z+ZR6gQ04rUk_H@Q0WsqKT9l;&%W6YyLx^;X2~b*vM5sas#Mam&k{f$fGTdoFR3Ygi zX%dElg`j9?Xen5brD~9>f*J;aDN>qgq$#ReK&FwQqJ$|5LXaW`l9Hln5`bD-XekOJ z8b&1|Xrh2=DGH$qR*FJ^pdx4}pokKgkf2%=hzg;igrt^WsA*V$hzfUyxF_+LgJ}EY z8vM`6`>&s4L89U7&jNW&7uz}P zlv4+wdEo9sct=lhUY!|uoC&5O>SiiR7$Pa4h$f-}B&muBh>4k&WU3k_kXc%Sm>~#~ zf+i^#PBDW8#xbgr2wQYNZS)%u`x!CRD2HNIexif2;wD`Y{ zc_YM-C{6Dl)?h!!`o0Ii3BsJ1D4>levJ8MS5{2R!{y8G9Bz}^*dt-4k)z6Fv$=18N zIDUSIxCc`G`xfcVKaT;WGrxyP==V0)KVO6DnDZnsmHY1#%}O7zVRF%viiL6E3CA_ayn*SoU| zV^+f|t^{(8>OwK^lvrS5jlP6sd-n!X5m0`1#aT?$nS*D->S zOArYilsBJ?f=HNfKFaYJ!aWIOs&IM*fRDi5`fg3&=2K80&epHQmZ5&XhMjOgc+}=_Kq(K=HDHUs58G2V@9so9RUUij07^}`?E0S z%yTIIqzFEv1I#ZxAYkPLqooAqoR_me+{EI*HSp56!d3rfRX%(w*Kc0{RHCITBB~^& zl4^DM<|gTcFA%>czwY^bZ_G8{IY7(59vTf}+P8*5`X8(2Tkjw6i2@A6@U7;=FSk1z zZEMPC(#WBl0o2X~-yQM0sKA?m9&4RtY}&;>26t6>V4AYGKxRU}d~uPFngMlvK6TE6 z?=B~w6aah~4$kyb$A?|ue7Ttr%t=N~xL3vU^!#Sopnx#^z;X{tbc_wVzmFB5MFJiF4X{6yM{7iU!?g1&NZbbbXA4@sVhB4xdGU>oNxf z?TUhwB>@pi#8S{xMIcZsKs7K0DM}P5L>&kIOm}TKYSx$VG?pzhL1S`gV9&uM_KhV9oQ5OPHXOgj?U%lq@mI7%2d>mDE9F_xN?#8Gcb$o5h9WUT7J)sSVARYck9bdnZV(=dVp!5~n|Gv- zX@`<OjTQD|th>S|S7(y6lDSVJ^H3p?A@5nLYBXYR!yFetOJs@83h$YMMfx=(&ss_EOBY4W%+9eVfX_+9wJRo;VloG=_SU1 z_nLX*4;x8!S%YyEUUr(EUq)Rd*G+T^IaS-G%QQfbVGPsYXRYXtTSm{G5G9pHMyJOr z#A0w7ipUL(j<|#)VJvDVSzc2xnIw8k1XjthYB6iB4-S2F;te$J*;FSrX{Hths%oPF zw#Ty;L7_q^$+?AM90@o{Cm3MNgwZuv!HuRjb<(w@QrRrWqg5<{ZyCU@7!8jWq>%wF zX)G@ybcN(7orGxE;DuWnw$r2v+{*3l`*241Zf$eRG`G4tLgT=5!UeRvZfk7BN$xo+-YE<5k>n z#xNd$bmJu|@NXr>U-`5OSVEW8XTpbvq2O`#p)-@Vq1U8oKC}RrD%Qrd9 za-sYn)i+QOk-3aajU+)q_@NxfMWN7OaCY(G&_pHNPD5lsalmH*Pj4R+;vM>HIy*am z2uW>ajjF1Y=ZWL|W)`+%iIbx#UW3%|B3Lyh36fbxF-2Akc&Zez(ep{zac%Je0q+R= zeWDCp*MANXEmai}R6lIu zI-Lwl%6@I*Jg@Hhm{Ydi7DKvqiMWZ|17j#fJBV)}{vL;>5l&1IgxC+s8Y)TK`W!%` zn`)$kX2_dcB5ZFNgDa#WJ9Dm*s5JBtRro9EXa7zHtWdwZqckUeO5S`iL-!t3um&7QH5 za0odzB&AzBN}3*F1k;>kB-8_r8&$#KT$UmYwwy`E$L|8A0|Fx9WPDQ=2uLIg${asn z0M)>e@ry_V4hj(sIRMf6}Z_ekyw7i$m z`E+nFvwIi)&W+JAW*uGz*tUd1(R3f%~~u7F|y~StR#kkhBF_Av&=qka%r6b$UR*R z#pWqqaU9}-n0H7*vZdi*n<_OG(5E!_JMC8AVKpJ51a%_Ya9s;=F-DXPO+^ese30Yp z@jY|cFxlJ?b%d&##>#Vs15-qXsfcPSSe787d4bbOtwl`%0TdM#6zf+ps;Gn%B|iTF zP6uU&HKD5`J2&n0nT6;j+d)e;YFM)aE!uZBqa&j6K7sm|_)X<4y-cH3<}k67PQha*5pHsGNO|iOWVrWD}%byx{?*2*rqp zG<7LCK1W1V=A2Lx-y~2_6F5v4vjRK;1@t*}t`*PcL%RLG&xHYY2dYr-h@Eoy+dm## zO?OgBAxHDK8CSeYp|MUyF;e^*TfcaZpNBz;NDr%M*g}>u4yKJ>N8J^q z4%jr{e}!5`!v{0Q3KiE-ZeS}zq)wOvNIiG!hc?hJQa!k1R@x4vHAzh(V-y-AP0A1` z%W!neL_pB8kEXlB7!6(reI>XiL2QF?fgA+@ut9=iq^hE!YH6vWf@FY*s4)c;5_bnP z;G_xD(qvYYTG?WySO1xBUDlBd%SlYrDAlNKyxi~iqueTic5?cZZd>6rWPYn&4R%VMs-PIz1b~&%ZGf4GlsOL|c`1QeNft$f_n5$e zV6hp82x4F$b->|Igt{~oIT7IQ#@y@@Z-BIg1@B_ij|(Y`f3kqUEFmKl5Hg2& z=5O4Fs1^eiT7uY}fPH@*(2(-`e!JY12@AU<`H)0k)VX5P224;ele8Ryl1Kw}{w{Lp zmg#V_Jcp534~&Up5udfhbYx9{(@WQi8Ds`3m~$~)+CpZPt64LXFv1sPpGskqkcU&> znCe<)hF8h}rFCuje6U-U5==0HKL$)YZ^|5)Tw*UoHoDQl>cz3Yj3FJ0 zluc{$e_9ZJMgqn|;tz9s!kR>U(O=c*0A28!UpMDZ-GZ0hI~j`~us)L&LR2EEBE}31 z3@CyIyu#DqYu>_5_YWwFhlKh5HAFLksGMDaj0~ilk=+>rleAv4 zlzUjmGH4eQF^&f13R=)YgR>6g{)^m0g#BtVKoo*13FY;Ibr6*wRi!CFpeQ003KfU~ zhK*?XWO5}!P*NxX;4>uh_ncL*f{|7Sa~Pt|bpjd*Bi4a=2yHJ!v=tICFp?VTxR``i z`!peI&NR{lgCC-m3Y#0N{l(~?mKOglwk(?hbcVe>X`?3ip!z{&&@3R`DxM;qCqQC4 zfOxV61uYDYr?;^3koP0H!vhsEiy$->(e~DN)IYZ9a6Xd^EGg>+qTe-fGUtj&q6CPC z?n$UNKTHqsczgZ!@AG#~Rf!K-$w%F?O%#w&Qc&KLyv>f`yKuGw7!Ri^ab$x{4ssN3 zhDvijdShd8)-@FKat;(zNKh9nUKqvO7HtnKU=vH)78+%N)Sja7n+Lo%WLOi&kR)v_ z(<5m6|8i0)Fnf~il}iX^R|t0_wk5*a;p`2R{&=!vA#^^-6d-CkbNP;b;d^2Qph?ys z+ED={hIBVTqd0aTup+?H6Tvjo=|jZSz=k4#_1=fIboKwBpQT>)JTfTZPFp74S~X825n^PXO{4yog)C52hxTaC#fFw_rdu zBKVyBJ{xrJD+aZi@u!Bcw*w1vXcK-5pTKo+aR_3<0O_xlQ7+KMRg6WWD_9rO zIjQ@KA+Q*0EbgdL#z`IJ0KvipWk8I`D^`>T$nWROJcvv*CE zSg4a4Ga{)SE@epKL$Hn{67d`9dc9rkh+&N=2i;m=CU|9*dxM`$Tf<<{KKY+w_N0%< zqxHjoRWcDpIF}m$RiR^~LkJ{{iGREyMT20$=}cO#tVDk(@Ct`+m$1 zKK>>RcYf2s-W_4IWB`m8k(1j%iSrWBR6-R{)l^aa-R5TO=q9kP8ke zI3ng3B$7Gm22XtZvcbzrROufRY{b`?$jJnJP01Tc`QR-4`eEl%h5*`esp5wQUA@aa@*psQ^k^%dvoTtQ- z)&S3uG<|8krQ$D)g3TpeXaFAQ z4a=~@2qO7$HymBWfOen?DWRc!{do0r47EKXR6fjjS_a7^7{ECRGtS^>SR0k;qb6Po zsv|qvR;qgwl%koFk)R?bWQd4@B9gzmw!w%fc?D`Nwn|AZ#nc+b!)H?v#2hkpa5=C+ z)3FVstCOs9cUFg;aCub{X&hW98)~jtgJi)AMI{3y6!jW*>xSKP94OHoy12zGRSvRO zR_g5(8ZGAC3t>O@b5#E?XIWZ)itX5sU(ser8?_iV8tw#C9gLw#7L4i^7*Ly_L~4QMDI`;r8hkSoa0CZg+KzFmR5+Au z_oX2Y18@sl)@5l zkb(xfb=uNj(w^d6rbnVU=B&ZoC zq9!5X+^%}{i0H|q5z$&Q@(wTs38K3gcnbo_QlU|zB?UY82Z5pSx?%_hQ8KN{hi!vV z#8HyC)3FwnTG>XYTUBtyVb~05po2w@qgL}DVBdlvvi0w5wTMA|3ZkGNh!`d2qa~Vh& zpF-6^3);Cuw1hOJUKZLYjAZXn!AgQ8EVxdBezO84^HSRVG5~(%HCC}30+Hv3U{nq# z`Mopz2%_x-0@x^aS#g=WC7^8rd&ChmI!WC%*DUpcIq>mLPPyfwrVz$It!|)PA$^^) zJV?|z2DpKabyP&vfrrPzHwCanhQV{#h#0|65=~@L96t{?o*Z%~O|N{zY{a0ONt;BL zU@}1KjEsItBy&-@karUP`?o;gP-r5cAOiq4k3D88yQiP)%yd|Xp$?5Wl*D?;x zy?bQjH+JzTH}upnhcV^}%yZYBu2oZ2MIo{HDL%L7NXn`fCnX1v(m2O zhhZXi28Wu)TmS+@_tSj&^(Z{L<)*PC{VS&}z7|d74#f zOL%AG;EWz^tS}Az?NuIx`jMQ-BjH*cX8@9M^jniJs$9AoG<8Z~AiR0Vfz%jMs@H%VNZ(?Ss-@421d$h~7d$}V z5mtOV|6egfg;qt!Adus=_0)HoaD4G%6ACDt?TvB(A=&Kn=lZk@3VQ#i{(t`eYkqu{ z?E^I4K+|gF&NayN2V5V(v6_i)M8u1#6}Qc#MLZx>K#*p9Y%22s zcWe_-$XNboEDVdypdq$&h8{7+9@%|_qJw*xN<0IyDIn=Wg1{+6YODdv?&=sp1|qRX z3@Ruf&9oF(DM`I1(-xM7~JMio5?EwuxiY{LbOrs!>i9sZ5QL66N?*fwfN*YvfK(VHt#-3RkTajQb6O??In<+p>7*RwVuner3_|_kEfR(f zPPYv!QxNngG%BLtac&=j!xUxFAP_=Lmy#3YY((rn$rU0YRbVS8HU$C+#eu24scO8< zV<9jskiic{DcTS*2P*DJnwjEk#jvf6;9m(&G`SDL!rOhO^^VZu4IMB%%&XvsnNI|} zC0DV67b6^HuJ4_>fNfs%o&x7i2@F!VLXEjH3!)C3ZUA>-LrUc89ylv9@DyS&bqE~c zoxyX(9x)bSOCq}`c=pi+o43|iMaV@6Rj1ucT)OKKf}V08>h4)Fj(Eo))20vI+=*B(jXRNEKo9rOhM?T)F3N7L-OJq zkg^PzzU~0zixZba2~QZYISna9hZHAlIES9ZuIb=nhFgP(kkCnCLNH;8h(WY#XSM4G z9x76(Fv%C6f_kjs3^9OBXl@zR#u|YDmd|N7$e|2`=|n9EQy#Jr=;Q&~<_O zj2Qr6@L=yD7>0;!9qAdMP)!&u8lWe5VPGwv4dkvGfufdi+XO8XL$W*melm3RZSd67 zbO&{r2?t<02Kecg@(wWrV99CxqLe;&XPCp^uVjv|Y+E&*nT@cuc>yFB>hkWFlih_bl#ewNX%T-#gZ_aj8w0+Qr<|A9c#p-To^fg`ZkWVC6xj;24sXedC4qnf(g9ZCyc6>*o@L)ioX@q#K2D5k05tZqbbk?4-T{1pJi zK;M=K5703H7-)6Gk>gAS{IFYsAQ*h!ak$3D8I3?m24mhv=%wwCM@uAjR<yEmZLc^qpAz#}VXQ3Bnhgcg{IN&DJ z6HN)U({1gAacQBTCQxdKOl69c*2W6e0j54k$#t>TFj^?GXo?F|V$rt4ENmI88xTz0 zTsT>(#O<>Yj1ddbY);waitbq8(=2dg2?>m{kuvxYwN>%`UOE>>z-ct!XHR}55`M@; z&5+p#3yq9^N>Mnz;P8lqpy-7{kbIZ{XaZUSqr9+GG%0OlSEZhD&3WPwu$~^{4{;x( zuSKvN!&tV6wjgLbd7mlv`wAf`P^ktI5GbOWGBgF()W0%vZSYI(U?n9TU}QkNQLLyF zZCi>%*5QCmLK@m}1qvJ+GA#+F?7fF$(@bfit z45V@>3j>#NLzC~NpF+4BbEA}iEO(qbon+awVtJCxZ$WRA3U$jPs31rp_R&B^m2VT* z=)9JN+ZN!m@iDN`pg*w-K-3a`dEsbp)kEs=lX+~SWg8aYGJK$^$LJgX&YtU0%?Mu~ z;reL0F#{h>kZcFM1J8VWCgcF?Fa~{)Cd`7SV6q?Biy>i_VU`D%*+>#df%xJs?aLsL zmqOi{rDfcGeqDG``Ex%Qbq5y%Q=;@T_*Mto2grC78mK{&z4k@w7jZBpP(nXlRaeio z_#_9`9e%R{%kz-M2j3MuwGsA^TUg&2z?Cp1uWJQdx>WdFmqW@JheVwHe9J;^f&8Md zkWdN|lwMAX0%2(HP#>T4n0qls@H2*Ruzk{(W7Y{uYY>MXVej_∓o7P|O5c_WNWX zjIYM_+7^&}WaltYM5cfW6+-ijjU!Pf(_+$5V!B;0kbn)MhCRu@W!!rJLV3P{{tyZX zGyQ_;*qw&sU0-Z!njso~jljF~Xykt(*6QnOuxhq~pp24gwi7x6A|m0tJ$p}G+4y(- zIy3v9I)fse4f*SH0y$(0w(A>{sBPmn-|c(60uVtzOTqVZV7y!m$q7ePSbhHQZXv&f zmi;X!3Fjv@K&3xy6JtbXT&z^Le4_CiQEDjR6GX|M!;4y397`HaU4M%f>SM*C2#-{x z$dM$Tw?T8erKW(OI7k?%p=nO=1qnF;@j1jia)**bISh;jTm=xIO6Z01+OZFXdFu7z z@-;CgFx>#ohPY-@Ct?l=J3x3ZUuVzG8Z{poz7odRdPs)Ba*+Ogm$0P~K3*kZb7USK zcbzVZTZq)-zgj4$$lMNpEcPB74kB1B3Rng-Hj0giza|JGAWRv3R-cSQLK%sC=DsdE%Uf}{xsK{l!$u+l4tj~VB0Y>`Z$oh6Eag`&x*ZNV7%^34n#D9`D_^jFEXV!fDhWrRk@N2oMDo z<=TsYxOUc_*T}e@k-2Xy~kgPz>P^ZB?d9#&f{Hj zk0IkHH%G=pjSr*CsIiAuhm?rsExX~dMOx&F7GZ{kPtA*?WTo0V=UQbLO1PRF+6!U)NrHUEfv2li4`g{4KJqq@J zkM{rZlP8bd(zn{|uqdd7Jh^<)*&fdGaUUO4UM#M&yd2KUD5U|} zvpR2n<2t^(>lexPWqgB2`t;+$UE2ZF-nV(7e)r{HPY-{H23NyuoaHY%f4JoTs1bUd z{uEm4L?_3uztunS?RWb3=R5enPP8w7=Lzq`?|Z%IGR=#!M*~cH>9jY8QMZ(b?VE`D5p+FUvf-iO1>Hlt!J+@WF_7Fm6}}dM2G*MT0CKB{XUpL6HyZ z9~~7v{LRZYn_hK(r+q(rMk|w~SJyPnN1t_~cuc>5Ua0NunEpqDpy7@p9odlfJjpvY zh5Awd?#p7Br?WELgP-G@SU#m^XlZ_Tm1S4s^Hyo$bYV;!N%;tmMvq!s+cK4p_ zJb6S+?AhnfI$yX)$JF&SE|Yh>O?crE{rB=^@W|*LPmI2M{PgqiW0@p<{&Xk&_%h2U zG51Z+-#y)V7Z;V*=on0=$vC2wdh+=3?#|~=cAixpz!dR1Ch5Q60lt%s!M934i{D@2 zyO%rozs2vEsP#>vwS{kKE9J}2YnsJSDxGd`6VZLSEz94wJHLx6RD{D4kM{b~LvcSH zrNbDUsXxpn`t3HI+*?|VqW`lTD%TUpM<`-}j={%_Hib}$>nzi=oscIxo=l(abbhyz z&S^0Cm5IFW+R+1q6fB4=9u-4eCu=#gHCf4BM&j?)4Dw!_$T z0`*aM2*a835cPpor_&$Fg>efz87AX#F^h-k^y$qELvJxlMl(QvT(Uv|EFnbVyS zoe{~%Jka>>zP!$t`Wa=zqOP+;`aC+Gj*`2uftq&*^Q%HAYPpfW&aa|3$&9X=mPUp# zos2vlmaAGi*pH6niME!q$t<3x$;vSu*aPb{l&3{D?eUg3w#U!4HaNRyB46E-KCsY` zJ&C7^WSk7?n1FPnSMgN0cx9(VFqtK^!P8;OVoZext!f3|C%)} z|7Y9FNnFnJ)m!>fzi(;gIxWg9zhBkLH}Z8`BgAfm<!ewy7*n~vhQcp#z!*|19ES*P6K_BNa*#I*e#DgMH!qGg2`F9&VRaTSMZ9i2tFIbVpE%F6Tb4uu zbxLIn7AbyhTZ6CsWjBB%vumV+RV~wUOqy}T@9#$CbrKO9k_G>A`+B!}k1AgnWOop| z2F3%POUty7ZsZ{^3s_h6A$PUeO;-K7=EA7C9~@ajlf6o&NzQEPHYNQk&n_?1Qk2=5 zO=6tfB;y^(%h5ERkZ$pM|J9L7t=D_@)D-U)*PXBMEv>{}T@x%z^r8}mkW12`;s`bj z*YNoduTRg;kIz>(ZcnW0;7gK}r_q6YILO8$?eoWM2FarMiL@Acf=NbSO(wJJxJaEX z;Sa1P|42Xk{r*ovMK-|0qw|9|$7dJEr>|F!F?i^K!?eMr1+5G&6Z+v7YZRApbeU(9 zh_qz-B94kAC&t)~<^}C7op(C(mrRnyd(jGuj^1=5P>TGd5078%pUF@9AT{N(y2LG+3I{ZI-`hTFmAp&5Nd; z!ZbnBI0VC0BtF-y~oR)8v-6lD$ z-rzn`O*5i9hPd9?4XdY&$aU0@&S@+aGE@^<=PPSu^U;2&ED!$p)P zN6VBk`%LKm|osTllizzXJa02fn!Jd zS6N`k_ybz;TN1-?`0xeoZ&@($(!d5pv$UacL8E+L)777*gJSl@l1xFONaw5I4<6}1 z>1cP$+pJsC!^yv3qp4|;hIg;yr+bP9^UItxu7rmhkBP|8Q~OkzH0m$Q~7bXx4X0R6Lur|&`s~`1dY>wn|!5>=?Gzx|48zz z*jnA`I4OzG)c3gf9d{S^{=r?5ZqRh0kR-o;`coqaV+H+P=xgv^kG|+6E>6 zGwu$$!+)_1vBoi>rlWY0&8MY18gx3#fXl;H-Ur{m7Zx{2h!vH?Yg#2bE3qzBna1FL z#AU(uwN1Y#m+4)XrCiyt zn0lJbm?*F2NkMGxI`;2yqZ2m8-^O6x$ECc6yOmh>WlW3|@A8cb(l2TCnXm&1We^wG z=P40UnM`|g{B=#YFJCu0CR|;l&qT=`dtSS|z3!nRf;*BKG9P}N?|vtoM#0xJ-^esj z42jkvevfN^rF6k>ju6Vo=7&&p}t{T26C(>3EkklVkuZOQ8q~gHR2=4*=}pPz?qfs67V3= z-Ef%9%A#(P2X(ugC)j{c=HaDwH)2KXAu*^RNflku;o|k5VDxyX5Sf(^Gxkx0R_PC` zLksH~)!vF|JEH4qR9urJRDf?_@)M$z8*K3`Nk;wX^b$urr!kiNHFyrK;fTfHsdgQ( z4`wqovT>Cwv8YDu14ALM#6&kp%G-npw@8Q?V!K4tn%-nQ947#sy*d5*&Cz*-zG6>A zuZ}K`-ZZL3Q~0bv1*5c>jpKWe2b-sG+9nBD*=U}#pg)7oCSqu+o*U2?t+409wl$Cp zp*eKDjLHjG@WhFl(+Nw4^luVDEAK|cm{*iAd*1fiP>SX?J`s@yx9f4VBa*y={T zEcy|T{e-@Xbdrwa+M6_BS$0~7#FKfvUN6G>@lp4?H_8%uk93t1qhsDxS)|21Y*;jK zdNvNYW$O&$yyMuPD!F-bHK&Qlns%Es`d;U&-XB<#PYY43E=dBOj)J3n%KCc4N!ABe z9pU4t+ER!(p?M8Rdrz3cg?B;%Os1erHMR75@)eWQJxL_-RZKFElCOKHhSg8Ao)WjT z0R9Lbuaq-qj+o$vBog3F)Smbn9q?6;tCUHfZ%Jyg(?=jl!sY}Py;A7Rbl2S`q{tQ} z@g-)j{27J}=P>uJRLWWO=z0AHMzwVI2wrz_*sAVS%0S=o#n|* znvoiR&;9y`NyjA`y1E)OGvB6d0Z-3KVPyV=X`A(f2{+{Nx=>q9R;`}yJui5;`{@ki zL#L=`^w=YE)Gb(SaTnG*<8#U^Jsr!PpF(o+A5vqBq)k%HbQI^LCcub5-%3COM-Fv` z;OowhpUY0;WOgta$dSAKoz?T$1dG~&v;`H$7li6*Y%q}KVj*FY!hN+yNpDfJ;6mxNM?&x-xWF@-vr^!`Diij5? zW18tCE9GI4UYf_d*ErrijJGJpH+#Qgyf8!Ac=y`Ii-*@4@1w@?KC7Fqo7Z_AL<3J0dS2~Z`_y!}RmWeg-`78qg_4v%DQ$(A$*D0yz zBDIi|BflJ<-8}7SlUrS3q{<*mL~^*E`Eo~hiK;I20loa#`b|WjZC;9}jZ5)Vm*VOF znM?6>aVeZ8N&K;-izpq|>N9?M;>P8Pu{`k%7RLtCCc$SLX6>!$Zy;Y*5MZ;IIx{g( zOw?V7Up6Ia*~vX|4!Z-ZO#z1_jV3o6VhY7sE&zTEQq^>$q?BK{c@g&;7jYkp2upe| zzCyg;pT^}E@>@|tTY(7LddHlrJpxmIi?;TI7FbCSR+29bcgGH{&?-4gwmg5Otz`yc1Rnd){!;n4O-=rxw=1+jJ-fBDQ0)L0h7lC-Z{MMSNTG^>v#p427-}?L%|EGS$mC|Pbm0U^LZRJ9>f8-i8v~mFY`;7ayS^n>$O;qAlOCNG!F3op&v)@=eR0hsPCB9mzHE274c2tPrNO%vp6bc zG`m*!=6Pvg zFr{Th*o?TWI5ehQ6b}>Fc7`IW%Zv0S96(HRbd?oqq?3@q{f-I{x>Cb<4)sV_WTGCe za-=47<(BX!PaxmIkV_ZUqdj7N1!BBgq&<}ynq)ndCmtl}fnb@e{)(3uq#Q3G@eQIH zpIpKf3Yiyku_uw(R*s2>(n*-&UuOnQc@dyuVOjZ%aXVIk{f z(9L2_+>#FM10|tfA#2fI{Yu%XMWJin(FHESf&-s;yxlA~I5jTQTZP|qeh}M!aqPfK zZu~C3WXB3FnAteNmFpy-ekATmyi-(Os>l_w$`o0~{211Ij(hLoQ*PJT4+d5y;cd3?jk`nr-BfocMdq4Mf{VuF4d=NW#l>|u>hwBY z4X>!)7uKa?0(DoNTIH9_BHeTiF25uL^|u;$g07#6VrtADLz%ZzlHgf;-1l)ipcdQg}#Uom}E4F zhwpjgxe4)oUZ;UlN$24@9z&I#$Bk>Sz#KUMNn(oN+bx3YbK!_El^F@O-=7DK?BhW8 zju_{3PM4?{gy2I<%4X(qpzmzI(GW^^z!yR+RT8^Ou|LwXoWAfATW|4#`AEyby-3cn zH>MTu)7cDr#SueJJHy+9gb1Iv)EqM$P%i@-Ae7%xb>MDSRcQq0x@I&*INrP`e3`38 zDqHf>YgBeB&yWB2k&lpYVF~vVc3!i1Z|OwQ&P2Tq_g*nW&dUtGBMC9#a7qvvNh*1= z%}%_`qE^{XsS{z1u2hR>5w1APjCk%ltf8iuK1I-?mC&BBU4 z#5BpCOc>VWvlf+@9USL+ZVJ8LtT|{}VN92xgqtC0W3?52@_$p?WfB`L(?tBh{t>xp*+se!f-%b`<2=hL7; zT3q5)2r`UTtX6EMdSR*sD^c**OnqJi8~oY2??e0+?)ugRoQqtmiWMgeQJZMF!gMiYn$llYETB(w^B`ip~wMAE!kFAx9V z>iw$t2x;klCfcpq%X$_76Ox{^t+wMK5qeC_3`R2qktm~yu2Y(CKD@q%G6NGcJb)Er z0JoxwbBe153T!qtv16foi0L?!$r#(Ga&#{XghIahX_KijNW@~Gl%`=im)4@or zN2R{7=&Y<$MKYVYYG5{5xnmb?DUw|TKHsPqUzW4#t}cDFD*vNG7URn{dKh0e`;E6E z5^9M^%jo1KPT|2D`ZqN{0CWgWQG!+G)pzI7=IQzNqh~uU+B^5lk>G8E!#0}szJ|sB zd>aX2ThUpb-H5p)F!Y@ry)rYc25lg57)~ne-kan`4ZP6_E^XBm@12-4OCa6)H&ixhJiA4L8^>nyS&Aj&4NRSOcI@I97@-QA%QxptBQ7M5 za6tD2l-SZ4=7e9xtnsUgF{|?w>E+|CABsoSV{9FgCdX=8+rI0Oz}dq9deoq};^}lm zf_K3b(sbTm(#pTY%AcCJ&k2RtE64bS>B3eex^HrD$vJmoO+tiQFvVwQP_Zm!M6m48)*&xnsy*Zp> zpvt27)|!r9^cQ*E4qqedK5S&&i;k)_FV4TQDO+<4Bo!)fl~q|fyYE)nWBrXLE?Adh zM0~rFtyId{Nqj%T?&V5I*^15ANrw0O(Lv}y4c{B;ic<%JM94!^@t|S&lo!3%oqMW{ zTh)0yWp=-3O8X67O013qspEc=lcGlEic7R^l`Dd|y5cIfH>aqI-#*SOLdhV(+&j8> z9n~@C@*EUZUdnvU0Ii2fEfHcZJK=3pkuN%u%l(iGu0_JE+&4{9X7J#{M4k&ZahK}4 zWHarU6`KX;Iw=zpN<{|@iV+9j5y=->QWq%vK{zbdfmZ#HWiT11OH`HY8Ou_AkZ{1F zSeK^5`4D_=r^&4+H%MNfMX_KES#>B}_Q;g!9-Q&F(HJKfUuG~H*m0KdH*x<+&?+xk zTxhoaKxY5JNh}a8TB*!E`o!o?vv{iXI&rxsMk}&a&PObcnIwlSRruQwXe&`g zkNCX5v!q9ex;x+yRko^)Q{w5eC*hP7O2A0+DxI28vx3sFq#mdN`zpQyCk17av*r+C zU3_8ejnvB{z=e)To0zR`v|M~6ELrh9B?+8EQYcz)hstcBMNEYWP#uq^h9UN5>S?&XtYLg?w z3E}4&lj4Uzns?u%Ky_{4!@J z{MA&iNH~n)HXTdq#C;3Mtrvs&eAj=jYq+lY9V} zm!)NCxq+s{ksHaDzF$qPha5E`ei#s+U%JLKGt0*5uu;C2CmK4|h2oSekTkn?)JT8& zZEyd)cX)Ji^!5J5k;@F?&Dqc)$@8gg$AlX`A`a+i_1H-j7WaP3D97>M(WovycXe7Vn7Sgy$|`FmBEbh zVnAUj04j(wQcoN>(k&vYn8S(2$uXT7Pa086DQ5#q6cWdE@)3v{1GEKLqEULE)1>E? z$Q5eboO-1|Y|NI7b7Gu<%kM)*L#~c%Y|kfg=}AEnQY`po27#tR{%=#FywsZw>3Yfq z=811B_I^p2!*H2A7ip2R{d>tQZ>328WSi6JA`Ji07sZe6bL5ZC-Uue&34T$ltNIBv z4~kB9j!aM2@p6kpY4XdP6r|k%hSS z#BkM7OkMRC2G7t6cXXeMu55}Oy})oJn1C7QB(4CqZ-}d$nFRy}hUVk!NDJ6Y?iH;; zY}J?Q#f`^lc`t^5(EJ2Tw#H5w+mb=+x~`dU&rG)K(UHk2T!}VP z3kn3Zg-V+#%Q7^JSkQd@S>hMMh~$tk7s;>Q>VL@3U}Je?d>Nt8!j(Fcl%NL5b$pX% zxr=yprcI&(x_8u{ghx4MJw!vnuC;kB&S<=6><%htJp+V?rp9sh4)mhcgG__CG1oDE zU&pB7Rtc}Jcbw7ihd9pX-#On&aENUsf9olx*7fL~?Vo?wc4!s!N{>0-e!vNE3$o4$ zpmD8p0(_gl;sgj8RClcX1klKqPJr#k8b?46%hCz>Rn*^1w$0YJ1dTCbhdM<_4SAqf zyYoh02dHuHe@8)GYY={OKsj;&0^x_33MtcdMq-&KHQV?buZOVsR2r7O1e* zNL&l_cTvs^#-}Qe$QO_rPqgdj>bMaF)jHK|^zfv_W1xjf^t#J|wdD60%5KUyi*BHw zJml)Ak>HNl|AU|zP+Jf)^5b(8JbzjzSa&()sOpZ>Ox~aaP2a#4T)A9qP3a&?QD|fY z$wX{Y72_Rs))VAHlQLwB!iFtfm>880q_F@-^N-WIIt@VK3T&_y@P}XKz;7Kf`%>4r z1JzmtgfNULhCKv1b%J4aG_XEMPnhMBs_{O#cVU$FSvVnpI?=zV$1(c-GL~@Y2El8_ zeOu*s>KE_OKYY{#p3$HoCP=V1fZ!Tr6ro$gG8xR%v7%}fa?%h-j9}w&I>_O%DkZ5q zOs1QLvGdTKNF`>yNAKBi4a`L=c)!*G>`NdAWUi%CvBa}0VS1D18A|Y!(M_DEe1Xwu z-W?vli8g5~J#1dIos`4v+52>RS`?$fmW$0p`=Fn*Zx7D@u)B-fVGiRLO^BYHC6j)U zZSfU%6Q^U76O`uIORs6ZFs3D=rRxXNQHpm)HqmZMABNbCW~6-Yg zDCo?)ZVtt?!g9z{^t1nAUZvdPG6t=0Lg+=H5t$sW3D?|F3`se zs>0uTw?`d#EQYR%(K~j^mUBO3IjfjlL_XZ!PqBPmHh5b85?~hpaF|KB2J)W z2l`z=!tbvi_uZ4mbR8;xHbsChM86UT<`BY`_*Z+3mlD4`P-bA;bcNlcF^%*=eC(+5 zE!*Gv;I!T7@aPTSbVskhX5$3%B(J9FKd_|KNFf)$z-77%9y}VHn{Vn*68yTbt}&+5 zvZ%3>%MSL#>3_s$pVAjztODwgE1&0=enDE8X);HvoG zE=9YVEoGOtLQ#(^dqO*`0=}IkE^w*Nr=XR(Ep}=(PfNd`-*^llPcEFq{eh#;L`+YBb~NXq;3t3M{Wkout-(eHa_)jZQSFEddm0 zfW2K&e-J+@bt-HCMHm?Pr+7FolP|d7<1p^&*oJwjUyy>6viKcFKl@aPSSYQZ+$9_n zsZSlKF!Q%8XHcg@FVx6G3|gIyA-F(~x)QY5v;B*2KD@M91_z=>)T|Qo{{U(8zksEI z$lF*NAB1I==85S;GdEAAbsWxx)nZ(Qi^8!x2Z(+?wwaY85x$>yqRpg#)sH%OarZfX z?(xq@ovkHKSk&`D;Th>FvR2tvj%MJz+Bpz6cTRCjj$c3x7fcF-(KZ)OLIu zcV*gdk~(nNE(g`V$jnc#v_jzX7w@xmfpc_&^n5FcOD=#NA4Q0C8=jUQ`1Ca=PhGN! zlGsK&{4mfM3WSVcYc>HNE#T)dYcE?cfv8)Uvo;Iwa#h@F4kqUi3ijBj?O3V^6#%;r zz8oc1H{nvs4XGuZT0NecCso3=G^Hj4M7!h!ZShX05~Xa}s%*i@lX9L<3zu_aUkaWn zyuF!0sd5Pn5vwf*6J6fB%2Hc8PquIJwx};zC|>G>@k%MDh)YGT#~2jNVsCF{K)T}H zXk-^=)+^#mhlWQ-2BK{?q{Wb!N&bxV$X+oY;`~EvaxvA2TG5c6Vw?hGKhNe@*K~_B zk7S8J7PRUlXR-PQ$grbmbD_1zJG(rZ$2*_3q|Ci+q(zrIL`8kXfWmn(9u6y3>q7^i}90F&pe2bxuN0rf;A;W#h1Ih#si zorXYZQ5@BE%4O|6`uuZWE(?FL4?#whXvl+yGK9rJBEaR+NA(D#B8j^VL)_5i+>nqe ziDt6G1&T#qUWbr3Vj-F$xRMwZH}^9xnX9B4mC5Y|StU))Nf;)FD`KA&TF`mwUD1!f zFj3(VHHvDe#$OcrMh#>P*HV_T)iB~4963S`EYRTt)3&R}j$5^67?w*ive0AQ1PfI) zV9xbV2NSM4zDHIX$8d95hV{WEs$2PZnywz+4SQz8%)y~N$`mC7aQIFlI^r##k%ea& z9AqgDxZdX%7C!8~bmM&SmrCPAr;~g8uBfYkCh^q@8Ytx9vz$VlRbMhAiFy*Wn*?G1 zOy*ZvB5Oa$h;#yyKuSoN&xbXYbas6yDlvyROETLMDhE}CM3+>v!QgHiU5PEwqbDIoa`~^1iJ4T@p1UV4Wwv@nyhE%_jS^n#K3^L(@-Y&DOsk6$e1zuipoq9qP z;&VG_psCCRST2^U&bIPJSJLw!AN|S&L{l&R!g=`k^$XWDeh`tGI=pEG%|kk+CH!4-^KVBTho4IYes#O3i*TWkV5Q{!ov zM->+**DYVp4t7&~C8DEB`Jg}mpNQom&!I3by%gf;6+dnw)0XEh2i%0e87b~<) zM)~b3KjhrEWk?n0q@CAbaM!H%n5$jDh2JYPj;dQ@<(FR)7pTm!MHu1jK;ms6Kp9Rs zX7Ki0t&(T^fYY&nFBVz5imx63!94Mt~Mo4>bn4ASRm~j5&Bs8ZdF| zs1CcIJqlC@{Kck?0+D5DxYC@)SPS&3@t33~X158Os5DlpIe@=qk@*6C2h~E$+g?&9J-1%^(q=ZJbPELz~$b z9Q>7_Rx3)&@=XXBc&1M&Sy{{vBm{H5$l4cUCTp;dS4QfbZ3jVv71Y)0wYvKt z>FT!x&qr^k8jC*lIN7$2NJv4t3tyI_jE#C$RGBT(OsICh>FcUoOPSS&M-j6jypFog z!p#+a%9pw4AEmf}s*$=HZEL4WVrvz|x&<-1IXcyre~lX(@TW|~JWb^hL0#wia%%3=++z|su|U-@XKvn=jjcUW$4UYr&|lBFXdp`l z<4HZ>2}@>nP=_jjgbi0t#pC{7ZOV6WB%tH~&VcBfs4uWI?&LGu>%q;PD5>wPW*&EffYWd?m1^tYOOG@ zU~{nvvF=bnP;pldqMC>W6d{oJd?s3Sb~}~IE~%UyK7Q4G+1u>- zAQ9Gz3slffj~F?gi+Jm?zKuD^J6}+BxyZQqq8y_e$LyAF`Z)z_>0XNtQ<7TSR6)rHmE*;3(v zmWP;|_o%9fD<1$6^TuFjF6Sj?p>Z{Bw*f5mk{Qsl6aGQ(`+7*(K98lcGW=UW`9z!y zk#DeY;*!<@*uF~q4?-NIShn4Ww9FV~7`Xc)0zkdA5DTNx5%Rw=c zJ`ZxuO$Q*Fc%8nBx5aQr8)bNX3jVw-Y4f$M7=%3;WC8IRyMo7Id+VOP;l z8K?zE>y~Tkh1Jx8QgOyX4XDHK#fjw}Z2YeckB+n=uEwJ{FC^9Xj=O$rzDFB*bI;!# z?H}5NK2Z+3Gq?;A!EK$JTFonO_ZGiN;yxh2O_5d#U#Ut5#!<7Y;x*x!&Gi0FBfSS{ ze0(*@uWQ{(M+_II?}j*vKB?5Q zUX&z8S;u(nIu3wjr-~*USec!9he6pyK{b1JSN!(KY}dl+;Fa2X7>BiZWWq+PGCziF zp>UiZNY~8pJ#rq3a?T7po`$1v$-$#cR!ZkOblHmr|v$ZfVxeLD^p}S-lprNV1R$9VD#OMuM#8xaRxV3&6%M$5_NK{Q78*Ms`O-8>SPkP;ix&nr)#E zd&vkJvb*!_dL#GI-HMDsmv1CFk>qLpUQ`d$S$NhcYF8{UT(v3TPzT_-*2AoapQE4P0neVD{3=rzdSxU+KOH#j1jRgCy@2; zs)QUcEh z*U^Ri4+;9=VDd>eatNeS+y)b9VRS4QToR*fIbQbIn%TQ&g6Im-BaF+a)M96bpv{Ub zG-Rg~TPR$ALOg*xfmVjOlY|!TPb~~g(YHAX3e;B@pZ2HepqOz6R20sMr0kvNyS484 zsn(a|B2<-XUX^dKcAq*K=jX;P`x&R;=lS$~PitW-0C-c7jc|a!IVTW@yhw2Ba^>ha z0E=9uAE)qi(<-5)C4JVhvfSE`72cIOqi`(?z1LQxie-HD?Zg7f2WiJw_bvpInpIUv z60{l}g`w|Q{|jA<`U2qy^73$;Ngb@)7DM2FG_Lu7h%|%SS9wUU0hMzh-o28-hS~Q{ zgXSb`*dfR{Uz>1Pf1>POIV5J06{*CsSef-etFer12gp&407H07<3hY|T!{B_kro}+%g^qn9s-;I@x0bjp2Ld{wjWU~d1(JUudrcB1 zc@bkS_2Lu$l#VqFeLSx889?3#gXfZ{Yxt$#FE3|Z{YW-h@LT2E5i5*NmUp%+zC}9Z?`-&Zp&GW=rHnpBaS5@OgOSpREbPdD_+VdH*6(bO*NS+ z7uS5=U*;Jntp82^9A$Hav&g55*1kk)NEfgnvdNG6gyrBqkN*DmZuIvK{f{KpzteL3 zUEtsUenVU)Lb>5$j7&@qzd=SQW)5wLm<5_MBS|YFB8S zIwp;Cb~{f;o1DV?_Vw}iJ<-GON$#5zmI!M(vtsCx;pz5^!B!9*I9no}ip^Y_*aAZ# zj>?b}+%J!IVLtn3XNUV2`)<691i@^HwHyc}T1IB$kI11odvgk1_m6+y_Z958QcP{s z>E0H`aO=jPj$uiwjox7&@}aw(!#T>K^kdCD-!rTWTYxc1q9kpV%zI$|0U?Zd_Djp^ zk>r#=l!8ORnN)onk4e^}M2y=+ayG7Y0JrI*KM;%UMVg8z6T}C9P`7%(_9NvbA%o~x zlDB@&m6bGS&Dm}7Wif}sj=#2d`#W{q6o3q~A@0YUtS4EIE1F2_zXA}z8{asPa)+%1K!aP(Z zxzIl3oYH=8;|UT1TPd%l>KMQ&L1Xl9J2uPq`S~}fY3p$hGB%}zgs;W1fPbM9q6mfjW}rfrY^K2@ODSv{91^+F zjWz(g-?;G-50n&94D3Vm5+=?U4G#(=Ys zrRZ1!G{i1FtK#w)gZ%pZeE;k?+N6JbudNoumQjg!d0~j0!3L=ULCbBJn%~iOeFsHQ z{W%VAHc2$PBi9T=1&SoW>5~&&b0qDUp{diN?7?@kR;so}(_2bv0O~3XPVmP$z6ZO5 zVQ}NoO`6>Hqa%;jVz`)91ldVEye4t6$ANyPoVmiXi@hS7Q3HuI+RlH44qa%H5T(l$ zU@cV;{Q=(BDj-RYt#tnSZ9>8thOsb<_~lxP@X`0*SJ8pCR=H)=Bs0pw5t)S$4i;8- z__oljx3Cm+6AMU}+|BLrjmK4=EsEJ#$dfpl*nb|bTH($+ap~KsI#8E!jwE!GXUjAv zWqe_)2`XM$K%tp7;9TUXBQi>;Eh^ctZ?1@NoA9(KfD8y9n5)>msKMEiWdG-fR{1d+ z=#}{#lgD+q_?fKml=F#UFExM8uRc>+$f$Dc0D@uQ#y}j7-I=B+Gx8YcGdU()` zCK+&`tUEEcbP^x!>~`tL9$)5%=S}wwKD{`4E>qF`^HL-9 z#`i9hr1#R%o9VmMrvv-qdys3~G9WEqQyI2DHt<)qrclFIc|36p$sis`(N2nj*DW3k zlUb2kfaQ9}*Y0Sv`Djb`NETPp91ymbeULiXL3u|-@d|5VKQNz+xk@kRs$$KQXwQim zW0oW>$Sa|nfp|+gnNNI%5I5umqyQh((EBt*N7f<`s5q=37G{WxB%LKj!5bq9SYmQ> zJ#oz)@wH3bFkKk%5z|Yz>8QM31=%aB%=3%{3j%Says#Y0wJnw$mzGRo*!&U@YtX|q z%$*cz{*7~T-b=R1x2hTl1Q6fV5>`#@=zTiQxN%Y>Cj9uT4fRK-fcMZaGDA+=xRNHn z4j%HcW@cn8o=1B-JKqvZobXERe%(CfTw%NUrnzA&qAmju84(t9XW!A)^yy{CAzolktoV zZtf=WU2_iKkZZ9a4E&R;^bGFB8U8Jd!96EYW%CKx!jC=rr6IfYobMU$SGLrG+*dE) zh9hoRzO_=PVeYw_LN|*oQdGRpvGNuPL{s4=>=2F+N;C{YDtv9~0pdf7d!U?%p}5E# zdKxda3=Z0GhD%=ZnMk{d^PD6v-FrBk9D8?3oM7fe_;=6sE|K z9nFWlod~Ew3gJLdjx6~Ujd}T4O_{NL?tmI`ZE%%CgM(buKc<%sdR9D0&=bPGuUF+k40D)7>} z2=TBCVra`5NjHc!V9-}s0y$#-qLLo6#-YfEvld~(J@#o2g}Y|favfVx5@W*A?UK%b z;#h07{1vCl3^HwJN}da4u4ZY=&XG^zw963^f-`Tpit~Jw9$o~}8SEOsx0V6fL+gqg zRDnp_C?1gBHJVR4{phbQR9Cq(%gLz}Z>M&j>{MQdfv#Ha4?%9bE~X7KHd=uC_Q|h_ zY2yx0v95Gs<_&;4ue>?47^+6J!aC6pn~FA9JoT>fROUj2wkmNruz_wAF6>3U5@1UV zI#O2+-QoFFO90^=&XSRE9B-+1RV71XoR%lxc&5c#@=J9VHBP1T6;EmN@s^uazT&~l za<;ka9%HB_#Uc)o{H!WcSSPp?Ts{uKxDSoo^`hN7wJRQF0jbnEqM?odd zOiS!SZPTK`#OsloDH{uSlhslw537YUFkKdi z7@mYxIJkN{X*qMLq8Of`1$UveiLmmptw0}kq^mN8_`UT@eTl>27>ybsgmaSXy8;uU z>Tk+Gy|JXYTU4YJV90Y|$JPMxsuRGK^o~nE|CV6m06KJt|&(*fM1 zdp8@;5pfRx=a``^w(RV3V}bSmpb9zc*H%1sDlp-O4Bnh^Wa>?3T%6dy-L1{xTfstB zm&>P~v#G~prt>hCE=XYlc6rUb0mxK z(HV~Cf+%5W|@<1AubX&i) zV&ldx$|Xaq3)^(fmM#p*MgPMA67#FQHQ;Gap z5{V!tRG&~78n``)Jku+!iuWoV=2?+lini-vHZ`OJh%m8_=yu_tq@GTMxx?JASQqA( zgZN~TTTd2EYS>n*psTj|kroxy@;2g;U3g8Mstni7Zh)}zEP|7ck1k$DqdcaW@Xy{L zPyP|V?-etwZ4a@>y`9HE;coC2SiFu(n|}2aV*^I8?CyREHm}s=?`F=$?}iky^buDS z`b|+{8W{Fz0>Lcj-^GGeNN#2Dz!E%j*P|0NP1to5N0-pldUHc23H{oLK{hnW1!7^# zjJb=UABZVBjy8Jp=sB11Nv0^YWsG1&`3)EFPp?_Y_&kABFWG#m%6uZcsuo65iE3`- zHI;bhwZu=o$b4`(AZR#D9E|*+80@K z(9;&@OZa44l(83HKoRv)oPa&4IPfCLx? zM-o4eK$xm?#tZy{Fv*!(#(A0bpn_gakV9=;{>LV##oZ0bsb<^S=!!3bHj9!W@%r z`Y1|4A5o{VecTM*)d%Z~MUm0-#&+$MmoJW)bf8 zS^sg1Z?HEl$1P4IJh8UG`1<1HRjr&@^TorYMf&3S_?%@$jS)66k%@_9#iWFoLcf>U zFdHMY2Tvuv1RleLjS#>g9Wx`ECD}}~Kph)V$VuEIsOxO0@F{~4L-bHd=Y1;qW3KYg zf_-f|%5t_(2bgXEDV=ki3%b8&L+*7ZK_|R6U_BB6&MssH;}WQKV;w6NP%{8L;N4+* zwHo2FP6WjOKBV-?L>2z^+htC^8BE~(@CgQ3g8vR8R@QhJGt5biV(Z0g{!KFa)sB`` z-U?w}igJ|AO9#q`TV5{sfBp+x?Z=P*4|{c8 z8-D8C5VK8v&=S_-O;qi}`{Wqa+2S036QE7)Pv3Tz3Hcr&Rdb1ielXI?0~@zk9*p1MVNrS(r+th052v?D8v z>A)8SIe}~1lFWH(Mnth*2DqN#ccSB_rxThr0 zOI;nat`q5#aZM>k76YdOjZ$)=QrAz#(h!0&cDzG{a!| zGA6wusUX);^1B0>$c!Aj%*ktyAtL z_VB)%(B_XV3neYJfCob`@(FX{W{QofZN@WdDV9JxhVycp9nARP^!4kb0}p*JrQ20F zaj_mMCP{XR#uBP^!dw`7ADDOBs#=aXbrayOaX_&{CCa zVQadFR@W3v`$^ORMr9|AA=1cFdz}_7m}#gDV3RiAPSZQqzU%H0H{#<)QuOV&jCJ?f zUVr!L=l$KC{%&Q=>=1@WHyCTvcpx=3jmQCkwhU-;-wz!1OG8p;e$z;Ljc0Uq_defp zh9C)-^Hr(WCMn@Tk+e}mk+k*TOnz$wk~1s@CS253Yfk|U>O6+k97$2Ev>99smSVwG z+bqK@tk#BpU2fuKif47R;XjS z$fTMgBR3L&=~SlHD@r1$wd9)^o5XZy^%pqJnwG_`i##pfV-lKj5M-9~I4q!k5Fq8X zSf#+To2^oKg8A_5I;VlGjYUGA%Ny?C1kf0tJdPWQgO7H0Tc#=xHAHIgrD@?$$UxN! zo2@m2_nz)P^)-X>7Y4FT?D$cC&$+aTrO<54Nu_glt&&z3*zF4lZI&%sJ{vQsxOa%mzkyIhEpnBLh1~VDk ztsnXYVwsjlIMNTK5TIDp7AH}m2gMUY0)rT>z4!6qp{)%yTaDhL*f=I?R-(~cl)QppSe!)#&7A7j$0R(Nzwf?{!u^@1R$#S5TEi1 z=BIu`S1-_j^d%LBV9kC&S080B-%c&-%8tj(C79mE`BW>fE5go)u6WGq?97FnskW48 z?n|ve>hIQ6ho_z2kOWefATVa0atJbe3AnF4yokrkT>`isSxbI&_Ub{PM ztjKPE$F9G-dk$!L4iV$0=3DTsl`3*B9bPCjrqj04AAvtjqs{}IT1nT91*SGKpqAa8 z&v#Z~60uHESCN{uTHKRjzrsLo`(zzM8Zh*o-+Gmpz_>7VqlgR#wCm#YzEM zW4`*}Zrh&D2d$9L^32+(&#}GRd%#K6E8`-uX_8O9oERVz=??SL0aaqCY>m-Y~Xy?8j0r~T(%$mC-=72j@sQcB&i-~7xT6g1)|%*QKoa{ikzH-| zZmfU7_~IT+#OEmVqJUA*HzSrR&TTO6jW8%gMgdG`u~|je)iw?05eOa<86$jcDJ-TN z{VXWgmsauAt%WwdS!{)aaZ|VY?tk9!HYrKYG+c4Z$KPrz{%w=!FQMd0MG|v0S#=Iq zY+7E^I#dE2=aGk8ar%Lxoc~}MK@84R+)qmmNnj1y3b0};J*gCH*~OnddFIXH^amd= zI!j!ASyR+CikXAPYo=i8-yj)FQhY$cg<&VPYS@Z+ON$)8*F=jr=)GYZ5uHSI1J~Z> zzi&A}3nL@Ao73q$sbIiZ3zy77YSMG$IxDkT6kCZK-N{cAusF(r=0tZZzx_+~q)R;hV*Ls}P|7uoMMN*{;wmhYklO;@I|+2XqP!R5OF|?| zAI`Y`PnJiD((RKJuvssiQ$uwmGnFD^!Jm$rAwM*fWO#j*HwJ_80|NOFH6(!ViD)EG z+rGM567u@-p%HBm-#7^37y0CQj_ls@5}rOS-{|Aw=Ba!nRA4o)vB|&_vi54hk^F*8 zvc@zjen6sw)>#icZ0n)s^`Ou$H#0~Da=j|dvK+%x6O7Yho98%vNqPZ5aY&G7*7>n_?@5$0FA1A z*S;X*sR73WOU`o<4Q7t3kn)kn1qRJ~Z1!1}PA$`o$s!n!J=8eE$@>=LBR}A8@psL^ zPE3aUhV8dZN-a1pM7FZk)yCaEHVu1r+j#cq>*g`i18#(2H8O`B0Vz~QbJ-G7+%(Lb z3luhuRGu)LYT4uFq3aud^m3W_Gn21cXYFL+P>m9lk5F<#%y;D-8PQsMk~bPP^2r*k zf*$hoLREsW*7)L~4>?53z*=aWAMmTzHpY;=!(sYmhoA3$dBpw!9d_4O(h>6l)c0nR zQm)Z79b+sHW=>G>#YwcF2vFpD?a|}CXRBHi_|%6s*`w#{+hdc*16zBB5!N@y zt;k*xxc~|e4;xtIZJdwRUDKUzZ?|bt*(!p;Gx0!sB<*AKnNWmsXQ%rV|JJSb zBU_TnWazcEyV#|scb`4$qN^vh+j*OL;}xFv$DpX6OMPH2w5}Hs5IrNGVIHJWRHN9D zCU=_ z$^$+5N)A2i(|1}T1z}qYokb1_R6Eg#RX?+hA}G6I#=B`?>>VYBeQ#x}?LDzr&GVI_ z)ek;7m%{^K7r2dc4RYnY9OFu^Dv_qJD`r_xLqNg`MjULW5D3XsGAVudvJ}41Nh&I| znQyNWksbvs+4y7KxD6YXIixJK!M9e;EwUbhu~*q0*_UWD2!dk539Jx?Yo2KoO`rKP z$WB(=83>cRlFJZ;W|HXq_pkgtV)T2i0_d{JKw$&3uamNJQP#-B)G zm_Zp&W;I!R5}Ri5jZk%bP+9yw%#CD0KnQ}K}hP2Ky zIHrtyIM}iYr#lIB!JHc9GKF1Q$J-@9leVyiAh{8dTP>5XKD-{PpqQZ-f(E390oUzD ztsu)iEi9`yi475eD5<3i>&isU+aynX`V7a4W>SxRv8Y}JAX2J{>-96_jB_!rH`3kG zLe?x7jR}VNLE^~7fmMO&c6wRV>ntJ5R?y_KniS>!VnA>kIy4GajN7oC^daUO@b0p6 z_xW1MhG!0RYe;j0=&!j=3roxSS}qH37N>a#;py{h9Ou+ZbrMOwS!@{&X?=R2f1$S6O9o)IUMYPogw&%atzjQJ<#fcfu4~mQ6K` zz6k1x1l$$Q$At+9g$T&ebBt4}TXfBd`S|W`p{5-Uss`MF1Eqf5{@WQ2BKd(&3c#5mI&8MZsw$*+|k-fOfRQD z6W!9}udYtmn{IHdGqC0=~L_KAVx_~MUcR;oB|Nd3I*Znl+6Wv}KOu9o%JDOnB= zfZ_zNRkXaas;#G89(+ip8%xYB#z`{Ms32D!Q)}Gwfn`BLD4UsqCvU#p;p+6oSr=K! zrl`hC5|Qn@ZijBZBT3zqt);voRs~tOOr-8`TgiH5m->rUT5$NOArndqJs3nboHMgf zGS=)9b#wRxi7lkhk znF6G*4a97+SQSh1!D|YAFzJ_K6Vi+G6EevMQ+abrb-{HBQ&d%LsPdAIRU`dno}%Il zgLxcsN#jDZ53X2v)Ofet$r*y>N>`;66=68{$-D-^w=(AQ#xbAsn5o|$_p*lmE!?*! z#V&*DCK$UVwAf%l->F2Xv<0XaMT>$=4>X6hb)&P>vq#~ne z?cfDEtRr0^{@sTn`V!|@C$=;b>F4(qxWGmH{JIKA3n~c!C&6vF&adQTA+BqcX00=G zrES7|8GL(27@{2zV{ly=L06%YM6#qjAF#cc^82|Sn!6!XK z#a@FH{lg!GB%kPlZnEt)3Gw^PmhJ4Q=ydD<(eAIL-6tOV`~%VOlj~1J!_nrV%wd}V z|9DP{D8eNIEN;!W!CEWXx&-^cOe+Xr)P9SxS|+>B+4!JGqQ^o`?I{p%^!Q`t-Tlua z{SQU)|5FKmVcRzqVosB48ni?epzSv?Uoo5$S3y8ALSFUbv+tgA1mQUh4=0EFXY1We zSETOG(jN4dv>AkR#VcwA1W~o9z0|JZ$|_uQ zc%!#r_q#>SH2MDU`26hT^nl<09?oIf zk^5>R?&HQxqSr@%dw2BuJ8tME&bzt_(hMx$HT9mGH{hai11`9n-V9->4~a75tIby% zt5R$b9$8KDe*5OcC^#2RmIW0QG`iTg!?g^2eQgElT?oJwrtagfD*;*TzD*fSW7~pz zn1+4o2nRVR!eDm8BR&wEb4e7d4%F}oeVQyPExdPK=ZnqT8C{4n4NE(yjZ=KHkm`{$ zi_B&hKQ8+dWJn{Bljfz1DJk4@jVF{Wjm`5dmpqIn&fZ=GnZpf-H_%1=Ks&w8Qc(}} zco17bxpNP15v%i05-ImJ%qpprnUF^NVWZ+E+_Eg*Fk8emjbSWw%YKvr(F3QEF}HV> z#(}rMmF+Y?Me2QsCsW@q6g^E=xPCc)SWqOu|9TfbBoXn2wSi+?xQw3sGe3gpxFG+4 z18*@I*;~yZW1*%mYD8f(XHIcho1uUPEw8a$~#16<}u+ID_Qti8IQ zbk(^UkHy5eAToSv-9?f@?X#ctnDXJ&Dk1~vp-9R@E*{9rZIZk zmLY6+zG{D_Ze&%dq8!e8(`=1knBc(%c0A9gLHW&huTKw;PWFGWkZBJ!vKqeRT@n}f z?~0_PcQzkwnMa1EMwEM%R8U7WJj}}s{Y7_MThww1@6TZTzDWPkqR53$Msh2T=WQ|Y z7m7VnM))oI>&dssb#NN(M36HgwDM$kZ_Ag)V>lm`PBnle*OGrZ!Iep(V3rD8aT!<8oX8{R)Cl%Rc!BrSOLS(Y#Zlo%1(moi0--wbi4)81$)CFM6``{R?uwSvd zzU`J3cIBxV$4&oeUuj>}`u~KLu03nNX@&EiCFr!Quz#?%w(1)zLj@@iXs+PY7kWeV zj35P_r4izoC5aYSnO&%W9v+V8ymF&Nkd~3Lk)pct#A==@ZVjs) zD&>pz@wO1%1(7KTiBqLZ6GL4IK*rx{G?CQ%K|&u$(dGm}{hS*ub~?xk&1q{%O5(NZ z#lKL@gp!?^Va_ux#Te5m0NlXT08O#TA3}{VsiP*Fd=p|}X zTnuD>+$Px18wWmTt6(U-JzrC}2=b2keLhT_%x5A;SkF`pGmC}DPaQQi5yF(lImI}q zNtqAV6Ttb=o+Z=^UUB$I12w^>!ibAtAPe)`H2*3*u(|k%huJurZUxHYjFiHeC8yeI zG<2pw=;!BW$34X@(4yypvL`ji>i~*<-lf#st-!X=XHA>Knk(BeLqqf6UH}Rl45Yfj z#fHQ)H3`xkx#z@E=h5@dCqJBT8!7v(^XPv9`mQU{{y%%i-~LzZc#me=%!jcY*y*=# zPS)Gsm~Eg|OMST*R92L2TnHb?L$Jss}|Q6RfhK^C!{%T&HwRtLFlV>=MnO6|rhZ^Y7M!RhnYd#Y>k6 z?)s?pC;EDj!epd)87P%=gJsaJgp$xfw{iEOiKN&i5xQmPoitf`uRpMJayaWUcFtVZ z*Pv16XMQw)4kXCm(i8aF#e>O|!PnIm-F2WP>m>Fr%Z|TM19Oh~k0T(r_5NXG<+d^f z#bVl-BqIAfQcf~!KJ?9~EVpQ#Lm|M4L}6sjt(jXNDpa%i(#*lm!~-SG0d>Q0GEOW! zE`aTJK2^bakX|LIq9}9cQ3Fp_)Eo`AD3d$rPi3fp!_=a<+k?c1O%g3f=)cK3)s~vM7`iius&y{{!+^Tp!`M$z}QzO0FD;wi> z(}=V@QI$_vyLMHhG+UXL^U`B9vbTos6s(umTlly`-!3^6RJ8Vi0cmp;f}r=RWt^V> z<3H_7208tgO<%_q8*}}mm)m8wCBS#kz#j!x99!aFN^Y3}JCEq!rzj^mjOpyc2PPO2 zvfqEtm1URlKyan?^IFS54MH747M`1%4U7H9o&eP<^(jELeJ1OEn@%6?^#Vz)t0Djl zBtGqw8Ot9d^K%K%!YHg+89MJ;H{U~G8NeL_*h7M8F_} z>pc;$LGPyHFo~cdr`&BD9KJCgIr^6(r7qs)x!rcP zG@i{q%viO$I541W%-hi5ifcxvS{{9M$n6+i4U<5v13l@#aTXF*XUG#6qEtIE#GXMy znvHQv5zqy|j)u@%ED<6&TS0iNRX+0f?a)>xkVP!KQncF}M&WwMmRe=RHJ3u6go5hK zv?|HW&Ck+caJss-wOlj9BXmGKuse#qMHMB zBhnXm7p>5mmIrhoTUK#d~A`@qvx zlHPYi9^y_hcgXqNGrms z_CsYd5S&KzY*n@zyoYG#sU zVTEhSK8h~69;4VYZsU7{!IQUY=_8B=(nrG_?Pya&g121JSS}97ybnIoKR0^kUqZ0< zN$55bweT)wuPBOSa6(-zKkq19z#_i$CG-l3PI5ps-2gG98|0xQn8L#_u<2KBvEVch z1yaD^kScJ=ud^k}!eQ2xQbB(#D9k==z2st4Y>;&nURNdjV{^;z8@c88;;EGNSigp; zM0K9KgdK;4ZB1!hY?u(Rq9`;kjw@MsQDLx)h>N@|3)O` zYvZ68G8e{B3WyzQyG!MmB7Jr?j-_N(0p#q-1Zia6*%*pNUg<_g8QwlTIyt&H>MB6R zm7K`G>xVj8?T^!6u8yJ!wzxQj`>Zw_JLM_P~*ir*CQ^~1u6t(bycmBA_|;8veeRqt-bilHBwE5F79d1CqDh(!0cSz6F+u% zbZ+B(s%1V?l2m@hmNjQ>-Ltn8s-y>>#V>0>mpk1UivYz(VO6CyK~NnmsGQMgu2E+} zpOR47t(XwtU@UxHUFtA+LCIX-FyM=zTch#aXg(by3LO%Y0CoP*iZ3q#D`C>G+`jX| z*T|099mLc2YG_gpD|xOQOG5-Je2hexuH$u zLhZ{|Ho=NviRoJ$em?hGQ{Uw>{{31hsMH{aRg-=yRW26ir9w+=c(lA-XntGl@WwNlNiDrSO>V=ty#(l5_~d8ey75e0<4jy9 z<5`ov0H#ws)7;Uk#*SVIiuZILH-Im{;_v&>p~m=dPQ+Y$=jf8=A$-?3gzq%!5ERl7 zZ=}KYVPc6oPb6dC;3?FgW|~&Yxs5BbD9k0pktg2QV$N!71BIqI=+Kono2o_-J<3Py zox8_(d7O*TJ$-NLr)be|RMnz|=qOZ_;9+dC*GPrr&Y3Br&pTV{1QUm%ek>$zYpg*U=Y9+s-t~*vP`q93NR&fvOvOcs*`|;V$(Ukc&{Tj5xXU3*0kWZyJ6e7|~d zH6i-zcm4JGdGEDBd^L@s@?gVY?2*M0Vb6$~o;;jh4iQ1!G&Fvosqk}JxDq4<$34qw z9?Vm#8^=wk?K08aK#uWd@PCeIeQ()-lVk$09T(UwO2bP9>gkQpE$pOHZl$ius+-z= zaX%eiAHHs^Xy6`Ne~SD@o=p+@8^rL`-wOU=O-w6 z-Bz*EJ+#ikIBXlQ6VmA&qX{{jw>uo{xGa1gkx4 zM2sgDH2Rj^J3l*a=BsDN4Le8QR<|b#5`~1tAefoU)egq-^u5pV=>~~s!G^0PpVNIL zR#Z?IDk(vYQ&ND9rdjDD4HE-E$GOzLcq0zQGwpk;i98MAqj7-HzwGQ@?^Om@ki5%Z zf4P0VS8Lv>*G>Mv?LJmBZ$NT9RM9_3^XW!y<$k^;!Sh=Pp7NHjsG(|2|cfy}npIwcw#u6NJ=N?^CNQ(k`|Fb`~KgcsA3&M9B=kH5v6|JG6e7(V^e#~*&Rzit((R-9}C+v&@LTD+0Fc-ZAuR1ah< z2#Q=42Ez7oZI~{@DYN*~w0ip|C#{P{&wSjKVq>6NgI-uPRTxH{nJ}Ei>(karygt=A zIKN-7NJv*^FBKd?kT|#?Y_okYeAH^7aufms<#K*n=KSXZk8U9o%#YxTL9BV67VkNu z4{T3ssFhsf5*jrRBw+jD^lBKs%#40soF1H>&@V?XkH24iy9s`J#W3*+{n#}FI<61^ z?|4Yj|R@v(**6na_uh(%E^eSUx3BzDrb(ZT8AYQ}RR8EW_+Dfm-ValZ`8#z`?h zq!yV^FiG)uF4;sJ$5X9N7`dEGU;@Xv`9BBo2oksiE)XN#5Bw9E8q$#l$n`75DvD~Z z(sNBNTexStO}n+*U?QJZxQN11v!)4S$H)x3EU8YN%~a!!k!oizHH~hsX>@z5NB2@{ z-4YMih|u&O&2Z9>nmT&aunccbXv4-57N<$E_tP@I<8Vwk1$o1V%{P7{`&?xeMWCLU zg4vxmtHzA_LpLm?Df%OG0zdBX4a_J#t~Hv}q}$ zjCWU}4{3`B^u@iDe~+hP)_3Hg#<3-{Rk$*ZtnbO{l{ql^#cIo_;Bw&{Tw#13R|U}c zLVcmx#nfm%Uu8S58y5NxN41!zg+Z+~qR*N}^w~NmCCGQu$)AO-J0hDZsqaP4M#9R9LzW5Z!UGO*G_CVuME3 z5WN4ty(?>O95=%I>|eon9x|Jn)j^$}%4SO=xnl47(3%>1l9wq;q$RE?Qo}>G_SdHm zfQKbFIZ39HR4jwG1rk6L$A|7lqanh)jPnA}=S?;pS(a|F@qXJVLwa(qqg={ij7oKQ zr%j1O5rf+T2$x8_Wg6an9f`N~NECs(Eg*GHqG=A4e}R{45uW)$IYcXs3z;|(E87BC zlChyp(jEwP3`u)PMGMo|VbAeRKrYPoQfX>s>O_EQO9(}#kct{Qu$h;;*`N_C`BwQgXsAs)dY2k4J*Y{UodkqYPO#>0nDDZZbS?|1gBiN57ACgm z;Z|>CP+mCbA=Vy~5D=qsK$3gzLD0EJbvrhkc9C6aBx8zbYYJ$4M-E3+^OX^deUWI7 z@pj=n6J^Mn_cxh15z5ReDAVLvv+El*I`=1Z+JS`+WE)N1u?>=5HRg?w=uS%{Rb&NC zffpomc2$kHc0|sT^wA#3Is5Kf_BdvWkZKB$dYuwR@$xc`LAB6~=ZmNXs?27r1{#P6 zY6=K?ouB-|rmBr+y9mg15$%xJ>R0WBv&nS|fLj>xZkSNpT5Azm6!lu7tk;q|*Yx^k zrYnVrrHE(PX?R?pg-_9p7UdkcXL>n85ZzV!Fy&JD4t4M9QcTY&jo8vIUZ0TEW3R&zHK#2El(6q0H5J5FX94q3Efq7qxxh`Ne78 z+1Vu-%@4U44AVi7ac>P{if5#e30C}*NRtSH9RUPsWeeDE(m!|sj4+D9e+w>s>a>~2 zJ$3}{kqV5VEf%Xf1$9NN=}K6W2JDU`W1(>NiTKzAhhO|&KT~40WP(J_uPbnVBh~NF z)g%D+++I8YMFH|&ezps{=zEJgD)o=t#hyr-2ytBj;xZ)3IOS5!Ai4Ph7LGVv{{zvd zf=lj-=+YI?g$TMwk8l}9`AnTTuJ^L1N@}%AhO{dV>aH-TXCZ1LgI(^tpuwIGc=?J? zr^wtIuu@vBF0Ab*Z=J4{(-4_Hae#M)0sb*~2msbH|DQQ`6KWl3=90!Cb0)PCKsr>L z3_fk8Jys;A zHZ;jqy&|gg1XQ8z)~*}E+;+oiL`VhJT^C1tzQ2klO*CwPr#L; zyy2Z<5{)Ntm#aRAQG0tOIkEoGd2U11&3@tJB$JHHcVRfl1&gD-Cye%SQF_SXjT+nAtSTm?z9^6N1$k`x+GCWbvdgB2r&m9fg(;mx1@YTX4{(&s>rV6)~qTV9t54wS7-kUjUFxHD~e$Wjsz0%^%%E&caFsiulnN@Z%;^z@cn`y^8MC;Z*w~Z1g2jO5ugt zYG-REH718gk6xg>Y1JV@UM;LZlJYWk%+lN`fu~%m$WQepern|wEv~iw^t*!gE}KA6 z!@SY{r-|vf&uI2T8jD~YrfGgrh0rDG|@GDV#03pkg{f?7fMHRTROoEr!@ zr_^;08rj9<*7)zKysHA$*&OijOfdF2bNuCw8N5=U?E=~lofwW{u zjvsu~0PJ`%H8%KoRk=VB#0CP0U7-mKFnlzy>XalR*FZ9TSb-e4NXQ#%pe-V6z|=s5 zsexqGaIi!rtj3vmFPAPGFbHr}Vtcd#UHey4)4lN)J;ME@SM4KoC>8%y(E=hi4Fqgb zuHM)TAacnbY~dD7ln}DXW*;Ji z4JFliHY>!dlvgOTHc}eP%ECo#84B1k&J+=(kQ_t(^Fk=0Ia}a9Mj@Z&fsX&*+Rt3) z$%Kh0G?Y|4=%fWk&B|Ro=!x?y%N7A?C;$?6Qd-csIeo6<7Yh_|X(-^*&CHs<$0}#D zW|+{%mit9{+>6CBMPwREYixUET53P-xr5>XjEjn*MOYdNu#^VcCXVeou&y&dO=6L< zaaDzN)nb(f51B4gZ6nu%Un=&K=xyxNCqW>{cCRX%Q{JA(CakRB!0CYO6eHJn@n9fc zn8+L=q7x3Xq(#?&WS0}TTN)X-qEpy9F#0$cJ45$)xmdVaS?oO(0KXe?8n_7* z(A=bRJcGQMCY}!xiW^h;P4dxN^Vu?y*6HcXM8ZvDbYWfB+UN*?h9(_Eit)Cc`Cd8v z&?A~Y6`#s7ry-CW|K*5vv}d!+3$_(0dD1nWH;zMHOSeQ51O`;Z#!b!+YKZ?)hZi*y z2i`h~@E76+z8zdbgEyU!ckVV;$r{gz^VUma4sx0s{dn9uHsWY;INip3;@BtrOss^3~9YaZZDH`Tsg5DCG<8tQE$r^w%J3M*10aIJk zwUt+EJKj7UA0=Mm)0X&619j8NMK-!u02~SuB^{_}YTS`EZCsts6g?Rs%@5a;zu{l( z6n{DT?)CHk^NDSAnBFAqi1UrgXti4XZr8xSgMN?x!bksYw+EfR0l(X=ZVy7+Xtg`N zR_8mT^^NE$eNyyo1Ed6YAU^lFa$R4zUw$d$-%8^*{JeQ{^ah>SM#jVj$OfhczC*}Q zCZugH#PX>Hp42B32U>~rck0N(l`=O_7IJ6^m|>bX(k61#<f4)!t z5NhPIUOd@;1R3?Z7%s=3jL~LuVdMThDcxpaLtQUjYKLAA!!&d-5<7&GE?~Tk=r(0S zk2m@GgITd=7W3+3*vqR}yPTOyu~)fnz;$ym$1AqI-MTfiuEr3;$xaFhRdDx z>qVV%;uY5Fpoam!K&Mm)tp(SLp714!>E-$ueoei_!wk2gTDT2;tpTW_dUjDtc|hB~ zALExpSnsXv&Hh^hIKdo+iH8_2`MYs}l6iH>_GXif&A|zVQNh-$2IaoJwzrUYXkq|4 zay_~&jliu3uY*+X11=`@2rP#k45Lf?*0buS{>`4xiSA(+!_V~9_;fj)mgwfkoaPvq zkh5^@?&b5ej66qqF7`RY9)?dCPbc-L8$nt%C3%*&F^7AmD+C6g^n?Cn)y3KS5xFWHl=OTbwP$u6W8~k9(L8mFShGg2_t6P zq-%V8X&E;pOb9(Gp0CpF7OE^oR*-^JH}@h-8&XRg1|ZQ;zDQ1K7A7`D%_g~Ts%bcWXV(ya0LG1 zMlctJu`vTK!A*?6MmEbR{9Vk-##jAJzbV6EDMPA=Izvn4!%GR9N6PA?l+~E`k7{Rq zbux9RHP=fTYi5fs)xwuH4uDKvshGXoIj%EgNN1XDx{ytU9>1!Q1qh*YFQgVTO}an| z{cwJ5iRIeSn))fqt#IAJ_ZkD8Bo+3?yra}Ty0mno80tL+o4+^JV=DGwmk(0kr;G=5 zWxc-SJ+Y!TVw7cKc$n*CNLMDAXE$rSuDzXeLvvM8uQ^543#yGrw;%MNuFeU@MPY1o zT9{K=d1Cx4Lj`ls1_}t_Lhkj)4P;szG#yjQ_MaF-M72s!1$2Z0sxq>JFxaiblymBe zHIO~}a-P-tKc)ZWKi^2lcu4( o5;{67bW-$0|DUGq_4E39{k(o&Kd+zH&$s#f13UT6 :windows - setcode do - program_data = `echo %SYSTEMDRIVE%\\ProgramData`.chomp - if File.directory? program_data - "#{program_data}\\staging" - else - "C:\\staging" - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/scope_defaults.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/scope_defaults.rb deleted file mode 100644 index 6c814849a0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/scope_defaults.rb +++ /dev/null @@ -1,17 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:scope_defaults, :type => :rvalue, :doc => <<-EOS -Determine if specified resource defaults have a attribute defined in -current scope. -EOS - ) do |arguments| - - raise(Puppet::ParseError, "scope_defaults(): Wrong number of arguments " + - "given (#{arguments.size} for 2)") if arguments.size != 2 - - # auto capitalize puppet resource for lookup: - res_type = arguments[0].split('::').collect{ |x| x.capitalize }.join('::') - res_attr = arguments[1] - - return self.lookupdefaults(res_type).has_key?(res_attr.to_sym) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/staging_parse.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/staging_parse.rb deleted file mode 100644 index 666c887e3c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/staging_parse.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'uri' - -module Puppet::Parser::Functions - newfunction(:staging_parse, :type => :rvalue, :doc => <<-EOS -Parse filepath to retrieve information about the file. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "staging_parse(): Wrong number of arguments " + - "given (#{arguments.size} for 1, 2, 3)") if arguments.size < 1 || arguments.size > 3 - - source = arguments[0] - path = URI.parse(source).path - - raise Puppet::ParseError, "staging_parse(): #{source.inspect} has no URI " + - "'path' component" if path.nil? - - info = arguments[1] ? arguments[1] : 'filename' - extension = arguments[2] ? arguments[2] : File.extname(path) - - case info - when 'filename' - result = File.basename(path) - when 'basename' - result = File.basename(path, extension) - when 'extname' - result = File.extname(path) - when 'parent' - result = File.expand_path(File.join(path, '..')) - else - raise Puppet::ParseError, "staging_parse(), unknown parse info #{info}." - end - - return result - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/deploy.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/deploy.pp deleted file mode 100644 index 565038701f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/deploy.pp +++ /dev/null @@ -1,42 +0,0 @@ -# The define resource extracts compressed file to a staging location. -define staging::deploy ( - $source, #: the source file location, supports local files, puppet://, http://, https://, ftp:// - $target, #: the target extraction directory - $staging_path = undef, #: the staging location for compressed file. defaults to ${staging::path}/${caller_module_name} - $username = undef, #: https or ftp username - $certificate = undef, #: https certifcate file - $password = undef, #: https or ftp user password or https certificate password - $environment = undef, #: environment variable for settings such as http_proxy - $timeout = undef, #: the time to wait for the file transfer to complete - $user = undef, #: extract file as this user - $group = undef, #: extract group as this group - $creates = undef, #: the file/folder created after extraction. if unspecified defaults to ${target}/${name} - $unless = undef, #: alternative way to conditionally extract file - $onlyif = undef #: alternative way to conditionally extract file -) { - - staging::file { $name: - source => $source, - target => $staging_path, - username => $username, - certificate => $certificate, - password => $password, - environment => $environment, - subdir => $caller_module_name, - timeout => $timeout, - } - - staging::extract { $name: - target => $target, - source => $staging_path, - user => $user, - group => $group, - environment => $environment, - subdir => $caller_module_name, - creates => $creates, - unless => $unless, - onlyif => $onlyif, - require => Staging::File[$name], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/extract.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/extract.pp deleted file mode 100644 index 163da14926..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/extract.pp +++ /dev/null @@ -1,95 +0,0 @@ -# Define resource to extract files from staging directories to target directories. -define staging::extract ( - $target, #: the target extraction directory - $source = undef, #: the source compression file, supports tar, tar.gz, zip, war - $creates = undef, #: the file created after extraction. if unspecified defaults ${staging::path}/${caller_module_name}/${name} ${target}/${name} - $unless = undef, #: alternative way to conditionally check whether to extract file. - $onlyif = undef, #: alternative way to conditionally check whether to extract file. - $user = undef, #: extract file as this user. - $group = undef, #: extract file as this group. - $environment = undef, #: environment variables. - $subdir = $caller_module_name #: subdir per module in staging directory. -) { - - include staging - - if $source { - $source_path = $source - } else { - $source_path = "${staging::path}/${subdir}/${name}" - } - - # Use user supplied creates path, set default value if creates, unless or - # onlyif is not supplied. - if $creates { - $creates_path = $creates - } elsif ! ($unless or $onlyif) { - if $name =~ /.tar.gz$/ { - $folder = staging_parse($name, 'basename', '.tar.gz') - } elsif $name =~ /.tar.bz2$/ { - $folder = staging_parse($name, 'basename', '.tar.bz2') - } else { - $folder = staging_parse($name, 'basename') - } - $creates_path = "${target}/${folder}" - } - - if scope_defaults('Exec','path') { - Exec{ - cwd => $target, - user => $user, - group => $group, - environment => $environment, - creates => $creates_path, - unless => $unless, - onlyif => $onlyif, - logoutput => on_failure, - } - } else { - Exec{ - path => $::path, - cwd => $target, - user => $user, - group => $group, - environment => $environment, - creates => $creates_path, - unless => $unless, - onlyif => $onlyif, - logoutput => on_failure, - } - } - - case $name { - /.tar$/: { - $command = "tar xf ${source_path}" - } - - /(.tgz|.tar.gz)$/: { - if $::osfamily == 'Solaris' { - $command = "gunzip -dc < ${source_path} | tar xf - " - } else { - $command = "tar xzf ${source_path}" - } - } - - /.tar.bz2$/: { - $command = "tar xjf ${source_path}" - } - - /.zip$/: { - $command = "unzip ${source_path}" - } - - /(.war|.jar)$/: { - $command = "jar xf ${source_path}" - } - - default: { - fail("staging::extract: unsupported file format ${name}.") - } - } - - exec { "extract ${name}": - command => $command, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/file.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/file.pp deleted file mode 100644 index 60b69d796b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/file.pp +++ /dev/null @@ -1,115 +0,0 @@ -# #### Overview: -# -# Define resource to retrieve files to staging directories. It is -# intententionally not replacing files, as these intend to be large binaries -# that are versioned. -# -# #### Notes: -# -# If you specify a different staging location, please manage the file -# resource as necessary. -# -define staging::file ( - $source, #: the source file location, supports local files, puppet://, http://, https://, ftp:// - $target = undef, #: the target staging directory, if unspecified ${staging::path}/${caller_module_name} - $username = undef, #: https or ftp username - $certificate = undef, #: https certificate file - $password = undef, #: https or ftp user password or https certificate password - $environment = undef, #: environment variable for settings such as http_proxy, https_proxy, of ftp_proxy - $timeout = undef, #: the the time to wait for the file transfer to complete - $curl_option = undef, #: options to pass to curl - $wget_option = undef, #: options to pass to wget - $subdir = $caller_module_name -) { - - include staging - - $quoted_source = shellquote($source) - - if $target { - $target_file = $target - $staging_dir = staging_parse($target, 'parent') - } else { - $staging_dir = "${staging::path}/${subdir}" - $target_file = "${staging_dir}/${name}" - - if ! defined(File[$staging_dir]) { - file { $staging_dir: - ensure=>directory, - } - } - } - - Exec { - path => $staging::exec_path, - environment => $environment, - cwd => $staging_dir, - creates => $target_file, - timeout => $timeout, - logoutput => on_failure, - } - - case $::staging_http_get { - 'curl', default: { - $http_get = "curl ${curl_option} -f -L -o ${name} ${quoted_source}" - $http_get_passwd = "curl ${curl_option} -f -L -o ${name} -u ${username}:${password} ${quoted_source}" - $http_get_cert = "curl ${curl_option} -f -L -o ${name} -E ${certificate}:${password} ${quoted_source}" - $ftp_get = "curl ${curl_option} -o ${name} ${quoted_source}" - $ftp_get_passwd = "curl ${curl_option} -o ${name} -u ${username}:${password} ${quoted_source}" - } - 'wget': { - $http_get = "wget ${wget_option} -O ${name} ${quoted_source}" - $http_get_passwd = "wget ${wget_option} -O ${name} --user=${username} --password=${password} ${quoted_source}" - $http_get_cert = "wget ${wget_option} -O ${name} --user=${username} --certificate=${certificate} ${quoted_source}" - $ftp_get = $http_get - $ftp_get_passwd = $http_get_passwd - } - 'powershell':{ - $http_get = "powershell.exe -Command \"\$wc = New-Object System.Net.WebClient;\$wc.DownloadFile('${source}','${target_file}')\"" - $ftp_get = $http_get - $http_get_password = "powershell.exe -Command \"\$wc = (New-Object System.Net.WebClient);\$wc.Credentials = New-Object System.Net.NetworkCredential('${username}','${password}');\$wc.DownloadFile(${source},${target_file})\"" - $ftp_get_password = $http_get_password - } - } - - case $source { - /^\//: { - file { $target_file: - source => $source, - replace => false, - } - } - /^puppet:\/\//: { - file { $target_file: - source => $source, - replace => false, - } - } - /^http:\/\//: { - if $username { $command = $http_get_passwd } - else { $command = $http_get } - exec { $target_file: - command => $command, - } - } - /^https:\/\//: { - if $username { $command = $http_get_passwd } - elsif $certificate { $command = $http_get_cert } - else { $command = $http_get } - exec { $target_file: - command => $command, - } - } - /^ftp:\/\//: { - if $username { $command = $ftp_get_passwd } - else { $command = $ftp_get } - exec { $target_file: - command => $command, - } - } - default: { - fail("stage::file: do not recognize source ${source}.") - } - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/init.pp deleted file mode 100644 index 19bb2da40e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/init.pp +++ /dev/null @@ -1,28 +0,0 @@ -# This module manages staging and extraction of files from various sources. -# -# #### Actions: -# -# Creates the root staging directory. By default files will be created in a subdirectory matching the caller_module_name. -# -# /opt/staging/ -# |-- puppet -# | `-- puppet.enterprise.2.0.tar.gz -# `-- tomcat -# `-- tomcat.5.0.tar.gz -# -class staging ( - $path = $staging::params::path, #: staging directory filepath - $owner = $staging::params::owner, #: staging directory owner - $group = $staging::params::group, #: staging directory group - $mode = $staging::params::mode, #: staging directory permission - $exec_path = $staging::params::exec_path #: executable default path -) inherits staging::params { - - file { $path: - ensure => directory, - owner => $owner, - group => $group, - mode => $mode, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/params.pp deleted file mode 100644 index 95ee0a134d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/manifests/params.pp +++ /dev/null @@ -1,26 +0,0 @@ -# OS specific parameters -class staging::params { - case $::osfamily { - default: { - $path = '/opt/staging' - $owner = '0' - $group = '0' - $mode = '0755' - $exec_path = '/usr/local/bin:/usr/bin:/bin' - } - 'Solaris': { - $path = '/opt/staging' - $owner = '0' - $group = '0' - $mode = '0755' - $exec_path = '/usr/local/bin:/usr/bin:/bin:/usr/sfw/bin' - } - 'windows': { - $path = $::staging_windir - $owner = undef - $group = undef - $mode = '0755' - $exec_path = $::path - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/defines/staging_deploy_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/defines/staging_deploy_spec.rb deleted file mode 100644 index 66541d22f1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/defines/staging_deploy_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'spec_helper' -describe 'staging::deploy', :type => :define do - - # forcing a more sane caller_module_name to match real usage. - let(:facts) { { :caller_module_name => 'spec', - :osfamily => 'RedHat', - :path => '/usr/local/bin:/usr/bin:/bin', } } - - describe 'when deploying tar.gz' do - let(:title) { 'sample.tar.gz' } - let(:params) { { :source => 'puppet:///modules/staging/sample.tar.gz', - :target => '/usr/local' } } - - it { - should contain_file('/opt/staging') - should contain_file('/opt/staging/spec/sample.tar.gz') - should contain_exec('extract sample.tar.gz').with({ - :command => 'tar xzf /opt/staging/spec/sample.tar.gz', - :path => '/usr/local/bin:/usr/bin:/bin', - :cwd => '/usr/local', - :creates => '/usr/local/sample' - }) - } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/defines/staging_extract_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/defines/staging_extract_spec.rb deleted file mode 100644 index a3d742245d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/defines/staging_extract_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -require 'spec_helper' -describe 'staging::extract', :type => :define do - - # forcing a more sane caller_module_name to match real usage. - let(:facts) { { :caller_module_name => 'spec', - :osfamily => 'RedHat', - :path => '/usr/local/bin:/usr/bin:/bin' } } - - describe 'when deploying tar.gz' do - let(:title) { 'sample.tar.gz' } - let(:params) { { :target => '/opt' } } - - it { - should contain_file('/opt/staging') - should contain_exec('extract sample.tar.gz').with({ - :command => 'tar xzf /opt/staging/spec/sample.tar.gz', - :path => '/usr/local/bin:/usr/bin:/bin', - :cwd => '/opt', - :creates => '/opt/sample' - }) - } - end - - describe 'when deploying zip' do - let(:title) { 'sample.zip' } - let(:params) { { :target => '/opt' } } - - it { should contain_file('/opt/staging') - should contain_exec('extract sample.zip').with({ - :command => 'unzip /opt/staging/spec/sample.zip', - :path => '/usr/local/bin:/usr/bin:/bin', - :cwd => '/opt', - :creates => '/opt/sample' - }) - } - end - - describe 'when deploying war' do - let(:title) { 'sample.war' } - let(:params) { { :target => '/opt' } } - - it { should contain_file('/opt/staging') - should contain_exec('extract sample.war').with({ - :command => 'jar xf /opt/staging/spec/sample.war', - :path => '/usr/local/bin:/usr/bin:/bin', - :cwd => '/opt', - :creates => '/opt/sample' - }) - } - end - - describe 'when deploying unknown' do - let(:title) { 'sample.zzz'} - let(:params) { { :target => '/opt' } } - - it { expect { should contain_exec("exec sample.zzz") }.to raise_error(Puppet::Error) } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/defines/staging_file_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/defines/staging_file_spec.rb deleted file mode 100644 index ab1ee59e11..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/defines/staging_file_spec.rb +++ /dev/null @@ -1,157 +0,0 @@ -require 'spec_helper' -describe 'staging::file', :type => :define do - - # forcing a more sane caller_module_name to match real usage. - let(:facts) { { :caller_module_name=> 'spec' } } - - describe 'when deploying via puppet' do - let(:title) { 'sample.tar.gz' } - let(:params) { { :source => 'puppet:///modules/staging/sample.tar.gz' } } - - it { - should contain_file('/opt/staging') - should contain_file('/opt/staging/spec/sample.tar.gz') - should_not contain_exec('/opt/staging/spec/sample.tar.gz') - } - end - - describe 'when deploying via local' do - let(:title) { 'sample.tar.gz' } - let(:params) { { :source => '/nfs/sample.tar.gz', - :target => '/usr/local/sample.tar.gz', - } } - - it { - should contain_file('/opt/staging') - should contain_file('/usr/local/sample.tar.gz') - should_not contain_exec('/opt/staging/spec/sample.tar.gz') - } - end - - describe 'when deploying via http' do - let(:title) { 'sample.tar.gz' } - let(:params) { { :source => 'http://webserver/sample.tar.gz' } } - - it { - should contain_file('/opt/staging') - should contain_exec('/opt/staging/spec/sample.tar.gz').with( { - :command => 'curl -f -L -o sample.tar.gz http://webserver/sample.tar.gz', - :path => '/usr/local/bin:/usr/bin:/bin', - :environment => nil, - :cwd => '/opt/staging/spec', - :creates => '/opt/staging/spec/sample.tar.gz', - :logoutput => 'on_failure', - }) - } - end - - describe 'when deploying via http with custom curl options' do - let(:title) { 'sample.tar.gz' } - let(:params) { { - :source => 'http://webserver/sample.tar.gz', - :curl_option => '-b', - } } - - it { - should contain_file('/opt/staging') - should contain_exec('/opt/staging/spec/sample.tar.gz').with( { - :command => 'curl -b -f -L -o sample.tar.gz http://webserver/sample.tar.gz', - :path => '/usr/local/bin:/usr/bin:/bin', - :environment => nil, - :cwd => '/opt/staging/spec', - :creates => '/opt/staging/spec/sample.tar.gz', - :logoutput => 'on_failure', - }) - } - end - - describe 'when deploying via http with parameters' do - let(:title) { 'sample.tar.gz' } - let(:params) { { :source => 'http://webserver/sample.tar.gz', - :target => '/usr/local/sample.tar.gz', - } } - - it { should contain_file('/opt/staging') - should contain_exec('/usr/local/sample.tar.gz').with( { - :command => 'curl -f -L -o sample.tar.gz http://webserver/sample.tar.gz', - :path => '/usr/local/bin:/usr/bin:/bin', - :environment => nil, - :cwd => '/usr/local', - :creates => '/usr/local/sample.tar.gz', - }) - } - end - - describe 'when deploying via https' do - let(:title) { 'sample.tar.gz' } - let(:params) { { :source => 'https://webserver/sample.tar.gz' } } - - it { should contain_file('/opt/staging') } - it { should contain_exec('/opt/staging/spec/sample.tar.gz').with( { - :command => 'curl -f -L -o sample.tar.gz https://webserver/sample.tar.gz', - :path => '/usr/local/bin:/usr/bin:/bin', - :environment => nil, - :cwd => '/opt/staging/spec', - :creates => '/opt/staging/spec/sample.tar.gz', - :logoutput => 'on_failure', - }) } - end - - describe 'when deploying via https with parameters' do - let(:title) { 'sample.tar.gz' } - let(:params) { { :source => 'https://webserver/sample.tar.gz', - :username => 'puppet', - :password => 'puppet', - } } - - it { - should contain_file('/opt/staging') - should contain_exec('/opt/staging/spec/sample.tar.gz').with( { - :command => 'curl -f -L -o sample.tar.gz -u puppet:puppet https://webserver/sample.tar.gz', - :path => '/usr/local/bin:/usr/bin:/bin', - :environment => nil, - :cwd => '/opt/staging/spec', - :creates => '/opt/staging/spec/sample.tar.gz', - :logoutput => 'on_failure', - }) - } - end - - describe 'when deploying via ftp' do - let(:title) { 'sample.tar.gz' } - let(:params) { { :source => 'ftp://webserver/sample.tar.gz' } } - - it { - should contain_file('/opt/staging') - should contain_exec('/opt/staging/spec/sample.tar.gz').with( { - :command => 'curl -o sample.tar.gz ftp://webserver/sample.tar.gz', - :path => '/usr/local/bin:/usr/bin:/bin', - :environment => nil, - :cwd => '/opt/staging/spec', - :creates => '/opt/staging/spec/sample.tar.gz', - :logoutput => 'on_failure', - }) - } - end - - describe 'when deploying via ftp with parameters' do - let(:title) { 'sample.tar.gz' } - let(:params) { { :source => 'ftp://webserver/sample.tar.gz', - :username => 'puppet', - :password => 'puppet', - } } - - it { - should contain_file('/opt/staging') - should contain_exec('/opt/staging/spec/sample.tar.gz').with( { - :command => 'curl -o sample.tar.gz -u puppet:puppet ftp://webserver/sample.tar.gz', - :path => '/usr/local/bin:/usr/bin:/bin', - :environment => nil, - :cwd => '/opt/staging/spec', - :creates => '/opt/staging/spec/sample.tar.gz', - :logoutput => 'on_failure', - }) - } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/fixtures/hiera.yaml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/fixtures/hiera.yaml deleted file mode 100644 index 771e483f53..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/fixtures/hiera.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -:backends: - puppet - -:hierarchy: - common - -:puppet: - :datasource: data diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/spec_helper.rb deleted file mode 100644 index dc7e9f4a0e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/spec_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'rubygems' -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/scope_defaults_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/scope_defaults_spec.rb deleted file mode 100644 index 50c460de73..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/scope_defaults_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env rspec -require 'spec_helper' - -describe "the scope_defaults function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("scope_defaults").should == "function_scope_defaults" - end - - it "should raise a ParseError if there is less than 2 arguments" do - expect{ scope.function_scope_defaults([]) }. - to raise_error(Puppet::ParseError) - end - - it "should raise a ParseError if there is more than 2 arguments" do - expect{ scope.function_scope_defaults(['exec', 'path', 'error']) }. - to raise_error(Puppet::ParseError) - end - - it "should return false for invalid resource" do - result = scope.function_scope_defaults(['foo', 'path']) - result.should(eq(false)) - end - - it "should return false for resource without default attributes" do - if scope.respond_to? :define_settings - scope.define_settings('Exec', Puppet::Parser::Resource::Param.new(:name => :path, :value => "/bin")) - else - scope.setdefaults('Exec', Puppet::Parser::Resource::Param.new(:name => :path, :value => "/bin")) - end - result = scope.function_scope_defaults(['Exec', 'foo']) - result.should(eq(false)) - end - - it "should return true for resource with default attributes" do - if scope.respond_to? :define_settings - scope.define_settings('Exec', Puppet::Parser::Resource::Param.new(:name => :path, :value => "/bin")) - else - scope.setdefaults('Exec', Puppet::Parser::Resource::Param.new(:name => :path, :value => "/bin")) - end - result = scope.function_scope_defaults(['Exec', 'path']) - result.should(eq(true)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/staging_parse_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/staging_parse_spec.rb deleted file mode 100755 index c7c9c69f6d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/staging_parse_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env rspec -require 'spec_helper' - -describe "the staging parser function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("staging_parse").should == "function_staging_parse" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_staging_parse([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should raise a ParseError if there is more than 3 arguments" do - lambda { scope.function_staging_parse(['/etc', 'filename', '.zip', 'error']) }.should( raise_error(Puppet::ParseError)) - end - - it "should raise a ParseError if there is an invalid info request" do - lambda { scope.function_staging_parse(['/etc', 'sheep', '.zip']) }.should( raise_error(Puppet::ParseError)) - end - - it "should raise a ParseError if 'source' doesn't have a URI path component" do - lambda { scope.function_staging_parse(['uri:without-path']) }.should( raise_error(Puppet::ParseError, /has no URI 'path' component/)) - end - - it "should return the filename by default" do - result = scope.function_staging_parse(["/etc/puppet/sample.tar.gz"]) - result.should(eq('sample.tar.gz')) - end - - it "should return the file basename" do - result = scope.function_staging_parse(["/etc/puppet/sample.tar.gz", "basename"]) - result.should(eq('sample.tar')) - end - - it "should return the file basename with custom extensions" do - result = scope.function_staging_parse(["/etc/puppet/sample.tar.gz", "basename", ".tar.gz"]) - result.should(eq('sample')) - end - - it "should return the file extname" do - result = scope.function_staging_parse(["/etc/puppet/sample.tar.gz", "extname"]) - result.should(eq('.gz')) - end - - it "should return the file parent" do - result = scope.function_staging_parse(["/etc/puppet/sample.tar.gz", "parent"]) - result.should(eq('/etc/puppet')) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/deploy.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/deploy.pp deleted file mode 100644 index cf9ac58d5a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/deploy.pp +++ /dev/null @@ -1,4 +0,0 @@ -staging::deploy { 'sample.tar.gz': - source => 'puppet:///modules/staging/sample.tar.gz', - target => '/usr/local', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/extract.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/extract.pp deleted file mode 100644 index 257f478cfd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/extract.pp +++ /dev/null @@ -1,25 +0,0 @@ -$caller_module_name = 'demo' - -class { 'staging': - path => '/tmp/staging', -} - -staging::file { 'sample.tar.gz': - source => 'puppet:///modules/staging/sample.tar.gz' -} - -staging::extract { 'sample.tar.gz': - target => '/tmp/staging', - creates => '/tmp/staging/sample', - require => Staging::File['sample.tar.gz'], -} - -staging::file { 'sample.tar.bz2': - source => 'puppet:///modules/staging/sample.tar.bz2' -} - -staging::extract { 'sample.tar.bz2': - target => '/tmp/staging', - creates => '/tmp/staging/sample-tar-bz2', - require => Staging::File['sample.tar.bz2'], -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/file.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/file.pp deleted file mode 100644 index 475cf5628c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/file.pp +++ /dev/null @@ -1,17 +0,0 @@ -$caller_module_name = 'demo' - -class { 'staging': - path => '/tmp/staging', -} - -staging::file { 'sample': - source => 'puppet:///modules/staging/sample', -} - -staging::file { 'passwd': - source => '/etc/passwd', -} - -staging::file { 'manpage.html': - source => 'http://curl.haxx.se/docs/manpage.html', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/init.pp deleted file mode 100644 index 3015c10f04..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/init.pp +++ /dev/null @@ -1 +0,0 @@ -include staging diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/scope_defaults.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/scope_defaults.pp deleted file mode 100644 index 3073ff4aaf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/scope_defaults.pp +++ /dev/null @@ -1,7 +0,0 @@ -Exec { - path => '/bin', -} - -if scope_defaults('Exec', 'path') { - notice('good') -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/staging_parse.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/staging_parse.pp deleted file mode 100644 index 117ad16684..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/staging/tests/staging_parse.pp +++ /dev/null @@ -1,12 +0,0 @@ -$file = '/etc/puppetlabs/foo.bar.tar.gz' -$filename = staging_parse($file) -$basename = staging_parse($file, 'basename') -$extname = staging_parse($file, 'extname') -$parent = staging_parse($file, 'parent') -$rbasename = staging_parse($file, 'basename', '.tar.gz') - -notice($filename) -notice($basename) -notice($extname) -notice($parent) -notice($rbasename) diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/CHANGELOG.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/CHANGELOG.md deleted file mode 100644 index 5a3597e340..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/CHANGELOG.md +++ /dev/null @@ -1,413 +0,0 @@ -## 2014-05-08 - Release - 4.2.1 -### Summary -This release moves a stray symlink that can cause problems. - -## 2014-05-08 - Release - 4.2.0 -### Summary -This release adds many new functions and fixes, and continues to be backwards compatible with stdlib 3.x - -#### Features -- New `base64()` function -- New `deep_merge()` function -- New `delete_undef_values()` function -- New `delete_values()` function -- New `difference()` function -- New `intersection()` function -- New `is_bool()` function -- New `pick_default()` function -- New `union()` function -- New `validate_ipv4_address` function -- New `validate_ipv6_address` function -- Update `ensure_packages()` to take an option hash as a second parameter. -- Update `range()` to take an optional third argument for range step -- Update `validate_slength()` to take an optional third argument for minimum length -- Update `file_line` resource to take `after` and `multiple` attributes - -#### Bugfixes -- Correct `is_string`, `is_domain_name`, `is_array`, `is_float`, and `is_function_available` for parsing odd types such as bools and hashes. -- Allow facts.d facts to contain `=` in the value -- Fix `root_home` fact on darwin systems -- Fix `concat()` to work with a second non-array argument -- Fix `floor()` to work with integer strings -- Fix `is_integer()` to return true if passed integer strings -- Fix `is_numeric()` to return true if passed integer strings -- Fix `merge()` to work with empty strings -- Fix `pick()` to raise the correct error type -- Fix `uriescape()` to use the default URI.escape list -- Add/update unit & acceptance tests. - - -##2014-03-04 - Supported Release - 3.2.1 -###Summary -This is a supported release - -####Bugfixes -- Fixed `is_integer`/`is_float`/`is_numeric` for checking the value of arithmatic expressions. - -####Known bugs -* No known bugs - ---- - -##### 2013-05-06 - Jeff McCune - 4.1.0 - - * (#20582) Restore facter\_dot\_d to stdlib for PE users (3b887c8) - * (maint) Update Gemfile with GEM\_FACTER\_VERSION (f44d535) - -##### 2013-05-06 - Alex Cline - 4.1.0 - - * Terser method of string to array conversion courtesy of ethooz. (d38bce0) - -##### 2013-05-06 - Alex Cline 4.1.0 - - * Refactor ensure\_resource expectations (b33cc24) - -##### 2013-05-06 - Alex Cline 4.1.0 - - * Changed str-to-array conversion and removed abbreviation. (de253db) - -##### 2013-05-03 - Alex Cline 4.1.0 - - * (#20548) Allow an array of resource titles to be passed into the ensure\_resource function (e08734a) - -##### 2013-05-02 - Raphaël Pinson - 4.1.0 - - * Add a dirname function (2ba9e47) - -##### 2013-04-29 - Mark Smith-Guerrero - 4.1.0 - - * (maint) Fix a small typo in hash() description (928036a) - -##### 2013-04-12 - Jeff McCune - 4.0.2 - - * Update user information in gemspec to make the intent of the Gem clear. - -##### 2013-04-11 - Jeff McCune - 4.0.1 - - * Fix README function documentation (ab3e30c) - -##### 2013-04-11 - Jeff McCune - 4.0.0 - - * stdlib 4.0 drops support with Puppet 2.7 - * stdlib 4.0 preserves support with Puppet 3 - -##### 2013-04-11 - Jeff McCune - 4.0.0 - - * Add ability to use puppet from git via bundler (9c5805f) - -##### 2013-04-10 - Jeff McCune - 4.0.0 - - * (maint) Make stdlib usable as a Ruby GEM (e81a45e) - -##### 2013-04-10 - Erik Dalén - 4.0.0 - - * Add a count function (f28550e) - -##### 2013-03-31 - Amos Shapira - 4.0.0 - - * (#19998) Implement any2array (7a2fb80) - -##### 2013-03-29 - Steve Huff - 4.0.0 - - * (19864) num2bool match fix (8d217f0) - -##### 2013-03-20 - Erik Dalén - 4.0.0 - - * Allow comparisons of Numeric and number as String (ff5dd5d) - -##### 2013-03-26 - Richard Soderberg - 4.0.0 - - * add suffix function to accompany the prefix function (88a93ac) - -##### 2013-03-19 - Kristof Willaert - 4.0.0 - - * Add floor function implementation and unit tests (0527341) - -##### 2012-04-03 - Eric Shamow - 4.0.0 - - * (#13610) Add is\_function\_available to stdlib (961dcab) - -##### 2012-12-17 - Justin Lambert - 4.0.0 - - * str2bool should return a boolean if called with a boolean (5d5a4d4) - -##### 2012-10-23 - Uwe Stuehler - 4.0.0 - - * Fix number of arguments check in flatten() (e80207b) - -##### 2013-03-11 - Jeff McCune - 4.0.0 - - * Add contributing document (96e19d0) - -##### 2013-03-04 - Raphaël Pinson - 4.0.0 - - * Add missing documentation for validate\_augeas and validate\_cmd to README.markdown (a1510a1) - -##### 2013-02-14 - Joshua Hoblitt - 4.0.0 - - * (#19272) Add has\_element() function (95cf3fe) - -##### 2013-02-07 - Raphaël Pinson - 4.0.0 - - * validate\_cmd(): Use Puppet::Util::Execution.execute when available (69248df) - -##### 2012-12-06 - Raphaël Pinson - 4.0.0 - - * Add validate\_augeas function (3a97c23) - -##### 2012-12-06 - Raphaël Pinson - 4.0.0 - - * Add validate\_cmd function (6902cc5) - -##### 2013-01-14 - David Schmitt - 4.0.0 - - * Add geppetto project definition (b3fc0a3) - -##### 2013-01-02 - Jaka Hudoklin - 4.0.0 - - * Add getparam function to get defined resource parameters (20e0e07) - -##### 2013-01-05 - Jeff McCune - 4.0.0 - - * (maint) Add Travis CI Support (d082046) - -##### 2012-12-04 - Jeff McCune - 4.0.0 - - * Clarify that stdlib 3 supports Puppet 3 (3a6085f) - -##### 2012-11-30 - Erik Dalén - 4.0.0 - - * maint: style guideline fixes (7742e5f) - -##### 2012-11-09 - James Fryman - 4.0.0 - - * puppet-lint cleanup (88acc52) - -##### 2012-11-06 - Joe Julian - 4.0.0 - - * Add function, uriescape, to URI.escape strings. Redmine #17459 (fd52b8d) - -##### 2012-09-18 - Chad Metcalf - 3.2.0 - - * Add an ensure\_packages function. (8a8c09e) - -##### 2012-11-23 - Erik Dalén - 3.2.0 - - * (#17797) min() and max() functions (9954133) - -##### 2012-05-23 - Peter Meier - 3.2.0 - - * (#14670) autorequire a file\_line resource's path (dfcee63) - -##### 2012-11-19 - Joshua Harlan Lifton - 3.2.0 - - * Add join\_keys\_to\_values function (ee0f2b3) - -##### 2012-11-17 - Joshua Harlan Lifton - 3.2.0 - - * Extend delete function for strings and hashes (7322e4d) - -##### 2012-08-03 - Gary Larizza - 3.2.0 - - * Add the pick() function (ba6dd13) - -##### 2012-03-20 - Wil Cooley - 3.2.0 - - * (#13974) Add predicate functions for interface facts (f819417) - -##### 2012-11-06 - Joe Julian - 3.2.0 - - * Add function, uriescape, to URI.escape strings. Redmine #17459 (70f4a0e) - -##### 2012-10-25 - Jeff McCune - 3.1.1 - - * (maint) Fix spec failures resulting from Facter API changes (97f836f) - -##### 2012-10-23 - Matthaus Owens - 3.1.0 - - * Add PE facts to stdlib (cdf3b05) - -##### 2012-08-16 - Jeff McCune - 3.0.1 - - * Fix accidental removal of facts\_dot\_d.rb in 3.0.0 release - -##### 2012-08-16 - Jeff McCune - 3.0.0 - - * stdlib 3.0 drops support with Puppet 2.6 - * stdlib 3.0 preserves support with Puppet 2.7 - -##### 2012-08-07 - Dan Bode - 3.0.0 - - * Add function ensure\_resource and defined\_with\_params (ba789de) - -##### 2012-07-10 - Hailee Kenney - 3.0.0 - - * (#2157) Remove facter\_dot\_d for compatibility with external facts (f92574f) - -##### 2012-04-10 - Chris Price - 3.0.0 - - * (#13693) moving logic from local spec\_helper to puppetlabs\_spec\_helper (85f96df) - -##### 2012-10-25 - Jeff McCune - 2.5.1 - - * (maint) Fix spec failures resulting from Facter API changes (97f836f) - -##### 2012-10-23 - Matthaus Owens - 2.5.0 - - * Add PE facts to stdlib (cdf3b05) - -##### 2012-08-15 - Dan Bode - 2.5.0 - - * Explicitly load functions used by ensure\_resource (9fc3063) - -##### 2012-08-13 - Dan Bode - 2.5.0 - - * Add better docs about duplicate resource failures (97d327a) - -##### 2012-08-13 - Dan Bode - 2.5.0 - - * Handle undef for parameter argument (4f8b133) - -##### 2012-08-07 - Dan Bode - 2.5.0 - - * Add function ensure\_resource and defined\_with\_params (a0cb8cd) - -##### 2012-08-20 - Jeff McCune - 2.5.0 - - * Disable tests that fail on 2.6.x due to #15912 (c81496e) - -##### 2012-08-20 - Jeff McCune - 2.5.0 - - * (Maint) Fix mis-use of rvalue functions as statements (4492913) - -##### 2012-08-20 - Jeff McCune - 2.5.0 - - * Add .rspec file to repo root (88789e8) - -##### 2012-06-07 - Chris Price - 2.4.0 - - * Add support for a 'match' parameter to file\_line (a06c0d8) - -##### 2012-08-07 - Erik Dalén - 2.4.0 - - * (#15872) Add to\_bytes function (247b69c) - -##### 2012-07-19 - Jeff McCune - 2.4.0 - - * (Maint) use PuppetlabsSpec::PuppetInternals.scope (master) (deafe88) - -##### 2012-07-10 - Hailee Kenney - 2.4.0 - - * (#2157) Make facts\_dot\_d compatible with external facts (5fb0ddc) - -##### 2012-03-16 - Steve Traylen - 2.4.0 - - * (#13205) Rotate array/string randomley based on fqdn, fqdn\_rotate() (fef247b) - -##### 2012-05-22 - Peter Meier - 2.3.3 - - * fix regression in #11017 properly (f0a62c7) - -##### 2012-05-10 - Jeff McCune - 2.3.3 - - * Fix spec tests using the new spec\_helper (7d34333) - -##### 2012-05-10 - Puppet Labs - 2.3.2 - - * Make file\_line default to ensure => present (1373e70) - * Memoize file\_line spec instance variables (20aacc5) - * Fix spec tests using the new spec\_helper (1ebfa5d) - * (#13595) initialize\_everything\_for\_tests couples modules Puppet ver (3222f35) - * (#13439) Fix MRI 1.9 issue with spec\_helper (15c5fd1) - * (#13439) Fix test failures with Puppet 2.6.x (665610b) - * (#13439) refactor spec helper for compatibility with both puppet 2.7 and master (82194ca) - * (#13494) Specify the behavior of zero padded strings (61891bb) - -##### 2012-03-29 Puppet Labs - 2.1.3 - -* (#11607) Add Rakefile to enable spec testing -* (#12377) Avoid infinite loop when retrying require json - -##### 2012-03-13 Puppet Labs - 2.3.1 - -* (#13091) Fix LoadError bug with puppet apply and puppet\_vardir fact - -##### 2012-03-12 Puppet Labs - 2.3.0 - -* Add a large number of new Puppet functions -* Backwards compatibility preserved with 2.2.x - -##### 2011-12-30 Puppet Labs - 2.2.1 - -* Documentation only release for the Forge - -##### 2011-12-30 Puppet Labs - 2.1.2 - -* Documentation only release for PE 2.0.x - -##### 2011-11-08 Puppet Labs - 2.2.0 - -* #10285 - Refactor json to use pson instead. -* Maint - Add watchr autotest script -* Maint - Make rspec tests work with Puppet 2.6.4 -* #9859 - Add root\_home fact and tests - -##### 2011-08-18 Puppet Labs - 2.1.1 - -* Change facts.d paths to match Facter 2.0 paths. -* /etc/facter/facts.d -* /etc/puppetlabs/facter/facts.d - -##### 2011-08-17 Puppet Labs - 2.1.0 - -* Add R.I. Pienaar's facts.d custom facter fact -* facts defined in /etc/facts.d and /etc/puppetlabs/facts.d are - automatically loaded now. - -##### 2011-08-04 Puppet Labs - 2.0.0 - -* Rename whole\_line to file\_line -* This is an API change and as such motivating a 2.0.0 release according to semver.org. - -##### 2011-08-04 Puppet Labs - 1.1.0 - -* Rename append\_line to whole\_line -* This is an API change and as such motivating a 1.1.0 release. - -##### 2011-08-04 Puppet Labs - 1.0.0 - -* Initial stable release -* Add validate\_array and validate\_string functions -* Make merge() function work with Ruby 1.8.5 -* Add hash merging function -* Add has\_key function -* Add loadyaml() function -* Add append\_line native - -##### 2011-06-21 Jeff McCune - 0.1.7 - -* Add validate\_hash() and getvar() functions - -##### 2011-06-15 Jeff McCune - 0.1.6 - -* Add anchor resource type to provide containment for composite classes - -##### 2011-06-03 Jeff McCune - 0.1.5 - -* Add validate\_bool() function to stdlib - -##### 0.1.4 2011-05-26 Jeff McCune - -* Move most stages after main - -##### 0.1.3 2011-05-25 Jeff McCune - -* Add validate\_re() function - -##### 0.1.2 2011-05-24 Jeff McCune - -* Update to add annotated tag - -##### 0.1.1 2011-05-24 Jeff McCune - -* Add stdlib::stages class with a standard set of stages diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/CONTRIBUTING.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/CONTRIBUTING.md deleted file mode 100644 index 5280da15ec..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/CONTRIBUTING.md +++ /dev/null @@ -1,65 +0,0 @@ -# How to contribute - -Third-party patches are essential for keeping stdlib great. We simply can't -access the huge number of platforms and myriad configurations for running -stdlib. We want to keep it as easy as possible to contribute changes that -get things working in your environment. There are a few guidelines that we -need contributors to follow so that we can have a chance of keeping on -top of things. - -## Getting Started - -* Make sure you have a [Jira account](http://tickets.puppetlabs.com) -* Make sure you have a [GitHub account](https://github.com/signup/free) -* Submit a ticket for your issue, assuming one does not already exist. - * Clearly describe the issue including steps to reproduce when it is a bug. - * Make sure you fill in the earliest version that you know has the issue. -* Fork the repository on GitHub - -## Making Changes - -* Create a topic branch from where you want to base your work. - * This is usually the master branch. - * Only target release branches if you are certain your fix must be on that - branch. - * To quickly create a topic branch based on master; `git branch - fix/master/my_contribution master` then checkout the new branch with `git - checkout fix/master/my_contribution`. Please avoid working directly on the - `master` branch. -* Make commits of logical units. -* Check for unnecessary whitespace with `git diff --check` before committing. -* Make sure your commit messages are in the proper format. - -```` - (#99999) Make the example in CONTRIBUTING imperative and concrete - - Without this patch applied the example commit message in the CONTRIBUTING - document is not a concrete example. This is a problem because the - contributor is left to imagine what the commit message should look like - based on a description rather than an example. This patch fixes the - problem by making the example concrete and imperative. - - The first line is a real life imperative statement with a ticket number - from our issue tracker. The body describes the behavior without the patch, - why this is a problem, and how the patch fixes the problem when applied. -```` - -* Make sure you have added the necessary tests for your changes. -* Run _all_ the tests to assure nothing else was accidentally broken. - -## Submitting Changes - -* Sign the [Contributor License Agreement](http://links.puppetlabs.com/cla). -* Push your changes to a topic branch in your fork of the repository. -* Submit a pull request to the repository in the puppetlabs organization. -* Update your ticket to mark that you have submitted code and are ready for it to be reviewed. - * Include a link to the pull request in the ticket - -# Additional Resources - -* [More information on contributing](http://links.puppetlabs.com/contribute-to-puppet) -* [Bug tracker (Jira)](http://tickets.puppetlabs.com) -* [Contributor License Agreement](http://links.puppetlabs.com/cla) -* [General GitHub documentation](http://help.github.com/) -* [GitHub pull request documentation](http://help.github.com/send-pull-requests/) -* #puppet-dev IRC channel on freenode.org diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Gemfile deleted file mode 100644 index bbef720351..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Gemfile +++ /dev/null @@ -1,33 +0,0 @@ -source ENV['GEM_SOURCE'] || 'https://rubygems.org' - -def location_for(place, fake_version = nil) - if place =~ /^(git[:@][^#]*)#(.*)/ - [fake_version, { :git => $1, :branch => $2, :require => false }].compact - elsif place =~ /^file:\/\/(.*)/ - ['>= 0', { :path => File.expand_path($1), :require => false }] - else - [place, { :require => false }] - end -end - -group :development, :test do - gem 'rake', '~> 10.1.0', :require => false - gem 'rspec-puppet', :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'serverspec', :require => false - gem 'puppet-lint', :require => false - gem 'pry', :require => false - gem 'simplecov', :require => false - gem 'beaker', :require => false - gem 'beaker-rspec', :require => false -end - -ENV['GEM_PUPPET_VERSION'] ||= ENV['PUPPET_GEM_VERSION'] -puppetversion = ENV['GEM_PUPPET_VERSION'] -if puppetversion - gem 'puppet', *location_for(puppetversion) -else - gem 'puppet', :require => false -end - -# vim:ft=ruby diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Gemfile.lock b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Gemfile.lock deleted file mode 100644 index cf4881eaaa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Gemfile.lock +++ /dev/null @@ -1,174 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (2.2.7) - addressable (2.3.6) - autoparse (0.3.3) - addressable (>= 2.3.1) - extlib (>= 0.9.15) - multi_json (>= 1.0.0) - aws-sdk (1.38.0) - json (~> 1.4) - nokogiri (>= 1.4.4) - uuidtools (~> 2.1) - beaker (1.10.0) - aws-sdk (~> 1.38) - blimpy (~> 0.6) - fission (~> 0.4) - google-api-client (~> 0.6.4) - inifile (~> 2.0) - json (~> 1.8) - mime-types (~> 1.25) - net-scp (~> 1.1) - net-ssh (~> 2.6) - nokogiri (= 1.5.10) - rbvmomi (= 1.8.1) - unf (~> 0.1) - beaker-rspec (2.0.0) - beaker - rspec - blimpy (0.6.7) - fog - minitar - thor - builder (3.2.2) - coderay (1.1.0) - diff-lcs (1.2.5) - docile (1.1.3) - excon (0.31.0) - extlib (0.9.16) - facter (2.0.1) - CFPropertyList (~> 2.2.6) - faraday (0.8.9) - multipart-post (~> 1.2.0) - fission (0.5.0) - CFPropertyList (~> 2.2) - fog (1.19.0) - builder - excon (~> 0.31.0) - formatador (~> 0.2.0) - mime-types - multi_json (~> 1.0) - net-scp (~> 1.1) - net-ssh (>= 2.1.3) - nokogiri (~> 1.5) - ruby-hmac - formatador (0.2.4) - google-api-client (0.6.4) - addressable (>= 2.3.2) - autoparse (>= 0.3.3) - extlib (>= 0.9.15) - faraday (~> 0.8.4) - jwt (>= 0.1.5) - launchy (>= 2.1.1) - multi_json (>= 1.0.0) - signet (~> 0.4.5) - uuidtools (>= 2.1.0) - hiera (1.3.2) - json_pure - highline (1.6.21) - inifile (2.0.2) - json (1.8.1) - json_pure (1.8.1) - jwt (0.1.11) - multi_json (>= 1.5) - kwalify (0.7.2) - launchy (2.4.2) - addressable (~> 2.3) - metaclass (0.0.4) - method_source (0.8.2) - mime-types (1.25.1) - minitar (0.5.4) - mocha (1.0.0) - metaclass (~> 0.0.1) - multi_json (1.9.2) - multipart-post (1.2.0) - net-scp (1.2.0) - net-ssh (>= 2.6.5) - net-ssh (2.8.0) - nokogiri (1.5.10) - pry (0.9.12.6) - coderay (~> 1.0) - method_source (~> 0.8) - slop (~> 3.4) - puppet (3.5.1) - facter (> 1.6, < 3) - hiera (~> 1.0) - json_pure - rgen (~> 0.6.5) - puppet-lint (0.3.2) - puppetlabs_spec_helper (0.4.1) - mocha (>= 0.10.5) - rake - rspec (>= 2.9.0) - rspec-puppet (>= 0.1.1) - rake (10.1.1) - rbvmomi (1.8.1) - builder - nokogiri (>= 1.4.1) - trollop - rgen (0.6.6) - rspec (2.13.0) - rspec-core (~> 2.13.0) - rspec-expectations (~> 2.13.0) - rspec-mocks (~> 2.13.0) - rspec-core (2.13.1) - rspec-expectations (2.13.0) - diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.13.1) - rspec-puppet (1.0.1) - rspec - rspec-system (2.5.1) - kwalify (~> 0.7.2) - net-scp (~> 1.1) - net-ssh (~> 2.6) - nokogiri (~> 1.5.9) - rbvmomi (~> 1.6) - rspec (~> 2.13) - systemu (~> 2.5) - rspec-system-puppet (2.2.1) - rspec-system (~> 2.0) - rspec-system-serverspec (1.0.0) - rspec-system (~> 2.0) - serverspec (~> 0.6.0) - ruby-hmac (0.4.0) - serverspec (0.6.30) - highline - net-ssh - rspec (~> 2.13.0) - signet (0.4.5) - addressable (>= 2.2.3) - faraday (~> 0.8.1) - jwt (>= 0.1.5) - multi_json (>= 1.0.0) - simplecov (0.8.2) - docile (~> 1.1.0) - multi_json - simplecov-html (~> 0.8.0) - simplecov-html (0.8.0) - slop (3.5.0) - systemu (2.6.4) - thor (0.19.1) - trollop (2.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.6) - uuidtools (2.1.4) - -PLATFORMS - ruby - -DEPENDENCIES - beaker - beaker-rspec - pry - puppet - puppet-lint - puppetlabs_spec_helper - rake (~> 10.1.0) - rspec-puppet - rspec-system - rspec-system-puppet - rspec-system-serverspec - serverspec - simplecov diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/LICENSE deleted file mode 100644 index ec0587c0d9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2011 Puppet Labs Inc - -and some parts: - -Copyright (C) 2011 Krzysztof Wilczynski - -Puppet Labs can be contacted at: info@puppetlabs.com - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Modulefile deleted file mode 100644 index c5da72dacc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Modulefile +++ /dev/null @@ -1,11 +0,0 @@ -name 'puppetlabs-stdlib' -version '4.2.1' -source 'git://github.com/puppetlabs/puppetlabs-stdlib.git' -author 'puppetlabs' -license 'Apache 2.0' -summary 'Puppet Module Standard Library' -description 'Standard Library for Puppet Modules' -project_page 'https://github.com/puppetlabs/puppetlabs-stdlib' - -## Add dependencies, if any: -# dependency 'username/name', '>= 1.2.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/README.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/README.markdown deleted file mode 100644 index e9ad53b8b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/README.markdown +++ /dev/null @@ -1,1304 +0,0 @@ -# Puppet Labs Standard Library # - -[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-stdlib.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-stdlib) - -This module provides a "standard library" of resources for developing Puppet -Modules. This modules will include the following additions to Puppet - - * Stages - * Facts - * Functions - * Defined resource types - * Types - * Providers - -This module is officially curated and provided by Puppet Labs. The modules -Puppet Labs writes and distributes will make heavy use of this standard -library. - -To report or research a bug with any part of this module, please go to -[http://tickets.puppetlabs.com/browse/PUP](http://tickets.puppetlabs.com/browse/PUP) - -# Versions # - -This module follows semver.org (v1.0.0) versioning guidelines. The standard -library module is released as part of [Puppet -Enterprise](http://puppetlabs.com/puppet/puppet-enterprise/) and as a result -older versions of Puppet Enterprise that Puppet Labs still supports will have -bugfix maintenance branches periodically "merged up" into master. The current -list of integration branches are: - - * v2.1.x (v2.1.1 released in PE 1) - * v2.2.x (Never released as part of PE, only to the Forge) - * v2.3.x (Released in PE 2) - * v3.0.x (Released in PE 3) - * v4.0.x (Maintains compatibility with v3.x despite the major semantic version bump. Compatible with Puppet 2.7.x) - * v5.x (To be released when stdlib can drop support for Puppet 2.7.x. Please see [this discussion](https://github.com/puppetlabs/puppetlabs-stdlib/pull/176#issuecomment-30251414)) - * master (mainline development branch) - -The first Puppet Enterprise version including the stdlib module is Puppet -Enterprise 1.2. - -# Compatibility # - -Puppet Versions | < 2.6 | 2.6 | 2.7 | 3.x | -:---------------|:-----:|:---:|:---:|:----: -**stdlib 2.x** | no | **yes** | **yes** | no -**stdlib 3.x** | no | no | **yes** | **yes** -**stdlib 4.x** | no | no | **yes** | **yes** - -The stdlib module does not work with Puppet versions released prior to Puppet -2.6.0. - -## stdlib 2.x ## - -All stdlib releases in the 2.0 major version support Puppet 2.6 and Puppet 2.7. - -## stdlib 3.x ## - -The 3.0 major release of stdlib drops support for Puppet 2.6. Stdlib 3.x -supports Puppet 2 and Puppet 3. - -## stdlib 4.x ## - -The 4.0 major release of stdlib was intended to drop support for Puppet 2.7, -but the impact on end users was too high. The decision was made to treat -stdlib 4.x as a continuation of stdlib 3.x support. Stdlib 4.x supports Puppet -2.7 and 3. Notably, ruby 1.8.5 is no longer supported though ruby -1.8.7, 1.9.3, and 2.0.0 are fully supported. - -# Functions # - -abs ---- -Returns the absolute value of a number, for example -34.56 becomes -34.56. Takes a single integer and float value as an argument. - - -- *Type*: rvalue - -any2array ---------- -This converts any object to an array containing that object. Empty argument -lists are converted to an empty array. Arrays are left untouched. Hashes are -converted to arrays of alternating keys and values. - - -- *Type*: rvalue - -base64 --------- -Converts a string to and from base64 encoding. -Requires an action ['encode','decode'] and either a plain or base64 encoded -string - - -- *Type*: rvalue - -bool2num --------- -Converts a boolean to a number. Converts the values: -false, f, 0, n, and no to 0 -true, t, 1, y, and yes to 1 - Requires a single boolean or string as an input. - - -- *Type*: rvalue - -capitalize ----------- -Capitalizes the first letter of a string or array of strings. -Requires either a single string or an array as an input. - - -- *Type*: rvalue - -chomp ------ -Removes the record separator from the end of a string or an array of -strings, for example `hello\n` becomes `hello`. -Requires a single string or array as an input. - - -- *Type*: rvalue - -chop ----- -Returns a new string with the last character removed. If the string ends -with `\r\n`, both characters are removed. Applying chop to an empty -string returns an empty string. If you wish to merely remove record -separators then you should use the `chomp` function. -Requires a string or array of strings as input. - - -- *Type*: rvalue - -concat ------- -Appends the contents of array 2 onto array 1. - -*Example:* - - concat(['1','2','3'],['4','5','6']) - -Would result in: - - ['1','2','3','4','5','6'] - - concat(['1','2','3'],'4') - -Would result in: - - ['1','2','3','4'] - -- *Type*: rvalue - -count ------ -Takes an array as first argument and an optional second argument. -Count the number of elements in array that matches second argument. -If called with only an array it counts the number of elements that are not nil/undef. - - -- *Type*: rvalue - -defined_with_params -------------------- -Takes a resource reference and an optional hash of attributes. - -Returns true if a resource with the specified attributes has already been added -to the catalog, and false otherwise. - - user { 'dan': - ensure => present, - } - - if ! defined_with_params(User[dan], {'ensure' => 'present' }) { - user { 'dan': ensure => present, } - } - - -- *Type*: rvalue - -delete ------- -Deletes all instances of a given element from an array, substring from a -string, or key from a hash. - -*Examples:* - - delete(['a','b','c','b'], 'b') - Would return: ['a','c'] - - delete({'a'=>1,'b'=>2,'c'=>3}, 'b') - Would return: {'a'=>1,'c'=>3} - - delete('abracadabra', 'bra') - Would return: 'acada' - - -- *Type*: rvalue - -delete_at ---------- -Deletes a determined indexed value from an array. - -*Examples:* - - delete_at(['a','b','c'], 1) - -Would return: ['a','c'] - - -- *Type*: rvalue - -delete_values -------------- -Deletes all instances of a given value from a hash. - -*Examples:* - - delete_values({'a'=>'A','b'=>'B','c'=>'C','B'=>'D'}, 'B') - -Would return: {'a'=>'A','c'=>'C','B'=>'D'} - - -- *Type*: rvalue - -delete_undef_values -------------------- -Deletes all instances of the undef value from an array or hash. - -*Examples:* - - $hash = delete_undef_values({a=>'A', b=>'', c=>undef, d => false}) - -Would return: {a => 'A', b => '', d => false} - - $array = delete_undef_values(['A','',undef,false]) - -Would return: ['A','',false] - -- *Type*: rvalue - -difference ----------- -This function returns the difference between two arrays. -The returned array is a copy of the original array, removing any items that -also appear in the second array. - -*Examples:* - - difference(["a","b","c"],["b","c","d"]) - -Would return: ["a"] - -dirname -------- -Returns the `dirname` of a path. - -*Examples:* - - dirname('/path/to/a/file.ext') - -Would return: '/path/to/a' - -downcase --------- -Converts the case of a string or all strings in an array to lower case. - - -- *Type*: rvalue - -empty ------ -Returns true if the variable is empty. - - -- *Type*: rvalue - -ensure_packages ---------------- -Takes a list of packages and only installs them if they don't already exist. -It optionally takes a hash as a second parameter that will be passed as the -third argument to the ensure_resource() function. - - -- *Type*: statement - -ensure_resource ---------------- -Takes a resource type, title, and a list of attributes that describe a -resource. - - user { 'dan': - ensure => present, - } - -This example only creates the resource if it does not already exist: - - ensure_resource('user', 'dan', {'ensure' => 'present' }) - -If the resource already exists but does not match the specified parameters, -this function will attempt to recreate the resource leading to a duplicate -resource definition error. - -An array of resources can also be passed in and each will be created with -the type and parameters specified if it doesn't already exist. - - ensure_resource('user', ['dan','alex'], {'ensure' => 'present'}) - - - -- *Type*: statement - -file_line ---------- -This resource ensures that a given line is contained within a file. You can also use -"match" to replace existing lines. - -*Examples:* - - file_line { 'sudo_rule': - path => '/etc/sudoers', - line => '%sudo ALL=(ALL) ALL', - } - - file_line { 'change_mount': - path => '/etc/fstab', - line => '10.0.0.1:/vol/data /opt/data nfs defaults 0 0', - match => '^172.16.17.2:/vol/old', - } - -- *Type*: resource - -flatten -------- -This function flattens any deeply nested arrays and returns a single flat array -as a result. - -*Examples:* - - flatten(['a', ['b', ['c']]]) - -Would return: ['a','b','c'] - - -- *Type*: rvalue - -floor ------ -Returns the largest integer less or equal to the argument. -Takes a single numeric value as an argument. - - -- *Type*: rvalue - -fqdn_rotate ------------ -Rotates an array a random number of times based on a nodes fqdn. - - -- *Type*: rvalue - -get_module_path ---------------- -Returns the absolute path of the specified module for the current -environment. - -Example: - $module_path = get_module_path('stdlib') - - -- *Type*: rvalue - -getparam --------- -Takes a resource reference and name of the parameter and -returns value of resource's parameter. - -*Examples:* - - define example_resource($param) { - } - - example_resource { "example_resource_instance": - param => "param_value" - } - - getparam(Example_resource["example_resource_instance"], "param") - -Would return: param_value - - -- *Type*: rvalue - -getvar ------- -Lookup a variable in a remote namespace. - -For example: - - $foo = getvar('site::data::foo') - # Equivalent to $foo = $site::data::foo - -This is useful if the namespace itself is stored in a string: - - $datalocation = 'site::data' - $bar = getvar("${datalocation}::bar") - # Equivalent to $bar = $site::data::bar - - -- *Type*: rvalue - -grep ----- -This function searches through an array and returns any elements that match -the provided regular expression. - -*Examples:* - - grep(['aaa','bbb','ccc','aaaddd'], 'aaa') - -Would return: - - ['aaa','aaaddd'] - - -- *Type*: rvalue - -has_interface_with ------------------- -Returns boolean based on kind and value: -* macaddress -* netmask -* ipaddress -* network - -*Examples:* - - has_interface_with("macaddress", "x:x:x:x:x:x") - has_interface_with("ipaddress", "127.0.0.1") => true - -etc. - -If no "kind" is given, then the presence of the interface is checked: - - has_interface_with("lo") => true - - -- *Type*: rvalue - -has_ip_address --------------- -Returns true if the client has the requested IP address on some interface. - -This function iterates through the 'interfaces' fact and checks the -'ipaddress_IFACE' facts, performing a simple string comparison. - - -- *Type*: rvalue - -has_ip_network --------------- -Returns true if the client has an IP address within the requested network. - -This function iterates through the 'interfaces' fact and checks the -'network_IFACE' facts, performing a simple string comparision. - - -- *Type*: rvalue - -has_key -------- -Determine if a hash has a certain key value. - -Example: - - $my_hash = {'key_one' => 'value_one'} - if has_key($my_hash, 'key_two') { - notice('we will not reach here') - } - if has_key($my_hash, 'key_one') { - notice('this will be printed') - } - - - -- *Type*: rvalue - -hash ----- -This function converts an array into a hash. - -*Examples:* - - hash(['a',1,'b',2,'c',3]) - -Would return: {'a'=>1,'b'=>2,'c'=>3} - - -- *Type*: rvalue - -intersection ------------ -This function returns an array an intersection of two. - -*Examples:* - - intersection(["a","b","c"],["b","c","d"]) - -Would return: ["b","c"] - -is_array --------- -Returns true if the variable passed to this function is an array. - -- *Type*: rvalue - -is_bool --------- -Returns true if the variable passed to this function is a boolean. - -- *Type*: rvalue - -is_domain_name --------------- -Returns true if the string passed to this function is a syntactically correct domain name. - -- *Type*: rvalue - -is_float --------- -Returns true if the variable passed to this function is a float. - -- *Type*: rvalue - -is_function_available ---------------------- -This function accepts a string as an argument, determines whether the -Puppet runtime has access to a function by that name. It returns a -true if the function exists, false if not. - -- *Type*: rvalue - -is_hash -------- -Returns true if the variable passed to this function is a hash. - -- *Type*: rvalue - -is_integer ----------- -Returns true if the variable returned to this string is an integer. - -- *Type*: rvalue - -is_ip_address -------------- -Returns true if the string passed to this function is a valid IP address. - -- *Type*: rvalue - -is_mac_address --------------- -Returns true if the string passed to this function is a valid mac address. - -- *Type*: rvalue - -is_numeric ----------- -Returns true if the variable passed to this function is a number. - -- *Type*: rvalue - -is_string ---------- -Returns true if the variable passed to this function is a string. - -- *Type*: rvalue - -join ----- -This function joins an array into a string using a separator. - -*Examples:* - - join(['a','b','c'], ",") - -Would result in: "a,b,c" - -- *Type*: rvalue - -join_keys_to_values -------------------- -This function joins each key of a hash to that key's corresponding value with a -separator. Keys and values are cast to strings. The return value is an array in -which each element is one joined key/value pair. - -*Examples:* - - join_keys_to_values({'a'=>1,'b'=>2}, " is ") - -Would result in: ["a is 1","b is 2"] - -- *Type*: rvalue - -keys ----- -Returns the keys of a hash as an array. - -- *Type*: rvalue - -loadyaml --------- -Load a YAML file containing an array, string, or hash, and return the data -in the corresponding native data type. - -For example: - - $myhash = loadyaml('/etc/puppet/data/myhash.yaml') - - -- *Type*: rvalue - -lstrip ------- -Strips leading spaces to the left of a string. - -- *Type*: rvalue - -max ---- -Returns the highest value of all arguments. -Requires at least one argument. - -- *Type*: rvalue - -member ------- -This function determines if a variable is a member of an array. - -*Examples:* - - member(['a','b'], 'b') - -Would return: true - - member(['a','b'], 'c') - -Would return: false - -- *Type*: rvalue - -merge ------ -Merges two or more hashes together and returns the resulting hash. - -For example: - - $hash1 = {'one' => 1, 'two' => 2} - $hash2 = {'two' => 'dos', 'three' => 'tres'} - $merged_hash = merge($hash1, $hash2) - # The resulting hash is equivalent to: - # $merged_hash = {'one' => 1, 'two' => 'dos', 'three' => 'tres'} - -When there is a duplicate key, the key in the rightmost hash will "win." - -- *Type*: rvalue - -min ---- -Returns the lowest value of all arguments. -Requires at least one argument. - -- *Type*: rvalue - -num2bool --------- -This function converts a number or a string representation of a number into a -true boolean. Zero or anything non-numeric becomes false. Numbers higher then 0 -become true. - -- *Type*: rvalue - -parsejson ---------- -This function accepts JSON as a string and converts into the correct Puppet -structure. - -- *Type*: rvalue - -parseyaml ---------- -This function accepts YAML as a string and converts it into the correct -Puppet structure. - -- *Type*: rvalue - -pick ----- -This function is similar to a coalesce function in SQL in that it will return -the first value in a list of values that is not undefined or an empty string -(two things in Puppet that will return a boolean false value). Typically, -this function is used to check for a value in the Puppet Dashboard/Enterprise -Console, and failover to a default value like the following: - - $real_jenkins_version = pick($::jenkins_version, '1.449') - -The value of $real_jenkins_version will first look for a top-scope variable -called 'jenkins_version' (note that parameters set in the Puppet Dashboard/ -Enterprise Console are brought into Puppet as top-scope variables), and, -failing that, will use a default value of 1.449. - -- *Type*: rvalue - -prefix ------- -This function applies a prefix to all elements in an array. - -*Examples:* - - prefix(['a','b','c'], 'p') - -Will return: ['pa','pb','pc'] - -- *Type*: rvalue - -range ------ -When given range in the form of (start, stop) it will extrapolate a range as -an array. - -*Examples:* - - range("0", "9") - -Will return: [0,1,2,3,4,5,6,7,8,9] - - range("00", "09") - -Will return: [0,1,2,3,4,5,6,7,8,9] - Zero padded strings are converted to -integers automatically - - range("a", "c") - -Will return: ["a","b","c"] - - range("host01", "host10") - -Will return: ["host01", "host02", ..., "host09", "host10"] - -- *Type*: rvalue - -reject ------- -This function searches through an array and rejects all elements that match -the provided regular expression. - -*Examples:* - - reject(['aaa','bbb','ccc','aaaddd'], 'aaa') - -Would return: - - ['bbb','ccc'] - - -- *Type*: rvalue - -reverse -------- -Reverses the order of a string or array. - -- *Type*: rvalue - -rstrip ------- -Strips leading spaces to the right of the string. - -- *Type*: rvalue - -shuffle -------- -Randomizes the order of a string or array elements. - -- *Type*: rvalue - -size ----- -Returns the number of elements in a string or array. - -- *Type*: rvalue - -sort ----- -Sorts strings and arrays lexically. - -- *Type*: rvalue - -squeeze -------- -Returns a new string where runs of the same character that occur in this set -are replaced by a single character. - -- *Type*: rvalue - -str2bool --------- -This converts a string to a boolean. This attempts to convert strings that -contain things like: y, 1, t, true to 'true' and strings that contain things -like: 0, f, n, false, no to 'false'. - - -- *Type*: rvalue - -str2saltedsha512 ----------------- -This converts a string to a salted-SHA512 password hash (which is used for -OS X versions >= 10.7). Given any simple string, you will get a hex version -of a salted-SHA512 password hash that can be inserted into your Puppet -manifests as a valid password attribute. - - -- *Type*: rvalue - -strftime --------- -This function returns formatted time. - -*Examples:* - -To return the time since epoch: - - strftime("%s") - -To return the date: - - strftime("%Y-%m-%d") - -*Format meaning:* - - %a - The abbreviated weekday name (``Sun'') - %A - The full weekday name (``Sunday'') - %b - The abbreviated month name (``Jan'') - %B - The full month name (``January'') - %c - The preferred local date and time representation - %C - Century (20 in 2009) - %d - Day of the month (01..31) - %D - Date (%m/%d/%y) - %e - Day of the month, blank-padded ( 1..31) - %F - Equivalent to %Y-%m-%d (the ISO 8601 date format) - %h - Equivalent to %b - %H - Hour of the day, 24-hour clock (00..23) - %I - Hour of the day, 12-hour clock (01..12) - %j - Day of the year (001..366) - %k - hour, 24-hour clock, blank-padded ( 0..23) - %l - hour, 12-hour clock, blank-padded ( 0..12) - %L - Millisecond of the second (000..999) - %m - Month of the year (01..12) - %M - Minute of the hour (00..59) - %n - Newline (\n) - %N - Fractional seconds digits, default is 9 digits (nanosecond) - %3N millisecond (3 digits) - %6N microsecond (6 digits) - %9N nanosecond (9 digits) - %p - Meridian indicator (``AM'' or ``PM'') - %P - Meridian indicator (``am'' or ``pm'') - %r - time, 12-hour (same as %I:%M:%S %p) - %R - time, 24-hour (%H:%M) - %s - Number of seconds since 1970-01-01 00:00:00 UTC. - %S - Second of the minute (00..60) - %t - Tab character ( ) - %T - time, 24-hour (%H:%M:%S) - %u - Day of the week as a decimal, Monday being 1. (1..7) - %U - Week number of the current year, - starting with the first Sunday as the first - day of the first week (00..53) - %v - VMS date (%e-%b-%Y) - %V - Week number of year according to ISO 8601 (01..53) - %W - Week number of the current year, - starting with the first Monday as the first - day of the first week (00..53) - %w - Day of the week (Sunday is 0, 0..6) - %x - Preferred representation for the date alone, no time - %X - Preferred representation for the time alone, no date - %y - Year without a century (00..99) - %Y - Year with century - %z - Time zone as hour offset from UTC (e.g. +0900) - %Z - Time zone name - %% - Literal ``%'' character - - -- *Type*: rvalue - -strip ------ -This function removes leading and trailing whitespace from a string or from -every string inside an array. - -*Examples:* - - strip(" aaa ") - -Would result in: "aaa" - - -- *Type*: rvalue - -suffix ------- -This function applies a suffix to all elements in an array. - -*Examples:* - - suffix(['a','b','c'], 'p') - -Will return: ['ap','bp','cp'] - - -- *Type*: rvalue - -swapcase --------- -This function will swap the existing case of a string. - -*Examples:* - - swapcase("aBcD") - -Would result in: "AbCd" - - -- *Type*: rvalue - -time ----- -This function will return the current time since epoch as an integer. - -*Examples:* - - time() - -Will return something like: 1311972653 - - -- *Type*: rvalue - -to_bytes --------- -Converts the argument into bytes, for example 4 kB becomes 4096. -Takes a single string value as an argument. - - -- *Type*: rvalue - -type ----- -Returns the type when passed a variable. Type can be one of: - -* string -* array -* hash -* float -* integer -* boolean - - -- *Type*: rvalue - -union ------ -This function returns a union of two arrays. - -*Examples:* - - union(["a","b","c"],["b","c","d"]) - -Would return: ["a","b","c","d"] - - -unique ------- -This function will remove duplicates from strings and arrays. - -*Examples:* - - unique("aabbcc") - -Will return: - - abc - -You can also use this with arrays: - - unique(["a","a","b","b","c","c"]) - -This returns: - - ["a","b","c"] - - -- *Type*: rvalue - -upcase ------- -Converts a string or an array of strings to uppercase. - -*Examples:* - - upcase("abcd") - -Will return: - - ABCD - - -- *Type*: rvalue - -uriescape ---------- -Urlencodes a string or array of strings. -Requires either a single string or an array as an input. - - -- *Type*: rvalue - -validate_absolute_path ----------------------- -Validate the string represents an absolute path in the filesystem. This function works -for windows and unix style paths. - -The following values will pass: - - $my_path = "C:/Program Files (x86)/Puppet Labs/Puppet" - validate_absolute_path($my_path) - $my_path2 = "/var/lib/puppet" - validate_absolute_path($my_path2) - - -The following values will fail, causing compilation to abort: - - validate_absolute_path(true) - validate_absolute_path([ 'var/lib/puppet', '/var/foo' ]) - validate_absolute_path([ '/var/lib/puppet', 'var/foo' ]) - $undefined = undef - validate_absolute_path($undefined) - - - -- *Type*: statement - -validate_array --------------- -Validate that all passed values are array data structures. Abort catalog -compilation if any value fails this check. - -The following values will pass: - - $my_array = [ 'one', 'two' ] - validate_array($my_array) - -The following values will fail, causing compilation to abort: - - validate_array(true) - validate_array('some_string') - $undefined = undef - validate_array($undefined) - - - -- *Type*: statement - -validate_augeas ---------------- -Perform validation of a string using an Augeas lens -The first argument of this function should be a string to -test, and the second argument should be the name of the Augeas lens to use. -If Augeas fails to parse the string with the lens, the compilation will -abort with a parse error. - -A third argument can be specified, listing paths which should -not be found in the file. The `$file` variable points to the location -of the temporary file being tested in the Augeas tree. - -For example, if you want to make sure your passwd content never contains -a user `foo`, you could write: - - validate_augeas($passwdcontent, 'Passwd.lns', ['$file/foo']) - -Or if you wanted to ensure that no users used the '/bin/barsh' shell, -you could use: - - validate_augeas($passwdcontent, 'Passwd.lns', ['$file/*[shell="/bin/barsh"]'] - -If a fourth argument is specified, this will be the error message raised and -seen by the user. - -A helpful error message can be returned like this: - - validate_augeas($sudoerscontent, 'Sudoers.lns', [], 'Failed to validate sudoers content with Augeas') - - - -- *Type*: statement - -validate_bool -------------- -Validate that all passed values are either true or false. Abort catalog -compilation if any value fails this check. - -The following values will pass: - - $iamtrue = true - validate_bool(true) - validate_bool(true, true, false, $iamtrue) - -The following values will fail, causing compilation to abort: - - $some_array = [ true ] - validate_bool("false") - validate_bool("true") - validate_bool($some_array) - - - -- *Type*: statement - -validate_cmd ------------- -Perform validation of a string with an external command. -The first argument of this function should be a string to -test, and the second argument should be a path to a test command -taking a file as last argument. If the command, launched against -a tempfile containing the passed string, returns a non-null value, -compilation will abort with a parse error. - -If a third argument is specified, this will be the error message raised and -seen by the user. - -A helpful error message can be returned like this: - -Example: - - validate_cmd($sudoerscontent, '/usr/sbin/visudo -c -f', 'Visudo failed to validate sudoers content') - - - -- *Type*: statement - -validate_hash -------------- -Validate that all passed values are hash data structures. Abort catalog -compilation if any value fails this check. - -The following values will pass: - - $my_hash = { 'one' => 'two' } - validate_hash($my_hash) - -The following values will fail, causing compilation to abort: - - validate_hash(true) - validate_hash('some_string') - $undefined = undef - validate_hash($undefined) - - - -- *Type*: statement - -validate_re ------------ -Perform simple validation of a string against one or more regular -expressions. The first argument of this function should be a string to -test, and the second argument should be a stringified regular expression -(without the // delimiters) or an array of regular expressions. If none -of the regular expressions match the string passed in, compilation will -abort with a parse error. - -If a third argument is specified, this will be the error message raised and -seen by the user. - -The following strings will validate against the regular expressions: - - validate_re('one', '^one$') - validate_re('one', [ '^one', '^two' ]) - -The following strings will fail to validate, causing compilation to abort: - - validate_re('one', [ '^two', '^three' ]) - -A helpful error message can be returned like this: - - validate_re($::puppetversion, '^2.7', 'The $puppetversion fact value does not match 2.7') - - - -- *Type*: statement - -validate_slength ----------------- -Validate that the first argument is a string (or an array of strings), and -less/equal to than the length of the second argument. It fails if the first -argument is not a string or array of strings, and if arg 2 is not convertable -to a number. - -The following values will pass: - - validate_slength("discombobulate",17) - validate_slength(["discombobulate","moo"],17) - -The following values will not: - - validate_slength("discombobulate",1) - validate_slength(["discombobulate","thermometer"],5) - - - -- *Type*: statement - -validate_string ---------------- -Validate that all passed values are string data structures. Abort catalog -compilation if any value fails this check. - -The following values will pass: - - $my_string = "one two" - validate_string($my_string, 'three') - -The following values will fail, causing compilation to abort: - - validate_string(true) - validate_string([ 'some', 'array' ]) - $undefined = undef - validate_string($undefined) - - -- *Type*: statement - -values ------- -When given a hash this function will return the values of that hash. - -*Examples:* - - $hash = { - 'a' => 1, - 'b' => 2, - 'c' => 3, - } - values($hash) - -This example would return: - - [1,2,3] - - -- *Type*: rvalue - -values_at ---------- -Finds value inside an array based on location. - -The first argument is the array you want to analyze, and the second element can -be a combination of: - -* A single numeric index -* A range in the form of 'start-stop' (eg. 4-9) -* An array combining the above - -*Examples*: - - values_at(['a','b','c'], 2) - -Would return ['c']. - - values_at(['a','b','c'], ["0-1"]) - -Would return ['a','b']. - - values_at(['a','b','c','d','e'], [0, "2-3"]) - -Would return ['a','c','d']. - - -- *Type*: rvalue - -zip ---- -Takes one element from first array and merges corresponding elements from second array. This generates a sequence of n-element arrays, where n is one more than the count of arguments. - -*Example:* - - zip(['1','2','3'],['4','5','6']) - -Would result in: - - ["1", "4"], ["2", "5"], ["3", "6"] - - -- *Type*: rvalue - -*This page autogenerated on 2013-04-11 13:54:25 -0700* diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/README_DEVELOPER.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/README_DEVELOPER.markdown deleted file mode 100644 index 04349ed79b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/README_DEVELOPER.markdown +++ /dev/null @@ -1,35 +0,0 @@ -Puppet Specific Facts -===================== - -Facter is meant to stand alone and apart from Puppet. However, Facter often -runs inside Puppet and all custom facts included in the stdlib module will -almost always be evaluated in the context of Puppet and Facter working -together. - -Still, we don't want to write custom facts that blow up in the users face if -Puppet is not loaded in memory. This is often the case if the user runs -`facter` without also supplying the `--puppet` flag. - -Ah! But Jeff, the custom fact won't be in the `$LOAD_PATH` unless the user -supplies `--facter`! You might say... - -Not (always) true I say! If the user happens to have a CWD of -`/stdlib/lib` then the facts will automatically be evaluated and -blow up. - -In any event, it's pretty easy to write a fact that has no value if Puppet is -not loaded. Simply do it like this: - - Facter.add(:node_vardir) do - setcode do - # This will be nil if Puppet is not available. - Facter::Util::PuppetSettings.with_puppet do - Puppet[:vardir] - end - end - end - -The `Facter::Util::PuppetSettings.with_puppet` method accepts a block and -yields to it only if the Puppet library is loaded. If the Puppet library is -not loaded, then the method silently returns `nil` which Facter interprets as -an undefined fact value. The net effect is that the fact won't be set. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/README_SPECS.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/README_SPECS.markdown deleted file mode 100644 index 917b6310dd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/README_SPECS.markdown +++ /dev/null @@ -1,7 +0,0 @@ -NOTE -==== - -This project's specs depend on puppet core, and thus they require the -`puppetlabs_spec_helper` project. For more information please see the README -in that project, which can be found here: [puppetlabs spec -helper](https://github.com/puppetlabs/puppetlabs_spec_helper) diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/RELEASE_PROCESS.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/RELEASE_PROCESS.markdown deleted file mode 100644 index 0f9328ed0f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/RELEASE_PROCESS.markdown +++ /dev/null @@ -1,24 +0,0 @@ -# Contributing to this module # - - * Work in a topic branch - * Submit a github pull request - * Address any comments / feeback - * Merge into master using --no-ff - -# Releasing this module # - - * This module adheres to http://semver.org/ - * Look for API breaking changes using git diff vX.Y.Z..master - * If no API breaking changes, the minor version may be bumped. - * If there are API breaking changes, the major version must be bumped. - * If there are only small minor changes, the patch version may be bumped. - * Update the CHANGELOG - * Update the Modulefile - * Commit these changes with a message along the lines of "Update CHANGELOG and - Modulefile for release" - * Create an annotated tag with git tag -a vX.Y.Z -m 'version X.Y.Z' (NOTE the - leading v as per semver.org) - * Push the tag with git push origin --tags - * Build a new package with puppet-module or the rake build task if it exists - * Publish the new package to the forge - * Bonus points for an announcement to puppet-users. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Rakefile deleted file mode 100644 index 4ed1327a3b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/Rakefile +++ /dev/null @@ -1,18 +0,0 @@ -require 'rubygems' -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' -PuppetLint.configuration.send('disable_80chars') -PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] - -desc "Validate manifests, templates, and ruby files in lib." -task :validate do - Dir['manifests/**/*.pp'].each do |manifest| - sh "puppet parser validate --noop #{manifest}" - end - Dir['lib/**/*.rb'].each do |lib_file| - sh "ruby -c #{lib_file}" - end - Dir['templates/**/*.erb'].each do |template| - sh "erb -P -x -T '-' #{template} | ruby -c" - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/facter_dot_d.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/facter_dot_d.rb deleted file mode 100644 index 2c096b049d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/facter_dot_d.rb +++ /dev/null @@ -1,202 +0,0 @@ -# A Facter plugin that loads facts from /etc/facter/facts.d -# and /etc/puppetlabs/facter/facts.d. -# -# Facts can be in the form of JSON, YAML or Text files -# and any executable that returns key=value pairs. -# -# In the case of scripts you can also create a file that -# contains a cache TTL. For foo.sh store the ttl as just -# a number in foo.sh.ttl -# -# The cache is stored in /tmp/facts_cache.yaml as a mode -# 600 file and will have the end result of not calling your -# fact scripts more often than is needed - -class Facter::Util::DotD - require 'yaml' - - def initialize(dir="/etc/facts.d", cache_file="/tmp/facts_cache.yml") - @dir = dir - @cache_file = cache_file - @cache = nil - @types = {".txt" => :txt, ".json" => :json, ".yaml" => :yaml} - end - - def entries - Dir.entries(@dir).reject{|f| f =~ /^\.|\.ttl$/}.sort.map {|f| File.join(@dir, f) } - rescue - [] - end - - def fact_type(file) - extension = File.extname(file) - - type = @types[extension] || :unknown - - type = :script if type == :unknown && File.executable?(file) - - return type - end - - def txt_parser(file) - File.readlines(file).each do |line| - if line =~ /^([^=]+)=(.+)$/ - var = $1; val = $2 - - Facter.add(var) do - setcode { val } - end - end - end - rescue Exception => e - Facter.warn("Failed to handle #{file} as text facts: #{e.class}: #{e}") - end - - def json_parser(file) - begin - require 'json' - rescue LoadError - retry if require 'rubygems' - raise - end - - JSON.load(File.read(file)).each_pair do |f, v| - Facter.add(f) do - setcode { v } - end - end - rescue Exception => e - Facter.warn("Failed to handle #{file} as json facts: #{e.class}: #{e}") - end - - def yaml_parser(file) - require 'yaml' - - YAML.load_file(file).each_pair do |f, v| - Facter.add(f) do - setcode { v } - end - end - rescue Exception => e - Facter.warn("Failed to handle #{file} as yaml facts: #{e.class}: #{e}") - end - - def script_parser(file) - result = cache_lookup(file) - ttl = cache_time(file) - - unless result - result = Facter::Util::Resolution.exec(file) - - if ttl > 0 - Facter.debug("Updating cache for #{file}") - cache_store(file, result) - cache_save! - end - else - Facter.debug("Using cached data for #{file}") - end - - result.split("\n").each do |line| - if line =~ /^(.+)=(.+)$/ - var = $1; val = $2 - - Facter.add(var) do - setcode { val } - end - end - end - rescue Exception => e - Facter.warn("Failed to handle #{file} as script facts: #{e.class}: #{e}") - Facter.debug(e.backtrace.join("\n\t")) - end - - def cache_save! - cache = load_cache - File.open(@cache_file, "w", 0600) {|f| f.write(YAML.dump(cache)) } - rescue - end - - def cache_store(file, data) - load_cache - - @cache[file] = {:data => data, :stored => Time.now.to_i} - rescue - end - - def cache_lookup(file) - cache = load_cache - - return nil if cache.empty? - - ttl = cache_time(file) - - if cache[file] - now = Time.now.to_i - - return cache[file][:data] if ttl == -1 - return cache[file][:data] if (now - cache[file][:stored]) <= ttl - return nil - else - return nil - end - rescue - return nil - end - - def cache_time(file) - meta = file + ".ttl" - - return File.read(meta).chomp.to_i - rescue - return 0 - end - - def load_cache - unless @cache - if File.exist?(@cache_file) - @cache = YAML.load_file(@cache_file) - else - @cache = {} - end - end - - return @cache - rescue - @cache = {} - return @cache - end - - def create - entries.each do |fact| - type = fact_type(fact) - parser = "#{type}_parser" - - if respond_to?("#{type}_parser") - Facter.debug("Parsing #{fact} using #{parser}") - - send(parser, fact) - end - end - end -end - - -mdata = Facter.version.match(/(\d+)\.(\d+)\.(\d+)/) -if mdata - (major, minor, patch) = mdata.captures.map { |v| v.to_i } - if major < 2 - # Facter 1.7 introduced external facts support directly - unless major == 1 and minor > 6 - Facter::Util::DotD.new("/etc/facter/facts.d").create - Facter::Util::DotD.new("/etc/puppetlabs/facter/facts.d").create - - # Windows has a different configuration directory that defaults to a vendor - # specific sub directory of the %COMMON_APPDATA% directory. - if Dir.const_defined? 'COMMON_APPDATA' then - windows_facts_dot_d = File.join(Dir::COMMON_APPDATA, 'PuppetLabs', 'facter', 'facts.d') - Facter::Util::DotD.new(windows_facts_dot_d).create - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/pe_version.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/pe_version.rb deleted file mode 100644 index 0cc0f64e95..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/pe_version.rb +++ /dev/null @@ -1,53 +0,0 @@ -# Fact: is_pe, pe_version, pe_major_version, pe_minor_version, pe_patch_version -# -# Purpose: Return various facts about the PE state of the system -# -# Resolution: Uses a regex match against puppetversion to determine whether the -# machine has Puppet Enterprise installed, and what version (overall, major, -# minor, patch) is installed. -# -# Caveats: -# -Facter.add("pe_version") do - setcode do - pe_ver = Facter.value("puppetversion").match(/Puppet Enterprise (\d+\.\d+\.\d+)/) - pe_ver[1] if pe_ver - end -end - -Facter.add("is_pe") do - setcode do - if Facter.value(:pe_version).to_s.empty? then - false - else - true - end - end -end - -Facter.add("pe_major_version") do - confine :is_pe => true - setcode do - if pe_version = Facter.value(:pe_version) - pe_version.to_s.split('.')[0] - end - end -end - -Facter.add("pe_minor_version") do - confine :is_pe => true - setcode do - if pe_version = Facter.value(:pe_version) - pe_version.to_s.split('.')[1] - end - end -end - -Facter.add("pe_patch_version") do - confine :is_pe => true - setcode do - if pe_version = Facter.value(:pe_version) - pe_version.to_s.split('.')[2] - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/puppet_vardir.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/puppet_vardir.rb deleted file mode 100644 index 0e6af40e49..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/puppet_vardir.rb +++ /dev/null @@ -1,26 +0,0 @@ -# This facter fact returns the value of the Puppet vardir setting for the node -# running puppet or puppet agent. The intent is to enable Puppet modules to -# automatically have insight into a place where they can place variable data, -# regardless of the node's platform. -# -# The value should be directly usable in a File resource path attribute. - - -begin - require 'facter/util/puppet_settings' -rescue LoadError => e - # puppet apply does not add module lib directories to the $LOAD_PATH (See - # #4248). It should (in the future) but for the time being we need to be - # defensive which is what this rescue block is doing. - rb_file = File.join(File.dirname(__FILE__), 'util', 'puppet_settings.rb') - load rb_file if File.exists?(rb_file) or raise e -end - -Facter.add(:puppet_vardir) do - setcode do - # This will be nil if Puppet is not available. - Facter::Util::PuppetSettings.with_puppet do - Puppet[:vardir] - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/root_home.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/root_home.rb deleted file mode 100644 index b4f87ff2ab..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/root_home.rb +++ /dev/null @@ -1,32 +0,0 @@ -# A facter fact to determine the root home directory. -# This varies on PE supported platforms and may be -# reconfigured by the end user. - -module Facter::Util::RootHome - class << self - def get_root_home - root_ent = Facter::Util::Resolution.exec("getent passwd root") - # The home directory is the sixth element in the passwd entry - # If the platform doesn't have getent, root_ent will be nil and we should - # return it straight away. - root_ent && root_ent.split(":")[5] - end - end -end - -Facter.add(:root_home) do - setcode { Facter::Util::RootHome.get_root_home } -end - -Facter.add(:root_home) do - confine :kernel => :darwin - setcode do - str = Facter::Util::Resolution.exec("dscacheutil -q user -a name root") - hash = {} - str.split("\n").each do |pair| - key,value = pair.split(/:/) - hash[key] = value - end - hash['dir'].strip - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/util/puppet_settings.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/util/puppet_settings.rb deleted file mode 100644 index 1ad945218a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/facter/util/puppet_settings.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Facter - module Util - module PuppetSettings - # This method is intended to provide a convenient way to evaluate a - # Facter code block only if Puppet is loaded. This is to account for the - # situation where the fact happens to be in the load path, but Puppet is - # not loaded for whatever reason. Perhaps the user is simply running - # facter without the --puppet flag and they happen to be working in a lib - # directory of a module. - def self.with_puppet - begin - Module.const_get("Puppet") - rescue NameError - nil - else - yield - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb deleted file mode 100644 index 11d2d7fead..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb +++ /dev/null @@ -1,36 +0,0 @@ -# -# abs.rb -# - -module Puppet::Parser::Functions - newfunction(:abs, :type => :rvalue, :doc => <<-EOS - Returns the absolute value of a number, for example -34.56 becomes - 34.56. Takes a single integer and float value as an argument. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "abs(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - - # Numbers in Puppet are often string-encoded which is troublesome ... - if value.is_a?(String) - if value.match(/^-?(?:\d+)(?:\.\d+){1}$/) - value = value.to_f - elsif value.match(/^-?\d+$/) - value = value.to_i - else - raise(Puppet::ParseError, 'abs(): Requires float or ' + - 'integer to work with') - end - end - - # We have numeric value to handle ... - result = value.abs - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/any2array.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/any2array.rb deleted file mode 100644 index e71407e89e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/any2array.rb +++ /dev/null @@ -1,33 +0,0 @@ -# -# any2array.rb -# - -module Puppet::Parser::Functions - newfunction(:any2array, :type => :rvalue, :doc => <<-EOS -This converts any object to an array containing that object. Empty argument -lists are converted to an empty array. Arrays are left untouched. Hashes are -converted to arrays of alternating keys and values. - EOS - ) do |arguments| - - if arguments.empty? - return [] - end - - if arguments.length == 1 - if arguments[0].kind_of?(Array) - return arguments[0] - elsif arguments[0].kind_of?(Hash) - result = [] - arguments[0].each do |key, value| - result << key << value - end - return result - end - end - - return arguments - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/base64.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/base64.rb deleted file mode 100644 index 617ba31b6e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/base64.rb +++ /dev/null @@ -1,37 +0,0 @@ -module Puppet::Parser::Functions - - newfunction(:base64, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| - - Base64 encode or decode a string based on the command and the string submitted - - Usage: - - $encodestring = base64('encode','thestring') - $decodestring = base64('decode','dGhlc3RyaW5n') - - ENDHEREDOC - - require 'base64' - - raise Puppet::ParseError, ("base64(): Wrong number of arguments (#{args.length}; must be = 2)") unless args.length == 2 - - actions = ['encode','decode'] - - unless actions.include?(args[0]) - raise Puppet::ParseError, ("base64(): the first argument must be one of 'encode' or 'decode'") - end - - unless args[1].is_a?(String) - raise Puppet::ParseError, ("base64(): the second argument must be a string to base64") - end - - case args[0] - when 'encode' - result = Base64.encode64(args[1]) - when 'decode' - result = Base64.decode64(args[1]) - end - - return result - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/bool2num.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/bool2num.rb deleted file mode 100644 index 9a07a8a119..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/bool2num.rb +++ /dev/null @@ -1,49 +0,0 @@ -# -# bool2num.rb -# - -module Puppet::Parser::Functions - newfunction(:bool2num, :type => :rvalue, :doc => <<-EOS - Converts a boolean to a number. Converts the values: - false, f, 0, n, and no to 0 - true, t, 1, y, and yes to 1 - Requires a single boolean or string as an input. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "bool2num(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - # We can have either true or false, or string which resembles boolean ... - unless [FalseClass, TrueClass, String].include?(klass) - raise(Puppet::ParseError, 'bool2num(): Requires either ' + - 'boolean or string to work with') - end - - if value.is_a?(String) - # We consider all the yes, no, y, n and so on too ... - value = case value - # - # This is how undef looks like in Puppet ... - # We yield 0 (or false if you wish) in this case. - # - when /^$/, '' then false # Empty string will be false ... - when /^(1|t|y|true|yes)$/ then true - when /^(0|f|n|false|no)$/ then false - when /^(undef|undefined)$/ then false # This is not likely to happen ... - else - raise(Puppet::ParseError, 'bool2num(): Unknown type of boolean given') - end - end - - # We have real boolean values as well ... - result = value ? 1 : 0 - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/capitalize.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/capitalize.rb deleted file mode 100644 index 640d00b82f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/capitalize.rb +++ /dev/null @@ -1,34 +0,0 @@ -# -# capitalize.rb -# - -module Puppet::Parser::Functions - newfunction(:capitalize, :type => :rvalue, :doc => <<-EOS - Capitalizes the first letter of a string or array of strings. - Requires either a single string or an array as an input. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "capitalize(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'capitalize(): Requires either ' + - 'array or string to work with') - end - - if value.is_a?(Array) - # Numbers in Puppet are often string-encoded which is troublesome ... - result = value.collect { |i| i.is_a?(String) ? i.capitalize : i } - else - result = value.capitalize - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb deleted file mode 100644 index 4564a000ab..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb +++ /dev/null @@ -1,35 +0,0 @@ -# -# chomp.rb -# - -module Puppet::Parser::Functions - newfunction(:chomp, :type => :rvalue, :doc => <<-'EOS' - Removes the record separator from the end of a string or an array of - strings, for example `hello\n` becomes `hello`. - Requires a single string or array as an input. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "chomp(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'chomp(): Requires either ' + - 'array or string to work with') - end - - if value.is_a?(Array) - # Numbers in Puppet are often string-encoded which is troublesome ... - result = value.collect { |i| i.is_a?(String) ? i.chomp : i } - else - result = value.chomp - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb deleted file mode 100644 index f242af39ce..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb +++ /dev/null @@ -1,37 +0,0 @@ -# -# chop.rb -# - -module Puppet::Parser::Functions - newfunction(:chop, :type => :rvalue, :doc => <<-'EOS' - Returns a new string with the last character removed. If the string ends - with `\r\n`, both characters are removed. Applying chop to an empty - string returns an empty string. If you wish to merely remove record - separators then you should use the `chomp` function. - Requires a string or array of strings as input. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "chop(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'chop(): Requires either an ' + - 'array or string to work with') - end - - if value.is_a?(Array) - # Numbers in Puppet are often string-encoded which is troublesome ... - result = value.collect { |i| i.is_a?(String) ? i.chop : i } - else - result = value.chop - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/concat.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/concat.rb deleted file mode 100644 index 6c8638222e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/concat.rb +++ /dev/null @@ -1,41 +0,0 @@ -# -# concat.rb -# - -module Puppet::Parser::Functions - newfunction(:concat, :type => :rvalue, :doc => <<-EOS -Appends the contents of array 2 onto array 1. - -*Example:* - - concat(['1','2','3'],['4','5','6']) - -Would result in: - - ['1','2','3','4','5','6'] - EOS - ) do |arguments| - - # Check that 2 arguments have been given ... - raise(Puppet::ParseError, "concat(): Wrong number of arguments " + - "given (#{arguments.size} for 2)") if arguments.size != 2 - - a = arguments[0] - b = arguments[1] - - # Check that the first parameter is an array - unless a.is_a?(Array) - raise(Puppet::ParseError, 'concat(): Requires array to work with') - end - - if b.is_a?(Array) - result = a.concat(b) - else - result = a << b - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/count.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/count.rb deleted file mode 100644 index 52de1b8a5a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/count.rb +++ /dev/null @@ -1,22 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:count, :type => :rvalue, :arity => -2, :doc => <<-EOS -Takes an array as first argument and an optional second argument. -Count the number of elements in array that matches second argument. -If called with only an array it counts the number of elements that are not nil/undef. - EOS - ) do |args| - - if (args.size > 2) then - raise(ArgumentError, "count(): Wrong number of arguments "+ - "given #{args.size} for 1 or 2.") - end - - collection, item = args - - if item then - collection.count item - else - collection.count { |obj| obj != nil && obj != :undef && obj != '' } - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb deleted file mode 100644 index 6df32e9c56..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb +++ /dev/null @@ -1,44 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:deep_merge, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| - Recursively merges two or more hashes together and returns the resulting hash. - - For example: - - $hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } } - $hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } } - $merged_hash = deep_merge($hash1, $hash2) - # The resulting hash is equivalent to: - # $merged_hash = { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } } - - When there is a duplicate key that is a hash, they are recursively merged. - When there is a duplicate key that is not a hash, the key in the rightmost hash will "win." - - ENDHEREDOC - - if args.length < 2 - raise Puppet::ParseError, ("deep_merge(): wrong number of arguments (#{args.length}; must be at least 2)") - end - - deep_merge = Proc.new do |hash1,hash2| - hash1.merge(hash2) do |key,old_value,new_value| - if old_value.is_a?(Hash) && new_value.is_a?(Hash) - deep_merge.call(old_value, new_value) - else - new_value - end - end - end - - result = Hash.new - args.each do |arg| - next if arg.is_a? String and arg.empty? # empty string is synonym for puppet's undef - # If the argument was not a hash, skip it. - unless arg.is_a?(Hash) - raise Puppet::ParseError, "deep_merge: unexpected argument type #{arg.class}, only expects hash arguments" - end - - result = deep_merge.call(result, arg) - end - return( result ) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb deleted file mode 100644 index d7df306c79..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Test whether a given class or definition is defined -require 'puppet/parser/functions' - -Puppet::Parser::Functions.newfunction(:defined_with_params, - :type => :rvalue, - :doc => <<-'ENDOFDOC' -Takes a resource reference and an optional hash of attributes. - -Returns true if a resource with the specified attributes has already been added -to the catalog, and false otherwise. - - user { 'dan': - ensure => present, - } - - if ! defined_with_params(User[dan], {'ensure' => 'present' }) { - user { 'dan': ensure => present, } - } -ENDOFDOC -) do |vals| - reference, params = vals - raise(ArgumentError, 'Must specify a reference') unless reference - if (! params) || params == '' - params = {} - end - ret = false - if resource = findresource(reference.to_s) - matches = params.collect do |key, value| - resource[key] == value - end - ret = params.empty? || !matches.include?(false) - end - Puppet.debug("Resource #{reference} was not determined to be defined") - ret -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete.rb deleted file mode 100644 index d03a29355e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete.rb +++ /dev/null @@ -1,46 +0,0 @@ -# -# delete.rb -# - -# TODO(Krzysztof Wilczynski): We need to add support for regular expression ... - -module Puppet::Parser::Functions - newfunction(:delete, :type => :rvalue, :doc => <<-EOS -Deletes all instances of a given element from an array, substring from a -string, or key from a hash. - -*Examples:* - - delete(['a','b','c','b'], 'b') - Would return: ['a','c'] - - delete({'a'=>1,'b'=>2,'c'=>3}, 'b') - Would return: {'a'=>1,'c'=>3} - - delete('abracadabra', 'bra') - Would return: 'acada' - EOS - ) do |arguments| - - if (arguments.size != 2) then - raise(Puppet::ParseError, "delete(): Wrong number of arguments "+ - "given #{arguments.size} for 2.") - end - - collection = arguments[0].dup - item = arguments[1] - - case collection - when Array, Hash - collection.delete item - when String - collection.gsub! item, '' - else - raise(TypeError, "delete(): First argument must be an Array, " + - "String, or Hash. Given an argument of class #{collection.class}.") - end - collection - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_at.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_at.rb deleted file mode 100644 index 3eb4b53756..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_at.rb +++ /dev/null @@ -1,49 +0,0 @@ -# -# delete_at.rb -# - -module Puppet::Parser::Functions - newfunction(:delete_at, :type => :rvalue, :doc => <<-EOS -Deletes a determined indexed value from an array. - -*Examples:* - - delete_at(['a','b','c'], 1) - -Would return: ['a','c'] - EOS - ) do |arguments| - - raise(Puppet::ParseError, "delete_at(): Wrong number of arguments " + - "given (#{arguments.size} for 2)") if arguments.size < 2 - - array = arguments[0] - - unless array.is_a?(Array) - raise(Puppet::ParseError, 'delete_at(): Requires array to work with') - end - - index = arguments[1] - - if index.is_a?(String) and not index.match(/^\d+$/) - raise(Puppet::ParseError, 'delete_at(): You must provide ' + - 'non-negative numeric index') - end - - result = array.clone - - # Numbers in Puppet are often string-encoded which is troublesome ... - index = index.to_i - - if index > result.size - 1 # First element is at index 0 is it not? - raise(Puppet::ParseError, 'delete_at(): Given index ' + - 'exceeds size of array given') - end - - result.delete_at(index) # We ignore the element that got deleted ... - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb deleted file mode 100644 index f94d4da8d4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb +++ /dev/null @@ -1,34 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:delete_undef_values, :type => :rvalue, :doc => <<-EOS -Returns a copy of input hash or array with all undefs deleted. - -*Examples:* - - $hash = delete_undef_values({a=>'A', b=>'', c=>undef, d => false}) - -Would return: {a => 'A', b => '', d => false} - - $array = delete_undef_values(['A','',undef,false]) - -Would return: ['A','',false] - - EOS - ) do |args| - - raise(Puppet::ParseError, - "delete_undef_values(): Wrong number of arguments given " + - "(#{args.size})") if args.size < 1 - - unless args[0].is_a? Array or args[0].is_a? Hash - raise(Puppet::ParseError, - "delete_undef_values(): expected an array or hash, got #{args[0]} type #{args[0].class} ") - end - result = args[0].dup - if result.is_a?(Hash) - result.delete_if {|key, val| val.equal? :undef} - elsif result.is_a?(Array) - result.delete :undef - end - result - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_values.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_values.rb deleted file mode 100644 index f6c8c0e6b6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_values.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:delete_values, :type => :rvalue, :doc => <<-EOS -Deletes all instances of a given value from a hash. - -*Examples:* - - delete_values({'a'=>'A','b'=>'B','c'=>'C','B'=>'D'}, 'B') - -Would return: {'a'=>'A','c'=>'C','B'=>'D'} - - EOS - ) do |arguments| - - raise(Puppet::ParseError, - "delete_values(): Wrong number of arguments given " + - "(#{arguments.size} of 2)") if arguments.size != 2 - - hash, item = arguments - - if not hash.is_a?(Hash) - raise(TypeError, "delete_values(): First argument must be a Hash. " + \ - "Given an argument of class #{hash.class}.") - end - hash.dup.delete_if { |key, val| item == val } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/difference.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/difference.rb deleted file mode 100644 index cd258f7516..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/difference.rb +++ /dev/null @@ -1,36 +0,0 @@ -# -# difference.rb -# - -module Puppet::Parser::Functions - newfunction(:difference, :type => :rvalue, :doc => <<-EOS -This function returns the difference between two arrays. -The returned array is a copy of the original array, removing any items that -also appear in the second array. - -*Examples:* - - difference(["a","b","c"],["b","c","d"]) - -Would return: ["a"] - EOS - ) do |arguments| - - # Two arguments are required - raise(Puppet::ParseError, "difference(): Wrong number of arguments " + - "given (#{arguments.size} for 2)") if arguments.size != 2 - - first = arguments[0] - second = arguments[1] - - unless first.is_a?(Array) && second.is_a?(Array) - raise(Puppet::ParseError, 'difference(): Requires 2 arrays') - end - - result = first - second - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/dirname.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/dirname.rb deleted file mode 100644 index ea8cc1e081..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/dirname.rb +++ /dev/null @@ -1,15 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:dirname, :type => :rvalue, :doc => <<-EOS - Returns the dirname of a path. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "dirname(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - path = arguments[0] - return File.dirname(path) - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/downcase.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/downcase.rb deleted file mode 100644 index 4066d210f7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/downcase.rb +++ /dev/null @@ -1,33 +0,0 @@ -# -# downcase.rb -# - -module Puppet::Parser::Functions - newfunction(:downcase, :type => :rvalue, :doc => <<-EOS -Converts the case of a string or all strings in an array to lower case. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "downcase(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'downcase(): Requires either ' + - 'array or string to work with') - end - - if value.is_a?(Array) - # Numbers in Puppet are often string-encoded which is troublesome ... - result = value.collect { |i| i.is_a?(String) ? i.downcase : i } - else - result = value.downcase - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/empty.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/empty.rb deleted file mode 100644 index 80ebb86b89..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/empty.rb +++ /dev/null @@ -1,28 +0,0 @@ -# -# empty.rb -# - -module Puppet::Parser::Functions - newfunction(:empty, :type => :rvalue, :doc => <<-EOS -Returns true if the variable is empty. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "empty(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, Hash, String].include?(klass) - raise(Puppet::ParseError, 'empty(): Requires either ' + - 'array, hash or string to work with') - end - - result = value.empty? - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb deleted file mode 100644 index f1da4aaaaf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb +++ /dev/null @@ -1,35 +0,0 @@ -# -# ensure_packages.rb -# - -module Puppet::Parser::Functions - newfunction(:ensure_packages, :type => :statement, :doc => <<-EOS -Takes a list of packages and only installs them if they don't already exist. -It optionally takes a hash as a second parameter that will be passed as the -third argument to the ensure_resource() function. - EOS - ) do |arguments| - - if arguments.size > 2 or arguments.size == 0 - raise(Puppet::ParseError, "ensure_packages(): Wrong number of arguments " + - "given (#{arguments.size} for 1 or 2)") - elsif arguments.size == 2 and !arguments[1].is_a?(Hash) - raise(Puppet::ParseError, 'ensure_packages(): Requires second argument to be a Hash') - end - - packages = Array(arguments[0]) - - if arguments[1] - defaults = { 'ensure' => 'present' }.merge(arguments[1]) - else - defaults = { 'ensure' => 'present' } - end - - Puppet::Parser::Functions.function(:ensure_resource) - packages.each { |package_name| - function_ensure_resource(['package', package_name, defaults ]) - } - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb deleted file mode 100644 index 05e5593fc1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Test whether a given class or definition is defined -require 'puppet/parser/functions' - -Puppet::Parser::Functions.newfunction(:ensure_resource, - :type => :statement, - :doc => <<-'ENDOFDOC' -Takes a resource type, title, and a list of attributes that describe a -resource. - - user { 'dan': - ensure => present, - } - -This example only creates the resource if it does not already exist: - - ensure_resource('user', 'dan', {'ensure' => 'present' }) - -If the resource already exists but does not match the specified parameters, -this function will attempt to recreate the resource leading to a duplicate -resource definition error. - -An array of resources can also be passed in and each will be created with -the type and parameters specified if it doesn't already exist. - - ensure_resource('user', ['dan','alex'], {'ensure' => 'present'}) - -ENDOFDOC -) do |vals| - type, title, params = vals - raise(ArgumentError, 'Must specify a type') unless type - raise(ArgumentError, 'Must specify a title') unless title - params ||= {} - - items = [title].flatten - - items.each do |item| - Puppet::Parser::Functions.function(:defined_with_params) - if function_defined_with_params(["#{type}[#{item}]", params]) - Puppet.debug("Resource #{type}[#{item}] not created because it already exists") - else - Puppet::Parser::Functions.function(:create_resources) - function_create_resources([type.capitalize, { item => params }]) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/flatten.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/flatten.rb deleted file mode 100644 index a1ed183290..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/flatten.rb +++ /dev/null @@ -1,33 +0,0 @@ -# -# flatten.rb -# - -module Puppet::Parser::Functions - newfunction(:flatten, :type => :rvalue, :doc => <<-EOS -This function flattens any deeply nested arrays and returns a single flat array -as a result. - -*Examples:* - - flatten(['a', ['b', ['c']]]) - -Would return: ['a','b','c'] - EOS - ) do |arguments| - - raise(Puppet::ParseError, "flatten(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size != 1 - - array = arguments[0] - - unless array.is_a?(Array) - raise(Puppet::ParseError, 'flatten(): Requires array to work with') - end - - result = array.flatten - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/floor.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/floor.rb deleted file mode 100644 index 9a6f014d7c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/floor.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:floor, :type => :rvalue, :doc => <<-EOS - Returns the largest integer less or equal to the argument. - Takes a single numeric value as an argument. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "floor(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size != 1 - - begin - arg = Float(arguments[0]) - rescue TypeError, ArgumentError => e - raise(Puppet::ParseError, "floor(): Wrong argument type " + - "given (#{arguments[0]} for Numeric)") - end - - raise(Puppet::ParseError, "floor(): Wrong argument type " + - "given (#{arg.class} for Numeric)") if arg.is_a?(Numeric) == false - - arg.floor - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb deleted file mode 100644 index 6558206055..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb +++ /dev/null @@ -1,46 +0,0 @@ -# -# fqdn_rotate.rb -# - -module Puppet::Parser::Functions - newfunction(:fqdn_rotate, :type => :rvalue, :doc => <<-EOS -Rotates an array a random number of times based on a nodes fqdn. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "fqdn_rotate(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - require 'digest/md5' - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'fqdn_rotate(): Requires either ' + - 'array or string to work with') - end - - result = value.clone - - string = value.is_a?(String) ? true : false - - # Check whether it makes sense to rotate ... - return result if result.size <= 1 - - # We turn any string value into an array to be able to rotate ... - result = string ? result.split('') : result - - elements = result.size - - srand(Digest::MD5.hexdigest([lookupvar('::fqdn'),arguments].join(':')).hex) - rand(elements).times { - result.push result.shift - } - - result = string ? result.join : result - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb deleted file mode 100644 index 1421b91f52..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb +++ /dev/null @@ -1,17 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:get_module_path, :type =>:rvalue, :doc => <<-EOT - Returns the absolute path of the specified module for the current - environment. - - Example: - $module_path = get_module_path('stdlib') - EOT - ) do |args| - raise(Puppet::ParseError, "get_module_path(): Wrong number of arguments, expects one") unless args.size == 1 - if module_path = Puppet::Module.find(args[0], compiler.environment.to_s) - module_path.path - else - raise(Puppet::ParseError, "Could not find module #{args[0]} in environment #{compiler.environment}") - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getparam.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getparam.rb deleted file mode 100644 index 6d510069f9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getparam.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Test whether a given class or definition is defined -require 'puppet/parser/functions' - -Puppet::Parser::Functions.newfunction(:getparam, - :type => :rvalue, - :doc => <<-'ENDOFDOC' -Takes a resource reference and name of the parameter and -returns value of resource's parameter. - -*Examples:* - - define example_resource($param) { - } - - example_resource { "example_resource_instance": - param => "param_value" - } - - getparam(Example_resource["example_resource_instance"], "param") - -Would return: param_value -ENDOFDOC -) do |vals| - reference, param = vals - raise(ArgumentError, 'Must specify a reference') unless reference - raise(ArgumentError, 'Must specify name of a parameter') unless param and param.instance_of? String - - return '' if param.empty? - - if resource = findresource(reference.to_s) - return resource[param] if resource[param] - end - - return '' -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getvar.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getvar.rb deleted file mode 100644 index 162114995b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getvar.rb +++ /dev/null @@ -1,26 +0,0 @@ -module Puppet::Parser::Functions - - newfunction(:getvar, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| - Lookup a variable in a remote namespace. - - For example: - - $foo = getvar('site::data::foo') - # Equivalent to $foo = $site::data::foo - - This is useful if the namespace itself is stored in a string: - - $datalocation = 'site::data' - $bar = getvar("${datalocation}::bar") - # Equivalent to $bar = $site::data::bar - ENDHEREDOC - - unless args.length == 1 - raise Puppet::ParseError, ("getvar(): wrong number of arguments (#{args.length}; must be 1)") - end - - self.lookupvar("#{args[0]}") - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/grep.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/grep.rb deleted file mode 100644 index ceba9ecc8f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/grep.rb +++ /dev/null @@ -1,33 +0,0 @@ -# -# grep.rb -# - -module Puppet::Parser::Functions - newfunction(:grep, :type => :rvalue, :doc => <<-EOS -This function searches through an array and returns any elements that match -the provided regular expression. - -*Examples:* - - grep(['aaa','bbb','ccc','aaaddd'], 'aaa') - -Would return: - - ['aaa','aaaddd'] - EOS - ) do |arguments| - - if (arguments.size != 2) then - raise(Puppet::ParseError, "grep(): Wrong number of arguments "+ - "given #{arguments.size} for 2") - end - - a = arguments[0] - pattern = Regexp.new(arguments[1]) - - a.grep(pattern) - - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb deleted file mode 100644 index 7f150a7176..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb +++ /dev/null @@ -1,52 +0,0 @@ -# -# has_interface_with -# - -module Puppet::Parser::Functions - newfunction(:has_interface_with, :type => :rvalue, :doc => <<-EOS -Returns boolean based on kind and value: - * macaddress - * netmask - * ipaddress - * network - -has_interface_with("macaddress", "x:x:x:x:x:x") -has_interface_with("ipaddress", "127.0.0.1") => true -etc. - -If no "kind" is given, then the presence of the interface is checked: -has_interface_with("lo") => true - EOS - ) do |args| - - raise(Puppet::ParseError, "has_interface_with(): Wrong number of arguments " + - "given (#{args.size} for 1 or 2)") if args.size < 1 or args.size > 2 - - interfaces = lookupvar('interfaces') - - # If we do not have any interfaces, then there are no requested attributes - return false if (interfaces == :undefined) - - interfaces = interfaces.split(',') - - if args.size == 1 - return interfaces.member?(args[0]) - end - - kind, value = args - - if lookupvar(kind) == value - return true - end - - result = false - interfaces.each do |iface| - if value == lookupvar("#{kind}_#{iface}") - result = true - break - end - end - - result - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb deleted file mode 100644 index 842c8ec674..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb +++ /dev/null @@ -1,25 +0,0 @@ -# -# has_ip_address -# - -module Puppet::Parser::Functions - newfunction(:has_ip_address, :type => :rvalue, :doc => <<-EOS -Returns true if the client has the requested IP address on some interface. - -This function iterates through the 'interfaces' fact and checks the -'ipaddress_IFACE' facts, performing a simple string comparison. - EOS - ) do |args| - - raise(Puppet::ParseError, "has_ip_address(): Wrong number of arguments " + - "given (#{args.size} for 1)") if args.size != 1 - - Puppet::Parser::Functions.autoloader.load(:has_interface_with) \ - unless Puppet::Parser::Functions.autoloader.loaded?(:has_interface_with) - - function_has_interface_with(['ipaddress', args[0]]) - - end -end - -# vim:sts=2 sw=2 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb deleted file mode 100644 index 9ccf9024f7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb +++ /dev/null @@ -1,25 +0,0 @@ -# -# has_ip_network -# - -module Puppet::Parser::Functions - newfunction(:has_ip_network, :type => :rvalue, :doc => <<-EOS -Returns true if the client has an IP address within the requested network. - -This function iterates through the 'interfaces' fact and checks the -'network_IFACE' facts, performing a simple string comparision. - EOS - ) do |args| - - raise(Puppet::ParseError, "has_ip_network(): Wrong number of arguments " + - "given (#{args.size} for 1)") if args.size != 1 - - Puppet::Parser::Functions.autoloader.load(:has_interface_with) \ - unless Puppet::Parser::Functions.autoloader.loaded?(:has_interface_with) - - function_has_interface_with(['network', args[0]]) - - end -end - -# vim:sts=2 sw=2 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_key.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_key.rb deleted file mode 100644 index 4657cc29cd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_key.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Puppet::Parser::Functions - - newfunction(:has_key, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| - Determine if a hash has a certain key value. - - Example: - - $my_hash = {'key_one' => 'value_one'} - if has_key($my_hash, 'key_two') { - notice('we will not reach here') - } - if has_key($my_hash, 'key_one') { - notice('this will be printed') - } - - ENDHEREDOC - - unless args.length == 2 - raise Puppet::ParseError, ("has_key(): wrong number of arguments (#{args.length}; must be 2)") - end - unless args[0].is_a?(Hash) - raise Puppet::ParseError, "has_key(): expects the first argument to be a hash, got #{args[0].inspect} which is of type #{args[0].class}" - end - args[0].has_key?(args[1]) - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/hash.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/hash.rb deleted file mode 100644 index 8cc4823be5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/hash.rb +++ /dev/null @@ -1,41 +0,0 @@ -# -# hash.rb -# - -module Puppet::Parser::Functions - newfunction(:hash, :type => :rvalue, :doc => <<-EOS -This function converts an array into a hash. - -*Examples:* - - hash(['a',1,'b',2,'c',3]) - -Would return: {'a'=>1,'b'=>2,'c'=>3} - EOS - ) do |arguments| - - raise(Puppet::ParseError, "hash(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - array = arguments[0] - - unless array.is_a?(Array) - raise(Puppet::ParseError, 'hash(): Requires array to work with') - end - - result = {} - - begin - # This is to make it compatible with older version of Ruby ... - array = array.flatten - result = Hash[*array] - rescue Exception - raise(Puppet::ParseError, 'hash(): Unable to compute ' + - 'hash from array given') - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/intersection.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/intersection.rb deleted file mode 100644 index 48f02e9d37..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/intersection.rb +++ /dev/null @@ -1,34 +0,0 @@ -# -# intersection.rb -# - -module Puppet::Parser::Functions - newfunction(:intersection, :type => :rvalue, :doc => <<-EOS -This function returns an array an intersection of two. - -*Examples:* - - intersection(["a","b","c"],["b","c","d"]) - -Would return: ["b","c"] - EOS - ) do |arguments| - - # Two arguments are required - raise(Puppet::ParseError, "intersection(): Wrong number of arguments " + - "given (#{arguments.size} for 2)") if arguments.size != 2 - - first = arguments[0] - second = arguments[1] - - unless first.is_a?(Array) && second.is_a?(Array) - raise(Puppet::ParseError, 'intersection(): Requires 2 arrays') - end - - result = first & second - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_array.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_array.rb deleted file mode 100644 index b39e184ae5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_array.rb +++ /dev/null @@ -1,22 +0,0 @@ -# -# is_array.rb -# - -module Puppet::Parser::Functions - newfunction(:is_array, :type => :rvalue, :doc => <<-EOS -Returns true if the variable passed to this function is an array. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "is_array(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - type = arguments[0] - - result = type.is_a?(Array) - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_bool.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_bool.rb deleted file mode 100644 index 8bbdbc8a14..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_bool.rb +++ /dev/null @@ -1,22 +0,0 @@ -# -# is_bool.rb -# - -module Puppet::Parser::Functions - newfunction(:is_bool, :type => :rvalue, :doc => <<-EOS -Returns true if the variable passed to this function is a boolean. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "is_bool(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size != 1 - - type = arguments[0] - - result = type.is_a?(TrueClass) || type.is_a?(FalseClass) - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb deleted file mode 100644 index b3fee965a0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb +++ /dev/null @@ -1,50 +0,0 @@ -# -# is_domain_name.rb -# - -module Puppet::Parser::Functions - newfunction(:is_domain_name, :type => :rvalue, :doc => <<-EOS -Returns true if the string passed to this function is a syntactically correct domain name. - EOS - ) do |arguments| - - if (arguments.size != 1) then - raise(Puppet::ParseError, "is_domain_name(): Wrong number of arguments "+ - "given #{arguments.size} for 1") - end - - domain = arguments[0] - - # Limits (rfc1035, 3.1) - domain_max_length=255 - label_min_length=1 - label_max_length=63 - - # Only allow string types - return false unless domain.is_a?(String) - - # Allow ".", it is the top level domain - return true if domain == '.' - - # Remove the final dot, if present. - domain.chomp!('.') - - # Check the whole domain - return false if domain.empty? - return false if domain.length > domain_max_length - - # Check each label in the domain - labels = domain.split('.') - vlabels = labels.each do |label| - break if label.length < label_min_length - break if label.length > label_max_length - break if label[-1..-1] == '-' - break if label[0..0] == '-' - break unless /^[a-z\d-]+$/i.match(label) - end - return vlabels == labels - - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_float.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_float.rb deleted file mode 100644 index a2da94385b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_float.rb +++ /dev/null @@ -1,30 +0,0 @@ -# -# is_float.rb -# - -module Puppet::Parser::Functions - newfunction(:is_float, :type => :rvalue, :doc => <<-EOS -Returns true if the variable passed to this function is a float. - EOS - ) do |arguments| - - if (arguments.size != 1) then - raise(Puppet::ParseError, "is_float(): Wrong number of arguments "+ - "given #{arguments.size} for 1") - end - - value = arguments[0] - - # Only allow Numeric or String types - return false unless value.is_a?(Numeric) or value.is_a?(String) - - if value != value.to_f.to_s and !value.is_a? Float then - return false - else - return true - end - - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb deleted file mode 100644 index 6da82c8c17..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb +++ /dev/null @@ -1,26 +0,0 @@ -# -# is_function_available.rb -# - -module Puppet::Parser::Functions - newfunction(:is_function_available, :type => :rvalue, :doc => <<-EOS -This function accepts a string as an argument, determines whether the -Puppet runtime has access to a function by that name. It returns a -true if the function exists, false if not. - EOS - ) do |arguments| - - if (arguments.size != 1) then - raise(Puppet::ParseError, "is_function_available?(): Wrong number of arguments "+ - "given #{arguments.size} for 1") - end - - # Only allow String types - return false unless arguments[0].is_a?(String) - - function = Puppet::Parser::Functions.function(arguments[0].to_sym) - function.is_a?(String) and not function.empty? - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_hash.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_hash.rb deleted file mode 100644 index ad907f086f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_hash.rb +++ /dev/null @@ -1,22 +0,0 @@ -# -# is_hash.rb -# - -module Puppet::Parser::Functions - newfunction(:is_hash, :type => :rvalue, :doc => <<-EOS -Returns true if the variable passed to this function is a hash. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "is_hash(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size != 1 - - type = arguments[0] - - result = type.is_a?(Hash) - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_integer.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_integer.rb deleted file mode 100644 index c03d28df92..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_integer.rb +++ /dev/null @@ -1,45 +0,0 @@ -# -# is_integer.rb -# - -module Puppet::Parser::Functions - newfunction(:is_integer, :type => :rvalue, :doc => <<-EOS -Returns true if the variable passed to this function is an Integer or -a decimal (base 10) integer in String form. The string may -start with a '-' (minus). A value of '0' is allowed, but a leading '0' digit may not -be followed by other digits as this indicates that the value is octal (base 8). - -If given any other argument `false` is returned. - EOS - ) do |arguments| - - if (arguments.size != 1) then - raise(Puppet::ParseError, "is_integer(): Wrong number of arguments "+ - "given #{arguments.size} for 1") - end - - value = arguments[0] - - # Regex is taken from the lexer of puppet - # puppet/pops/parser/lexer.rb but modified to match also - # negative values and disallow numbers prefixed with multiple - # 0's - # - # TODO these parameter should be a constant but I'm not sure - # if there is no risk to declare it inside of the module - # Puppet::Parser::Functions - - # Integer numbers like - # -1234568981273 - # 47291 - numeric = %r{^-?(?:(?:[1-9]\d*)|0)$} - - if value.is_a? Integer or (value.is_a? String and value.match numeric) - return true - else - return false - end - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb deleted file mode 100644 index a90adabe15..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb +++ /dev/null @@ -1,32 +0,0 @@ -# -# is_ip_address.rb -# - -module Puppet::Parser::Functions - newfunction(:is_ip_address, :type => :rvalue, :doc => <<-EOS -Returns true if the string passed to this function is a valid IP address. - EOS - ) do |arguments| - - require 'ipaddr' - - if (arguments.size != 1) then - raise(Puppet::ParseError, "is_ip_address(): Wrong number of arguments "+ - "given #{arguments.size} for 1") - end - - begin - ip = IPAddr.new(arguments[0]) - rescue ArgumentError - return false - end - - if ip.ipv4? or ip.ipv6? then - return true - else - return false - end - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb deleted file mode 100644 index 1b3088a26a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb +++ /dev/null @@ -1,27 +0,0 @@ -# -# is_mac_address.rb -# - -module Puppet::Parser::Functions - newfunction(:is_mac_address, :type => :rvalue, :doc => <<-EOS -Returns true if the string passed to this function is a valid mac address. - EOS - ) do |arguments| - - if (arguments.size != 1) then - raise(Puppet::ParseError, "is_mac_address(): Wrong number of arguments "+ - "given #{arguments.size} for 1") - end - - mac = arguments[0] - - if /^[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}:[a-fA-F0-9]{1,2}$/.match(mac) then - return true - else - return false - end - - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb deleted file mode 100644 index e7e1d2a746..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb +++ /dev/null @@ -1,75 +0,0 @@ -# -# is_numeric.rb -# - -module Puppet::Parser::Functions - newfunction(:is_numeric, :type => :rvalue, :doc => <<-EOS -Returns true if the given argument is a Numeric (Integer or Float), -or a String containing either a valid integer in decimal base 10 form, or -a valid floating point string representation. - -The function recognizes only decimal (base 10) integers and float but not -integers in hex (base 16) or octal (base 8) form. - -The string representation may start with a '-' (minus). If a decimal '.' is used, -it must be followed by at least one digit. - -Valid examples: - - 77435 - 10e-12 - -8475 - 0.2343 - -23.561e3 - EOS - ) do |arguments| - - if (arguments.size != 1) then - raise(Puppet::ParseError, "is_numeric(): Wrong number of arguments "+ - "given #{arguments.size} for 1") - end - - value = arguments[0] - - # Regex is taken from the lexer of puppet - # puppet/pops/parser/lexer.rb but modified to match also - # negative values and disallow invalid octal numbers or - # numbers prefixed with multiple 0's (except in hex numbers) - # - # TODO these parameters should be constants but I'm not sure - # if there is no risk to declare them inside of the module - # Puppet::Parser::Functions - - # TODO decide if this should be used - # HEX numbers like - # 0xaa230F - # 0X1234009C - # 0x0012 - # -12FcD - #numeric_hex = %r{^-?0[xX][0-9A-Fa-f]+$} - - # TODO decide if this should be used - # OCTAL numbers like - # 01234567 - # -045372 - #numeric_oct = %r{^-?0[1-7][0-7]*$} - - # Integer/Float numbers like - # -0.1234568981273 - # 47291 - # 42.12345e-12 - numeric = %r{^-?(?:(?:[1-9]\d*)|0)(?:\.\d+)?(?:[eE]-?\d+)?$} - - if value.is_a? Numeric or (value.is_a? String and ( - value.match(numeric) #or - # value.match(numeric_hex) or - # value.match(numeric_oct) - )) - return true - else - return false - end - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_string.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_string.rb deleted file mode 100644 index f5bef0457f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_string.rb +++ /dev/null @@ -1,26 +0,0 @@ -# -# is_string.rb -# - -module Puppet::Parser::Functions - newfunction(:is_string, :type => :rvalue, :doc => <<-EOS -Returns true if the variable passed to this function is a string. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "is_string(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - type = arguments[0] - - result = type.is_a?(String) - - if result and (type == type.to_f.to_s or type == type.to_i.to_s) then - return false - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join.rb deleted file mode 100644 index 6c0a6ba026..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join.rb +++ /dev/null @@ -1,41 +0,0 @@ -# -# join.rb -# - -module Puppet::Parser::Functions - newfunction(:join, :type => :rvalue, :doc => <<-EOS -This function joins an array into a string using a separator. - -*Examples:* - - join(['a','b','c'], ",") - -Would result in: "a,b,c" - EOS - ) do |arguments| - - # Technically we support two arguments but only first is mandatory ... - raise(Puppet::ParseError, "join(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - array = arguments[0] - - unless array.is_a?(Array) - raise(Puppet::ParseError, 'join(): Requires array to work with') - end - - suffix = arguments[1] if arguments[1] - - if suffix - unless suffix.is_a?(String) - raise(Puppet::ParseError, 'join(): Requires string to work with') - end - end - - result = suffix ? array.join(suffix) : array.join - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb deleted file mode 100644 index e9924fe2e6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb +++ /dev/null @@ -1,47 +0,0 @@ -# -# join.rb -# - -module Puppet::Parser::Functions - newfunction(:join_keys_to_values, :type => :rvalue, :doc => <<-EOS -This function joins each key of a hash to that key's corresponding value with a -separator. Keys and values are cast to strings. The return value is an array in -which each element is one joined key/value pair. - -*Examples:* - - join_keys_to_values({'a'=>1,'b'=>2}, " is ") - -Would result in: ["a is 1","b is 2"] - EOS - ) do |arguments| - - # Validate the number of arguments. - if arguments.size != 2 - raise(Puppet::ParseError, "join_keys_to_values(): Takes exactly two " + - "arguments, but #{arguments.size} given.") - end - - # Validate the first argument. - hash = arguments[0] - if not hash.is_a?(Hash) - raise(TypeError, "join_keys_to_values(): The first argument must be a " + - "hash, but a #{hash.class} was given.") - end - - # Validate the second argument. - separator = arguments[1] - if not separator.is_a?(String) - raise(TypeError, "join_keys_to_values(): The second argument must be a " + - "string, but a #{separator.class} was given.") - end - - # Join the keys to their values. - hash.map do |k,v| - String(k) + separator + String(v) - end - - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/keys.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/keys.rb deleted file mode 100644 index f0d13b6476..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/keys.rb +++ /dev/null @@ -1,26 +0,0 @@ -# -# keys.rb -# - -module Puppet::Parser::Functions - newfunction(:keys, :type => :rvalue, :doc => <<-EOS -Returns the keys of a hash as an array. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "keys(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - hash = arguments[0] - - unless hash.is_a?(Hash) - raise(Puppet::ParseError, 'keys(): Requires hash to work with') - end - - result = hash.keys - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb deleted file mode 100644 index 10c400501b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb +++ /dev/null @@ -1,20 +0,0 @@ -module Puppet::Parser::Functions - - newfunction(:loadyaml, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| - Load a YAML file containing an array, string, or hash, and return the data - in the corresponding native data type. - - For example: - - $myhash = loadyaml('/etc/puppet/data/myhash.yaml') - ENDHEREDOC - - unless args.length == 1 - raise Puppet::ParseError, ("loadyaml(): wrong number of arguments (#{args.length}; must be 1)") - end - - YAML.load_file(args[0]) - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/lstrip.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/lstrip.rb deleted file mode 100644 index 3a64de3376..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/lstrip.rb +++ /dev/null @@ -1,33 +0,0 @@ -# -# lstrip.rb -# - -module Puppet::Parser::Functions - newfunction(:lstrip, :type => :rvalue, :doc => <<-EOS -Strips leading spaces to the left of a string. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "lstrip(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'lstrip(): Requires either ' + - 'array or string to work with') - end - - if value.is_a?(Array) - # Numbers in Puppet are often string-encoded which is troublesome ... - result = value.collect { |i| i.is_a?(String) ? i.lstrip : i } - else - result = value.lstrip - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/max.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/max.rb deleted file mode 100644 index 60fb94ac04..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/max.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:max, :type => :rvalue, :doc => <<-EOS - Returns the highest value of all arguments. - Requires at least one argument. - EOS - ) do |args| - - raise(Puppet::ParseError, "max(): Wrong number of arguments " + - "need at least one") if args.size == 0 - - # Sometimes we get numbers as numerics and sometimes as strings. - # We try to compare them as numbers when possible - return args.max do |a,b| - if a.to_s =~ /\A-?\d+(.\d+)?\z/ and b.to_s =~ /\A-?\d+(.\d+)?\z/ then - a.to_f <=> b.to_f - else - a.to_s <=> b.to_s - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/member.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/member.rb deleted file mode 100644 index 43d76affd9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/member.rb +++ /dev/null @@ -1,44 +0,0 @@ -# -# member.rb -# - -# TODO(Krzysztof Wilczynski): We need to add support for regular expression ... -# TODO(Krzysztof Wilczynski): Support for strings and hashes too ... - -module Puppet::Parser::Functions - newfunction(:member, :type => :rvalue, :doc => <<-EOS -This function determines if a variable is a member of an array. - -*Examples:* - - member(['a','b'], 'b') - -Would return: true - - member(['a','b'], 'c') - -Would return: false - EOS - ) do |arguments| - - raise(Puppet::ParseError, "member(): Wrong number of arguments " + - "given (#{arguments.size} for 2)") if arguments.size < 2 - - array = arguments[0] - - unless array.is_a?(Array) - raise(Puppet::ParseError, 'member(): Requires array to work with') - end - - item = arguments[1] - - raise(Puppet::ParseError, 'member(): You must provide item ' + - 'to search for within array given') if item.empty? - - result = array.include?(item) - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/merge.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/merge.rb deleted file mode 100644 index 1b39f20600..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/merge.rb +++ /dev/null @@ -1,34 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:merge, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| - Merges two or more hashes together and returns the resulting hash. - - For example: - - $hash1 = {'one' => 1, 'two', => 2} - $hash2 = {'two' => 'dos', 'three', => 'tres'} - $merged_hash = merge($hash1, $hash2) - # The resulting hash is equivalent to: - # $merged_hash = {'one' => 1, 'two' => 'dos', 'three' => 'tres'} - - When there is a duplicate key, the key in the rightmost hash will "win." - - ENDHEREDOC - - if args.length < 2 - raise Puppet::ParseError, ("merge(): wrong number of arguments (#{args.length}; must be at least 2)") - end - - # The hash we accumulate into - accumulator = Hash.new - # Merge into the accumulator hash - args.each do |arg| - next if arg.is_a? String and arg.empty? # empty string is synonym for puppet's undef - unless arg.is_a?(Hash) - raise Puppet::ParseError, "merge: unexpected argument type #{arg.class}, only expects hash arguments" - end - accumulator.merge!(arg) - end - # Return the fully merged hash - accumulator - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/min.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/min.rb deleted file mode 100644 index 6bd6ebf20c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/min.rb +++ /dev/null @@ -1,21 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:min, :type => :rvalue, :doc => <<-EOS - Returns the lowest value of all arguments. - Requires at least one argument. - EOS - ) do |args| - - raise(Puppet::ParseError, "min(): Wrong number of arguments " + - "need at least one") if args.size == 0 - - # Sometimes we get numbers as numerics and sometimes as strings. - # We try to compare them as numbers when possible - return args.min do |a,b| - if a.to_s =~ /\A^-?\d+(.\d+)?\z/ and b.to_s =~ /\A-?\d+(.\d+)?\z/ then - a.to_f <=> b.to_f - else - a.to_s <=> b.to_s - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/num2bool.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/num2bool.rb deleted file mode 100644 index af0e6ed789..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/num2bool.rb +++ /dev/null @@ -1,43 +0,0 @@ -# -# num2bool.rb -# - -module Puppet::Parser::Functions - newfunction(:num2bool, :type => :rvalue, :doc => <<-EOS -This function converts a number or a string representation of a number into a -true boolean. Zero or anything non-numeric becomes false. Numbers higher then 0 -become true. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "num2bool(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size != 1 - - number = arguments[0] - - case number - when Numeric - # Yay, it's a number - when String - begin - number = Float(number) - rescue ArgumentError => ex - raise(Puppet::ParseError, "num2bool(): '#{number}' does not look like a number: #{ex.message}") - end - else - begin - number = number.to_s - rescue NoMethodError => ex - raise(Puppet::ParseError, "num2bool(): Unable to parse argument: #{ex.message}") - end - end - - # Truncate Floats - number = number.to_i - - # Return true for any positive number and false otherwise - return number > 0 - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parsejson.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parsejson.rb deleted file mode 100644 index a9a16a4524..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parsejson.rb +++ /dev/null @@ -1,24 +0,0 @@ -# -# parsejson.rb -# - -module Puppet::Parser::Functions - newfunction(:parsejson, :type => :rvalue, :doc => <<-EOS -This function accepts JSON as a string and converts into the correct Puppet -structure. - EOS - ) do |arguments| - - if (arguments.size != 1) then - raise(Puppet::ParseError, "parsejson(): Wrong number of arguments "+ - "given #{arguments.size} for 1") - end - - json = arguments[0] - - # PSON is natively available in puppet - PSON.load(json) - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb deleted file mode 100644 index 53d54faff7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb +++ /dev/null @@ -1,24 +0,0 @@ -# -# parseyaml.rb -# - -module Puppet::Parser::Functions - newfunction(:parseyaml, :type => :rvalue, :doc => <<-EOS -This function accepts YAML as a string and converts it into the correct -Puppet structure. - EOS - ) do |arguments| - - if (arguments.size != 1) then - raise(Puppet::ParseError, "parseyaml(): Wrong number of arguments "+ - "given #{arguments.size} for 1") - end - - require 'yaml' - - YAML::load(arguments[0]) - - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick.rb deleted file mode 100644 index fdd0aefd72..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:pick, :type => :rvalue, :doc => <<-EOS - -This function is similar to a coalesce function in SQL in that it will return -the first value in a list of values that is not undefined or an empty string -(two things in Puppet that will return a boolean false value). Typically, -this function is used to check for a value in the Puppet Dashboard/Enterprise -Console, and failover to a default value like the following: - - $real_jenkins_version = pick($::jenkins_version, '1.449') - -The value of $real_jenkins_version will first look for a top-scope variable -called 'jenkins_version' (note that parameters set in the Puppet Dashboard/ -Enterprise Console are brought into Puppet as top-scope variables), and, -failing that, will use a default value of 1.449. - -EOS -) do |args| - args = args.compact - args.delete(:undef) - args.delete(:undefined) - args.delete("") - if args[0].to_s.empty? then - fail Puppet::ParseError, "pick(): must receive at least one non empty value" - else - return args[0] - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick_default.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick_default.rb deleted file mode 100644 index 36e33abfa9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick_default.rb +++ /dev/null @@ -1,35 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:pick_default, :type => :rvalue, :doc => <<-EOS - -This function is similar to a coalesce function in SQL in that it will return -the first value in a list of values that is not undefined or an empty string -(two things in Puppet that will return a boolean false value). If no value is -found, it will return the last argument. - -Typically, this function is used to check for a value in the Puppet -Dashboard/Enterprise Console, and failover to a default value like the -following: - - $real_jenkins_version = pick_default($::jenkins_version, '1.449') - -The value of $real_jenkins_version will first look for a top-scope variable -called 'jenkins_version' (note that parameters set in the Puppet Dashboard/ -Enterprise Console are brought into Puppet as top-scope variables), and, -failing that, will use a default value of 1.449. - -Note that, contrary to the pick() function, the pick_default does not fail if -all arguments are empty. This allows pick_default to use an empty value as -default. - -EOS -) do |args| - fail "Must receive at least one argument." if args.empty? - default = args.last - args = args[0..-2].compact - args.delete(:undef) - args.delete(:undefined) - args.delete("") - args << default - return args[0] - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/prefix.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/prefix.rb deleted file mode 100644 index d02286afac..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/prefix.rb +++ /dev/null @@ -1,45 +0,0 @@ -# -# prefix.rb -# - -module Puppet::Parser::Functions - newfunction(:prefix, :type => :rvalue, :doc => <<-EOS -This function applies a prefix to all elements in an array. - -*Examples:* - - prefix(['a','b','c'], 'p') - -Will return: ['pa','pb','pc'] - EOS - ) do |arguments| - - # Technically we support two arguments but only first is mandatory ... - raise(Puppet::ParseError, "prefix(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - array = arguments[0] - - unless array.is_a?(Array) - raise Puppet::ParseError, "prefix(): expected first argument to be an Array, got #{array.inspect}" - end - - prefix = arguments[1] if arguments[1] - - if prefix - unless prefix.is_a?(String) - raise Puppet::ParseError, "prefix(): expected second argument to be a String, got #{prefix.inspect}" - end - end - - # Turn everything into string same as join would do ... - result = array.collect do |i| - i = i.to_s - prefix ? prefix + i : i - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/range.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/range.rb deleted file mode 100644 index ffbdf84630..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/range.rb +++ /dev/null @@ -1,88 +0,0 @@ -# -# range.rb -# - -# TODO(Krzysztof Wilczynski): We probably need to approach numeric values differently ... - -module Puppet::Parser::Functions - newfunction(:range, :type => :rvalue, :doc => <<-EOS -When given range in the form of (start, stop) it will extrapolate a range as -an array. - -*Examples:* - - range("0", "9") - -Will return: [0,1,2,3,4,5,6,7,8,9] - - range("00", "09") - -Will return: [0,1,2,3,4,5,6,7,8,9] (Zero padded strings are converted to -integers automatically) - - range("a", "c") - -Will return: ["a","b","c"] - - range("host01", "host10") - -Will return: ["host01", "host02", ..., "host09", "host10"] - -Passing a third argument will cause the generated range to step by that -interval, e.g. - - range("0", "9", "2") - -Will return: [0,2,4,6,8] - EOS - ) do |arguments| - - # We support more than one argument but at least one is mandatory ... - raise(Puppet::ParseError, "range(): Wrong number of " + - "arguments given (#{arguments.size} for 1)") if arguments.size < 1 - - if arguments.size > 1 - start = arguments[0] - stop = arguments[1] - step = arguments[2].nil? ? 1 : arguments[2].to_i.abs - - type = '..' # We select simplest type for Range available in Ruby ... - - elsif arguments.size > 0 - value = arguments[0] - - if m = value.match(/^(\w+)(\.\.\.?|\-)(\w+)$/) - start = m[1] - stop = m[3] - - type = m[2] - - elsif value.match(/^.+$/) - raise(Puppet::ParseError, 'range(): Unable to compute range ' + - 'from the value given') - else - raise(Puppet::ParseError, 'range(): Unknown format of range given') - end - end - - # Check whether we have integer value if so then make it so ... - if start.match(/^\d+$/) - start = start.to_i - stop = stop.to_i - else - start = start.to_s - stop = stop.to_s - end - - range = case type - when /^(\.\.|\-)$/ then (start .. stop) - when /^(\.\.\.)$/ then (start ... stop) # Exclusive of last element ... - end - - result = range.step(step).collect { |i| i } # Get them all ... Pokemon ... - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reject.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reject.rb deleted file mode 100644 index 1953ffcf11..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reject.rb +++ /dev/null @@ -1,31 +0,0 @@ -# -# reject.rb -# - -module Puppet::Parser::Functions - newfunction(:reject, :type => :rvalue, :doc => <<-EOS) do |args| -This function searches through an array and rejects all elements that match -the provided regular expression. - -*Examples:* - - reject(['aaa','bbb','ccc','aaaddd'], 'aaa') - -Would return: - - ['bbb','ccc'] -EOS - - if (args.size != 2) - raise Puppet::ParseError, - "reject(): Wrong number of arguments given #{args.size} for 2" - end - - ary = args[0] - pattern = Regexp.new(args[1]) - - ary.reject { |e| e =~ pattern } - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reverse.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reverse.rb deleted file mode 100644 index fe048690cd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reverse.rb +++ /dev/null @@ -1,28 +0,0 @@ -# -# reverse.rb -# - -module Puppet::Parser::Functions - newfunction(:reverse, :type => :rvalue, :doc => <<-EOS -Reverses the order of a string or array. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "reverse(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'reverse(): Requires either ' + - 'array or string to work with') - end - - result = value.reverse - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/rstrip.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/rstrip.rb deleted file mode 100644 index 29b0998205..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/rstrip.rb +++ /dev/null @@ -1,32 +0,0 @@ -# -# rstrip.rb -# - -module Puppet::Parser::Functions - newfunction(:rstrip, :type => :rvalue, :doc => <<-EOS -Strips leading spaces to the right of the string. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "rstrip(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'rstrip(): Requires either ' + - 'array or string to work with') - end - - if value.is_a?(Array) - result = value.collect { |i| i.is_a?(String) ? i.rstrip : i } - else - result = value.rstrip - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/shuffle.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/shuffle.rb deleted file mode 100644 index 18134ab633..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/shuffle.rb +++ /dev/null @@ -1,46 +0,0 @@ -# -# shuffle.rb -# - -module Puppet::Parser::Functions - newfunction(:shuffle, :type => :rvalue, :doc => <<-EOS -Randomizes the order of a string or array elements. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "shuffle(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'shuffle(): Requires either ' + - 'array or string to work with') - end - - result = value.clone - - string = value.is_a?(String) ? true : false - - # Check whether it makes sense to shuffle ... - return result if result.size <= 1 - - # We turn any string value into an array to be able to shuffle ... - result = string ? result.split('') : result - - elements = result.size - - # Simple implementation of Fisher–Yates in-place shuffle ... - elements.times do |i| - j = rand(elements - i) + i - result[j], result[i] = result[i], result[j] - end - - result = string ? result.join : result - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/size.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/size.rb deleted file mode 100644 index cc207e3fad..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/size.rb +++ /dev/null @@ -1,48 +0,0 @@ -# -# size.rb -# - -# TODO(Krzysztof Wilczynski): Support for hashes would be nice too ... - -module Puppet::Parser::Functions - newfunction(:size, :type => :rvalue, :doc => <<-EOS -Returns the number of elements in a string or array. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "size(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - item = arguments[0] - - if item.is_a?(String) - - begin - # - # Check whether your item is a numeric value or not ... - # This will take care about positive and/or negative numbers - # for both integer and floating-point values ... - # - # Please note that Puppet has no notion of hexadecimal - # nor octal numbers for its DSL at this point in time ... - # - Float(item) - - raise(Puppet::ParseError, 'size(): Requires either ' + - 'string or array to work with') - - rescue ArgumentError - result = item.size - end - - elsif item.is_a?(Array) - result = item.size - else - raise(Puppet::ParseError, 'size(): Unknown type given') - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/sort.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/sort.rb deleted file mode 100644 index cefbe5463b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/sort.rb +++ /dev/null @@ -1,27 +0,0 @@ -# -# sort.rb -# - -module Puppet::Parser::Functions - newfunction(:sort, :type => :rvalue, :doc => <<-EOS -Sorts strings and arrays lexically. - EOS - ) do |arguments| - - if (arguments.size != 1) then - raise(Puppet::ParseError, "sort(): Wrong number of arguments "+ - "given #{arguments.size} for 1") - end - - value = arguments[0] - - if value.is_a?(Array) then - value.sort - elsif value.is_a?(String) then - value.split("").sort.join("") - end - - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb deleted file mode 100644 index 81fadfdb2f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb +++ /dev/null @@ -1,36 +0,0 @@ -# -# squeeze.rb -# - -module Puppet::Parser::Functions - newfunction(:squeeze, :type => :rvalue, :doc => <<-EOS -Returns a new string where runs of the same character that occur in this set are replaced by a single character. - EOS - ) do |arguments| - - if ((arguments.size != 2) and (arguments.size != 1)) then - raise(Puppet::ParseError, "squeeze(): Wrong number of arguments "+ - "given #{arguments.size} for 2 or 1") - end - - item = arguments[0] - squeezeval = arguments[1] - - if item.is_a?(Array) then - if squeezeval then - item.collect { |i| i.squeeze(squeezeval) } - else - item.collect { |i| i.squeeze } - end - else - if squeezeval then - item.squeeze(squeezeval) - else - item.squeeze - end - end - - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb deleted file mode 100644 index 446732ece4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb +++ /dev/null @@ -1,46 +0,0 @@ -# -# str2bool.rb -# - -module Puppet::Parser::Functions - newfunction(:str2bool, :type => :rvalue, :doc => <<-EOS -This converts a string to a boolean. This attempt to convert strings that -contain things like: y, 1, t, true to 'true' and strings that contain things -like: 0, f, n, false, no to 'false'. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "str2bool(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - string = arguments[0] - - # If string is already Boolean, return it - if !!string == string - return string - end - - unless string.is_a?(String) - raise(Puppet::ParseError, 'str2bool(): Requires either ' + - 'string to work with') - end - - # We consider all the yes, no, y, n and so on too ... - result = case string - # - # This is how undef looks like in Puppet ... - # We yield false in this case. - # - when /^$/, '' then false # Empty string will be false ... - when /^(1|t|y|true|yes)$/ then true - when /^(0|f|n|false|no)$/ then false - when /^(undef|undefined)$/ then false # This is not likely to happen ... - else - raise(Puppet::ParseError, 'str2bool(): Unknown type of boolean given') - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb deleted file mode 100644 index 7fe7b0128a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb +++ /dev/null @@ -1,32 +0,0 @@ -# -# str2saltedsha512.rb -# - -module Puppet::Parser::Functions - newfunction(:str2saltedsha512, :type => :rvalue, :doc => <<-EOS -This converts a string to a salted-SHA512 password hash (which is used for -OS X versions >= 10.7). Given any simple string, you will get a hex version -of a salted-SHA512 password hash that can be inserted into your Puppet -manifests as a valid password attribute. - EOS - ) do |arguments| - require 'digest/sha2' - - raise(Puppet::ParseError, "str2saltedsha512(): Wrong number of arguments " + - "passed (#{arguments.size} but we require 1)") if arguments.size != 1 - - password = arguments[0] - - unless password.is_a?(String) - raise(Puppet::ParseError, 'str2saltedsha512(): Requires a ' + - "String argument, you passed: #{password.class}") - end - - seedint = rand(2**31 - 1) - seedstring = Array(seedint).pack("L") - saltedpass = Digest::SHA512.digest(seedstring + password) - (seedstring + saltedpass).unpack('H*')[0] - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strftime.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strftime.rb deleted file mode 100644 index 0b52adecdb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strftime.rb +++ /dev/null @@ -1,107 +0,0 @@ -# -# strftime.rb -# - -module Puppet::Parser::Functions - newfunction(:strftime, :type => :rvalue, :doc => <<-EOS -This function returns formatted time. - -*Examples:* - -To return the time since epoch: - - strftime("%s") - -To return the date: - - strftime("%Y-%m-%d") - -*Format meaning:* - - %a - The abbreviated weekday name (``Sun'') - %A - The full weekday name (``Sunday'') - %b - The abbreviated month name (``Jan'') - %B - The full month name (``January'') - %c - The preferred local date and time representation - %C - Century (20 in 2009) - %d - Day of the month (01..31) - %D - Date (%m/%d/%y) - %e - Day of the month, blank-padded ( 1..31) - %F - Equivalent to %Y-%m-%d (the ISO 8601 date format) - %h - Equivalent to %b - %H - Hour of the day, 24-hour clock (00..23) - %I - Hour of the day, 12-hour clock (01..12) - %j - Day of the year (001..366) - %k - hour, 24-hour clock, blank-padded ( 0..23) - %l - hour, 12-hour clock, blank-padded ( 0..12) - %L - Millisecond of the second (000..999) - %m - Month of the year (01..12) - %M - Minute of the hour (00..59) - %n - Newline (\n) - %N - Fractional seconds digits, default is 9 digits (nanosecond) - %3N millisecond (3 digits) - %6N microsecond (6 digits) - %9N nanosecond (9 digits) - %p - Meridian indicator (``AM'' or ``PM'') - %P - Meridian indicator (``am'' or ``pm'') - %r - time, 12-hour (same as %I:%M:%S %p) - %R - time, 24-hour (%H:%M) - %s - Number of seconds since 1970-01-01 00:00:00 UTC. - %S - Second of the minute (00..60) - %t - Tab character (\t) - %T - time, 24-hour (%H:%M:%S) - %u - Day of the week as a decimal, Monday being 1. (1..7) - %U - Week number of the current year, - starting with the first Sunday as the first - day of the first week (00..53) - %v - VMS date (%e-%b-%Y) - %V - Week number of year according to ISO 8601 (01..53) - %W - Week number of the current year, - starting with the first Monday as the first - day of the first week (00..53) - %w - Day of the week (Sunday is 0, 0..6) - %x - Preferred representation for the date alone, no time - %X - Preferred representation for the time alone, no date - %y - Year without a century (00..99) - %Y - Year with century - %z - Time zone as hour offset from UTC (e.g. +0900) - %Z - Time zone name - %% - Literal ``%'' character - EOS - ) do |arguments| - - # Technically we support two arguments but only first is mandatory ... - raise(Puppet::ParseError, "strftime(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - format = arguments[0] - - raise(Puppet::ParseError, 'strftime(): You must provide ' + - 'format for evaluation') if format.empty? - - # The Time Zone argument is optional ... - time_zone = arguments[1] if arguments[1] - - time = Time.new - - # There is probably a better way to handle Time Zone ... - if time_zone and not time_zone.empty? - original_zone = ENV['TZ'] - - local_time = time.clone - local_time = local_time.utc - - ENV['TZ'] = time_zone - - time = local_time.localtime - - ENV['TZ'] = original_zone - end - - result = time.strftime(format) - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strip.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strip.rb deleted file mode 100644 index 5f4630d7de..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strip.rb +++ /dev/null @@ -1,39 +0,0 @@ -# -# strip.rb -# - -module Puppet::Parser::Functions - newfunction(:strip, :type => :rvalue, :doc => <<-EOS -This function removes leading and trailing whitespace from a string or from -every string inside an array. - -*Examples:* - - strip(" aaa ") - -Would result in: "aaa" - EOS - ) do |arguments| - - raise(Puppet::ParseError, "strip(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'strip(): Requires either ' + - 'array or string to work with') - end - - if value.is_a?(Array) - result = value.collect { |i| i.is_a?(String) ? i.strip : i } - else - result = value.strip - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/suffix.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/suffix.rb deleted file mode 100644 index f7792d6f7a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/suffix.rb +++ /dev/null @@ -1,45 +0,0 @@ -# -# suffix.rb -# - -module Puppet::Parser::Functions - newfunction(:suffix, :type => :rvalue, :doc => <<-EOS -This function applies a suffix to all elements in an array. - -*Examples:* - - suffix(['a','b','c'], 'p') - -Will return: ['ap','bp','cp'] - EOS - ) do |arguments| - - # Technically we support two arguments but only first is mandatory ... - raise(Puppet::ParseError, "suffix(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - array = arguments[0] - - unless array.is_a?(Array) - raise Puppet::ParseError, "suffix(): expected first argument to be an Array, got #{array.inspect}" - end - - suffix = arguments[1] if arguments[1] - - if suffix - unless suffix.is_a? String - raise Puppet::ParseError, "suffix(): expected second argument to be a String, got #{suffix.inspect}" - end - end - - # Turn everything into string same as join would do ... - result = array.collect do |i| - i = i.to_s - suffix ? i + suffix : i - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/swapcase.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/swapcase.rb deleted file mode 100644 index b9e6632533..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/swapcase.rb +++ /dev/null @@ -1,39 +0,0 @@ -# -# swapcase.rb -# - -module Puppet::Parser::Functions - newfunction(:swapcase, :type => :rvalue, :doc => <<-EOS -This function will swap the existing case of a string. - -*Examples:* - - swapcase("aBcD") - -Would result in: "AbCd" - EOS - ) do |arguments| - - raise(Puppet::ParseError, "swapcase(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'swapcase(): Requires either ' + - 'array or string to work with') - end - - if value.is_a?(Array) - # Numbers in Puppet are often string-encoded which is troublesome ... - result = value.collect { |i| i.is_a?(String) ? i.swapcase : i } - else - result = value.swapcase - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/time.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/time.rb deleted file mode 100644 index 0cddaf86b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/time.rb +++ /dev/null @@ -1,49 +0,0 @@ -# -# time.rb -# - -module Puppet::Parser::Functions - newfunction(:time, :type => :rvalue, :doc => <<-EOS -This function will return the current time since epoch as an integer. - -*Examples:* - - time() - -Will return something like: 1311972653 - EOS - ) do |arguments| - - # The Time Zone argument is optional ... - time_zone = arguments[0] if arguments[0] - - if (arguments.size != 0) and (arguments.size != 1) then - raise(Puppet::ParseError, "time(): Wrong number of arguments "+ - "given #{arguments.size} for 0 or 1") - end - - time = Time.new - - # There is probably a better way to handle Time Zone ... - if time_zone and not time_zone.empty? - original_zone = ENV['TZ'] - - local_time = time.clone - local_time = local_time.utc - - ENV['TZ'] = time_zone - - time = local_time.localtime - - ENV['TZ'] = original_zone - end - - # Calling Time#to_i on a receiver changes it. Trust me I am the Doctor. - result = time.strftime('%s') - result = result.to_i - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb deleted file mode 100644 index 8ff73d10b4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb +++ /dev/null @@ -1,28 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:to_bytes, :type => :rvalue, :doc => <<-EOS - Converts the argument into bytes, for example 4 kB becomes 4096. - Takes a single string value as an argument. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "to_bytes(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size != 1 - - arg = arguments[0] - - return arg if arg.is_a? Numeric - - value,prefix = */([0-9.e+-]*)\s*([^bB]?)/.match(arg)[1,2] - - value = value.to_f - case prefix - when '' then return value.to_i - when 'k' then return (value*(1<<10)).to_i - when 'M' then return (value*(1<<20)).to_i - when 'G' then return (value*(1<<30)).to_i - when 'T' then return (value*(1<<40)).to_i - when 'E' then return (value*(1<<50)).to_i - else raise Puppet::ParseError, "to_bytes(): Unknown prefix #{prefix}" - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/type.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/type.rb deleted file mode 100644 index 8d85f11585..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/type.rb +++ /dev/null @@ -1,50 +0,0 @@ -# -# type.rb -# - -module Puppet::Parser::Functions - newfunction(:type, :type => :rvalue, :doc => <<-EOS -Returns the type when passed a variable. Type can be one of: - -* string -* array -* hash -* float -* integer -* boolean - EOS - ) do |arguments| - - raise(Puppet::ParseError, "type(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - - klass = value.class - - if not [TrueClass, FalseClass, Array, Bignum, Fixnum, Float, Hash, String].include?(klass) - raise(Puppet::ParseError, 'type(): Unknown type') - end - - klass = klass.to_s # Ugly ... - - # We note that Integer is the parent to Bignum and Fixnum ... - result = case klass - when /^(?:Big|Fix)num$/ then 'integer' - when /^(?:True|False)Class$/ then 'boolean' - else klass - end - - if result == "String" then - if value == value.to_i.to_s then - result = "Integer" - elsif value == value.to_f.to_s then - result = "Float" - end - end - - return result.downcase - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/union.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/union.rb deleted file mode 100644 index c91bb80537..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/union.rb +++ /dev/null @@ -1,34 +0,0 @@ -# -# union.rb -# - -module Puppet::Parser::Functions - newfunction(:union, :type => :rvalue, :doc => <<-EOS -This function returns a union of two arrays. - -*Examples:* - - union(["a","b","c"],["b","c","d"]) - -Would return: ["a","b","c","d"] - EOS - ) do |arguments| - - # Two arguments are required - raise(Puppet::ParseError, "union(): Wrong number of arguments " + - "given (#{arguments.size} for 2)") if arguments.size != 2 - - first = arguments[0] - second = arguments[1] - - unless first.is_a?(Array) && second.is_a?(Array) - raise(Puppet::ParseError, 'union(): Requires 2 arrays') - end - - result = first | second - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/unique.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/unique.rb deleted file mode 100644 index 8844a74185..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/unique.rb +++ /dev/null @@ -1,51 +0,0 @@ -# -# unique.rb -# - -module Puppet::Parser::Functions - newfunction(:unique, :type => :rvalue, :doc => <<-EOS -This function will remove duplicates from strings and arrays. - -*Examples:* - - unique("aabbcc") - -Will return: - - abc - -You can also use this with arrays: - - unique(["a","a","b","b","c","c"]) - -This returns: - - ["a","b","c"] - EOS - ) do |arguments| - - raise(Puppet::ParseError, "unique(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'unique(): Requires either ' + - 'array or string to work with') - end - - result = value.clone - - string = value.is_a?(String) ? true : false - - # We turn any string value into an array to be able to shuffle ... - result = string ? result.split('') : result - result = result.uniq # Remove duplicates ... - result = string ? result.join : result - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/upcase.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/upcase.rb deleted file mode 100644 index fe6cadc3cc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/upcase.rb +++ /dev/null @@ -1,41 +0,0 @@ -# -# upcase.rb -# - -module Puppet::Parser::Functions - newfunction(:upcase, :type => :rvalue, :doc => <<-EOS -Converts a string or an array of strings to uppercase. - -*Examples:* - - upcase("abcd") - -Will return: - - ASDF - EOS - ) do |arguments| - - raise(Puppet::ParseError, "upcase(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'upcase(): Requires either ' + - 'array or string to work with') - end - - if value.is_a?(Array) - # Numbers in Puppet are often string-encoded which is troublesome ... - result = value.collect { |i| i.is_a?(String) ? i.upcase : i } - else - result = value.upcase - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/uriescape.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/uriescape.rb deleted file mode 100644 index 0d81de5d10..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/uriescape.rb +++ /dev/null @@ -1,35 +0,0 @@ -# -# uriescape.rb -# -require 'uri' - -module Puppet::Parser::Functions - newfunction(:uriescape, :type => :rvalue, :doc => <<-EOS - Urlencodes a string or array of strings. - Requires either a single string or an array as an input. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "uriescape(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - value = arguments[0] - klass = value.class - - unless [Array, String].include?(klass) - raise(Puppet::ParseError, 'uriescape(): Requires either ' + - 'array or string to work with') - end - - if value.is_a?(Array) - # Numbers in Puppet are often string-encoded which is troublesome ... - result = value.collect { |i| i.is_a?(String) ? URI.escape(i,unsafe) : i } - else - result = URI.escape(value) - end - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb deleted file mode 100644 index fe279744ec..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb +++ /dev/null @@ -1,56 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:validate_absolute_path, :doc => <<-'ENDHEREDOC') do |args| - Validate the string represents an absolute path in the filesystem. This function works - for windows and unix style paths. - - The following values will pass: - - $my_path = "C:/Program Files (x86)/Puppet Labs/Puppet" - validate_absolute_path($my_path) - $my_path2 = "/var/lib/puppet" - validate_absolute_path($my_path2) - - - The following values will fail, causing compilation to abort: - - validate_absolute_path(true) - validate_absolute_path([ 'var/lib/puppet', '/var/foo' ]) - validate_absolute_path([ '/var/lib/puppet', 'var/foo' ]) - $undefined = undef - validate_absolute_path($undefined) - - ENDHEREDOC - - require 'puppet/util' - - unless args.length > 0 then - raise Puppet::ParseError, ("validate_absolute_path(): wrong number of arguments (#{args.length}; must be > 0)") - end - - args.each do |arg| - # This logic was borrowed from - # [lib/puppet/file_serving/base.rb](https://github.com/puppetlabs/puppet/blob/master/lib/puppet/file_serving/base.rb) - - # Puppet 2.7 and beyond will have Puppet::Util.absolute_path? Fall back to a back-ported implementation otherwise. - if Puppet::Util.respond_to?(:absolute_path?) then - unless Puppet::Util.absolute_path?(arg, :posix) or Puppet::Util.absolute_path?(arg, :windows) - raise Puppet::ParseError, ("#{arg.inspect} is not an absolute path.") - end - else - # This code back-ported from 2.7.x's lib/puppet/util.rb Puppet::Util.absolute_path? - # Determine in a platform-specific way whether a path is absolute. This - # defaults to the local platform if none is specified. - # Escape once for the string literal, and once for the regex. - slash = '[\\\\/]' - name = '[^\\\\/]+' - regexes = { - :windows => %r!^(([A-Z]:#{slash})|(#{slash}#{slash}#{name}#{slash}#{name})|(#{slash}#{slash}\?#{slash}#{name}))!i, - :posix => %r!^/!, - } - - rval = (!!(arg =~ regexes[:posix])) || (!!(arg =~ regexes[:windows])) - rval or raise Puppet::ParseError, ("#{arg.inspect} is not an absolute path.") - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_array.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_array.rb deleted file mode 100644 index 34b511825c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_array.rb +++ /dev/null @@ -1,33 +0,0 @@ -module Puppet::Parser::Functions - - newfunction(:validate_array, :doc => <<-'ENDHEREDOC') do |args| - Validate that all passed values are array data structures. Abort catalog - compilation if any value fails this check. - - The following values will pass: - - $my_array = [ 'one', 'two' ] - validate_array($my_array) - - The following values will fail, causing compilation to abort: - - validate_array(true) - validate_array('some_string') - $undefined = undef - validate_array($undefined) - - ENDHEREDOC - - unless args.length > 0 then - raise Puppet::ParseError, ("validate_array(): wrong number of arguments (#{args.length}; must be > 0)") - end - - args.each do |arg| - unless arg.is_a?(Array) - raise Puppet::ParseError, ("#{arg.inspect} is not an Array. It looks to be a #{arg.class}") - end - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb deleted file mode 100644 index 154d66091c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb +++ /dev/null @@ -1,81 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:validate_augeas, :doc => <<-'ENDHEREDOC') do |args| - Perform validation of a string using an Augeas lens - The first argument of this function should be a string to - test, and the second argument should be the name of the Augeas lens to use. - If Augeas fails to parse the string with the lens, the compilation will - abort with a parse error. - - A third argument can be specified, listing paths which should - not be found in the file. The `$file` variable points to the location - of the temporary file being tested in the Augeas tree. - - For example, if you want to make sure your passwd content never contains - a user `foo`, you could write: - - validate_augeas($passwdcontent, 'Passwd.lns', ['$file/foo']) - - Or if you wanted to ensure that no users used the '/bin/barsh' shell, - you could use: - - validate_augeas($passwdcontent, 'Passwd.lns', ['$file/*[shell="/bin/barsh"]'] - - If a fourth argument is specified, this will be the error message raised and - seen by the user. - - A helpful error message can be returned like this: - - validate_augeas($sudoerscontent, 'Sudoers.lns', [], 'Failed to validate sudoers content with Augeas') - - ENDHEREDOC - unless Puppet.features.augeas? - raise Puppet::ParseError, ("validate_augeas(): this function requires the augeas feature. See http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas#Pre-requisites for how to activate it.") - end - - if (args.length < 2) or (args.length > 4) then - raise Puppet::ParseError, ("validate_augeas(): wrong number of arguments (#{args.length}; must be 2, 3, or 4)") - end - - msg = args[3] || "validate_augeas(): Failed to validate content against #{args[1].inspect}" - - require 'augeas' - aug = Augeas::open(nil, nil, Augeas::NO_MODL_AUTOLOAD) - begin - content = args[0] - - # Test content in a temporary file - tmpfile = Tempfile.new("validate_augeas") - begin - tmpfile.write(content) - ensure - tmpfile.close - end - - # Check for syntax - lens = args[1] - aug.transform( - :lens => lens, - :name => 'Validate_augeas', - :incl => tmpfile.path - ) - aug.load! - - unless aug.match("/augeas/files#{tmpfile.path}//error").empty? - error = aug.get("/augeas/files#{tmpfile.path}//error/message") - msg += " with error: #{error}" - raise Puppet::ParseError, (msg) - end - - # Launch unit tests - tests = args[2] || [] - aug.defvar('file', "/files#{tmpfile.path}") - tests.each do |t| - msg += " testing path #{t}" - raise Puppet::ParseError, (msg) unless aug.match(t).empty? - end - ensure - aug.close - tmpfile.unlink - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb deleted file mode 100644 index 59a08056b0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb +++ /dev/null @@ -1,34 +0,0 @@ -module Puppet::Parser::Functions - - newfunction(:validate_bool, :doc => <<-'ENDHEREDOC') do |args| - Validate that all passed values are either true or false. Abort catalog - compilation if any value fails this check. - - The following values will pass: - - $iamtrue = true - validate_bool(true) - validate_bool(true, true, false, $iamtrue) - - The following values will fail, causing compilation to abort: - - $some_array = [ true ] - validate_bool("false") - validate_bool("true") - validate_bool($some_array) - - ENDHEREDOC - - unless args.length > 0 then - raise Puppet::ParseError, ("validate_bool(): wrong number of arguments (#{args.length}; must be > 0)") - end - - args.each do |arg| - unless function_is_bool([arg]) - raise Puppet::ParseError, ("#{arg.inspect} is not a boolean. It looks to be a #{arg.class}") - end - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb deleted file mode 100644 index 2ebe91cf78..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb +++ /dev/null @@ -1,48 +0,0 @@ -require 'puppet/util/execution' - -module Puppet::Parser::Functions - newfunction(:validate_cmd, :doc => <<-'ENDHEREDOC') do |args| - Perform validation of a string with an external command. - The first argument of this function should be a string to - test, and the second argument should be a path to a test command - taking a file as last argument. If the command, launched against - a tempfile containing the passed string, returns a non-null value, - compilation will abort with a parse error. - - If a third argument is specified, this will be the error message raised and - seen by the user. - - A helpful error message can be returned like this: - - Example: - - validate_cmd($sudoerscontent, '/usr/sbin/visudo -c -f', 'Visudo failed to validate sudoers content') - - ENDHEREDOC - if (args.length < 2) or (args.length > 3) then - raise Puppet::ParseError, ("validate_cmd(): wrong number of arguments (#{args.length}; must be 2 or 3)") - end - - msg = args[2] || "validate_cmd(): failed to validate content with command #{args[1].inspect}" - - content = args[0] - checkscript = args[1] - - # Test content in a temporary file - tmpfile = Tempfile.new("validate_cmd") - begin - tmpfile.write(content) - tmpfile.close - if Puppet::Util::Execution.respond_to?('execute') - Puppet::Util::Execution.execute("#{checkscript} #{tmpfile.path}") - else - Puppet::Util.execute("#{checkscript} #{tmpfile.path}") - end - rescue Puppet::ExecutionFailure => detail - msg += "\n#{detail}" - raise Puppet::ParseError, msg - ensure - tmpfile.unlink - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb deleted file mode 100644 index 9bdd543283..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb +++ /dev/null @@ -1,33 +0,0 @@ -module Puppet::Parser::Functions - - newfunction(:validate_hash, :doc => <<-'ENDHEREDOC') do |args| - Validate that all passed values are hash data structures. Abort catalog - compilation if any value fails this check. - - The following values will pass: - - $my_hash = { 'one' => 'two' } - validate_hash($my_hash) - - The following values will fail, causing compilation to abort: - - validate_hash(true) - validate_hash('some_string') - $undefined = undef - validate_hash($undefined) - - ENDHEREDOC - - unless args.length > 0 then - raise Puppet::ParseError, ("validate_hash(): wrong number of arguments (#{args.length}; must be > 0)") - end - - args.each do |arg| - unless arg.is_a?(Hash) - raise Puppet::ParseError, ("#{arg.inspect} is not a Hash. It looks to be a #{arg.class}") - end - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb deleted file mode 100644 index fc02748e81..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb +++ /dev/null @@ -1,48 +0,0 @@ -module Puppet::Parser::Functions - - newfunction(:validate_ipv4_address, :doc => <<-ENDHEREDOC - Validate that all values passed are valid IPv4 addresses. - Fail compilation if any value fails this check. - - The following values will pass: - - $my_ip = "1.2.3.4" - validate_ipv4_address($my_ip) - validate_bool("8.8.8.8", "172.16.0.1", $my_ip) - - The following values will fail, causing compilation to abort: - - $some_array = [ 1, true, false, "garbage string", "3ffe:505:2" ] - validate_ipv4_address($some_array) - - ENDHEREDOC - ) do |args| - - require "ipaddr" - rescuable_exceptions = [ ArgumentError ] - - if defined?(IPAddr::InvalidAddressError) - rescuable_exceptions << IPAddr::InvalidAddressError - end - - unless args.length > 0 then - raise Puppet::ParseError, ("validate_ipv4_address(): wrong number of arguments (#{args.length}; must be > 0)") - end - - args.each do |arg| - unless arg.is_a?(String) - raise Puppet::ParseError, "#{arg.inspect} is not a string." - end - - begin - unless IPAddr.new(arg).ipv4? - raise Puppet::ParseError, "#{arg.inspect} is not a valid IPv4 address." - end - rescue *rescuable_exceptions - raise Puppet::ParseError, "#{arg.inspect} is not a valid IPv4 address." - end - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb deleted file mode 100644 index b0f2558df7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb +++ /dev/null @@ -1,49 +0,0 @@ -module Puppet::Parser::Functions - - newfunction(:validate_ipv6_address, :doc => <<-ENDHEREDOC - Validate that all values passed are valid IPv6 addresses. - Fail compilation if any value fails this check. - - The following values will pass: - - $my_ip = "3ffe:505:2" - validate_ipv6_address(1) - validate_ipv6_address($my_ip) - validate_bool("fe80::baf6:b1ff:fe19:7507", $my_ip) - - The following values will fail, causing compilation to abort: - - $some_array = [ true, false, "garbage string", "1.2.3.4" ] - validate_ipv6_address($some_array) - - ENDHEREDOC - ) do |args| - - require "ipaddr" - rescuable_exceptions = [ ArgumentError ] - - if defined?(IPAddr::InvalidAddressError) - rescuable_exceptions << IPAddr::InvalidAddressError - end - - unless args.length > 0 then - raise Puppet::ParseError, ("validate_ipv6_address(): wrong number of arguments (#{args.length}; must be > 0)") - end - - args.each do |arg| - unless arg.is_a?(String) - raise Puppet::ParseError, "#{arg.inspect} is not a string." - end - - begin - unless IPAddr.new(arg).ipv6? - raise Puppet::ParseError, "#{arg.inspect} is not a valid IPv6 address." - end - rescue *rescuable_exceptions - raise Puppet::ParseError, "#{arg.inspect} is not a valid IPv6 address." - end - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_re.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_re.rb deleted file mode 100644 index ca25a702c5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_re.rb +++ /dev/null @@ -1,40 +0,0 @@ -module Puppet::Parser::Functions - newfunction(:validate_re, :doc => <<-'ENDHEREDOC') do |args| - Perform simple validation of a string against one or more regular - expressions. The first argument of this function should be a string to - test, and the second argument should be a stringified regular expression - (without the // delimiters) or an array of regular expressions. If none - of the regular expressions match the string passed in, compilation will - abort with a parse error. - - If a third argument is specified, this will be the error message raised and - seen by the user. - - The following strings will validate against the regular expressions: - - validate_re('one', '^one$') - validate_re('one', [ '^one', '^two' ]) - - The following strings will fail to validate, causing compilation to abort: - - validate_re('one', [ '^two', '^three' ]) - - A helpful error message can be returned like this: - - validate_re($::puppetversion, '^2.7', 'The $puppetversion fact value does not match 2.7') - - ENDHEREDOC - if (args.length < 2) or (args.length > 3) then - raise Puppet::ParseError, ("validate_re(): wrong number of arguments (#{args.length}; must be 2 or 3)") - end - - msg = args[2] || "validate_re(): #{args[0].inspect} does not match #{args[1].inspect}" - - # We're using a flattened array here because we can't call String#any? in - # Ruby 1.9 like we can in Ruby 1.8 - raise Puppet::ParseError, (msg) unless [args[1]].flatten.any? do |re_str| - args[0] =~ Regexp.compile(re_str) - end - - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb deleted file mode 100644 index 7d534f3703..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb +++ /dev/null @@ -1,71 +0,0 @@ -module Puppet::Parser::Functions - - newfunction(:validate_slength, :doc => <<-'ENDHEREDOC') do |args| - Validate that the first argument is a string (or an array of strings), and - less/equal to than the length of the second argument. An optional third - parameter can be given a the minimum length. It fails if the first - argument is not a string or array of strings, and if arg 2 and arg 3 are - not convertable to a number. - - The following values will pass: - - validate_slength("discombobulate",17) - validate_slength(["discombobulate","moo"],17) - validate_slength(["discombobulate","moo"],17,3) - - The following valueis will not: - - validate_slength("discombobulate",1) - validate_slength(["discombobulate","thermometer"],5) - validate_slength(["discombobulate","moo"],17,10) - - ENDHEREDOC - - raise Puppet::ParseError, "validate_slength(): Wrong number of arguments (#{args.length}; must be 2 or 3)" unless args.length == 2 or args.length == 3 - - input, max_length, min_length = *args - - begin - max_length = Integer(max_length) - raise ArgumentError if max_length <= 0 - rescue ArgumentError, TypeError - raise Puppet::ParseError, "validate_slength(): Expected second argument to be a positive Numeric, got #{max_length}:#{max_length.class}" - end - - if min_length - begin - min_length = Integer(min_length) - raise ArgumentError if min_length < 0 - rescue ArgumentError, TypeError - raise Puppet::ParseError, "validate_slength(): Expected third argument to be unset or a positive Numeric, got #{min_length}:#{min_length.class}" - end - else - min_length = 0 - end - - if min_length > max_length - raise Puppet::ParseError, "validate_slength(): Expected second argument to be larger than third argument" - end - - validator = lambda do |str| - unless str.length <= max_length and str.length >= min_length - raise Puppet::ParseError, "validate_slength(): Expected length of #{input.inspect} to be between #{min_length} and #{max_length}, was #{input.length}" - end - end - - case input - when String - validator.call(input) - when Array - input.each_with_index do |arg, pos| - if arg.is_a? String - validator.call(arg) - else - raise Puppet::ParseError, "validate_slength(): Expected element at array position #{pos} to be a String, got #{arg.class}" - end - end - else - raise Puppet::ParseError, "validate_slength(): Expected first argument to be a String or Array, got #{input.class}" - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_string.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_string.rb deleted file mode 100644 index e667794a67..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_string.rb +++ /dev/null @@ -1,33 +0,0 @@ -module Puppet::Parser::Functions - - newfunction(:validate_string, :doc => <<-'ENDHEREDOC') do |args| - Validate that all passed values are string data structures. Abort catalog - compilation if any value fails this check. - - The following values will pass: - - $my_string = "one two" - validate_string($my_string, 'three') - - The following values will fail, causing compilation to abort: - - validate_string(true) - validate_string([ 'some', 'array' ]) - $undefined = undef - validate_string($undefined) - - ENDHEREDOC - - unless args.length > 0 then - raise Puppet::ParseError, ("validate_string(): wrong number of arguments (#{args.length}; must be > 0)") - end - - args.each do |arg| - unless arg.is_a?(String) - raise Puppet::ParseError, ("#{arg.inspect} is not a string. It looks to be a #{arg.class}") - end - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values.rb deleted file mode 100644 index 16067561b4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values.rb +++ /dev/null @@ -1,39 +0,0 @@ -# -# values.rb -# - -module Puppet::Parser::Functions - newfunction(:values, :type => :rvalue, :doc => <<-EOS -When given a hash this function will return the values of that hash. - -*Examples:* - - $hash = { - 'a' => 1, - 'b' => 2, - 'c' => 3, - } - values($hash) - -This example would return: - - [1,2,3] - EOS - ) do |arguments| - - raise(Puppet::ParseError, "values(): Wrong number of arguments " + - "given (#{arguments.size} for 1)") if arguments.size < 1 - - hash = arguments[0] - - unless hash.is_a?(Hash) - raise(Puppet::ParseError, 'values(): Requires hash to work with') - end - - result = hash.values - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values_at.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values_at.rb deleted file mode 100644 index d3e69d97fc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values_at.rb +++ /dev/null @@ -1,98 +0,0 @@ -# -# values_at.rb -# - -module Puppet::Parser::Functions - newfunction(:values_at, :type => :rvalue, :doc => <<-EOS -Finds value inside an array based on location. - -The first argument is the array you want to analyze, and the second element can -be a combination of: - -* A single numeric index -* A range in the form of 'start-stop' (eg. 4-9) -* An array combining the above - -*Examples*: - - values_at(['a','b','c'], 2) - -Would return ['c']. - - values_at(['a','b','c'], ["0-1"]) - -Would return ['a','b']. - - values_at(['a','b','c','d','e'], [0, "2-3"]) - -Would return ['a','c','d']. - EOS - ) do |arguments| - - raise(Puppet::ParseError, "values_at(): Wrong number of " + - "arguments given (#{arguments.size} for 2)") if arguments.size < 2 - - array = arguments.shift - - unless array.is_a?(Array) - raise(Puppet::ParseError, 'values_at(): Requires array to work with') - end - - indices = [arguments.shift].flatten() # Get them all ... Pokemon ... - - if not indices or indices.empty? - raise(Puppet::ParseError, 'values_at(): You must provide ' + - 'at least one positive index to collect') - end - - result = [] - indices_list = [] - - indices.each do |i| - if m = i.match(/^(\d+)(\.\.\.?|\-)(\d+)$/) - start = m[1].to_i - stop = m[3].to_i - - type = m[2] - - if start > stop - raise(Puppet::ParseError, 'values_at(): Stop index in ' + - 'given indices range is smaller than the start index') - elsif stop > array.size - 1 # First element is at index 0 is it not? - raise(Puppet::ParseError, 'values_at(): Stop index in ' + - 'given indices range exceeds array size') - end - - range = case type - when /^(\.\.|\-)$/ then (start .. stop) - when /^(\.\.\.)$/ then (start ... stop) # Exclusive of last element ... - end - - range.each { |i| indices_list << i.to_i } - else - # Only positive numbers allowed in this case ... - if not i.match(/^\d+$/) - raise(Puppet::ParseError, 'values_at(): Unknown format ' + - 'of given index') - end - - # In Puppet numbers are often string-encoded ... - i = i.to_i - - if i > array.size - 1 # Same story. First element is at index 0 ... - raise(Puppet::ParseError, 'values_at(): Given index ' + - 'exceeds array size') - end - - indices_list << i - end - end - - # We remove nil values as they make no sense in Puppet DSL ... - result = indices_list.collect { |i| array[i] }.compact - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/zip.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/zip.rb deleted file mode 100644 index 2b56e9ca07..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/zip.rb +++ /dev/null @@ -1,65 +0,0 @@ -# -# zip.rb -# - -module Puppet::Parser::Functions - newfunction(:zip, :type => :rvalue, :doc => <<-EOS -Takes one element from first array and merges corresponding elements from second array. This generates a sequence of n-element arrays, where n is one more than the count of arguments. - -*Example:* - - zip(['1','2','3'],['4','5','6']) - -Would result in: - - ["1", "4"], ["2", "5"], ["3", "6"] - EOS - ) do |arguments| - - # Technically we support three arguments but only first is mandatory ... - raise(Puppet::ParseError, "zip(): Wrong number of arguments " + - "given (#{arguments.size} for 2)") if arguments.size < 2 - - a = arguments[0] - b = arguments[1] - - unless a.is_a?(Array) and b.is_a?(Array) - raise(Puppet::ParseError, 'zip(): Requires array to work with') - end - - flatten = arguments[2] if arguments[2] - - if flatten - klass = flatten.class - - # We can have either true or false, or string which resembles boolean ... - unless [FalseClass, TrueClass, String].include?(klass) - raise(Puppet::ParseError, 'zip(): Requires either ' + - 'boolean or string to work with') - end - - if flatten.is_a?(String) - # We consider all the yes, no, y, n and so on too ... - flatten = case flatten - # - # This is how undef looks like in Puppet ... - # We yield false in this case. - # - when /^$/, '' then false # Empty string will be false ... - when /^(1|t|y|true|yes)$/ then true - when /^(0|f|n|false|no)$/ then false - when /^(undef|undefined)$/ then false # This is not likely to happen ... - else - raise(Puppet::ParseError, 'zip(): Unknown type of boolean given') - end - end - end - - result = a.zip(b) - result = flatten ? result.flatten : result - - return result - end -end - -# vim: set ts=2 sw=2 et : diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/provider/file_line/ruby.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/provider/file_line/ruby.rb deleted file mode 100644 index 94e7fac919..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/provider/file_line/ruby.rb +++ /dev/null @@ -1,83 +0,0 @@ -Puppet::Type.type(:file_line).provide(:ruby) do - def exists? - lines.find do |line| - line.chomp == resource[:line].chomp - end - end - - def create - if resource[:match] - handle_create_with_match - elsif resource[:after] - handle_create_with_after - else - append_line - end - end - - def destroy - local_lines = lines - File.open(resource[:path],'w') do |fh| - fh.write(local_lines.reject{|l| l.chomp == resource[:line] }.join('')) - end - end - - private - def lines - # If this type is ever used with very large files, we should - # write this in a different way, using a temp - # file; for now assuming that this type is only used on - # small-ish config files that can fit into memory without - # too much trouble. - @lines ||= File.readlines(resource[:path]) - end - - def handle_create_with_match() - regex = resource[:match] ? Regexp.new(resource[:match]) : nil - match_count = lines.select { |l| regex.match(l) }.size - if match_count > 1 && resource[:multiple].to_s != 'true' - raise Puppet::Error, "More than one line in file '#{resource[:path]}' matches pattern '#{resource[:match]}'" - end - File.open(resource[:path], 'w') do |fh| - lines.each do |l| - fh.puts(regex.match(l) ? resource[:line] : l) - end - - if (match_count == 0) - fh.puts(resource[:line]) - end - end - end - - def handle_create_with_after - regex = Regexp.new(resource[:after]) - - count = lines.count {|l| l.match(regex)} - - case count - when 1 # find the line to put our line after - File.open(resource[:path], 'w') do |fh| - lines.each do |l| - fh.puts(l) - if regex.match(l) then - fh.puts(resource[:line]) - end - end - end - when 0 # append the line to the end of the file - append_line - else - raise Puppet::Error, "#{count} lines match pattern '#{resource[:after]}' in file '#{resource[:path]}'. One or no line must match the pattern." - end - end - - ## - # append the line to the file. - # - # @api private - def append_line - File.open(resource[:path], 'a') do |fh| - fh.puts resource[:line] - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/anchor.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/anchor.rb deleted file mode 100644 index fe1e5aa195..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/anchor.rb +++ /dev/null @@ -1,46 +0,0 @@ -Puppet::Type.newtype(:anchor) do - desc <<-'ENDOFDESC' - A simple resource type intended to be used as an anchor in a composite class. - - In Puppet 2.6, when a class declares another class, the resources in the - interior class are not contained by the exterior class. This interacts badly - with the pattern of composing complex modules from smaller classes, as it - makes it impossible for end users to specify order relationships between the - exterior class and other modules. - - The anchor type lets you work around this. By sandwiching any interior - classes between two no-op resources that _are_ contained by the exterior - class, you can ensure that all resources in the module are contained. - - class ntp { - # These classes will have the correct order relationship with each - # other. However, without anchors, they won't have any order - # relationship to Class['ntp']. - class { 'ntp::package': } - -> class { 'ntp::config': } - -> class { 'ntp::service': } - - # These two resources "anchor" the composed classes within the ntp - # class. - anchor { 'ntp::begin': } -> Class['ntp::package'] - Class['ntp::service'] -> anchor { 'ntp::end': } - } - - This allows the end user of the ntp module to establish require and before - relationships with Class['ntp']: - - class { 'ntp': } -> class { 'mcollective': } - class { 'mcollective': } -> class { 'ntp': } - - ENDOFDESC - - newparam :name do - desc "The name of the anchor resource." - end - - def refresh - # We don't do anything with them, but we need this to - # show that we are "refresh aware" and not break the - # chain of propagation. - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/file_line.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/file_line.rb deleted file mode 100644 index 323fc4c9c7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/file_line.rb +++ /dev/null @@ -1,79 +0,0 @@ -Puppet::Type.newtype(:file_line) do - - desc <<-EOT - Ensures that a given line is contained within a file. The implementation - matches the full line, including whitespace at the beginning and end. If - the line is not contained in the given file, Puppet will add the line to - ensure the desired state. Multiple resources may be declared to manage - multiple lines in the same file. - - Example: - - file_line { 'sudo_rule': - path => '/etc/sudoers', - line => '%sudo ALL=(ALL) ALL', - } - file_line { 'sudo_rule_nopw': - path => '/etc/sudoers', - line => '%sudonopw ALL=(ALL) NOPASSWD: ALL', - } - - In this example, Puppet will ensure both of the specified lines are - contained in the file /etc/sudoers. - - EOT - - ensurable do - defaultvalues - defaultto :present - end - - newparam(:name, :namevar => true) do - desc 'An arbitrary name used as the identity of the resource.' - end - - newparam(:match) do - desc 'An optional regular expression to run against existing lines in the file;\n' + - 'if a match is found, we replace that line rather than adding a new line.' - end - - newparam(:multiple) do - desc 'An optional value to determine if match can change multiple lines.' - newvalues(true, false) - end - - newparam(:after) do - desc 'An optional value used to specify the line after which we will add any new lines. (Existing lines are added in place)' - end - - newparam(:line) do - desc 'The line to be appended to the file located by the path parameter.' - end - - newparam(:path) do - desc 'The file Puppet will ensure contains the line specified by the line parameter.' - validate do |value| - unless (Puppet.features.posix? and value =~ /^\//) or (Puppet.features.microsoft_windows? and (value =~ /^.:\// or value =~ /^\/\/[^\/]+\/[^\/]+/)) - raise(Puppet::Error, "File paths must be fully qualified, not '#{value}'") - end - end - end - - # Autorequire the file resource if it's being managed - autorequire(:file) do - self[:path] - end - - validate do - unless self[:line] and self[:path] - raise(Puppet::Error, "Both line and path are required attributes") - end - - if (self[:match]) - unless Regexp.new(self[:match]).match(self[:line]) - raise(Puppet::Error, "When providing a 'match' parameter, the value must be a regex that matches against the value of your 'line' parameter") - end - end - - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/manifests/init.pp deleted file mode 100644 index 500ad770d5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/manifests/init.pp +++ /dev/null @@ -1,20 +0,0 @@ -# Class: stdlib -# -# This module manages stdlib. Most of stdlib's features are automatically -# loaded by Puppet, but this class should be declared in order to use the -# standardized run stages. -# -# Parameters: none -# -# Actions: -# -# Declares all other classes in the stdlib module. Currently, this consists -# of stdlib::stages. -# -# Requires: nothing -# -class stdlib { - - class { 'stdlib::stages': } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/manifests/stages.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/manifests/stages.pp deleted file mode 100644 index eb15fd650d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/manifests/stages.pp +++ /dev/null @@ -1,43 +0,0 @@ -# Class: stdlib::stages -# -# This class manages a standard set of run stages for Puppet. It is managed by -# the stdlib class, and should not be declared independently. -# -# The high level stages are (in order): -# -# * setup -# * main -# * runtime -# * setup_infra -# * deploy_infra -# * setup_app -# * deploy_app -# * deploy -# -# Parameters: none -# -# Actions: -# -# Declares various run-stages for deploying infrastructure, -# language runtimes, and application layers. -# -# Requires: nothing -# -# Sample Usage: -# -# node default { -# include stdlib -# class { java: stage => 'runtime' } -# } -# -class stdlib::stages { - - stage { 'setup': before => Stage['main'] } - stage { 'runtime': require => Stage['main'] } - -> stage { 'setup_infra': } - -> stage { 'deploy_infra': } - -> stage { 'setup_app': } - -> stage { 'deploy_app': } - -> stage { 'deploy': } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/metadata.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/metadata.json deleted file mode 100644 index e3bacbe75f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/metadata.json +++ /dev/null @@ -1,509 +0,0 @@ -{ - "operatingsystem_support": [ - { - "operatingsystem": "RedHat", - "operatingsystemrelease": [ - "4", - "5", - "6" - ] - }, - { - "operatingsystem": "CentOS", - "operatingsystemrelease": [ - "4", - "5", - "6" - ] - }, - { - "operatingsystem": "OracleLinux", - "operatingsystemrelease": [ - "4", - "5", - "6" - ] - }, - { - "operatingsystem": "Scientific", - "operatingsystemrelease": [ - "4", - "5", - "6" - ] - }, - { - "operatingsystem": "SLES", - "operatingsystemrelease": [ - "11 SP1" - ] - }, - { - "operatingsystem": "Debian", - "operatingsystemrelease": [ - "6", - "7" - ] - }, - { - "operatingsystem": "Ubuntu", - "operatingsystemrelease": [ - "10.04", - "12.04" - ] - }, - { - "operatingsystem": "Solaris", - "operatingsystemrelease": [ - "10", - "11" - ] - }, - { - "operatingsystem": "Windows", - "operatingsystemrelease": [ - "Server 2003", - "Server 2003 R2", - "Server 2008", - "Server 2008 R2", - "Server 2012", - "Server 2012 R2", - "7", - "8" - ] - }, - { - "operatingsystem": "AIX", - "operatingsystemrelease": [ - "5.3", - "6.1", - "7.1" - ] - } - ], - "requirements": [ - { - "name": "pe", - "version_requirement": "3.2.x" - }, - { - "name": "puppet", - "version_requirement": ">=2.7.20 <4.0.0" - } - ], - "name": "puppetlabs-stdlib", - "version": "4.2.1", - "source": "git://github.com/puppetlabs/puppetlabs-stdlib.git", - "author": "puppetlabs", - "license": "Apache 2.0", - "summary": "Puppet Module Standard Library", - "description": "Standard Library for Puppet Modules", - "project_page": "https://github.com/puppetlabs/puppetlabs-stdlib", - "dependencies": [ - - ], - "types": [ - { - "name": "anchor", - "doc": "A simple resource type intended to be used as an anchor in a composite class.\n\nIn Puppet 2.6, when a class declares another class, the resources in the\ninterior class are not contained by the exterior class. This interacts badly\nwith the pattern of composing complex modules from smaller classes, as it\nmakes it impossible for end users to specify order relationships between the\nexterior class and other modules.\n\nThe anchor type lets you work around this. By sandwiching any interior\nclasses between two no-op resources that _are_ contained by the exterior\nclass, you can ensure that all resources in the module are contained.\n\n class ntp {\n # These classes will have the correct order relationship with each\n # other. However, without anchors, they won't have any order\n # relationship to Class['ntp'].\n class { 'ntp::package': }\n -> class { 'ntp::config': }\n -> class { 'ntp::service': }\n\n # These two resources \"anchor\" the composed classes within the ntp\n # class.\n anchor { 'ntp::begin': } -> Class['ntp::package']\n Class['ntp::service'] -> anchor { 'ntp::end': }\n }\n\nThis allows the end user of the ntp module to establish require and before\nrelationships with Class['ntp']:\n\n class { 'ntp': } -> class { 'mcollective': }\n class { 'mcollective': } -> class { 'ntp': }", - "properties": [ - - ], - "parameters": [ - { - "name": "name", - "doc": "The name of the anchor resource.\n\n" - } - ] - }, - { - "name": "file_line", - "doc": "Ensures that a given line is contained within a file. The implementation\nmatches the full line, including whitespace at the beginning and end. If\nthe line is not contained in the given file, Puppet will add the line to\nensure the desired state. Multiple resources may be declared to manage\nmultiple lines in the same file.\n\nExample:\n\n file_line { 'sudo_rule':\n path => '/etc/sudoers',\n line => '%sudo ALL=(ALL) ALL',\n }\n file_line { 'sudo_rule_nopw':\n path => '/etc/sudoers',\n line => '%sudonopw ALL=(ALL) NOPASSWD: ALL',\n }\n\nIn this example, Puppet will ensure both of the specified lines are\ncontained in the file /etc/sudoers.", - "properties": [ - { - "name": "ensure", - "doc": "The basic property that the resource should be in.\n\nValid values are `present`, `absent`. " - } - ], - "parameters": [ - { - "name": "name", - "doc": "An arbitrary name used as the identity of the resource.\n\n" - }, - { - "name": "match", - "doc": "An optional regular expression to run against existing lines in the file;\\nif a match is found, we replace that line rather than adding a new line.\n\n" - }, - { - "name": "multiple", - "doc": "An optional value to determine if match can change multiple lines.\n\nValid values are `true`, `false`. " - }, - { - "name": "after", - "doc": "An optional value used to specify the line after which we will add any new lines. (Existing lines are added in place)\n\n" - }, - { - "name": "line", - "doc": "The line to be appended to the file located by the path parameter.\n\n" - }, - { - "name": "path", - "doc": "The file Puppet will ensure contains the line specified by the line parameter.\n\n" - } - ], - "providers": [ - { - "name": "ruby", - "doc": "" - } - ] - } - ], - "checksums": { - "CHANGELOG.md": "82acb10a79b6dba5b3a8d464e0c9fecf", - "CONTRIBUTING.md": "7fcaaec4913b3d7c123510329ecc4b2d", - "Gemfile": "38895f95212fe38cf47474a05cff2ad2", - "Gemfile.lock": "d30f1ca4792bd19fa9561557f4982a55", - "LICENSE": "38a048b9d82e713d4e1b2573e370a756", - "Modulefile": "9786075c3cc32e7ba85888727e37851f", - "README.markdown": "21410cab41d903b5c39c55739846b6b3", - "README_DEVELOPER.markdown": "220a8b28521b5c5d2ea87c4ddb511165", - "README_SPECS.markdown": "82bb4c6abbb711f40778b162ec0070c1", - "RELEASE_PROCESS.markdown": "94b92bc99ac4106ba1a74d5c04e520f9", - "Rakefile": "dfa334598bfd087adf11533a72d71106", - "lib/facter/facter_dot_d.rb": "1f1fcf1bde3443e42a445d3573602304", - "lib/facter/pe_version.rb": "4a9353952963b011759f3e6652a10da5", - "lib/facter/puppet_vardir.rb": "c7ddc97e8a84ded3dd93baa5b9b3283d", - "lib/facter/root_home.rb": "d9c8276acdceb7340d95f60c36dcdcc5", - "lib/facter/util/puppet_settings.rb": "9f1d2593d0ae56bfca89d4b9266aeee1", - "lib/puppet/parser/functions/abs.rb": "32161bd0435fdfc2aec2fc559d2b454b", - "lib/puppet/parser/functions/any2array.rb": "a81e71d6b67a551d38770ba9a1948a75", - "lib/puppet/parser/functions/base64.rb": "ae25adf92295df67ebd9edfabc9ecdd6", - "lib/puppet/parser/functions/bool2num.rb": "8e627eee990e811e35e7e838c586bd77", - "lib/puppet/parser/functions/capitalize.rb": "14481fc8c7c83fe002066ebcf6722f17", - "lib/puppet/parser/functions/chomp.rb": "719d46923d75251f7b6b68b6e015cccc", - "lib/puppet/parser/functions/chop.rb": "4691a56e6064b792ed4575e4ad3f3d20", - "lib/puppet/parser/functions/concat.rb": "c522e67e558336e1ac26b0a3cfeeed2d", - "lib/puppet/parser/functions/count.rb": "9eb74eccd93e2b3c87fd5ea14e329eba", - "lib/puppet/parser/functions/deep_merge.rb": "d83696855578fb81b64b9e92b9c7cc7c", - "lib/puppet/parser/functions/defined_with_params.rb": "ffab4433d03f32b551f2ea024a2948fc", - "lib/puppet/parser/functions/delete.rb": "96e569dac96b8c9387e9303445d73048", - "lib/puppet/parser/functions/delete_at.rb": "6bc24b79390d463d8be95396c963381a", - "lib/puppet/parser/functions/delete_undef_values.rb": "b32d4a3925753b2eb2c318cbd7f14404", - "lib/puppet/parser/functions/delete_values.rb": "39b147f7d369bb5f809044b6341954a2", - "lib/puppet/parser/functions/difference.rb": "e31b95fbaf974cf853a510177368bfb9", - "lib/puppet/parser/functions/dirname.rb": "bef7214eb89db3eb8f7ee5fc9dca0233", - "lib/puppet/parser/functions/downcase.rb": "9204a04c2a168375a38d502db8811bbe", - "lib/puppet/parser/functions/empty.rb": "ae92905c9d94ddca30bf56b7b1dabedf", - "lib/puppet/parser/functions/ensure_packages.rb": "fbed5c0c9bf82b7746e01f15f89d184f", - "lib/puppet/parser/functions/ensure_resource.rb": "6678127386e77bbc0f09db7b5a32ab6a", - "lib/puppet/parser/functions/flatten.rb": "25777b76f9719162a8bab640e5595b7a", - "lib/puppet/parser/functions/floor.rb": "42cad4c689231a51526c55a6f0985d1f", - "lib/puppet/parser/functions/fqdn_rotate.rb": "20743a138c56fc806a35cb7b60137dbc", - "lib/puppet/parser/functions/get_module_path.rb": "d4bf50da25c0b98d26b75354fa1bcc45", - "lib/puppet/parser/functions/getparam.rb": "4dd7a0e35f4a3780dcfc9b19b4e0006e", - "lib/puppet/parser/functions/getvar.rb": "10bf744212947bc6a7bfd2c9836dbd23", - "lib/puppet/parser/functions/grep.rb": "5682995af458b05f3b53dd794c4bf896", - "lib/puppet/parser/functions/has_interface_with.rb": "8d3ebca805dc6edb88b6b7a13d404787", - "lib/puppet/parser/functions/has_ip_address.rb": "ee207f47906455a5aa49c4fb219dd325", - "lib/puppet/parser/functions/has_ip_network.rb": "b4d726c8b2a0afac81ced8a3a28aa731", - "lib/puppet/parser/functions/has_key.rb": "7cd9728c38f0b0065f832dabd62b0e7e", - "lib/puppet/parser/functions/hash.rb": "9d072527dfc7354b69292e9302906530", - "lib/puppet/parser/functions/intersection.rb": "924ac4aceec7b896952166a7ec08fdb1", - "lib/puppet/parser/functions/is_array.rb": "875ca4356cb0d7a10606fb146b4a3d11", - "lib/puppet/parser/functions/is_bool.rb": "e693b7c4b5366cff1380b6e0c7dd7b11", - "lib/puppet/parser/functions/is_domain_name.rb": "cf72726c0fec831eb703ec9deea739eb", - "lib/puppet/parser/functions/is_float.rb": "10e0d3ecf75fac15e415aee79acf70dc", - "lib/puppet/parser/functions/is_function_available.rb": "628428bbcd9313ce09783d9484330e09", - "lib/puppet/parser/functions/is_hash.rb": "8c7d9a05084dab0389d1b779c8a05b1a", - "lib/puppet/parser/functions/is_integer.rb": "c665be82686aa4729959bb42c66a7510", - "lib/puppet/parser/functions/is_ip_address.rb": "a714a736c1560e8739aaacd9030cca00", - "lib/puppet/parser/functions/is_mac_address.rb": "288bd4b38d4df42a83681f13e7eaaee0", - "lib/puppet/parser/functions/is_numeric.rb": "93ddc9d4c0834a5e5e0562d7b3cdce91", - "lib/puppet/parser/functions/is_string.rb": "2bd9a652bbb2668323eee6c57729ff64", - "lib/puppet/parser/functions/join.rb": "a285a05c015ae278608f6454aef211ea", - "lib/puppet/parser/functions/join_keys_to_values.rb": "f29da49531228f6ca5b3aa0df00a14c2", - "lib/puppet/parser/functions/keys.rb": "eb6ac815ea14fbf423580ed903ef7bad", - "lib/puppet/parser/functions/loadyaml.rb": "2b912f257aa078e376d3b3f6a86c2a00", - "lib/puppet/parser/functions/lstrip.rb": "210b103f78622e099f91cc2956b6f741", - "lib/puppet/parser/functions/max.rb": "f652fd0b46ef7d2fbdb42b141f8fdd1d", - "lib/puppet/parser/functions/member.rb": "541e67d06bc4155e79b00843a125e9bc", - "lib/puppet/parser/functions/merge.rb": "f3dcc5c83440cdda2036cce69b61a14b", - "lib/puppet/parser/functions/min.rb": "0d2a1b7e735ab251c5469e735fa3f4c6", - "lib/puppet/parser/functions/num2bool.rb": "605c12fa518c87ed2c66ae153e0686ce", - "lib/puppet/parser/functions/parsejson.rb": "e7f968c34928107b84cd0860daf50ab1", - "lib/puppet/parser/functions/parseyaml.rb": "00f10ec1e2b050e23d80c256061ebdd7", - "lib/puppet/parser/functions/pick.rb": "bf01f13bbfe2318e7f6a302ac7c4433f", - "lib/puppet/parser/functions/pick_default.rb": "ad3ea60262de408767786d37a54d45dc", - "lib/puppet/parser/functions/prefix.rb": "aebbea0290be82a4ae89ddfffbee1125", - "lib/puppet/parser/functions/range.rb": "17a05dbae8f562f882450f9e648d4e2d", - "lib/puppet/parser/functions/reject.rb": "689f6a7c961a55fe9dcd240921f4c7f9", - "lib/puppet/parser/functions/reverse.rb": "1386371c0f5301055fdf99079e862b3e", - "lib/puppet/parser/functions/rstrip.rb": "8a0d69876bdbc88a2054ba41c9c38961", - "lib/puppet/parser/functions/shuffle.rb": "6445e6b4dc62c37b184a60eeaf34414b", - "lib/puppet/parser/functions/size.rb": "8972d48c0f9e487d659bd7326b40b642", - "lib/puppet/parser/functions/sort.rb": "504b033b438461ca4f9764feeb017833", - "lib/puppet/parser/functions/squeeze.rb": "541f85b4203b55c9931d3d6ecd5c75f8", - "lib/puppet/parser/functions/str2bool.rb": "6320f1a50fd28ec027981cd1fb8ffdd0", - "lib/puppet/parser/functions/str2saltedsha512.rb": "49afad7b386be38ce53deaefef326e85", - "lib/puppet/parser/functions/strftime.rb": "e02e01a598ca5d7d6eee0ba22440304a", - "lib/puppet/parser/functions/strip.rb": "273d547c7b05c0598556464dfd12f5fd", - "lib/puppet/parser/functions/suffix.rb": "109279db4180441e75545dbd5f273298", - "lib/puppet/parser/functions/swapcase.rb": "4902f38f0b9292afec66d40fee4b02ec", - "lib/puppet/parser/functions/time.rb": "08d88d52abd1e230e3a2f82107545d48", - "lib/puppet/parser/functions/to_bytes.rb": "83f23c33adbfa42b2a9d9fc2db3daeb4", - "lib/puppet/parser/functions/type.rb": "62f914d6c90662aaae40c5539701be60", - "lib/puppet/parser/functions/union.rb": "137998fe47decf25aede20f0c0155a4c", - "lib/puppet/parser/functions/unique.rb": "217ccce6d23235af92923f50f8556963", - "lib/puppet/parser/functions/upcase.rb": "a5744a74577cfa136fca2835e75888d3", - "lib/puppet/parser/functions/uriescape.rb": "321b8d2c33a5ea48337e1293774db4e0", - "lib/puppet/parser/functions/validate_absolute_path.rb": "385137ac24a2dec6cecc4e6ea75be442", - "lib/puppet/parser/functions/validate_array.rb": "72b29289b8af1cfc3662ef9be78911b8", - "lib/puppet/parser/functions/validate_augeas.rb": "d4acca7b8a9fdada9ae39e5101902cc1", - "lib/puppet/parser/functions/validate_bool.rb": "a712634a000024398b3c6cd4ecc46463", - "lib/puppet/parser/functions/validate_cmd.rb": "78fd21cb3fc52efc3b53ba2b3301de18", - "lib/puppet/parser/functions/validate_hash.rb": "e9cfaca68751524efe16ecf2f958a9a0", - "lib/puppet/parser/functions/validate_ipv4_address.rb": "a8fb6f0ca36aa460d462c07c2af5d5a2", - "lib/puppet/parser/functions/validate_ipv6_address.rb": "4699238e4cad60e7e1428905523eaeb7", - "lib/puppet/parser/functions/validate_re.rb": "c6664b3943bc820415a43f16372dc2a9", - "lib/puppet/parser/functions/validate_slength.rb": "7e67c213509b9383707819cc612b2a29", - "lib/puppet/parser/functions/validate_string.rb": "6afcbc51f83f0714348b8d61e06ea7eb", - "lib/puppet/parser/functions/values.rb": "066a6e4170e5034edb9a80463dff2bb5", - "lib/puppet/parser/functions/values_at.rb": "094ac110ce9f7a5b16d0c80a0cf2243c", - "lib/puppet/parser/functions/zip.rb": "a80782461ed9465f0cd0c010936f1855", - "lib/puppet/provider/file_line/ruby.rb": "10d65268d2d1e75b5dae014974b79d60", - "lib/puppet/type/anchor.rb": "bbd36bb49c3b554f8602d8d3df366c0c", - "lib/puppet/type/file_line.rb": "a1eceef6bd7cbfe99892cf3ee57ef2b4", - "manifests/init.pp": "f2ba5f36e7227ed87bbb69034fc0de8b", - "manifests/stages.pp": "cc6ed1751d334b0ea278c0335c7f0b5a", - "spec/acceptance/abs_spec.rb": "435478ef1ba43a6cca1f7b4db14a4bcc", - "spec/acceptance/any2array_spec.rb": "78187dc3683c8ecd15774d99024de47d", - "spec/acceptance/base64_spec.rb": "1684d5dd176dd5bbd4c3c6b1e64fbcea", - "spec/acceptance/bool2num_spec.rb": "c5e3aadb08a437f181247429f4125bab", - "spec/acceptance/build_csv.rb": "f28ef587de764ade1513091c4906412c", - "spec/acceptance/capitalize_spec.rb": "e77ea2c37144a75a67969c0d0839adfd", - "spec/acceptance/chomp_spec.rb": "fb0862a6b7eeb3c290e280788e705061", - "spec/acceptance/chop_spec.rb": "0bd1065b9c16a54b86adeb4e3be041fb", - "spec/acceptance/concat_spec.rb": "3a0dae19a34bb13d406c8e0ec87d8fe5", - "spec/acceptance/count_spec.rb": "5b35e597ae1051f41431812707d4b502", - "spec/acceptance/deep_merge_spec.rb": "c335a947f1666e185e0210e661f1c78a", - "spec/acceptance/defined_with_params_spec.rb": "f27c54ade9872c63c69316f62b03c119", - "spec/acceptance/delete_at_spec.rb": "9c028b703ee0286565c9877757678f3f", - "spec/acceptance/delete_spec.rb": "31e6dfcb9cc7c16b20d47c00e6a85a1d", - "spec/acceptance/delete_undef_values_spec.rb": "6e6a66aee0c383c843b5f92ef8c8410c", - "spec/acceptance/delete_values_spec.rb": "22c9b4914d4cbc0153aa3862cb4fb50e", - "spec/acceptance/difference_spec.rb": "289f4f1788feaacb304ffd54971c7e7e", - "spec/acceptance/dirname_spec.rb": "84db53878c4400a6c684c924cff05cfc", - "spec/acceptance/downcase_spec.rb": "0f094849b94a94df491ee01186473104", - "spec/acceptance/empty_spec.rb": "35c1f43e8a3e1fe7dd4335ef86e7efcc", - "spec/acceptance/ensure_packages_spec.rb": "ebeaa1624b30f5750cbfdcdce8690640", - "spec/acceptance/ensure_resource_spec.rb": "9e03216abb2431e749be76a4302931df", - "spec/acceptance/flatten_spec.rb": "83fb08cc168a105c1d5d0df66b1d9e84", - "spec/acceptance/floor_spec.rb": "d7267b2914b1da6406224abb7489ca86", - "spec/acceptance/fqdn_rotate_spec.rb": "bc3d0a01f91d2a85f3dbf53daf404fd1", - "spec/acceptance/get_module_path_spec.rb": "6a6552ff8d6d75ce795b0139c68a7993", - "spec/acceptance/getparam_spec.rb": "b62a47524f434b903f9e155ad56959b3", - "spec/acceptance/getvar_spec.rb": "ba2f081a88be97c0e7004a6296294f23", - "spec/acceptance/grep_spec.rb": "98818b8b0557b80d6ff519f70ea7617c", - "spec/acceptance/has_interface_with_spec.rb": "467183aeada0bec74143be6cf0b89a3d", - "spec/acceptance/has_ip_address_spec.rb": "e0369b12725695c528e2d47b8ea2b4d8", - "spec/acceptance/has_ip_network_spec.rb": "ca8dd6faa6df940784a60a49bec1330d", - "spec/acceptance/has_key_spec.rb": "6509a26a0886f7d591eaa926b2f92407", - "spec/acceptance/hash_spec.rb": "1c626457ba056bdd3936e28aa5bf503e", - "spec/acceptance/intersection_spec.rb": "40f586af7f95408a5d4a2882a4aa98f1", - "spec/acceptance/is_array_spec.rb": "c2ff70ce59b90b50a5aed67abaa5399d", - "spec/acceptance/is_bool_spec.rb": "c001fdecff6b0a3c9dc78774987a0b15", - "spec/acceptance/is_domain_name_spec.rb": "63e84285c26d8717fd5d4dda01e3f432", - "spec/acceptance/is_float_spec.rb": "2f0164b4d732166aa46055a2cf7b4ea9", - "spec/acceptance/is_function_available_spec.rb": "7745eba89f8719c9ca7ebf04d5b005f7", - "spec/acceptance/is_hash_spec.rb": "cff723cd8fddac45033af5dc8406d4e4", - "spec/acceptance/is_integer_spec.rb": "c09201d17d3914bba197872897fa3413", - "spec/acceptance/is_ip_address_spec.rb": "aa14cf9abf404c3fe1e761ea957871fe", - "spec/acceptance/is_mac_address_spec.rb": "30ff4c6a63be58daa3568305617ca2a7", - "spec/acceptance/is_numeric_spec.rb": "fb9829c7a1a8d4a58836df6ff4c3386d", - "spec/acceptance/is_string_spec.rb": "df3022de123b72f0022728eb2d8ce857", - "spec/acceptance/join_keys_to_values_spec.rb": "8aa128bbaeea65aab8d92badee3ca2b5", - "spec/acceptance/join_spec.rb": "c6378ed481265152bba9871fc5501ee6", - "spec/acceptance/keys_spec.rb": "20486e3ebee53e50dc9de3b78b9d6ae6", - "spec/acceptance/loadyaml_spec.rb": "5bce9c4b90e73bccdcd4f66fc988676b", - "spec/acceptance/lstrip_spec.rb": "e29ab4039b65660ec2bd76a298adcae0", - "spec/acceptance/max_spec.rb": "209cda4b83d677743afb1a8870330618", - "spec/acceptance/member_spec.rb": "0dac8ec7c7f670fca429fc26cf8ccc14", - "spec/acceptance/merge_spec.rb": "ac61d7627c66565a3a5cbfb2f9db21eb", - "spec/acceptance/min_spec.rb": "152a7db28434a0d0378561d4f64cddcc", - "spec/acceptance/nodesets/centos-6-vcloud.yml": "bdf9ce9d3b0f0b4995666ae9d64d878d", - "spec/acceptance/nodesets/centos-64-x64-pe.yml": "ec075d95760df3d4702abea1ce0a829b", - "spec/acceptance/nodesets/centos-64-x64.yml": "092dd2c588a9f87fa1fb12997c0723ef", - "spec/acceptance/nodesets/default.yml": "3e5c36e6aa5a690229e720f4048bb8af", - "spec/acceptance/nodesets/fedora-18-x64.yml": "80e41b1ee16ea489f53164bfdae58855", - "spec/acceptance/nodesets/sles-11-x64.yml": "44e4c6c15c018333bfa9840a5e702f66", - "spec/acceptance/nodesets/ubuntu-server-10044-x64.yml": "75e86400b7889888dc0781c0ae1a1297", - "spec/acceptance/nodesets/ubuntu-server-12042-x64.yml": "d30d73e34cd50b043c7d14e305955269", - "spec/acceptance/num2bool_spec.rb": "e4a00b913b08c68a689837e9f9336cb2", - "spec/acceptance/parsejson_spec.rb": "ea3973d412ad6f72425fdfac6fbb2bb4", - "spec/acceptance/parseyaml_spec.rb": "278e4f8e1f52e12e05f6ce31f1ffc9f2", - "spec/acceptance/pick_default_spec.rb": "1bc2562380ef6f6cded5ec90a03922be", - "spec/acceptance/pick_spec.rb": "272c54c8f9398f499768331bdb4276ee", - "spec/acceptance/prefix_spec.rb": "da620568c6771e7d492ec1ff697c531c", - "spec/acceptance/range_spec.rb": "65e5b98ceca257658604d988fbec7d03", - "spec/acceptance/reject_spec.rb": "b5185f1a6071c9bdc7aca92e6f899c3e", - "spec/acceptance/reverse_spec.rb": "7bdee543e82532e97bbf7a067140031c", - "spec/acceptance/rstrip_spec.rb": "28a64ceb7cb5ae8a93d31f49816190ab", - "spec/acceptance/shuffle_spec.rb": "451301879512a0ea3f321b5c78993bbf", - "spec/acceptance/size_spec.rb": "ae17d8a55921a0570972200c7c9327e1", - "spec/acceptance/sort_spec.rb": "d44b1b8c090f0f00a2f38515fda431ea", - "spec/acceptance/squeeze_spec.rb": "adcd65fa4e72203b97f1f14c8835c2cd", - "spec/acceptance/str2bool_spec.rb": "55ad165ceef6b9ba32bf20ca3b53b44c", - "spec/acceptance/str2saltedsha512_spec.rb": "b684c4214d06ae3d5bae055262a5ccaa", - "spec/acceptance/strftime_spec.rb": "0f4eadbd74445b35de4a42c9790fbcc1", - "spec/acceptance/strip_spec.rb": "6767da5bc735beb5362aeee6ff692c9e", - "spec/acceptance/suffix_spec.rb": "07dfc7eed48b75fcc1b93d0308243eda", - "spec/acceptance/swapcase_spec.rb": "5c3c1bc19a09fed6e01881f79b0b4ea5", - "spec/acceptance/time_spec.rb": "044b2f634a1fa6ecc735998d68a93b73", - "spec/acceptance/to_bytes_spec.rb": "f9df1f234b9409f5eaf56ef24e651c36", - "spec/acceptance/type_spec.rb": "d103a7e1607ab9cea74cdef25af610b0", - "spec/acceptance/union_spec.rb": "b6092941e0574f3c60910bebf84d2844", - "spec/acceptance/unique_spec.rb": "9b00b21cefde3b5391f50eeb9cd2493b", - "spec/acceptance/unsupported_spec.rb": "09b9265ecb05252cd5e5a18327c7ae97", - "spec/acceptance/upcase_spec.rb": "ffd1d6f9e6ec24131fb78983c53a75f9", - "spec/acceptance/uriescape_spec.rb": "13daa387714cbfc63b587aaa8dbf7fcd", - "spec/acceptance/validate_absolute_path_spec.rb": "8b9ebfae80329231d84fcab606a3eeaf", - "spec/acceptance/validate_array_spec.rb": "382641719e754622ffae562d10e38bf7", - "spec/acceptance/validate_augeas_spec.rb": "ec0a9c030e2c3494889973d74d60b2a4", - "spec/acceptance/validate_bool_spec.rb": "08bc139459204cf0a35098a5bc30ab95", - "spec/acceptance/validate_cmd_spec.rb": "d08eacac4dd5bdb50b5b0f02a6494048", - "spec/acceptance/validate_hash_spec.rb": "70ceacc18a0dee97b26ab2e50f925706", - "spec/acceptance/validate_ipv4_address_spec.rb": "dc901bbd05c3764a93cb49154cea6e4b", - "spec/acceptance/validate_ipv6_address_spec.rb": "c0872c56230ac2800cd5723eaa5bc53a", - "spec/acceptance/validate_re_spec.rb": "b289909078d6ae0d015419f518566698", - "spec/acceptance/validate_slength_spec.rb": "f0a05c1c2b895b096cb7326df4821594", - "spec/acceptance/validate_string_spec.rb": "6c9ced99fb1e263e66e25427d24f8f7b", - "spec/acceptance/values_at_spec.rb": "669b26c4d47742051472003518c3aa61", - "spec/acceptance/values_spec.rb": "714a13735aa0db3ffd3dfc4cd2c2e330", - "spec/acceptance/zip_spec.rb": "0a76aa26bd9552b8dae3294af7d233ab", - "spec/classes/anchor_spec.rb": "40600ba2845f9bd360a9504a347f12ba", - "spec/fixtures/dscacheutil/root": "e1a7622f55f3d1be258c9a5b16b474be", - "spec/functions/abs_spec.rb": "0a5864a29a8e9e99acc483268bd5917c", - "spec/functions/any2array_spec.rb": "167e114cfa222de971bf8be141766b6a", - "spec/functions/base64_spec.rb": "fe16d992be54dbb06d040f1b0e189571", - "spec/functions/bool2num_spec.rb": "67c3055d5d4e4c9fbcaca82038a09081", - "spec/functions/capitalize_spec.rb": "82a4209a033fc88c624f708c12e64e2a", - "spec/functions/chomp_spec.rb": "3cd8e2fe6b12efeffad94cce5b693b7c", - "spec/functions/chop_spec.rb": "4e9534d25b952b261c9f46add677c390", - "spec/functions/concat_spec.rb": "d7657b1af27a96072aae711cee041181", - "spec/functions/count_spec.rb": "db98ef89752a7112425f0aade10108e0", - "spec/functions/deep_merge_spec.rb": "7961a696e1b45167cead127f841f1c99", - "spec/functions/defined_with_params_spec.rb": "3bdfac38e3d6f06140ff2e926f4ebed2", - "spec/functions/delete_at_spec.rb": "7fd4fe7db8d213925fbc80c992673d10", - "spec/functions/delete_spec.rb": "fe66bdf9e61b9c992bc73ee54a37035c", - "spec/functions/delete_undef_values_spec.rb": "83b9c3027463f5c8a90a6d47d219acd5", - "spec/functions/delete_values_spec.rb": "ddcaa269caa95ad926b8a3ef82976da9", - "spec/functions/difference_spec.rb": "e64c1501699fef8eb1037a3ca60a05a6", - "spec/functions/dirname_spec.rb": "1d7cf70468c2cfa6dacfc75935322395", - "spec/functions/downcase_spec.rb": "b0197829512f2e92a2d2b06ce8e2226f", - "spec/functions/empty_spec.rb": "028c30267d648a172d8a81a9262c3abe", - "spec/functions/ensure_packages_spec.rb": "f1b60599078cdcb3cff1368346108264", - "spec/functions/ensure_resource_spec.rb": "7765dde3b9fc54b7dddb6597e0f7b523", - "spec/functions/flatten_spec.rb": "583c9a70f93e492cfb22ffa1811f6aa0", - "spec/functions/floor_spec.rb": "d01ef7dfe0245d7a0a73d7df13cb02e3", - "spec/functions/fqdn_rotate_spec.rb": "c67b71737bee9936f5261d41a37bad46", - "spec/functions/get_module_path_spec.rb": "b7ea196f548b1a9a745ab6671295ab27", - "spec/functions/getparam_spec.rb": "75153d949eb122aa18f0c5e2c8e861e5", - "spec/functions/getvar_spec.rb": "842bf88d47077a9ae64097b6e39c3364", - "spec/functions/grep_spec.rb": "78179537496a7150469e591a95e255d8", - "spec/functions/has_interface_with_spec.rb": "7c16d731c518b434c81b8cb2227cc916", - "spec/functions/has_ip_address_spec.rb": "f53c7baeaf024ff577447f6c28c0f3a7", - "spec/functions/has_ip_network_spec.rb": "885ea8a4c987b735d683b742bf846cb1", - "spec/functions/has_key_spec.rb": "3e4e730d98bbdfb88438b6e08e45868e", - "spec/functions/hash_spec.rb": "826337a92d8f7a189b7ac19615db0ed7", - "spec/functions/intersection_spec.rb": "1b1f1a3900a1f1e165692b056e766fba", - "spec/functions/is_array_spec.rb": "8c020af9c360abdbbf1ba887bb26babe", - "spec/functions/is_bool_spec.rb": "3219ba1500de75161bfb4f292404d1fa", - "spec/functions/is_domain_name_spec.rb": "8eed3a9eb9334bf6a473ad4e2cabc2ec", - "spec/functions/is_float_spec.rb": "171fc0e382d9856c2d8db2b70c9ec9cd", - "spec/functions/is_function_available.rb": "c8858a3c6253713cce0113a98d229b5d", - "spec/functions/is_hash_spec.rb": "408e121a5e30c4c5c4a0a383beb6e209", - "spec/functions/is_integer_spec.rb": "c848f20da5f62ac4bbaf0f6c1485c88f", - "spec/functions/is_ip_address_spec.rb": "6040a9bae4e5c853966148b634501157", - "spec/functions/is_mac_address_spec.rb": "644cd498b426ff2f9ea9cbc5d8e141d7", - "spec/functions/is_numeric_spec.rb": "65f2ad0e70d9b60c601740351eba94fd", - "spec/functions/is_string_spec.rb": "5c015d8267de852da3a12b984e077092", - "spec/functions/join_keys_to_values_spec.rb": "7c7937411b7fe4bb944c0c022d3a96b0", - "spec/functions/join_spec.rb": "c3b50c39390a86b493511be2c6722235", - "spec/functions/keys_spec.rb": "35cc2ed490dc68da6464f245dfebd617", - "spec/functions/loadyaml_spec.rb": "ce86614d8aaceec93653ecf299d3d441", - "spec/functions/lstrip_spec.rb": "1fc2c2d80b5f724a358c3cfeeaae6249", - "spec/functions/max_spec.rb": "5562bccc643443af7e4fa7c9d1e52b8b", - "spec/functions/member_spec.rb": "067c60985efc57022ca1c5508d74d77f", - "spec/functions/merge_spec.rb": "c17a7244453f2da22970acc02a6de110", - "spec/functions/min_spec.rb": "bf80bf58261117bb24392670b624a611", - "spec/functions/num2bool_spec.rb": "8cd5b46b7c8e612dfae3362e3a68a5f9", - "spec/functions/parsejson_spec.rb": "37ab84381e035c31d6a3dd9bf73a3d53", - "spec/functions/parseyaml_spec.rb": "65dfed872930ffe0d21954c15daaf498", - "spec/functions/pick_default_spec.rb": "db0a9d261b7e1b82e2786716dd924e92", - "spec/functions/pick_spec.rb": "34382f7483b6c10d38831de2169777c2", - "spec/functions/prefix_spec.rb": "7245749e27bafe1b36c1c5bae6f705c7", - "spec/functions/range_spec.rb": "c40b3c6d4031fc541c2421ff7b8c41fe", - "spec/functions/reject_spec.rb": "8e16c9f064870e958b6278261e480954", - "spec/functions/reverse_spec.rb": "48169990e59081ccbd112b6703418ce4", - "spec/functions/rstrip_spec.rb": "a408e933753c9c323a05d7079d32cbb3", - "spec/functions/shuffle_spec.rb": "2141a54d2fb3cf725b88184d639677f4", - "spec/functions/size_spec.rb": "d126b696b21a8cd754d58f78ddba6f06", - "spec/functions/sort_spec.rb": "7039cd230a94e95d9d1de2e1094acae2", - "spec/functions/squeeze_spec.rb": "df5b349c208a9a2a4d4b8e6d9324756f", - "spec/functions/str2bool_spec.rb": "e2a8a4d39680f3ed18621e26d67c6024", - "spec/functions/str2saltedsha512_spec.rb": "1de174be8835ba6fef86b590887bb2cc", - "spec/functions/strftime_spec.rb": "bf140883ecf3254277306fa5b25f0344", - "spec/functions/strip_spec.rb": "a01796bebbdabd3fad12b0662ea5966e", - "spec/functions/suffix_spec.rb": "ee875e2d09d7ffc363bf6c34d9ef322f", - "spec/functions/swapcase_spec.rb": "0660ce8807608cc8f98ad1edfa76a402", - "spec/functions/time_spec.rb": "b6d0279062779efe5153fe5cfafc5bbd", - "spec/functions/to_bytes_spec.rb": "80aaf68cf7e938e46b5278c1907af6be", - "spec/functions/type_spec.rb": "422f2c33458fe9b0cc9614d16f7573ba", - "spec/functions/union_spec.rb": "c4f72a55e186813cd3a47a83ba3e9a61", - "spec/functions/unique_spec.rb": "2df8b3b2edb9503943cb4dcb4a371867", - "spec/functions/upcase_spec.rb": "813668919bc62cdd1d349dafc19fbbb3", - "spec/functions/uriescape_spec.rb": "204e9b1566e330a0234761ac8ac7083f", - "spec/functions/validate_absolute_path_spec.rb": "5a0b98675070e511810dab9e60dc43b6", - "spec/functions/validate_array_spec.rb": "bcd231229554785c4270ca92ef99cb60", - "spec/functions/validate_augeas_spec.rb": "eee1a0c3ef3051bda525b1e17d577ab0", - "spec/functions/validate_bool_spec.rb": "7aeb6085fc9601c6bbe6c49e56d209a4", - "spec/functions/validate_cmd_spec.rb": "efc88e8e21481acd36c7f948b1f226ea", - "spec/functions/validate_hash_spec.rb": "8529c74051ceb71e6b1b97c9cecdf625", - "spec/functions/validate_ipv4_address_spec.rb": "19f2f44fbbdf7a2e69aeaa2f0f402695", - "spec/functions/validate_ipv6_address_spec.rb": "2d8617be4405bdbd84d140ba8be6c184", - "spec/functions/validate_re_spec.rb": "d8ab477f9afcb748f144588ebb3a28a3", - "spec/functions/validate_slength_spec.rb": "73273a083a26941b3f7c1e3b2e18b3e2", - "spec/functions/validate_string_spec.rb": "64a4f681084cba55775a070f7fab5e0c", - "spec/functions/values_at_spec.rb": "de45fd8abbc4c037c3c4fac2dcf186f9", - "spec/functions/values_spec.rb": "0ac9e141ed1f612d7cc224f747b2d1d9", - "spec/functions/zip_spec.rb": "06a86e4e70d2aea63812582aae1d26c4", - "spec/lib/puppet_spec/compiler.rb": "3c1f03dd8ac2f6f90d7e8f879a3ce4c0", - "spec/lib/puppet_spec/database.rb": "c74c0cf62980beea88c7749f876ccfa7", - "spec/lib/puppet_spec/files.rb": "906da85e399302cee403e10e357d3f4c", - "spec/lib/puppet_spec/fixtures.rb": "0722c5ccbfcba1fc27da1900e54b4463", - "spec/lib/puppet_spec/matchers.rb": "dd30ba6b936e8c267511d67acb087c35", - "spec/lib/puppet_spec/modules.rb": "445d2739aa8754568a14816280727d70", - "spec/lib/puppet_spec/pops.rb": "adf661defa460b7189e3750535533d34", - "spec/lib/puppet_spec/scope.rb": "01aeb89bdc2d29a2528ced26ec6402ec", - "spec/lib/puppet_spec/settings.rb": "5da4e0dad8bf6b21cc4437c73753a56d", - "spec/lib/puppet_spec/verbose.rb": "71dbccd9a45ed89d12fd1c44456a6820", - "spec/monkey_patches/alias_should_to_must.rb": "b19ee31563afb91a72f9869f9d7362ff", - "spec/monkey_patches/publicize_methods.rb": "c690e444b77c871375d321e413e28ca1", - "spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c", - "spec/spec_helper.rb": "846cc69a2d612d55d130622759aa12e0", - "spec/spec_helper_acceptance.rb": "d82b5682eac4ff46bbe5aa08c29d5e28", - "spec/unit/facter/facter_dot_d_spec.rb": "cce0748b2671b1b104332a7c757e5206", - "spec/unit/facter/pe_version_spec.rb": "ef031cca838f36f99b1dab3259df96a5", - "spec/unit/facter/root_home_spec.rb": "ecd851e2b8a4a8578960cce094cf41ee", - "spec/unit/facter/util/puppet_settings_spec.rb": "8666142d017e5804445f5596f3be76e8", - "spec/unit/puppet/provider/file_line/ruby_spec.rb": "e118a65a3eb0ccd3d1bf99d7bb010669", - "spec/unit/puppet/type/anchor_spec.rb": "3c3251acbc1085b121623f4617107fb9", - "spec/unit/puppet/type/file_line_spec.rb": "72ba1d9ad9de5df592f3ff03551983cb", - "tests/file_line.pp": "67727539aa7b7dd76f06626fe734f7f7", - "tests/has_interface_with.pp": "59c98b4af0d39fc11d1ef4c7a6dc8f7a", - "tests/has_ip_address.pp": "93ce02915f67ddfb43a049b2b84ef391", - "tests/has_ip_network.pp": "abc05686797a776ea8c054657e6f7456", - "tests/init.pp": "1d98070412c76824e66db4b7eb74d433" - } -} \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/abs_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/abs_spec.rb deleted file mode 100755 index 8e056424ed..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/abs_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'abs function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should accept a string' do - pp = <<-EOS - $input = '-34.56' - $output = abs($input) - notify { $output: } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: 34.56/) - end - end - - it 'should accept a float' do - pp = <<-EOS - $input = -34.56 - $output = abs($input) - notify { $output: } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: 34.56/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/any2array_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/any2array_spec.rb deleted file mode 100755 index 467d6afda0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/any2array_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'any2array function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should create an empty array' do - pp = <<-EOS - $input = '' - $output = any2array($input) - validate_array($output) - notify { "Output: ${output}": } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: Output: /) - end - end - - it 'should leave arrays modified' do - pp = <<-EOS - $input = ['test', 'array'] - $output = any2array($input) - validate_array($output) - notify { "Output: ${output}": } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: Output: testarray/) - end - end - - it 'should turn a hash into an array' do - pp = <<-EOS - $input = {'test' => 'array'} - $output = any2array($input) - - validate_array($output) - # Check each element of the array is a plain string. - validate_string($output[0]) - validate_string($output[1]) - notify { "Output: ${output}": } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: Output: testarray/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/base64_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/base64_spec.rb deleted file mode 100755 index 97e1738ef6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/base64_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'base64 function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should encode then decode a string' do - pp = <<-EOS - $encodestring = base64('encode', 'thestring') - $decodestring = base64('decode', $encodestring) - notify { $decodestring: } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/thestring/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/bool2num_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/bool2num_spec.rb deleted file mode 100755 index 7a70311ca7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/bool2num_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'bool2num function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - ['false', 'f', '0', 'n', 'no'].each do |bool| - it 'should convert a given boolean, #{bool}, to 0' do - pp = <<-EOS - $input = #{bool} - $output = bool2num($input) - notify { $output: } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: 0/) - end - end - end - - ['true', 't', '1', 'y', 'yes'].each do |bool| - it 'should convert a given boolean, #{bool}, to 1' do - pp = <<-EOS - $input = #{bool} - $output = bool2num($input) - notify { $output: } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: 1/) - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/build_csv.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/build_csv.rb deleted file mode 100755 index 62ecbf13a4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/build_csv.rb +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env ruby -# vim: set sw=2 sts=2 et tw=80 : -require 'rspec' - -#XXX Super ugly hack to keep from starting beaker nodes -module Kernel - # make an alias of the original require - alias_method :original_require, :require - # rewrite require - def require name - original_require name if name != 'spec_helper_acceptance' - end -end -UNSUPPORTED_PLATFORMS = [] -def fact(*args) [] end -#XXX End hax - -# Get a list of functions for test coverage -function_list = Dir[File.join(File.dirname(__FILE__),"..","..","lib","puppet","parser","functions","*.rb")].collect do |function_rb| - File.basename(function_rb,".rb") -end - -## Configure rspec to parse tests -options = RSpec::Core::ConfigurationOptions.new(['spec/acceptance']) -configuration = RSpec::configuration -world = RSpec::world -options.parse_options -options.configure(configuration) -configuration.load_spec_files - -## Collect up tests and example groups into a hash -def get_tests(children) - children.inject({}) do |memo,c| - memo[c.description] = Hash.new - memo[c.description]["groups"] = get_tests(c.children) unless c.children.empty? - memo[c.description]["tests"] = c.examples.collect { |e| - e.description unless e.pending? - }.compact unless c.examples.empty? - memo[c.description]["pending_tests"] = c.examples.collect { |e| - e.description if e.pending? - }.compact unless c.examples.empty? - memo - end -end - -def count_test_types_in(type,group) - return 0 if group.nil? - group.inject(0) do |m,(k,v)| - m += v.length if k == type - m += count_tests_in(v) if v.is_a?(Hash) - m - end -end -def count_tests_in(group) - count_test_types_in('tests',group) -end -def count_pending_tests_in(group) - count_test_types_in('pending_tests',group) -end - -# Convert tests hash to csv format -def to_csv(function_list,tests) - function_list.collect do |function_name| - if v = tests["#{function_name} function"] - positive_tests = count_tests_in(v["groups"]["success"]) - negative_tests = count_tests_in(v["groups"]["failure"]) - pending_tests = - count_pending_tests_in(v["groups"]["failure"]) + - count_pending_tests_in(v["groups"]["failure"]) - else - positive_tests = 0 - negative_tests = 0 - pending_tests = 0 - end - sprintf("%-25s, %-9d, %-9d, %-9d", function_name,positive_tests,negative_tests,pending_tests) - end.compact -end - -tests = get_tests(world.example_groups) -csv = to_csv(function_list,tests) -percentage_tested = "#{tests.count*100/function_list.count}%" -printf("%-25s, %-9s, %-9s, %-9s\n","#{percentage_tested} have tests.","Positive","Negative","Pending") -puts csv diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/capitalize_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/capitalize_spec.rb deleted file mode 100755 index e5e7b7bf84..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/capitalize_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'capitalize function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should capitalize the first letter of a string' do - pp = <<-EOS - $input = 'this is a string' - $output = capitalize($input) - notify { $output: } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: This is a string/) - end - end - - it 'should capitalize the first letter of an array of strings' do - pp = <<-EOS - $input = ['this', 'is', 'a', 'string'] - $output = capitalize($input) - notify { $output: } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: This/) - expect(r.stdout).to match(/Notice: Is/) - expect(r.stdout).to match(/Notice: A/) - expect(r.stdout).to match(/Notice: String/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chomp_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chomp_spec.rb deleted file mode 100755 index f6c15956e4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chomp_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'chomp function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should eat the newline' do - pp = <<-EOS - $input = "test\n" - if size($input) != 5 { - fail("Size of ${input} is not 5.") - } - $output = chomp($input) - if size($output) != 4 { - fail("Size of ${input} is not 4.") - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chop_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chop_spec.rb deleted file mode 100755 index dbc28da7ec..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chop_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'chop function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should eat the last character' do - pp = <<-EOS - $input = "test" - if size($input) != 4 { - fail("Size of ${input} is not 4.") - } - $output = chop($input) - if size($output) != 3 { - fail("Size of ${input} is not 3.") - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should eat the last two characters of \r\n' do - pp = <<-EOS - $input = "test\r\n" - if size($input) != 6 { - fail("Size of ${input} is not 6.") - } - $output = chop($input) - if size($output) != 4 { - fail("Size of ${input} is not 4.") - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - - it 'should not fail on empty strings' do - pp = <<-EOS - $input = "" - $output = chop($input) - EOS - - apply_manifest(pp, :catch_failures => true) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/concat_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/concat_spec.rb deleted file mode 100755 index 7bda3653a0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/concat_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'concat function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should concat one array to another' do - pp = <<-EOS - $output = concat(['1','2','3'],['4','5','6']) - validate_array($output) - if size($output) != 6 { - fail("${output} should have 6 elements.") - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/count_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/count_spec.rb deleted file mode 100755 index 51a40ba5c1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/count_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'count function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should count elements in an array' do - pp = <<-EOS - $input = [1,2,3,4] - $output = count($input) - notify { $output: } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: 4/) - end - end - - it 'should count elements in an array that match a second argument' do - pp = <<-EOS - $input = [1,1,1,2] - $output = count($input, 1) - notify { $output: } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: 3/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/deep_merge_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/deep_merge_spec.rb deleted file mode 100755 index c0f9b126d0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/deep_merge_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'deep_merge function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should deep merge two hashes' do - pp = <<-EOS - $hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } } - $hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } } - $merged_hash = deep_merge($hash1, $hash2) - - if $merged_hash != { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } } { - fail("Hash was incorrectly merged.") - } - EOS - - apply_manifest(pp, :catch_failures => true) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/defined_with_params_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/defined_with_params_spec.rb deleted file mode 100755 index fc544508b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/defined_with_params_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'defined_with_params function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should successfully notify' do - pp = <<-EOS - user { 'dan': - ensure => present, - } - - if defined_with_params(User[dan], {'ensure' => 'present' }) { - notify { 'User defined with ensure=>present': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: User defined with ensure=>present/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_at_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_at_spec.rb deleted file mode 100755 index db0c01f748..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_at_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'delete_at function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should delete elements of the array' do - pp = <<-EOS - $output = delete_at(['a','b','c','b'], 1) - if $output == ['a','c','b'] { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_spec.rb deleted file mode 100755 index a28604ceaa..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'delete function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should delete elements of the array' do - pp = <<-EOS - $output = delete(['a','b','c','b'], 'b') - if $output == ['a','c'] { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb deleted file mode 100755 index b7eda1926c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'delete_undef_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should delete elements of the array' do - pp = <<-EOS - $output = delete_undef_values({a=>'A', b=>'', c=>undef, d => false}) - if $output == { a => 'A', b => '', d => false } { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_values_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_values_spec.rb deleted file mode 100755 index 6d2369c3e8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_values_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'delete_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should delete elements of the hash' do - pp = <<-EOS - $a = { 'a' => 'A', 'b' => 'B', 'B' => 'C', 'd' => 'B' } - $b = { 'a' => 'A', 'B' => 'C' } - $o = delete_values($a, 'B') - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles non-hash arguments' - it 'handles improper argument counts' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/difference_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/difference_spec.rb deleted file mode 100755 index 2fae5c432f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/difference_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'difference function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'returns non-duplicates in the first array' do - pp = <<-EOS - $a = ['a','b','c'] - $b = ['b','c','d'] - $c = ['a'] - $o = difference($a, $b) - if $o == $c { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles non-array arguments' - it 'handles improper argument counts' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/dirname_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/dirname_spec.rb deleted file mode 100755 index 97913ddb06..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/dirname_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'dirname function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - context 'absolute path' do - it 'returns the dirname' do - pp = <<-EOS - $a = '/path/to/a/file.txt' - $b = '/path/to/a' - $o = dirname($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - context 'relative path' do - it 'returns the dirname' do - pp = <<-EOS - $a = 'path/to/a/file.txt' - $b = 'path/to/a' - $o = dirname($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - end - describe 'failure' do - it 'handles improper argument counts' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/downcase_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/downcase_spec.rb deleted file mode 100755 index bc4e70692d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/downcase_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'downcase function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'returns the downcase' do - pp = <<-EOS - $a = 'AOEU' - $b = 'aoeu' - $o = downcase($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'doesn\'t affect lowercase words' do - pp = <<-EOS - $a = 'aoeu aoeu' - $b = 'aoeu aoeu' - $o = downcase($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-strings' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/empty_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/empty_spec.rb deleted file mode 100755 index 8b46aacdad..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/empty_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'empty function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'recognizes empty strings' do - pp = <<-EOS - $a = '' - $b = true - $o = empty($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'recognizes non-empty strings' do - pp = <<-EOS - $a = 'aoeu' - $b = false - $o = empty($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-strings' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_packages_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_packages_spec.rb deleted file mode 100755 index 145bdc5e5d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_packages_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'ensure_packages function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'ensure_packages a package' do - apply_manifest('package { "zsh": ensure => absent, }') - pp = <<-EOS - $a = "zsh" - ensure_packages($a) - EOS - - apply_manifest(pp, :expect_changes => true) do |r| - expect(r.stdout).to match(/Package\[zsh\]\/ensure: created/) - end - end - it 'ensures a package already declared' - it 'takes defaults arguments' - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_resource_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_resource_spec.rb deleted file mode 100755 index c4d8887df2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_resource_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'ensure_resource function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'ensure_resource a package' do - apply_manifest('package { "zsh": ensure => absent, }') - pp = <<-EOS - $a = "zsh" - ensure_resource('package', $a) - EOS - - apply_manifest(pp, :expect_changes => true) do |r| - expect(r.stdout).to match(/Package\[zsh\]\/ensure: created/) - end - end - it 'ensures a resource already declared' - it 'takes defaults arguments' - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/flatten_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/flatten_spec.rb deleted file mode 100755 index c4d66e0465..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/flatten_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'flatten function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'flattens arrays' do - pp = <<-EOS - $a = ["a","b",["c",["d","e"],"f","g"]] - $b = ["a","b","c","d","e","f","g"] - $o = flatten($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'does not affect flat arrays' do - pp = <<-EOS - $a = ["a","b","c","d","e","f","g"] - $b = ["a","b","c","d","e","f","g"] - $o = flatten($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-strings' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/floor_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/floor_spec.rb deleted file mode 100755 index 0dcdad9c2b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/floor_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'floor function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'floors floats' do - pp = <<-EOS - $a = 12.8 - $b = 12 - $o = floor($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'floors integers' do - pp = <<-EOS - $a = 7 - $b = 7 - $o = floor($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-numbers' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb deleted file mode 100755 index b7f8bf8ab9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'fqdn_rotate function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - let(:facts_d) do - if fact('is_pe') == "true" - '/etc/puppetlabs/facter/facts.d' - else - '/etc/facter/facts.d' - end - end - after :each do - shell("if [ -f #{facts_d}/fqdn.txt ] ; then rm #{facts_d}/fqdn.txt ; fi") - end - it 'fqdn_rotates floats' do - shell("echo 'fqdn=fakehost.localdomain' > #{facts_d}/fqdn.txt") - pp = <<-EOS - $a = ['a','b','c','d'] - $o = fqdn_rotate($a) - notice(inline_template('fqdn_rotate is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/fqdn_rotate is \["c", "d", "a", "b"\]/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-numbers' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/get_module_path_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/get_module_path_spec.rb deleted file mode 100755 index 34d91fa3da..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/get_module_path_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'get_module_path function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'get_module_paths stdlib' do - pp = <<-EOS - $a = $::is_pe ? { - 'true' => '/opt/puppet/share/puppet/modules/stdlib', - 'false' => '/etc/puppet/modules/stdlib', - } - $o = get_module_path('stdlib') - if $o == $a { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'get_module_paths dne' do - pp = <<-EOS - $a = $::is_pe ? { - 'true' => '/etc/puppetlabs/puppet/modules/dne', - 'false' => '/etc/puppet/modules/dne', - } - $o = get_module_path('dne') - if $o == $a { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :expect_failures => true) - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-numbers' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getparam_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getparam_spec.rb deleted file mode 100755 index 91fc9a00f3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getparam_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'getparam function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'getparam a package' do - pp = <<-EOS - user { "rspec": - ensure => present, - managehome => true, - } - $o = getparam(User['rspec'], 'managehome') - notice(inline_template('getparam is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/getparam is true/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getvar_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getvar_spec.rb deleted file mode 100755 index 333c467f67..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getvar_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'getvar function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'getvars from classes' do - pp = <<-EOS - class a::data { $foo = 'aoeu' } - include a::data - $b = 'aoeu' - $o = getvar("a::data::foo") - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-numbers' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/grep_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/grep_spec.rb deleted file mode 100755 index b39d48ecbe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/grep_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'grep function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'greps arrays' do - pp = <<-EOS - $a = ['aaabbb','bbbccc','dddeee'] - $b = 'bbb' - $c = ['aaabbb','bbbccc'] - $o = grep($a,$b) - if $o == $c { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_interface_with_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_interface_with_spec.rb deleted file mode 100755 index 41ae19fd1c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_interface_with_spec.rb +++ /dev/null @@ -1,44 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'has_interface_with function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'has_interface_with existing ipaddress' do - pp = <<-EOS - $a = '127.0.0.1' - $o = has_interface_with('ipaddress', $a) - notice(inline_template('has_interface_with is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/has_interface_with is true/) - end - end - it 'has_interface_with absent ipaddress' do - pp = <<-EOS - $a = '128.0.0.1' - $o = has_interface_with('ipaddress', $a) - notice(inline_template('has_interface_with is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/has_interface_with is false/) - end - end - it 'has_interface_with existing interface' do - pp = <<-EOS - $a = 'lo' - $o = has_interface_with($a) - notice(inline_template('has_interface_with is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/has_interface_with is true/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_address_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_address_spec.rb deleted file mode 100755 index 7d5fd87292..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_address_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'has_ip_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'has_ip_address existing ipaddress' do - pp = <<-EOS - $a = '127.0.0.1' - $o = has_ip_address($a) - notice(inline_template('has_ip_address is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/has_ip_address is true/) - end - end - it 'has_ip_address absent ipaddress' do - pp = <<-EOS - $a = '128.0.0.1' - $o = has_ip_address($a) - notice(inline_template('has_ip_address is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/has_ip_address is false/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_network_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_network_spec.rb deleted file mode 100755 index 692eaf9b4c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_network_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'has_ip_network function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'has_ip_network existing ipaddress' do - pp = <<-EOS - $a = '127.0.0.0' - $o = has_ip_network($a) - notice(inline_template('has_ip_network is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/has_ip_network is true/) - end - end - it 'has_ip_network absent ipaddress' do - pp = <<-EOS - $a = '128.0.0.0' - $o = has_ip_network($a) - notice(inline_template('has_ip_network is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/has_ip_network is false/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_key_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_key_spec.rb deleted file mode 100755 index c8557cbeb6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_key_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'has_key function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'has_keys in hashes' do - pp = <<-EOS - $a = { 'aaa' => 'bbb','bbb' => 'ccc','ddd' => 'eee' } - $b = 'bbb' - $c = true - $o = has_key($a,$b) - if $o == $c { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'has_keys not in hashes' do - pp = <<-EOS - $a = { 'aaa' => 'bbb','bbb' => 'ccc','ddd' => 'eee' } - $b = 'ccc' - $c = false - $o = has_key($a,$b) - if $o == $c { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-hashes' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/hash_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/hash_spec.rb deleted file mode 100755 index ed53834bed..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/hash_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'hashs arrays' do - pp = <<-EOS - $a = ['aaa','bbb','bbb','ccc','ddd','eee'] - $b = { 'aaa' => 'bbb', 'bbb' => 'ccc', 'ddd' => 'eee' } - $o = hash($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'handles odd-length arrays' - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/intersection_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/intersection_spec.rb deleted file mode 100755 index 66b8652978..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/intersection_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'intersection function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'intersections arrays' do - pp = <<-EOS - $a = ['aaa','bbb','ccc'] - $b = ['bbb','ccc','ddd','eee'] - $c = ['bbb','ccc'] - $o = intersection($a,$b) - if $o == $c { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'intersections empty arrays' - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_array_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_array_spec.rb deleted file mode 100755 index 9c6bad735f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_array_spec.rb +++ /dev/null @@ -1,67 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'is_array function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'is_arrays arrays' do - pp = <<-EOS - $a = ['aaa','bbb','ccc'] - $b = true - $o = is_array($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_arrays empty arrays' do - pp = <<-EOS - $a = [] - $b = true - $o = is_array($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_arrays strings' do - pp = <<-EOS - $a = "aoeu" - $b = false - $o = is_array($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_arrays hashes' do - pp = <<-EOS - $a = {'aaa'=>'bbb'} - $b = false - $o = is_array($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_bool_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_bool_spec.rb deleted file mode 100755 index 60079f95ef..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_bool_spec.rb +++ /dev/null @@ -1,81 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'is_bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'is_bools arrays' do - pp = <<-EOS - $a = ['aaa','bbb','ccc'] - $b = false - $o = is_bool($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_bools true' do - pp = <<-EOS - $a = true - $b = true - $o = is_bool($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_bools false' do - pp = <<-EOS - $a = false - $b = true - $o = is_bool($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_bools strings' do - pp = <<-EOS - $a = "true" - $b = false - $o = is_bool($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_bools hashes' do - pp = <<-EOS - $a = {'aaa'=>'bbb'} - $b = false - $o = is_bool($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_domain_name_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_domain_name_spec.rb deleted file mode 100755 index e0f03fa878..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_domain_name_spec.rb +++ /dev/null @@ -1,83 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'is_domain_name function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'is_domain_names arrays' do - pp = <<-EOS - $a = ['aaa.com','bbb','ccc'] - $o = is_domain_name($a) - notice(inline_template('is_domain_name is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/is_domain_name is false/) - end - end - it 'is_domain_names true' do - pp = <<-EOS - $a = true - $o = is_domain_name($a) - notice(inline_template('is_domain_name is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/is_domain_name is false/) - end - end - it 'is_domain_names false' do - pp = <<-EOS - $a = false - $o = is_domain_name($a) - notice(inline_template('is_domain_name is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/is_domain_name is false/) - end - end - it 'is_domain_names strings with hyphens' do - pp = <<-EOS - $a = "3foo-bar.2bar-fuzz.com" - $b = true - $o = is_domain_name($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_domain_names strings beginning with hyphens' do - pp = <<-EOS - $a = "-bar.2bar-fuzz.com" - $b = false - $o = is_domain_name($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_domain_names hashes' do - pp = <<-EOS - $a = {'aaa'=>'www.com'} - $o = is_domain_name($a) - notice(inline_template('is_domain_name is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/is_domain_name is false/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_float_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_float_spec.rb deleted file mode 100755 index 338ba58d46..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_float_spec.rb +++ /dev/null @@ -1,86 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'is_float function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'is_floats arrays' do - pp = <<-EOS - $a = ['aaa.com','bbb','ccc'] - $o = is_float($a) - notice(inline_template('is_float is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/is_float is false/) - end - end - it 'is_floats true' do - pp = <<-EOS - $a = true - $o = is_float($a) - notice(inline_template('is_float is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/is_float is false/) - end - end - it 'is_floats strings' do - pp = <<-EOS - $a = "3.5" - $b = true - $o = is_float($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_floats floats' do - pp = <<-EOS - $a = 3.5 - $b = true - $o = is_float($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_floats integers' do - pp = <<-EOS - $a = 3 - $b = false - $o = is_float($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_floats hashes' do - pp = <<-EOS - $a = {'aaa'=>'www.com'} - $o = is_float($a) - notice(inline_template('is_float is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/is_float is false/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_function_available_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_function_available_spec.rb deleted file mode 100755 index 2b5dd6d173..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_function_available_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'is_function_available function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'is_function_availables arrays' do - pp = <<-EOS - $a = ['fail','include','require'] - $o = is_function_available($a) - notice(inline_template('is_function_available is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/is_function_available is false/) - end - end - it 'is_function_availables true' do - pp = <<-EOS - $a = true - $o = is_function_available($a) - notice(inline_template('is_function_available is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/is_function_available is false/) - end - end - it 'is_function_availables strings' do - pp = <<-EOS - $a = "fail" - $b = true - $o = is_function_available($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_function_availables function_availables' do - pp = <<-EOS - $a = "is_function_available" - $o = is_function_available($a) - notice(inline_template('is_function_available is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/is_function_available is true/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_hash_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_hash_spec.rb deleted file mode 100755 index 2ef310abcc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_hash_spec.rb +++ /dev/null @@ -1,63 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'is_hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'is_hashs arrays' do - pp = <<-EOS - $a = ['aaa','bbb','ccc'] - $o = is_hash($a) - notice(inline_template('is_hash is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/is_hash is false/) - end - end - it 'is_hashs empty hashs' do - pp = <<-EOS - $a = {} - $b = true - $o = is_hash($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_hashs strings' do - pp = <<-EOS - $a = "aoeu" - $b = false - $o = is_hash($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_hashs hashes' do - pp = <<-EOS - $a = {'aaa'=>'bbb'} - $b = true - $o = is_hash($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_integer_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_integer_spec.rb deleted file mode 100755 index bf6902b904..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_integer_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'is_integer function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'is_integers arrays' do - pp = <<-EOS - $a = ['aaa.com','bbb','ccc'] - $b = false - $o = is_integer($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_integers true' do - pp = <<-EOS - $a = true - $b = false - $o = is_integer($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_integers strings' do - pp = <<-EOS - $a = "3" - $b = true - $o = is_integer($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_integers floats' do - pp = <<-EOS - $a = 3.5 - $b = false - $o = is_integer($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_integers integers' do - pp = <<-EOS - $a = 3 - $b = true - $o = is_integer($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_integers hashes' do - pp = <<-EOS - $a = {'aaa'=>'www.com'} - $b = false - $o = is_integer($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_ip_address_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_ip_address_spec.rb deleted file mode 100755 index ed7a85439d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_ip_address_spec.rb +++ /dev/null @@ -1,80 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'is_ip_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'is_ip_addresss ipv4' do - pp = <<-EOS - $a = '1.2.3.4' - $b = true - $o = is_ip_address($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_ip_addresss ipv6' do - pp = <<-EOS - $a = "fe80:0000:cd12:d123:e2f8:47ff:fe09:dd74" - $b = true - $o = is_ip_address($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_ip_addresss ipv6 compressed' do - pp = <<-EOS - $a = "fe00::1" - $b = true - $o = is_ip_address($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_ip_addresss strings' do - pp = <<-EOS - $a = "aoeu" - $b = false - $o = is_ip_address($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_ip_addresss ipv4 out of range' do - pp = <<-EOS - $a = '1.2.3.400' - $b = false - $o = is_ip_address($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_mac_address_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_mac_address_spec.rb deleted file mode 100755 index a2c892f435..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_mac_address_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'is_mac_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'is_mac_addresss a mac' do - pp = <<-EOS - $a = '00:a0:1f:12:7f:a0' - $b = true - $o = is_mac_address($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_mac_addresss a mac out of range' do - pp = <<-EOS - $a = '00:a0:1f:12:7f:g0' - $b = false - $o = is_mac_address($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_numeric_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_numeric_spec.rb deleted file mode 100755 index 21c898841e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_numeric_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'is_numeric function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'is_numerics arrays' do - pp = <<-EOS - $a = ['aaa.com','bbb','ccc'] - $b = false - $o = is_numeric($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_numerics true' do - pp = <<-EOS - $a = true - $b = false - $o = is_numeric($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_numerics strings' do - pp = <<-EOS - $a = "3" - $b = true - $o = is_numeric($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_numerics floats' do - pp = <<-EOS - $a = 3.5 - $b = true - $o = is_numeric($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_numerics integers' do - pp = <<-EOS - $a = 3 - $b = true - $o = is_numeric($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_numerics hashes' do - pp = <<-EOS - $a = {'aaa'=>'www.com'} - $b = false - $o = is_numeric($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - it 'handles non-arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_string_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_string_spec.rb deleted file mode 100755 index 94d8e96783..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_string_spec.rb +++ /dev/null @@ -1,102 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'is_string function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'is_strings arrays' do - pp = <<-EOS - $a = ['aaa.com','bbb','ccc'] - $b = false - $o = is_string($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_strings true' do - pp = <<-EOS - $a = true - $b = false - $o = is_string($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_strings strings' do - pp = <<-EOS - $a = "aoeu" - $o = is_string($a) - notice(inline_template('is_string is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/is_string is true/) - end - end - it 'is_strings number strings' do - pp = <<-EOS - $a = "3" - $o = is_string($a) - notice(inline_template('is_string is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/is_string is false/) - end - end - it 'is_strings floats' do - pp = <<-EOS - $a = 3.5 - $b = false - $o = is_string($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_strings integers' do - pp = <<-EOS - $a = 3 - $b = false - $o = is_string($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'is_strings hashes' do - pp = <<-EOS - $a = {'aaa'=>'www.com'} - $b = false - $o = is_string($a) - if $o == $b { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - end - describe 'failure' do - it 'handles improper argument counts' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb deleted file mode 100755 index 70493fd5a2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'join_keys_to_values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'join_keys_to_valuess hashes' do - pp = <<-EOS - $a = {'aaa'=>'bbb','ccc'=>'ddd'} - $b = ':' - $o = join_keys_to_values($a,$b) - notice(inline_template('join_keys_to_values is <%= @o.sort.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/join_keys_to_values is \["aaa:bbb", "ccc:ddd"\]/) - end - end - it 'handles non hashes' - it 'handles empty hashes' - end - describe 'failure' do - it 'handles improper argument counts' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_spec.rb deleted file mode 100755 index 5397ce2c8c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'join function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'joins arrays' do - pp = <<-EOS - $a = ['aaa','bbb','ccc'] - $b = ':' - $c = 'aaa:bbb:ccc' - $o = join($a,$b) - if $o == $c { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'handles non arrays' - end - describe 'failure' do - it 'handles improper argument counts' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/keys_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/keys_spec.rb deleted file mode 100755 index 176918e91c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/keys_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'keys function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'keyss hashes' do - pp = <<-EOS - $a = {'aaa'=>'bbb','ccc'=>'ddd'} - $o = keys($a) - notice(inline_template('keys is <%= @o.sort.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/keys is \["aaa", "ccc"\]/) - end - end - it 'handles non hashes' - it 'handles empty hashes' - end - describe 'failure' do - it 'handles improper argument counts' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/loadyaml_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/loadyaml_spec.rb deleted file mode 100644 index 944a727359..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/loadyaml_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'loadyaml function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'loadyamls array of values' do - shell('echo "--- - aaa: 1 - bbb: 2 - ccc: 3 - ddd: 4" > /testyaml.yaml') - pp = <<-EOS - $o = loadyaml('/testyaml.yaml') - notice(inline_template('loadyaml[aaa] is <%= @o["aaa"].inspect %>')) - notice(inline_template('loadyaml[bbb] is <%= @o["bbb"].inspect %>')) - notice(inline_template('loadyaml[ccc] is <%= @o["ccc"].inspect %>')) - notice(inline_template('loadyaml[ddd] is <%= @o["ddd"].inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/loadyaml\[aaa\] is 1/) - expect(r.stdout).to match(/loadyaml\[bbb\] is 2/) - expect(r.stdout).to match(/loadyaml\[ccc\] is 3/) - expect(r.stdout).to match(/loadyaml\[ddd\] is 4/) - end - end - end - describe 'failure' do - it 'fails with no arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/lstrip_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/lstrip_spec.rb deleted file mode 100755 index 3dc952fbc6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/lstrip_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'lstrip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'lstrips arrays' do - pp = <<-EOS - $a = [" the "," public "," art","galleries "] - # Anagram: Large picture halls, I bet - $o = lstrip($a) - notice(inline_template('lstrip is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/lstrip is \["the ", "public ", "art", "galleries "\]/) - end - end - it 'lstrips strings' do - pp = <<-EOS - $a = " blowzy night-frumps vex'd jack q " - $o = lstrip($a) - notice(inline_template('lstrip is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/lstrip is "blowzy night-frumps vex'd jack q "/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings or arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/max_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/max_spec.rb deleted file mode 100755 index f04e3d2833..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/max_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'max function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'maxs arrays' do - pp = <<-EOS - $o = max("the","public","art","galleries") - notice(inline_template('max is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/max is "the"/) - end - end - end - describe 'failure' do - it 'handles no arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/member_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/member_spec.rb deleted file mode 100755 index b467dbbe9c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/member_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'member function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'members arrays' do - pp = <<-EOS - $a = ['aaa','bbb','ccc'] - $b = 'ccc' - $c = true - $o = member($a,$b) - if $o == $c { - notify { 'output correct': } - } - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/Notice: output correct/) - end - end - it 'members arrays without members' - end - describe 'failure' do - it 'handles improper argument counts' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/merge_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/merge_spec.rb deleted file mode 100755 index a60e784ee6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/merge_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'merge function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'should merge two hashes' do - pp = <<-EOS - $a = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } } - $b = {'two' => 'dos', 'three' => { 'five' => 5 } } - $o = merge($a, $b) - notice(inline_template('merge[one] is <%= @o["one"].inspect %>')) - notice(inline_template('merge[two] is <%= @o["two"].inspect %>')) - notice(inline_template('merge[three] is <%= @o["three"].inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/merge\[one\] is "1"/) - expect(r.stdout).to match(/merge\[two\] is "dos"/) - expect(r.stdout).to match(/merge\[three\] is {"five"=>"5"}/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/min_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/min_spec.rb deleted file mode 100755 index 509092d3c7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/min_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'min function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'mins arrays' do - pp = <<-EOS - $o = min("the","public","art","galleries") - notice(inline_template('min is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/min is "art"/) - end - end - end - describe 'failure' do - it 'handles no arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-6-vcloud.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-6-vcloud.yml deleted file mode 100644 index ca9c1d3298..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-6-vcloud.yml +++ /dev/null @@ -1,15 +0,0 @@ -HOSTS: - 'centos-6-vcloud': - roles: - - master - platform: el-6-x86_64 - hypervisor: vcloud - template: centos-6-x86_64 -CONFIG: - type: foss - ssh: - keys: "~/.ssh/id_rsa-acceptance" - datastore: instance0 - folder: Delivery/Quality Assurance/Enterprise/Dynamic - resourcepool: delivery/Quality Assurance/Enterprise/Dynamic - pooling_api: http://vcloud.delivery.puppetlabs.net/ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64-pe.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64-pe.yml deleted file mode 100644 index 7d9242f1b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64-pe.yml +++ /dev/null @@ -1,12 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - - database - - dashboard - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: pe diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64.yml deleted file mode 100644 index 05540ed8c5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-64-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-64-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/default.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/default.yml deleted file mode 100644 index 4e2cb809e8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-65-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-65-x64-vbox436-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/fedora-18-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/fedora-18-x64.yml deleted file mode 100644 index 1361649830..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/fedora-18-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - fedora-18-x64: - roles: - - master - platform: fedora-18-x86_64 - box : fedora-18-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/sles-11-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/sles-11-x64.yml deleted file mode 100644 index 41abe2135e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/sles-11-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - sles-11-x64.local: - roles: - - master - platform: sles-11-x64 - box : sles-11sp1-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml deleted file mode 100644 index 5ca1514e40..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-10044-x64: - roles: - - master - platform: ubuntu-10.04-amd64 - box : ubuntu-server-10044-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml deleted file mode 100644 index d065b304f8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-server-12042-x64: - roles: - - master - platform: ubuntu-12.04-amd64 - box : ubuntu-server-12042-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/num2bool_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/num2bool_spec.rb deleted file mode 100755 index 1d99ba0251..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/num2bool_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'num2bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'bools positive numbers and numeric strings as true' do - pp = <<-EOS - $a = 1 - $b = "1" - $c = "50" - $ao = num2bool($a) - $bo = num2bool($b) - $co = num2bool($c) - notice(inline_template('a is <%= @ao.inspect %>')) - notice(inline_template('b is <%= @bo.inspect %>')) - notice(inline_template('c is <%= @co.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/a is true/) - expect(r.stdout).to match(/b is true/) - expect(r.stdout).to match(/c is true/) - end - end - it 'bools negative numbers as false' do - pp = <<-EOS - $a = 0 - $b = -0.1 - $c = ["-50","1"] - $ao = num2bool($a) - $bo = num2bool($b) - $co = num2bool($c) - notice(inline_template('a is <%= @ao.inspect %>')) - notice(inline_template('b is <%= @bo.inspect %>')) - notice(inline_template('c is <%= @co.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/a is false/) - expect(r.stdout).to match(/b is false/) - expect(r.stdout).to match(/c is false/) - end - end - end - describe 'failure' do - it 'fails on words' do - pp = <<-EOS - $a = "a" - $ao = num2bool($a) - notice(inline_template('a is <%= @ao.inspect %>')) - EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/not look like a number/) - end - - it 'fails on numberwords' do - pp = <<-EOS - $b = "1b" - $bo = num2bool($b) - notice(inline_template('b is <%= @bo.inspect %>')) - EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/not look like a number/) - - end - - it 'fails on non-numeric/strings' do - pending "The function will call .to_s.to_i on anything not a Numeric or - String, and results in 0. Is this intended?" - pp = <<-EOS - $c = {"c" => "-50"} - $co = num2bool($c) - notice(inline_template('c is <%= @co.inspect %>')) - EOS - expect(apply_manifest(ppc :expect_failures => true).stderr).to match(/Unable to parse/) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parsejson_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parsejson_spec.rb deleted file mode 100755 index 5097810272..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parsejson_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'parsejson function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'parses valid json' do - pp = <<-EOS - $a = '{"hunter": "washere", "tests": "passing"}' - $ao = parsejson($a) - $tests = $ao['tests'] - notice(inline_template('tests are <%= @tests.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/tests are "passing"/) - end - end - end - describe 'failure' do - it 'raises error on incorrect json' do - pp = <<-EOS - $a = '{"hunter": "washere", "tests": "passing",}' - $ao = parsejson($a) - notice(inline_template('a is <%= @ao.inspect %>')) - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/expected next name/) - end - end - - it 'raises error on incorrect number of arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parseyaml_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parseyaml_spec.rb deleted file mode 100755 index 4b4bf3df3d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parseyaml_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'parseyaml function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'parses valid yaml' do - pp = <<-EOS - $a = "---\nhunter: washere\ntests: passing\n" - $o = parseyaml($a) - $tests = $o['tests'] - notice(inline_template('tests are <%= @tests.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/tests are "passing"/) - end - end - end - describe 'failure' do - it 'raises error on incorrect yaml' do - pp = <<-EOS - $a = "---\nhunter: washere\ntests: passing\n:" - $o = parseyaml($a) - $tests = $o['tests'] - notice(inline_template('tests are <%= @tests.inspect %>')) - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/syntax error/) - end - end - - it 'raises error on incorrect number of arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_default_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_default_spec.rb deleted file mode 100755 index a663f54e8a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_default_spec.rb +++ /dev/null @@ -1,54 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'pick_default function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'pick_defaults a default value' do - pp = <<-EOS - $a = undef - $o = pick_default($a, 'default') - notice(inline_template('picked is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/picked is "default"/) - end - end - it 'pick_defaults with no value' do - pp = <<-EOS - $a = undef - $b = undef - $o = pick_default($a,$b) - notice(inline_template('picked is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/picked is ""/) - end - end - it 'pick_defaults the first set value' do - pp = <<-EOS - $a = "something" - $b = "long" - $o = pick_default($a, $b, 'default') - notice(inline_template('picked is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/picked is "something"/) - end - end - end - describe 'failure' do - it 'raises error with no values' do - pp = <<-EOS - $o = pick_default() - notice(inline_template('picked is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/Must receive at least one argument/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_spec.rb deleted file mode 100755 index 46cf63f28f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_spec.rb +++ /dev/null @@ -1,44 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'pick function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'picks a default value' do - pp = <<-EOS - $a = undef - $o = pick($a, 'default') - notice(inline_template('picked is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/picked is "default"/) - end - end - it 'picks the first set value' do - pp = <<-EOS - $a = "something" - $b = "long" - $o = pick($a, $b, 'default') - notice(inline_template('picked is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/picked is "something"/) - end - end - end - describe 'failure' do - it 'raises error with all undef values' do - pp = <<-EOS - $a = undef - $b = undef - $o = pick($a, $b) - notice(inline_template('picked is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :expect_failures => true) do |r| - expect(r.stderr).to match(/must receive at least one non empty value/) - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/prefix_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/prefix_spec.rb deleted file mode 100755 index de55530eb2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/prefix_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'prefix function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'prefixes array of values' do - pp = <<-EOS - $o = prefix(['a','b','c'],'p') - notice(inline_template('prefix is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/prefix is \["pa", "pb", "pc"\]/) - end - end - it 'prefixs with empty array' do - pp = <<-EOS - $o = prefix([],'p') - notice(inline_template('prefix is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/prefix is \[\]/) - end - end - it 'prefixs array of values with undef' do - pp = <<-EOS - $o = prefix(['a','b','c'], undef) - notice(inline_template('prefix is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/prefix is \["a", "b", "c"\]/) - end - end - end - describe 'failure' do - it 'fails with no arguments' - it 'fails when first argument is not array' - it 'fails when second argument is not string' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/range_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/range_spec.rb deleted file mode 100755 index a3ccd3396a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/range_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'range function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'ranges letters' do - pp = <<-EOS - $o = range('a','d') - notice(inline_template('range is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/range is \["a", "b", "c", "d"\]/) - end - end - it 'ranges letters with a step' do - pp = <<-EOS - $o = range('a','d', '2') - notice(inline_template('range is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/range is \["a", "c"\]/) - end - end - it 'ranges letters with a negative step' - it 'ranges numbers' - it 'ranges numbers with a step' - it 'ranges numbers with a negative step' - it 'ranges numeric strings' - it 'ranges zero padded numbers' - end - describe 'failure' do - it 'fails with no arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reject_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reject_spec.rb deleted file mode 100755 index 7f16a008dc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reject_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'reject function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'rejects array of values' do - pp = <<-EOS - $o = reject(['aaa','bbb','ccc','aaaddd'], 'aaa') - notice(inline_template('reject is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/reject is \["bbb", "ccc"\]/) - end - end - it 'rejects with empty array' do - pp = <<-EOS - $o = reject([],'aaa') - notice(inline_template('reject is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/reject is \[\]/) - end - end - it 'rejects array of values with undef' do - pp = <<-EOS - $o = reject(['aaa','bbb','ccc','aaaddd'], undef) - notice(inline_template('reject is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/reject is \[\]/) - end - end - end - describe 'failure' do - it 'fails with no arguments' - it 'fails when first argument is not array' - it 'fails when second argument is not string' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reverse_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reverse_spec.rb deleted file mode 100755 index c3f01567a6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reverse_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'reverse function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'reverses strings' do - pp = <<-EOS - $a = "the public art galleries" - # Anagram: Large picture halls, I bet - $o = reverse($a) - notice(inline_template('reverse is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/reverse is "seirellag tra cilbup eht"/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings or arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/rstrip_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/rstrip_spec.rb deleted file mode 100755 index b57a8b0458..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/rstrip_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'rstrip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'rstrips arrays' do - pp = <<-EOS - $a = [" the "," public "," art","galleries "] - # Anagram: Large picture halls, I bet - $o = rstrip($a) - notice(inline_template('rstrip is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/rstrip is \[" the", " public", " art", "galleries"\]/) - end - end - it 'rstrips strings' do - pp = <<-EOS - $a = " blowzy night-frumps vex'd jack q " - $o = rstrip($a) - notice(inline_template('rstrip is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/rstrip is " blowzy night-frumps vex'd jack q"/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings or arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/shuffle_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/shuffle_spec.rb deleted file mode 100755 index 02d1201dd0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/shuffle_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'shuffle function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'shuffles arrays' do - pp = <<-EOS - $a = ["the","public","art","galleries"] - # Anagram: Large picture halls, I bet - $o = shuffle($a) - notice(inline_template('shuffle is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to_not match(/shuffle is \["the", "public", "art", "galleries"\]/) - end - end - it 'shuffles strings' do - pp = <<-EOS - $a = "blowzy night-frumps vex'd jack q" - $o = shuffle($a) - notice(inline_template('shuffle is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to_not match(/shuffle is "blowzy night-frumps vex'd jack q"/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings or arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/size_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/size_spec.rb deleted file mode 100755 index a52b778bde..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/size_spec.rb +++ /dev/null @@ -1,55 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'size function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'single string size' do - pp = <<-EOS - $a = 'discombobulate' - $o = size($a) - notice(inline_template('size is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/size is 14/) - end - end - it 'with empty string' do - pp = <<-EOS - $a = '' - $o = size($a) - notice(inline_template('size is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/size is 0/) - end - end - it 'with undef' do - pp = <<-EOS - $a = undef - $o = size($a) - notice(inline_template('size is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/size is 0/) - end - end - it 'strings in array' do - pp = <<-EOS - $a = ['discombobulate', 'moo'] - $o = size($a) - notice(inline_template('size is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/size is 2/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings or arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/sort_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/sort_spec.rb deleted file mode 100755 index c85bfabd5c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/sort_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'sort function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'sorts arrays' do - pp = <<-EOS - $a = ["the","public","art","galleries"] - # Anagram: Large picture halls, I bet - $o = sort($a) - notice(inline_template('sort is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/sort is \["art", "galleries", "public", "the"\]/) - end - end - it 'sorts strings' do - pp = <<-EOS - $a = "blowzy night-frumps vex'd jack q" - $o = sort($a) - notice(inline_template('sort is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/sort is " '-abcdefghijklmnopqrstuvwxyz"/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings or arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/squeeze_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/squeeze_spec.rb deleted file mode 100755 index 400a458c9b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/squeeze_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'squeeze function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'squeezes arrays' do - pp = <<-EOS - # Real words! - $a = ["wallless", "laparohysterosalpingooophorectomy", "brrr", "goddessship"] - $o = squeeze($a) - notice(inline_template('squeeze is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/squeeze is \["wales", "laparohysterosalpingophorectomy", "br", "godeship"\]/) - end - end - it 'squeezez arrays with an argument' - it 'squeezes strings' do - pp = <<-EOS - $a = "wallless laparohysterosalpingooophorectomy brrr goddessship" - $o = squeeze($a) - notice(inline_template('squeeze is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/squeeze is "wales laparohysterosalpingophorectomy br godeship"/) - end - end - - it 'squeezes strings with an argument' do - pp = <<-EOS - $a = "countessship duchessship governessship hostessship" - $o = squeeze($a, 's') - notice(inline_template('squeeze is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/squeeze is "counteship ducheship governeship hosteship"/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings or arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2bool_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2bool_spec.rb deleted file mode 100755 index cf549dab88..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2bool_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'str2bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'works with "y"' do - pp = <<-EOS - $o = str2bool('y') - notice(inline_template('str2bool is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/str2bool is true/) - end - end - it 'works with "Y"' - it 'works with "yes"' - it 'works with "1"' - it 'works with "true"' - it 'works with "n"' - it 'works with "N"' - it 'works with "no"' - it 'works with "0"' - it 'works with "false"' - it 'works with undef' - end - describe 'failure' do - it 'handles no arguments' - it 'handles non arrays or strings' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb deleted file mode 100755 index 993e63bace..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'str2saltedsha512 function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'works with "y"' do - pp = <<-EOS - $o = str2saltedsha512('password') - notice(inline_template('str2saltedsha512 is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/str2saltedsha512 is "[a-f0-9]{136}"/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles more than one argument' - it 'handles non strings' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strftime_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strftime_spec.rb deleted file mode 100755 index 53b7f903be..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strftime_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'strftime function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'gives the Century' do - pp = <<-EOS - $o = strftime('%C') - notice(inline_template('strftime is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/strftime is "20"/) - end - end - it 'takes a timezone argument' - end - describe 'failure' do - it 'handles no arguments' - it 'handles invalid format strings' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strip_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strip_spec.rb deleted file mode 100755 index 906fd7abed..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strip_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'strip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'strips arrays' do - pp = <<-EOS - $a = [" the "," public "," art","galleries "] - # Anagram: Large picture halls, I bet - $o = strip($a) - notice(inline_template('strip is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/strip is \["the", "public", "art", "galleries"\]/) - end - end - it 'strips strings' do - pp = <<-EOS - $a = " blowzy night-frumps vex'd jack q " - $o = strip($a) - notice(inline_template('strip is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/strip is "blowzy night-frumps vex'd jack q"/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings or arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/suffix_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/suffix_spec.rb deleted file mode 100755 index 630f866d70..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/suffix_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'suffix function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'suffixes array of values' do - pp = <<-EOS - $o = suffix(['a','b','c'],'p') - notice(inline_template('suffix is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/suffix is \["ap", "bp", "cp"\]/) - end - end - it 'suffixs with empty array' do - pp = <<-EOS - $o = suffix([],'p') - notice(inline_template('suffix is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/suffix is \[\]/) - end - end - it 'suffixs array of values with undef' do - pp = <<-EOS - $o = suffix(['a','b','c'], undef) - notice(inline_template('suffix is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/suffix is \["a", "b", "c"\]/) - end - end - end - describe 'failure' do - it 'fails with no arguments' - it 'fails when first argument is not array' - it 'fails when second argument is not string' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/swapcase_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/swapcase_spec.rb deleted file mode 100755 index b7894fbe27..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/swapcase_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'swapcase function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'works with strings' do - pp = <<-EOS - $o = swapcase('aBcD') - notice(inline_template('swapcase is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/swapcase is "AbCd"/) - end - end - it 'works with arrays' - end - describe 'failure' do - it 'handles no arguments' - it 'handles non arrays or strings' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/time_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/time_spec.rb deleted file mode 100755 index cdb296070c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/time_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'time function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'gives the time' do - pp = <<-EOS - $o = time() - notice(inline_template('time is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - m = r.stdout.match(/time is (\d+)\D/) - - # When I wrote this test - expect(Integer(m[1])).to be > 1398894170 - end - end - it 'takes a timezone argument' do - pp = <<-EOS - $o = time('UTC') - notice(inline_template('time is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - m = r.stdout.match(/time is (\d+)\D/) - - expect(Integer(m[1])).to be > 1398894170 - end - end - end - describe 'failure' do - it 'handles more arguments' - it 'handles invalid timezones' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/to_bytes_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/to_bytes_spec.rb deleted file mode 100755 index 2b4c61f48d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/to_bytes_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'to_bytes function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'converts kB to B' do - pp = <<-EOS - $o = to_bytes('4 kB') - notice(inline_template('to_bytes is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - m = r.stdout.match(/to_bytes is (\d+)\D/) - expect(m[1]).to eq("4096") - end - end - it 'works without the B in unit' - it 'works without a space before unit' - it 'works without a unit' - it 'converts fractions' - end - describe 'failure' do - it 'handles no arguments' - it 'handles non integer arguments' - it 'handles unknown units like uB' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/type_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/type_spec.rb deleted file mode 100755 index 0043aad7cd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/type_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'type function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'types arrays' do - pp = <<-EOS - $a = ["the","public","art","galleries"] - # Anagram: Large picture halls, I bet - $o = type($a) - notice(inline_template('type is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/type is "array"/) - end - end - it 'types strings' do - pp = <<-EOS - $a = "blowzy night-frumps vex'd jack q" - $o = type($a) - notice(inline_template('type is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/type is "string"/) - end - end - it 'types hashes' - it 'types integers' - it 'types floats' - it 'types booleans' - end - describe 'failure' do - it 'handles no arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/union_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/union_spec.rb deleted file mode 100755 index 6db8d0cf96..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/union_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'union function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'unions arrays' do - pp = <<-EOS - $a = ["the","public"] - $b = ["art","galleries"] - # Anagram: Large picture halls, I bet - $o = union($a,$b) - notice(inline_template('union is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/union is \["the", "public", "art", "galleries"\]/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unique_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unique_spec.rb deleted file mode 100755 index bfadad19bf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unique_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'unique function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'uniques arrays' do - pp = <<-EOS - $a = ["wallless", "wallless", "brrr", "goddessship"] - $o = unique($a) - notice(inline_template('unique is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/unique is \["wallless", "brrr", "goddessship"\]/) - end - end - it 'uniques strings' do - pp = <<-EOS - $a = "wallless laparohysterosalpingooophorectomy brrr goddessship" - $o = unique($a) - notice(inline_template('unique is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/unique is "wales prohytingcmbd"/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings or arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unsupported_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unsupported_spec.rb deleted file mode 100755 index 1c559f67ec..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unsupported_spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'unsupported distributions and OSes', :if => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - it 'should fail' do - pp = <<-EOS - class { 'mysql::server': } - EOS - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/unsupported osfamily/i) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/upcase_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/upcase_spec.rb deleted file mode 100755 index 3d2906d725..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/upcase_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'upcase function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'upcases arrays' do - pp = <<-EOS - $a = ["wallless", "laparohysterosalpingooophorectomy", "brrr", "goddessship"] - $o = upcase($a) - notice(inline_template('upcase is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/upcase is \["WALLLESS", "LAPAROHYSTEROSALPINGOOOPHORECTOMY", "BRRR", "GODDESSSHIP"\]/) - end - end - it 'upcases strings' do - pp = <<-EOS - $a = "wallless laparohysterosalpingooophorectomy brrr goddessship" - $o = upcase($a) - notice(inline_template('upcase is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/upcase is "WALLLESS LAPAROHYSTEROSALPINGOOOPHORECTOMY BRRR GODDESSSHIP"/) - end - end - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings or arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/uriescape_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/uriescape_spec.rb deleted file mode 100755 index 7e30205e8d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/uriescape_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'uriescape function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'uriescape strings' do - pp = <<-EOS - $a = ":/?#[]@!$&'()*+,;= \\\"{}" - $o = uriescape($a) - notice(inline_template('uriescape is <%= @o.inspect %>')) - EOS - - apply_manifest(pp, :catch_failures => true) do |r| - expect(r.stdout).to match(/uriescape is ":\/\?%23\[\]@!\$&'\(\)\*\+,;=%20%22%7B%7D"/) - end - end - it 'does nothing if a string is already safe' - end - describe 'failure' do - it 'handles no arguments' - it 'handles non strings or arrays' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb deleted file mode 100755 index 7082e848ef..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'validate_absolute_path function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - %w{ - C:/ - C:\\\\ - C:\\\\WINDOWS\\\\System32 - C:/windows/system32 - X:/foo/bar - X:\\\\foo\\\\bar - /var/tmp - /var/lib/puppet - /var/opt/../lib/puppet - }.each do |path| - it "validates a single argument #{path}" do - pp = <<-EOS - $one = '#{path}' - validate_absolute_path($one) - EOS - - apply_manifest(pp, :catch_failures => true) - end - end - end - describe 'failure' do - it 'handles improper number of arguments' - it 'handles relative paths' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_array_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_array_spec.rb deleted file mode 100755 index b53e98c273..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_array_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'validate_array function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'validates a single argument' do - pp = <<-EOS - $one = ['a', 'b'] - validate_array($one) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates an multiple arguments' do - pp = <<-EOS - $one = ['a', 'b'] - $two = [['c'], 'd'] - validate_array($one,$two) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates a non-array' do - { - %{validate_array({'a' => 'hash' })} => "Hash", - %{validate_array('string')} => "String", - %{validate_array(false)} => "FalseClass", - %{validate_array(undef)} => "String" - }.each do |pp,type| - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/) - end - end - end - describe 'failure' do - it 'handles improper number of arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_augeas_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_augeas_spec.rb deleted file mode 100755 index aeec67ae1b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_augeas_spec.rb +++ /dev/null @@ -1,63 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'validate_augeas function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'prep' do - it 'installs augeas for tests' - end - describe 'success' do - context 'valid inputs with no 3rd argument' do - { - 'root:x:0:0:root:/root:/bin/bash\n' => 'Passwd.lns', - 'proc /proc proc nodev,noexec,nosuid 0 0\n' => 'Fstab.lns' - }.each do |line,lens| - it "validates a single argument for #{lens}" do - pp = <<-EOS - $line = "#{line}" - $lens = "#{lens}" - validate_augeas($line, $lens) - EOS - - apply_manifest(pp, :catch_failures => true) - end - end - end - context 'valid inputs with 3rd and 4th arguments' do - it "validates a restricted value" do - line = 'root:x:0:0:root:/root:/bin/barsh\n' - lens = 'Passwd.lns' - restriction = '$file/*[shell="/bin/barsh"]' - pp = <<-EOS - $line = "#{line}" - $lens = "#{lens}" - $restriction = ['#{restriction}'] - validate_augeas($line, $lens, $restriction, "my custom failure message") - EOS - - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/my custom failure message/) - end - end - context 'invalid inputs' do - { - 'root:x:0:0:root' => 'Passwd.lns', - '127.0.1.1' => 'Hosts.lns' - }.each do |line,lens| - it "validates a single argument for #{lens}" do - pp = <<-EOS - $line = "#{line}" - $lens = "#{lens}" - validate_augeas($line, $lens) - EOS - - apply_manifest(pp, :expect_failures => true) - end - end - end - context 'garbage inputs' do - it 'raises an error on invalid inputs' - end - end - describe 'failure' do - it 'handles improper number of arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_bool_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_bool_spec.rb deleted file mode 100755 index c837f089f2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_bool_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'validate_bool function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'validates a single argument' do - pp = <<-EOS - $one = true - validate_bool($one) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates an multiple arguments' do - pp = <<-EOS - $one = true - $two = false - validate_bool($one,$two) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates a non-bool' do - { - %{validate_bool('true')} => "String", - %{validate_bool('false')} => "String", - %{validate_bool([true])} => "Array", - %{validate_bool(undef)} => "String", - }.each do |pp,type| - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/) - end - end - end - describe 'failure' do - it 'handles improper number of arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_cmd_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_cmd_spec.rb deleted file mode 100755 index 385676d14b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_cmd_spec.rb +++ /dev/null @@ -1,50 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'validate_cmd function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'validates a true command' do - pp = <<-EOS - $one = 'foo' - if $::osfamily == 'windows' { - $two = 'echo' #shell built-in - } else { - $two = '/bin/echo' - } - validate_cmd($one,$two) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates a fail command' do - pp = <<-EOS - $one = 'foo' - if $::osfamily == 'windows' { - $two = 'C:/aoeu' - } else { - $two = '/bin/aoeu' - } - validate_cmd($one,$two) - EOS - - apply_manifest(pp, :expect_failures => true) - end - it 'validates a fail command with a custom error message' do - pp = <<-EOS - $one = 'foo' - if $::osfamily == 'windows' { - $two = 'C:/aoeu' - } else { - $two = '/bin/aoeu' - } - validate_cmd($one,$two,"aoeu is dvorak) - EOS - - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/aoeu is dvorak/) - end - end - describe 'failure' do - it 'handles improper number of arguments' - it 'handles improper argument types' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_hash_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_hash_spec.rb deleted file mode 100755 index 52fb615bdf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_hash_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'validate_hash function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'validates a single argument' do - pp = <<-EOS - $one = { 'a' => 1 } - validate_hash($one) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates an multiple arguments' do - pp = <<-EOS - $one = { 'a' => 1 } - $two = { 'b' => 2 } - validate_hash($one,$two) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates a non-hash' do - { - %{validate_hash('{ "not" => "hash" }')} => "String", - %{validate_hash('string')} => "String", - %{validate_hash(["array"])} => "Array", - %{validate_hash(undef)} => "String", - }.each do |pp,type| - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/) - end - end - end - describe 'failure' do - it 'handles improper number of arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb deleted file mode 100755 index 64841c3716..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'validate_ipv4_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'validates a single argument' do - pp = <<-EOS - $one = '1.2.3.4' - validate_ipv4_address($one) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates an multiple arguments' do - pp = <<-EOS - $one = '1.2.3.4' - $two = '5.6.7.8' - validate_ipv4_address($one,$two) - EOS - - apply_manifest(pp, :catch_failures => true) - end - end - describe 'failure' do - it 'handles improper number of arguments' - it 'handles ipv6 addresses' - it 'handles non-ipv4 strings' - it 'handles numbers' - it 'handles no arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb deleted file mode 100755 index 6426d1a526..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'validate_ipv6_address function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'validates a single argument' do - pp = <<-EOS - $one = '3ffe:0505:0002::' - validate_ipv6_address($one) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates an multiple arguments' do - pp = <<-EOS - $one = '3ffe:0505:0002::' - $two = '3ffe:0505:0001::' - validate_ipv6_address($one,$two) - EOS - - apply_manifest(pp, :catch_failures => true) - end - end - describe 'failure' do - it 'handles improper number of arguments' - it 'handles ipv6 addresses' - it 'handles non-ipv6 strings' - it 'handles numbers' - it 'handles no arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_re_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_re_spec.rb deleted file mode 100755 index 22f6d47d1d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_re_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'validate_re function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'validates a string' do - pp = <<-EOS - $one = 'one' - $two = '^one$' - validate_re($one,$two) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates an array' do - pp = <<-EOS - $one = 'one' - $two = ['^one$', '^two'] - validate_re($one,$two) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates a failed array' do - pp = <<-EOS - $one = 'one' - $two = ['^two$', '^three'] - validate_re($one,$two) - EOS - - apply_manifest(pp, :expect_failures => true) - end - it 'validates a failed array with a custom error message' do - pp = <<-EOS - $one = '3.4.3' - $two = '^2.7' - validate_re($one,$two,"The $puppetversion fact does not match 2.7") - EOS - - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/does not match/) - end - end - describe 'failure' do - it 'handles improper number of arguments' - it 'handles improper argument types' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_slength_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_slength_spec.rb deleted file mode 100755 index 1ab2bb986e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_slength_spec.rb +++ /dev/null @@ -1,72 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'validate_slength function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'validates a single string max' do - pp = <<-EOS - $one = 'discombobulate' - $two = 17 - validate_slength($one,$two) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates multiple string maxes' do - pp = <<-EOS - $one = ['discombobulate', 'moo'] - $two = 17 - validate_slength($one,$two) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates min/max of strings in array' do - pp = <<-EOS - $one = ['discombobulate', 'moo'] - $two = 17 - $three = 3 - validate_slength($one,$two,$three) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates a single string max of incorrect length' do - pp = <<-EOS - $one = 'discombobulate' - $two = 1 - validate_slength($one,$two) - EOS - - apply_manifest(pp, :expect_failures => true) - end - it 'validates multiple string maxes of incorrect length' do - pp = <<-EOS - $one = ['discombobulate', 'moo'] - $two = 3 - validate_slength($one,$two) - EOS - - apply_manifest(pp, :expect_failures => true) - end - it 'validates multiple strings min/maxes of incorrect length' do - pp = <<-EOS - $one = ['discombobulate', 'moo'] - $two = 17 - $three = 10 - validate_slength($one,$two,$three) - EOS - - apply_manifest(pp, :expect_failures => true) - end - end - describe 'failure' do - it 'handles improper number of arguments' - it 'handles improper first argument type' - it 'handles non-strings in array of first argument' - it 'handles improper second argument type' - it 'handles improper third argument type' - it 'handles negative ranges' - it 'handles improper ranges' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_string_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_string_spec.rb deleted file mode 100755 index 8956f48c90..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_string_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'validate_string function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'validates a single argument' do - pp = <<-EOS - $one = 'string' - validate_string($one) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates an multiple arguments' do - pp = <<-EOS - $one = 'string' - $two = 'also string' - validate_string($one,$two) - EOS - - apply_manifest(pp, :catch_failures => true) - end - it 'validates a non-string' do - { - %{validate_string({ 'a' => 'hash' })} => "Hash", - %{validate_string(['array'])} => "Array", - %{validate_string(false)} => "FalseClass", - }.each do |pp,type| - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/a #{type}/) - end - end - end - describe 'failure' do - it 'handles improper number of arguments' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_at_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_at_spec.rb deleted file mode 100755 index da63cf307a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_at_spec.rb +++ /dev/null @@ -1,73 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'values_at function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'returns a specific value' do - pp = <<-EOS - $one = ['a','b','c','d','e'] - $two = 1 - $output = values_at($one,$two) - notice(inline_template('<%= @output.inspect %>')) - EOS - - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["b"\]/) - end - it 'returns a specific negative index value' do - pending("negative numbers don't work") - pp = <<-EOS - $one = ['a','b','c','d','e'] - $two = -1 - $output = values_at($one,$two) - notice(inline_template('<%= @output.inspect %>')) - EOS - - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["e"\]/) - end - it 'returns a range of values' do - pp = <<-EOS - $one = ['a','b','c','d','e'] - $two = "1-3" - $output = values_at($one,$two) - notice(inline_template('<%= @output.inspect %>')) - EOS - - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["b", "c", "d"\]/) - end - it 'returns a negative specific value and range of values' do - pp = <<-EOS - $one = ['a','b','c','d','e'] - $two = ["1-3",0] - $output = values_at($one,$two) - notice(inline_template('<%= @output.inspect %>')) - EOS - - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["b", "c", "d", "a"\]/) - end - end - describe 'failure' do - it 'handles improper number of arguments' do - pp = <<-EOS - $one = ['a','b','c','d','e'] - $output = values_at($one) - notice(inline_template('<%= @output.inspect %>')) - EOS - - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Wrong number of arguments/) - end - it 'handles non-indicies arguments' do - pp = <<-EOS - $one = ['a','b','c','d','e'] - $two = [] - $output = values_at($one,$two) - notice(inline_template('<%= @output.inspect %>')) - EOS - - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/at least one positive index/) - end - - it 'detects index ranges smaller than the start range' - it 'handles index ranges larger than array' - it 'handles non-integer indicies' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_spec.rb deleted file mode 100755 index 7ef956e048..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' - -describe 'values function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'returns an array of values' do - pp = <<-EOS - $arg = { - 'a' => 1, - 'b' => 2, - 'c' => 3, - } - $output = values($arg) - notice(inline_template('<%= @output.sort.inspect %>')) - EOS - - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["1", "2", "3"\]/) - end - end - describe 'failure' do - it 'handles non-hash arguments' do - pp = <<-EOS - $arg = "foo" - $output = values($arg) - notice(inline_template('<%= @output.inspect %>')) - EOS - - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Requires hash/) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/zip_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/zip_spec.rb deleted file mode 100755 index 0e924e8492..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/zip_spec.rb +++ /dev/null @@ -1,74 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper_acceptance' -require 'puppet' - -describe 'zip function', :unless => UNSUPPORTED_PLATFORMS.include?(fact('operatingsystem')) do - describe 'success' do - it 'zips two arrays of numbers together' do - pp = <<-EOS - $one = [1,2,3,4] - $two = [5,6,7,8] - $output = zip($one,$two) - notice(inline_template('<%= @output.inspect %>')) - EOS - - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", "5"\], \["2", "6"\], \["3", "7"\], \["4", "8"\]\]/) - end - it 'zips two arrays of numbers & bools together' do - pp = <<-EOS - $one = [1,2,"three",4] - $two = [true,true,false,false] - $output = zip($one,$two) - notice(inline_template('<%= @output.inspect %>')) - EOS - - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", true\], \["2", true\], \["three", false\], \["4", false\]\]/) - end - it 'zips two arrays of numbers together and flattens them' do - # XXX This only tests the argument `true`, even though the following are valid: - # 1 t y true yes - # 0 f n false no - # undef undefined - pp = <<-EOS - $one = [1,2,3,4] - $two = [5,6,7,8] - $output = zip($one,$two,true) - notice(inline_template('<%= @output.inspect %>')) - EOS - - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\["1", "5", "2", "6", "3", "7", "4", "8"\]/) - end - it 'handles unmatched length' do - # XXX Is this expected behavior? - pp = <<-EOS - $one = [1,2] - $two = [5,6,7,8] - $output = zip($one,$two) - notice(inline_template('<%= @output.inspect %>')) - EOS - - expect(apply_manifest(pp, :catch_failures => true).stdout).to match(/\[\["1", "5"\], \["2", "6"\]\]/) - end - end - describe 'failure' do - it 'handles improper number of arguments' do - pp = <<-EOS - $one = [1,2] - $output = zip($one) - notice(inline_template('<%= @output.inspect %>')) - EOS - - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Wrong number of arguments/) - end - it 'handles improper argument types' do - pp = <<-EOS - $one = "a string" - $two = [5,6,7,8] - $output = zip($one,$two) - notice(inline_template('<%= @output.inspect %>')) - EOS - - expect(apply_manifest(pp, :expect_failures => true).stderr).to match(/Requires array/) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/classes/anchor_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/classes/anchor_spec.rb deleted file mode 100755 index 2d4455e417..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/classes/anchor_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' -require 'puppet_spec/compiler' - -describe "anchorrefresh" do - include PuppetSpec::Compiler - - let :transaction do - apply_compiled_manifest(<<-ANCHORCLASS) - class anchored { - anchor { 'anchored::begin': } - ~> anchor { 'anchored::end': } - } - - class anchorrefresh { - notify { 'first': } - ~> class { 'anchored': } - ~> anchor { 'final': } - } - - include anchorrefresh - ANCHORCLASS - end - - it 'propagates events through the anchored class' do - resource = transaction.resource_status('Anchor[final]') - - expect(resource.restarted).to eq(true) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/fixtures/dscacheutil/root b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/fixtures/dscacheutil/root deleted file mode 100644 index 1e34519b2a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/fixtures/dscacheutil/root +++ /dev/null @@ -1,8 +0,0 @@ -name: root -password: * -uid: 0 -gid: 0 -dir: /var/root -shell: /bin/bash -gecos: rawr Root - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/abs_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/abs_spec.rb deleted file mode 100755 index c0b42970c5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/abs_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe "the abs function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("abs").should == "function_abs" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_abs([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should convert a negative number into a positive" do - result = scope.function_abs(["-34"]) - result.should(eq(34)) - end - - it "should do nothing with a positive number" do - result = scope.function_abs(["5678"]) - result.should(eq(5678)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/any2array_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/any2array_spec.rb deleted file mode 100755 index b266e84f4f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/any2array_spec.rb +++ /dev/null @@ -1,55 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the any2array function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("any2array").should == "function_any2array" - end - - it "should return an empty array if there is less than 1 argument" do - result = scope.function_any2array([]) - result.should(eq([])) - end - - it "should convert boolean true to [ true ] " do - result = scope.function_any2array([true]) - result.should(eq([true])) - end - - it "should convert one object to [object]" do - result = scope.function_any2array(['one']) - result.should(eq(['one'])) - end - - it "should convert multiple objects to [objects]" do - result = scope.function_any2array(['one', 'two']) - result.should(eq(['one', 'two'])) - end - - it "should return empty array it was called with" do - result = scope.function_any2array([[]]) - result.should(eq([])) - end - - it "should return one-member array it was called with" do - result = scope.function_any2array([['string']]) - result.should(eq(['string'])) - end - - it "should return multi-member array it was called with" do - result = scope.function_any2array([['one', 'two']]) - result.should(eq(['one', 'two'])) - end - - it "should return members of a hash it was called with" do - result = scope.function_any2array([{ 'key' => 'value' }]) - result.should(eq(['key', 'value'])) - end - - it "should return an empty array if it was called with an empty hash" do - result = scope.function_any2array([{ }]) - result.should(eq([])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/base64_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/base64_spec.rb deleted file mode 100755 index 5faa5e66c7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/base64_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe "the base64 function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("base64").should == "function_base64" - end - - it "should raise a ParseError if there are other than 2 arguments" do - expect { scope.function_base64([]) }.to(raise_error(Puppet::ParseError)) - expect { scope.function_base64(["asdf"]) }.to(raise_error(Puppet::ParseError)) - expect { scope.function_base64(["asdf","moo","cow"]) }.to(raise_error(Puppet::ParseError)) - end - - it "should raise a ParseError if argument 1 isn't 'encode' or 'decode'" do - expect { scope.function_base64(["bees","astring"]) }.to(raise_error(Puppet::ParseError, /first argument must be one of/)) - end - - it "should raise a ParseError if argument 2 isn't a string" do - expect { scope.function_base64(["encode",["2"]]) }.to(raise_error(Puppet::ParseError, /second argument must be a string/)) - end - - it "should encode a encoded string" do - result = scope.function_base64(["encode",'thestring']) - result.should =~ /\AdGhlc3RyaW5n\n\Z/ - end - it "should decode a base64 encoded string" do - result = scope.function_base64(["decode",'dGhlc3RyaW5n']) - result.should == 'thestring' - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/bool2num_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/bool2num_spec.rb deleted file mode 100755 index 518ac85ec5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/bool2num_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the bool2num function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("bool2num").should == "function_bool2num" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_bool2num([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should convert true to 1" do - result = scope.function_bool2num([true]) - result.should(eq(1)) - end - - it "should convert false to 0" do - result = scope.function_bool2num([false]) - result.should(eq(0)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/capitalize_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/capitalize_spec.rb deleted file mode 100755 index 69c9758f25..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/capitalize_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the capitalize function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("capitalize").should == "function_capitalize" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_capitalize([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should capitalize the beginning of a string" do - result = scope.function_capitalize(["abc"]) - result.should(eq("Abc")) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/chomp_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/chomp_spec.rb deleted file mode 100755 index e425365fcb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/chomp_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the chomp function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("chomp").should == "function_chomp" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_chomp([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should chomp the end of a string" do - result = scope.function_chomp(["abc\n"]) - result.should(eq("abc")) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/chop_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/chop_spec.rb deleted file mode 100755 index 9e466de4b6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/chop_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the chop function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("chop").should == "function_chop" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_chop([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should chop the end of a string" do - result = scope.function_chop(["asdf\n"]) - result.should(eq("asdf")) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/concat_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/concat_spec.rb deleted file mode 100755 index 6e67620966..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/concat_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the concat function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should raise a ParseError if the client does not provide two arguments" do - lambda { scope.function_concat([]) }.should(raise_error(Puppet::ParseError)) - end - - it "should raise a ParseError if the first parameter is not an array" do - lambda { scope.function_concat([1, []])}.should(raise_error(Puppet::ParseError)) - end - - it "should be able to concat an array" do - result = scope.function_concat([['1','2','3'],['4','5','6']]) - result.should(eq(['1','2','3','4','5','6'])) - end - - it "should be able to concat a primitive to an array" do - result = scope.function_concat([['1','2','3'],'4']) - result.should(eq(['1','2','3','4'])) - end - - it "should not accidentally flatten nested arrays" do - result = scope.function_concat([['1','2','3'],[['4','5'],'6']]) - result.should(eq(['1','2','3',['4','5'],'6'])) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/count_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/count_spec.rb deleted file mode 100755 index 2453815c26..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/count_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe "the count function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("count").should == "function_count" - end - - it "should raise a ArgumentError if there is more than 2 arguments" do - lambda { scope.function_count(['foo', 'bar', 'baz']) }.should( raise_error(ArgumentError)) - end - - it "should be able to count arrays" do - scope.function_count([["1","2","3"]]).should(eq(3)) - end - - it "should be able to count matching elements in arrays" do - scope.function_count([["1", "2", "2"], "2"]).should(eq(2)) - end - - it "should not count nil or empty strings" do - scope.function_count([["foo","bar",nil,""]]).should(eq(2)) - end - - it 'does not count an undefined hash key or an out of bound array index (which are both :undef)' do - expect(scope.function_count([["foo",:undef,:undef]])).to eq(1) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/deep_merge_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/deep_merge_spec.rb deleted file mode 100755 index f1347014cf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/deep_merge_spec.rb +++ /dev/null @@ -1,105 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:deep_merge) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - describe 'when calling deep_merge from puppet' do - it "should not compile when no arguments are passed" do - pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ - Puppet[:code] = '$x = deep_merge()' - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /wrong number of arguments/) - end - - it "should not compile when 1 argument is passed" do - pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ - Puppet[:code] = "$my_hash={'one' => 1}\n$x = deep_merge($my_hash)" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /wrong number of arguments/) - end - end - - describe 'when calling deep_merge on the scope instance' do - it 'should require all parameters are hashes' do - expect { new_hash = scope.function_deep_merge([{}, '2'])}.to raise_error(Puppet::ParseError, /unexpected argument type String/) - expect { new_hash = scope.function_deep_merge([{}, 2])}.to raise_error(Puppet::ParseError, /unexpected argument type Fixnum/) - end - - it 'should accept empty strings as puppet undef' do - expect { new_hash = scope.function_deep_merge([{}, ''])}.not_to raise_error - end - - it 'should be able to deep_merge two hashes' do - new_hash = scope.function_deep_merge([{'one' => '1', 'two' => '1'}, {'two' => '2', 'three' => '2'}]) - new_hash['one'].should == '1' - new_hash['two'].should == '2' - new_hash['three'].should == '2' - end - - it 'should deep_merge multiple hashes' do - hash = scope.function_deep_merge([{'one' => 1}, {'one' => '2'}, {'one' => '3'}]) - hash['one'].should == '3' - end - - it 'should accept empty hashes' do - scope.function_deep_merge([{},{},{}]).should == {} - end - - it 'should deep_merge subhashes' do - hash = scope.function_deep_merge([{'one' => 1}, {'two' => 2, 'three' => { 'four' => 4 } }]) - hash['one'].should == 1 - hash['two'].should == 2 - hash['three'].should == { 'four' => 4 } - end - - it 'should append to subhashes' do - hash = scope.function_deep_merge([{'one' => { 'two' => 2 } }, { 'one' => { 'three' => 3 } }]) - hash['one'].should == { 'two' => 2, 'three' => 3 } - end - - it 'should append to subhashes 2' do - hash = scope.function_deep_merge([{'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }, {'two' => 'dos', 'three' => { 'five' => 5 } }]) - hash['one'].should == 1 - hash['two'].should == 'dos' - hash['three'].should == { 'four' => 4, 'five' => 5 } - end - - it 'should append to subhashes 3' do - hash = scope.function_deep_merge([{ 'key1' => { 'a' => 1, 'b' => 2 }, 'key2' => { 'c' => 3 } }, { 'key1' => { 'b' => 99 } }]) - hash['key1'].should == { 'a' => 1, 'b' => 99 } - hash['key2'].should == { 'c' => 3 } - end - - it 'should not change the original hashes' do - hash1 = {'one' => { 'two' => 2 } } - hash2 = { 'one' => { 'three' => 3 } } - hash = scope.function_deep_merge([hash1, hash2]) - hash1.should == {'one' => { 'two' => 2 } } - hash2.should == { 'one' => { 'three' => 3 } } - hash['one'].should == { 'two' => 2, 'three' => 3 } - end - - it 'should not change the original hashes 2' do - hash1 = {'one' => { 'two' => [1,2] } } - hash2 = { 'one' => { 'three' => 3 } } - hash = scope.function_deep_merge([hash1, hash2]) - hash1.should == {'one' => { 'two' => [1,2] } } - hash2.should == { 'one' => { 'three' => 3 } } - hash['one'].should == { 'two' => [1,2], 'three' => 3 } - end - - it 'should not change the original hashes 3' do - hash1 = {'one' => { 'two' => [1,2, {'two' => 2} ] } } - hash2 = { 'one' => { 'three' => 3 } } - hash = scope.function_deep_merge([hash1, hash2]) - hash1.should == {'one' => { 'two' => [1,2, {'two' => 2}] } } - hash2.should == { 'one' => { 'three' => 3 } } - hash['one'].should == { 'two' => [1,2, {'two' => 2} ], 'three' => 3 } - hash['one']['two'].should == [1,2, {'two' => 2}] - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/defined_with_params_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/defined_with_params_spec.rb deleted file mode 100755 index 28dbab3119..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/defined_with_params_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -require 'rspec-puppet' -describe 'defined_with_params' do - describe 'when a resource is not specified' do - it { should run.with_params().and_raise_error(ArgumentError) } - end - describe 'when compared against a resource with no attributes' do - let :pre_condition do - 'user { "dan": }' - end - it do - should run.with_params('User[dan]', {}).and_return(true) - should run.with_params('User[bob]', {}).and_return(false) - should run.with_params('User[dan]', {'foo' => 'bar'}).and_return(false) - end - end - - describe 'when compared against a resource with attributes' do - let :pre_condition do - 'user { "dan": ensure => present, shell => "/bin/csh", managehome => false}' - end - it do - should run.with_params('User[dan]', {}).and_return(true) - should run.with_params('User[dan]', '').and_return(true) - should run.with_params('User[dan]', {'ensure' => 'present'} - ).and_return(true) - should run.with_params('User[dan]', - {'ensure' => 'present', 'managehome' => false} - ).and_return(true) - should run.with_params('User[dan]', - {'ensure' => 'absent', 'managehome' => false} - ).and_return(false) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_at_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_at_spec.rb deleted file mode 100755 index 593cf45929..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_at_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the delete_at function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("delete_at").should == "function_delete_at" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_delete_at([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should delete an item at specified location from an array" do - result = scope.function_delete_at([['a','b','c'],1]) - result.should(eq(['a','c'])) - end - - it "should not change origin array passed as argument" do - origin_array = ['a','b','c','d'] - result = scope.function_delete_at([origin_array, 1]) - origin_array.should(eq(['a','b','c','d'])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_spec.rb deleted file mode 100755 index 1508a63e91..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the delete function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("delete").should == "function_delete" - end - - it "should raise a ParseError if there are fewer than 2 arguments" do - lambda { scope.function_delete([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should raise a ParseError if there are greater than 2 arguments" do - lambda { scope.function_delete([[], 'foo', 'bar']) }.should( raise_error(Puppet::ParseError)) - end - - it "should raise a TypeError if a number is passed as the first argument" do - lambda { scope.function_delete([1, 'bar']) }.should( raise_error(TypeError)) - end - - it "should delete all instances of an element from an array" do - result = scope.function_delete([['a','b','c','b'],'b']) - result.should(eq(['a','c'])) - end - - it "should delete all instances of a substring from a string" do - result = scope.function_delete(['foobarbabarz','bar']) - result.should(eq('foobaz')) - end - - it "should delete a key from a hash" do - result = scope.function_delete([{ 'a' => 1, 'b' => 2, 'c' => 3 },'b']) - result.should(eq({ 'a' => 1, 'c' => 3 })) - end - - it "should not change origin array passed as argument" do - origin_array = ['a','b','c','d'] - result = scope.function_delete([origin_array, 'b']) - origin_array.should(eq(['a','b','c','d'])) - end - - it "should not change the origin string passed as argument" do - origin_string = 'foobarbabarz' - result = scope.function_delete([origin_string,'bar']) - origin_string.should(eq('foobarbabarz')) - end - - it "should not change origin hash passed as argument" do - origin_hash = { 'a' => 1, 'b' => 2, 'c' => 3 } - result = scope.function_delete([origin_hash, 'b']) - origin_hash.should(eq({ 'a' => 1, 'b' => 2, 'c' => 3 })) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_undef_values_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_undef_values_spec.rb deleted file mode 100755 index b341d888ae..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_undef_values_spec.rb +++ /dev/null @@ -1,41 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the delete_undef_values function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("delete_undef_values").should == "function_delete_undef_values" - end - - it "should raise a ParseError if there is less than 1 argument" do - lambda { scope.function_delete_undef_values([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should raise a ParseError if the argument is not Array nor Hash" do - lambda { scope.function_delete_undef_values(['']) }.should( raise_error(Puppet::ParseError)) - lambda { scope.function_delete_undef_values([nil]) }.should( raise_error(Puppet::ParseError)) - end - - it "should delete all undef items from Array and only these" do - result = scope.function_delete_undef_values([['a',:undef,'c','undef']]) - result.should(eq(['a','c','undef'])) - end - - it "should delete all undef items from Hash and only these" do - result = scope.function_delete_undef_values([{'a'=>'A','b'=>:undef,'c'=>'C','d'=>'undef'}]) - result.should(eq({'a'=>'A','c'=>'C','d'=>'undef'})) - end - - it "should not change origin array passed as argument" do - origin_array = ['a',:undef,'c','undef'] - result = scope.function_delete_undef_values([origin_array]) - origin_array.should(eq(['a',:undef,'c','undef'])) - end - - it "should not change origin hash passed as argument" do - origin_hash = { 'a' => 1, 'b' => :undef, 'c' => 'undef' } - result = scope.function_delete_undef_values([origin_hash]) - origin_hash.should(eq({ 'a' => 1, 'b' => :undef, 'c' => 'undef' })) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_values_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_values_spec.rb deleted file mode 100755 index 8d7f2315d4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_values_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the delete_values function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("delete_values").should == "function_delete_values" - end - - it "should raise a ParseError if there are fewer than 2 arguments" do - lambda { scope.function_delete_values([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should raise a ParseError if there are greater than 2 arguments" do - lambda { scope.function_delete_values([[], 'foo', 'bar']) }.should( raise_error(Puppet::ParseError)) - end - - it "should raise a TypeError if the argument is not a hash" do - lambda { scope.function_delete_values([1,'bar']) }.should( raise_error(TypeError)) - lambda { scope.function_delete_values(['foo','bar']) }.should( raise_error(TypeError)) - lambda { scope.function_delete_values([[],'bar']) }.should( raise_error(TypeError)) - end - - it "should delete all instances of a value from a hash" do - result = scope.function_delete_values([{ 'a'=>'A', 'b'=>'B', 'B'=>'C', 'd'=>'B' },'B']) - result.should(eq({ 'a'=>'A', 'B'=>'C' })) - end - - it "should not change origin hash passed as argument" do - origin_hash = { 'a' => 1, 'b' => 2, 'c' => 3 } - result = scope.function_delete_values([origin_hash, 2]) - origin_hash.should(eq({ 'a' => 1, 'b' => 2, 'c' => 3 })) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/difference_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/difference_spec.rb deleted file mode 100755 index 9feff09189..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/difference_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the difference function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("difference").should == "function_difference" - end - - it "should raise a ParseError if there are fewer than 2 arguments" do - lambda { scope.function_difference([]) }.should( raise_error(Puppet::ParseError) ) - end - - it "should return the difference between two arrays" do - result = scope.function_difference([["a","b","c"],["b","c","d"]]) - result.should(eq(["a"])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/dirname_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/dirname_spec.rb deleted file mode 100755 index fb3b4feca7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/dirname_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the dirname function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("dirname").should == "function_dirname" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_dirname([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return dirname for an absolute path" do - result = scope.function_dirname(['/path/to/a/file.ext']) - result.should(eq('/path/to/a')) - end - - it "should return dirname for a relative path" do - result = scope.function_dirname(['path/to/a/file.ext']) - result.should(eq('path/to/a')) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/downcase_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/downcase_spec.rb deleted file mode 100755 index acef1f05d9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/downcase_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the downcase function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("downcase").should == "function_downcase" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_downcase([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should downcase a string" do - result = scope.function_downcase(["ASFD"]) - result.should(eq("asfd")) - end - - it "should do nothing to a string that is already downcase" do - result = scope.function_downcase(["asdf asdf"]) - result.should(eq("asdf asdf")) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/empty_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/empty_spec.rb deleted file mode 100755 index 7745875224..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/empty_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the empty function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - it "should exist" do - Puppet::Parser::Functions.function("empty").should == "function_empty" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_empty([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return a true for an empty string" do - result = scope.function_empty(['']) - result.should(eq(true)) - end - - it "should return a false for a non-empty string" do - result = scope.function_empty(['asdf']) - result.should(eq(false)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_packages_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_packages_spec.rb deleted file mode 100755 index 436be10bc4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_packages_spec.rb +++ /dev/null @@ -1,81 +0,0 @@ -#! /usr/bin/env ruby - -require 'spec_helper' -require 'rspec-puppet' -require 'puppet_spec/compiler' - -describe 'ensure_packages' do - include PuppetSpec::Compiler - - before :each do - Puppet::Parser::Functions.autoloader.loadall - Puppet::Parser::Functions.function(:ensure_packages) - Puppet::Parser::Functions.function(:ensure_resource) - Puppet::Parser::Functions.function(:defined_with_params) - Puppet::Parser::Functions.function(:create_resources) - end - - let :node do Puppet::Node.new('localhost') end - let :compiler do Puppet::Parser::Compiler.new(node) end - let :scope do - if Puppet.version.to_f >= 3.0 - Puppet::Parser::Scope.new(compiler) - else - newscope = Puppet::Parser::Scope.new - newscope.compiler = compiler - newscope.source = Puppet::Resource::Type.new(:node, :localhost) - newscope - end - end - - describe 'argument handling' do - it 'fails with no arguments' do - expect { - scope.function_ensure_packages([]) - }.to raise_error(Puppet::ParseError, /0 for 1 or 2/) - end - - it 'accepts an array of values' do - scope.function_ensure_packages([['foo']]) - end - - it 'accepts a single package name as a string' do - scope.function_ensure_packages(['foo']) - end - end - - context 'given a catalog with puppet package => absent' do - let :catalog do - compile_to_catalog(<<-EOS - ensure_packages(['facter']) - package { puppet: ensure => absent } - EOS - ) - end - - it 'has no effect on Package[puppet]' do - expect(catalog.resource(:package, 'puppet')['ensure']).to eq('absent') - end - end - - context 'given a clean catalog' do - let :catalog do - compile_to_catalog('ensure_packages(["facter"])') - end - - it 'declares package resources with ensure => present' do - expect(catalog.resource(:package, 'facter')['ensure']).to eq('present') - end - end - - context 'given a clean catalog and specified defaults' do - let :catalog do - compile_to_catalog('ensure_packages(["facter"], {"provider" => "gem"})') - end - - it 'declares package resources with ensure => present' do - expect(catalog.resource(:package, 'facter')['ensure']).to eq('present') - expect(catalog.resource(:package, 'facter')['provider']).to eq('gem') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_resource_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_resource_spec.rb deleted file mode 100755 index 33bcac0d1f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_resource_spec.rb +++ /dev/null @@ -1,113 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' -require 'rspec-puppet' -require 'puppet_spec/compiler' - -describe 'ensure_resource' do - include PuppetSpec::Compiler - - before :all do - Puppet::Parser::Functions.autoloader.loadall - Puppet::Parser::Functions.function(:ensure_packages) - end - - let :node do Puppet::Node.new('localhost') end - let :compiler do Puppet::Parser::Compiler.new(node) end - let :scope do Puppet::Parser::Scope.new(compiler) end - - describe 'when a type or title is not specified' do - it { expect { scope.function_ensure_resource([]) }.to raise_error } - it { expect { scope.function_ensure_resource(['type']) }.to raise_error } - end - - describe 'when compared against a resource with no attributes' do - let :catalog do - compile_to_catalog(<<-EOS - user { "dan": } - ensure_resource('user', 'dan', {}) - EOS - ) - end - - it 'should contain the the ensured resources' do - expect(catalog.resource(:user, 'dan').to_s).to eq('User[dan]') - end - end - - describe 'works when compared against a resource with non-conflicting attributes' do - [ - "ensure_resource('User', 'dan', {})", - "ensure_resource('User', 'dan', '')", - "ensure_resource('User', 'dan', {'ensure' => 'present'})", - "ensure_resource('User', 'dan', {'ensure' => 'present', 'managehome' => false})" - ].each do |ensure_resource| - pp = <<-EOS - user { "dan": ensure => present, shell => "/bin/csh", managehome => false} - #{ensure_resource} - EOS - - it { expect { compile_to_catalog(pp) }.to_not raise_error } - end - end - - describe 'fails when compared against a resource with conflicting attributes' do - pp = <<-EOS - user { "dan": ensure => present, shell => "/bin/csh", managehome => false} - ensure_resource('User', 'dan', {'ensure' => 'absent', 'managehome' => false}) - EOS - - it { expect { compile_to_catalog(pp) }.to raise_error } - end - - describe 'when an array of new resources are passed in' do - let :catalog do - compile_to_catalog("ensure_resource('User', ['dan', 'alex'], {})") - end - - it 'should contain the ensured resources' do - expect(catalog.resource('User[dan]').to_s).to eq('User[dan]') - expect(catalog.resource('User[alex]').to_s).to eq('User[alex]') - end - end - - describe 'when an array of existing resources is compared against existing resources' do - pp = <<-EOS - user { 'dan': ensure => present; 'alex': ensure => present } - ensure_resource('User', ['dan', 'alex'], {}) - EOS - - let :catalog do - compile_to_catalog(pp) - end - - it 'should return the existing resources' do - expect(catalog.resource('User[dan]').to_s).to eq('User[dan]') - expect(catalog.resource('User[alex]').to_s).to eq('User[alex]') - end - end - - describe 'works when compared against existing resources with attributes' do - [ - "ensure_resource('User', ['dan', 'alex'], {})", - "ensure_resource('User', ['dan', 'alex'], '')", - "ensure_resource('User', ['dan', 'alex'], {'ensure' => 'present'})", - ].each do |ensure_resource| - pp = <<-EOS - user { 'dan': ensure => present; 'alex': ensure => present } - #{ensure_resource} - EOS - - it { expect { compile_to_catalog(pp) }.to_not raise_error } - end - end - - describe 'fails when compared against existing resources with conflicting attributes' do - pp = <<-EOS - user { 'dan': ensure => present; 'alex': ensure => present } - ensure_resource('User', ['dan', 'alex'], {'ensure' => 'absent'}) - EOS - - it { expect { compile_to_catalog(pp) }.to raise_error } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/flatten_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/flatten_spec.rb deleted file mode 100755 index dba7a6bbdb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/flatten_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the flatten function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - it "should exist" do - Puppet::Parser::Functions.function("flatten").should == "function_flatten" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_flatten([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should raise a ParseError if there is more than 1 argument" do - lambda { scope.function_flatten([[], []]) }.should( raise_error(Puppet::ParseError)) - end - - it "should flatten a complex data structure" do - result = scope.function_flatten([["a","b",["c",["d","e"],"f","g"]]]) - result.should(eq(["a","b","c","d","e","f","g"])) - end - - it "should do nothing to a structure that is already flat" do - result = scope.function_flatten([["a","b","c","d"]]) - result.should(eq(["a","b","c","d"])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/floor_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/floor_spec.rb deleted file mode 100755 index dbc8c77358..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/floor_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe "the floor function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("floor").should == "function_floor" - end - - it "should raise a ParseError if there is less than 1 argument" do - lambda { scope.function_floor([]) }.should( raise_error(Puppet::ParseError, /Wrong number of arguments/)) - end - - it "should should raise a ParseError if input isn't numeric (eg. String)" do - lambda { scope.function_floor(["foo"]) }.should( raise_error(Puppet::ParseError, /Wrong argument type/)) - end - - it "should should raise a ParseError if input isn't numeric (eg. Boolean)" do - lambda { scope.function_floor([true]) }.should( raise_error(Puppet::ParseError, /Wrong argument type/)) - end - - it "should return an integer when a numeric type is passed" do - result = scope.function_floor([12.4]) - result.is_a?(Integer).should(eq(true)) - end - - it "should return the input when an integer is passed" do - result = scope.function_floor([7]) - result.should(eq(7)) - end - - it "should return the largest integer less than or equal to the input" do - result = scope.function_floor([3.8]) - result.should(eq(3)) - end -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/fqdn_rotate_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/fqdn_rotate_spec.rb deleted file mode 100755 index 2577723351..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/fqdn_rotate_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the fqdn_rotate function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("fqdn_rotate").should == "function_fqdn_rotate" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_fqdn_rotate([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should rotate a string and the result should be the same size" do - scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.1") - result = scope.function_fqdn_rotate(["asdf"]) - result.size.should(eq(4)) - end - - it "should rotate a string to give the same results for one host" do - scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.1").twice - scope.function_fqdn_rotate(["abcdefg"]).should eql(scope.function_fqdn_rotate(["abcdefg"])) - end - - it "should rotate a string to give different values on different hosts" do - scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.1") - val1 = scope.function_fqdn_rotate(["abcdefghijklmnopqrstuvwxyz01234567890987654321"]) - scope.expects(:lookupvar).with("::fqdn").returns("127.0.0.2") - val2 = scope.function_fqdn_rotate(["abcdefghijklmnopqrstuvwxyz01234567890987654321"]) - val1.should_not eql(val2) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/get_module_path_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/get_module_path_spec.rb deleted file mode 100755 index 486bef6f20..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/get_module_path_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:get_module_path) do - Internals = PuppetlabsSpec::PuppetInternals - class StubModule - attr_reader :path - def initialize(path) - @path = path - end - end - - def scope(environment = "production") - Internals.scope(:compiler => Internals.compiler(:node => Internals.node(:environment => environment))) - end - - it 'should only allow one argument' do - expect { scope.function_get_module_path([]) }.to raise_error(Puppet::ParseError, /Wrong number of arguments, expects one/) - expect { scope.function_get_module_path(['1','2','3']) }.to raise_error(Puppet::ParseError, /Wrong number of arguments, expects one/) - end - it 'should raise an exception when the module cannot be found' do - expect { scope.function_get_module_path(['foo']) }.to raise_error(Puppet::ParseError, /Could not find module/) - end - describe 'when locating a module' do - let(:modulepath) { "/tmp/does_not_exist" } - let(:path_of_module_foo) { StubModule.new("/tmp/does_not_exist/foo") } - - before(:each) { Puppet[:modulepath] = modulepath } - - it 'should be able to find module paths from the modulepath setting' do - Puppet::Module.expects(:find).with('foo', 'production').returns(path_of_module_foo) - scope.function_get_module_path(['foo']).should == path_of_module_foo.path - end - it 'should be able to find module paths when the modulepath is a list' do - Puppet[:modulepath] = modulepath + ":/tmp" - Puppet::Module.expects(:find).with('foo', 'production').returns(path_of_module_foo) - scope.function_get_module_path(['foo']).should == path_of_module_foo.path - end - it 'should respect the environment' do - pending("Disabled on Puppet 2.6.x") if Puppet.version =~ /^2\.6\b/ - Puppet.settings[:environment] = 'danstestenv' - Puppet::Module.expects(:find).with('foo', 'danstestenv').returns(path_of_module_foo) - scope('danstestenv').function_get_module_path(['foo']).should == path_of_module_foo.path - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/getparam_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/getparam_spec.rb deleted file mode 100755 index bf024af0e5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/getparam_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' -require 'rspec-puppet' -require 'puppet_spec/compiler' - -describe 'getparam' do - include PuppetSpec::Compiler - - before :each do - Puppet::Parser::Functions.autoloader.loadall - Puppet::Parser::Functions.function(:getparam) - end - - let :node do Puppet::Node.new('localhost') end - let :compiler do Puppet::Parser::Compiler.new(node) end - if Puppet.version.to_f >= 3.0 - let :scope do Puppet::Parser::Scope.new(compiler) end - else - let :scope do - newscope = Puppet::Parser::Scope.new - newscope.compiler = compiler - newscope.source = Puppet::Resource::Type.new(:node, :localhost) - newscope - end - end - - it "should exist" do - Puppet::Parser::Functions.function("getparam").should == "function_getparam" - end - - describe 'when a resource is not specified' do - it { expect { scope.function_getparam([]) }.to raise_error } - it { expect { scope.function_getparam(['User[dan]']) }.to raise_error } - it { expect { scope.function_getparam(['User[dan]']) }.to raise_error } - it { expect { scope.function_getparam(['User[dan]', {}]) }.to raise_error } - # This seems to be OK because we just check for a string. - it { expect { scope.function_getparam(['User[dan]', '']) }.to_not raise_error } - end - - describe 'when compared against a resource with no params' do - let :catalog do - compile_to_catalog(<<-EOS - user { "dan": } - EOS - ) - end - - it do - expect(scope.function_getparam(['User[dan]', 'shell'])).to eq('') - end - end - - describe 'when compared against a resource with params' do - let :catalog do - compile_to_catalog(<<-EOS - user { 'dan': ensure => present, shell => '/bin/sh', managehome => false} - $test = getparam(User[dan], 'shell') - EOS - ) - end - - it do - resource = Puppet::Parser::Resource.new(:user, 'dan', {:scope => scope}) - resource.set_parameter('ensure', 'present') - resource.set_parameter('shell', '/bin/sh') - resource.set_parameter('managehome', false) - compiler.add_resource(scope, resource) - - expect(scope.function_getparam(['User[dan]', 'shell'])).to eq('/bin/sh') - expect(scope.function_getparam(['User[dan]', ''])).to eq('') - expect(scope.function_getparam(['User[dan]', 'ensure'])).to eq('present') - # TODO: Expected this to be false, figure out why we're getting '' back. - expect(scope.function_getparam(['User[dan]', 'managehome'])).to eq('') - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/getvar_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/getvar_spec.rb deleted file mode 100755 index 5ff834ee71..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/getvar_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:getvar) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - describe 'when calling getvar from puppet' do - - it "should not compile when no arguments are passed" do - pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ - Puppet[:code] = '$foo = getvar()' - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /wrong number of arguments/) - end - - it "should not compile when too many arguments are passed" do - pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ - Puppet[:code] = '$foo = getvar("foo::bar", "baz")' - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /wrong number of arguments/) - end - - it "should lookup variables in other namespaces" do - pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ - Puppet[:code] = <<-'ENDofPUPPETcode' - class site::data { $foo = 'baz' } - include site::data - $foo = getvar("site::data::foo") - if $foo != 'baz' { - fail('getvar did not return what we expect') - } - ENDofPUPPETcode - scope.compiler.compile - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/grep_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/grep_spec.rb deleted file mode 100755 index a93b842537..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/grep_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the grep function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("grep").should == "function_grep" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_grep([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should grep contents from an array" do - result = scope.function_grep([["aaabbb","bbbccc","dddeee"], "bbb"]) - result.should(eq(["aaabbb","bbbccc"])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_interface_with_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_interface_with_spec.rb deleted file mode 100755 index c5264e4f30..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_interface_with_spec.rb +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/env ruby -S rspec -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:has_interface_with) do - - let(:scope) do - PuppetlabsSpec::PuppetInternals.scope - end - - # The subject of these examples is the method itself. - subject do - function_name = Puppet::Parser::Functions.function(:has_interface_with) - scope.method(function_name) - end - - # We need to mock out the Facts so we can specify how we expect this function - # to behave on different platforms. - context "On Mac OS X Systems" do - before :each do - scope.stubs(:lookupvar).with("interfaces").returns('lo0,gif0,stf0,en1,p2p0,fw0,en0,vmnet1,vmnet8,utun0') - end - it 'should have loopback (lo0)' do - subject.call(['lo0']).should be_true - end - it 'should not have loopback (lo)' do - subject.call(['lo']).should be_false - end - end - context "On Linux Systems" do - before :each do - scope.stubs(:lookupvar).with("interfaces").returns('eth0,lo') - scope.stubs(:lookupvar).with("ipaddress").returns('10.0.0.1') - scope.stubs(:lookupvar).with("ipaddress_lo").returns('127.0.0.1') - scope.stubs(:lookupvar).with("ipaddress_eth0").returns('10.0.0.1') - scope.stubs(:lookupvar).with('muppet').returns('kermit') - scope.stubs(:lookupvar).with('muppet_lo').returns('mspiggy') - scope.stubs(:lookupvar).with('muppet_eth0').returns('kermit') - end - it 'should have loopback (lo)' do - subject.call(['lo']).should be_true - end - it 'should not have loopback (lo0)' do - subject.call(['lo0']).should be_false - end - it 'should have ipaddress with 127.0.0.1' do - subject.call(['ipaddress', '127.0.0.1']).should be_true - end - it 'should have ipaddress with 10.0.0.1' do - subject.call(['ipaddress', '10.0.0.1']).should be_true - end - it 'should not have ipaddress with 10.0.0.2' do - subject.call(['ipaddress', '10.0.0.2']).should be_false - end - it 'should have muppet named kermit' do - subject.call(['muppet', 'kermit']).should be_true - end - it 'should have muppet named mspiggy' do - subject.call(['muppet', 'mspiggy']).should be_true - end - it 'should not have muppet named bigbird' do - subject.call(['muppet', 'bigbird']).should be_false - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_address_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_address_spec.rb deleted file mode 100755 index 5a68460820..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_address_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env ruby -S rspec -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:has_ip_address) do - - let(:scope) do - PuppetlabsSpec::PuppetInternals.scope - end - - subject do - function_name = Puppet::Parser::Functions.function(:has_ip_address) - scope.method(function_name) - end - - context "On Linux Systems" do - before :each do - scope.stubs(:lookupvar).with('interfaces').returns('eth0,lo') - scope.stubs(:lookupvar).with('ipaddress').returns('10.0.2.15') - scope.stubs(:lookupvar).with('ipaddress_eth0').returns('10.0.2.15') - scope.stubs(:lookupvar).with('ipaddress_lo').returns('127.0.0.1') - end - - it 'should have primary address (10.0.2.15)' do - subject.call(['10.0.2.15']).should be_true - end - - it 'should have lookupback address (127.0.0.1)' do - subject.call(['127.0.0.1']).should be_true - end - - it 'should not have other address' do - subject.call(['192.1681.1.1']).should be_false - end - - it 'should not have "mspiggy" on an interface' do - subject.call(['mspiggy']).should be_false - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_network_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_network_spec.rb deleted file mode 100755 index c3a289e372..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_network_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env ruby -S rspec -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:has_ip_network) do - - let(:scope) do - PuppetlabsSpec::PuppetInternals.scope - end - - subject do - function_name = Puppet::Parser::Functions.function(:has_ip_network) - scope.method(function_name) - end - - context "On Linux Systems" do - before :each do - scope.stubs(:lookupvar).with('interfaces').returns('eth0,lo') - scope.stubs(:lookupvar).with('network').returns(:undefined) - scope.stubs(:lookupvar).with('network_eth0').returns('10.0.2.0') - scope.stubs(:lookupvar).with('network_lo').returns('127.0.0.1') - end - - it 'should have primary network (10.0.2.0)' do - subject.call(['10.0.2.0']).should be_true - end - - it 'should have loopback network (127.0.0.0)' do - subject.call(['127.0.0.1']).should be_true - end - - it 'should not have other network' do - subject.call(['192.168.1.0']).should be_false - end - end -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_key_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_key_spec.rb deleted file mode 100755 index 490daeae7c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_key_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:has_key) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - describe 'when calling has_key from puppet' do - it "should not compile when no arguments are passed" do - pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ - Puppet[:code] = '$x = has_key()' - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /wrong number of arguments/) - end - - it "should not compile when 1 argument is passed" do - pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ - Puppet[:code] = "$x = has_key('foo')" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /wrong number of arguments/) - end - - it "should require the first value to be a Hash" do - pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ - Puppet[:code] = "$x = has_key('foo', 'bar')" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /expects the first argument to be a hash/) - end - end - - describe 'when calling the function has_key from a scope instance' do - it 'should detect existing keys' do - scope.function_has_key([{'one' => 1}, 'one']).should be_true - end - - it 'should detect existing keys' do - scope.function_has_key([{'one' => 1}, 'two']).should be_false - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/hash_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/hash_spec.rb deleted file mode 100755 index 7c91be9077..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/hash_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the hash function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("hash").should == "function_hash" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_hash([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should convert an array to a hash" do - result = scope.function_hash([['a',1,'b',2,'c',3]]) - result.should(eq({'a'=>1,'b'=>2,'c'=>3})) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/intersection_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/intersection_spec.rb deleted file mode 100755 index fd44f7fe3d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/intersection_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the intersection function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("intersection").should == "function_intersection" - end - - it "should raise a ParseError if there are fewer than 2 arguments" do - lambda { scope.function_intersection([]) }.should( raise_error(Puppet::ParseError) ) - end - - it "should return the intersection of two arrays" do - result = scope.function_intersection([["a","b","c"],["b","c","d"]]) - result.should(eq(["b","c"])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_array_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_array_spec.rb deleted file mode 100755 index e7f4bcd6df..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_array_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the is_array function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("is_array").should == "function_is_array" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_is_array([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return true if passed an array" do - result = scope.function_is_array([[1,2,3]]) - result.should(eq(true)) - end - - it "should return false if passed a hash" do - result = scope.function_is_array([{'a'=>1}]) - result.should(eq(false)) - end - - it "should return false if passed a string" do - result = scope.function_is_array(["asdf"]) - result.should(eq(false)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_bool_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_bool_spec.rb deleted file mode 100755 index c94e83a9d9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_bool_spec.rb +++ /dev/null @@ -1,44 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the is_bool function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("is_bool").should == "function_is_bool" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_is_bool([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return true if passed a TrueClass" do - result = scope.function_is_bool([true]) - result.should(eq(true)) - end - - it "should return true if passed a FalseClass" do - result = scope.function_is_bool([false]) - result.should(eq(true)) - end - - it "should return false if passed the string 'true'" do - result = scope.function_is_bool(['true']) - result.should(eq(false)) - end - - it "should return false if passed the string 'false'" do - result = scope.function_is_bool(['false']) - result.should(eq(false)) - end - - it "should return false if passed an array" do - result = scope.function_is_bool([["a","b"]]) - result.should(eq(false)) - end - - it "should return false if passed a hash" do - result = scope.function_is_bool([{"a" => "b"}]) - result.should(eq(false)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_domain_name_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_domain_name_spec.rb deleted file mode 100755 index f2ea76dac7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_domain_name_spec.rb +++ /dev/null @@ -1,64 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the is_domain_name function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("is_domain_name").should == "function_is_domain_name" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_is_domain_name([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return true if a valid short domain name" do - result = scope.function_is_domain_name(["x.com"]) - result.should(be_true) - end - - it "should return true if the domain is ." do - result = scope.function_is_domain_name(["."]) - result.should(be_true) - end - - it "should return true if the domain is x.com." do - result = scope.function_is_domain_name(["x.com."]) - result.should(be_true) - end - - it "should return true if a valid domain name" do - result = scope.function_is_domain_name(["foo.bar.com"]) - result.should(be_true) - end - - it "should allow domain parts to start with numbers" do - result = scope.function_is_domain_name(["3foo.2bar.com"]) - result.should(be_true) - end - - it "should allow domain to end with a dot" do - result = scope.function_is_domain_name(["3foo.2bar.com."]) - result.should(be_true) - end - - it "should allow a single part domain" do - result = scope.function_is_domain_name(["orange"]) - result.should(be_true) - end - - it "should return false if domain parts start with hyphens" do - result = scope.function_is_domain_name(["-3foo.2bar.com"]) - result.should(be_false) - end - - it "should return true if domain contains hyphens" do - result = scope.function_is_domain_name(["3foo-bar.2bar-fuzz.com"]) - result.should(be_true) - end - - it "should return false if domain name contains spaces" do - result = scope.function_is_domain_name(["not valid"]) - result.should(be_false) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_float_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_float_spec.rb deleted file mode 100755 index b7d73b04a2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_float_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the is_float function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("is_float").should == "function_is_float" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_is_float([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return true if a float" do - result = scope.function_is_float(["0.12"]) - result.should(eq(true)) - end - - it "should return false if a string" do - result = scope.function_is_float(["asdf"]) - result.should(eq(false)) - end - - it "should return false if an integer" do - result = scope.function_is_float(["3"]) - result.should(eq(false)) - end - it "should return true if a float is created from an arithmetical operation" do - result = scope.function_is_float([3.2*2]) - result.should(eq(true)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_function_available.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_function_available.rb deleted file mode 100755 index d5669a7583..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_function_available.rb +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the is_function_available function" do - before :all do - Puppet::Parser::Functions.autoloader.loadall - end - - before :each do - @scope = Puppet::Parser::Scope.new - end - - it "should exist" do - Puppet::Parser::Functions.function("is_function_available").should == "function_is_function_available" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { @scope.function_is_function_available([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return false if a nonexistent function is passed" do - result = @scope.function_is_function_available(['jeff_mccunes_left_sock']) - result.should(eq(false)) - end - - it "should return true if an available function is passed" do - result = @scope.function_is_function_available(['require']) - result.should(eq(true)) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_hash_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_hash_spec.rb deleted file mode 100755 index bbebf39f9c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_hash_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the is_hash function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("is_hash").should == "function_is_hash" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_is_hash([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return true if passed a hash" do - result = scope.function_is_hash([{"a"=>1,"b"=>2}]) - result.should(eq(true)) - end - - it "should return false if passed an array" do - result = scope.function_is_hash([["a","b"]]) - result.should(eq(false)) - end - - it "should return false if passed a string" do - result = scope.function_is_hash(["asdf"]) - result.should(eq(false)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_integer_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_integer_spec.rb deleted file mode 100755 index 24141cc7b7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_integer_spec.rb +++ /dev/null @@ -1,69 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the is_integer function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("is_integer").should == "function_is_integer" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_is_integer([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return true if an integer" do - result = scope.function_is_integer(["3"]) - result.should(eq(true)) - end - - it "should return true if a negative integer" do - result = scope.function_is_integer(["-7"]) - result.should(eq(true)) - end - - it "should return false if a float" do - result = scope.function_is_integer(["3.2"]) - result.should(eq(false)) - end - - it "should return false if a string" do - result = scope.function_is_integer(["asdf"]) - result.should(eq(false)) - end - - it "should return true if an integer is created from an arithmetical operation" do - result = scope.function_is_integer([3*2]) - result.should(eq(true)) - end - - it "should return false if an array" do - result = scope.function_is_numeric([["asdf"]]) - result.should(eq(false)) - end - - it "should return false if a hash" do - result = scope.function_is_numeric([{"asdf" => false}]) - result.should(eq(false)) - end - - it "should return false if a boolean" do - result = scope.function_is_numeric([true]) - result.should(eq(false)) - end - - it "should return false if a whitespace is in the string" do - result = scope.function_is_numeric([" -1324"]) - result.should(eq(false)) - end - - it "should return false if it is zero prefixed" do - result = scope.function_is_numeric(["0001234"]) - result.should(eq(false)) - end - - it "should return false if it is wrapped inside an array" do - result = scope.function_is_numeric([[1234]]) - result.should(eq(false)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_ip_address_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_ip_address_spec.rb deleted file mode 100755 index c0debb3d43..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_ip_address_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the is_ip_address function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("is_ip_address").should == "function_is_ip_address" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_is_ip_address([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return true if an IPv4 address" do - result = scope.function_is_ip_address(["1.2.3.4"]) - result.should(eq(true)) - end - - it "should return true if a full IPv6 address" do - result = scope.function_is_ip_address(["fe80:0000:cd12:d123:e2f8:47ff:fe09:dd74"]) - result.should(eq(true)) - end - - it "should return true if a compressed IPv6 address" do - result = scope.function_is_ip_address(["fe00::1"]) - result.should(eq(true)) - end - - it "should return false if not valid" do - result = scope.function_is_ip_address(["asdf"]) - result.should(eq(false)) - end - - it "should return false if IP octets out of range" do - result = scope.function_is_ip_address(["1.1.1.300"]) - result.should(eq(false)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_mac_address_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_mac_address_spec.rb deleted file mode 100755 index ca9c590476..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_mac_address_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the is_mac_address function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("is_mac_address").should == "function_is_mac_address" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_is_mac_address([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return true if a valid mac address" do - result = scope.function_is_mac_address(["00:a0:1f:12:7f:a0"]) - result.should(eq(true)) - end - - it "should return false if octets are out of range" do - result = scope.function_is_mac_address(["00:a0:1f:12:7f:g0"]) - result.should(eq(false)) - end - - it "should return false if not valid" do - result = scope.function_is_mac_address(["not valid"]) - result.should(eq(false)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_numeric_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_numeric_spec.rb deleted file mode 100755 index 1df1497871..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_numeric_spec.rb +++ /dev/null @@ -1,119 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the is_numeric function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("is_numeric").should == "function_is_numeric" - end - - it "should raise a ParseError if there is less than 1 argument" do - lambda { scope.function_is_numeric([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return true if an integer" do - result = scope.function_is_numeric(["3"]) - result.should(eq(true)) - end - - it "should return true if a float" do - result = scope.function_is_numeric(["3.2"]) - result.should(eq(true)) - end - - it "should return true if an integer is created from an arithmetical operation" do - result = scope.function_is_numeric([3*2]) - result.should(eq(true)) - end - - it "should return true if a float is created from an arithmetical operation" do - result = scope.function_is_numeric([3.2*2]) - result.should(eq(true)) - end - - it "should return false if a string" do - result = scope.function_is_numeric(["asdf"]) - result.should(eq(false)) - end - - it "should return false if an array" do - result = scope.function_is_numeric([["asdf"]]) - result.should(eq(false)) - end - - it "should return false if an array of integers" do - result = scope.function_is_numeric([[1,2,3,4]]) - result.should(eq(false)) - end - - it "should return false if a hash" do - result = scope.function_is_numeric([{"asdf" => false}]) - result.should(eq(false)) - end - - it "should return false if a hash with numbers in it" do - result = scope.function_is_numeric([{1 => 2}]) - result.should(eq(false)) - end - - it "should return false if a boolean" do - result = scope.function_is_numeric([true]) - result.should(eq(false)) - end - - it "should return true if a negative float with exponent" do - result = scope.function_is_numeric(["-342.2315e-12"]) - result.should(eq(true)) - end - - it "should return false if a negative integer with whitespaces before/after the dash" do - result = scope.function_is_numeric([" - 751"]) - result.should(eq(false)) - end - -# it "should return true if a hexadecimal" do -# result = scope.function_is_numeric(["0x52F8c"]) -# result.should(eq(true)) -# end -# -# it "should return true if a hexadecimal with uppercase 0X prefix" do -# result = scope.function_is_numeric(["0X52F8c"]) -# result.should(eq(true)) -# end -# -# it "should return false if a hexadecimal without a prefix" do -# result = scope.function_is_numeric(["52F8c"]) -# result.should(eq(false)) -# end -# -# it "should return true if a octal" do -# result = scope.function_is_numeric(["0751"]) -# result.should(eq(true)) -# end -# -# it "should return true if a negative hexadecimal" do -# result = scope.function_is_numeric(["-0x52F8c"]) -# result.should(eq(true)) -# end -# -# it "should return true if a negative octal" do -# result = scope.function_is_numeric(["-0751"]) -# result.should(eq(true)) -# end -# -# it "should return false if a negative octal with whitespaces before/after the dash" do -# result = scope.function_is_numeric([" - 0751"]) -# result.should(eq(false)) -# end -# -# it "should return false if a bad hexadecimal" do -# result = scope.function_is_numeric(["0x23d7g"]) -# result.should(eq(false)) -# end -# -# it "should return false if a bad octal" do -# result = scope.function_is_numeric(["0287"]) -# result.should(eq(false)) -# end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_string_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_string_spec.rb deleted file mode 100755 index 3756bea8b5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_string_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the is_string function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("is_string").should == "function_is_string" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_is_string([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return true if a string" do - result = scope.function_is_string(["asdf"]) - result.should(eq(true)) - end - - it "should return false if an integer" do - result = scope.function_is_string(["3"]) - result.should(eq(false)) - end - - it "should return false if a float" do - result = scope.function_is_string(["3.23"]) - result.should(eq(false)) - end - - it "should return false if an array" do - result = scope.function_is_string([["a","b","c"]]) - result.should(eq(false)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_keys_to_values_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_keys_to_values_spec.rb deleted file mode 100755 index a52fb719f2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_keys_to_values_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the join_keys_to_values function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("join_keys_to_values").should == "function_join_keys_to_values" - end - - it "should raise a ParseError if there are fewer than two arguments" do - lambda { scope.function_join_keys_to_values([{}]) }.should raise_error Puppet::ParseError - end - - it "should raise a ParseError if there are greater than two arguments" do - lambda { scope.function_join_keys_to_values([{}, 'foo', 'bar']) }.should raise_error Puppet::ParseError - end - - it "should raise a TypeError if the first argument is an array" do - lambda { scope.function_join_keys_to_values([[1,2], ',']) }.should raise_error TypeError - end - - it "should raise a TypeError if the second argument is an array" do - lambda { scope.function_join_keys_to_values([{}, [1,2]]) }.should raise_error TypeError - end - - it "should raise a TypeError if the second argument is a number" do - lambda { scope.function_join_keys_to_values([{}, 1]) }.should raise_error TypeError - end - - it "should return an empty array given an empty hash" do - result = scope.function_join_keys_to_values([{}, ":"]) - result.should == [] - end - - it "should join hash's keys to its values" do - result = scope.function_join_keys_to_values([{'a'=>1,2=>'foo',:b=>nil}, ":"]) - result.should =~ ['a:1','2:foo','b:'] - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_spec.rb deleted file mode 100755 index aafa1a7f76..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the join function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("join").should == "function_join" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_join([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should join an array into a string" do - result = scope.function_join([["a","b","c"], ":"]) - result.should(eq("a:b:c")) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/keys_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/keys_spec.rb deleted file mode 100755 index fdd7a7073e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/keys_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the keys function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("keys").should == "function_keys" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_keys([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return an array of keys when given a hash" do - result = scope.function_keys([{'a'=>1, 'b'=>2}]) - # =~ performs 'array with same elements' (set) matching - # For more info see RSpec::Matchers::MatchArray - result.should =~ ['a','b'] - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/loadyaml_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/loadyaml_spec.rb deleted file mode 100755 index fe16318267..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/loadyaml_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the loadyaml function" do - include PuppetlabsSpec::Files - - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("loadyaml").should == "function_loadyaml" - end - - it "should raise a ParseError if there is less than 1 arguments" do - expect { scope.function_loadyaml([]) }.to raise_error(Puppet::ParseError) - end - - it "should convert YAML file to a data structure" do - yaml_file = tmpfilename ('yamlfile') - File.open(yaml_file, 'w') do |fh| - fh.write("---\n aaa: 1\n bbb: 2\n ccc: 3\n ddd: 4\n") - end - result = scope.function_loadyaml([yaml_file]) - result.should == {"aaa" => 1, "bbb" => 2, "ccc" => 3, "ddd" => 4 } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/lstrip_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/lstrip_spec.rb deleted file mode 100755 index b280ae7ac1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/lstrip_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the lstrip function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("lstrip").should == "function_lstrip" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_lstrip([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should lstrip a string" do - result = scope.function_lstrip([" asdf"]) - result.should(eq('asdf')) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/max_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/max_spec.rb deleted file mode 100755 index ff6f2b361c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/max_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe "the max function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("max").should == "function_max" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_max([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should be able to compare strings" do - scope.function_max(["albatross","dog","horse"]).should(eq("horse")) - end - - it "should be able to compare numbers" do - scope.function_max([6,8,4]).should(eq(8)) - end - - it "should be able to compare a number with a stringified number" do - scope.function_max([1,"2"]).should(eq("2")) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/member_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/member_spec.rb deleted file mode 100755 index 6e9a023fa4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/member_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the member function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("member").should == "function_member" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_member([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return true if a member is in an array" do - result = scope.function_member([["a","b","c"], "a"]) - result.should(eq(true)) - end - - it "should return false if a member is not in an array" do - result = scope.function_member([["a","b","c"], "d"]) - result.should(eq(false)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/merge_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/merge_spec.rb deleted file mode 100755 index 15a5d94cf8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/merge_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:merge) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - describe 'when calling merge from puppet' do - it "should not compile when no arguments are passed" do - pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ - Puppet[:code] = '$x = merge()' - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /wrong number of arguments/) - end - - it "should not compile when 1 argument is passed" do - pending("Fails on 2.6.x, see bug #15912") if Puppet.version =~ /^2\.6\./ - Puppet[:code] = "$my_hash={'one' => 1}\n$x = merge($my_hash)" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /wrong number of arguments/) - end - end - - describe 'when calling merge on the scope instance' do - it 'should require all parameters are hashes' do - expect { new_hash = scope.function_merge([{}, '2'])}.to raise_error(Puppet::ParseError, /unexpected argument type String/) - expect { new_hash = scope.function_merge([{}, 2])}.to raise_error(Puppet::ParseError, /unexpected argument type Fixnum/) - end - - it 'should accept empty strings as puppet undef' do - expect { new_hash = scope.function_merge([{}, ''])}.not_to raise_error - end - - it 'should be able to merge two hashes' do - new_hash = scope.function_merge([{'one' => '1', 'two' => '1'}, {'two' => '2', 'three' => '2'}]) - new_hash['one'].should == '1' - new_hash['two'].should == '2' - new_hash['three'].should == '2' - end - - it 'should merge multiple hashes' do - hash = scope.function_merge([{'one' => 1}, {'one' => '2'}, {'one' => '3'}]) - hash['one'].should == '3' - end - - it 'should accept empty hashes' do - scope.function_merge([{},{},{}]).should == {} - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/min_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/min_spec.rb deleted file mode 100755 index 71d593ef09..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/min_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe "the min function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("min").should == "function_min" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_min([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should be able to compare strings" do - scope.function_min(["albatross","dog","horse"]).should(eq("albatross")) - end - - it "should be able to compare numbers" do - scope.function_min([6,8,4]).should(eq(4)) - end - - it "should be able to compare a number with a stringified number" do - scope.function_min([1,"2"]).should(eq(1)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/num2bool_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/num2bool_spec.rb deleted file mode 100755 index b56196d3c6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/num2bool_spec.rb +++ /dev/null @@ -1,67 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the num2bool function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("num2bool").should == "function_num2bool" - end - - it "should raise a ParseError if there are no arguments" do - lambda { scope.function_num2bool([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should raise a ParseError if there are more than 1 arguments" do - lambda { scope.function_num2bool(["foo","bar"]) }.should( raise_error(Puppet::ParseError)) - end - - it "should raise a ParseError if passed something non-numeric" do - lambda { scope.function_num2bool(["xyzzy"]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return true if passed string 1" do - result = scope.function_num2bool(["1"]) - result.should(be_true) - end - - it "should return true if passed string 1.5" do - result = scope.function_num2bool(["1.5"]) - result.should(be_true) - end - - it "should return true if passed number 1" do - result = scope.function_num2bool([1]) - result.should(be_true) - end - - it "should return false if passed string 0" do - result = scope.function_num2bool(["0"]) - result.should(be_false) - end - - it "should return false if passed number 0" do - result = scope.function_num2bool([0]) - result.should(be_false) - end - - it "should return false if passed string -1" do - result = scope.function_num2bool(["-1"]) - result.should(be_false) - end - - it "should return false if passed string -1.5" do - result = scope.function_num2bool(["-1.5"]) - result.should(be_false) - end - - it "should return false if passed number -1" do - result = scope.function_num2bool([-1]) - result.should(be_false) - end - - it "should return false if passed float -1.5" do - result = scope.function_num2bool([-1.5]) - result.should(be_false) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/parsejson_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/parsejson_spec.rb deleted file mode 100755 index f179ac111a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/parsejson_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the parsejson function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("parsejson").should == "function_parsejson" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_parsejson([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should convert JSON to a data structure" do - json = <<-EOS -["aaa","bbb","ccc"] -EOS - result = scope.function_parsejson([json]) - result.should(eq(['aaa','bbb','ccc'])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/parseyaml_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/parseyaml_spec.rb deleted file mode 100755 index 0c7aea8a5a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/parseyaml_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the parseyaml function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("parseyaml").should == "function_parseyaml" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_parseyaml([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should convert YAML to a data structure" do - yaml = <<-EOS -- aaa -- bbb -- ccc -EOS - result = scope.function_parseyaml([yaml]) - result.should(eq(['aaa','bbb','ccc'])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_default_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_default_spec.rb deleted file mode 100755 index c9235b5346..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_default_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the pick_default function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("pick_default").should == "function_pick_default" - end - - it 'should return the correct value' do - scope.function_pick_default(['first', 'second']).should == 'first' - end - - it 'should return the correct value if the first value is empty' do - scope.function_pick_default(['', 'second']).should == 'second' - end - - it 'should skip empty string values' do - scope.function_pick_default(['', 'first']).should == 'first' - end - - it 'should skip :undef values' do - scope.function_pick_default([:undef, 'first']).should == 'first' - end - - it 'should skip :undefined values' do - scope.function_pick_default([:undefined, 'first']).should == 'first' - end - - it 'should return the empty string if it is the last possibility' do - scope.function_pick_default([:undef, :undefined, '']).should == '' - end - - it 'should return :undef if it is the last possibility' do - scope.function_pick_default(['', :undefined, :undef]).should == :undef - end - - it 'should return :undefined if it is the last possibility' do - scope.function_pick_default([:undef, '', :undefined]).should == :undefined - end - - it 'should return the empty string if it is the only possibility' do - scope.function_pick_default(['']).should == '' - end - - it 'should return :undef if it is the only possibility' do - scope.function_pick_default([:undef]).should == :undef - end - - it 'should return :undefined if it is the only possibility' do - scope.function_pick_default([:undefined]).should == :undefined - end - - it 'should error if no values are passed' do - expect { scope.function_pick_default([]) }.to raise_error(Puppet::Error, /Must receive at least one argument./) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_spec.rb deleted file mode 100755 index f53fa80005..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the pick function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("pick").should == "function_pick" - end - - it 'should return the correct value' do - scope.function_pick(['first', 'second']).should == 'first' - end - - it 'should return the correct value if the first value is empty' do - scope.function_pick(['', 'second']).should == 'second' - end - - it 'should remove empty string values' do - scope.function_pick(['', 'first']).should == 'first' - end - - it 'should remove :undef values' do - scope.function_pick([:undef, 'first']).should == 'first' - end - - it 'should remove :undefined values' do - scope.function_pick([:undefined, 'first']).should == 'first' - end - - it 'should error if no values are passed' do - expect { scope.function_pick([]) }.to( raise_error(Puppet::ParseError, "pick(): must receive at least one non empty value")) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/prefix_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/prefix_spec.rb deleted file mode 100755 index 6e8ddc58ee..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/prefix_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the prefix function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "raises a ParseError if there is less than 1 arguments" do - expect { scope.function_prefix([]) }.to raise_error(Puppet::ParseError, /number of arguments/) - end - - it "raises an error if the first argument is not an array" do - expect { - scope.function_prefix([Object.new]) - }.to raise_error(Puppet::ParseError, /expected first argument to be an Array/) - end - - - it "raises an error if the second argument is not a string" do - expect { - scope.function_prefix([['first', 'second'], 42]) - }.to raise_error(Puppet::ParseError, /expected second argument to be a String/) - end - - it "returns a prefixed array" do - result = scope.function_prefix([['a','b','c'], 'p']) - result.should(eq(['pa','pb','pc'])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/range_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/range_spec.rb deleted file mode 100755 index 0e1ad376f6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/range_spec.rb +++ /dev/null @@ -1,70 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the range function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "exists" do - Puppet::Parser::Functions.function("range").should == "function_range" - end - - it "raises a ParseError if there is less than 1 arguments" do - expect { scope.function_range([]) }.to raise_error Puppet::ParseError, /Wrong number of arguments.*0 for 1/ - end - - describe 'with a letter range' do - it "returns a letter range" do - result = scope.function_range(["a","d"]) - result.should eq ['a','b','c','d'] - end - - it "returns a letter range given a step of 1" do - result = scope.function_range(["a","d","1"]) - result.should eq ['a','b','c','d'] - end - - it "returns a stepped letter range" do - result = scope.function_range(["a","d","2"]) - result.should eq ['a','c'] - end - - it "returns a stepped letter range given a negative step" do - result = scope.function_range(["a","d","-2"]) - result.should eq ['a','c'] - end - end - - describe 'with a number range' do - it "returns a number range" do - result = scope.function_range(["1","4"]) - result.should eq [1,2,3,4] - end - - it "returns a number range given a step of 1" do - result = scope.function_range(["1","4","1"]) - result.should eq [1,2,3,4] - end - - it "returns a stepped number range" do - result = scope.function_range(["1","4","2"]) - result.should eq [1,3] - end - - it "returns a stepped number range given a negative step" do - result = scope.function_range(["1","4","-2"]) - result.should eq [1,3] - end - end - - describe 'with a numeric-like string range' do - it "works with padded hostname like strings" do - expected = ("host01".."host10").to_a - scope.function_range(["host01","host10"]).should eq expected - end - - it "coerces zero padded digits to integers" do - expected = (0..10).to_a - scope.function_range(["00", "10"]).should eq expected - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/reject_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/reject_spec.rb deleted file mode 100755 index f2cb741935..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/reject_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env ruby - -require 'spec_helper' - -describe "the reject function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("reject").should == "function_reject" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_reject([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should reject contents from an array" do - result = scope.function_reject([["1111", "aaabbb","bbbccc","dddeee"], "bbb"]) - result.should(eq(["1111", "dddeee"])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/reverse_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/reverse_spec.rb deleted file mode 100755 index 1b59206547..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/reverse_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the reverse function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("reverse").should == "function_reverse" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_reverse([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should reverse a string" do - result = scope.function_reverse(["asdfghijkl"]) - result.should(eq('lkjihgfdsa')) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/rstrip_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/rstrip_spec.rb deleted file mode 100755 index d90de1d060..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/rstrip_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the rstrip function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("rstrip").should == "function_rstrip" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_rstrip([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should rstrip a string" do - result = scope.function_rstrip(["asdf "]) - result.should(eq('asdf')) - end - - it "should rstrip each element in an array" do - result = scope.function_rstrip([["a ","b ", "c "]]) - result.should(eq(['a','b','c'])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/shuffle_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/shuffle_spec.rb deleted file mode 100755 index 93346d5370..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/shuffle_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the shuffle function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("shuffle").should == "function_shuffle" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_shuffle([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should shuffle a string and the result should be the same size" do - result = scope.function_shuffle(["asdf"]) - result.size.should(eq(4)) - end - - it "should shuffle a string but the sorted contents should still be the same" do - result = scope.function_shuffle(["adfs"]) - result.split("").sort.join("").should(eq("adfs")) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/size_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/size_spec.rb deleted file mode 100755 index b1c435a302..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/size_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the size function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("size").should == "function_size" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_size([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return the size of a string" do - result = scope.function_size(["asdf"]) - result.should(eq(4)) - end - - it "should return the size of an array" do - result = scope.function_size([["a","b","c"]]) - result.should(eq(3)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/sort_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/sort_spec.rb deleted file mode 100755 index 3187a5aecb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/sort_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the sort function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("sort").should == "function_sort" - end - - it "should raise a ParseError if there is not 1 arguments" do - lambda { scope.function_sort(['','']) }.should( raise_error(Puppet::ParseError)) - end - - it "should sort an array" do - result = scope.function_sort([["a","c","b"]]) - result.should(eq(['a','b','c'])) - end - - it "should sort a string" do - result = scope.function_sort(["acb"]) - result.should(eq('abc')) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/squeeze_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/squeeze_spec.rb deleted file mode 100755 index 60e5a3028d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/squeeze_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the squeeze function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("squeeze").should == "function_squeeze" - end - - it "should raise a ParseError if there is less than 2 arguments" do - lambda { scope.function_squeeze([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should squeeze a string" do - result = scope.function_squeeze(["aaabbbbcccc"]) - result.should(eq('abc')) - end - - it "should squeeze all elements in an array" do - result = scope.function_squeeze([["aaabbbbcccc","dddfff"]]) - result.should(eq(['abc','df'])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2bool_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2bool_spec.rb deleted file mode 100755 index 73c09c7292..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2bool_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the str2bool function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("str2bool").should == "function_str2bool" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_str2bool([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should convert string 'true' to true" do - result = scope.function_str2bool(["true"]) - result.should(eq(true)) - end - - it "should convert string 'undef' to false" do - result = scope.function_str2bool(["undef"]) - result.should(eq(false)) - end - - it "should return the boolean it was called with" do - result = scope.function_str2bool([true]) - result.should(eq(true)) - result = scope.function_str2bool([false]) - result.should(eq(false)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2saltedsha512_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2saltedsha512_spec.rb deleted file mode 100755 index df8fb8e905..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2saltedsha512_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the str2saltedsha512 function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("str2saltedsha512").should == "function_str2saltedsha512" - end - - it "should raise a ParseError if there is less than 1 argument" do - expect { scope.function_str2saltedsha512([]) }.to( raise_error(Puppet::ParseError) ) - end - - it "should raise a ParseError if there is more than 1 argument" do - expect { scope.function_str2saltedsha512(['foo', 'bar', 'baz']) }.to( raise_error(Puppet::ParseError) ) - end - - it "should return a salted-sha512 password hash 136 characters in length" do - result = scope.function_str2saltedsha512(["password"]) - result.length.should(eq(136)) - end - - it "should raise an error if you pass a non-string password" do - expect { scope.function_str2saltedsha512([1234]) }.to( raise_error(Puppet::ParseError) ) - end - - it "should generate a valid password" do - # Allow the function to generate a password based on the string 'password' - password_hash = scope.function_str2saltedsha512(["password"]) - - # Separate the Salt and Password from the Password Hash - salt = password_hash[0..7] - password = password_hash[8..-1] - - # Convert the Salt and Password from Hex to Binary Data - str_salt = Array(salt.lines).pack('H*') - str_password = Array(password.lines).pack('H*') - - # Combine the Binary Salt with 'password' and compare the end result - saltedpass = Digest::SHA512.digest(str_salt + 'password') - result = (str_salt + saltedpass).unpack('H*')[0] - result.should == password_hash - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/strftime_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/strftime_spec.rb deleted file mode 100755 index df42b6f26b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/strftime_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the strftime function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("strftime").should == "function_strftime" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_strftime([]) }.should( raise_error(Puppet::ParseError)) - end - - it "using %s should be higher then when I wrote this test" do - result = scope.function_strftime(["%s"]) - result.to_i.should(be > 1311953157) - end - - it "using %s should be lower then 1.5 trillion" do - result = scope.function_strftime(["%s"]) - result.to_i.should(be < 1500000000) - end - - it "should return a date when given %Y-%m-%d" do - result = scope.function_strftime(["%Y-%m-%d"]) - result.should =~ /^\d{4}-\d{2}-\d{2}$/ - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/strip_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/strip_spec.rb deleted file mode 100755 index fccdd26067..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/strip_spec.rb +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the strip function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - it "should exist" do - Puppet::Parser::Functions.function("strip").should == "function_strip" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_strip([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should strip a string" do - result = scope.function_strip([" ab cd "]) - result.should(eq('ab cd')) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/suffix_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/suffix_spec.rb deleted file mode 100755 index 89ba3b8230..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/suffix_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the suffix function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "raises a ParseError if there is less than 1 arguments" do - expect { scope.function_suffix([]) }.to raise_error(Puppet::ParseError, /number of arguments/) - end - - it "raises an error if the first argument is not an array" do - expect { - scope.function_suffix([Object.new]) - }.to raise_error(Puppet::ParseError, /expected first argument to be an Array/) - end - - it "raises an error if the second argument is not a string" do - expect { - scope.function_suffix([['first', 'second'], 42]) - }.to raise_error(Puppet::ParseError, /expected second argument to be a String/) - end - - it "returns a suffixed array" do - result = scope.function_suffix([['a','b','c'], 'p']) - result.should(eq(['ap','bp','cp'])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/swapcase_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/swapcase_spec.rb deleted file mode 100755 index 808b415876..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/swapcase_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the swapcase function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("swapcase").should == "function_swapcase" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_swapcase([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should swapcase a string" do - result = scope.function_swapcase(["aaBBccDD"]) - result.should(eq('AAbbCCdd')) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/time_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/time_spec.rb deleted file mode 100755 index e9fb76e6ac..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/time_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the time function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("time").should == "function_time" - end - - it "should raise a ParseError if there is more than 2 arguments" do - lambda { scope.function_time(['','']) }.should( raise_error(Puppet::ParseError)) - end - - it "should return a number" do - result = scope.function_time([]) - result.should be_an(Integer) - end - - it "should be higher then when I wrote this test" do - result = scope.function_time([]) - result.should(be > 1311953157) - end - - it "should be lower then 1.5 trillion" do - result = scope.function_time([]) - result.should(be < 1500000000) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/to_bytes_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/to_bytes_spec.rb deleted file mode 100755 index d1ea4c80cc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/to_bytes_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe "the to_bytes function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("to_bytes").should == "function_to_bytes" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_to_bytes([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should convert kB to B" do - result = scope.function_to_bytes(["4 kB"]) - result.should(eq(4096)) - end - - it "should work without B in unit" do - result = scope.function_to_bytes(["4 k"]) - result.should(eq(4096)) - end - - it "should work without a space before unit" do - result = scope.function_to_bytes(["4k"]) - result.should(eq(4096)) - end - - it "should work without a unit" do - result = scope.function_to_bytes(["5678"]) - result.should(eq(5678)) - end - - it "should convert fractions" do - result = scope.function_to_bytes(["1.5 kB"]) - result.should(eq(1536)) - end - - it "should convert scientific notation" do - result = scope.function_to_bytes(["1.5e2 B"]) - result.should(eq(150)) - end - - it "should do nothing with a positive number" do - result = scope.function_to_bytes([5678]) - result.should(eq(5678)) - end - - it "should should raise a ParseError if input isn't a number" do - lambda { scope.function_to_bytes(["foo"]) }.should( raise_error(Puppet::ParseError)) - end - - it "should should raise a ParseError if prefix is unknown" do - lambda { scope.function_to_bytes(["5 uB"]) }.should( raise_error(Puppet::ParseError)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/type_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/type_spec.rb deleted file mode 100755 index 8fec88f266..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/type_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the type function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - it "should exist" do - Puppet::Parser::Functions.function("type").should == "function_type" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_type([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return string when given a string" do - result = scope.function_type(["aaabbbbcccc"]) - result.should(eq('string')) - end - - it "should return array when given an array" do - result = scope.function_type([["aaabbbbcccc","asdf"]]) - result.should(eq('array')) - end - - it "should return hash when given a hash" do - result = scope.function_type([{"a"=>1,"b"=>2}]) - result.should(eq('hash')) - end - - it "should return integer when given an integer" do - result = scope.function_type(["1"]) - result.should(eq('integer')) - end - - it "should return float when given a float" do - result = scope.function_type(["1.34"]) - result.should(eq('float')) - end - - it "should return boolean when given a boolean" do - result = scope.function_type([true]) - result.should(eq('boolean')) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/union_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/union_spec.rb deleted file mode 100755 index 0d282caa65..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/union_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the union function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("union").should == "function_union" - end - - it "should raise a ParseError if there are fewer than 2 arguments" do - lambda { scope.function_union([]) }.should( raise_error(Puppet::ParseError) ) - end - - it "should join two arrays together" do - result = scope.function_union([["a","b","c"],["b","c","d"]]) - result.should(eq(["a","b","c","d"])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/unique_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/unique_spec.rb deleted file mode 100755 index 5d48d49b72..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/unique_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the unique function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("unique").should == "function_unique" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_unique([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should remove duplicate elements in a string" do - result = scope.function_unique(["aabbc"]) - result.should(eq('abc')) - end - - it "should remove duplicate elements in an array" do - result = scope.function_unique([["a","a","b","b","c"]]) - result.should(eq(['a','b','c'])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/upcase_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/upcase_spec.rb deleted file mode 100755 index 5db55138a6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/upcase_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the upcase function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("upcase").should == "function_upcase" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_upcase([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should upcase a string" do - result = scope.function_upcase(["abc"]) - result.should(eq('ABC')) - end - - it "should do nothing if a string is already upcase" do - result = scope.function_upcase(["ABC"]) - result.should(eq('ABC')) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/uriescape_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/uriescape_spec.rb deleted file mode 100755 index 7211c88783..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/uriescape_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the uriescape function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("uriescape").should == "function_uriescape" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_uriescape([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should uriescape a string" do - result = scope.function_uriescape([":/?#[]@!$&'()*+,;= \"{}"]) - result.should(eq(':/?%23[]@!$&\'()*+,;=%20%22%7B%7D')) - end - - it "should do nothing if a string is already safe" do - result = scope.function_uriescape(["ABCdef"]) - result.should(eq('ABCdef')) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_absolute_path_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_absolute_path_spec.rb deleted file mode 100755 index 342ae84825..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_absolute_path_spec.rb +++ /dev/null @@ -1,84 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:validate_absolute_path) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - # The subject of these examples is the method itself. - subject do - # This makes sure the function is loaded within each test - function_name = Puppet::Parser::Functions.function(:validate_absolute_path) - scope.method(function_name) - end - - describe "Valid Paths" do - def self.valid_paths - %w{ - C:/ - C:\\ - C:\\WINDOWS\\System32 - C:/windows/system32 - X:/foo/bar - X:\\foo\\bar - /var/tmp - /var/lib/puppet - /var/opt/../lib/puppet - } - end - - context "Without Puppet::Util.absolute_path? (e.g. Puppet <= 2.6)" do - before :each do - # The intent here is to mock Puppet to behave like Puppet 2.6 does. - # Puppet 2.6 does not have the absolute_path? method. This is only a - # convenience test, stdlib should be run with the Puppet 2.6.x in the - # $LOAD_PATH in addition to 2.7.x and master. - Puppet::Util.expects(:respond_to?).with(:absolute_path?).returns(false) - end - valid_paths.each do |path| - it "validate_absolute_path(#{path.inspect}) should not fail" do - expect { subject.call [path] }.not_to raise_error - end - end - end - - context "Puppet without mocking" do - valid_paths.each do |path| - it "validate_absolute_path(#{path.inspect}) should not fail" do - expect { subject.call [path] }.not_to raise_error - end - end - end - end - - describe 'Invalid paths' do - context 'Garbage inputs' do - [ - nil, - [ nil ], - { 'foo' => 'bar' }, - { }, - '', - ].each do |path| - it "validate_absolute_path(#{path.inspect}) should fail" do - expect { subject.call [path] }.to raise_error Puppet::ParseError - end - end - end - - context 'Relative paths' do - %w{ - relative1 - . - .. - ./foo - ../foo - etc/puppetlabs/puppet - opt/puppet/bin - }.each do |path| - it "validate_absolute_path(#{path.inspect}) should fail" do - expect { subject.call [path] }.to raise_error Puppet::ParseError - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_array_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_array_spec.rb deleted file mode 100755 index 4b31cfde42..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_array_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:validate_array) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - describe 'when calling validate_array from puppet' do - - %w{ true false }.each do |the_string| - it "should not compile when #{the_string} is a string" do - Puppet[:code] = "validate_array('#{the_string}')" - expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not an Array/) - end - - it "should not compile when #{the_string} is a bare word" do - Puppet[:code] = "validate_array(#{the_string})" - expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not an Array/) - end - end - - it "should compile when multiple array arguments are passed" do - Puppet[:code] = <<-'ENDofPUPPETcode' - $foo = [ ] - $bar = [ 'one', 'two' ] - validate_array($foo, $bar) - ENDofPUPPETcode - scope.compiler.compile - end - - it "should not compile when an undef variable is passed" do - Puppet[:code] = <<-'ENDofPUPPETcode' - $foo = undef - validate_array($foo) - ENDofPUPPETcode - expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not an Array/) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_augeas_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_augeas_spec.rb deleted file mode 100755 index c695ba2eb7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_augeas_spec.rb +++ /dev/null @@ -1,103 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:validate_augeas), :if => Puppet.features.augeas? do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - # The subject of these examplres is the method itself. - subject do - # This makes sure the function is loaded within each test - function_name = Puppet::Parser::Functions.function(:validate_augeas) - scope.method(function_name) - end - - context 'Using Puppet::Parser::Scope.new' do - - describe 'Garbage inputs' do - inputs = [ - [ nil ], - [ [ nil ] ], - [ { 'foo' => 'bar' } ], - [ { } ], - [ '' ], - [ "one", "one", "MSG to User", "4th arg" ], - ] - - inputs.each do |input| - it "validate_augeas(#{input.inspect}) should fail" do - expect { subject.call [input] }.to raise_error Puppet::ParseError - end - end - end - - describe 'Valid inputs' do - inputs = [ - [ "root:x:0:0:root:/root:/bin/bash\n", 'Passwd.lns' ], - [ "proc /proc proc nodev,noexec,nosuid 0 0\n", 'Fstab.lns'], - ] - - inputs.each do |input| - it "validate_augeas(#{input.inspect}) should not fail" do - expect { subject.call input }.not_to raise_error - end - end - end - - describe "Valid inputs which should raise an exception without a message" do - # The intent here is to make sure valid inputs raise exceptions when they - # don't specify an error message to display. This is the behvior in - # 2.2.x and prior. - inputs = [ - [ "root:x:0:0:root\n", 'Passwd.lns' ], - [ "127.0.1.1\n", 'Hosts.lns' ], - ] - - inputs.each do |input| - it "validate_augeas(#{input.inspect}) should fail" do - expect { subject.call input }.to raise_error /validate_augeas.*?matched less than it should/ - end - end - end - - describe "Nicer Error Messages" do - # The intent here is to make sure the function returns the 3rd argument - # in the exception thrown - inputs = [ - [ "root:x:0:0:root\n", 'Passwd.lns', [], 'Failed to validate passwd content' ], - [ "127.0.1.1\n", 'Hosts.lns', [], 'Wrong hosts content' ], - ] - - inputs.each do |input| - it "validate_augeas(#{input.inspect}) should fail" do - expect { subject.call input }.to raise_error /#{input[2]}/ - end - end - end - - describe "Passing simple unit tests" do - inputs = [ - [ "root:x:0:0:root:/root:/bin/bash\n", 'Passwd.lns', ['$file/foobar']], - [ "root:x:0:0:root:/root:/bin/bash\n", 'Passwd.lns', ['$file/root/shell[.="/bin/sh"]', 'foobar']], - ] - - inputs.each do |input| - it "validate_augeas(#{input.inspect}) should fail" do - expect { subject.call input }.not_to raise_error - end - end - end - - describe "Failing simple unit tests" do - inputs = [ - [ "foobar:x:0:0:root:/root:/bin/bash\n", 'Passwd.lns', ['$file/foobar']], - [ "root:x:0:0:root:/root:/bin/sh\n", 'Passwd.lns', ['$file/root/shell[.="/bin/sh"]', 'foobar']], - ] - - inputs.each do |input| - it "validate_augeas(#{input.inspect}) should fail" do - expect { subject.call input }.to raise_error /testing path/ - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_bool_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_bool_spec.rb deleted file mode 100755 index a352d3b550..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_bool_spec.rb +++ /dev/null @@ -1,51 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:validate_bool) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - describe 'when calling validate_bool from puppet' do - - %w{ true false }.each do |the_string| - - it "should not compile when #{the_string} is a string" do - Puppet[:code] = "validate_bool('#{the_string}')" - expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a boolean/) - end - - it "should compile when #{the_string} is a bare word" do - Puppet[:code] = "validate_bool(#{the_string})" - scope.compiler.compile - end - - end - - it "should not compile when an arbitrary string is passed" do - Puppet[:code] = 'validate_bool("jeff and dan are awesome")' - expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a boolean/) - end - - it "should not compile when no arguments are passed" do - Puppet[:code] = 'validate_bool()' - expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /wrong number of arguments/) - end - - it "should compile when multiple boolean arguments are passed" do - Puppet[:code] = <<-'ENDofPUPPETcode' - $foo = true - $bar = false - validate_bool($foo, $bar, true, false) - ENDofPUPPETcode - scope.compiler.compile - end - - it "should compile when multiple boolean arguments are passed" do - Puppet[:code] = <<-'ENDofPUPPETcode' - $foo = true - $bar = false - validate_bool($foo, $bar, true, false, 'jeff') - ENDofPUPPETcode - expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a boolean/) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_cmd_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_cmd_spec.rb deleted file mode 100755 index a6e68df210..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_cmd_spec.rb +++ /dev/null @@ -1,48 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -TESTEXE = File.exists?('/usr/bin/test') ? '/usr/bin/test' : '/bin/test' -TOUCHEXE = File.exists?('/usr/bin/touch') ? '/usr/bin/touch' : '/bin/touch' - -describe Puppet::Parser::Functions.function(:validate_cmd) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - subject do - function_name = Puppet::Parser::Functions.function(:validate_cmd) - scope.method(function_name) - end - - describe "with an explicit failure message" do - it "prints the failure message on error" do - expect { - subject.call ['', '/bin/false', 'failure message!'] - }.to raise_error Puppet::ParseError, /failure message!/ - end - end - - describe "on validation failure" do - it "includes the command error output" do - expect { - subject.call ['', "#{TOUCHEXE} /cant/touch/this"] - }.to raise_error Puppet::ParseError, /(cannot touch|o such file or)/ - end - - it "includes the command return value" do - expect { - subject.call ['', '/cant/run/this'] - }.to raise_error Puppet::ParseError, /returned 1\b/ - end - end - - describe "when performing actual validation" do - it "can positively validate file content" do - expect { subject.call ["non-empty", "#{TESTEXE} -s"] }.to_not raise_error - end - - it "can negatively validate file content" do - expect { - subject.call ["", "#{TESTEXE} -s"] - }.to raise_error Puppet::ParseError, /failed to validate.*test -s/ - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_hash_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_hash_spec.rb deleted file mode 100755 index a0c35c2304..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_hash_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:validate_hash) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - describe 'when calling validate_hash from puppet' do - - %w{ true false }.each do |the_string| - - it "should not compile when #{the_string} is a string" do - Puppet[:code] = "validate_hash('#{the_string}')" - expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a Hash/) - end - - it "should not compile when #{the_string} is a bare word" do - Puppet[:code] = "validate_hash(#{the_string})" - expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a Hash/) - end - - end - - it "should compile when multiple hash arguments are passed" do - Puppet[:code] = <<-'ENDofPUPPETcode' - $foo = {} - $bar = { 'one' => 'two' } - validate_hash($foo, $bar) - ENDofPUPPETcode - scope.compiler.compile - end - - it "should not compile when an undef variable is passed" do - Puppet[:code] = <<-'ENDofPUPPETcode' - $foo = undef - validate_hash($foo) - ENDofPUPPETcode - expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a Hash/) - end - - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv4_address_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv4_address_spec.rb deleted file mode 100755 index 45401a4232..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv4_address_spec.rb +++ /dev/null @@ -1,64 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require "spec_helper" - -describe Puppet::Parser::Functions.function(:validate_ipv4_address) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - describe "when calling validate_ipv4_address from puppet" do - describe "when given IPv4 address strings" do - it "should compile with one argument" do - Puppet[:code] = "validate_ipv4_address('1.2.3.4')" - scope.compiler.compile - end - - it "should compile with multiple arguments" do - Puppet[:code] = "validate_ipv4_address('1.2.3.4', '5.6.7.8')" - scope.compiler.compile - end - end - - describe "when given an IPv6 address" do - it "should not compile" do - Puppet[:code] = "validate_ipv4_address('3ffe:505')" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /not a valid IPv4 address/) - end - end - - describe "when given other strings" do - it "should not compile" do - Puppet[:code] = "validate_ipv4_address('hello', 'world')" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /not a valid IPv4 address/) - end - end - - describe "when given numbers" do - it "should not compile" do - Puppet[:code] = "validate_ipv4_address(1, 2)" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /is not a valid IPv4 address/) - end - end - - describe "when given booleans" do - it "should not compile" do - Puppet[:code] = "validate_ipv4_address(true, false)" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /is not a string/) - end - end - - it "should not compile when no arguments are passed" do - Puppet[:code] = "validate_ipv4_address()" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /wrong number of arguments/) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb deleted file mode 100755 index a839d902c9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb +++ /dev/null @@ -1,67 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require "spec_helper" - -describe Puppet::Parser::Functions.function(:validate_ipv6_address) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - describe "when calling validate_ipv6_address from puppet" do - describe "when given IPv6 address strings" do - it "should compile with one argument" do - Puppet[:code] = "validate_ipv6_address('3ffe:0505:0002::')" - scope.compiler.compile - end - - it "should compile with multiple arguments" do - Puppet[:code] = "validate_ipv6_address('3ffe:0505:0002::', '3ffe:0505:0001::')" - scope.compiler.compile - end - end - - describe "when given an ipv4 address" do - it "should not compile" do - Puppet[:code] = "validate_ipv6_address('1.2.3.4')" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /not a valid IPv6 address/) - end - end - - describe "when given other strings" do - it "should not compile" do - Puppet[:code] = "validate_ipv6_address('hello', 'world')" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /not a valid IPv6 address/) - end - end - - # 1.8.7 is EOL'd and also absolutely insane about ipv6 - unless RUBY_VERSION == '1.8.7' - describe "when given numbers" do - it "should not compile" do - Puppet[:code] = "validate_ipv6_address(1, 2)" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /not a valid IPv6 address/) - end - end - end - - describe "when given booleans" do - it "should not compile" do - Puppet[:code] = "validate_ipv6_address(true, false)" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /is not a string/) - end - end - - it "should not compile when no arguments are passed" do - Puppet[:code] = "validate_ipv6_address()" - expect { - scope.compiler.compile - }.to raise_error(Puppet::ParseError, /wrong number of arguments/) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_re_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_re_spec.rb deleted file mode 100755 index d29988bf00..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_re_spec.rb +++ /dev/null @@ -1,77 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:validate_re) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - # The subject of these examplres is the method itself. - subject do - # This makes sure the function is loaded within each test - function_name = Puppet::Parser::Functions.function(:validate_re) - scope.method(function_name) - end - - context 'Using Puppet::Parser::Scope.new' do - - describe 'Garbage inputs' do - inputs = [ - [ nil ], - [ [ nil ] ], - [ { 'foo' => 'bar' } ], - [ { } ], - [ '' ], - [ "one", "one", "MSG to User", "4th arg" ], - ] - - inputs.each do |input| - it "validate_re(#{input.inspect}) should fail" do - expect { subject.call [input] }.to raise_error Puppet::ParseError - end - end - end - - describe 'Valid inputs' do - inputs = [ - [ '/full/path/to/something', '^/full' ], - [ '/full/path/to/something', 'full' ], - [ '/full/path/to/something', ['full', 'absent'] ], - [ '/full/path/to/something', ['full', 'absent'], 'Message to the user' ], - ] - - inputs.each do |input| - it "validate_re(#{input.inspect}) should not fail" do - expect { subject.call input }.not_to raise_error - end - end - end - describe "Valid inputs which should raise an exception without a message" do - # The intent here is to make sure valid inputs raise exceptions when they - # don't specify an error message to display. This is the behvior in - # 2.2.x and prior. - inputs = [ - [ "hello", [ "bye", "later", "adios" ] ], - [ "greetings", "salutations" ], - ] - - inputs.each do |input| - it "validate_re(#{input.inspect}) should fail" do - expect { subject.call input }.to raise_error /validate_re.*?does not match/ - end - end - end - describe "Nicer Error Messages" do - # The intent here is to make sure the function returns the 3rd argument - # in the exception thrown - inputs = [ - [ "hello", [ "bye", "later", "adios" ], "MSG to User" ], - [ "greetings", "salutations", "Error, greetings does not match salutations" ], - ] - - inputs.each do |input| - it "validate_re(#{input.inspect}) should fail" do - expect { subject.call input }.to raise_error /#{input[2]}/ - end - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_slength_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_slength_spec.rb deleted file mode 100755 index 851835fa1e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_slength_spec.rb +++ /dev/null @@ -1,67 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe "the validate_slength function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("validate_slength").should == "function_validate_slength" - end - - describe "validating the input argument types" do - it "raises an error if there are less than two arguments" do - expect { scope.function_validate_slength([]) }.to raise_error Puppet::ParseError, /Wrong number of arguments/ - end - - it "raises an error if there are more than three arguments" do - expect { scope.function_validate_slength(['input', 1, 2, 3]) }.to raise_error Puppet::ParseError, /Wrong number of arguments/ - end - - it "raises an error if the first argument is not a string" do - expect { scope.function_validate_slength([Object.new, 2, 1]) }.to raise_error Puppet::ParseError, /Expected first argument.*got .*Object/ - end - - it "raises an error if the second argument cannot be cast to an Integer" do - expect { scope.function_validate_slength(['input', Object.new]) }.to raise_error Puppet::ParseError, /Expected second argument.*got .*Object/ - end - - it "raises an error if the third argument cannot be cast to an Integer" do - expect { scope.function_validate_slength(['input', 1, Object.new]) }.to raise_error Puppet::ParseError, /Expected third argument.*got .*Object/ - end - - it "raises an error if the second argument is smaller than the third argument" do - expect { scope.function_validate_slength(['input', 1, 2]) }.to raise_error Puppet::ParseError, /Expected second argument to be larger than third argument/ - end - end - - describe "validating the input string length" do - describe "when the input is a string" do - it "fails validation if the string is larger than the max length" do - expect { scope.function_validate_slength(['input', 1]) }.to raise_error Puppet::ParseError, /Expected length .* between 0 and 1, was 5/ - end - - it "fails validation if the string is less than the min length" do - expect { scope.function_validate_slength(['input', 10, 6]) }.to raise_error Puppet::ParseError, /Expected length .* between 6 and 10, was 5/ - end - - it "doesn't raise an error if the string is under the max length" do - scope.function_validate_slength(['input', 10]) - end - - it "doesn't raise an error if the string is equal to the max length" do - scope.function_validate_slength(['input', 5]) - end - - it "doesn't raise an error if the string is equal to the min length" do - scope.function_validate_slength(['input', 10, 5]) - end - end - - describe "when the input is an array" do - it "fails validation if one of the array elements is not a string" do - expect { scope.function_validate_slength([["a", "b", Object.new], 2]) }.to raise_error Puppet::ParseError, /Expected element at array position 2 .*String, got .*Object/ - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_string_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_string_spec.rb deleted file mode 100755 index 3b4fb3e1da..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_string_spec.rb +++ /dev/null @@ -1,60 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -require 'spec_helper' - -describe Puppet::Parser::Functions.function(:validate_string) do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - describe 'when calling validate_string from puppet' do - - %w{ foo bar baz }.each do |the_string| - - it "should compile when #{the_string} is a string" do - Puppet[:code] = "validate_string('#{the_string}')" - scope.compiler.compile - end - - it "should compile when #{the_string} is a bare word" do - Puppet[:code] = "validate_string(#{the_string})" - scope.compiler.compile - end - - end - - %w{ true false }.each do |the_string| - it "should compile when #{the_string} is a string" do - Puppet[:code] = "validate_string('#{the_string}')" - scope.compiler.compile - end - - it "should not compile when #{the_string} is a bare word" do - Puppet[:code] = "validate_string(#{the_string})" - expect { scope.compiler.compile }.to raise_error(Puppet::ParseError, /is not a string/) - end - end - - it "should compile when multiple string arguments are passed" do - Puppet[:code] = <<-'ENDofPUPPETcode' - $foo = '' - $bar = 'two' - validate_string($foo, $bar) - ENDofPUPPETcode - scope.compiler.compile - end - - it "should compile when an explicitly undef variable is passed (NOTE THIS MAY NOT BE DESIRABLE)" do - Puppet[:code] = <<-'ENDofPUPPETcode' - $foo = undef - validate_string($foo) - ENDofPUPPETcode - scope.compiler.compile - end - - it "should compile when an undefined variable is passed (NOTE THIS MAY NOT BE DESIRABLE)" do - Puppet[:code] = <<-'ENDofPUPPETcode' - validate_string($foobarbazishouldnotexist) - ENDofPUPPETcode - scope.compiler.compile - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_at_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_at_spec.rb deleted file mode 100755 index 08e95a567b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_at_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the values_at function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("values_at").should == "function_values_at" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_values_at([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should raise a ParseError if you try to use a range where stop is greater then start" do - lambda { scope.function_values_at([['a','b'],["3-1"]]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return a value at from an array" do - result = scope.function_values_at([['a','b','c'],"1"]) - result.should(eq(['b'])) - end - - it "should return a value at from an array when passed a range" do - result = scope.function_values_at([['a','b','c'],"0-1"]) - result.should(eq(['a','b'])) - end - - it "should return chosen values from an array when passed number of indexes" do - result = scope.function_values_at([['a','b','c'],["0","2"]]) - result.should(eq(['a','c'])) - end - - it "should return chosen values from an array when passed ranges and multiple indexes" do - result = scope.function_values_at([['a','b','c','d','e','f','g'],["0","2","4-5"]]) - result.should(eq(['a','c','e','f'])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_spec.rb deleted file mode 100755 index 14ae417638..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the values function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should exist" do - Puppet::Parser::Functions.function("values").should == "function_values" - end - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_values([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should return values from a hash" do - result = scope.function_values([{'a'=>'1','b'=>'2','c'=>'3'}]) - # =~ is the RSpec::Matchers::MatchArray matcher. - # A.K.A. "array with same elements" (multiset) matching - result.should =~ %w{ 1 2 3 } - end - - it "should return a multiset" do - result = scope.function_values([{'a'=>'1','b'=>'3','c'=>'3'}]) - result.should =~ %w{ 1 3 3 } - result.should_not =~ %w{ 1 3 } - end - - it "should raise a ParseError unless a Hash is provided" do - lambda { scope.function_values([['a','b','c']]) }.should( raise_error(Puppet::ParseError)) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/zip_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/zip_spec.rb deleted file mode 100755 index f45ab17308..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/functions/zip_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' - -describe "the zip function" do - let(:scope) { PuppetlabsSpec::PuppetInternals.scope } - - it "should raise a ParseError if there is less than 1 arguments" do - lambda { scope.function_zip([]) }.should( raise_error(Puppet::ParseError)) - end - - it "should be able to zip an array" do - result = scope.function_zip([['1','2','3'],['4','5','6']]) - result.should(eq([["1", "4"], ["2", "5"], ["3", "6"]])) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/compiler.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/compiler.rb deleted file mode 100755 index 2f0ae4d797..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/compiler.rb +++ /dev/null @@ -1,47 +0,0 @@ -#! /usr/bin/env ruby -S rspec -module PuppetSpec::Compiler - def compile_to_catalog(string, node = Puppet::Node.new('foonode')) - Puppet[:code] = string - Puppet::Parser::Compiler.compile(node) - end - - def compile_to_ral(manifest) - catalog = compile_to_catalog(manifest) - ral = catalog.to_ral - ral.finalize - ral - end - - def compile_to_relationship_graph(manifest, prioritizer = Puppet::Graph::SequentialPrioritizer.new) - ral = compile_to_ral(manifest) - graph = Puppet::Graph::RelationshipGraph.new(prioritizer) - graph.populate_from(ral) - graph - end - - if Puppet.version.to_f >= 3.3 - def apply_compiled_manifest(manifest, prioritizer = Puppet::Graph::SequentialPrioritizer.new) - transaction = Puppet::Transaction.new(compile_to_ral(manifest), - Puppet::Transaction::Report.new("apply"), - prioritizer) - transaction.evaluate - transaction.report.finalize_report - - transaction - end - else - def apply_compiled_manifest(manifest) - transaction = Puppet::Transaction.new(compile_to_ral(manifest), Puppet::Transaction::Report.new("apply")) - transaction.evaluate - transaction.report.finalize_report - - transaction - end - end - - def order_resources_traversed_in(relationships) - order_seen = [] - relationships.traverse { |resource| order_seen << resource.ref } - order_seen - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/database.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/database.rb deleted file mode 100755 index f5c2341791..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/database.rb +++ /dev/null @@ -1,30 +0,0 @@ -#! /usr/bin/env ruby -S rspec -# This just makes some nice things available at global scope, and for setup of -# tests to use a real fake database, rather than a fake stubs-that-don't-work -# version of the same. Fun times. -def sqlite? - if $sqlite.nil? - begin - require 'sqlite3' - $sqlite = true - rescue LoadError - $sqlite = false - end - end - $sqlite -end - -def can_use_scratch_database? - sqlite? and Puppet.features.rails? -end - - -# This is expected to be called in your `before :each` block, and will get you -# ready to roll with a serious database and all. Cleanup is handled -# automatically for you. Nothing to do there. -def setup_scratch_database - Puppet[:dbadapter] = 'sqlite3' - Puppet[:dblocation] = ':memory:' - Puppet[:railslog] = PuppetSpec::Files.tmpfile('storeconfigs.log') - Puppet::Rails.init -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/files.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/files.rb deleted file mode 100755 index 71b38ffedf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/files.rb +++ /dev/null @@ -1,61 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'fileutils' -require 'tempfile' -require 'tmpdir' -require 'pathname' - -# A support module for testing files. -module PuppetSpec::Files - def self.cleanup - $global_tempfiles ||= [] - while path = $global_tempfiles.pop do - begin - Dir.unstub(:entries) - FileUtils.rm_rf path, :secure => true - rescue Errno::ENOENT - # nothing to do - end - end - end - - def make_absolute(path) PuppetSpec::Files.make_absolute(path) end - def self.make_absolute(path) - path = File.expand_path(path) - path[0] = 'c' if Puppet.features.microsoft_windows? - path - end - - def tmpfile(name, dir = nil) PuppetSpec::Files.tmpfile(name, dir) end - def self.tmpfile(name, dir = nil) - # Generate a temporary file, just for the name... - source = dir ? Tempfile.new(name, dir) : Tempfile.new(name) - path = source.path - source.close! - - record_tmp(File.expand_path(path)) - - path - end - - def file_containing(name, contents) PuppetSpec::Files.file_containing(name, contents) end - def self.file_containing(name, contents) - file = tmpfile(name) - File.open(file, 'wb') { |f| f.write(contents) } - file - end - - def tmpdir(name) PuppetSpec::Files.tmpdir(name) end - def self.tmpdir(name) - dir = Dir.mktmpdir(name) - - record_tmp(dir) - - dir - end - - def self.record_tmp(tmp) - # ...record it for cleanup, - $global_tempfiles ||= [] - $global_tempfiles << tmp - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/fixtures.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/fixtures.rb deleted file mode 100755 index 81e9775ff8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/fixtures.rb +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/bin/env ruby -S rspec -module PuppetSpec::Fixtures - def fixtures(*rest) - File.join(PuppetSpec::FIXTURE_DIR, *rest) - end - def my_fixture_dir - callers = caller - while line = callers.shift do - next unless found = line.match(%r{/spec/(.*)_spec\.rb:}) - return fixtures(found[1]) - end - fail "sorry, I couldn't work out your path from the caller stack!" - end - def my_fixture(name) - file = File.join(my_fixture_dir, name) - unless File.readable? file then - fail Puppet::DevError, "fixture '#{name}' for #{my_fixture_dir} is not readable" - end - return file - end - def my_fixtures(glob = '*', flags = 0) - files = Dir.glob(File.join(my_fixture_dir, glob), flags) - unless files.length > 0 then - fail Puppet::DevError, "fixture '#{glob}' for #{my_fixture_dir} had no files!" - end - block_given? and files.each do |file| yield file end - files - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/matchers.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/matchers.rb deleted file mode 100755 index 093d77c812..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/matchers.rb +++ /dev/null @@ -1,121 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'stringio' - -######################################################################## -# Backward compatibility for Jenkins outdated environment. -module RSpec - module Matchers - module BlockAliases - alias_method :to, :should unless method_defined? :to - alias_method :to_not, :should_not unless method_defined? :to_not - alias_method :not_to, :should_not unless method_defined? :not_to - end - end -end - - -######################################################################## -# Custom matchers... -RSpec::Matchers.define :have_matching_element do |expected| - match do |actual| - actual.any? { |item| item =~ expected } - end -end - - -RSpec::Matchers.define :exit_with do |expected| - actual = nil - match do |block| - begin - block.call - rescue SystemExit => e - actual = e.status - end - actual and actual == expected - end - failure_message_for_should do |block| - "expected exit with code #{expected} but " + - (actual.nil? ? " exit was not called" : "we exited with #{actual} instead") - end - failure_message_for_should_not do |block| - "expected that exit would not be called with #{expected}" - end - description do - "expect exit with #{expected}" - end -end - -class HavePrintedMatcher - attr_accessor :expected, :actual - - def initialize(expected) - case expected - when String, Regexp - @expected = expected - else - @expected = expected.to_s - end - end - - def matches?(block) - begin - $stderr = $stdout = StringIO.new - $stdout.set_encoding('UTF-8') if $stdout.respond_to?(:set_encoding) - block.call - $stdout.rewind - @actual = $stdout.read - ensure - $stdout = STDOUT - $stderr = STDERR - end - - if @actual then - case @expected - when String - @actual.include? @expected - when Regexp - @expected.match @actual - end - else - false - end - end - - def failure_message_for_should - if @actual.nil? then - "expected #{@expected.inspect}, but nothing was printed" - else - "expected #{@expected.inspect} to be printed; got:\n#{@actual}" - end - end - - def failure_message_for_should_not - "expected #{@expected.inspect} to not be printed; got:\n#{@actual}" - end - - def description - "expect #{@expected.inspect} to be printed" - end -end - -def have_printed(what) - HavePrintedMatcher.new(what) -end - -RSpec::Matchers.define :equal_attributes_of do |expected| - match do |actual| - actual.instance_variables.all? do |attr| - actual.instance_variable_get(attr) == expected.instance_variable_get(attr) - end - end -end - -RSpec::Matchers.define :be_one_of do |*expected| - match do |actual| - expected.include? actual - end - - failure_message_for_should do |actual| - "expected #{actual.inspect} to be one of #{expected.map(&:inspect).join(' or ')}" - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/modules.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/modules.rb deleted file mode 100755 index 910c6d94e4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/modules.rb +++ /dev/null @@ -1,27 +0,0 @@ -#! /usr/bin/env ruby -S rspec -module PuppetSpec::Modules - class << self - def create(name, dir, options = {}) - module_dir = File.join(dir, name) - FileUtils.mkdir_p(module_dir) - - environment = options[:environment] - - if metadata = options[:metadata] - metadata[:source] ||= 'github' - metadata[:author] ||= 'puppetlabs' - metadata[:version] ||= '9.9.9' - metadata[:license] ||= 'to kill' - metadata[:dependencies] ||= [] - - metadata[:name] = "#{metadata[:author]}/#{name}" - - File.open(File.join(module_dir, 'metadata.json'), 'w') do |f| - f.write(metadata.to_pson) - end - end - - Puppet::Module.new(name, module_dir, environment) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/pops.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/pops.rb deleted file mode 100755 index e056a52b77..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/pops.rb +++ /dev/null @@ -1,17 +0,0 @@ -#! /usr/bin/env ruby -S rspec -module PuppetSpec::Pops - extend RSpec::Matchers::DSL - - # Checks if an Acceptor has a specific issue in its list of diagnostics - matcher :have_issue do |expected| - match do |actual| - actual.diagnostics.index { |i| i.issue == expected } != nil - end - failure_message_for_should do |actual| - "expected Acceptor[#{actual.diagnostics.collect { |i| i.issue.issue_code }.join(',')}] to contain issue #{expected.issue_code}" - end - failure_message_for_should_not do |actual| - "expected Acceptor[#{actual.diagnostics.collect { |i| i.issue.issue_code }.join(',')}] to not contain issue #{expected.issue_code}" - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/scope.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/scope.rb deleted file mode 100755 index 3847ede187..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/scope.rb +++ /dev/null @@ -1,15 +0,0 @@ -#! /usr/bin/env ruby -S rspec - -module PuppetSpec::Scope - # Initialize a new scope suitable for testing. - # - def create_test_scope_for_node(node_name) - node = Puppet::Node.new(node_name) - compiler = Puppet::Parser::Compiler.new(node) - scope = Puppet::Parser::Scope.new(compiler) - scope.source = Puppet::Resource::Type.new(:node, node_name) - scope.parent = compiler.topscope - scope - end - -end \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/settings.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/settings.rb deleted file mode 100755 index 8ddcb975fb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/settings.rb +++ /dev/null @@ -1,16 +0,0 @@ -#! /usr/bin/env ruby -S rspec -module PuppetSpec::Settings - - # It would probably be preferable to refactor defaults.rb such that the real definitions of - # these settings were available as a variable, which was then accessible for use during tests. - # However, I'm not doing that yet because I don't want to introduce any additional moving parts - # to this already very large changeset. - # Would be nice to clean this up later. --cprice 2012-03-20 - TEST_APP_DEFAULT_DEFINITIONS = { - :name => { :default => "test", :desc => "name" }, - :logdir => { :type => :directory, :default => "test", :desc => "logdir" }, - :confdir => { :type => :directory, :default => "test", :desc => "confdir" }, - :vardir => { :type => :directory, :default => "test", :desc => "vardir" }, - :rundir => { :type => :directory, :default => "test", :desc => "rundir" }, - } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/verbose.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/verbose.rb deleted file mode 100755 index b2683df048..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/verbose.rb +++ /dev/null @@ -1,10 +0,0 @@ -#! /usr/bin/env ruby -S rspec -# Support code for running stuff with warnings disabled. -module Kernel - def with_verbose_disabled - verbose, $VERBOSE = $VERBOSE, nil - result = yield - $VERBOSE = verbose - return result - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/alias_should_to_must.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/alias_should_to_must.rb deleted file mode 100755 index 505e240920..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/alias_should_to_must.rb +++ /dev/null @@ -1,9 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'rspec' - -class Object - # This is necessary because the RAL has a 'should' - # method. - alias :must :should - alias :must_not :should_not -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/publicize_methods.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/publicize_methods.rb deleted file mode 100755 index 3ae59f978b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/publicize_methods.rb +++ /dev/null @@ -1,11 +0,0 @@ -#! /usr/bin/env ruby -S rspec -# Some monkey-patching to allow us to test private methods. -class Class - def publicize_methods(*methods) - saved_private_instance_methods = methods.empty? ? self.private_instance_methods : methods - - self.class_eval { public(*saved_private_instance_methods) } - yield - self.class_eval { private(*saved_private_instance_methods) } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/spec.opts b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/spec.opts deleted file mode 100644 index 91cd6427ed..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/spec.opts +++ /dev/null @@ -1,6 +0,0 @@ ---format -s ---colour ---loadby -mtime ---backtrace diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper.rb deleted file mode 100755 index 78925fdea3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper.rb +++ /dev/null @@ -1,39 +0,0 @@ -#! /usr/bin/env ruby -S rspec -dir = File.expand_path(File.dirname(__FILE__)) -$LOAD_PATH.unshift File.join(dir, 'lib') - -# So everyone else doesn't have to include this base constant. -module PuppetSpec - FIXTURE_DIR = File.join(dir = File.expand_path(File.dirname(__FILE__)), "fixtures") unless defined?(FIXTURE_DIR) -end - -require 'puppet' -require 'rspec-puppet' -require 'simplecov' -require 'puppetlabs_spec_helper/module_spec_helper' -require 'puppet_spec/verbose' -require 'puppet_spec/files' -require 'puppet_spec/settings' -require 'puppet_spec/fixtures' -require 'puppet_spec/matchers' -require 'puppet_spec/database' -require 'monkey_patches/alias_should_to_must' -require 'mocha/setup' - - -SimpleCov.start do - add_filter "/spec/" -end - - -RSpec.configure do |config| - config.before :each do - # Ensure that we don't accidentally cache facts and environment between - # test cases. This requires each example group to explicitly load the - # facts being exercised with something like - # Facter.collection.loader.load(:ipaddress) - Facter::Util::Loader.any_instance.stubs(:load_all) - Facter.clear - Facter.clear_messages - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper_acceptance.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper_acceptance.rb deleted file mode 100755 index 8e56daa683..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper_acceptance.rb +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'beaker-rspec' - -UNSUPPORTED_PLATFORMS = [] - -unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' - if hosts.first.is_pe? - install_pe - on hosts, 'mkdir -p /etc/puppetlabs/facter/facts.d' - else - install_puppet - on hosts, 'mkdir -p /etc/facter/facts.d' - on hosts, '/bin/touch /etc/puppet/hiera.yaml' - end - hosts.each do |host| - on host, "mkdir -p #{host['distmoduledir']}" - end -end - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Readable test descriptions - c.formatter = :documentation - - # Configure all nodes in nodeset - c.before :suite do - puppet_module_install(:source => proj_root, :module_name => 'stdlib') - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.last_run.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.last_run.json deleted file mode 100644 index 3cb5e70c96..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.last_run.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "result": { - "covered_percent": 100.0 - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.resultset.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.resultset.json deleted file mode 100644 index bed049341c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.resultset.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "RSpec": { - "coverage": { - }, - "timestamp": 1398200553 - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.css b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.css deleted file mode 100644 index d86560434d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.css +++ /dev/null @@ -1,799 +0,0 @@ -/* ----------------------------------------------------------------------- - - - Blueprint CSS Framework 0.9 - http://blueprintcss.org - - * Copyright (c) 2007-Present. See LICENSE for more info. - * See README for instructions on how to use Blueprint. - * For credits and origins, see AUTHORS. - * This is a compressed file. See the sources in the 'src' directory. - ------------------------------------------------------------------------ */ - -/* reset.css */ - -html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;} -article, aside, dialog, figure, footer, header, hgroup, nav, section {display:block;} -body {line-height:1.5;} -table {border-collapse:separate;border-spacing:0;} -caption, th, td {text-align:left;font-weight:normal;} -table, td, th {vertical-align:middle;} -blockquote:before, blockquote:after, q:before, q:after {content:"";} -blockquote, q {quotes:"" "";} -a img {border:none;} - -/* typography.css */ -html {font-size:100.01%;} -body {font-size:82%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;} -h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;} -h1 {font-size:3em;line-height:1;margin-bottom:0.5em;} -h2 {font-size:2em;margin-bottom:0.75em;} -h3 {font-size:1.5em;line-height:1;margin-bottom:1em;} -h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;} -h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;} -h6 {font-size:1em;font-weight:bold;} -h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;} -p {margin:0 0 1.5em;} -p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;} -p img.right {float:right;margin:1.5em 0 1.5em 1.5em;} -a:focus, a:hover {color:#000;} -a {color:#009;text-decoration:underline;} -blockquote {margin:1.5em;color:#666;font-style:italic;} -strong {font-weight:bold;} -em, dfn {font-style:italic;} -dfn {font-weight:bold;} -sup, sub {line-height:0;} -abbr, acronym {border-bottom:1px dotted #666;} -address {margin:0 0 1.5em;font-style:italic;} -del {color:#666;} -pre {margin:1.5em 0;white-space:pre;} -pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;} -li ul, li ol {margin:0;} -ul, ol {margin:0 1.5em 1.5em 0;padding-left:3.333em;} -ul {list-style-type:disc;} -ol {list-style-type:decimal;} -dl {margin:0 0 1.5em 0;} -dl dt {font-weight:bold;} -dd {margin-left:1.5em;} -table {margin-bottom:1.4em;width:100%;} -th {font-weight:bold;} -thead th {background:#c3d9ff;} -th, td, caption {padding:4px 10px 4px 5px;} -tr.even td {background:#efefef;} -tfoot {font-style:italic;} -caption {background:#eee;} -.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;} -.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;} -.hide {display:none;} -.quiet {color:#666;} -.loud {color:#000;} -.highlight {background:#ff0;} -.added {background:#060;color:#fff;} -.removed {background:#900;color:#fff;} -.first {margin-left:0;padding-left:0;} -.last {margin-right:0;padding-right:0;} -.top {margin-top:0;padding-top:0;} -.bottom {margin-bottom:0;padding-bottom:0;} - -/* forms.css */ -label {font-weight:bold;} -fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;} -legend {font-weight:bold;font-size:1.2em;} -input[type=text], input[type=password], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;} -input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;} -input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;} -input.text, input.title {width:300px;padding:5px;} -input.title {font-size:1.5em;} -textarea {width:390px;height:250px;padding:5px;} -input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;} -form.inline {line-height:3;} -form.inline p {margin-bottom:0;} -.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;} -.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;} -.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;} -.success {background:#E6EFC2;color:#264409;border-color:#C6D880;} -.error a {color:#8a1f11;} -.notice a {color:#514721;} -.success a {color:#264409;} -.box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;} -hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;} -hr.space {background:#fff;color:#fff;visibility:hidden;} -.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;} -.clearfix, .container {display:block;} -.clear {clear:both;} -/* -github.com style (c) Vasily Polovnyov -*/ - - -pre code { -} - -pre .comment, -pre .template_comment, -pre .diff .header, -pre .javadoc { - color: #998; - font-style: italic -} - -pre .keyword, -pre .css .rule .keyword, -pre .winutils, -pre .javascript .title, -pre .lisp .title { - color: #000; - font-weight: bold -} - -pre .number, -pre .hexcolor { - color: #458 -} - - -pre .string, -pre .tag .value, -pre .phpdoc, -pre .tex .formula { - color: #d14 -} - -pre .subst { - color: #712; -} - -pre .constant, -pre .title, -pre .id { - color: #900; - font-weight: bold -} - -pre .javascript .title, -pre .lisp .title, -pre .subst { - font-weight: normal -} - -pre .class .title, -pre .haskell .label, -pre .tex .command { - color: #458; - font-weight: bold -} - -pre .tag, -pre .tag .title, -pre .rules .property, -pre .django .tag .keyword { - color: #000080; - font-weight: normal -} - -pre .attribute, -pre .variable, -pre .instancevar, -pre .lisp .body { - color: #008080 -} - -pre .regexp { - color: #009926 -} - -pre .class { - color: #458; - font-weight: bold -} - -pre .symbol, -pre .ruby .symbol .string, -pre .ruby .symbol .keyword, -pre .ruby .symbol .keymethods, -pre .lisp .keyword, -pre .tex .special, -pre .input_number { - color: #990073 -} - -pre .builtin, -pre .built_in, -pre .lisp .title { - color: #0086b3 -} - -pre .preprocessor, -pre .pi, -pre .doctype, -pre .shebang, -pre .cdata { - color: #999; - font-weight: bold -} - -pre .deletion { - background: #fdd -} - -pre .addition { - background: #dfd -} - -pre .diff .change { - background: #0086b3 -} - -pre .chunk { - color: #aaa -} - -pre .tex .formula { - opacity: 0.5; -} -/* - * jQuery UI CSS Framework @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - */ - -/* Layout helpers -----------------------------------*/ - -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } -.ui-helper-clearfix { display: inline-block; } -/* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } -/* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } - - -/* - * jQuery UI CSS Framework @VERSION - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - * - * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px - */ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } -.ui-widget-content a { color: #222222; } -.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } -.ui-widget-header a { color: #222222; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } -.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; } -.ui-widget :active { outline: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } -.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } - -/* Overlays */ -.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } -.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; } -/* - ColorBox Core Style: - The following CSS is consistent between example themes and should not be altered. -*/ -#colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;} -#cboxOverlay{position:fixed; width:100%; height:100%;} -#cboxMiddleLeft, #cboxBottomLeft{clear:left;} -#cboxContent{position:relative;} -#cboxLoadedContent{overflow:auto;} -#cboxTitle{margin:0;} -#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;} -#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;} -.cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;} -.cboxIframe{width:100%; height:100%; display:block; border:0;} -#colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box;} - -/* - User Style: - Change the following styles to modify the appearance of ColorBox. They are - ordered & tabbed in a way that represents the nesting of the generated HTML. -*/ -#cboxOverlay{background:#000;} -#colorbox{} - #cboxTopLeft{width:14px; height:14px; background:url(colorbox/controls.png) no-repeat 0 0;} - #cboxTopCenter{height:14px; background:url(colorbox/border.png) repeat-x top left;} - #cboxTopRight{width:14px; height:14px; background:url(colorbox/controls.png) no-repeat -36px 0;} - #cboxBottomLeft{width:14px; height:43px; background:url(colorbox/controls.png) no-repeat 0 -32px;} - #cboxBottomCenter{height:43px; background:url(colorbox/border.png) repeat-x bottom left;} - #cboxBottomRight{width:14px; height:43px; background:url(colorbox/controls.png) no-repeat -36px -32px;} - #cboxMiddleLeft{width:14px; background:url(colorbox/controls.png) repeat-y -175px 0;} - #cboxMiddleRight{width:14px; background:url(colorbox/controls.png) repeat-y -211px 0;} - #cboxContent{background:#fff; overflow:visible;} - .cboxIframe{background:#fff;} - #cboxError{padding:50px; border:1px solid #ccc;} - #cboxLoadedContent{margin-bottom:5px;} - #cboxLoadingOverlay{background:url(colorbox/loading_background.png) no-repeat center center;} - #cboxLoadingGraphic{background:url(colorbox/loading.gif) no-repeat center center;} - #cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;} - #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;} - - #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(colorbox/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;} - #cboxPrevious{left:0px; background-position: -51px -25px;} - #cboxPrevious:hover{background-position:-51px 0px;} - #cboxNext{left:27px; background-position:-75px -25px;} - #cboxNext:hover{background-position:-75px 0px;} - #cboxClose{right:0; background-position:-100px -25px;} - #cboxClose:hover{background-position:-100px 0px;} - - .cboxSlideshow_on #cboxSlideshow{background-position:-125px 0px; right:27px;} - .cboxSlideshow_on #cboxSlideshow:hover{background-position:-150px 0px;} - .cboxSlideshow_off #cboxSlideshow{background-position:-150px -25px; right:27px;} - .cboxSlideshow_off #cboxSlideshow:hover{background-position:-125px 0px;} -#loading { - position: fixed; - left: 40%; - top: 50%; } - -a { - color: #333333; - text-decoration: none; } - a:hover { - color: black; - text-decoration: underline; } - -body { - font-family: "Lucida Grande", Helvetica, "Helvetica Neue", Arial, sans-serif; - padding: 12px; - background-color: #333333; } - -h1, h2, h3, h4 { - color: #1c2324; - margin: 0; - padding: 0; - margin-bottom: 12px; } - -table { - width: 100%; } - -#content { - clear: left; - background-color: white; - border: 2px solid #dddddd; - border-top: 8px solid #dddddd; - padding: 18px; - -webkit-border-bottom-left-radius: 5px; - -webkit-border-bottom-right-radius: 5px; - -webkit-border-top-right-radius: 5px; - -moz-border-radius-bottomleft: 5px; - -moz-border-radius-bottomright: 5px; - -moz-border-radius-topright: 5px; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; - border-top-right-radius: 5px; } - -.dataTables_filter, .dataTables_info { - padding: 2px 6px; } - -abbr.timeago { - text-decoration: none; - border: none; - font-weight: bold; } - -.timestamp { - float: right; - color: #dddddd; } - -.group_tabs { - list-style: none; - float: left; - margin: 0; - padding: 0; } - .group_tabs li { - display: inline; - float: left; } - .group_tabs li a { - font-family: Helvetica, Arial, sans-serif; - display: block; - float: left; - text-decoration: none; - padding: 4px 8px; - background-color: #aaaaaa; - background: -webkit-gradient(linear, 0 0, 0 bottom, from(#dddddd), to(#aaaaaa)); - background: -moz-linear-gradient(#dddddd, #aaaaaa); - background: linear-gradient(#dddddd, #aaaaaa); - text-shadow: #e5e5e5 1px 1px 0px; - border-bottom: none; - color: #333333; - font-weight: bold; - margin-right: 8px; - border-top: 1px solid #efefef; - -webkit-border-top-left-radius: 2px; - -webkit-border-top-right-radius: 2px; - -moz-border-radius-topleft: 2px; - -moz-border-radius-topright: 2px; - border-top-left-radius: 2px; - border-top-right-radius: 2px; } - .group_tabs li a:hover { - background-color: #cccccc; - background: -webkit-gradient(linear, 0 0, 0 bottom, from(#eeeeee), to(#aaaaaa)); - background: -moz-linear-gradient(#eeeeee, #aaaaaa); - background: linear-gradient(#eeeeee, #aaaaaa); } - .group_tabs li a:active { - padding-top: 5px; - padding-bottom: 3px; } - .group_tabs li.active a { - color: black; - text-shadow: white 1px 1px 0px; - background-color: #dddddd; - background: -webkit-gradient(linear, 0 0, 0 bottom, from(white), to(#dddddd)); - background: -moz-linear-gradient(white, #dddddd); - background: linear-gradient(white, #dddddd); } - -.file_list { - margin-bottom: 18px; } - -a.src_link { - background: url("./magnify.png") no-repeat left 50%; - padding-left: 18px; } - -tr, td { - margin: 0; - padding: 0; } - -th { - white-space: nowrap; } - th.ui-state-default { - cursor: pointer; } - th span.ui-icon { - float: left; } - -td { - padding: 4px 8px; } - td.strong { - font-weight: bold; } - -.source_table h3, .source_table h4 { - padding: 0; - margin: 0; - margin-bottom: 4px; } -.source_table .header { - padding: 10px; } -.source_table pre { - margin: 0; - padding: 0; - white-space: normal; - color: black; - font-family: "Monaco", "Inconsolata", "Consolas", monospace; } -.source_table code { - color: black; - font-family: "Monaco", "Inconsolata", "Consolas", monospace; } -.source_table pre { - background-color: #333333; } - .source_table pre ol { - margin: 0px; - padding: 0px; - margin-left: 45px; - font-size: 12px; - color: white; } - .source_table pre li { - margin: 0px; - padding: 2px 6px; - border-left: 5px solid white; } - .source_table pre li code { - white-space: pre; - white-space: pre-wrap; } - .source_table pre .hits { - float: right; - margin-left: 10px; - padding: 2px 4px; - background-color: #444444; - background: -webkit-gradient(linear, 0 0, 0 bottom, from(#222222), to(#666666)); - background: -moz-linear-gradient(#222222, #666666); - background: linear-gradient(#222222, #666666); - color: white; - font-family: Helvetica, "Helvetica Neue", Arial, sans-serif; - font-size: 10px; - font-weight: bold; - text-align: center; - border-radius: 6px; } - -#footer { - color: #dddddd; - font-size: 12px; - font-weight: bold; - margin-top: 12px; - text-align: right; } - #footer a { - color: #eeeeee; - text-decoration: underline; } - #footer a:hover { - color: white; - text-decoration: none; } - -.green { - color: #009900; } - -.red { - color: #990000; } - -.yellow { - color: #ddaa00; } - -.source_table .covered { - border-color: #009900; } -.source_table .missed { - border-color: #990000; } -.source_table .never { - border-color: black; } -.source_table .skipped { - border-color: #ffcc00; } -.source_table .covered:nth-child(odd) { - background-color: #cdf2cd; } -.source_table .covered:nth-child(even) { - background-color: #dbf2db; } -.source_table .missed:nth-child(odd) { - background-color: #f7c0c0; } -.source_table .missed:nth-child(even) { - background-color: #f7cfcf; } -.source_table .never:nth-child(odd) { - background-color: #efefef; } -.source_table .never:nth-child(even) { - background-color: #f4f4f4; } -.source_table .skipped:nth-child(odd) { - background-color: #fbf0c0; } -.source_table .skipped:nth-child(even) { - background-color: #fbffcf; } - - - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.js b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.js deleted file mode 100644 index 5e06df5f31..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.js +++ /dev/null @@ -1,1559 +0,0 @@ -/*! - * jQuery JavaScript Library v1.6.2 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Thu Jun 30 14:16:56 2011 -0400 - */ - -(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
    a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
    ",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
    t
    ",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i. -shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div
    ","
    "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j -)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
    ").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
    ";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); -var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(/"}while(x.length||y.length){var u=t().splice(0,1)[0];v+=l(w.substr(q,u.offset-q));q=u.offset;if(u.event=="start"){v+=r(u.node);s.push(u.node)}else{if(u.event=="stop"){var p=s.length;do{p--;var o=s[p];v+=("")}while(o!=u.node);s.splice(p,1);while(p'+l(K[0])+""}else{M+=l(K[0])}O=N.lR.lastIndex;K=N.lR.exec(L)}M+=l(L.substr(O,L.length-O));return M}function J(r,L){if(L.sL&&d[L.sL]){var K=f(L.sL,r);s+=K.keyword_count;return K.value}else{return E(r,L)}}function H(L,r){var K=L.cN?'':"";if(L.rB){p+=K;L.buffer=""}else{if(L.eB){p+=l(r)+K;L.buffer=""}else{p+=K;L.buffer=r}}B.push(L);A+=L.r}function D(N,K,P){var Q=B[B.length-1];if(P){p+=J(Q.buffer+N,Q);return false}var L=y(K,Q);if(L){p+=J(Q.buffer+N,Q);H(L,K);return L.rB}var r=v(B.length-1,K);if(r){var M=Q.cN?"":"";if(Q.rE){p+=J(Q.buffer+N,Q)+M}else{if(Q.eE){p+=J(Q.buffer+N,Q)+M+l(K)}else{p+=J(Q.buffer+N+K,Q)+M}}while(r>1){M=B[B.length-2].cN?"":"";p+=M;r--;B.length--}var O=B[B.length-1];B.length--;B[B.length-1].buffer="";if(O.starts){H(O.starts,"")}return Q.rE}if(w(K,Q)){throw"Illegal"}}var G=d[I];var B=[G.dM];var A=0;var s=0;var p="";try{var u=0;G.dM.buffer="";do{var x=q(C,u);var t=D(x[0],x[1],x[2]);u+=x[0].length;if(!t){u+=x[1].length}}while(!x[2]);if(B.length>1){throw"Illegal"}return{language:I,r:A,keyword_count:s,value:p}}catch(F){if(F=="Illegal"){return{language:null,r:0,keyword_count:0,value:l(C)}}else{throw F}}}function h(){function o(t,s,u){if(t.compiled){return}if(!u){t.bR=c(s,t.b?t.b:"\\B|\\b");if(!t.e&&!t.eW){t.e="\\B|\\b"}if(t.e){t.eR=c(s,t.e)}}if(t.i){t.iR=c(s,t.i)}if(t.r==undefined){t.r=1}if(t.k){t.lR=c(s,t.l||hljs.IR,true)}for(var r in t.k){if(!t.k.hasOwnProperty(r)){continue}if(t.k[r] instanceof Object){t.kG=t.k}else{t.kG={keyword:t.k}}break}if(!t.c){t.c=[]}t.compiled=true;for(var q=0;qx.keyword_count+x.r){x=u}if(u.keyword_count+u.r>w.keyword_count+w.r){x=w;w=u}}}var s=t.className;if(!s.match(w.language)){s=s?(s+" "+w.language):w.language}var o=b(t);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=k(o,b(q),A)}if(y){w.value=w.value.replace(/^((<[^>]+>|\t)+)/gm,function(B,E,D,C){return E.replace(/\t/g,y)})}if(p){w.value=w.value.replace(/\n/g,"
    ")}if(/MSIE [678]/.test(navigator.userAgent)&&t.tagName=="CODE"&&t.parentNode.tagName=="PRE"){var q=t.parentNode;var v=document.createElement("div");v.innerHTML="
    "+w.value+"
    ";t=v.firstChild.firstChild;v.firstChild.cN=q.cN;q.parentNode.replaceChild(v.firstChild,q)}else{t.innerHTML=w.value}t.className=s;t.dataset={};t.dataset.result={language:w.language,kw:w.keyword_count,re:w.r};if(x&&x.language){t.dataset.second_best={language:x.language,kw:x.keyword_count,re:x.r}}}function j(){if(j.called){return}j.called=true;e();var q=document.getElementsByTagName("pre");for(var o=0;o|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.inherit=function(o,r){var q={};for(var p in o){q[p]=o[p]}if(r){for(var p in r){q[p]=r[p]}}return q}}();hljs.LANGUAGES.ruby=function(){var g="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?";var a="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var n={keyword:{and:1,"false":1,then:1,defined:1,module:1,"in":1,"return":1,redo:1,"if":1,BEGIN:1,retry:1,end:1,"for":1,"true":1,self:1,when:1,next:1,until:1,"do":1,begin:1,unless:1,END:1,rescue:1,nil:1,"else":1,"break":1,undef:1,not:1,"super":1,"class":1,"case":1,require:1,yield:1,alias:1,"while":1,ensure:1,elsif:1,or:1,def:1},keymethods:{__id__:1,__send__:1,abort:1,abs:1,"all?":1,allocate:1,ancestors:1,"any?":1,arity:1,assoc:1,at:1,at_exit:1,autoload:1,"autoload?":1,"between?":1,binding:1,binmode:1,"block_given?":1,call:1,callcc:1,caller:1,capitalize:1,"capitalize!":1,casecmp:1,"catch":1,ceil:1,center:1,chomp:1,"chomp!":1,chop:1,"chop!":1,chr:1,"class":1,class_eval:1,"class_variable_defined?":1,class_variables:1,clear:1,clone:1,close:1,close_read:1,close_write:1,"closed?":1,coerce:1,collect:1,"collect!":1,compact:1,"compact!":1,concat:1,"const_defined?":1,const_get:1,const_missing:1,const_set:1,constants:1,count:1,crypt:1,"default":1,default_proc:1,"delete":1,"delete!":1,delete_at:1,delete_if:1,detect:1,display:1,div:1,divmod:1,downcase:1,"downcase!":1,downto:1,dump:1,dup:1,each:1,each_byte:1,each_index:1,each_key:1,each_line:1,each_pair:1,each_value:1,each_with_index:1,"empty?":1,entries:1,eof:1,"eof?":1,"eql?":1,"equal?":1,"eval":1,exec:1,exit:1,"exit!":1,extend:1,fail:1,fcntl:1,fetch:1,fileno:1,fill:1,find:1,find_all:1,first:1,flatten:1,"flatten!":1,floor:1,flush:1,for_fd:1,foreach:1,fork:1,format:1,freeze:1,"frozen?":1,fsync:1,getc:1,gets:1,global_variables:1,grep:1,gsub:1,"gsub!":1,"has_key?":1,"has_value?":1,hash:1,hex:1,id:1,include:1,"include?":1,included_modules:1,index:1,indexes:1,indices:1,induced_from:1,inject:1,insert:1,inspect:1,instance_eval:1,instance_method:1,instance_methods:1,"instance_of?":1,"instance_variable_defined?":1,instance_variable_get:1,instance_variable_set:1,instance_variables:1,"integer?":1,intern:1,invert:1,ioctl:1,"is_a?":1,isatty:1,"iterator?":1,join:1,"key?":1,keys:1,"kind_of?":1,lambda:1,last:1,length:1,lineno:1,ljust:1,load:1,local_variables:1,loop:1,lstrip:1,"lstrip!":1,map:1,"map!":1,match:1,max:1,"member?":1,merge:1,"merge!":1,method:1,"method_defined?":1,method_missing:1,methods:1,min:1,module_eval:1,modulo:1,name:1,nesting:1,"new":1,next:1,"next!":1,"nil?":1,nitems:1,"nonzero?":1,object_id:1,oct:1,open:1,pack:1,partition:1,pid:1,pipe:1,pop:1,popen:1,pos:1,prec:1,prec_f:1,prec_i:1,print:1,printf:1,private_class_method:1,private_instance_methods:1,"private_method_defined?":1,private_methods:1,proc:1,protected_instance_methods:1,"protected_method_defined?":1,protected_methods:1,public_class_method:1,public_instance_methods:1,"public_method_defined?":1,public_methods:1,push:1,putc:1,puts:1,quo:1,raise:1,rand:1,rassoc:1,read:1,read_nonblock:1,readchar:1,readline:1,readlines:1,readpartial:1,rehash:1,reject:1,"reject!":1,remainder:1,reopen:1,replace:1,require:1,"respond_to?":1,reverse:1,"reverse!":1,reverse_each:1,rewind:1,rindex:1,rjust:1,round:1,rstrip:1,"rstrip!":1,scan:1,seek:1,select:1,send:1,set_trace_func:1,shift:1,singleton_method_added:1,singleton_methods:1,size:1,sleep:1,slice:1,"slice!":1,sort:1,"sort!":1,sort_by:1,split:1,sprintf:1,squeeze:1,"squeeze!":1,srand:1,stat:1,step:1,store:1,strip:1,"strip!":1,sub:1,"sub!":1,succ:1,"succ!":1,sum:1,superclass:1,swapcase:1,"swapcase!":1,sync:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,taint:1,"tainted?":1,tell:1,test:1,"throw":1,times:1,to_a:1,to_ary:1,to_f:1,to_hash:1,to_i:1,to_int:1,to_io:1,to_proc:1,to_s:1,to_str:1,to_sym:1,tr:1,"tr!":1,tr_s:1,"tr_s!":1,trace_var:1,transpose:1,trap:1,truncate:1,"tty?":1,type:1,ungetc:1,uniq:1,"uniq!":1,unpack:1,unshift:1,untaint:1,untrace_var:1,upcase:1,"upcase!":1,update:1,upto:1,"value?":1,values:1,values_at:1,warn:1,write:1,write_nonblock:1,"zero?":1,zip:1}};var h={cN:"yardoctag",b:"@[A-Za-z]+"};var d={cN:"comment",b:"#",e:"$",c:[h]};var c={cN:"comment",b:"^\\=begin",e:"^\\=end",c:[h],r:10};var b={cN:"comment",b:"^__END__",e:"\\n$"};var u={cN:"subst",b:"#\\{",e:"}",l:g,k:n};var p=[hljs.BE,u];var s={cN:"string",b:"'",e:"'",c:p,r:0};var r={cN:"string",b:'"',e:'"',c:p,r:0};var q={cN:"string",b:"%[qw]?\\(",e:"\\)",c:p,r:10};var o={cN:"string",b:"%[qw]?\\[",e:"\\]",c:p,r:10};var m={cN:"string",b:"%[qw]?{",e:"}",c:p,r:10};var l={cN:"string",b:"%[qw]?<",e:">",c:p,r:10};var k={cN:"string",b:"%[qw]?/",e:"/",c:p,r:10};var j={cN:"string",b:"%[qw]?%",e:"%",c:p,r:10};var i={cN:"string",b:"%[qw]?-",e:"-",c:p,r:10};var t={cN:"string",b:"%[qw]?\\|",e:"\\|",c:p,r:10};var e={cN:"function",b:"\\bdef\\s+",e:" |$|;",l:g,k:n,c:[{cN:"title",b:a,l:g,k:n},{cN:"params",b:"\\(",e:"\\)",l:g,k:n},d,c,b]};var f={cN:"identifier",b:g,l:g,k:n,r:0};var v=[d,c,b,s,r,q,o,m,l,k,j,i,t,{cN:"class",b:"\\b(class|module)\\b",e:"$|;",k:{"class":1,module:1},c:[{cN:"title",b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",r:0},{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+hljs.IR+"::)?"+hljs.IR}]},d,c,b]},e,{cN:"constant",b:"(::)?([A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:[s,r,q,o,m,l,k,j,i,t,f],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"number",b:"\\?\\w"},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},f,{b:"("+hljs.RSR+")\\s*",c:[d,c,b,{cN:"regexp",b:"/",e:"/[a-z]*",i:"\\n",c:[hljs.BE]}],r:0}];u.c=v;e.c[1].c=v;return{dM:{l:g,k:n,c:v}}}(); -// ColorBox v1.3.20.1 - jQuery lightbox plugin -// (c) 2011 Jack Moore - jacklmoore.com -// License: http://www.opensource.org/licenses/mit-license.php -(function ($, document, window) { - var - // Default settings object. - // See http://jacklmoore.com/colorbox for details. - defaults = { - transition: "elastic", - speed: 300, - width: false, - initialWidth: "600", - innerWidth: false, - maxWidth: false, - height: false, - initialHeight: "450", - innerHeight: false, - maxHeight: false, - scalePhotos: true, - scrolling: true, - inline: false, - html: false, - iframe: false, - fastIframe: true, - photo: false, - href: false, - title: false, - rel: false, - opacity: 0.9, - preloading: true, - - current: "image {current} of {total}", - previous: "previous", - next: "next", - close: "close", - xhrError: "This content failed to load.", - imgError: "This image failed to load.", - - open: false, - returnFocus: true, - reposition: true, - loop: true, - slideshow: false, - slideshowAuto: true, - slideshowSpeed: 2500, - slideshowStart: "start slideshow", - slideshowStop: "stop slideshow", - onOpen: false, - onLoad: false, - onComplete: false, - onCleanup: false, - onClosed: false, - overlayClose: true, - escKey: true, - arrowKey: true, - top: false, - bottom: false, - left: false, - right: false, - fixed: false, - data: undefined - }, - - // Abstracting the HTML and event identifiers for easy rebranding - colorbox = 'colorbox', - prefix = 'cbox', - boxElement = prefix + 'Element', - - // Events - event_open = prefix + '_open', - event_load = prefix + '_load', - event_complete = prefix + '_complete', - event_cleanup = prefix + '_cleanup', - event_closed = prefix + '_closed', - event_purge = prefix + '_purge', - - // Special Handling for IE - isIE = !$.support.opacity && !$.support.style, // IE7 & IE8 - isIE6 = isIE && !window.XMLHttpRequest, // IE6 - event_ie6 = prefix + '_IE6', - - // Cached jQuery Object Variables - $overlay, - $box, - $wrap, - $content, - $topBorder, - $leftBorder, - $rightBorder, - $bottomBorder, - $related, - $window, - $loaded, - $loadingBay, - $loadingOverlay, - $title, - $current, - $slideshow, - $next, - $prev, - $close, - $groupControls, - - // Variables for cached values or use across multiple functions - settings, - interfaceHeight, - interfaceWidth, - loadedHeight, - loadedWidth, - element, - index, - photo, - open, - active, - closing, - loadingTimer, - publicMethod, - div = "div", - init; - - // **************** - // HELPER FUNCTIONS - // **************** - - // Convience function for creating new jQuery objects - function $tag(tag, id, css) { - var element = document.createElement(tag); - - if (id) { - element.id = prefix + id; - } - - if (css) { - element.style.cssText = css; - } - - return $(element); - } - - // Determine the next and previous members in a group. - function getIndex(increment) { - var - max = $related.length, - newIndex = (index + increment) % max; - - return (newIndex < 0) ? max + newIndex : newIndex; - } - - // Convert '%' and 'px' values to integers - function setSize(size, dimension) { - return Math.round((/%/.test(size) ? ((dimension === 'x' ? winWidth() : winHeight()) / 100) : 1) * parseInt(size, 10)); - } - - // Checks an href to see if it is a photo. - // There is a force photo option (photo: true) for hrefs that cannot be matched by this regex. - function isImage(url) { - return settings.photo || /\.(gif|png|jp(e|g|eg)|bmp|ico)((#|\?).*)?$/i.test(url); - } - - function winWidth() { - // $(window).width() is incorrect for some mobile browsers, but - // window.innerWidth is unsupported in IE8 and lower. - return window.innerWidth || $window.width(); - } - - function winHeight() { - return window.innerHeight || $window.height(); - } - - // Assigns function results to their respective properties - function makeSettings() { - var i, - data = $.data(element, colorbox); - - if (data == null) { - settings = $.extend({}, defaults); - if (console && console.log) { - console.log('Error: cboxElement missing settings object'); - } - } else { - settings = $.extend({}, data); - } - - for (i in settings) { - if ($.isFunction(settings[i]) && i.slice(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time. - settings[i] = settings[i].call(element); - } - } - - settings.rel = settings.rel || element.rel || $(element).data('rel') || 'nofollow'; - settings.href = settings.href || $(element).attr('href'); - settings.title = settings.title || element.title; - - if (typeof settings.href === "string") { - settings.href = $.trim(settings.href); - } - } - - function trigger(event, callback) { - $.event.trigger(event); - if (callback) { - callback.call(element); - } - } - - // Slideshow functionality - function slideshow() { - var - timeOut, - className = prefix + "Slideshow_", - click = "click." + prefix, - start, - stop, - clear; - - if (settings.slideshow && $related[1]) { - start = function () { - $slideshow - .html(settings.slideshowStop) - .unbind(click) - .bind(event_complete, function () { - if (settings.loop || $related[index + 1]) { - timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed); - } - }) - .bind(event_load, function () { - clearTimeout(timeOut); - }) - .one(click + ' ' + event_cleanup, stop); - $box.removeClass(className + "off").addClass(className + "on"); - timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed); - }; - - stop = function () { - clearTimeout(timeOut); - $slideshow - .html(settings.slideshowStart) - .unbind([event_complete, event_load, event_cleanup, click].join(' ')) - .one(click, function () { - publicMethod.next(); - start(); - }); - $box.removeClass(className + "on").addClass(className + "off"); - }; - - if (settings.slideshowAuto) { - start(); - } else { - stop(); - } - } else { - $box.removeClass(className + "off " + className + "on"); - } - } - - function launch(target) { - if (!closing) { - - element = target; - - makeSettings(); - - $related = $(element); - - index = 0; - - if (settings.rel !== 'nofollow') { - $related = $('.' + boxElement).filter(function () { - var data = $.data(this, colorbox), - relRelated; - - if (data) { - relRelated = $(this).data('rel') || data.rel || this.rel; - } - - return (relRelated === settings.rel); - }); - index = $related.index(element); - - // Check direct calls to ColorBox. - if (index === -1) { - $related = $related.add(element); - index = $related.length - 1; - } - } - - if (!open) { - open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys. - - $box.show(); - - if (settings.returnFocus) { - $(element).blur().one(event_closed, function () { - $(this).focus(); - }); - } - - // +settings.opacity avoids a problem in IE when using non-zero-prefixed-string-values, like '.5' - $overlay.css({"opacity": +settings.opacity, "cursor": settings.overlayClose ? "pointer" : "auto"}).show(); - - // Opens inital empty ColorBox prior to content being loaded. - settings.w = setSize(settings.initialWidth, 'x'); - settings.h = setSize(settings.initialHeight, 'y'); - publicMethod.position(); - - if (isIE6) { - $window.bind('resize.' + event_ie6 + ' scroll.' + event_ie6, function () { - $overlay.css({width: winWidth(), height: winHeight(), top: $window.scrollTop(), left: $window.scrollLeft()}); - }).trigger('resize.' + event_ie6); - } - - trigger(event_open, settings.onOpen); - - $groupControls.add($title).hide(); - - $close.html(settings.close).show(); - } - - publicMethod.load(true); - } - } - - // ColorBox's markup needs to be added to the DOM prior to being called - // so that the browser will go ahead and load the CSS background images. - function appendHTML() { - if (!$box && document.body) { - init = false; - - $window = $(window); - $box = $tag(div).attr({id: colorbox, 'class': isIE ? prefix + (isIE6 ? 'IE6' : 'IE') : ''}).hide(); - $overlay = $tag(div, "Overlay", isIE6 ? 'position:absolute' : '').hide(); - $loadingOverlay = $tag(div, "LoadingOverlay").add($tag(div, "LoadingGraphic")); - $wrap = $tag(div, "Wrapper"); - $content = $tag(div, "Content").append( - $loaded = $tag(div, "LoadedContent", 'width:0; height:0; overflow:hidden'), - $title = $tag(div, "Title"), - $current = $tag(div, "Current"), - $next = $tag(div, "Next"), - $prev = $tag(div, "Previous"), - $slideshow = $tag(div, "Slideshow").bind(event_open, slideshow), - $close = $tag(div, "Close") - ); - - $wrap.append( // The 3x3 Grid that makes up ColorBox - $tag(div).append( - $tag(div, "TopLeft"), - $topBorder = $tag(div, "TopCenter"), - $tag(div, "TopRight") - ), - $tag(div, false, 'clear:left').append( - $leftBorder = $tag(div, "MiddleLeft"), - $content, - $rightBorder = $tag(div, "MiddleRight") - ), - $tag(div, false, 'clear:left').append( - $tag(div, "BottomLeft"), - $bottomBorder = $tag(div, "BottomCenter"), - $tag(div, "BottomRight") - ) - ).find('div div').css({'float': 'left'}); - - $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none'); - - $groupControls = $next.add($prev).add($current).add($slideshow); - - $(document.body).append($overlay, $box.append($wrap, $loadingBay)); - } - } - - // Add ColorBox's event bindings - function addBindings() { - if ($box) { - if (!init) { - init = true; - - // Cache values needed for size calculations - interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();//Subtraction needed for IE6 - interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width(); - loadedHeight = $loaded.outerHeight(true); - loadedWidth = $loaded.outerWidth(true); - - // Setting padding to remove the need to do size conversions during the animation step. - $box.css({"padding-bottom": interfaceHeight, "padding-right": interfaceWidth}); - - // Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly. - $next.click(function () { - publicMethod.next(); - }); - $prev.click(function () { - publicMethod.prev(); - }); - $close.click(function () { - publicMethod.close(); - }); - $overlay.click(function () { - if (settings.overlayClose) { - publicMethod.close(); - } - }); - - // Key Bindings - $(document).bind('keydown.' + prefix, function (e) { - var key = e.keyCode; - if (open && settings.escKey && key === 27) { - e.preventDefault(); - publicMethod.close(); - } - if (open && settings.arrowKey && $related[1]) { - if (key === 37) { - e.preventDefault(); - $prev.click(); - } else if (key === 39) { - e.preventDefault(); - $next.click(); - } - } - }); - - $('.' + boxElement, document).live('click', function (e) { - // ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt. - // See: http://jacklmoore.com/notes/click-events/ - if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey)) { - e.preventDefault(); - launch(this); - } - }); - } - return true; - } - return false; - } - - // Don't do anything if ColorBox already exists. - if ($.colorbox) { - return; - } - - // Append the HTML when the DOM loads - $(appendHTML); - - - // **************** - // PUBLIC FUNCTIONS - // Usage format: $.fn.colorbox.close(); - // Usage from within an iframe: parent.$.fn.colorbox.close(); - // **************** - - publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) { - var $this = this; - - options = options || {}; - - appendHTML(); - - if (addBindings()) { - if (!$this[0]) { - if ($this.selector) { // if a selector was given and it didn't match any elements, go ahead and exit. - return $this; - } - // if no selector was given (ie. $.colorbox()), create a temporary element to work with - $this = $(''); - options.open = true; // assume an immediate open - } - - if (callback) { - options.onComplete = callback; - } - - $this.each(function () { - $.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options)); - }).addClass(boxElement); - - if (($.isFunction(options.open) && options.open.call($this)) || options.open) { - launch($this[0]); - } - } - - return $this; - }; - - publicMethod.position = function (speed, loadedCallback) { - var - css, - top = 0, - left = 0, - offset = $box.offset(), - scrollTop, - scrollLeft; - - $window.unbind('resize.' + prefix); - - // remove the modal so that it doesn't influence the document width/height - $box.css({top: -9e4, left: -9e4}); - - scrollTop = $window.scrollTop(); - scrollLeft = $window.scrollLeft(); - - if (settings.fixed && !isIE6) { - offset.top -= scrollTop; - offset.left -= scrollLeft; - $box.css({position: 'fixed'}); - } else { - top = scrollTop; - left = scrollLeft; - $box.css({position: 'absolute'}); - } - - // keeps the top and left positions within the browser's viewport. - if (settings.right !== false) { - left += Math.max(winWidth() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0); - } else if (settings.left !== false) { - left += setSize(settings.left, 'x'); - } else { - left += Math.round(Math.max(winWidth() - settings.w - loadedWidth - interfaceWidth, 0) / 2); - } - - if (settings.bottom !== false) { - top += Math.max(winHeight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0); - } else if (settings.top !== false) { - top += setSize(settings.top, 'y'); - } else { - top += Math.round(Math.max(winHeight() - settings.h - loadedHeight - interfaceHeight, 0) / 2); - } - - $box.css({top: offset.top, left: offset.left}); - - // setting the speed to 0 to reduce the delay between same-sized content. - speed = ($box.width() === settings.w + loadedWidth && $box.height() === settings.h + loadedHeight) ? 0 : speed || 0; - - // this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly, - // but it has to be shrank down around the size of div#colorbox when it's done. If not, - // it can invoke an obscure IE bug when using iframes. - $wrap[0].style.width = $wrap[0].style.height = "9999px"; - - function modalDimensions(that) { - $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = that.style.width; - $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = that.style.height; - } - - css = {width: settings.w + loadedWidth, height: settings.h + loadedHeight, top: top, left: left}; - if(speed===0){ // temporary workaround to side-step jQuery-UI 1.8 bug (http://bugs.jquery.com/ticket/12273) - $box.css(css); - } - $box.dequeue().animate(css, { - duration: speed, - complete: function () { - modalDimensions(this); - - active = false; - - // shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation. - $wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px"; - $wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px"; - - if (settings.reposition) { - setTimeout(function () { // small delay before binding onresize due to an IE8 bug. - $window.bind('resize.' + prefix, publicMethod.position); - }, 1); - } - - if (loadedCallback) { - loadedCallback(); - } - }, - step: function () { - modalDimensions(this); - } - }); - }; - - publicMethod.resize = function (options) { - if (open) { - options = options || {}; - - if (options.width) { - settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth; - } - if (options.innerWidth) { - settings.w = setSize(options.innerWidth, 'x'); - } - $loaded.css({width: settings.w}); - - if (options.height) { - settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight; - } - if (options.innerHeight) { - settings.h = setSize(options.innerHeight, 'y'); - } - if (!options.innerHeight && !options.height) { - $loaded.css({height: "auto"}); - settings.h = $loaded.height(); - } - $loaded.css({height: settings.h}); - - publicMethod.position(settings.transition === "none" ? 0 : settings.speed); - } - }; - - publicMethod.prep = function (object) { - if (!open) { - return; - } - - var callback, speed = settings.transition === "none" ? 0 : settings.speed; - - $loaded.remove(); - $loaded = $tag(div, 'LoadedContent').append(object); - - function getWidth() { - settings.w = settings.w || $loaded.width(); - settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w; - return settings.w; - } - function getHeight() { - settings.h = settings.h || $loaded.height(); - settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h; - return settings.h; - } - - $loaded.hide() - .appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations. - .css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'}) - .css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height. - .prependTo($content); - - $loadingBay.hide(); - - // floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width. - //$(photo).css({'float': 'none', marginLeft: 'auto', marginRight: 'auto'}); - - $(photo).css({'float': 'none'}); - - // Hides SELECT elements in IE6 because they would otherwise sit on top of the overlay. - if (isIE6) { - $('select').not($box.find('select')).filter(function () { - return this.style.visibility !== 'hidden'; - }).css({'visibility': 'hidden'}).one(event_cleanup, function () { - this.style.visibility = 'inherit'; - }); - } - - callback = function () { - var preload, - i, - total = $related.length, - iframe, - frameBorder = 'frameBorder', - allowTransparency = 'allowTransparency', - complete, - src, - img, - data; - - if (!open) { - return; - } - - function removeFilter() { - if (isIE) { - $box[0].style.removeAttribute('filter'); - } - } - - complete = function () { - clearTimeout(loadingTimer); - // Detaching forces Andriod stock browser to redraw the area underneat the loading overlay. Hiding alone isn't enough. - $loadingOverlay.detach().hide(); - trigger(event_complete, settings.onComplete); - }; - - if (isIE) { - //This fadeIn helps the bicubic resampling to kick-in. - if (photo) { - $loaded.fadeIn(100); - } - } - - $title.html(settings.title).add($loaded).show(); - - if (total > 1) { // handle grouping - if (typeof settings.current === "string") { - $current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show(); - } - - $next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next); - $prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous); - - if (settings.slideshow) { - $slideshow.show(); - } - - // Preloads images within a rel group - if (settings.preloading) { - preload = [ - getIndex(-1), - getIndex(1) - ]; - while (i = $related[preload.pop()]) { - data = $.data(i, colorbox); - - if (data && data.href) { - src = data.href; - if ($.isFunction(src)) { - src = src.call(i); - } - } else { - src = i.href; - } - - if (isImage(src)) { - img = new Image(); - img.src = src; - } - } - } - } else { - $groupControls.hide(); - } - - if (settings.iframe) { - iframe = $tag('iframe')[0]; - - if (frameBorder in iframe) { - iframe[frameBorder] = 0; - } - - if (allowTransparency in iframe) { - iframe[allowTransparency] = "true"; - } - - if (!settings.scrolling) { - iframe.scrolling = "no"; - } - - $(iframe) - .attr({ - src: settings.href, - name: (new Date()).getTime(), // give the iframe a unique name to prevent caching - 'class': prefix + 'Iframe', - allowFullScreen : true, // allow HTML5 video to go fullscreen - webkitAllowFullScreen : true, - mozallowfullscreen : true - }) - .one('load', complete) - .one(event_purge, function () { - iframe.src = "//about:blank"; - }) - .appendTo($loaded); - - if (settings.fastIframe) { - $(iframe).trigger('load'); - } - } else { - complete(); - } - - if (settings.transition === 'fade') { - $box.fadeTo(speed, 1, removeFilter); - } else { - removeFilter(); - } - }; - - if (settings.transition === 'fade') { - $box.fadeTo(speed, 0, function () { - publicMethod.position(0, callback); - }); - } else { - publicMethod.position(speed, callback); - } - }; - - publicMethod.load = function (launched) { - var href, setResize, prep = publicMethod.prep; - - active = true; - - photo = false; - - element = $related[index]; - - if (!launched) { - makeSettings(); - } - - trigger(event_purge); - - trigger(event_load, settings.onLoad); - - settings.h = settings.height ? - setSize(settings.height, 'y') - loadedHeight - interfaceHeight : - settings.innerHeight && setSize(settings.innerHeight, 'y'); - - settings.w = settings.width ? - setSize(settings.width, 'x') - loadedWidth - interfaceWidth : - settings.innerWidth && setSize(settings.innerWidth, 'x'); - - // Sets the minimum dimensions for use in image scaling - settings.mw = settings.w; - settings.mh = settings.h; - - // Re-evaluate the minimum width and height based on maxWidth and maxHeight values. - // If the width or height exceed the maxWidth or maxHeight, use the maximum values instead. - if (settings.maxWidth) { - settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth; - settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw; - } - if (settings.maxHeight) { - settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight; - settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh; - } - - href = settings.href; - - loadingTimer = setTimeout(function () { - $loadingOverlay.show().appendTo($content); - }, 100); - - if (settings.inline) { - // Inserts an empty placeholder where inline content is being pulled from. - // An event is bound to put inline content back when ColorBox closes or loads new content. - $tag(div).hide().insertBefore($(href)[0]).one(event_purge, function () { - $(this).replaceWith($loaded.children()); - }); - prep($(href)); - } else if (settings.iframe) { - // IFrame element won't be added to the DOM until it is ready to be displayed, - // to avoid problems with DOM-ready JS that might be trying to run in that iframe. - prep(" "); - } else if (settings.html) { - prep(settings.html); - } else if (isImage(href)) { - $(photo = new Image()) - .addClass(prefix + 'Photo') - .error(function () { - settings.title = false; - prep($tag(div, 'Error').html(settings.imgError)); - }) - .load(function () { - var percent; - photo.onload = null; //stops animated gifs from firing the onload repeatedly. - - if (settings.scalePhotos) { - setResize = function () { - photo.height -= photo.height * percent; - photo.width -= photo.width * percent; - }; - if (settings.mw && photo.width > settings.mw) { - percent = (photo.width - settings.mw) / photo.width; - setResize(); - } - if (settings.mh && photo.height > settings.mh) { - percent = (photo.height - settings.mh) / photo.height; - setResize(); - } - } - - if (settings.h) { - photo.style.marginTop = Math.max(settings.h - photo.height, 0) / 2 + 'px'; - } - - if ($related[1] && (settings.loop || $related[index + 1])) { - photo.style.cursor = 'pointer'; - photo.onclick = function () { - publicMethod.next(); - }; - } - - if (isIE) { - photo.style.msInterpolationMode = 'bicubic'; - } - - setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise. - prep(photo); - }, 1); - }); - - setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise. - photo.src = href; - }, 1); - } else if (href) { - $loadingBay.load(href, settings.data, function (data, status, xhr) { - prep(status === 'error' ? $tag(div, 'Error').html(settings.xhrError) : $(this).contents()); - }); - } - }; - - // Navigates to the next page/image in a set. - publicMethod.next = function () { - if (!active && $related[1] && (settings.loop || $related[index + 1])) { - index = getIndex(1); - publicMethod.load(); - } - }; - - publicMethod.prev = function () { - if (!active && $related[1] && (settings.loop || index)) { - index = getIndex(-1); - publicMethod.load(); - } - }; - - // Note: to use this within an iframe use the following format: parent.$.fn.colorbox.close(); - publicMethod.close = function () { - if (open && !closing) { - - closing = true; - - open = false; - - trigger(event_cleanup, settings.onCleanup); - - $window.unbind('.' + prefix + ' .' + event_ie6); - - $overlay.fadeTo(200, 0); - - $box.stop().fadeTo(300, 0, function () { - - $box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide(); - - trigger(event_purge); - - $loaded.remove(); - - setTimeout(function () { - closing = false; - trigger(event_closed, settings.onClosed); - }, 1); - }); - } - }; - - // Removes changes ColorBox made to the document, but does not remove the plugin - // from jQuery. - publicMethod.remove = function () { - $([]).add($box).add($overlay).remove(); - $box = null; - $('.' + boxElement) - .removeData(colorbox) - .removeClass(boxElement) - .die(); - }; - - // A method for fetching the current element ColorBox is referencing. - // returns a jQuery object. - publicMethod.element = function () { - return $(element); - }; - - publicMethod.settings = defaults; - -}(jQuery, document, window)); -/* - * File: jquery.dataTables.min.js - * Version: 1.7.0 - * Author: Allan Jardine (www.sprymedia.co.uk) - * Info: www.datatables.net - * - * Copyright 2008-2010 Allan Jardine, all rights reserved. - * - * This source file is free software, under either the GPL v2 license or a - * BSD style license, as supplied with this software. - * - * This source file is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. - */ - -(function(j,Y,p){j.fn.dataTableSettings=[];var E=j.fn.dataTableSettings;j.fn.dataTableExt={};var m=j.fn.dataTableExt;m.sVersion="1.7.0";m.sErrMode="alert";m.iApiIndex=0;m.oApi={};m.afnFiltering=[];m.aoFeatures=[];m.ofnSearch={};m.afnSortData=[];m.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active", -sPageButtonStaticDisabled:"paginate_button",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled", -sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""};m.oJUIClasses={sPagePrevEnabled:"fg-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-state-default ui-corner-left ui-state-disabled", -sPageNextEnabled:"fg-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-state-default",sPageButtonActive:"fg-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next", -sPageLast:"last ui-corner-tr ui-corner-br",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset fg-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default", -sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default", -sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};m.oPagination={two_button:{fnInit:function(g,l,q){var r,u,y;if(g.bJUI){r=p.createElement("a");u=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;u.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev;r.appendChild(y)}else{r=p.createElement("div");u=p.createElement("div")}r.className=g.oClasses.sPagePrevDisabled;u.className=g.oClasses.sPageNextDisabled;r.title=g.oLanguage.oPaginate.sPrevious; -u.title=g.oLanguage.oPaginate.sNext;l.appendChild(r);l.appendChild(u);j(r).click(function(){g.oApi._fnPageChange(g,"previous")&&q(g)});j(u).click(function(){g.oApi._fnPageChange(g,"next")&&q(g)});j(r).bind("selectstart",function(){return false});j(u).bind("selectstart",function(){return false});if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");r.setAttribute("id",g.sTableId+"_previous");u.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){if(g.aanFeatures.p)for(var l= -g.aanFeatures.p,q=0,r=l.length;q=u-r){r=u-q+1;w=u}else{r=y-Math.ceil(q/2)+1;w=r+q-1}for(q=r;q<=w;q++)C+=y!=q?''+q+"":''+q+"";w=g.aanFeatures.p;var z,D=function(){g._iDisplayStart= -(this.innerHTML*1-1)*g._iDisplayLength;l(g);return false},L=function(){return false};q=0;for(r=w.length;ql?1:0},"string-desc":function(g,l){g=g.toLowerCase();l=l.toLowerCase();return gl?-1:0},"html-asc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase(); -l=l.replace(/<.*?>/g,"").toLowerCase();return gl?1:0},"html-desc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return gl?-1:0},"date-asc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return g-l},"date-desc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l=== -"")l=Date.parse("01/01/1970 00:00:00");return l-g},"numeric-asc":function(g,l){return(g=="-"||g===""?0:g*1)-(l=="-"||l===""?0:l*1)},"numeric-desc":function(g,l){return(l=="-"||l===""?0:l*1)-(g=="-"||g===""?0:g*1)}};m.aTypes=[function(g){if(g.length===0)return"numeric";var l,q=false;l=g.charAt(0);if("0123456789-".indexOf(l)==-1)return null;for(var r=1;r")!=-1)return"html";return null}];m.fnVersionCheck=function(g){var l=function(w,x){for(;w.length=parseInt(u,10)};m._oExternConfig={iNextUnique:0};j.fn.dataTable=function(g){function l(){this.fnRecordsTotal=function(){return this.oFeatures.bServerSide? -this._iRecordsTotal:this.aiDisplayMaster.length};this.fnRecordsDisplay=function(){return this.oFeatures.bServerSide?this._iRecordsDisplay:this.aiDisplay.length};this.fnDisplayEnd=function(){return this.oFeatures.bServerSide?this.oFeatures.bPaginate===false?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iDisplayStart+this.aiDisplay.length):this._iDisplayEnd};this.sInstance=this.oInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true, -bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false};this.oScroll={sX:"",sXInner:"",sY:"",bCollapse:false,iBarWidth:0};this.aanFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)", -sInfoPostFix:"",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"}};this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster=[];this.aoColumns=[];this.iNextId=0;this.asDataSearch=[];this.oPreviousSearch={sSearch:"",bRegex:false,bSmart:true};this.aoPreSearchCols=[];this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripClasses=[];this.asDestoryStrips=[];this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null;this.aoDrawCallback=[]; -this.fnInitComplete=null;this.sTableId="";this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null;this.iDefaultSortIndex=0;this.bInitialised=false;this.aoOpenRows=[];this.sDom="lfrtip";this.sPaginationType="two_button";this.iCookieDuration=7200;this.sCookiePrefix="SpryMedia_DataTables_";this.sAjaxSource=null;this.bAjaxDataGet=true;this.fnServerData=function(a,b,c){j.ajax({url:a,data:b,success:c,dataType:"json",cache:false,error:function(){alert("DataTables warning: JSON data from server failed to load or be parsed. This is most likely to be caused by a JSON formatting error.")}})}; -this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;d=a.fnRecordsDisplay()?0:a.iInitDisplayStart;a.iInitDisplayStart=-1;F(a)}if(!(a.oFeatures.bServerSide&&!oa(a))){if(a.aiDisplay.length!==0){var i=a._iDisplayStart,h=a._iDisplayEnd;if(a.oFeatures.bServerSide){i=0;h=a.aoData.length}for(i=i;itr",a.nTHead)[0],V(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);typeof a.fnFooterCallback=="function"&&a.fnFooterCallback.call(a.oInstance,j(">tr",a.nTFoot)[0],V(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);f= -p.createDocumentFragment();b=p.createDocumentFragment();if(a.nTBody){e=a.nTBody.parentNode;b.appendChild(a.nTBody);c=a.nTBody.childNodes;for(b=c.length-1;b>=0;b--)c[b].parentNode.removeChild(c[b]);b=0;for(c=d.length;bj(a.nTable.parentNode).width()&&U(a)}b=0;for(c=a.aoDrawCallback.length;b< -c;b++)a.aoDrawCallback[b].fn.call(a.oInstance,a);a.bSorted=false;a.bFiltered=false}}function L(a){if(a.oFeatures.bSort)O(a,a.oPreviousSearch);else if(a.oFeatures.bFilter)P(a,a.oPreviousSearch);else{F(a);D(a)}}function oa(a){if(a.bAjaxDataGet){K(a,true);var b=a.aoColumns.length,c=[],d;a.iDraw++;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:aa(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:a.oFeatures.bPaginate!== -false?a._iDisplayLength:-1});if(a.oFeatures.bFilter!==false){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(d=0;d")c=c.parentNode;else if(i=="l"&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange){f=ra(a);e=1}else if(i=="f"&&a.oFeatures.bFilter){f=sa(a);e=1}else if(i=="r"&&a.oFeatures.bProcessing){f=ta(a);e=1}else if(i=="t"){f=ua(a);e=1}else if(i=="i"&&a.oFeatures.bInfo){f=va(a);e=1}else if(i=="p"&&a.oFeatures.bPaginate){f=wa(a);e=1}else if(m.aoFeatures.length!==0){h=m.aoFeatures;k=0;for(o=h.length;kcaption",a.nTable);i=0;for(k=d.length;i0&&a.nTable.removeChild(i[0]);if(a.nTFoot!==null){k=a.nTable.getElementsByTagName("tfoot");k.length>0&&a.nTable.removeChild(k[0])}i= -a.nTHead.cloneNode(true);a.nTable.insertBefore(i,a.nTable.childNodes[0]);if(a.nTFoot!==null){k=a.nTFoot.cloneNode(true);a.nTable.insertBefore(k,a.nTable.childNodes[1])}var I=ca(i);f=0;for(e=I.length;ff-a.oScroll.iBarWidth)a.nTable.style.width=v(f)}else a.nTable.style.width=v(f);f=j(a.nTable).outerWidth();e=a.nTHead.getElementsByTagName("tr");i=i.getElementsByTagName("tr");M(function(A,G){o=A.style;o.paddingTop="0";o.paddingBottom="0";o.borderTopWidth="0";o.borderBottomWidth= -"0";o.height=0;s=j(A).width();G.style.width=v(s);H.push(s)},i,e);if(a.nTFoot!==null){h=k.getElementsByTagName("tr");k=a.nTFoot.getElementsByTagName("tr");M(function(A,G){o=A.style;o.paddingTop="0";o.paddingBottom="0";o.borderTopWidth="0";o.borderBottomWidth="0";s=j(A).width();G.style.width=v(s);H.push(s)},h,k)}M(function(A){A.innerHTML="";A.style.width=v(H.shift())},i);a.nTFoot!==null&&M(function(A){A.innerHTML="";A.style.width=v(H.shift())},h);if(j(a.nTable).outerWidth()d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight'; -var c=j("input",b);c.val(a.oPreviousSearch.sSearch.replace('"',"""));c.keyup(function(){for(var d=a.aanFeatures.f,f=0,e=d.length;f=0;d--){f=ga(a.aoData[a.aiDisplay[d]]._aData[c],a.aoColumns[c].sType);if(!b.test(f)){a.aiDisplay.splice(d, -1);e++}}}}function ya(a,b,c,d,f){var e=fa(b,d,f);if(typeof c=="undefined"||c===null)c=0;if(m.afnFiltering.length!==0)c=1;if(b.length<=0){a.aiDisplay.splice(0,a.aiDisplay.length);a.aiDisplay=a.aiDisplayMaster.slice()}else if(a.aiDisplay.length==a.aiDisplayMaster.length||a.oPreviousSearch.sSearch.length>b.length||c==1||b.indexOf(a.oPreviousSearch.sSearch)!==0){a.aiDisplay.splice(0,a.aiDisplay.length);Q(a,1);for(c=0;c/g,"");else if(typeof a=="string")return a.replace(/\n/g, -" ");return a}function O(a,b){var c=[],d=m.oSort,f=a.aoData,e,i,h,k;if(!a.oFeatures.bServerSide&&(a.aaSorting.length!==0||a.aaSortingFixed!==null)){c=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(h=0;h0){e=a.aoColumns[c[c.length-1][0]].iDataSort;i=a.aoColumns[e].sType;k+="iTest = oSort['"+i+"-"+c[c.length-1][1]+"']( aoData[a]._aData["+e+"], aoData[b]._aData["+e+"] );if (iTest===0) return oSort['numeric-"+c[c.length-1][1]+"'](a, b); return iTest;}";eval(k);a.aiDisplayMaster.sort(this.ClosureDataTables.fn)}this.ClosureDataTables=undefined}}if(typeof b=="undefined"||b)W(a);a.bSorted=true;if(a.oFeatures.bFilter)P(a, -a.oPreviousSearch,1);else{a.aiDisplay=a.aiDisplayMaster.slice();a._iDisplayStart=0;F(a);D(a)}}function $(a,b,c,d){j(b).click(function(f){if(a.aoColumns[c].bSortable!==false){var e=function(){var i,h;if(f.shiftKey){for(var k=false,o=0;o=i)for(b=0;b=0?a._iDisplayStart-a._iDisplayLength:0;if(a._iDisplayStart<0)a._iDisplayStart=0}else if(b=="next")if(a._iDisplayLength>=0){if(a._iDisplayStart+a._iDisplayLength=0){b=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(b-1)*a._iDisplayLength}else a._iDisplayStart=0;else J(a,0,"Unknown paging action: "+b);return c!=a._iDisplayStart}function va(a){var b=p.createElement("div");b.className=a.oClasses.sInfo;if(typeof a.aanFeatures.i=="undefined"){a.aoDrawCallback.push({fn:Ca,sName:"information"});a.sTableId!==""&&b.setAttribute("id",a.sTableId+"_info")}return b} -function Ca(a){if(!(!a.oFeatures.bInfo||a.aanFeatures.i.length===0)){var b=j(a.aanFeatures.i[0]),c=a.fnFormatNumber(a.fnRecordsTotal()),d=a.fnFormatNumber(a._iDisplayStart+1),f=a.fnFormatNumber(a.fnDisplayEnd()),e=a.fnFormatNumber(a.fnRecordsDisplay());if(a.fnRecordsDisplay()===0&&a.fnRecordsDisplay()==a.fnRecordsTotal())b.html(a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix);else if(a.fnRecordsDisplay()===0)b.html(a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",c)+a.oLanguage.sInfoPostFix); -else a.fnRecordsDisplay()==a.fnRecordsTotal()?b.html(a.oLanguage.sInfo.replace("_START_",d).replace("_END_",f).replace("_TOTAL_",e)+a.oLanguage.sInfoPostFix):b.html(a.oLanguage.sInfo.replace("_START_",d).replace("_END_",f).replace("_TOTAL_",e)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix);a=a.aanFeatures.i;if(a.length>1){b=b.html();c=1;for(d=a.length;c",c,d;if(a.aLengthMenu.length==2&&typeof a.aLengthMenu[0]=="object"&&typeof a.aLengthMenu[1]=="object"){c=0;for(d=a.aLengthMenu[0].length;c'+a.aLengthMenu[1][c]+""}else{c=0;for(d=a.aLengthMenu.length;c'+a.aLengthMenu[c]+""}b+="";var f=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.l=="undefined"&&f.setAttribute("id",a.sTableId+ -"_length");f.className=a.oClasses.sLength;f.innerHTML=a.oLanguage.sLengthMenu.replace("_MENU_",b);j('select option[value="'+a._iDisplayLength+'"]',f).attr("selected",true);j("select",f).change(function(){var e=j(this).val(),i=a.aanFeatures.l;c=0;for(d=i.length;ca.aiDisplay.length||a._iDisplayLength==-1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Da(a,b){if(!a||a===null||a==="")return 0;if(typeof b=="undefined")b=p.getElementsByTagName("body")[0];var c=p.createElement("div");c.style.width=a;b.appendChild(c);a=c.offsetWidth;b.removeChild(c);return a}function ea(a){var b=0,c,d=0,f=a.aoColumns.length,e,i=j("th",a.nTHead);for(e= -0;etd",b);e.each(function(h){this.style.width="";h=da(a,h);if(h!==null&&a.aoColumns[h].sWidthOrig!=="")this.style.width=a.aoColumns[h].sWidthOrig});for(e=0;etd",b);if(f.length===0)f=j("thead tr:eq(0)>th",b);for(e=c=0;e0)a.aoColumns[e].sWidth=v(d);c++}a.nTable.style.width=v(j(b).outerWidth());b.parentNode.removeChild(b)}}function ia(a,b){if(a.oScroll.sX===""&&a.oScroll.sY!== -""){j(b).width();b.style.width=v(j(b).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sX!=="")b.style.width=v(j(b).outerWidth())}function Ea(a,b,c){if(typeof c=="undefined"||c){c=Fa(a,b);b=N(a,b);if(c<0)return null;return a.aoData[c].nTr.getElementsByTagName("td")[b]}var d=-1,f,e;c=-1;var i=p.createElement("div");i.style.visibility="hidden";i.style.position="absolute";p.body.appendChild(i);f=0;for(e=a.aoData.length;fd){d=i.offsetWidth; -c=f}}p.body.removeChild(i);if(c>=0){b=N(a,b);if(a=a.aoData[c].nTr.getElementsByTagName("td")[b])return a}return null}function Fa(a,b){for(var c=0,d=-1,f=0;fc){c=e.length;d=f}}return d}function v(a){if(a===null)return"0px";if(typeof a=="number")return a+"px";if(a.indexOf("em")!=-1||a.indexOf("%")!=-1||a.indexOf("ex")!=-1||a.indexOf("px")!=-1)return a;return a+"px"}function La(a,b){if(a.length!=b.length)return 1;for(var c=0;cb&&a[d]--;c!=-1&&a.splice(c,1)}function qa(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d< -f;d++)for(var e=0;e4096){e=p.cookie.split(";");for(var h=0,k=e.length;h=d.aiDisplay.length){d._iDisplayStart-=d._iDisplayLength;if(d._iDisplayStart<0)d._iDisplayStart=0}if(typeof c=="undefined"||c){F(d);D(d)}return f};this.fnClearTable=function(a){var b=B(this[m.iApiIndex]);ba(b);if(typeof a=="undefined"||a)D(b)};this.fnOpen=function(a,b,c){var d=B(this[m.iApiIndex]);this.fnClose(a);var f=p.createElement("tr"),e=p.createElement("td");f.appendChild(e);e.className=c;e.colSpan=T(d);e.innerHTML=b;b=j("tr",d.nTBody);j.inArray(a,b)!=-1&&j(f).insertAfter(a); -d.aoOpenRows.push({nTr:f,nParent:a});return f};this.fnClose=function(a){for(var b=B(this[m.iApiIndex]),c=0;ctr",c.nTHead)[0];var h=j(">tr",c.nTFoot)[0],k=[],o=[];for(d=0;d< -f;d++){k.push(c.aoColumns[d].nTh);o.push(c.aoColumns[d].nTf)}if(b){for(d=b=0;d=T(c)){e.appendChild(k[a]);h&&h.appendChild(o[a]);d=0;for(f=c.aoData.length;dtd:eq("+i+")",c.aoData[d].nTr)[0])}}c.aoColumns[a].bVisible=true}else{e.removeChild(k[a]);h&&h.removeChild(o[a]);i=X(c);d=0;for(f=c.aoData.length;dtr:even",c).addClass(a.asDestoryStrips[0]);j(">tr:odd",c).addClass(a.asDestoryStrips[1]);b=0;for(d=E.length;bt<"F"ip>'}if(e.oScroll.sX!== -""||e.oScroll.sY!=="")e.oScroll.iBarWidth=Ja();if(typeof g.iDisplayStart!="undefined"&&typeof e.iInitDisplayStart=="undefined"){e.iInitDisplayStart=g.iDisplayStart;e._iDisplayStart=g.iDisplayStart}if(typeof g.bStateSave!="undefined"){e.oFeatures.bStateSave=g.bStateSave;Ia(e,g);e.aoDrawCallback.push({fn:Ga,sName:"state_save"})}if(typeof g.aaData!="undefined")h=true;if(typeof g!="undefined"&&typeof g.aoData!="undefined")g.aoColumns=g.aoData;if(typeof g.oLanguage!="undefined")if(typeof g.oLanguage.sUrl!= -"undefined"&&g.oLanguage.sUrl!==""){e.oLanguage.sUrl=g.oLanguage.sUrl;j.getJSON(e.oLanguage.sUrl,null,function(o){u(e,o,true)});i=true}else u(e,g.oLanguage,false)}else g={};if(typeof g.asStripClasses=="undefined"){e.asStripClasses.push(e.oClasses.sStripOdd);e.asStripClasses.push(e.oClasses.sStripEven)}c=false;d=j("tbody>tr",this);a=0;for(b=e.asStripClasses.length;a=0;a--){k=g.aoColumnDefs[a].aTargets;c=0;for(d=k.length;c=0){for(;e.aoColumns.length<=k[c];)y(e);C(e,k[c],g.aoColumnDefs[a])}else if(typeof k[c]=="number"&&k[c]<0)C(e,e.aoColumns.length+k[c],g.aoColumnDefs[a]);else if(typeof k[c]=="string"){b= -0;for(f=e.aoColumns.length;b0)e.nTFoot=this.getElementsByTagName("tfoot")[0];if(h)for(a=0;a y) ? 1 : 0)); -}; - -jQuery.fn.dataTableExt.oSort['percent-desc'] = function(a,b) { - var x = (a == "-") ? 0 : a.replace( /%/, "" ); - var y = (b == "-") ? 0 : b.replace( /%/, "" ); - x = parseFloat( x ); - y = parseFloat( y ); - return ((x < y) ? 1 : ((x > y) ? -1 : 0)); -}; -/* - * timeago: a jQuery plugin, version: 0.9 (2010-06-21) - * @requires jQuery v1.2.3 or later - * - * Timeago is a jQuery plugin that makes it easy to support automatically - * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago"). - * - * For usage and examples, visit: - * http://timeago.yarp.com/ - * - * Licensed under the MIT: - * http://www.opensource.org/licenses/mit-license.php - * - * Copyright (c) 2008-2010, Ryan McGeary (ryanonjavascript -[at]- mcgeary [*dot*] org) - */ - -(function($) { - $.timeago = function(timestamp) { - if (timestamp instanceof Date) return inWords(timestamp); - else if (typeof timestamp == "string") return inWords($.timeago.parse(timestamp)); - else return inWords($.timeago.datetime(timestamp)); - }; - var $t = $.timeago; - - $.extend($.timeago, { - settings: { - refreshMillis: 60000, - allowFuture: false, - strings: { - prefixAgo: null, - prefixFromNow: null, - suffixAgo: "ago", - suffixFromNow: "from now", - seconds: "less than a minute", - minute: "about a minute", - minutes: "%d minutes", - hour: "about an hour", - hours: "about %d hours", - day: "a day", - days: "%d days", - month: "about a month", - months: "%d months", - year: "about a year", - years: "%d years", - numbers: [] - } - }, - inWords: function(distanceMillis) { - var $l = this.settings.strings; - var prefix = $l.prefixAgo; - var suffix = $l.suffixAgo; - if (this.settings.allowFuture) { - if (distanceMillis < 0) { - prefix = $l.prefixFromNow; - suffix = $l.suffixFromNow; - } - distanceMillis = Math.abs(distanceMillis); - } - - var seconds = distanceMillis / 1000; - var minutes = seconds / 60; - var hours = minutes / 60; - var days = hours / 24; - var years = days / 365; - - function substitute(stringOrFunction, number) { - var string = $.isFunction(stringOrFunction) ? stringOrFunction(number) : stringOrFunction; - var value = ($l.numbers && $l.numbers[number]) || number; - return string.replace(/%d/i, value); - } - - var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) || - seconds < 90 && substitute($l.minute, 1) || - minutes < 45 && substitute($l.minutes, Math.round(minutes)) || - minutes < 90 && substitute($l.hour, 1) || - hours < 24 && substitute($l.hours, Math.round(hours)) || - hours < 48 && substitute($l.day, 1) || - days < 30 && substitute($l.days, Math.floor(days)) || - days < 60 && substitute($l.month, 1) || - days < 365 && substitute($l.months, Math.floor(days / 30)) || - years < 2 && substitute($l.year, 1) || - substitute($l.years, Math.floor(years)); - - return $.trim([prefix, words, suffix].join(" ")); - }, - parse: function(iso8601) { - var s = $.trim(iso8601); - s = s.replace(/\.\d\d\d/,""); // remove milliseconds - s = s.replace(/-/,"/").replace(/-/,"/"); - s = s.replace(/T/," ").replace(/Z/," UTC"); - s = s.replace(/([\+-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400 - return new Date(s); - }, - datetime: function(elem) { - // jQuery's `is()` doesn't play well with HTML5 in IE - var isTime = $(elem).get(0).tagName.toLowerCase() == "time"; // $(elem).is("time"); - var iso8601 = isTime ? $(elem).attr("datetime") : $(elem).attr("title"); - return $t.parse(iso8601); - } - }); - - $.fn.timeago = function() { - var self = this; - self.each(refresh); - - var $s = $t.settings; - if ($s.refreshMillis > 0) { - setInterval(function() { self.each(refresh); }, $s.refreshMillis); - } - return self; - }; - - function refresh() { - var data = prepareData(this); - if (!isNaN(data.datetime)) { - $(this).text(inWords(data.datetime)); - } - return this; - } - - function prepareData(element) { - element = $(element); - if (!element.data("timeago")) { - element.data("timeago", { datetime: $t.datetime(element) }); - var text = $.trim(element.text()); - if (text.length > 0) element.attr("title", text); - } - return element.data("timeago"); - } - - function inWords(date) { - return $t.inWords(distance(date)); - } - - function distance(date) { - return (new Date().getTime() - date.getTime()); - } - - // fix for IE6 suckage - document.createElement("abbr"); - document.createElement("time"); -})(jQuery); -// JQuery URL Parser -// Written by Mark Perkins, mark@allmarkedup.com -// License: http://unlicense.org/ (i.e. do what you want with it!) - -jQuery.url = function() -{ - var segments = {}; - - var parsed = {}; - - /** - * Options object. Only the URI and strictMode values can be changed via the setters below. - */ - var options = { - - url : window.location, // default URI is the page in which the script is running - - strictMode: false, // 'loose' parsing by default - - key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], // keys available to query - - q: { - name: "queryKey", - parser: /(?:^|&)([^&=]*)=?([^&]*)/g - }, - - parser: { - strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, //less intuitive, more accurate to the specs - loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ // more intuitive, fails on relative paths and deviates from specs - } - - }; - - /** - * Deals with the parsing of the URI according to the regex above. - * Written by Steven Levithan - see credits at top. - */ - var parseUri = function() - { - str = decodeURI( options.url ); - - var m = options.parser[ options.strictMode ? "strict" : "loose" ].exec( str ); - var uri = {}; - var i = 14; - - while ( i-- ) { - uri[ options.key[i] ] = m[i] || ""; - } - - uri[ options.q.name ] = {}; - uri[ options.key[12] ].replace( options.q.parser, function ( $0, $1, $2 ) { - if ($1) { - uri[options.q.name][$1] = $2; - } - }); - - return uri; - }; - - /** - * Returns the value of the passed in key from the parsed URI. - * - * @param string key The key whose value is required - */ - var key = function( key ) - { - if ( ! parsed.length ) - { - setUp(); // if the URI has not been parsed yet then do this first... - } - if ( key == "base" ) - { - if ( parsed.port !== null && parsed.port !== "" ) - { - return parsed.protocol+"://"+parsed.host+":"+parsed.port+"/"; - } - else - { - return parsed.protocol+"://"+parsed.host+"/"; - } - } - - return ( parsed[key] === "" ) ? null : parsed[key]; - }; - - /** - * Returns the value of the required query string parameter. - * - * @param string item The parameter whose value is required - */ - var param = function( item ) - { - if ( ! parsed.length ) - { - setUp(); // if the URI has not been parsed yet then do this first... - } - return ( parsed.queryKey[item] === null ) ? null : parsed.queryKey[item]; - }; - - /** - * 'Constructor' (not really!) function. - * Called whenever the URI changes to kick off re-parsing of the URI and splitting it up into segments. - */ - var setUp = function() - { - parsed = parseUri(); - - getSegments(); - }; - - /** - * Splits up the body of the URI into segments (i.e. sections delimited by '/') - */ - var getSegments = function() - { - var p = parsed.path; - segments = []; // clear out segments array - segments = parsed.path.length == 1 ? {} : ( p.charAt( p.length - 1 ) == "/" ? p.substring( 1, p.length - 1 ) : path = p.substring( 1 ) ).split("/"); - }; - - return { - - /** - * Sets the parsing mode - either strict or loose. Set to loose by default. - * - * @param string mode The mode to set the parser to. Anything apart from a value of 'strict' will set it to loose! - */ - setMode : function( mode ) - { - strictMode = mode == "strict" ? true : false; - return this; - }, - - /** - * Sets URI to parse if you don't want to to parse the current page's URI. - * Calling the function with no value for newUri resets it to the current page's URI. - * - * @param string newUri The URI to parse. - */ - setUrl : function( newUri ) - { - options.url = newUri === undefined ? window.location : newUri; - setUp(); - return this; - }, - - /** - * Returns the value of the specified URI segment. Segments are numbered from 1 to the number of segments. - * For example the URI http://test.com/about/company/ segment(1) would return 'about'. - * - * If no integer is passed into the function it returns the number of segments in the URI. - * - * @param int pos The position of the segment to return. Can be empty. - */ - segment : function( pos ) - { - if ( ! parsed.length ) - { - setUp(); // if the URI has not been parsed yet then do this first... - } - if ( pos === undefined ) - { - return segments.length; - } - return ( segments[pos] === "" || segments[pos] === undefined ) ? null : segments[pos]; - }, - - attr : key, // provides public access to private 'key' function - see above - - param : param // provides public access to private 'param' function - see above - - }; - -}(); - - - - -$(document).ready(function() { - // Configuration for fancy sortable tables for source file groups - $('.file_list').dataTable({ - "aaSorting": [[ 1, "asc" ]], - "bPaginate": false, - "bJQueryUI": true, - "aoColumns": [ - null, - { "sType": "percent" }, - null, - null, - null, - null, - null - ] - }); - - // Syntax highlight all files up front - deactivated - // $('.source_table pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')}); - - // Syntax highlight source files on first toggle of the file view popup - $("a.src_link").click(function() { - // Get the source file element that corresponds to the clicked element - var source_table = $($(this).attr('href')); - - // If not highlighted yet, do it! - if (!source_table.hasClass('highlighted')) { - source_table.find('pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')}); - source_table.addClass('highlighted'); - }; - }); - - var prev_anchor; - var curr_anchor; - - // Set-up of popup for source file views - $("a.src_link").colorbox({ - transition: "none", - inline: true, - opacity: 1, - width: "95%", - height: "95%", - onLoad: function() { - if (prev_anchor) { - prev_anchor = jQuery.url.attr('anchor'); - } - curr_anchor = this.href.split('#')[1]; - window.location.hash = curr_anchor; - }, - onCleanup: function() { - if (prev_anchor) { - $('a[href="#'+prev_anchor+'"]').click(); - curr_anchor = prev_anchor; - } else { - $('.group_tabs a:first').click(); - prev_anchor = curr_anchor; - curr_anchor = "#_AllFiles"; - } - window.location.hash = curr_anchor; - } - }); - - // Hide src files and file list container after load - $('.source_files').hide(); - $('.file_list_container').hide(); - - // Add tabs based upon existing file_list_containers - $('.file_list_container h2').each(function(){ - var container_id = $(this).parent().attr('id'); - var group_name = $(this).find('.group_name').first().html(); - var covered_percent = $(this).find('.covered_percent').first().html(); - - $('.group_tabs').append('
  • ' + group_name + ' ('+ covered_percent +')
  • '); - }); - - $('.group_tabs a').each( function() { - $(this).addClass($(this).attr('href').replace('#', '')); - }); - - // Make sure tabs don't get ugly focus borders when active - $('.group_tabs a').live('focus', function() { $(this).blur(); }); - - var favicon_path = $('link[rel="shortcut icon"]').attr('href'); - $('.group_tabs a').live('click', function(){ - if (!$(this).parent().hasClass('active')) { - $('.group_tabs a').parent().removeClass('active'); - $(this).parent().addClass('active'); - $('.file_list_container').hide(); - $(".file_list_container" + $(this).attr('href')).show(); - window.location.href = window.location.href.split('#')[0] + $(this).attr('href').replace('#', '#_'); - - // Force favicon reload - otherwise the location change containing anchor would drop the favicon... - // Works only on firefox, but still... - Anyone know a better solution to force favicon on local file? - $('link[rel="shortcut icon"]').remove(); - $('head').append(''); - }; - return false; - }); - - if (jQuery.url.attr('anchor')) { - var anchor = jQuery.url.attr('anchor') - if (anchor.length == 40) { - $('a.src_link[href=#' + anchor + ']').click(); - } else { - $('.group_tabs a.'+anchor.replace('_', '')).click(); - } - } else { - $('.group_tabs a:first').click(); - }; - - $("abbr.timeago").timeago(); - $('#loading').fadeOut(); - $('#wrapper').show(); -}); diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/border.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/border.png deleted file mode 100644 index df13bb6daf79307915e7dd1cf29d48730a50c29d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 163 zcmeAS@N?(olHy`uVBq!ia0vp^j6m$o!3-qZIAk{hDdPa25Z9ofAa{3ne}8{RM@MgO z?|^^+D=VvngoLiHE@NZkOP4N1MMVV$27dbVsk5{5|NsBbo<1!vSziv+uI=gK7*Y|p z^k6G*gM$FWhIux5zx_}1v|LF#mgu27<@e;v&wgfZpEc#erGmW@9n6=)zqo$~YGd$p L^>bP0l+XkK8G}75 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/controls.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/controls.png deleted file mode 100644 index 65cfd1dc95c5ee4c6c3d0848b1dcfc0ec69f6aea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2033 zcmVY16Dl9G~IT3Xc9)Z^ph#l^+1udkq>pj%s8x3{-FJw3a- zyTZc4tgNhJVPUGOs=2wjTUuIPU0s)#m&C-xo0^)sxw(yvjeLB3^78U4D=RH6Ei5c7 zO-)TME-o-IFwM=)IXOA(>+9v^gnk!Dk@A&OhZFMI5;>mGBP$cHrd(PIyySo z*x1a>%u7p4z`(#lLPF^0=SN3JF)=YpN=iXNLGSMFH#av(NJvFRMNv^v@$vCHJ3Bl) zJTo&hNl8iR>FGvBMo>^t>+0%WUS93(?OFDTAPEK`obwEHsK0ZFDr>E}i?Y_RgTwGjIQc{VDiO$Z>?Ck7QQ&aZ#_VDoVc6N4O zUti|s<#>2_pP!#*wE#@J%|ZXjkIv8d15RfRBQxe$bh z9TUw{N+{bY1z&)8>k2t;d{xYxg76&eJ5GSmab7cm2*kJn zLPONkBzslPWkA+%7~Rthzj+ZdH;HAk-Pq6JDgZ%}1qZgnS8` z|A!BGUTY0vuJ8~Q8k9-cggFrxrb5iS-G06qcV|ScTS@l&{bZ%90njJ((hDH>go-Ov zZbB$mN3X(#_fF&Gsyr1MX$KPpfH2>rC?r$(w4Y$dt3?|Rbk9;C`p(jcaF$k70KON_ zQXS~iuoPW9OL=;PXDK^qs;!en!tGwM8Dm32zK3Hnob~aBRzMgVd)VIwFSb@T|pRnFQtL^ zQVJ_)!)j6(b&PC(dhopzE0a4<>r<@qU z`!EtA#BilIes-lde&oVm?AXss0zni9@U)s;c2)_BE*-ve3qd+Xkx|kwB9dCkgI$6` z2)acBb&UMSYiGCKj*SBn@)q-Z5n&E~kT-AMBO%kChC#@X|0tXb=fe3-(?1oCZXuoB zLi}_KX?F|Z?iRyJn&Er?*=Fkav37KPz4^Q2i%?hdj$hRY5$X6y8bhS1yyTxuueKWC z5CSWPU;%-YXn=qr((#(QE2FU06#>QwQ5V+BI|UkI(*RRqvv@oZ-B#&@=C_U&BCHmt zC#jJURR)BX9qafF9iN(TLwU10A{?j~CXS78W{8Uu@HZ?#PAyEpFp1S*%EGlpZ`N&L zTO`O5246{p*$9hz`Xxjbs;;d1D5fGugh*6-y27O=ZrgP)q5m%J z%*b8(_kO793Uc&AR^jAtn*OA38fGEGyOcr5Fk7$*{qtd@niJ25{6h8_pFvpWJ0e#STIxNJ)pDn{H0&eE#G130bNngTwLQ z{r-aw>G;0=r|=|0AtWIQNk~Exl8}TXBq0e&sC~j#A{E;EQlD^{NCv_KN?|hzt4p`= zmiMYgEZpwcxm$P_8++%CQ5bCMy}oe)uer?ORv)df%L>+~SMRSwxVo4v42N~krH0-D zsqp7BEemF3oQ#jZH?};MT1`)gSQr3NRVET5olgiEnaToD3Vmr;&eR^luC95&D|F|1 zySmIE&VwgJDV!&k+duls&IXn^h1S?O8(9D%7J?Dx?3|Gb?cRJt`cH*#(!#mIWIQCf P00000NkvXXu0mjf=5OWV diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/loading.gif b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/loading.gif deleted file mode 100644 index b4695d811d4f84ed693eff7b5e6b4d61a3e8c48d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9427 zcmb{2c~}$o+BfjYkbx{fLNXyN2~I-9fRL~W0YSqMAPQmvXc3WJ1&c@(6VN-G66{!m#Dz&KKu^y_lMYNSx+iL6S@to6V&NF~*-@fnlUXMN3lYjN{kB{H` zJHPuk6Sp8%7M6_w2=Fri{G0eK0q}qQ6Mu9M|N1`u%P;s)H-1oqA2;E5d+=93<3CK` z#|(Jq2l(X{{QIx*J;k^=2|tA4&mQAH|A_D3iubhP14r@F5d6Jx{6jh3yas$&IP=`6My*}-(7^Ct;HXY;7`Z#qk24xg=aGHLJ^+fh;NYKA2s3Mj^Ptu z;6FaYZyd)j?8Ljal__{%2i~$Cx1{2A8TgJoyfz)LUW&gh#MdBr zz6W0HgFm=||Fs`)%Exb=#T!=P>wWQS2k|@?ygmzG&BNPD@b*pkCnxbDFZ^&h{=q!_ zWF?+%5B%{b_%}Tk z)ktHy2%RxlI5%?6ZY$l%)y35jfZdMF$LOJQuo`5!xq7<<0wEFe!~iNDmRQ*CZa)6) z0GWrehsCg!=jkR4(xXzbtX4ETpjXdtu+U&WRP|3YXlu_B)iZZ=0#*{4B6KTmiGmnj zsbV4N=yD-QamiN_E; zVH?&r%TH4=`CvaO@re)|&d6egk9{2n%lVPd7of}(SV4M46aL@?LE0h(9W?Jl_KBI@ z-F~7hZ1jBTPv3t2$>t>FO^_-WY)duQCv|z9ndY=~Svu6Hr3d(F`3bw!v{nFdSgB1Q6VHd-c*2v7ZF{IUDRuWvJx*p|Z5ICc0 zU9HLoXRA#bkw5at2*g0eOp5TG8Vz>Xt$RXaKySuDSWD^f5vK87d0?b!)&Y(Lklp>S zy#DM5<`3iSo(CJ-I@{Z&N{aBfpEr;fm66DjO4mp=mt$?+3QEF$}ybSEVM3Iy1aWU;v3!lv8_ z(94N*wM%9t-?HD>a)R0~i6wDstS54=)@v(hfU8`dA#{$G9B$~1a-x=s!+qXe-}adL zfw5czHyZi?SlZ<6qtVKl=Ag{T4Z}~F(9YXfkNsPQ@_9(Jvt}nU(1P%gG6{=T*D_4H zn9}F@?Z8zHS44KwRKPu$dlVUtDAhh|DGz6p5;U_!Mg36vcSM{Bsf%UAQ2x(jrxz`8 zB%COz^WwIdX}PIID+nhjG)fESrRFcBwPUk0naeSL`XQ$_fWfywA(`&(g#Z$JC>EkQ z6gkN(T#wAR*ZKjDt}g2UWm;r$vPClAgPG$9Kz;?-+Q^l0!Q1GHuV(4vQWdwGVL<_8 zPX&a>l1QX#Fc5r!U4>x^n*#)DfSEC}dpgxAxf2ye!hD+mRtG%>U1&-X0oSYC+0K*m zHxSc!jMY7{(a^UjGfH(qw#?8^hvgyflU+}xDtI$L3>12&>>hT%nACJwk=+BZFp4ID zmQ{AZU?I0$4A`EMh^8=g7a~)#NW;@(_tv^M8aqAe9L={>Db>Ol0_knF>pMtuIYQI& zbKG3B_O$~HMdBK4mzz&+8$g$Aqf+b~r~txrbMXXdEboOp%i<7w2M;k2q*6x%OV%$7 zpKsxF6T>`a15nap%=3$I?l#GzFkgL0@!V{Th>gba_z#GoM|{jJ4)N-#ZU<&1XBmSCl1mtY_wwt8L-wWD7pAUqKed7V8ni;XY6EJobQXbvd z6@TvgPWc-pNHV*SW~rL#loGVfjCeUM@&ucW{0)0@5Dbwrwk<9cW3&<{)!S|K%p!GC zH9KRzvH$=boEDS-w9J*O*C$?@?HrRx1~z6n6$0}&-CDY_8cAN~7_uCIq$j}GRqKmm zVGF!w-OP)+xaYB=W+V#ZwLQOvS=Ci?m3YWNCV@mc@`o{bMGUOUS42fS8LN2yMUOj` z6lE-69TTs?ymO8-#T0~ zQDyd;Lwlc$^#C6Nl>A^?R<8q+FngF>ocpZh%p91MFjVS)v=tPcy+7Sa?-NhJHyJg^ z#>P@z=(#qq-i+9<&9#G?jI_@a%o{^8UvT87{IPi|D{P7@X##&WXU#HrM6hciM%{o1H zt*XLA8$$p^S#Ps})Rj@qOW@5G$E@?en5q8{5g`Gh-n?9Jj-fq<6ksF?Zky2=@x%o&X) za6X4=UkiZLLZW`qU<_2W+ts3*)viiQ)M9}QfE+n<;vgif)Wj{gOq1U~`Ed z5Y*+J>S&RRlLVm{y8$Y3_4dy^RE_Y)>3W6tJSN(BY0qOb&Ca7;y{cgwMoMS73+3Rlc2M$#Yn%LG zav37dp!h04w|xsl=-EmUC2nB1#Upj=i-QwYOHkBN7dK`*2O#@;ETML2ZbyaoI|jyY z7$TeP7!RC%t1))tHl&_JKQ$P;}FL2m^fs`BwgR0OTse zLO?(g=d@_1g)Ox~0cfLga~G1BqDo+%tb{_vVkrzr=ToFW^om6ZZb26LEinTVjYF*a zrJPQ}=e9(jkx=UK+zLsC_59@!UwpL1JTtoo5@MzwF`C7(6c8kCnU3Eo)afkBvuOT!DJsD{rvo!J<}{! zgNR;J$%_sO-DdLTI!0?j=^C09K`?07%oz|6tXP{n!y+PRumY}v3xG3Y(^ohgt>R6| z$TvFk0Nax*;xARpJ|uJ? z&vvr9xuuByQG45}A>DU#>(1RTw9F1ySJV>eSj=r%R{^!Rq}VO34CCAXbEk2`%@=M{g(h! zX{#8*+-1NxuSEL{IrC4pm*{EuDFRCQbZXEtFTJr70@hTbi+x4gOyq(JQ;vydoka3v`ibJezt624W}n(xkYxBFro!xj+t-ADrpv^ zU;03|-2I)9Cl*LDphtXXy&#b2a{12&luT~&9`~`(Z1X`iYcAhCGdB0q%5pgHAau^ZUy-{8F?>{UJ)>(^&{meh#`Qh=j9Iv+D>?~ z?vWE&^|mGtegG0FUgZcF(?WDEJ?#|~5z})HX~2NN8Ys}GzNF${!?FwsY_~|fX?79O z+?B7JyBU0=<|YCK)l|WuWLmw60N|A)bylbiAn%f5G^&EzSREWnDD6+O0ieLRFgvj& zsuKoK8?gjPBA)yXd#Yu-#B>ZfwsFuaV{aw0Q+h?W#;(MXUjs=V>X5~PCrxHhB$GWg zNXTTiS#Fn`*DdeaHjy&R%~b7g>{Ds&VrP@Avz7$KCwxNL$af!JH-tj%#)IxH>7rI$j*GvS_I4pw>Czy}#N+hil4dR;%&s zkq76B$&W&4n=*DAcLL0uM*Ksl(B zZJa?JBHHJHUKaImj{yo6i3W^QCUk|JhnG@rIw1~*-yb=?uPRD}Z-){dXAL&^JFXSi zZf@T#WW`a=>S9kRWKKay>^@%S=5o_p-;CU0` z(hlF{a+dVcagwIo&N4eSF#?Plv!$krBdp#nWATmqGlWJ~i49b91jsM#Y0K-GwSo&9 zG~>m8OD3`Cu^)_1t!&me9Wo+8Ae#|%EHFV@eFPmfpZpBS$x81`>42=Y4& zLuwOjC155CClo&4Oay332E>}0r)e(g(B@vEXzu9YQ@hO|0##1Zd?{T+^&K=G7JqIC z-5AZ~&NBb-q9Vx|ceZs_j}<@K+2&}w>Vol|kCzKb<4xy#RvPs7bM_(}3V2f|kmlY` z8NNrrYyfuyBw#$AEP3akxHN@+-z%Kv_B$;tt#`RAxLM!W;5AaLxz|ec4)o~8wm;FxkO-|aF@BeUCS`U2laXOa zL;2PwvGmj=41hL^8NbS~FCVOicxNx@rf$xr4uM2ypuJNtW=L*hBOfpkGDgN?zk-5$ z-(P-Vhzi65kHUn^m7PMSU*b+H*w-v5wjRHE|JwM1D~2eQlA1jMk{L6+!q=bpW`LI~ zP`S(<+Go3q!F4ZqS9_HX%$oPy1@IRoHal%#MSw3*dm9p5J5rY2m%7b={)cjw%HGa- z?!5a*`&hrS*`>j`v*+LvD^?ZYsaEA&zsaxAF(qTIwYEjAcA{s*DQJi4jW+w&b0wKV z5>3w)IE6GlR}336GKutCeCPyHFVKMzM#Ny9CBid#yEr*me8OmN)znx)@{c|xhHBJ! z%{&v`5Vv_oM#j^J|4#DyEB2yszCpgt699{LfCFq+9+(>7akW zfogy29EJ@K{N1LjS$x1kzeGI8I{@~j3k1%YPs)GA(M{r9|203|{pLdiPG9rcZ!djk zKrg*8P2<}Q%Q9_NuyG*N6qcj1@8`cXN$|VoB~$(!IRN;JHr5S#Cbu!zKS&? zO&-|l8Q;hO48g8fK#dzY#IUvWd8bYfCz4BC*ei`}0Qz=J1d?m5CFpiV>v|1r@SAV1 z>4E2%YH426l;ZP>MVM zdc@t)Zq{Rt@Ez|v^-lZa8zNjk z8fHHFG`1IwyWl2s{|+PVE3_r3YtL~brj=jJ5)QV-EP zXKrX;$L2P11HHTQHaiQ`Dx>Hg&E8ziMU~pawp^DvJt64mU=Z3k0+c_qLwM z+HSQuv&P}RV;iE?0mPl+*A8!fDEwa(Iv>g=dbxXt3C&tKhZSlPT_T%B-jR`WXH2}P z7|cWaasZ9}dymQ2 zl;Vv*VU21pCk}3ND;uj7M#FZH+&_Qpad`{%jz>g}HA-7&fJMOr>|`cnsuB;#T6@0T zWlPcfi^xL8h+i(%RW>GComR)Q>%6!ten-)tsN_GSXE#8LdVSClk>$|urE{)X{E>xz zktm%L0Q=%)B0Z=7ke(W}v+7#qY#0BxcNro1`3EM{W$q8_OrnbfkL$8!#X-+5wwa@w z3=P^NDiV*3!4VxjP?uWoG3XDBGj%$1@o6X0SD1ixCo7T#k{E2CC21=_Krzzpe{kmkwR&F8%4=f1IBGTu3r06fJb|oD{MlkLc0TrNzZu z!l=!Js#mRAx$f1^l{qB~#>@CK2_cu@4vj4#%UTge6_49x81p58@NS~^o zFy`s$2oVJ&S7k09oNgeQ`uJxp`N3)WraKOW@eO-bD{wsMg~T<8^F+cD&^(tH)*whkvv9hJGh7 z=QK`|*)AxnCwBaf)`KUQ)>%>q#o4{qGe;)3b)P?TX#Q=)w0vS$Z|3a=3Kq?uUbKiQ zYqe~M^tPQo_k7eWzHDL5jf`br;AwX6m1^07xhoe>zgU&cFFZ{=-Yrn@cChM8qp$m- zgaw(?S?V?*v8n&^_g9)k*u}nc0&SGm5vEdY6>76X-autGlc6T@PRe~jfx;k5Hl~Y8 zYm1n=)fT0!al?L{fHmSauT7=9RTe=dmkm*XxZ{?pkp`J&?79QsZ#R+FRnY4xv~xk; zp|)%rg#K0Nj3f(9z@&&Q%TI2l=2azCy>;QN9aWR6Egrt%taf&Ru#+oIE7X%FNyGe2XiOJ~^(EEihIMOWvOkrM&PH^?tlG>3DJ#_1HXGXkfHV969wl3h;rJ7JHeh-gNTvtor)e7uAp zvNv3so6GXzwJDWRF*Ys@{=+@J5eley06d`tAUA%3_qWgc#sst>54GW;?xsz&=w##8 zlJV$W-VXrH7zMa~Do(WYZrF>w^g)trpS`$U$iOT7D!w>xrT`cKdxqE`{ze+F!n`&Jt)3a9XdSEd0L4vg9{RkWc?l< zG5=(g#%*9S6MvXAqKK6u%6Y)1rLQbJY*?0v6!pqj5Ifv|HG!&uQ0sd{ESGC38K|uC|6Kk zGB-S~5wx57+M{%Cq*r5bx~sR(8jxNWp0&K!@XJ96U* z5HGP8-~dPV3cLg_zyZ5$28U@#L`pu}`Tc(1AAjG+?&<5T&1ajMrfqeOaZlPE^*&yg z-{-aMzBEroFcf_@7Bj-Bb{Mk}1)Y>kXpfS3etApxHEn&I42EJDp12W94WckcndXwM zY5NCdPNH)vz=%$g%+r5<`Kp5?_Vjm+5Qcf1PLtznPW#uVgXsD^YQ_4&E3jX>QXr** zfHJ+v3b*w1g{~{t>e$r50wT^meHqj+?1DDq6f_K2i=YjGjSN)Za~$Udupojav`l2x zkmJ@Z7ecUlbm@)9W4DKoR=(uU)2Bk@u4&F@Gh0d)Scz%4poTJdu||E-;I(Qksbl_H_Bjh?Cfbs0k5r_Ml@y zyNQsGuphwYp3`(NZo;6_xR2{M?K-yn0Naf=LIFIqokqK1TXpOoAqUkfZYL`Q$s$_$ zO{Cuy7eB~#+nf@?_<*sCssp-HCRj0LIcWDAAS6+eslB?MWww~|pPHF67*jRJU(He-$qrP@yVjSRyWydkoER=gV9Nv@y|Z|1|OU)HUIzs diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_red.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_red.png deleted file mode 100644 index fbe093a551114bd5ba92550b83ec04a886238bdb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1009 zcmbVLO>Wab7bYf2utF_0Br^M-! z9Yvvdaul*51?`xOX_u04_WBz=P?XJ4)E|g}e`*IT)<}WT@;H@j zML9UkQxaTI0fuxOC64;@(`OY#p`*U6`_NB4I*CrMIqhAa^@Hn+pc$%%Pr*TMOM#dQ z0`mAW$?V)w=eoAs7uUK9<`8k=s0*hCeg}ArQ&87nC4eRbCel!~W?9x_U_b(45K0um28#>l2?*! zzf{093wV@@h$WymuBpW2eKZc{gNzmce9}aD7~>?@JJSgTw)en#WWFZ?5OgO7Dk~BQ3E1m)u3fS zvw@I{u-k%-n$@r{ZopQlv5xCD%qliK1DkaZp%y$ct-4n?jVgAJk%g)yx1D5yBmph$ zM$+z*i*DrF9;ZYw-e>Hx?10XM36@P*3cOw&_#}vu;#`zx5iO=XdPBow&SEgnuN|$i z4~>7tz2JublQUg9qZiHbSF@B?vIC3ls`cezH9Rzt6T{_byxRM5OODl@&S}5(em-Fz o?)}1Yv(v^${rvmz{Qm8)3izUI>?#{iT=#i_X}8YsNB8{gZ@}R!9smFU diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_yellow.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_yellow.png deleted file mode 100644 index e53847ea09aea9a5a16237a2acbebd0bef7f9436..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1009 zcmbVL&u-H&7|%3;VA8a415Q?U;jkulx;AaLFg0<;Dwa{TmFRJ9;eJ#kmiX9Mq>;)n%m16w*8lZ-ldARVZ09vn08R3}~jQ%4>lxM4$c%<5qMr zyvnKBrvXT zW(y$?VK0EKJ-cON+=4-+aU0if*#Qg!4>ub=LILbF?S|iIT6OFlAsf{zZZ|6g$s$_$ zO{Cuyw{s`g@i`@e@gZXuRR{EDOt50ca^MddAS6+eslB?MWww~|pPHF67*jRJU(He-$qrP@o7R_`o8h6EoER=gqyAy{ksPc0y^~?^^P`$D o)I$%Y+3MoXu>3JTdwlPk2EJ-*+uGW`=e<;rZg7e}d1vo_0~HY~(EtDd diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/loading.gif b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/loading.gif deleted file mode 100644 index 3596a61f3af951db38aeb149eecb37e7142d5c46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7247 zcmchcX*d-6-^RxfMwY>lR2pL}Av@WU7>X=e(^NvTr3^{3WNc&XjWyYK*|#XN?_?i) zCsg)*Co<2B&N+3S>-^92=6{}f>AK7{FFx0Of4=wcikhmljOlX#D_|1M**NA z{vRjdxR#2(p7Q1EDq=z+5KJ)d!d8;Lj#$^$!TnX2pSYE9en~lGBG6y#D~mC=grK1&6AU# z$6Zid1TO)GGe=Q9w5MmNWgsW7YpN%Qw6(W2baZrfeQ524^z;sP4R`kseH{4&3$HW) z#nmu?=fdX}7sFXr*H%~7*EY9UcDBB)A8a%4PLt8jYMZ<_pB!ARH&>xAbXpjF7i*H7 z(i9LbWc(qEk*g_$RoV&i8uzt1luL&Yg}6zU4DkIbn|$xYWrR0ekh>1o z4rjgWdhk)kajqAt;%7c5mVN6n!+_?npqxpy=Pu2svb@R*%kDM%#|TefDAkuyNz~Cx zePDZRHWNnbXLEKc^DP^v~hD2DGd zR#wow7Q&a2^*KOLfvh1=q?zwakcbbFsw29{{;Md_@~rkE1gwWwn7*AUh<`Z^dd`jZ zg8O*5V?6_W9sIpRfhgu5D1~z)=@SwY;*%1Qd_<6VUdMql^0ErDi*mhDB#eNN_YiV& zhPwK?nudm&sIOeOX>!T3KaY z-`M)PxwE#lzy5t?-`W0__wjHR#`pY2Mp=)}_+S<$1mmQ2U`+wcLT30@5w0tN?3axp zYK-Q`Jb}~%!)M$fDOhTed-ZPT#51TvSRXmyU*l#}5`~UUP{`tDl@fVXvLsq{O?Aj5 zA1Vd2*I8*L%N1?oi753X8z*|Dzm!NX_pXfNh-Z(q7%P0xVi8#x`RGRFeFJ(vbdvS; zY=e=(QgyavgUY)z{P}XC!sBEbjAe_nBER{xGhD>r<-;DUb)UNAwTulnw>r*yj_=}e zAx?!4;NI^gnZjo;jUA%M@tXVFRWxJ<*O0H&qNPllv7FioohQX@y7N?8q`to`oqk`a ztvr%vVtg+l0<_zfNkh-{dy$3rM?vjC9Eo|CE4U838fVJV<$zL{Etx5uATTyLWzr(^AD1M z|9z6=L_3+oFwcd1r*~Z3K~K1!`oJ+xjsf05ehz`YxIbBn%`_&s;aJ*L%PkPovpn80W zR65TLNF7u1HOv+NZAj8%-hph!7hMrQLMhNIm|yC1U*rVSw%031+grIe3k(O;hn5D5 z_12suuX&z}B|8R|r;}rO)b-A3Vg7r?%T;5nB{K!bg#KhlsMz_6enEz>SG&0{CqjM` zg^?Wr?YTSJ*~!rlKm);7}`79+dg#EwX`<3^!5!7;2Vd>MoBOQRR3U!#1MF8bp^Gy zwy?;uy|_2GzqB*Wd^maBsB5TPvO?k}71NHrM1jpq{^oPyYoU@P20)3^x1mwK#8g`~^A6Jn4uGKq9`)JcQfU7W#9Lar@3E>LmBsdWu4Lb7%{b|)7DJ)RJ*~_nTT^0rR^aZT*U{0 zQps=SzXE6$slc1^-KA7rJkG-9cAvgEm&b)iF)!Zzh~d7XFmbYUy6dc9B2S*t*4$u$ zwcc`YpU>?|=U^)puY+BR*ZRrYE4A`?a3^o!w!VXFI(fv>X&0QTJ_5k`84HiHN}&f4qlw7U?B_u3TIiP` zi9xGhqKV?)!s()R#Wi-cClk`c6YWhTD!|_*FeKRhXU&nKDUmms2T7linUS8AnM#VL zl%ll1#i^y0oT0O;v#z_ltsUPo*f`uUS~GlDC`Qb~Ip^oO{+zL^>4`8wM403pCM(>bJ+Xu^`Sy?iFkuEO|Y?tbwj zf9=DJ0}fTUR#AU62x3MJqofftxp)}|W`lY&=oTmW;Pf5*kvGikn=z-IW+(lO(i!%*c0ByakP`Z_Z+Jv+y|u(&+M4Bpt>Ky7W!FMnG&m_1x+U7IhXJi#LXb2cda z3sHe|Q2+8G4Y@Vp4lE2hS?>oEL1O)J87i^NDv05>$C+IT^7cv) z8a=c|3ax!g#2co`{Ajh{!3dXd8?7AWV*tABCl4sn#EV!j@=NhIrt{MkJH|xjj=eUo zdcIV_lKWe+>3Bj~Eo2A{q(&+{JYJ3(cx&u2*yMU+WuU~(nv4T=y-+C}DqtoUqcdF< z3|4T($Bl?v<1*F4R8PKxzLlr>QkMg`F7CW$1p=jlGh%bXy%Gqv{&nRAjS<2N#rK=t8SZpQttO((41I)TAI z41C^%SbL2`1D6;i)}Hiq)|U|ZpS4H%Z&Eeq0b-)_@nu4K`}+7fd%8KGUH+<2q?{t< z6No-LCmWfYn+`AHDuES6{zaikwMVMEw)Q%P-oDW_6cAWRd}CefA$hJ$DU53 zbg`M5KbHUj0zqB>SdU>;u_}e?-O~)ZATS-l2lMJqRB#1;eGxm0f4{#LJ%+?^CoSEJE`gJcmV;6B_dV$6yexU zZuU*p3{p4n%$J81x78VHg zGLa(>g3S8C$!S`za7X7pQDL<-Cn^*%r&QR_b5k^uYVWhZER=ZM9o3!)@wg+^-k0E? z#~szb%agMw6P+)H3F(9J#d^7*Lqq~Gm=5{Ik`E=yu37cF;{U! z^pTNQ5skdMzNW6Bsyu<5w&HqvLD@9r8ua)nF$0l}^Mku%FNFKc;%+^jYQw6OJLMru=NZBTVyi!nQJ|=TH*^AQ z^!Ic#`!Z#Z1rFqF(_7(g2+y3dzYs^Q9!CCJ+v9M5?m`0ETd@8rj8dwnRT3S3a3$$! zBs$vgm*cMS&*P5rpN>1~f14yX2P6|6)}IOEAAtV*zDr0?%1i;#=jP=i^Yc^TC4b*{ zEv+AjJy*lfkMHjrz<2fbkowN+fA<}Uq|F5sc<1uK>==){~ z`i%x7H*9k|>+u3>Rjhu2dJXw29=BJb7Hxs2B%SaFxDvH)i1K*{@e-Hg6e-GX-gT*JaoaxW!QqAq-SB*jQO#H-7BNQmV1_t*!`Qo%u| z`>x872g2V%y(#Eh$KjD|Pk&9O+%tebl8Nn~k_q(h^MrOG5)}~0gbfVB{25HY_|p+j zuhZ!B^7D`d1*u`b%uc`f(+{4yddV3E1_x?}hWbdm(|_P;o46h9AMAhoe(-uYII@p{>{KC^+8f?slsWt`%qdvng!PlF7#8csvQli}NJjKfwD0RNt;?pHF z4m32#UO!cTN88iJpu^yZCnvfG_y@W)*G6dh(6#3b%h8jRQF6P&1BHz9995MOE9eZ+ z9g85)`e)VPGol{&(_tl3AGp42Qfo4atG~Zb=hcxaLQJOJPe;jgacmFOk*`@{e#tXy z=H)rn16min5+9(O|6?9MpU6TW_xJQ!{=A;|?=7ggi7Al-HlL(=Tzf}_+! z0REVr{xO+o{y#{B49u zf1RCvIups2h|1JZ$1pNFGCWFO_BIOPMUc-OA&hp;E{tB1? zAk>k)Tsq|~Ss`?jaWcot*AK;^9>Hc0YXY$fTliq@?==OTJ&%c#UN@^nlYYM8-RnGK(CfL_9#7{jr_x+~3C!$>czXqCHMSK}kn^T?spST;WURP31}F&V;|_%7Ntp3yMIA^f*-H ziI=a4Pb<~Lrxi#;V?$k26H&tJJ0R^HJ*|ChoxOwo!vi%8Z^|j&#Te4YSA%DmnOPPV z7v`3Ti}>>V2Fv=!?&`O-t-Zs2z_uJ!U39tRBo_YSUWke8aWI#X8=oj~5oZ-L#Pi`& zn?P*5UbJ&M=B+`@)C5*HC{?nMz?8l!*gnkSYAl<*A^sfB5|Ie@M1s}z6)7TrV}A=N zFFa94Eq)CDYA53^7FtVQuxWfD{&-vC77?iUb9P;B6@kSR;Y@oK<<@9YVv2VsxOgbO4O^OJ-} r7_IjaZ#m9MA7V5mpRmrgS7cFiB#s48OjZL1$o993xE$$u?&$MB3D0WC diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/magnify.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/magnify.png deleted file mode 100644 index 6073b9530ed197d0431ab30ca79ed262f4b910fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1301 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CP!3HERJk;|9Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?{&CLn2Bde0{8v^Ko2Tt~skz|cV7z)0WFNY~KZ%Gk)tz(4^Clz_GsrKDK}xwt{?0`hE?GD=Dctn~HE z%ggo3jrH=2()A53EiFN27#ZmTRp=I1=9MH?=;jqG!%T2VElw`VEGWs$&r<-In3$Ab zT4JjNbScCOxdpzyaD(%Tp#cR9GX09g0)0b01O41wkiWpHi%Wu15zfG>x;Uh=AXPso zwK%`DC>aHCFybnZQU%%yG$2F3nBNEAe!(RRYTBrDUd98JJoa z7#fLwm{}MaS{S&PxH=kI8aca~nVK0J!py*?*VNqH(b&z&+|k6`#L&>i&C$@& z*wN9@%*oZ*)ycrb38vRGuec;JFF6%vZzj-Qs9rO?daay`QWHz^i$e1Ab6_bTAS1sd zzc?emK*2fKRKYhfIWrH$2SpFWw=StgnPsUdZbkXI3gGay%EV$nVShvPreF&*U?|}Y zGku_A^g)RODY3wWfGH5fgeQF<2cCIS^ME;~2$(gL-@n|+z`*G0>EaktajRw0L9dno zk+%0&6)$)$+Nzu6AkfL76}2_%qHx3)uDvb4^e!sRPZYbPmUVHFfHTLUiPtWPG~N0l zZ#n&l+OLO)AAjB7Ui^QxNPqy#CXKGeHs{qNr>(s->-DbU0z`y zvr6dr$F>Ni``^>&J&$coyz%zJ3gg+&AF#zVco%Tny^yX9X%_4~_?3AFvsJM_@4>k9 z$|k19Q#LoAQGV8H_r+$eqvyAIlg$53a?31u`=R*Y7LjRQK3q&Le8wT*lABgaxY9)S-2*+#8CINRCwstB#E|+S#Dc$ zwO{YLR_Gu9;oL6fRnl*|)1C_USH7J5{&}o${cFKJg}F_K6W5$Bxw~5P=*fENxPy~_ qY45u7g2$OHiv4-Q?6`fb5)4Z;>fX&^evkqxs61W$T-G@yGywqb{mBae diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png deleted file mode 100644 index 5b5dab2ab7b1c50dea9cfe73dc5a269a92d2d4b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FscKIb$B>N1x91EQ4=4yQ7#`R^ z$vje}bP0l+XkK DSH>_4 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png deleted file mode 100644 index ac8b229af950c29356abf64a6c4aa894575445f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FsY*{5$B>N1x91EQ4=4yQYz+E8 zPo9&<{J;c_6SHRil>2s{Zw^OT)6@jj2u|u!(plXsM>LJD`vD!n;OXk;vd$@?2>^GI BH@yG= diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png deleted file mode 100644 index ad3d6346e00f246102f72f2e026ed0491988b394..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 120 zcmeAS@N?(olHy`uVBq!ia0vp^j6gJjgAK^akKnour0hLi978O6-<~(*I$*%ybaDOn z{W;e!B}_MSUQoPXhYd^Y6RUoS1yepnPx`2Kz)7OXQG!!=-jY=F+d2OOy?#DnJ32>z UEim$g7SJdLPgg&ebxsLQ09~*s;{X5v diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png deleted file mode 100644 index 42ccba269b6e91bef12ad0fa18be651b5ef0ee68..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^j6gJjgAK^akKnouqzpV=978O6-=0?FV^9z|eBtf= z|7WztIJ;WT>{+tN>ySr~=F{k$>;_x^_y?afmf9pRKH0)6?eSP?3s5hEr>mdKI;Vst E0O;M1& diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png deleted file mode 100644 index 5a46b47cb16631068aee9e0bd61269fc4e95e5cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^j6gJjgAK^akKnouq|7{B978O6lPf+wIa#m9#>Unb zm^4K~wN3Zq+uP{vDV26o)#~38k_!`W=^oo1w6ixmPC4R1b Tyd6G3lNdZ*{an^LB{Ts5`idse diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png deleted file mode 100644 index 7c9fa6c6edcfcdd3e5b77e6f547b719e6fc66e30..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 101 zcmeAS@N?(olHy`uVBq!ia0vp^j6j^i!3HGVb)pi0l#Zv1V~E7mPmYTG^FX}c% zlGE{DS1Q;~I7-6ze&TN@+F-xsI6sd%SwK#*O5K|pDRZqEy< zJg0Nd8F@!OxqElm`~U#piM22@u@8B<moyKE%ct`B(jysxK+1m?G)UyIFs1t0}L zemGR&?jGaM1YQblj?v&@0iXS#fi-VbR9zLEnHLP?xQ|=%Ihrc7^yPWR!tW$yH!zrw z#I2}_!JnT^(qk)VgJr`NGdPtT^dmQIZc%=6nTAyJDXk+^3}wUOilJuwq>s=T_!9V) zr1)DT6VQ2~rgd@!Jlrte3}}m~j}juCS`J4(d-5+e-3@EzzTJNCE2z)w(kJ90z*QE) zBtnV@4mM>jTrZZ*$01SnGov0&=A-JrX5Ge%Pce1Vj}=5YQqBD^W@n4KmFxxpFK`uH zP;(xKV+6VJ2|g+?_Lct7`uElL<&jzGS8Gfva2+=8A@#V+xsAj9|Dkg)vL5yhX@~B= zN2KZSAUD%QH`x>H+@Ou(D1~Pyv#0nc&$!1kI?IO01yw3jD0@80qvc?T*Nr8?-%rC8 z@5$|WY?Hqp`ixmEkzeJTz_`_wsSRi1%Zivd`#+T{Aib6-rf$}M8sz6v zb6ERbr-SniO2wbOv!M4)nb}6UVzoVZEh5kQWh_5x4rYy3c!871NeaM(_p=4(kbS6U#x<*k8Wg^KHs2ttCz<+pBxQ$Z zQMv;kVm5_fF_vH`Mzrq$Y&6u?j6~ftIV0Yg)Nw7JysIN_ z-_n*K_v1c&D}-1{NbBwS2h#m1y0a5RiEcYil+58$8IDh49bPnzE7R8In6P%V{2IZU z7#clr=V4yyrRe@oXNqbqo^^LvlLE?%8XaI&N(Np90-psU}7kqmbWk zZ;YBwJNnNs$~d!mx9oMGyT( znaBoj0d}gpQ^aRr?6nW)$4god*`@Uh2e+YpS@0(Mw{|z|6ko3NbTvDiCu3YO+)egL z>uW(^ahKFj>iJ-JF!^KhKQyPTznJa;xyHYwxJgr16&Wid_9)-%*mEwo{B_|M9t@S1 zf@T@q?b2Qgl!~_(Roe;fdK)y|XG0;ls;ZbT)w-aOVttk#daQcY7$cpY496H*`m@+L zeP#$&yRbBjFWv}B)|5-1v=(66M_;V1SWv6MHnO}}1=vby&9l+gaP?|pXwp0AFDe#L z&MRJ^*qX6wgxhA_`*o=LGZ>G_NTX%AKHPz4bO^R72ZYK}ale3lffDgM8H!Wrw{B7A z{?c_|dh2J*y8b04c37OmqUw;#;G<* z@nz@dV`;7&^$)e!B}cd5tl0{g(Q>5_7H^@bEJi7;fQ4B$NGZerH#Ae1#8WDTH`iB&) zC6Et3BYY#mcJxh&)b2C^{aLq~psFN)Q1SucCaBaBUr%5PYX{~-q{KGEh)*;n;?75k z=hq%i^I}rd;z-#YyI`8-OfMpWz5kgJE3I!3ean6=UZi!BxG7i(YBk? z02HM7wS0)Wni{dWbQMRtd-A)_Az!t>F;IwWf~!*)-Az4}yryNkz&9)w>ElA80Oc`6 zHo#9H!Y3*Qx9n@Jn)!w6G^hb;e_n8zpIyXCN`JFkPc)^Q?2MsLNFhMgrcZI-<#1ne zjH;KFf?4eAT9mQZ}ZfHLGA#d%s;SZK4p0FwZT2S^{ zQ2BG1xJsbK6?yrHTjJi|5C0u=!|r!?*4FL%y%3q#(d+e>b_2I9!*iI!30}42Ia0bq zUf`Z?LGSEvtz8s``Tg5o_CP(FbR0X$FlE0yCnB7suDPmI2=yOg^*2#cY9o`X z;NY-3VBHZjnVcGS){GZ98{e+lq~O$u6pEcgd0CrnIsWffN1MbCZDH<7c^hv+Z0Ucf0{w zSzi^qKuUHD9Dgp0EAGg@@$zr32dQx>N=ws`MESEsmzgT2&L;?MSTo&ky&!-JR3g~1 zPGTt515X)wr+Bx(G9lWd;@Y3^Vl}50Wb&6-Tiy;HPS0drF`rC}qYq22K4)G#AoD0X zYw$E+Bz@Zr^50MAwu@$?%f9$r4WHH?*2|67&FXFhXBrVFGmg)6?h3^-1?t;UzH0*I zNVf9wQLNLnG2@q>6CGm>&y|lC`iCFfYd}9i%+xkl^5oBJ?<;aneCfcHqJh7Yl5uLS z9Fx-(kMdcNyZejXh22N{mCw_rX1O!cOE&3>e(ZH81PR95wQC37En4O{w;{3q9n1t&;p)D%&Z%Nw$gSPa!nz8Slh7=ko2am)XARwOWw zpsz0~K!s{(dM$NB=(A=kkp>T(*yU6<_dwIx>cH4+LWl282hXa6-EUq>R3t?G2623< z*RwTN%-fgBmD{fu*ejNn)1@KG?Sg*8z3hYtkQJQjB6 zQ|x>wA=o$=O)+nLmgTXW3_6diA;b4EY{*i*R%6dO2EMg z@6g?M3rpbnfB@hOdUeb96=~I?OIA3@BWAGmTwiQ{x5Cqq<8c10L!P zd@Qk^BseTX%$Q7^s}5n%HB|)gKx}H$d8Sb$bBnq9-AglT2dGR2(+I;_fL|R4p$odJ zllfb0NqI)7=^z~qAm1V{(PkpxXsQ#4*NH9yYZ`Vf@)?#ueGgtCmGGY|9U#v|hRdg- zQ%0#cGIfXCd{Y)JB~qykO;KPvHu|5Ck&(Hn%DF~cct@}j+87xhs2ew;fLm5#2+mb| z8{9e*YI(u|gt|{x1G+U=DA3y)9s2w7@cvQ($ZJIA)x$e~5_3LKFV~ASci8W}jF&VeJoPDUy(BB>ExJpck;%;!`0AAo zAcHgcnT8%OX&UW_n|%{2B|<6Wp2MMGvd5`T2KKv;ltt_~H+w00x6+SlAD`{K4!9zx z*1?EpQ%Lwiik){3n{-+YNrT;fH_niD_Ng9|58@m8RsKFVF!6pk@qxa{BH-&8tsim0 zdAQ(GyC^9ane7_KW*#^vMIoeQdpJqmPp%%px3GIftbwESu#+vPyI*YTuJ6+4`z{s? zpkv~0x4c_PFH`-tqafw5)>4AuQ78SkZ!$8}INLK;Egr;2tS18hEO5=t;QDmZ-qu?I zG+=DN`nR72Xto{{bJp||`k}-2G;5#xg8E~xgz22)^_Z;=K|4@(E&5J)SY2of=olcw z5)@L)_Ntcm!*5nEy0M9v0`S33;pO4TN;>4(Z+19p_0>u#e-vE zXCU(6gAvu~I7Cw(xd%0e59MNLw^U37ZDbsBrj%eDCexw8a3G`nTcXVNL6{B7Hj@i& zbVB{;ApEtHk76q08DJ48dSxd$C(;$K6=FpU<~l9pVoT9arW^Vu{%Bcn4`eIpkOVC| z$)AKYG_`ypM{0@BUb3^9lqi_c?ONH|4UJMJWDowMVjacycX7}9g={O7swOB+{;+?; zjBo!9?+nd)ie#x5IbFW-zBOo0c4q@9wGVt5;pNt`=-~Zgcw#*`m($6ibxtZ`H=e=} zF#GZ~5$%AUn};8U#tRem0J(JTR}d4vR(dgK2ML~lZsPhayJ2h1%sD4FVst| zKF)+@`iNzLRjg4=K8@**0=5cE>%?FDc({I^+g9USk<8$&^qD~@%W0i4b|yMG*p4`N zh}I!ltTRI8Ex$+@V{02Br%xq#O?UlhO{r8WsaZnZCZq0MK9%AXU%MDLT;3=0A9(BV z9VxxxJd7jo$hw3q;3o?yBLmA=azBUrd9>-<_ANs0n3?-Ic*6&ytb@H~?0E(*d>T5n z-HiH2jsDf6uWhID%#n>SzOqrFCPDfUcu5QPd?<(=w6pv1BE#nsxS{n!UnC9qAha1< z;3cpZ9A-e$+Y)%b;w@!!YRA9p%Kf9IHGGg^{+p`mh;q8i7}&e@V3EQaMsItEMS&=X plT@$;k0WcB_jb;cn%_Idz4HO$QU*abf4}+wi?e96N>fbq{{i|W0@(ln diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png deleted file mode 100644 index 09d1cdc856c292c4ab6dd818c7543ac0828bd616..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4369 zcmd^?`8O2)_s3@pGmLE*`#M>&Z`mr_kcu#tBo!IbqU=l7VaSrbQrTh%5m}S08Obh0 zGL{*mi8RK}U~J#s@6Y%1S9~7lb?$xLU+y{go_o*h`AW1wUF3v{Kmh;%r@5J_9RL9Q zdj+hqg8o{9`K7(TZrR4t{=9O`!T-(~c=yEWZ{eswJJe->5bP8)t4;f(Y*i_HU*sLM z2=7-8guZ}@*(HhVC)Mqgr$3T8?#a(hu& z?Kzuw!O%PM>AicSW`_U(cbvJYv3{HfpIP~Q>@$^c588E$vv)V2c|Mr% zuFO$+I~Hg@u}wPm17n%}j1Y+Pbu!bt?iPkjGAo7>9eRN0FZz3X2_QZj+V!}+*8oBQ z_=iI^_TCA;Ea2tPmRNOeX3+VM>KL;o1(h`c@`6Ah`vdH<&+$yTg)jGWW72T}6J`kUAv?2CgyV zrs0y@Fpvpj@kWVE0TzL@Cy#qHn~kgensb{hIm6J&I8hkoNHOz6o1QQ3QM4NZyu?;= zLd>`wPT*uGr+6vAxYv3k8{gMDR>tO}UavDKzzyi6hvbuP=XQ4Y|A)r4#B$U(q7{1Z z0iLeSjo3;T*diS*me%4|!s23l@>R}rn@#Zc{<%CFt;?gd5S<)b=8Yz32U zBBLprntW3RE3f|uNX5Aw|I(IlJjW-Byd?QFFRk%hLU}O*YyYQel}WcXilLMJp9cB4 z)E?D+*Y4zai&XY!>niMfTW-2pp-^KFT93%Leig@uoQGPYRCva-`w#orm`is`p8b4s zxD462;f*^XO$=3by=VzN9i@xxr<1w=pcxl!$!fjWt|fYmq1@@badT?v`d zIi$|e$Ji}FXsiVYf)?pN1R0LBw;+)B5aUJj2fP+=m;=_Eho84g%Jq#@MLPSQEX*@T z6sZb)m?)zby>{j1)(;rRML|gKSs+9jorf-XhQJ2Jyt5Cqc*`S3iX@A5C3jvgAns|4 z*|)YQ%Kmsj+YZ53;nMqh|AFvehUV-9R;1ZZ;w5r9l}8hjSw@#k;>)$P*r%)=Extyu zB!$Kd-F?*50aJ2;TNTR-fc8B{KAq3!vW{g$LlGPfGW+%#CXU zJDcMsvyT2`x~v>>w8@yssoA`KuIZ98CLU{Ia%*nW3G4t}@ApsbC@o^WCqL>OXx>Y^ zSuVWEQ;3=A=@RxCnt0>G@#(VWBQ`0$qTwA#e>SX{_N~JWGsBxFHCw|5|?CzDi>92F-^=b*8sMXnhUJdb!>yGD2nhN@{582 zRPcxuDzs&;8De)>_J19z{0xppXQop#T_5ejGCKv@l>$O#DA-@X{y_1B-AsiU)H}DR z3xDZ8G`amV_WmA&8!W=@jgm|%bnwH%qkg(@J$hLaSV zC-rXIFMM%y<|Gb)o?j zpe-`dJ*N5tC-iH)d0CgLdBsw*C!ST9hY1EkI|Y(&=p&dH&q;a&7HXa5#_wtMsenQL zcpyhwx)Ppw@XmVz?P)DI#^ee1oC!i`>>Jq1ESk-OuQ(Pbv=s{A0AjM@rw#FaU;RUh z*At0{U*NtGVY_-JcuG$?zuuf%ZBTWxKU2yf?iN#-MRWs>A*2;p0G1Tp3d29u5RbnY zDOON-G|PidOOGeybnbzu7UVv71l!b=w7eU5l*{EdKuoKu`#LZ}|fnUr-+lSST9(MTT`0tqOG z#+Q_=lXe-=;rE4u8s~;%i~~ z8v&&+VPeXG=2zw9B5sR$e?R(n%nf?p-(BCZ8}x!_-9T+LT;2=Zu?Wv)j3#>35$6dR z4*7xmI)#06qjh#sXvX(%`#D1mD8fn1G~I;l%Dk{pw)}>_{+3^Fv_q)>2#de5qGCId zPz?ix-3954nM&u@vaw{o%-#HU%_bLJMO#@enR^&B{3ihWdoU6%pBJ`o>im+b-c6r-;c{vd0Z_)`75$jApy2?!9G4_FGa)iZ~9`6VELiYM+n!-mUfvfm{jt zC?!1=%pxJhF>vyQ47Q}R;O48pxgMs)rz$SbM&jkp<6X$r4DHWg>ZnGB-$r2o1*nL# zW0^*itcRY_^Uv^XgQP>W#>KQgM~l{;S(GkVW@&vld^AhWzG^m|9#0#USbM>^en{k2 za8~DTL`(Q~=ofsL&Fc`!L6r~qTnnGo8r98<(aG*<0%aNEr!!BIyY>VV82kxhR%d>V(lN&#BId#urK_i~Pe6?>C~J!pU_lRon#&S_cXoQv;poG8FK4atc

    N)npz1~X%p6x{M(Gw!!H=!}lmO0Xr*8ewyH(Q+>oy`fxQkxJ zzzB$)%*xM4s_2(O>)T-QXhwP|&DZam#{O+47q|WKfz_ZL-MypRN~o{fE*I#6@eM?I zs%f-6{Lz6j7rB#U$%O$~TIT!j?|Ip1CpSmb=JA9qCY3-mQf|fVCxswPjok|VofUEP zW5^pTd5B;wRkyW%1a;nYHB$ef6Pv8^);`m0jv6p72iNJl+sVBqZugsq6cq_pyNREi z>GN!h6ZQ6`aOMr_2KI@j=XR@$aJj(2jcpY?>f=2kMV@di5W7Swj?ug10zRe}F1nR* ztMm6+T^)LJe^SzGgSxahQajq0h7#|8oMV0>D~*N}jl?9_X`ka42R4@rryDc3o(c$R?1*!1O9zleSOczw zYPS3~xbJ$~C(3+D7Zkrfjs_lneY^zv^kHmxt)aqZ!aeGABHZ`gvA&K`72z}ihI$Ht z9V&)wQy0g@R9irwbf!{uE&_J2l9jXz^Vj#=qA77*3Pd9OjrE_tKDHADd!AjFQv(ji zct-BMUt9()1Ox!dsI_h1(^F_U)_QJrx|%+y`zWWlD4=Nd?JQ=URh0*{fb1!o4tS(H z^r_T(8t1SAHf1oduG+X^*EC_kL(!QnXL6Hp);449yO&1xE>MXGqT)t10lzvALllX;;Q)RiJX$dm zlR8ep5-GdHmRm9?N#QCjNUA);vC03Gw6yds6^?c4;(MH>;O5xmQ2nGK3Dmk8i*v5t z-{jJsQq30%z}0`g7SN-yN`l-`@6rkJ|V|>18`MV zwUeH}DxWw&h+A+Dn|4|YNr&EfKS`Hz_NkeW3*sI5Rq-J&FzG=!{-K`n65#7O%^&f> z`PkqxyC_K)>781~7H${^Nj{`>XEa&OPqqQhySR5%w2{5+sEakXXHazJp6~LP2QKDx zpkvZrkDOa+A4BbqqX6ls&O)5-Q7`qkZ_?6~c-wQ9tseNtET;nhEOL^`*naKwcMX;R zbto&a;oTR0s;vjfj3wigUg)Sj)!OHQfZoJwAsWYI1A4ntz>X=W4s|y?tUk1r=>#Ct zf+?hq^>rQ3$KNboG$UhCdEmp{qAR13DK$f0ES7kAG~7q+g!jfVq`1b5+c62N^0%~o zKw91o@Wv;0EW*7fINAX3O~L-V{`;xB0q()#^HKZOlLrXVL*Dtw-$SUp8*_J{r( zW`6r`cz0yZQ#f0#*y+m64{bs7GP|2V$phf42rswJB?s@9qf;Bfc^pm-ZS#^5dkG{u zzv;l&B$NYcegSqAnjnPN1?17VUQbPummcWry((85IFB(pFQNGN{hhN$Fv?~l_fr?| z9=%dK(+;kZ(8=mwptjwC-ikBD$Z{l2++~*8wq5ynF<+PNlZI7ba5V#fg~L}kE;UH5 zJ;{P(`G{tNl&z5rUiH~e{I>GT8~9&*(J;Myx9z5P!db!F8RTII^I7c)HU=ss*bYB` zgwiIMZ_q>KEC$4lFm+Afvu6^$X1jm1rB*4H)-EIO5Rvz_p24?OkJ zovD4{-1KA6*oL?a;3qR7GZRB!cE5oAdA#M@{w+fGgsJ-lSmQ^-?8E&Q%tbmjd=@gZ z(}Mg*jsDf6Z)|7s%@9pc-tuw5W&zqUXjv2bVkC%-X?O3F72W4EsIl#1e>Mdz=X4k*_>VxCu_2?jjg16N*5fwC-36OW&;Sz}@jMn}hgJdEd pO;bST+>R{W-aENZYk%(=^(_R5N$LmL{Qc?!%+I4tt4z=_{|902Wu5>4 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png deleted file mode 100644 index 59bd45b907c4fd965697774ce8c5fc6b2fd9c105..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4369 zcmd^?`8O2)_s3^p#%>toqJ#RmwV2==ic*rz7lOw=eaq=H~;_ux21)-Jpcgw zdj+hrf&W^f<%Qk9Zpqf#;jH;N^Z%VA?R|9mZ{esQd(2F=?y+!`XZ5CR?ue=UdHIfUDFM*m15I;g=VN2jw zQW9?wOhDI#+P0|`@JQoC3!pu=AzGMtYB>V&?8(2>_B5_p`1Sb1t{^|J%bZYv09RS? zQ*dcs7}$)taJ@vX0E<96P{ur)Eygr{&ALyNoMP%_94m}=qFVT)&CeG1DBBMLUSKP^ zp%%Q3$MEtKll)X*+$)3O_3x`4%cHY0uhy7U;5x^Ir}X1)mv&B%|A)@A$a>f}tP{5X z9-gkti`YyT+hk9)cZW7fAQhjT%$XLLI^&VR=qev36;`WGBOP!^&(?!sK6jSH0Dnz4 zoEMMNu}y&n=rd-GWI?rGBI8!GD*NJ$k&e5-6+~-9F^6tV<=5`FcY~t{iqRcncEU+F zkT~jww!oy(@~b~WGI8!lzjURX&IpJjFGxShOKUunP+rW$I{c|x0qM6!Gxf6n(;$D> z+QYiULqq)Fy4VDk&Mev)NyM@nvF z7O6M*A$C)kBi0HGMT_+xfQ^USTM)>*h_Rx%eSRxA%n|FuC&=F=Pz}E5uCqbcy;7j=%Qh`glqEA-jx0(a<)uKO5Fe|JLD-ndZ-vnW`G=O&^%pa}Ah(2%m?oANs{lJ`?RhrZ8n!`Q97TKw{YAw9 zD)=M{mD(~_jj`LTd%q6Veum)Cnd!7lw}(5h%ubHcg^2O`prn%u9es3C#&%TsnmSD3%3Ik^Yd@6-d%(I7kqT(B@dVX2 zIidXgd>qYT-oTZ=1sGI7^*_E9Q)1F2mooE0R zXopPnh^ci@+wz2ZDjo&Owyxh6t90Gt!u0miLxc!bue^LvHF?)O@Yf!dQUXfW$u8(f_n07^N)-vpIe;TrHv5uKm{h_v`-IN^zwWc>Lk ziGsSr89sDcdOR_wa~DjrqV&Nd*$18(vohPJ3hSzEJPF2d!u}415wrSMtS(zNa7 zbO0G4ajgKNp{`D7DO<(T?wowarQ0dIKLb<}#prQM)ytB73YNTPQgX^xoT zm>;yKSJ*c@QfD8HW`6&+mowOaA|A&~G0fO6&xwj;E3O9^Zu~ZXts~;-d%FyyeXrijORi<_S(dw_5@h&-fTY?#FJo% zQZZ1&ED%$if+n8JVM{s-ZoK@P>p@z4s`AoI6hYxE!Ie_Y)cpjZjc8@~uNMYVfy#J$ z)+sdEX7DK^{}kUAST8U6^p6#c>0Lc>T~9`0}`*2 zizaU)TFS4(u;BenUWZr?s{D)Z)rc9L5&gUvz3iSQaF#J)D)Ts{YgagdDcI1S`dtes zPqb4|h-RIkjhnpmn(Q2Je6Di5C?MkCUL)!WoKn|P#al41v#-Q8`K1$Gh64UhPQj|T zaZb%tJ}O{A?Cvl26!jeKS3OUkp5@8RDBYwh`Loxb5W<^m*R37+v}#*m-G{{ocF-#r z7!k3ZS^4Qu9sNRNZ3`laW2TqV{rsR#~gtVp6C zL0?}~gbLTv^jqtPQD@Cpq6{B6v&*Y)?tx})z=qQNB4Z_59 zpI2L)xQ`!|J8wWgs82jSw_8(;#}y7~Y^&hY9P1G)@`CGtIi*tZ%-%&;$PuG(!M%)E zQ?T#imBH8dCZxUBX^RWPwIh9LcnL3#$befQDr@UJl{=}o0){qIt52vU9X=3L_gvVW zPqp_YhhpM6XiE7Lvn-G0Wzo>0;g|$_-7|ucz~*w%bW@hr6M?~v9dT}L=>UotTj13& z?Uvt0_uOvzMq4iG6)gZqeU;W=P@EVod;}Vr7P*@=C19v;iz$4N+c5ewauTtKK5e;yIx(FQUec0 z`G)VlTUY|m2L=KusMRgMlapu#wt8MohK3=y`!J`tD6nYd%?xIZO`Q)skL)R%3Vf(P z__5Sx3h%fKF=sNdZo2p(w=_|}1M%ri7fO?8))sU1ySG;M4p4;zrr}4l0lzvA!WQ&a zrwX>%lJkv`Gr_u=K>kHOg6(AB(R3FOryElY)-vi|fRsBS<)$1;TC_?BnyScjY6>_ZD=T|bjcbjz@D6V+yfHd4SU+J*2Dh%n;$5ou zHh6R=)$>IH@%5js2KH#JkfFCVI}P>~U;|}>kk|06tA}^~B;|gJ$UvSF-l4GX43DAR z&M2mp8OgiTaK4li0|Q2qmGNYsm+Qq^JM8yfCP>5!31rjh4Mnq~+5X8+_$scfP1Fp!c zcQO*#6cfJ?ZRxn_$Se_|}Xo1oIF7s(7CllypCW@W8-y5%Bel_K*0G zd~8UWeYCWz>~^hF3ond|tQcClJ(8^9FW&&?U)a4O-pE;Y*u|FHGax>F*Kg_beOF5c z&?#xRN5Q?ckEwCnNr-${XC=w-te5%QH(6O~yxke=R!_ns))PU07Pu)CY`<>$+XicZ zCI=g^;q7NZnw=-vf;HoWLD+}`&Bph>kiqyX5jxjI1A41d$R3nahq@CHULV#9ItIwJ z0)^JGy{hB;@SD|}Zel8~2z;UjN96MR@dt;EV`9RP4X&zn8ib=n*107cICSp7z6srZ~4Qg|Vp$OB0By{IxAPaD7HGFw_HTza~wWN1A6 z3`7BZFse2a4{y#V^&;nRVcZOz*2>A?jm$%?)KawLR0cEz24qxxOOo9_2)9MrWpSg7 zPiPz+M7(zPRZ3$#11ti?uI!}bM!Dg%L#+uR+^2L2RX+QlMpL zg_DrR=GIT7C~b+^OZK)?l7*9c-78zWVbLo1oS}bItdscuF80}guwA8c^(47DfaBjV z^V@&JJHxYHqS+e7&X;ezZwsE2+t~n0?*m^(db@WnI{LgAnOqOa<8pRvo0E>*O&~J_ z&A)t2LOG)5=3$3n2_gi2Kpvgv)#LCUh2Y~ z!A&(~-8reT$sJk0=L;m~ES3k}k% zkF%gzzT(+nRU0IeUvuW8pq=8uzr&7HW>K5ZiD*8qL17AI^ zGqo>*mvIChU6+&t{A3|!W?~pi9_O$>k2d|#(Z721wcT{S1)_UFZ+}QS^KZ*u?5Y~bz z^cLI;2{$C_ZwWqM@sYMYwG+^N<^Ivq8ZOwV;7xT+WCh)I9PHC}ut;VNr?w z<@?HsG!Qg3zaV+-xQ3ldtad!U<6iGz_enGH*2akP_r)o1D&8p^5M)_c8IIj6Wy*7HJo&CBLuo~nj>(63pZzO(Vv^ZuB3 zMYigjkwA;FEy|G}1jpiMj6|NTm7Uyiw=@FDE*nX<>jR!W@9XIyf%$Fd*J5*D0Z0Lm z9}ZQxyT|x5ftNy?V>EbJz-K>bV9gs9RaXUP<^=;e?&Fqxj;6{ieR-a-@HycA1KMKhql8GOmcxwZ?_-(3hMK^^a*(gaFvBH ziIC!fgH4$W*NbKIaY&T?%&13``KbD@S-0`xQ%v3TV+B!;RC7O!+1a9QCA$H@3tR;k z)SSoR7(s4)f{zM}eWgFN{(ZH5d1O}l)f$ruT!)Q&NImXyZsTzOf9TwctcSfr+M)aJ z5otO+$jvm-P4)ykH)x|cO5xeb>?!`qGw$(>&axqLL6yoB${vsMXgL_-bz@2J_tS92 zdvZG-+vKl@K4Vr(EL{WQt@Z+Ea-hxX0}nTSZxnpi^#Kn8Ox8FgIS|hc}KJQ4tm*HO16ui{(O9} z1YN)GjiQt6fGq`Cj+^`zUf?8hk^(T{{cOQGWFP98am}is28A!5%{R#ENv8fCN!j69 zlMEK(2z?|BY=Je$XD9mB-Kkem*(d-j^9j$2#6r$Dz?s)-TCDCGCs z8>6Pvj{Y+YIeFA@qY22V$)awy@q!9A4rgk5b9TcC;s9Ig^G|6nDP+5=Fzg&?(L=vc zCbGd>fSu~@6!94td+o#d@sid!EIX$rx7*cawe6 z`dScJ+$HssdOjE)O#Ybs56vm-FQ$7yuJJD^Zqk%hMaIgAJ<2yb_MFQte_i;62ScT$ zpjifYyR_E=rQ+>H)pmlr-Udzg*-!|ssw(D7wJvC+Sf8bb9;;q8#z?0p!!bsd{wy|5 zpBaMHE-Ve>i#LLjHRaMLtp%9&(HCng7Sw96jVv!#0k%?F^K7&=T)mnYn)D9(i;4x5 z^NJTJwq~pv;kH@#ejTd*48~(J(r6j34|m`h9fEDj0im)~+%I5XphWymhT;_Zty|Q& zzjPg#-ufAHZ1M*Gccw?Kf|8Pnhtb0`!{N`Bqsa37J+>wC$!e z00k+2Egzz;rbcWoUB%Jvp8W1}$XD%e3>4y;;OZ1ccT-O#uW6Ys@C}Pa`nZrNKzR(2 z4e%3)@QI4SE&E!lW`5y14QhbepBG%_XBV-O(%5tj)@9#|;sC-MNev!zGDHk}JdpGC`iJF#8=8-P$Xoku_=Dw%Cv3{U7L>gf zRQ?<$t`cZ*MP5GQmbmx#!+*!zu>0MewRO9GFGS{b^m_fJ-N0?j@EqoFf>$khj+E|@ z7r3We&^tR^YZrxKe*d22agXqCO0l44&kqCv{u)T|(lv`~PK@DvE z{QI_TlCH5z*gR!>LO)k67{^R+vWx24U2^2ODXpwT;6y+6+$5m)_*w4WY&#do9dCeE z)>p+Ykdhq($DhmMiaYXey!@N%L26uz($aJ!QT{B^Wu}U$^9e#5)=c+XF9@Ill?ZmM zlNgHiz*9!vDc&uxOo;ZVxb`Q!Sk0*gnfxWzmbZh4(=%CD%qP?0=);n$&zaW_$UKV9 z8axdcN#AyZ{P)wj?V{P}vM)YY!>6@}^>U+iv$`9>nMTCPjN>z%yF&3yf%>+T@0vh4 zlC8Xa6zeo?%=o3}M8{aebLHcO{^1Ar8qiM=Gquf?Jo)q5`-+?sUpg?QXyEUpWSm+n z$K-UyqkIwHLquru~o(OF)hhz$Y*|X>ZIbswnxRvr~ z2=rdOGVuD|xRlpAZE<0!X1F(%Anpl^@V^D3vbM}qxe|NI;TTiZy7(IM;R69RkA>a& z6gwYE2sREzQ_LHmWqB+ogMk(fMaSFeoDq-!HkFB_nXt5+2ncFuk9BQL1I&oB1zZi) zYW{6_&-Ip1l*OVRA##1ILQS;5R{-K^0wGTiJbVSi@LA^$D$;@J>^G{6@&+%4{b3(s zC~LEHiTv(0b#zxt?YJ0r_~pUZM~mQ(??(n#>&tD%+@nq=Abj5*8R!~Ul1`G~=qFJ4 zfl|m8ZDCYgtr`4LcOpgiJYX9qRY5;DcWti~PmS$VB$E-Zt^f4)vLDOe_3XTq5^ylW zJ9PKm!V-8sAOJXnUfuFNIf0R9tK-pNs2hO04zr620}5B(Ok>yB)Of-3sP59qfQNbm zA4{w!2@cB;GbR(~szVrbO%(w=5S!X`o@o@x++wbN_tMPT0Vc)*I;Fgsbf^*g0 z2Di?HTApwKq3+YwfNsqd3iP%{hyK1iyuVZc@*0tO_3+N0#GFsz>8MjeJ2UJ%L!%hi zGYYAthH`E+ywA*u{(eJ=ia3h*%k?779rk-K<0VZAPkl;TFUbmei|$fqWO8!_zIvqt z$ly$VrlH46nnpX~X5Yk0iBJl;=WuA4>~X4-f&K0yWf42h&0b30t@NYX$7egQ1Fp!a zbui-D6cWCWV&|R1CY@G8(qOmWjWeX3eX7UggZPGimA}soOuQdXe4uZ#2>5zN>qlI0 z9xk}lE=tNpX1m6*nFr2EQ3xs79!^sCldDJYE$m(qYv3q7>}1R7?iZW7>$~*%zKaC| z=$N?ME$>#+%T&MZC`dW1wUl6Z)JgyCn~V%K&i0H|iwE%$>xsZW3tTfZxIUePci@p;cRu|d=ItIwF z1clVHy{hH?@SD|(Zfqi^0DQ1hczHN7xq85h)rzQqLHMX2^IkuK7FB!kI40s$|CY7~ zNX^{_UjN8}L%Med;|+=4RNTMozn8KT;2tb77bUPCmioh+rZBfIiM6f_P34cQ__o1G zWqQp3VL~~pE5?qODf%iiQQ3f42YF@09tQ*$4v_EKUx;t1KCPCBtgqg z@+Tn;O)a0uky_%jm+WjNB?=~VyH>V#L!*=l*@OS6SVyt_UEH&NA=?V2stHPyKkVNy z&jg<#cjros){#ji)dK z%)We0L_478=HZ8-@xnwsKrWs8)x`MB;(Y`Cmu2c-&SH(vN-F(*e`l?c%+l$|y_AJJ zhcDGnwLvN+bu;_sX|1AiePhx@u&%P$hf*xE+O=~D?_(_KGWQ!158YL-y9$*6mmPo;Rp*Dl5lm-mVM2i`h- zM@nxv590_tvMwPD_{l=b$iOm|+|S{D9&P%zeT$GgX6Akl-tfUF>tL@Ld!B&{pN39t zH>3Vhqkr}2Yul+jb7UiouWVGPNsxX7Ueba+9|~dz?d*QM$ng0DZfO0`7fAy?2yMm| zcnRzUhZ&IcwgjH9cuU!w+VStYa{p*)4IgBf|E8)sqMYtB2KH_}SfsFq(c9i(Q6S3U oBo%DI*Kv;w;*%(i9W@f3_WCF#rGn diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png deleted file mode 100644 index 2ab019b73ec11a485fa09378f3a0e155194f6a5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4369 zcmd^?`8O2)_s3@pGmLE*`#M>&Z`mr_kcwz5Nh&gy7G+@45H9p05OJ)J0CH2owMSaGIN$+5!N; z<11j56?ANg=9hMl-IBGX-T8hf$N$b*H?$f4Xt&I`oABt1nR=k%#z{{*a!Axm|t}hCz zJg0Ln7;M4Zjx{$mwhMW+kWN;|j>qTx_-zNX!GzqEZRa}QF8_0yk6+=w}$QD^&hM4%OkT=uh$q9;5u~NL-I+NQyaVc|3l+iWI5~|(hA-G z08i8AMr@{uY_cWTxo^y|Qyb33mlZLvc7H2Zm~>mB7&=-1X^@|D z&0*~i?GBE&NM(Pv&Vt^zWu_bD3e|R?wTL{cSFwD^Ij9v%g=aLY@1U2Bxn#Te*{>%D zOOW-O-bfnJ7T8jd<*>8`Z2DsFQi~S$%^npJwXam5>>p zMd}QEjM)@~##n$LXpz1Hkl|2UGXi-JFFePXBWL+-5f%!S>L#KL3>Vl0w#d^21Jn<~_7q zWx^Xg1(>PsPGO&cu{S;(pRQ;=Vw2J<9NdQVWx<+g-`ia=Q@puS)75M+?u>DTa95e9 zt#1T?#a)uWC>Mia!K6>g|InPW{&Kp9$tC_3*;R_Xsz6^Eu|xW1$6j#0?XLs7^l+%O zlxddE)h^|=K(2UqS*0ECuDe0ic|H_^t*VOoTCKx0Qmn_^LyJ|b8l$Jvl3{2=3x8&7 z$1ik&YG>w#@x@y~$r`fhlUDo;yXecc6$`30m`3K8s{k8G&3RVp8n#|l6h(Xw`Axw9 z%6Y^J6k0P@4YAuSd%q7=eg)&u8EMoEmq$CWj1GY|rGQWw3ida!FHk&wCqrQh_0Bcw z!ZBS3CbxgZ+}~wzgGIQ#QId%T_TE~_qdUqxjqS#8#jPxdwO@(@-5_nSP&uT?aGYYD z6km36K9=gjUjImwO=5Hl#u85VF?r0HbW)#h^SR|s_L47Tl$&Z&Rz*ksl!t*(2O2;D z+8`6$qpLn}LchhCmv*X}moGMX5?F@juGeHQAddAn}0~r zS_0|d3*0v%Y)8+8K{ zGyoYPb|W9Grm9M4E?vb^@16ePbI4omZv+(NoZ##fLUmKlB(G_jEbtDCM*27t$v`JovAZa+%*Q5dDXF*Ftt*n!O>#ohCM4lZ)h5rdKV-3A za}2AO6@!`W>ROk5FN*>2Zza^Z%}8KT%*jBGH|rml2X1LR{wZhWx8V4>|5i}; zMnLIHn3!^)`87GYh}&Y`KMwyLbA#^pch}Z!`@P_qH&N^LS9SxpEy8mc!wFusq&Z@` zeO}<6PC@VNaII|=n(^cNUiLseig*$;NjG7;IwvfYCBN>kzv@v-V2eBQZ@oIs^)NLqMR935k|1}U;5<{s(Ebdj4r`?QtrrAPfQooq zmPs_(YTy|??+nitNIFDoR7~qLPPFFCf^_~8OUt{#!|9o*3Q{!@9ZAI$7O~piD!;WX8#v&RxNH27i59$`1{o zEYU_zE{bKEI%f3BbE0Fc;f2!4LjUlC`wgh4@R{1?O78r5t$hWKiLV{#QWWq{QZiPx zm3?x$;&DDRVt0SByRiFczw$-e)GSvpCRbzk^=E zz=(+LjEc{Ps_2(OYg=G(93!oS=IeJ|WA8STv+LgI*Oj1c-QC06N~mvJ&KKx{arGp5 zswvJ6{%BvBYo>#2$%O$~TITuh?Rr^jCpAUXh)}m74`O|aOU>w2KI`k<#efwa5=-l4Xx!o>Z9Evg`RLN5W7SQp3$@D3_hY4EV!0( ztMm6>zBcgY{RvHZ{9Ey&&)jr2B4s0qDPBUh1ITaAp&>rj3ng*B=VGXz* zs@eR<;J(XkpD6Q1U3}#FR)wlafiFMU(-=&e9(eQ`isrS-9aNwJ)7frS8RiXM4*SbC zL|4*c?h^jfYvSOpn%Z$W?C|TuZ;uy2pFWHXuGW`ZkGV&kPJsKqJJQ!NswAE!!cb2k zumi=AE$YIkm})cVlg>nn&PBjBRI*@mfhhRMsa5U8k#A!ztfiw)d7I_UyAif8$5sJ9a7WUv5!o%fL z(J7-8EQzv1YIc)BNeWkLK~m%y4vqe&q@|_ZR5;eC3-9rkf*T{_19jtuWKhdW4Bn|~ zZ-YyFLN!k)0AKg{dO)|v3K?=oy+dzb4%T1F4}JsByncB1Z(`2p@O0!E!JQelouN^* z%Q^YfQUh66D$Zx-RDZvLctsr9`_+1p#tz&4SMd@i_-8()tyg3OyhU~?Gt#-a{NKFN z0VGf+AH%@o6;-_*?$$T4QX-f_>Ny-5CV8Ccq+@>gNSeovbFr0@b}RiTcJbLx>ws&r zsvY!rR{4al#MpVKut~?&kTmF>_v3UaC!gvuxgg%5-{l{20}~&F6CUarF9N=u)BG71 zoQDlAwT+T=mfo&$Xy%4-kmW;4wuh6{{ABClybHV6L>t&k4?9_Ny8A_^?)ff#dEjhL z2RbC~cFVbz^fJ`$I0%prYc0g-9(7X3eUp}^#Mzv)Z1EsGW;qr3cY$+e2HU5d_O9L% zpbljP*1!A0PqpzNo3W&y(hD87qgweq5YQWYEkxrOuSain2-q@Z*P`x*ht-9)Fr5Ho zSTKduvc9h6`S^#$i)LgjDi3_PQ+RbaGP!!di^Y;4kB0lGo$y{if)rJIaXTbpRgO#B z1El6|18;s}$0FRjgK-7~ZwmI`_1{a`32+Y>&O_iTpm%vz6hNkjGR(#*! zpfJ2>OAQbTFba9S3j9BlRHXaG{)Zt(J<3ppA?}j+7F#{bV{M7zU)5e@~R&J_xf$+GKK~ z3{R;Y9fZGe^ifEqKL;!VMXv26=R~^TG(#*2!JKCWoo&c^$utAs#Gfq-?t!c&9TH5- zj&i5L4NWbdNs*djvsY}bC&ddUbh=iyc0;3-@Y#d^s8|Ql{ax(yenFcG#i|K%lRxy| zFys4w!@EPXp2AsbMUGc*eP|7uliAq-O6~(+MR>V(EZTd&9G+MY&gF2lZ=I8j*o`OC z`AxrmOGMeD=H_9Cq47clT|h34>-EI=%;E!my;o&wU(aKV&PymBzrV9q2uA62XS@JrjKYANZAU>;8mag#BU?Nv`+ZVhlAPV`HF_gKY_O zhbV2L`8qvR&f=@M5vH~geD+L&*L2s<)|5)clA0yt9TM{X)iWtx@wJO_!{vR#|AD6t z*OAg2&P_i8jjW5y0DdtOGcqvrCHD*1Uq_q1ZQmngPnf!2fHizH%sSX>#$2Rh!>1ur z+s(*-)abDuePc6~XNG8m@|KMXHVM#G4?~+V z1z!An!D0GD-7WqXE8ddUXLkI%u01$fTEhhy - - - Code coverage for Facter - - - - - - - - -

    - loading -
    -
    - - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/facter_dot_d_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/facter_dot_d_spec.rb deleted file mode 100755 index 2fb72b29ef..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/facter_dot_d_spec.rb +++ /dev/null @@ -1,32 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' -require 'facter/facter_dot_d' - -describe Facter::Util::DotD do - - context 'returns a simple fact' do - before :each do - Facter.stubs(:version).returns('1.6.1') - subject.stubs(:entries).returns(['/etc/facter/facts.d/fake_fact.txt']) - File.stubs(:readlines).with('/etc/facter/facts.d/fake_fact.txt').returns(['fake_fact=fake fact']) - subject.create - end - - it 'should return successfully' do - Facter.fact(:fake_fact).value.should == 'fake fact' - end - end - - context 'returns a fact with equals signs' do - before :each do - Facter.stubs(:version).returns('1.6.1') - subject.stubs(:entries).returns(['/etc/facter/facts.d/foo.txt']) - File.stubs(:readlines).with('/etc/facter/facts.d/foo.txt').returns(['foo=1+1=2']) - subject.create - end - - it 'should return successfully' do - Facter.fact(:foo).value.should == '1+1=2' - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/pe_version_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/pe_version_spec.rb deleted file mode 100755 index 931c6d4b0a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/pe_version_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env rspec - -require 'spec_helper' - -describe "PE Version specs" do - before :each do - # Explicitly load the pe_version.rb file which contains generated facts - # that cannot be automatically loaded. Puppet 2.x implements - # Facter.collection.load while Facter 1.x markes Facter.collection.load as - # a private method. - if Facter.collection.respond_to? :load - Facter.collection.load(:pe_version) - else - Facter.collection.loader.load(:pe_version) - end - end - - context "If PE is installed" do - %w{ 2.6.1 2.10.300 }.each do |version| - puppetversion = "2.7.19 (Puppet Enterprise #{version})" - context "puppetversion => #{puppetversion}" do - before :each do - Facter.fact(:puppetversion).stubs(:value).returns(puppetversion) - end - - (major,minor,patch) = version.split(".") - - it "Should return true" do - Facter.fact(:is_pe).value.should == true - end - - it "Should have a version of #{version}" do - Facter.fact(:pe_version).value.should == version - end - - it "Should have a major version of #{major}" do - Facter.fact(:pe_major_version).value.should == major - end - - it "Should have a minor version of #{minor}" do - Facter.fact(:pe_minor_version).value.should == minor - end - - it "Should have a patch version of #{patch}" do - Facter.fact(:pe_patch_version).value.should == patch - end - end - end - end - - context "When PE is not installed" do - before :each do - Facter.fact(:puppetversion).stubs(:value).returns("2.7.19") - end - - it "is_pe is false" do - Facter.fact(:is_pe).value.should == false - end - - it "pe_version is nil" do - Facter.fact(:pe_version).value.should be_nil - end - - it "pe_major_version is nil" do - Facter.fact(:pe_major_version).value.should be_nil - end - - it "pe_minor_version is nil" do - Facter.fact(:pe_minor_version).value.should be_nil - end - - it "Should have a patch version" do - Facter.fact(:pe_patch_version).value.should be_nil - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/root_home_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/root_home_spec.rb deleted file mode 100755 index 73eb3eada8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/root_home_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' -require 'facter/root_home' - -describe Facter::Util::RootHome do - context "solaris" do - let(:root_ent) { "root:x:0:0:Super-User:/:/sbin/sh" } - let(:expected_root_home) { "/" } - - it "should return /" do - Facter::Util::Resolution.expects(:exec).with("getent passwd root").returns(root_ent) - Facter::Util::RootHome.get_root_home.should == expected_root_home - end - end - context "linux" do - let(:root_ent) { "root:x:0:0:root:/root:/bin/bash" } - let(:expected_root_home) { "/root" } - - it "should return /root" do - Facter::Util::Resolution.expects(:exec).with("getent passwd root").returns(root_ent) - Facter::Util::RootHome.get_root_home.should == expected_root_home - end - end - context "windows" do - before :each do - Facter::Util::Resolution.expects(:exec).with("getent passwd root").returns(nil) - end - it "should be nil on windows" do - Facter::Util::RootHome.get_root_home.should be_nil - end - end -end - -describe 'root_home', :type => :fact do - before { Facter.clear } - after { Facter.clear } - - context "macosx" do - before do - Facter.fact(:kernel).stubs(:value).returns("Darwin") - Facter.fact(:osfamily).stubs(:value).returns("Darwin") - end - let(:expected_root_home) { "/var/root" } - sample_dscacheutil = File.read(fixtures('dscacheutil','root')) - - it "should return /var/root" do - Facter::Util::Resolution.stubs(:exec).with("dscacheutil -q user -a name root").returns(sample_dscacheutil) - Facter.fact(:root_home).value.should == expected_root_home - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/util/puppet_settings_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/util/puppet_settings_spec.rb deleted file mode 100755 index e77779bae1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/util/puppet_settings_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' -require 'facter/util/puppet_settings' - -describe Facter::Util::PuppetSettings do - - describe "#with_puppet" do - context "Without Puppet loaded" do - before(:each) do - Module.expects(:const_get).with("Puppet").raises(NameError) - end - - it 'should be nil' do - subject.with_puppet { Puppet[:vardir] }.should be_nil - end - it 'should not yield to the block' do - Puppet.expects(:[]).never - subject.with_puppet { Puppet[:vardir] }.should be_nil - end - end - context "With Puppet loaded" do - module Puppet; end - let(:vardir) { "/var/lib/puppet" } - - before :each do - Puppet.expects(:[]).with(:vardir).returns vardir - end - it 'should yield to the block' do - subject.with_puppet { Puppet[:vardir] } - end - it 'should return the nodes vardir' do - subject.with_puppet { Puppet[:vardir] }.should eq vardir - end - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb deleted file mode 100755 index a016b685c3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb +++ /dev/null @@ -1,225 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' -require 'tempfile' -provider_class = Puppet::Type.type(:file_line).provider(:ruby) -describe provider_class do - context "when adding" do - let :tmpfile do - tmp = Tempfile.new('tmp') - path = tmp.path - tmp.close! - path - end - let :resource do - Puppet::Type::File_line.new( - {:name => 'foo', :path => tmpfile, :line => 'foo'} - ) - end - let :provider do - provider_class.new(resource) - end - - it 'should detect if the line exists in the file' do - File.open(tmpfile, 'w') do |fh| - fh.write('foo') - end - provider.exists?.should be_true - end - it 'should detect if the line does not exist in the file' do - File.open(tmpfile, 'w') do |fh| - fh.write('foo1') - end - provider.exists?.should be_nil - end - it 'should append to an existing file when creating' do - provider.create - File.read(tmpfile).chomp.should == 'foo' - end - end - - context "when matching" do - before :each do - # TODO: these should be ported over to use the PuppetLabs spec_helper - # file fixtures once the following pull request has been merged: - # https://github.com/puppetlabs/puppetlabs-stdlib/pull/73/files - tmp = Tempfile.new('tmp') - @tmpfile = tmp.path - tmp.close! - @resource = Puppet::Type::File_line.new( - { - :name => 'foo', - :path => @tmpfile, - :line => 'foo = bar', - :match => '^foo\s*=.*$', - } - ) - @provider = provider_class.new(@resource) - end - - describe 'using match' do - it 'should raise an error if more than one line matches, and should not have modified the file' do - File.open(@tmpfile, 'w') do |fh| - fh.write("foo1\nfoo=blah\nfoo2\nfoo=baz") - end - @provider.exists?.should be_nil - expect { @provider.create }.to raise_error(Puppet::Error, /More than one line.*matches/) - File.read(@tmpfile).should eql("foo1\nfoo=blah\nfoo2\nfoo=baz") - end - - it 'should replace all lines that matches' do - @resource = Puppet::Type::File_line.new( - { - :name => 'foo', - :path => @tmpfile, - :line => 'foo = bar', - :match => '^foo\s*=.*$', - :multiple => true - } - ) - @provider = provider_class.new(@resource) - File.open(@tmpfile, 'w') do |fh| - fh.write("foo1\nfoo=blah\nfoo2\nfoo=baz") - end - @provider.exists?.should be_nil - @provider.create - File.read(@tmpfile).chomp.should eql("foo1\nfoo = bar\nfoo2\nfoo = bar") - end - - it 'should raise an error with invalid values' do - expect { - @resource = Puppet::Type::File_line.new( - { - :name => 'foo', - :path => @tmpfile, - :line => 'foo = bar', - :match => '^foo\s*=.*$', - :multiple => 'asgadga' - } - ) - }.to raise_error(Puppet::Error, /Invalid value "asgadga"\. Valid values are true, false\./) - end - - it 'should replace a line that matches' do - File.open(@tmpfile, 'w') do |fh| - fh.write("foo1\nfoo=blah\nfoo2") - end - @provider.exists?.should be_nil - @provider.create - File.read(@tmpfile).chomp.should eql("foo1\nfoo = bar\nfoo2") - end - it 'should add a new line if no lines match' do - File.open(@tmpfile, 'w') do |fh| - fh.write("foo1\nfoo2") - end - @provider.exists?.should be_nil - @provider.create - File.read(@tmpfile).should eql("foo1\nfoo2\nfoo = bar\n") - end - it 'should do nothing if the exact line already exists' do - File.open(@tmpfile, 'w') do |fh| - fh.write("foo1\nfoo = bar\nfoo2") - end - @provider.exists?.should be_true - @provider.create - File.read(@tmpfile).chomp.should eql("foo1\nfoo = bar\nfoo2") - end - end - - describe 'using after' do - let :resource do - Puppet::Type::File_line.new( - { - :name => 'foo', - :path => @tmpfile, - :line => 'inserted = line', - :after => '^foo1', - } - ) - end - - let :provider do - provider_class.new(resource) - end - - context 'with one line matching the after expression' do - before :each do - File.open(@tmpfile, 'w') do |fh| - fh.write("foo1\nfoo = blah\nfoo2\nfoo = baz") - end - end - - it 'inserts the specified line after the line matching the "after" expression' do - provider.create - File.read(@tmpfile).chomp.should eql("foo1\ninserted = line\nfoo = blah\nfoo2\nfoo = baz") - end - end - - context 'with two lines matching the after expression' do - before :each do - File.open(@tmpfile, 'w') do |fh| - fh.write("foo1\nfoo = blah\nfoo2\nfoo1\nfoo = baz") - end - end - - it 'errors out stating "One or no line must match the pattern"' do - expect { provider.create }.to raise_error(Puppet::Error, /One or no line must match the pattern/) - end - end - - context 'with no lines matching the after expression' do - let :content do - "foo3\nfoo = blah\nfoo2\nfoo = baz\n" - end - - before :each do - File.open(@tmpfile, 'w') do |fh| - fh.write(content) - end - end - - it 'appends the specified line to the file' do - provider.create - File.read(@tmpfile).should eq(content << resource[:line] << "\n") - end - end - end - end - - context "when removing" do - before :each do - # TODO: these should be ported over to use the PuppetLabs spec_helper - # file fixtures once the following pull request has been merged: - # https://github.com/puppetlabs/puppetlabs-stdlib/pull/73/files - tmp = Tempfile.new('tmp') - @tmpfile = tmp.path - tmp.close! - @resource = Puppet::Type::File_line.new( - {:name => 'foo', :path => @tmpfile, :line => 'foo', :ensure => 'absent' } - ) - @provider = provider_class.new(@resource) - end - it 'should remove the line if it exists' do - File.open(@tmpfile, 'w') do |fh| - fh.write("foo1\nfoo\nfoo2") - end - @provider.destroy - File.read(@tmpfile).should eql("foo1\nfoo2") - end - - it 'should remove the line without touching the last new line' do - File.open(@tmpfile, 'w') do |fh| - fh.write("foo1\nfoo\nfoo2\n") - end - @provider.destroy - File.read(@tmpfile).should eql("foo1\nfoo2\n") - end - - it 'should remove any occurence of the line' do - File.open(@tmpfile, 'w') do |fh| - fh.write("foo1\nfoo\nfoo2\nfoo\nfoo") - end - @provider.destroy - File.read(@tmpfile).should eql("foo1\nfoo2\n") - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/anchor_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/anchor_spec.rb deleted file mode 100755 index f92065f79b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/anchor_spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env ruby - -require 'spec_helper' - -anchor = Puppet::Type.type(:anchor).new(:name => "ntp::begin") - -describe anchor do - it "should stringify normally" do - anchor.to_s.should == "Anchor[ntp::begin]" - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb deleted file mode 100755 index ab5b81bb96..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb +++ /dev/null @@ -1,70 +0,0 @@ -#! /usr/bin/env ruby -S rspec -require 'spec_helper' -require 'tempfile' -describe Puppet::Type.type(:file_line) do - let :file_line do - Puppet::Type.type(:file_line).new(:name => 'foo', :line => 'line', :path => '/tmp/path') - end - it 'should accept a line and path' do - file_line[:line] = 'my_line' - file_line[:line].should == 'my_line' - file_line[:path] = '/my/path' - file_line[:path].should == '/my/path' - end - it 'should accept a match regex' do - file_line[:match] = '^foo.*$' - file_line[:match].should == '^foo.*$' - end - it 'should not accept a match regex that does not match the specified line' do - expect { - Puppet::Type.type(:file_line).new( - :name => 'foo', - :path => '/my/path', - :line => 'foo=bar', - :match => '^bar=blah$' - )}.to raise_error(Puppet::Error, /the value must be a regex that matches/) - end - it 'should accept a match regex that does match the specified line' do - expect { - Puppet::Type.type(:file_line).new( - :name => 'foo', - :path => '/my/path', - :line => 'foo=bar', - :match => '^\s*foo=.*$' - )}.not_to raise_error - end - it 'should accept posix filenames' do - file_line[:path] = '/tmp/path' - file_line[:path].should == '/tmp/path' - end - it 'should not accept unqualified path' do - expect { file_line[:path] = 'file' }.to raise_error(Puppet::Error, /File paths must be fully qualified/) - end - it 'should require that a line is specified' do - expect { Puppet::Type.type(:file_line).new(:name => 'foo', :path => '/tmp/file') }.to raise_error(Puppet::Error, /Both line and path are required attributes/) - end - it 'should require that a file is specified' do - expect { Puppet::Type.type(:file_line).new(:name => 'foo', :line => 'path') }.to raise_error(Puppet::Error, /Both line and path are required attributes/) - end - it 'should default to ensure => present' do - file_line[:ensure].should eq :present - end - - it "should autorequire the file it manages" do - catalog = Puppet::Resource::Catalog.new - file = Puppet::Type.type(:file).new(:name => "/tmp/path") - catalog.add_resource file - catalog.add_resource file_line - - relationship = file_line.autorequire.find do |rel| - (rel.source.to_s == "File[/tmp/path]") and (rel.target.to_s == file_line.to_s) - end - relationship.should be_a Puppet::Relationship - end - - it "should not autorequire the file it manages if it is not managed" do - catalog = Puppet::Resource::Catalog.new - catalog.add_resource file_line - file_line.autorequire.should be_empty - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/file_line.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/file_line.pp deleted file mode 100644 index eea693e15e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/file_line.pp +++ /dev/null @@ -1,9 +0,0 @@ -# This is a simple smoke test -# of the file_line resource type. -file { '/tmp/dansfile': - ensure => present -}-> -file_line { 'dans_line': - line => 'dan is awesome', - path => '/tmp/dansfile', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/has_interface_with.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/has_interface_with.pp deleted file mode 100644 index e1f1353cdd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/has_interface_with.pp +++ /dev/null @@ -1,10 +0,0 @@ -include stdlib -info('has_interface_with(\'lo\'):', has_interface_with('lo')) -info('has_interface_with(\'loX\'):', has_interface_with('loX')) -info('has_interface_with(\'ipaddress\', \'127.0.0.1\'):', has_interface_with('ipaddress', '127.0.0.1')) -info('has_interface_with(\'ipaddress\', \'127.0.0.100\'):', has_interface_with('ipaddress', '127.0.0.100')) -info('has_interface_with(\'network\', \'127.0.0.0\'):', has_interface_with('network', '127.0.0.0')) -info('has_interface_with(\'network\', \'128.0.0.0\'):', has_interface_with('network', '128.0.0.0')) -info('has_interface_with(\'netmask\', \'255.0.0.0\'):', has_interface_with('netmask', '255.0.0.0')) -info('has_interface_with(\'netmask\', \'256.0.0.0\'):', has_interface_with('netmask', '256.0.0.0')) - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_address.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_address.pp deleted file mode 100644 index 8429a88553..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_address.pp +++ /dev/null @@ -1,3 +0,0 @@ -include stdlib -info('has_ip_address(\'192.168.1.256\'):', has_ip_address('192.168.1.256')) -info('has_ip_address(\'127.0.0.1\'):', has_ip_address('127.0.0.1')) diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_network.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_network.pp deleted file mode 100644 index a15d8c011b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_network.pp +++ /dev/null @@ -1,4 +0,0 @@ -include stdlib -info('has_ip_network(\'127.0.0.0\'):', has_ip_network('127.0.0.0')) -info('has_ip_network(\'128.0.0.0\'):', has_ip_network('128.0.0.0')) - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/init.pp deleted file mode 100644 index 9675d8374b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/stdlib/tests/init.pp +++ /dev/null @@ -1 +0,0 @@ -include stdlib diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/.fixtures.yml deleted file mode 100644 index 3f18ef2fca..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/.fixtures.yml +++ /dev/null @@ -1,10 +0,0 @@ -fixtures: - repositories: - 'stdlib': - repo: 'git://github.com/puppetlabs/puppetlabs-stdlib' - ref: '4.1.0' - 'concat': - repo: 'git://github.com/puppetlabs/puppetlabs-concat' - ref: '1.0.1' - symlinks: - supervisord: "#{source_dir}" \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/.nodeset.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/.nodeset.yml deleted file mode 100644 index c9a6e5a3e2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/.nodeset.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -default_set: 'centos-64-x64' -sets: - 'centos-59-x64': - nodes: - "main.foo.vm": - prefab: 'centos-59-x64' - 'centos-64-x64': - nodes: - "main.foo.vm": - prefab: 'centos-64-x64' - 'debian-607-x64': - nodes: - "main.foo.vm": - prefab: 'debian-607-x64' - 'debian-70rc1-x64': - nodes: - "main.foo.vm": - prefab: 'debian-70rc1-x64' - 'ubuntu-server-10044-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-10044-x64' - 'ubuntu-server-12042-x64': - nodes: - "main.foo.vm": - prefab: 'ubuntu-server-12042-x64' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/.travis.yml deleted file mode 100644 index bc96a165e5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: ruby -bundler_args: --without development -script: "bundle exec rake test" -rvm: -- 1.8.7 -- 1.9.3 -- 2.0.0 -env: - - PUPPET_VERSION="~> 2.7.0" - - PUPPET_VERSION="~> 3.1.0" - - PUPPET_VERSION="~> 3.2.0" - - PUPPET_VERSION="~> 3.3.0" - - PUPPET_VERSION="~> 3.4.0" - - PUPPET_VERSION="~> 3.5.0" - - PUPPET_VERSION="~> 3.6.0" -matrix: - exclude: - - rvm: 2.0.0 - env: PUPPET_VERSION="~> 2.7.0" - - rvm: 1.9.3 - env: PUPPET_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_VERSION="~> 3.1.0" - - rvm: 1.8.7 - env: PUPPET_VERSION="~> 3.2.0" -notifications: - email: false - -before_install: - - gem update --system 2.1.11 - - gem --version diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Changelog b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Changelog deleted file mode 100644 index ea933f5dbc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Changelog +++ /dev/null @@ -1,119 +0,0 @@ -2014-07-02 - v0.4.1 - -Fixes: - -- Fixed status code error on supervisord::supervisorctl commands, thanks to @jtreminio for the PR. - -2014-06-20 - v0.4.0 - -Fixes: - -- Removed root as group and replaced with uid 0 to enhance system -compatibility - -Enhancements: - -- Made package provider a user definable param see supervisord::package_provider and README for details of how to change this. -- All define types can now be automatically pulled in from hiera see example https://github.com/ajcrowe/puppet-supervisord#configure-a-program -- You can now override the default include path of $config_include/*.conf with your own array using $config_dirs. Bear in mind this would need to include whatever you set $config_include to be, with *.conf on the end. - -Many thanks for the PRs from @jasperla, @mvantellingen for the bug report on the service name and @hasc for the enhancement ideas. - -2014-06-06 - v0.3.3 - -Fixes: - -- Fixed typo in stopwaitsec param, should have been stopwaitsecs, thanks to @rchrd2 - -2014-05-03 - v0.3.2 - -Changes: - -- Added supervisord::executable_ctl variable for supervisorctl binary path, thanks to @bpgoldsb - -2014-04-22 - v0.3.1 - -Fixes: - -- Fixed typo in unix_socket_group param, thanks to @dig412 - -2014-03-11 - v0.3.0 - -Fixes: - -- Fixed typo in fcgi config -- Fixed typo in supervisord config with minfds and minprocs, thanks to @peefourtee -- Typo in README fixed thanks to @hopkinsth -- Removed refreshonly from pip_install exec resource -- Number of syntax fixes thanks to `puppet lint` - -Important Changes: - -- Lots of input validation has been added **PLEASE** check your config works before upgrading! -- Changed init_extras naming to defaults and cleaned things up. -- Starting and stopping apps is now done with supervisorctl commands to avoid service restarts - -Other Changes: - -- CSV functions now order things consistently -- Included description for classes and functions -- Expanded spec testing built with Travis CI -- Added beaker acceptance tests -- Added greater validation of various parameters -- Added coverage reporting for resources - -To-Do: - -- Add support for additional OS families such as Solaris. - - -2013-10-31 - v0.2.3 - -Fixes: - -- Fixed large bug on debian wheezy where /var/run is changed from a symlink to a - directory causing all pids to be inaccessible breaking lots of services - - -2013-10-30 - v0.2.2 - -Fixes: - -- Fixed syntax error in README examples and tests - -2013-10-16 - v0.2.1 - -Fixes: - -- Fixed user params in templates -- Added missing environment support in main supervisord.conf - - -2013-10-15 - v0.2.0 - -Feature complete release - -- Added Eventlistener template and function -- Added FGCI-Program template and function -- More consistent log naming and fixed missing new lines - - -2013-10-15 - v0.1.1 - -Fixes: - -- Missing '=' in template tags when using certain parameters -- Added log file default to program define to avoid /tmp being used when not specified -- Fixed logic when not using environment variables in program - - -2013-10-15 - v0.1.0 - -Summary: - -Completed basic module functionality for - -- Install with pip -- Configure programs -- Configure groups -- Install init scripts for RedHat and Debian families diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Gemfile deleted file mode 100644 index ba9a19d533..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Gemfile +++ /dev/null @@ -1,26 +0,0 @@ -source 'https://rubygems.org' - -group :test do - gem 'rake' - gem 'puppet-lint' - gem 'puppet-syntax' - gem 'puppetlabs_spec_helper' - gem 'rspec-puppet', :git => 'https://github.com/rodjek/rspec-puppet.git' , :ref => 'c44381a240ec420d4ffda7bffc55ee4d9c08d682' - gem 'rspec', '2.14.1' -end - -group :development do - gem 'travis' - gem 'travis-lint' - gem 'beaker' - gem 'beaker-rspec' - gem 'pry' - gem 'guard-rake' -end - - -if puppetversion = ENV['PUPPET_VERSION'] - gem 'puppet', puppetversion -else - gem 'puppet', '~> 3.4.0' -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Modulefile deleted file mode 100644 index 80d47f2267..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Modulefile +++ /dev/null @@ -1,11 +0,0 @@ -name 'ajcrowe-supervisord' -version '0.4.1' -source 'git@github.com/ajcrowe/puppet-supervisord.git' -author 'Alex Crowe' -license 'Apache License, Version 2.0' -summary 'supervisord class and functions' -description 'supervisord class and functions' -project_page 'https://github.com/ajcrowe/puppet-supervisord' - -dependency 'puppetlabs/concat', '>= 1.0.0 <2.0.0' -dependency 'puppetlabs/stdlib', '>= 4.1.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/README.md deleted file mode 100644 index b454cd9307..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# Puppet Supervisord - -[![Build Status](https://travis-ci.org/ajcrowe/puppet-supervisord.png?branch=master)](https://travis-ci.org/ajcrowe/puppet-supervisord) - -Puppet module to manage the [supervisord](http://supervisord.org/) process control system. - -Functions available to configure - -* [programs](http://supervisord.org/configuration.html#program-x-section-settings) -* [groups](http://supervisord.org/configuration.html#group-x-section-settings) -* [fcgi-programs](http://supervisord.org/configuration.html#fcgi-program-x-section-settings) -* [eventlisteners](http://supervisord.org/configuration.html#eventlistener-x-section-settings) - -## Examples - -### Configuring supervisord with defaults - -Install supervisord with pip and install an init script if available - -```ruby -include supervisord -``` - -### Install supervisord and pip - -Install supervisord and install pip if not available. - -```ruby -class supervisord { - $install_pip => true, -} -``` - -This will download [setuptool](https://bitbucket.org/pypa/setuptools) and install pip with easy_install. - -You can pass a specific url with `$setuptools_url = 'url'` - -### Install without pip - -If you want to use your system package manager you can specify that with `supervisord::package_provider`. - -You'll also likely need to adjust the `supervisord::service_name` to match that installed by the system package. If you're using Debian or Redhat OS families you'll also want to disable the init scripts with `supervisord::install_init = false`. - -Note: Only Debian and RedHat families have an init script currently. - -### Configure a program - -```ruby -supervisord::program { 'myprogram': - command => 'command --args', - priority => '100', - environment => { - 'HOME' => '/home/myuser', - 'PATH' => '/bin:/sbin:/usr/bin:/usr/sbin', - 'SECRET' => 'mysecret' - } -} -``` - -You may also specify a variable for a hiera lookup to retreive your environment hash. This allows you to reuse existing environment variable hashes. - -```ruby -supervisord::program { 'myprogram': - command => 'command --args', - priority => '100', - env_var => 'my_common_envs' -} -``` - -Or you can fully define your programs in hiera: - -```yaml -supervisord::programs: - 'myprogram': - command: 'command --args' - autostart: yes - autorestart: 'true' - environment: - HOME: '/home/myuser' - PATH: '/bin:/sbin:/usr/bin:/usr/sbin' - SECRET: 'mysecret' -``` - -### Configure a group - -```ruby -supervisord::group { 'mygroup': - priority => 100, - programs => ['program1', 'program2', 'program3'] -} -``` - -### Configure an eventlistener - -```ruby -supervisord::eventlistener { 'mylistener': - command => 'command --args', - events => ['PROCESS_STATE', 'PROCESS_STATE_START'] - priority => '100', - env_var => 'my_common_envs' -} -``` - -### Run supervisorctl Commands - -Should you need to run a sequence of command with `supervisorctl` you can use the define type `supervisord::supervisorctl` - -```ruby -supervisord::supervisorctl { 'restart_myapp': - command => 'restart', - process => 'myapp' -} -``` - -You can also issue a command without specifying a process. - -### Development - -If you have suggestions or improvements please file an issue or pull request, i'll try and sort them as quickly as possble. - -If you submit a pull please try and include tests for the new functionality/fix. The module is tested with [Travis-CI](https://travis-ci.org/ajcrowe/puppet-supervisord). - - -### Credits - -* Debian init script sourced from the system package. -* RedHat/Centos init script sourced from https://github.com/Supervisor/initscripts diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Rakefile deleted file mode 100644 index cd592af48f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/Rakefile +++ /dev/null @@ -1,28 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' -require 'puppet-syntax/tasks/puppet-syntax' - -PuppetLint.configuration.send('disable_80chars') -PuppetLint.configuration.send('disable_class_inherits_from_params_class') -PuppetLint.configuration.send('disable_quoted_booleans') -PuppetLint.configuration.send('disable_autoloader_layout') - -exclude_paths = [ - "pkg/**/*", - "vendor/**/*", - "spec/**/*", -] -PuppetLint.configuration.ignore_paths = exclude_paths -PuppetSyntax.exclude_paths = exclude_paths - -desc "Acceptance Tests" -RSpec::Core::RakeTask.new(:acceptance) do |t| - t.pattern = 'spec/acceptance' -end - -desc "Test Suite" -task :test => [ - :lint, - :syntax, - :spec -] \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb deleted file mode 100644 index 6d34d5d547..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb +++ /dev/null @@ -1,36 +0,0 @@ -# -# Converts the array to a csv string -# -# $array = [ 'string1', 'string2', 'string3' ] -# -# becomes: -# -# $string = "string1,string2,string3" -# -module Puppet::Parser::Functions - newfunction(:array2csv, :type => :rvalue, :doc => <<-'EOS' - Returns a sorted csv formatted string from an array in the form - VALUE1,VALUE2,VALUE3 - EOS - ) do |args| - - raise(Puppet::ParseError, "array2csv(): Wrong number of arguments " + - "given (#{args.size} of 1)") if args.size < 1 - - array = args[0] - - unless array.is_a?(Array) - raise(Puppet::ParseError, 'array2csv(): Requires an Array') - end - - sorted_array = array.sort - result = '' - - sorted_array.each {|value| - result += "#{value}," - } - - return result.chop! - - end -end \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb deleted file mode 100644 index 5371328f2f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb +++ /dev/null @@ -1,40 +0,0 @@ -# -# Converts the hash to a csv string -# -# $hash = { -# HOME => '/home/user', -# ENV1 => 'env1', -# SECRET => 'secret' -# } -# -# becomes: -# -# $string = "HOME='/home/user',ENV1='env1',SECRET='secret'" -# -module Puppet::Parser::Functions - newfunction(:hash2csv, :type => :rvalue, :doc => <<-'EOS' - Returns a csv formatted string from an hash in the form - KEY=VALUE,KEY2=VALUE2,KEY3=VALUE3 ordered by key - EOS - ) do |args| - - raise(Puppet::ParseError, "hash2csv(): Wrong number of arguments " + - "given (#{args.size} of 1)") if args.size < 1 - - hash = args[0] - - unless hash.is_a?(Hash) - raise(Puppet::ParseError, 'hash2csv(): Requires an Hash') - end - - sorted_hash = hash.sort - result = '' - - sorted_hash.each {|key, value| - result += "#{key}='#{value}'," - } - - return result.chop! - - end -end \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/config.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/config.pp deleted file mode 100644 index 93713729e8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/config.pp +++ /dev/null @@ -1,72 +0,0 @@ -# Class: supervisord::config -# -# Configuration class for supervisor init and conf directories -# -class supervisord::config inherits supervisord { - - file { $supervisord::config_include: - ensure => directory, - owner => 'root', - mode => '0755' - } - - file { $supervisord::log_path: - ensure => directory, - owner => 'root', - mode => '0755' - } - - if $supervisord::run_path != '/var/run' { - file { $supervisord::run_path: - ensure => directory, - owner => 'root', - mode => '0755' - } - } - - if $supervisord::install_init { - file { '/etc/init.d/supervisord': - ensure => present, - owner => 'root', - mode => '0755', - content => template("supervisord/init/${::osfamily}/init.erb") - } - - if $supervisord::init_defaults { - file { $supervisord::init_defaults: - ensure => present, - owner => 'root', - mode => '0755', - content => template("supervisord/init/${::osfamily}/defaults.erb") - } - } - } - - concat { $supervisord::config_file: - owner => 'root', - group => '0', - mode => '0755' - } - - if $supervisord::unix_socket { - concat::fragment { 'supervisord_unix': - target => $supervisord::config_file, - content => template('supervisord/supervisord_unix.erb'), - order => 01 - } - } - - if $supervisord::inet_server { - concat::fragment { 'supervisord_inet': - target => $supervisord::config_file, - content => template('supervisord/supervisord_inet.erb'), - order => 01 - } - } - - concat::fragment { 'supervisord_main': - target => $supervisord::config_file, - content => template('supervisord/supervisord_main.erb'), - order => 02 - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp deleted file mode 100644 index fd52d6e4da..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp +++ /dev/null @@ -1,118 +0,0 @@ -# Define: supervisord::eventlistener -# -# This define creates an eventlistener configuration file -# -# Documentation on parameters available at: -# http://supervisord.org/configuration.html#eventlistener-x-section-settings -# -define supervisord::eventlistener( - $command, - $ensure = present, - $ensure_process = 'running', - $buffer_size = 10, - $events = undef, - $result_handler = undef, - $env_var = undef, - $process_name = undef, - $numprocs = undef, - $numprocs_start = undef, - $priority = undef, - $autostart = undef, - $autorestart = undef, - $startsecs = undef, - $startretries = undef, - $exitcodes = undef, - $stopsignal = undef, - $stopwaitsecs = undef, - $stopasgroup = undef, - $killasgroup = undef, - $user = undef, - $redirect_stderr = undef, - $stdout_logfile = "eventlistener_${name}.log", - $stdout_logfile_maxbytes = undef, - $stdout_logfile_backups = undef, - $stdout_events_enabled = undef, - $stderr_logfile = "eventlistener_${name}.error", - $stderr_logfile_maxbytes = undef, - $stderr_logfile_backups = undef, - $stderr_events_enabled = undef, - $environment = undef, - $directory = undef, - $umask = undef, - $serverurl = undef -) { - - include supervisord - - # parameter validation - validate_string($command) - validate_re($ensure_process, ['running', 'stopped', 'removed']) - validate_re($buffer_size, '^\d+') - if $events { validate_array($events) } - if $result_handler { validate_string($result_handler) } - if $numprocs { validate_re($numprocs, '^\d+')} - if $numprocs_start { validate_re($numprocs_start, '^\d+')} - if $priority { validate_re($priority, '^\d+') } - if $autostart { validate_bool($autostart) } - if $autorestart { validate_re($autorestart, ['true', 'false', 'unexpected']) } - if $startsecs { validate_re($startsecs, '^\d+')} - if $startretries { validate_re($startretries, '^\d+')} - if $exitcodes { validate_string($exitcodes)} - if $stopsignal { validate_re($stopsignal, ['TERM', 'HUP', 'INT', 'QUIT', 'KILL', 'USR1', 'USR2']) } - if $stopwaitsecs { validate_re($stopwaitsecs, '^\d+')} - if $stopasgroup { validate_bool($stopasgroup) } - if $killasgroup { validate_bool($killasgroup) } - if $user { validate_string($user) } - if $redirect_stderr { validate_bool($redirect_stderr) } - validate_string($stdout_logfile) - if $stdout_logfile_maxbytes { validate_string($stdout_logfile_maxbytes) } - if $stdout_logfile_backups { validate_re($stdout_logfile_backups, '^\d+')} - if $stdout_events_enabled { validate_bool($stdout_events_enabled) } - validate_string($stderr_logfile) - if $stderr_logfile_maxbytes { validate_string($stderr_logfile_maxbytes) } - if $stderr_logfile_backups { validate_re($stderr_logfile_backups, '^\d+')} - if $stderr_events_enabled { validate_bool($stderr_events_enabled) } - if $directory { validate_absolute_path($directory) } - if $umask { validate_re($umask, '^[0-7][0-7][0-7]$') } - - # convert environment data into a csv - if $env_var { - $env_hash = hiera_hash($env_var) - validate_hash($env_hash) - $env_string = hash2csv($env_hash) - } - elsif $environment { - validate_hash($environment) - $env_string = hash2csv($environment) - } - - if $events { - $events_string = array2csv($events) - } - - $conf = "${supervisord::config_include}/eventlistener_${name}.conf" - - file { $conf: - ensure => $ensure, - owner => 'root', - mode => '0755', - content => template('supervisord/conf/eventlistener.erb'), - notify => Class['supervisord::reload'] - } - - case $ensure_process { - 'stopped': { - supervisord::supervisorctl { "stop_${name}": - command => 'stop', - process => $name - } - } - 'removed': { - supervisord::supervisorctl { "remove_${name}": - command => 'remove', - process => $name - } - } - default: { } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp deleted file mode 100644 index 633b024917..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp +++ /dev/null @@ -1,117 +0,0 @@ -# Define: supervisord::fcgi_program -# -# This define creates an eventlistener configuration file -# -# Documentation on parameters available at: -# http://supervisord.org/configuration.html#fcgi-program-x-section-settings -# -define supervisord::fcgi_program( - $command, - $socket, - $ensure = present, - $ensure_process = 'running', - $socket_owner = undef, - $socket_mode = undef, - $env_var = undef, - $process_name = undef, - $numprocs = undef, - $numprocs_start = undef, - $priority = undef, - $autostart = undef, - $autorestart = undef, - $startsecs = undef, - $startretries = undef, - $exitcodes = undef, - $stopsignal = undef, - $stopwaitsecs = undef, - $stopasgroup = undef, - $killasgroup = undef, - $user = undef, - $redirect_stderr = undef, - $stdout_logfile = "fcgi-program_${name}.log", - $stdout_logfile_maxbytes = undef, - $stdout_logfile_backups = undef, - $stdout_capture_maxbytes = undef, - $stdout_events_enabled = undef, - $stderr_logfile = "fcgi-program_${name}.error", - $stderr_logfile_maxbytes = undef, - $stderr_logfile_backups = undef, - $stderr_capture_maxbytes = undef, - $stderr_events_enabled = undef, - $environment = undef, - $directory = undef, - $umask = undef, - $serverurl = undef -) { - - include supervisord - - # parameter validation - validate_string($command) - validate_re($ensure_process, ['running', 'stopped', 'removed']) - validate_re($socket, ['^tcp:\/\/.*:\d+$', '^unix:\/\/\/']) - if $process_name { validate_string($process_name) } - if $numprocs { validate_re($numprocs, '^\d+')} - if $numprocs_start { validate_re($numprocs_start, '^\d+')} - if $priority { validate_re($priority, '^\d+') } - if $autostart { validate_bool($autostart) } - if $autorestart { validate_re($autorestart, ['true', 'false', 'unexpected']) } - if $startsecs { validate_re($startsecs, '^\d+')} - if $startretries { validate_re($startretries, '^\d+')} - if $exitcodes { validate_string($exitcodes)} - if $stopsignal { validate_re($stopsignal, ['TERM', 'HUP', 'INT', 'QUIT', 'KILL', 'USR1', 'USR2']) } - if $stopwaitsecs { validate_re($stopwaitsecs, '^\d+')} - if $stopasgroup { validate_bool($stopasgroup) } - if $killasgroup { validate_bool($killasgroup) } - if $user { validate_string($user) } - if $redirect_stderr { validate_bool($redirect_stderr) } - validate_string($stdout_logfile) - if $stdout_logfile_maxbytes { validate_string($stdout_logfile_maxbytes) } - if $stdout_logfile_backups { validate_re($stdout_logfile_backups, '^\d+')} - if $stdout_capture_maxbytes { validate_string($stdout_capture_maxbytes) } - if $stdout_events_enabled { validate_bool($stdout_events_enabled) } - validate_string($stderr_logfile) - if $stderr_logfile_maxbytes { validate_string($stderr_logfile_maxbytes) } - if $stderr_logfile_backups { validate_re($stderr_logfile_backups, '^\d+')} - if $stderr_capture_maxbytes { validate_string($stderr_capture_maxbytes) } - if $stderr_events_enabled { validate_bool($stderr_events_enabled) } - if $directory { validate_absolute_path($directory) } - if $umask { validate_re($umask, '^[0-7][0-7][0-7]$') } - - # convert environment data into a csv - if $env_var { - $env_hash = hiera_hash($env_var) - validate_hash($env_hash) - $env_string = hash2csv($env_hash) - } - elsif $environment { - validate_hash($environment) - $env_string = hash2csv($environment) - } - - $conf = "${supervisord::config_include}/fcgi-program_${name}.conf" - - file { $conf: - ensure => $ensure, - owner => 'root', - mode => '0755', - content => template('supervisord/conf/fcgi_program.erb'), - notify => Class['supervisord::reload'] - } - - case $ensure_process { - 'stopped': { - supervisord::supervisorctl { "stop_${name}": - command => 'stop', - process => $name - } - } - 'removed': { - supervisord::supervisorctl { "remove_${name}": - command => 'remove', - process => $name - } - } - default: { } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/group.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/group.pp deleted file mode 100644 index 45cb29cf29..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/group.pp +++ /dev/null @@ -1,30 +0,0 @@ -# Define: supervisord::group -# -# This define creates an group configuration file -# -# Documentation on parameters available at: -# http://supervisord.org/configuration.html#group-x-section-settings -# -define supervisord::group ( - $programs, - $ensure = present, - $priority = undef -) { - - include supervisord - - # parameter validation - validate_array($programs) - if $priority { validate_re($priority, '^\d+', "invalid priority value of: ${priority}") } - - $progstring = array2csv($programs) - $conf = "${supervisord::config_include}/group_${name}.conf" - - file { $conf: - ensure => $ensure, - owner => 'root', - mode => '0755', - content => template('supervisord/conf/group.erb'), - notify => Class['supervisord::reload'] - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/init.pp deleted file mode 100644 index 1d2d55148d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/init.pp +++ /dev/null @@ -1,128 +0,0 @@ -# Class: supervisord -# -# This class installs supervisord via pip -# -class supervisord( - $package_ensure = $supervisord::params::package_ensure, - $package_provider = $supervisord::params::package_provider, - $service_ensure = $supervisord::params::service_ensure, - $service_name = $supervisord::params::service_name, - $install_init = $supervisord::params::install_init, - $install_pip = false, - $init_defaults = $supervisord::params::init_defaults, - $setuptools_url = $supervisord::params::setuptools_url, - $executable = $supervisord::params::executable, - $executable_ctl = $supervisord::params::executable_ctl, - - $log_path = $supervisord::params::log_path, - $log_file = $supervisord::params::log_file, - $log_level = $supervisord::params::log_level, - $logfile_maxbytes = $supervisord::params::logfile_maxbytes, - $logfile_backups = $supervisord::params::logfile_backups, - - $run_path = $supervisord::params::run_path, - $pid_file = $supervisord::params::pid_file, - $nodaemon = $supervisord::params::nodaemon, - $minfds = $supervisord::params::minfds, - $minprocs = $supervisord::params::minprocs, - $config_include = $supervisord::params::config_include, - $config_file = $supervisord::params::config_file, - $config_dirs = undef, - $umask = $supervisord::params::umask, - - $unix_socket = $supervisord::params::unix_socket, - $unix_socket_file = $supervisord::params::unix_socket_file, - $unix_socket_mode = $supervisord::params::unix_socket_mode, - $unix_socket_owner = $supervisord::params::unix_socket_owner, - $unix_socket_group = $supervisord::params::unix_socket_group, - - $inet_server = $supervisord::params::inet_server, - $inet_server_hostname = $supervisord::params::inet_server_hostname, - $inet_server_port = $supervisord::params::inet_server_port, - - $unix_auth = false, - $unix_username = undef, - $unix_password = undef, - - $inet_auth = false, - $inet_username = undef, - $inet_password = undef, - - $user = undef, - $identifier = undef, - $childlogdir = undef, - $environment = undef, - $env_var = undef, - $directory = undef, - $strip_ansi = false, - $nocleanup = false, - - $eventlisteners = {}, - $fcgi_programs = {}, - $groups = {}, - $programs = {} - -) inherits supervisord::params { - - validate_bool($install_pip) - validate_bool($install_init) - validate_bool($nodaemon) - validate_bool($unix_auth) - validate_bool($inet_auth) - validate_bool($strip_ansi) - validate_bool($nocleanup) - - validate_hash($eventlisteners) - validate_hash($fcgi_programs) - validate_hash($groups) - validate_hash($programs) - - validate_absolute_path($config_include) - validate_absolute_path($log_path) - validate_absolute_path($run_path) - if $childlogdir { validate_absolute_path($childlogdir) } - if $directory { validate_absolute_path($directory) } - - $log_levels = ['^critical$', '^error$', '^warn$', '^info$', '^debug$', '^trace$', '^blather$'] - validate_re($log_level, $log_levels, "invalid log_level: ${log_level}") - validate_re($umask, '^0[0-7][0-7]$', "invalid umask: ${umask}.") - validate_re($unix_socket_mode, '^[0-7][0-7][0-7][0-7]$', "invalid unix_socket_mode: ${unix_socket_mode}") - - if ! is_integer($logfile_backups) { fail("invalid logfile_backups: ${logfile_backups}.")} - if ! is_integer($minfds) { fail("invalid minfds: ${minfds}.")} - if ! is_integer($minprocs) { fail("invalid minprocs: ${minprocs}.")} - if ! is_integer($inet_server_port) { fail("invalid inet_server_port: ${inet_server_port}.")} - - if $env_var { - validate_hash($env_var) - $env_hash = hiera($env_var) - $env_string = hash2csv($env_hash) - } - elsif $environment { - validate_hash($environment) - $env_string = hash2csv($environment) - } - - if $config_dirs { - validate_array($config_dirs) - $config_include_string = join($config_dirs, " ") - } - else { - $config_include_string = "${config_include}/*.conf" - } - - create_resources('supervisord::eventlistener', $eventlisteners) - create_resources('supervisord::fcgi_program', $fcgi_programs) - create_resources('supervisord::group', $groups) - create_resources('supervisord::program', $programs) - - if $install_pip { - include supervisord::pip - Class['supervisord::pip'] -> Class['supervisord::install'] - } - - include supervisord::install, supervisord::config, supervisord::service, supervisord::reload - - Class['supervisord::install'] -> Class['supervisord::config'] ~> Class['supervisord::service'] - Class['supervisord::reload'] -> Supervisord::Supervisorctl <| |> -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/install.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/install.pp deleted file mode 100644 index 31a63f3b59..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/install.pp +++ /dev/null @@ -1,10 +0,0 @@ -# Class supervisord::install -# -# Installs supervisor package (defaults to using pip) -# -class supervisord::install inherits supervisord { - package { 'supervisor': - ensure => $supervisord::package_ensure, - provider => $supervisord::package_provider - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/params.pp deleted file mode 100644 index f9d82e5804..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/params.pp +++ /dev/null @@ -1,57 +0,0 @@ -# Class: supervisord::params -# -# Default parameters for supervisord -# -class supervisord::params { - # default supervisord params - $package_ensure = 'installed' - $package_provider = 'pip' - $service_ensure = 'running' - $service_name = 'supervisord' - $package_name = 'supervisor' - $executable = 'supervisord' - $executable_ctl = 'supervisorctl' - - $run_path = '/var/run' - $pid_file = 'supervisord.pid' - $log_path = '/var/log/supervisor' - $log_file = 'supervisord.log' - $logfile_maxbytes = '50MB' - $logfile_backups = '10' - $log_level = 'info' - $nodaemon = false - $minfds = '1024' - $minprocs = '200' - $umask = '022' - $config_include = '/etc/supervisor.d' - $config_file = '/etc/supervisord.conf' - $setuptools_url = 'https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py' - - $unix_socket = true - $unix_socket_file = 'supervisor.sock' - $unix_socket_mode = '0700' - $unix_socket_owner = 'nobody' - - $inet_server = false - $inet_server_hostname = '127.0.0.1' - $inet_server_port = '9001' - $inet_auth = false - - case $::osfamily { - 'RedHat': { - $init_defaults = '/etc/sysconfig/supervisord' - $unix_socket_group = 'nobody' - $install_init = true - } - 'Debian': { - $init_defaults = '/etc/default/supervisor' - $unix_socket_group = 'nogroup' - $install_init = true - } - default: { - $init_defaults = false - $unix_socket_group = 'nogroup' - $install_init = false - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/pip.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/pip.pp deleted file mode 100644 index 71dd3653da..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/pip.pp +++ /dev/null @@ -1,28 +0,0 @@ -# Class: supervisord::pip -# -# Optional class to install setuptool and pip -# -class supervisord::pip inherits supervisord { - - Exec { path => [ '/usr/bin/', '/usr/local/bin', '/bin', '/usr/local/sbin', '/usr/sbin', '/sbin' ] } - - exec { 'install_setuptools': - command => "curl ${supervisord::setuptools_url} | python", - cwd => '/tmp', - unless => 'which easy_install', - before => Exec['install_pip'] - } - - exec { 'install_pip': - command => 'easy_install pip', - unless => 'which pip' - } - - if $::osfamily == 'RedHat' { - exec { 'pip_provider_name_fix': - command => 'alternatives --install /usr/bin/pip-python pip-python /usr/bin/pip 1', - subscribe => Exec['install_pip'], - unless => 'which pip-python' - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/program.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/program.pp deleted file mode 100644 index 617a68ab20..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/program.pp +++ /dev/null @@ -1,113 +0,0 @@ -# Define: supervisord::program -# -# This define creates an program configuration file -# -# Documentation on parameters available at: -# http://supervisord.org/configuration.html#program-x-section-settings -# -define supervisord::program( - $command, - $ensure = present, - $ensure_process = 'running', - $env_var = undef, - $process_name = undef, - $numprocs = undef, - $numprocs_start = undef, - $priority = undef, - $autostart = undef, - $autorestart = undef, - $startsecs = undef, - $startretries = undef, - $exitcodes = undef, - $stopsignal = undef, - $stopwaitsecs = undef, - $stopasgroup = undef, - $killasgroup = undef, - $user = undef, - $redirect_stderr = undef, - $stdout_logfile = "program_${name}.log", - $stdout_logfile_maxbytes = undef, - $stdout_logfile_backups = undef, - $stdout_capture_maxbytes = undef, - $stdout_events_enabled = undef, - $stderr_logfile = "program_${name}.error", - $stderr_logfile_maxbytes = undef, - $stderr_logfile_backups = undef, - $stderr_capture_maxbytes = undef, - $stderr_events_enabled = undef, - $environment = undef, - $directory = undef, - $umask = undef, - $serverurl = undef -) { - - include supervisord - - # parameter validation - validate_string($command) - validate_re($ensure_process, ['running', 'stopped', 'removed']) - if $process_name { validate_string($process_name) } - if $numprocs { validate_re($numprocs, '^\d+')} - if $numprocs_start { validate_re($numprocs_start, '^\d+')} - if $priority { validate_re($priority, '^\d+') } - if $autostart { validate_bool($autostart) } - if $autorestart { validate_re($autorestart, ['true', 'false', 'unexpected']) } - if $startsecs { validate_re($startsecs, '^\d+')} - if $startretries { validate_re($startretries, '^\d+')} - if $exitcodes { validate_string($exitcodes)} - if $stopsignal { validate_re($stopsignal, ['TERM', 'HUP', 'INT', 'QUIT', 'KILL', 'USR1', 'USR2']) } - if $stopwaitsecs { validate_re($stopwaitsecs, '^\d+')} - if $stopasgroup { validate_bool($stopasgroup) } - if $killasgroup { validate_bool($killasgroup) } - if $user { validate_string($user) } - if $redirect_stderr { validate_bool($redirect_stderr) } - validate_string($stdout_logfile) - if $stdout_logfile_maxbytes { validate_string($stdout_logfile_maxbytes) } - if $stdout_logfile_backups { validate_re($stdout_logfile_backups, '^\d+')} - if $stdout_capture_maxbytes { validate_string($stdout_capture_maxbytes) } - if $stdout_events_enabled { validate_bool($stdout_events_enabled) } - validate_string($stderr_logfile) - if $stderr_logfile_maxbytes { validate_string($stderr_logfile_maxbytes) } - if $stderr_logfile_backups { validate_re($stderr_logfile_backups, '^\d+')} - if $stderr_capture_maxbytes { validate_string($stderr_capture_maxbytes) } - if $stderr_events_enabled { validate_bool($stderr_events_enabled) } - if $directory { validate_absolute_path($directory) } - if $umask { validate_re($umask, '^[0-7][0-7][0-7]$') } - - # convert environment data into a csv - if $env_var { - $env_hash = hiera_hash($env_var) - validate_hash($env_hash) - $env_string = hash2csv($env_hash) - } - elsif $environment { - validate_hash($environment) - $env_string = hash2csv($environment) - } - - $conf = "${supervisord::config_include}/program_${name}.conf" - - file { $conf: - ensure => $ensure, - owner => 'root', - mode => '0755', - content => template('supervisord/conf/program.erb'), - notify => Class['supervisord::reload'] - } - - case $ensure_process { - 'stopped': { - supervisord::supervisorctl { "stop_${name}": - command => 'stop', - process => $name - } - } - 'removed': { - supervisord::supervisorctl { "remove_${name}": - command => 'remove', - process => $name - } - } - default: { } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/reload.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/reload.pp deleted file mode 100644 index e5a4637e43..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/reload.pp +++ /dev/null @@ -1,21 +0,0 @@ -# Class: supervisord::reload -# -# Class to reread and update supervisord with supervisorctl -# -class supervisord::reload { - - Exec { path => [ '/usr/bin/', '/usr/local/bin' ] } - - $supervisorctl = $::supervisord::executable_ctl - - exec { 'supervisorctl_reread': - command => "${supervisorctl} reread", - refreshonly => true, - returns => [0, 2], - } - exec { 'supervisorctl_update': - command => "${supervisorctl} update", - refreshonly => true, - returns => [0, 2], - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/service.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/service.pp deleted file mode 100644 index f02a0d0a08..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/service.pp +++ /dev/null @@ -1,12 +0,0 @@ -# Class: supervisord::service -# -# Class for the supervisord service -# -class supervisord::service inherits supervisord { - service { $supervisord::service_name: - ensure => $supervisord::service_ensure, - enable => true, - hasrestart => true, - hasstatus => true - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp deleted file mode 100644 index ec4dbed933..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp +++ /dev/null @@ -1,29 +0,0 @@ -# Define: supervisord:supervisorctl -# -# This define executes command with the supervisorctl tool -# -define supervisord::supervisorctl( - $command, - $process = undef, - $refreshonly = false -) { - - Exec { path => [ '/usr/bin/', '/usr/local/bin' ] } - - validate_string($command) - validate_string($process) - - $supervisorctl = $::supervisord::executable_ctl - - if $process { - $cmd = join([$supervisorctl, $command, $process], ' ') - } - else { - $cmd = join([$supervisorctl, $command]) - } - - exec { "supervisorctl_command_${name}": - command => $cmd, - refreshonly => $refreshonly - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml deleted file mode 100644 index f8d4013a31..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-65-i386: - roles: - - master - platform: el-6-i386 - box : centos-65-i386-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-i386-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml deleted file mode 100644 index 7535c104af..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-65-x64: - roles: - - master - platform: el-6-x86_64 - box : centos-65-x64-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml deleted file mode 100644 index d1233aa83d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - debian-73-i386: - roles: - - master - platform: debian-7-i386 - box : debian-73-i386-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-i386-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml deleted file mode 100644 index 5b87870a90..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - debian-73-x64: - roles: - - master - platform: debian-7-amd64 - box : debian-73-x64-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml deleted file mode 100644 index 5b87870a90..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - debian-73-x64: - roles: - - master - platform: debian-7-amd64 - box : debian-73-x64-virtualbox-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/debian-73-x64-virtualbox-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb deleted file mode 100644 index 47d052a4ee..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb +++ /dev/null @@ -1,114 +0,0 @@ -require 'spec_helper_acceptance' - -describe 'supervisord install' do - - context 'default parameters with pip and init install' do - it 'should work with no errors' do - pp = <<-EOS - class { 'supervisord': install_pip => true, install_init => true} - EOS - - expect(apply_manifest(pp).exit_code).to_not eq(1) - expect(apply_manifest(pp).exit_code).to eq(0) - end - - describe service('supervisord') do - it { should be_enabled } - it { should be_running } - it 'should restart successfully' do - cmd="service supervisord restart" - expect(shell(cmd).exit_code).to_not eq(1) - end - end - end -end - -describe 'supervisord::program' do - context 'create a program config' do - it 'should install a program file' do - - pp = <<-EOS - include supervisord - supervisord::program { 'test': - command => 'echo', - priority => '100', - environment => { - 'HOME' => '/root', - 'PATH' => '/bin', - } - } - EOS - - expect(apply_manifest(pp).exit_code).to_not eq(1) - expect(apply_manifest(pp).exit_code).to eq(0) - end - - it 'should contain the correct values' do - cmd='grep command=echo /etc/supervisor.d/program_test.conf' - expect(shell(cmd).exit_code).to eq(0) - cmd='grep priority=100 /etc/supervisor.d/program_test.conf' - expect(shell(cmd).exit_code).to eq(0) - cmd='grep "environment=" /etc/supervisor.d/program_test.conf' - expect(shell(cmd).exit_code).to eq(0) - end - end -end - -describe 'supervisord::fcgi-program' do - context 'create fcgi-program config' do - it 'should install a fcgi-program file' do - - pp = <<-EOS - include supervisord - supervisord::fcgi_program { 'test': - socket => 'tcp://localhost:1000', - command => 'echo', - priority => '100', - environment => { - 'HOME' => '/root', - 'PATH' => '/bin', - } - } - EOS - - expect(apply_manifest(pp).exit_code).to_not eq(1) - expect(apply_manifest(pp).exit_code).to eq(0) - end - - it 'should contain the correct values' do - cmd='grep socket=tcp://localhost:1000 /etc/supervisor.d/fcgi-program_test.conf' - expect(shell(cmd).exit_code).to eq(0) - cmd="grep command=echo /etc/supervisor.d/fcgi-program_test.conf" - expect(shell(cmd).exit_code).to eq(0) - cmd="grep priority=100 /etc/supervisor.d/fcgi-program_test.conf" - expect(shell(cmd).exit_code).to eq(0) - cmd='grep "environment=" /etc/supervisor.d/fcgi-program_test.conf' - expect(shell(cmd).exit_code).to eq(0) - end - end -end - -describe 'supervisord::group' do - context 'create group config' do - it 'should install a group config' do - - pp = <<-EOS - include supervisord - supervisord::group { 'test': - programs => ['test'], - priority => '100', - } - EOS - - expect(apply_manifest(pp).exit_code).to_not eq(1) - expect(apply_manifest(pp).exit_code).to eq(0) - end - - it 'should contain the correct values' do - cmd='grep "programs=test" /etc/supervisor.d/group_test.conf' - expect(shell(cmd).exit_code).to eq(0) - cmd="grep priority=100 /etc/supervisor.d/group_test.conf" - expect(shell(cmd).exit_code).to eq(0) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb deleted file mode 100644 index b845920f6f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb +++ /dev/null @@ -1,299 +0,0 @@ -require 'spec_helper' - -describe 'supervisord' do - - concatdir = '/var/lib/puppet/concat' - let(:facts) {{ :concat_basedir => concatdir }} - - it { should contain_class('supervisord') } - it { should contain_class('supervisord::install') } - it { should contain_class('supervisord::config') } - it { should contain_class('supervisord::service') } - it { should contain_class('supervisord::params') } - it { should contain_class('supervisord::reload') } - it { should contain_package('supervisor') } - - describe '#service_name' do - context 'default' do - it { should contain_service('supervisord') } - end - - context 'specified' do - let(:params) {{ :service_name => 'myservicename' }} - it { should contain_service('myservicename') } - end - end - - describe '#install_pip' do - context 'default' do - it { should_not contain_class('supervisord::pip') } - end - - context 'true' do - let(:params) {{ :install_pip => true }} - it { should contain_class('supervisord::pip') } - it { should contain_exec('install_setuptools') } - it { should contain_exec('install_pip') } - end - - context 'true and RedHat' do - let(:params) {{ :install_pip => true }} - let(:facts) {{ :osfamily => 'RedHat', :concat_basedir => concatdir }} - it { should contain_exec('pip_provider_name_fix') } - end - end - - describe '#env_var' do - context 'default' do - it { should contain_class('supervisord').without_env_hash } - it { should contain_class('supervisord').without_env_string } - end - end - - describe '#environment' do - context 'default' do - it { should contain_class('supervisord').without_env_string } - end - context 'is specified' do - let(:params) {{ :environment => { 'key1' => 'value1', 'key2' => 'value2' } }} - it { should contain_concat__fragment('supervisord_main')\ - .with_content(/environment=key1='value1',key2='value2'/) } - end - end - - describe '#install_init' do - context 'default' do - it { should_not contain_file('/etc/init.d/supervisord') } - end - - context 'false' do - it { should_not contain_file('/etc/init.d/supervisord') } - end - - describe 'on supported OS' do - context 'with Debian' do - let(:facts) {{ :osfamily => 'Debian', :concat_basedir => concatdir }} - it { should contain_file('/etc/init.d/supervisord') } - it { should contain_file('/etc/default/supervisor') } - end - - context 'with RedHat' do - let(:facts) {{ :osfamily => 'RedHat', :concat_basedir => concatdir }} - it { should contain_file('/etc/init.d/supervisord') } - it { should contain_file('/etc/sysconfig/supervisord') } - end - end - end - - describe '#unix_socket' do - context 'default' do - it { should contain_concat__fragment('supervisord_unix')} - end - context 'false' do - let(:params) {{ :unix_socket => false }} - it { should_not contain_concat__fragment('supervisord_unix')} - end - end - - describe '#inet_server' do - context 'default' do - it { should_not contain_concat__fragment('supervisord_inet')} - end - context 'true' do - let(:params) {{ :inet_server => true }} - it { should contain_concat__fragment('supervisord_inet')} - end - end - - describe '#run_path' do - context 'default' do - it { should_not contain_file('/var/run') } - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/pidfile=\/var\/run\/supervisord.pid$/) } - end - context 'is specified' do - let(:params) {{ :run_path => '/opt/supervisord/run' }} - it { should contain_file('/opt/supervisord/run') } - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/pidfile=\/opt\/supervisord\/run\/supervisord.pid$/) } - end - end - - describe '#log_path' do - context 'default' do - it { should contain_file('/var/log/supervisor') } - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/logfile=\/var\/log\/supervisor\/supervisord.log$/) } - end - context 'is specified' do - let(:params) {{ :log_path => '/opt/supervisord/logs' }} - it { should contain_file('/opt/supervisord/logs')} - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/logfile=\/opt\/supervisord\/logs\/supervisord.log$/) } - end - end - - describe '#config_include' do - context 'default' do - it { should contain_file('/etc/supervisor.d') } - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/files=\/etc\/supervisor.d\/\*.conf$/) } - end - context 'is specified' do - let(:params) {{ :config_include => '/opt/supervisord/conf.d' }} - it { should contain_file('/opt/supervisord/conf.d') } - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/files=\/opt\/supervisord\/conf.d\/\*.conf$/) } - end - end - - describe '#config_dirs' do - context 'is specified' do - let(:params) {{ :config_dirs => ['/etc/supervisor.d/*.conf', '/opt/supervisor.d/*', '/usr/share/supervisor.d/*.config'] }} - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/files=\/etc\/supervisor.d\/\*.conf \/opt\/supervisor.d\/\* \/usr\/share\/supervisor.d\/\*.config$/) } - end - end - - describe '#config_file' do - context 'default' do - it { should contain_file('/etc/supervisord.conf') } - end - context 'is specified' do - let(:params) {{ :config_file => '/opt/supervisord/supervisor.conf' }} - it { should contain_file('/opt/supervisord/supervisor.conf') } - end - end - - describe '#nodaemon' do - context 'default' do - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/nodaemon=false$/) } - end - context 'true' do - let(:params) {{ :nodaemon => true }} - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/nodaemon=true$/) } - end - context 'invalid' do - let(:params) {{ :nodaemon => 'invalid' }} - it { expect { raise_error(Puppet::Error, /is not a boolean/) }} - end - end - - describe '#minfds' do - context 'default' do - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/minfds=1024$/) } - end - context 'specified' do - let(:params) {{ :minfds => 2048 }} - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/minfds=2048$/) } - end - context 'invalid' do - let(:params) {{ :minfds => 'string' }} - it { expect { raise_error(Puppet::Error, /invalid minfds/) }} - end - end - - describe '#minprocs' do - context 'default' do - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/minprocs=200$/) } - end - context 'specified' do - let(:params) {{ :minprocs => 300 }} - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/minprocs=300$/) } - end - context 'invalid' do - let(:params) {{ :minfds => 'string' }} - it { expect { raise_error(Puppet::Error, /invalid minprocs/) }} - end - end - - describe '#strip_ansi' do - context 'default' do - it { should_not contain_concat__fragment('supervisord_main') \ - .with_content(/strip_ansi$/) } - end - context 'true' do - let(:params) {{ :strip_ansi => true }} - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/strip_ansi=true$/) } - end - context 'invalid' do - let(:params) {{ :strip_ansi => 'string' }} - it { expect { raise_error(Puppet::Error, /is not a boolean/) }} - end - end - - describe '#user' do - context 'default' do - it { should_not contain_concat__fragment('supervisord_main') \ - .with_content(/user$/) } - end - context 'specified' do - let(:params) {{ :user => 'myuser' }} - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/user=myuser$/) } - end - end - - describe '#identifier' do - context 'default' do - it { should_not contain_concat__fragment('supervisord_main') \ - .with_content(/identifier$/) } - end - context 'specified' do - let(:params) {{ :identifier => 'myidentifier' }} - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/identifier=myidentifier$/) } - end - end - - describe '#directory' do - context 'default' do - it { should_not contain_concat__fragment('supervisord_main') \ - .with_content(/directory$/) } - end - context 'specified' do - let(:params) {{ :directory => '/opt/supervisord' }} - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/directory=\/opt\/supervisord$/) } - end - end - - describe '#nocleanup' do - context 'default' do - it { should_not contain_concat__fragment('supervisord_main') \ - .with_content(/nocleanup$/) } - end - context 'true' do - let(:params) {{ :nocleanup => true }} - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/nocleanup=true$/) } - end - context 'invalid' do - let(:params) {{ :nocleanup => 'string' }} - it { expect { raise_error(Puppet::Error, /is not a boolean/) }} - end - end - - describe '#childlogdir' do - context 'default' do - it { should_not contain_concat__fragment('supervisord_main') \ - .with_content(/childlogdir$/) } - end - context 'specified' do - let(:params) {{ :childlogdir => '/opt/supervisord/logdir' }} - it { should contain_concat__fragment('supervisord_main') \ - .with_content(/childlogdir=\/opt\/supervisord\/logdir$/) } - end - context 'invalid' do - let(:params) {{ :childlogdir => 'not_a_path' }} - it { expect { raise_error(Puppet::Error, /is not an absolute path/) }} - end - end -end \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb deleted file mode 100644 index 1083b8a323..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb +++ /dev/null @@ -1,86 +0,0 @@ -require 'spec_helper' - -describe 'supervisord::eventlistener', :type => :define do - let(:title) {'foo'} - let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} - let(:default_params) do - { - :command => 'bar', - :process_name => '%(process_num)s', - :events => ['PROCESS_STATE', 'PROCESS_STATE_STARTING'], - :buffer_size => 10, - :numprocs => '1', - :numprocs_start => '0', - :priority => '999', - :autostart => true, - :autorestart => 'unexpected', - :startsecs => '1', - :startretries => '3', - :exitcodes => '0,2', - :stopsignal => 'TERM', - :stopwaitsecs => '10', - :stopasgroup => true, - :killasgroup => true, - :user => 'baz', - :redirect_stderr => true, - :stdout_logfile => 'eventlistener_foo.log', - :stdout_logfile_maxbytes => '50MB', - :stdout_logfile_backups => '10', - :stdout_events_enabled => true, - :stderr_logfile => 'eventlistener_foo.error', - :stderr_logfile_maxbytes => '50MB', - :stderr_logfile_backups => '10', - :stderr_events_enabled => true, - :environment => { 'env1' => 'value1', 'env2' => 'value2' }, - :directory => '/opt/supervisord/chroot', - :umask => '022', - :serverurl => 'AUTO' - } - end - - context 'default' do - let(:params) { default_params } - - it { should contain_supervisord__eventlistener('foo') } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/\[eventlistener:foo\]/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/command=bar/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/process_name=\%\(process_num\)s/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/events=PROCESS_STATE,PROCESS_STATE_STARTING/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/buffer_size=10/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/numprocs=1/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/numprocs_start=0/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/priority=999/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/autostart=true/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/startsecs=1/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/startretries=3/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/exitcodes=0,2/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stopsignal=TERM/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stopwaitsecs=10/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stopasgroup=true/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/killasgroup=true/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/user=baz/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/redirect_stderr=true/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/eventlistener_foo.log/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stdout_logfile_maxbytes=50MB/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stdout_logfile_backups=10/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stdout_events_enabled=true/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/eventlistener_foo.error/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stderr_logfile_maxbytes=50MB/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stderr_logfile_backups=10/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/stderr_events_enabled=true/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/environment=env1='value1',env2='value2'/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/directory=\/opt\/supervisord\/chroot/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/umask=022/) } - it { should contain_file('/etc/supervisor.d/eventlistener_foo.conf').with_content(/serverurl=AUTO/) } - end - - context 'ensure_process_stopped' do - let(:params) { default_params.merge({ :ensure_process => 'stopped' }) } - it { should contain_supervisord__supervisorctl('stop_foo') } - end - - context 'ensure_process_removed' do - let(:params) { default_params.merge({ :ensure_process => 'removed' }) } - it { should contain_supervisord__supervisorctl('remove_foo') } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb deleted file mode 100644 index e01311be70..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb +++ /dev/null @@ -1,88 +0,0 @@ -require 'spec_helper' - -describe 'supervisord::fcgi_program', :type => :define do - let(:title) {'foo'} - let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} - let(:default_params) do - { - :command => 'bar', - :socket => 'tcp://localhost:1000', - :process_name => '%(process_num)s', - :numprocs => '1', - :numprocs_start => '0', - :priority => '999', - :autostart => true, - :autorestart => 'unexpected', - :startsecs => '1', - :startretries => '3', - :exitcodes => '0,2', - :stopsignal => 'TERM', - :stopwaitsecs => '10', - :stopasgroup => true, - :killasgroup => true, - :user => 'baz', - :redirect_stderr => true, - :stdout_logfile => 'fcgi-program_foo.log', - :stdout_logfile_maxbytes => '50MB', - :stdout_logfile_backups => '10', - :stdout_capture_maxbytes => '0', - :stdout_events_enabled => true, - :stderr_logfile => 'fcgi-program_foo.error', - :stderr_logfile_maxbytes => '50MB', - :stderr_logfile_backups => '10', - :stderr_capture_maxbytes => '0', - :stderr_events_enabled => true, - :environment => { 'env1' => 'value1', 'env2' => 'value2' }, - :directory => '/opt/supervisord/chroot', - :umask => '022', - :serverurl => 'AUTO' - } - end - - context 'default' do - let(:params) { default_params } - - it { should contain_supervisord__fcgi_program('foo') } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/\[fcgi-program:foo\]/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/socket=tcp:\/\/localhost:1000/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/command=bar/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/process_name=\%\(process_num\)s/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/numprocs=1/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/numprocs_start=0/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/priority=999/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/autostart=true/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/startsecs=1/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/startretries=3/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/exitcodes=0,2/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stopsignal=TERM/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stopwaitsecs=10/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stopasgroup=true/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/killasgroup=true/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/user=baz/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/redirect_stderr=true/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/fcgi-program_foo.log/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_logfile_maxbytes=50MB/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_logfile_backups=10/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_capture_maxbytes=0/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stdout_events_enabled=true/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/fcgi-program_foo.error/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_logfile_maxbytes=50MB/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_logfile_backups=10/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_capture_maxbytes=0/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/stderr_events_enabled=true/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/environment=env1='value1',env2='value2'/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/directory=\/opt\/supervisord\/chroot/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/umask=022/) } - it { should contain_file('/etc/supervisor.d/fcgi-program_foo.conf').with_content(/serverurl=AUTO/) } - end - - context 'ensure_process_stopped' do - let(:params) { default_params.merge({ :ensure_process => 'stopped' }) } - it { should contain_supervisord__supervisorctl('stop_foo') } - end - - context 'ensure_process_removed' do - let(:params) { default_params.merge({ :ensure_process => 'removed' }) } - it { should contain_supervisord__supervisorctl('remove_foo') } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/group_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/group_spec.rb deleted file mode 100644 index ba8d70196c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/group_spec.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'spec_helper' - -describe 'supervisord::group', :type => :define do - let(:title) {'foo'} - let(:params) {{ :programs => ['bar', 'baz'] }} - let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} - - it { should contain_supervisord__group('foo').with_program } - it { should contain_file('/etc/supervisor.d/group_foo.conf').with_content(/programs=bar,baz/) } - - describe '#priority' do - it 'should default to undef' do - should_not contain_file('/etc/supervisor.d/group_foo.conf').with_content(/priority/) - should contain_file('/etc/supervisor.d/group_foo.conf').with_content(/programs=bar,baz/) - end - context '100' do - let(:params) {{ :priority => '100', :programs => ['bar', 'baz'] }} - it { should contain_file('/etc/supervisor.d/group_foo.conf').with_content(/priority=100/) } - it { should contain_file('/etc/supervisor.d/group_foo.conf').with_content(/programs=bar,baz/) } - end - end -end \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb deleted file mode 100644 index e32c24ab2d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb +++ /dev/null @@ -1,86 +0,0 @@ -require 'spec_helper' - -describe 'supervisord::program', :type => :define do - let(:title) {'foo'} - let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} - let(:default_params) do - { - :command => 'bar', - :process_name => '%(process_num)s', - :numprocs => '1', - :numprocs_start => '0', - :priority => '999', - :autostart => true, - :autorestart => 'unexpected', - :startsecs => '1', - :startretries => '3', - :exitcodes => '0,2', - :stopsignal => 'TERM', - :stopwaitsecs => '10', - :stopasgroup => true, - :killasgroup => true, - :user => 'baz', - :redirect_stderr => true, - :stdout_logfile => 'program_foo.log', - :stdout_logfile_maxbytes => '50MB', - :stdout_logfile_backups => '10', - :stdout_capture_maxbytes => '0', - :stdout_events_enabled => true, - :stderr_logfile => 'program_foo.error', - :stderr_logfile_maxbytes => '50MB', - :stderr_logfile_backups => '10', - :stderr_capture_maxbytes => '0', - :stderr_events_enabled => true, - :environment => { 'env1' => 'value1', 'env2' => 'value2' }, - :directory => '/opt/supervisord/chroot', - :umask => '022', - :serverurl => 'AUTO' - } - end - - context 'default' do - let(:params) { default_params } - - it { should contain_supervisord__program('foo') } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/\[program:foo\]/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/command=bar/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/process_name=\%\(process_num\)s/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/numprocs=1/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/numprocs_start=0/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/priority=999/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/autostart=true/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/startsecs=1/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/startretries=3/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/exitcodes=0,2/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stopsignal=TERM/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stopwaitsecs=10/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stopasgroup=true/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/killasgroup=true/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/user=baz/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/redirect_stderr=true/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_logfile=\/var\/log\/supervisor\/program_foo.log/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_logfile_maxbytes=50MB/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_logfile_backups=10/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_capture_maxbytes=0/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stdout_events_enabled=true/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_logfile=\/var\/log\/supervisor\/program_foo.error/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_logfile_maxbytes=50MB/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_logfile_backups=10/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_capture_maxbytes=0/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/stderr_events_enabled=true/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/environment=env1='value1',env2='value2'/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/directory=\/opt\/supervisord\/chroot/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/umask=022/) } - it { should contain_file('/etc/supervisor.d/program_foo.conf').with_content(/serverurl=AUTO/) } - end - - context 'ensure_process_stopped' do - let(:params) { default_params.merge({ :ensure_process => 'stopped' }) } - it { should contain_supervisord__supervisorctl('stop_foo') } - end - - context 'ensure_process_removed' do - let(:params) { default_params.merge({ :ensure_process => 'removed' }) } - it { should contain_supervisord__supervisorctl('remove_foo') } - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb deleted file mode 100644 index 33cfd75efe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'spec_helper' - -describe 'supervisord::supervisorctl', :type => :define do - let(:title) {'command_foo'} - let(:default_params) {{ - :command => 'command', - :process => 'foo' - }} - let(:params) { default_params } - let(:facts) {{ :concat_basedir => '/var/lib/puppet/concat' }} - - it { should contain_supervisord__supervisorctl('command_foo') } -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/functions/array2csv_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/functions/array2csv_spec.rb deleted file mode 100644 index dd8dffa07e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/functions/array2csv_spec.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'spec_helper' - -describe 'array2csv' do - it { should run.with_params(['value1']).and_return('value1') } - it { should run.with_params(['value1', 'value2', 'value3']).and_return('value1,value2,value3') } - it { should run.with_params('foo').and_raise_error(Puppet::ParseError) } - it { should run.with_params().and_raise_error(Puppet::ParseError) } -end \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/functions/hash2csv_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/functions/hash2csv_spec.rb deleted file mode 100644 index 68f04a6445..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/functions/hash2csv_spec.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'spec_helper' - -describe 'hash2csv' do - it { should run.with_params({'key1' => 'value1'}).and_return("key1='value1'") } - it { should run.with_params({'key1' => 'value1', 'key2' => 'value2'}).and_return("key1='value1',key2='value2'") } - it { should run.with_params('foo').and_raise_error(Puppet::ParseError) } - it { should run.with_params().and_raise_error(Puppet::ParseError) } -end \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper.rb deleted file mode 100644 index 745ad4a549..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' - -fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) - -RSpec.configure do |c| - c.module_path = File.join(fixture_path, 'modules') - c.manifest_dir = File.join(fixture_path, 'manifests') -end - -at_exit { RSpec::Puppet::Coverage.report! } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb deleted file mode 100644 index dcae2850d2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'beaker-rspec' - -hosts.each do |host| - # Install Puppet - install_puppet -end - -RSpec.configure do |c| - # Project root - proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) - - # Readable test descriptions - c.formatter = :documentation - - # Configure all nodes in nodeset - c.before :suite do - # Install module - puppet_module_install(:source => proj_root, :module_name => 'supervisord') - hosts.each do |host| - on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] } - on host, puppet('module','install','puppetlabs-concat'), { :acceptable_exit_codes => [0,1] } - end - end -end \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb deleted file mode 100644 index 9875c8ef5b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb +++ /dev/null @@ -1,88 +0,0 @@ -[eventlistener:<%= @name %>] -command=<%= @command %> -<% if @process_name -%> -process_name=<%= @process_name %> -<% end -%> -<% if @numprocs -%> -numprocs=<%= @numprocs %> -<% end -%> -<% if @numprocs_start -%> -numprocs_start=<%= @numprocs_start %> -<% end -%> -<% if @events_string -%> -events=<%= @events_string %> -<% end -%> -<% if @buffer_size -%> -buffer_size=<%= @buffer_size %> -<% end -%> -<% if @result_handler -%> -result_handler=<%= @result_handler %> -<% end -%> -<% if @priority -%> -priority=<%= @priority %> -<% end -%> -<% if @autostart -%> -autostart=<%= @autostart %> -<% end -%> -<% if @autorestart -%> -autorestart=<%= @autorestart %> -<% end -%> -<% if @startsecs -%> -startsecs=<%= @startsecs %> -<% end -%> -<% if @startretries -%> -startretries=<%= @startretries %> -<% end -%> -<% if @exitcodes -%> -exitcodes=<%= @exitcodes %> -<% end -%> -<% if @stopsignal -%> -stopsignal=<%= @stopsignal %> -<% end -%> -<% if @stopwaitsecs -%> -stopwaitsecs=<%= @stopwaitsecs %> -<% end -%> -<% if @stopasgroup -%> -stopasgroup=<%= @stopasgroup %> -<% end -%> -<% if @killasgroup -%> -killasgroup=<%= @killasgroup %> -<% end -%> -<% if @user -%> -user=<%= @user %> -<% end -%> -<% if @redirect_stderr -%> -redirect_stderr=<%= @redirect_stderr %> -<% end -%> -stdout_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stdout_logfile %> -<% if @stdout_logfile_maxbytes -%> -stdout_logfile_maxbytes=<%= @stdout_logfile_maxbytes %> -<% end -%> -<% if @stdout_logfile_backups -%> -stdout_logfile_backups=<%= @stdout_logfile_backups %> -<% end -%> -<% if @stdout_events_enabled -%> -stdout_events_enabled=<%= @stdout_events_enabled %> -<% end -%> -stderr_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stderr_logfile %> -<% if @stderr_logfile_maxbytes -%> -stderr_logfile_maxbytes=<%= @stderr_logfile_maxbytes %> -<% end -%> -<% if @stderr_logfile_backups -%> -stderr_logfile_backups=<%= @stderr_logfile_backups %> -<% end -%> -<% if @stderr_events_enabled -%> -stderr_events_enabled=<%= @stderr_events_enabled %> -<% end -%> -<% if @env_string -%> -environment=<%= @env_string %> -<% end -%> -<% if @directory -%> -directory=<%= @directory %> -<% end -%> -<% if @umask -%> -umask=<%= @umask %> -<% end -%> -<% if @serverurl -%> -serverurl=<%= @serverurl %> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb deleted file mode 100644 index 98a7fb1cb3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb +++ /dev/null @@ -1,96 +0,0 @@ -[fcgi-program:<%= @name %>] -command=<%= @command %> -socket=<%= @socket %> -<% if @socket_owner -%> -socket_owner=<%= @socket_owner %> -<% end -%> -<% if @socket_mode -%> -socket_mode=<%= @socket_mode %> -<% end -%> -<% if @process_name -%> -process_name=<%= @process_name %> -<% end -%> -<% if @numprocs -%> -numprocs=<%= @numprocs %> -<% end -%> -<% if @numprocs_start -%> -numprocs_start=<%= @numprocs_start %> -<% end -%> -<% if @priority -%> -priority=<%= @priority %> -<% end -%> -<% if @autostart -%> -autostart=<%= @autostart %> -<% end -%> -<% if @autorestart -%> -autorestart=<%= @autorestart %> -<% end -%> -<% if @startsecs -%> -startsecs=<%= @startsecs %> -<% end -%> -<% if @startretries -%> -startretries=<%= @startretries %> -<% end -%> -<% if @exitcodes -%> -exitcodes=<%= @exitcodes %> -<% end -%> -<% if @stopsignal -%> -stopsignal=<%= @stopsignal %> -<% end -%> -<% if @stopwaitsecs -%> -stopwaitsecs=<%= @stopwaitsecs %> -<% end -%> -<% if @stopasgroup -%> -stopasgroup=<%= @stopasgroup %> -<% end -%> -<% if @killasgroup -%> -killasgroup=<%= @killasgroup %> -<% end -%> -<% if @user -%> -user=<%= @user %> -<% end -%> -<% if @redirect_stderr -%> -redirect_stderr=<%= @redirect_stderr %> -<% end -%> -<% if @stdout_logfile -%> -stdout_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stdout_logfile %> -<% end -%> -<% if @stdout_logfile_maxbytes -%> -stdout_logfile_maxbytes=<%= @stdout_logfile_maxbytes %> -<% end -%> -<% if @stdout_logfile_backups -%> -stdout_logfile_backups=<%= @stdout_logfile_backups %> -<% end -%> -<% if @stdout_capture_maxbytes -%> -stdout_capture_maxbytes=<%= @stdout_capture_maxbytes %> -<% end -%> -<% if @stdout_events_enabled -%> -stdout_events_enabled=<%= @stdout_events_enabled %> -<% end -%> -<% if @stderr_logfile -%> -stderr_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stderr_logfile %> -<% end -%> -<% if @stderr_logfile_maxbytes -%> -stderr_logfile_maxbytes=<%= @stderr_logfile_maxbytes %> -<% end -%> -<% if @stderr_logfile_backups -%> -stderr_logfile_backups=<%= @stderr_logfile_backups %> -<% end -%> -<% if @stderr_capture_maxbytes -%> -stderr_capture_maxbytes=<%= @stderr_capture_maxbytes %> -<% end -%> -<% if @stderr_events_enabled -%> -stderr_events_enabled=<%= @stderr_events_enabled %> -<% end -%> -<% if @env_string -%> -environment=<%= @env_string %> -<% end -%> -<% if @directory -%> -directory=<%= @directory %> -<% end -%> -<% if @umask -%> -umask=<%= @umask %> -<% end -%> -<% if @serverurl -%> -serverurl=<%= @serverurl %> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/group.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/group.erb deleted file mode 100644 index 478a02e450..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/group.erb +++ /dev/null @@ -1,5 +0,0 @@ -[group:<%= @name %>] -programs=<%= @progstring %> -<% if @priority -%> -priority=<%= @priority %> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/program.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/program.erb deleted file mode 100644 index 78002c87ca..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/conf/program.erb +++ /dev/null @@ -1,89 +0,0 @@ -[program:<%= @name %>] -command=<%= @command %> -<% if @process_name -%> -process_name=<%= @process_name %> -<% end -%> -<% if @numprocs -%> -numprocs=<%= @numprocs %> -<% end -%> -<% if @numprocs_start -%> -numprocs_start=<%= @numprocs_start %> -<% end -%> -<% if @priority -%> -priority=<%= @priority %> -<% end -%> -<% if @autostart -%> -autostart=<%= @autostart %> -<% end -%> -<% if @autorestart -%> -autorestart=<%= @autorestart %> -<% end -%> -<% if @startsecs -%> -startsecs=<%= @startsecs %> -<% end -%> -<% if @startretries -%> -startretries=<%= @startretries %> -<% end -%> -<% if @exitcodes -%> -exitcodes=<%= @exitcodes %> -<% end -%> -<% if @stopsignal -%> -stopsignal=<%= @stopsignal %> -<% end -%> -<% if @stopwaitsecs -%> -stopwaitsecs=<%= @stopwaitsecs %> -<% end -%> -<% if @stopasgroup -%> -stopasgroup=<%= @stopasgroup %> -<% end -%> -<% if @killasgroup -%> -killasgroup=<%= @killasgroup %> -<% end -%> -<% if @user -%> -user=<%= @user %> -<% end -%> -<% if @redirect_stderr -%> -redirect_stderr=<%= @redirect_stderr %> -<% end -%> -<% if @stdout_logfile -%> -stdout_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stdout_logfile %> -<% end -%> -<% if @stdout_logfile_maxbytes -%> -stdout_logfile_maxbytes=<%= @stdout_logfile_maxbytes %> -<% end -%> -<% if @stdout_logfile_backups -%> -stdout_logfile_backups=<%= @stdout_logfile_backups %> -<% end -%> -<% if @stdout_capture_maxbytes -%> -stdout_capture_maxbytes=<%= @stdout_capture_maxbytes %> -<% end -%> -<% if @stdout_events_enabled -%> -stdout_events_enabled=<%= @stdout_events_enabled %> -<% end -%> -<% if @stderr_logfile -%> -stderr_logfile=<%= scope.lookupvar('supervisord::log_path') %>/<%= @stderr_logfile %> -<% end -%> -<% if @stderr_logfile_maxbytes -%> -stderr_logfile_maxbytes=<%= @stderr_logfile_maxbytes %> -<% end -%> -<% if @stderr_logfile_backups -%> -stderr_logfile_backups=<%= @stderr_logfile_backups %> -<% end -%> -<% if @stderr_capture_maxbytes -%> -stderr_capture_maxbytes=<%= @stderr_capture_maxbytes %> -<% end -%> -<% if @stderr_events_enabled -%> -stderr_events_enabled=<%= @stderr_events_enabled %> -<% end -%> -<% if @env_string -%> -environment=<%= @env_string %> -<% end -%> -<% if @directory -%> -directory=<%= @directory %> -<% end -%> -<% if @umask -%> -umask=<%= @umask %> -<% end -%> -<% if @serverurl -%> -serverurl=<%= @serverurl %> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/defaults.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/defaults.erb deleted file mode 100644 index 232f5356da..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/defaults.erb +++ /dev/null @@ -1,10 +0,0 @@ -# Defaults for supervisor initscript -# sourced by /etc/init.d/supervisor -# installed at /etc/default/supervisor by the maintainer scripts - -# -# This is a POSIX shell fragment -# - -# Additional options that are passed to the Daemon. -DAEMON_OPTS="-c <%= @config_file %>" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/init.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/init.erb deleted file mode 100644 index bff9857257..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/init.erb +++ /dev/null @@ -1,133 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: supervisor -# Required-Start: $remote_fs $network $named -# Required-Stop: $remote_fs $network $named -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start/stop supervisor -# Description: Start/stop supervisor daemon and its configured -# subprocesses. -### END INIT INFO - - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=<%= @executable %> -NAME=supervisord -DESC=supervisor - -test -x $DAEMON || exit 0 - -LOGDIR=<%= @log_path %> -PIDFILE=<%= @run_path %>/<%= @pid_file %> -DODTIME=5 # Time to wait for the server to die, in seconds - # If this value is set too low you might not - # let some servers to die gracefully and - # 'restart' will not work - -# Include supervisor defaults if available -if [ -f <%= @init_defaults %> ] ; then - . <%= @init_defaults %> -fi - -set -e - -running_pid() -{ - # Check if a given process pid's cmdline matches a given name - pid=$1 - name=$2 - [ -z "$pid" ] && return 1 - [ ! -d /proc/$pid ] && return 1 - (cat /proc/$pid/cmdline | tr "\000" "\n"|grep -q $name) || return 1 - return 0 -} - -running() -{ -# Check if the process is running looking at /proc -# (works for all users) - - # No pidfile, probably no daemon present - [ ! -f "$PIDFILE" ] && return 1 - # Obtain the pid and check it against the binary name - pid=`cat $PIDFILE` - running_pid $pid $DAEMON || return 1 - return 0 -} - -force_stop() { -# Forcefully kill the process - [ ! -f "$PIDFILE" ] && return - if running ; then - kill -15 $pid - # Is it really dead? - [ -n "$DODTIME" ] && sleep "$DODTIME"s - if running ; then - kill -9 $pid - [ -n "$DODTIME" ] && sleep "$DODTIME"s - if running ; then - echo "Cannot kill $DESC (pid=$pid)!" - exit 1 - fi - fi - fi - rm -f $PIDFILE - return 0 -} - -case "$1" in - start) - if [ -e $PIDFILE ]; then - echo "$DESC already running with pid: `cat $PIDFILE`" - exit 0 - fi - echo -n "Starting $DESC: " - start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --exec $DAEMON -- $DAEMON_OPTS - test -f $PIDFILE || sleep 1 - if running ; then - echo "$NAME." - else - echo " ERROR." - fi - ;; - stop) - echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE - echo "$NAME." - ;; - force-stop) - echo -n "Forcefully stopping $DESC: " - force_stop - if ! running ; then - echo "$NAME." - else - echo " ERROR." - fi - ;; - restart) - echo -n "Restarting $DESC: " - start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE - [ -n "$DODTIME" ] && sleep $DODTIME - start-stop-daemon --start --quiet --pidfile \ - $PIDFILE --exec $DAEMON -- $DAEMON_OPTS - echo "$NAME." - ;; - status) - echo -n "$DESC is " - if running ; then - echo "running" - else - echo "not running." - exit 1 - fi - ;; - *) - N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|status|force-stop}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/defaults.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/defaults.erb deleted file mode 100644 index 0d7862d023..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/defaults.erb +++ /dev/null @@ -1,8 +0,0 @@ -# this is sourced by the supervisord init script -# written by jkoppe - -set -a - -# should probably put both of these options as runtime arguments -OPTIONS="-c <%= @config_file %>" -PIDFILE=<%= @run_path %><%= @pid_file %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/init.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/init.erb deleted file mode 100644 index dabb278451..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/init.erb +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash -# -# supervisord This scripts turns supervisord on -# -# Author: Mike McGrath (based off yumupdatesd) -# Jason Koppe adjusted to read sysconfig, -# use supervisord tools to start/stop, conditionally wait -# for child processes to shutdown, and startup later -# -# chkconfig: 345 83 04 -# -# description: supervisor is a process control utility. It has a web based -# xmlrpc interface as well as a few other nifty features. -# processname: supervisord -# config: <%= @config_file %> -# pidfile: <%= @run_path %>/<%= @pid_file %> -# - -# source function library -. /etc/rc.d/init.d/functions - -# source system settings -[ -e <%= @init_defaults %> ] && . <%= @init_defaults %> - -RETVAL=0 -DAEMON=/usr/bin/supervisord -DESC=supervisord -PIDFILE=<%= @run_path %>/<%= @pid_file %> - -running_pid() -{ - # Check if a given process pid's cmdline matches a given name - pid=$1 - name=$2 - [ -z "$pid" ] && return 1 - [ ! -d /proc/$pid ] && return 1 - (cat /proc/$pid/cmdline | tr "\000" "\n"|grep -q $name) || return 1 - return 0 -} - -running() -{ -# Check if the process is running looking at /proc -# (works for all users) - - # No pidfile, probably no daemon present - [ ! -f "$PIDFILE" ] && return 1 - # Obtain the pid and check it against the binary name - pid=`cat $PIDFILE` - running_pid $pid $DAEMON || return 1 - return 0 -} - -start() { - echo -n "Starting $DESC: " - if [ -e $PIDFILE ]; then - echo "ALREADY STARTED" - return 1 - else - # start supervisord with options from sysconfig (stuff like -c) - daemon $DAEMON $OPTIONS - # only create the subsyslock if we created the PIDFILE - [ -e $PIDFILE ] && touch /var/lock/subsys/supervisord - return 0 - fi -} - -stop() { - echo -n "Stopping supervisord: " - killproc -p $PIDFILE $DESC - # always remove the subsys. we might have waited a while, but just remove it at this point. - rm -f /var/lock/subsys/supervisord - return 0 -} - -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart|force-reload) - restart - ;; - reload) - /usr/bin/supervisorctl $OPTIONS reload - RETVAL=$? - ;; - condrestart) - [ -f /var/lock/subsys/supervisord ] && restart - RETVAL=$? - ;; - status) - echo -n "supervisord is " - if running ; then - echo "running" - else - echo "not running." - exit 1 - fi - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}" - exit 1 -esac - -exit $RETVAL \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_inet.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_inet.erb deleted file mode 100644 index 9f04cb2477..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_inet.erb +++ /dev/null @@ -1,13 +0,0 @@ -[inet_http_server] -port=<%= @inet_server_hostname %>:<%= @inet_server_port %> -<% if @inet_auth -%> -username=<%= @inet_username %> -password=<%= @inet_password %> -<% end -%> - -[supervisorctl] -serverurl=http://<%= @inet_hostname%>:<%= @inet_server_port %> -<% if @inet_auth -%> -username=<%= @inet_username %> -password=<%= @inet_password %> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb deleted file mode 100644 index 8ab8fee51d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb +++ /dev/null @@ -1,34 +0,0 @@ -[supervisord] -logfile=<%= @log_path %>/<%= @log_file %> -pidfile=<%= @run_path %>/<%= @pid_file %> -nodaemon=<%= @nodaemon %> -minfds=<%= @minfds %> -minprocs=<%= @minprocs %> -umask=<%= @umask %> -<% if @strip_ansi -%> -strip_ansi=<%= @strip_ansi %> -<% end -%> -<% if @user -%> -user=<%= @user %> -<% end -%> -<% if @identifier -%> -identifier=<%= @identifier %> -<% end -%> -<% if @directory -%> -directory=<%= @directory %> -<% end -%> -<% if @nocleanup -%> -nocleanup=true -<% end -%> -<% if @childlogdir -%> -childlogdir=<%= @childlogdir %> -<% end -%> -<% if @env_string -%> -environment=<%= @env_string %> -<% end -%> - -[rpcinterface:supervisor] -supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface - -[include] -files=<%= @config_include_string %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb deleted file mode 100644 index 39e8519991..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb +++ /dev/null @@ -1,15 +0,0 @@ -[unix_http_server] -file=<%= @run_path %>/<%= @unix_socket_file %> -chmod=<%= @unix_socket_mode %> -chown=<%= @unix_socket_owner %>:<%= @unix_socket_group %> -<% if @unix_auth -%> -username=<%= @unix_socket_username %> -password=<%= @unix_socket_password %> -<% end -%> - -[supervisorctl] -serverurl=unix://<%= @run_path %>/<%= @unix_socket_file %> -<% if @unix_auth -%> -username=<%= @unix_username %> -password=<%= @unix_password %> -<% end -%> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/tests/group.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/tests/group.pp deleted file mode 100644 index 3d340460df..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/tests/group.pp +++ /dev/null @@ -1,4 +0,0 @@ -supervisord::group { 'mygroup': - priority => 100, - program => ['program1', 'program2', 'program3'] -} \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/tests/init.pp deleted file mode 100644 index 48bc1f4798..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/tests/init.pp +++ /dev/null @@ -1,5 +0,0 @@ -class { 'supervisord': - install_pip => true, - install_init => true, - nocleanup => true, -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/tests/program.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/tests/program.pp deleted file mode 100644 index 0d45ebe1b3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/supervisord/tests/program.pp +++ /dev/null @@ -1,35 +0,0 @@ -supervisord::program { 'myprogram': - command => 'command --args', - process_name => '%(process_num)s', - numprocs => '1', - numprocs_start => '0', - priority => '999', - autostart => true, - autorestart => 'unexpected', - startsecs => '1', - startretries => '3', - exitcodes => '0,2', - stopsignal => 'TERM', - stopwaitsecs => '10', - stopasgroup => false, - killasgroup => false, - redirect_stderr => false, - stdout_logfile => 'program_foo.log', - stdout_logfile_maxbytes => '50MB', - stdout_logfile_backups => '10', - stdout_capture_maxbytes => '0', - stdout_events_enabled => false, - stderr_logfile => 'program_foo.error', - stderr_logfile_maxbytes => '50MB', - stderr_logfile_backups => '10', - stderr_capture_maxbytes => '0', - stderr_events_enabled => false, - environment => { - 'HOME' => '/home/myuser', - 'PATH' => '/bin:/sbin:/usr/bin:/usr/sbin', - 'SECRET' => 'mysecret' - }, - directory => undef, - umask => '022', - serverurl => 'AUTO' -} \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/ChangeLog b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/ChangeLog deleted file mode 100644 index a91a0e2cf4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/ChangeLog +++ /dev/null @@ -1,29 +0,0 @@ -2014-01-20 - 0.3.0 -* Add optional comment inside the sysctl.d file. -* Use sysctl -p with the created/modified file instead of sysctl -w (#3). -* Fix purge and set its default to false (#7, tehmaspc). - -2013-10-02 - 0.2.0 -* Add optional prefix to the sysctl.d file name, to force ordering. - -2013-06-25 - 0.1.1 -* Make purge optional, still enabled by default. -* Add rspec tests (Justin Lambert). -* Minor fix for values with spaces (needs more changes to be robust). - -2013-03-06 - 0.1.0 -* Update README to markdown. -* Change to recommended 2 space indent. - -2012-12-18 - 0.0.3 -* Add feature to update existing values in /etc/sysctl.conf. -* Apply setting on each run if needed (hakamadare). -* Make sure $ensure => absent still works with the above change. - -2012-09-19 - 0.0.2 -* Fix deprecation warnings. -* Fix README markup. - -2012-07-19 - 0.0.1 -* Initial module release. - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/Gemfile deleted file mode 100644 index d4c141f5a3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/Gemfile +++ /dev/null @@ -1,8 +0,0 @@ -source :rubygems - -puppetversion = ENV['PUPPET_VERSION'] -gem 'puppet', puppetversion, :require => false -gem 'puppet-lint' -gem 'rspec-puppet' -gem 'puppetlabs_spec_helper', '>= 0.4.0' - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/LICENSE deleted file mode 100644 index 49a6e5c401..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (C) 2011-2013 Matthias Saou - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/Modulefile deleted file mode 100644 index 2d9f13ff73..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/Modulefile +++ /dev/null @@ -1,8 +0,0 @@ -name 'thias-sysctl' -version '0.3.0' -source 'git://github.com/thias/puppet-sysctl' -author 'Matthias Saou' -license 'Apache 2.0' -summary 'Sysctl module' -description "Manage sysctl variable values." -project_page 'https://github.com/thias/puppet-sysctl' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/README.md deleted file mode 100644 index 554bcfa0f1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# puppet-sysctl - -## Overview - -Manage sysctl variable values. All changes are immediately applied, as well as -configured to become persistent. Tested on Red Hat Enterprise Linux 6. - - * `sysctl` : Definition to manage sysctl variables by setting a value. - * `sysctl::base`: Base class (included from the definition). - -For persistence to work, your Operating System needs to support looking for -sysctl configuration inside `/etc/sysctl.d/`. - -You may optionally enable purging of the `/etc/sysctl.d/` directory, so that -all files which are not (or no longer) managed by this module will be removed. - -Beware that for the purge to work, you need to either have at least one -sysctl definition call left for the node, or include `sysctl::base` manually. - -You may also force a value to `ensure => absent`, which will always work. - -For the few original settings in the main `/etc/sysct.conf` file, the value is -also replaced so that running `sysctl -p` doesn't revert any change made by -puppet. - -## Examples - -Enable IP forwarding globally : -```puppet -sysctl { 'net.ipv4.ip_forward': value => '1' } -``` - -Set a value for maximum number of connections per UNIX socket : -```puppet -sysctl { 'net.core.somaxconn': value => '65536' } -``` - -Make sure we don't have any explicit value set for swappiness, typically -because it was set at some point but no longer needs to be. The original -value for existing nodes won't be reset until the next reboot : -```puppet -sysctl { 'vm.swappiness': ensure => absent } -``` - -If the order in which the files get applied is important, you can set it by -using a file name prefix, which could also be set globally from `site.pp` : -```puppet -Sysctl { prefix => '60' } -``` - -To enable purging of settings, you can use hiera to set the `sysctl::base` -`$purge` parameter : -```yaml ---- -# sysctl -sysctl::base::purge: true -``` - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/Rakefile deleted file mode 100644 index 184b9b5915..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/Rakefile +++ /dev/null @@ -1,7 +0,0 @@ -require 'rubygems' -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint' -PuppetLint.configuration.send("disable_80chars") -PuppetLint.configuration.send("disable_autoloader_layout") -PuppetLint.configuration.send("disable_quoted_booleans") - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/manifests/base.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/manifests/base.pp deleted file mode 100644 index f7a9513146..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/manifests/base.pp +++ /dev/null @@ -1,26 +0,0 @@ -# Class: sysctl::base -# -# Common part for the sysctl definition. Not meant to be used on its own. -# -class sysctl::base ( - $purge = false, -) { - - if $purge { - $recurse = true - } else { - $recurse = false - } - - file { '/etc/sysctl.d': - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', - # Magic hidden here - purge => $purge, - recurse => $recurse, - } - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/manifests/init.pp deleted file mode 100644 index 379e69136c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/manifests/init.pp +++ /dev/null @@ -1,66 +0,0 @@ -# Define: sysctl -# -# Manage sysctl variable values. -# -# Parameters: -# $value: -# The value for the sysctl parameter. Mandatory, unless $ensure is 'absent'. -# $prefix: -# Optional prefix for the sysctl.d file to be created. Default: none. -# $ensure: -# Whether the variable's value should be 'present' or 'absent'. -# Defaults to 'present'. -# -# Sample Usage : -# sysctl { 'net.ipv6.bindv6only': value => '1' } -# -define sysctl ( - $value = undef, - $prefix = undef, - $comment = undef, - $ensure = undef, -) { - - include sysctl::base - - # If we have a prefix, then add the dash to it - if $prefix { - $sysctl_d_file = "${prefix}-${title}.conf" - } else { - $sysctl_d_file = "${title}.conf" - } - - # The permanent change - file { "/etc/sysctl.d/${sysctl_d_file}": - ensure => $ensure, - owner => 'root', - group => 'root', - mode => '0644', - content => template("${module_name}/sysctl.d-file.erb"), - notify => [ - Exec["sysctl-${title}"], - Exec["update-sysctl.conf-${title}"], - ], - } - - if $ensure != 'absent' { - - # The immediate change + re-check on each run "just in case" - exec { "sysctl-${title}": - command => "/sbin/sysctl -p /etc/sysctl.d/${sysctl_d_file}", - refreshonly => true, - require => File["/etc/sysctl.d/${sysctl_d_file}"], - } - - # For the few original values from the main file - exec { "update-sysctl.conf-${title}": - command => "sed -i -e 's/^${title} *=.*/${title} = ${value}/' /etc/sysctl.conf", - path => [ '/usr/sbin', '/sbin', '/usr/bin', '/bin' ], - refreshonly => true, - onlyif => "grep -E '^${title} *=' /etc/sysctl.conf", - } - - } - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/metadata.json b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/metadata.json deleted file mode 100644 index 237befce80..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/metadata.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "project_page": "https://github.com/thias/puppet-sysctl", - "version": "0.3.0", - "license": "Apache 2.0", - "description": "Manage sysctl variable values.", - "dependencies": [ - - ], - "types": [ - - ], - "name": "thias-sysctl", - "author": "Matthias Saou", - "summary": "Sysctl module", - "source": "git://github.com/thias/puppet-sysctl", - "checksums": { - "tests/init.pp": "e70e5327b9840b44699bb7fae71d47cd", - "spec/spec_helper.rb": "3ea886dd135e120afa31e0aab12e85b0", - "ChangeLog": "ed8052eb5cb46b92eaa03b882c11779e", - "LICENSE": "99219472697a01561e7630d63aaecdc1", - "Modulefile": "3b8a6a0dfff841a31118a5f46fde59da", - "spec/defines/sysctl_init_spec.rb": "21d524df70961750cb22f6b83349093e", - "manifests/init.pp": "0f7dd893b08ebbbec8994d14eca6701b", - "README.md": "ed4837849a1c4790b7178cd99824a204", - "spec/classes/sysctl_base_spec.rb": "6241cf3e290871c00b1bb3bbd5490108", - "templates/sysctl.d-file.erb": "0212783df32c499b3e9e343993f608da", - "manifests/base.pp": "9508015ce74b5ce1420ad8c8ebc7d3af", - "tests/base.pp": "1ba89838432dbc94339097327c19ae3d", - "Gemfile": "3ad486d60d90bfe4395b368b95481e01", - "Rakefile": "ab253b919e7093c2a5eb7adf0e39ffbc" - } -} \ No newline at end of file diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/spec/classes/sysctl_base_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/spec/classes/sysctl_base_spec.rb deleted file mode 100644 index a1d47a21e7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/spec/classes/sysctl_base_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'spec_helper' - -describe 'sysctl::base', :type => :class do - - it { should create_class('sysctl::base') } - it { should contain_file('/etc/sysctl.d') } - -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/spec/defines/sysctl_init_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/spec/defines/sysctl_init_spec.rb deleted file mode 100644 index 1f8db67cce..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/spec/defines/sysctl_init_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'spec_helper' - -describe 'sysctl', :type => :define do - let(:title) { 'net.ipv4.ip_forward'} - - context 'present' do - let(:params) { { :value => '1' } } - - it { should contain_file('/etc/sysctl.d/net.ipv4.ip_forward.conf').with( - :content => "net.ipv4.ip_forward = 1\n", - :ensure => nil - ) } - - it { should contain_exec('sysctl-net.ipv4.ip_forward') } - it { should contain_exec('update-sysctl.conf-net.ipv4.ip_forward')} - end - - context 'absent' do - let(:params) { { :ensure => 'absent' } } - - it { should contain_file('/etc/sysctl.d/net.ipv4.ip_forward.conf').with_ensure('absent') } - end - -end - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/spec/spec_helper.rb deleted file mode 100644 index dc7e9f4a0e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/spec/spec_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'rubygems' -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/templates/sysctl.d-file.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/templates/sysctl.d-file.erb deleted file mode 100644 index 843721435a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/templates/sysctl.d-file.erb +++ /dev/null @@ -1,6 +0,0 @@ -<% if @comment -%> -<% @comment.each do |line| -%> -# <%= line %> -<% end -%> -<% end -%> -<%= @title %> = <%= @value %> diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/tests/base.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/tests/base.pp deleted file mode 100644 index a4868712ef..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/tests/base.pp +++ /dev/null @@ -1 +0,0 @@ -include sysctl::base diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/tests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/tests/init.pp deleted file mode 100644 index 402615bb79..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/sysctl/tests/init.pp +++ /dev/null @@ -1,3 +0,0 @@ -sysctl { 'net.ipv4.ip_forward': value => '1' } -sysctl { 'net.core.somaxconn': value => '65536' } -sysctl { 'vm.swappiness': ensure => absent } diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/.travis.yml deleted file mode 100644 index 1c5e71b98d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -branches: - only: - - master -language: ruby -bundler_args: --without development -script: "bundle exec rake spec SPEC_OPTS='--format documentation'" -after_success: - - git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-release - - .forge-release/publish -rvm: - - 1.8.7 - - 1.9.3 - - 2.0.0 -env: - matrix: - - PUPPET_GEM_VERSION="~> 2.7.0" - - PUPPET_GEM_VERSION="~> 3.3.0" - global: - - PUBLISHER_LOGIN=puppetlabs - - secure: |- - ZiIkYd9+CdPzpwSjFPnVkCx1FIlipxpbdyD33q94h2Tj5zXjNb1GXizVy0NR - kVxGhU5Ld8y9z8DTqKRgCI1Yymg3H//OU++PKLOQj/X5juWVR4URBNPeBOzu - IJBDl1MADKA4i1+jAZPpz4mTvTtKS4pWKErgCSmhSfsY1hs7n6c= -matrix: - exclude: - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 2.7.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 2.7.0" -notifications: - email: false diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/CHANGELOG b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/CHANGELOG deleted file mode 100644 index 8142f5d6e4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/CHANGELOG +++ /dev/null @@ -1,41 +0,0 @@ -2013-11-13 - Version 0.2.0 - -Summary: - -This release mainly focuses on a number of bugfixes, which should -significantly improve the reliability of Git and SVN. Thanks to -our many contributors for all of these fixes! - -Features: -- Git: - - Add autorequire for Package['git'] -- HG: - - Allow user and identity properties. -- Bzr: - - "ensure => latest" support. -- SVN: - - Added configuration parameter. - - Add support for master svn repositories. -- CVS: - - Allow for setting the CVS_RSH environment variable. - -Fixes: -- Handle Puppet::Util[::Execution].withenv for 2.x and 3.x properly. -- Change path_empty? to not do full directory listing. -- Overhaul spec tests to work with rspec2. -- Git: - - Improve Git SSH usage documentation. - - Add ssh session timeouts to prevent network issues from blocking runs. - - Fix git provider checkout of a remote ref on an existing repo. - - Allow unlimited submodules (thanks to --recursive). - - Use git checkout --force instead of short -f everywhere. - - Update git provider to handle checking out into an existing (empty) dir. -- SVN: - - Handle force property. for svn. - - Adds support for changing upstream repo url. - - Check that the URL of the WC matches the URL from the manifest. - - Changed from using "update" to "switch". - - Handle revision update without source switch. - - Fix svn provider to look for '^Revision:' instead of '^Last Changed Rev:'. -- CVS: - - Documented the "module" attribute. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/Gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/Gemfile deleted file mode 100644 index 5def829220..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/Gemfile +++ /dev/null @@ -1,22 +0,0 @@ -source 'https://rubygems.org' - -group :development, :test do - gem 'rake', :require => false - gem 'rspec-puppet', :require => false - gem 'puppetlabs_spec_helper', :require => false - gem 'rspec-system', :require => false - gem 'rspec-system-puppet', :require => false - gem 'rspec-system-serverspec', :require => false - gem 'serverspec', :require => false - gem 'puppet-lint', :require => false - gem 'pry', :require => false - gem 'simplecov', :require => false -end - -if puppetversion = ENV['PUPPET_GEM_VERSION'] - gem 'puppet', puppetversion, :require => false -else - gem 'puppet', :require => false -end - -# vim:ft=ruby diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/LICENSE deleted file mode 100644 index 2ee80c8ec8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/LICENSE +++ /dev/null @@ -1,17 +0,0 @@ -Copyright (C) 2010-2012 Puppet Labs Inc. - -Puppet Labs can be contacted at: info@puppetlabs.com - -This program and entire repository is free software; you can -redistribute it and/or modify it under the terms of the GNU -General Public License as published by the Free Software -Foundation; either version 2 of the License, or any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/Modulefile deleted file mode 100644 index d2bbe92959..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/Modulefile +++ /dev/null @@ -1,4 +0,0 @@ -name 'puppetlabs/vcsrepo' -version '0.2.0' -summary 'Manage repositories from various version control systems' -description 'Manage repositories from various version control systems' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.BZR.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.BZR.markdown deleted file mode 100644 index cc257e9fdf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.BZR.markdown +++ /dev/null @@ -1,47 +0,0 @@ -Using vcsrepo with Bazaar -========================= - -To create a blank repository ----------------------------- - -Define a `vcsrepo` without a `source` or `revision`: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => bzr - } - -To branch from an existing repository -------------------------------------- - -Provide the `source` location: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => bzr, - source => 'lp:myproj' - } - -For a specific revision, use `revision` with a valid revisionspec -(see `bzr help revisionspec` for more information on formatting a revision): - - vcsrepo { "/path/to/repo": - ensure => present, - provider => bzr, - source => 'lp:myproj', - revision => 'menesis@pov.lt-20100309191856-4wmfqzc803fj300x' - } - -For sources that use SSH (eg, `bzr+ssh://...`, `sftp://...`) ------------------------------------------------------------- - -Manage your SSH keys with Puppet and use `require` in your `vcsrepo` -to ensure they are present. For more information, see the `require` -metaparameter documentation[1]. - -More Examples -------------- - -For examples you can run, see `examples/bzr/` - -[1]: http://docs.puppetlabs.com/references/stable/metaparameter.html#require diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.CVS.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.CVS.markdown deleted file mode 100644 index 3bdd59da4f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.CVS.markdown +++ /dev/null @@ -1,66 +0,0 @@ -Using vcsrepo with CVS -====================== - -To create a blank repository ----------------------------- - -Define a `vcsrepo` without a `source` or `revision`: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => cvs - } - -To checkout/update from a repository ------------------------------------- - -To get the current mainline: - - vcsrepo { "/path/to/workspace": - ensure => present, - provider => cvs, - source => ":pserver:anonymous@example.com:/sources/myproj" - } - -To get a specific module on the current mainline: - - vcsrepo {"/vagrant/lockss-daemon-source": - ensure => present, - provider => cvs, - source => ":pserver:anonymous@lockss.cvs.sourceforge.net:/cvsroot/lockss", - module => "lockss-daemon", - } - - -You can use the `compression` parameter (it works like CVS `-z`): - - vcsrepo { "/path/to/workspace": - ensure => present, - provider => cvs, - compression => 3, - source => ":pserver:anonymous@example.com:/sources/myproj" - } - -For a specific tag, use `revision`: - - vcsrepo { "/path/to/workspace": - ensure => present, - provider => cvs, - compression => 3, - source => ":pserver:anonymous@example.com:/sources/myproj", - revision => "SOMETAG" - } - -For sources that use SSH ------------------------- - -Manage your SSH keys with Puppet and use `require` in your `vcsrepo` -to ensure they are present. For more information, see the `require` -metaparameter documentation[1]. - -More Examples -------------- - -For examples you can run, see `examples/cvs/` - -[1]: http://docs.puppetlabs.com/references/stable/metaparameter.html#require diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.GIT.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.GIT.markdown deleted file mode 100644 index 846bdcc294..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.GIT.markdown +++ /dev/null @@ -1,95 +0,0 @@ -Using vcsrepo with Git -====================== - -To create a blank repository ----------------------------- - -Define a `vcsrepo` without a `source` or `revision`: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => git - } - -If you're defining this for a central/"official" repository, you'll -probably want to make it a "bare" repository. Do this by setting -`ensure` to `bare` instead of `present`: - - vcsrepo { "/path/to/repo": - ensure => bare, - provider => git - } - -To clone/pull a repository ----------------------------- - -To get the current [master] HEAD: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => git, - source => "git://example.com/repo.git" - } - -For a specific revision or branch (can be a commit SHA, tag or branch name): - - vcsrepo { "/path/to/repo": - ensure => present, - provider => git, - source => 'git://example.com/repo.git', - revision => '0c466b8a5a45f6cd7de82c08df2fb4ce1e920a31' - } - - vcsrepo { "/path/to/repo": - ensure => present, - provider => git, - source => 'git://example.com/repo.git', - revision => '1.1.2rc1' - } - - vcsrepo { "/path/to/repo": - ensure => present, - provider => git, - source => 'git://example.com/repo.git', - revision => 'development' - } - -Check out as a user: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => git, - source => 'git://example.com/repo.git', - revision => '0c466b8a5a45f6cd7de82c08df2fb4ce1e920a31', - user => 'someUser' - } - -Keep the repository at the latest revision (note: this will always overwrite local changes to the repository): - - vcsrepo { "/path/to/repo": - ensure => latest, - provider => git, - source => 'git://example.com/repo.git', - revision => 'master', - } - -For sources that use SSH (eg, `username@server:...`) ----------------------------------------------------- - -If your SSH key is associated with a user, simply fill the `user` parameter to use his keys. - -Example: - - user => 'toto' # will use toto's $HOME/.ssh setup - - -Otherwise, manage your SSH keys with Puppet and use `require` in your `vcsrepo` to ensure they are present. -For more information, see the `require` metaparameter documentation[1]. - -More Examples -------------- - -For examples you can run, see `examples/git/` - -[1]: http://docs.puppetlabs.com/references/stable/metaparameter.html#require - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.HG.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.HG.markdown deleted file mode 100644 index 55ceef4acc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.HG.markdown +++ /dev/null @@ -1,73 +0,0 @@ -Using vcsrepo with Mercurial -============================ - -To create a blank repository ----------------------------- - -Define a `vcsrepo` without a `source` or `revision`: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => hg - } - -To clone/pull & update a repository ------------------------------------ - -To get the default branch tip: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => hg, - source => "http://hg.example.com/myrepo" - } - -For a specific changeset, use `revision`: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => hg, - source => "http://hg.example.com/myrepo", - revision => '21ea4598c962' - } - -You can also set `revision` to a tag: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => hg, - source => "http://hg.example.com/myrepo", - revision => '1.1.2' - } - -Check out as a user: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => hg, - source => "http://hg.example.com/myrepo", - user => 'user' - } - -Specify an SSH identity key: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => hg, - source => "ssh://hg@hg.example.com/myrepo", - identity => "/home/user/.ssh/id_dsa, - } - -For sources that use SSH (eg, `ssh://...`) ------------------------------------------- - -Manage your SSH keys with Puppet and use `require` in your `vcsrepo` -to ensure they are present. For more information, see the `require` -metaparameter documentation[1]. - -More Examples -------------- - -For examples you can run, see `examples/hg/` - -[1]: http://docs.puppetlabs.com/references/stable/metaparameter.html#require diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.SVN.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.SVN.markdown deleted file mode 100644 index f374094c1d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.SVN.markdown +++ /dev/null @@ -1,62 +0,0 @@ -Using vcsrepo with Subversion -============================= - -To create a blank repository ----------------------------- - -To create a blank repository suitable for use as a central repository, -define a `vcsrepo` without a `source` or `revision`: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => svn - } - -To checkout from a repository ------------------------------ - -Provide a `source` qualified to the branch/tag you want: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => svn, - source => "svn://svnrepo/hello/branches/foo" - } - -You can provide a specific `revision`: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => svn, - source => "svn://svnrepo/hello/branches/foo", - revision => '1234' - } - - -Using a specified Subversion configuration directory ------------------------------ - -Provide a `configuration` parameter which should be a directory path on the local system where your svn configuration -files are. Typically, it is /path/to/.subversion: - - vcsrepo { "/path/to/repo": - ensure => present, - provider => svn, - source => "svn://svnrepo/hello/branches/foo", - configuration => "/path/to/.subversion" - } - - -For sources that use SSH (eg, `svn+ssh://...`) ----------------------------------------------- - -Manage your SSH keys with Puppet and use `require` in your `vcsrepo` -to ensure they are present. For more information, see the `require` -metaparameter documentation[1]. - -More Examples -------------- - -For examples you can run, see `examples/svn/` - -[1]: http://docs.puppetlabs.com/references/stable/metaparameter.html#require diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.markdown deleted file mode 100644 index 848725630a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/README.markdown +++ /dev/null @@ -1,32 +0,0 @@ -vcsrepo -======= - -[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-vcsrepo.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-vcsrepo) - -Purpose -------- - -This provides a single type, `vcsrepo`. - -This type can be used to describe: - -* A working copy checked out from a (remote or local) source, at an - arbitrary revision -* A "blank" working copy not associated with a source (when it makes - sense for the VCS being used) -* A "blank" central repository (when the distinction makes sense for the VCS - being used) - -Supported Version Control Systems ---------------------------------- - -This module supports a wide range of VCS types, each represented by a -separate provider. - -For information on how to use this module with a specific VCS, see -`README..markdown`. - -License -------- - -See LICENSE. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/Rakefile deleted file mode 100644 index cd3d379958..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/Rakefile +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/branch.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/branch.pp deleted file mode 100644 index 0ed0705ee8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/branch.pp +++ /dev/null @@ -1,6 +0,0 @@ -vcsrepo { '/tmp/vcstest-bzr-branch': - ensure => present, - provider => bzr, - source => 'lp:do', - revision => '1312', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/init_repo.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/init_repo.pp deleted file mode 100644 index 1129dd7d05..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/init_repo.pp +++ /dev/null @@ -1,4 +0,0 @@ -vcsrepo { '/tmp/vcstest-bzr-init': - ensure => present, - provider => bzr, -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/local.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/local.pp deleted file mode 100644 index 155742e34d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/local.pp +++ /dev/null @@ -1,11 +0,0 @@ -vcsrepo { '/tmp/vcstest-cvs-repo': - ensure => present, - provider => cvs, -} - -vcsrepo { '/tmp/vcstest-cvs-workspace-local': - ensure => present, - provider => cvs, - source => '/tmp/vcstest-cvs-repo', - require => Vcsrepo['/tmp/vcstest-cvs-repo'], -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/remote.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/remote.pp deleted file mode 100644 index eb9665a92e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/remote.pp +++ /dev/null @@ -1,5 +0,0 @@ -vcsrepo { '/tmp/vcstest-cvs-workspace-remote': - ensure => present, - provider => cvs, - source => ':pserver:anonymous@cvs.sv.gnu.org:/sources/leetcvrt', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/git/bare_init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/git/bare_init.pp deleted file mode 100644 index 4166f6e696..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/git/bare_init.pp +++ /dev/null @@ -1,4 +0,0 @@ -vcsrepo { '/tmp/vcstest-git-bare': - ensure => bare, - provider => git, -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/git/clone.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/git/clone.pp deleted file mode 100644 index b29a4fdbef..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/git/clone.pp +++ /dev/null @@ -1,5 +0,0 @@ -vcsrepo { '/tmp/vcstest-git-clone': - ensure => present, - provider => git, - source => 'git://github.com/bruce/rtex.git', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/git/working_copy_init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/git/working_copy_init.pp deleted file mode 100644 index e3352eb7c7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/git/working_copy_init.pp +++ /dev/null @@ -1,4 +0,0 @@ -vcsrepo { '/tmp/vcstest-git-wc': - ensure => present, - provider => git, -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/clone.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/clone.pp deleted file mode 100644 index be2d955de5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/clone.pp +++ /dev/null @@ -1,6 +0,0 @@ -vcsrepo { '/tmp/vcstest-hg-clone': - ensure => present, - provider => hg, - source => 'http://hg.basho.com/riak', - revision => 'riak-0.5.3', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/init_repo.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/init_repo.pp deleted file mode 100644 index a890804049..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/init_repo.pp +++ /dev/null @@ -1,4 +0,0 @@ -vcsrepo { '/tmp/vcstest-hg-init': - ensure => present, - provider => hg, -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/checkout.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/checkout.pp deleted file mode 100644 index f9fc2730f5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/checkout.pp +++ /dev/null @@ -1,5 +0,0 @@ -vcsrepo { '/tmp/vcstest-svn-checkout': - ensure => present, - provider => svn, - source => 'http://svn.edgewall.org/repos/babel/trunk', -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/server.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/server.pp deleted file mode 100644 index de7c390f9f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/server.pp +++ /dev/null @@ -1,4 +0,0 @@ -vcsrepo { '/tmp/vcstest-svn-server': - ensure => present, - provider => svn, -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo.rb deleted file mode 100644 index 8793e632cb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'tmpdir' -require 'digest/md5' -require 'fileutils' - -# Abstract -class Puppet::Provider::Vcsrepo < Puppet::Provider - - private - - def set_ownership - owner = @resource.value(:owner) || nil - group = @resource.value(:group) || nil - FileUtils.chown_R(owner, group, @resource.value(:path)) - end - - def path_exists? - File.directory?(@resource.value(:path)) - end - - def path_empty? - # Path is empty if the only entries are '.' and '..' - d = Dir.new(@resource.value(:path)) - d.read # should return '.' - d.read # should return '..' - d.read.nil? - end - - # Note: We don't rely on Dir.chdir's behavior of automatically returning the - # value of the last statement -- for easier stubbing. - def at_path(&block) #:nodoc: - value = nil - Dir.chdir(@resource.value(:path)) do - value = yield - end - value - end - - def tempdir - @tempdir ||= File.join(Dir.tmpdir, 'vcsrepo-' + Digest::MD5.hexdigest(@resource.value(:path))) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/bzr.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/bzr.rb deleted file mode 100644 index 6688ce87b2..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/bzr.rb +++ /dev/null @@ -1,85 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'vcsrepo') - -Puppet::Type.type(:vcsrepo).provide(:bzr, :parent => Puppet::Provider::Vcsrepo) do - desc "Supports Bazaar repositories" - - optional_commands :bzr => 'bzr' - has_features :reference_tracking - - def create - if !@resource.value(:source) - create_repository(@resource.value(:path)) - else - clone_repository(@resource.value(:revision)) - end - end - - def working_copy_exists? - File.directory?(File.join(@resource.value(:path), '.bzr')) - end - - def exists? - working_copy_exists? - end - - def destroy - FileUtils.rm_rf(@resource.value(:path)) - end - - def revision - at_path do - current_revid = bzr('version-info')[/^revision-id:\s+(\S+)/, 1] - desired = @resource.value(:revision) - begin - desired_revid = bzr('revision-info', desired).strip.split(/\s+/).last - rescue Puppet::ExecutionFailure - # Possible revid available during update (but definitely not current) - desired_revid = nil - end - if current_revid == desired_revid - desired - else - current_revid - end - end - end - - def revision=(desired) - at_path do - begin - bzr('update', '-r', desired) - rescue Puppet::ExecutionFailure - bzr('update', '-r', desired, ':parent') - end - end - end - - def latest - at_path do - bzr('version-info', ':parent')[/^revision-id:\s+(\S+)/, 1] - end - end - - def latest? - at_path do - return self.revision == self.latest - end - end - - private - - def create_repository(path) - bzr('init', path) - end - - def clone_repository(revision) - args = ['branch'] - if revision - args.push('-r', revision) - end - args.push(@resource.value(:source), - @resource.value(:path)) - bzr(*args) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/cvs.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/cvs.rb deleted file mode 100644 index 206e73295e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/cvs.rb +++ /dev/null @@ -1,137 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'vcsrepo') - -Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo) do - desc "Supports CVS repositories/workspaces" - - optional_commands :cvs => 'cvs' - has_features :gzip_compression, :reference_tracking, :modules, :cvs_rsh - - def create - if !@resource.value(:source) - create_repository(@resource.value(:path)) - else - checkout_repository - end - update_owner - end - - def exists? - if @resource.value(:source) - directory = File.join(@resource.value(:path), 'CVS') - else - directory = File.join(@resource.value(:path), 'CVSROOT') - end - File.directory?(directory) - end - - def working_copy_exists? - File.directory?(File.join(@resource.value(:path), 'CVS')) - end - - def destroy - FileUtils.rm_rf(@resource.value(:path)) - end - - def latest? - debug "Checking for updates because 'ensure => latest'" - at_path do - # We cannot use -P to prune empty dirs, otherwise - # CVS would report those as "missing", regardless - # if they have contents or updates. - is_current = (runcvs('-nq', 'update', '-d').strip == "") - if (!is_current) then debug "There are updates available on the checkout's current branch/tag." end - return is_current - end - end - - def latest - # CVS does not have a conecpt like commit-IDs or change - # sets, so we can only have the current branch name (or the - # requested one, if that differs) as the "latest" revision. - should = @resource.value(:revision) - current = self.revision - return should != current ? should : current - end - - def revision - if !@rev - if File.exist?(tag_file) - contents = File.read(tag_file).strip - # Note: Doesn't differentiate between N and T entries - @rev = contents[1..-1] - else - @rev = 'HEAD' - end - debug "Checkout is on branch/tag '#{@rev}'" - end - return @rev - end - - def revision=(desired) - at_path do - runcvs('update', '-dr', desired, '.') - update_owner - @rev = desired - end - end - - private - - def tag_file - File.join(@resource.value(:path), 'CVS', 'Tag') - end - - def checkout_repository - dirname, basename = File.split(@resource.value(:path)) - Dir.chdir(dirname) do - args = ['-d', @resource.value(:source)] - if @resource.value(:compression) - args.push('-z', @resource.value(:compression)) - end - args.push('checkout') - if @resource.value(:revision) - args.push('-r', @resource.value(:revision)) - end - args.push('-d', basename, module_name) - runcvs(*args) - end - end - - # When the source: - # * Starts with ':' (eg, :pserver:...) - def module_name - if (m = @resource.value(:module)) - m - elsif (source = @resource.value(:source)) - source[0, 1] == ':' ? File.basename(source) : '.' - end - end - - def create_repository(path) - runcvs('-d', path, 'init') - end - - def update_owner - if @resource.value(:owner) or @resource.value(:group) - set_ownership - end - end - - def runcvs(*args) - if @resource.value(:cvs_rsh) - debug "Using CVS_RSH = " + @resource.value(:cvs_rsh) - e = { :CVS_RSH => @resource.value(:cvs_rsh) } - else - e = {} - end - - # The location of withenv changed from Puppet 2.x to 3.x - withenv = Puppet::Util.method(:withenv) if Puppet::Util.respond_to?(:withenv) - withenv = Puppet::Util::Execution.method(:withenv) if Puppet::Util::Execution.respond_to?(:withenv) - fail("Cannot set custom environment #{e}") if e && !withenv - - withenv.call e do - Puppet.debug cvs *args - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/dummy.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/dummy.rb deleted file mode 100644 index f7b4e54b89..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/dummy.rb +++ /dev/null @@ -1,12 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'vcsrepo') - -Puppet::Type.type(:vcsrepo).provide(:dummy, :parent => Puppet::Provider::Vcsrepo) do - desc "Dummy default provider" - - defaultfor :vcsrepo => :dummy - - def working_copy_exists? - providers = @resource.class.providers.map{|x| x.to_s}.sort.reject{|x| x == "dummy"}.join(", ") rescue "none" - raise("vcsrepo resource must have a provider, available: #{providers}") - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/git.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/git.rb deleted file mode 100644 index 47e84d29ec..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/git.rb +++ /dev/null @@ -1,323 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'vcsrepo') - -Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) do - desc "Supports Git repositories" - - ##TODO modify the commands below so that the su - is included - optional_commands :git => 'git', - :su => 'su' - has_features :bare_repositories, :reference_tracking, :ssh_identity, :multiple_remotes, :user - - def create - if !@resource.value(:source) - init_repository(@resource.value(:path)) - else - clone_repository(@resource.value(:source), @resource.value(:path)) - if @resource.value(:revision) - if @resource.value(:ensure) == :bare - notice "Ignoring revision for bare repository" - else - checkout - end - end - if @resource.value(:ensure) != :bare - update_submodules - end - end - update_owner_and_excludes - end - - def destroy - FileUtils.rm_rf(@resource.value(:path)) - end - - def latest? - at_path do - return self.revision == self.latest - end - end - - def latest - branch = on_branch? - if branch == 'master' - return get_revision("#{@resource.value(:remote)}/HEAD") - elsif branch == '(no branch)' - return get_revision('HEAD') - else - return get_revision("#{@resource.value(:remote)}/%s" % branch) - end - end - - def revision - update_references - current = at_path { git_with_identity('rev-parse', 'HEAD').chomp } - return current unless @resource.value(:revision) - - if tag_revision?(@resource.value(:revision)) - canonical = at_path { git_with_identity('show', @resource.value(:revision)).scan(/^commit (.*)/).to_s } - else - # if it's not a tag, look for it as a local ref - canonical = at_path { git_with_identity('rev-parse', '--revs-only', @resource.value(:revision)).chomp } - if canonical.empty? - # git rev-parse executed properly but didn't find the ref; - # look for it in the remote - remote_ref = at_path { git_with_identity('ls-remote', '--heads', '--tags', @resource.value(:remote), @resource.value(:revision)).chomp } - if remote_ref.empty? - fail("#{@resource.value(:revision)} is not a local or remote ref") - end - - # $ git ls-remote --heads --tags origin feature/cvs - # 7d4244b35e72904e30130cad6d2258f901c16f1a refs/heads/feature/cvs - canonical = remote_ref.split.first - end - end - - if current == canonical - @resource.value(:revision) - else - current - end - end - - def revision=(desired) - checkout(desired) - if local_branch_revision?(desired) - # reset instead of pull to avoid merge conflicts. assuming remote is - # authoritative. - # might be worthwhile to have an allow_local_changes param to decide - # whether to reset or pull when we're ensuring latest. - at_path { git_with_identity('reset', '--hard', "#{@resource.value(:remote)}/#{desired}") } - end - if @resource.value(:ensure) != :bare - update_submodules - end - update_owner_and_excludes - end - - def bare_exists? - bare_git_config_exists? && !working_copy_exists? - end - - def working_copy_exists? - File.directory?(File.join(@resource.value(:path), '.git')) - end - - def exists? - working_copy_exists? || bare_exists? - end - - def update_remote_origin_url - current = git_with_identity('config', 'remote.origin.url') - unless @resource.value(:source).nil? - if current.nil? or current.strip != @resource.value(:source) - git_with_identity('config', 'remote.origin.url', @resource.value(:source)) - end - end - end - - def update_references - at_path do - update_remote_origin_url - git_with_identity('fetch', @resource.value(:remote)) - git_with_identity('fetch', '--tags', @resource.value(:remote)) - update_owner_and_excludes - end - end - - private - - def bare_git_config_exists? - File.exist?(File.join(@resource.value(:path), 'config')) - end - - def clone_repository(source, path) - check_force - args = ['clone'] - if @resource.value(:ensure) == :bare - args << '--bare' - end - if !File.exist?(File.join(@resource.value(:path), '.git')) - args.push(source, path) - Dir.chdir("/") do - git_with_identity(*args) - end - else - notice "Repo has already been cloned" - end - end - - def check_force - if path_exists? and not path_empty? - if @resource.value(:force) - notice "Removing %s to replace with vcsrepo." % @resource.value(:path) - destroy - else - raise Puppet::Error, "Could not create repository (non-repository at path)" - end - end - end - - def init_repository(path) - check_force - if @resource.value(:ensure) == :bare && working_copy_exists? - convert_working_copy_to_bare - elsif @resource.value(:ensure) == :present && bare_exists? - convert_bare_to_working_copy - else - # normal init - FileUtils.mkdir(@resource.value(:path)) - FileUtils.chown(@resource.value(:user), nil, @resource.value(:path)) if @resource.value(:user) - args = ['init'] - if @resource.value(:ensure) == :bare - args << '--bare' - end - at_path do - git_with_identity(*args) - end - end - end - - # Convert working copy to bare - # - # Moves: - # /.git - # to: - # / - def convert_working_copy_to_bare - notice "Converting working copy repository to bare repository" - FileUtils.mv(File.join(@resource.value(:path), '.git'), tempdir) - FileUtils.rm_rf(@resource.value(:path)) - FileUtils.mv(tempdir, @resource.value(:path)) - end - - # Convert bare to working copy - # - # Moves: - # / - # to: - # /.git - def convert_bare_to_working_copy - notice "Converting bare repository to working copy repository" - FileUtils.mv(@resource.value(:path), tempdir) - FileUtils.mkdir(@resource.value(:path)) - FileUtils.mv(tempdir, File.join(@resource.value(:path), '.git')) - if commits_in?(File.join(@resource.value(:path), '.git')) - reset('HEAD') - git_with_identity('checkout', '--force') - update_owner_and_excludes - end - end - - def commits_in?(dot_git) - Dir.glob(File.join(dot_git, 'objects/info/*'), File::FNM_DOTMATCH) do |e| - return true unless %w(. ..).include?(File::basename(e)) - end - false - end - - def checkout(revision = @resource.value(:revision)) - if !local_branch_revision? && remote_branch_revision? - at_path { git_with_identity('checkout', '-b', revision, '--track', "#{@resource.value(:remote)}/#{revision}") } - else - at_path { git_with_identity('checkout', '--force', revision) } - end - end - - def reset(desired) - at_path do - git_with_identity('reset', '--hard', desired) - end - end - - def update_submodules - at_path do - git_with_identity('submodule', 'update', '--init', '--recursive') - end - end - - def remote_branch_revision?(revision = @resource.value(:revision)) - # git < 1.6 returns '#{@resource.value(:remote)}/#{revision}' - # git 1.6+ returns 'remotes/#{@resource.value(:remote)}/#{revision}' - branch = at_path { branches.grep /(remotes\/)?#{@resource.value(:remote)}\/#{revision}/ } - branch unless branch.empty? - end - - def local_branch_revision?(revision = @resource.value(:revision)) - at_path { branches.include?(revision) } - end - - def tag_revision?(revision = @resource.value(:revision)) - at_path { tags.include?(revision) } - end - - def branches - at_path { git_with_identity('branch', '-a') }.gsub('*', ' ').split(/\n/).map { |line| line.strip } - end - - def on_branch? - at_path { git_with_identity('branch', '-a') }.split(/\n/).grep(/\*/).first.to_s.gsub('*', '').strip - end - - def tags - at_path { git_with_identity('tag', '-l') }.split(/\n/).map { |line| line.strip } - end - - def set_excludes - at_path { open('.git/info/exclude', 'w') { |f| @resource.value(:excludes).each { |ex| f.write(ex + "\n") }}} - end - - def get_revision(rev) - if !working_copy_exists? - create - end - at_path do - update_remote_origin_url - git_with_identity('fetch', @resource.value(:remote)) - git_with_identity('fetch', '--tags', @resource.value(:remote)) - end - current = at_path { git_with_identity('rev-parse', rev).strip } - if @resource.value(:revision) - if local_branch_revision? - canonical = at_path { git_with_identity('rev-parse', @resource.value(:revision)).strip } - elsif remote_branch_revision? - canonical = at_path { git_with_identity('rev-parse', "#{@resource.value(:remote)}/" + @resource.value(:revision)).strip } - end - current = @resource.value(:revision) if current == canonical - end - update_owner_and_excludes - return current - end - - def update_owner_and_excludes - if @resource.value(:owner) or @resource.value(:group) - set_ownership - end - if @resource.value(:excludes) - set_excludes - end - end - - def git_with_identity(*args) - if @resource.value(:identity) - Tempfile.open('git-helper') do |f| - f.puts '#!/bin/sh' - f.puts "exec ssh -oStrictHostKeyChecking=no -oPasswordAuthentication=no -oKbdInteractiveAuthentication=no -oChallengeResponseAuthentication=no -oConnectTimeout=120 -i #{@resource.value(:identity)} $*" - f.close - - FileUtils.chmod(0755, f.path) - env_save = ENV['GIT_SSH'] - ENV['GIT_SSH'] = f.path - - ret = git(*args) - - ENV['GIT_SSH'] = env_save - - return ret - end - elsif @resource.value(:user) - su(@resource.value(:user), '-c', "git #{args.join(' ')}" ) - else - git(*args) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/hg.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/hg.rb deleted file mode 100644 index 4886b7a1f8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/hg.rb +++ /dev/null @@ -1,115 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'vcsrepo') - -Puppet::Type.type(:vcsrepo).provide(:hg, :parent => Puppet::Provider::Vcsrepo) do - desc "Supports Mercurial repositories" - - optional_commands :hg => 'hg', - :su => 'su' - has_features :reference_tracking, :ssh_identity, :user - - def create - if !@resource.value(:source) - create_repository(@resource.value(:path)) - else - clone_repository(@resource.value(:revision)) - end - update_owner - end - - def working_copy_exists? - File.directory?(File.join(@resource.value(:path), '.hg')) - end - - def exists? - working_copy_exists? - end - - def destroy - FileUtils.rm_rf(@resource.value(:path)) - end - - def latest? - at_path do - return self.revision == self.latest - end - end - - def latest - at_path do - begin - hg_wrapper('incoming', '--branch', '.', '--newest-first', '--limit', '1')[/^changeset:\s+(?:-?\d+):(\S+)/m, 1] - rescue Puppet::ExecutionFailure - # If there are no new changesets, return the current nodeid - self.revision - end - end - end - - def revision - at_path do - current = hg_wrapper('parents')[/^changeset:\s+(?:-?\d+):(\S+)/m, 1] - desired = @resource.value(:revision) - if desired - # Return the tag name if it maps to the current nodeid - mapped = hg_wrapper('tags')[/^#{Regexp.quote(desired)}\s+\d+:(\S+)/m, 1] - if current == mapped - desired - else - current - end - else - current - end - end - end - - def revision=(desired) - at_path do - begin - hg_wrapper('pull') - rescue - end - begin - hg_wrapper('merge') - rescue Puppet::ExecutionFailure - # If there's nothing to merge, just skip - end - hg_wrapper('update', '--clean', '-r', desired) - end - update_owner - end - - private - - def create_repository(path) - hg_wrapper('init', path) - end - - def clone_repository(revision) - args = ['clone'] - if revision - args.push('-u', revision) - end - args.push(@resource.value(:source), - @resource.value(:path)) - hg_wrapper(*args) - end - - def update_owner - if @resource.value(:owner) or @resource.value(:group) - set_ownership - end - end - - def hg_wrapper(*args) - if @resource.value(:identity) - args += ["--ssh", "ssh -oStrictHostKeyChecking=no -oPasswordAuthentication=no -oKbdInteractiveAuthentication=no -oChallengeResponseAuthentication=no -i #{@resource.value(:identity)}"] - end - if @resource.value(:user) - args.map! { |a| if a =~ /\s/ then "'#{a}'" else a end } # Adds quotes to arguments with whitespaces. - su(@resource.value(:user), '-c', "hg #{args.join(' ')}") - else - hg(*args) - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/svn.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/svn.rb deleted file mode 100644 index e0d5b2164e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/svn.rb +++ /dev/null @@ -1,124 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'vcsrepo') - -Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo) do - desc "Supports Subversion repositories" - - optional_commands :svn => 'svn', - :svnadmin => 'svnadmin', - :svnlook => 'svnlook' - - has_features :filesystem_types, :reference_tracking, :basic_auth, :configuration - - def create - if !@resource.value(:source) - create_repository(@resource.value(:path)) - else - checkout_repository(@resource.value(:source), - @resource.value(:path), - @resource.value(:revision)) - end - update_owner - end - - def working_copy_exists? - if File.directory?(@resource.value(:path)) - # :path is an svn checkout - return true if File.directory?(File.join(@resource.value(:path), '.svn')) - # :path is an svn server - return true if svnlook('uuid', @resource.value(:path)) - end - false - end - - def exists? - working_copy_exists? - end - - def destroy - FileUtils.rm_rf(@resource.value(:path)) - end - - def latest? - at_path do - (self.revision >= self.latest) and (@resource.value(:source) == self.sourceurl) - end - end - - def buildargs - args = ['--non-interactive'] - if @resource.value(:basic_auth_username) && @resource.value(:basic_auth_password) - args.push('--username', @resource.value(:basic_auth_username)) - args.push('--password', @resource.value(:basic_auth_password)) - args.push('--no-auth-cache') - end - - if @resource.value(:force) - args.push('--force') - end - - if @resource.value(:configuration) - args.push('--config-dir', @resource.value(:configuration)) - end - - args - end - - def latest - args = buildargs.push('info', '-r', 'HEAD') - at_path do - svn(*args)[/^Revision:\s+(\d+)/m, 1] - end - end - - def sourceurl - args = buildargs.push('info') - at_path do - svn(*args)[/^URL:\s+(\S+)/m, 1] - end - end - - def revision - args = buildargs.push('info') - at_path do - svn(*args)[/^Revision:\s+(\d+)/m, 1] - end - end - - def revision=(desired) - args = if @resource.value(:source) - buildargs.push('switch', '-r', desired, @resource.value(:source)) - else - buildargs.push('update', '-r', desired) - end - at_path do - svn(*args) - end - update_owner - end - - private - - def checkout_repository(source, path, revision) - args = buildargs.push('checkout') - if revision - args.push('-r', revision) - end - args.push(source, path) - svn(*args) - end - - def create_repository(path) - args = ['create'] - if @resource.value(:fstype) - args.push('--fs-type', @resource.value(:fstype)) - end - args << path - svnadmin(*args) - end - - def update_owner - if @resource.value(:owner) or @resource.value(:group) - set_ownership - end - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/type/vcsrepo.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/type/vcsrepo.rb deleted file mode 100644 index ad90cedd83..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/type/vcsrepo.rb +++ /dev/null @@ -1,198 +0,0 @@ -require 'pathname' - -Puppet::Type.newtype(:vcsrepo) do - desc "A local version control repository" - - feature :gzip_compression, - "The provider supports explicit GZip compression levels" - feature :basic_auth, - "The provider supports HTTP Basic Authentication" - feature :bare_repositories, - "The provider differentiates between bare repositories - and those with working copies", - :methods => [:bare_exists?, :working_copy_exists?] - - feature :filesystem_types, - "The provider supports different filesystem types" - - feature :reference_tracking, - "The provider supports tracking revision references that can change - over time (eg, some VCS tags and branch names)" - - feature :ssh_identity, - "The provider supports a configurable SSH identity file" - - feature :user, - "The provider can run as a different user" - - feature :modules, - "The repository contains modules that can be chosen of" - - feature :multiple_remotes, - "The repository tracks multiple remote repositories" - - feature :configuration, - "The configuration directory to use" - - feature :cvs_rsh, - "The provider understands the CVS_RSH environment variable" - - ensurable do - attr_accessor :latest - - def insync?(is) - @should ||= [] - - case should - when :present - return true unless [:absent, :purged, :held].include?(is) - when :latest - if is == :latest - return true - else - return false - end - when :bare - return is == :bare - end - end - - newvalue :present do - notice "Creating repository from present" - provider.create - end - - newvalue :bare, :required_features => [:bare_repositories] do - if !provider.exists? - provider.create - end - end - - newvalue :absent do - provider.destroy - end - - newvalue :latest, :required_features => [:reference_tracking] do - if provider.exists? - if provider.respond_to?(:update_references) - provider.update_references - end - if provider.respond_to?(:latest?) - reference = provider.latest || provider.revision - else - reference = resource.value(:revision) || provider.revision - end - notice "Updating to latest '#{reference}' revision" - provider.revision = reference - else - notice "Creating repository from latest" - provider.create - end - end - - def retrieve - prov = @resource.provider - if prov - if prov.working_copy_exists? - (@should.include?(:latest) && prov.latest?) ? :latest : :present - elsif prov.class.feature?(:bare_repositories) and prov.bare_exists? - :bare - else - :absent - end - else - raise Puppet::Error, "Could not find provider" - end - end - - end - - newparam :path do - desc "Absolute path to repository" - isnamevar - validate do |value| - path = Pathname.new(value) - unless path.absolute? - raise ArgumentError, "Path must be absolute: #{path}" - end - end - end - - newparam :source do - desc "The source URI for the repository" - end - - newparam :fstype, :required_features => [:filesystem_types] do - desc "Filesystem type" - end - - newproperty :revision do - desc "The revision of the repository" - newvalue(/^\S+$/) - end - - newparam :owner do - desc "The user/uid that owns the repository files" - end - - newparam :group do - desc "The group/gid that owns the repository files" - end - - newparam :user do - desc "The user to run for repository operations" - end - - newparam :excludes do - desc "Files to be excluded from the repository" - end - - newparam :force do - desc "Force repository creation, destroying any files on the path in the process." - newvalues(:true, :false) - defaultto false - end - - newparam :compression, :required_features => [:gzip_compression] do - desc "Compression level" - validate do |amount| - unless Integer(amount).between?(0, 6) - raise ArgumentError, "Unsupported compression level: #{amount} (expected 0-6)" - end - end - end - - newparam :basic_auth_username, :required_features => [:basic_auth] do - desc "HTTP Basic Auth username" - end - - newparam :basic_auth_password, :required_features => [:basic_auth] do - desc "HTTP Basic Auth password" - end - - newparam :identity, :required_features => [:ssh_identity] do - desc "SSH identity file" - end - - newparam :module, :required_features => [:modules] do - desc "The repository module to manage" - end - - newparam :remote, :required_features => [:multiple_remotes] do - desc "The remote repository to track" - defaultto "origin" - end - - newparam :configuration, :required_features => [:configuration] do - desc "The configuration directory to use" - end - - newparam :cvs_rsh, :required_features => [:cvs_rsh] do - desc "The value to be used for the CVS_RSH environment variable." - end - - autorequire(:package) do - ['git', 'git-core'] - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/bzr_version_info.txt b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/bzr_version_info.txt deleted file mode 100644 index 88a56a1c80..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/bzr_version_info.txt +++ /dev/null @@ -1,5 +0,0 @@ -revision-id: menesis@pov.lt-20100309191856-4wmfqzc803fj300x -date: 2010-03-09 21:18:56 +0200 -build-date: 2010-03-14 00:42:43 -0800 -revno: 2634 -branch-nick: mytest diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_a.txt b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_a.txt deleted file mode 100644 index 2c99829d48..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_a.txt +++ /dev/null @@ -1,14 +0,0 @@ - feature/foo - feature/bar - feature/baz - feature/quux - only/local -* master - refactor/foo - origin/HEAD - origin/feature/foo - origin/feature/bar - origin/feature/baz - origin/feature/quux - origin/only/remote - origin/master diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_feature_bar.txt b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_feature_bar.txt deleted file mode 100644 index 72d5e2009c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_feature_bar.txt +++ /dev/null @@ -1,14 +0,0 @@ - feature/foo -* feature/bar - feature/baz - feature/quux - only/local - master - refactor/foo - origin/HEAD - origin/feature/foo - origin/feature/bar - origin/feature/baz - origin/feature/quux - origin/only/remote - origin/master diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_none.txt b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_none.txt deleted file mode 100644 index 7207c37929..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_none.txt +++ /dev/null @@ -1,15 +0,0 @@ - feature/foo - feature/bar - feature/baz - feature/quux - only/local - master -* (no branch) - refactor/foo - origin/HEAD - origin/feature/foo - origin/feature/bar - origin/feature/baz - origin/feature/quux - origin/only/remote - origin/master diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_parents.txt b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_parents.txt deleted file mode 100644 index 46173df499..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_parents.txt +++ /dev/null @@ -1,6 +0,0 @@ -changeset: 3:34e6012c783a -parent: 2:21ea4598c962 -parent: 1:9d0ff0028458 -user: Test User -date: Fri Aug 07 13:13:02 2009 -0400 -summary: merge diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_tags.txt b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_tags.txt deleted file mode 100644 index 53792e5ac8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_tags.txt +++ /dev/null @@ -1,18 +0,0 @@ -tip 1019:bca3f20b249b -0.9.1 1017:76ce7cca95d8 -0.9 1001:dbaa6f4ec585 -0.8 839:65b66ac0fc83 -0.7.1 702:e1357f00129f -0.7 561:7b2af3b4c968 -0.6.3 486:e38077f4e4aa -0.6.2 405:07bb099b7b10 -0.6.1 389:93750f3fbbe2 -0.6 369:34e6012c783a -0.5.3 321:5ffa6ae7e699 -0.5.2 318:fdc2c2e4cebe -0.5.1 315:33a5ea0cbe7a -0.5 313:47490716f4c9 -0.4 240:47fa3a14cc63 -0.3.1 132:bc231db18e1c -0.3 130:661615e510dd -0.2 81:f98d13b442f6 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/svn_info.txt b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/svn_info.txt deleted file mode 100644 index d2a975b238..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/svn_info.txt +++ /dev/null @@ -1,10 +0,0 @@ -Path: . -URL: http://example.com/svn/trunk -Repository Root: http://example.com/svn -Repository UUID: 75246ace-e253-0410-96dd-a7613ca8dc81 -Revision: 4 -Node Kind: directory -Schedule: normal -Last Changed Author: jon -Last Changed Rev: 3 -Last Changed Date: 2008-08-07 11:34:25 -0700 (Thu, 07 Aug 2008) diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/spec.opts b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/spec.opts deleted file mode 100644 index 91cd6427ed..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/spec.opts +++ /dev/null @@ -1,6 +0,0 @@ ---format -s ---colour ---loadby -mtime ---backtrace diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/spec_helper.rb deleted file mode 100644 index acfae0cb8c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/spec_helper.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' -require 'simplecov' -require 'support/filesystem_helpers' -require 'support/fixture_helpers' - -SimpleCov.start do - add_filter "/spec/" -end - -RSpec.configure do |c| - c.include FilesystemHelpers - c.include FixtureHelpers -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/support/filesystem_helpers.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/support/filesystem_helpers.rb deleted file mode 100644 index 15e2ca750a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/support/filesystem_helpers.rb +++ /dev/null @@ -1,18 +0,0 @@ -module FilesystemHelpers - - def expects_chdir(path = resource.value(:path)) - Dir.expects(:chdir).with(path).at_least_once.yields - end - - def expects_mkdir(path = resource.value(:path)) - Dir.expects(:mkdir).with(path).at_least_once - end - - def expects_rm_rf(path = resource.value(:path)) - FileUtils.expects(:rm_rf).with(path) - end - - def expects_directory?(returns = true, path = resource.value(:path)) - File.expects(:directory?).with(path).returns(returns) - end -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/support/fixture_helpers.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/support/fixture_helpers.rb deleted file mode 100644 index 8a0e0a0b4c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/support/fixture_helpers.rb +++ /dev/null @@ -1,7 +0,0 @@ -module FixtureHelpers - - def fixture(name, ext = '.txt') - File.read(File.join(File.dirname(__FILE__), '..', 'fixtures', name.to_s + ext)) - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/bzr_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/bzr_spec.rb deleted file mode 100644 index 488ddc0f90..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/bzr_spec.rb +++ /dev/null @@ -1,109 +0,0 @@ -require 'spec_helper' - -describe Puppet::Type.type(:vcsrepo).provider(:bzr_provider) do - - let(:resource) { Puppet::Type.type(:vcsrepo).new({ - :name => 'test', - :ensure => :present, - :provider => :bzr, - :revision => '2634', - :source => 'lp:do', - :path => '/tmp/test', - })} - - let(:provider) { resource.provider } - - before :each do - Puppet::Util.stubs(:which).with('bzr').returns('/usr/bin/bzr') - end - - describe 'creating' do - context 'with defaults' do - it "should execute 'bzr clone -r' with the revision" do - provider.expects(:bzr).with('branch', '-r', resource.value(:revision), resource.value(:source), resource.value(:path)) - provider.create - end - end - - context 'without revision' do - it "should just execute 'bzr clone' without a revision" do - resource.delete(:revision) - provider.expects(:bzr).with('branch', resource.value(:source), resource.value(:path)) - provider.create - end - end - - context 'without source' do - it "should execute 'bzr init'" do - resource.delete(:source) - provider.expects(:bzr).with('init', resource.value(:path)) - provider.create - end - end - end - - describe 'destroying' do - it "it should remove the directory" do - provider.destroy - end - end - - describe "checking existence" do - it "should check for the directory" do - File.expects(:directory?).with(File.join(resource.value(:path), '.bzr')).returns(true) - provider.exists? - end - end - - describe "checking the revision property" do - before do - expects_chdir - provider.expects(:bzr).with('version-info').returns(File.read(fixtures('bzr_version_info.txt'))) - @current_revid = 'menesis@pov.lt-20100309191856-4wmfqzc803fj300x' - end - - context "when given a non-revid as the resource revision" do - context "when its revid is not different than the current revid" do - it "should return the ref" do - resource[:revision] = '2634' - provider.expects(:bzr).with('revision-info', '2634').returns("2634 menesis@pov.lt-20100309191856-4wmfqzc803fj300x\n") - provider.revision.should == resource.value(:revision) - end - end - context "when its revid is different than the current revid" do - it "should return the current revid" do - resource[:revision] = '2636' - provider.expects(:bzr).with('revision-info', resource.value(:revision)).returns("2635 foo\n") - provider.revision.should == @current_revid - end - end - end - - context "when given a revid as the resource revision" do - context "when it is the same as the current revid" do - it "should return it" do - resource[:revision] = 'menesis@pov.lt-20100309191856-4wmfqzc803fj300x' - provider.expects(:bzr).with('revision-info', resource.value(:revision)).returns("1234 #{resource.value(:revision)}\n") - provider.revision.should == resource.value(:revision) - end - end - context "when it is not the same as the current revid" do - it "should return the current revid" do - resource[:revision] = 'menesis@pov.lt-20100309191856-4wmfqzc803fj300y' - provider.expects(:bzr).with('revision-info', resource.value(:revision)).returns("2636 foo\n") - provider.revision.should == @current_revid - end - end - - end - end - - describe "setting the revision property" do - it "should use 'bzr update -r' with the revision" do - Dir.expects(:chdir).with('/tmp/test').at_least_once.yields - provider.expects(:bzr).with('update', '-r', 'somerev') - provider.revision = 'somerev' - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb deleted file mode 100644 index efa4b33b36..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb +++ /dev/null @@ -1,115 +0,0 @@ -require 'spec_helper' - -describe Puppet::Type.type(:vcsrepo).provider(:cvs_provider) do - - let(:resource) { Puppet::Type.type(:vcsrepo).new({ - :name => 'test', - :ensure => :present, - :provider => :cvs, - :revision => '2634', - :source => 'lp:do', - :path => '/tmp/test', - })} - - let(:provider) { resource.provider } - - before :each do - Puppet::Util.stubs(:which).with('cvs').returns('/usr/bin/cvs') - end - - describe 'creating' do - context "with a source" do - it "should execute 'cvs checkout'" do - resource[:source] = ':ext:source@example.com:/foo/bar' - resource[:revision] = 'an-unimportant-value' - expects_chdir('/tmp') - provider.expects(:cvs).with('-d', resource.value(:source), 'checkout', '-r', 'an-unimportant-value', '-d', 'test', 'bar') - provider.create - end - - it "should just execute 'cvs checkout' without a revision" do - resource[:source] = ':ext:source@example.com:/foo/bar' - resource.delete(:revision) - provider.expects(:cvs).with('-d', resource.value(:source), 'checkout', '-d', File.basename(resource.value(:path)), File.basename(resource.value(:source))) - provider.create - end - - context "with a compression" do - it "should just execute 'cvs checkout' without a revision" do - resource[:source] = ':ext:source@example.com:/foo/bar' - resource[:compression] = '3' - resource.delete(:revision) - provider.expects(:cvs).with('-d', resource.value(:source), '-z', '3', 'checkout', '-d', File.basename(resource.value(:path)), File.basename(resource.value(:source))) - provider.create - end - end - end - - context "when a source is not given" do - it "should execute 'cvs init'" do - resource.delete(:source) - provider.expects(:cvs).with('-d', resource.value(:path), 'init') - provider.create - end - end - end - - describe 'destroying' do - it "it should remove the directory" do - provider.destroy - end - end - - describe "checking existence" do - it "should check for the CVS directory with source" do - resource[:source] = ':ext:source@example.com:/foo/bar' - File.expects(:directory?).with(File.join(resource.value(:path), 'CVS')) - provider.exists? - end - - it "should check for the CVSROOT directory without source" do - resource.delete(:source) - File.expects(:directory?).with(File.join(resource.value(:path), 'CVSROOT')) - provider.exists? - end - end - - describe "checking the revision property" do - before do - @tag_file = File.join(resource.value(:path), 'CVS', 'Tag') - end - - context "when CVS/Tag exists" do - before do - @tag = 'TAG' - File.expects(:exist?).with(@tag_file).returns(true) - end - it "should read CVS/Tag" do - File.expects(:read).with(@tag_file).returns("T#{@tag}") - provider.revision.should == @tag - end - end - - context "when CVS/Tag does not exist" do - before do - File.expects(:exist?).with(@tag_file).returns(false) - end - it "assumes HEAD" do - provider.revision.should == 'HEAD' - end - end - end - - describe "when setting the revision property" do - before do - @tag = 'SOMETAG' - end - - it "should use 'cvs update -dr'" do - expects_chdir - provider.expects(:cvs).with('update', '-dr', @tag, '.') - provider.revision = @tag - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/git_spec.rb deleted file mode 100644 index 15fee53565..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/git_spec.rb +++ /dev/null @@ -1,369 +0,0 @@ -require 'spec_helper' - -describe Puppet::Type.type(:vcsrepo).provider(:git_provider) do - - let(:resource) { Puppet::Type.type(:vcsrepo).new({ - :name => 'test', - :ensure => :present, - :provider => :git, - :revision => '2634', - :source => 'git@repo', - :path => '/tmp/test', - })} - - let(:provider) { resource.provider } - - before :each do - Puppet::Util.stubs(:which).with('git').returns('/usr/bin/git') - end - - context 'creating' do - context "with a revision that is a remote branch" do - it "should execute 'git clone' and 'git checkout -b'" do - resource[:revision] = 'only/remote' - Dir.expects(:chdir).with('/').at_least_once.yields - Dir.expects(:chdir).with('/tmp/test').at_least_once.yields - provider.expects(:git).with('clone', resource.value(:source), resource.value(:path)) - provider.expects(:update_submodules) - provider.expects(:git).with('branch', '-a').returns(resource.value(:revision)) - provider.expects(:git).with('checkout', '--force', resource.value(:revision)) - provider.create - end - end - - context "with a revision that is not a remote branch" do - it "should execute 'git clone' and 'git reset --hard'" do - resource[:revision] = 'a-commit-or-tag' - Dir.expects(:chdir).with('/').at_least_once.yields - Dir.expects(:chdir).with('/tmp/test').at_least_once.yields - provider.expects(:git).with('clone', resource.value(:source), resource.value(:path)) - provider.expects(:update_submodules) - provider.expects(:git).with('branch', '-a').returns(resource.value(:revision)) - provider.expects(:git).with('checkout', '--force', resource.value(:revision)) - provider.create - end - - it "should execute 'git clone' and submodule commands" do - resource.delete(:revision) - provider.expects(:git).with('clone', resource.value(:source), resource.value(:path)) - provider.expects(:update_submodules) - provider.create - end - end - - context "with an ensure of bare" do - context "with revision" do - it "should just execute 'git clone --bare'" do - resource[:ensure] = :bare - provider.expects(:git).with('clone', '--bare', resource.value(:source), resource.value(:path)) - provider.create - end - end - context "without revision" do - it "should just execute 'git clone --bare'" do - resource[:ensure] = :bare - resource.delete(:revision) - provider.expects(:git).with('clone', '--bare', resource.value(:source), resource.value(:path)) - provider.create - end - end - end - - context "when a source is not given" do - context "when the path does not exist" do - it "should execute 'git init'" do - resource[:ensure] = :present - resource.delete(:source) - expects_mkdir - expects_chdir - expects_directory?(false) - - provider.expects(:bare_exists?).returns(false) - provider.expects(:git).with('init') - provider.create - end - end - - context "when the path is a bare repository" do - it "should convert it to a working copy" do - resource[:ensure] = :present - resource.delete(:source) - provider.expects(:bare_exists?).returns(true) - provider.expects(:convert_bare_to_working_copy) - provider.create - end - end - - context "when the path is not empty and not a repository" do - it "should raise an exception" do - provider.expects(:path_exists?).returns(true) - provider.expects(:path_empty?).returns(false) - proc { provider.create }.should raise_error(Puppet::Error) - end - end - end - - context "when the path does not exist" do - it "should execute 'git init --bare'" do - resource[:ensure] = :bare - resource.delete(:source) - expects_chdir - expects_mkdir - expects_directory?(false) - provider.expects(:working_copy_exists?).returns(false) - provider.expects(:git).with('init', '--bare') - provider.create - end - end - - context "when the path is a working copy repository" do - it "should convert it to a bare repository" do - resource[:ensure] = :bare - resource.delete(:source) - provider.expects(:working_copy_exists?).returns(true) - provider.expects(:convert_working_copy_to_bare) - provider.create - end - end - - context "when the path is not empty and not a repository" do - it "should raise an exception" do - expects_directory?(true) - provider.expects(:path_empty?).returns(false) - proc { provider.create }.should raise_error(Puppet::Error) - end - end - end - - - context 'destroying' do - it "it should remove the directory" do - #expects_rm_rf - provider.destroy - end - end - - context "checking the revision property" do - before do - expects_chdir('/tmp/test') - resource[:revision] = 'currentsha' - resource.delete(:source) - provider.expects(:git).with('rev-parse', 'HEAD').returns('currentsha') - end - - context "when its SHA is not different than the current SHA" do - it "should return the ref" do - provider.expects(:git).with('config', 'remote.origin.url').returns('') - provider.expects(:git).with('fetch', 'origin') # FIXME - provider.expects(:git).with('fetch', '--tags', 'origin') - provider.expects(:git).with('rev-parse', '--revs-only', resource.value(:revision)).returns('currentsha') - provider.expects(:git).with('tag', '-l').returns("Hello") - provider.revision.should == resource.value(:revision) - end - end - - context "when its SHA is different than the current SHA" do - it "should return the current SHA" do - provider.expects(:git).with('config', 'remote.origin.url').returns('') - provider.expects(:git).with('fetch', 'origin') # FIXME - provider.expects(:git).with('fetch', '--tags', 'origin') - provider.expects(:git).with('rev-parse', '--revs-only', resource.value(:revision)).returns('othersha') - provider.expects(:git).with('tag', '-l').returns("Hello") - provider.revision.should == 'currentsha' - end - end - - context "when its a ref to a remote head" do - it "should return the revision" do - provider.expects(:git).with('config', 'remote.origin.url').returns('') - provider.expects(:git).with('fetch', 'origin') # FIXME - provider.expects(:git).with('fetch', '--tags', 'origin') - provider.expects(:git).with('tag', '-l').returns("Hello") - provider.expects(:git).with('rev-parse', '--revs-only', resource.value(:revision)).returns('') - provider.expects(:git).with('ls-remote', '--heads', '--tags', 'origin', resource.value(:revision)).returns("newsha refs/heads/#{resource.value(:revision)}") - provider.revision.should == 'currentsha' - end - end - - context "when its a ref to non existant remote head" do - it "should fail" do - provider.expects(:git).with('config', 'remote.origin.url').returns('') - provider.expects(:git).with('fetch', 'origin') # FIXME - provider.expects(:git).with('fetch', '--tags', 'origin') - provider.expects(:git).with('tag', '-l').returns("Hello") - provider.expects(:git).with('rev-parse', '--revs-only', resource.value(:revision)).returns('') - provider.expects(:git).with('ls-remote', '--heads', '--tags', 'origin', resource.value(:revision)).returns('') - expect { provider.revision }.to raise_error(Puppet::Error, /not a local or remote ref$/) - end - end - - context "when the source is modified" do - it "should update the origin url" do - resource[:source] = 'git://git@foo.com/bar.git' - provider.expects(:git).with('config', 'remote.origin.url').returns('old') - provider.expects(:git).with('config', 'remote.origin.url', 'git://git@foo.com/bar.git') - provider.expects(:git).with('fetch', 'origin') # FIXME - provider.expects(:git).with('fetch', '--tags', 'origin') - provider.expects(:git).with('rev-parse', '--revs-only', resource.value(:revision)).returns('currentsha') - provider.expects(:git).with('tag', '-l').returns("Hello") - provider.revision.should == resource.value(:revision) - end - end - end - - context "setting the revision property" do - before do - expects_chdir - end - context "when it's an existing local branch" do - it "should use 'git fetch' and 'git reset'" do - resource[:revision] = 'feature/foo' - provider.expects(:update_submodules) - provider.expects(:git).with('branch', '-a').returns(resource.value(:revision)) - provider.expects(:git).with('checkout', '--force', resource.value(:revision)) - provider.expects(:git).with('branch', '-a').returns(resource.value(:revision)) - provider.expects(:git).with('reset', '--hard', "origin/#{resource.value(:revision)}") - provider.revision = resource.value(:revision) - end - end - context "when it's a remote branch" do - it "should use 'git fetch' and 'git reset'" do - resource[:revision] = 'only/remote' - provider.expects(:update_submodules) - provider.expects(:git).with('branch', '-a').returns(resource.value(:revision)) - provider.expects(:git).with('checkout', '--force', resource.value(:revision)) - provider.expects(:git).with('branch', '-a').returns(resource.value(:revision)) - provider.expects(:git).with('reset', '--hard', "origin/#{resource.value(:revision)}") - provider.revision = resource.value(:revision) - end - end - context "when it's a commit or tag" do - it "should use 'git fetch' and 'git reset'" do - resource[:revision] = 'a-commit-or-tag' - provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a)) - provider.expects(:git).with('checkout', '--force', resource.value(:revision)) - provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a)) - provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a)) - provider.expects(:git).with('submodule', 'update', '--init', '--recursive') - provider.revision = resource.value(:revision) - end - end - end - - context "updating references" do - it "should use 'git fetch --tags'" do - resource.delete(:source) - expects_chdir - provider.expects(:git).with('config', 'remote.origin.url').returns('') - provider.expects(:git).with('fetch', 'origin') - provider.expects(:git).with('fetch', '--tags', 'origin') - provider.update_references - end - end - - context "checking if revision" do - before do - expects_chdir - provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a)) - end - context "is a local branch" do - context "when it's listed in 'git branch -a'" do - it "should return true" do - resource[:revision] = 'feature/foo' - provider.should be_local_branch_revision - end - end - context "when it's not listed in 'git branch -a'" do - it "should return false" do - resource[:revision] = 'feature/notexist' - provider.should_not be_local_branch_revision - end - end - end - context "is a remote branch" do - context "when it's listed in 'git branch -a' with an 'origin/' prefix" do - it "should return true" do - resource[:revision] = 'only/remote' - provider.should be_remote_branch_revision - end - end - context "when it's not listed in 'git branch -a' with an 'origin/' prefix" do - it "should return false" do - resource[:revision] = 'only/local' - provider.should_not be_remote_branch_revision - end - end - end - end - - describe 'latest?' do - before do - expects_chdir('/tmp/test') - end - context 'when true' do - it do - provider.expects(:revision).returns('testrev') - provider.expects(:latest).returns('testrev') - provider.latest?.should be_true - end - end - context 'when false' do - it do - provider.expects(:revision).returns('master') - provider.expects(:latest).returns('testrev') - provider.latest?.should be_false - end - end - end - - describe 'latest' do - before do - provider.expects(:get_revision).returns('master') - expects_chdir - end - context 'on master' do - it do - provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_a)) - provider.latest.should == 'master' - end - end - context 'no branch' do - it do - provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_none)) - provider.latest.should == 'master' - end - end - context 'feature/bar' do - it do - provider.expects(:git).with('branch', '-a').returns(fixture(:git_branch_feature_bar)) - provider.latest.should == 'master' - end - end - end - - describe 'convert_working_copy_to_bare' do - it do - FileUtils.expects(:mv).returns(true) - FileUtils.expects(:rm_rf).returns(true) - FileUtils.expects(:mv).returns(true) - - provider.instance_eval { convert_working_copy_to_bare } - end - end - - describe 'convert_bare_to_working_copy' do - it do - FileUtils.expects(:mv).returns(true) - FileUtils.expects(:mkdir).returns(true) - FileUtils.expects(:mv).returns(true) - provider.expects(:commits_in?).returns(true) - # If you forget to stub these out you lose 3 hours of rspec work. - provider.expects(:reset).with('HEAD').returns(true) - provider.expects(:git_with_identity).returns(true) - provider.expects(:update_owner_and_excludes).returns(true) - - provider.instance_eval { convert_bare_to_working_copy } - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/hg_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/hg_spec.rb deleted file mode 100644 index 7fd53486a7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/hg_spec.rb +++ /dev/null @@ -1,122 +0,0 @@ -require 'spec_helper' - -describe Puppet::Type.type(:vcsrepo).provider(:hg) do - - let(:resource) { Puppet::Type.type(:vcsrepo).new({ - :name => 'test', - :ensure => :present, - :provider => :hg, - :path => '/tmp/vcsrepo', - })} - - let(:provider) { resource.provider } - - before :each do - Puppet::Util.stubs(:which).with('hg').returns('/usr/bin/hg') - end - - describe 'creating' do - context 'with source and revision' do - it "should execute 'hg clone -u' with the revision" do - resource[:source] = 'something' - resource[:revision] = '1' - provider.expects(:hg).with('clone', '-u', - resource.value(:revision), - resource.value(:source), - resource.value(:path)) - provider.create - end - end - - context 'without revision' do - it "should just execute 'hg clone' without a revision" do - resource[:source] = 'something' - provider.expects(:hg).with('clone', resource.value(:source), resource.value(:path)) - provider.create - end - end - - context "when a source is not given" do - it "should execute 'hg init'" do - provider.expects(:hg).with('init', resource.value(:path)) - provider.create - end - end - end - - describe 'destroying' do - it "it should remove the directory" do - expects_rm_rf - provider.destroy - end - end - - describe "checking existence" do - it "should check for the directory" do - expects_directory?(true, File.join(resource.value(:path), '.hg')) - provider.exists? - end - end - - describe "checking the revision property" do - before do - expects_chdir - end - - context "when given a non-SHA as the resource revision" do - before do - provider.expects(:hg).with('parents').returns(fixture(:hg_parents)) - provider.expects(:hg).with('tags').returns(fixture(:hg_tags)) - end - - context "when its SHA is not different than the current SHA" do - it "should return the ref" do - resource[:revision] = '0.6' - provider.revision.should == '0.6' - end - end - - context "when its SHA is different than the current SHA" do - it "should return the current SHA" do - resource[:revision] = '0.5.3' - provider.revision.should == '34e6012c783a' - end - end - end - context "when given a SHA as the resource revision" do - before do - provider.expects(:hg).with('parents').returns(fixture(:hg_parents)) - end - - context "when it is the same as the current SHA", :resource => {:revision => '34e6012c783a'} do - it "should return it" do - resource[:revision] = '34e6012c783a' - provider.expects(:hg).with('tags').returns(fixture(:hg_tags)) - provider.revision.should == resource.value(:revision) - end - end - - context "when it is not the same as the current SHA", :resource => {:revision => 'not-the-same'} do - it "should return the current SHA" do - resource[:revision] = 'not-the-same' - provider.expects(:hg).with('tags').returns(fixture(:hg_tags)) - provider.revision.should == '34e6012c783a' - end - end - end - end - - describe "setting the revision property" do - before do - @revision = '6aa99e9b3ab1' - end - it "should use 'hg update ---clean -r'" do - expects_chdir - provider.expects(:hg).with('pull') - provider.expects(:hg).with('merge') - provider.expects(:hg).with('update', '--clean', '-r', @revision) - provider.revision = @revision - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/svn_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/svn_spec.rb deleted file mode 100644 index f44e314a56..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/svn_spec.rb +++ /dev/null @@ -1,105 +0,0 @@ -require 'spec_helper' - -describe Puppet::Type.type(:vcsrepo).provider(:svn) do - - let(:resource) { Puppet::Type.type(:vcsrepo).new({ - :name => 'test', - :ensure => :present, - :provider => :svn, - :path => '/tmp/vcsrepo', - })} - - let(:provider) { resource.provider } - - before :each do - Puppet::Util.stubs(:which).with('git').returns('/usr/bin/git') - end - - describe 'creating' do - context 'with source and revision' do - it "should execute 'svn checkout' with a revision" do - resource[:source] = 'exists' - resource[:revision] = '1' - provider.expects(:svn).with('--non-interactive', 'checkout', '-r', - resource.value(:revision), - resource.value(:source), - resource.value(:path)) - provider.create - end - end - context 'with source' do - it "should just execute 'svn checkout' without a revision" do - resource[:source] = 'exists' - provider.expects(:svn).with('--non-interactive', 'checkout', - resource.value(:source), - resource.value(:path)) - provider.create - end - end - - context 'with fstype' do - it "should execute 'svnadmin create' with an '--fs-type' option" do - resource[:fstype] = 'ext4' - provider.expects(:svnadmin).with('create', '--fs-type', - resource.value(:fstype), - resource.value(:path)) - provider.create - end - end - context 'without fstype' do - it "should execute 'svnadmin create' without an '--fs-type' option" do - provider.expects(:svnadmin).with('create', resource.value(:path)) - provider.create - end - end - end - - describe 'destroying' do - it "it should remove the directory" do - expects_rm_rf - provider.destroy - end - end - - describe "checking existence" do - it "should check for the directory" do - expects_directory?(true, resource.value(:path)) - expects_directory?(true, File.join(resource.value(:path), '.svn')) - provider.exists? - end - end - - describe "checking the revision property" do - before do - provider.expects(:svn).with('--non-interactive', 'info').returns(fixture(:svn_info)) - end - it "should use 'svn info'" do - expects_chdir - provider.revision.should == '4' # From 'Revision', not 'Last Changed Rev' - end - end - - describe "setting the revision property" do - before do - @revision = '30' - end - it "should use 'svn update'" do - expects_chdir - provider.expects(:svn).with('--non-interactive', 'update', '-r', @revision) - provider.revision = @revision - end - end - - describe "setting the revision property and repo source" do - before do - @revision = '30' - end - it "should use 'svn switch'" do - resource[:source] = 'an-unimportant-value' - expects_chdir - provider.expects(:svn).with('--non-interactive', 'switch', '-r', @revision, 'an-unimportant-value') - provider.revision = @revision - end - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/type/README.markdown b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/type/README.markdown deleted file mode 100644 index 1ee19ac840..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/type/README.markdown +++ /dev/null @@ -1,4 +0,0 @@ -Resource Type Specs -=================== - -Define specs for your resource types in this directory. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.fixtures.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.fixtures.yml deleted file mode 100644 index bb90cc1488..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.fixtures.yml +++ /dev/null @@ -1,10 +0,0 @@ -fixtures: - repositories: - "puppi": "git://github.com/example42/puppi.git" - "monitor": "git://github.com/example42/puppet-monitor.git" - "firewall": "git://github.com/example42/puppet-firewall.git" - "iptables": "git://github.com/example42/puppet-iptables.git" - "concat": "git://github.com/example42/puppet-concat.git" - symlinks: - "yum": "#{source_dir}" - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.gemfile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.gemfile deleted file mode 100644 index 49ea04a491..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.gemfile +++ /dev/null @@ -1,7 +0,0 @@ -source :rubygems - -puppetversion = ENV['PUPPET_VERSION'] -gem 'puppet', puppetversion, :require => false -gem 'puppet-lint' -gem 'puppetlabs_spec_helper', '>= 0.1.0' -gem 'rspec-puppet', '0.1.6' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.project b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.project deleted file mode 100644 index 13cd06f922..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - yum - - - - - - com.puppetlabs.geppetto.pp.dsl.ui.modulefileBuilder - - - - - org.eclipse.xtext.ui.shared.xtextBuilder - - - - - - com.puppetlabs.geppetto.pp.dsl.ui.puppetNature - org.eclipse.xtext.ui.shared.xtextNature - - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.travis.yml b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.travis.yml deleted file mode 100644 index dffeca9874..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: ruby -rvm: - - 1.8.7 - - 1.9.3 -script: - - "rake spec SPEC_OPTS='--format documentation'" -env: - - PUPPET_VERSION="~> 2.6.0" - - PUPPET_VERSION="~> 2.7.0" - - PUPPET_VERSION="~> 3.0.0" - - PUPPET_VERSION="~> 3.1.0" -matrix: - exclude: - - rvm: 1.9.3 - env: PUPPET_VERSION="~> 2.6.0" - gemfile: .gemfile - -gemfile: .gemfile -notifications: - email: - - al@lab42.it diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/LICENSE b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/LICENSE deleted file mode 100644 index f41da01857..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/LICENSE +++ /dev/null @@ -1,17 +0,0 @@ -Copyright (C) 2013 Alessandro Franceschi / Lab42 - -for the relevant commits Copyright (C) by the respective authors. - -Contact Lab42 at: info@lab42.it - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/Modulefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/Modulefile deleted file mode 100644 index 69820b86e0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/Modulefile +++ /dev/null @@ -1,9 +0,0 @@ -name 'example42-yum' -version '2.1.9' -author 'Alessandro Franceschi' -license 'Apache2' -project_page 'http://www.example42.com' -source 'https://github.com/example42/puppet-yum' -summary 'Puppet module for nagios' -description 'This module installs and manages yum and yum repositories' -dependency 'example42/puppi', '>= 2.0.0' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/README.md b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/README.md deleted file mode 100644 index cb254401bf..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/README.md +++ /dev/null @@ -1,132 +0,0 @@ -# Puppet module: yum - -This is a Puppet module that manages Yum repositories for Centos RedHat and Scientific Linux - -Made by Alessandro Franceschi / Lab42 - -Inspired by the Yum Immerda module: https://git.puppet.immerda.ch - -Official site: http://www.example42.com - -Official git repository: http://github.com/example42/puppet-yum - -Released under the terms of Apache 2 License. - -This module requires functions provided by the Example42 Puppi module. - -## USAGE - -* Just leave the default options: Automatic detection of Operating System (RedHat, Centos, Scientific supported) Epel repo installation, keeping of local yum files, automatic updates disabled. - - class { 'yum': - } - -* Enable automatic updates via cron (updatesd is supported only on 5) - - class { 'yum': - update => 'cron', - } - - -* Purge local /etc/yum.repos.d/ and enforce its contents only via a custom source - - class { 'yum': - source_repo_dir => 'puppet:///modules/example42/yum/conf/', - clean_repos => true, - } - -* Enable EPEL and PuppetLabs repos - - class { 'yum': - extrarepo => [ 'epel' , 'puppetlabs' ], - } - - -* Do not include any extra repo (By default EPEL is added) - - class { 'yum': - extrarepo => '' , - } - -* Automatically copy in /etc/pki/rpm-gpg all the rpm-gpg keys known by the yum module (this was the "old" and intrusive behaviour, now each rpm-gpg key may be individually provided by the yum::manages_repos' gpgkey_source parameter) - - class { 'yum': - install_all_keys => true , - } - -* Include a selected extra repo - - include yum::repo::puppetlabs - - -## USAGE - Overrides and Customizations -* Enable auditing without without making changes on existing yum configuration files - - class { 'yum': - audit_only => true - } - - -* Use custom sources for main config file - - class { 'yum': - source => [ "puppet:///modules/lab42/yum/yum.conf-${hostname}" , "puppet:///modules/lab42/yum/yum.conf" ], - } - - -* Use custom source directory for the whole configuration dir - - class { 'yum': - source_dir => 'puppet:///modules/lab42/yum/conf/', - source_dir_purge => false, # Set to true to purge any existing file not present in $source_dir - } - -* Use custom template for main config file. Note that template and source arguments are alternative. - - class { 'yum': - template => 'example42/yum/yum.conf.erb', - } - -* Automatically include a custom subclass - - class { 'yum': - my_class => 'yum::example42', - } - - -## USAGE - Example42 extensions management -* Activate puppi (recommended, but disabled by default) - - class { 'yum': - puppi => true, - } - -* Activate puppi and use a custom puppi_helper template (to be provided separately with a puppi::helper define ) to customize the output of puppi commands - - class { 'yum': - puppi => true, - puppi_helper => 'myhelper', - } - - -## OPERATING SYSTEMS SUPPORT - -REDHAT 6 - Full - -REDHAT 5 - Full - -REDHAT 4 - Partial - -CENTOS 6 - Full - -CENTOS 5 - Full - -CENTOS 4 - Partial - -SCIENTIFIC 6 - Full - -SCIENTIFIC 5 - Full - -AMAZON LINUX 3 (Sigh) - Partial - -[![Build Status](https://travis-ci.org/example42/puppet-yum.png?branch=master)](https://travis-ci.org/example42/puppet-yum) diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/Rakefile b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/Rakefile deleted file mode 100644 index f0d1465cdc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/Rakefile +++ /dev/null @@ -1,5 +0,0 @@ -require 'rubygems' -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' -PuppetLint.configuration.send('disable_80chars') -PuppetLint.configuration.send('disable_class_parameter_defaults') diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-CentOS-6 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-CentOS-6 deleted file mode 100644 index bd863d8e21..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-CentOS-6 +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQINBE4P06MBEACqn48FZgYkG2QrtUAVDV58H6LpDYEcTcv4CIFSkgs6dJ9TavCW -NyPBZRpM2R+Rg5eVqlborp7TmktBP/sSsxc8eJ+3P2aQWSWc5ol74Y0OznJUCrBr -bIdypJllsD9Fe+h7gLBXTh3vdBEWr2lR+xA+Oou8UlO2gFbVFQqMafUgU1s0vqaE -/hHH0TzwD0/tJ6eqIbHwVR/Bu6kHFK4PwePovhfvyYD9Y+C0vOYd5Ict2vbLHz1f -QBDZObv4M6KN3j7nzme47hKtdMd+LwFqxM5cXfM6b5doDulWPmuGV78VoX6OR7el -x1tlfpuiFeuXYnImm5nTawArcQ1UkXUSYcTUKShJebRDLR3BycxR39Q9jtbOQ29R -FumHginovEhdUcinRr22eRXgcmzpR00zFIWoFCwHh/OCtG14nFhefuZ8Z80qbVhW -2J9+/O4tksv9HtQBmQNOK5S8C4HNF2M8AfOWNTr8esFSDc0YA5/cxzdfOOtWam/w -lBpNcUUSSgddRsBwijPuWhVA3NmA/uQlJtAo4Ji5vo8cj5MTPG3+U+rfNqRxu1Yc -ioXRo4LzggPscaTZX6V24n0fzw0J2k7TT4sX007k+7YXwEMqmHpcMYbDNzdCzUer -Zilh5hihJwvGfdi234W3GofttoO+jaAZjic7a3p6cO1ICMgfVqrbZCUQVQARAQAB -tEZDZW50T1MtNiBLZXkgKENlbnRPUyA2IE9mZmljaWFsIFNpZ25pbmcgS2V5KSA8 -Y2VudG9zLTYta2V5QGNlbnRvcy5vcmc+iQI8BBMBAgAmBQJOD9OjAhsDBQkSzAMA -BgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQCUb8osEFud6ajRAAnb6d+w6Y/v/d -MSy7UEy4rNquArix8xhqBwwjoGXpa37OqTvvcJrftZ1XgtzmTbkqXc+9EFch0C+w -ST10f+H0SPTUGuPwqLkg27snUkDAv1B8laub+l2L9erzCaRriH8MnFyxt5v1rqWA -mVlRymzgXK+EQDr+XOgMm1CvxVY3OwdjdoHNox4TdVQWlZl83xdLXBxkd5IRciNm -sg5fJAzAMeg8YsoDee3m4khg9gEm+/Rj5io8Gfk0nhQpgGGeS1HEXl5jzTb44zQW -qudkfcLEdUMOECbu7IC5Z1wrcj559qcp9C94IwQQO+LxLwg4kHffvZjCaOXDRiya -h8KGsEDuiqwjU9HgGq9fa0Ceo3OyUazUi+WnOxBLVIQ8cUZJJ2Ia5PDnEsz59kCp -JmBZaYPxUEteMtG3yDTa8c8jUnJtMPpkwpSkeMBeNr/rEH4YcBoxuFjppHzQpJ7G -hZRbOfY8w97TgJbfDElwTX0/xX9ypsmBezgGoOvOkzP9iCy9YUBc9q/SNnflRWPO -sMVrjec0vc6ffthu2xBdigBXhL7x2bphWzTXf2T067k+JOdoh5EGney6LhQzcp8m -YCTENStCR+L/5XwrvNgRBnoXe4e0ZHet1CcCuBCBvSmsPHp5ml21ahsephnHx+rl -JNGtzulnNP07RyfzQcpCNFH7W4lXzqM= -=jrWY ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-EPEL b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-EPEL deleted file mode 100644 index 7a2030489d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-EPEL +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 -JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B -M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn -XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 -pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV -QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp -Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq -3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu -vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar -1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g -YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB -tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS -KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9 -qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT -9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP -Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS -WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft -HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF -p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP -x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8 -wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J -l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG -iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR -XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== -=V/6I ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-RBEL b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-RBEL deleted file mode 100644 index 152fd79900..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-RBEL +++ /dev/null @@ -1,36 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.14 (GNU/Linux) - -mQGiBEZ6qawRBAC2gDuA1sZioGh1VP/U0l+9RmzOdkWBGB3NfWqezAwt1Up+cP5o -h+UNkghOKbJVQ/zLyY/edYOppQ78yxT1X/J1RHNhs5bjqzWlQxMbT5/tt1N4PExu -gvO38RGFTV0DqIy3lQw5YIwp2le+G8MktYh2NKI4lG0AJoXZicNlI7+mEwCgmfw+ -CnsB/kb/xUD1dq6Mo3dYXVcEAKSFfqt+6jvJNxcIYfpQqjEslQsQmPKpXzK9CPyV -UCjUEOirbhPxV86u3Ge/yuy5USMvTTs+ztImabbH6UHBEP+tEw3LiuPUpfh+nEna -3Hz+U81PvUwGEwUMzCr+OemBXqGW7jl66NqKqm8YM3Pkvc4NlS/7slky9A/s6i8S -hToWA/9kP55aSbIXte5TbC88lx6YuLx7qW541ni38DmJfPN5hHywLGnM82MMQMbk -hg1v49+7TTNv44LJpGT7t8gsW9F4Z4rWoChhsldypeeqbDOIv4kFiXt/8122Ud9J -nE67CR9XUuS5Jp+gP6xxNr9/vbvqsOGMJAQkVgkBPVuKYv25gLQ3U2VyZ2lvIFJ1 -YmlvIChGcmFtZU9TIERldmVsb3BlcnMpIDxydWJpb2pyQGZyYW1lb3Mub3JnPohr -BBMRAgArAhsDBQkGE0x0BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCTBs76AIZ -AQAKCRCOw9dP80W+dFhjAJ0dKy761iPcG+ALwEAuAgxDpUVBzgCdFxGCAZ7ELYvf -3uFc0Ou2ihDzvyy0IFNlcmdpbyBSdWJpbyA8c2VyZ2lvQHJ1YmlvLm5hbWU+iGYE -ExECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUJBhNMdAUCTBs7XgAKCRCO -w9dP80W+dDdtAJ9NYoW1ChfMyES7nQUlesEQ4aWXjQCeIoGxoOuIGyg6+AKr/2Wr -6fE1zt2IaQQTEQIAKQIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAhkBBQJIHsGo -BQkCuHFEAAoJEI7D10/zRb50KjgAnRTzzNIODKqrHnrHaUG8dWDCwmYjAJ48Hbcn -ZC6E8LGTeM8vPN0mMI9ijLkCDQRGeqm2EAgAh720kjA9bNDms+6agb6CirD9RkmZ -3G+OHd5iia3KbaUiBtC3PECg4UE8N54JuBNKdjgJQfdYSg2J0EZHyhZHdAVWjykE -tj/IKZKnAfUqKh44uT9OUPW8PChPo/gioLn+DexSAW7n19h7VIa1P3shYqYR/gz8 -zgfrXkFFpkpKnOLsXuF20JEEBIBdwrfYRJIBrUTYrfS/2GKLJjyutENkb9uI3JgQ -LfR6DckTaar4eeArjgvOxZRHiU0vRezetlbG8ZM9mSYrcMM3Xa5vLpFlDj6vYzat -RWEuZUfLgXWUVoVyFiNVXhpff/w7/bAb3WpXqjZd6sK8CCJJPNtnbLE7CwADBQf9 -EQjT9iiEZis35V9HqeLsxXVjPOGNuLiwjIpacI7CM3aGV1q7NXiCE4oWS/PvpHmu -W+XdXMPH4Bt2VmjZSarlAipTeNnOuiEXipUFIjAlNn1xNVRRd7T35zIvXLtmNtUe -nN1/mqZljKPbCbW1AgktH417t/vJfTnRWr9IgS3Am+o4q200i+1FjrQ/UI3s9+vg -5B+KASFP6HspNttl0kwzQ6SFIHAebd4DKHOj6ShxXPNl18W4R8qPqayrAFqdkgMJ -Jn8j2E8rmGYnssSfjck2kLtvNdTEAMjFnhg+oUapUzJAVeterudiWZFNrtn9ewnf -8SUiiYJlxb+nz545zo0gQIhJBBgRAgAJBQJGeqm2AhsMAAoJEI7D10/zRb50PJEA -mwTA+Sp3wvzwDr8sk7W7U4bBfw26AKCVoYw3mfTime+j3mFk1yk1yxjE2Q== -=iyOs ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-beta b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-beta deleted file mode 100644 index b86da23906..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-beta +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEWfBuERBACrwDH+6QvpyaOgzhXiemsIX+q4HlhX/HDmrmZOUd7i9VmZNogP -6LRRiTygn2+UphaGV3NDA36ZB/1JRpgvgpzbpZNeAoFvsljIbxGIwkH2JgRF6oNo -eGB3QYzDQJvYVIejk79M0ed3oor4w8OiNVcdxLyVIthFrjrrCqwRP3bLZwCgtY9t -Ezf5WL63Ue45vdht7A2GH+0D/iNAnWKsU7FUMFZrcwMaMbyP7YG8z0+zXUOgtgyP -tbgJG5yikNT3vJypb42gbKfcriUUDC5AeiRmkR8QPvYuOm34rM90+wx2LGqXWnHM -IyLAyl8TS3MQmePem8bfTGTNYxtt3Q7iadez2WYTLBSlmM6hbxZfdwm1hhyM0AJU -YyFUA/9kHH+CUBxKb1UgG7TSp53Po/5p/Yyuty+RJ7zIGv6SiN/JK4/ntWfm5WS5 -ZprSdE5ODoFQ/Gs3/VB/eolg2fBW1DcftH6lKHT3GKEOaicGX+T9eOMerZZedm5U -vDA9mFvWnOdOxK8LuRgVqip4jCnWICchpatmdP0whJQHQ6MGLLRMQ2VudE9TLTUg -QmV0YSBLZXkgKENlbnRPUyA1IEJldGEgU2lnbmluZyBLZXkpIDxjZW50b3MtNS1i -ZXRhLWtleUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwbhAhsDBQkSzAMABgsJCAcD -AgMVAgMDFgIBAh4BAheAAAoJEM/aaIEJLXsrWDkAoKcqa+AAdAWvp5qlJkGQiRy8 -aNFDAJ4qRfIxMiLinmjbqcuygWMp61wY5ohMBBMRAgAMBQJFnwhtBYMSzAF0AAoJ -EDjCFhY5bKCkG/wAn14LDlJqjZv1Wz0WNfhr80+qJrf6AKCaIZExwo4ApQpESk/F -SApLd/pEILkBDQRFnwbrEAQAwKzjI2aTB/sS9HuQ4CHCwrj4vr0HxMMwQikYBIvy -MYTtek04KDTKoJL5g3411DsfDW9VRGJdFCHvldgam/5UVfO6nywLkdwAA5TQA5dv -8YE8jTtwdy5Y1QKFc8LaIBZK0+ZbhEvdNfv67egvfcxZc5PvpBZ3C03n+iQ3wPcg -PhcAAwUD/iYkq4LG/je43Qa5rTz5kF5rIiX7Bk5vXT7XSFOFKwHy8V+PGEoVM1W8 -+EHIlmTycwIlsVp3by6qCDkMYu4V6VukxZNzJyeoMICiYIXUPh6NKHRoqaYlu6ZO -eFN1TQNXmodPk+iNtdbcby/zAklNqoO/dWSwd8NAo8s6WAHq3VPpiE8EGBECAA8F -AkWfBusCGwwFCRLMAwAACgkQz9pogQkteysXkACgoraCU0EBC+W8TuxrsePO20ma -D0IAoLRRQLTEXL0p3K0WE+LfyTr9EVG5 -=mH0S ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-kbsingh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-kbsingh deleted file mode 100644 index f8c688e5f4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-kbsingh +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEIu6hwRBACOz2JFa1nW+seAKlVGOu0ykhdFVNI9E4/Abp2+8nsJIZyUwLAp -ei76rPD8WdptgIjtYOCsqz1TbP+eqeEG0LLihOdFRLUuAjQX4X7LLf5Qm+nvUB73 -uLbSf9Ptps2CMUEtu7+0wVoTbuC19HXUhUr5sRdCnJbPJBH6aAHG7Pl9ZwCguN9o -V7IKTnIQiZg0nxSjZ4V9e6UD/R7KoMwH3NPQQF7T7rJaBjSZcVHUPhAcNPNn+ms/ -Tw9mzHZ0mnQnOzSEW0ZUj9TkLN52VQ3WmGZKAv9yeVr0/230YIgmtH863lSystmk -LNO9brK0+3vKg5GRpV0/MSWSmf39WPAS1hXNXIFfYp1eGHUfed4FVNxrMTWHQozr -8JosA/wP+zGfM51bSAazLUqP/MEm7F9OFkuD7Sw97w55FyYlrPp1FQWrWczoiKHr -wS5NRCQbCGEEM/+j9id6CukxPLXxwMYCfeg5K0HxMaQT6hxbwjOzAzN3PBFytNel -09qdrdoSDa35twT0SAt+rzM+zvRI8ycizFG3lIih4UItWWve2bQ6S2FyYW5iaXIg -U2luZ2ggKGh0dHA6Ly93d3cua2FyYW4ub3JnLykgPGtic2luZ2hAa2FyYW4ub3Jn -PoheBBMRAgAeBQJCLuocAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEDANvZ4+ -E89b/P4AnjufrDCS+TAEL0KpkYDURePbDCHBAJ4+0iI1Td4YrcnLwmQ1+XDCJ3Zr -a7kBDQRCLuocEAQAjAl48FM9eGtP6M9FgswlSPAuCcJct6wOHmd/qZ923HckJPAD -zIFRMlM6H8P0bKoaIluv7agZM7Gsf8NeTg3NEeMKqnibIAyvjYeSkceRIwvBCQ3A -YwWk+B2zLUAFMxnE31oA10zjCKUo7Dc6XDUxSY/qdLymZzyG/Ndav+vMOVsAAwUD -/RCFDuW/GSM/s3DO7XxrOBRTGQmf9v9tCYdZZD615+s8ghaa5oZTvp1cbTTWiSq8 -ybncfjVHz9HezDgQjJsFZtrYd4w2JD+7K0+8sZ+BUGo1dDSv4UgN8ACtaGJnShiq -s8pQWRZFqFa3waay8oUSTKHiTHdpxLi3x4HhK/8MTsxniEkEGBECAAkFAkIu6hwC -GwwACgkQMA29nj4Tz1tHSgCcDgKL4swEu7ShvI8nZt2JLmTKB5QAn0qZi2zbexbi -DX+bbalHM+xVnXZN -=rZT6 ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-remi b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-remi deleted file mode 100644 index 3283386064..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-remi +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.7 (GNU/Linux) - -mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 -/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA -/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L -0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh -dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp -AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B -Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY -iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD -1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs -ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI -BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ -MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj -C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 -HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa -o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw -CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv -JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK -8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i -gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== -=6Rbg ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-rpmforge-dag deleted file mode 100644 index 8ee27f45b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-rpmforge-dag +++ /dev/null @@ -1,32 +0,0 @@ -The following public key can be used to verify RPM packages -downloaded from http://dag.wieers.com/apt/ using 'rpm -K' -if you have the GNU GPG package. -Questions about this key should be sent to: -Dag Wieers - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.1 (GNU/Linux) - -mQGiBD9JMT0RBAC9Q2B0AloUMTxaK73sD0cOu1MMdD8yuDagbMlDtUYA1aGeJVO6 -TV02JLGr67OBY+UkYuC1c3PUwmb3+jakZd5bW1L8E2L705wS0129xQOZPz6J+alF -5rTzVkiefg8ch1yEcMayK20NdyOmhDGXQXNQS8OJFLTIC6bJs+7MZL83/wCg3cG3 -3q7MWHm3IpJb+6QKpB9YH58D/2WjPDK+7YIky/JbFBT4JPgTSBy611+bLqHA6PXq -39tzY6un8KDznAMNtm+NAsr6FEG8PHe406+tbgd7tBkecz3HPX8nR5v0JtDT+gzN -8fM3kAiAzjCHUAFWVAMAZLr5TXuoq4lGTTxvZbwTjZfyjCm7gIieCu8+qnPWh6hm -30NgA/0ZyEHG6I4rOWqPks4vZuD+wlp5XL8moBXEKfEVOMh2MCNDRGnvVHu1P3eD -oHOooVMt9sWrGcgxpYuupPNL4Uf6B6smiLlH6D4tEg+qCxC17zABI5572XJTJ170 -JklZJrPGtnkPrrKMamnN9MU4RjGmjh9JZPa7rKjZHyWP/z/CBrQ1RGFnIFdpZWVy -cyAoRGFnIEFwdCBSZXBvc2l0b3J5IHYxLjApIDxkYWdAd2llZXJzLmNvbT6IWQQT -EQIAGQUCP0kxPQQLBwMCAxUCAwMWAgECHgECF4AACgkQog5SFGuNeeYvDQCeKHST -hIq/WzFBXtJOnQkJGSqAoHoAnRtsJVWYmzYKHqzkRx1qAzL18Sd0iEYEEBECAAYF -Aj9JMWAACgkQoj2iXPqnmevnOACfRQaageMcESHVE1+RSuP3txPUvoEAoJAtOHon -g+3SzVNSZLn/g7/Ljfw+uQENBD9JMT8QBACj1QzRptL6hbpWl5DdQ2T+3ekEjJGt -llCwt4Mwt/yOHDhzLe8SzUNyYxTXUL4TPfFvVW9/j8WOkNGvffbs7g84k7a5h/+l -IJTTlP9V9NruDt1dlrBe+mWF6eCY55OFHjb6nOIkcJwKxRd3nGlWnLsz0ce9Hjrg -6lMrn0lPsMV6swADBQP9H42sss6mlqnJEFA97Fl3V9s+7UVJoAIA5uSVXxEOwVoh -Vq7uECQRvWzif6tzOY+vHkUxOBRvD6oIU6tlmuG3WByKyA1d0MTqMr3eWieSYf/L -n5VA9NuD7NwjFA1kLkoDwfSbsF51LppTMkUggzwgvwE46MB6yyuqAVI1kReAWw+I -RgQYEQIABgUCP0kxPwAKCRCiDlIUa4155oktAKDAzm9QYbDpk6SrQhkSFy016BjE -BACeJU1hpElFnUZCL4yKj4EuLnlo8kc= -=mqUt ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-webtatic-andy b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-webtatic-andy deleted file mode 100644 index 317b802b56..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-webtatic-andy +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQGiBE1e+1MRBAD8j+KyOIpGNRN39gNy2E/1HG4ZoLFuxIOxI5/1FEuZB/GjYF5m -DvJerZukd0QCqCs72J6J+uWnfD/52t2XWTw4IHPpCWeyr9TWex3uOYmrYzY+0l0l -qsCsrhT0XGkAE0+/20oEP2+t/d+1q0yRcYZRwWK/ME2rUUX0jOa/B3Bc6wCg3blw -XdZNrv1wVNd1PCOUI79k0V0D+wfbybos8Cmdv2f8dD746fSR/hmp4SzpBDmPRRQu -0gtJAKI6ycTdotGq5zHfZj76kDQBudeIgdbWtqfckP2lK47i8lIENAyC4MK8dxh9 -Ts+b1LqXlbcPyixzImf4qoT5DT1lSEUPwoMRX8W/29GAcvnZpOwQ8g7DNmRBpFFY -8U2GBADz6uEeP3YwJAuL7pi77AalxR0WQAADMR59pGltQdXaZvANXoioU0W519Pb -nl3gKWDiTuwUDrwaSPoBbNLyX4s0AE7/0HSG02/eRjLB8toQpAH9xkK/u2WPe/do -erZg5yg1qhoCbEM7kJ2I/GBl6VbPedt2ORdsC4ZTWTnZJh6tYLQhQW5keSBUaG9t -cHNvbiA8YW5keUB3ZWJ0YXRpYy5jb20+iGAEExECACAFAk1e+1MCGwMGCwkIBwMC -BBUCCAMEFgIDAQIeAQIXgAAKCRC3Q0sGz0xP+TA0AJwJf5ZPeub8v+5CtZwdcZhV -LU0sjgCgrP3y54heBjF1vhZQ3rJywTmRLHe5Ag0ETV77UxAIAIQPLVFbqheJ90Kf -NF8TYt3ZIMpP5chw25OYq4tuZMzVJxKjUlM7KPQxUKquY/F9WpjH980LmICTb4Fz -txzn2bshIsGyg8pDUSnVK0NPY5uaq9bK4oht8wkr3FNFT2FpeqDIJyn+phIuEpIi -qt1LJyzzjobh9csaaGmNHvtrlkIggBj2n/ZQuGNhcYnKUZ/WGmkItCTSOfA++G+C -dCo1aPEymfbnJvaLB/mLyzA+r/r7LQM10cZEtqh5JdclJEh3CzZmx9HsRxCDZF8W -X/C4MmCwmIxmuU4vkVNhHFTQimQEUR8vg9ltiz8+xBjyE1Iav4MxfOYh3xjdJk1d -zlovyUcAAwUH/2KPgf0UQ1o+4IjOYinEEbNlrD1pKw5anUKwaaeQi0vm/oRG0E2F -ZCJ73OHxW/0hMrwbrGwXcm4NBARnAppg+/CecOVpkBgD5hrM+11DPhxdd1bjjfza -Pq8GmPp8SSsiTPUCoSlzojxL3Z05RNbvKVzxzxbYdx5h5XOTflI7bAHTY4AzGSDf -WaFljjCucht/d7u5empAd02haldUXWjT9RvY5RwnRZ+hjI47e+wUA0FMLHYtA1/0 -cwEIvpp2xwF/jpH3ODmnIGEeNoLyzAV7X0KAlSN8VRsh7igZRB9TRGI67aTjRgk8 -ayf/QNxAzwEk1MeDv67IFKNYVolxHCt4CtqISQQYEQIACQUCTV77UwIbDAAKCRC3 -Q0sGz0xP+dPiAKDUNJ5rkB9CRoMH9BC35d0fqXXeugCgwl/HYv52dWgatbyEGLet -etv5Qeg= -=nIAo ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY.atrpms b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY.atrpms deleted file mode 100644 index 860ace4d24..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY.atrpms +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.6 (GNU/Linux) - -mQGiBD5gtCgRBACKIvjMF+20r9k/Uw2Hq6Y/qn1nM0AZEFalhglXP5pMm5bMgkcI -1vCWqJxSbhQhk8hSEenoszes8hyUxHj4hFFUDiRtAxOpCpGCsCnUddgQtHAQd+tm -aQsM6J3Jm/EZPtwR0lvwvRGvz2x6Rr95G8+42KK9x+mBYhLk0y3gAbBzhwCgnkDH -a97MGBT7gRLrmtFqiHrWlPkD/2tBaH6IEuoJhcAbNj9MukbhDOYJ6ic9Nzf6sR3t -ZG+XgQLLS2DNy8+HWcYJOjpJDEe8zWFDdUv3cL1D0U2f2e85FuJaMucHn+816iw8 -mNjZXJEoDE4LJ8Vv53fkevNZpdWmO2VtRwI+woDnIHYHukDLj2sWhVt+5W+uOKAE -OippA/9OzuWrwBtTR+Np8ApZGkxhxU1z0iEStV+kQNqJE7YoR4SGMuzEa3bFzrPx -k4qIU+rw4YgFgHrs1x08lXxNOZkq6avvbl60HqN2qF2UQL/YdU+5X3ixaJVaYYk8 -yuK+hp0Hx2DdBWmVhq6rEzIfpnFhF4qspwMWEiiBGjYDL62W7LQ0QVRycG1zLm5l -dCAocnBtIHNpZ25pbmcga2V5KSA8QXhlbC5UaGltbUBBVHJwbXMubmV0PohnBBMR -AgAnAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAhkBBQJFfF9PBQkJGI4nAAoJEFCM -5eZmU0wrJ0IAnA0BdyRlq2S8ess55R8YMFnWAWXEAJ9Fa7cEHku4j4B83shCODps -+DYUZohnBBMRAgAnAhsDBQkDdMLsBgsJCAcDAgMVAgMDFgIBAh4BAheABQJAKteu -AhkBAAoJEFCM5eZmU0wrMMUAnRjS2PXQp0tsC/69IGMMxqU+8xeAAJ9XQjVAo+mU -kg/3AeBlMBIlFe5hDQ== -=23Fz ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RubyWorks.GPG.key b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RubyWorks.GPG.key deleted file mode 100644 index b91a5a8876..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RubyWorks.GPG.key +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEY5QQ0RBACfC1NbAdGFMOS/Y7P9hmNph2Wh3TJTh6IZpL+lTJBuZSEa6rp0 -CghS/yU3gGXUPaxAy91M7PXMv5p7S3U/SusZHATLhFdU5J4LuWMf4IiBy9FOB/aj -Q1s5vZ/i3YFaqolXsRP8TgIu4Lzp/j3+KAxFb3gF7lz64J/Et2Jil0OQzwCgkn9i -SoPEM6d9SCFOidhUuTHUhM0D/3UXl/FKPVFrFzjslFpaN9NgArRrmXKTOBWEqMLy -12pbTzOtv+p17Ot51q4h0ebEWrmVJ/h/7Is6QT6AKHuOIW+1/88fcSrmef//0Scz -wtEwVudkYA+kOGt1pwhapVYf1lWE9Z6L3V/MVdxXUesylGO6jJjOjpUB+ZBItwl7 -exkhA/4iemhq4D5Jp6r1Kv3aKSPNENdhTORyfZz4UfyOsUfYncaprP5IZja0j+rd -tQLIsH8hXvCT2kSAUY6nMGmzPgpgGamtHI6gH1ZmoNX2gEF7tzGNgKMbbUmwO89B -N56U7wm68AreXE8XviRjGjAtZWnouqe5X+EiUurdJkzRwU0c2rQpVGhvdWdodFdv -cmtzIDxydWJ5d29ya3NAdGhvdWdodHdvcmtzLmNvbT6IYAQTEQIAIAUCRjlBDQIb -AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEHM/KlUQbeB0SSYAn0sgAx5ZK975 -wZiChkIqOCyFZ9PLAJ9laivkzqT2y+Kh9FGe3TP/CAhRTbkCDQRGOUEVEAgAqxJI -MFrYV3JKyeXHVKXHNd5Nf1WdqKi37VOdSTBftiehzZdR9hxkGEknYxnbBLGJR9YD -/uJ2+DRwNBcw2RrrEmb0DCZxcLQLZ3xYa7+WvcR4/Nir/3858SGJ+wmGCHKyX2So -M2TurmKu5bqyUUaBgf+IhKfwOr9zeK3rIRhUq/aiYkw8sWA8ruUvxXwLnbkK1aP9 -hfvSqScwjkfUVk6CQ6GFUD+4N4mNRtRcZz3gYa+0jSNeEJZQOJxRuE/gBHav3eyN -dm4VAFPF20BobvBVEcMhO0KaR/X4jW1G1eFAKLxI7cdx3+vLeNPaFwHiSMSknsNs -UiucI9oV+I5S/50ZrwADBwf/StYTK9KvPnY9ZqmirBpSh0Zl0xylMtAiMblG7pKv -qKTPNr9zXooheQBpAbnhOfju0DB/OtE4V21HqnbMws2aFvHecEbO5EmjwT7ZTltH -5vlbiPrXOc7SpP22FdkOYdunM2+nsA6398mpYFEiFFNAzX6pReN2tbbmXf6zxS9n -nHjMAgl5nMuOASLZrTrUX/7yu6ySS1hy0ZVfEoAFeILy4MV8y0lVjBQa2kNOCNpO -Cc+y1+4EHLS3fuN0x+tho3rhjKAzj8KOt4XnALn8OouRMx9G7ItC2U8kNzHHFRg5 -adT/+nEthVd9q9pYLrUaze7aMQyl+7cD1KzmSe34X9B6W4hJBBgRAgAJBQJGOUEV -AhsMAAoJEHM/KlUQbeB0O7QAn09h4qrKPhWD9eaiyMRS5YeARTYgAJ9WxLcQEvkA -yOSLb33CweehCrlTnQ== -=scSy ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.4/rpm-gpg/RPM-GPG-KEY-EPEL b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.4/rpm-gpg/RPM-GPG-KEY-EPEL deleted file mode 100644 index 5a13bb4f9f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.4/rpm-gpg/RPM-GPG-KEY-EPEL +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF -l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/ -QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/ -lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk -/RTaZ8Kr1mTosVtosqmdIAA2XHxi8ZLiVPPSezJjfElsSqOAxEKPL0djfpp2wrTm -l/1iVnX+PZH5DRKCbjdCMLDJhYap7YUhcPsMGSeUKrwmBCBJUPc6DhjFvyhA9IMl -1T0+A/9SKTv94ToP/JYoCTHTgnG5MoVNafisfe0wojP2mWU4gRk8X4dNGKMj6lic -vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ6Ob8cTR2T12Fmv9w03DD3MnBstR6vhP -QcqZKhc5SJYYY7oVfxlSOfF4xfwcHQKoD5TOKwIAQ6T8jyFpKbQkRmVkb3JhIEVQ -RUwgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iGQEExECACQFAkXopTICGwMFCRLM -AwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQEZzANiF1IfabmQCgzvE60MnHSOBa -ZXXF7uU2Vzu8EOkAoKg9h+j0NuNom6WUYZyJQt4zc5seuQINBEXopTYQCADapnR/ -blrJ8FhlgNPl0X9S3JE/kygPbNXIqne4XBVYisVp0uzNCRUxNZq30MpY027JCs2J -nL2fMpwvx33f0phU029vrIZKA3CmnnwVsjcWfMJOVPBmVN7m5bGU68F+PdRIcDsl -PMOWRLkTBZOGolLgIbM4719fqA8etewILrX6uPvRDwywV7/sPCFpRcfNNBUY+Zx3 -5bf4fnkaCKxgXgQS3AT+hGYhlzIqQVTkGNveHTnt4SSzgAqR9sSwQwqvEfVtYNeS -w5rDguLG41HQm1Hojv59HNYjH6F/S1rClZi21bLgZbKpCFX76qPt8CTw+iQLBPPd -yoOGHfzyp7nsfhUrAAMFB/9/H9Gpk822ZpBexQW4y3LGFo9ZSnmu+ueOZPU3SqDA -DW1ovZdYzGuJTGGM9oMl6bL8eZrcUBBOFaWge5wZczIE3hx2exEOkDdvq+MUDVD1 -axmN45q/7h1NYRp5GQL2ZsoV4g9U2gMdzHOFtZCER6PP9ErVlfJpgBUCdSL93V4H -Sgpkk7znmTOklbCM6l/G/A6q4sCRqfzHwVSTiruyTBiU9lfROsAl8fjIq2OzWJ2T -P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24 -0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC -GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY -bbsLFWOfmzAnNIGvFRWy+YHi -=MMNL ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-CentOS-5 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-CentOS-5 deleted file mode 100644 index 2627d31d8f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-CentOS-5 +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEWfB6MRBACrnYW6yKMT+MwJlCIhoyTxGf3mAxmnAiDEy6HcYN8rivssVTJk -CFtQBlBOpLV/OW2YtKrCO2xHn46eNfnMri8FGT8g+9JF3MUVi7kiV1He4iJynHXB -+F2ZqIvHf3IaUj1ys+p8TK64FDFxDQDrGQfIsD/+pkSGx53/877IrvdwjwCguQcr -Ioip5TH0Fj0OLUY4asYVZH8EAIqFHEqsY+9ziP+2R3/FyxSllKkjwcMLrBug+cYO -LYDD6eQXE9Mq8XKGFDj9ZB/0+JzK/XQeStheeFG75q3noq5oCPVFO4czuKErIRAB -qKbDBhaTj3JhOgM12XsUYn+rI6NeMV2ZogoQCC2tWmDETfRpYp2moo53NuFWHbAy -XjETA/sHEeQT9huHzdi/lebNBj0L8nBGfLN1nSRP1GtvagBvkR4RZ6DTQyl0UzOJ -RA3ywWlrL9IV9mrpb1Fmn60l2jTMMCc7J6LacmPK906N+FcN/Docj1M4s/4CNanQ -NhzcFhAFtQL56SNyLTCk1XzhssGZ/jwGnNbU/aaj4wOj0Uef5LRGQ2VudE9TLTUg -S2V5IChDZW50T1MgNSBPZmZpY2lhbCBTaWduaW5nIEtleSkgPGNlbnRvcy01LWtl -eUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwekAhsDBQkSzAMABgsJCAcDAgMVAgMD -FgIBAh4BAheAAAoJEKikR9zoViiXKlEAmwSoZDvZo+WChcg3s/SpNoWCKhMAAJwI -E2aXpZVrpsQnInUQWwkdrTiL5YhMBBMRAgAMBQJFnwiSBYMSzAIRAAoJEDjCFhY5 -bKCk0hAAn134bIx3wSbq58E6P6U5RT7Z2Zx4AJ9VxnVkoGHkVIgSdsxHUgRjo27N -F7kBDQRFnwezEAQA/HnJ5yiozwgtf6jt+kii8iua+WnjqBKomPHOQ8moxbWdv5Ks -4e1DPhzRqxhshjmub4SuJ93sgMSAF2ayC9t51mSJV33KfzPF2gIahcMqfABe/2hJ -aMzcQZHrGJCEX6ek8l8SFKou7vICzyajRSIK8gxWKBuQknP/9LKsoczV+xsAAwUD -/idXPkk4vRRHsCwc6I23fdI0ur52bzEqHiAIswNfO521YgLk2W1xyCLc2aYjc8Ni -nrMX1tCnEx0/gK7ICyJoWH1Vc7//79sWFtX2EaTO+Q07xjFX4E66WxJlCo9lOjos -Vk5qc7R+xzLDoLGFtbzaTRQFzf6yr7QTu+BebWLoPwNTiE8EGBECAA8FAkWfB7MC -GwwFCRLMAwAACgkQqKRH3OhWKJfvvACfbsF1WK193zM7vSc4uq51XsceLwgAoI0/ -9GxdNhGQEAweSlQfhPa3yYXH -=o/Mx ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-EPEL b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-EPEL deleted file mode 100644 index 5a13bb4f9f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-EPEL +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF -l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/ -QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/ -lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk -/RTaZ8Kr1mTosVtosqmdIAA2XHxi8ZLiVPPSezJjfElsSqOAxEKPL0djfpp2wrTm -l/1iVnX+PZH5DRKCbjdCMLDJhYap7YUhcPsMGSeUKrwmBCBJUPc6DhjFvyhA9IMl -1T0+A/9SKTv94ToP/JYoCTHTgnG5MoVNafisfe0wojP2mWU4gRk8X4dNGKMj6lic -vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ6Ob8cTR2T12Fmv9w03DD3MnBstR6vhP -QcqZKhc5SJYYY7oVfxlSOfF4xfwcHQKoD5TOKwIAQ6T8jyFpKbQkRmVkb3JhIEVQ -RUwgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iGQEExECACQFAkXopTICGwMFCRLM -AwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQEZzANiF1IfabmQCgzvE60MnHSOBa -ZXXF7uU2Vzu8EOkAoKg9h+j0NuNom6WUYZyJQt4zc5seuQINBEXopTYQCADapnR/ -blrJ8FhlgNPl0X9S3JE/kygPbNXIqne4XBVYisVp0uzNCRUxNZq30MpY027JCs2J -nL2fMpwvx33f0phU029vrIZKA3CmnnwVsjcWfMJOVPBmVN7m5bGU68F+PdRIcDsl -PMOWRLkTBZOGolLgIbM4719fqA8etewILrX6uPvRDwywV7/sPCFpRcfNNBUY+Zx3 -5bf4fnkaCKxgXgQS3AT+hGYhlzIqQVTkGNveHTnt4SSzgAqR9sSwQwqvEfVtYNeS -w5rDguLG41HQm1Hojv59HNYjH6F/S1rClZi21bLgZbKpCFX76qPt8CTw+iQLBPPd -yoOGHfzyp7nsfhUrAAMFB/9/H9Gpk822ZpBexQW4y3LGFo9ZSnmu+ueOZPU3SqDA -DW1ovZdYzGuJTGGM9oMl6bL8eZrcUBBOFaWge5wZczIE3hx2exEOkDdvq+MUDVD1 -axmN45q/7h1NYRp5GQL2ZsoV4g9U2gMdzHOFtZCER6PP9ErVlfJpgBUCdSL93V4H -Sgpkk7znmTOklbCM6l/G/A6q4sCRqfzHwVSTiruyTBiU9lfROsAl8fjIq2OzWJ2T -P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24 -0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC -GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY -bbsLFWOfmzAnNIGvFRWy+YHi -=MMNL ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-RBEL b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-RBEL deleted file mode 100644 index 152fd79900..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-RBEL +++ /dev/null @@ -1,36 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.14 (GNU/Linux) - -mQGiBEZ6qawRBAC2gDuA1sZioGh1VP/U0l+9RmzOdkWBGB3NfWqezAwt1Up+cP5o -h+UNkghOKbJVQ/zLyY/edYOppQ78yxT1X/J1RHNhs5bjqzWlQxMbT5/tt1N4PExu -gvO38RGFTV0DqIy3lQw5YIwp2le+G8MktYh2NKI4lG0AJoXZicNlI7+mEwCgmfw+ -CnsB/kb/xUD1dq6Mo3dYXVcEAKSFfqt+6jvJNxcIYfpQqjEslQsQmPKpXzK9CPyV -UCjUEOirbhPxV86u3Ge/yuy5USMvTTs+ztImabbH6UHBEP+tEw3LiuPUpfh+nEna -3Hz+U81PvUwGEwUMzCr+OemBXqGW7jl66NqKqm8YM3Pkvc4NlS/7slky9A/s6i8S -hToWA/9kP55aSbIXte5TbC88lx6YuLx7qW541ni38DmJfPN5hHywLGnM82MMQMbk -hg1v49+7TTNv44LJpGT7t8gsW9F4Z4rWoChhsldypeeqbDOIv4kFiXt/8122Ud9J -nE67CR9XUuS5Jp+gP6xxNr9/vbvqsOGMJAQkVgkBPVuKYv25gLQ3U2VyZ2lvIFJ1 -YmlvIChGcmFtZU9TIERldmVsb3BlcnMpIDxydWJpb2pyQGZyYW1lb3Mub3JnPohr -BBMRAgArAhsDBQkGE0x0BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCTBs76AIZ -AQAKCRCOw9dP80W+dFhjAJ0dKy761iPcG+ALwEAuAgxDpUVBzgCdFxGCAZ7ELYvf -3uFc0Ou2ihDzvyy0IFNlcmdpbyBSdWJpbyA8c2VyZ2lvQHJ1YmlvLm5hbWU+iGYE -ExECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUJBhNMdAUCTBs7XgAKCRCO -w9dP80W+dDdtAJ9NYoW1ChfMyES7nQUlesEQ4aWXjQCeIoGxoOuIGyg6+AKr/2Wr -6fE1zt2IaQQTEQIAKQIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAhkBBQJIHsGo -BQkCuHFEAAoJEI7D10/zRb50KjgAnRTzzNIODKqrHnrHaUG8dWDCwmYjAJ48Hbcn -ZC6E8LGTeM8vPN0mMI9ijLkCDQRGeqm2EAgAh720kjA9bNDms+6agb6CirD9RkmZ -3G+OHd5iia3KbaUiBtC3PECg4UE8N54JuBNKdjgJQfdYSg2J0EZHyhZHdAVWjykE -tj/IKZKnAfUqKh44uT9OUPW8PChPo/gioLn+DexSAW7n19h7VIa1P3shYqYR/gz8 -zgfrXkFFpkpKnOLsXuF20JEEBIBdwrfYRJIBrUTYrfS/2GKLJjyutENkb9uI3JgQ -LfR6DckTaar4eeArjgvOxZRHiU0vRezetlbG8ZM9mSYrcMM3Xa5vLpFlDj6vYzat -RWEuZUfLgXWUVoVyFiNVXhpff/w7/bAb3WpXqjZd6sK8CCJJPNtnbLE7CwADBQf9 -EQjT9iiEZis35V9HqeLsxXVjPOGNuLiwjIpacI7CM3aGV1q7NXiCE4oWS/PvpHmu -W+XdXMPH4Bt2VmjZSarlAipTeNnOuiEXipUFIjAlNn1xNVRRd7T35zIvXLtmNtUe -nN1/mqZljKPbCbW1AgktH417t/vJfTnRWr9IgS3Am+o4q200i+1FjrQ/UI3s9+vg -5B+KASFP6HspNttl0kwzQ6SFIHAebd4DKHOj6ShxXPNl18W4R8qPqayrAFqdkgMJ -Jn8j2E8rmGYnssSfjck2kLtvNdTEAMjFnhg+oUapUzJAVeterudiWZFNrtn9ewnf -8SUiiYJlxb+nz545zo0gQIhJBBgRAgAJBQJGeqm2AhsMAAoJEI7D10/zRb50PJEA -mwTA+Sp3wvzwDr8sk7W7U4bBfw26AKCVoYw3mfTime+j3mFk1yk1yxjE2Q== -=iyOs ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-beta b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-beta deleted file mode 100644 index b86da23906..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-beta +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEWfBuERBACrwDH+6QvpyaOgzhXiemsIX+q4HlhX/HDmrmZOUd7i9VmZNogP -6LRRiTygn2+UphaGV3NDA36ZB/1JRpgvgpzbpZNeAoFvsljIbxGIwkH2JgRF6oNo -eGB3QYzDQJvYVIejk79M0ed3oor4w8OiNVcdxLyVIthFrjrrCqwRP3bLZwCgtY9t -Ezf5WL63Ue45vdht7A2GH+0D/iNAnWKsU7FUMFZrcwMaMbyP7YG8z0+zXUOgtgyP -tbgJG5yikNT3vJypb42gbKfcriUUDC5AeiRmkR8QPvYuOm34rM90+wx2LGqXWnHM -IyLAyl8TS3MQmePem8bfTGTNYxtt3Q7iadez2WYTLBSlmM6hbxZfdwm1hhyM0AJU -YyFUA/9kHH+CUBxKb1UgG7TSp53Po/5p/Yyuty+RJ7zIGv6SiN/JK4/ntWfm5WS5 -ZprSdE5ODoFQ/Gs3/VB/eolg2fBW1DcftH6lKHT3GKEOaicGX+T9eOMerZZedm5U -vDA9mFvWnOdOxK8LuRgVqip4jCnWICchpatmdP0whJQHQ6MGLLRMQ2VudE9TLTUg -QmV0YSBLZXkgKENlbnRPUyA1IEJldGEgU2lnbmluZyBLZXkpIDxjZW50b3MtNS1i -ZXRhLWtleUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwbhAhsDBQkSzAMABgsJCAcD -AgMVAgMDFgIBAh4BAheAAAoJEM/aaIEJLXsrWDkAoKcqa+AAdAWvp5qlJkGQiRy8 -aNFDAJ4qRfIxMiLinmjbqcuygWMp61wY5ohMBBMRAgAMBQJFnwhtBYMSzAF0AAoJ -EDjCFhY5bKCkG/wAn14LDlJqjZv1Wz0WNfhr80+qJrf6AKCaIZExwo4ApQpESk/F -SApLd/pEILkBDQRFnwbrEAQAwKzjI2aTB/sS9HuQ4CHCwrj4vr0HxMMwQikYBIvy -MYTtek04KDTKoJL5g3411DsfDW9VRGJdFCHvldgam/5UVfO6nywLkdwAA5TQA5dv -8YE8jTtwdy5Y1QKFc8LaIBZK0+ZbhEvdNfv67egvfcxZc5PvpBZ3C03n+iQ3wPcg -PhcAAwUD/iYkq4LG/je43Qa5rTz5kF5rIiX7Bk5vXT7XSFOFKwHy8V+PGEoVM1W8 -+EHIlmTycwIlsVp3by6qCDkMYu4V6VukxZNzJyeoMICiYIXUPh6NKHRoqaYlu6ZO -eFN1TQNXmodPk+iNtdbcby/zAklNqoO/dWSwd8NAo8s6WAHq3VPpiE8EGBECAA8F -AkWfBusCGwwFCRLMAwAACgkQz9pogQkteysXkACgoraCU0EBC+W8TuxrsePO20ma -D0IAoLRRQLTEXL0p3K0WE+LfyTr9EVG5 -=mH0S ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-kbsingh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-kbsingh deleted file mode 100644 index f8c688e5f4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-kbsingh +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEIu6hwRBACOz2JFa1nW+seAKlVGOu0ykhdFVNI9E4/Abp2+8nsJIZyUwLAp -ei76rPD8WdptgIjtYOCsqz1TbP+eqeEG0LLihOdFRLUuAjQX4X7LLf5Qm+nvUB73 -uLbSf9Ptps2CMUEtu7+0wVoTbuC19HXUhUr5sRdCnJbPJBH6aAHG7Pl9ZwCguN9o -V7IKTnIQiZg0nxSjZ4V9e6UD/R7KoMwH3NPQQF7T7rJaBjSZcVHUPhAcNPNn+ms/ -Tw9mzHZ0mnQnOzSEW0ZUj9TkLN52VQ3WmGZKAv9yeVr0/230YIgmtH863lSystmk -LNO9brK0+3vKg5GRpV0/MSWSmf39WPAS1hXNXIFfYp1eGHUfed4FVNxrMTWHQozr -8JosA/wP+zGfM51bSAazLUqP/MEm7F9OFkuD7Sw97w55FyYlrPp1FQWrWczoiKHr -wS5NRCQbCGEEM/+j9id6CukxPLXxwMYCfeg5K0HxMaQT6hxbwjOzAzN3PBFytNel -09qdrdoSDa35twT0SAt+rzM+zvRI8ycizFG3lIih4UItWWve2bQ6S2FyYW5iaXIg -U2luZ2ggKGh0dHA6Ly93d3cua2FyYW4ub3JnLykgPGtic2luZ2hAa2FyYW4ub3Jn -PoheBBMRAgAeBQJCLuocAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEDANvZ4+ -E89b/P4AnjufrDCS+TAEL0KpkYDURePbDCHBAJ4+0iI1Td4YrcnLwmQ1+XDCJ3Zr -a7kBDQRCLuocEAQAjAl48FM9eGtP6M9FgswlSPAuCcJct6wOHmd/qZ923HckJPAD -zIFRMlM6H8P0bKoaIluv7agZM7Gsf8NeTg3NEeMKqnibIAyvjYeSkceRIwvBCQ3A -YwWk+B2zLUAFMxnE31oA10zjCKUo7Dc6XDUxSY/qdLymZzyG/Ndav+vMOVsAAwUD -/RCFDuW/GSM/s3DO7XxrOBRTGQmf9v9tCYdZZD615+s8ghaa5oZTvp1cbTTWiSq8 -ybncfjVHz9HezDgQjJsFZtrYd4w2JD+7K0+8sZ+BUGo1dDSv4UgN8ACtaGJnShiq -s8pQWRZFqFa3waay8oUSTKHiTHdpxLi3x4HhK/8MTsxniEkEGBECAAkFAkIu6hwC -GwwACgkQMA29nj4Tz1tHSgCcDgKL4swEu7ShvI8nZt2JLmTKB5QAn0qZi2zbexbi -DX+bbalHM+xVnXZN -=rZT6 ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-remi b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-remi deleted file mode 100644 index 3283386064..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-remi +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.7 (GNU/Linux) - -mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 -/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA -/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L -0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh -dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp -AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B -Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY -iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD -1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs -ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI -BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ -MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj -C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 -HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa -o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw -CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv -JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK -8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i -gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== -=6Rbg ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-rpmforge-dag deleted file mode 100644 index 8ee27f45b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-rpmforge-dag +++ /dev/null @@ -1,32 +0,0 @@ -The following public key can be used to verify RPM packages -downloaded from http://dag.wieers.com/apt/ using 'rpm -K' -if you have the GNU GPG package. -Questions about this key should be sent to: -Dag Wieers - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.1 (GNU/Linux) - -mQGiBD9JMT0RBAC9Q2B0AloUMTxaK73sD0cOu1MMdD8yuDagbMlDtUYA1aGeJVO6 -TV02JLGr67OBY+UkYuC1c3PUwmb3+jakZd5bW1L8E2L705wS0129xQOZPz6J+alF -5rTzVkiefg8ch1yEcMayK20NdyOmhDGXQXNQS8OJFLTIC6bJs+7MZL83/wCg3cG3 -3q7MWHm3IpJb+6QKpB9YH58D/2WjPDK+7YIky/JbFBT4JPgTSBy611+bLqHA6PXq -39tzY6un8KDznAMNtm+NAsr6FEG8PHe406+tbgd7tBkecz3HPX8nR5v0JtDT+gzN -8fM3kAiAzjCHUAFWVAMAZLr5TXuoq4lGTTxvZbwTjZfyjCm7gIieCu8+qnPWh6hm -30NgA/0ZyEHG6I4rOWqPks4vZuD+wlp5XL8moBXEKfEVOMh2MCNDRGnvVHu1P3eD -oHOooVMt9sWrGcgxpYuupPNL4Uf6B6smiLlH6D4tEg+qCxC17zABI5572XJTJ170 -JklZJrPGtnkPrrKMamnN9MU4RjGmjh9JZPa7rKjZHyWP/z/CBrQ1RGFnIFdpZWVy -cyAoRGFnIEFwdCBSZXBvc2l0b3J5IHYxLjApIDxkYWdAd2llZXJzLmNvbT6IWQQT -EQIAGQUCP0kxPQQLBwMCAxUCAwMWAgECHgECF4AACgkQog5SFGuNeeYvDQCeKHST -hIq/WzFBXtJOnQkJGSqAoHoAnRtsJVWYmzYKHqzkRx1qAzL18Sd0iEYEEBECAAYF -Aj9JMWAACgkQoj2iXPqnmevnOACfRQaageMcESHVE1+RSuP3txPUvoEAoJAtOHon -g+3SzVNSZLn/g7/Ljfw+uQENBD9JMT8QBACj1QzRptL6hbpWl5DdQ2T+3ekEjJGt -llCwt4Mwt/yOHDhzLe8SzUNyYxTXUL4TPfFvVW9/j8WOkNGvffbs7g84k7a5h/+l -IJTTlP9V9NruDt1dlrBe+mWF6eCY55OFHjb6nOIkcJwKxRd3nGlWnLsz0ce9Hjrg -6lMrn0lPsMV6swADBQP9H42sss6mlqnJEFA97Fl3V9s+7UVJoAIA5uSVXxEOwVoh -Vq7uECQRvWzif6tzOY+vHkUxOBRvD6oIU6tlmuG3WByKyA1d0MTqMr3eWieSYf/L -n5VA9NuD7NwjFA1kLkoDwfSbsF51LppTMkUggzwgvwE46MB6yyuqAVI1kReAWw+I -RgQYEQIABgUCP0kxPwAKCRCiDlIUa4155oktAKDAzm9QYbDpk6SrQhkSFy016BjE -BACeJU1hpElFnUZCL4yKj4EuLnlo8kc= -=mqUt ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-webtatic-andy b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-webtatic-andy deleted file mode 100644 index 317b802b56..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-webtatic-andy +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQGiBE1e+1MRBAD8j+KyOIpGNRN39gNy2E/1HG4ZoLFuxIOxI5/1FEuZB/GjYF5m -DvJerZukd0QCqCs72J6J+uWnfD/52t2XWTw4IHPpCWeyr9TWex3uOYmrYzY+0l0l -qsCsrhT0XGkAE0+/20oEP2+t/d+1q0yRcYZRwWK/ME2rUUX0jOa/B3Bc6wCg3blw -XdZNrv1wVNd1PCOUI79k0V0D+wfbybos8Cmdv2f8dD746fSR/hmp4SzpBDmPRRQu -0gtJAKI6ycTdotGq5zHfZj76kDQBudeIgdbWtqfckP2lK47i8lIENAyC4MK8dxh9 -Ts+b1LqXlbcPyixzImf4qoT5DT1lSEUPwoMRX8W/29GAcvnZpOwQ8g7DNmRBpFFY -8U2GBADz6uEeP3YwJAuL7pi77AalxR0WQAADMR59pGltQdXaZvANXoioU0W519Pb -nl3gKWDiTuwUDrwaSPoBbNLyX4s0AE7/0HSG02/eRjLB8toQpAH9xkK/u2WPe/do -erZg5yg1qhoCbEM7kJ2I/GBl6VbPedt2ORdsC4ZTWTnZJh6tYLQhQW5keSBUaG9t -cHNvbiA8YW5keUB3ZWJ0YXRpYy5jb20+iGAEExECACAFAk1e+1MCGwMGCwkIBwMC -BBUCCAMEFgIDAQIeAQIXgAAKCRC3Q0sGz0xP+TA0AJwJf5ZPeub8v+5CtZwdcZhV -LU0sjgCgrP3y54heBjF1vhZQ3rJywTmRLHe5Ag0ETV77UxAIAIQPLVFbqheJ90Kf -NF8TYt3ZIMpP5chw25OYq4tuZMzVJxKjUlM7KPQxUKquY/F9WpjH980LmICTb4Fz -txzn2bshIsGyg8pDUSnVK0NPY5uaq9bK4oht8wkr3FNFT2FpeqDIJyn+phIuEpIi -qt1LJyzzjobh9csaaGmNHvtrlkIggBj2n/ZQuGNhcYnKUZ/WGmkItCTSOfA++G+C -dCo1aPEymfbnJvaLB/mLyzA+r/r7LQM10cZEtqh5JdclJEh3CzZmx9HsRxCDZF8W -X/C4MmCwmIxmuU4vkVNhHFTQimQEUR8vg9ltiz8+xBjyE1Iav4MxfOYh3xjdJk1d -zlovyUcAAwUH/2KPgf0UQ1o+4IjOYinEEbNlrD1pKw5anUKwaaeQi0vm/oRG0E2F -ZCJ73OHxW/0hMrwbrGwXcm4NBARnAppg+/CecOVpkBgD5hrM+11DPhxdd1bjjfza -Pq8GmPp8SSsiTPUCoSlzojxL3Z05RNbvKVzxzxbYdx5h5XOTflI7bAHTY4AzGSDf -WaFljjCucht/d7u5empAd02haldUXWjT9RvY5RwnRZ+hjI47e+wUA0FMLHYtA1/0 -cwEIvpp2xwF/jpH3ODmnIGEeNoLyzAV7X0KAlSN8VRsh7igZRB9TRGI67aTjRgk8 -ayf/QNxAzwEk1MeDv67IFKNYVolxHCt4CtqISQQYEQIACQUCTV77UwIbDAAKCRC3 -Q0sGz0xP+dPiAKDUNJ5rkB9CRoMH9BC35d0fqXXeugCgwl/HYv52dWgatbyEGLet -etv5Qeg= -=nIAo ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.art b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.art deleted file mode 100644 index 825424e1f3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.art +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.1 (GNU/Linux) - -mQGiBEGP+skRBACyZz7muj2OgWc9FxK+Hj7tWPnrfxEN+0PE+n8MtqH+dxwQpMTd -gDpOXxJa45GM5pEwB6CFSFK7Fb/faniF9fDbm1Ga7MpBupIBYLactkoOTZMuTlGB -T0O5ha4h26YLqFfQOtlEi7d0+BDDdfHRQw3o67ycgRnLgYSA79DISc3MywCgk2TR -yd5sRfZAG23b4EDl+D0+oaMEAK73J7zuxf6F6V5EaxLd/w4JVB2xW0Glcn0fACOe -8FV9lzcZuo2xPpdGuyj02f/xlqvEav3XqTfFU2no61mA2pamaRNhlo+CEfGc7qde -/1twfSgOYqzeCx7+aybyPo8Th41b80FT19mfkjBf6+5NbUHffRabFFh1FmcPVNBn -F3FoA/95nRIzqDMItdTRitaZn02dIGNjdwllBD75bSVEvaR9O5hjBo0VMc25DB7f -DM2qEO52wCQbAKw9zFC284ekZVDaK4aHYt7iobHaqJEpKHgsDut5WWuMiSLR+SsF -aBHIZ9HvrKWLSUQKHU6A1Hva0P0r3GnoCMc/VCVfrLl721SjPbQzQXRvbWljIFJv -Y2tldCBUdXJ0bGUgPGFkbWluQGF0b21pY3JvY2tldHR1cnRsZS5jb20+iFkEExEC -ABkFAkGP+skECwcDAgMVAgMDFgIBAh4BAheAAAoJEDKpURRevSdEzcQAn1hSHqTO -jwv/z/picpOnR+mgycwHAKCBex2ciyXo5xeaQ9w7OMf7Jsmon7kBDQRBj/rMEAQA -6JvRndqE4koK0e49fUkICm1X0ZEzsVg9VmUW+Zft5guCRxmGlYTmtlC7oJCToRP/ -m/xH5uIevGiJycRKB0Ix+Csl6f9QuTkQ7tSTHcaIKbI3tL1x6CCBoWeTGYaOJlvk -ubrmajiMFaBfopLH2firoSToDGoUvv4e7bImIHEgNr8AAwUEAND0YR9DOEZvc+Lq -Ta/PQyxkdZ75o+Ty/O64E3OmO1Tuw2ciSQXCcwrbrMSE6EHHetxtGCnOdkjjjtmH -AnxsxdONv/EJuQmLcoNcsigZZ4tfRdmtXgcbnOmXBgmy1ea1KvWcsmecNSAMJHwR -7vDDKzbj4mSmudzjapHeeOewFF10iEYEGBECAAYFAkGP+swACgkQMqlRFF69J0Sq -nQCfa/q9Y/oY4dOTGj6MsdmRIQkKZhYAoIscjinFwTru4FVi2MIEzUUMToDK -=NOIx ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.atrpms b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.atrpms deleted file mode 100644 index 860ace4d24..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.atrpms +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.6 (GNU/Linux) - -mQGiBD5gtCgRBACKIvjMF+20r9k/Uw2Hq6Y/qn1nM0AZEFalhglXP5pMm5bMgkcI -1vCWqJxSbhQhk8hSEenoszes8hyUxHj4hFFUDiRtAxOpCpGCsCnUddgQtHAQd+tm -aQsM6J3Jm/EZPtwR0lvwvRGvz2x6Rr95G8+42KK9x+mBYhLk0y3gAbBzhwCgnkDH -a97MGBT7gRLrmtFqiHrWlPkD/2tBaH6IEuoJhcAbNj9MukbhDOYJ6ic9Nzf6sR3t -ZG+XgQLLS2DNy8+HWcYJOjpJDEe8zWFDdUv3cL1D0U2f2e85FuJaMucHn+816iw8 -mNjZXJEoDE4LJ8Vv53fkevNZpdWmO2VtRwI+woDnIHYHukDLj2sWhVt+5W+uOKAE -OippA/9OzuWrwBtTR+Np8ApZGkxhxU1z0iEStV+kQNqJE7YoR4SGMuzEa3bFzrPx -k4qIU+rw4YgFgHrs1x08lXxNOZkq6avvbl60HqN2qF2UQL/YdU+5X3ixaJVaYYk8 -yuK+hp0Hx2DdBWmVhq6rEzIfpnFhF4qspwMWEiiBGjYDL62W7LQ0QVRycG1zLm5l -dCAocnBtIHNpZ25pbmcga2V5KSA8QXhlbC5UaGltbUBBVHJwbXMubmV0PohnBBMR -AgAnAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAhkBBQJFfF9PBQkJGI4nAAoJEFCM -5eZmU0wrJ0IAnA0BdyRlq2S8ess55R8YMFnWAWXEAJ9Fa7cEHku4j4B83shCODps -+DYUZohnBBMRAgAnAhsDBQkDdMLsBgsJCAcDAgMVAgMDFgIBAh4BAheABQJAKteu -AhkBAAoJEFCM5eZmU0wrMMUAnRjS2PXQp0tsC/69IGMMxqU+8xeAAJ9XQjVAo+mU -kg/3AeBlMBIlFe5hDQ== -=23Fz ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RubyWorks.GPG.key b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RubyWorks.GPG.key deleted file mode 100644 index b91a5a8876..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RubyWorks.GPG.key +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEY5QQ0RBACfC1NbAdGFMOS/Y7P9hmNph2Wh3TJTh6IZpL+lTJBuZSEa6rp0 -CghS/yU3gGXUPaxAy91M7PXMv5p7S3U/SusZHATLhFdU5J4LuWMf4IiBy9FOB/aj -Q1s5vZ/i3YFaqolXsRP8TgIu4Lzp/j3+KAxFb3gF7lz64J/Et2Jil0OQzwCgkn9i -SoPEM6d9SCFOidhUuTHUhM0D/3UXl/FKPVFrFzjslFpaN9NgArRrmXKTOBWEqMLy -12pbTzOtv+p17Ot51q4h0ebEWrmVJ/h/7Is6QT6AKHuOIW+1/88fcSrmef//0Scz -wtEwVudkYA+kOGt1pwhapVYf1lWE9Z6L3V/MVdxXUesylGO6jJjOjpUB+ZBItwl7 -exkhA/4iemhq4D5Jp6r1Kv3aKSPNENdhTORyfZz4UfyOsUfYncaprP5IZja0j+rd -tQLIsH8hXvCT2kSAUY6nMGmzPgpgGamtHI6gH1ZmoNX2gEF7tzGNgKMbbUmwO89B -N56U7wm68AreXE8XviRjGjAtZWnouqe5X+EiUurdJkzRwU0c2rQpVGhvdWdodFdv -cmtzIDxydWJ5d29ya3NAdGhvdWdodHdvcmtzLmNvbT6IYAQTEQIAIAUCRjlBDQIb -AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEHM/KlUQbeB0SSYAn0sgAx5ZK975 -wZiChkIqOCyFZ9PLAJ9laivkzqT2y+Kh9FGe3TP/CAhRTbkCDQRGOUEVEAgAqxJI -MFrYV3JKyeXHVKXHNd5Nf1WdqKi37VOdSTBftiehzZdR9hxkGEknYxnbBLGJR9YD -/uJ2+DRwNBcw2RrrEmb0DCZxcLQLZ3xYa7+WvcR4/Nir/3858SGJ+wmGCHKyX2So -M2TurmKu5bqyUUaBgf+IhKfwOr9zeK3rIRhUq/aiYkw8sWA8ruUvxXwLnbkK1aP9 -hfvSqScwjkfUVk6CQ6GFUD+4N4mNRtRcZz3gYa+0jSNeEJZQOJxRuE/gBHav3eyN -dm4VAFPF20BobvBVEcMhO0KaR/X4jW1G1eFAKLxI7cdx3+vLeNPaFwHiSMSknsNs -UiucI9oV+I5S/50ZrwADBwf/StYTK9KvPnY9ZqmirBpSh0Zl0xylMtAiMblG7pKv -qKTPNr9zXooheQBpAbnhOfju0DB/OtE4V21HqnbMws2aFvHecEbO5EmjwT7ZTltH -5vlbiPrXOc7SpP22FdkOYdunM2+nsA6398mpYFEiFFNAzX6pReN2tbbmXf6zxS9n -nHjMAgl5nMuOASLZrTrUX/7yu6ySS1hy0ZVfEoAFeILy4MV8y0lVjBQa2kNOCNpO -Cc+y1+4EHLS3fuN0x+tho3rhjKAzj8KOt4XnALn8OouRMx9G7ItC2U8kNzHHFRg5 -adT/+nEthVd9q9pYLrUaze7aMQyl+7cD1KzmSe34X9B6W4hJBBgRAgAJBQJGOUEV -AhsMAAoJEHM/KlUQbeB0O7QAn09h4qrKPhWD9eaiyMRS5YeARTYgAJ9WxLcQEvkA -yOSLb33CweehCrlTnQ== -=scSy ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-CentOS-6 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-CentOS-6 deleted file mode 100644 index bd863d8e21..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-CentOS-6 +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQINBE4P06MBEACqn48FZgYkG2QrtUAVDV58H6LpDYEcTcv4CIFSkgs6dJ9TavCW -NyPBZRpM2R+Rg5eVqlborp7TmktBP/sSsxc8eJ+3P2aQWSWc5ol74Y0OznJUCrBr -bIdypJllsD9Fe+h7gLBXTh3vdBEWr2lR+xA+Oou8UlO2gFbVFQqMafUgU1s0vqaE -/hHH0TzwD0/tJ6eqIbHwVR/Bu6kHFK4PwePovhfvyYD9Y+C0vOYd5Ict2vbLHz1f -QBDZObv4M6KN3j7nzme47hKtdMd+LwFqxM5cXfM6b5doDulWPmuGV78VoX6OR7el -x1tlfpuiFeuXYnImm5nTawArcQ1UkXUSYcTUKShJebRDLR3BycxR39Q9jtbOQ29R -FumHginovEhdUcinRr22eRXgcmzpR00zFIWoFCwHh/OCtG14nFhefuZ8Z80qbVhW -2J9+/O4tksv9HtQBmQNOK5S8C4HNF2M8AfOWNTr8esFSDc0YA5/cxzdfOOtWam/w -lBpNcUUSSgddRsBwijPuWhVA3NmA/uQlJtAo4Ji5vo8cj5MTPG3+U+rfNqRxu1Yc -ioXRo4LzggPscaTZX6V24n0fzw0J2k7TT4sX007k+7YXwEMqmHpcMYbDNzdCzUer -Zilh5hihJwvGfdi234W3GofttoO+jaAZjic7a3p6cO1ICMgfVqrbZCUQVQARAQAB -tEZDZW50T1MtNiBLZXkgKENlbnRPUyA2IE9mZmljaWFsIFNpZ25pbmcgS2V5KSA8 -Y2VudG9zLTYta2V5QGNlbnRvcy5vcmc+iQI8BBMBAgAmBQJOD9OjAhsDBQkSzAMA -BgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQCUb8osEFud6ajRAAnb6d+w6Y/v/d -MSy7UEy4rNquArix8xhqBwwjoGXpa37OqTvvcJrftZ1XgtzmTbkqXc+9EFch0C+w -ST10f+H0SPTUGuPwqLkg27snUkDAv1B8laub+l2L9erzCaRriH8MnFyxt5v1rqWA -mVlRymzgXK+EQDr+XOgMm1CvxVY3OwdjdoHNox4TdVQWlZl83xdLXBxkd5IRciNm -sg5fJAzAMeg8YsoDee3m4khg9gEm+/Rj5io8Gfk0nhQpgGGeS1HEXl5jzTb44zQW -qudkfcLEdUMOECbu7IC5Z1wrcj559qcp9C94IwQQO+LxLwg4kHffvZjCaOXDRiya -h8KGsEDuiqwjU9HgGq9fa0Ceo3OyUazUi+WnOxBLVIQ8cUZJJ2Ia5PDnEsz59kCp -JmBZaYPxUEteMtG3yDTa8c8jUnJtMPpkwpSkeMBeNr/rEH4YcBoxuFjppHzQpJ7G -hZRbOfY8w97TgJbfDElwTX0/xX9ypsmBezgGoOvOkzP9iCy9YUBc9q/SNnflRWPO -sMVrjec0vc6ffthu2xBdigBXhL7x2bphWzTXf2T067k+JOdoh5EGney6LhQzcp8m -YCTENStCR+L/5XwrvNgRBnoXe4e0ZHet1CcCuBCBvSmsPHp5ml21ahsephnHx+rl -JNGtzulnNP07RyfzQcpCNFH7W4lXzqM= -=jrWY ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-EPEL b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-EPEL deleted file mode 100644 index 7a2030489d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-EPEL +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 -JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B -M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn -XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 -pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV -QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp -Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq -3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu -vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar -1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g -YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB -tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS -KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9 -qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT -9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP -Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS -WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft -HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF -p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP -x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8 -wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J -l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG -iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR -XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== -=V/6I ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-PGDG b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-PGDG deleted file mode 100644 index 8722c21cbd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-PGDG +++ /dev/null @@ -1,31 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.7 (GNU/Linux) - -mQGiBEeD8koRBACC1VBRsUwGr9gxFFRho9kZpdRUjBJoPhkeOTvp9LzkdAQMFngr -BFi6N0ov1kCX7LLwBmDG+JPR7N+XcH9YR1coSHpLVg+JNy2kFDd4zAyWxJafjZ3a -9zFg9Yx+0va1BJ2t4zVcmKS4aOfbgQ5KwIOWUujalQW5Y+Fw39Gn86qjbwCg5dIo -tkM0l19h2sx50D027pV5aPsD/2c9pfcFTbMhB0CcKS836GH1qY+NCAdUwPs646ee -Ex/k9Uy4qMwhl3HuCGGGa+N6Plyon7V0TzZuRGp/1742dE8IO+I/KLy2L1d1Fxrn -XOTBZd8qe6nBwh12OMcKrsPBVBxn+iSkaG3ULsgOtx+HHLfa1/p22L5+GzGdxizr -peBuA/90cCp+lYcEwdYaRoFVR501yDOTmmzBc1DrsyWP79QMEGzMqa393G0VnqXt -L4pGmunq66Agw2EhPcIt3pDYiCmEt/obdVtSJH6BtmSDB/zYhbE8u3vLP3jfFDa9 -KXxgtYj0NvuUVoRmxSKm8jtfmj1L7zoKNz3jl+Ba3L0WxIv4+bRBUG9zdGdyZVNR -TCBSUE0gQnVpbGRpbmcgUHJvamVjdCA8cGdzcWxycG1zLWhhY2tlcnNAcGdmb3Vu -ZHJ5Lm9yZz6IYAQTEQIAIAUCR4PySgIbIwYLCQgHAwIEFQIIAwQWAgMBAh4BAheA -AAoJEB8W0uFELfD4jnkAoMqd6ZwwsgYHZ3hP9vt+DJt1uDW7AKDbRwP8ESKFhwdJ -8m91RPBeJW/tMLkCDQRHg/JKEAgA64+ZXgcERPYfZYo4p+yMTJAAa9aqnE3U4Ni6 -ZMB57GPuEy8NfbNya+HiftO8hoozmJdcI6XFyRBCDUVCdZ8SE+PJdOx2FFqZVIu6 -dKnr8ykhgLpNNEFDG3boK9UfLj/5lYQ3Y550Iym1QKOgyrJYeAp6sZ+Nx2PavsP3 -nMFCSD67BqAbcLCVQN7a2dAUXfEbfXJjPHXTbo1/kxtzE+KCRTLdXEbSEe3nHO04 -K/EgTBjeBUOxnciH5RylJ2oGy/v4xr9ed7R1jJtshsDKMdWApwoLlCBJ63jg/4T/ -z/OtXmu4AvmWaJxaTl7fPf2GqSqqb6jLCrQAH7AIhXr9V0zPZwADBQgAlpptNQHl -u7euIdIujFwwcxyQGfee6BG+3zaNSEHMVQMuc6bxuvYmgM9r7aki/b0YMfjJBk8v -OJ3Eh1vDH/woJi2iJ13vQ21ot+1JP3fMd6NPR8/qEeDnmVXu7QAtlkmSKI9Rdnjz -FFSUJrQPHnKsH4V4uvAM+njwYD+VFiwlBPTKNeL8cdBb4tPN2cdVJzoAp57wkZAN -VA2tKxNsTJKBi8wukaLWX8+yPHiWCNWItvyB4WCEp/rZKG4A868NM5sZQMAabpLd -l4fTiGu68OYgK9qUPZvhEAL2C1jPDVHPkLm+ZsD+90Pe66w9vB00cxXuHLzm8Pad -GaCXCY8h3xi6VIhJBBgRAgAJBQJHg/JKAhsMAAoJEB8W0uFELfD4K4cAoJ4yug8y -1U0cZEiF5W25HDzMTtaDAKCaM1m3Cbd+AZ0NGWNg/VvIX9MsPA== -=au6K ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-RBEL b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-RBEL deleted file mode 100644 index 152fd79900..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-RBEL +++ /dev/null @@ -1,36 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.14 (GNU/Linux) - -mQGiBEZ6qawRBAC2gDuA1sZioGh1VP/U0l+9RmzOdkWBGB3NfWqezAwt1Up+cP5o -h+UNkghOKbJVQ/zLyY/edYOppQ78yxT1X/J1RHNhs5bjqzWlQxMbT5/tt1N4PExu -gvO38RGFTV0DqIy3lQw5YIwp2le+G8MktYh2NKI4lG0AJoXZicNlI7+mEwCgmfw+ -CnsB/kb/xUD1dq6Mo3dYXVcEAKSFfqt+6jvJNxcIYfpQqjEslQsQmPKpXzK9CPyV -UCjUEOirbhPxV86u3Ge/yuy5USMvTTs+ztImabbH6UHBEP+tEw3LiuPUpfh+nEna -3Hz+U81PvUwGEwUMzCr+OemBXqGW7jl66NqKqm8YM3Pkvc4NlS/7slky9A/s6i8S -hToWA/9kP55aSbIXte5TbC88lx6YuLx7qW541ni38DmJfPN5hHywLGnM82MMQMbk -hg1v49+7TTNv44LJpGT7t8gsW9F4Z4rWoChhsldypeeqbDOIv4kFiXt/8122Ud9J -nE67CR9XUuS5Jp+gP6xxNr9/vbvqsOGMJAQkVgkBPVuKYv25gLQ3U2VyZ2lvIFJ1 -YmlvIChGcmFtZU9TIERldmVsb3BlcnMpIDxydWJpb2pyQGZyYW1lb3Mub3JnPohr -BBMRAgArAhsDBQkGE0x0BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCTBs76AIZ -AQAKCRCOw9dP80W+dFhjAJ0dKy761iPcG+ALwEAuAgxDpUVBzgCdFxGCAZ7ELYvf -3uFc0Ou2ihDzvyy0IFNlcmdpbyBSdWJpbyA8c2VyZ2lvQHJ1YmlvLm5hbWU+iGYE -ExECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUJBhNMdAUCTBs7XgAKCRCO -w9dP80W+dDdtAJ9NYoW1ChfMyES7nQUlesEQ4aWXjQCeIoGxoOuIGyg6+AKr/2Wr -6fE1zt2IaQQTEQIAKQIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAhkBBQJIHsGo -BQkCuHFEAAoJEI7D10/zRb50KjgAnRTzzNIODKqrHnrHaUG8dWDCwmYjAJ48Hbcn -ZC6E8LGTeM8vPN0mMI9ijLkCDQRGeqm2EAgAh720kjA9bNDms+6agb6CirD9RkmZ -3G+OHd5iia3KbaUiBtC3PECg4UE8N54JuBNKdjgJQfdYSg2J0EZHyhZHdAVWjykE -tj/IKZKnAfUqKh44uT9OUPW8PChPo/gioLn+DexSAW7n19h7VIa1P3shYqYR/gz8 -zgfrXkFFpkpKnOLsXuF20JEEBIBdwrfYRJIBrUTYrfS/2GKLJjyutENkb9uI3JgQ -LfR6DckTaar4eeArjgvOxZRHiU0vRezetlbG8ZM9mSYrcMM3Xa5vLpFlDj6vYzat -RWEuZUfLgXWUVoVyFiNVXhpff/w7/bAb3WpXqjZd6sK8CCJJPNtnbLE7CwADBQf9 -EQjT9iiEZis35V9HqeLsxXVjPOGNuLiwjIpacI7CM3aGV1q7NXiCE4oWS/PvpHmu -W+XdXMPH4Bt2VmjZSarlAipTeNnOuiEXipUFIjAlNn1xNVRRd7T35zIvXLtmNtUe -nN1/mqZljKPbCbW1AgktH417t/vJfTnRWr9IgS3Am+o4q200i+1FjrQ/UI3s9+vg -5B+KASFP6HspNttl0kwzQ6SFIHAebd4DKHOj6ShxXPNl18W4R8qPqayrAFqdkgMJ -Jn8j2E8rmGYnssSfjck2kLtvNdTEAMjFnhg+oUapUzJAVeterudiWZFNrtn9ewnf -8SUiiYJlxb+nz545zo0gQIhJBBgRAgAJBQJGeqm2AhsMAAoJEI7D10/zRb50PJEA -mwTA+Sp3wvzwDr8sk7W7U4bBfw26AKCVoYw3mfTime+j3mFk1yk1yxjE2Q== -=iyOs ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-beta b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-beta deleted file mode 100644 index b86da23906..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-beta +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEWfBuERBACrwDH+6QvpyaOgzhXiemsIX+q4HlhX/HDmrmZOUd7i9VmZNogP -6LRRiTygn2+UphaGV3NDA36ZB/1JRpgvgpzbpZNeAoFvsljIbxGIwkH2JgRF6oNo -eGB3QYzDQJvYVIejk79M0ed3oor4w8OiNVcdxLyVIthFrjrrCqwRP3bLZwCgtY9t -Ezf5WL63Ue45vdht7A2GH+0D/iNAnWKsU7FUMFZrcwMaMbyP7YG8z0+zXUOgtgyP -tbgJG5yikNT3vJypb42gbKfcriUUDC5AeiRmkR8QPvYuOm34rM90+wx2LGqXWnHM -IyLAyl8TS3MQmePem8bfTGTNYxtt3Q7iadez2WYTLBSlmM6hbxZfdwm1hhyM0AJU -YyFUA/9kHH+CUBxKb1UgG7TSp53Po/5p/Yyuty+RJ7zIGv6SiN/JK4/ntWfm5WS5 -ZprSdE5ODoFQ/Gs3/VB/eolg2fBW1DcftH6lKHT3GKEOaicGX+T9eOMerZZedm5U -vDA9mFvWnOdOxK8LuRgVqip4jCnWICchpatmdP0whJQHQ6MGLLRMQ2VudE9TLTUg -QmV0YSBLZXkgKENlbnRPUyA1IEJldGEgU2lnbmluZyBLZXkpIDxjZW50b3MtNS1i -ZXRhLWtleUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwbhAhsDBQkSzAMABgsJCAcD -AgMVAgMDFgIBAh4BAheAAAoJEM/aaIEJLXsrWDkAoKcqa+AAdAWvp5qlJkGQiRy8 -aNFDAJ4qRfIxMiLinmjbqcuygWMp61wY5ohMBBMRAgAMBQJFnwhtBYMSzAF0AAoJ -EDjCFhY5bKCkG/wAn14LDlJqjZv1Wz0WNfhr80+qJrf6AKCaIZExwo4ApQpESk/F -SApLd/pEILkBDQRFnwbrEAQAwKzjI2aTB/sS9HuQ4CHCwrj4vr0HxMMwQikYBIvy -MYTtek04KDTKoJL5g3411DsfDW9VRGJdFCHvldgam/5UVfO6nywLkdwAA5TQA5dv -8YE8jTtwdy5Y1QKFc8LaIBZK0+ZbhEvdNfv67egvfcxZc5PvpBZ3C03n+iQ3wPcg -PhcAAwUD/iYkq4LG/je43Qa5rTz5kF5rIiX7Bk5vXT7XSFOFKwHy8V+PGEoVM1W8 -+EHIlmTycwIlsVp3by6qCDkMYu4V6VukxZNzJyeoMICiYIXUPh6NKHRoqaYlu6ZO -eFN1TQNXmodPk+iNtdbcby/zAklNqoO/dWSwd8NAo8s6WAHq3VPpiE8EGBECAA8F -AkWfBusCGwwFCRLMAwAACgkQz9pogQkteysXkACgoraCU0EBC+W8TuxrsePO20ma -D0IAoLRRQLTEXL0p3K0WE+LfyTr9EVG5 -=mH0S ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-kbsingh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-kbsingh deleted file mode 100644 index f8c688e5f4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-kbsingh +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEIu6hwRBACOz2JFa1nW+seAKlVGOu0ykhdFVNI9E4/Abp2+8nsJIZyUwLAp -ei76rPD8WdptgIjtYOCsqz1TbP+eqeEG0LLihOdFRLUuAjQX4X7LLf5Qm+nvUB73 -uLbSf9Ptps2CMUEtu7+0wVoTbuC19HXUhUr5sRdCnJbPJBH6aAHG7Pl9ZwCguN9o -V7IKTnIQiZg0nxSjZ4V9e6UD/R7KoMwH3NPQQF7T7rJaBjSZcVHUPhAcNPNn+ms/ -Tw9mzHZ0mnQnOzSEW0ZUj9TkLN52VQ3WmGZKAv9yeVr0/230YIgmtH863lSystmk -LNO9brK0+3vKg5GRpV0/MSWSmf39WPAS1hXNXIFfYp1eGHUfed4FVNxrMTWHQozr -8JosA/wP+zGfM51bSAazLUqP/MEm7F9OFkuD7Sw97w55FyYlrPp1FQWrWczoiKHr -wS5NRCQbCGEEM/+j9id6CukxPLXxwMYCfeg5K0HxMaQT6hxbwjOzAzN3PBFytNel -09qdrdoSDa35twT0SAt+rzM+zvRI8ycizFG3lIih4UItWWve2bQ6S2FyYW5iaXIg -U2luZ2ggKGh0dHA6Ly93d3cua2FyYW4ub3JnLykgPGtic2luZ2hAa2FyYW4ub3Jn -PoheBBMRAgAeBQJCLuocAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEDANvZ4+ -E89b/P4AnjufrDCS+TAEL0KpkYDURePbDCHBAJ4+0iI1Td4YrcnLwmQ1+XDCJ3Zr -a7kBDQRCLuocEAQAjAl48FM9eGtP6M9FgswlSPAuCcJct6wOHmd/qZ923HckJPAD -zIFRMlM6H8P0bKoaIluv7agZM7Gsf8NeTg3NEeMKqnibIAyvjYeSkceRIwvBCQ3A -YwWk+B2zLUAFMxnE31oA10zjCKUo7Dc6XDUxSY/qdLymZzyG/Ndav+vMOVsAAwUD -/RCFDuW/GSM/s3DO7XxrOBRTGQmf9v9tCYdZZD615+s8ghaa5oZTvp1cbTTWiSq8 -ybncfjVHz9HezDgQjJsFZtrYd4w2JD+7K0+8sZ+BUGo1dDSv4UgN8ACtaGJnShiq -s8pQWRZFqFa3waay8oUSTKHiTHdpxLi3x4HhK/8MTsxniEkEGBECAAkFAkIu6hwC -GwwACgkQMA29nj4Tz1tHSgCcDgKL4swEu7ShvI8nZt2JLmTKB5QAn0qZi2zbexbi -DX+bbalHM+xVnXZN -=rZT6 ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-remi b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-remi deleted file mode 100644 index 3283386064..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-remi +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.7 (GNU/Linux) - -mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 -/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA -/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L -0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh -dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp -AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B -Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY -iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD -1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs -ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI -BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ -MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj -C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 -HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa -o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw -CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv -JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK -8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i -gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== -=6Rbg ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag deleted file mode 100644 index 8ee27f45b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag +++ /dev/null @@ -1,32 +0,0 @@ -The following public key can be used to verify RPM packages -downloaded from http://dag.wieers.com/apt/ using 'rpm -K' -if you have the GNU GPG package. -Questions about this key should be sent to: -Dag Wieers - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.1 (GNU/Linux) - -mQGiBD9JMT0RBAC9Q2B0AloUMTxaK73sD0cOu1MMdD8yuDagbMlDtUYA1aGeJVO6 -TV02JLGr67OBY+UkYuC1c3PUwmb3+jakZd5bW1L8E2L705wS0129xQOZPz6J+alF -5rTzVkiefg8ch1yEcMayK20NdyOmhDGXQXNQS8OJFLTIC6bJs+7MZL83/wCg3cG3 -3q7MWHm3IpJb+6QKpB9YH58D/2WjPDK+7YIky/JbFBT4JPgTSBy611+bLqHA6PXq -39tzY6un8KDznAMNtm+NAsr6FEG8PHe406+tbgd7tBkecz3HPX8nR5v0JtDT+gzN -8fM3kAiAzjCHUAFWVAMAZLr5TXuoq4lGTTxvZbwTjZfyjCm7gIieCu8+qnPWh6hm -30NgA/0ZyEHG6I4rOWqPks4vZuD+wlp5XL8moBXEKfEVOMh2MCNDRGnvVHu1P3eD -oHOooVMt9sWrGcgxpYuupPNL4Uf6B6smiLlH6D4tEg+qCxC17zABI5572XJTJ170 -JklZJrPGtnkPrrKMamnN9MU4RjGmjh9JZPa7rKjZHyWP/z/CBrQ1RGFnIFdpZWVy -cyAoRGFnIEFwdCBSZXBvc2l0b3J5IHYxLjApIDxkYWdAd2llZXJzLmNvbT6IWQQT -EQIAGQUCP0kxPQQLBwMCAxUCAwMWAgECHgECF4AACgkQog5SFGuNeeYvDQCeKHST -hIq/WzFBXtJOnQkJGSqAoHoAnRtsJVWYmzYKHqzkRx1qAzL18Sd0iEYEEBECAAYF -Aj9JMWAACgkQoj2iXPqnmevnOACfRQaageMcESHVE1+RSuP3txPUvoEAoJAtOHon -g+3SzVNSZLn/g7/Ljfw+uQENBD9JMT8QBACj1QzRptL6hbpWl5DdQ2T+3ekEjJGt -llCwt4Mwt/yOHDhzLe8SzUNyYxTXUL4TPfFvVW9/j8WOkNGvffbs7g84k7a5h/+l -IJTTlP9V9NruDt1dlrBe+mWF6eCY55OFHjb6nOIkcJwKxRd3nGlWnLsz0ce9Hjrg -6lMrn0lPsMV6swADBQP9H42sss6mlqnJEFA97Fl3V9s+7UVJoAIA5uSVXxEOwVoh -Vq7uECQRvWzif6tzOY+vHkUxOBRvD6oIU6tlmuG3WByKyA1d0MTqMr3eWieSYf/L -n5VA9NuD7NwjFA1kLkoDwfSbsF51LppTMkUggzwgvwE46MB6yyuqAVI1kReAWw+I -RgQYEQIABgUCP0kxPwAKCRCiDlIUa4155oktAKDAzm9QYbDpk6SrQhkSFy016BjE -BACeJU1hpElFnUZCL4yKj4EuLnlo8kc= -=mqUt ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-webtatic-andy b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-webtatic-andy deleted file mode 100644 index 317b802b56..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-webtatic-andy +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQGiBE1e+1MRBAD8j+KyOIpGNRN39gNy2E/1HG4ZoLFuxIOxI5/1FEuZB/GjYF5m -DvJerZukd0QCqCs72J6J+uWnfD/52t2XWTw4IHPpCWeyr9TWex3uOYmrYzY+0l0l -qsCsrhT0XGkAE0+/20oEP2+t/d+1q0yRcYZRwWK/ME2rUUX0jOa/B3Bc6wCg3blw -XdZNrv1wVNd1PCOUI79k0V0D+wfbybos8Cmdv2f8dD746fSR/hmp4SzpBDmPRRQu -0gtJAKI6ycTdotGq5zHfZj76kDQBudeIgdbWtqfckP2lK47i8lIENAyC4MK8dxh9 -Ts+b1LqXlbcPyixzImf4qoT5DT1lSEUPwoMRX8W/29GAcvnZpOwQ8g7DNmRBpFFY -8U2GBADz6uEeP3YwJAuL7pi77AalxR0WQAADMR59pGltQdXaZvANXoioU0W519Pb -nl3gKWDiTuwUDrwaSPoBbNLyX4s0AE7/0HSG02/eRjLB8toQpAH9xkK/u2WPe/do -erZg5yg1qhoCbEM7kJ2I/GBl6VbPedt2ORdsC4ZTWTnZJh6tYLQhQW5keSBUaG9t -cHNvbiA8YW5keUB3ZWJ0YXRpYy5jb20+iGAEExECACAFAk1e+1MCGwMGCwkIBwMC -BBUCCAMEFgIDAQIeAQIXgAAKCRC3Q0sGz0xP+TA0AJwJf5ZPeub8v+5CtZwdcZhV -LU0sjgCgrP3y54heBjF1vhZQ3rJywTmRLHe5Ag0ETV77UxAIAIQPLVFbqheJ90Kf -NF8TYt3ZIMpP5chw25OYq4tuZMzVJxKjUlM7KPQxUKquY/F9WpjH980LmICTb4Fz -txzn2bshIsGyg8pDUSnVK0NPY5uaq9bK4oht8wkr3FNFT2FpeqDIJyn+phIuEpIi -qt1LJyzzjobh9csaaGmNHvtrlkIggBj2n/ZQuGNhcYnKUZ/WGmkItCTSOfA++G+C -dCo1aPEymfbnJvaLB/mLyzA+r/r7LQM10cZEtqh5JdclJEh3CzZmx9HsRxCDZF8W -X/C4MmCwmIxmuU4vkVNhHFTQimQEUR8vg9ltiz8+xBjyE1Iav4MxfOYh3xjdJk1d -zlovyUcAAwUH/2KPgf0UQ1o+4IjOYinEEbNlrD1pKw5anUKwaaeQi0vm/oRG0E2F -ZCJ73OHxW/0hMrwbrGwXcm4NBARnAppg+/CecOVpkBgD5hrM+11DPhxdd1bjjfza -Pq8GmPp8SSsiTPUCoSlzojxL3Z05RNbvKVzxzxbYdx5h5XOTflI7bAHTY4AzGSDf -WaFljjCucht/d7u5empAd02haldUXWjT9RvY5RwnRZ+hjI47e+wUA0FMLHYtA1/0 -cwEIvpp2xwF/jpH3ODmnIGEeNoLyzAV7X0KAlSN8VRsh7igZRB9TRGI67aTjRgk8 -ayf/QNxAzwEk1MeDv67IFKNYVolxHCt4CtqISQQYEQIACQUCTV77UwIbDAAKCRC3 -Q0sGz0xP+dPiAKDUNJ5rkB9CRoMH9BC35d0fqXXeugCgwl/HYv52dWgatbyEGLet -etv5Qeg= -=nIAo ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.art b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.art deleted file mode 100644 index 825424e1f3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.art +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.1 (GNU/Linux) - -mQGiBEGP+skRBACyZz7muj2OgWc9FxK+Hj7tWPnrfxEN+0PE+n8MtqH+dxwQpMTd -gDpOXxJa45GM5pEwB6CFSFK7Fb/faniF9fDbm1Ga7MpBupIBYLactkoOTZMuTlGB -T0O5ha4h26YLqFfQOtlEi7d0+BDDdfHRQw3o67ycgRnLgYSA79DISc3MywCgk2TR -yd5sRfZAG23b4EDl+D0+oaMEAK73J7zuxf6F6V5EaxLd/w4JVB2xW0Glcn0fACOe -8FV9lzcZuo2xPpdGuyj02f/xlqvEav3XqTfFU2no61mA2pamaRNhlo+CEfGc7qde -/1twfSgOYqzeCx7+aybyPo8Th41b80FT19mfkjBf6+5NbUHffRabFFh1FmcPVNBn -F3FoA/95nRIzqDMItdTRitaZn02dIGNjdwllBD75bSVEvaR9O5hjBo0VMc25DB7f -DM2qEO52wCQbAKw9zFC284ekZVDaK4aHYt7iobHaqJEpKHgsDut5WWuMiSLR+SsF -aBHIZ9HvrKWLSUQKHU6A1Hva0P0r3GnoCMc/VCVfrLl721SjPbQzQXRvbWljIFJv -Y2tldCBUdXJ0bGUgPGFkbWluQGF0b21pY3JvY2tldHR1cnRsZS5jb20+iFkEExEC -ABkFAkGP+skECwcDAgMVAgMDFgIBAh4BAheAAAoJEDKpURRevSdEzcQAn1hSHqTO -jwv/z/picpOnR+mgycwHAKCBex2ciyXo5xeaQ9w7OMf7Jsmon7kBDQRBj/rMEAQA -6JvRndqE4koK0e49fUkICm1X0ZEzsVg9VmUW+Zft5guCRxmGlYTmtlC7oJCToRP/ -m/xH5uIevGiJycRKB0Ix+Csl6f9QuTkQ7tSTHcaIKbI3tL1x6CCBoWeTGYaOJlvk -ubrmajiMFaBfopLH2firoSToDGoUvv4e7bImIHEgNr8AAwUEAND0YR9DOEZvc+Lq -Ta/PQyxkdZ75o+Ty/O64E3OmO1Tuw2ciSQXCcwrbrMSE6EHHetxtGCnOdkjjjtmH -AnxsxdONv/EJuQmLcoNcsigZZ4tfRdmtXgcbnOmXBgmy1ea1KvWcsmecNSAMJHwR -7vDDKzbj4mSmudzjapHeeOewFF10iEYEGBECAAYFAkGP+swACgkQMqlRFF69J0Sq -nQCfa/q9Y/oY4dOTGj6MsdmRIQkKZhYAoIscjinFwTru4FVi2MIEzUUMToDK -=NOIx ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.atrpms b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.atrpms deleted file mode 100644 index 860ace4d24..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.atrpms +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.6 (GNU/Linux) - -mQGiBD5gtCgRBACKIvjMF+20r9k/Uw2Hq6Y/qn1nM0AZEFalhglXP5pMm5bMgkcI -1vCWqJxSbhQhk8hSEenoszes8hyUxHj4hFFUDiRtAxOpCpGCsCnUddgQtHAQd+tm -aQsM6J3Jm/EZPtwR0lvwvRGvz2x6Rr95G8+42KK9x+mBYhLk0y3gAbBzhwCgnkDH -a97MGBT7gRLrmtFqiHrWlPkD/2tBaH6IEuoJhcAbNj9MukbhDOYJ6ic9Nzf6sR3t -ZG+XgQLLS2DNy8+HWcYJOjpJDEe8zWFDdUv3cL1D0U2f2e85FuJaMucHn+816iw8 -mNjZXJEoDE4LJ8Vv53fkevNZpdWmO2VtRwI+woDnIHYHukDLj2sWhVt+5W+uOKAE -OippA/9OzuWrwBtTR+Np8ApZGkxhxU1z0iEStV+kQNqJE7YoR4SGMuzEa3bFzrPx -k4qIU+rw4YgFgHrs1x08lXxNOZkq6avvbl60HqN2qF2UQL/YdU+5X3ixaJVaYYk8 -yuK+hp0Hx2DdBWmVhq6rEzIfpnFhF4qspwMWEiiBGjYDL62W7LQ0QVRycG1zLm5l -dCAocnBtIHNpZ25pbmcga2V5KSA8QXhlbC5UaGltbUBBVHJwbXMubmV0PohnBBMR -AgAnAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAhkBBQJFfF9PBQkJGI4nAAoJEFCM -5eZmU0wrJ0IAnA0BdyRlq2S8ess55R8YMFnWAWXEAJ9Fa7cEHku4j4B83shCODps -+DYUZohnBBMRAgAnAhsDBQkDdMLsBgsJCAcDAgMVAgMDFgIBAh4BAheABQJAKteu -AhkBAAoJEFCM5eZmU0wrMMUAnRjS2PXQp0tsC/69IGMMxqU+8xeAAJ9XQjVAo+mU -kg/3AeBlMBIlFe5hDQ== -=23Fz ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RubyWorks.GPG.key b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RubyWorks.GPG.key deleted file mode 100644 index b91a5a8876..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RubyWorks.GPG.key +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEY5QQ0RBACfC1NbAdGFMOS/Y7P9hmNph2Wh3TJTh6IZpL+lTJBuZSEa6rp0 -CghS/yU3gGXUPaxAy91M7PXMv5p7S3U/SusZHATLhFdU5J4LuWMf4IiBy9FOB/aj -Q1s5vZ/i3YFaqolXsRP8TgIu4Lzp/j3+KAxFb3gF7lz64J/Et2Jil0OQzwCgkn9i -SoPEM6d9SCFOidhUuTHUhM0D/3UXl/FKPVFrFzjslFpaN9NgArRrmXKTOBWEqMLy -12pbTzOtv+p17Ot51q4h0ebEWrmVJ/h/7Is6QT6AKHuOIW+1/88fcSrmef//0Scz -wtEwVudkYA+kOGt1pwhapVYf1lWE9Z6L3V/MVdxXUesylGO6jJjOjpUB+ZBItwl7 -exkhA/4iemhq4D5Jp6r1Kv3aKSPNENdhTORyfZz4UfyOsUfYncaprP5IZja0j+rd -tQLIsH8hXvCT2kSAUY6nMGmzPgpgGamtHI6gH1ZmoNX2gEF7tzGNgKMbbUmwO89B -N56U7wm68AreXE8XviRjGjAtZWnouqe5X+EiUurdJkzRwU0c2rQpVGhvdWdodFdv -cmtzIDxydWJ5d29ya3NAdGhvdWdodHdvcmtzLmNvbT6IYAQTEQIAIAUCRjlBDQIb -AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEHM/KlUQbeB0SSYAn0sgAx5ZK975 -wZiChkIqOCyFZ9PLAJ9laivkzqT2y+Kh9FGe3TP/CAhRTbkCDQRGOUEVEAgAqxJI -MFrYV3JKyeXHVKXHNd5Nf1WdqKi37VOdSTBftiehzZdR9hxkGEknYxnbBLGJR9YD -/uJ2+DRwNBcw2RrrEmb0DCZxcLQLZ3xYa7+WvcR4/Nir/3858SGJ+wmGCHKyX2So -M2TurmKu5bqyUUaBgf+IhKfwOr9zeK3rIRhUq/aiYkw8sWA8ruUvxXwLnbkK1aP9 -hfvSqScwjkfUVk6CQ6GFUD+4N4mNRtRcZz3gYa+0jSNeEJZQOJxRuE/gBHav3eyN -dm4VAFPF20BobvBVEcMhO0KaR/X4jW1G1eFAKLxI7cdx3+vLeNPaFwHiSMSknsNs -UiucI9oV+I5S/50ZrwADBwf/StYTK9KvPnY9ZqmirBpSh0Zl0xylMtAiMblG7pKv -qKTPNr9zXooheQBpAbnhOfju0DB/OtE4V21HqnbMws2aFvHecEbO5EmjwT7ZTltH -5vlbiPrXOc7SpP22FdkOYdunM2+nsA6398mpYFEiFFNAzX6pReN2tbbmXf6zxS9n -nHjMAgl5nMuOASLZrTrUX/7yu6ySS1hy0ZVfEoAFeILy4MV8y0lVjBQa2kNOCNpO -Cc+y1+4EHLS3fuN0x+tho3rhjKAzj8KOt4XnALn8OouRMx9G7ItC2U8kNzHHFRg5 -adT/+nEthVd9q9pYLrUaze7aMQyl+7cD1KzmSe34X9B6W4hJBBgRAgAJBQJGOUEV -AhsMAAoJEHM/KlUQbeB0O7QAn09h4qrKPhWD9eaiyMRS5YeARTYgAJ9WxLcQEvkA -yOSLb33CweehCrlTnQ== -=scSy ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-CentOS-5 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-CentOS-5 deleted file mode 100644 index 2627d31d8f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-CentOS-5 +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEWfB6MRBACrnYW6yKMT+MwJlCIhoyTxGf3mAxmnAiDEy6HcYN8rivssVTJk -CFtQBlBOpLV/OW2YtKrCO2xHn46eNfnMri8FGT8g+9JF3MUVi7kiV1He4iJynHXB -+F2ZqIvHf3IaUj1ys+p8TK64FDFxDQDrGQfIsD/+pkSGx53/877IrvdwjwCguQcr -Ioip5TH0Fj0OLUY4asYVZH8EAIqFHEqsY+9ziP+2R3/FyxSllKkjwcMLrBug+cYO -LYDD6eQXE9Mq8XKGFDj9ZB/0+JzK/XQeStheeFG75q3noq5oCPVFO4czuKErIRAB -qKbDBhaTj3JhOgM12XsUYn+rI6NeMV2ZogoQCC2tWmDETfRpYp2moo53NuFWHbAy -XjETA/sHEeQT9huHzdi/lebNBj0L8nBGfLN1nSRP1GtvagBvkR4RZ6DTQyl0UzOJ -RA3ywWlrL9IV9mrpb1Fmn60l2jTMMCc7J6LacmPK906N+FcN/Docj1M4s/4CNanQ -NhzcFhAFtQL56SNyLTCk1XzhssGZ/jwGnNbU/aaj4wOj0Uef5LRGQ2VudE9TLTUg -S2V5IChDZW50T1MgNSBPZmZpY2lhbCBTaWduaW5nIEtleSkgPGNlbnRvcy01LWtl -eUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwekAhsDBQkSzAMABgsJCAcDAgMVAgMD -FgIBAh4BAheAAAoJEKikR9zoViiXKlEAmwSoZDvZo+WChcg3s/SpNoWCKhMAAJwI -E2aXpZVrpsQnInUQWwkdrTiL5YhMBBMRAgAMBQJFnwiSBYMSzAIRAAoJEDjCFhY5 -bKCk0hAAn134bIx3wSbq58E6P6U5RT7Z2Zx4AJ9VxnVkoGHkVIgSdsxHUgRjo27N -F7kBDQRFnwezEAQA/HnJ5yiozwgtf6jt+kii8iua+WnjqBKomPHOQ8moxbWdv5Ks -4e1DPhzRqxhshjmub4SuJ93sgMSAF2ayC9t51mSJV33KfzPF2gIahcMqfABe/2hJ -aMzcQZHrGJCEX6ek8l8SFKou7vICzyajRSIK8gxWKBuQknP/9LKsoczV+xsAAwUD -/idXPkk4vRRHsCwc6I23fdI0ur52bzEqHiAIswNfO521YgLk2W1xyCLc2aYjc8Ni -nrMX1tCnEx0/gK7ICyJoWH1Vc7//79sWFtX2EaTO+Q07xjFX4E66WxJlCo9lOjos -Vk5qc7R+xzLDoLGFtbzaTRQFzf6yr7QTu+BebWLoPwNTiE8EGBECAA8FAkWfB7MC -GwwFCRLMAwAACgkQqKRH3OhWKJfvvACfbsF1WK193zM7vSc4uq51XsceLwgAoI0/ -9GxdNhGQEAweSlQfhPa3yYXH -=o/Mx ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-EPEL b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-EPEL deleted file mode 100644 index 7a2030489d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-EPEL +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 -JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B -M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn -XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 -pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV -QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp -Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq -3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu -vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar -1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g -YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB -tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS -KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9 -qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT -9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP -Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS -WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft -HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF -p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP -x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8 -wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J -l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG -iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR -XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== -=V/6I ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-RBEL b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-RBEL deleted file mode 100644 index 152fd79900..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-RBEL +++ /dev/null @@ -1,36 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.14 (GNU/Linux) - -mQGiBEZ6qawRBAC2gDuA1sZioGh1VP/U0l+9RmzOdkWBGB3NfWqezAwt1Up+cP5o -h+UNkghOKbJVQ/zLyY/edYOppQ78yxT1X/J1RHNhs5bjqzWlQxMbT5/tt1N4PExu -gvO38RGFTV0DqIy3lQw5YIwp2le+G8MktYh2NKI4lG0AJoXZicNlI7+mEwCgmfw+ -CnsB/kb/xUD1dq6Mo3dYXVcEAKSFfqt+6jvJNxcIYfpQqjEslQsQmPKpXzK9CPyV -UCjUEOirbhPxV86u3Ge/yuy5USMvTTs+ztImabbH6UHBEP+tEw3LiuPUpfh+nEna -3Hz+U81PvUwGEwUMzCr+OemBXqGW7jl66NqKqm8YM3Pkvc4NlS/7slky9A/s6i8S -hToWA/9kP55aSbIXte5TbC88lx6YuLx7qW541ni38DmJfPN5hHywLGnM82MMQMbk -hg1v49+7TTNv44LJpGT7t8gsW9F4Z4rWoChhsldypeeqbDOIv4kFiXt/8122Ud9J -nE67CR9XUuS5Jp+gP6xxNr9/vbvqsOGMJAQkVgkBPVuKYv25gLQ3U2VyZ2lvIFJ1 -YmlvIChGcmFtZU9TIERldmVsb3BlcnMpIDxydWJpb2pyQGZyYW1lb3Mub3JnPohr -BBMRAgArAhsDBQkGE0x0BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCTBs76AIZ -AQAKCRCOw9dP80W+dFhjAJ0dKy761iPcG+ALwEAuAgxDpUVBzgCdFxGCAZ7ELYvf -3uFc0Ou2ihDzvyy0IFNlcmdpbyBSdWJpbyA8c2VyZ2lvQHJ1YmlvLm5hbWU+iGYE -ExECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUJBhNMdAUCTBs7XgAKCRCO -w9dP80W+dDdtAJ9NYoW1ChfMyES7nQUlesEQ4aWXjQCeIoGxoOuIGyg6+AKr/2Wr -6fE1zt2IaQQTEQIAKQIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAhkBBQJIHsGo -BQkCuHFEAAoJEI7D10/zRb50KjgAnRTzzNIODKqrHnrHaUG8dWDCwmYjAJ48Hbcn -ZC6E8LGTeM8vPN0mMI9ijLkCDQRGeqm2EAgAh720kjA9bNDms+6agb6CirD9RkmZ -3G+OHd5iia3KbaUiBtC3PECg4UE8N54JuBNKdjgJQfdYSg2J0EZHyhZHdAVWjykE -tj/IKZKnAfUqKh44uT9OUPW8PChPo/gioLn+DexSAW7n19h7VIa1P3shYqYR/gz8 -zgfrXkFFpkpKnOLsXuF20JEEBIBdwrfYRJIBrUTYrfS/2GKLJjyutENkb9uI3JgQ -LfR6DckTaar4eeArjgvOxZRHiU0vRezetlbG8ZM9mSYrcMM3Xa5vLpFlDj6vYzat -RWEuZUfLgXWUVoVyFiNVXhpff/w7/bAb3WpXqjZd6sK8CCJJPNtnbLE7CwADBQf9 -EQjT9iiEZis35V9HqeLsxXVjPOGNuLiwjIpacI7CM3aGV1q7NXiCE4oWS/PvpHmu -W+XdXMPH4Bt2VmjZSarlAipTeNnOuiEXipUFIjAlNn1xNVRRd7T35zIvXLtmNtUe -nN1/mqZljKPbCbW1AgktH417t/vJfTnRWr9IgS3Am+o4q200i+1FjrQ/UI3s9+vg -5B+KASFP6HspNttl0kwzQ6SFIHAebd4DKHOj6ShxXPNl18W4R8qPqayrAFqdkgMJ -Jn8j2E8rmGYnssSfjck2kLtvNdTEAMjFnhg+oUapUzJAVeterudiWZFNrtn9ewnf -8SUiiYJlxb+nz545zo0gQIhJBBgRAgAJBQJGeqm2AhsMAAoJEI7D10/zRb50PJEA -mwTA+Sp3wvzwDr8sk7W7U4bBfw26AKCVoYw3mfTime+j3mFk1yk1yxjE2Q== -=iyOs ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-beta b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-beta deleted file mode 100644 index b86da23906..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-beta +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEWfBuERBACrwDH+6QvpyaOgzhXiemsIX+q4HlhX/HDmrmZOUd7i9VmZNogP -6LRRiTygn2+UphaGV3NDA36ZB/1JRpgvgpzbpZNeAoFvsljIbxGIwkH2JgRF6oNo -eGB3QYzDQJvYVIejk79M0ed3oor4w8OiNVcdxLyVIthFrjrrCqwRP3bLZwCgtY9t -Ezf5WL63Ue45vdht7A2GH+0D/iNAnWKsU7FUMFZrcwMaMbyP7YG8z0+zXUOgtgyP -tbgJG5yikNT3vJypb42gbKfcriUUDC5AeiRmkR8QPvYuOm34rM90+wx2LGqXWnHM -IyLAyl8TS3MQmePem8bfTGTNYxtt3Q7iadez2WYTLBSlmM6hbxZfdwm1hhyM0AJU -YyFUA/9kHH+CUBxKb1UgG7TSp53Po/5p/Yyuty+RJ7zIGv6SiN/JK4/ntWfm5WS5 -ZprSdE5ODoFQ/Gs3/VB/eolg2fBW1DcftH6lKHT3GKEOaicGX+T9eOMerZZedm5U -vDA9mFvWnOdOxK8LuRgVqip4jCnWICchpatmdP0whJQHQ6MGLLRMQ2VudE9TLTUg -QmV0YSBLZXkgKENlbnRPUyA1IEJldGEgU2lnbmluZyBLZXkpIDxjZW50b3MtNS1i -ZXRhLWtleUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwbhAhsDBQkSzAMABgsJCAcD -AgMVAgMDFgIBAh4BAheAAAoJEM/aaIEJLXsrWDkAoKcqa+AAdAWvp5qlJkGQiRy8 -aNFDAJ4qRfIxMiLinmjbqcuygWMp61wY5ohMBBMRAgAMBQJFnwhtBYMSzAF0AAoJ -EDjCFhY5bKCkG/wAn14LDlJqjZv1Wz0WNfhr80+qJrf6AKCaIZExwo4ApQpESk/F -SApLd/pEILkBDQRFnwbrEAQAwKzjI2aTB/sS9HuQ4CHCwrj4vr0HxMMwQikYBIvy -MYTtek04KDTKoJL5g3411DsfDW9VRGJdFCHvldgam/5UVfO6nywLkdwAA5TQA5dv -8YE8jTtwdy5Y1QKFc8LaIBZK0+ZbhEvdNfv67egvfcxZc5PvpBZ3C03n+iQ3wPcg -PhcAAwUD/iYkq4LG/je43Qa5rTz5kF5rIiX7Bk5vXT7XSFOFKwHy8V+PGEoVM1W8 -+EHIlmTycwIlsVp3by6qCDkMYu4V6VukxZNzJyeoMICiYIXUPh6NKHRoqaYlu6ZO -eFN1TQNXmodPk+iNtdbcby/zAklNqoO/dWSwd8NAo8s6WAHq3VPpiE8EGBECAA8F -AkWfBusCGwwFCRLMAwAACgkQz9pogQkteysXkACgoraCU0EBC+W8TuxrsePO20ma -D0IAoLRRQLTEXL0p3K0WE+LfyTr9EVG5 -=mH0S ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-dawson b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-dawson deleted file mode 100644 index c71c504754..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-dawson +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.1 (GNU/Linux) - -mQGiBD/9sIMRBADp28M+gDNgYJ/UMW1Tem0W/D17FAZRVRI8Ht68QcZsq6uS1k3L -HPX7rLG3iKrKj4crvEE+CY/3L182NZ6bRJt61rQLrtSbMFIMvt7L6dG6BYYw0i8P -SqyVC6uPb2W8wi1RtNdQk0pSeDSQh8wCsDDo8WYHkdRztoKWHvd3hAN7NwCgzRVU -QS3Uw6McILxO9cUBgJEhBj8D/38TomjexWRUp+rzs6aouqHoZyslSCUe4aLeJvSQ -Whi1j4E0sgWMJ2L/Ta6FXNM2Of3Ze6delf8eVPZ2N78yELh+LV7DZr5Cy+zDtSWY -WnyWGSqHVEqf0UarpC8XVcJ1jJu3sHfaBf94tnKJI/uipxbD8oU4ixoLvANFR1fp -YfKdBACm+C8Rk2NpXeAtXIyN9UgJPpj9H5IXxnrdYJa0ce72qrrniM0dhGHz9+9H -5d8rVJYTNEW6kDhj79vnFLq86o0n8VIpv/0g38FO+FCi4yVJ49qA2+D7unysBVTm -ZXo3LRMiBJfeh39ONEIg+CWVD6sXo7FTwVKpawJpeO6Lp8nrlbQ6VHJveSBEYXdz -b24gKFNwaWt5IEhhaXIgSGF3YWlpYW4gU2hpcnRzKSA8ZGF3c29uQGZuYWwuZ292 -PohZBBMRAgAZBQI//bCDBAsHAwIDFQIDAxYCAQIeAQIXgAAKCRDaatAIgv0XsoJ2 -AJ9KdOcfYSVAjoUwwrQjARa6xWP/NQCcCJKfBYUVZDiWsiZjVm1EOGcNCSS5AQ0E -P/2whBAEAJYHI18UVqIrZPX3C3FvzXf7MzNs31UPA1iCgp3f02w6nh/XZs8Y0CNB -ig9rCR/e2O8O4Fnl56Z+N+a9H7jPmF8sOhacvqNaS7yAJ+9pHj0op6Az/X69dWnS -AdaFXPB1Tc6ryfNtbs0CB0tWRbjlB4BTd/1PEerLNUNGoLOpFWeXAAMFA/0UD2ku -vIRoQwAjNf1/swcIQe44DNNQYY+GSzi0tXVhytiJquziPk/la2elinl4N1KERrO8 -fgdrHtZl4X7n3nv5GGdwVjQfcZJfzFcGIlzqJOcLHAlVSVEpAJAlkykbx8BDtfod -JbODs9NfU+VwmwrTwyVdpbOEHb9ktdeuabIXMIhGBBgRAgAGBQI//bCEAAoJENpq -0AiC/Rey1JoAnjJ1qsi4gbkb+srAgH2UCBRcM0uQAKCGiibCE9G5udph5YplnHhL -ZpAqxA== -=3u8+ ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-beta b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-beta deleted file mode 100644 index 7b40671a4c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-beta +++ /dev/null @@ -1,61 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQINBEmkAzABEAC2/c7bP1lHQ3XScxbIk0LQWe1YOiibQBRLwf8Si5PktgtuPibT -kKpZjw8p4D+fM7jD1WUzUE0X7tXg2l/eUlMM4dw6XJAQ1AmEOtlwSg7rrMtTvM0A -BEtI7Km6fC6sU6RtBMdcqD1cH/6dbsfh8muznVA7UlX+PRBHVzdWzj6y8h84dBjo -gzcbYu9Hezqgj/lLzicqsSZPz9UdXiRTRAIhp8V30BD8uRaaa0KDDnD6IzJv3D9P -xQWbFM4Z12GN9LyeZqmD7bpKzZmXG/3drvfXVisXaXp3M07t3NlBa3Dt8NFIKZ0D -FRXBz5bvzxRVmdH6DtkDWXDPOt+Wdm1rZrCOrySFpBZQRpHw12eo1M1lirANIov7 -Z+V1Qh/aBxj5EUu32u9ZpjAPPNtQF6F/KjaoHHHmEQAuj4DLex4LY646Hv1rcv2i -QFuCdvLKQGSiFBrfZH0j/IX3/0JXQlZzb3MuMFPxLXGAoAV9UP/Sw/WTmAuTzFVm -G13UYFeMwrToOiqcX2VcK0aC1FCcTP2z4JW3PsWvU8rUDRUYfoXovc7eg4Vn5wHt -0NBYsNhYiAAf320AUIHzQZYi38JgVwuJfFu43tJZE4Vig++RQq6tsEx9Ftz3EwRR -fJ9z9mEvEiieZm+vbOvMvIuimFVPSCmLH+bI649K8eZlVRWsx3EXCVb0nQARAQAB -tDBSZWQgSGF0LCBJbmMuIChiZXRhIGtleSAyKSA8c2VjdXJpdHlAcmVkaGF0LmNv -bT6JAjYEEwECACAFAkpSM+cCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRCT -ioDK8hVB6/9tEAC0+KmzeKceXQ/GTUoU6jy9vtkFCFrmv+c7ol4XpdTt0QhqBOwy -6m2mKWwmm8KfYfy0cADQ4y/EcoXl7FtFBwYmkCuEQGXhTDn9DvVjhooIq59LEMBQ -OW879RwwzRIZ8ebbjMUjDPF5MfPQqP2LBu9N4KvXlZp4voykwuuaJ+cbsKZR6pZ6 -0RQKPHKP+NgUFC0fff7XY9cuOZZWFAeKRhLN2K7bnRHKxp+kELWb6R9ZfrYwZjWc -MIPbTd1khE53L4NTfpWfAnJRtkPSDOKEGVlVLtLq4HEAxQt07kbslqISRWyXER3u -QOJj64D1ZiIMz6t6uZ424VE4ry9rBR0Jz55cMMx5O/ni9x3xzFUgH8Su2yM0r3jE -Rf24+tbOaPf7tebyx4OKe+JW95hNVstWUDyGbs6K9qGfI/pICuO1nMMFTo6GqzQ6 -DwLZvJ9QdXo7ujEtySZnfu42aycaQ9ZLC2DOCQCUBY350Hx6FLW3O546TAvpTfk0 -B6x+DV7mJQH7MGmRXQsE7TLBJKjq28Cn4tVp04PmybQyTxZdGA/8zY6pPl6xyVMH -V68hSBKEVT/rlouOHuxfdmZva1DhVvUC6Xj7+iTMTVJUAq/4Uyn31P1OJmA2a0PT -CAqWkbJSgKFccsjPoTbLyxhuMSNkEZFHvlZrSK9vnPzmfiRH0Orx3wYpMQ== -=21pb ------END PGP PUBLIC KEY BLOCK----- -The following public key can be used to verify RPM packages built and -signed by Red Hat, Inc. for this beta using `rpm -K' using the GNU GPG -package. Questions about this key should be sent to security@redhat.com. - - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.0.6 (GNU/Linux) -Comment: For info see http://www.gnupg.org - -mQGiBDySTqsRBACzc7xuCIp10oj5B2PAV4XzDeVxprv/WTMreSNSK+iC0bEz0IBp -Vnn++qtyiXfH+bGIE9jqZgIEnpttWhUOaU5LhcLFzy+m8NWfngIFP9QfGmGAe9Gd -LFeAdhj4RmSG/vgr7vDd83Hz22dv403Ar/sliWO4vDOrMmZBG57WGYTWtwCgkMsi -UUQuJ6slbzKn82w+bYxOlL0EAIylWJGaTkKOTL5DqVR3ik9aT0Dt3FNVYiuhcKBe -II4E3KOIVA9kO8in1IZjx2gs6K2UV+GsoAVANdfKL7l9O+k+J8OxhE74oycvYJxW -QzCgXMZkNcvW5wyXwEMcr6TVd/5BGztcMw8oT3/l2MtAEG/vn1XaWToRSO1XDMDz -+AjUA/4m0mTkN8S4wjzJG8lqN7+quW3UOaiCe8J3SFrrrhE0XbY9cTJI/9nuXHU1 -VjqOSmXQYH2Db7UOroFTBiWhlAedA4O4yuK52AJnvSsHbnJSEmn9rpo5z1Q8F+qI -mDlzriJdrIrVLeDiUeTlpH3kpG38D7007GhXBV72k1gpMoMcpbQ3UmVkIEhhdCwg -SW5jLiAoQmV0YSBUZXN0IFNvZnR3YXJlKSA8cmF3aGlkZUByZWRoYXQuY29tPohX -BBMRAgAXBQI8l5p/BQsHCgMEAxUDAgMWAgECF4AACgkQ/TcmiYl9oHqdeQCfZjw4 -F9sir3XfRAjVe9kYNcQ8hnIAn0WgyT7H5RriWYTOCfauOmd+cAW4iEYEEBECAAYF -AjyXmqQACgkQIZGAzdtCpg5nDQCfepuRUyuVJvhuQkPWySETYvRw+WoAnjAWhx6q -0npMx4OE1JGFi8ymKXktuQENBDySTq4QBADKL/mK7S8E3synxISlu7R6fUvu07Oc -RoX96n0Di6T+BS99hC44XzHjMDhUX2ZzVvYS88EZXoUDDkB/8g7SwZrOJ/QE1zrI -JmSVciNhSYWwqeT40Evs88ajZUfDiNbS/cSC6oui98iS4vxd7sE7IPY+FSx9vuAR -xOa9vBnJY/dx0wADBQQAosm+Iltt2uigC6LJzxNOoIdB5r0GqTC1o5sHCeNqXJhU -ExAG8m74uzMlYVLOpGZi4y4NwwAWvCWC0MWWnnu+LGFy1wKiJKRjhv5F+WkFutY5 -WHV5L44vp9jSIlBCRG+84jheTh8xqhndM9wOfPwWdYYu1vxrB8Tn6kA17PcYfHSI -RgQYEQIABgUCPJJergAKCRD9NyaJiX2geiCPAJ4nEM4NtI9Uj8lONDk6FU86PmoL -yACfb68fBd2pWEzLKsOk9imIobHHpzE= -=gpIn ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former deleted file mode 100644 index 3818b2c926..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former +++ /dev/null @@ -1,37 +0,0 @@ -The following public key can be used to verify RPM packages built and -signed by Red Hat, Inc. This key is used for packages in Red Hat -products shipped prior to November 2006, and for all updates to those -products. - -Questions about this key should be sent to security@redhat.com. - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.0.0 (GNU/Linux) -Comment: For info see http://www.gnupg.org - -mQGiBDfqVDgRBADBKr3Bl6PO8BQ0H8sJoD6p9U7Yyl7pjtZqioviPwXP+DCWd4u8 -HQzcxAZ57m8ssA1LK1Fx93coJhDzM130+p5BG9mYSWShLabR3N1KXdXQYYcowTOM -GxdwYRGr1Spw8QydLhjVfU1VSl4xt6bupPbWJbyjkg5Z3P7BlUOUJmrx3wCgobNV -EDGaWYJcch5z5B1of/41G8kEAKii6q7Gu/vhXXnLS6m15oNnPVybyngiw/23dKjS -ZVG7rKANEK2mxg1VB+vc/uUc4k49UxJJfCZg1gu1sPFV3GSa+Y/7jsiLktQvCiLP -lncQt1dV+ENmHR5BdIDPWDzKBVbgWnSDnqQ6KrZ7T6AlZ74VMpjGxxkWU6vV2xsW -XCLPA/9P/vtImA8CZN3jxGgtK5GGtDNJ/cMhhuv5tnfwFg4b/VGo2Jr8mhLUqoIb -E6zeGAmZbUpdckDco8D5fiFmqTf5+++pCEpJLJkkzel/32N2w4qzPrcRMCiBURES -PjCLd4Y5rPoU8E4kOHc/4BuHN903tiCsCPloCrWsQZ7UdxfQ5LQiUmVkIEhhdCwg -SW5jIDxzZWN1cml0eUByZWRoYXQuY29tPohVBBMRAgAVBQI36lQ4AwsKAwMVAwID -FgIBAheAAAoJECGRgM3bQqYOsBQAnRVtg7B25Hm11PHcpa8FpeddKiq2AJ9aO8sB -XmLDmPOEFI75mpTrKYHF6rkCDQQ36lRyEAgAokgI2xJ+3bZsk8jRA8ORIX8DH05U -lMH27qFYzLbT6npXwXYIOtVn0K2/iMDj+oEB1Aa2au4OnddYaLWp06v3d+XyS0t+ -5ab2ZfIQzdh7wCwxqRkzR+/H5TLYbMG+hvtTdylfqIX0WEfoOXMtWEGSVwyUsnM3 -Jy3LOi48rQQSCKtCAUdV20FoIGWhwnb/gHU1BnmES6UdQujFBE6EANqPhp0coYoI -hHJ2oIO8ujQItvvNaU88j/s/izQv5e7MXOgVSjKe/WX3s2JtB/tW7utpy12wh1J+ -JsFdbLV/t8CozUTpJgx5mVA3RKlxjTA+On+1IEUWioB+iVfT7Ov/0kcAzwADBQf9 -E4SKCWRand8K0XloMYgmipxMhJNnWDMLkokvbMNTUoNpSfRoQJ9EheXDxwMpTPwK -ti/PYrrL2J11P2ed0x7zm8v3gLrY0cue1iSba+8glY+p31ZPOr5ogaJw7ZARgoS8 -BwjyRymXQp+8Dete0TELKOL2/itDOPGHW07SsVWOR6cmX4VlRRcWB5KejaNvdrE5 -4XFtOd04NMgWI63uqZc4zkRa+kwEZtmbz3tHSdRCCE+Y7YVP6IUf/w6YPQFQriWY -FiA6fD10eB+BlIUqIw80VgjsBKmCwvKkn4jg8kibXgj4/TzQSx77uYokw1EqQ2wk -OZoaEtcubsNMquuLCMWijYhGBBgRAgAGBQI36lRyAAoJECGRgM3bQqYOhyYAnj7h -VDY/FJAGqmtZpwVp9IlitW5tAJ4xQApr/jNFZCTksnI+4O1765F7tA== -=3AHZ ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release deleted file mode 100644 index 09aded8bec..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release +++ /dev/null @@ -1,24 +0,0 @@ -The following public key can be used to verify RPM packages built and -signed by Red Hat, Inc. This key is used for packages in Red Hat -products shipped after November 2006, and for all updates to those -products. - -Questions about this key should be sent to security@redhat.com. - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEV2EyQRBAD4/SR69qoLzK4HIa6g9iS+baiX0o3NjkLftFHg/xy+IMOMg//i -4c5bUpLKDTMH3+yT0G8qpul/RALUFOESKFkZm3/SlkJKuroXcB8U6s2dh5XX9DDB -ISqRwL7M5qB8rfDPKHN+k/XwJ9CNpHMdNxnnc2WhnnmHNp6NrD/bUEH4vwCglMa0 -rFRXPaN7407DARGHvW/jugsEANFaeZsFwos/sajL1XQRfHZUTnvDjJgz31IFY+OL -DlOVAOtV/NaECMwIJsMIhoisW4Luwp4m75Qh3ogq3bwqSWNLsfJ9WFnNqXOgamyD -h/F4q492z6FpyIb1JZLABBSH7LEQjHlR/s/Ct5JEWc5MyfzdjBi6J9qCh3y/IYL0 -EbfRA/4yoJ/fH9uthDLZsZRWmnGJvb+VpRvcVs8IQ4aIAcOMbWu2Sp3U9pm6cxZF -N7tShmAwiiGj9UXVtlhpj3lnqulLMD9VqXGF0YgDOaQ7CP/99OEEhUjBj/8o8udF -gxc1i2WJjc7/sr8IMbDv/SNToi0bnZUxXa/BUjj92uaQ6/LupbQxUmVkIEhhdCwg -SW5jLiAocmVsZWFzZSBrZXkpIDxzZWN1cml0eUByZWRoYXQuY29tPohfBBMRAgAf -BQJFdhMkAhsDBgsJCAcDAgQVAggDAxYCAQIeAQIXgAAKCRBTJoEBNwFxhogXAKCD -TuYeyQrkYXjg9JmOdTZvsIVfZgCcCWKJXtfbC5dbv0piTHI/cdwVzJo= -=mhzo ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx deleted file mode 100644 index 0f875c0e20..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEYk7/IRBACdWFJInc51/+0sqvadIvf0E+Vhv4aIqB76jWtIGqXnTeG6hEl/ -9tJoLszBh4g/KBFVF3E4VxTHXKO/L7GZRa8JzoMtvV8XiP6BaYq6ykx6H7alKvoP -qzk7xBbvNbqsXJCO7keo+g7iIDdfAxvsSJYbhQBxDn5W4Hw7SnHcMmTDOQCg7vOj -UzaZG32yYMBZLjOAB/QzXgsD/1JRDnQ8cL6d17B1ie57ZuVOI3ziQJSmj0zbC0IX -OsxlcFjwydLk3TA88iCr0SO2mfXCsGTeDGFbrl2IRCoH91l3Ew49HI4OYtl+OPSt -pIYdFLSQ+RUPs9CFYwF9Ogjrwmi6jVptKq/+v0WgnCrbfz3DYxCWt/VB1PYDj5y6 -Mv//BACKa2mUuQoukDvzqiwZXV/Z52MeDOzPbOFo6qhx+54nav9Inz1yziEjYrP/ -ZrNJ4BT6fBgin/a6UmD5FqMtkrrhOCpHFQK2H+XYZ0vVJGZI7h74/fY8U2n+1Mle -xQ/ejWojF+H5nFUAwKHaNVNofKcw8c8msgGn2jsvrAISTSHshrQwUmVkIEhhdCwg -SW5jLiAoUkhYIGtleSkgPHJoeC1zdXBwb3J0QHJlZGhhdC5jb20+iF8EExECAB8F -AkYk7/ICGwMGCwkIBwMCBBUCCAMDFgIBAh4BAheAAAoJEDmhOhJCGT5r6FoAoLsB -+DOPmTc3P+77DnNhU460nmjQAKCI3BJ/SxqPqfp8jL6lTfVo2zxegQ== -=t0np ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-release b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-release deleted file mode 100644 index 47c6be6700..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-release +++ /dev/null @@ -1,62 +0,0 @@ -The following public key can be used to verify RPM packages built and -signed by Red Hat, Inc. This key is used for packages in Red Hat -products shipped after November 2009, and for all updates to those -products. - -Questions about this key should be sent to security@redhat.com. - -pub 4096R/FD431D51 2009-10-22 Red Hat, Inc. (release key 2) - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQINBErgSTsBEACh2A4b0O9t+vzC9VrVtL1AKvUWi9OPCjkvR7Xd8DtJxeeMZ5eF -0HtzIG58qDRybwUe89FZprB1ffuUKzdE+HcL3FbNWSSOXVjZIersdXyH3NvnLLLF -0DNRB2ix3bXG9Rh/RXpFsNxDp2CEMdUvbYCzE79K1EnUTVh1L0Of023FtPSZXX0c -u7Pb5DI5lX5YeoXO6RoodrIGYJsVBQWnrWw4xNTconUfNPk0EGZtEnzvH2zyPoJh -XGF+Ncu9XwbalnYde10OCvSWAZ5zTCpoLMTvQjWpbCdWXJzCm6G+/hx9upke546H -5IjtYm4dTIVTnc3wvDiODgBKRzOl9rEOCIgOuGtDxRxcQkjrC+xvg5Vkqn7vBUyW -9pHedOU+PoF3DGOM+dqv+eNKBvh9YF9ugFAQBkcG7viZgvGEMGGUpzNgN7XnS1gj -/DPo9mZESOYnKceve2tIC87p2hqjrxOHuI7fkZYeNIcAoa83rBltFXaBDYhWAKS1 -PcXS1/7JzP0ky7d0L6Xbu/If5kqWQpKwUInXtySRkuraVfuK3Bpa+X1XecWi24JY -HVtlNX025xx1ewVzGNCTlWn1skQN2OOoQTV4C8/qFpTW6DTWYurd4+fE0OJFJZQF -buhfXYwmRlVOgN5i77NTIJZJQfYFj38c/Iv5vZBPokO6mffrOTv3MHWVgQARAQAB -tDNSZWQgSGF0LCBJbmMuIChyZWxlYXNlIGtleSAyKSA8c2VjdXJpdHlAcmVkaGF0 -LmNvbT6JAjYEEwECACAFAkrgSTsCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAK -CRAZni+R/UMdUWzpD/9s5SFR/ZF3yjY5VLUFLMXIKUztNN3oc45fyLdTI3+UClKC -2tEruzYjqNHhqAEXa2sN1fMrsuKec61Ll2NfvJjkLKDvgVIh7kM7aslNYVOP6BTf -C/JJ7/ufz3UZmyViH/WDl+AYdgk3JqCIO5w5ryrC9IyBzYv2m0HqYbWfphY3uHw5 -un3ndLJcu8+BGP5F+ONQEGl+DRH58Il9Jp3HwbRa7dvkPgEhfFR+1hI+Btta2C7E -0/2NKzCxZw7Lx3PBRcU92YKyaEihfy/aQKZCAuyfKiMvsmzs+4poIX7I9NQCJpyE -IGfINoZ7VxqHwRn/d5mw2MZTJjbzSf+Um9YJyA0iEEyD6qjriWQRbuxpQXmlAJbh -8okZ4gbVFv1F8MzK+4R8VvWJ0XxgtikSo72fHjwha7MAjqFnOq6eo6fEC/75g3NL -Ght5VdpGuHk0vbdENHMC8wS99e5qXGNDued3hlTavDMlEAHl34q2H9nakTGRF5Ki -JUfNh3DVRGhg8cMIti21njiRh7gyFI2OccATY7bBSr79JhuNwelHuxLrCFpY7V25 -OFktl15jZJaMxuQBqYdBgSay2G0U6D1+7VsWufpzd/Abx1/c3oi9ZaJvW22kAggq -dzdA27UUYjWvx42w9menJwh/0jeQcTecIUd0d0rFcw/c1pvgMMl/Q73yzKgKYw== -=zbHE ------END PGP PUBLIC KEY BLOCK----- -The following public key can be used to verify RPM packages built and -signed by Red Hat, Inc. This key is a supporting (auxiliary) key for -Red Hat products shipped after November 2006 and for all updates to -those products. - -Questions about this key should be sent to security@redhat.com. - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEVwDGkRBACwPhZIpvkjI8wV9sFTDoqyPLx1ub8Sd/w+YuI5Ovm49mvvEQVT -VLg8FgE5JlST59AbsLDyVtRa9CxIvN5syBVrWWWtHtDnnylFBcqG/A6J3bI4E9/A -UtSL5Zxbav0+utP6f3wOpxQrxc+WIDVgpurdBKAQ3dsobGBqypeX6FXZ5wCgou6C -yZpGIBqosJaDWLzNeOfb/70D/1thLkQyhW3JJ6cHCYJHNfBShvbLWBf6S231mgmu -MyMlt8Kmipc9bw+saaAkSkVsQ/ZbfjrWB7e5kbMruKLVrH+nGhamlHYUGyAPtsPg -Uj/NUSj5BmrCsOkMpn43ngTLssE9MLhSPj2nIHGFv9B+iVLvomDdwnaBRgQ1aK8z -z6MAA/406yf5yVJ/MlTWs1/68VwDhosc9BtU1V5IE0NXgZUAfBJzzfVzzKQq6zJ2 -eZsMLhr96wbsW13zUZt1ing+ulwh2ee4meuJq6h/971JspFY/XBhcfq4qCNqVjsq -SZnWoGdCO6J8CxPIemD2IUHzjoyyeEj3RVydup6pcWZAmhzkKrQzUmVkIEhhdCwg -SW5jLiAoYXV4aWxpYXJ5IGtleSkgPHNlY3VyaXR5QHJlZGhhdC5jb20+iF4EExEC -AB4FAkVwDGkCGwMGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQRWiciC+mWOC1rQCg -ooNLCFOzNPcvhd9Za8C801HmnsYAniCw3yzrCqtjYnxDDxlufH0FVTwX -=d/bm ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-remi b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-remi deleted file mode 100644 index 3283386064..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-remi +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.7 (GNU/Linux) - -mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 -/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA -/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L -0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh -dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp -AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B -Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY -iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD -1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs -ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI -BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ -MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj -C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 -HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa -o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw -CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv -JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK -8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i -gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== -=6Rbg ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag deleted file mode 100644 index 8ee27f45b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag +++ /dev/null @@ -1,32 +0,0 @@ -The following public key can be used to verify RPM packages -downloaded from http://dag.wieers.com/apt/ using 'rpm -K' -if you have the GNU GPG package. -Questions about this key should be sent to: -Dag Wieers - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.1 (GNU/Linux) - -mQGiBD9JMT0RBAC9Q2B0AloUMTxaK73sD0cOu1MMdD8yuDagbMlDtUYA1aGeJVO6 -TV02JLGr67OBY+UkYuC1c3PUwmb3+jakZd5bW1L8E2L705wS0129xQOZPz6J+alF -5rTzVkiefg8ch1yEcMayK20NdyOmhDGXQXNQS8OJFLTIC6bJs+7MZL83/wCg3cG3 -3q7MWHm3IpJb+6QKpB9YH58D/2WjPDK+7YIky/JbFBT4JPgTSBy611+bLqHA6PXq -39tzY6un8KDznAMNtm+NAsr6FEG8PHe406+tbgd7tBkecz3HPX8nR5v0JtDT+gzN -8fM3kAiAzjCHUAFWVAMAZLr5TXuoq4lGTTxvZbwTjZfyjCm7gIieCu8+qnPWh6hm -30NgA/0ZyEHG6I4rOWqPks4vZuD+wlp5XL8moBXEKfEVOMh2MCNDRGnvVHu1P3eD -oHOooVMt9sWrGcgxpYuupPNL4Uf6B6smiLlH6D4tEg+qCxC17zABI5572XJTJ170 -JklZJrPGtnkPrrKMamnN9MU4RjGmjh9JZPa7rKjZHyWP/z/CBrQ1RGFnIFdpZWVy -cyAoRGFnIEFwdCBSZXBvc2l0b3J5IHYxLjApIDxkYWdAd2llZXJzLmNvbT6IWQQT -EQIAGQUCP0kxPQQLBwMCAxUCAwMWAgECHgECF4AACgkQog5SFGuNeeYvDQCeKHST -hIq/WzFBXtJOnQkJGSqAoHoAnRtsJVWYmzYKHqzkRx1qAzL18Sd0iEYEEBECAAYF -Aj9JMWAACgkQoj2iXPqnmevnOACfRQaageMcESHVE1+RSuP3txPUvoEAoJAtOHon -g+3SzVNSZLn/g7/Ljfw+uQENBD9JMT8QBACj1QzRptL6hbpWl5DdQ2T+3ekEjJGt -llCwt4Mwt/yOHDhzLe8SzUNyYxTXUL4TPfFvVW9/j8WOkNGvffbs7g84k7a5h/+l -IJTTlP9V9NruDt1dlrBe+mWF6eCY55OFHjb6nOIkcJwKxRd3nGlWnLsz0ce9Hjrg -6lMrn0lPsMV6swADBQP9H42sss6mlqnJEFA97Fl3V9s+7UVJoAIA5uSVXxEOwVoh -Vq7uECQRvWzif6tzOY+vHkUxOBRvD6oIU6tlmuG3WByKyA1d0MTqMr3eWieSYf/L -n5VA9NuD7NwjFA1kLkoDwfSbsF51LppTMkUggzwgvwE46MB6yyuqAVI1kReAWw+I -RgQYEQIABgUCP0kxPwAKCRCiDlIUa4155oktAKDAzm9QYbDpk6SrQhkSFy016BjE -BACeJU1hpElFnUZCL4yKj4EuLnlo8kc= -=mqUt ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl deleted file mode 100644 index 70b6bd17ef..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl +++ /dev/null @@ -1,32 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQGiBEpXadARBACHhOfMUuT/4iDvBRmm6bEsvnMN++L79aYhEUMNlrZ2TjKPjPvG -Y0vGk+I0JhUJWutkQRZVbqgVDsNjmnELnACK+xvdryvtxh50wCI9WUl7CT5EV7BS -/jD7JxTFbXyC/Xv0ixMB9vj6U9cySyE8PxONp0HzO6LTIr1OMPgDUsP4lwCgh8De -fmY8TN2m9a0huLdNrnmKw0cD/2bkt6rJAi3+BGHWNgQ9Nb/4wQff8BKGDtL/8acp -3yH91axuD2iYCKw0ZP5akBpRGv+4e30Plmbi1f5NaEDo9Ga1c4TDPopwgiYhrVLj -56efoTfP2AiZl3iBKFPI83/YOhrVZF8UiYoAoUnOFpOg8vmtCzgvYip5UZLTgbfJ -lcWvA/9vMb8By+1pHjW98d7GkzvZqzyMtWlbO7PXCn8P7bGQYjwvyTGiRNz3q22c -2Z29qQw4r1L1L1JGsUwuOMahkczWVdD4TRHc8mhVJEUEA6AkNAZc+Ymsfr/ip0kX -nSZLE3pYVifOhBRO8EbT0WhCMScmZNpwvZU//HKL/p+n3LArUrRZU2NpZW50aWZp -YyBMaW51eCAoUlBNIHNpZ25pbmcga2V5IGZvciBTY2llbnRpZmljIExpbnV4KSA8 -c2NpZW50aWZpYy1saW51eC1kZXZlbEBmbmFsLmdvdj6IYAQTEQIAIAUCSldp0AIb -AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJELC0GD8ZKn19cXIAnA5R+EbaYr4/ -IL6It/UxHXlBFIajAJ9bwmNDF14uvDnFigg1PLevLTBnTIhGBBARAgAGBQJKV6lf -AAoJENpq0AiC/ReyKLQAmwVC/Ii3sAKsptwZKHw/uk1kbupCAJ0eIzSaUo1hSa1V -fP7O/dqigu6JAbkCDQRKV2nZEAgAzAcaC7unRNdrIwAGGKqOIvI8WNwpftHY50Y5 -zPSl7vtWVkp3N+2fynJR+tW4G/2xDChBbPzPz/TavRyBc21LKzAlym8qIGEE02cZ -U/YJAYnbAkNNiGMOAnAIjBw1KUcQamAxdk0glE7MP1JiXY1MO4tTW38UEcvQbSvg -Mh/eECqFOwiQXJmkPpZhPUwnwmZRCV4vlCZQM3CMExZ9pDV/V+kuhefw2WeheXyh -g4DC88gcrv2mO0I3sVmpxn3JLMayiMlQbOSYLQuNVKN/EFDwuAbS9Ane7vm6wF9X -NswMX0I/vO1IVvSN1fi5ZM71QzeYUGKBQv97kLO20hbRWZ1V+wADBggAys+jhlYH -mtFZQxV4an1ucqnVauKnstj0zF88Hiy7yivT3W5h3Zd067uOfcBQCJUlt7y8sYD2 -q9htm5Rrxx+J29bl0zxwrEatnv0gLzprSa7Ei3wR6IrvBM3Ic0mGSzlsSxlzaFtt -Pwak5C47vX9+PwKEKXFdM1gVzHTuD6PXEYxA4YMlQGeGVA68FvTHxMHpf8POQWTV -QtjoI0flvFT7d4ozqUJdjJZxJDFQ7GO2YdIfF3sUdfn5kFxK0SUzqrmCYXeheniS -LKC4mpAR0PetWJ7r1gY5khHb2eHW1vdEBYUXlHjB+jLaOBns05MHMZYd4CHe8q/Q -gzMeVlh8YLSdZYhJBBgRAgAJBQJKV2nZAhsMAAoJELC0GD8ZKn19iU8AniUIFu32 -VeRJ+VKL2vBQMVbFVZOMAJ434Bi99fN2CSh7T62oxtQvhw70fw== -=eL9H ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl3 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl3 deleted file mode 100644 index 5d16185468..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl3 +++ /dev/null @@ -1,34 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQGiBEpXatkRBADSVLhSFxxebo3H16HGjvOg+tSAuppoqrmg9WrC2ly6I41BHXng -n2H0t07nAemb35XSRfb6j4vNIiNoXGFzcjTMP5/cwn24hvilXyA0zX59hhD0ut4c -VGksNhUKnYkVI/+0+EjJ3RnCouVvVx8p2eCIDhjIueDjuLp3mVBLYh7OEwCgmQrO -ysS+xHHcYfUX4jsghfzge10EAIuMAXGWmMLRUJ6PCjrAKVVGT4FxH53UyPjXGXga -SYR4A4aFq9eoDPLRo/nRB/isT0/NfcBbp4wdzYUxz8pmMOWGLFjg7DBBvOj84q+0 -ZFibybxFJAtjaZcKw+feCb6R2tJPOfJr6+noOeAZ9MFYZ7z5NG5vezGB1rLu/c5k -vb5LA/9wI8pz7jCMOPBE4LGO9C1tbvKfrFHEfsgn5zsF/+YABCrbHrc2eN2NESpv -84jLHvrssKaPjJVHL1JlRRfO2myT37hLa/D3pUrAcs/CqWGeddKkhJE7c816EO6d -FZU5/7Utill9x3tLu8ZS+WXkH5sr/garxim5P3Sm3K1/ZXZaEbRbU2NpZW50aWZp -YyBMaW51eCAoUlBNIHNpZ25pbmcga2V5IGZvciBTY2llbnRpZmljIExpbnV4IDMp -IDxzY2llbnRpZmljLWxpbnV4LWRldmVsQGZuYWwuZ292PohgBBMRAgAgBQJKV2rZ -AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQAYjOtesQYlrupwCfR65pEGRf -air4Nzf+ZP5Q2i8doscAnAhod/cVNjPA9Lo4UOEAJ5kWZ4CXiEYEEBECAAYFAkpX -pTwACgkQsLQYPxkqfX2m9QCfUzSI3MVchLk00M2c67Xj7ghvNaMAn3TybHcAHpGu -pJ8qBwisCX6mPMSqiEYEEBECAAYFAkpXqW4ACgkQ2mrQCIL9F7LGjwCfWBc67ftN -jTGxL+ilnrYyZhupKd8AoKoSkHG61pxk+Ja58aSvsGRWAdv9uQINBEpXat0QCADG -G22g1V5t8xoxjA5sgDw+ow3QonkA8p+EEr1+xjZyJTsMMiRioz88WH54xcbLBoCM -ltgK3gSYpywEoB76yzFS/woLSjBdCLEMwX6Dj/y1U67ykoDoop31LIW8a4geYJpW -0a83Np00noLidNi7xhuExvp3BxHPpM9mVvqfDOkFcuiexaAU9uF6cgVov8eE95l9 -jWcNn1oLnqo2mq2pqJFk0Qkq612Nj2TWOdcrJlksIqEG+H6Jn434u+leGgyR6RnW -Ty4OS4JnwRYXeAfLh2wCCFPWVL6eQTfRjkWmjWlvKIgz8YX+vTx7SfYsfhPRKkgs -ZS0VyRkUSV8EkkRlaRw3AAQLB/9YOgCeW673SBZJUITb1TM4bxT2bk03ORpfqPzu -NBfb4Szm1lsJvlOgEfwZZR2UcQeCqm+WtSSx/Ajce/LA/Q+MYW0X/Vcy1pEYYhs1 -9YRZ/1Q7+JR2Q/hCMBvtMf3XN+1sEjHwPJpskq0qBng6SofE+V7FOELswfSk6j+b -2d4G4WEyuiaj6FD5tvrWFmcWgBnhpGG+Rx2n1UT1lqk+r81H4iZB6MoIkicR1gyx -i6mfqJnKMFSWeeXddx7kr6xclDungGlTF/dnk5K73CRm5XBxxYsUYS1Kz8tF6MbB -d/FYJjYlQWx2eAh1xoimlnBgX8BNsmzjbvOtcLtZOUTT95F2iEkEGBECAAkFAkpX -at0CGwwACgkQAYjOtesQYlqHcACfQqTUZxtuSjHWeM2yODl4Cb6kMqkAnjgBLM1s -uix25Q+HkPygJyHv7nEI -=eJoE ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl4 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl4 deleted file mode 100644 index 14f3096678..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl4 +++ /dev/null @@ -1,34 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQGiBEpXa1QRBACRt4l3x+38VrBV58HhPrz8iOKDhMVzBODGetPzqmIX0bLz7nz/ -ZYmEPsY0Nhnp77e3cU4YRSUKOM96BZwo8DsJz9sT14b3IozNEo2R7JZNp22RrvU4 -gRXjgQmg5N83tnU03KK/IxrbjdO29Go3vGBWM4tWxUoGLG9kQGhYtZL0MwCgn13c -xYt5JRtxLdfNM/Kxbg4FDTsD/31hBoeMetdNHjuMq+I3SMgnAATkgQ1TZHj8lCV3 -y0qM0zAfVRuPSTVodlJuMjOUKkERAAWqzXiNkgKtIgREBORmz6d9q/bangLr9ygL -fz/4vTxtfdmXxG8Ru/zVF9Ulu1GuLZKlP1PZosZsMQfbByWVOybg38qdyeC93EGd -qmrBBACQeehjanXRjgEROKXkpe2A6w31m0iu2sT42TUvq5neSXjrFTXN8YPd0SpK -8IiCZHkAh3YBCRogfT7T+uWQsrwICCAf00pEAuP9c6BUeepbjQZPK2fqD16lhRn8 -A1TjdngDto45/2T8eIUafh8ONheRuA1Lnb3gV92fUSkQDppw57RbU2NpZW50aWZp -YyBMaW51eCAoUlBNIHNpZ25pbmcga2V5IGZvciBTY2llbnRpZmljIExpbnV4IDQp -IDxzY2llbnRpZmljLWxpbnV4LWRldmVsQGZuYWwuZ292PohgBBMRAgAgBQJKV2tU -AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ8VzxvJUFci5eswCffepTdZlb -60FSFxWfLGXdr6NLVY0Anj2ILigIHnOQ/Tb0fX4Wok2rObm1iEYEEBECAAYFAkpX -pPwACgkQsLQYPxkqfX27WgCfccR97sqL4klabdAmAkQ0TSXZ+AgAn0FUCu92L9xP -i9td6W7lPh0zdnudiEYEEBECAAYFAkpXqXsACgkQ2mrQCIL9F7LzywCdGT6FQ4ZT -swwxZA63MrLn7ZdN/r4AoLvfdudahfiuiZQtGTYvoR3gzw70uQINBEpXa10QCACr -GeMNUJTtApiwStqIKXGj5BahvI2muQPOF0yr5fqpOwA1SnucTQmwEVtBHRhR+J3V -iOQ8igyMUxOe0F6JCOAbZIx0G5iVs51+wT1LYD2bQkUoObIToGut9r6NlI2selcP -lqx2ckziGVOSU77/7MoGo5GNbWJaNHWCNh6zrA+5hKY46va7hkm0WFFvlZ+U8OCB -aI8BnwB7JZCNdrBgL37oX1qm53BboDaE4aY/73gIvCd3M5bjuqbe666zvQo8xdbL -wiSe8LrHHa7EHxWNFYxv91H56FIP7sbnbiSYKZiOMahnc2hBAa0CAsWhWKDSnqt4 -IN6VOMvqooFllvRXLVgnAAQLCACMm7NhtX0k5AAz3dsXREiQ5hpCS0+djxHTOyAf -aYjB9FTV2WfWQ9G/KTowpQm4nu6IHzFtHWn8mt7/wnxnSIPeykjgAeuzXd/mSBM6 -/FobeXZsb7a6vDZNP4gSGzMAv7xl4QdBWGxQMRED7Lvg1rU70Dh/X2WvRu3a0MBy -xHdTBmpIUIQJ0VV6ikGXvu7DS2skvL7lZxKTHPr0zho6rf9De7GJ6FGCAKfdmgjQ -Gm1i9/pH05UQ4+FD/JyNwEX/CPf8qb6PgtwoJeJ+SPnWZlayYBEB03sK1fD/RIfF -TbRoJz8YRBniC0AwLlUj3n6IdVGrcK8vy2MvVHF//cXLmCroiEgEGBECAAkFAkpX -a10CGwwACgkQ8VzxvJUFci4ylgCY4OS+SEAqiiqz1VBCKq5PxNpzXgCffwtqFgV9 -aFtaKnBEuQRBQ5uz+mA= -=G01V ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl5 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl5 deleted file mode 100644 index 1e1c594ae7..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl5 +++ /dev/null @@ -1,34 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQGiBEpXa6URBADLDs4W73NK1DOZq0mWfmMwv27uaAS4RZuJJWj6eTmF2YcAdVPr -rsfvBB1GrN5YluqGCN0CBSULtmoxE8AVB/2kGgIZmD7x10+dMXn0cYJrQuTjtf1z -xos1cmdzK7Or0p5dQbuxvlpEseFATGimggBeunwSt5qMpXqN9/1dqksK0wCgi/Tu -JyR3Wsg0NqZrUbr5vEiqHoMEALmYht9n6lCt4j6oYZGZ1DlTwjaAjeJe9qdDlbx7 -fNsfFwV1fqMFc2Bop7UJXfTytVXzDwISsn5YLK2ty1kSuA/7PCt7OkrbchBwm/y0 -5KiGjnC0D+6qdApnwJClWFsu6VqquRiplAJ+6bMw/z+VXVnJztMx09tQ/M9idN// -mJYHA/9989JcHDi0hPlCCYHGs9Bw70H9TvzanKwq5GRlSbEDz9LrrJopJuz788Xu -xg0WXVlduwrEqU2wlq8lY2m6UlkfIya/fs6NkDCJE3bHSMjfovpL6cUFCKedKsas -ODOio6i3ZEcWXz3w4Dv43Mb/z1m8Fe5e6Z0jw5OwEQeWLIHHjbRbU2NpZW50aWZp -YyBMaW51eCAoUlBNIHNpZ25pbmcga2V5IGZvciBTY2llbnRpZmljIExpbnV4IDUp -IDxzY2llbnRpZmljLWxpbnV4LWRldmVsQGZuYWwuZ292PohgBBMRAgAgBQJKV2ul -AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQKHfjrROgotzliQCfdmgSNeDY -fkako6w5P1RgYg+gnoAAnjdtRp8wrrlT7lD1fyZelaX+5GOxiEYEEBECAAYFAkpX -pFMACgkQsLQYPxkqfX1tUACdEsZdXFXMG2nhU4Eema+NQ7dPT3EAn2xH8ARaCHLo -xg/knc9G04Wd0Q6NiEYEEBECAAYFAkpXqYgACgkQ2mrQCIL9F7Ji0gCbBQ6cYMbI -Dd9B+cYFXDrSDqUmkXMAoJAv8rAPO4IfRsVd++gt28/G293TuQINBEpXa6gQCAC3 -VnB5gncnFQSjlu0YXhMQzOlXZ1/UVT262emIACbECDTUoy9U1J4VEecZimIe/BId -uEEBY76i5pmvEV5iWzP3UbCCCUQmpMlFk2LV1jci30/2uTSVXL3yicfrOs74W3rG -4DxN3cHbttEAZJgH0nKAg48APWsKOgrlgzPk63/vzcuymSnXWTiYksslXQ+NYOoV -2Oux9y65K1PjEZoftjorrtcx4E6P0LO5hoowFucfo3VEYpzCjeLogjMmS5Af5GyI -+/5QSQLQ+m0vzppwE8mIt1jsHtEy/0XIdOZTIA10e/I4AvxVoRHbdVY1LjtrkXKN -CGTyaydBe3a4MDoUQWTzAAMGCACW8tORZd0boInktcNWS/szBgAllwPVhFUF4hk7 -pp1rPsiW3h36ARvhvdtNlHHgFPExU4fSinnpMUL0ajx4jEXGg6178WHMFvLUw6ww -Ts1rXaHHagLwemG9iQ1++lLewSkqlKOjVvdV03WOHBwt5GTNe7KCuuM2ko27wSVY -YpbP4A5jEhMkQuWsXPpNu+Oj5uS8XzrIR9McHK0lD9vU2cUUM7OauRo4obygodOa -cwmd0NnRyYf5aPMn4AI795/eWuFK1WYz1Fe7uX7PNcrc2oGEUuqADFNfwtN2HN1V -4dDBHUiPiPydrSml2l4T2NOLI2wVaXIfKdM/6R4agf7lruJliEkEGBECAAkFAkpX -a6gCGwwACgkQKHfjrROgotzpAwCfbLfWIHyWyaWdBRRTixIRs/LFkzYAn3eVy9pL -omk16gZFWxiB8lelViC1 -=ta+t ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl6 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl6 deleted file mode 100644 index 70e93822bc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl6 +++ /dev/null @@ -1,34 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQGiBEpXa+QRBADFJtkQOdBsPIElO4SQnri0o6+d1uaaIkclI3uu88Pmy7LkBO4L -y8U7jKS1y4m6I49hpqALM43wq8tm7BYWObd+xlol2mZEgbrxHoFugqfEKAOKxLut -CkCC0wFOK3psQQMSNLokPHYLP6MJL84VsS+molGpUE7EtZZMRaHXyHiU+wCgg5dF -3TD3rYn2PXkiAFlHs6/OficEAK0zmzEdzNfdfWwipf4AQrAEaBO9If7eo5zj6RX9 -bajg0IRgTxpwq6dP+bnnoEtm/v0vZeAGe8zscCX8xIPtDqu7+QbMe89SSdKJXHog -/cC/vOS1+s5TKX2ervZ7pAauyve1xO53eVxsg6oDtTwIqvlQbmi6Vs2I3lplhJj9 -sZZ1A/4oNeWoZlBnxr/0eyHDktW89x0wt0R+jJVksnHJxyg7D+MLmaDZR0Fjg8Wt -EhW8Q5WS0rkk39VaFoA3oR9nfEzAJgymSqNjTEwLsPaqvq6Q5zE+nouYP46cMbcW -PKmST+QZCRMfznam667eKk0+opBIhDy57M2Kerx4EZyMy/0l4LRbU2NpZW50aWZp -YyBMaW51eCAoUlBNIHNpZ25pbmcga2V5IGZvciBTY2llbnRpZmljIExpbnV4IDYp -IDxzY2llbnRpZmljLWxpbnV4LWRldmVsQGZuYWwuZ292PohgBBMRAgAgBQJKV2vk -AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQkV114Jsf01BepACeO7UR33C6 -g4HfHvLVq8zf1SU99y4An1ZOfgrW5iVCEwDc+bWiUu6sbujIiEYEEBECAAYFAkpX -pBIACgkQsLQYPxkqfX0yCACfap7Y7XpjuSr2DXL+ohDbAM+xdOIAnRjegnSEBqHa -Hpi8a7gS69H2hz51iEYEEBECAAYFAkpXqZUACgkQ2mrQCIL9F7IHlgCgr/SqepQ/ -8aXpbQqtwXQho6kDEHIAnRbtNiBRZl4B+fbh6ZsdOr6QHIiOuQINBEpXa+oQCACw -50+Jv6VEVrAL+rRoptmBmHbg8XhNfOPn349GYCtZ9TebCtmU82MEWYF4Eo5vk1JM -P29EBTKfYHBYsD231HavQa4EXVcjYm38i43c0P0sVvO1t5x2EDncthd+Sx3P/36k -mr9pjCA9PFR3zLUA3YxqeipgrfU2NhDh4yvxgHogYjn1Gdqf0TWo2lqYnLjAMbZ0 -y7Mk5G6SfZcSRrZvjZgvXUlmynJXMY766LjyrfasuS4fd2LWFovXOakBb5lR7Z/O -ec1U8CEypQ2iC9ww+Tg0tq+oIJ8g27pJrYsfoCf6HVhsxFOzxf8pjNTilWIB4lMk -ok5+QnQwDVOykeXFDoKXAAMFB/9w1l+PFODmKJFCPqkYj2+0a+rT+76hDVaPJC8E -xcsGf5uJQpOdgqgqMgT1kczMX4CbJ/OIqJVnuFGxoBh2tblwtHvGTwepSTn/yUyd -SbCKmgMr8WafSZUxcRFPql4U2yBvAvdkTCTl+OHv3CrAZxDTV15FoHyPRm/2XU2f -75Y3EutNLrh3TB5aXEveTe1LP+eYDtYTa/nW6A3WqOKWN7wpMBQ9H65mgN9au+g2 -Euh4DtV/myhnyILMYfCPvUAO68MZ4INC/koV0R78HBI4HHVE0Im338fQeS4g30eL -+IPoYGAkRQsZ8pi5JnVdqUK9DuNA+NuEhZmYycC6RCxUaKFmiEkEGBECAAkFAkpX -a+oCGwwACgkQkV114Jsf01C04QCdGkNIVHih/YkT79eykpQ8dUUfGkUAnjV0pyzz -5XK12rKD3j1Z+SNr+Lqs -=EcEL ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY.atrpms b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY.atrpms deleted file mode 100644 index 860ace4d24..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY.atrpms +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.6 (GNU/Linux) - -mQGiBD5gtCgRBACKIvjMF+20r9k/Uw2Hq6Y/qn1nM0AZEFalhglXP5pMm5bMgkcI -1vCWqJxSbhQhk8hSEenoszes8hyUxHj4hFFUDiRtAxOpCpGCsCnUddgQtHAQd+tm -aQsM6J3Jm/EZPtwR0lvwvRGvz2x6Rr95G8+42KK9x+mBYhLk0y3gAbBzhwCgnkDH -a97MGBT7gRLrmtFqiHrWlPkD/2tBaH6IEuoJhcAbNj9MukbhDOYJ6ic9Nzf6sR3t -ZG+XgQLLS2DNy8+HWcYJOjpJDEe8zWFDdUv3cL1D0U2f2e85FuJaMucHn+816iw8 -mNjZXJEoDE4LJ8Vv53fkevNZpdWmO2VtRwI+woDnIHYHukDLj2sWhVt+5W+uOKAE -OippA/9OzuWrwBtTR+Np8ApZGkxhxU1z0iEStV+kQNqJE7YoR4SGMuzEa3bFzrPx -k4qIU+rw4YgFgHrs1x08lXxNOZkq6avvbl60HqN2qF2UQL/YdU+5X3ixaJVaYYk8 -yuK+hp0Hx2DdBWmVhq6rEzIfpnFhF4qspwMWEiiBGjYDL62W7LQ0QVRycG1zLm5l -dCAocnBtIHNpZ25pbmcga2V5KSA8QXhlbC5UaGltbUBBVHJwbXMubmV0PohnBBMR -AgAnAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAhkBBQJFfF9PBQkJGI4nAAoJEFCM -5eZmU0wrJ0IAnA0BdyRlq2S8ess55R8YMFnWAWXEAJ9Fa7cEHku4j4B83shCODps -+DYUZohnBBMRAgAnAhsDBQkDdMLsBgsJCAcDAgMVAgMDFgIBAh4BAheABQJAKteu -AhkBAAoJEFCM5eZmU0wrMMUAnRjS2PXQp0tsC/69IGMMxqU+8xeAAJ9XQjVAo+mU -kg/3AeBlMBIlFe5hDQ== -=23Fz ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RubyWorks.GPG.key b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RubyWorks.GPG.key deleted file mode 100644 index b91a5a8876..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RubyWorks.GPG.key +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEY5QQ0RBACfC1NbAdGFMOS/Y7P9hmNph2Wh3TJTh6IZpL+lTJBuZSEa6rp0 -CghS/yU3gGXUPaxAy91M7PXMv5p7S3U/SusZHATLhFdU5J4LuWMf4IiBy9FOB/aj -Q1s5vZ/i3YFaqolXsRP8TgIu4Lzp/j3+KAxFb3gF7lz64J/Et2Jil0OQzwCgkn9i -SoPEM6d9SCFOidhUuTHUhM0D/3UXl/FKPVFrFzjslFpaN9NgArRrmXKTOBWEqMLy -12pbTzOtv+p17Ot51q4h0ebEWrmVJ/h/7Is6QT6AKHuOIW+1/88fcSrmef//0Scz -wtEwVudkYA+kOGt1pwhapVYf1lWE9Z6L3V/MVdxXUesylGO6jJjOjpUB+ZBItwl7 -exkhA/4iemhq4D5Jp6r1Kv3aKSPNENdhTORyfZz4UfyOsUfYncaprP5IZja0j+rd -tQLIsH8hXvCT2kSAUY6nMGmzPgpgGamtHI6gH1ZmoNX2gEF7tzGNgKMbbUmwO89B -N56U7wm68AreXE8XviRjGjAtZWnouqe5X+EiUurdJkzRwU0c2rQpVGhvdWdodFdv -cmtzIDxydWJ5d29ya3NAdGhvdWdodHdvcmtzLmNvbT6IYAQTEQIAIAUCRjlBDQIb -AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEHM/KlUQbeB0SSYAn0sgAx5ZK975 -wZiChkIqOCyFZ9PLAJ9laivkzqT2y+Kh9FGe3TP/CAhRTbkCDQRGOUEVEAgAqxJI -MFrYV3JKyeXHVKXHNd5Nf1WdqKi37VOdSTBftiehzZdR9hxkGEknYxnbBLGJR9YD -/uJ2+DRwNBcw2RrrEmb0DCZxcLQLZ3xYa7+WvcR4/Nir/3858SGJ+wmGCHKyX2So -M2TurmKu5bqyUUaBgf+IhKfwOr9zeK3rIRhUq/aiYkw8sWA8ruUvxXwLnbkK1aP9 -hfvSqScwjkfUVk6CQ6GFUD+4N4mNRtRcZz3gYa+0jSNeEJZQOJxRuE/gBHav3eyN -dm4VAFPF20BobvBVEcMhO0KaR/X4jW1G1eFAKLxI7cdx3+vLeNPaFwHiSMSknsNs -UiucI9oV+I5S/50ZrwADBwf/StYTK9KvPnY9ZqmirBpSh0Zl0xylMtAiMblG7pKv -qKTPNr9zXooheQBpAbnhOfju0DB/OtE4V21HqnbMws2aFvHecEbO5EmjwT7ZTltH -5vlbiPrXOc7SpP22FdkOYdunM2+nsA6398mpYFEiFFNAzX6pReN2tbbmXf6zxS9n -nHjMAgl5nMuOASLZrTrUX/7yu6ySS1hy0ZVfEoAFeILy4MV8y0lVjBQa2kNOCNpO -Cc+y1+4EHLS3fuN0x+tho3rhjKAzj8KOt4XnALn8OouRMx9G7ItC2U8kNzHHFRg5 -adT/+nEthVd9q9pYLrUaze7aMQyl+7cD1KzmSe34X9B6W4hJBBgRAgAJBQJGOUEV -AhsMAAoJEHM/KlUQbeB0O7QAn09h4qrKPhWD9eaiyMRS5YeARTYgAJ9WxLcQEvkA -yOSLb33CweehCrlTnQ== -=scSy ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/empty/.placeholder b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/empty/.placeholder deleted file mode 100644 index d7c1372506..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/empty/.placeholder +++ /dev/null @@ -1 +0,0 @@ -# Placeholder for git diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-5 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-5 deleted file mode 100644 index 2627d31d8f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-5 +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEWfB6MRBACrnYW6yKMT+MwJlCIhoyTxGf3mAxmnAiDEy6HcYN8rivssVTJk -CFtQBlBOpLV/OW2YtKrCO2xHn46eNfnMri8FGT8g+9JF3MUVi7kiV1He4iJynHXB -+F2ZqIvHf3IaUj1ys+p8TK64FDFxDQDrGQfIsD/+pkSGx53/877IrvdwjwCguQcr -Ioip5TH0Fj0OLUY4asYVZH8EAIqFHEqsY+9ziP+2R3/FyxSllKkjwcMLrBug+cYO -LYDD6eQXE9Mq8XKGFDj9ZB/0+JzK/XQeStheeFG75q3noq5oCPVFO4czuKErIRAB -qKbDBhaTj3JhOgM12XsUYn+rI6NeMV2ZogoQCC2tWmDETfRpYp2moo53NuFWHbAy -XjETA/sHEeQT9huHzdi/lebNBj0L8nBGfLN1nSRP1GtvagBvkR4RZ6DTQyl0UzOJ -RA3ywWlrL9IV9mrpb1Fmn60l2jTMMCc7J6LacmPK906N+FcN/Docj1M4s/4CNanQ -NhzcFhAFtQL56SNyLTCk1XzhssGZ/jwGnNbU/aaj4wOj0Uef5LRGQ2VudE9TLTUg -S2V5IChDZW50T1MgNSBPZmZpY2lhbCBTaWduaW5nIEtleSkgPGNlbnRvcy01LWtl -eUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwekAhsDBQkSzAMABgsJCAcDAgMVAgMD -FgIBAh4BAheAAAoJEKikR9zoViiXKlEAmwSoZDvZo+WChcg3s/SpNoWCKhMAAJwI -E2aXpZVrpsQnInUQWwkdrTiL5YhMBBMRAgAMBQJFnwiSBYMSzAIRAAoJEDjCFhY5 -bKCk0hAAn134bIx3wSbq58E6P6U5RT7Z2Zx4AJ9VxnVkoGHkVIgSdsxHUgRjo27N -F7kBDQRFnwezEAQA/HnJ5yiozwgtf6jt+kii8iua+WnjqBKomPHOQ8moxbWdv5Ks -4e1DPhzRqxhshjmub4SuJ93sgMSAF2ayC9t51mSJV33KfzPF2gIahcMqfABe/2hJ -aMzcQZHrGJCEX6ek8l8SFKou7vICzyajRSIK8gxWKBuQknP/9LKsoczV+xsAAwUD -/idXPkk4vRRHsCwc6I23fdI0ur52bzEqHiAIswNfO521YgLk2W1xyCLc2aYjc8Ni -nrMX1tCnEx0/gK7ICyJoWH1Vc7//79sWFtX2EaTO+Q07xjFX4E66WxJlCo9lOjos -Vk5qc7R+xzLDoLGFtbzaTRQFzf6yr7QTu+BebWLoPwNTiE8EGBECAA8FAkWfB7MC -GwwFCRLMAwAACgkQqKRH3OhWKJfvvACfbsF1WK193zM7vSc4uq51XsceLwgAoI0/ -9GxdNhGQEAweSlQfhPa3yYXH -=o/Mx ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-6 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-6 deleted file mode 100644 index bd863d8e21..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-6 +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQINBE4P06MBEACqn48FZgYkG2QrtUAVDV58H6LpDYEcTcv4CIFSkgs6dJ9TavCW -NyPBZRpM2R+Rg5eVqlborp7TmktBP/sSsxc8eJ+3P2aQWSWc5ol74Y0OznJUCrBr -bIdypJllsD9Fe+h7gLBXTh3vdBEWr2lR+xA+Oou8UlO2gFbVFQqMafUgU1s0vqaE -/hHH0TzwD0/tJ6eqIbHwVR/Bu6kHFK4PwePovhfvyYD9Y+C0vOYd5Ict2vbLHz1f -QBDZObv4M6KN3j7nzme47hKtdMd+LwFqxM5cXfM6b5doDulWPmuGV78VoX6OR7el -x1tlfpuiFeuXYnImm5nTawArcQ1UkXUSYcTUKShJebRDLR3BycxR39Q9jtbOQ29R -FumHginovEhdUcinRr22eRXgcmzpR00zFIWoFCwHh/OCtG14nFhefuZ8Z80qbVhW -2J9+/O4tksv9HtQBmQNOK5S8C4HNF2M8AfOWNTr8esFSDc0YA5/cxzdfOOtWam/w -lBpNcUUSSgddRsBwijPuWhVA3NmA/uQlJtAo4Ji5vo8cj5MTPG3+U+rfNqRxu1Yc -ioXRo4LzggPscaTZX6V24n0fzw0J2k7TT4sX007k+7YXwEMqmHpcMYbDNzdCzUer -Zilh5hihJwvGfdi234W3GofttoO+jaAZjic7a3p6cO1ICMgfVqrbZCUQVQARAQAB -tEZDZW50T1MtNiBLZXkgKENlbnRPUyA2IE9mZmljaWFsIFNpZ25pbmcgS2V5KSA8 -Y2VudG9zLTYta2V5QGNlbnRvcy5vcmc+iQI8BBMBAgAmBQJOD9OjAhsDBQkSzAMA -BgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQCUb8osEFud6ajRAAnb6d+w6Y/v/d -MSy7UEy4rNquArix8xhqBwwjoGXpa37OqTvvcJrftZ1XgtzmTbkqXc+9EFch0C+w -ST10f+H0SPTUGuPwqLkg27snUkDAv1B8laub+l2L9erzCaRriH8MnFyxt5v1rqWA -mVlRymzgXK+EQDr+XOgMm1CvxVY3OwdjdoHNox4TdVQWlZl83xdLXBxkd5IRciNm -sg5fJAzAMeg8YsoDee3m4khg9gEm+/Rj5io8Gfk0nhQpgGGeS1HEXl5jzTb44zQW -qudkfcLEdUMOECbu7IC5Z1wrcj559qcp9C94IwQQO+LxLwg4kHffvZjCaOXDRiya -h8KGsEDuiqwjU9HgGq9fa0Ceo3OyUazUi+WnOxBLVIQ8cUZJJ2Ia5PDnEsz59kCp -JmBZaYPxUEteMtG3yDTa8c8jUnJtMPpkwpSkeMBeNr/rEH4YcBoxuFjppHzQpJ7G -hZRbOfY8w97TgJbfDElwTX0/xX9ypsmBezgGoOvOkzP9iCy9YUBc9q/SNnflRWPO -sMVrjec0vc6ffthu2xBdigBXhL7x2bphWzTXf2T067k+JOdoh5EGney6LhQzcp8m -YCTENStCR+L/5XwrvNgRBnoXe4e0ZHet1CcCuBCBvSmsPHp5ml21ahsephnHx+rl -JNGtzulnNP07RyfzQcpCNFH7W4lXzqM= -=jrWY ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL deleted file mode 100644 index 5a13bb4f9f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF -l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/ -QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/ -lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk -/RTaZ8Kr1mTosVtosqmdIAA2XHxi8ZLiVPPSezJjfElsSqOAxEKPL0djfpp2wrTm -l/1iVnX+PZH5DRKCbjdCMLDJhYap7YUhcPsMGSeUKrwmBCBJUPc6DhjFvyhA9IMl -1T0+A/9SKTv94ToP/JYoCTHTgnG5MoVNafisfe0wojP2mWU4gRk8X4dNGKMj6lic -vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ6Ob8cTR2T12Fmv9w03DD3MnBstR6vhP -QcqZKhc5SJYYY7oVfxlSOfF4xfwcHQKoD5TOKwIAQ6T8jyFpKbQkRmVkb3JhIEVQ -RUwgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iGQEExECACQFAkXopTICGwMFCRLM -AwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQEZzANiF1IfabmQCgzvE60MnHSOBa -ZXXF7uU2Vzu8EOkAoKg9h+j0NuNom6WUYZyJQt4zc5seuQINBEXopTYQCADapnR/ -blrJ8FhlgNPl0X9S3JE/kygPbNXIqne4XBVYisVp0uzNCRUxNZq30MpY027JCs2J -nL2fMpwvx33f0phU029vrIZKA3CmnnwVsjcWfMJOVPBmVN7m5bGU68F+PdRIcDsl -PMOWRLkTBZOGolLgIbM4719fqA8etewILrX6uPvRDwywV7/sPCFpRcfNNBUY+Zx3 -5bf4fnkaCKxgXgQS3AT+hGYhlzIqQVTkGNveHTnt4SSzgAqR9sSwQwqvEfVtYNeS -w5rDguLG41HQm1Hojv59HNYjH6F/S1rClZi21bLgZbKpCFX76qPt8CTw+iQLBPPd -yoOGHfzyp7nsfhUrAAMFB/9/H9Gpk822ZpBexQW4y3LGFo9ZSnmu+ueOZPU3SqDA -DW1ovZdYzGuJTGGM9oMl6bL8eZrcUBBOFaWge5wZczIE3hx2exEOkDdvq+MUDVD1 -axmN45q/7h1NYRp5GQL2ZsoV4g9U2gMdzHOFtZCER6PP9ErVlfJpgBUCdSL93V4H -Sgpkk7znmTOklbCM6l/G/A6q4sCRqfzHwVSTiruyTBiU9lfROsAl8fjIq2OzWJ2T -P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24 -0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC -GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY -bbsLFWOfmzAnNIGvFRWy+YHi -=MMNL ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-4 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-4 deleted file mode 100644 index 5a13bb4f9f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-4 +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF -l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/ -QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/ -lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk -/RTaZ8Kr1mTosVtosqmdIAA2XHxi8ZLiVPPSezJjfElsSqOAxEKPL0djfpp2wrTm -l/1iVnX+PZH5DRKCbjdCMLDJhYap7YUhcPsMGSeUKrwmBCBJUPc6DhjFvyhA9IMl -1T0+A/9SKTv94ToP/JYoCTHTgnG5MoVNafisfe0wojP2mWU4gRk8X4dNGKMj6lic -vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ6Ob8cTR2T12Fmv9w03DD3MnBstR6vhP -QcqZKhc5SJYYY7oVfxlSOfF4xfwcHQKoD5TOKwIAQ6T8jyFpKbQkRmVkb3JhIEVQ -RUwgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iGQEExECACQFAkXopTICGwMFCRLM -AwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQEZzANiF1IfabmQCgzvE60MnHSOBa -ZXXF7uU2Vzu8EOkAoKg9h+j0NuNom6WUYZyJQt4zc5seuQINBEXopTYQCADapnR/ -blrJ8FhlgNPl0X9S3JE/kygPbNXIqne4XBVYisVp0uzNCRUxNZq30MpY027JCs2J -nL2fMpwvx33f0phU029vrIZKA3CmnnwVsjcWfMJOVPBmVN7m5bGU68F+PdRIcDsl -PMOWRLkTBZOGolLgIbM4719fqA8etewILrX6uPvRDwywV7/sPCFpRcfNNBUY+Zx3 -5bf4fnkaCKxgXgQS3AT+hGYhlzIqQVTkGNveHTnt4SSzgAqR9sSwQwqvEfVtYNeS -w5rDguLG41HQm1Hojv59HNYjH6F/S1rClZi21bLgZbKpCFX76qPt8CTw+iQLBPPd -yoOGHfzyp7nsfhUrAAMFB/9/H9Gpk822ZpBexQW4y3LGFo9ZSnmu+ueOZPU3SqDA -DW1ovZdYzGuJTGGM9oMl6bL8eZrcUBBOFaWge5wZczIE3hx2exEOkDdvq+MUDVD1 -axmN45q/7h1NYRp5GQL2ZsoV4g9U2gMdzHOFtZCER6PP9ErVlfJpgBUCdSL93V4H -Sgpkk7znmTOklbCM6l/G/A6q4sCRqfzHwVSTiruyTBiU9lfROsAl8fjIq2OzWJ2T -P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24 -0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC -GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY -bbsLFWOfmzAnNIGvFRWy+YHi -=MMNL ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-5 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-5 deleted file mode 100644 index 5a13bb4f9f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-5 +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF -l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/ -QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/ -lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk -/RTaZ8Kr1mTosVtosqmdIAA2XHxi8ZLiVPPSezJjfElsSqOAxEKPL0djfpp2wrTm -l/1iVnX+PZH5DRKCbjdCMLDJhYap7YUhcPsMGSeUKrwmBCBJUPc6DhjFvyhA9IMl -1T0+A/9SKTv94ToP/JYoCTHTgnG5MoVNafisfe0wojP2mWU4gRk8X4dNGKMj6lic -vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ6Ob8cTR2T12Fmv9w03DD3MnBstR6vhP -QcqZKhc5SJYYY7oVfxlSOfF4xfwcHQKoD5TOKwIAQ6T8jyFpKbQkRmVkb3JhIEVQ -RUwgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iGQEExECACQFAkXopTICGwMFCRLM -AwAGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQEZzANiF1IfabmQCgzvE60MnHSOBa -ZXXF7uU2Vzu8EOkAoKg9h+j0NuNom6WUYZyJQt4zc5seuQINBEXopTYQCADapnR/ -blrJ8FhlgNPl0X9S3JE/kygPbNXIqne4XBVYisVp0uzNCRUxNZq30MpY027JCs2J -nL2fMpwvx33f0phU029vrIZKA3CmnnwVsjcWfMJOVPBmVN7m5bGU68F+PdRIcDsl -PMOWRLkTBZOGolLgIbM4719fqA8etewILrX6uPvRDwywV7/sPCFpRcfNNBUY+Zx3 -5bf4fnkaCKxgXgQS3AT+hGYhlzIqQVTkGNveHTnt4SSzgAqR9sSwQwqvEfVtYNeS -w5rDguLG41HQm1Hojv59HNYjH6F/S1rClZi21bLgZbKpCFX76qPt8CTw+iQLBPPd -yoOGHfzyp7nsfhUrAAMFB/9/H9Gpk822ZpBexQW4y3LGFo9ZSnmu+ueOZPU3SqDA -DW1ovZdYzGuJTGGM9oMl6bL8eZrcUBBOFaWge5wZczIE3hx2exEOkDdvq+MUDVD1 -axmN45q/7h1NYRp5GQL2ZsoV4g9U2gMdzHOFtZCER6PP9ErVlfJpgBUCdSL93V4H -Sgpkk7znmTOklbCM6l/G/A6q4sCRqfzHwVSTiruyTBiU9lfROsAl8fjIq2OzWJ2T -P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24 -0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC -GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY -bbsLFWOfmzAnNIGvFRWy+YHi -=MMNL ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-6 b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-6 deleted file mode 100644 index 7a2030489d..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-6 +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 -JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B -M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn -XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 -pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkkeT2gNhqindRPngUXGXW7Qzoefe+fV -QqJSm7Tq2q9oqVZ46J964waCRItRySpuW5dxZO34WM6wsw2BP2MlACbH4l3luqtp -Xo3Bvfnk+HAFH3HcMuwdaulxv7zYKXCfNoSfgrpEfo2Ex4Im/I3WdtwME/Gbnwdq -3VJzgAxLVFhczDHwNkjmIdPAlNJ9/ixRjip4dgZtW8VcBCrNoL+LhDrIfjvnLdRu -vBHy9P3sCF7FZycaHlMWP6RiLtHnEMGcbZ8QpQHi2dReU1wyr9QgguGU+jqSXYar -1yEcsdRGasppNIZ8+Qawbm/a4doT10TEtPArhSoHlwbvqTDYjtfV92lC/2iwgO6g -YgG9XrO4V8dV39Ffm7oLFfvTbg5mv4Q/E6AWo/gkjmtxkculbyAvjFtYAQARAQAB -tCFFUEVMICg2KSA8ZXBlbEBmZWRvcmFwcm9qZWN0Lm9yZz6JAjYEEwECACAFAkvS -KUICGw8GCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA7Sd8qBgi4lR/GD/wLGPv9 -qO39eyb9NlrwfKdUEo1tHxKdrhNz+XYrO4yVDTBZRPSuvL2yaoeSIhQOKhNPfEgT -9mdsbsgcfmoHxmGVcn+lbheWsSvcgrXuz0gLt8TGGKGGROAoLXpuUsb1HNtKEOwP -Q4z1uQ2nOz5hLRyDOV0I2LwYV8BjGIjBKUMFEUxFTsL7XOZkrAg/WbTH2PW3hrfS -WtcRA7EYonI3B80d39ffws7SmyKbS5PmZjqOPuTvV2F0tMhKIhncBwoojWZPExft -HpKhzKVh8fdDO/3P1y1Fk3Cin8UbCO9MWMFNR27fVzCANlEPljsHA+3Ez4F7uboF -p0OOEov4Yyi4BEbgqZnthTG4ub9nyiupIZ3ckPHr3nVcDUGcL6lQD/nkmNVIeLYP -x1uHPOSlWfuojAYgzRH6LL7Idg4FHHBA0to7FW8dQXFIOyNiJFAOT2j8P5+tVdq8 -wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J -l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG -iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR -XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== -=V/6I ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-PGDG b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-PGDG deleted file mode 100644 index 8722c21cbd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-PGDG +++ /dev/null @@ -1,31 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.7 (GNU/Linux) - -mQGiBEeD8koRBACC1VBRsUwGr9gxFFRho9kZpdRUjBJoPhkeOTvp9LzkdAQMFngr -BFi6N0ov1kCX7LLwBmDG+JPR7N+XcH9YR1coSHpLVg+JNy2kFDd4zAyWxJafjZ3a -9zFg9Yx+0va1BJ2t4zVcmKS4aOfbgQ5KwIOWUujalQW5Y+Fw39Gn86qjbwCg5dIo -tkM0l19h2sx50D027pV5aPsD/2c9pfcFTbMhB0CcKS836GH1qY+NCAdUwPs646ee -Ex/k9Uy4qMwhl3HuCGGGa+N6Plyon7V0TzZuRGp/1742dE8IO+I/KLy2L1d1Fxrn -XOTBZd8qe6nBwh12OMcKrsPBVBxn+iSkaG3ULsgOtx+HHLfa1/p22L5+GzGdxizr -peBuA/90cCp+lYcEwdYaRoFVR501yDOTmmzBc1DrsyWP79QMEGzMqa393G0VnqXt -L4pGmunq66Agw2EhPcIt3pDYiCmEt/obdVtSJH6BtmSDB/zYhbE8u3vLP3jfFDa9 -KXxgtYj0NvuUVoRmxSKm8jtfmj1L7zoKNz3jl+Ba3L0WxIv4+bRBUG9zdGdyZVNR -TCBSUE0gQnVpbGRpbmcgUHJvamVjdCA8cGdzcWxycG1zLWhhY2tlcnNAcGdmb3Vu -ZHJ5Lm9yZz6IYAQTEQIAIAUCR4PySgIbIwYLCQgHAwIEFQIIAwQWAgMBAh4BAheA -AAoJEB8W0uFELfD4jnkAoMqd6ZwwsgYHZ3hP9vt+DJt1uDW7AKDbRwP8ESKFhwdJ -8m91RPBeJW/tMLkCDQRHg/JKEAgA64+ZXgcERPYfZYo4p+yMTJAAa9aqnE3U4Ni6 -ZMB57GPuEy8NfbNya+HiftO8hoozmJdcI6XFyRBCDUVCdZ8SE+PJdOx2FFqZVIu6 -dKnr8ykhgLpNNEFDG3boK9UfLj/5lYQ3Y550Iym1QKOgyrJYeAp6sZ+Nx2PavsP3 -nMFCSD67BqAbcLCVQN7a2dAUXfEbfXJjPHXTbo1/kxtzE+KCRTLdXEbSEe3nHO04 -K/EgTBjeBUOxnciH5RylJ2oGy/v4xr9ed7R1jJtshsDKMdWApwoLlCBJ63jg/4T/ -z/OtXmu4AvmWaJxaTl7fPf2GqSqqb6jLCrQAH7AIhXr9V0zPZwADBQgAlpptNQHl -u7euIdIujFwwcxyQGfee6BG+3zaNSEHMVQMuc6bxuvYmgM9r7aki/b0YMfjJBk8v -OJ3Eh1vDH/woJi2iJ13vQ21ot+1JP3fMd6NPR8/qEeDnmVXu7QAtlkmSKI9Rdnjz -FFSUJrQPHnKsH4V4uvAM+njwYD+VFiwlBPTKNeL8cdBb4tPN2cdVJzoAp57wkZAN -VA2tKxNsTJKBi8wukaLWX8+yPHiWCNWItvyB4WCEp/rZKG4A868NM5sZQMAabpLd -l4fTiGu68OYgK9qUPZvhEAL2C1jPDVHPkLm+ZsD+90Pe66w9vB00cxXuHLzm8Pad -GaCXCY8h3xi6VIhJBBgRAgAJBQJHg/JKAhsMAAoJEB8W0uFELfD4K4cAoJ4yug8y -1U0cZEiF5W25HDzMTtaDAKCaM1m3Cbd+AZ0NGWNg/VvIX9MsPA== -=au6K ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-RBEL b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-RBEL deleted file mode 100644 index 152fd79900..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-RBEL +++ /dev/null @@ -1,36 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.0.14 (GNU/Linux) - -mQGiBEZ6qawRBAC2gDuA1sZioGh1VP/U0l+9RmzOdkWBGB3NfWqezAwt1Up+cP5o -h+UNkghOKbJVQ/zLyY/edYOppQ78yxT1X/J1RHNhs5bjqzWlQxMbT5/tt1N4PExu -gvO38RGFTV0DqIy3lQw5YIwp2le+G8MktYh2NKI4lG0AJoXZicNlI7+mEwCgmfw+ -CnsB/kb/xUD1dq6Mo3dYXVcEAKSFfqt+6jvJNxcIYfpQqjEslQsQmPKpXzK9CPyV -UCjUEOirbhPxV86u3Ge/yuy5USMvTTs+ztImabbH6UHBEP+tEw3LiuPUpfh+nEna -3Hz+U81PvUwGEwUMzCr+OemBXqGW7jl66NqKqm8YM3Pkvc4NlS/7slky9A/s6i8S -hToWA/9kP55aSbIXte5TbC88lx6YuLx7qW541ni38DmJfPN5hHywLGnM82MMQMbk -hg1v49+7TTNv44LJpGT7t8gsW9F4Z4rWoChhsldypeeqbDOIv4kFiXt/8122Ud9J -nE67CR9XUuS5Jp+gP6xxNr9/vbvqsOGMJAQkVgkBPVuKYv25gLQ3U2VyZ2lvIFJ1 -YmlvIChGcmFtZU9TIERldmVsb3BlcnMpIDxydWJpb2pyQGZyYW1lb3Mub3JnPohr -BBMRAgArAhsDBQkGE0x0BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCTBs76AIZ -AQAKCRCOw9dP80W+dFhjAJ0dKy761iPcG+ALwEAuAgxDpUVBzgCdFxGCAZ7ELYvf -3uFc0Ou2ihDzvyy0IFNlcmdpbyBSdWJpbyA8c2VyZ2lvQHJ1YmlvLm5hbWU+iGYE -ExECACYCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAUJBhNMdAUCTBs7XgAKCRCO -w9dP80W+dDdtAJ9NYoW1ChfMyES7nQUlesEQ4aWXjQCeIoGxoOuIGyg6+AKr/2Wr -6fE1zt2IaQQTEQIAKQIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAhkBBQJIHsGo -BQkCuHFEAAoJEI7D10/zRb50KjgAnRTzzNIODKqrHnrHaUG8dWDCwmYjAJ48Hbcn -ZC6E8LGTeM8vPN0mMI9ijLkCDQRGeqm2EAgAh720kjA9bNDms+6agb6CirD9RkmZ -3G+OHd5iia3KbaUiBtC3PECg4UE8N54JuBNKdjgJQfdYSg2J0EZHyhZHdAVWjykE -tj/IKZKnAfUqKh44uT9OUPW8PChPo/gioLn+DexSAW7n19h7VIa1P3shYqYR/gz8 -zgfrXkFFpkpKnOLsXuF20JEEBIBdwrfYRJIBrUTYrfS/2GKLJjyutENkb9uI3JgQ -LfR6DckTaar4eeArjgvOxZRHiU0vRezetlbG8ZM9mSYrcMM3Xa5vLpFlDj6vYzat -RWEuZUfLgXWUVoVyFiNVXhpff/w7/bAb3WpXqjZd6sK8CCJJPNtnbLE7CwADBQf9 -EQjT9iiEZis35V9HqeLsxXVjPOGNuLiwjIpacI7CM3aGV1q7NXiCE4oWS/PvpHmu -W+XdXMPH4Bt2VmjZSarlAipTeNnOuiEXipUFIjAlNn1xNVRRd7T35zIvXLtmNtUe -nN1/mqZljKPbCbW1AgktH417t/vJfTnRWr9IgS3Am+o4q200i+1FjrQ/UI3s9+vg -5B+KASFP6HspNttl0kwzQ6SFIHAebd4DKHOj6ShxXPNl18W4R8qPqayrAFqdkgMJ -Jn8j2E8rmGYnssSfjck2kLtvNdTEAMjFnhg+oUapUzJAVeterudiWZFNrtn9ewnf -8SUiiYJlxb+nz545zo0gQIhJBBgRAgAJBQJGeqm2AhsMAAoJEI7D10/zRb50PJEA -mwTA+Sp3wvzwDr8sk7W7U4bBfw26AKCVoYw3mfTime+j3mFk1yk1yxjE2Q== -=iyOs ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-beta b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-beta deleted file mode 100644 index b86da23906..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-beta +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEWfBuERBACrwDH+6QvpyaOgzhXiemsIX+q4HlhX/HDmrmZOUd7i9VmZNogP -6LRRiTygn2+UphaGV3NDA36ZB/1JRpgvgpzbpZNeAoFvsljIbxGIwkH2JgRF6oNo -eGB3QYzDQJvYVIejk79M0ed3oor4w8OiNVcdxLyVIthFrjrrCqwRP3bLZwCgtY9t -Ezf5WL63Ue45vdht7A2GH+0D/iNAnWKsU7FUMFZrcwMaMbyP7YG8z0+zXUOgtgyP -tbgJG5yikNT3vJypb42gbKfcriUUDC5AeiRmkR8QPvYuOm34rM90+wx2LGqXWnHM -IyLAyl8TS3MQmePem8bfTGTNYxtt3Q7iadez2WYTLBSlmM6hbxZfdwm1hhyM0AJU -YyFUA/9kHH+CUBxKb1UgG7TSp53Po/5p/Yyuty+RJ7zIGv6SiN/JK4/ntWfm5WS5 -ZprSdE5ODoFQ/Gs3/VB/eolg2fBW1DcftH6lKHT3GKEOaicGX+T9eOMerZZedm5U -vDA9mFvWnOdOxK8LuRgVqip4jCnWICchpatmdP0whJQHQ6MGLLRMQ2VudE9TLTUg -QmV0YSBLZXkgKENlbnRPUyA1IEJldGEgU2lnbmluZyBLZXkpIDxjZW50b3MtNS1i -ZXRhLWtleUBjZW50b3Mub3JnPohkBBMRAgAkBQJFnwbhAhsDBQkSzAMABgsJCAcD -AgMVAgMDFgIBAh4BAheAAAoJEM/aaIEJLXsrWDkAoKcqa+AAdAWvp5qlJkGQiRy8 -aNFDAJ4qRfIxMiLinmjbqcuygWMp61wY5ohMBBMRAgAMBQJFnwhtBYMSzAF0AAoJ -EDjCFhY5bKCkG/wAn14LDlJqjZv1Wz0WNfhr80+qJrf6AKCaIZExwo4ApQpESk/F -SApLd/pEILkBDQRFnwbrEAQAwKzjI2aTB/sS9HuQ4CHCwrj4vr0HxMMwQikYBIvy -MYTtek04KDTKoJL5g3411DsfDW9VRGJdFCHvldgam/5UVfO6nywLkdwAA5TQA5dv -8YE8jTtwdy5Y1QKFc8LaIBZK0+ZbhEvdNfv67egvfcxZc5PvpBZ3C03n+iQ3wPcg -PhcAAwUD/iYkq4LG/je43Qa5rTz5kF5rIiX7Bk5vXT7XSFOFKwHy8V+PGEoVM1W8 -+EHIlmTycwIlsVp3by6qCDkMYu4V6VukxZNzJyeoMICiYIXUPh6NKHRoqaYlu6ZO -eFN1TQNXmodPk+iNtdbcby/zAklNqoO/dWSwd8NAo8s6WAHq3VPpiE8EGBECAA8F -AkWfBusCGwwFCRLMAwAACgkQz9pogQkteysXkACgoraCU0EBC+W8TuxrsePO20ma -D0IAoLRRQLTEXL0p3K0WE+LfyTr9EVG5 -=mH0S ------END PGP PUBLIC KEY BLOCK----- - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-elrepo.org b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-elrepo.org deleted file mode 100644 index fe0c082275..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-elrepo.org +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQGiBEm+/6QRBAC5mbtqOFSQ0FkTLIMdIoqxtraIeUqwbPp3IBYQ/u/EREjyEf1D -qFyBEXII0dD8JDT85vRZ81jhB7nFWa0VbUfY0xfghkbnokiNBVNpiQcvszw3UYDF -aLAaOC8Z98vmlsQaBBTQG6704ZXLr7FJyG3GP5WE6egXIQQbrMcdmCoRBwCg/dwC -HLWjuemoDc5SX7hKHbB4zZ8D/jP+oMbqz+bDn8OZ2UuaGdxr+mHW8tzTdPjnEU8e -hUt1ws8eBqn/gMfKvUBa8xFSILe8Ty99u+VjFbcRsdf0H6dRre9AdDVUz5oxzoPw -gamA8mhPQvFh3wt9smtRUh5IoM2LiM1s5pGMLuYuvSnVUPArEnSfW6K5I6v7OarU -3WfrBACDEGGcaWKjfdkRtmKIQrzu6AnldVC1ISLVAoqxHnKNFTk1BgO0PSZDpfJI -x8fMCnGlusoL6F5+LYEk4K4B0zvlj1ur3JocjxpuBLccl94JTo/+I9ZbS8ptUqLw -LBUkgIQJzzIH4G5NZsQ3FpzSWGRFVa7etqTv9BfUMUmJxhEoobQ/ZWxyZXBvLm9y -ZyAoUlBNIFNpZ25pbmcgS2V5IGZvciBlbHJlcG8ub3JnKSA8c2VjdXJlQGVscmVw -by5vcmc+iGAEExECACAFAkm+/6QCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAK -CRAwm8MFuq2uUlgWAKCGWOpyodbzxS7Xy/0X9m9qVnHq+ACfUHrQzYAtFRpT07Sg -giosE+mvAKu5Ag0ESb7/pxAIALgT0q0HhwugE717a7N+gAtCbFu8pCXOZcrAnJpG -cMA9VWmsODZStPTxXYM2ggCMSzUnNis8pPZOPIP5C+t2IYtVjLshM4C9UiY7u5ET -jErWCxWmF+2QLO50K56E4qxj0wufZt9P+Ih0USUM5L2oyrQG51uj/2v3Qq3igc8Z -NTtmEOfis3losusQbAfZtTBmNQ0570kkhMxiyavgAUxLenXHYrkDJFuL7XdBCmna -kykTn2dzU81rIDZ+QPxII4V/eZ5xGiRY/EDUIAysEV2m0NNZgWi/twUnZICm7zYp -VRviJrBnFTvNEPMhiGRnJgQp/Krv4WIHQ67N8lQg3q5RJX8AAwUH/0UBjBgbsuWR -dB+ZYWjKPBy+bJY/6HefPUuLrt3QDNINMW8kY7VzWRMWyGc4IlPJDW0nwOn/vT5H -Dgc3YmA3tm7cKj5wpFijzff61Db8eq+CUKGscKxDBGzHq6oirM5U7DQLmipCs5Eb -efwHIjE3aOUSnoQmniEnBWI2hm/rftmY9oJSi8xgns4wAokDPiMcucADtbV3fznx -ppuowtBi8bcGB1vJZjTySQcSKWv+IVp5ej06uZ9501BEm6HxUZkuAGPecP65kcQu -5bg7B7LQeI5AWyujqvfuWgAF34xhl9QU/sDWxM3wUog+bw7y8pyWCqnJhp70yx8o -SqzhFygT62eISQQYEQIACQUCSb7/pwIbDAAKCRAwm8MFuq2uUq8PAKC1+E2pSwiS -oHXkKYPYDwApsP1mVACfRe1YnggLYQtG9LMeweVQQC77rK8= -=qyRr ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-kbsingh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-kbsingh deleted file mode 100644 index f8c688e5f4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-kbsingh +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEIu6hwRBACOz2JFa1nW+seAKlVGOu0ykhdFVNI9E4/Abp2+8nsJIZyUwLAp -ei76rPD8WdptgIjtYOCsqz1TbP+eqeEG0LLihOdFRLUuAjQX4X7LLf5Qm+nvUB73 -uLbSf9Ptps2CMUEtu7+0wVoTbuC19HXUhUr5sRdCnJbPJBH6aAHG7Pl9ZwCguN9o -V7IKTnIQiZg0nxSjZ4V9e6UD/R7KoMwH3NPQQF7T7rJaBjSZcVHUPhAcNPNn+ms/ -Tw9mzHZ0mnQnOzSEW0ZUj9TkLN52VQ3WmGZKAv9yeVr0/230YIgmtH863lSystmk -LNO9brK0+3vKg5GRpV0/MSWSmf39WPAS1hXNXIFfYp1eGHUfed4FVNxrMTWHQozr -8JosA/wP+zGfM51bSAazLUqP/MEm7F9OFkuD7Sw97w55FyYlrPp1FQWrWczoiKHr -wS5NRCQbCGEEM/+j9id6CukxPLXxwMYCfeg5K0HxMaQT6hxbwjOzAzN3PBFytNel -09qdrdoSDa35twT0SAt+rzM+zvRI8ycizFG3lIih4UItWWve2bQ6S2FyYW5iaXIg -U2luZ2ggKGh0dHA6Ly93d3cua2FyYW4ub3JnLykgPGtic2luZ2hAa2FyYW4ub3Jn -PoheBBMRAgAeBQJCLuocAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAAoJEDANvZ4+ -E89b/P4AnjufrDCS+TAEL0KpkYDURePbDCHBAJ4+0iI1Td4YrcnLwmQ1+XDCJ3Zr -a7kBDQRCLuocEAQAjAl48FM9eGtP6M9FgswlSPAuCcJct6wOHmd/qZ923HckJPAD -zIFRMlM6H8P0bKoaIluv7agZM7Gsf8NeTg3NEeMKqnibIAyvjYeSkceRIwvBCQ3A -YwWk+B2zLUAFMxnE31oA10zjCKUo7Dc6XDUxSY/qdLymZzyG/Ndav+vMOVsAAwUD -/RCFDuW/GSM/s3DO7XxrOBRTGQmf9v9tCYdZZD615+s8ghaa5oZTvp1cbTTWiSq8 -ybncfjVHz9HezDgQjJsFZtrYd4w2JD+7K0+8sZ+BUGo1dDSv4UgN8ACtaGJnShiq -s8pQWRZFqFa3waay8oUSTKHiTHdpxLi3x4HhK/8MTsxniEkEGBECAAkFAkIu6hwC -GwwACgkQMA29nj4Tz1tHSgCcDgKL4swEu7ShvI8nZt2JLmTKB5QAn0qZi2zbexbi -DX+bbalHM+xVnXZN -=rZT6 ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-beta b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-beta deleted file mode 100644 index 7b40671a4c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-beta +++ /dev/null @@ -1,61 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQINBEmkAzABEAC2/c7bP1lHQ3XScxbIk0LQWe1YOiibQBRLwf8Si5PktgtuPibT -kKpZjw8p4D+fM7jD1WUzUE0X7tXg2l/eUlMM4dw6XJAQ1AmEOtlwSg7rrMtTvM0A -BEtI7Km6fC6sU6RtBMdcqD1cH/6dbsfh8muznVA7UlX+PRBHVzdWzj6y8h84dBjo -gzcbYu9Hezqgj/lLzicqsSZPz9UdXiRTRAIhp8V30BD8uRaaa0KDDnD6IzJv3D9P -xQWbFM4Z12GN9LyeZqmD7bpKzZmXG/3drvfXVisXaXp3M07t3NlBa3Dt8NFIKZ0D -FRXBz5bvzxRVmdH6DtkDWXDPOt+Wdm1rZrCOrySFpBZQRpHw12eo1M1lirANIov7 -Z+V1Qh/aBxj5EUu32u9ZpjAPPNtQF6F/KjaoHHHmEQAuj4DLex4LY646Hv1rcv2i -QFuCdvLKQGSiFBrfZH0j/IX3/0JXQlZzb3MuMFPxLXGAoAV9UP/Sw/WTmAuTzFVm -G13UYFeMwrToOiqcX2VcK0aC1FCcTP2z4JW3PsWvU8rUDRUYfoXovc7eg4Vn5wHt -0NBYsNhYiAAf320AUIHzQZYi38JgVwuJfFu43tJZE4Vig++RQq6tsEx9Ftz3EwRR -fJ9z9mEvEiieZm+vbOvMvIuimFVPSCmLH+bI649K8eZlVRWsx3EXCVb0nQARAQAB -tDBSZWQgSGF0LCBJbmMuIChiZXRhIGtleSAyKSA8c2VjdXJpdHlAcmVkaGF0LmNv -bT6JAjYEEwECACAFAkpSM+cCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRCT -ioDK8hVB6/9tEAC0+KmzeKceXQ/GTUoU6jy9vtkFCFrmv+c7ol4XpdTt0QhqBOwy -6m2mKWwmm8KfYfy0cADQ4y/EcoXl7FtFBwYmkCuEQGXhTDn9DvVjhooIq59LEMBQ -OW879RwwzRIZ8ebbjMUjDPF5MfPQqP2LBu9N4KvXlZp4voykwuuaJ+cbsKZR6pZ6 -0RQKPHKP+NgUFC0fff7XY9cuOZZWFAeKRhLN2K7bnRHKxp+kELWb6R9ZfrYwZjWc -MIPbTd1khE53L4NTfpWfAnJRtkPSDOKEGVlVLtLq4HEAxQt07kbslqISRWyXER3u -QOJj64D1ZiIMz6t6uZ424VE4ry9rBR0Jz55cMMx5O/ni9x3xzFUgH8Su2yM0r3jE -Rf24+tbOaPf7tebyx4OKe+JW95hNVstWUDyGbs6K9qGfI/pICuO1nMMFTo6GqzQ6 -DwLZvJ9QdXo7ujEtySZnfu42aycaQ9ZLC2DOCQCUBY350Hx6FLW3O546TAvpTfk0 -B6x+DV7mJQH7MGmRXQsE7TLBJKjq28Cn4tVp04PmybQyTxZdGA/8zY6pPl6xyVMH -V68hSBKEVT/rlouOHuxfdmZva1DhVvUC6Xj7+iTMTVJUAq/4Uyn31P1OJmA2a0PT -CAqWkbJSgKFccsjPoTbLyxhuMSNkEZFHvlZrSK9vnPzmfiRH0Orx3wYpMQ== -=21pb ------END PGP PUBLIC KEY BLOCK----- -The following public key can be used to verify RPM packages built and -signed by Red Hat, Inc. for this beta using `rpm -K' using the GNU GPG -package. Questions about this key should be sent to security@redhat.com. - - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.0.6 (GNU/Linux) -Comment: For info see http://www.gnupg.org - -mQGiBDySTqsRBACzc7xuCIp10oj5B2PAV4XzDeVxprv/WTMreSNSK+iC0bEz0IBp -Vnn++qtyiXfH+bGIE9jqZgIEnpttWhUOaU5LhcLFzy+m8NWfngIFP9QfGmGAe9Gd -LFeAdhj4RmSG/vgr7vDd83Hz22dv403Ar/sliWO4vDOrMmZBG57WGYTWtwCgkMsi -UUQuJ6slbzKn82w+bYxOlL0EAIylWJGaTkKOTL5DqVR3ik9aT0Dt3FNVYiuhcKBe -II4E3KOIVA9kO8in1IZjx2gs6K2UV+GsoAVANdfKL7l9O+k+J8OxhE74oycvYJxW -QzCgXMZkNcvW5wyXwEMcr6TVd/5BGztcMw8oT3/l2MtAEG/vn1XaWToRSO1XDMDz -+AjUA/4m0mTkN8S4wjzJG8lqN7+quW3UOaiCe8J3SFrrrhE0XbY9cTJI/9nuXHU1 -VjqOSmXQYH2Db7UOroFTBiWhlAedA4O4yuK52AJnvSsHbnJSEmn9rpo5z1Q8F+qI -mDlzriJdrIrVLeDiUeTlpH3kpG38D7007GhXBV72k1gpMoMcpbQ3UmVkIEhhdCwg -SW5jLiAoQmV0YSBUZXN0IFNvZnR3YXJlKSA8cmF3aGlkZUByZWRoYXQuY29tPohX -BBMRAgAXBQI8l5p/BQsHCgMEAxUDAgMWAgECF4AACgkQ/TcmiYl9oHqdeQCfZjw4 -F9sir3XfRAjVe9kYNcQ8hnIAn0WgyT7H5RriWYTOCfauOmd+cAW4iEYEEBECAAYF -AjyXmqQACgkQIZGAzdtCpg5nDQCfepuRUyuVJvhuQkPWySETYvRw+WoAnjAWhx6q -0npMx4OE1JGFi8ymKXktuQENBDySTq4QBADKL/mK7S8E3synxISlu7R6fUvu07Oc -RoX96n0Di6T+BS99hC44XzHjMDhUX2ZzVvYS88EZXoUDDkB/8g7SwZrOJ/QE1zrI -JmSVciNhSYWwqeT40Evs88ajZUfDiNbS/cSC6oui98iS4vxd7sE7IPY+FSx9vuAR -xOa9vBnJY/dx0wADBQQAosm+Iltt2uigC6LJzxNOoIdB5r0GqTC1o5sHCeNqXJhU -ExAG8m74uzMlYVLOpGZi4y4NwwAWvCWC0MWWnnu+LGFy1wKiJKRjhv5F+WkFutY5 -WHV5L44vp9jSIlBCRG+84jheTh8xqhndM9wOfPwWdYYu1vxrB8Tn6kA17PcYfHSI -RgQYEQIABgUCPJJergAKCRD9NyaJiX2geiCPAJ4nEM4NtI9Uj8lONDk6FU86PmoL -yACfb68fBd2pWEzLKsOk9imIobHHpzE= -=gpIn ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former deleted file mode 100644 index 3818b2c926..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former +++ /dev/null @@ -1,37 +0,0 @@ -The following public key can be used to verify RPM packages built and -signed by Red Hat, Inc. This key is used for packages in Red Hat -products shipped prior to November 2006, and for all updates to those -products. - -Questions about this key should be sent to security@redhat.com. - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.0.0 (GNU/Linux) -Comment: For info see http://www.gnupg.org - -mQGiBDfqVDgRBADBKr3Bl6PO8BQ0H8sJoD6p9U7Yyl7pjtZqioviPwXP+DCWd4u8 -HQzcxAZ57m8ssA1LK1Fx93coJhDzM130+p5BG9mYSWShLabR3N1KXdXQYYcowTOM -GxdwYRGr1Spw8QydLhjVfU1VSl4xt6bupPbWJbyjkg5Z3P7BlUOUJmrx3wCgobNV -EDGaWYJcch5z5B1of/41G8kEAKii6q7Gu/vhXXnLS6m15oNnPVybyngiw/23dKjS -ZVG7rKANEK2mxg1VB+vc/uUc4k49UxJJfCZg1gu1sPFV3GSa+Y/7jsiLktQvCiLP -lncQt1dV+ENmHR5BdIDPWDzKBVbgWnSDnqQ6KrZ7T6AlZ74VMpjGxxkWU6vV2xsW -XCLPA/9P/vtImA8CZN3jxGgtK5GGtDNJ/cMhhuv5tnfwFg4b/VGo2Jr8mhLUqoIb -E6zeGAmZbUpdckDco8D5fiFmqTf5+++pCEpJLJkkzel/32N2w4qzPrcRMCiBURES -PjCLd4Y5rPoU8E4kOHc/4BuHN903tiCsCPloCrWsQZ7UdxfQ5LQiUmVkIEhhdCwg -SW5jIDxzZWN1cml0eUByZWRoYXQuY29tPohVBBMRAgAVBQI36lQ4AwsKAwMVAwID -FgIBAheAAAoJECGRgM3bQqYOsBQAnRVtg7B25Hm11PHcpa8FpeddKiq2AJ9aO8sB -XmLDmPOEFI75mpTrKYHF6rkCDQQ36lRyEAgAokgI2xJ+3bZsk8jRA8ORIX8DH05U -lMH27qFYzLbT6npXwXYIOtVn0K2/iMDj+oEB1Aa2au4OnddYaLWp06v3d+XyS0t+ -5ab2ZfIQzdh7wCwxqRkzR+/H5TLYbMG+hvtTdylfqIX0WEfoOXMtWEGSVwyUsnM3 -Jy3LOi48rQQSCKtCAUdV20FoIGWhwnb/gHU1BnmES6UdQujFBE6EANqPhp0coYoI -hHJ2oIO8ujQItvvNaU88j/s/izQv5e7MXOgVSjKe/WX3s2JtB/tW7utpy12wh1J+ -JsFdbLV/t8CozUTpJgx5mVA3RKlxjTA+On+1IEUWioB+iVfT7Ov/0kcAzwADBQf9 -E4SKCWRand8K0XloMYgmipxMhJNnWDMLkokvbMNTUoNpSfRoQJ9EheXDxwMpTPwK -ti/PYrrL2J11P2ed0x7zm8v3gLrY0cue1iSba+8glY+p31ZPOr5ogaJw7ZARgoS8 -BwjyRymXQp+8Dete0TELKOL2/itDOPGHW07SsVWOR6cmX4VlRRcWB5KejaNvdrE5 -4XFtOd04NMgWI63uqZc4zkRa+kwEZtmbz3tHSdRCCE+Y7YVP6IUf/w6YPQFQriWY -FiA6fD10eB+BlIUqIw80VgjsBKmCwvKkn4jg8kibXgj4/TzQSx77uYokw1EqQ2wk -OZoaEtcubsNMquuLCMWijYhGBBgRAgAGBQI36lRyAAoJECGRgM3bQqYOhyYAnj7h -VDY/FJAGqmtZpwVp9IlitW5tAJ4xQApr/jNFZCTksnI+4O1765F7tA== -=3AHZ ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release deleted file mode 100644 index 09aded8bec..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release +++ /dev/null @@ -1,24 +0,0 @@ -The following public key can be used to verify RPM packages built and -signed by Red Hat, Inc. This key is used for packages in Red Hat -products shipped after November 2006, and for all updates to those -products. - -Questions about this key should be sent to security@redhat.com. - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEV2EyQRBAD4/SR69qoLzK4HIa6g9iS+baiX0o3NjkLftFHg/xy+IMOMg//i -4c5bUpLKDTMH3+yT0G8qpul/RALUFOESKFkZm3/SlkJKuroXcB8U6s2dh5XX9DDB -ISqRwL7M5qB8rfDPKHN+k/XwJ9CNpHMdNxnnc2WhnnmHNp6NrD/bUEH4vwCglMa0 -rFRXPaN7407DARGHvW/jugsEANFaeZsFwos/sajL1XQRfHZUTnvDjJgz31IFY+OL -DlOVAOtV/NaECMwIJsMIhoisW4Luwp4m75Qh3ogq3bwqSWNLsfJ9WFnNqXOgamyD -h/F4q492z6FpyIb1JZLABBSH7LEQjHlR/s/Ct5JEWc5MyfzdjBi6J9qCh3y/IYL0 -EbfRA/4yoJ/fH9uthDLZsZRWmnGJvb+VpRvcVs8IQ4aIAcOMbWu2Sp3U9pm6cxZF -N7tShmAwiiGj9UXVtlhpj3lnqulLMD9VqXGF0YgDOaQ7CP/99OEEhUjBj/8o8udF -gxc1i2WJjc7/sr8IMbDv/SNToi0bnZUxXa/BUjj92uaQ6/LupbQxUmVkIEhhdCwg -SW5jLiAocmVsZWFzZSBrZXkpIDxzZWN1cml0eUByZWRoYXQuY29tPohfBBMRAgAf -BQJFdhMkAhsDBgsJCAcDAgQVAggDAxYCAQIeAQIXgAAKCRBTJoEBNwFxhogXAKCD -TuYeyQrkYXjg9JmOdTZvsIVfZgCcCWKJXtfbC5dbv0piTHI/cdwVzJo= -=mhzo ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx deleted file mode 100644 index 0f875c0e20..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEYk7/IRBACdWFJInc51/+0sqvadIvf0E+Vhv4aIqB76jWtIGqXnTeG6hEl/ -9tJoLszBh4g/KBFVF3E4VxTHXKO/L7GZRa8JzoMtvV8XiP6BaYq6ykx6H7alKvoP -qzk7xBbvNbqsXJCO7keo+g7iIDdfAxvsSJYbhQBxDn5W4Hw7SnHcMmTDOQCg7vOj -UzaZG32yYMBZLjOAB/QzXgsD/1JRDnQ8cL6d17B1ie57ZuVOI3ziQJSmj0zbC0IX -OsxlcFjwydLk3TA88iCr0SO2mfXCsGTeDGFbrl2IRCoH91l3Ew49HI4OYtl+OPSt -pIYdFLSQ+RUPs9CFYwF9Ogjrwmi6jVptKq/+v0WgnCrbfz3DYxCWt/VB1PYDj5y6 -Mv//BACKa2mUuQoukDvzqiwZXV/Z52MeDOzPbOFo6qhx+54nav9Inz1yziEjYrP/ -ZrNJ4BT6fBgin/a6UmD5FqMtkrrhOCpHFQK2H+XYZ0vVJGZI7h74/fY8U2n+1Mle -xQ/ejWojF+H5nFUAwKHaNVNofKcw8c8msgGn2jsvrAISTSHshrQwUmVkIEhhdCwg -SW5jLiAoUkhYIGtleSkgPHJoeC1zdXBwb3J0QHJlZGhhdC5jb20+iF8EExECAB8F -AkYk7/ICGwMGCwkIBwMCBBUCCAMDFgIBAh4BAheAAAoJEDmhOhJCGT5r6FoAoLsB -+DOPmTc3P+77DnNhU460nmjQAKCI3BJ/SxqPqfp8jL6lTfVo2zxegQ== -=t0np ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-release b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-release deleted file mode 100644 index 47c6be6700..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-release +++ /dev/null @@ -1,62 +0,0 @@ -The following public key can be used to verify RPM packages built and -signed by Red Hat, Inc. This key is used for packages in Red Hat -products shipped after November 2009, and for all updates to those -products. - -Questions about this key should be sent to security@redhat.com. - -pub 4096R/FD431D51 2009-10-22 Red Hat, Inc. (release key 2) - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQINBErgSTsBEACh2A4b0O9t+vzC9VrVtL1AKvUWi9OPCjkvR7Xd8DtJxeeMZ5eF -0HtzIG58qDRybwUe89FZprB1ffuUKzdE+HcL3FbNWSSOXVjZIersdXyH3NvnLLLF -0DNRB2ix3bXG9Rh/RXpFsNxDp2CEMdUvbYCzE79K1EnUTVh1L0Of023FtPSZXX0c -u7Pb5DI5lX5YeoXO6RoodrIGYJsVBQWnrWw4xNTconUfNPk0EGZtEnzvH2zyPoJh -XGF+Ncu9XwbalnYde10OCvSWAZ5zTCpoLMTvQjWpbCdWXJzCm6G+/hx9upke546H -5IjtYm4dTIVTnc3wvDiODgBKRzOl9rEOCIgOuGtDxRxcQkjrC+xvg5Vkqn7vBUyW -9pHedOU+PoF3DGOM+dqv+eNKBvh9YF9ugFAQBkcG7viZgvGEMGGUpzNgN7XnS1gj -/DPo9mZESOYnKceve2tIC87p2hqjrxOHuI7fkZYeNIcAoa83rBltFXaBDYhWAKS1 -PcXS1/7JzP0ky7d0L6Xbu/If5kqWQpKwUInXtySRkuraVfuK3Bpa+X1XecWi24JY -HVtlNX025xx1ewVzGNCTlWn1skQN2OOoQTV4C8/qFpTW6DTWYurd4+fE0OJFJZQF -buhfXYwmRlVOgN5i77NTIJZJQfYFj38c/Iv5vZBPokO6mffrOTv3MHWVgQARAQAB -tDNSZWQgSGF0LCBJbmMuIChyZWxlYXNlIGtleSAyKSA8c2VjdXJpdHlAcmVkaGF0 -LmNvbT6JAjYEEwECACAFAkrgSTsCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAK -CRAZni+R/UMdUWzpD/9s5SFR/ZF3yjY5VLUFLMXIKUztNN3oc45fyLdTI3+UClKC -2tEruzYjqNHhqAEXa2sN1fMrsuKec61Ll2NfvJjkLKDvgVIh7kM7aslNYVOP6BTf -C/JJ7/ufz3UZmyViH/WDl+AYdgk3JqCIO5w5ryrC9IyBzYv2m0HqYbWfphY3uHw5 -un3ndLJcu8+BGP5F+ONQEGl+DRH58Il9Jp3HwbRa7dvkPgEhfFR+1hI+Btta2C7E -0/2NKzCxZw7Lx3PBRcU92YKyaEihfy/aQKZCAuyfKiMvsmzs+4poIX7I9NQCJpyE -IGfINoZ7VxqHwRn/d5mw2MZTJjbzSf+Um9YJyA0iEEyD6qjriWQRbuxpQXmlAJbh -8okZ4gbVFv1F8MzK+4R8VvWJ0XxgtikSo72fHjwha7MAjqFnOq6eo6fEC/75g3NL -Ght5VdpGuHk0vbdENHMC8wS99e5qXGNDued3hlTavDMlEAHl34q2H9nakTGRF5Ki -JUfNh3DVRGhg8cMIti21njiRh7gyFI2OccATY7bBSr79JhuNwelHuxLrCFpY7V25 -OFktl15jZJaMxuQBqYdBgSay2G0U6D1+7VsWufpzd/Abx1/c3oi9ZaJvW22kAggq -dzdA27UUYjWvx42w9menJwh/0jeQcTecIUd0d0rFcw/c1pvgMMl/Q73yzKgKYw== -=zbHE ------END PGP PUBLIC KEY BLOCK----- -The following public key can be used to verify RPM packages built and -signed by Red Hat, Inc. This key is a supporting (auxiliary) key for -Red Hat products shipped after November 2006 and for all updates to -those products. - -Questions about this key should be sent to security@redhat.com. - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEVwDGkRBACwPhZIpvkjI8wV9sFTDoqyPLx1ub8Sd/w+YuI5Ovm49mvvEQVT -VLg8FgE5JlST59AbsLDyVtRa9CxIvN5syBVrWWWtHtDnnylFBcqG/A6J3bI4E9/A -UtSL5Zxbav0+utP6f3wOpxQrxc+WIDVgpurdBKAQ3dsobGBqypeX6FXZ5wCgou6C -yZpGIBqosJaDWLzNeOfb/70D/1thLkQyhW3JJ6cHCYJHNfBShvbLWBf6S231mgmu -MyMlt8Kmipc9bw+saaAkSkVsQ/ZbfjrWB7e5kbMruKLVrH+nGhamlHYUGyAPtsPg -Uj/NUSj5BmrCsOkMpn43ngTLssE9MLhSPj2nIHGFv9B+iVLvomDdwnaBRgQ1aK8z -z6MAA/406yf5yVJ/MlTWs1/68VwDhosc9BtU1V5IE0NXgZUAfBJzzfVzzKQq6zJ2 -eZsMLhr96wbsW13zUZt1ing+ulwh2ee4meuJq6h/971JspFY/XBhcfq4qCNqVjsq -SZnWoGdCO6J8CxPIemD2IUHzjoyyeEj3RVydup6pcWZAmhzkKrQzUmVkIEhhdCwg -SW5jLiAoYXV4aWxpYXJ5IGtleSkgPHNlY3VyaXR5QHJlZGhhdC5jb20+iF4EExEC -AB4FAkVwDGkCGwMGCwkIBwMCAxUCAwMWAgECHgECF4AACgkQRWiciC+mWOC1rQCg -ooNLCFOzNPcvhd9Za8C801HmnsYAniCw3yzrCqtjYnxDDxlufH0FVTwX -=d/bm ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-remi b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-remi deleted file mode 100644 index 3283386064..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-remi +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.7 (GNU/Linux) - -mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 -/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA -/2a7tkw1IbCbt4IGG0aZJ6/xgQejrOLi4ewniqWuXCc+tLuWBZrGpE2QfwCggZ+L -0e6KPTHMP97T4xV81e3Ba5MD/3NwOQh0pVvZlW66Em8IJnBgM+eQh7pl4xq7nVOh -dEMJwVU0wDRKkXqQVghOxALOSAMapj5mDppEDzGLZHZNSRcvGEs2iPwo9vmY+Qhp -AyEBzE4blNR8pwPtAwL0W3cBKUx7ZhqmHr2FbNGYNO/hP4tO2ochCn5CxSwAfN1B -Qs5pBACOkTZMNC7CLsSUT5P4+64t04x/STlAFczEBcJBLF1T16oItDITJmAsPxbY -iee6JRfXmZKqmDP04fRdboWMcRjfDfCciSdIeGqP7vMcO25bDZB6x6++fOcmQpyD -1Fag3ZUq2yojgXWqVrgFHs/HB3QE7UQkykNp1fjQGbKK+5mWTrQkUmVtaSBDb2xs -ZXQgPFJQTVNARmFtaWxsZUNvbGxldC5jb20+iGAEExECACAFAkZ+MYoCGwMGCwkI -BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAATm9HAPl/Vv/UAJ9EL8ioMTsz/2EPbNuQ -MP5Xx/qPLACeK5rk2hb8VFubnEsbVxnxfxatGZ25AQ0EQmfLXRAEANwGvY+mIZzj -C1L5Nm2LbSGZNTN3NMbPFoqlMfmym8XFDXbdqjAHutGYEZH/PxRI6GC8YW5YK4E0 -HoBAH0b0F97JQEkKquahCakj0P5mGuH6Q8gDOfi6pHimnsSAGf+D+6ZwAn8bHnAa -o+HVmEITYi6s+Csrs+saYUcjhu9zhyBfAAMFA/9Rmfj9/URdHfD1u0RXuvFCaeOw -CYfH2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv -JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK -8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i -gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== -=6Rbg ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-rpmforge-dag deleted file mode 100644 index 8ee27f45b9..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-rpmforge-dag +++ /dev/null @@ -1,32 +0,0 @@ -The following public key can be used to verify RPM packages -downloaded from http://dag.wieers.com/apt/ using 'rpm -K' -if you have the GNU GPG package. -Questions about this key should be sent to: -Dag Wieers - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.1 (GNU/Linux) - -mQGiBD9JMT0RBAC9Q2B0AloUMTxaK73sD0cOu1MMdD8yuDagbMlDtUYA1aGeJVO6 -TV02JLGr67OBY+UkYuC1c3PUwmb3+jakZd5bW1L8E2L705wS0129xQOZPz6J+alF -5rTzVkiefg8ch1yEcMayK20NdyOmhDGXQXNQS8OJFLTIC6bJs+7MZL83/wCg3cG3 -3q7MWHm3IpJb+6QKpB9YH58D/2WjPDK+7YIky/JbFBT4JPgTSBy611+bLqHA6PXq -39tzY6un8KDznAMNtm+NAsr6FEG8PHe406+tbgd7tBkecz3HPX8nR5v0JtDT+gzN -8fM3kAiAzjCHUAFWVAMAZLr5TXuoq4lGTTxvZbwTjZfyjCm7gIieCu8+qnPWh6hm -30NgA/0ZyEHG6I4rOWqPks4vZuD+wlp5XL8moBXEKfEVOMh2MCNDRGnvVHu1P3eD -oHOooVMt9sWrGcgxpYuupPNL4Uf6B6smiLlH6D4tEg+qCxC17zABI5572XJTJ170 -JklZJrPGtnkPrrKMamnN9MU4RjGmjh9JZPa7rKjZHyWP/z/CBrQ1RGFnIFdpZWVy -cyAoRGFnIEFwdCBSZXBvc2l0b3J5IHYxLjApIDxkYWdAd2llZXJzLmNvbT6IWQQT -EQIAGQUCP0kxPQQLBwMCAxUCAwMWAgECHgECF4AACgkQog5SFGuNeeYvDQCeKHST -hIq/WzFBXtJOnQkJGSqAoHoAnRtsJVWYmzYKHqzkRx1qAzL18Sd0iEYEEBECAAYF -Aj9JMWAACgkQoj2iXPqnmevnOACfRQaageMcESHVE1+RSuP3txPUvoEAoJAtOHon -g+3SzVNSZLn/g7/Ljfw+uQENBD9JMT8QBACj1QzRptL6hbpWl5DdQ2T+3ekEjJGt -llCwt4Mwt/yOHDhzLe8SzUNyYxTXUL4TPfFvVW9/j8WOkNGvffbs7g84k7a5h/+l -IJTTlP9V9NruDt1dlrBe+mWF6eCY55OFHjb6nOIkcJwKxRd3nGlWnLsz0ce9Hjrg -6lMrn0lPsMV6swADBQP9H42sss6mlqnJEFA97Fl3V9s+7UVJoAIA5uSVXxEOwVoh -Vq7uECQRvWzif6tzOY+vHkUxOBRvD6oIU6tlmuG3WByKyA1d0MTqMr3eWieSYf/L -n5VA9NuD7NwjFA1kLkoDwfSbsF51LppTMkUggzwgvwE46MB6yyuqAVI1kReAWw+I -RgQYEQIABgUCP0kxPwAKCRCiDlIUa4155oktAKDAzm9QYbDpk6SrQhkSFy016BjE -BACeJU1hpElFnUZCL4yKj4EuLnlo8kc= -=mqUt ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-sl b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-sl deleted file mode 100644 index 70b6bd17ef..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-sl +++ /dev/null @@ -1,32 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQGiBEpXadARBACHhOfMUuT/4iDvBRmm6bEsvnMN++L79aYhEUMNlrZ2TjKPjPvG -Y0vGk+I0JhUJWutkQRZVbqgVDsNjmnELnACK+xvdryvtxh50wCI9WUl7CT5EV7BS -/jD7JxTFbXyC/Xv0ixMB9vj6U9cySyE8PxONp0HzO6LTIr1OMPgDUsP4lwCgh8De -fmY8TN2m9a0huLdNrnmKw0cD/2bkt6rJAi3+BGHWNgQ9Nb/4wQff8BKGDtL/8acp -3yH91axuD2iYCKw0ZP5akBpRGv+4e30Plmbi1f5NaEDo9Ga1c4TDPopwgiYhrVLj -56efoTfP2AiZl3iBKFPI83/YOhrVZF8UiYoAoUnOFpOg8vmtCzgvYip5UZLTgbfJ -lcWvA/9vMb8By+1pHjW98d7GkzvZqzyMtWlbO7PXCn8P7bGQYjwvyTGiRNz3q22c -2Z29qQw4r1L1L1JGsUwuOMahkczWVdD4TRHc8mhVJEUEA6AkNAZc+Ymsfr/ip0kX -nSZLE3pYVifOhBRO8EbT0WhCMScmZNpwvZU//HKL/p+n3LArUrRZU2NpZW50aWZp -YyBMaW51eCAoUlBNIHNpZ25pbmcga2V5IGZvciBTY2llbnRpZmljIExpbnV4KSA8 -c2NpZW50aWZpYy1saW51eC1kZXZlbEBmbmFsLmdvdj6IYAQTEQIAIAUCSldp0AIb -AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJELC0GD8ZKn19cXIAnA5R+EbaYr4/ -IL6It/UxHXlBFIajAJ9bwmNDF14uvDnFigg1PLevLTBnTIhGBBARAgAGBQJKV6lf -AAoJENpq0AiC/ReyKLQAmwVC/Ii3sAKsptwZKHw/uk1kbupCAJ0eIzSaUo1hSa1V -fP7O/dqigu6JAbkCDQRKV2nZEAgAzAcaC7unRNdrIwAGGKqOIvI8WNwpftHY50Y5 -zPSl7vtWVkp3N+2fynJR+tW4G/2xDChBbPzPz/TavRyBc21LKzAlym8qIGEE02cZ -U/YJAYnbAkNNiGMOAnAIjBw1KUcQamAxdk0glE7MP1JiXY1MO4tTW38UEcvQbSvg -Mh/eECqFOwiQXJmkPpZhPUwnwmZRCV4vlCZQM3CMExZ9pDV/V+kuhefw2WeheXyh -g4DC88gcrv2mO0I3sVmpxn3JLMayiMlQbOSYLQuNVKN/EFDwuAbS9Ane7vm6wF9X -NswMX0I/vO1IVvSN1fi5ZM71QzeYUGKBQv97kLO20hbRWZ1V+wADBggAys+jhlYH -mtFZQxV4an1ucqnVauKnstj0zF88Hiy7yivT3W5h3Zd067uOfcBQCJUlt7y8sYD2 -q9htm5Rrxx+J29bl0zxwrEatnv0gLzprSa7Ei3wR6IrvBM3Ic0mGSzlsSxlzaFtt -Pwak5C47vX9+PwKEKXFdM1gVzHTuD6PXEYxA4YMlQGeGVA68FvTHxMHpf8POQWTV -QtjoI0flvFT7d4ozqUJdjJZxJDFQ7GO2YdIfF3sUdfn5kFxK0SUzqrmCYXeheniS -LKC4mpAR0PetWJ7r1gY5khHb2eHW1vdEBYUXlHjB+jLaOBns05MHMZYd4CHe8q/Q -gzMeVlh8YLSdZYhJBBgRAgAJBQJKV2nZAhsMAAoJELC0GD8ZKn19iU8AniUIFu32 -VeRJ+VKL2vBQMVbFVZOMAJ434Bi99fN2CSh7T62oxtQvhw70fw== -=eL9H ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-webtatic-andy b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-webtatic-andy deleted file mode 100644 index 317b802b56..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-webtatic-andy +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.5 (GNU/Linux) - -mQGiBE1e+1MRBAD8j+KyOIpGNRN39gNy2E/1HG4ZoLFuxIOxI5/1FEuZB/GjYF5m -DvJerZukd0QCqCs72J6J+uWnfD/52t2XWTw4IHPpCWeyr9TWex3uOYmrYzY+0l0l -qsCsrhT0XGkAE0+/20oEP2+t/d+1q0yRcYZRwWK/ME2rUUX0jOa/B3Bc6wCg3blw -XdZNrv1wVNd1PCOUI79k0V0D+wfbybos8Cmdv2f8dD746fSR/hmp4SzpBDmPRRQu -0gtJAKI6ycTdotGq5zHfZj76kDQBudeIgdbWtqfckP2lK47i8lIENAyC4MK8dxh9 -Ts+b1LqXlbcPyixzImf4qoT5DT1lSEUPwoMRX8W/29GAcvnZpOwQ8g7DNmRBpFFY -8U2GBADz6uEeP3YwJAuL7pi77AalxR0WQAADMR59pGltQdXaZvANXoioU0W519Pb -nl3gKWDiTuwUDrwaSPoBbNLyX4s0AE7/0HSG02/eRjLB8toQpAH9xkK/u2WPe/do -erZg5yg1qhoCbEM7kJ2I/GBl6VbPedt2ORdsC4ZTWTnZJh6tYLQhQW5keSBUaG9t -cHNvbiA8YW5keUB3ZWJ0YXRpYy5jb20+iGAEExECACAFAk1e+1MCGwMGCwkIBwMC -BBUCCAMEFgIDAQIeAQIXgAAKCRC3Q0sGz0xP+TA0AJwJf5ZPeub8v+5CtZwdcZhV -LU0sjgCgrP3y54heBjF1vhZQ3rJywTmRLHe5Ag0ETV77UxAIAIQPLVFbqheJ90Kf -NF8TYt3ZIMpP5chw25OYq4tuZMzVJxKjUlM7KPQxUKquY/F9WpjH980LmICTb4Fz -txzn2bshIsGyg8pDUSnVK0NPY5uaq9bK4oht8wkr3FNFT2FpeqDIJyn+phIuEpIi -qt1LJyzzjobh9csaaGmNHvtrlkIggBj2n/ZQuGNhcYnKUZ/WGmkItCTSOfA++G+C -dCo1aPEymfbnJvaLB/mLyzA+r/r7LQM10cZEtqh5JdclJEh3CzZmx9HsRxCDZF8W -X/C4MmCwmIxmuU4vkVNhHFTQimQEUR8vg9ltiz8+xBjyE1Iav4MxfOYh3xjdJk1d -zlovyUcAAwUH/2KPgf0UQ1o+4IjOYinEEbNlrD1pKw5anUKwaaeQi0vm/oRG0E2F -ZCJ73OHxW/0hMrwbrGwXcm4NBARnAppg+/CecOVpkBgD5hrM+11DPhxdd1bjjfza -Pq8GmPp8SSsiTPUCoSlzojxL3Z05RNbvKVzxzxbYdx5h5XOTflI7bAHTY4AzGSDf -WaFljjCucht/d7u5empAd02haldUXWjT9RvY5RwnRZ+hjI47e+wUA0FMLHYtA1/0 -cwEIvpp2xwF/jpH3ODmnIGEeNoLyzAV7X0KAlSN8VRsh7igZRB9TRGI67aTjRgk8 -ayf/QNxAzwEk1MeDv67IFKNYVolxHCt4CtqISQQYEQIACQUCTV77UwIbDAAKCRC3 -Q0sGz0xP+dPiAKDUNJ5rkB9CRoMH9BC35d0fqXXeugCgwl/HYv52dWgatbyEGLet -etv5Qeg= -=nIAo ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.art b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.art deleted file mode 100644 index 825424e1f3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.art +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.1 (GNU/Linux) - -mQGiBEGP+skRBACyZz7muj2OgWc9FxK+Hj7tWPnrfxEN+0PE+n8MtqH+dxwQpMTd -gDpOXxJa45GM5pEwB6CFSFK7Fb/faniF9fDbm1Ga7MpBupIBYLactkoOTZMuTlGB -T0O5ha4h26YLqFfQOtlEi7d0+BDDdfHRQw3o67ycgRnLgYSA79DISc3MywCgk2TR -yd5sRfZAG23b4EDl+D0+oaMEAK73J7zuxf6F6V5EaxLd/w4JVB2xW0Glcn0fACOe -8FV9lzcZuo2xPpdGuyj02f/xlqvEav3XqTfFU2no61mA2pamaRNhlo+CEfGc7qde -/1twfSgOYqzeCx7+aybyPo8Th41b80FT19mfkjBf6+5NbUHffRabFFh1FmcPVNBn -F3FoA/95nRIzqDMItdTRitaZn02dIGNjdwllBD75bSVEvaR9O5hjBo0VMc25DB7f -DM2qEO52wCQbAKw9zFC284ekZVDaK4aHYt7iobHaqJEpKHgsDut5WWuMiSLR+SsF -aBHIZ9HvrKWLSUQKHU6A1Hva0P0r3GnoCMc/VCVfrLl721SjPbQzQXRvbWljIFJv -Y2tldCBUdXJ0bGUgPGFkbWluQGF0b21pY3JvY2tldHR1cnRsZS5jb20+iFkEExEC -ABkFAkGP+skECwcDAgMVAgMDFgIBAh4BAheAAAoJEDKpURRevSdEzcQAn1hSHqTO -jwv/z/picpOnR+mgycwHAKCBex2ciyXo5xeaQ9w7OMf7Jsmon7kBDQRBj/rMEAQA -6JvRndqE4koK0e49fUkICm1X0ZEzsVg9VmUW+Zft5guCRxmGlYTmtlC7oJCToRP/ -m/xH5uIevGiJycRKB0Ix+Csl6f9QuTkQ7tSTHcaIKbI3tL1x6CCBoWeTGYaOJlvk -ubrmajiMFaBfopLH2firoSToDGoUvv4e7bImIHEgNr8AAwUEAND0YR9DOEZvc+Lq -Ta/PQyxkdZ75o+Ty/O64E3OmO1Tuw2ciSQXCcwrbrMSE6EHHetxtGCnOdkjjjtmH -AnxsxdONv/EJuQmLcoNcsigZZ4tfRdmtXgcbnOmXBgmy1ea1KvWcsmecNSAMJHwR -7vDDKzbj4mSmudzjapHeeOewFF10iEYEGBECAAYFAkGP+swACgkQMqlRFF69J0Sq -nQCfa/q9Y/oY4dOTGj6MsdmRIQkKZhYAoIscjinFwTru4FVi2MIEzUUMToDK -=NOIx ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.atrpms b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.atrpms deleted file mode 100644 index 860ace4d24..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.atrpms +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.6 (GNU/Linux) - -mQGiBD5gtCgRBACKIvjMF+20r9k/Uw2Hq6Y/qn1nM0AZEFalhglXP5pMm5bMgkcI -1vCWqJxSbhQhk8hSEenoszes8hyUxHj4hFFUDiRtAxOpCpGCsCnUddgQtHAQd+tm -aQsM6J3Jm/EZPtwR0lvwvRGvz2x6Rr95G8+42KK9x+mBYhLk0y3gAbBzhwCgnkDH -a97MGBT7gRLrmtFqiHrWlPkD/2tBaH6IEuoJhcAbNj9MukbhDOYJ6ic9Nzf6sR3t -ZG+XgQLLS2DNy8+HWcYJOjpJDEe8zWFDdUv3cL1D0U2f2e85FuJaMucHn+816iw8 -mNjZXJEoDE4LJ8Vv53fkevNZpdWmO2VtRwI+woDnIHYHukDLj2sWhVt+5W+uOKAE -OippA/9OzuWrwBtTR+Np8ApZGkxhxU1z0iEStV+kQNqJE7YoR4SGMuzEa3bFzrPx -k4qIU+rw4YgFgHrs1x08lXxNOZkq6avvbl60HqN2qF2UQL/YdU+5X3ixaJVaYYk8 -yuK+hp0Hx2DdBWmVhq6rEzIfpnFhF4qspwMWEiiBGjYDL62W7LQ0QVRycG1zLm5l -dCAocnBtIHNpZ25pbmcga2V5KSA8QXhlbC5UaGltbUBBVHJwbXMubmV0PohnBBMR -AgAnAhsDBgsJCAcDAgMVAgMDFgIBAh4BAheAAhkBBQJFfF9PBQkJGI4nAAoJEFCM -5eZmU0wrJ0IAnA0BdyRlq2S8ess55R8YMFnWAWXEAJ9Fa7cEHku4j4B83shCODps -+DYUZohnBBMRAgAnAhsDBQkDdMLsBgsJCAcDAgMVAgMDFgIBAh4BAheABQJAKteu -AhkBAAoJEFCM5eZmU0wrMMUAnRjS2PXQp0tsC/69IGMMxqU+8xeAAJ9XQjVAo+mU -kg/3AeBlMBIlFe5hDQ== -=23Fz ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RubyWorks.GPG.key b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RubyWorks.GPG.key deleted file mode 100644 index b91a5a8876..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RubyWorks.GPG.key +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.6 (GNU/Linux) - -mQGiBEY5QQ0RBACfC1NbAdGFMOS/Y7P9hmNph2Wh3TJTh6IZpL+lTJBuZSEa6rp0 -CghS/yU3gGXUPaxAy91M7PXMv5p7S3U/SusZHATLhFdU5J4LuWMf4IiBy9FOB/aj -Q1s5vZ/i3YFaqolXsRP8TgIu4Lzp/j3+KAxFb3gF7lz64J/Et2Jil0OQzwCgkn9i -SoPEM6d9SCFOidhUuTHUhM0D/3UXl/FKPVFrFzjslFpaN9NgArRrmXKTOBWEqMLy -12pbTzOtv+p17Ot51q4h0ebEWrmVJ/h/7Is6QT6AKHuOIW+1/88fcSrmef//0Scz -wtEwVudkYA+kOGt1pwhapVYf1lWE9Z6L3V/MVdxXUesylGO6jJjOjpUB+ZBItwl7 -exkhA/4iemhq4D5Jp6r1Kv3aKSPNENdhTORyfZz4UfyOsUfYncaprP5IZja0j+rd -tQLIsH8hXvCT2kSAUY6nMGmzPgpgGamtHI6gH1ZmoNX2gEF7tzGNgKMbbUmwO89B -N56U7wm68AreXE8XviRjGjAtZWnouqe5X+EiUurdJkzRwU0c2rQpVGhvdWdodFdv -cmtzIDxydWJ5d29ya3NAdGhvdWdodHdvcmtzLmNvbT6IYAQTEQIAIAUCRjlBDQIb -AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEHM/KlUQbeB0SSYAn0sgAx5ZK975 -wZiChkIqOCyFZ9PLAJ9laivkzqT2y+Kh9FGe3TP/CAhRTbkCDQRGOUEVEAgAqxJI -MFrYV3JKyeXHVKXHNd5Nf1WdqKi37VOdSTBftiehzZdR9hxkGEknYxnbBLGJR9YD -/uJ2+DRwNBcw2RrrEmb0DCZxcLQLZ3xYa7+WvcR4/Nir/3858SGJ+wmGCHKyX2So -M2TurmKu5bqyUUaBgf+IhKfwOr9zeK3rIRhUq/aiYkw8sWA8ruUvxXwLnbkK1aP9 -hfvSqScwjkfUVk6CQ6GFUD+4N4mNRtRcZz3gYa+0jSNeEJZQOJxRuE/gBHav3eyN -dm4VAFPF20BobvBVEcMhO0KaR/X4jW1G1eFAKLxI7cdx3+vLeNPaFwHiSMSknsNs -UiucI9oV+I5S/50ZrwADBwf/StYTK9KvPnY9ZqmirBpSh0Zl0xylMtAiMblG7pKv -qKTPNr9zXooheQBpAbnhOfju0DB/OtE4V21HqnbMws2aFvHecEbO5EmjwT7ZTltH -5vlbiPrXOc7SpP22FdkOYdunM2+nsA6398mpYFEiFFNAzX6pReN2tbbmXf6zxS9n -nHjMAgl5nMuOASLZrTrUX/7yu6ySS1hy0ZVfEoAFeILy4MV8y0lVjBQa2kNOCNpO -Cc+y1+4EHLS3fuN0x+tho3rhjKAzj8KOt4XnALn8OouRMx9G7ItC2U8kNzHHFRg5 -adT/+nEthVd9q9pYLrUaze7aMQyl+7cD1KzmSe34X9B6W4hJBBgRAgAJBQJGOUEV -AhsMAAoJEHM/KlUQbeB0O7QAn09h4qrKPhWD9eaiyMRS5YeARTYgAJ9WxLcQEvkA -yOSLb33CweehCrlTnQ== -=scSy ------END PGP PUBLIC KEY BLOCK----- diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/yum-updatesd.conf b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/yum-updatesd.conf deleted file mode 100644 index 39181c9d6e..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/files/yum-updatesd.conf +++ /dev/null @@ -1,20 +0,0 @@ -# File Managed by Puppet -[main] -# how often to check for new updates (in seconds) -run_interval = 3600 -# how often to allow checking on request (in seconds) -updaterefresh = 600 - -# how to send notifications (valid: dbus, email, syslog) -emit_via = dbus -# should we listen via dbus to give out update information/check for -# new updates -dbus_listener = yes - -# automatically install updates -do_update = yes -# automatically download updates -do_download = no -# automatically download deps of updates -do_download_deps = no - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/cron.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/cron.pp deleted file mode 100644 index 5b404a0b18..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/cron.pp +++ /dev/null @@ -1,47 +0,0 @@ -# = Class yum::cron -# -# -class yum::cron { - - $manage_update_package = $yum::bool_update_disable ? { - true => absent, - default => present, - } - - $manage_update_service_ensure = $yum::bool_update_disable ? { - true => stopped, - default => running, - } - - $manage_update_service_enable = $yum::bool_update_disable ? { - true => false, - default => true, - } - - $manage_update_file = $yum::bool_update_disable ? { - true => absent, - default => present, - } - - package { 'yum-cron': - ensure => $manage_update_package, - } - - service { 'yum-cron': - ensure => $manage_update_service_ensure, - name => $yum::service, - enable => $manage_update_service_enable, - hasstatus => true, - hasrestart => true, - require => Package['yum-cron'], - } - - file { 'yum-cron': - ensure => $manage_update_file, - path => '/etc/sysconfig/yum-cron', - content => template($yum::update_template), - require => Package['yum-cron'], - notify => Service['yum-cron'], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/defaults.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/defaults.pp deleted file mode 100644 index 5d2a072d05..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/defaults.pp +++ /dev/null @@ -1,49 +0,0 @@ -# = Class: yum::defaults -# -# This class manages default yum repositories for RedHat based distros: -# RHEL, Centos, Scientific Linux -# -class yum::defaults ( ) inherits yum::params { - - $osver = split($::operatingsystemrelease, '[.]') - - if $yum::extrarepo =~ /epel/ { include yum::repo::epel } - if $yum::extrarepo =~ /rpmforge/ { include yum::repo::rpmforge } - if $yum::extrarepo =~ /jpackage5/ { include yum::repo::jpackage5 } - if $yum::extrarepo =~ /jpackage6/ { include yum::repo::jpackage6 } - if $yum::extrarepo =~ /remi/ { include yum::repo::remi } - if $yum::extrarepo =~ /remi_php55/ { include yum::repo::remi_php55 } - if $yum::extrarepo =~ /tmz/ and $osver[0] != '4' { include yum::repo::tmz } - if $yum::extrarepo =~ /webtatic/ { include yum::repo::webtatic } - if $yum::extrarepo =~ /puppetlabs/ and $osver[0] != '4' { include yum::repo::puppetlabs } - if $yum::extrarepo =~ /puppetdevel/ and $osver[0] != '4' { include yum::repo::puppetdevel } - if $yum::extrarepo =~ /nginx/ and $osver[0] != '4' { include yum::repo::nginx } - if $yum::extrarepo =~ /mongodb/ and $osver[0] != '4' { include yum::repo::mongodb } - if $yum::extrarepo =~ /repoforge/ { include yum::repo::repoforge } - if $yum::extrarepo =~ /repoforgeextras/ { include yum::repo::repoforgeextras } - if $yum::extrarepo =~ /integ_ganeti/ { include yum::repo::integ_ganeti } - if $yum::extrarepo =~ /elrepo/ { include yum::repo::elrepo } - if $yum::extrarepo =~ /centalt/ { include yum::repo::centalt } - - if $yum::bool_defaultrepo { - case $::operatingsystem { - centos: { - if $osver[0] == '6' { include yum::repo::centos6 } - if $osver[0] == '5' { include yum::repo::centos5 } - if $osver[0] == '4' { include yum::repo::centos4 } - if $yum::extrarepo =~ /centos-testing/ { include yum::repo::centos_testing } - if $yum::extrarepo =~ /karan/ { include yum::repo::karan } - if $yum::extrarepo =~ /atomic/ { include yum::repo::atomic } - } - redhat: { - } - scientific: { - if $osver[0] == '6' { include yum::repo::sl6 } - if $osver[0] == '5' { include yum::repo::sl5 } - if $yum::extrarepo =~ /centos-testing/ { include yum::repo::centos_testing } - if $yum::extrarepo =~ /karan/ { include yum::repo::karan } - } - default: { } - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/init.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/init.pp deleted file mode 100644 index c4617f420b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/init.pp +++ /dev/null @@ -1,329 +0,0 @@ -# = Class: yum -# -# This class manages yum repositories for RedHat based distros: -# RHEL, Centos, Scientific Linux -# -# Copyright 2008, admin(at)immerda.ch -# Copyright 2008, Puzzle ITC GmbH -# Marcel Harry haerry+puppet(at)puzzle.ch -# Simon Josi josi+puppet(at)puzzle.ch -# -# This program is free software; you can redistribute -# it and/or modify it under the terms of the GNU -# General Public License version 3 as published by -# the Free Software Foundation. -# -# Apapted for Example42 by Alessandro Franceschi -# -# == Parameters -# -# [*install_all_keys*] -# If to provide all the module's known rpm gpgp keys. -# Default true, set to false to keep backwards compatibility -# -# [*update*] -# If you want yum automatic updates. Possibile values: -# cron - Updates in a cronjob -# updatesd - Updates via updatesd (Only on Centos/RedHat/SL 5) -# false/no - Automatic updates disabled (Default) -# -# [*update_disable*] -# Set to true if you have enabled updates and now wish to disable -# Defaults to false. Logic pertaining to this parameter is only applied -# when the update method parameter (immediately above) is set. -# -# [*defaultrepo*] -# If you want to enable default repositories for supported OS -# Default: true -# Note: This variable is ignored if you provide a custom source_repo_dir -# -# [*extrarepo*] -# If you want to enable some (supported) extra repositories -# Can be an array. Default: 'epel' -# (Epel is used by many modules) -# Note: This variable is ignored if you provide a custom source_repo_dir -# -# [*plugins_source_dir*] -# The path of the plugins configuration directory -# -# [*repo_dir*] -# The path of the yum.repos.d directory -# -# [*source_repo_dir*] -# The source path to use to populate the yum.repos.d directory -# -# [*clean_repos*] -# Boolean. Defines if you want to cleanup the yum.repos.d dir -# and be sure that it contains only files managed by Puppet -# Default: false -# -# [*my_class*] -# Name of a custom class to autoload to manage module's customizations -# If defined, yum class will automatically "include $my_class" -# Can be defined also by the (top scope) variable $yum_myclass -# -# [*source*] -# Sets the content of source parameter for main configuration file -# If defined, yum main config file will have the param: source => $source -# Can be defined also by the (top scope) variable $yum_source -# -# [*source_dir*] -# If defined, the whole yum configuration directory content is retrieved -# recursively from the specified source -# (source => $source_dir , recurse => true) -# Can be defined also by the (top scope) variable $yum_source_dir -# -# [*source_dir_purge*] -# If set to true (default false) the existing configuration directory is -# mirrored with the content retrieved from source_dir -# (source => $source_dir , recurse => true , purge => true) -# Can be defined also by the (top scope) variable $yum_source_dir_purge -# -# [*template*] -# Sets the path to the template to use as content for main configuration file -# If defined, yum main config file has: content => content("$template") -# Note source and template parameters are mutually exclusive: don't use both -# Can be defined also by the (top scope) variable $yum_template -# -# [*options*] -# An hash of custom options to be used in templates for arbitrary settings. -# Can be defined also by the (top scope) variable $yum_options -# -# [*absent*] -# Set to 'true' to remove package(s) installed by module -# Can be defined also by the (top scope) variable $yum_absent -# -# [*disable*] -# Set to 'true' to disable service(s) managed by module -# Can be defined also by the (top scope) variable $yum_disable -# -# [*disableboot*] -# Set to 'true' to disable service(s) at boot, without checks if it's running -# Use this when the service is managed by a tool like a cluster software -# Can be defined also by the (top scope) variable $yum_disableboot -# -# [*puppi*] -# Set to 'true' to enable creation of module data files that are used by puppi -# Can be defined also by the (top scope) variables $yum_puppi and $puppi -# -# [*puppi_helper*] -# Specify the helper to use for puppi commands. The default for this module -# is specified in params.pp and is generally a good choice. -# You can customize the output of puppi commands for this module using another -# puppi helper. Use the define puppi::helper to create a new custom helper -# Can be defined also by the (top scope) variables $yum_puppi_helper -# and $puppi_helper -# -# [*debug*] -# Set to 'true' to enable modules debugging -# Can be defined also by the (top scope) variables $yum_debug and $debug -# -# [*audit_only*] -# Set to 'true' if you don't intend to override existing configuration files -# and want to audit the difference between existing files and the ones -# managed by Puppet. -# Can be defined also by the (top scope) variables $yum_audit_only -# and $audit_only -# -# [*config_dir*] -# Main configuration directory. Used by puppi -# -# [*config_file*] -# Main configuration file path -# -# [*config_file_mode*] -# Main configuration file path mode -# -# [*config_file_owner*] -# Main configuration file path owner -# -# [*config_file_group*] -# Main configuration file path group -# -# [*cron_params*] -# Optional extra arguments for $update = cron ONLY -# -# [*cron_mailto*] -# Optional mail addres to send update reports for $update = cron ONLY -# -# [*cron_dotw*] -# Days of the week to perform yum updates by cron -# 0123456 (default) -# -# [*log_file*] -# Log file(s). Used by puppi -# -class yum ( - $install_all_keys = params_lookup( 'install_all_keys' ), - $update = params_lookup( 'update' ), - $update_disable = params_lookup( 'update_disable' ), - $defaultrepo = params_lookup( 'defaultrepo' ), - $extrarepo = params_lookup( 'extrarepo' ), - $plugins_source_dir = params_lookup( 'plugins_source_dir' ), - $repo_dir = params_lookup( 'repo_dir' ), - $source_repo_dir = params_lookup( 'source_repo_dir' ), - $clean_repos = params_lookup( 'clean_repos' ), - $my_class = params_lookup( 'my_class' ), - $source = params_lookup( 'source' ), - $source_dir = params_lookup( 'source_dir' ), - $source_dir_purge = params_lookup( 'source_dir_purge' ), - $template = params_lookup( 'template' ), - $options = params_lookup( 'options' ), - $absent = params_lookup( 'absent' ), - $disable = params_lookup( 'disable' ), - $disableboot = params_lookup( 'disableboot' ), - $puppi = params_lookup( 'puppi' , 'global' ), - $puppi_helper = params_lookup( 'puppi_helper' , 'global' ), - $debug = params_lookup( 'debug' , 'global' ), - $audit_only = params_lookup( 'audit_only' , 'global' ), - $config_dir = params_lookup( 'config_dir' ), - $config_file = params_lookup( 'config_file' ), - $config_file_mode = params_lookup( 'config_file_mode' ), - $config_file_owner = params_lookup( 'config_file_owner' ), - $config_file_group = params_lookup( 'config_file_group' ), - $update_template = params_lookup( 'update_template' ), - $cron_param = params_lookup( 'cron_param' ), - $cron_mailto = params_lookup( 'cron_mailto' ), - $cron_dotw = params_lookup( 'cron_dotw' ), - $log_file = params_lookup( 'log_file' ) - ) inherits yum::params { - - $bool_install_all_keys=any2bool($install_all_keys) - $bool_defaultrepo=any2bool($defaultrepo) - $bool_clean_repos=any2bool($clean_repos) - $bool_source_dir_purge=any2bool($source_dir_purge) - $bool_absent=any2bool($absent) - $bool_disable=any2bool($disable) - $bool_disableboot=any2bool($disableboot) - $bool_puppi=any2bool($puppi) - $bool_debug=any2bool($debug) - $bool_audit_only=any2bool($audit_only) - $bool_update_disable=any2bool($update_disable) - - $osver = split($::operatingsystemrelease, '[.]') - - $manage_service_enable = $yum::bool_disableboot ? { - true => false, - default => $yum::bool_disable ? { - true => false, - default => $yum::bool_absent ? { - true => false, - false => true, - }, - }, - } - - $manage_service_ensure = $yum::bool_disable ? { - true => 'stopped', - default => $yum::bool_absent ? { - true => 'stopped', - default => 'running', - }, - } - - $manage_file = $yum::bool_absent ? { - true => 'absent', - default => 'present', - } - - $manage_audit = $yum::bool_audit_only ? { - true => 'all', - false => undef, - } - - $manage_file_replace = $yum::bool_audit_only ? { - true => false, - false => true, - } - - $manage_file_source = $yum::source ? { - '' => undef, - default => $yum::source, - } - - $manage_file_content = $yum::template ? { - '' => undef, - default => template($yum::template), - } - - $manage_updates = $yum::update ? { - 'cron' => true, - 'updatesd' => true, - default => false, - } - - file { 'yum.repo_dir': - ensure => directory, - path => $yum::repo_dir, - source => $yum::source_repo_dir, - recurse => true, - purge => $yum::bool_clean_repos, - replace => $yum::manage_file_replace, - audit => $yum::manage_audit, - } - - if $yum::source_repo_dir == undef { - include yum::defaults - } - - # Yum Configuration file - file { 'yum.conf': - ensure => $yum::manage_file, - path => $yum::config_file, - mode => $yum::config_file_mode, - owner => $yum::config_file_owner, - group => $yum::config_file_group, - source => $yum::manage_file_source, - content => $yum::manage_file_content, - replace => $yum::manage_file_replace, - audit => $yum::manage_audit, - } - - # The whole yum configuration directory can be recursively overriden - if $yum::source_dir { - file { 'yum.dir': - ensure => directory, - path => $yum::config_dir, - source => $yum::source_dir, - recurse => true, - purge => $yum::source_dir_purge, - replace => $yum::manage_file_replace, - audit => $yum::manage_audit, - } - } - - ### Manage Automatic Updates - if $yum::manage_updates { - include $yum::update - } - - ### Include custom class if $my_class is set - if $yum::my_class { - include $yum::my_class - } - - - ### Provide puppi data, if enabled ( puppi => true ) - if $yum::bool_puppi == true { - $classvars=get_class_args() - puppi::ze { 'yum': - ensure => $yum::manage_file, - variables => $classvars, - helper => $yum::puppi_helper, - } - } - - ### Debugging, if enabled ( debug => true ) - if $yum::bool_debug == true { - file { 'debug_yum': - ensure => $yum::manage_file, - path => "${settings::vardir}/debug-yum", - mode => '0640', - owner => 'root', - group => 'root', - content => inline_template('<%= scope.to_hash.reject { |k,v| k.to_s =~ /(uptime.*|path|timestamp|free|.*password.*|.*psk.*|.*key)/ }.to_yaml %>'), - } - } - - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/managed_yumrepo.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/managed_yumrepo.pp deleted file mode 100644 index bc74acda90..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/managed_yumrepo.pp +++ /dev/null @@ -1,77 +0,0 @@ -# = Define yum::managed_yumrepo -# -define yum::managed_yumrepo ( - $descr = 'absent', - $baseurl = 'absent', - $mirrorlist = 'absent', - $enabled = 0, - $gpgcheck = 0, - $gpgkey = 'absent', - $gpgkey_source = '', - $gpgkey_name = '', - $failovermethod = 'absent', - $priority = 99, - $protect = 'absent', - $exclude = 'absent', - $autokeyimport = 'no', - $includepkgs = 'absent') { - - # ensure that everything is setup - include yum::prerequisites - - if $protect != 'absent' { - if ! defined(Yum::Plugin['protectbase']) { - yum::plugin { 'protectbase': } - } - } - - file { "/etc/yum.repos.d/${name}.repo": - ensure => file, - replace => false, - before => Yumrepo[ $name ], - mode => '0644', - owner => 'root', - group => 0, - } - - $gpgkey_real_name = $gpgkey_name ? { - '' => url_parse($gpgkey_source,'filename'), - default => $gpgkey_name, - } - - if $gpgkey_source != '' { - if ! defined(File["/etc/pki/rpm-gpg/${gpgkey_real_name}"]) { - file { "/etc/pki/rpm-gpg/${gpgkey_real_name}": - ensure => file, - replace => false, - before => Yumrepo[ $name ], - source => $gpgkey_source, - mode => '0644', - owner => 'root', - group => 0, - } - } - } - yumrepo { $name: - descr => $descr, - baseurl => $baseurl, - mirrorlist => $mirrorlist, - enabled => $enabled, - gpgcheck => $gpgcheck, - gpgkey => $gpgkey, - failovermethod => $failovermethod, - priority => $priority, - protect => $protect, - exclude => $exclude, - includepkgs => $includepkgs, - } - - if $autokeyimport == 'yes' and $gpgkey != '' { - exec { "rpmkey_add_${gpgkey}": - command => "rpm --import ${gpgkey}", - before => Yumrepo[ $name ], - refreshonly => true, - path => '/sbin:/bin:/usr/sbin:/usr/bin', - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/params.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/params.pp deleted file mode 100644 index 708793bad0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/params.pp +++ /dev/null @@ -1,62 +0,0 @@ -# = Class yum::params -# -class yum::params { - - $install_all_keys = false - - $update = false - - $defaultrepo = true - - $extrarepo = 'epel' - - $clean_repos = false - - $plugins_config_dir = '/etc/yum/pluginconf.d' - - $source_repo_dir = undef - - $repo_dir = '/etc/yum.repos.d' - - $config_dir = '/etc/yum' - - $config_file = '/etc/yum.conf' - - $config_file_mode = '0644' - - $config_file_owner = 'root' - - $config_file_group = 'root' - - $log_file = '/var/log/yum.log' - - # parameters for the auto-update classes cron.pp/updatesd.pp - $update_disable = false - - $update_template = $::operatingsystemrelease ? { - /6.*/ => 'yum/yum-cron.erb', - default => undef, - } - - # The following two params are for cron.pp only - - $cron_param = '' - - $cron_mailto = '' - - $cron_dotw = '0123456' - - $source = '' - $source_dir = '' - $source_dir_purge = false - $template = '' - $options = '' - $absent = false - $disable = false - $disableboot = false - $puppi = false - $puppi_helper = 'standard' - $debug = false - $audit_only = false - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/plugin.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/plugin.pp deleted file mode 100644 index 6e5d372ace..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/plugin.pp +++ /dev/null @@ -1,54 +0,0 @@ -# Define: pagios::plugin -# -# Adds a yum plugin -# -# Usage: -# With standard source package: -# yum::plugin { 'priorities': } -# -# With custom config file source -# yum::plugin { 'priorities': -# source => 'puppet:///modules/example42/yum/plugin-priorities' -# } -# -# With custom package name (default is taken from $name) -# yum::plugin { 'priorities': -# package_name => 'yum-priorities' -# } -# -define yum::plugin ( - $package_name = '', - $source = '', - $enable = true - ) { - - include yum - - $ensure = bool2ensure( $enable ) - - $yum_plugins_prefix = $yum::osver[0] ? { - 5 => 'yum', - 6 => 'yum-plugin', - default => 'yum-plugin', - } - - $real_package_name = $package_name ? { - '' => "${yum_plugins_prefix}-${name}", - default => $package_name, - } - - package { $real_package_name : - ensure => $ensure - } - - if ( $source != '' ) { - file { "yum_plugin_conf_${name}": - ensure => $ensure, - path => "${yum::plugins_config_dir}/${name}.conf", - owner => root, - group => root, - mode => '0755', - source => $source, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/prerequisites.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/prerequisites.pp deleted file mode 100644 index def976ff39..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/prerequisites.pp +++ /dev/null @@ -1,21 +0,0 @@ -# = Class yum::prerequisites -# -class yum::prerequisites { - - require yum - - yum::plugin { 'priorities': } -# yum::plugin { 'security': } - - if $yum::bool_install_all_keys == true { - file { 'rpm_gpg': - path => '/etc/pki/rpm-gpg/', - source => "puppet:///modules/yum/${::operatingsystem}.${yum::osver[0]}/rpm-gpg/", - recurse => true, - ignore => '.svn', - mode => '0644', - owner => root, - group => 0, - } - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/10gen.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/10gen.pp deleted file mode 100644 index 3f6bbf5d47..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/10gen.pp +++ /dev/null @@ -1,12 +0,0 @@ -# = Class: yum::repo::10gen -# -# This class installs the 10gen repo for MongoDB -# -class yum::repo::10gen { - yum::managed_yumrepo { '10gen': - descr => '10gen Repository', - baseurl => "http://downloads-distro.mongodb.org/repo/redhat/os/${::architecture}", - enabled => 1, - gpgcheck => 0, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/atomic.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/atomic.pp deleted file mode 100644 index 13a24149dd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/atomic.pp +++ /dev/null @@ -1,16 +0,0 @@ -# = Class: yum::repo::atomic -# -# This class installs the atomic repo -# -class yum::repo::atomic { - yum::managed_yumrepo { 'atomic': - descr => 'CentOS / Red Hat Enterprise Linux $releasever - atomicrocketturtle.com', - mirrorlist => 'http://www.atomicorp.com/channels/mirrorlist/atomic/centos-$releasever-$basearch', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY.art', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY.art', - priority => 1, - exclude => 'nmap-ncat', - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/atrpms.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/atrpms.pp deleted file mode 100644 index dce3b67d47..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/atrpms.pp +++ /dev/null @@ -1,17 +0,0 @@ -# = Class: yum::repo::atrpms -# -# This class installs the atrpms repo -# -class yum::repo::atrpms { - - yum::managed_yumrepo { 'centos5-atrpms': - descr => 'CentOS $releasever - $basearch - ATrpms', - baseurl => 'http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY.atrpms', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY.atrpms', - priority => 30, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centalt.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centalt.pp deleted file mode 100644 index 238b1e19c5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centalt.pp +++ /dev/null @@ -1,21 +0,0 @@ -# = Class: yum::repo::centalt -# -# This class installs the centalt repo -# -class yum::repo::centalt { - $osver = split($::operatingsystemrelease, '[.]') - $release = $::operatingsystem ? { - /(?i:Centos|RedHat|Scientific)/ => $osver[0], - default => '6', - } - - yum::managed_yumrepo { 'centalt': - descr => 'CentALT RPM Repository', - baseurl => "http://centos.alt.ru/repository/centos/${release}/\$basearch/", - enabled => 1, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => 'http://centos.alt.ru/repository/centos/RPM-GPG-KEY-CentALT', - priority => 1, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos4.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos4.pp deleted file mode 100644 index 7d0330d906..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos4.pp +++ /dev/null @@ -1,61 +0,0 @@ -# = Class: yum::repo::centos4 -# -# Base Centos4 repos -# -class yum::repo::centos4 { - - yum::managed_yumrepo { 'base': - descr => 'CentOS-$releasever - Base', - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os', - enabled => 1, - gpgcheck => 1, - gpgkey => 'http://mirror.centos.org/centos/RPM-GPG-KEY-centos4', - priority => 1, - } - - yum::managed_yumrepo { 'updates': - descr => 'CentOS-$releasever - Updates', - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates', - enabled => 1, - gpgcheck => 1, - gpgkey => 'http://mirror.centos.org/centos/RPM-GPG-KEY-centos4', - priority => 1, - } - - yum::managed_yumrepo { 'addons': - descr => 'CentOS-$releasever - Addons', - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons', - enabled => 1, - gpgcheck => 1, - gpgkey => 'http://mirror.centos.org/centos/RPM-GPG-KEY-centos4', - priority => 1, - } - - yum::managed_yumrepo { 'extras': - descr => 'CentOS-$releasever - Extras', - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras', - enabled => 1, - gpgcheck => 1, - gpgkey => 'http://mirror.centos.org/centos/RPM-GPG-KEY-centos4', - priority => 1, - } - - yum::managed_yumrepo { 'centosplus': - descr => 'CentOS-$releasever - Centosplus', - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus', - enabled => 0, - gpgcheck => 1, - gpgkey => 'http://mirror.centos.org/centos/RPM-GPG-KEY-centos4', - priority => 2, - } - - yum::managed_yumrepo { 'contrib': - descr => 'CentOS-$releasever - Contrib', - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib', - enabled => 0, - gpgcheck => 1, - gpgkey => 'http://mirror.centos.org/centos/RPM-GPG-KEY-centos4', - priority => 2, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos5.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos5.pp deleted file mode 100644 index c48cccdefc..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos5.pp +++ /dev/null @@ -1,124 +0,0 @@ -# = Class: yum::repo::centos5 -# -# Base Centos5 repos -# -# == Parameters: -# -# [*mirror_url*] -# A clean URL to a mirror of `rsync://msync.centos.org::CentOS`. -# The paramater is interpolated with the known directory structure to -# create a the final baseurl parameter for each yumrepo so it must be -# "clean", i.e., without a query string like `?key1=valA&key2=valB`. -# Additionally, it may not contain a trailing slash. -# Example: `http://mirror.example.com/pub/rpm/centos` -# Default: `undef` -# -class yum::repo::centos5 ( - $mirror_url = undef, -) { - - if $mirror_url { - validate_re( - $mirror_url, - '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', - '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' - ) - } - - $baseurl_base = $mirror_url ? { - undef => undef, - default => "${mirror_url}/\$releasever/os/\$basearch/", - } - - $baseurl_updates = $mirror_url ? { - undef => undef, - default => "${mirror_url}/\$releasever/updates/\$basearch/", - } - - $baseurl_addons = $mirror_url ? { - undef => undef, - default => "${mirror_url}/\$releasever/addons/\$basearch/", - } - - $baseurl_extras = $mirror_url ? { - undef => undef, - default => "${mirror_url}/\$releasever/extras/\$basearch/", - } - - $baseurl_centosplus = $mirror_url ? { - undef => undef, - default => "${mirror_url}/\$releasever/centosplus/\$basearch/", - } - - $baseurl_contrib = $mirror_url ? { - undef => undef, - default => "${mirror_url}/\$releasever/contrib/\$basearch/", - } - - yum::managed_yumrepo { 'base': - descr => 'CentOS-$releasever - Base', - baseurl => $baseurl_base, - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os', - failovermethod => 'priority', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-CentOS-5', - priority => 1, - } - - yum::managed_yumrepo { 'updates': - descr => 'CentOS-$releasever - Updates', - baseurl => $baseurl_updates, - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates', - failovermethod => 'priority', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5', - priority => 1, - } - - yum::managed_yumrepo { 'addons': - descr => 'CentOS-$releasever - Addons', - baseurl => $baseurl_addons, - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons', - failovermethod => 'priority', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5', - priority => 1, - } - - yum::managed_yumrepo { 'extras': - descr => 'CentOS-$releasever - Extras', - baseurl => $baseurl_extras, - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras', - failovermethod => 'priority', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5', - priority => 1, - } - - yum::managed_yumrepo { 'centosplus': - descr => 'CentOS-$releasever - Centosplus', - baseurl => $baseurl_centosplus, - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus', - failovermethod => 'priority', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5', - priority => 2, - } - - yum::managed_yumrepo { 'contrib': - descr => 'CentOS-$releasever - Contrib', - baseurl => $baseurl_contrib, - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib', - failovermethod => 'priority', - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5', - priority => 10, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos6.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos6.pp deleted file mode 100644 index ddfdaf46fe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos6.pp +++ /dev/null @@ -1,108 +0,0 @@ -# = Class: yum::repo::centos6 -# -# Base Centos6 repos -# -# == Parameters: -# -# [*mirror_url*] -# A clean URL to a mirror of `rsync://msync.centos.org::CentOS`. -# The paramater is interpolated with the known directory structure to -# create a the final baseurl parameter for each yumrepo so it must be -# "clean", i.e., without a query string like `?key1=valA&key2=valB`. -# Additionally, it may not contain a trailing slash. -# Example: `http://mirror.example.com/pub/rpm/centos` -# Default: `undef` -# -class yum::repo::centos6 ( - $mirror_url = undef, -) { - - if $mirror_url { - validate_re( - $mirror_url, - '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', - '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' - ) - } - - $baseurl_base = $mirror_url ? { - undef => undef, - default => "${mirror_url}/\$releasever/os/\$basearch/", - } - - $baseurl_updates = $mirror_url ? { - undef => undef, - default => "${mirror_url}/\$releasever/updates/\$basearch/", - } - - $baseurl_extras = $mirror_url ? { - undef => undef, - default => "${mirror_url}/\$releasever/extras/\$basearch/", - } - - $baseurl_centosplus = $mirror_url ? { - undef => undef, - default => "${mirror_url}/\$releasever/centosplus/\$basearch/", - } - - $baseurl_contrib = $mirror_url ? { - undef => undef, - default => "${mirror_url}/\$releasever/contrib/\$basearch/", - } - - yum::managed_yumrepo { 'base': - descr => 'CentOS-$releasever - Base', - baseurl => $baseurl_base, - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os', - failovermethod => 'priority', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-CentOS-6', - priority => 1, - } - - yum::managed_yumrepo { 'updates': - descr => 'CentOS-$releasever - Updates', - baseurl => $baseurl_updates, - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates', - failovermethod => 'priority', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6', - priority => 1, - } - - yum::managed_yumrepo { 'extras': - descr => 'CentOS-$releasever - Extras', - baseurl => $baseurl_extras, - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras', - failovermethod => 'priority', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6', - priority => 1, - } - - yum::managed_yumrepo { 'centosplus': - descr => 'CentOS-$releasever - Centosplus', - baseurl => $baseurl_centosplus, - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus', - failovermethod => 'priority', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6', - priority => 2, - } - - yum::managed_yumrepo { 'contrib': - descr => 'CentOS-$releasever - Contrib', - baseurl => $baseurl_contrib, - mirrorlist => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib', - failovermethod => 'priority', - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6', - priority => 10, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos_testing.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos_testing.pp deleted file mode 100644 index a71f311bcb..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/centos_testing.pp +++ /dev/null @@ -1,23 +0,0 @@ -# = Class: yum::repo::centos_testing -# -# Centos Testing -# -class yum::repo::centos_testing ( - $include_pkgs = '', - $exclude_pkgs = undef - ) { - if $include_pkgs == '' { - fail('Please configure $include_pkgs as we run the testing repo with highest repository') - } - - yum::managed_yumrepo{'centos5-testing': - descr => 'CentOS-$releasever - Testing', - baseurl => 'http://dev.centos.org/centos/$releasever/testing/$basearch', - enabled => 1, - gpgcheck => 1, - gpgkey => 'http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing', - priority => 1, - includepkgs => $include_pkgs, - exclude => $exclude_pkgs, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/ceph.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/ceph.pp deleted file mode 100644 index 33449ecf50..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/ceph.pp +++ /dev/null @@ -1,20 +0,0 @@ -# = Class: yum::repo::ceph -# -# This class installs the official ceph repo -# -class yum::repo::ceph ( - $release = 'emperor' -) { - - yum::managed_yumrepo { 'ceph': - descr => "Ceph ${release} repository", - baseurl => "http://ceph.com/rpm-${release}/\$releasever/\$basearch", - enabled => 1, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc', - autokeyimport => 'yes', - priority => 5, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch10.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch10.pp deleted file mode 100644 index d55e812073..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch10.pp +++ /dev/null @@ -1,15 +0,0 @@ -# = Class: yum::repo::elasticsearch10 -# -# This class installs the elasticsearch10 repo -# -class yum::repo::elasticsearch10 { - - yum::managed_yumrepo { 'elasticsearch-1.0': - descr => 'Elasticsearch repository for 1.0.x packages', - baseurl => 'http://packages.elasticsearch.org/elasticsearch/1.0/centos', - enabled => 1, - gpgcheck => 1, - gpgkey => 'http://packages.elasticsearch.org/GPG-KEY-elasticsearch', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch90.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch90.pp deleted file mode 100644 index 50e312ebab..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch90.pp +++ /dev/null @@ -1,15 +0,0 @@ -# = Class: yum::repo::elasticsearch90 -# -# This class installs the elasticsearch90 repo -# -class yum::repo::elasticsearch90 { - - yum::managed_yumrepo { 'elasticsearch-0.90': - descr => 'Elasticsearch repository for 0.90.x packages', - baseurl => 'http://packages.elasticsearch.org/elasticsearch/0.90/centos', - enabled => 1, - gpgcheck => 1, - gpgkey => 'http://packages.elasticsearch.org/GPG-KEY-elasticsearch', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/elrepo.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/elrepo.pp deleted file mode 100644 index 60ae3e0a6c..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/elrepo.pp +++ /dev/null @@ -1,105 +0,0 @@ -# = Class: yum::repo::elrepo -# -# This class installs the ELRepo repository -# -# == Parameters: -# -# [*mirror_url*] -# A clean URL to a mirror of `http://elrepo.org/linux/`. -# The paramater is interpolated with the known directory structure to -# create a the final baseurl parameter for each yumrepo so it must be -# "clean", i.e., without a query string like `?key1=valA&key2=valB`. -# Additionally, it may not contain a trailing slash. -# Example: `http://elrepo.org/linux/` -# Default: `undef` -# -class yum::repo::elrepo ( - $mirror_url = undef, -) { - - if $mirror_url { - validate_re( - $mirror_url, - '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', - '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' - ) - } - - # Workaround for Facter < 1.7.0 - $osver = split($::operatingsystemrelease, '[.]') - - case $::operatingsystem { - 'RedHat','CentOS','Scientific': { - $release = "el${osver[0]}" - } - default: { - fail("${title}: Operating system '${::operatingsystem}' is not currently supported") - } - } - - $baseurl_elrepo = $mirror_url ? { - undef => undef, - default => "${mirror_url}/elrepo/${release}/\$basearch", - } - - $baseurl_elrepo_testing = $mirror_url ? { - undef => undef, - default => "${mirror_url}/testing/${release}/\$basearch", - } - - $baseurl_elrepo_kernel = $mirror_url ? { - undef => undef, - default => "${mirror_url}/kernel/${release}/\$basearch", - } - - $baseurl_elrepo_extras = $mirror_url ? { - undef => undef, - default => "${mirror_url}/extras/${release}/\$basearch", - } - - yum::managed_yumrepo { 'elrepo': - descr => "ELRepo.org Community Enterprise Linux Repository - ${release}", - baseurl => $baseurl_elrepo, - mirrorlist => "http://elrepo.org/mirrors-elrepo.${release}", - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-elrepo.org', - failovermethod => 'priority', - priority => 17, - } - - yum::managed_yumrepo { 'elrepo-testing': - descr => "ELRepo.org Community Enterprise Linux Testing Repository - ${release}", - baseurl => $baseurl_elrepo_testing, - mirrorlist => "http://elrepo.org/mirrors-elrepo-testing.${release}", - enabled => 0, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org', - failovermethod => 'priority', - priority => 17, - } - - yum::managed_yumrepo { 'elrepo-kernel': - descr => "ELRepo.org Community Enterprise Linux Kernel Repository - ${release}", - baseurl => $baseurl_elrepo_kernel, - mirrorlist => "http://elrepo.org/mirrors-elrepo-kernel.${release}", - enabled => 0, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org', - failovermethod => 'priority', - priority => 17, - } - - yum::managed_yumrepo { 'elrepo-extras': - descr => "ELRepo.org Community Enterprise Linux Extras Repository - ${release}", - baseurl => $baseurl_elrepo_extras, - mirrorlist => "http://elrepo.org/mirrors-elrepo-extras.${release}", - enabled => 0, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org', - failovermethod => 'priority', - priority => 17, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/epel.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/epel.pp deleted file mode 100644 index 4039d81ebd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/epel.pp +++ /dev/null @@ -1,132 +0,0 @@ -# = Class: yum::repo::epel -# -# This class installs the epel repo -# -# == Parameters: -# -# [*mirror_url*] -# A clean URL to a mirror of `http://dl.fedoraproject.org/pub/epel/`. -# The paramater is interpolated with the known directory structure to -# create a the final baseurl parameter for each yumrepo so it must be -# "clean", i.e., without a query string like `?key1=valA&key2=valB`. -# Additionally, it may not contain a trailing slash. -# Example: `http://mirror.example.com/pub/rpm/epel` -# Default: `undef` -# -class yum::repo::epel ( - $mirror_url = undef, -) { - - if $mirror_url { - validate_re( - $mirror_url, - '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', - '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' - ) - } - - if $::operatingsystem == 'Amazon' { - $osver = [ '6' ] - } else { - $osver = split($::operatingsystemrelease, '[.]') - } - - $baseurl_epel = $mirror_url ? { - undef => undef, - default => "${mirror_url}/${osver[0]}/\$basearch/", - } - - $baseurl_epel_debuginfo = $mirror_url ? { - undef => undef, - default => "${mirror_url}/${osver[0]}/\$basearch/debug", - } - - $baseurl_epel_source = $mirror_url ? { - undef => undef, - default => "${mirror_url}/${osver[0]}/SRPMS/", - } - - $baseurl_epel_testing = $mirror_url ? { - undef => undef, - default => "${mirror_url}/testing/${osver[0]}/\$basearch/", - } - - $baseurl_epel_testing_debuginfo = $mirror_url ? { - undef => undef, - default => "${mirror_url}/testing/${osver[0]}/\$basearch/debug", - } - - $baseurl_epel_testing_source = $mirror_url ? { - undef => undef, - default => "${mirror_url}/testing/${osver[0]}/SRPMS/", - } - - yum::managed_yumrepo { 'epel': - descr => "Extra Packages for Enterprise Linux ${osver[0]} - \$basearch", - baseurl => $baseurl_epel, - mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-${osver[0]}&arch=\$basearch", - enabled => 1, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", - gpgkey_source => "puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", - priority => 16, - } - - yum::managed_yumrepo { 'epel-debuginfo': - descr => "Extra Packages for Enterprise Linux ${osver[0]} - \$basearch - Debug", - baseurl => $baseurl_epel_debuginfo, - mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-${osver[0]}&arch=\$basearch", - enabled => 0, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", - priority => 16, - } - - yum::managed_yumrepo { 'epel-source': - descr => "Extra Packages for Enterprise Linux ${osver[0]} - \$basearch - Source", - baseurl => $baseurl_epel_source, - mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-${osver[0]}&arch=\$basearch", - enabled => 0, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", - priority => 16, - } - - yum::managed_yumrepo { 'epel-testing': - descr => "Extra Packages for Enterprise Linux ${osver[0]} - Testing - \$basearch", - baseurl => $baseurl_epel_testing, - mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel${osver[0]}&arch=\$basearch", - enabled => 0, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", - priority => 17, - } - - yum::managed_yumrepo { 'epel-testing-debuginfo': - descr => "Extra Packages for Enterprise Linux ${osver[0]} - Testing - \$basearch - Debug", - baseurl => $baseurl_epel_testing_debuginfo, - mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=testing-debug-epel${osver[0]}&arch=\$basearch", - enabled => 0, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", - priority => 17, - } - - yum::managed_yumrepo { 'epel-testing-source': - descr => "Extra Packages for Enterprise Linux ${osver[0]} - Testing - \$basearch - Source", - baseurl => $baseurl_epel_testing_source, - mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=testing-source-epel${osver[0]}&arch=\$basearch", - enabled => 0, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-${osver[0]}", - priority => 17, - } - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/foreman.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/foreman.pp deleted file mode 100644 index b62b4c7747..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/foreman.pp +++ /dev/null @@ -1,18 +0,0 @@ -# = Class: yum::repo::foreman -# -# This class installs the foreman repo -# -class yum::repo::foreman { - - yum::managed_yumrepo { 'foreman': - descr => 'Foreman Repo', - baseurl => 'http://yum.theforeman.org/stable/', - enabled => 1, - gpgcheck => 0, - failovermethod => 'priority', - # gpgkey => 'http://yum.theforeman.org/RPM-GPG-KEY-foreman', - priority => 1, - } - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/integ_ganeti.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/integ_ganeti.pp deleted file mode 100644 index f43eb97062..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/integ_ganeti.pp +++ /dev/null @@ -1,69 +0,0 @@ -# = Class: yum::repo::integ_ganeti -# -# This class installs the Integ Ganeti Yum repo -# -# == Parameters: -# -# [*mirror_url*] -# A clean URL to a mirror of `http://jfut.integ.jp/linux/ganeti/`. -# The paramater is interpolated with the known directory structure to -# create a the final baseurl parameter for each yumrepo so it must be -# "clean", i.e., without a query string like `?key1=valA&key2=valB`. -# Additionally, it may not contain a trailing slash. -# Example: `http://mirror.example.com/pub/rpm/ganeti` -# Default: `undef` -# -class yum::repo::integ_ganeti ( - $mirror_url = undef, -) { - - if $mirror_url { - validate_re( - $mirror_url, - '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', - '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' - ) - } - - # Workaround for Facter < 1.7.0 - $osver = split($::operatingsystemrelease, '[.]') - - case $::operatingsystem { - 'Fedora': { - $release = 'fedora' - } - 'RedHat','CentOS','Scientific': { - $release = $osver[0] - } - default: { - fail("${title}: Operating system '${::operatingsystem}' is not currently supported") - } - } - - $baseurl_integ_ganeti = $mirror_url ? { - undef => "http://jfut.integ.jp/linux/ganeti/${release}/\$basearch", - default => "${mirror_url}/${release}/\$basearch", - } - - $baseurl_integ_ganeti_source = $mirror_url ? { - undef => "http://jfut.integ.jp/linux/ganeti/${release}/SRPMS", - default => "${mirror_url}/${release}/SRPMS", - } - - yum::managed_yumrepo { 'integ-ganeti': - descr => "Integ Ganeti Packages ${osver[0]} - \$basearch", - baseurl => $baseurl_integ_ganeti, - enabled => 1, - gpgcheck => 0, - priority => 15, - } - - yum::managed_yumrepo { 'integ-ganeti-source': - descr => "Integ Ganeti Packages ${osver[0]} - Source", - baseurl => $baseurl_integ_ganeti_source, - enabled => 0, - gpgcheck => 0, - priority => 15, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage5.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage5.pp deleted file mode 100644 index 3cf0a6c88f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage5.pp +++ /dev/null @@ -1,49 +0,0 @@ -# = Class: yum::repo::jpackage5 -# -# This class installs the jpackage5 repo -# -class yum::repo::jpackage5 { - - include yum - - yum::managed_yumrepo { 'jpackage-generic-5.0': - descr => 'JPackage (free), generic', - mirrorlist => 'http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=5.0', - failovermethod => 'priority', - gpgcheck => 1, - gpgkey => 'http://www.jpackage.org/jpackage.asc', - enabled => 1, - priority => 10, - } - - yum::managed_yumrepo { 'jpackage-generic-5.0-updates': - descr => 'JPackage (free), generic updates', - mirrorlist => 'http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=5.0-updates', - failovermethod => 'priority', - gpgcheck => 1, - gpgkey => 'http://www.jpackage.org/jpackage.asc', - enabled => 1, - priority => 10, - } - - yum::managed_yumrepo { 'jpackage-rhel': - descr => 'JPackage (free) for Red Hat Enterprise Linux $releasever', - mirrorlist => 'http://www.jpackage.org/mirrorlist.php?dist=redhat-el-$releasever&type=free&release=5.0', - failovermethod => 'priority', - gpgcheck => 1, - gpgkey => 'http://www.jpackage.org/jpackage.asc', - enabled => 1, - priority => 10, - } - - yum::managed_yumrepo { 'jpackage-generic-5.0-devel': - descr => 'JPackage (free), generic', - baseurl => 'http://mirrors.dotsrc.org/jpackage/5.0/generic/devel', - failovermethod => 'priority', - gpgcheck => 1, - gpgkey => 'http://www.jpackage.org/jpackage.asc', - enabled => 0, - priority => 10, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage6.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage6.pp deleted file mode 100644 index 373006d1a8..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage6.pp +++ /dev/null @@ -1,17 +0,0 @@ -# = Class: yum::repo::jpackage6 -# -# This class installs the jpackage6 repo -# -class yum::repo::jpackage6 { - - yum::managed_yumrepo { 'jpackage': - descr => 'JPackage 6 generic', - mirrorlist => 'http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=6.0', - failovermethod => 'priority', - gpgcheck => 1, - gpgkey => 'http://www.jpackage.org/jpackage.asc', - enabled => 1, - priority => 1, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/karan.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/karan.pp deleted file mode 100644 index 96059ec375..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/karan.pp +++ /dev/null @@ -1,44 +0,0 @@ -# = Class: yum::repo::karan -# -# This class installs the karan repo -# -class yum::repo::karan { - - yum::managed_yumrepo { 'kbs-CentOS-Extras': - descr => 'CentOS.Karan.Org-EL$releasever - Stable', - baseurl => 'http://centos.karan.org/el$releasever/extras/stable/$basearch/RPMS/', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kbsingh', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-kbsingh', - priority => 20, - } - - yum::managed_yumrepo { 'kbs-CentOS-Extras-Testing': - descr => 'CentOS.Karan.Org-EL$releasever - Testing', - baseurl => 'http://centos.karan.org/el$releasever/extras/testing/$basearch/RPMS/', - enabled => 0, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kbsingh', - priority => 20, - } - - yum::managed_yumrepo { 'kbs-CentOS-Misc': - descr => 'CentOS.Karan.Org-EL$releasever - Stable', - baseurl => 'http://centos.karan.org/el$releasever/misc/stable/$basearch/RPMS/', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kbsingh', - priority => 20, - } - - yum::managed_yumrepo { 'kbs-CentOS-Misc-Testing': - descr => 'CentOS.Karan.Org-EL$releasever - Testing', - baseurl => 'http://centos.karan.org/el$releasever/misc/testing/$basearch/RPMS/', - enabled => 0, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kbsingh', - priority => 20, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/logstash13.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/logstash13.pp deleted file mode 100644 index 9e6ca82c70..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/logstash13.pp +++ /dev/null @@ -1,15 +0,0 @@ -# = Class: yum::repo::logstash13 -# -# This class installs the logstash13 repo -# -class yum::repo::logstash13 { - - yum::managed_yumrepo { 'logstash-1.3': - descr => 'logstash repository for 1.3.x packages', - baseurl => 'http://packages.elasticsearch.org/logstash/1.3/centos', - enabled => 1, - gpgcheck => 1, - gpgkey => 'http://packages.elasticsearch.org/GPG-KEY-elasticsearch', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/mongodb.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/mongodb.pp deleted file mode 100644 index 9b2f6968af..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/mongodb.pp +++ /dev/null @@ -1,15 +0,0 @@ -# = Class: yum::repo::mongodb -# -# This class installs the mongodb repo -# -class yum::repo::mongodb { - - yum::managed_yumrepo { 'mongodb': - descr => '10gen MongoDB Repo', - baseurl => 'http://downloads-distro.mongodb.org/repo/redhat/os/x86_64', - enabled => 1, - gpgcheck => 0, - } - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/monitoringsucks.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/monitoringsucks.pp deleted file mode 100644 index 8ebea58a5f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/monitoringsucks.pp +++ /dev/null @@ -1,16 +0,0 @@ -# = Class: yum::repo::monitoringsucks -# -# This class installs the monitoringsucks repo -# -class yum::repo::monitoringsucks { - - yum::managed_yumrepo { 'monitoringsucks': - descr => 'MonitoringSuck at Inuits', - baseurl => 'http://pulp.inuits.eu/pulp/repos/monitoring', - enabled => 1, - gpgcheck => 0, - failovermethod => 'priority', - priority => 99, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/newrelic.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/newrelic.pp deleted file mode 100644 index 3d81ae09a0..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/newrelic.pp +++ /dev/null @@ -1,15 +0,0 @@ -# = Class: yum::repo::newrelic -# -# This class installs the newrelic repo -# -class yum::repo::newrelic { - - yum::managed_yumrepo { 'newrelic': - descr => 'Newrelic official release packages', - baseurl => 'http://yum.newrelic.com/pub/newrelic/el5/$basearch/', - enabled => 1, - gpgcheck => 0, - priority => 1, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/nginx.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/nginx.pp deleted file mode 100644 index c361aa33cd..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/nginx.pp +++ /dev/null @@ -1,16 +0,0 @@ -# = Class: yum::repo::nginx -# -# This class installs the nginx repo -# -class yum::repo::nginx { - $osver = split($::operatingsystemrelease, '[.]') - - yum::managed_yumrepo { 'nginx': - descr => 'Nginx official release packages', - baseurl => "http://nginx.org/packages/rhel/${osver[0]}/\$basearch/", - enabled => 1, - gpgcheck => 0, - priority => 1, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/openstack_grizzly.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/openstack_grizzly.pp deleted file mode 100644 index 175916194f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/openstack_grizzly.pp +++ /dev/null @@ -1,15 +0,0 @@ -# = Class: yum::repo::openstack_grizzly -# -# This class installs the EPEL-6 repo for OpenStack Grizzly -# -class yum::repo::openstack_grizzly { - - yum::managed_yumrepo { 'epel-openstack-grizzly': - descr => 'OpenStack Grizzly Repository for EPEL 6', - baseurl => 'http://repos.fedorapeople.org/repos/openstack/openstack-grizzly/epel-6', - enabled => 1, - gpgcheck => 0, - failovermethod => 'priority', - priority => 1, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/passenger.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/passenger.pp deleted file mode 100644 index c80d668bbe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/passenger.pp +++ /dev/null @@ -1,20 +0,0 @@ -# = Class: yum::repo::passenger -# -# This class installs the passenger repo -# -class yum::repo::passenger { - - yum::managed_yumrepo { 'passenger': - descr => 'Red Hat Enterprise $releasever - Phusion Passenger', - baseurl => 'http://passenger.stealthymonkeys.com/rhel/$releasever/$basearch', - mirrorlist => 'http://passenger.stealthymonkeys.com/rhel/mirrors', - enabled => 1 , - gpgcheck => 0, # To fix key autoimport - failovermethod => 'priority', - gpgkey => 'http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc', - autokeyimport => 'yes', - priority => 20, - } - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg91.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg91.pp deleted file mode 100644 index 89fe7c9cf4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg91.pp +++ /dev/null @@ -1,18 +0,0 @@ -# = Class: yum::repo::pdgd91 -# -# This class installs the postgresql 9.1 repo -# -class yum::repo::pgdg91 { - - yum::managed_yumrepo { 'pgdg91': - descr => 'PostgreSQL 9.1 $releasever - $basearch', - baseurl => 'http://yum.postgresql.org/9.1/redhat/rhel-$releasever-$basearch', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-PGDG', - priority => 20, - } - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg92.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg92.pp deleted file mode 100644 index fe2dc057e6..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg92.pp +++ /dev/null @@ -1,18 +0,0 @@ -# = Class: yum::repo::pdgd92 -# -# This class installs the postgresql 9.2 repo -# -class yum::repo::pgdg92 { - - yum::managed_yumrepo { 'pgdg92': - descr => 'PostgreSQL 9.2 $releasever - $basearch', - baseurl => 'http://yum.postgresql.org/9.2/redhat/rhel-$releasever-$basearch', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-PGDG', - priority => 20, - } - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg93.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg93.pp deleted file mode 100644 index c3064ba12f..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg93.pp +++ /dev/null @@ -1,18 +0,0 @@ -# = Class: yum::repo::pdgd93 -# -# This class installs the postgresql 9.3 repo -# -class yum::repo::pgdg93 { - - yum::managed_yumrepo { 'pgdg93': - descr => 'PostgreSQL 9.3 $releasever - $basearch', - baseurl => 'http://yum.postgresql.org/9.3/redhat/rhel-$releasever-$basearch', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-PGDG', - priority => 20, - } - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetdevel.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetdevel.pp deleted file mode 100644 index 1e553bedb4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetdevel.pp +++ /dev/null @@ -1,27 +0,0 @@ -# = Class: yum::repo::puppetdevel -# -# This class installs the puppetdevel repo -# -class yum::repo::puppetdevel { - - yum::managed_yumrepo { 'puppetlabs_devel': - descr => 'Puppet Labs Packages - Devel', - baseurl => 'http://yum.puppetlabs.com/el/$releasever/devel/$basearch', - enabled => 1, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => 'http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs', - priority => 15, - } - - yum::managed_yumrepo { 'puppetlabs_dependencies': - descr => 'Puppet Labs Packages - Dependencies', - baseurl => 'http://yum.puppetlabs.com/el/$releasever/dependencies/$basearch', - enabled => 1, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => 'http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs', - priority => 15, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetlabs.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetlabs.pp deleted file mode 100644 index 0b3f5ea996..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetlabs.pp +++ /dev/null @@ -1,36 +0,0 @@ -# = Class: yum::repo::puppetlabs -# -# This class installs the puppetlabs repo -# -class yum::repo::puppetlabs { - $osver = split($::operatingsystemrelease, '[.]') - $release = $::operatingsystem ? { - /(?i:Centos|RedHat|Scientific)/ => $osver[0], - default => '6', - } - - yum::managed_yumrepo { 'puppetlabs': - descr => 'Puppet Labs Packages', - baseurl => "http://yum.puppetlabs.com/el/${release}/products/\$basearch", - enabled => 1, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => 'http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs', - priority => 1, - } - - # The dependencies repo has the same priority as base, - # because it needs to override base packages. - # E.g. puppet-3.0 requires Ruby => 1.8.7, but EL5 ships with 1.8.5. - # - yum::managed_yumrepo { 'puppetlabs_dependencies': - descr => 'Puppet Labs Packages', - baseurl => "http://yum.puppetlabs.com/el/${release}/dependencies/\$basearch", - enabled => 1, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => 'http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs', - priority => 1, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/rbel.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/rbel.pp deleted file mode 100644 index 85d22bff89..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/rbel.pp +++ /dev/null @@ -1,20 +0,0 @@ -# = Class: yum::repo::rbel -# -# This class installs the rbel repo -# -class yum::repo::rbel { - - $osver = split($::operatingsystemrelease, '[.]') - yum::managed_yumrepo { 'rbel': - descr => 'RBEL Repo', - baseurl => "http://rbel.frameos.org/stable/el${osver[0]}/\$basearch", - enabled => 1, - gpgcheck => 0, - failovermethod => 'priority', - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RBEL' , - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-RBEL', - priority => 16, - } - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/remi.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/remi.pp deleted file mode 100644 index f27d6c9a29..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/remi.pp +++ /dev/null @@ -1,25 +0,0 @@ -# = Class: yum::repo::remi -# -# This class installs the remi repo -# -class yum::repo::remi { - yum::managed_yumrepo { 'remi': - descr => 'Les RPM de remi pour Enterpise Linux $releasever - $basearch', - mirrorlist => 'http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-remi', - priority => 1, - } - - yum::managed_yumrepo { 'remi-test': - descr => 'Les RPM de remi pour Enterpise Linux $releasever - $basearch - Test', - mirrorlist => 'http://rpms.famillecollet.com/enterprise/$releasever/test/mirror', - enabled => 0, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-remi', - priority => 1, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/remi_php55.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/remi_php55.pp deleted file mode 100755 index 13a9412f5a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/remi_php55.pp +++ /dev/null @@ -1,15 +0,0 @@ -# = Class: yum::repo::remi_php55 -# -# This class installs the remi-php55 repo -# -class yum::repo::remi_php55 { - yum::managed_yumrepo { 'remi-php55': - descr => 'Les RPM de remi pour Enterpise Linux $releasever - $basearch - PHP 5.5', - mirrorlist => 'http://rpms.famillecollet.com/enterprise/$releasever/php55/mirror', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-remi', - priority => 1, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforge.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforge.pp deleted file mode 100644 index b43e57dc56..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforge.pp +++ /dev/null @@ -1,18 +0,0 @@ -# = Class: yum::repo::repoforge -# -# This class installs the repoforge repo -# -class yum::repo::repoforge { - - yum::managed_yumrepo { 'repoforge': - descr => 'RepoForge packages', - baseurl => 'http://apt.sw.be/redhat/el$releasever/en/$basearch/rpmforge', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-rpmforge-dag', - priority => 1, - exclude => 'nagios-*', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforgeextras.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforgeextras.pp deleted file mode 100644 index 5242b5849a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforgeextras.pp +++ /dev/null @@ -1,17 +0,0 @@ -# = Class: yum::repo::repoforgeextras -# -# This class installs the repoforge extras repo -# -class yum::repo::repoforgeextras { - - yum::managed_yumrepo { 'repoforgeextras': - descr => 'RepoForge extra packages', - baseurl => 'http://apt.sw.be/redhat/el$releasever/en/$basearch/extras', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag', - priority => 1, - exclude => 'perl-IO-Compress-* perl-DBD-MySQL', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/rpmforge.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/rpmforge.pp deleted file mode 100644 index d6c048d2f4..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/rpmforge.pp +++ /dev/null @@ -1,17 +0,0 @@ -# = Class: yum::repo::rpmforge -# -# This class installs the rpmforce repo -# -class yum::repo::rpmforge { - - yum::managed_yumrepo { 'rpmforge-rhel5': - descr => 'RPMForge RHEL5 packages', - baseurl => 'http://wftp.tu-chemnitz.de/pub/linux/dag/redhat/el$releasever/en/$basearch/dag', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-rpmforge-dag', - priority => 30, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/sl5.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/sl5.pp deleted file mode 100644 index 39f2633641..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/sl5.pp +++ /dev/null @@ -1,77 +0,0 @@ -# = Class: yum::repo::sl5 -# -# Base Scientific Linux 5 repos -# -# == Parameters: -# -# [*mirror_url*] -# A clean URL to a mirror of `http://ftp.scientificlinux.org/linux/scientific/`. -# The paramater is interpolated with the known directory structure to -# create a the final baseurl parameter for each yumrepo so it must be -# "clean", i.e., without a query string like `?key1=valA&key2=valB`. -# Additionally, it may not contain a trailing slash. -# Example: `http://mirror.example.com/pub/rpm/scientific` -# Default: `undef` -# -class yum::repo::sl5 ( - $mirror_url = undef, -) { - - if $mirror_url { - validate_re( - $mirror_url, - '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', - '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' - ) - } - - $baseurl_sl5x = $mirror_url ? { - undef => undef, - default => "${mirror_url}/5x/\$basearch/os/", - } - - $baseurl_sl5x_security = $mirror_url ? { - undef => undef, - default => "${mirror_url}/5x/\$basearch/updates/security/", - } - - $baseurl_sl5x_fastbugs = $mirror_url ? { - undef => undef, - default => "${mirror_url}/5x/\$basearch/updates/fastbugs/", - } - - yum::managed_yumrepo { 'sl5x': - descr => 'Scientific Linux 5x - $basearch', - baseurl => $baseurl_sl5x, - mirrorlist => 'http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-base-5x.txt', - failovermethod => 'priority', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-sl', - priority => 10, - } - - yum::managed_yumrepo { 'sl5x-security': - descr => 'Scientific Linux 5x - $basearch - security updates', - baseurl => $baseurl_sl5x_security, - mirrorlist => 'http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-security-5x.txt', - failovermethod => 'priority', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson', - priority => 10, - } - - yum::managed_yumrepo { 'sl5x-fastbugs': - descr => 'Scientific Linux 5x - $basearch - fastbug updates', - baseurl => $baseurl_sl5x_fastbugs, - mirrorlist => 'http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-fastbugs-5x.txt', - failovermethod => 'priority', - enabled => 0, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson', - priority => 10, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/sl6.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/sl6.pp deleted file mode 100644 index 4e2daa4e45..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/sl6.pp +++ /dev/null @@ -1,74 +0,0 @@ -# = Class: yum::repo::sl6 -# -# Base Scientific Linux 6 repos -# -# == Parameters: -# -# [*mirror_url*] -# A clean URL to a mirror of `http://ftp.scientificlinux.org/linux/scientific/`. -# The paramater is interpolated with the known directory structure to -# create a the final baseurl parameter for each yumrepo so it must be -# "clean", i.e., without a query string like `?key1=valA&key2=valB`. -# Additionally, it may not contain a trailing slash. -# Example: `http://mirror.example.com/pub/rpm/scientific` -# Default: `undef` -# -class yum::repo::sl6 ( - $mirror_url = undef, -) { - - if $mirror_url { - validate_re( - $mirror_url, - '^(?:https?|ftp):\/\/[\da-zA-Z-][\da-zA-Z\.-]*\.[a-zA-Z]{2,6}\.?(?:\/[\w~-]*)*$', - '$mirror must be a Clean URL with no query-string, a fully-qualified hostname and no trailing slash.' - ) - } - - $baseurl_sl6x = $mirror_url ? { - undef => undef, - default => "${mirror_url}/6x/\$basearch/os/", - } - - $baseurl_sl6x_security = $mirror_url ? { - undef => undef, - default => "${mirror_url}/6x/\$basearch/updates/security/", - } - - $baseurl_sl6x_fastbugs = $mirror_url ? { - undef => undef, - default => "${mirror_url}/6x/\$basearch/updates/fastbugs/", - } - - yum::managed_yumrepo { 'sl6x': - descr => 'Scientific Linux 6x - $basearch', - baseurl => $baseurl_sl6x, - mirrorlist => 'http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-base-6x.txt', - failovermethod => 'priority', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-sl', - } - - yum::managed_yumrepo { 'sl6x-security': - descr => 'Scientific Linux 6x - $basearch - security updates', - baseurl => $baseurl_sl6x_security, - mirrorlist => 'http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-security-6x.txt', - failovermethod => 'priority', - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson', - } - - yum::managed_yumrepo { 'sl6x-fastbugs': - descr => 'Scientific Linux 6x - $basearch - fastbug updates', - baseurl => $baseurl_sl6x_fastbugs, - mirrorlist => 'http://ftp.scientificlinux.org/linux/scientific/mirrorlist/sl-fastbugs-6x.txt', - failovermethod => 'priority', - enabled => 0, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-sl file:///etc/pki/rpm-gpg/RPM-GPG-KEY-dawson', - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/tmz.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/tmz.pp deleted file mode 100644 index f53ba9a0f3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/tmz.pp +++ /dev/null @@ -1,27 +0,0 @@ -# = Class: yum::repo::tmz -# -# This class installs the tmz repo -# -class yum::repo::tmz { - - yum::managed_yumrepo { 'tmz-puppet': - descr => 'Puppet for EL $releasever - $basearch', - baseurl => 'http://tmz.fedorapeople.org/repo/puppet/epel/$releasever/$basearch', - enabled => 1, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => 'http://tmz.fedorapeople.org/repo/RPM-GPG-KEY-tmz', - priority => 16, - } - - yum::managed_yumrepo { 'tmz-puppet-source': - descr => 'Puppet for EL $releasever - Source', - baseurl => 'http://tmz.fedorapeople.org/repo/puppet/epel/$releasever/SRPMS', - enabled => 0, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => 'http://tmz.fedorapeople.org/repo/RPM-GPG-KEY-tmz', - priority => 16, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/varnish.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/varnish.pp deleted file mode 100644 index 75cc458475..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/varnish.pp +++ /dev/null @@ -1,17 +0,0 @@ -# = Class: yum::repo::varnish -# -# This class installs the varnish 3.0 repo -# -class yum::repo::varnish { - - yum::managed_yumrepo { 'varnish': - descr => 'Varnish 3.0 for Enterprise Linux 5 - $basearch', - baseurl => 'http://repo.varnish-cache.org/redhat/varnish-3.0/el5/$basearch', - enabled => 1, - gpgcheck => 0, - failovermethod => 'priority', - # gpgkey => 'http://yum.theforeman.org/RPM-GPG-KEY-VARNISH', - priority => 26, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/vfabric.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/vfabric.pp deleted file mode 100644 index 7e7847de31..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/vfabric.pp +++ /dev/null @@ -1,20 +0,0 @@ -# = Class: yum::repo::vfabric -# -# This class installs the vfabric repo -# -class yum::repo::vfabric { - - $osver = split($::operatingsystemrelease, '[.]') - - yum::managed_yumrepo { 'vfabric': - descr => 'vFabric 5.2 Repo - $basesearch', - baseurl => "http://repo.vmware.com/pub/rhel${osver[0]}/vfabric/5.2/\$basearch", - enabled => 1, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => "http://repo.vmware.com/pub/rhel${osver[0]}/vfabric/5.2/RPM-GPG-KEY-VFABRIC-5.2-EL${osver[0]}", - priority => 1, - } - -} - diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/virtualbox.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/virtualbox.pp deleted file mode 100644 index 171acf2df3..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/virtualbox.pp +++ /dev/null @@ -1,18 +0,0 @@ -# = Class: yum::repo::virtualbox -# -# This class installs the virtualbox repo -# -class yum::repo::virtualbox { - - yum::managed_yumrepo { 'virtualbox': - descr => 'RHEL/CentOS-$releasever / $basearch - VirtualBox', - baseurl => 'http://download.virtualbox.org/virtualbox/rpm/rhel/$releasever/$basearch', - enabled => 1, - gpgcheck => 1, - failovermethod => 'priority', - gpgkey => 'http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc', - autokeyimport => 'yes', - priority => 18, - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/webtatic.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/webtatic.pp deleted file mode 100644 index adf9c5d8f1..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/repo/webtatic.pp +++ /dev/null @@ -1,19 +0,0 @@ -# = Class: yum::repo::webtatic -# -# This class installs the webtatic repo -# -class yum::repo::webtatic { - $osver = split($::operatingsystemrelease, '[.]') - yum::managed_yumrepo { 'webtatic': - descr => 'Webtatic Repository $releasever - $basearch', - mirrorlist => $osver[0] ? { - 5 => 'http://repo.webtatic.com/yum/centos/5/$basearch/mirrorlist', - 6 => 'http://repo.webtatic.com/yum/el6/$basearch/mirrorlist', - }, - enabled => 1, - gpgcheck => 1, - gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-andy', - gpgkey_source => 'puppet:///modules/yum/rpm-gpg/RPM-GPG-KEY-webtatic-andy', - priority => 1, - } -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/updatesd.pp b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/updatesd.pp deleted file mode 100644 index 264541d2a5..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/manifests/updatesd.pp +++ /dev/null @@ -1,50 +0,0 @@ -# Class yum::updatesd -# -# Installs and enables yum updatesd -# -# -class yum::updatesd { - - require yum - - $manage_update_package = $yum::bool_update_disable ? { - true => absent, - default => present, - } - - $manage_update_service_ensure = $yum::bool_update_disable ? { - true => stopped, - default => running, - } - - $manage_update_service_enable = $yum::bool_update_disable ? { - true => false, - default => true, - } - - $manage_update_file = $yum::bool_update_disable ? { - true => absent, - default => present, - } - - package { 'yum-updatesd': - ensure => $manage_update_package, - name => 'yum-updatesd', - } - - service { 'yum-updatesd': - ensure => $manage_update_service_ensure, - enable => $manage_update_service_enable, - hasstatus => true, - hasrestart => true, - require => Package['yum-updatesd'], - } - - file { 'yum-updatesd.conf': - ensure => $manage_update_file, - path => '/etc/yum/yum-updatesd.conf', - source => 'puppet:///modules/yum/yum-updatesd.conf', - require => Package['yum-updatesd'], - } - -} diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/spec/classes/yum_spec.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/spec/classes/yum_spec.rb deleted file mode 100644 index 62d9f9c65a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/spec/classes/yum_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}" - -describe 'yum' do - - let(:title) { 'yum' } - let(:node) { 'rspec.example42.com' } - let(:facts) { { :ipaddress => '10.42.42.42' } } - - describe 'Test minimal installation' do - it { should contain_file('yum.conf').with_ensure('present') } - end - - describe 'Test decommissioning - absent' do - let(:params) { {:absent => true } } - it 'should remove yum configuration file' do should contain_file('yum.conf').with_ensure('absent') end - end - - describe 'Test customizations - source' do - let(:params) { {:source => "puppet:///modules/yum/spec"} } - it { should contain_file('yum.conf').with_source('puppet:///modules/yum/spec') } - end - -end diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/spec/spec_helper.rb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/spec/spec_helper.rb deleted file mode 100644 index 2c6f56649a..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/templates/yum-cron.erb b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/templates/yum-cron.erb deleted file mode 100644 index f4f5971a83..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/puppet/modules/yum/templates/yum-cron.erb +++ /dev/null @@ -1,62 +0,0 @@ -# -# File Managed by Puppet -# -# Pass any given paramter to yum, as run in all the scripts invoked -# by this package. Be aware that this is global, and yum is invoked in -# several modes by these scripts for which your own parameter might not -# be appropriate -YUM_PARAMETER=<%= scope.lookupvar('yum::cron_param') %> - -# Don't install, just check (valid: yes|no) -CHECK_ONLY=no - -# Check to see if you can reach the repos before updating (valid: yes|no) -CHECK_FIRST=no - -# Don't install, just check and download (valid: yes|no) -# Implies CHECK_ONLY=yes (gotta check first to see what to download) -DOWNLOAD_ONLY=no - -# Error level, practical range 0-10, 0 means print only critical errors which -# you must be told, 1 means print all errors, even ones that are not important -# Level 0 is the default -# ERROR_LEVEL=0 - -# Debug level, practical range 0-10, higher number means more output -# Level 1 is a useful level if you want to see what's been done and -# don't want to read /var/log/yum.log -# Level 0 is the default -# DEBUG_LEVEL=1 - -# randomwait is used by yum to wait random time -# default is 60 so yum waits random time from 1 to 60 minutes -# the value must not be zero -RANDOMWAIT="60" - -# if MAILTO is set and the mail command is available, the mail command -# is used to deliver yum output - -# by default MAILTO is unset, so crond mails the output by itself -# example: MAILTO=root -MAILTO=<%= scope.lookupvar('yum::cron_mailto') %> - -# you may set SYSTEMNAME if you want your yum emails tagged differently -# default is output of hostname command -# this variable is used only if MAILTO is set too -#SYSTEMNAME="" - -# you may set DAYS_OF_WEEK to the days of the week you want to run -# default is every day -#DAYS_OF_WEEK="0123456" -DAYS_OF_WEEK=<%= scope.lookupvar('yum::cron_dotw') %> - -# which day should it do cleanup on? defaults to 0 (Sunday). If this day isn't in the -# DAYS_OF_WEEK above, it'll never happen -CLEANDAY="0" - -# set to yes to make the yum-cron service to wait for transactions to complete -SERVICE_WAITS=yes - -# set maximum time period (in seconds) for the yum-cron service to wait for -# transactions to complete. The default is 300 seconds (5 minutes) -SERVICE_WAIT_TIME=300 diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/execute-files.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/execute-files.sh deleted file mode 100644 index 10949c4814..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/execute-files.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -export DEBIAN_FRONTEND=noninteractive - -echo "EXECUTIN EXECUTE-FILES.SH" - -VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt') - -EXEC_ONCE_DIR="$1" -EXEC_ALWAYS_DIR="$2" - -shopt -s nullglob -files=("${VAGRANT_CORE_FOLDER}"/files/"${EXEC_ONCE_DIR}"/*) - -if [[ (${#files[@]} -gt 0) ]]; then - echo "Running files in files/${EXEC_ONCE_DIR}" - - if [ ! -d "/.puphpet-stuff/${EXEC_ONCE_DIR}-ran" ]; then - mkdir "/.puphpet-stuff/${EXEC_ONCE_DIR}-ran" - echo "Created directory /.puphpet-stuff/${EXEC_ONCE_DIR}-ran" - fi - - find "${VAGRANT_CORE_FOLDER}/files/${EXEC_ONCE_DIR}" -maxdepth 1 -not -path '*/\.*' -type f \( ! -iname "empty" \) -exec cp -n '{}' "/.puphpet-stuff/${EXEC_ONCE_DIR}-ran" \; - find "/.puphpet-stuff/${EXEC_ONCE_DIR}-ran" -maxdepth 1 -type f -exec chmod +x '{}' \; -exec {} \; -exec sh -c '>{}' \; - echo "Finished running files in files/${EXEC_ONCE_DIR}" - echo "To run again, delete file(s) you want rerun in /.puphpet-stuff/${EXEC_ONCE_DIR}-ran or the whole folder to rerun all" -fi - -echo "Running files in files/${EXEC_ALWAYS_DIR}" -find "${VAGRANT_CORE_FOLDER}/files/${EXEC_ALWAYS_DIR}" -maxdepth 1 -not -path '*/\.*' -type f \( ! -iname "empty" \) -exec chmod +x '{}' \; -exec {} \; -echo "Finished running files in files/${EXEC_ALWAYS_DIR}" diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/hostsupdater-notice.txt b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/hostsupdater-notice.txt deleted file mode 100644 index ce3331b3ce..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/hostsupdater-notice.txt +++ /dev/null @@ -1,4 +0,0 @@ -=============================================================================== -You have the Vagrant::Hostsupdater plugin installed. You may be required to -enter your host's root/privileged password below to continue! -=============================================================================== diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/important-notices.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/important-notices.sh deleted file mode 100644 index bd1bb95cab..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/important-notices.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt') - -if [[ ! -f '/.puphpet-stuff/displayed-important-notices' ]]; then - cat "${VAGRANT_CORE_FOLDER}/shell/important-notices.txt" - - touch '/.puphpet-stuff/displayed-important-notices' -fi diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/important-notices.txt b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/important-notices.txt deleted file mode 100644 index 6748e91432..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/important-notices.txt +++ /dev/null @@ -1,39 +0,0 @@ -▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ - _____ _ _ - | __ \| | | | - | |__) | |__ _ __ __ _ ___ ___ __ _ _ __ ___| |_ - | ___/| '_ \| '__/ _` / __|/ _ \/ _` | '_ \ / _ \ __| - | | | | | | | | (_| \__ \ __/ (_| | | | | __/ |_ - |_| |_| |_|_| \__,_|___/\___|\__,_|_| |_|\___|\__| - -▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ - -Read me for some important information! - -If Puppet did not blow up (you do not see a sea of red above), then your VM -was generated successfully! - -* You can print current ssh information by running 'vagrant ssh-config' - command - -* To access to phraseanet just type 'phraseanet-php55-nginx' in - your web browser address bar. - -* The mysql default credentials are: - user: root - password: toor - -Did something go wrong? Please fill a Github issues at -https://github.com/alchemy-fr/phraseanet/issues. - -Happy programming! - - Phraseanet Team - -▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ - ____ _ _ _ _ - | _ \ ___ __ _ __| | / \ | |__ _____ _____| | - | |_) / _ \/ _` |/ _` | / _ \ | '_ \ / _ \ \ / / _ \ | - | _ < __/ (_| | (_| | / ___ \| |_) | (_) \ V / __/_| - |_| \_\___|\__,_|\__,_| /_/ \_\_.__/ \___/ \_/ \___(_) - -▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/initial-setup.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/initial-setup.sh deleted file mode 100644 index 7821843791..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/initial-setup.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/bash - -export DEBIAN_FRONTEND=noninteractive - -VAGRANT_CORE_FOLDER=$(echo "$1") - -OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID) -CODENAME=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" CODENAME) - -cat "${VAGRANT_CORE_FOLDER}/shell/self-promotion.txt" -printf "\n" -echo "" - -if [[ ! -d '/.puphpet-stuff' ]]; then - mkdir '/.puphpet-stuff' - echo 'Created directory /.puphpet-stuff' -fi - -touch '/.puphpet-stuff/vagrant-core-folder.txt' -echo "${VAGRANT_CORE_FOLDER}" > '/.puphpet-stuff/vagrant-core-folder.txt' - -if [[ ! -f '/.puphpet-stuff/initial-setup-base-packages' ]]; then - if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then - echo 'Running initial-setup apt-get update' - apt-get update >/dev/null - echo 'Finished running initial-setup apt-get update' - - echo 'Installing git' - apt-get -q -y install git-core >/dev/null - echo 'Finished installing git' - - if [[ "${CODENAME}" == 'lucid' || "${CODENAME}" == 'precise' ]]; then - echo 'Installing basic curl packages (Ubuntu only)' - apt-get install -y libcurl3 libcurl4-gnutls-dev curl >/dev/null - echo 'Finished installing basic curl packages (Ubuntu only)' - fi - - echo 'Installing rubygems' - apt-get install -y rubygems >/dev/null - echo 'Finished installing rubygems' - - echo 'Installing base packages for r10k' - apt-get install -y build-essential ruby-dev >/dev/null - gem install json >/dev/null - echo 'Finished installing base packages for r10k' - - if [ "${OS}" == 'ubuntu' ]; then - echo 'Updating libgemplugin-ruby (Ubuntu only)' - apt-get install -y libgemplugin-ruby >/dev/null - echo 'Finished updating libgemplugin-ruby (Ubuntu only)' - fi - - if [ "${CODENAME}" == 'lucid' ]; then - echo 'Updating rubygems (Ubuntu Lucid only)' - gem install rubygems-update >/dev/null 2>&1 - /var/lib/gems/1.8/bin/update_rubygems >/dev/null 2>&1 - echo 'Finished updating rubygems (Ubuntu Lucid only)' - fi - - echo 'Installing r10k' - gem install r10k >/dev/null 2>&1 - echo 'Finished installing r10k' - - touch '/.puphpet-stuff/initial-setup-base-packages' - elif [[ "${OS}" == 'centos' ]]; then - echo 'Running initial-setup yum update' - perl -p -i -e 's@enabled=1@enabled=0@gi' /etc/yum/pluginconf.d/fastestmirror.conf - perl -p -i -e 's@#baseurl=http://mirror.centos.org/centos/\$releasever/os/\$basearch/@baseurl=http://mirror.rackspace.com/CentOS//\$releasever/os/\$basearch/\nenabled=1@gi' /etc/yum.repos.d/CentOS-Base.repo - perl -p -i -e 's@#baseurl=http://mirror.centos.org/centos/\$releasever/updates/\$basearch/@baseurl=http://mirror.rackspace.com/CentOS//\$releasever/updates/\$basearch/\nenabled=1@gi' /etc/yum.repos.d/CentOS-Base.repo - perl -p -i -e 's@#baseurl=http://mirror.centos.org/centos/\$releasever/extras/\$basearch/@baseurl=http://mirror.rackspace.com/CentOS//\$releasever/extras/\$basearch/\nenabled=1@gi' /etc/yum.repos.d/CentOS-Base.repo - - yum -y --nogpgcheck install 'http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm' >/dev/null - yum -y --nogpgcheck install 'https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm' >/dev/null - yum -y install centos-release-SCL >/dev/null - yum clean all >/dev/null - yum -y check-update >/dev/null - echo 'Finished running initial-setup yum update' - - echo 'Installing git' - yum -y install git >/dev/null - echo 'Finished installing git' - - echo 'Updating to Ruby 1.9.3' - yum -y install centos-release-SCL >/dev/null 2>&1 - yum remove ruby >/dev/null 2>&1 - yum -y install ruby193 ruby193-ruby-irb ruby193-ruby-doc ruby193-libyaml rubygems >/dev/null 2>&1 - yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-rgen-0.6.5-2.el6.noarch.rpm' >/dev/null 2>&1 - gem update --system >/dev/null 2>&1 - gem install haml >/dev/null 2>&1 - - yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/products/x86_64/hiera-1.3.2-1.el6.noarch.rpm' >/dev/null - yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/products/x86_64/facter-1.7.5-1.el6.x86_64.rpm' >/dev/null - yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/dependencies/x86_64/rubygem-json-1.5.5-1.el6.x86_64.rpm' >/dev/null - yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-json-1.5.5-1.el6.x86_64.rpm' >/dev/null - yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-shadow-2.2.0-2.el6.x86_64.rpm' >/dev/null - yum -y --nogpgcheck install 'https://yum.puppetlabs.com/el/6/dependencies/x86_64/ruby-augeas-0.4.1-3.el6.x86_64.rpm' >/dev/null - echo 'Finished updating to Ruby 1.9.3' - - echo 'Installing basic development tools (CentOS)' - yum -y groupinstall 'Development Tools' >/dev/null - echo 'Finished installing basic development tools (CentOS)' - - echo 'Installing r10k' - gem install r10k >/dev/null 2>&1 - echo 'Finished installing r10k' - - touch '/.puphpet-stuff/initial-setup-base-packages' - fi -fi diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/os-detect.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/os-detect.sh deleted file mode 100644 index 3f679008fe..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/os-detect.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -# Try and get debian operating system -# id, codename, and release - -TYPE=$(echo "$1" | tr '[A-Z]' '[a-z]') -OS=$(uname) -ID='unknown' -CODENAME='unknown' -RELEASE='unknown' - -if [ "${OS}" == 'Linux' ]; then - # detect centos - grep 'centos' /etc/issue -i -q - if [ $? = '0' ]; then - ID='centos' - RELEASE=$(cat /etc/redhat-release | grep -o 'release [0-9]' | cut -d " " -f2) - # could be debian or ubuntu - elif [ $(which lsb_release) ]; then - ID=$(lsb_release -i | cut -f2) - CODENAME=$(lsb_release -c | cut -f2) - RELEASE=$(lsb_release -r | cut -f2) - elif [ -f '/etc/lsb-release' ]; then - ID=$(cat /etc/lsb-release | grep DISTRIB_ID | cut -d "=" -f2) - CODENAME=$(cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d "=" -f2) - RELEASE=$(cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -d "=" -f2) - elif [ -f '/etc/issue' ]; then - ID=$(head -1 /etc/issue | cut -d " " -f1) - if [ -f '/etc/debian_version' ]; then - RELEASE=$(/dev/null -echo 'Finished running update r10k' diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/self-promotion.txt b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/self-promotion.txt deleted file mode 100644 index 6c00d6839b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/self-promotion.txt +++ /dev/null @@ -1,2 +0,0 @@ - -Generated using puphpet.com diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/ssh-keygen.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/ssh-keygen.sh deleted file mode 100644 index ef00495b2b..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/ssh-keygen.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt') - -OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID) -VAGRANT_SSH_USERNAME=$(echo "$1") - -function create_key() -{ - BASE_KEY_NAME=$(echo "$1") - - if [[ ! -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}" ]]; then - ssh-keygen -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}" -P "" - - if [[ ! -f "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}.ppk" ]]; then - if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then - apt-get install -y putty-tools >/dev/null - elif [ "${OS}" == 'centos' ]; then - yum -y install putty >/dev/null - fi - - puttygen "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}" -O private -o "${VAGRANT_CORE_FOLDER}/files/dot/ssh/${BASE_KEY_NAME}.ppk" - fi - - echo "Your private key for SSH-based authentication has been saved to 'puphpet/files/dot/ssh/${BASE_KEY_NAME}'!" - else - echo "Pre-existing private key found at 'puphpet/files/dot/ssh/${BASE_KEY_NAME}'" - fi -} - -create_key 'root_id_rsa' -create_key 'id_rsa' - -PUBLIC_SSH_KEY=$(cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub") - -echo 'Adding generated key to /root/.ssh/id_rsa' -echo 'Adding generated key to /root/.ssh/id_rsa.pub' -echo 'Adding generated key to /root/.ssh/authorized_keys' - -mkdir -p /root/.ssh - -cp "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" '/root/.ssh/' -cp "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" '/root/.ssh/' - -if [[ ! -f '/root/.ssh/authorized_keys' ]] || ! grep -q "${PUBLIC_SSH_KEY}" '/root/.ssh/authorized_keys'; then - cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" >> '/root/.ssh/authorized_keys' -fi - -chown -R root '/root/.ssh' -chgrp -R root '/root/.ssh' -chmod 700 '/root/.ssh' -chmod 644 '/root/.ssh/id_rsa.pub' -chmod 600 '/root/.ssh/id_rsa' -chmod 600 '/root/.ssh/authorized_keys' - -if [ "${VAGRANT_SSH_USERNAME}" != 'root' ]; then - VAGRANT_SSH_FOLDER="/home/${VAGRANT_SSH_USERNAME}/.ssh"; - - mkdir -p "${VAGRANT_SSH_FOLDER}" - - echo "Adding generated key to ${VAGRANT_SSH_FOLDER}/id_rsa" - echo "Adding generated key to ${VAGRANT_SSH_FOLDER}/id_rsa.pub" - echo "Adding generated key to ${VAGRANT_SSH_FOLDER}/authorized_keys" - - cp "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa" "${VAGRANT_SSH_FOLDER}/id_rsa" - cp "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" "${VAGRANT_SSH_FOLDER}/id_rsa.pub" - - if [[ ! -f "${VAGRANT_SSH_FOLDER}/authorized_keys" ]] || ! grep -q "${PUBLIC_SSH_KEY}" "${VAGRANT_SSH_FOLDER}/authorized_keys"; then - cat "${VAGRANT_CORE_FOLDER}/files/dot/ssh/id_rsa.pub" >> "${VAGRANT_SSH_FOLDER}/authorized_keys" - fi - - chown -R "${VAGRANT_SSH_USERNAME}" "${VAGRANT_SSH_FOLDER}" - chgrp -R "${VAGRANT_SSH_USERNAME}" "${VAGRANT_SSH_FOLDER}" - chmod 700 "${VAGRANT_SSH_FOLDER}" - chmod 644 "${VAGRANT_SSH_FOLDER}/id_rsa.pub" - chmod 600 "${VAGRANT_SSH_FOLDER}/id_rsa" - chmod 600 "${VAGRANT_SSH_FOLDER}/authorized_keys" - - passwd -d "${VAGRANT_SSH_USERNAME}" >/dev/null -fi diff --git a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/update-puppet.sh b/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/update-puppet.sh deleted file mode 100644 index f8c1f5d225..0000000000 --- a/resources/vagrant/vms/phraseanet-php55-nginx/puphpet/shell/update-puppet.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -export DEBIAN_FRONTEND=noninteractive - -VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt') - -OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID) -RELEASE=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" RELEASE) -CODENAME=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" CODENAME) - -if [[ ! -f '/.puphpet-stuff/update-puppet' ]]; then - if [ "${OS}" == 'debian' ] || [ "${OS}" == 'ubuntu' ]; then - echo "Downloading http://apt.puppetlabs.com/puppetlabs-release-${CODENAME}.deb" - wget --quiet --tries=5 --connect-timeout=10 -O "/.puphpet-stuff/puppetlabs-release-${CODENAME}.deb" "http://apt.puppetlabs.com/puppetlabs-release-${CODENAME}.deb" - echo "Finished downloading http://apt.puppetlabs.com/puppetlabs-release-${CODENAME}.deb" - - dpkg -i "/.puphpet-stuff/puppetlabs-release-${CODENAME}.deb" >/dev/null - - echo 'Running update-puppet apt-get update' - apt-get update >/dev/null - echo 'Finished running update-puppet apt-get update' - - echo 'Updating Puppet to version 3.4.x' - apt-get install -y puppet-common=3.4.* puppet=3.4.* >/dev/null - apt-mark hold puppet puppet-common >/dev/null - PUPPET_VERSION=$(puppet help | grep 'Puppet v') - echo "Finished updating puppet to latest version: ${PUPPET_VERSION}" - - touch '/.puphpet-stuff/update-puppet' - elif [ "${OS}" == 'centos' ]; then - echo "Downloading http://yum.puppetlabs.com/el/${RELEASE}/products/x86_64/puppet-3.4.3-1.el6.noarch.rpm" - yum -y --nogpgcheck install "http://yum.puppetlabs.com/el/${RELEASE}/products/x86_64/puppet-3.4.3-1.el6.noarch.rpm" >/dev/null - echo "Finished downloading http://yum.puppetlabs.com/el/${RELEASE}/products/x86_64/puppet-3.4.3-1.el6.noarch.rpm" - - echo 'Installing/Updating Puppet to version 3.4.x' - yum -y install yum-versionlock puppet >/dev/null - yum versionlock puppet - PUPPET_VERSION=$(puppet help | grep 'Puppet v') - echo "Finished installing/updating puppet to version: ${PUPPET_VERSION}" - - touch '/.puphpet-stuff/update-puppet' - fi -fi From 6267eb6bb1831e329a12a0902a8456d8fd9cb6ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 2 Dec 2015 13:45:38 +0100 Subject: [PATCH 011/383] Update Node modules and php --- resources/ansible/roles/app/tasks/main.yml | 4 +++- resources/ansible/roles/node/tasks/main.yml | 8 ++++++-- resources/ansible/roles/php/tasks/php-fpm.yml | 9 +++++++++ resources/ansible/roles/server/tasks/main.yml | 2 +- resources/ansible/vars/all.yml | 2 +- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/resources/ansible/roles/app/tasks/main.yml b/resources/ansible/roles/app/tasks/main.yml index 5b81cc12f0..2f42896117 100644 --- a/resources/ansible/roles/app/tasks/main.yml +++ b/resources/ansible/roles/app/tasks/main.yml @@ -1,4 +1,6 @@ --- # application tasks to be customized and to run after the main provision - name: Install global npm packages - shell: . /usr/local/nvm/nvm.sh && npm install -g bower recess + become: yes + become_user: vagrant + shell: export NVM_DIR="$HOME/.nvm" &&. "$NVM_DIR/nvm.sh" && npm install -g bower recess diff --git a/resources/ansible/roles/node/tasks/main.yml b/resources/ansible/roles/node/tasks/main.yml index f9a30ee117..1b52f0a24b 100644 --- a/resources/ansible/roles/node/tasks/main.yml +++ b/resources/ansible/roles/node/tasks/main.yml @@ -1,6 +1,10 @@ --- - name: Install NVM - shell: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | NVM_DIR=/usr/local/nvm /bin/bash creates=/usr/local/nvm + become: yes + become_user: vagrant + shell: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | /bin/bash creates=/home/vagrant/.nvm/nvm.sh - name: Install specific nodejs version - shell: . /usr/local/nvm/nvm.sh && nvm install 0.12.0 && nvm alias default 0.12.0 + become: yes + become_user: vagrant + shell: export NVM_DIR="$HOME/.nvm" &&. ~/.nvm/nvm.sh && nvm install 0.12.0 && nvm alias default 0.12.0 diff --git a/resources/ansible/roles/php/tasks/php-fpm.yml b/resources/ansible/roles/php/tasks/php-fpm.yml index adad53e250..dfe2d29b4b 100644 --- a/resources/ansible/roles/php/tasks/php-fpm.yml +++ b/resources/ansible/roles/php/tasks/php-fpm.yml @@ -1,9 +1,11 @@ --- - name: Set permissions on socket - owner lineinfile: "dest=/etc/php5/fpm/pool.d/www.conf state=present regexp='^;?listen.owner' line='listen.owner = www-data'" + notify: restart php5-fpm - name: Set permissions on socket - group lineinfile: "dest=/etc/php5/fpm/pool.d/www.conf state=present regexp='^;?listen.group' line='listen.group = www-data'" + notify: restart php5-fpm - name: Set permissions on socket - mode lineinfile: "dest=/etc/php5/fpm/pool.d/www.conf state=present regexp='^;?listen.mode' line='listen.mode = 0660'" @@ -13,27 +15,34 @@ lineinfile: dest=/etc/php5/fpm/php.ini regexp='date.timezone =' line='date.timezone = {{ server.timezone }}' + notify: restart php5-fpm + - name: enabling opcache lineinfile: dest=/etc/php5/fpm/php.ini regexp=';?opcache.enable=\d' line='opcache.enable=1' + notify: restart php5-fpm - name: Disable PHP cache limiter lineinfile: dest=/etc/php5/fpm/php.ini regexp=';?\s*session.cache_limiter\s*=\s*' line='session.cache_limiter = ""' + notify: restart php5-fpm - name: set post_max_size lineinfile: dest=/etc/php5/fpm/php.ini regexp=';?post_max_size\s*=\s*' line='post_max_size = 2G' + notify: restart php5-fpm - name: set upload_max_filesize lineinfile: dest=/etc/php5/fpm/php.ini regexp=';?upload_max_filesize\s*=\s*' line='upload_max_filesize = 2G' + notify: restart php5-fpm - name: set max_input_vars lineinfile: dest=/etc/php5/fpm/php.ini regexp=';?max_input_vars\s*=\s*' line='max_input_vars = 12000' + notify: restart php5-fpm diff --git a/resources/ansible/roles/server/tasks/main.yml b/resources/ansible/roles/server/tasks/main.yml index 56d8425377..1e35c28879 100644 --- a/resources/ansible/roles/server/tasks/main.yml +++ b/resources/ansible/roles/server/tasks/main.yml @@ -2,7 +2,7 @@ - name: Update apt sudo: yes apt: update_cache=yes - when: server.prevent_update is defined + when: server.prevent_update is not defined - name: Install System Packages sudo: yes diff --git a/resources/ansible/vars/all.yml b/resources/ansible/vars/all.yml index 3d82264479..6e82b2d711 100644 --- a/resources/ansible/vars/all.yml +++ b/resources/ansible/vars/all.yml @@ -45,7 +45,7 @@ elasticsearch: port: '9200' version: '1.7.3' plugins: - - {name: 'elasticsearch/elasticsearch-analysis-icu', version: '2.6.0'} + - {name: 'elasticsearch/elasticsearch-analysis-icu', version: '2.7.0'} php: install: '1' ppa: php5 From 8750459aabd63d3683063dd4979157e6d7798dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 9 Feb 2016 16:51:35 +0100 Subject: [PATCH 012/383] Bump master as 4.1 branch --- composer.json | 2 +- composer.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 383c7013b8..0ea69c8241 100644 --- a/composer.json +++ b/composer.json @@ -111,7 +111,7 @@ "include-path": ["vendor/zend/gdata/library"], "extra": { "branch-alias": { - "dev-master": "4.0.x-dev" + "dev-master": "4.1.x-dev" } } } diff --git a/composer.lock b/composer.lock index c2774a9a8a..200fc46c55 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "26dcf1e33b20a55ecd2555da02ba6161", - "content-hash": "6972430014dbde461b9954c32a8cbdbb", + "hash": "8a411f7150eeb12552a747c083ff0e6a", + "content-hash": "898d26642c158c5efb98e8abaccc2655", "packages": [ { "name": "alchemy-fr/tcpdf-clone", @@ -487,7 +487,7 @@ }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/rest-bundle/zipball/a0e2c2b8a1d2c9c405fc9663b698f56a20831946", + "url": "https://api.github.com/repos/alchemy-fr/rest-bundle/zipball/68d2333231867c4157db27f6f4972328b1433eb1", "reference": "7b1c88c02ab8c0d4e997fd61c13c8fd4c3ce5216", "shasum": "" }, From 02879cdde5eafab8f21ed5e1189eef68336aec82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 10 Feb 2016 15:07:51 +0100 Subject: [PATCH 013/383] Reorder class --- lib/classes/databox/subdef.php | 323 ++++++++++++++++----------------- 1 file changed, 158 insertions(+), 165 deletions(-) diff --git a/lib/classes/databox/subdef.php b/lib/classes/databox/subdef.php index 653ac83a1e..65cd81e0f4 100644 --- a/lib/classes/databox/subdef.php +++ b/lib/classes/databox/subdef.php @@ -1,5 +1,4 @@ [SubdefSpecs::TYPE_IMAGE, SubdefSpecs::TYPE_AUDIO], + SubdefType::TYPE_DOCUMENT => [SubdefSpecs::TYPE_IMAGE, SubdefSpecs::TYPE_FLEXPAPER], + SubdefType::TYPE_FLASH => [SubdefSpecs::TYPE_IMAGE], + SubdefType::TYPE_IMAGE => [SubdefSpecs::TYPE_IMAGE], + SubdefType::TYPE_VIDEO => [SubdefSpecs::TYPE_IMAGE, SubdefSpecs::TYPE_VIDEO, SubdefSpecs::TYPE_ANIMATION], + ]; + /** * The class type of the subdef * Is null or one of the CLASS_* constants @@ -33,37 +51,18 @@ class databox_subdef protected $path; protected $subdef_group; protected $labels = []; + protected $downloadable; + protected $translator; /** * @var bool */ private $requiresMetadataUpdate; - protected $downloadable; - protected $translator; - protected static $mediaTypeToSubdefTypes = [ - SubdefType::TYPE_AUDIO => [SubdefSpecs::TYPE_IMAGE, SubdefSpecs::TYPE_AUDIO], - SubdefType::TYPE_DOCUMENT => [SubdefSpecs::TYPE_IMAGE, SubdefSpecs::TYPE_FLEXPAPER], - SubdefType::TYPE_FLASH => [SubdefSpecs::TYPE_IMAGE], - SubdefType::TYPE_IMAGE => [SubdefSpecs::TYPE_IMAGE], - SubdefType::TYPE_VIDEO => [SubdefSpecs::TYPE_IMAGE, SubdefSpecs::TYPE_VIDEO, SubdefSpecs::TYPE_ANIMATION], - ]; - - const CLASS_THUMBNAIL = 'thumbnail'; - const CLASS_PREVIEW = 'preview'; - const CLASS_DOCUMENT = 'document'; - const DEVICE_ALL = 'all'; - const DEVICE_HANDHELD = 'handheld'; - const DEVICE_PRINT = 'print'; - const DEVICE_PROJECTION = 'projection'; - const DEVICE_SCREEN = 'screen'; - const DEVICE_TV = 'tv'; /** - * - * @param SubdefType $type + * @param SubdefType $type * @param SimpleXMLElement $sd - * - * @return databox_subdef + * @param TranslatorInterface $translator */ public function __construct(SubdefType $type, SimpleXMLElement $sd, TranslatorInterface $translator) { @@ -107,12 +106,130 @@ class databox_subdef $this->subdef_type = $this->buildFlexPaperSubdef($sd); break; } - - return $this; } /** + * Build Image Subdef object depending the SimpleXMLElement * + * @param SimpleXMLElement $sd + * @return Image + */ + protected function buildImageSubdef(SimpleXMLElement $sd) + { + $image = new Image($this->translator); + + if ($sd->size) { + $image->setOptionValue(Image::OPTION_SIZE, (int) $sd->size); + } + if ($sd->quality) { + $image->setOptionValue(Image::OPTION_QUALITY, (int) $sd->quality); + } + if ($sd->strip) { + $image->setOptionValue(Image::OPTION_STRIP, p4field::isyes($sd->strip)); + } + if ($sd->dpi) { + $image->setOptionValue(Image::OPTION_RESOLUTION, (int) $sd->dpi); + } + if ($sd->flatten) { + $image->setOptionValue(Image::OPTION_FLATTEN, p4field::isyes($sd->flatten)); + } + + return $image; + } + + /** + * Build Audio Subdef object depending the SimpleXMLElement + * + * @param SimpleXMLElement $sd + * @return Audio + */ + protected function buildAudioSubdef(SimpleXMLElement $sd) + { + $audio = new Audio($this->translator); + + if ($sd->acodec) { + $audio->setOptionValue(Audio::OPTION_ACODEC, (string) $sd->acodec); + } + if ($sd->audiobitrate) { + $audio->setOptionValue(Audio::OPTION_AUDIOBITRATE, (int) $sd->audiobitrate); + } + if ($sd->audiosamplerate) { + $audio->setOptionValue(Audio::OPTION_AUDIOSAMPLERATE, (int) $sd->audiosamplerate); + } + + return $audio; + } + + /** + * Build Video Subdef object depending the SimpleXMLElement + * + * @param SimpleXMLElement $sd + * @return Video + */ + protected function buildVideoSubdef(SimpleXMLElement $sd) + { + $video = new Video($this->translator); + + if ($sd->size) { + $video->setOptionValue(Video::OPTION_SIZE, (int) $sd->size); + } + if ($sd->acodec) { + $video->setOptionValue(Video::OPTION_ACODEC, (string) $sd->acodec); + } + if ($sd->vcodec) { + $video->setOptionValue(Video::OPTION_VCODEC, (string) $sd->vcodec); + } + if ($sd->fps) { + $video->setOptionValue(Video::OPTION_FRAMERATE, (int) $sd->fps); + } + if ($sd->bitrate) { + $video->setOptionValue(Video::OPTION_BITRATE, (int) $sd->bitrate); + } + if ($sd->audiobitrate) { + $video->setOptionValue(Video::OPTION_AUDIOBITRATE, (int) $sd->audiobitrate); + } + if ($sd->audiosamplerate) { + $video->setOptionValue(Video::OPTION_AUDIOSAMPLERATE, (int) $sd->audiosamplerate); + } + if ($sd->GOPsize) { + $video->setOptionValue(Video::OPTION_GOPSIZE, (int) $sd->GOPsize); + } + + return $video; + } + + /** + * Build GIF Subdef object depending the SimpleXMLElement + * + * @param SimpleXMLElement $sd + * @return Gif + */ + protected function buildGifSubdef(SimpleXMLElement $sd) + { + $gif = new Gif($this->translator); + + if ($sd->size) { + $gif->setOptionValue(Gif::OPTION_SIZE, (int) $sd->size); + } + if ($sd->delay) { + $gif->setOptionValue(Gif::OPTION_DELAY, (int) $sd->delay); + } + + return $gif; + } + + /** + * Build Flexpaper Subdef object depending the SimpleXMLElement + * + * @param SimpleXMLElement $sd + * @return FlexPaper + */ + protected function buildFlexPaperSubdef(SimpleXMLElement $sd) + { + return new FlexPaper($this->translator); + } + + /** * @return string */ public function get_class() @@ -121,7 +238,6 @@ class databox_subdef } /** - * * @return string */ public function get_path() @@ -132,7 +248,7 @@ class databox_subdef /** * The devices matching this subdefinition * - * @return Array + * @return array */ public function getDevices() { @@ -142,7 +258,7 @@ class databox_subdef /** * The current SubdefType the subdef converts documents * - * @return Alchemy\Phrasea\Media\Subdef\Subdef + * @return \Alchemy\Phrasea\Media\Subdef\Subdef */ public function getSubdefType() { @@ -162,7 +278,7 @@ class databox_subdef /** * An associative label ; keys are i18n languages * - * @return Array + * @return array */ public function get_labels() { @@ -181,9 +297,17 @@ class databox_subdef } /** - * boolean + * The name of the subdef * - * @return type + * @return string + */ + public function get_name() + { + return $this->name; + } + + /** + * @return bool */ public function is_downloadable() { @@ -256,16 +380,6 @@ class databox_subdef return $this->requiresMetadataUpdate; } - /** - * The name of the subdef - * - * @return string - */ - public function get_name() - { - return $this->name; - } - /** * Get the MediaAlchemyst specs for the current subdef * @@ -285,125 +399,4 @@ class databox_subdef { return $this->subdef_type->getOptions(); } - - /** - * Build Image Subdef object depending the SimpleXMLElement - * - * @param SimpleXMLElement $sd - * @return \Alchemy\Phrasea\Media\Subdef\Video - */ - protected function buildImageSubdef(SimpleXMLElement $sd) - { - $image = new Image($this->translator); - - if ($sd->size) { - $image->setOptionValue(Image::OPTION_SIZE, (int) $sd->size); - } - if ($sd->quality) { - $image->setOptionValue(Image::OPTION_QUALITY, (int) $sd->quality); - } - if ($sd->strip) { - $image->setOptionValue(Image::OPTION_STRIP, p4field::isyes($sd->strip)); - } - if ($sd->dpi) { - $image->setOptionValue(Image::OPTION_RESOLUTION, (int) $sd->dpi); - } - if ($sd->flatten) { - $image->setOptionValue(Image::OPTION_FLATTEN, p4field::isyes($sd->flatten)); - } - - return $image; - } - - /** - * Build Audio Subdef object depending the SimpleXMLElement - * - * @param SimpleXMLElement $sd - * @return \Alchemy\Phrasea\Media\Subdef\Video - */ - protected function buildAudioSubdef(SimpleXMLElement $sd) - { - $audio = new Audio($this->translator); - - if ($sd->acodec) { - $audio->setOptionValue(Audio::OPTION_ACODEC, (string) $sd->acodec); - } - if ($sd->audiobitrate) { - $audio->setOptionValue(Audio::OPTION_AUDIOBITRATE, (int) $sd->audiobitrate); - } - if ($sd->audiosamplerate) { - $audio->setOptionValue(Audio::OPTION_AUDIOSAMPLERATE, (int) $sd->audiosamplerate); - } - - return $audio; - } - - /** - * Build Flexpaper Subdef object depending the SimpleXMLElement - * - * @param SimpleXMLElement $sd - * @return \Alchemy\Phrasea\Media\Subdef\Video - */ - protected function buildFlexPaperSubdef(SimpleXMLElement $sd) - { - return new FlexPaper($this->translator); - } - - /** - * Build GIF Subdef object depending the SimpleXMLElement - * - * @param SimpleXMLElement $sd - * @return \Alchemy\Phrasea\Media\Subdef\Video - */ - protected function buildGifSubdef(SimpleXMLElement $sd) - { - $gif = new Gif($this->translator); - - if ($sd->size) { - $gif->setOptionValue(Gif::OPTION_SIZE, (int) $sd->size); - } - if ($sd->delay) { - $gif->setOptionValue(Gif::OPTION_DELAY, (int) $sd->delay); - } - - return $gif; - } - - /** - * Build Video Subdef object depending the SimpleXMLElement - * - * @param SimpleXMLElement $sd - * @return \Alchemy\Phrasea\Media\Subdef\Video - */ - protected function buildVideoSubdef(SimpleXMLElement $sd) - { - $video = new Video($this->translator); - - if ($sd->size) { - $video->setOptionValue(Video::OPTION_SIZE, (int) $sd->size); - } - if ($sd->acodec) { - $video->setOptionValue(Video::OPTION_ACODEC, (string) $sd->acodec); - } - if ($sd->vcodec) { - $video->setOptionValue(Video::OPTION_VCODEC, (string) $sd->vcodec); - } - if ($sd->fps) { - $video->setOptionValue(Video::OPTION_FRAMERATE, (int) $sd->fps); - } - if ($sd->bitrate) { - $video->setOptionValue(Video::OPTION_BITRATE, (int) $sd->bitrate); - } - if ($sd->audiobitrate) { - $video->setOptionValue(Video::OPTION_AUDIOBITRATE, (int) $sd->audiobitrate); - } - if ($sd->audiosamplerate) { - $video->setOptionValue(Video::OPTION_AUDIOSAMPLERATE, (int) $sd->audiosamplerate); - } - if ($sd->GOPsize) { - $video->setOptionValue(Video::OPTION_GOPSIZE, (int) $sd->GOPsize); - } - - return $video; - } } From 810bef41fbcd891380c8c6421ef2dfcb5d7160e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 10 Feb 2016 16:01:24 +0100 Subject: [PATCH 014/383] rename is_downloable to isDownloable Change Functional to unit test --- lib/classes/databox/subdef.php | 2 +- lib/classes/patch/370alpha6a.php | 2 +- lib/classes/record/exportElement.php | 7 +-- templates/web/admin/subdefs.html.twig | 2 +- .../Phrasea/Controller/Admin/SubdefsTest.php | 3 +- tests/classes/databox/subdefTest.php | 61 +------------------ 6 files changed, 10 insertions(+), 67 deletions(-) diff --git a/lib/classes/databox/subdef.php b/lib/classes/databox/subdef.php index 65cd81e0f4..c3b8bca719 100644 --- a/lib/classes/databox/subdef.php +++ b/lib/classes/databox/subdef.php @@ -309,7 +309,7 @@ class databox_subdef /** * @return bool */ - public function is_downloadable() + public function isDownloadable() { return $this->downloadable; } diff --git a/lib/classes/patch/370alpha6a.php b/lib/classes/patch/370alpha6a.php index 7f3472c260..7219d0d12b 100644 --- a/lib/classes/patch/370alpha6a.php +++ b/lib/classes/patch/370alpha6a.php @@ -108,7 +108,7 @@ class patch_370alpha6a extends patchAbstract $options['meta'] = $subdef->isMetadataUpdateRequired() ? 'yes' : 'no'; $options['devices'] = [databox_subdef::DEVICE_SCREEN]; - $root->set_subdef($groupname, $subdef->get_name(), $subdef->get_class(), $subdef->is_downloadable(), $options, []); + $root->set_subdef($groupname, $subdef->get_name(), $subdef->get_class(), $subdef->isDownloadable(), $options, []); } protected function addMobileSubdefVideo($root, $baseSubdef, $groupname) diff --git a/lib/classes/record/exportElement.php b/lib/classes/record/exportElement.php index fe225f145d..62ac7ab0a8 100644 --- a/lib/classes/record/exportElement.php +++ b/lib/classes/record/exportElement.php @@ -85,11 +85,10 @@ class record_exportElement extends record_adapter $sbas_id = phrasea::sbasFromBas($this->app, $this->get_base_id()); - $subdefgroups = $this->app->findDataboxById($sbas_id)->get_subdef_structure(); - + /** @var databox_subdef[] $subdefs */ $subdefs = []; - foreach ($subdefgroups as $subdef_type => $subdefs_obj) { + foreach ($this->app->findDataboxById($sbas_id)->get_subdef_structure() as $subdef_type => $subdefs_obj) { if ($subdef_type == $this->get_type()) { $subdefs = $subdefs_obj; break; @@ -173,7 +172,7 @@ class record_exportElement extends record_adapter $downloadable[$name] = false; - $downloadable_settings = $subdef->is_downloadable(); + $downloadable_settings = $subdef->isDownloadable(); if (! $downloadable_settings || $go_dl[$class] === false) { continue; diff --git a/templates/web/admin/subdefs.html.twig b/templates/web/admin/subdefs.html.twig index 5172612eee..c7c63258bd 100644 --- a/templates/web/admin/subdefs.html.twig +++ b/templates/web/admin/subdefs.html.twig @@ -227,7 +227,7 @@ {% endfor %} {{ 'Telechargeable' | trans }} - + diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Admin/SubdefsTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Admin/SubdefsTest.php index 7c8c1572e5..2aced1154a 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Admin/SubdefsTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Admin/SubdefsTest.php @@ -94,8 +94,7 @@ class SubdefsTest extends \PhraseanetAuthenticatedWebTestCase $subdefs = new \databox_subdefsStructure($app->findDataboxById($this->databox_id), $app['translator']); $subdef = $subdefs->get_subdef("image", $name); - /* @var $subdef \databox_subdef */ - $this->assertFalse($subdef->is_downloadable()); + $this->assertFalse($subdef->isDownloadable()); $options = $subdef->getOptions(); diff --git a/tests/classes/databox/subdefTest.php b/tests/classes/databox/subdefTest.php index 0a9da63026..2db6d8c234 100644 --- a/tests/classes/databox/subdefTest.php +++ b/tests/classes/databox/subdefTest.php @@ -1,27 +1,7 @@ @@ -52,7 +32,7 @@ class databox_subdefTest extends \PhraseanetTestCase $this->assertArrayHasKey('en', $labels); $this->assertEquals('Preview', $labels['en']); - $this->assertTrue($object->is_downloadable()); + $this->assertTrue($object->isDownloadable()); $this->assertTrue(is_array($object->getAvailableSubdefTypes())); $this->assertTrue(count($object->getAvailableSubdefTypes()) > 0); @@ -73,21 +53,6 @@ class databox_subdefTest extends \PhraseanetTestCase } } - /** - * @covers databox_subdef::__construct - * @covers databox_subdef::get_class - * @covers databox_subdef::get_name - * @covers databox_subdef::isMetadataUpdateRequired - * @covers databox_subdef::getAvailableSubdefTypes - * @covers databox_subdef::is_downloadable - * @covers databox_subdef::get_labels - * @covers databox_subdef::getSubdefGroup - * @covers databox_subdef::getSubdefType - * @covers databox_subdef::get_path - * @covers databox_subdef::getSpecs - * @covers databox_subdef::getOptions - * @covers databox_subdef::buildVideoSubdef - */ public function testVideo() { $xml = ' @@ -118,7 +83,7 @@ class databox_subdefTest extends \PhraseanetTestCase $this->assertTrue(is_array($labels)); $this->assertEquals(0, count($labels)); - $this->assertFalse($object->is_downloadable()); + $this->assertFalse($object->isDownloadable()); $this->assertTrue(is_array($object->getAvailableSubdefTypes())); $this->assertTrue(count($object->getAvailableSubdefTypes()) > 0); @@ -139,12 +104,6 @@ class databox_subdefTest extends \PhraseanetTestCase } } - /** - * @covers databox_subdef::__construct - * @covers databox_subdef::getSpecs - * @covers databox_subdef::getOptions - * @covers databox_subdef::buildGifSubdef - */ public function testGif() { $xml = ' @@ -170,12 +129,6 @@ class databox_subdefTest extends \PhraseanetTestCase } } - /** - * @covers databox_subdef::__construct - * @covers databox_subdef::getSpecs - * @covers databox_subdef::getOptions - * @covers databox_subdef::buildAudioSubdef - */ public function testAudio() { $xml = ' @@ -197,12 +150,6 @@ class databox_subdefTest extends \PhraseanetTestCase } } - /** - * @covers databox_subdef::__construct - * @covers databox_subdef::getSpecs - * @covers databox_subdef::getOptions - * @covers databox_subdef::buildFlexPaperSubdef - */ public function testFlexPaper() { $xml = ' @@ -226,11 +173,9 @@ class databox_subdefTest extends \PhraseanetTestCase /** * @dataProvider getVariouasTypeAndSubdefs - * @covers databox_subdef::getAvailableSubdefTypes */ public function testGetAvailableSubdefTypes($object) { - foreach ($object->getAvailableSubdefTypes() as $type) { $this->assertInstanceOf('\\Alchemy\\Phrasea\\Media\\Subdef\\Subdef', $type); } From 5f4cfae0ca0867e88768e27275e282c7a5e67a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 10 Feb 2016 16:24:38 +0100 Subject: [PATCH 015/383] Refactor subdefTest --- tests/classes/databox/subdefTest.php | 69 +++++++++++++++++----------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/tests/classes/databox/subdefTest.php b/tests/classes/databox/subdefTest.php index 2db6d8c234..51148a9611 100644 --- a/tests/classes/databox/subdefTest.php +++ b/tests/classes/databox/subdefTest.php @@ -1,7 +1,23 @@ translator = $this->getMock(TranslatorInterface::class); + } + public function testImage() { $xml = ' @@ -17,12 +33,12 @@ class databox_subdefTest extends \PHPUnit_Framework_TestCase 75 '; - $type = new \Alchemy\Phrasea\Media\Type\Image(); - $object = new databox_subdef($type, simplexml_load_string($xml), $this->getMock('Symfony\Component\Translation\TranslatorInterface')); + $type = new Type\Image(); + $object = new databox_subdef($type, simplexml_load_string($xml), $this->translator); $this->assertEquals(databox_subdef::CLASS_PREVIEW, $object->get_class()); $this->assertEquals('/home/datas/noweb/db_alch_phrasea/subdefs/', $object->get_path()); - $this->assertInstanceOf('\\Alchemy\\Phrasea\\Media\Subdef\\Subdef', $object->getSubdefType()); + $this->assertInstanceOf(Subdef\Subdef::class, $object->getSubdefType()); $this->assertEquals($type, $object->getSubdefGroup()); $labels = $object->get_labels(); @@ -37,19 +53,19 @@ class databox_subdefTest extends \PHPUnit_Framework_TestCase $this->assertTrue(count($object->getAvailableSubdefTypes()) > 0); foreach ($object->getAvailableSubdefTypes() as $type) { - $this->assertInstanceOf('\\Alchemy\\Phrasea\\Media\\Subdef\\Image', $type); + $this->assertInstanceOf(Subdef\Image::class, $type); } $this->assertTrue($object->isMetadataUpdateRequired()); $this->assertEquals('preview_api', $object->get_name()); - $this->assertInstanceOf('\\MediaAlchemyst\\Specification\\Image', $object->getSpecs()); + $this->assertInstanceOf(Specification\Image::class, $object->getSpecs()); $options = $object->getOptions(); $this->assertTrue(is_array($options)); foreach ($options as $option) { - $this->assertInstanceOf('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType', $option); + $this->assertInstanceOf(OptionType::class, $option); } } @@ -72,11 +88,11 @@ class databox_subdefTest extends \PHPUnit_Framework_TestCase '; $type = new \Alchemy\Phrasea\Media\Type\Video(); - $object = new databox_subdef($type, simplexml_load_string($xml), $this->getMock('Symfony\Component\Translation\TranslatorInterface')); + $object = new databox_subdef($type, simplexml_load_string($xml), $this->translator); $this->assertEquals(databox_subdef::CLASS_THUMBNAIL, $object->get_class()); $this->assertEquals('/home/datas/noweb/db_alch_phrasea/video/', $object->get_path()); - $this->assertInstanceOf('\\Alchemy\\Phrasea\\Media\Subdef\\Subdef', $object->getSubdefType()); + $this->assertInstanceOf(Subdef\Subdef::class, $object->getSubdefType()); $this->assertEquals($type, $object->getSubdefGroup()); $labels = $object->get_labels(); @@ -88,19 +104,19 @@ class databox_subdefTest extends \PHPUnit_Framework_TestCase $this->assertTrue(count($object->getAvailableSubdefTypes()) > 0); foreach ($object->getAvailableSubdefTypes() as $type) { - $this->assertInstanceOf('\\Alchemy\\Phrasea\\Media\\Subdef\\Subdef', $type); + $this->assertInstanceOf(Subdef\Subdef::class, $type); } $this->assertFalse($object->isMetadataUpdateRequired()); $this->assertEquals('video_api', $object->get_name()); - $this->assertInstanceOf('\\MediaAlchemyst\\Specification\\Video', $object->getSpecs()); + $this->assertInstanceOf(Specification\Video::class, $object->getSpecs()); $options = $object->getOptions(); $this->assertTrue(is_array($options)); foreach ($options as $option) { - $this->assertInstanceOf('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType', $option); + $this->assertInstanceOf(OptionType::class, $option); } } @@ -117,15 +133,15 @@ class databox_subdefTest extends \PHPUnit_Framework_TestCase '; $type = new \Alchemy\Phrasea\Media\Type\Video(); - $object = new databox_subdef($type, simplexml_load_string($xml), $this->getMock('Symfony\Component\Translation\TranslatorInterface')); + $object = new databox_subdef($type, simplexml_load_string($xml), $this->translator); - $this->assertInstanceOf('\\MediaAlchemyst\\Specification\\Animation', $object->getSpecs()); + $this->assertInstanceOf(Specification\Animation::class, $object->getSpecs()); $options = $object->getOptions(); $this->assertTrue(is_array($options)); foreach ($options as $option) { - $this->assertInstanceOf('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType', $option); + $this->assertInstanceOf(OptionType::class, $option); } } @@ -138,15 +154,15 @@ class databox_subdefTest extends \PHPUnit_Framework_TestCase '; $type = new \Alchemy\Phrasea\Media\Type\Audio(); - $object = new databox_subdef($type, simplexml_load_string($xml), $this->getMock('Symfony\Component\Translation\TranslatorInterface')); + $object = new databox_subdef($type, simplexml_load_string($xml), $this->translator); - $this->assertInstanceOf('\\MediaAlchemyst\\Specification\\Audio', $object->getSpecs()); + $this->assertInstanceOf(Specification\Audio::class, $object->getSpecs()); $options = $object->getOptions(); $this->assertTrue(is_array($options)); foreach ($options as $option) { - $this->assertInstanceOf('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType', $option); + $this->assertInstanceOf(OptionType::class, $option); } } @@ -159,15 +175,15 @@ class databox_subdefTest extends \PHPUnit_Framework_TestCase '; $type = new \Alchemy\Phrasea\Media\Type\Flash(); - $object = new databox_subdef($type, simplexml_load_string($xml), $this->getMock('Symfony\Component\Translation\TranslatorInterface')); + $object = new databox_subdef($type, simplexml_load_string($xml), $this->translator); - $this->assertInstanceOf('\\MediaAlchemyst\\Specification\\Flash', $object->getSpecs()); + $this->assertInstanceOf(Specification\Flash::class, $object->getSpecs()); $options = $object->getOptions(); $this->assertTrue(is_array($options)); foreach ($options as $option) { - $this->assertInstanceOf('\\Alchemy\\Phrasea\\Media\\Subdef\\OptionType\\OptionType', $option); + $this->assertInstanceOf(OptionType::class, $option); } } @@ -177,27 +193,24 @@ class databox_subdefTest extends \PHPUnit_Framework_TestCase public function testGetAvailableSubdefTypes($object) { foreach ($object->getAvailableSubdefTypes() as $type) { - $this->assertInstanceOf('\\Alchemy\\Phrasea\\Media\\Subdef\\Subdef', $type); + $this->assertInstanceOf(Subdef\Subdef::class, $type); } } public function getVariouasTypeAndSubdefs() { - $xmlImage = ' /home/datas/noweb/db_alch_phrasea/video/ image '; - $typeAudio = new \Alchemy\Phrasea\Media\Type\Audio(); - $typeDocument = new \Alchemy\Phrasea\Media\Type\Document(); - $typeVideo = new \Alchemy\Phrasea\Media\Type\Video(); + $translator = $this->getMock(TranslatorInterface::class); return [ - [new databox_subdef($typeAudio, simplexml_load_string($xmlImage), $this->getMock('Symfony\Component\Translation\TranslatorInterface'))], - [new databox_subdef($typeDocument, simplexml_load_string($xmlImage), $this->getMock('Symfony\Component\Translation\TranslatorInterface'))], - [new databox_subdef($typeVideo, simplexml_load_string($xmlImage), $this->getMock('Symfony\Component\Translation\TranslatorInterface'))], + [new databox_subdef(new Type\Audio(), simplexml_load_string($xmlImage), $translator)], + [new databox_subdef(new Type\Document(), simplexml_load_string($xmlImage), $translator)], + [new databox_subdef(new Type\Video(), simplexml_load_string($xmlImage), $translator)], ]; } } From 20178f76cd90d90199e6693cb9ac672f74866eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 10 Feb 2016 16:52:14 +0100 Subject: [PATCH 016/383] Add orderable flat to subdef --- lib/classes/databox/subdef.php | 14 +++++++++ tests/classes/databox/subdefTest.php | 47 ++++++++++++++++++++++++++-- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/lib/classes/databox/subdef.php b/lib/classes/databox/subdef.php index c3b8bca719..cd46f04714 100644 --- a/lib/classes/databox/subdef.php +++ b/lib/classes/databox/subdef.php @@ -59,6 +59,11 @@ class databox_subdef */ private $requiresMetadataUpdate; + /** + * @var bool + */ + private $orderable; + /** * @param SubdefType $type * @param SimpleXMLElement $sd @@ -76,6 +81,7 @@ class databox_subdef $this->name = strtolower($sd->attributes()->name); $this->downloadable = p4field::isyes($sd->attributes()->downloadable); + $this->orderable = isset($sd->attributes()->orderable) ? p4field::isyes($sd->attributes()->orderable) : true; $this->path = trim($sd->path) !== '' ? p4string::addEndSlash(trim($sd->path)) : ''; $this->requiresMetadataUpdate = p4field::isyes((string) $sd->meta); @@ -314,6 +320,14 @@ class databox_subdef return $this->downloadable; } + /** + * @return bool + */ + public function isOrderable() + { + return $this->orderable; + } + /** * Get an array of Alchemy\Phrasea\Media\Subdef\Subdef available for the current Media Type * diff --git a/tests/classes/databox/subdefTest.php b/tests/classes/databox/subdefTest.php index 51148a9611..043e80bab0 100644 --- a/tests/classes/databox/subdefTest.php +++ b/tests/classes/databox/subdefTest.php @@ -15,7 +15,7 @@ class databox_subdefTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->translator = $this->getMock(TranslatorInterface::class); + $this->translator = $this->getTranslatorMock(); } public function testImage() @@ -205,7 +205,7 @@ class databox_subdefTest extends \PHPUnit_Framework_TestCase image '; - $translator = $this->getMock(TranslatorInterface::class); + $translator = $this->getTranslatorMock(); return [ [new databox_subdef(new Type\Audio(), simplexml_load_string($xmlImage), $translator)], @@ -213,4 +213,47 @@ class databox_subdefTest extends \PHPUnit_Framework_TestCase [new databox_subdef(new Type\Video(), simplexml_load_string($xmlImage), $translator)], ]; } + + /** + * @param bool $expected + * @param null|string $configValue + * @dataProvider providesOrderableStatuses + */ + public function testOrderableStatus($expected, $configValue, $message) + { + $xmlTemplate = <<<'EOF' + + + /home/datas/noweb/db_alch_phrasea/video/ + image + +EOF; + + if (null !== $configValue) { + $configValue = ' orderable="' . $configValue . '"'; + } + + $xml = sprintf($xmlTemplate, $configValue ?: ''); + + $sut = new databox_subdef(new Type\Image(), simplexml_load_string($xml), $this->translator); + + $this->assertSame($expected, $sut->isOrderable(), $message); + } + + public function providesOrderableStatuses() + { + return [ + [true, null, 'No Orderable Status set should defaults to true'], + [false, 'false', 'Orderable should be false'], + [true, 'true', 'Orderable should be true'], + ]; + } + + /** + * @return PHPUnit_Framework_MockObject_MockObject|TranslatorInterface + */ + private function getTranslatorMock() + { + return $this->getMock(TranslatorInterface::class); + } } From 721edc33c6b195a05b20e8bf4d78b67380173b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 10 Feb 2016 17:06:08 +0100 Subject: [PATCH 017/383] Add Orderable to subdef Controller --- lib/Alchemy/Phrasea/Controller/Admin/SubdefsController.php | 3 ++- lib/classes/databox/subdefsStructure.php | 4 +++- templates/web/admin/subdefs.html.twig | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Admin/SubdefsController.php b/lib/Alchemy/Phrasea/Controller/Admin/SubdefsController.php index 840feca115..98f5bb8773 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/SubdefsController.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/SubdefsController.php @@ -80,6 +80,7 @@ class SubdefsController extends Controller $class = $request->request->get($post_sub . '_class'); $downloadable = $request->request->get($post_sub . '_downloadable'); + $orderable = $request->request->get($post_sub . '_orderable'); $defaults = ['path', 'meta', 'mediatype']; @@ -107,7 +108,7 @@ class SubdefsController extends Controller $labels = $request->request->get($post_sub . '_label', []); - $subdefs->set_subdef($group, $name, $class, $downloadable, $options, $labels); + $subdefs->set_subdef($group, $name, $class, $downloadable, $options, $labels, $orderable); } } diff --git a/lib/classes/databox/subdefsStructure.php b/lib/classes/databox/subdefsStructure.php index 58b0556451..4df1bc247d 100644 --- a/lib/classes/databox/subdefsStructure.php +++ b/lib/classes/databox/subdefsStructure.php @@ -223,10 +223,11 @@ class databox_subdefsStructure implements IteratorAggregate, Countable * @param boolean $downloadable * @param array $options * @param array $labels + * @param bool $orderable * @return databox_subdefsStructure * @throws Exception */ - public function set_subdef($group, $name, $class, $downloadable, $options, $labels) + public function set_subdef($group, $name, $class, $downloadable, $options, $labels, $orderable = true) { $dom_struct = $this->databox->get_dom_structure(); @@ -234,6 +235,7 @@ class databox_subdefsStructure implements IteratorAggregate, Countable $subdef->setAttribute('class', $class); $subdef->setAttribute('name', mb_strtolower($name)); $subdef->setAttribute('downloadable', ($downloadable ? 'true' : 'false')); + $subdef->setAttribute('orderable', ($orderable ? 'true' : 'false')); foreach ($labels as $code => $label) { $child = $dom_struct->createElement('label'); diff --git a/templates/web/admin/subdefs.html.twig b/templates/web/admin/subdefs.html.twig index c7c63258bd..f677a54520 100644 --- a/templates/web/admin/subdefs.html.twig +++ b/templates/web/admin/subdefs.html.twig @@ -230,6 +230,11 @@ + + {{ 'subdef.orderable' | trans }} + + + {{ 'classe' | trans }} From 0815de0d21a8a6e72be38f8fab2d055fce5912ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 9 Feb 2016 18:36:33 +0100 Subject: [PATCH 018/383] Fixup some permission/cs issues in ansible files --- resources/ansible/roles/mariadb/tasks/main.yml | 0 resources/ansible/roles/nginx/handlers/main.yml | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) mode change 100755 => 100644 resources/ansible/roles/mariadb/tasks/main.yml diff --git a/resources/ansible/roles/mariadb/tasks/main.yml b/resources/ansible/roles/mariadb/tasks/main.yml old mode 100755 new mode 100644 diff --git a/resources/ansible/roles/nginx/handlers/main.yml b/resources/ansible/roles/nginx/handlers/main.yml index 1899c9cc09..53f6b3788b 100644 --- a/resources/ansible/roles/nginx/handlers/main.yml +++ b/resources/ansible/roles/nginx/handlers/main.yml @@ -1,3 +1,4 @@ --- - name: restart nginx - service: name=nginx enabled=yes state=restarted \ No newline at end of file + service: name=nginx enabled=yes state=restarted + From 30b141a4ec789fc80cfd3e551e6f34a3af7722b3 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Wed, 10 Feb 2016 19:26:01 +0100 Subject: [PATCH 019/383] PHRAS-941 - fix old jquery selector for selected and checked, fix jquery migrate url call --- resources/www/prod/js/jquery.Feedback.js | 4 ++-- resources/www/prod/js/jquery.main-prod.js | 8 ++++---- resources/www/report/js/report.js | 2 +- templates/web/common/index_bootstrap.html.twig | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/www/prod/js/jquery.Feedback.js b/resources/www/prod/js/jquery.Feedback.js index 5441035b8b..d4e550041a 100644 --- a/resources/www/prod/js/jquery.Feedback.js +++ b/resources/www/prod/js/jquery.Feedback.js @@ -164,8 +164,8 @@ $('input[name="name"]', $FeedBackForm).val($('input[name="name"]', $dialog.getDomElement()).val()); $('input[name="duration"]', $FeedBackForm).val($('select[name="duration"]', $dialog.getDomElement()).val()); $('textarea[name="message"]', $FeedBackForm).val($('textarea[name="message"]', $dialog.getDomElement()).val()); - $('input[name="recept"]', $FeedBackForm).attr('checked', $('input[name="recept"]', $dialog.getDomElement()).attr('checked')); - $('input[name="force_authentication"]', $FeedBackForm).attr('checked', $('input[name="force_authentication"]', $dialog.getDomElement()).attr('checked')); + $('input[name="recept"]', $FeedBackForm).prop('checked', $('input[name="recept"]', $dialog.getDomElement()).prop('checked')); + $('input[name="force_authentication"]', $FeedBackForm).prop('checked', $('input[name="force_authentication"]', $dialog.getDomElement()).prop('checked')); $FeedBackForm.trigger('submit'); }; diff --git a/resources/www/prod/js/jquery.main-prod.js b/resources/www/prod/js/jquery.main-prod.js index 31a458077d..7e76502ab7 100644 --- a/resources/www/prod/js/jquery.main-prod.js +++ b/resources/www/prod/js/jquery.main-prod.js @@ -162,9 +162,9 @@ function checkBases(bool) { var sbas_id = $(this).find('input[name=reference]:first').val(); if (bool) - $(this).find(':checkbox').attr('checked', 'checked'); + $(this).find(':checkbox').prop('checked', true); else - $(this).find(':checkbox').removeAttr('checked'); + $(this).find(':checkbox').prop('checked', false); }); checkFilters(true); @@ -402,8 +402,8 @@ function reset_adv_search() { $("option.default-selection", fieldsSort).prop("selected", true); $("option.default-selection", fieldsSortOrd).prop("selected", true); - $('#ADVSRCH_FIELDS_ZONE option').removeAttr("selected"); - $('#ADVSRCH_OPTIONS_ZONE input:checkbox.field_switch').removeAttr('checked'); + $('#ADVSRCH_FIELDS_ZONE option').prop("selected", false); + $('#ADVSRCH_OPTIONS_ZONE input:checkbox.field_switch').prop("checked", false); $("option:eq(0)", dateFilterSelect).prop("selected", true); $('#ADVSRCH_OPTIONS_ZONE .datepicker').val(''); diff --git a/resources/www/report/js/report.js b/resources/www/report/js/report.js index e574c0e581..21031b1f22 100644 --- a/resources/www/report/js/report.js +++ b/resources/www/report/js/report.js @@ -315,7 +315,7 @@ function showOption(domInput) { } function removeChecked(domInput) { - domInput.closest("form").find('input:radio:visible:checked').removeAttr("checked"); + domInput.closest("form").find('input:radio:visible:checked').prop("checked", false); } function tableLinkAction(domLink) { var cl = domLink.attr("id"); diff --git a/templates/web/common/index_bootstrap.html.twig b/templates/web/common/index_bootstrap.html.twig index 7b68ab72ec..44f135812c 100644 --- a/templates/web/common/index_bootstrap.html.twig +++ b/templates/web/common/index_bootstrap.html.twig @@ -19,7 +19,7 @@ - + + diff --git a/templates/web/prod/notifications.html.twig b/templates/web/prod/notifications.html.twig index 8773ab8023..313c6230df 100644 --- a/templates/web/prod/notifications.html.twig +++ b/templates/web/prod/notifications.html.twig @@ -6,7 +6,7 @@ {% else %} {% endif %} From 5f9d45ba9a52a6655dfa2e769fb201da4ce5d04f Mon Sep 17 00:00:00 2001 From: Florian Blouet Date: Wed, 3 Feb 2016 18:38:02 +0100 Subject: [PATCH 095/383] wip external production client --- resources/www/prod/js/jquery.main-prod.js | 459 ------------------ .../web/prod/actions/Tools/index.html.twig | 2 +- templates/web/prod/index.html.twig | 28 -- 3 files changed, 1 insertion(+), 488 deletions(-) diff --git a/resources/www/prod/js/jquery.main-prod.js b/resources/www/prod/js/jquery.main-prod.js index ea73d25ba7..b61ca2d0ea 100644 --- a/resources/www/prod/js/jquery.main-prod.js +++ b/resources/www/prod/js/jquery.main-prod.js @@ -1280,8 +1280,6 @@ $(document).ready(function () { // getLanguage(); - activeIcons(); - initAnswerForm(); initLook(); @@ -1752,463 +1750,6 @@ function toolREFACTOR(datas, activeTab) { ); } -function activeIcons() { - var $container = $('body'); - $container.on('click', '.TOOL_print_btn', function (e) { - e.preventDefault(); - var value = ""; - - if ($(this).hasClass('results_window')) { - if (p4.Results.Selection.length() > 0) - value = "lst=" + p4.Results.Selection.serialize(); - } - else { - if ($(this).hasClass('basket_window')) { - if (p4.WorkZone.Selection.length() > 0) - value = "lst=" + p4.WorkZone.Selection.serialize(); - else - value = "SSTTID=" + $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($(this).hasClass('basket_element')) { - value = "SSTTID=" + $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($(this).hasClass('story_window')) { - if (p4.WorkZone.Selection.length() > 0) { - value = "lst=" + p4.WorkZone.Selection.serialize(); - } - else { - value = "story=" + $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } - } - } - } - - if (value !== '') { - printThis(value); - } - else { - alert(language.nodocselected); - } - }); - $container.on('click', '.TOOL_bridge_btn', function (e) { - e.preventDefault(); - var $button = $(this); - var datas = {}; - var bridgeHref = $button.attr("href"); - - if ($button.hasClass('results_window')) { - if (p4.Results.Selection.length() > 0) - datas.lst = p4.Results.Selection.serialize(); - } - else { - if ($button.hasClass('basket_window')) { - bridgeHref = $button.attr("data-href"); - if (p4.WorkZone.Selection.length() > 0) - datas.lst = p4.WorkZone.Selection.serialize(); - else - datas.ssel = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($button.hasClass('basket_element')) { - datas.ssel = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($button.hasClass('story_window')) { - bridgeHref = $button.attr("data-href"); - if (p4.WorkZone.Selection.length() > 0) { - datas.lst = p4.WorkZone.Selection.serialize(); - } - else { - datas.story = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } - } - } - } - - if (datas.ssel || datas.lst || datas.story) { - init_publicator(bridgeHref, datas); - } - else { - alert(language.nodocselected); - } - }); - - $container.on('click', '.TOOL_trash_btn', function () { - - var type = ""; - var el = false; - - if ($(this).hasClass('results_window')) { - if (p4.Results.Selection.length() > 0) - type = 'IMGT'; - } - else { - if ($(this).hasClass('basket_window')) { - if (p4.WorkZone.Selection.length() > 0) - type = 'CHIM'; - else { - type = 'SSTT'; - el = $('.SSTT.active'); - } - } - else { - if ($(this).hasClass('story_window')) { - if (p4.WorkZone.Selection.length() > 0) { - type = 'CHIM'; - } - else { - type = 'STORY'; - el = $(this).find('input[name=story_key]'); - } - } - } - } - if (type !== '') { - checkDeleteThis(type, el); - } - else { - alert(language.nodocselected); - } - }); - $container.on('click', '.TOOL_ppen_btn', function () { - - var value = ""; - var type = ""; - - if ($(this).hasClass('results_window')) { - if (p4.Results.Selection.length() > 0) { - type = 'IMGT'; - value = p4.Results.Selection.serialize(); - } - } - else { - if ($(this).hasClass('basket_window')) { - if (p4.WorkZone.Selection.length() > 0) { - type = 'IMGT'; - value = p4.WorkZone.Selection.serialize(); - } - else { - type = 'SSTT'; - value = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } - else { - if ($(this).hasClass('basket_element')) { - type = 'SSTT'; - value = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($(this).hasClass('story_window')) { - if (p4.WorkZone.Selection.length() > 0) { - type = 'IMGT'; - value = p4.WorkZone.Selection.serialize(); - } - else { - type = 'STORY'; - value = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } - } - } - } - - if (value !== '') { - editThis(type, value); - } - else { - alert(language.nodocselected); - } - }); - $container.on('click', '.TOOL_publish_btn', function () { - var value = ""; - var type = ""; - - if ($(this).hasClass('results_window')) { - if (p4.Results.Selection.length() > 0) { - type = 'IMGT'; - value = p4.Results.Selection.serialize(); - } - } - else { - if ($(this).hasClass('basket_window')) { - if (p4.WorkZone.Selection.length() > 0) { - type = 'IMGT'; - value = p4.WorkZone.Selection.serialize(); - } - else { - type = 'SSTT'; - value = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } - else { - if ($(this).hasClass('basket_element')) { - type = 'SSTT'; - value = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($(this).hasClass('story_window')) { - if (p4.WorkZone.Selection.length() > 0) { - type = 'IMGT'; - value = p4.WorkZone.Selection.serialize(); - } - else { - type = 'STORY'; - value = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } - } - } - } - - if (value !== '') { - publicationModule.publishRecords(type, value); - } - else { - alert(language.nodocselected); - } - }); - - - $container.on('click', '.TOOL_chgcoll_btn', function () { - var value = {}; - - if ($(this).hasClass('results_window')) { - if (p4.Results.Selection.length() > 0) - value.lst = p4.Results.Selection.serialize(); - } - else { - if ($(this).hasClass('basket_window')) { - if (p4.WorkZone.Selection.length() > 0) - value.lst = p4.WorkZone.Selection.serialize(); - else - value.ssel = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($(this).hasClass('basket_element')) { - value.ssel = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($(this).hasClass('story_window')) { - if (p4.WorkZone.Selection.length() > 0) { - value.lst = p4.WorkZone.Selection.serialize(); - } - else { - value.story = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } - } - } - } - - /** - * if works, then the object is not empty - */ - for (i in value) { - return chgCollThis(value); - } - - alert(language.nodocselected); - }); - - $container.on('click', '.TOOL_chgstatus_btn', function () { - var params = {}; - var $this = $(this); - - if ($this.hasClass('results_window')) { - if (p4.Results.Selection.length() > 0) { - params.lst = p4.Results.Selection.serialize(); - } - } else { - if ($this.hasClass('basket_window')) { - if (p4.WorkZone.Selection.length() > 0) { - params.lst = p4.WorkZone.Selection.serialize(); - } else { - params.ssel = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } else { - if ($this.hasClass('basket_element')) { - params.ssel = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } else { - if ($this.hasClass('story_window')) { - if (p4.WorkZone.Selection.length() > 0) { - params.lst = p4.WorkZone.Selection.serialize(); - } else { - params.story = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } - } - } - } - - if (false === $.isEmptyObject(params)) { - var dialog = p4.Dialog.Create(); - dialog.load('../prod/records/property/', 'GET', params); - } else { - alert(language.nodocselected); - } - }); - - $container.on('click', '.TOOL_pushdoc_btn', function () { - var value = "", type = "", sstt_id = "", story = ""; - if ($(this).hasClass('results_window')) { - if (p4.Results.Selection.length() > 0) - value = p4.Results.Selection.serialize(); - } - else { - if ($(this).hasClass('basket_window')) { - if (p4.WorkZone.Selection.length() > 0) - value = p4.WorkZone.Selection.serialize(); - else - sstt_id = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($(this).hasClass('basket_element')) { - sstt_id = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($(this).hasClass('story_window')) { - if (p4.WorkZone.Selection.length() > 0) { - value = p4.WorkZone.Selection.serialize(); - } - else { - story = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } - } - } - } - if (value !== '' || sstt_id !== '' || story !== '') { - pushThis(sstt_id, value, story); - } - else { - alert(language.nodocselected); - } - }); - - $container.on('click', '.TOOL_feedback_btn', function () { - var value = "", type = "", sstt_id = "", story = ''; - if ($(this).hasClass('results_window')) { - if (p4.Results.Selection.length() > 0) - value = p4.Results.Selection.serialize(); - } - else { - if ($(this).hasClass('basket_window')) { - if (p4.WorkZone.Selection.length() > 0) - value = p4.WorkZone.Selection.serialize(); - else - sstt_id = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($(this).hasClass('basket_element')) { - sstt_id = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($(this).hasClass('story_window')) { - if (p4.WorkZone.Selection.length() > 0) { - value = p4.WorkZone.Selection.serialize(); - } - else { - story = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } - } - } - } - if (value !== '' || sstt_id !== '' || story !== '') { - feedbackThis(sstt_id, value, story); - } - else { - alert(language.nodocselected); - } - }); - - $container.on('click', '.TOOL_imgtools_btn', function () { - var datas = {}; - - if ($(this).hasClass('results_window')) { - if (p4.Results.Selection.length() > 0) - datas.lst = p4.Results.Selection.serialize(); - } - else { - if ($(this).hasClass('basket_window')) { - if (p4.WorkZone.Selection.length() > 0) - datas.lst = p4.WorkZone.Selection.serialize(); - else - datas.ssel = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($(this).hasClass('basket_element')) { - datas.ssel = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($(this).hasClass('story_window')) { - if (p4.WorkZone.Selection.length() > 0) { - datas.lst = p4.WorkZone.Selection.serialize(); - } - else { - datas.story = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } - } - } - } - - if (!$.isEmptyObject(datas)) { - toolREFACTOR(datas); - } - else { - alert(language.nodocselected); - } - }); - - $container.on('click', '.TOOL_disktt_btn', function () { - var datas = {}; - - if ($(this).hasClass('results_window')) { - if (p4.Results.Selection.length() > 0) { - datas.lst = p4.Results.Selection.serialize(); - } - } - else { - if ($(this).hasClass('basket_window')) { - if (p4.WorkZone.Selection.length() > 0) { - datas.lst = p4.WorkZone.Selection.serialize(); - } - else { - datas.ssel = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } - else { - if ($(this).hasClass('basket_element')) { - datas.ssel = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - else { - if ($(this).hasClass('story_window')) { - if (p4.WorkZone.Selection.length() > 0) { - datas.lst = p4.WorkZone.Selection.serialize(); - } - else { - datas.story = $('.SSTT.active').attr('id').split('_').slice(1, 2).pop(); - } - } - } - } - } - - for (var i in datas) { - return downloadThis(datas); - } - - alert(language.nodocselected); - }); - - -} - function checkDeleteThis(type, el) { el = $(el); switch (type) { diff --git a/templates/web/prod/actions/Tools/index.html.twig b/templates/web/prod/actions/Tools/index.html.twig index c7e9d3c836..b407df96f9 100644 --- a/templates/web/prod/actions/Tools/index.html.twig +++ b/templates/web/prod/actions/Tools/index.html.twig @@ -348,7 +348,7 @@ - + {##} -{% endif %} diff --git a/templates/web/prod/actions/delete_records_confirm.html.twig b/templates/web/prod/actions/delete_records_confirm.html.twig index b6c3c25870..8f3eef1392 100644 --- a/templates/web/prod/actions/delete_records_confirm.html.twig +++ b/templates/web/prod/actions/delete_records_confirm.html.twig @@ -102,4 +102,4 @@
    {{ "You do not have rights to remove selected documents" | trans }}
    -{% endif %} \ No newline at end of file +{% endif %} From 239c3c3930091f3bb43ba7eb18c2bc6c8b453189 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Tue, 23 Feb 2016 19:22:01 +0100 Subject: [PATCH 098/383] wip: js modularization and cleanup --- resources/gulp/build.js | 1 + resources/gulp/components/common.js | 1 + resources/gulp/components/prod.js | 17 +- resources/gulp/components/vendors/better.js | 9 + resources/www/common/js/components/user.js | 39 + resources/www/common/js/jquery.common.js | 32 - .../www/prod/js/components/publication.js | 6 +- .../search-result.js} | 0 resources/www/prod/js/components/search.js | 319 +++++++ resources/www/prod/js/components/utils.js | 65 ++ .../www/prod/js/components/workzone-basket.js | 102 +++ .../www/prod/js/components/workzone-facets.js | 162 ++++ .../workzone.js} | 2 +- .../js/{jquery.Alerts.js => core/alert.js} | 0 .../js/{jquery.lists.js => core/lists.js} | 0 .../selectable.js} | 0 resources/www/prod/js/jquery.form.2.49.js | 785 ------------------ resources/www/prod/js/jquery.main-prod.js | 685 ++------------- resources/www/prod/js/record.editor.js | 8 +- .../web/common/index_bootstrap.html.twig | 9 + templates/web/prod/WorkZone/Macros.html.twig | 2 +- templates/web/prod/index.html.twig | 50 +- templates/web/prod/thesaurus.js.twig | 6 +- 23 files changed, 811 insertions(+), 1489 deletions(-) create mode 100644 resources/gulp/components/vendors/better.js create mode 100644 resources/www/common/js/components/user.js rename resources/www/prod/js/{jquery.Results.js => components/search-result.js} (100%) create mode 100644 resources/www/prod/js/components/search.js create mode 100644 resources/www/prod/js/components/utils.js create mode 100644 resources/www/prod/js/components/workzone-basket.js create mode 100644 resources/www/prod/js/components/workzone-facets.js rename resources/www/prod/js/{jquery.WorkZone.js => components/workzone.js} (99%) rename resources/www/prod/js/{jquery.Alerts.js => core/alert.js} (100%) rename resources/www/prod/js/{jquery.lists.js => core/lists.js} (100%) rename resources/www/prod/js/{jquery.Selection.js => core/selectable.js} (100%) delete mode 100644 resources/www/prod/js/jquery.form.2.49.js diff --git a/resources/gulp/build.js b/resources/gulp/build.js index 88c691425f..81aa343877 100644 --- a/resources/gulp/build.js +++ b/resources/gulp/build.js @@ -27,6 +27,7 @@ gulp.task('build', ['build-vendors'], function(){ // standalone vendors used across application gulp.task('build-vendors', [ 'build-alchemy-embed', + 'build-betterjs', 'build-phraseanet-production-client', 'build-bootstrap', 'build-colorpicker', diff --git a/resources/gulp/components/common.js b/resources/gulp/components/common.js index 7c204b0208..52adf7f903 100644 --- a/resources/gulp/components/common.js +++ b/resources/gulp/components/common.js @@ -26,6 +26,7 @@ gulp.task('build-common-css', ['build-common-font-css'],function(){ gulp.task('build-common-js', function(){ var commonGroup = [ + config.paths.src + 'common/js/components/user.js', // config.paths.dist + 'assets/bootstrap/js/bootstrap.js', // should append no conflict config.paths.src + 'vendors/jquery-mousewheel/js/jquery.mousewheel.js', // jquery ui date picker langs diff --git a/resources/gulp/components/prod.js b/resources/gulp/components/prod.js index e0bbcf7ee0..cd5b7a0cec 100644 --- a/resources/gulp/components/prod.js +++ b/resources/gulp/components/prod.js @@ -73,17 +73,22 @@ gulp.task('build-prod-js', function(){ config.paths.vendors + 'jquery-file-upload/js/jquery.iframe-transport.js', config.paths.vendors + 'jquery-file-upload/js/jquery.fileupload.js', config.paths.vendors + 'geonames-server-jquery-plugin/jquery.geonames.js', + config.paths.src + 'prod/js/core/lists.js', + config.paths.src + 'prod/js/core/selectable.js', + config.paths.src + 'prod/js/core/alert.js', + + config.paths.src + 'prod/js/components/search.js', config.paths.src + 'prod/js/components/publication.js', - config.paths.src + 'prod/js/jquery.form.2.49.js', - config.paths.src + 'prod/js/jquery.Selection.js', + config.paths.src + 'prod/js/components/workzone.js', + config.paths.src + 'prod/js/components/workzone-basket.js', + config.paths.src + 'prod/js/components/workzone-facets.js', + config.paths.src + 'prod/js/components/utils.js', + // config.paths.src + 'prod/js/jquery.form.2.49.js', config.paths.src + 'prod/js/jquery.Edit.js', - config.paths.src + 'prod/js/jquery.lists.js', config.paths.src + 'prod/js/jquery.Prod.js', config.paths.src + 'prod/js/jquery.Feedback.js', - config.paths.src + 'prod/js/jquery.Results.js', + config.paths.src + 'prod/js/components/search-result.js', config.paths.src + 'prod/js/jquery.main-prod.js', - config.paths.src + 'prod/js/jquery.WorkZone.js', - config.paths.src + 'prod/js/jquery.Alerts.js', config.paths.src + 'prod/js/jquery.Upload.js', config.paths.src + 'prod/js/ThumbExtractor.js', config.paths.src + 'prod/js/publicator.js', diff --git a/resources/gulp/components/vendors/better.js b/resources/gulp/components/vendors/better.js new file mode 100644 index 0000000000..bdede994ec --- /dev/null +++ b/resources/gulp/components/vendors/better.js @@ -0,0 +1,9 @@ +var gulp = require('gulp'); +var config = require('../../config.js'); +var utils = require('../../utils.js'); + +gulp.task('build-betterjs', [], function(){ + return utils.buildJsGroup([ + config.paths.vendors + 'better.js/build/better.js' + ], 'better', 'vendors/better'); +}); \ No newline at end of file diff --git a/resources/www/common/js/components/user.js b/resources/www/common/js/components/user.js new file mode 100644 index 0000000000..bf8e7770b6 --- /dev/null +++ b/resources/www/common/js/components/user.js @@ -0,0 +1,39 @@ + +var userModule = (function(){ + function setPref(name, value) { + if (jQuery.data['pref_' + name] && jQuery.data['pref_' + name].abort) { + jQuery.data['pref_' + name].abort(); + jQuery.data['pref_' + name] = false; + } + + jQuery.data['pref_' + name] = $.ajax({ + type: "POST", + url: "/user/preferences/", + data: { + prop: name, + value: value + }, + dataType: 'json', + timeout: function () { + jQuery.data['pref_' + name] = false; + }, + error: function () { + jQuery.data['pref_' + name] = false; + }, + success: function (data) { + if (data.success) { + humane.info(data.message); + } + else { + humane.error(data.message); + } + jQuery.data['pref_' + name] = false; + return; + } + }); + } + + return {setPref: setPref} +})(); + + diff --git a/resources/www/common/js/jquery.common.js b/resources/www/common/js/jquery.common.js index d445728877..19edcba789 100644 --- a/resources/www/common/js/jquery.common.js +++ b/resources/www/common/js/jquery.common.js @@ -40,38 +40,6 @@ $(document).ready(function () { }); -function setPref(name, value) { - if (jQuery.data['pref_' + name] && jQuery.data['pref_' + name].abort) { - jQuery.data['pref_' + name].abort(); - jQuery.data['pref_' + name] = false; - } - - jQuery.data['pref_' + name] = $.ajax({ - type: "POST", - url: "/user/preferences/", - data: { - prop: name, - value: value - }, - dataType: 'json', - timeout: function () { - jQuery.data['pref_' + name] = false; - }, - error: function () { - jQuery.data['pref_' + name] = false; - }, - success: function (data) { - if (data.success) { - humane.info(data.message); - } - else { - humane.error(data.message); - } - jQuery.data['pref_' + name] = false; - return; - } - }); -} function infoDialog(el) { diff --git a/resources/www/prod/js/components/publication.js b/resources/www/prod/js/components/publication.js index 6b25788277..9ba8b754bd 100644 --- a/resources/www/prod/js/components/publication.js +++ b/resources/www/prod/js/components/publication.js @@ -48,7 +48,7 @@ var publicationModule = (function () { }); } } - afterSearch(); + searchModule.afterSearch(); }); }); @@ -178,7 +178,7 @@ var publicationModule = (function () { if (ajaxState.isRunning && ajaxState.query.abort) answAjax.abort(); if (page === 0) - clearAnswers(); + searchModule.clearAnswers(); ajaxState.isRunning = true; $answers.addClass('loading'); }, @@ -307,7 +307,7 @@ var publicationModule = (function () { container: $answers }); - afterSearch(); + searchModule.afterSearch(); if (page > 0) { $answers.stop().animate({ scrollTop: $answers.scrollTop() + $answers.height() diff --git a/resources/www/prod/js/jquery.Results.js b/resources/www/prod/js/components/search-result.js similarity index 100% rename from resources/www/prod/js/jquery.Results.js rename to resources/www/prod/js/components/search-result.js diff --git a/resources/www/prod/js/components/search.js b/resources/www/prod/js/components/search.js new file mode 100644 index 0000000000..1ecb81d8d5 --- /dev/null +++ b/resources/www/prod/js/components/search.js @@ -0,0 +1,319 @@ +var p4 = p4 || {}; + +var searchModule = (function (p4) { + function toggleCollection(deployer, todeploy_selector) + { + if($(deployer).hasClass("deployer_opened")) { + $(deployer).removeClass("deployer_opened").addClass("deployer_closed"); + $(todeploy_selector).hide(); + } + else { + $(deployer).removeClass("deployer_closed").addClass("deployer_opened"); + $(todeploy_selector).show(); + } + } + + function selectDatabase(el, sbas_id) { + console.log('ok select') + var bool = $(el).prop('checked'); + $.each($('.sbascont_' + sbas_id + ' :checkbox'), function () { + this.checked = bool; + }); + + checkFilters(true); + } + + function clearAnswers() { + $('#formAnswerPage').val(''); + $('#searchForm input[name="nba"]').val(''); + $('#answers, #dyn_tool').empty(); + } + + function newSearch(query) { + p4.Results.Selection.empty(); + + searchModule.clearAnswers(); + $('#SENT_query').val(query); + var histo = $('#history-queries ul'); + + histo.prepend('
  • ' + query + '
  • '); + + var lis = $('li', histo); + if (lis.length > 25) { + $('li:last', histo).remove(); + } + + $('#idFrameC li.proposals_WZ').removeClass('active'); + + $('#searchForm').submit(); + return false; + } + + function beforeSearch() { + if (answAjaxrunning) + return; + answAjaxrunning = true; + + searchModule.clearAnswers(); + $('#tooltip').css({ + 'display': 'none' + }); + $('#answers').addClass('loading').empty(); + $('#answercontextwrap').remove(); + } + + function afterSearch() { + if ($('#answercontextwrap').length === 0) + $('body').append('
    '); + + $.each($('#answers .contextMenuTrigger'), function () { + + var id = $(this).closest('.IMGT').attr('id').split('_').slice(1, 3).join('_'); + + $(this).contextMenu('#IMGT_' + id + ' .answercontextmenu', { + appendTo: '#answercontextwrap', + openEvt: 'click', + dropDown: true, + theme: 'vista', + showTransition: 'slideDown', + hideTransition: 'hide', + shadow: false + }); + }); + + answAjaxrunning = false; + $('#answers').removeClass('loading'); + $('.captionTips, .captionRolloverTips').tooltip({ + delay: 0, + isBrowsable: false, + extraClass: 'caption-tooltip-container' + }); + $('.infoTips').tooltip({ + delay: 0 + }); + $('.previewTips').tooltip({ + fixable: true + }); + $('.thumb .rollovable').hover( + function () { + $('.rollover-gif-hover', this).show(); + $('.rollover-gif-out', this).hide(); + }, + function () { + $('.rollover-gif-hover', this).hide(); + $('.rollover-gif-out', this).show(); + } + ); + viewNbSelect(); + $('#answers div.IMGT').draggable({ + helper: function () { + $('body').append('
    ' + p4.Results.Selection.length() + '
    '); + return $('#dragDropCursor'); + }, + scope: "objects", + distance: 20, + scroll: false, + cursorAt: { + top: -10, + left: -20 + }, + start: function (event, ui) { + if (!$(this).hasClass('selected')) + return false; + } + }); + linearize(); + } + + function checkFilters(save) { + var danger = false; + var search = { + bases: {}, + fields: [], + dates: {}, + status: [], + elasticSort: {} + + }; + + var adv_box = $('form.phrasea_query .adv_options'); + var container = $("#ADVSRCH_OPTIONS_ZONE"); + var fieldsSort = $('#ADVSRCH_SORT_ZONE select[name=sort]', container); + var fieldsSortOrd = $('#ADVSRCH_SORT_ZONE select[name=ord]', container); + var fieldsSelect = $('#ADVSRCH_FIELDS_ZONE select', container); + var dateFilterSelect = $('#ADVSRCH_DATE_ZONE select', container); + var scroll = fieldsSelect.scrollTop(); + + // hide all the fields in the "sort by" select, so only the relevant ones will be shown again + $("option.dbx", fieldsSort).hide().prop("disabled", true); // dbx is for "field of databases" + + // hide all the fields in the "fields" select, so only the relevant ones will be shown again + $("option.dbx", fieldsSelect).hide().prop("disabled", true); // option[0] is "all fields" + + // hide all the fields in the "date field" select, so only the relevant ones will be shown again + $("option.dbx", dateFilterSelect).hide().prop("disabled", true); // dbx = all "field" entries in the select = all except the firstt + + var nbTotalSelectedColls = 0; + $.each($('.sbascont', adv_box), function () { + var $this = $(this); + + var sbas_id = $this.parent().find('input[name="reference"]').val(); + search.bases[sbas_id] = []; + + var nbCols = 0; + var nbSelectedColls = 0; + $this.find('.checkbas').each(function (idx, el) { + nbCols++; + if($(this).prop('checked')) { + nbSelectedColls++; + nbTotalSelectedColls++; + search.bases[sbas_id].push($(this).val()); + } + }); + + // display the number of selected colls for the databox + $('.infos_sbas_' + sbas_id).empty().append(nbSelectedColls + '/' + nbCols); + + // if one coll is not checked, show danger + if(nbSelectedColls != nbCols) { + $("#ADVSRCH_SBAS_LABEL_" + sbas_id).addClass("danger"); + danger = true; + } + else { + $("#ADVSRCH_SBAS_LABEL_" + sbas_id).removeClass("danger"); + } + + if(nbSelectedColls == 0) { + // no collections checked for this databox + // hide the status bits + $("#ADVSRCH_SB_ZONE_"+sbas_id, container).hide(); + // uncheck + $("#ADVSRCH_SB_ZONE_"+sbas_id+" input:checkbox", container).prop("checked", false); + } + else { + // at least one coll checked for this databox + // show again the relevant fields in "sort by" select + $(".db_"+sbas_id, fieldsSort).show().prop("disabled", false); + // show again the relevant fields in "from fields" select + $(".db_"+sbas_id, fieldsSelect).show().prop("disabled", false); + // show the sb + $("#ADVSRCH_SB_ZONE_"+sbas_id, container).show(); + // show again the relevant fields in "date field" select + $(".db_"+sbas_id, dateFilterSelect).show().prop("disabled", false); + } + }); + + if (nbTotalSelectedColls == 0) { + // no collections checked at all + // hide irrelevant filters + $("#ADVSRCH_OPTIONS_ZONE").hide(); + } + else { + // at least one collection checked + // show relevant filters + $("#ADVSRCH_OPTIONS_ZONE").show(); + } + + // --------- sort -------- + + // if no field is selected for sort, select the default option + if($("option:selected:enabled", fieldsSort).length == 0) { + $("option.default-selection", fieldsSort).prop("selected", true); + $("option.default-selection", fieldsSortOrd).prop("selected", true); + } + + search.elasticSort.by = $("option:selected:enabled", fieldsSort).val(); + search.elasticSort.order = $("option:selected:enabled", fieldsSortOrd).val(); + + //--------- from fields filter --------- + + // unselect the unavailable fields (or all fields if "all" is selected) + var optAllSelected = false; + $("option", fieldsSelect).each( + function(idx, opt) { + if(idx == 0) { + // nb: unselect the "all" field, so it acts as a button + optAllSelected = $(opt).is(":selected"); + } + if(idx == 0 || optAllSelected || $(opt).is(":disabled") || !$(opt).is(":visible") ) { + $(opt).prop("selected", false); + } + } + ); + + // here only the relevant fields are selected + search.fields = fieldsSelect.val(); + if(search.fields == null || search.fields.length == 0) { + $('#ADVSRCH_FIELDS_ZONE', container).removeClass('danger'); + search.fields = []; + } + else { + $('#ADVSRCH_FIELDS_ZONE', container).addClass('danger'); + danger = true; + } + + //--------- status bits filter --------- + + // here only the relevant sb are checked + for(sbas_id in search.bases) { + var nchecked = 0; + $("#ADVSRCH_SB_ZONE_"+sbas_id+" :checkbox[checked]", container).each(function () { + var n = $(this).attr('n'); + search.status[n] = $(this).val().split('_'); + nchecked++; + }); + if(nchecked == 0) { + $("#ADVSRCH_SB_ZONE_"+sbas_id, container).removeClass('danger'); + } + else { + $("#ADVSRCH_SB_ZONE_"+sbas_id, container).addClass('danger'); + danger = true; + } + } + + //--------- dates filter --------- + + // if no date field is selected for filter, select the first option + $('#ADVSRCH_DATE_ZONE', adv_box).removeClass('danger'); + if($("option.dbx:selected:enabled", dateFilterSelect).length == 0) { + $("option:eq(0)", dateFilterSelect).prop("selected", true); + $("#ADVSRCH_DATE_SELECTORS", container).hide(); + } + else { + $("#ADVSRCH_DATE_SELECTORS", container).show(); + search.dates.minbound = $('#ADVSRCH_DATE_ZONE input[name=date_min]', adv_box).val(); + search.dates.maxbound = $('#ADVSRCH_DATE_ZONE input[name=date_max]', adv_box).val(); + search.dates.field = $('#ADVSRCH_DATE_ZONE select[name=date_field]', adv_box).val(); + console.log(search.dates.minbound, search.dates.maxbound, search.dates.field) + if ($.trim(search.dates.minbound) || $.trim(search.dates.maxbound)) { + danger = true; + $('#ADVSRCH_DATE_ZONE', adv_box).addClass('danger'); + } + } + + fieldsSelect.scrollTop(scroll); + + // if one filter shows danger, show it on the query + if (danger) { + $('#EDIT_query').addClass('danger'); + } + else { + $('#EDIT_query').removeClass('danger'); + } + + if (save === true) { + userModule.setPref('search', JSON.stringify(search)); + } + } + + + return { + checkFilters: checkFilters, + toggleCollection: toggleCollection, + selectDatabase: selectDatabase, + beforeSearch: beforeSearch, + afterSearch: afterSearch, + clearAnswers: clearAnswers, + newSearch: newSearch + }; +}(p4)); diff --git a/resources/www/prod/js/components/utils.js b/resources/www/prod/js/components/utils.js new file mode 100644 index 0000000000..63b7fd7a69 --- /dev/null +++ b/resources/www/prod/js/components/utils.js @@ -0,0 +1,65 @@ +var p4 = p4 || {}; + +var utilsModule = (function (p4) { + + + function RGBtoHex(R, G, B) { + return toHex(R) + toHex(G) + toHex(B); + } + function toHex(N) { + if (N === null) return "00"; + N = parseInt(N); + if (N === 0 || isNaN(N)) return "00"; + N = Math.max(0, N); + N = Math.min(N, 255); + N = Math.round(N); + return "0123456789ABCDEF".charAt((N - N % 16) / 16) + + "0123456789ABCDEF".charAt(N % 16); + } + function hsl2rgb(h, s, l) { + var m1, m2, hue; + var r, g, b; + s /= 100; + l /= 100; + if (s === 0) + r = g = b = (l * 255); + else { + if (l <= 0.5) + m2 = l * (s + 1); + else + m2 = l + s - l * s; + m1 = l * 2 - m2; + hue = h / 360; + r = HueToRgb(m1, m2, hue + 1 / 3); + g = HueToRgb(m1, m2, hue); + b = HueToRgb(m1, m2, hue - 1 / 3); + } + return { + r: r, + g: g, + b: b + }; + } + + function HueToRgb(m1, m2, hue) { + var v; + if (hue < 0) + hue += 1; + else if (hue > 1) + hue -= 1; + + if (6 * hue < 1) + v = m1 + (m2 - m1) * hue * 6; + else if (2 * hue < 1) + v = m2; + else if (3 * hue < 2) + v = m1 + (m2 - m1) * (2 / 3 - hue) * 6; + else + v = m1; + + return 255 * v; + } + return { + RGBtoHex: RGBtoHex, hsl2rgb: hsl2rgb + }; +}(p4)); diff --git a/resources/www/prod/js/components/workzone-basket.js b/resources/www/prod/js/components/workzone-basket.js new file mode 100644 index 0000000000..b92a6686f3 --- /dev/null +++ b/resources/www/prod/js/components/workzone-basket.js @@ -0,0 +1,102 @@ +var p4 = p4 || {}; + +var workzoneBasketModule = (function (p4) { + + function archiveBasket(basket_id) { + $.ajax({ + type: "POST", + url: "../prod/baskets/" + basket_id + "/archive/?archive=1", + dataType: 'json', + beforeSend: function () { + + }, + success: function (data) { + if (data.success) { + var basket = $('#SSTT_' + basket_id); + var next = basket.next(); + + if (next.data("ui-droppable")) { + next.droppable('destroy'); + } + + next.slideUp().remove(); + + if (basket.data("ui-droppable")) { + basket.droppable('destroy'); + } + + basket.slideUp().remove(); + + if ($('#baskets .SSTT').length === 0) { + return p4.WorkZone.refresh(false); + } + } + else { + alert(data.message); + } + return; + } + }); + } + + function deleteBasket(item) { + if ($("#DIALOG").data("ui-dialog")) { + $("#DIALOG").dialog('destroy'); + } + + var k = $(item).attr('id').split('_').slice(1, 2).pop(); // id de chutier + $.ajax({ + type: "POST", + url: "../prod/baskets/" + k + '/delete/', + dataType: 'json', + beforeSend: function () { + + }, + success: function (data) { + if (data.success) { + var basket = $('#SSTT_' + k); + var next = basket.next(); + + if (next.data("ui-droppable")) { + next.droppable('destroy'); + } + + next.slideUp().remove(); + + if (basket.data("ui-droppable")) { + basket.droppable('destroy'); + } + + basket.slideUp().remove(); + + if ($('#baskets .SSTT').length === 0) { + return p4.WorkZone.refresh(false); + } + } + else { + alert(data.message); + } + return; + } + }); + } + + function openBasketPreferences() { + $('#basket_preferences').dialog({ + closeOnEscape: true, + resizable: false, + width: 450, + height: 500, + modal: true, + draggable: false, + overlay: { + backgroundColor: '#000', + opacity: 0.7 + } + }).dialog('open'); + } + + + + return {archiveBasket: archiveBasket, deleteBasket: deleteBasket, openBasketPreferences: openBasketPreferences} +})(p4); \ No newline at end of file diff --git a/resources/www/prod/js/components/workzone-facets.js b/resources/www/prod/js/components/workzone-facets.js new file mode 100644 index 0000000000..177092a2e7 --- /dev/null +++ b/resources/www/prod/js/components/workzone-facets.js @@ -0,0 +1,162 @@ +var p4 = p4 || {}; + +var workzoneFacetsModule = (function (p4) { + var selectedFacetValues = []; + var getSelectedFacets = function() { + return selectedFacetValues; + } + var resetSelectedFacets = function() { + selectedFacetValues = []; + return selectedFacetValues; + }; + var loadFacets = function(facets) { + // Convert facets data to fancytree source format + var treeSource = _.map(facets, function(facet) { + // Values + var values = _.map(facet.values, function(value) { + return { + title: value.value + ' (' + value.count + ')', + query: value.query, + label: value.value, + tooltip: value.value + ' (' + value.count + ')' + } + }); + // Facet + return { + name: facet.name, + title: facet.label, + folder: true, + children: values, + expanded: _.isUndefined(selectedFacetValues[facet.name]) + }; + }); + + treeSource.sort(_sortFacets('title', true, function(a){return a.toUpperCase()})); + + treeSource = _sortByPredefinedFacets(treeSource, 'name', ['Base_Name', 'Collection_Name', 'Type_Name']); + + return _getFacetsTree().reload(treeSource); + }; + + // from stackoverflow + // http://stackoverflow.com/questions/979256/sorting-an-array-of-javascript-objects/979325#979325 + function _sortFacets(field, reverse, primer) { + var key = function (x) {return primer ? primer(x[field]) : x[field]}; + + return function (a,b) { + var A = key(a), B = key(b); + return ( (A < B) ? -1 : ((A > B) ? 1 : 0) ) * [-1,1][+!!reverse]; + } + } + + function _sortByPredefinedFacets(source, field, predefinedFieldOrder) { + var filteredSource = source, + ordered = []; + + _.forEach(predefinedFieldOrder, function (fieldValue, index) { + _.forEach(source, function (facet, facetIndex) { + if (facet[field] !== undefined) { + if (facet[field] === fieldValue) { + ordered.push(facet); + // remove from filtered + filteredSource.splice(facetIndex, 1); + } + } + }); + }); + + var olen = filteredSource.length; + // fill predefined facets with non predefined facets + for (var i = 0; i < olen; i++) { + ordered.push(filteredSource[i]); + } + return ordered; + } + + function _getFacetsTree() { + var $facetsTree = $('#proposals'); + if (!$facetsTree.data('ui-fancytree')) { + $facetsTree.fancytree({ + clickFolderMode: 3, // activate and expand + icons:false, + source: [], + activate: function(event, data){ + var query = data.node.data.query; + if (query) { + var facet = data.node.parent; + selectedFacetValues[facet.title] = data.node.data; + _facetCombinedSearch(); + } + }, + renderNode: function(event, data){ + var facetFilter = ""; + if(data.node.folder && !_.isUndefined(selectedFacetValues[data.node.title])) { + facetFilter = selectedFacetValues[data.node.title].label; + + var s_label = document.createElement("SPAN"); + s_label.setAttribute("class", "facetFilter-label"); + s_label.setAttribute("title", facetFilter); + + var length = 15; + var facetFilterString = facetFilter; + if( facetFilterString.length > length) { + facetFilterString = facetFilterString.substring(0,length) + '…'; + } + s_label.appendChild(document.createTextNode(facetFilterString)); + + var s_closer = document.createElement("A"); + s_closer.setAttribute("class", "facetFilter-closer"); + + var s_gradient = document.createElement("SPAN"); + s_gradient.setAttribute("class", "facetFilter-gradient"); + s_gradient.appendChild(document.createTextNode("\u00A0")); + + s_label.appendChild(s_gradient); + + var s_facet = document.createElement("SPAN"); + s_facet.setAttribute("class", "facetFilter"); + s_facet.appendChild(s_label); + s_closer = $(s_facet.appendChild(s_closer)); + s_closer.data("facetTitle", data.node.title); + + s_closer.click( + function(event) { + event.stopPropagation(); + var facetTitle = $(this).data("facetTitle"); + delete selectedFacetValues[facetTitle]; + _facetCombinedSearch(); + return false; + } + ); + + $(".fancytree-folder", data.node.li).append( + $(s_facet) + ); + } + } + }); + + } + return $facetsTree.fancytree('getTree'); + } + + function _facetCombinedSearch() { + var q = $("#EDIT_query").val(); + var q_facet = ""; + _.each(_.values(selectedFacetValues), function(facetValue) { + q_facet += (q_facet ? " AND " : "") + '(' + facetValue.query + ')'; + }); + if(q_facet) { + if(q) { + q = '(' + q + ') AND ' + } + q += q_facet; + } + + searchModule.checkFilters(); + searchModule.newSearch(q); + } + + return { loadFacets: loadFacets, getSelectedFacets: getSelectedFacets, resetSelectedFacets: resetSelectedFacets} + +})(p4); \ No newline at end of file diff --git a/resources/www/prod/js/jquery.WorkZone.js b/resources/www/prod/js/components/workzone.js similarity index 99% rename from resources/www/prod/js/jquery.WorkZone.js rename to resources/www/prod/js/components/workzone.js index 3f90ffe930..f4b353366b 100644 --- a/resources/www/prod/js/jquery.WorkZone.js +++ b/resources/www/prod/js/components/workzone.js @@ -1,6 +1,6 @@ var p4 = p4 || {}; -(function (p4) { +var workzoneModule = (function (p4) { function refreshBaskets(baskId, sort, scrolltobottom, type) { type = typeof type === 'undefined' ? 'basket' : type; diff --git a/resources/www/prod/js/jquery.Alerts.js b/resources/www/prod/js/core/alert.js similarity index 100% rename from resources/www/prod/js/jquery.Alerts.js rename to resources/www/prod/js/core/alert.js diff --git a/resources/www/prod/js/jquery.lists.js b/resources/www/prod/js/core/lists.js similarity index 100% rename from resources/www/prod/js/jquery.lists.js rename to resources/www/prod/js/core/lists.js diff --git a/resources/www/prod/js/jquery.Selection.js b/resources/www/prod/js/core/selectable.js similarity index 100% rename from resources/www/prod/js/jquery.Selection.js rename to resources/www/prod/js/core/selectable.js diff --git a/resources/www/prod/js/jquery.form.2.49.js b/resources/www/prod/js/jquery.form.2.49.js deleted file mode 100644 index 60e6cf0262..0000000000 --- a/resources/www/prod/js/jquery.form.2.49.js +++ /dev/null @@ -1,785 +0,0 @@ -/*! - * jQuery Form Plugin - * version: 2.49 (18-OCT-2010) - * @requires jQuery v1.3.2 or later - * - * Examples and documentation at: http://malsup.com/jquery/form/ - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ -;(function($) { - -/* - Usage Note: - ----------- - Do not use both ajaxSubmit and ajaxForm on the same form. These - functions are intended to be exclusive. Use ajaxSubmit if you want - to bind your own submit handler to the form. For example, - - $(document).ready(function() { - $('#myForm').bind('submit', function(e) { - e.preventDefault(); // <-- important - $(this).ajaxSubmit({ - target: '#output' - }); - }); - }); - - Use ajaxForm when you want the plugin to manage all the event binding - for you. For example, - - $(document).ready(function() { - $('#myForm').ajaxForm({ - target: '#output' - }); - }); - - When using ajaxForm, the ajaxSubmit function will be invoked for you - at the appropriate time. -*/ - -/** - * ajaxSubmit() provides a mechanism for immediately submitting - * an HTML form using AJAX. - */ -$.fn.ajaxSubmit = function(options) { - // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) - if (!this.length) { - log('ajaxSubmit: skipping submit process - no element selected'); - return this; - } - - if (typeof options == 'function') { - options = { success: options }; - } - - var url = $.trim(this.attr('action')); - if (url) { - // clean url (don't include hash vaue) - url = (url.match(/^([^#]+)/)||[])[1]; - } - url = url || window.location.href || ''; - - options = $.extend(true, { - url: url, - type: this.attr('method') || 'GET', - iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' - }, options); - - // hook for manipulating the form data before it is extracted; - // convenient for use with rich editors like tinyMCE or FCKEditor - var veto = {}; - this.trigger('form-pre-serialize', [this, options, veto]); - if (veto.veto) { - log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); - return this; - } - - // provide opportunity to alter form data before it is serialized - if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { - log('ajaxSubmit: submit aborted via beforeSerialize callback'); - return this; - } - - var n,v,a = this.formToArray(options.semantic); - if (options.data) { - options.extraData = options.data; - for (n in options.data) { - if(options.data[n] instanceof Array) { - for (var k in options.data[n]) { - a.push( { name: n, value: options.data[n][k] } ); - } - } - else { - v = options.data[n]; - v = $.isFunction(v) ? v() : v; // if value is fn, invoke it - a.push( { name: n, value: v } ); - } - } - } - - // give pre-submit callback an opportunity to abort the submit - if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { - log('ajaxSubmit: submit aborted via beforeSubmit callback'); - return this; - } - - // fire vetoable 'validate' event - this.trigger('form-submit-validate', [a, this, options, veto]); - if (veto.veto) { - log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); - return this; - } - - var q = $.param(a); - - if (options.type.toUpperCase() == 'GET') { - options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; - options.data = null; // data is null for 'get' - } - else { - options.data = q; // data is the query string for 'post' - } - - var $form = this, callbacks = []; - if (options.resetForm) { - callbacks.push(function() { $form.resetForm(); }); - } - if (options.clearForm) { - callbacks.push(function() { $form.clearForm(); }); - } - - // perform a load on the target only if dataType is not provided - if (!options.dataType && options.target) { - var oldSuccess = options.success || function(){}; - callbacks.push(function(data) { - var fn = options.replaceTarget ? 'replaceWith' : 'html'; - $(options.target)[fn](data).each(oldSuccess, arguments); - }); - } - else if (options.success) { - callbacks.push(options.success); - } - - options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg - var context = options.context || options; // jQuery 1.4+ supports scope context - for (var i=0, max=callbacks.length; i < max; i++) { - callbacks[i].apply(context, [data, status, xhr || $form, $form]); - } - }; - - // are there files to upload? - var fileInputs = $('input:file', this).length > 0; - var mp = 'multipart/form-data'; - var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp); - - // options.iframe allows user to force iframe mode - // 06-NOV-09: now defaulting to iframe mode if file input is detected - if (options.iframe !== false && (fileInputs || options.iframe || multipart)) { - // hack to fix Safari hang (thanks to Tim Molendijk for this) - // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d - if (options.closeKeepAlive) { - $.get(options.closeKeepAlive, fileUpload); - } - else { - fileUpload(); - } - } - else { - $.ajax(options); - } - - // fire 'notify' event - this.trigger('form-submit-notify', [this, options]); - return this; - - - // private function for handling file uploads (hat tip to YAHOO!) - function fileUpload() { - var form = $form[0]; - - if ($(':input[name=submit],:input[id=submit]', form).length) { - // if there is an input with a name or id of 'submit' then we won't be - // able to invoke the submit fn on the form (at least not x-browser) - alert('Error: Form elements must not have name or id of "submit".'); - return; - } - - var s = $.extend(true, {}, $.ajaxSettings, options); - s.context = s.context || s; - var id = 'jqFormIO' + (new Date().getTime()), fn = '_'+id; - window[fn] = function() { - var f = $io.data('form-plugin-onload'); - if (f) { - f(); - window[fn] = undefined; - try { delete window[fn]; } catch(e){} - } - } - var $io = $(''); - - $('body').append(''); - - $('#basket_menu_trigger').contextMenu('#basket_menu', { - openEvt: 'click', - dropDown: true, - theme: 'vista', - showTransition: 'slideDown', - hideTransition: 'hide', - shadow: false - }); - - $('#basket_menu_trigger').trigger("click"); - $('#basket_menu_trigger').trigger("click"); - - $('.datepicker').datepicker({ - changeYear: true, - changeMonth: true, - dateFormat: 'yy/mm/dd' - }); - - /*$.ajaxSetup({ - - error: function (jqXHR, textStatus, errorThrown) { - //Request is aborted - if (errorThrown === 'abort') { - return false; - } else { - showModal('error', { - title: language.errorAjaxRequest + ' ' + jqXHR.responseText - }); - } - }, - timeout: function () { - showModal('timeout', { - title: 'Server not responding' - }); - } - });*/ - - $('.tools .answer_selector').bind('click',function () { - selector($(this)); - }).bind('mouseover',function (event) { - if (is_ctrl_key(event)) { - $(this).addClass('add_selector'); - } - else { - $(this).removeClass('add_selector'); - } - }).bind('mouseout', function () { - $(this).removeClass('add_selector'); - }); - - // getLanguage(); - - initAnswerForm(); - - preferencesModule.initLook(); - - // setTimeout("pollNotifications();", 10000); - - $(this).bind('keydown', function (event) { - var cancelKey = false; - var shortCut = false; - - if ($('#MODALDL').is(':visible')) { - switch (event.keyCode) { - case 27: - hideDwnl(); - break; - } - } - else { - if ($('#EDITWINDOW').is(':visible')) { - - switch (event.keyCode) { - case 9: // tab ou shift-tab - recordEditorModule.edit_chgFld(event, is_shift_key(event) ? -1 : 1); - cancelKey = shortCut = true; - break; - case 27: - recordEditorModule.edit_cancelMultiDesc(event); - shortCut = true; - break; - - case 33: // pg up - if (!p4.edit.textareaIsDirty || recordEditorModule.edit_validField(event, "ask_ok")) - recordEditorModule.skipImage(event, 1); - cancelKey = true; - break; - case 34: // pg dn - if (!p4.edit.textareaIsDirty || recordEditorModule.edit_validField(event, "ask_ok")) - recordEditorModule.skipImage(event, -1); - cancelKey = true; - break; - } - - } - else { - if (p4.preview.open) { - if (($('#dialog_dwnl:visible').length === 0 && $('#DIALOG1').length === 0 && $('#DIALOG2').length === 0)) { - switch (event.keyCode) { - case 39: - getNext(); - cancelKey = shortCut = true; - break; - case 37: - getPrevious(); - cancelKey = shortCut = true; - break; - case 27://escape - closePreview(); - break; - case 32: - if (p4.slideShow) - stopSlide(); - else - startSlide(); - cancelKey = shortCut = true; - break; - } - } - } - else { - if ($('#EDIT_query').hasClass('focused')) - return true; - - if ($('.overlay').is(':visible')) - return true; - - if ($('.ui-widget-overlay').is(':visible')) - return true; - - switch (p4.active_zone) { - case 'rightFrame': - switch (event.keyCode) { - case 65: // a - if (is_ctrl_key(event)) { - $('.tools .answer_selector.all_selector').trigger('click'); - cancelKey = shortCut = true; - } - break; - case 80://P - if (is_ctrl_key(event)) { - printThis("lst=" + p4.Results.Selection.serialize()); - cancelKey = shortCut = true; - } - break; - case 69://e - if (is_ctrl_key(event)) { - editThis('IMGT', p4.Results.Selection.serialize()); - cancelKey = shortCut = true; - } - break; - case 40: // down arrow - $('#answers').scrollTop($('#answers').scrollTop() + 30); - cancelKey = shortCut = true; - break; - case 38: // down arrow - $('#answers').scrollTop($('#answers').scrollTop() - 30); - cancelKey = shortCut = true; - break; - case 37://previous page - $('#PREV_PAGE').trigger('click'); - shortCut = true; - break; - case 39://previous page - $('#NEXT_PAGE').trigger('click'); - shortCut = true; - break; - case 9://tab - if (!is_ctrl_key(event) && !$('.ui-widget-overlay').is(':visible') && !$('.overlay_box').is(':visible')) { - document.getElementById('EDIT_query').focus(); - cancelKey = shortCut = true; - } - break; - } - break; - - - case 'idFrameC': - switch (event.keyCode) { - case 65: // a - if (is_ctrl_key(event)) { - p4.WorkZone.Selection.selectAll(); - cancelKey = shortCut = true; - } - break; - case 80://P - if (is_ctrl_key(event)) { - printThis("lst=" + p4.WorkZone.Selection.serialize()); - cancelKey = shortCut = true; - } - break; - case 69://e - if (is_ctrl_key(event)) { - editThis('IMGT', p4.WorkZone.Selection.serialize()); - cancelKey = shortCut = true; - } - break; - // case 46://del - // deleteThis(p4.Results.Selection.serialize()); - // cancelKey = true; - // break; - case 40: // down arrow - $('#baskets div.bloc').scrollTop($('#baskets div.bloc').scrollTop() + 30); - cancelKey = shortCut = true; - break; - case 38: // down arrow - $('#baskets div.bloc').scrollTop($('#baskets div.bloc').scrollTop() - 30); - cancelKey = shortCut = true; - break; - // case 37://previous page - // $('#PREV_PAGE').trigger('click'); - // break; - // case 39://previous page - // $('#NEXT_PAGE').trigger('click'); - // break; - case 9://tab - if (!is_ctrl_key(event) && !$('.ui-widget-overlay').is(':visible') && !$('.overlay_box').is(':visible')) { - document.getElementById('EDIT_query').focus(); - cancelKey = shortCut = true; - } - break; - } - break; - - - case 'mainMenu': - break; - - - case 'headBlock': - break; - - default: - break; - - } - } - } - } - - if (!$('#EDIT_query').hasClass('focused') && event.keyCode !== 17) { - - if ($('#keyboard-dialog.auto').length > 0 && shortCut) { - triggerShortcuts(); - } - } - if (cancelKey) { - event.cancelBubble = true; - if (event.stopPropagation) - event.stopPropagation(); - return(false); - } - return(true); - }); - - - $('#EDIT_query').bind('focus',function () { - $(this).addClass('focused'); - }).bind('blur', function () { - $(this).removeClass('focused'); - }); - - $('.basketTips').tooltip({ - delay: 200 - }); - - $('#idFrameC .tabs').tabs({ - activate: function (event, ui) { - if (ui.newTab.context.hash == "#thesaurus_tab") { - thesau_show(); - } - p4.WorkZone.open(); - } - }); - - $('#PREVIEWBOX .gui_vsplitter', p4.edit.editBox).draggable({ - axis: 'x', - containment: 'parent', - drag: function (event, ui) { - var x = $(ui.position.left)[0]; - if (x < 330 || x > (bodySize.x - 400)) { - return false; - } - var v = $(ui.position.left)[0]; - $("#PREVIEWLEFT").width(v); - $("#PREVIEWRIGHT").css("left", $(ui.position.left)[0]); - resizePreview(); - } - }); - - $('input.input_select_copy').on('focus', function () { - $(this).select(); - }); - $('input.input_select_copy').on('blur', function () { - $(this).deselect(); - }); - $('input.input_select_copy').on('click', function () { - $(this).select(); - }); - - $('#loader_bar').stop().animate({ - width: '100%' - }, 450, function () { - $('#loader').parent().fadeOut('slow', function () { - $(this).remove(); - }); - }); - -}); - -// edit modal - multiusage @todo refactor -function editThis(type, value) { - - $('#idFrameE').empty().addClass('loading'); - showOverlay(2); - - $('#EDITWINDOW').show(); - - var options = { - lst: '', - ssel: '', - act: '' - }; - - switch (type) { - case "IMGT": - options.lst = value; - break; - - case "SSTT": - options.ssel = value; - break; - - case "STORY": - options.story = value; - break; - } - - $.ajax({ - url: "../prod/records/edit/", - type: "POST", - dataType: "html", - data: options, - success: function (data) { - recordEditorModule.initialize(); - $('#idFrameE').removeClass('loading').empty().html(data); - $('#tooltip').hide(); - return; - }, - error: function (XHR, textStatus, errorThrown) { - if (XHR.status === 0) { - return false; - } - } - }); - - return; -} - -(function ($) { - $.fn.extend({ - highlight: function (color) { - if ($(this).hasClass('animating')) { - return; - } - color = typeof color !== 'undefined' ? color : 'red'; - var oldColor = $(this).css('backgroundColor'); - return $(this).addClass('animating').stop().animate({ - backgroundColor: color - }, 50, 'linear', function () { - $(this).stop().animate({ - backgroundColor: oldColor - }, 450, 'linear', function () { - $(this).removeClass('animating'); - }); - }); - } - }); -})(jQuery); - -/*(function ($) { - $.fn.extend({ - flash: function (color) { - if ($(this).hasClass('animating')) { - return true; - } - color = typeof color !== 'undefined' ? color : 'red'; - - var pos = $(this).offset(); - - if (!pos) { - pos = { - top: 0, - left: 0 - }; - } - - var h = $(this).height(); - var w = $(this).width(); - $('body').append('
    '); - $(this).addClass('animating'); - var el = $(this); - - $('#flashing').stop().animate({ - top: (pos.top + (h / 4)), - left: (pos.left + (w / 4)), - opacity: 0, - width: ($(this).width() / 2), - height: ($(this).height() / 2) - }, 700, function () { - $('#flashing').remove(); - $(el).removeClass('animating'); - }); - } - }); -})(jQuery);*/ - - -function toggleRemoveReg(el) { - var state = !el.checked; - userModule.setPref('reg_delete', (state ? '1' : '0')); - p4.reg_delete = state; -} - - -function deleteThis(lst) { - if (lst.split(';').length === 0) { - alert(language.nodocselected); - return false; - } - - var $dialog = p4.Dialog.Create({ - size: 'Small', - title: language.deleteRecords - }); - - $.ajax({ - type: "POST", - url: "../prod/records/delete/what/", - dataType: 'html', - data: {lst: lst}, - success: function (data) { - $dialog.setContent(data); - } - }); - - return false; -} - -// trigger tools modal - multiusage @todo refactor -function toolREFACTOR(datas, activeTab) { - - var dialog = p4.Dialog.Create({ - size: 'Medium', - title: language.toolbox, - loading: true - }); - - $.get("../prod/tools/" - , datas - , function (data) { - dialog.setContent(data); - dialog.setOption('contextArgs', datas); - var tabs = $('.tabs', dialog.getDomElement()).tabs(); - - // activate tab if exists: - if( activeTab !== undefined ) { - tabs.tabs('option', 'active', activeTab); - } - return; - } - ); -} - -function checkDeleteThis(type, el) { - el = $(el); - switch (type) { - - - case "IMGT": - case "CHIM": - - var lst = ''; - - if (type === 'IMGT') - lst = p4.Results.Selection.serialize(); - if (type === 'CHIM') - lst = p4.WorkZone.Selection.serialize(); - - deleteThis(lst); - - return; - break; - - - case "SSTT": - - var buttons = {}; - buttons[language.valider] = function (e) { - workzoneBasketModule.deleteBasket(el); - }; - - $('#DIALOG').empty().append(language.confirmDel).attr('title', language.attention).dialog({ - autoOpen: false, - resizable: false, - modal: true, - draggable: false - }).dialog('open').dialog('option', 'buttons', buttons); - $('#tooltip').hide(); - return; - break; - case "STORY": - lst = el.val(); - deleteThis(lst); - break; - - } -} - -function shareThis(bas, rec) { - var dialog = p4.Dialog.Create({ - title: language['share'] - }); - - dialog.load("../prod/share/record/" + bas + "/" + rec + "/", "GET"); -} - -function printThis(value) { - if ($("#DIALOG").data("ui-dialog")) { - $("#DIALOG").dialog('destroy'); - } - $('#DIALOG').attr('title', language.print) - .empty().addClass('loading') - .dialog({ - resizable: false, - closeOnEscape: true, - modal: true, - width: '800', - height: '500', - open: function (event, ui) { - $(this).dialog("widget").css("z-index", "1999"); - }, - close: function (event, ui) { - $(this).dialog("widget").css("z-index", "auto"); - } - }) - .dialog('open'); - - $.ajax({ - type: "POST", - url: '../prod/printer/?' + value, - dataType: 'html', - beforeSend: function () { - - }, - success: function (data) { - $('#DIALOG').removeClass('loading').empty() - .append(data); - return; - } - }); -} - - - - -function viewNbSelect() { - $("#nbrecsel").empty().append(p4.Results.Selection.length()); -} - -function selector(el) { - if (el.hasClass('all_selector')) { - p4.Results.Selection.selectAll(); - } - else { - if (el.hasClass('none_selector')) { - p4.Results.Selection.empty(); - } - else { - if (el.hasClass('starred_selector')) { - - } - else { - if (el.hasClass('video_selector')) { - p4.Results.Selection.empty(); - p4.Results.Selection.select('.type-video'); - } - else { - if (el.hasClass('image_selector')) { - p4.Results.Selection.empty(); - p4.Results.Selection.select('.type-image'); - } - else { - if (el.hasClass('document_selector')) { - p4.Results.Selection.empty(); - p4.Results.Selection.select('.type-document'); - } - else { - if (el.hasClass('audio_selector')) { - p4.Results.Selection.empty(); - p4.Results.Selection.select('.type-audio'); - } - } - } - } - } - } - } -} - -function evt_dwnl(value) { - downloadThis("lst=" + value); -} - -function evt_print(value) { - printThis("lst=" + value); -} - -function evt_add_in_chutier(sbas_id, record_id, event, singleSelection) { - var singleSelection = singleSelection || false; - p4.WorkZone.addElementToBasket(sbas_id, record_id, event, singleSelection); -} - -function remove_from_basket(el, confirm) { - var confirm = confirm || false; - p4.WorkZone.removeElementFromBasket(el, confirm); -} - - -function doSpecialSearch(qry, allbase) { - if (allbase) { - searchModule.toggleDatabase(true); - } - workzoneFacetsModule.resetSelectedFacets(); - $('#EDIT_query').val(decodeURIComponent(qry).replace(/\+/g, " ")); - searchModule.newSearch(qry); -} - -function clktri(id) { - var o = $('#TOPIC_UL' + id); - if ($('#TOPIC_UL' + id).hasClass('closed')) - $('#TOPIC_TRI' + id + ' ,#TOPIC_UL' + id).removeClass('closed').addClass('opened'); - else - $('#TOPIC_TRI' + id + ' ,#TOPIC_UL' + id).removeClass('opened').addClass('closed'); -} - - - - - -/* NOT USED function showAnswer(p) { - var o; - if (p === 'Results') { - // on montre les results - if (o = document.getElementById("AnswerExplain")) - o.style.visibility = "hidden"; - if (o = document.getElementById("AnswerResults")) { - o.style.visibility = ""; - o.style.display = "block"; - } - // on montre explain - if (document.getElementById("divpage")) - document.getElementById("divpage").style.visibility = visibilityDivPage; - - if (document.getElementById("explainResults")) - document.getElementById("explainResults").style.display = "none"; - } - else { - // on montre explain - if (document.getElementById("divpage")) { - visibilityDivPage = "visible"; - document.getElementById("divpage").style.visibility = "hidden"; - } - if (document.getElementById("explainResults")) - document.getElementById("explainResults").style.display = "block"; - - if (o = document.getElementById("AnswerResults")) { - o.style.visibility = "hidden"; - o.style.display = "none"; - - } - if (o = document.getElementById("AnswerExplain")) - o.style.visibility = ""; - if (o = document.getElementById("AnswerExplain")) { - o.style.display = "none"; - setTimeout('document.getElementById("AnswerExplain").style.display = "block";', 200); - } - } -}*/ - - -/** FROM INDEX.php **/ -function saveeditPbar(idesc, ndesc) { - document.getElementById("saveeditPbarI").innerHTML = idesc; - document.getElementById("saveeditPbarN").innerHTML = ndesc; -} - - -function saveWindows() { - var key = ''; - var value = ''; - - - if ($('#idFrameE').is(':visible') && $('#EDITWINDOW').is(':visible')) { - key = 'edit_window'; - value = $('#idFrameE').outerWidth() / $('#EDITWINDOW').innerWidth(); - } - else { - key = 'search_window'; - value = $('#idFrameC').outerWidth() / bodySize.x; - } - userModule.setPref(key, value); -} - -function gotopage(pag) { - $('#searchForm input[name="sel"]').val(p4.Results.Selection.serialize()); - $('#formAnswerPage').val(pag); - $('#searchForm').submit(); -} - - -//clear search -$(document).ready(function () { - - $('#thesaurus_tab .input-medium').on('keyup', function(){ - if($('#thesaurus_tab .input-medium').val() != ''){ - $('#thesaurus_tab .th_clear').show(); - }else{ - $('#thesaurus_tab .th_clear').hide(); - } - }); - - $('.th_clear').on('click', function(){ - $('#thesaurus_tab .input-medium').val(''); - $('#thesaurus_tab .gform').submit(); - $('#thesaurus_tab .th_clear').hide(); - }); - - $('.treeview>li.expandable>.hitarea').on('click', function(){ - if($(this).css('background-position') == '99% 22px'){ - $(this).css('background-position', '99% -28px'); - $(this).addClass('active'); - }else{ - $(this).css('background-position', '99% 22px'); - $(this).removeClass('active'); - } - }); - -}); diff --git a/resources/www/prod/js/jquery.p4.preview.js b/resources/www/prod/js/jquery.p4.preview.js deleted file mode 100644 index d09db584a1..0000000000 --- a/resources/www/prod/js/jquery.p4.preview.js +++ /dev/null @@ -1,527 +0,0 @@ -var prevAjax, prevAjaxrunning; -prevAjaxrunning = false; -p4.slideShow = false; - -$(document).ready(function () { - $('#PREVIEWIMGDESC').tabs(); -}); - - -function getNewVideoToken(lst, obj) { - $.ajax({ - type: "POST", - url: "../prod/records/renew-url/", - dataType: 'json', - data: { - lst: lst - }, - success: function (data) { - if (!data[lst]) - return; - obj.unload(); - obj.setClip({url: data[lst]}); - obj.play(); - return; - } - - }); -} - -/** - * - * @param env - * @param pos - relative position in current page - * @param contId - * @param reload - */ -function openPreview(env, pos, contId, reload) { - - if (contId == undefined) - contId = ''; - var roll = 0; - var justOpen = false; - - if (!p4.preview.open) { - showOverlay(); - - $('#PREVIEWIMGCONT').disableSelection(); - - justOpen = true; - - if (!( navigator.userAgent.match(/msie/i))) { - $('#PREVIEWBOX').css({ - 'display': 'block', - 'opacity': 0 - }).fadeTo(500, 1); - } else { - $('#PREVIEWBOX').css({ - 'display': 'block', - 'opacity': 1 - }); - } - p4.preview.open = true; - p4.preview.nCurrent = 5; - $('#PREVIEWCURRENT, #PREVIEWOTHERSINNER, #SPANTITLE').empty(); - resizePreview(); - if (env == 'BASK') - roll = 1; - - } - - if (reload === true) - roll = 1; - - - $('#tooltip').css({ - 'display': 'none' - }); - - $('#PREVIEWIMGCONT').empty(); - - var options_serial = p4.tot_options; - var query = p4.tot_query; - var navigation = p4.navigation; - - // keep relative position for answer train: - var relativePos = pos; - // update real absolute position with pagination: - var absolutePos = parseInt(navigation.perPage,10) * (parseInt(navigation.page, 10) - 1) + parseInt(pos,10); - - // if comes from story, work with relative positionning - if (env == 'REG') { - // @TODO - if event comes from workzone (basket|story), - // we can use the relative position in order to display the doubleclicked records - // except we can't know the original event in this implementation - absolutePos = 0; - } - - prevAjax = $.ajax({ - type: "POST", - url: "../prod/records/", - dataType: 'json', - data: { - env: env, - pos: absolutePos, - cont: contId, - roll: roll, - options_serial: options_serial, - query: query - }, - beforeSend: function () { - if (prevAjaxrunning) - prevAjax.abort(); - if (env == 'RESULT') - $('#current_result_n').empty().append(parseInt(pos) + 1); - prevAjaxrunning = true; - $('#PREVIEWIMGDESC, #PREVIEWOTHERS').addClass('loading'); - }, - error: function (data) { - prevAjaxrunning = false; - $('#PREVIEWIMGDESC, #PREVIEWOTHERS').removeClass('loading'); - posAsk = null; - }, - timeout: function () { - prevAjaxrunning = false; - $('#PREVIEWIMGDESC, #PREVIEWOTHERS').removeClass('loading'); - posAsk = null; - }, - success: function (data) { - cancelPreview(); - prevAjaxrunning = false; - posAsk = null; - - if (data.error) { - $('#PREVIEWIMGDESC, #PREVIEWOTHERS').removeClass('loading'); - alert(data.error); - if (justOpen) - closePreview(); - return; - } - posAsk = data.pos - 1; - - $('#PREVIEWIMGCONT').empty().append(data.html_preview); - $('#PREVIEWIMGCONT .thumb_wrapper') - .width('100%').height('100%').image_enhance({zoomable: true}); - - $('#PREVIEWIMGDESCINNER').empty().append(data.desc); - $('#HISTORICOPS').empty().append(data.history); - $('#popularity').empty().append(data.popularity); - - if ($('#popularity .bitly_link').length > 0) { - - BitlyCB.statsResponse = function (data) { - var result = data.results; - if ($('#popularity .bitly_link_' + result.userHash).length > 0) { - $('#popularity .bitly_link_' + result.userHash).append(' (' + result.clicks + ' clicks)'); - } - }; - BitlyClient.stats($('#popularity .bitly_link').html(), 'BitlyCB.statsResponse'); - } - - p4.preview.current = {}; - p4.preview.current.width = parseInt($('#PREVIEWIMGCONT input[name=width]').val()); - p4.preview.current.height = parseInt($('#PREVIEWIMGCONT input[name=height]').val()); - p4.preview.current.tot = data.tot; - p4.preview.current.pos = relativePos; - - if ($('#PREVIEWBOX img.record.zoomable').length > 0) { - $('#PREVIEWBOX img.record.zoomable').draggable(); - } - - $('#SPANTITLE').empty().append(data.title); - $("#PREVIEWTITLE_COLLLOGO").empty().append(data.collection_logo); - $("#PREVIEWTITLE_COLLNAME").empty().append(data.collection_name); - - setPreview(); - - if (env != 'RESULT') { - if (justOpen || reload) { - setCurrent(data.current); - } - viewCurrent($('#PREVIEWCURRENT li.selected')); - } - else { - if (!justOpen) { - $('#PREVIEWCURRENT li.selected').removeClass('selected'); - $('#PREVIEWCURRENTCONT li.current' + absolutePos).addClass('selected'); - } - if (justOpen || ($('#PREVIEWCURRENTCONT li.current' + absolutePos).length === 0) || ($('#PREVIEWCURRENTCONT li:last')[0] == $('#PREVIEWCURRENTCONT li.selected')[0]) || ($('#PREVIEWCURRENTCONT li:first')[0] == $('#PREVIEWCURRENTCONT li.selected')[0])) { - getAnswerTrain(pos, data.tools, query, options_serial); - } - - viewCurrent($('#PREVIEWCURRENT li.selected')); - } - if (env == 'REG' && $('#PREVIEWCURRENT').html() === '') { - getRegTrain(contId, pos, data.tools); - } - setOthers(data.others); - setTools(data.tools); - $('#tooltip').css({ - 'display': 'none' - }); - $('#PREVIEWIMGDESC, #PREVIEWOTHERS').removeClass('loading'); - if (!justOpen || (p4.preview.mode != env)) - resizePreview(); - - p4.preview.mode = env; - $('#EDIT_query').focus(); - - $('#PREVIEWOTHERSINNER .otherBaskToolTip').tooltip(); - - return; - } - - }); - -} - -function zoomPreview(bool) { - - var el = $('#PREVIEWIMGCONT img.record'); - - if (el.length === 0) - return; - - var t1 = parseInt(el.css('top')); - var l1 = parseInt(el.css('left')); - var w1 = el.width(); - var h1 = el.height(); - - var w2, t2; - - if (bool) { - if (w1 * 1.08 < 32767) - w2 = w1 * 1.08; - else - w2 = w1; - } - else { - if (w1 / 1.08 > 20) - w2 = w1 / 1.08; - else - w2 = w1; - } - - var ratio = p4.preview.current.width / p4.preview.current.height; - h2 = Math.round(w2 / ratio); - w2 = Math.round(w2); - - t2 = Math.round(t1 - (h2 - h1) / 2) + 'px'; - var l2 = Math.round(l1 - (w2 - w1) / 2) + 'px'; - - var wPreview = $('#PREVIEWIMGCONT').width() / 2; - var hPreview = $('#PREVIEWIMGCONT').height() / 2; - - var nt = Math.round((h2 / h1) * (t1 - hPreview) + hPreview); - var nl = Math.round(((w2 / w1) * (l1 - wPreview)) + wPreview); - - el.css({ - left: nl, - top: nt - }).width(w2).height(h2); -} - -function getAnswerTrain(pos, tools, query, options_serial) { - // keep relative position for answer train: - var relativePos = pos; - // update real absolute position with pagination: - var absolutePos = parseInt(p4.navigation.perPage,10) * (parseInt(p4.navigation.page, 10) - 1) + parseInt(pos,10); - - $('#PREVIEWCURRENTCONT').fadeOut('fast'); - $.ajax({ - type: "POST", - url: "/prod/query/answer-train/", - dataType: 'json', - data: { - pos: absolutePos, - options_serial: options_serial, - query: query - }, - success: function (data) { - setCurrent(data.current); - viewCurrent($('#PREVIEWCURRENT li.selected')); - setTools(tools); - return; - } - }); -} - - -function getRegTrain(contId, pos, tools) { - $.ajax({ - type: "POST", - url: "/prod/query/reg-train/", - dataType: 'json', - data: { - cont: contId, - pos: pos - }, - success: function (data) { - setCurrent(data.current); - viewCurrent($('#PREVIEWCURRENT li.selected')); - if (typeof(tools) != 'undefined') - setTools(tools); - return; - } - }); -} - -function bounce(sbid, term, field) { - doThesSearch('T', sbid, term, field); - closePreview(); -} - -function setTitle(title) { - $('#SPANTITLE').empty().append(title); -} - -function cancelPreview() { - $('#PREVIEWIMGDESCINNER').empty(); - $('#PREVIEWIMGCONT').empty(); - p4.preview.current = false; -} - - -function startSlide() { - if (!p4.slideShow) { - p4.slideShow = true; - } - if (p4.slideShowCancel) { - p4.slideShowCancel = false; - p4.slideShow = false; - $('#start_slide').show(); - $('#stop_slide').hide(); - } - if (!p4.preview.open) { - p4.slideShowCancel = false; - p4.slideShow = false; - $('#start_slide').show(); - $('#stop_slide').hide(); - } - if (p4.slideShow) { - $('#start_slide').hide(); - $('#stop_slide').show(); - getNext(); - setTimeout("startSlide()", 3000); - } -} - -function stopSlide() { - p4.slideShowCancel = true; - $('#start_slide').show(); - $('#stop_slide').hide(); -} - -//var posAsk = null; - -function getNext() { - if (p4.preview.mode == 'REG' && parseInt(p4.preview.current.pos) === 0) - $('#PREVIEWCURRENTCONT li img:first').trigger("click"); - else { - if (p4.preview.mode == 'RESULT') { - posAsk = parseInt(p4.preview.current.pos) + 1; - posAsk = (posAsk >= parseInt(p4.tot) || isNaN(posAsk)) ? 0 : posAsk; - openPreview('RESULT', posAsk, '', false); - } - else { - if (!$('#PREVIEWCURRENT li.selected').is(':last-child')) - $('#PREVIEWCURRENT li.selected').next().children('img').trigger("click"); - else - $('#PREVIEWCURRENT li:first-child').children('img').trigger("click"); - } - - } -} -function reloadPreview() { - $('#PREVIEWCURRENT li.selected img').trigger("click"); -} - -function getPrevious() { - if (p4.preview.mode == 'RESULT') { - posAsk = parseInt(p4.preview.current.pos) - 1; - posAsk = (posAsk < 0) ? ((parseInt(p4.tot) - 1)) : posAsk; - openPreview('RESULT', posAsk, '', false); - } - else { - if (!$('#PREVIEWCURRENT li.selected').is(':first-child')) - $('#PREVIEWCURRENT li.selected').prev().children('img').trigger("click"); - else - $('#PREVIEWCURRENT li:last-child').children('img').trigger("click"); - } -} - -function setOthers(others) { - - $('#PREVIEWOTHERSINNER').empty(); - if (others !== '') { - $('#PREVIEWOTHERSINNER').append(others); - - $('#PREVIEWOTHERS table.otherRegToolTip').tooltip(); - } -} - -function setTools(tools) { - $('#PREVIEWTOOL').empty().append(tools); - if (!p4.slideShowCancel && p4.slideShow) { - $('#start_slide').hide(); - $('#stop_slide').show(); - } else { - $('#start_slide').show(); - $('#stop_slide').hide(); - } -} - -function setCurrent(current) { - if (current !== '') { - var el = $('#PREVIEWCURRENT'); - el.removeClass('loading').empty().append(current); - - $('ul', el).width($('li', el).length * 80); - $('img.prevRegToolTip', el).tooltip(); - $.each($('img.openPreview'), function (i, el) { - var jsopt = $(el).attr('jsargs').split('|'); - $(el).removeAttr('jsargs'); - $(el).removeClass('openPreview'); - $(el).bind('click', function () { - viewCurrent($(this).parent()); - // convert abssolute to relative position - var absolutePos = jsopt[1]; - var relativePos = parseInt(absolutePos, 10) - parseInt(p4.navigation.perPage, 10) * (parseInt(p4.navigation.page, 10) - 1); - // keep relative position for answer train: - openPreview(jsopt[0], relativePos, jsopt[2],false); - }); - }); - } -} - -function viewCurrent(el) { - if (el.length === 0) { - return; - } - $('#PREVIEWCURRENT li.selected').removeClass('selected'); - el.addClass('selected'); - $('#PREVIEWCURRENTCONT').animate({'scrollLeft': ($('#PREVIEWCURRENT li.selected').position().left + $('#PREVIEWCURRENT li.selected').width() / 2 - ($('#PREVIEWCURRENTCONT').width() / 2 ))}); - return; -} - -function setPreview() { - if (!p4.preview.current) - return; - - var zoomable = $('img.record.zoomable'); - if (zoomable.length > 0 && zoomable.hasClass('zoomed')) - return; - - var h = parseInt(p4.preview.current.height); - var w = parseInt(p4.preview.current.width); -// if(p4.preview.current.type == 'video') -// { -// var h = parseInt(p4.preview.current.flashcontent.height); -// var w = parseInt(p4.preview.current.flashcontent.width); -// } - var t = 20; - var de = 0; - - var margX = 0; - var margY = 0; - - if ($('#PREVIEWIMGCONT .record_audio').length > 0) { - margY = 100; - de = 60; - } - - -// if(p4.preview.current.type != 'flash') -// { - var ratioP = w / h; - var ratioD = parseInt(p4.preview.width) / parseInt(p4.preview.height); - - if (ratioD > ratioP) { - //je regle la hauteur d'abord - if ((parseInt(h) + margY) > parseInt(p4.preview.height)) { - h = Math.round(parseInt(p4.preview.height) - margY); - w = Math.round(h * ratioP); - } - } - else { - if ((parseInt(w) + margX) > parseInt(p4.preview.width)) { - w = Math.round(parseInt(p4.preview.width) - margX); - h = Math.round(w / ratioP); - } - } -// } -// else -// { - -// h = Math.round(parseInt(p4.preview.height) - margY); -// w = Math.round(parseInt(p4.preview.width) - margX); -// } - t = Math.round((parseInt(p4.preview.height) - h - de) / 2); - var l = Math.round((parseInt(p4.preview.width) - w) / 2); - $('#PREVIEWIMGCONT .record').css({ - width: w, - height: h, - top: t, - left: l - }).attr('width', w).attr('height', h); -} - -function classicMode() { - $('#PREVIEWCURRENTCONT').animate({'scrollLeft': ($('#PREVIEWCURRENT li.selected').position().left - 160)}); - p4.currentViewMode = 'classic'; -} - -function closePreview() { - p4.preview.open = false; - hideOverlay(); - - $('#PREVIEWBOX').fadeTo(500, 0); - $('#PREVIEWBOX').queue(function () { - $(this).css({ - 'display': 'none' - }); - cancelPreview(); - $(this).dequeue(); - }); - -} diff --git a/resources/www/prod/js/prod.js b/resources/www/prod/js/prod.js new file mode 100644 index 0000000000..df5a507e13 --- /dev/null +++ b/resources/www/prod/js/prod.js @@ -0,0 +1,1168 @@ +var p4 = p4 || {}; +var baskAjax, baskAjaxrunning; +baskAjaxrunning = false; +var answAjax, answAjaxrunning; +answAjaxrunning = false; +var searchAjax, searchAjaxRunning; +searchAjaxRunning = false; +var bodySize = { + x: 0, + y: 0 +}; + +var prodModule = (function (p4, humane) { + + document.getElementById('loader_bar').style.width = '30%'; + $(document).ready(function () { + humane.info = humane.spawn({addnCls: 'humane-libnotify-info', timeout: 1000}); + humane.error = humane.spawn({addnCls: 'humane-libnotify-error', timeout: 1000}); + humane.forceNew = true; + cguModule.activateCgus(); + $('body').on('click', 'a.dialog', function (event) { + var $this = $(this), size = 'Medium'; + + if ($this.hasClass('small-dialog')) { + size = 'Small'; + } else if ($this.hasClass('full-dialog')) { + size = 'Full'; + } + + var options = { + size: size, + loading: true, + title: $this.attr('title'), + closeOnEscape: true + }; + + $dialog = p4.Dialog.Create(options); + + $.ajax({ + type: "GET", + url: $this.attr('href'), + dataType: 'html', + success: function (data) { + $dialog.setContent(data); + return; + } + }); + + return false; + }); + + $('input[name=search_type]').bind('click', function () { + console.log('search bind') + var $this = $(this); + var $record_types = $('#recordtype_sel'); + + console.log($this.hasClass('mode_type_reg'), $record_types) + if ($this.hasClass('mode_type_reg')) { + $record_types.css("visibility", "hidden"); // better than hide because does not change layout + $record_types.prop("selectedIndex", 0); + } else { + $record_types.css("visibility", "visible"); + } + }); + + $('.adv_search_button').on('click', function () { + var searchForm = $('#searchForm'); + var parent = searchForm.parent(); + + var options = { + size: (bodySize.x - 120)+'x'+(bodySize.y - 120), + loading: false, + closeCallback: function (dialog) { + + var datas = dialog.find('form.phrasea_query').appendTo(parent);//.clone(); + + $('.adv_trigger', searchForm).show(); + $('.adv_options', searchForm).hide(); + } + }; + + $dialog = p4.Dialog.Create(options); + + searchForm.appendTo($dialog.getDomElement()); + + $dialog.getDomElement().find('.adv_options').show(); + $dialog.getDomElement().find('.adv_trigger').hide(); + + $dialog.getDomElement().find('form').bind('submit.conbo', function () { + $(this).unbind('submit.conbo'); + $dialog.Close(); + return false; + }); + + + return false; + }); + + $(document).bind('contextmenu', function (event) { + var targ; + if (event.target) + targ = event.target; + else if (event.srcElement) + targ = event.srcElement; + if (targ.nodeType === 3)// safari bug + targ = targ.parentNode; + + var gogo = true; + var targ_name = targ.nodeName ? targ.nodeName.toLowerCase() : false; + + if (targ_name !== 'input' && targ_name.toLowerCase() !== 'textarea') { + gogo = false; + } + if (targ_name === 'input') { + if ($(targ).is(':checkbox')) + gogo = false; + } + + return gogo; + }); + + $('.basket_refresher').on('click', function () { + return p4.WorkZone.refresh('current'); + return false; + }); + + $('#loader_bar').stop().animate({ + width: '70%' + }, 450); + p4.preview = { + open: false, + current: false + }; + p4.currentViewMode = 'classic'; + p4.nbNoview = 0; + p4.sel = []; + p4.baskSel = []; + p4.edit = {}; + p4.thesau = { + tabs: null + }; + p4.active_zone = false; + p4.next_bask_scroll = false; + + + $('#backcolorpickerHolder').ColorPicker({ + flat: true, + color: '404040', + livePreview: false, + eventName: 'mouseover', + onSubmit: function (hsb, hex, rgb, el) { + var back_hex = ''; + var unactive = ''; + + + if (hsb.b >= 50) { + back_hex = '000000'; + + var sim_b = 0.1 * hsb.b; + } + else { + back_hex = 'FFFFFF'; + + var sim_b = 100 - 0.1 * (100 - hsb.b); + } + + var sim_b = 0.1 * hsb.b; + + var sim_rgb = utilsModule.hsl2rgb(hsb.h, hsb.s, sim_b); + var sim_hex = utilsModule.RGBtoHex(sim_rgb.r, sim_rgb.g, sim_rgb.b); + + userModule.setPref('background-selection', hex); + userModule.setPref('background-selection-disabled', sim_hex); + userModule.setPref('fontcolor-selection', back_hex); + + $('style[title=color_selection]').empty(); + + var datas = '.diapo.selected,#reorder_box .diapo.selected, #EDIT_ALL .diapo.selected, .list.selected, .list.selected .diapo' + + '{' + + ' COLOR: #' + back_hex + ';' + + ' BACKGROUND-COLOR: #' + hex + ';' + + '}'; + $('style[title=color_selection]').empty().text(datas); + } + }); + $('#backcolorpickerHolder').find('.colorpicker_submit').append($('#backcolorpickerHolder .submiter')).bind('click', function () { + $(this).highlight('#CCCCCC'); + }); + + $('#search_submit').on('mousedown', function (event) { + return false; + }); + + $('#history-queries ul li').on('mouseover',function () { + $(this).addClass('hover'); + }).on('mouseout', function () { + $(this).removeClass('hover'); + }); + + startThesaurus(); + searchModule.checkFilters(); + + _activeZoning(); + + $('.shortcuts-trigger').bind('click', function () { + _triggerShortcuts(); + }); + + $('#idFrameC').resizable({ + handles: 'e', + resize: function () { + answerSizer(); + linearizeUi(); + }, + stop: function () { + + var el = $('.SSTT.active').next().find('div:first'); + var w = el.find('div.chim-wrapper:first').outerWidth(); + var iw = el.innerWidth(); + var diff = $('#idFrameC').width() - el.outerWidth(); + var n = Math.floor(iw / w); + + $('#idFrameC').height('auto'); + + var nwidth = (n) * w + diff + n; + if (isNaN(nwidth)) { + _saveWindows(); + return; + } + if (nwidth < 265) + nwidth = 265; + if (el.find('div.chim-wrapper:first').hasClass('valid') && nwidth < 410) + nwidth = 410; + + + $('#idFrameC').stop().animate({ + width: nwidth + }, + 300, + 'linear', + function () { + answerSizer(); + linearizeUi(); + _saveWindows(); + }); + } + }); + + $('#idFrameC .ui-tabs-nav li').on('click', function (event) { + if($('#idFrameC').attr('data-status') == 'closed'){ + $('#idFrameC').width(300); + $('#rightFrame').css('left', 300); + $('#rightFrame').width($(window).width()-300); + $('#baskets, #proposals, #thesaurus_tab').hide(); + $('.ui-resizable-handle, #basket_menu_trigger').show(); + var IDname = $(this).attr('aria-controls'); + $('#'+IDname).show(); + } + + $('#idFrameC').attr('data-status', 'open'); + $('.WZbasketTab').css('background-position', '9px 21px'); + $('#idFrameC').removeClass('closed'); + }); + + var previousTab = ""; + + $('#idFrameC #retractableButton').bind('click', function (event) { + + if($('#idFrameC').attr('data-status') != 'closed'){ + $(this).find('i').removeClass('icon-double-angle-left').addClass('icon-double-angle-right') + $('#idFrameC').width(80); + $('#rightFrame').css('left', 80); + $('#rightFrame').width($(window).width()-80); + $('#idFrameC').attr('data-status', 'closed'); + $('#baskets, #proposals, #thesaurus_tab, .ui-resizable-handle, #basket_menu_trigger').hide(); + $('#idFrameC .ui-tabs-nav li').removeClass('ui-state-active'); + $('.WZbasketTab').css('background-position', '15px 16px'); + $('#idFrameC').addClass('closed'); + previousTab = $('#idFrameC .icon-menu').find('li.ui-tabs-active'); + }else{ + $(this).find('i').removeClass('icon-double-angle-right').addClass('icon-double-angle-left') + $('#idFrameC').width(300); + $('#rightFrame').css('left', 300); + $('#rightFrame').width($(window).width()-300); + $('#idFrameC').attr('data-status', 'open'); + $('.ui-resizable-handle, #basket_menu_trigger').show(); + $('.WZbasketTab').css('background-position', '9px 16px'); + $('#idFrameC').removeClass('closed'); + $('#idFrameC .icon-menu li').last().find('a').trigger('click'); + $('#idFrameC .icon-menu li').first().find('a').trigger('click'); + $(previousTab).find('a').trigger('click'); + } + + event.stopImmediatePropagation(); + //p4.WorkZone.close(); + return false; + }); + + $('#look_box .tabs').tabs(); + + _resizeAll(); + + $(window).bind('resize', function () { + _resizeAll(); + }); + $('body').append(''); + + $('body').append(''); + + $('#basket_menu_trigger').contextMenu('#basket_menu', { + openEvt: 'click', + dropDown: true, + theme: 'vista', + showTransition: 'slideDown', + hideTransition: 'hide', + shadow: false + }); + + $('#basket_menu_trigger').trigger("click"); + $('#basket_menu_trigger').trigger("click"); + + $('.datepicker').datepicker({ + changeYear: true, + changeMonth: true, + dateFormat: 'yy/mm/dd' + }); + + /*$.ajaxSetup({ + + error: function (jqXHR, textStatus, errorThrown) { + //Request is aborted + if (errorThrown === 'abort') { + return false; + } else { + showModal('error', { + title: language.errorAjaxRequest + ' ' + jqXHR.responseText + }); + } + }, + timeout: function () { + showModal('timeout', { + title: 'Server not responding' + }); + } + });*/ + + $('.tools .answer_selector').bind('click',function () { + _answerSelector($(this)); + + }).bind('mouseover',function (event) { + if (utilsModule.is_ctrl_key(event)) { + $(this).addClass('add_selector'); + } + else { + $(this).removeClass('add_selector'); + } + }).bind('mouseout', function () { + $(this).removeClass('add_selector'); + }); + + // getLanguage(); + + _initAnswerForm(); + + preferencesModule.initLook(); + + // setTimeout("pollNotifications();", 10000); + + $(this).bind('keydown', function (event) { + var cancelKey = false; + var shortCut = false; + + if ($('#MODALDL').is(':visible')) { + switch (event.keyCode) { + case 27: + hideDwnl(); + break; + } + } + else { + if ($('#EDITWINDOW').is(':visible')) { + + switch (event.keyCode) { + case 9: // tab ou shift-tab + recordEditorModule.edit_chgFld(event, utilsModule.is_shift_key(event) ? -1 : 1); + cancelKey = shortCut = true; + break; + case 27: + recordEditorModule.edit_cancelMultiDesc(event); + shortCut = true; + break; + + case 33: // pg up + if (!p4.edit.textareaIsDirty || recordEditorModule.edit_validField(event, "ask_ok")) + recordEditorModule.skipImage(event, 1); + cancelKey = true; + break; + case 34: // pg dn + if (!p4.edit.textareaIsDirty || recordEditorModule.edit_validField(event, "ask_ok")) + recordEditorModule.skipImage(event, -1); + cancelKey = true; + break; + } + + } + else { + if (p4.preview.open) { + if (($('#dialog_dwnl:visible').length === 0 && $('#DIALOG1').length === 0 && $('#DIALOG2').length === 0)) { + switch (event.keyCode) { + case 39: + recordPreviewModule.getNext(); + cancelKey = shortCut = true; + break; + case 37: + recordPreviewModule.getPrevious(); + cancelKey = shortCut = true; + break; + case 27://escape + recordPreviewModule.closePreview(); + break; + case 32: + if (p4.slideShow) + recordPreviewModule.stopSlide(); + else + recordPreviewModule.startSlide(); + cancelKey = shortCut = true; + break; + } + } + } + else { + if ($('#EDIT_query').hasClass('focused')) + return true; + + if ($('.overlay').is(':visible')) + return true; + + if ($('.ui-widget-overlay').is(':visible')) + return true; + + switch (p4.active_zone) { + case 'rightFrame': + switch (event.keyCode) { + case 65: // a + if (utilsModule.is_ctrl_key(event)) { + $('.tools .answer_selector.all_selector').trigger('click'); + cancelKey = shortCut = true; + } + break; + case 80://P + if (utilsModule.is_ctrl_key(event)) { + _onOpenPrintModal("lst=" + p4.Results.Selection.serialize()); + cancelKey = shortCut = true; + } + break; + case 69://e + if (utilsModule.is_ctrl_key(event)) { + openRecordEditor('IMGT', p4.Results.Selection.serialize()); + cancelKey = shortCut = true; + } + break; + case 40: // down arrow + $('#answers').scrollTop($('#answers').scrollTop() + 30); + cancelKey = shortCut = true; + break; + case 38: // down arrow + $('#answers').scrollTop($('#answers').scrollTop() - 30); + cancelKey = shortCut = true; + break; + case 37://previous page + $('#PREV_PAGE').trigger('click'); + shortCut = true; + break; + case 39://previous page + $('#NEXT_PAGE').trigger('click'); + shortCut = true; + break; + case 9://tab + if (!utilsModule.is_ctrl_key(event) && !$('.ui-widget-overlay').is(':visible') && !$('.overlay_box').is(':visible')) { + document.getElementById('EDIT_query').focus(); + cancelKey = shortCut = true; + } + break; + } + break; + + + case 'idFrameC': + switch (event.keyCode) { + case 65: // a + if (utilsModule.is_ctrl_key(event)) { + p4.WorkZone.Selection.selectAll(); + cancelKey = shortCut = true; + } + break; + case 80://P + if (utilsModule.is_ctrl_key(event)) { + _onOpenPrintModal("lst=" + p4.WorkZone.Selection.serialize()); + cancelKey = shortCut = true; + } + break; + case 69://e + if (utilsModule.is_ctrl_key(event)) { + openRecordEditor('IMGT', p4.WorkZone.Selection.serialize()); + cancelKey = shortCut = true; + } + break; + // case 46://del + // _deleteRecords(p4.Results.Selection.serialize()); + // cancelKey = true; + // break; + case 40: // down arrow + $('#baskets div.bloc').scrollTop($('#baskets div.bloc').scrollTop() + 30); + cancelKey = shortCut = true; + break; + case 38: // down arrow + $('#baskets div.bloc').scrollTop($('#baskets div.bloc').scrollTop() - 30); + cancelKey = shortCut = true; + break; + // case 37://previous page + // $('#PREV_PAGE').trigger('click'); + // break; + // case 39://previous page + // $('#NEXT_PAGE').trigger('click'); + // break; + case 9://tab + if (!utilsModule.is_ctrl_key(event) && !$('.ui-widget-overlay').is(':visible') && !$('.overlay_box').is(':visible')) { + document.getElementById('EDIT_query').focus(); + cancelKey = shortCut = true; + } + break; + } + break; + + + case 'mainMenu': + break; + + + case 'headBlock': + break; + + default: + break; + + } + } + } + } + + if (!$('#EDIT_query').hasClass('focused') && event.keyCode !== 17) { + + if ($('#keyboard-dialog.auto').length > 0 && shortCut) { + _triggerShortcuts(); + } + } + if (cancelKey) { + event.cancelBubble = true; + if (event.stopPropagation) + event.stopPropagation(); + return(false); + } + return(true); + }); + + + $('#EDIT_query').bind('focus',function () { + $(this).addClass('focused'); + }).bind('blur', function () { + $(this).removeClass('focused'); + }); + + $('.basketTips').tooltip({ + delay: 200 + }); + + $('#idFrameC .tabs').tabs({ + activate: function (event, ui) { + if (ui.newTab.context.hash == "#thesaurus_tab") { + thesau_show(); + } + p4.WorkZone.open(); + } + }); + + $('#PREVIEWBOX .gui_vsplitter', p4.edit.editBox).draggable({ + axis: 'x', + containment: 'parent', + drag: function (event, ui) { + var x = $(ui.position.left)[0]; + if (x < 330 || x > (bodySize.x - 400)) { + return false; + } + var v = $(ui.position.left)[0]; + $("#PREVIEWLEFT").width(v); + $("#PREVIEWRIGHT").css("left", $(ui.position.left)[0]); + recordPreviewModule.resizePreview(); + } + }); + + $('input.input_select_copy').on('focus', function () { + $(this).select(); + }); + $('input.input_select_copy').on('blur', function () { + $(this).deselect(); + }); + $('input.input_select_copy').on('click', function () { + $(this).select(); + }); + + $('#loader_bar').stop().animate({ + width: '100%' + }, 450, function () { + $('#loader').parent().fadeOut('slow', function () { + $(this).remove(); + }); + }); + + }); + + function _resizeAll() { + var body = $('#mainContainer'); + bodySize.y = body.height(); + bodySize.x = body.width(); + + $('.overlay').height(bodySize.y).width(bodySize.x); + + var headBlockH = $('#headBlock').outerHeight(); + var bodyY = bodySize.y - headBlockH - 2; + var bodyW = bodySize.x - 2; + //$('#desktop').height(bodyY).width(bodyW); + + if (p4.preview.open) + recordPreviewModule.resizePreview(); + + if ($('#idFrameC').data('ui-resizable')) { + $('#idFrameC').resizable('option', 'maxWidth', (480)); + $('#idFrameC').resizable('option', 'minWidth', 300); + } + + answerSizer(); + linearizeUi(); + + + } + function answerSizer() { + var el = $('#idFrameC').outerWidth(); + if (!$.support.cssFloat) { + // $('#idFrameC .insidebloc').width(el - 56); + } + var widthA = Math.round(bodySize.x - el - 10); + $('#rightFrame').width(widthA); + $('#rightFrame').css('left', $('#idFrameC').width()); + + } + function linearizeUi() { + var list = $('#answers .list'); + if (list.length > 0) { + var fllWidth = $('#answers').innerWidth(); + fllWidth -= 16; + + var stdWidth = 460; + var diff = 28; + var n = Math.round(fllWidth / (stdWidth)); + var w = Math.floor(fllWidth / n) - diff; + if (w < 360 && n > 1) + w = Math.floor(fllWidth / (n - 1)) - diff; + $('#answers .list').width(w); + } + else { + + var margin = 0; + var el = $('#answers .diapo:first'); + var brdrWidth = el.css('border-width'); + var stdWidth = el.outerWidth() + 10; + var fllWidth = $('#answers').innerWidth(); + fllWidth -= 16; + + var n = Math.floor(fllWidth / (stdWidth)); + + margin = Math.floor((fllWidth % stdWidth) / (2 * n)); + $('#answers .diapo').css('margin', '5px ' + (5 + margin) + 'px'); + } + + } + + function doSpecialSearch(qry, allbase) { + if (allbase) { + searchModule.toggleDatabase(true); + } + workzoneFacetsModule.resetSelectedFacets(); + $('#EDIT_query').val(decodeURIComponent(qry).replace(/\+/g, " ")); + searchModule.newSearch(qry); + } + + function addToBasket(sbas_id, record_id, event, singleSelection) { + var singleSelection = singleSelection || false; + p4.WorkZone.addElementToBasket(sbas_id, record_id, event, singleSelection); + } + + function removeFromBasket(el, confirm) { + var confirm = confirm || false; + p4.WorkZone.removeElementFromBasket(el, confirm); + } + + function openRecordEditor(type, value) { + + $('#idFrameE').empty().addClass('loading'); + showOverlay(2); + + $('#EDITWINDOW').show(); + + var options = { + lst: '', + ssel: '', + act: '' + }; + + switch (type) { + case "IMGT": + options.lst = value; + break; + + case "SSTT": + options.ssel = value; + break; + + case "STORY": + options.story = value; + break; + } + + $.ajax({ + url: "../prod/records/edit/", + type: "POST", + dataType: "html", + data: options, + success: function (data) { + recordEditorModule.initialize(); + $('#idFrameE').removeClass('loading').empty().html(data); + $('#tooltip').hide(); + return; + }, + error: function (XHR, textStatus, errorThrown) { + if (XHR.status === 0) { + return false; + } + } + }); + + return; + } + + function openShareModal(bas, rec) { + var dialog = p4.Dialog.Create({ + title: language['share'] + }); + + dialog.load("../prod/share/record/" + bas + "/" + rec + "/", "GET"); + } + function openPrintModal(value) { + _onOpenPrintModal("lst=" + value); + } + + function _onOpenPrintModal(value) { + if ($("#DIALOG").data("ui-dialog")) { + $("#DIALOG").dialog('destroy'); + } + $('#DIALOG').attr('title', language.print) + .empty().addClass('loading') + .dialog({ + resizable: false, + closeOnEscape: true, + modal: true, + width: '800', + height: '500', + open: function (event, ui) { + $(this).dialog("widget").css("z-index", "1999"); + }, + close: function (event, ui) { + $(this).dialog("widget").css("z-index", "auto"); + } + }) + .dialog('open'); + + $.ajax({ + type: "POST", + url: '../prod/printer/?' + value, + dataType: 'html', + beforeSend: function () { + + }, + success: function (data) { + $('#DIALOG').removeClass('loading').empty() + .append(data); + return; + } + }); + } + + function openToolModal(datas, activeTab) { + + var dialog = p4.Dialog.Create({ + size: 'Medium', + title: language.toolbox, + loading: true + }); + + $.get("../prod/tools/" + , datas + , function (data) { + dialog.setContent(data); + dialog.setOption('contextArgs', datas); + var tabs = $('.tabs', dialog.getDomElement()).tabs(); + + // activate tab if exists: + if( activeTab !== undefined ) { + tabs.tabs('option', 'active', activeTab); + } + return; + } + ); + } + + function openDownloadModal(value, key) { + if( key !== undefined ) { + value = key+'='+value + } + _onOpenDownloadModal(value); + } + // @TODO duplicate with external module + function _onOpenDownloadModal(datas) { + var dialog = p4.Dialog.Create({title: language['export']}); + + $.post("../prod/export/multi-export/", datas, function (data) { + + dialog.setContent(data); + + $('.tabs', dialog.getDomElement()).tabs(); + + $('.close_button', dialog.getDomElement()).bind('click', function () { + dialog.Close(); + }); + + return false; + }); + } + + + function deleteConfirmation(type, el) { + el = $(el); + switch (type) { + + + case "IMGT": + case "CHIM": + + var lst = ''; + + if (type === 'IMGT') + lst = p4.Results.Selection.serialize(); + if (type === 'CHIM') + lst = p4.WorkZone.Selection.serialize(); + + _deleteRecords(lst); + + return; + break; + + + case "SSTT": + + var buttons = {}; + buttons[language.valider] = function (e) { + workzoneBasketModule.deleteBasket(el); + }; + + $('#DIALOG').empty().append(language.confirmDel).attr('title', language.attention).dialog({ + autoOpen: false, + resizable: false, + modal: true, + draggable: false + }).dialog('open').dialog('option', 'buttons', buttons); + $('#tooltip').hide(); + return; + break; + case "STORY": + lst = el.val(); + _deleteRecords(lst); + break; + + } + } + function _deleteRecords(lst) { + if (lst.split(';').length === 0) { + alert(language.nodocselected); + return false; + } + + var $dialog = p4.Dialog.Create({ + size: 'Small', + title: language.deleteRecords + }); + + $.ajax({ + type: "POST", + url: "../prod/records/delete/what/", + dataType: 'html', + data: {lst: lst}, + success: function (data) { + $dialog.setContent(data); + } + }); + + return false; + } + + function toggleTopic(id) { + var o = $('#TOPIC_UL' + id); + if ($('#TOPIC_UL' + id).hasClass('closed')) + $('#TOPIC_TRI' + id + ' ,#TOPIC_UL' + id).removeClass('closed').addClass('opened'); + else + $('#TOPIC_TRI' + id + ' ,#TOPIC_UL' + id).removeClass('opened').addClass('closed'); + } + + function _initAnswerForm() { + var searchForm = $('#searchForm'); + $('button[type="submit"]', searchForm).bind('click', function () { + workzoneFacetsModule.resetSelectedFacets(); + searchModule.newSearch($("#EDIT_query").val()); + return false; + }); + + searchForm.unbind('submit').bind('submit', function () { + + var $this = $(this), + method = $this.attr('method') ? $this.attr('method') : 'POST'; + + var data = $this.serializeArray(); + + answAjax = $.ajax({ + type: method, + url: $this.attr('action'), + data: data, + dataType: 'json', + beforeSend: function (formData) { + if (answAjaxrunning && answAjax.abort) + answAjax.abort(); + searchModule.beforeSearch(); + }, + error: function () { + answAjaxrunning = false; + $('#answers').removeClass('loading'); + }, + timeout: function () { + answAjaxrunning = false; + $('#answers').removeClass('loading'); + }, + success: function (datas) { + + // DEBUG QUERY PARSER + try { + console.info(JSON.parse(datas.parsed_query)); + } + catch(e) {} + + $('#answers').empty().append(datas.results).removeClass('loading'); + + $("#answers img.lazyload").lazyload({ + container: $('#answers') + }); + + workzoneFacetsModule.loadFacets(datas.facets); + + $('#answers').append('
    '); + + $('#tool_results').empty().append(datas.infos); + $('#tool_navigate').empty().append(datas.navigationTpl); + + $.each(p4.Results.Selection.get(), function (i, el) { + $('#IMGT_' + el).addClass('selected'); + }); + + p4.tot = datas.total_answers; + p4.tot_options = datas.form; + p4.tot_query = datas.query; + p4.navigation = datas.navigation; + + if (datas.next_page) { + $("#NEXT_PAGE, #answersNext").bind('click', function () { + searchResultModule.gotopage(datas.next_page); + }); + } + else { + $("#NEXT_PAGE").unbind('click'); + } + + if (datas.prev_page) { + $("#PREV_PAGE").bind('click', function () { + searchResultModule.gotopage(datas.prev_page); + }); + } + else { + $("#PREV_PAGE").unbind('click'); + } + + searchModule.afterSearch(); + } + }); + return false; + }); + } + + function _triggerShortcuts() { + + $('#keyboard-stop').bind('click', function () { + var display = $(this).get(0).checked ? '0' : '1'; + + userModule.setPref('keyboard_infos', display); + + }); + + var buttons = {}; + + buttons[language.fermer] = function () { + $("#keyboard-dialog").dialog('close'); + }; + + $('#keyboard-dialog').dialog({ + closeOnEscape: false, + resizable: false, + draggable: false, + modal: true, + width: 600, + height: 400, + overlay: { + backgroundColor: '#000', + opacity: 0.7 + }, + open: function (event, ui) { + $(this).dialog("widget").css("z-index", "1400"); + }, + close: function () { + $(this).dialog("widget").css("z-index", "auto"); + if ($('#keyboard-stop').get(0).checked) { + var dialog = $('#keyboard-dialog'); + if (dialog.data("ui-dialog")) { + dialog.dialog('destroy'); + } + dialog.remove(); + } + } + }).dialog('option', 'buttons', buttons).dialog('open'); + + $('#keyboard-dialog').scrollTop(0); + + return false; + } + + function _activeZoning() { + $('#idFrameC, #rightFrame').bind('mousedown', function (event) { + var old_zone = p4.active_zone; + p4.active_zone = $(this).attr('id'); + if (p4.active_zone !== old_zone && p4.active_zone !== 'headBlock') { + $('.effectiveZone.activeZone').removeClass('activeZone'); + $('.effectiveZone', this).addClass('activeZone');//.flash('#555555'); + } + $('#EDIT_query').blur(); + }); + $('#rightFrame').trigger('mousedown'); + } + + function _answerSelector(el) { + if (el.hasClass('all_selector')) { + p4.Results.Selection.selectAll(); + } + else { + if (el.hasClass('none_selector')) { + p4.Results.Selection.empty(); + } + else { + if (el.hasClass('starred_selector')) { + + } + else { + if (el.hasClass('video_selector')) { + p4.Results.Selection.empty(); + p4.Results.Selection.select('.type-video'); + } + else { + if (el.hasClass('image_selector')) { + p4.Results.Selection.empty(); + p4.Results.Selection.select('.type-image'); + } + else { + if (el.hasClass('document_selector')) { + p4.Results.Selection.empty(); + p4.Results.Selection.select('.type-document'); + } + else { + if (el.hasClass('audio_selector')) { + p4.Results.Selection.empty(); + p4.Results.Selection.select('.type-audio'); + } + } + } + } + } + } + } + } + + function _saveWindows() { + var key = ''; + var value = ''; + + + if ($('#idFrameE').is(':visible') && $('#EDITWINDOW').is(':visible')) { + key = 'edit_window'; + value = $('#idFrameE').outerWidth() / $('#EDITWINDOW').innerWidth(); + } + else { + key = 'search_window'; + value = $('#idFrameC').outerWidth() / bodySize.x; + } + userModule.setPref(key, value); + } + + return { + linearizeUi: linearizeUi, + answerSizer: answerSizer, + openRecordEditor: openRecordEditor, + openPrintModal: openPrintModal, + openShareModal: openShareModal, + openToolModal: openToolModal, + openDownloadModal: openDownloadModal, + deleteConfirmation: deleteConfirmation, + doSpecialSearch: doSpecialSearch, + addToBasket: addToBasket, + removeFromBasket: removeFromBasket, + toggleTopic: toggleTopic + } +})(p4, humane); + +//var language = {}; // handled with external prodution module + + + +(function ($) { + $.fn.extend({ + highlight: function (color) { + if ($(this).hasClass('animating')) { + return; + } + color = typeof color !== 'undefined' ? color : 'red'; + var oldColor = $(this).css('backgroundColor'); + return $(this).addClass('animating').stop().animate({ + backgroundColor: color + }, 50, 'linear', function () { + $(this).stop().animate({ + backgroundColor: oldColor + }, 450, 'linear', function () { + $(this).removeClass('animating'); + }); + }); + } + }); +})(jQuery); diff --git a/resources/www/prod/js/publicator.js b/resources/www/prod/js/publicator.js deleted file mode 100644 index 8453849c76..0000000000 --- a/resources/www/prod/js/publicator.js +++ /dev/null @@ -1,5 +0,0 @@ -function publicator_reload_publicator(url) { - var options = $('#dialog_publicator form[name="current_datas"]').serializeArray(); - var dialog = p4.Dialog.get(1); - dialog.load(url, 'POST', options); -} diff --git a/templates/web/admin/users.html.twig b/templates/web/admin/users.html.twig index cd9455994e..3c424a14e1 100644 --- a/templates/web/admin/users.html.twig +++ b/templates/web/admin/users.html.twig @@ -447,7 +447,7 @@ var k = el.attr('id').split('_').pop(); - if (is_shift_key(evt) && $('tr.last_selected', cont).length != 0) { + if (utilsModule.is_shift_key(evt) && $('tr.last_selected', cont).length != 0) { var lst = $('tr', cont); var index1 = $.inArray($('tr.last_selected', cont)[0], lst); var index2 = $.inArray($(el)[0], lst); @@ -478,7 +478,7 @@ } } else { - if (!is_ctrl_key(evt)) { + if (!utilsModule.is_ctrl_key(evt)) { if ($.inArray(k, p4.users.sel) < 0) { p4.users.sel = new Array(); $('tr', cont).removeClass('selected'); diff --git a/templates/web/prod/WorkZone/Macros.html.twig b/templates/web/prod/WorkZone/Macros.html.twig index bef9793c3d..886384af86 100644 --- a/templates/web/prod/WorkZone/Macros.html.twig +++ b/templates/web/prod/WorkZone/Macros.html.twig @@ -45,12 +45,12 @@
    {{ 'action::exporter' | trans }} + onclick="prodModule.openDownloadModal('ssel={{basket.getId()}}');">{{ 'action::exporter' | trans }}
    {% if app.getAclForUser(app.getAuthenticatedUser()).has_right('modifyrecord') %} @@ -139,7 +139,7 @@
    {{ 'action::exporter' | trans }} + onclick="prodModule.openDownloadModal('ssel={{basket.getId()}}');">{{ 'action::exporter' | trans }}
    @@ -173,7 +173,7 @@
    + onclick="prodModule.deleteConfirmation('SSTT',this);return false;"> {{ 'action : supprimer' | trans }}
    @@ -227,12 +227,12 @@
    {{ 'action::exporter' | trans }} + onclick="prodModule.openDownloadModal('lst={{story.getRecord(app).get_serialize_key()}}');">{{ 'action::exporter' | trans }}
    {% if app.getAclForUser(app.getAuthenticatedUser()).has_right('modifyrecord') %} @@ -277,7 +277,7 @@ {% import 'common/thumbnail.html.twig' as thumbnail %} -
    diff --git a/templates/web/prod/actions/Bridge/callback.html.twig b/templates/web/prod/actions/Bridge/callback.html.twig index 5f397ca601..b5f33213f4 100644 --- a/templates/web/prod/actions/Bridge/callback.html.twig +++ b/templates/web/prod/actions/Bridge/callback.html.twig @@ -3,7 +3,7 @@ {% if error_message is empty %} diff --git a/templates/web/prod/actions/Bridge/index.html.twig b/templates/web/prod/actions/Bridge/index.html.twig index df25fcface..52050eefe4 100644 --- a/templates/web/prod/actions/Bridge/index.html.twig +++ b/templates/web/prod/actions/Bridge/index.html.twig @@ -158,7 +158,7 @@ $(function() { success: function(datas){ if(datas.success) { confirmBox.Close(); - publicator_reload_publicator(managerUrl); + pushModule.reloadBridge(managerUrl); } else { confirmBox.Close(); var alertBox = p4.Dialog.Create({ diff --git a/templates/web/prod/actions/Push.html.twig b/templates/web/prod/actions/Push.html.twig index 42ce0c2eae..4b18fa639d 100644 --- a/templates/web/prod/actions/Push.html.twig +++ b/templates/web/prod/actions/Push.html.twig @@ -266,8 +266,8 @@ {% endif %} diff --git a/templates/web/prod/actions/Tools/index.html.twig b/templates/web/prod/actions/Tools/index.html.twig index 567685852d..af5bde527c 100644 --- a/templates/web/prod/actions/Tools/index.html.twig +++ b/templates/web/prod/actions/Tools/index.html.twig @@ -638,7 +638,7 @@ $(document).ready(function(){ }).done(function(data) { // self reload tab with current active tab: var activeTab = tabs.tabs('option', 'active'); - toolREFACTOR($dialog.getOption('contextArgs'), activeTab); + prodModule.openToolModal($dialog.getOption('contextArgs'), activeTab); }).error(function(err) { alert('forbidden action') }); diff --git a/templates/web/prod/actions/delete_records_confirm.html.twig b/templates/web/prod/actions/delete_records_confirm.html.twig index 8f3eef1392..4ad95782ae 100644 --- a/templates/web/prod/actions/delete_records_confirm.html.twig +++ b/templates/web/prod/actions/delete_records_confirm.html.twig @@ -82,7 +82,7 @@ p4.WorkZone.Selection.remove(n); } }); - viewNbSelect(); + searchModule.viewNbSelect(); }, complete: function(){ $this.prop('disabled', false); diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 98668dcab7..f47d0ddace 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -407,7 +407,7 @@ @@ -372,22 +371,6 @@ - -
    @@ -719,9 +702,6 @@ - @@ -745,7 +725,43 @@ moduleId: 1, userId: {{app.getAuthenticatedUser().getId()}} }, - initialState: "{{ initialAppState }}" + initialState: "{{ initialAppState }}", + thesaurusConfig: { + replaceMessage: '{{ 'prod::thesaurusTab:dlg:Remplacement du candidat "%(from)s" par "%(to)s"' | trans }}', + replaceInProgressMsg: '{{ 'prod::thesaurusTab:dlg:Remplacement en cours.' | trans }}', + acceptMsg: '{{ 'prod::thesaurusTab:dlg:Acceptation en cours.' | trans }}', + deleteMsg: '{{ 'prod::thesaurusTab:dlg:Suppression en cours.' | trans }}', + candidateUniqueMsg: '{{ 'prod::thesaurusTab:dlg:accepter le terme candidat "%s" ?' | trans }}', + candidateManyMsg: '{{ 'prod::thesaurusTab:dlg:accepter les %d termes candidats ?' | trans }}', + acceptCandidateUniqueMsg: '{{ 'prod::thesaurusTab:wizard:clic-droit / accepter le terme candidat "%s"' | trans }}', + acceptCandidateManyMsg: '{{ "prod::thesaurusTab:wizard:clic-droit / accepter les %s termes candidats" | trans }}', + replaceCandidateUniqueMsg: '{{ "prod::thesaurusTab:dlg:remplacer le terme \"%s\" des fiches par :" | trans }}', + replaceCandidateManyMsg: '{{ "prod::thesaurusTab:dlg:remplacer les %d termes des fiches par :" | trans }}', + deleteCandidateUniqueMsg: '{{ 'prod::thesaurusTab:dlg:supprimer le terme "%s" des fiches ?' | trans }}', + deleteCandidateManyMsg: '{{ 'prod::thesaurusTab:dlg:supprimer les %d termes des fiches ?' | trans }}', + loadingMsg: '{{ 'prod::thesaurusTab:tree:loading' | trans }}', + searchMsg: '{{ 'boutton::chercher' | trans }}', + acceptSpecificTermMsg: '{{ 'prod::thesaurusTab:tmenu:Accepter comme terme specifique' | trans }}', + acceptSynonymeMsg: '{{ 'prod::thesaurusTab:tmenu:Accepter comme synonyme' | trans }}', + replaceWithMsg: '{{ 'prod::thesaurusTab:cmenu:Remplacer par...' | trans }}', + removeActionMsg: '{{ 'boutton::supprimer' | trans }}', + sbas: {{thesau_json_sbas|raw}}, + bas2sbas: {{thesau_json_bas2sbas|raw}}, + availableDatabases: [ + {% for base in search_datas['bases'] %}{% if base['thesaurus'] %}{ + id: {{base['sbas_id']}} + }{% if not loop.last %},{% endif %}{% endif %}{% endfor %} + ], + languagesCount: {{ thesau_languages|length }}, + langContextMenu: [ + {% for lng_code, lng in thesau_languages %} + { + label:'{% trans with {'%lng_code%' : lng_code} %}prod::thesaurusTab:cmenu:Accepter en %lng_code%{% endtrans %}', + lngCode: '{{lng_code}}', + }, + {% endfor %} + ] + } }) // prodApp.appEvents.emit('search.doCheckFilters', true); diff --git a/templates/web/prod/preview/tools.html.twig b/templates/web/prod/preview/tools.html.twig index 31243b2d46..5b8ee45a53 100644 --- a/templates/web/prod/preview/tools.html.twig +++ b/templates/web/prod/preview/tools.html.twig @@ -1,17 +1,16 @@ {% if (record.is_from_basket is empty) and app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(record.get_base_id(), 'canputinalbum') %}
    + class="baskAdder record-add-to-basket-action" data-db-id="{{record.get_sbas_id()}}" data-record-id="{{record.get_record_id()}}" title="{{ 'action : ajouter au panier' | trans }}">
    {% endif %} {% if record.is_from_basket() %} diff --git a/templates/web/prod/results/record.html.twig b/templates/web/prod/results/record.html.twig index 333a9cc227..9a488e9b1d 100644 --- a/templates/web/prod/results/record.html.twig +++ b/templates/web/prod/results/record.html.twig @@ -105,21 +105,20 @@
    {% if granted_on_collection(record.baseId, 'canputinalbum') and not record.story %}
    -
    +
    {{ 'action : ajouter au panier' | trans }}
    {% endif %} {% if granted_on_collection(record.baseId, 'candwnldpreview') or granted_on_collection(record.baseId, 'candwnldhd') %}
    -
    +
    {{ 'action : exporter' | trans }}
    {% endif %}
    - diff --git a/templates/web/prod/tab_thesaurus.html.twig b/templates/web/prod/tab_thesaurus.html.twig index e65368a98d..8fc481bc66 100644 --- a/templates/web/prod/tab_thesaurus.html.twig +++ b/templates/web/prod/tab_thesaurus.html.twig @@ -19,23 +19,21 @@ -
    +
    - + - +
    -
    +
      {% for base in search_datas['bases'] %} {% if base['thesaurus'] %} @@ -54,7 +52,7 @@ {% if has_access_to_module %}
      -
      +
        {% for base in search_datas['bases'] %} {% if base['cterms'] %} diff --git a/templates/web/prod/thesaurus.js.twig b/templates/web/prod/thesaurus.js.twig deleted file mode 100644 index c691e3d327..0000000000 --- a/templates/web/prod/thesaurus.js.twig +++ /dev/null @@ -1,1366 +0,0 @@ -function thesau_show() -{ - if(p4.thesau.currentWizard == "???") // first show of thesaurus - thesauShowWizard("wiz_0", false); -} - -function thesauCancelWizard() -{ - thesauShowWizard("wiz_0", true); -} - -function thesauShowWizard(wizard, refreshFilter) -{ - if(wizard != p4.thesau.currentWizard) - { - $("#THPD_WIZARDS DIV.wizard", p4.thesau.tabs).hide(); - $("#THPD_WIZARDS ." + wizard, p4.thesau.tabs).show(); - $("#THPD_T_treeBox", p4.thesau.tabs).css('top', $("#THPD_WIZARDS", p4.thesau.tabs).height()); - - p4.thesau.currentWizard = wizard; - - if(refreshFilter) - T_Gfilter_delayed($('#THPD_WIZARDS .gform', p4.thesau.tabs).eq(0).val(), 0); - - if(wizard == "wiz_0") // browse - $("#THPD_WIZARDS .th_cancel", p4.thesau.tabs).hide(); - else - $("#THPD_WIZARDS .th_cancel", p4.thesau.tabs).show(); - - if(wizard == "wiz_1") // accept - $("#THPD_WIZARDS .th_ok", p4.thesau.tabs).hide(); - else - $("#THPD_WIZARDS .th_ok", p4.thesau.tabs).show(); - - $("#THPD_WIZARDS FORM :text")[0].focus(); - } -} - - - -// here when the 'filter' forms is submited with key or button -// force immediate search -function T_Gfilter(o) -{ - var f; - if(o.nodeName=="FORM") - f = $(o).find("input[name=search_value]").val(); - else if(o.nodeName=="INPUT") - f = $(o).val(); - - T_Gfilter_delayed(f, 0); - - switch(p4.thesau.currentWizard) - { - case "wiz_0": // browse - break; - case "wiz_1": // accept - break; - case "wiz_2": // replace - T_replaceBy2(f); - break; - default: - break; - } -} - -// here when a key is pressed in the 'filter' form -function T_Gfilter_delayed(f, delay) -{ - switch(p4.thesau.currentWizard) - { - case "wiz_0": // browse - T_filter_delayed2(f, delay, "ALL"); - break; - case "wiz_1": // accept - T_filter_delayed2(f, delay, "CANDIDATE"); - break; - case "wiz_2": // replace - T_filter_delayed2(f, delay, "CANDIDATE"); - break; - default: - break; - } -} - - -function T_replaceBy2(f) -{ - if(trees.C._selInfos.n != 1) - return; - var msg; - var term = trees.C._selInfos.sel.eq(0).find("span span").html(); - - var cid = trees.C._selInfos.sel[0].getAttribute('id').split('.'); - cid.shift(); - var sbas = cid.shift(); - cid = cid.join('.'); - - trees.C._toReplace = { 'sbas':sbas, 'cid':cid, 'replaceby':f }; - - {% set message %} - {{ 'prod::thesaurusTab:dlg:Remplacement du candidat "%(from)s" par "%(to)s"' | trans }} - {% endset %} - - var msg = $.sprintf("{{ message | e('js') }}", {'from':term, 'to':f}); - - var confirmBox = dialogModule.dialog.create({ - size : 'Alert', - closeOnEscape : true, - cancelButton: true, - buttons: { - "Ok" : function() { - confirmBox.close(); - T_replaceCandidates_OK(); - } - } - }); - confirmBox.setContent(msg); -} - - -function T_filter_delayed2(f, delay, mode) -{ - if(this.timer) - { - window.clearTimeout(this.timer); - this.timer = null; - for(i in sbas) - { - if(sbas[i].seeker) - sbas[i].seeker.abort(); - } - } - - - if(delay < 10) - delay = 10; - this.timer = window.setTimeout( - function() - { - if(mode=='ALL') - { - // search in every base, everywhere - for(i in sbas) - { - var zurl = "/xmlhttp/search_th_term_prod.j.php" - + "?sbid=" + sbas[i].sbid - + "&t=" + encodeURIComponent(f); - - sbas[i].seeker = $.ajax({ - url: zurl, - type:'POST', - data: [], - dataType:'json', - success: function(j) - { - var z = '#TX_P\\.' + j.parm['sbid'] + '\\.T'; - - var o = $(z); - var isLast = o.hasClass('last'); - - o.replaceWith(j.html); - - if(isLast) - $(z).addClass('last'); - }, - error:function(){ - - }, - timeout:function(){ - - } - }); - } - } - else if(mode=='CANDIDATE') - { - // search only on the good base and the good branch(es) - for(i in sbas) - { - var zurl = "/xmlhttp/search_th_term_prod.j.php" - + "?sbid=" + sbas[i].sbid; - - if(sbas[i].sbid == trees.C._selInfos.sbas) - { - zurl += "&t=" + encodeURIComponent(f) - + "&field=" + encodeURIComponent(trees.C._selInfos.field); - } - sbas[i].seeker = $.ajax({ - url: zurl, - type:'POST', - data: [], - dataType:'json', - success: function(j) - { - var z = '#TX_P\\.' + j.parm['sbid'] + '\\.T'; - - var o = $(z); - var isLast = o.hasClass('last'); - - o.replaceWith(j.html); - - if(isLast) - $(z).addClass('last'); - }, - error:function(){ - - }, - timeout:function(){ - - } - }); - - } - } - }, - delay -); -} - - -// ====================================================================================================== - -function T_replaceCandidates_OK() -{ - {% set replaceing_msg %} - {{ 'prod::thesaurusTab:dlg:Remplacement en cours.' | trans }} - {% endset %} - - var replacingBox = dialogModule.dialog.create({ - size : 'Alert' - }); - replacingBox.setContent("{{ replaceing_msg | e('js') }}"); - - var parms = { - url: "/xmlhttp/replacecandidate.j.php", - data: { - "id[]" : trees.C._toReplace.sbas + "." + trees.C._toReplace.cid - , "t" : trees.C._toReplace.replaceby - , "debug" : '0' - }, - async: false, - cache: false, - dataType: "json", - timeout: 10*60*1000, // 10 minutes ! - success: function(result, textStatus) - { - trees.C._toReplace = null; - thesauShowWizard("wiz_0", false); - - replacingBox.close(); - - if(result.msg != '') - { - var alert = dialogModule.dialog.create({ - size : 'Alert', - closeOnEscape : true, - closeButton:true - }); - alert.setContent(result.msg); - } - - for(i in result.ctermsDeleted) - { - var cid = "#CX_P\\." + result.ctermsDeleted[i].replace(new RegExp("\\.", "g"), "\\."); // escape les '.' pour jquery - $(cid).remove(); - } - - }, - _ret: null // private alchemy - }; - - $.ajax( parms ); -} - - -function T_acceptCandidates_OK() -{ - {% set accepting_msg %} - {{ 'prod::thesaurusTab:dlg:Acceptation en cours.' | trans }} - {% endset %} - - var acceptingBox = dialogModule.dialog.create({ - size : 'Alert' - }); - acceptingBox.setContent("{{ accepting_msg | e('js') }}"); - - var t_ids = []; - var dst = trees.C._toAccept.dst.split('.'); - dst.shift(); - var sbid = dst.shift(); - dst = dst.join('.'); - same_sbas = true; - // obviously the candidates and the target already complies (same sbas, good tbranch) - trees.C._selInfos.sel.each( - function() - { - var x = this.getAttribute('id').split('.'); - x.shift(); - if(x.shift() != sbid) - same_sbas = false; - t_ids.push(x.join('.')); - } - ); - - if(!same_sbas) - return; - - var parms = { - url: "/xmlhttp/acceptcandidates.j.php", - data: { - // "debug": false, - "sbid" : sbid, - "tid" : dst, - "cid[]": t_ids, - "typ" : trees.C._toAccept.type, - "piv" : trees.C._toAccept.lng - }, - async: false, - cache: false, - dataType: "json", - timeout: 10*60*1000, // 10 minutes ! - success: function(result, textStatus) - { - for(i in result.refresh) - { - var zurl = "/xmlhttp/openbranch_prod.j.php" - + "?type=" + result.refresh[i].type - + "&sbid=" + result.refresh[i].sbid - + "&id=" + encodeURIComponent(result.refresh[i].id); - if(result.refresh[i].type=='T') - zurl += "&sortsy=1" ; - - $.get(zurl - , [] - , function(j) - { - var z = '#' + j.parm['type'] - + 'X_P\\.' - + j.parm['sbid'] + '\\.' - + j.parm['id'].replace(new RegExp("\\.", "g"), "\\."); // escape les '.' pour jquery - - $(z).children('ul').eq(0).replaceWith(j.html); - } - , "json"); - } - trees.C._toAccept = null; - thesauShowWizard("wiz_0",false); - acceptingBox.close(); - }, - error:function(){acceptingBox.close();}, - timeout:function(){acceptingBox.close();}, - _ret: null // private alchemy - }; - - $.ajax( parms ); -} - - -function C_deleteCandidates_OK() -{ - {% set deleting_msg %} - {{ 'prod::thesaurusTab:dlg:Suppression en cours.' | trans }} - {% endset %} - - var deletingBox = dialogModule.dialog.create({ - size : 'Alert' - }); - deletingBox.setContent("{{ deleting_msg | e('js') }}"); - - var t_ids = []; - var lisel = trees.C.tree.find("LI .selected"); - trees.C.tree.find("LI .selected").each( - function() - { - var x = this.getAttribute('id').split('.'); - x.shift(); - t_ids.push(x.join('.')); - } - ); - var parms = { - url:"/xmlhttp/replacecandidate.j.php", - data:{"id[]":t_ids}, - async:false, - cache:false, - dataType:"json", - timeout:10*60*1000, // 10 minutes ! - success: function(result, textStatus) - { - deletingBox.close(); - - if(result.msg != '') - { - var alert = dialogModule.dialog.create({ - size : 'Alert', - closeOnEscape : true, - closeButton:true - }); - alert.setContent(result.msg); - } - - for(i in result.ctermsDeleted) - { - var cid = "#CX_P\\." + result.ctermsDeleted[i].replace(new RegExp("\\.", "g"), "\\."); // escape les '.' pour jquery - $(cid).remove(); - } - }, - _ret: null - }; - - $.ajax( parms ); -} - - -// menu option T:accept as... -function T_acceptCandidates(menuItem, menu, type) -{ - var lidst = trees.T.tree.find("LI .selected"); - if(lidst.length != 1) - return; - - var lisel = trees.C.tree.find("LI .selected"); - if(lisel.length == 0) - return; - - {% set messageOne %} - {{ 'prod::thesaurusTab:dlg:accepter le terme candidat "%s" ?' | trans }} - {% endset %} - {% set messageMany %} - {{ 'prod::thesaurusTab:dlg:accepter les %d termes candidats ?' | trans }} - {% endset %} - - var msg; - - if(lisel.length == 1) - { - var term = lisel.eq(0).find("span span").html(); - msg = $.sprintf("{{ messageOne | e('js') }}", term); - } - else - { - msg = $.sprintf("{{ messageMany | e('js') }}", lisel.length); - } - - trees.C._toAccept.type = type; - trees.C._toAccept.dst = lidst.eq(0).attr("id"); - - var confirmBox = dialogModule.dialog.create({ - size : 'Alert', - closeOnEscape : true, - cancelButton: true, - buttons: { - "Ok" : function() { - confirmBox.close(); - T_acceptCandidates_OK(); - } - } - }); - confirmBox.setContent(msg); - -} - - -// menu option T:search -function T_search(menuItem, menu, cmenu, e, label) -{ - if(!menu._li) - return; - var tcids = menu._li.attr("id").split("."); - tcids.shift(); - var sbid = tcids.shift(); - var term = menu._li.find("span span").html(); - - doThesSearch('T', sbid, term, null); -} - - -function C_MenuOption(menuItem, menu, option, parm) -{ - if(!trees.C._selInfos) // nothing selected in candidates ? - return; - - trees.C._toAccept = null; // cancel previous 'accept' action anyway - trees.C._toReplace = null; // cancel previous 'replace' action anyway - switch(option) - { - case 'ACCEPT': - // glue selection to the tree - trees.C._toAccept = { 'lng': parm['lng'] } ; - - // display helpful message into the thesaurus box... - var msg; - - {% set messageOne %} - {{ 'prod::thesaurusTab:wizard:clic-droit / accepter le terme candidat "%s"' | trans }} - {% endset %} - {% set messageMany %} - {{ "prod::thesaurusTab:wizard:clic-droit / accepter les %s termes candidats" | trans }} - {% endset %} - - if(trees.C._selInfos.n == 1) - { - msg = $.sprintf("{{ messageOne | e('js') }}", menu._srcElement.find("span").html()); - } - else - { - msg = $.sprintf("{{ messageMany | e('js') }}", trees.C._selInfos.n); - } - - // set the content of the wizard - $("#THPD_WIZARDS .wiz_1 .txt").html(msg); - // ... and switch to the thesaurus tab - p4.thesau.tabs.tabs('option', 'active', 0); - thesauShowWizard("wiz_1", true); - - break; - - case 'REPLACE': - // display helpful message into the thesaurus box... - var msg; - - {% set messageOne %} - {{ "prod::thesaurusTab:dlg:remplacer le terme \"%s\" des fiches par :" | trans }} - {% endset %} - {% set messageMany %} - {{ "prod::thesaurusTab:dlg:remplacer les %d termes des fiches par :" | trans }} - {% endset %} - - if(trees.C._selInfos.n == 1) - { - var term = trees.C._selInfos.sel.eq(0).find("span span").html(); - msg = $.sprintf('{{ messageOne | e('js') }}', term); - } - else - { - msg = $.sprintf('{{ messageMany | e('js') }}', trees.C._selInfos.n); - } - - p4.thesau.tabs.tabs('option', 'active', 0); - - // set the content of the wizard - $("#THPD_WIZARDS .wiz_2 .txt").html(msg); - // ... and switch to the thesaurus tab - thesauShowWizard("wiz_2", true); - - break; - - case 'DELETE': - $("#THPD_WIZARDS DIV", p4.thesau.tabs).hide(); - // display helpful message into the thesaurus box... - - {% set messageOne %} - {{ 'prod::thesaurusTab:dlg:supprimer le terme "%s" des fiches ?' | trans }} - {% endset %} - {% set messageMany %} - {{ 'prod::thesaurusTab:dlg:supprimer les %d termes des fiches ?' | trans }} - {% endset %} - - var msg; - if(trees.C._selInfos.n == 1) - { - var term = trees.C._selInfos.sel.eq(0).find("span span").html(); - msg = $.sprintf("{{ messageOne | e('js') }}", term); - } - else - { - msg = $.sprintf("{{ messageMany | e('js') }}", trees.C._selInfos.n); - } - - var confirmBox = dialogModule.dialog.create({ - size : 'Alert', - closeOnEscape : true, - cancelButton: true, - buttons: { - "Ok" : function() { - confirmBox.close(); - C_deleteCandidates_OK(); - } - } - }); - confirmBox.setContent(msg); - - break; - } -} - - -function Xclick(e) -{ - var x = e.srcElement ? e.srcElement : e.target; - switch(x.nodeName) - { - case "DIV": // +/- - var li = $(x).closest('li'); - var tids = li.attr('id').split('.'); - var tid = tids.shift(); - var sbid = tids.shift(); - var type = tid.substr(0, 1); - if((type=='T'||type=='C') && tid.substr(1, 4)=="X_P") // TX_P ou CX_P - { - var ul = li.children('ul').eq(0); - if(ul.css("display")=='none' || prodApp.utils.is_ctrl_key(e)) - { - if(prodApp.utils.is_ctrl_key(e)) - { - ul.text("{{ 'prod::thesaurusTab:tree:loading' | trans }}"); - li.removeAttr('loaded'); - } - - ul.show(); - - if(!li.attr('loaded')) - { - var zurl = "/xmlhttp/openbranch_prod.j.php?type="+type+"&sbid="+sbid+"&id=" + encodeURIComponent(tids.join('.')); - if(li.hasClass('last')) - zurl += "&last=1"; - if(type=='T') - zurl += "&sortsy=1"; - $.get(zurl, [], function(j) - { - ul.replaceWith(j.html); - li.attr('loaded', '1'); - } - , "json"); - } - } - else - { - ul.hide(); - } - } - break; - case "SPAN": - var li = $(x).closest('li'); - var tids = li.attr('id').split('.'); - var type = tids[0].substr(0, 1); - if((type=='T' && tids.length>2) || tids.length == 4) // && tids[0].substr(0, 1)=='C') - { - tids.pop(); - var tid3 = tids.join('.'); - if(!utilsModule.is_ctrl_key(e) && !utilsModule.is_shift_key(e)) - { - $("LI", trees[type].tree).removeClass('selected'); - p4.thesau.lastClickedCandidate = null; - } - else - { - // if($("#THPD_C_treeBox")._lastClicked) - if(p4.thesau.lastClickedCandidate != null) - { - if(p4.thesau.lastClickedCandidate.tid3 != tid3) - { - $("LI", trees[type].tree).removeClass('selected'); - p4.thesau.lastClickedCandidate = null; - } - else - { - if(e.shiftKey) - { - var lip = li.parent().children('li'); - var idx0 = lip.index(p4.thesau.lastClickedCandidate.item); - var idx1 = lip.index(li); - if(idx0 < idx1) - lip.filter(function(index){return(index >= idx0 && index < idx1); }).addClass('selected'); - else - lip.filter(function(index){return(index > idx1 && index <= idx0); }).addClass('selected'); - } - } - } - } - li.toggleClass('selected'); - if(type == 'C') - { - p4.thesau.lastClickedCandidate = { item:li, tid3:tid3 }; - } - } - break; - default: - break; - } -} - -function TXdblClick(e) -{ - var x = e.srcElement ? e.srcElement : e.target; - switch(x.nodeName) - { - case "SPAN": // term - switch(p4.thesau.currentWizard) - { - case "wiz_0": // simply browse - var tid = $(x).closest('li').attr('id'); - if(tid.substr(0,5)=="TX_P.") - { - var tids = tid.split("."); - if(tids.length > 3) - { - var sbid = tids[1]; - var term = $(x).hasClass('separator') ? $(x).prev().text() : $(x).text(); - doThesSearch('T', sbid, term, null); - } - } - break; - case "wiz_2": // replace by - var tid = $(x).closest('li').attr('id'); - if(tid.substr(0,5)=="TX_P.") - { - var term = $(x).text(); - $("#THPD_WIZARDS .wiz_2 :text").val(term); - T_replaceBy2(term); - } - break; - } - break; - default: - break; - } -} - -function CXdblClick(e) -{ - var x = e.srcElement ? e.srcElement : e.target; - switch(x.nodeName) - { - case "SPAN": // term - var li = $(x).closest('li'); - var field = li.closest('[field]').attr('field'); - if(typeof(field) != "undefined") - { - var tid = li.attr('id'); - if(tid.substr(0,5)=="CX_P.") - { - var sbid = tid.split(".")[1]; - var term = $(x).text(); - doThesSearch('C', sbid, term, field); - } - } - break; - default: - break; - } -} - -function doThesSearch(type, sbid, term, field) -{ - var nck = 0; - $('#searchForm .adv_options :checkbox[name="bases[]"]').each( - function(i,n) - { - var base_id = $(n).val(); - - bas2sbas["b"+base_id].ckobj = this; - bas2sbas["b"+base_id].waschecked = this.checked; - if(bas2sbas["b"+base_id].sbid == sbid) - { - if(this.checked) - nck++; - } - else - { - this.checked = false; - } - } - ); - - if(nck == 0 || type=='C') - { - var i; - for(i in bas2sbas) - { - if(bas2sbas[i].sbid == sbid) - bas2sbas[i].ckobj.checked = true; - } - } - if(type=='T') - v = '[' + term + ']'; - else - v = field + '="' + term + '"'; - prodApp.appEvents.emit('facets.doResetSelectedFacets'); - $('#EDIT_query').val(v); - prodApp.appEvents.emit('search.doCheckFilters'); - prodApp.appEvents.emit('search.doNewSearch', v); - //searchModule.newSearch(v); -} - - -function thesau_clickThesaurus(event) // onclick dans le thesaurus -{ - // on cherche ou on a clique - for(e=event.srcElement ? event.srcElement : event.target; e && ((!e.tagName) || (!e.id)); e=e.parentNode) - ; - if(e) - { - switch(e.id.substr(0,4)) - { - case "TH_P": // +/- de deploiement de mot - js = "thesau_thesaurus_ow('"+e.id.substr(5)+"')"; - self.setTimeout(js, 10); - break; - } - } - return(false); -} - -function thesau_dblclickThesaurus(event) // onclick dans le thesaurus -{ - var err; - try - { - p4.thesau.lastTextfocus.focus(); - } - catch(err) - { - return; - } - - // on cherche ou on a clique - for(e=event.srcElement; e && ((!e.tagName) || (!e.id)); e=e.parentNode) - ; - if(e) - { - switch(e.id.substr(0,4)) - { - case "GL_W": // double click sur le mot - var t = e.id.split("."); - t.shift(); - var sbid = t.shift(); - var thid = t.join("."); - var url = "/xmlhttp/getsy_prod.x.php"; - var parms = "bid=" + sbid + "&id=" + thid; - - var xmlhttp = new XMLHttpRequest(); - xmlhttp.open("POST", url, false); - xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); - xmlhttp.send(parms); - var ret = xmlhttp.responseXML; - - result = ret.getElementsByTagName("result"); - if(result.length==1) - { - val = result.item(0).getAttribute("t"); - replaceEditSel(val); - } - break; - } - } - return(false); -} - -function thesaurus_cw(id) // on clique sur un mot de thesaurus -{ - return(false); -} - -function thesau_thesaurus_ow(id) // on ouvre ou ferme une branche de thesaurus -{ - var o = document.getElementById("TH_K."+id); - if(o.className=="o") - { - // on ferme - o.className = "c"; - document.getElementById("TH_P."+id).innerHTML = "+"; - document.getElementById("TH_K."+id).innerHTML = "{{ 'prod::thesaurusTab:tree:loading' | trans }}"; - } - else if(o.className=="c" || o.className=="h") - { - // on ouvre - o.className = "o"; - document.getElementById("TH_P."+id).innerHTML = "-"; - - var t_id = id.split("."); - var sbas_id = t_id[0]; - t_id.shift(); - var thid = t_id.join("."); - var url = "/xmlhttp/getterm_prod.x.php"; - var parms = "bid=" + sbas_id; - parms += "&lng="+p4.lng; - parms += "&sortsy=1"; - parms += "&id=" + thid; - parms += "&typ=TH"; - - p4.thesau.thlist['s'+sbas_id].openBranch(id, thid); - } - return(false); -} - -function replaceEditSel(value) -{ - if(!p4.thesau.lastTextfocus || !p4.thesau.lastTextfocus.selectedTerm) - return; - - p4.thesau.lastTextfocus.value = p4.thesau.lastTextfocus.value.substr(0, p4.thesau.lastTextfocus.selectedTerm.start) + value + p4.thesau.lastTextfocus.value.substr(p4.thesau.lastTextfocus.selectedTerm.end); - if(typeof(document.selection) != 'undefined') - { - // explorer - var range = p4.thesau.lastTextfocus.createTextRange(); - range.move('character', p4.thesau.lastTextfocus.selectedTerm.start + value.length); - range.select(); - } - else if(typeof(p4.thesau.lastTextfocus.selectionStart) != 'undefined') - { - // gecko (safari) - p4.thesau.lastTextfocus.selectionStart = p4.thesau.lastTextfocus.selectionEnd = p4.thesau.lastTextfocus.selectedTerm.start + value.length; - } - cbEditing2(p4.thesau.lastTextfocus, "MOUSEUP"); // force le calcul de la nouvelle selection - p4.thesau.lastTextfocus.focus(); - return; -} - - -function ThesauThesaurusSeeker(sbas_id) -{ - this.sbas_id = sbas_id; - this._ctimer = null; - this._xmlhttp = null; - this.tObj = { 'TH_searching':null , 'TH_P':null , 'TH_K':null }; - this.search = function(txt) { - if(this._ctimer) - clearTimeout(this._ctimer); - var js = "p4.thesau.thlist['s"+this.sbas_id+"'].search_delayed('"+txt.replace("'", "\\'")+"');" ; - this._ctimer = setTimeout(js, 100); - } ; - this.search_delayed = function(txt) { - var me = this; - if($this._xmlttp.abort && typeof $this._xmlttp.abort == 'function') - { - this._xmlhttp.abort(); - } - var url = "/xmlhttp/openbranches_prod.x.php"; - var parms = { - bid : this.sbas_id, - t : txt, - mod : "TREE" - }; - - this._xmlhttp = $.ajax({ - url: url, - type:'POST', - data: parms, - success: function(ret) - { - me.xmlhttpstatechanged(ret); - }, - error:function(){ - - }, - timeout:function(){ - - } - }); - - this._ctimer = null; - } ; - this.openBranch = function(id, thid) { - var me = this; - if($this._xmlttp.abort && typeof $this._xmlttp.abort == 'function') - { - this._xmlhttp.abort(); - } - var url = "/xmlhttp/getterm_prod.x.php"; - var parms = { - bid : this.sbas_id, - sortsy : 1, - id : thid, - typ : "TH" - } - - this._xmlhttp = $.ajax({ - url: url, - type:'POST', - data: parms, - success: function(ret) - { - me.xmlhttpstatechanged(ret, id); - }, - error:function(){ - - }, - timeout:function(){ - - } - }); - - }; - this.xmlhttpstatechanged = function(ret, id) { - try - { - if(!this.tObj["TH_searching"]) - this.tObj["TH_searching"] = document.getElementById("TH_searching"); - this.tObj["TH_searching"].src = "/assets/common/images/icons/ftp-loader-blank.gif"; - - if(ret) // && (typeof(ret.parsed)=="undefined" || ret.parsed)) - { - var htmlnodes = ret.getElementsByTagName("html"); - if(htmlnodes && htmlnodes.length==1 && (htmlnode=htmlnodes.item(0).firstChild)) - { - if(typeof(id)=="undefined") - { - // called from search or 'auto' : full thesaurus search - if(!this.tObj["TH_P"]) - this.tObj["TH_P"] = document.getElementById("TH_P."+this.sbas_id+".T"); - if(!this.tObj["TH_K"]) - this.tObj["TH_K"] = document.getElementById("TH_K."+this.sbas_id+".T"); - this.tObj["TH_P"].innerHTML = "..."; - this.tObj["TH_K"].className = "h"; - this.tObj["TH_K"].innerHTML = htmlnode.nodeValue; - } - else - { - // called from 'openBranch' - // var js = "document.getElementById('TH_K."+thid+"').innerHTML = \""+htmlnode.nodeValue+"\""; - // self.setTimeout(js, 10); - document.getElementById("TH_K."+id).innerHTML = htmlnode.nodeValue; - } - } - } - } - catch(err) - { - ; - } - }; -} - - -function cbEditing2(textarea, act) -{ - var sbas_id = p4.edit.sbas_id; - tmpCurField = 0; - - if(textarea.id=="idZTextArea") - { - tmpCurField = p4.edit.curField ; - } - else - { - if(textarea.id=="idZTextAreaReg") - tmpCurField = p4.edit.curFieldReg; - } - - p4.thesau.lastTextfocus = textarea; - textarea.selectedTerm = null; - var p0 = -1; - var p1 = -1; - if(typeof(document.selection) != 'undefined') - { - // ici si explorer - var range = document.selection.createRange(); - var i; - var oldrange = range.duplicate(); - for(i=0; i<200; i++, p0++) - { - pe = range.parentElement(); - if(pe != textarea) - break; - range.moveStart("character", -1); - } - range = oldrange.duplicate(); - for(i=0; i<200; i++, p1++) - { - pe = range.parentElement(); - if(pe != textarea) - break; - range.moveEnd("character", -1); - } - } - else if(typeof(textarea.selectionStart) != "undefined") - { - // ici si gecko (safari) - p0 = textarea.selectionStart; - p1 = textarea.selectionEnd; - } - if(p0 != -1 && p1 != -1) - { - var c; - // on etend les positions a tout le keyword (entre ';') - t = textarea.value; - l = t.length; - for( ; p0 > 0; p0--) - { - c = t.charCodeAt(p0-1); - if(c==59 || c==10 || c==13) // 59==";" - break; - } - for( ; p1 < l; p1++) - { - c = t.charCodeAt(p1); - if(c==59 || c==10 || c==13) - break; - } - // on copie le resultat dans le textarea - textarea.selectedTerm = { start:p0, end:p1 }; - - // on cherche le terme dans le thesaurus - var zText = textarea.value.substr(p0, p1-p0); - - if(document.forms["formSearchTH"].formSearchTHck.checked) - { - if(zText && zText.length>2 && document.forms["formSearchTH"].formSearchTHfld.value != zText) - { - document.forms["formSearchTH"].formSearchTHfld.value = zText; - - document.getElementById("TH_searching").src = "/assets/common/images/icons/ftp-loader.gif"; - p4.thesau.thlist['s'+sbas_id].search(zText); - } - } - } - return(true); -} - -function thesauSearchAll() -{ - var value = document.forms["formSearchTH"].formSearchTHfld.value; - if(value == "") - { - loaded(); - self.setTimeout('document.forms["formSearchTH"].formSearchTHfld.focus()', 100); - } - else - { - var url, i, bid; - document.getElementById("TH_searching").src = "/assets/common/images/icons/ftp-loader.gif"; - for(i in p4.thesau.thlist) - { - thlist[i].search(value); - } - } -} - -function clkOnglet(onglet) -{ - switch(onglet) - { - case "FULL": - document.getElementById("TH_Ofull").style.display = "block"; - document.getElementById("TH_Oclip").style.display = "none"; - document.getElementById("TH_Otabs_full").className = "actif"; - document.getElementById("TH_Otabs_clipboard").className = "inactif"; - break; - case "PROP": - document.getElementById("TH_Ofull").style.display = "none"; - document.getElementById("TH_Oclip").style.display = "none"; - document.getElementById("TH_Otabs_full").className = "inactif"; - document.getElementById("TH_Otabs_clipboard").className = "inactif"; - break; - case "CLIP": - document.getElementById("TH_Ofull").style.display = "none"; - document.getElementById("TH_Oclip").style.display = "block"; - document.getElementById("TH_Otabs_full").className = "inactif"; - document.getElementById("TH_Otabs_clipboard").className = "actif"; - break; - } -} - -function startThesaurus(){ - - p4.thesau.thlist = { - {% set first = 1 %} - {% for base in search_datas['bases'] %} - {% if base['thesaurus'] %} - {% if first == 0 %},{% endif %} - "s{{base['sbas_id']}}": new ThesauThesaurusSeeker({{base['sbas_id']}}) - {% set first = 0 %} - {% endif %} - {% endfor %} - }; - p4.thesau.currentWizard = "???"; - - sbas = {{thesau_json_sbas|raw}}; - bas2sbas = {{thesau_json_bas2sbas|raw}}; - - p4.thesau.lastTextfocus = null; - - p4.thesau.lastClickedCandidate = null; - - p4.thesau.tabs = $("#THPD_tabs"); - p4.thesau.tabs.tabs(); - - trees = { - 'T':{ - 'tree' : $("#THPD_T_tree", p4.thesau.tabs) - }, - 'C':{ - 'tree' : $("#THPD_C_tree", p4.thesau.tabs) - , '_toAccept' : null // may contain : {'type', 'dst', 'lng'} - , '_toReplace' : null // - , '_selInfos' : null // may contain : {'sel':lisel, 'field':field, 'sbas':sbas, 'n':lisel.length} - } - }; - - trees.T.tree.contextMenu( - [ - { - label:'{{ 'boutton::chercher' | trans }}', - onclick:function(menuItem, menu, cmenu, e, label) - { - T_search(menuItem, menu, cmenu, e, label); - } - }, - { - label:'{{ 'prod::thesaurusTab:tmenu:Accepter comme terme specifique' | trans }}', - onclick:function(menuItem, menu) - { - T_acceptCandidates(menuItem, menu, 'TS'); - } - }, - { - label:'{{ 'prod::thesaurusTab:tmenu:Accepter comme synonyme' | trans }}', - onclick:function(menuItem, menu) - { - T_acceptCandidates(menuItem, menu, 'SY'); - } - } - ] - , - { - className:"THPD_TMenu", - beforeShow:function() - { - var menuOptions = $(this.menu).find(".context-menu-item"); - menuOptions.eq(1).addClass("context-menu-item-disabled"); - menuOptions.eq(2).addClass("context-menu-item-disabled"); - - var x = this._showEvent.srcElement ? this._showEvent.srcElement : this._showEvent.target; - var li = $(x).closest("li"); - this._li = null; - var tcids = li.attr("id").split("."); - if(tcids.length > 2 && tcids[0] == "TX_P" && tcids[2] != 'T' && x.nodeName != "LI") - { - this._li = li; - tcids.shift(); - var sbas = tcids.shift(); - - // this._srcElement = li; // private alchemy - if(!li.hasClass('selected')) - { - // rclick OUTSIDE the selection : unselect all - trees.T.tree.find("LI").removeClass('selected'); - - $("li", trees.T.tree).removeClass('selected'); - li.addClass('selected'); - } - - if(trees.C._selInfos && trees.C._selInfos.sbas == sbas) - { - // whe check if the candidates can be validated here - // aka does the tbranch of the field (of candidates) reaches the paste location ? - var parms = { url:"/xmlhttp/checkcandidatetarget.j.php" - + "?sbid=" + sbas - + "&acf=" + encodeURIComponent(trees.C._selInfos.field) - + "&id=" + encodeURIComponent(tcids.join('.')) , - data:[], - async:false, - cache:false, - dataType:"json", - timeout:1000, - success: function(result, textStatus) - { - this._ret = result ; - if(result.acceptable) - { - menuOptions.eq(1).removeClass("context-menu-item-disabled"); - menuOptions.eq(2).removeClass("context-menu-item-disabled"); - } - }, - _ret: null // private alchemy - }; - - $.ajax( parms ); - - } - } - return(true); - } - } -); - - trees.C.tree.contextMenu( - [ - {% for lng_code, lng in thesau_languages %} - { - label:'{% trans with {'%lng_code%' : lng_code} %}prod::thesaurusTab:cmenu:Accepter en %lng_code%{% endtrans %}', - onclick:function(menuItem, menu) - { - C_MenuOption(menuItem, menu, "ACCEPT", {'lng':'{{lng_code}}'}); - } - } - , - {% endfor %} - { - label:'{{ 'prod::thesaurusTab:cmenu:Remplacer par...' | trans }}', -// disabled:true, - onclick:function(menuItem, menu) - { - C_MenuOption(menuItem, menu, 'REPLACE', null); - } - }, - { - label:'{{ 'boutton::supprimer' | trans }}', -// disabled:true, - onclick:function(menuItem, menu) - { - C_MenuOption(menuItem, menu, 'DELETE', null); - } - } - ] - , - { - beforeShow:function() - { - var ret = false; - - var x = this._showEvent.srcElement ? this._showEvent.srcElement : this._showEvent.target; - var li = $(x).closest("li"); - - if(!li.hasClass('selected')) - { - // rclick OUTSIDE the selection : unselect all - // lisel.removeClass('selected'); - trees.C.tree.find("LI").removeClass('selected'); - p4.thesau.lastClickedCandidate = null; - } - var tcids = li.attr("id").split("."); - if(tcids.length == 4 && tcids[0] == "CX_P" && x.nodeName != "LI") - { - // candidate context menu only clicking on final term - if(!li.hasClass('selected')) - li.addClass('selected'); - // this._cutInfos = { sbid:tcids[1], field:li.parent().attr('field') }; // private alchemy - this._srcElement = li; // private alchemy - - // as selection changes, compute usefull info (field, sbas) - var lisel = trees.C.tree.find("LI .selected"); - if(lisel.length > 0) - { - // lisel are all from the same candidate field, so check the first li - var li0 = lisel.eq(0); - var field = li0.parent().attr("field"); - var sbas = li0.attr("id").split('.')[1]; - - // glue selection info to the tree - trees.C._selInfos = {'sel':lisel, 'field':field, 'sbas':sbas, 'n':lisel.length} ; - -// $(this.menu).find('.context-menu-item')[{{ thesau_languages|length }}].addClass('context-menu-item-disabled'); - if(lisel.length == 1) - { - $(this.menu).find('.context-menu-item').eq({{ thesau_languages|length }}).removeClass('context-menu-item-disabled'); - } - else - { - $(this.menu).find('.context-menu-item').eq({{ thesau_languages|length }}).addClass('context-menu-item-disabled'); - } - } - else - { - trees.C._selInfos = null; - } - - ret = true; - } - return(ret); - } - } -); - -} diff --git a/templates/web/prod/upload/upload.html.twig b/templates/web/prod/upload/upload.html.twig index d007349716..1e5d5a1565 100644 --- a/templates/web/prod/upload/upload.html.twig +++ b/templates/web/prod/upload/upload.html.twig @@ -39,7 +39,7 @@
    - @@ -371,7 +371,7 @@ + onClick="$('#EDITWINDOW').fadeOut();return(false);" /> From 54d931207ac8b2396336d20b84916234f17d321c Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Thu, 31 Mar 2016 10:18:28 +0200 Subject: [PATCH 189/383] Bump Phraseanet production client - Record Editor refacto --- lib/Alchemy/Phrasea/Controller/Prod/EditController.php | 2 ++ package.json | 2 +- templates/web/prod/actions/Push.html.twig | 2 +- templates/web/prod/index.html.twig | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Prod/EditController.php b/lib/Alchemy/Phrasea/Controller/Prod/EditController.php index 453e8e41ec..354aa27ddc 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/EditController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/EditController.php @@ -154,7 +154,9 @@ class EditController extends Controller ]; $elements[$indice]['statbits'] = []; + $elements[$indice]['editableStatus'] = false; if ($this->getAclForUser()->has_right_on_base($record->getBaseId(), 'chgstatus')) { + $elements[$indice]['editableStatus'] = true; foreach ($status as $n => $s) { $tmp_val = substr(strrev($record->get_status()), $n, 1); $elements[$indice]['statbits'][$n]['value'] = ($tmp_val == '1') ? '1' : '0'; diff --git a/package.json b/package.json index 099df7206b..4893035bb8 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,6 @@ "postinstall": "./node_modules/.bin/gulp install;" }, "dependencies": { - "phraseanet-production-client": "~0.8.0" + "phraseanet-production-client": "~0.9.0" } } diff --git a/templates/web/prod/actions/Push.html.twig b/templates/web/prod/actions/Push.html.twig index c6f5099652..04fb3373ec 100644 --- a/templates/web/prod/actions/Push.html.twig +++ b/templates/web/prod/actions/Push.html.twig @@ -8,7 +8,7 @@ {% endif %}
    - +
    {% else %} diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 16252d49f9..50c3e50ae6 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -725,6 +725,7 @@ userId: {{app.getAuthenticatedUser().getId()}} }, initialState: "{{ initialAppState }}", + geonameServerUrl: '{{ app['geonames.server-uri'] }}', thesaurusConfig: { replaceMessage: '{{ 'prod::thesaurusTab:dlg:Remplacement du candidat "%(from)s" par "%(to)s"' | trans }}', replaceInProgressMsg: '{{ 'prod::thesaurusTab:dlg:Remplacement en cours.' | trans }}', From 472bc088e240a3e2987a0e940fea1b53ebc3679f Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Fri, 1 Apr 2016 11:12:54 +0200 Subject: [PATCH 190/383] Bump Phraseanet production client Added geoname datasource into record editor --- package.json | 2 +- .../www/prod/skins/ui-components/_modal-edit.scss | 15 ++++++++++++--- templates/web/prod/actions/edit_default.html.twig | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4893035bb8..a03c71ef68 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,6 @@ "postinstall": "./node_modules/.bin/gulp install;" }, "dependencies": { - "phraseanet-production-client": "~0.9.0" + "phraseanet-production-client": "~0.10.0" } } diff --git a/resources/www/prod/skins/ui-components/_modal-edit.scss b/resources/www/prod/skins/ui-components/_modal-edit.scss index 890a17bbe6..26d4d82048 100644 --- a/resources/www/prod/skins/ui-components/_modal-edit.scss +++ b/resources/www/prod/skins/ui-components/_modal-edit.scss @@ -482,18 +482,27 @@ div.thesaurus { top: 0px; left: 10px; right: 10px; - margin-top: 21px; + margin-top: 0px; border-top: 1px solid $workzoneTabTopBorder; border-radius: 0; - height: 43px; + height: 32px; border-bottom: 1px solid $workzoneTabBorderBottom; } .ui-tabs-panel { position: absolute; - top: 56px; + top: 32px; left: 0; bottom: 0; right: 0; } } + #geonameTabContainer { + ul.geoname-results { + list-style-type: none; + margin: 10px; + .geoname-add-action { + cursor: pointer; + } + } + } } diff --git a/templates/web/prod/actions/edit_default.html.twig b/templates/web/prod/actions/edit_default.html.twig index 4276faa55d..fa93393b6f 100644 --- a/templates/web/prod/actions/edit_default.html.twig +++ b/templates/web/prod/actions/edit_default.html.twig @@ -244,10 +244,10 @@ {% if thesaurus %}
  • {{ 'phraseanet:: thesaurus' | trans }}
  • {% endif %} -
  • {{ 'phraseanet:: presse-papier' | trans }}
  • {{ 'phraseanet:: preview' | trans }}
  • {{ 'prod::editing: rechercher-remplacer' | trans }}
  • {{ 'prod::editing: modeles de fiches' | trans }}
  • +
  • {{ 'phraseanet:: presse-papier' | trans }}
  • {% if thesaurus %}
    From 73eb344019c1345e1c91483846f3396f6fa792ca Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Fri, 1 Apr 2016 15:14:48 +0200 Subject: [PATCH 191/383] Bump Phraseanet production client - fix search form and light refactoring - fix double download - misc fixes --- package.json | 2 +- templates/web/prod/actions/Download/prepare.html.twig | 4 ++-- templates/web/prod/index.html.twig | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index a03c71ef68..c6cf8c3ea6 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,6 @@ "postinstall": "./node_modules/.bin/gulp install;" }, "dependencies": { - "phraseanet-production-client": "~0.10.0" + "phraseanet-production-client": "~0.11.0" } } diff --git a/templates/web/prod/actions/Download/prepare.html.twig b/templates/web/prod/actions/Download/prepare.html.twig index a55fa492c9..89eceba38e 100644 --- a/templates/web/prod/actions/Download/prepare.html.twig +++ b/templates/web/prod/actions/Download/prepare.html.twig @@ -108,16 +108,16 @@ $.post("{{ path('execute_download', {'token': token.getValue(), 'type': type, 'anonymous': anonymous}) }}", function(data){ if(data.success) { $('form[name=download]').submit(); + } else { + setTimeout("location.reload()", "{{ time ~ "000" }}"); } return false; }); - setTimeout("location.reload()", "{{ time ~ "000" }}"); {% elseif (list['complete'] is defined and list['complete'])%} {# Zip done #} // Get files $('form[name=download]').submit(); {% else %} - setTimeout("location.reload()", "{{ time ~ "000" }}"); {% endif %} }); diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 50c3e50ae6..c239959da5 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -213,8 +213,7 @@
    - -
    - {{ 'Preferences' | trans }} + {{ 'Preferences' | trans }} | @@ -684,7 +684,7 @@
    -
    @@ -765,7 +765,7 @@ }) $(document).ready(function(){ - p4.reg_delete="{% if app['settings'].getUserSetting(app.getAuthenticatedUser(), "warning_on_delete_story") %}true{% else %}false{% endif %}"; + workzoneModule.setRemoveWarning("{% if app['settings'].getUserSetting(app.getAuthenticatedUser(), "warning_on_delete_story") %}true{% else %}false{% endif %}"); }); function setCss(color) { diff --git a/templates/web/prod/orders/order_item.html.twig b/templates/web/prod/orders/order_item.html.twig index de3897448e..3c930487c6 100644 --- a/templates/web/prod/orders/order_item.html.twig +++ b/templates/web/prod/orders/order_item.html.twig @@ -116,7 +116,7 @@ $(document).ready(function(){ var $this = $(this); - if(is_ctrl_key(event)) + if(utilsModule.is_ctrl_key(event)) { if($this.hasClass('selected')) { $this.removeClass('selected'); @@ -126,7 +126,7 @@ $(document).ready(function(){ } else { - if(is_shift_key(event)) + if(utilsModule.is_shift_key(event)) { var first = false, last = false; diff --git a/templates/web/prod/preview/appears_in.html.twig b/templates/web/prod/preview/appears_in.html.twig index 8e7acd40af..ca7772cdce 100644 --- a/templates/web/prod/preview/appears_in.html.twig +++ b/templates/web/prod/preview/appears_in.html.twig @@ -3,7 +3,7 @@
    • {{ 'Apparait aussi dans ces reportages' | trans }}
    • {% for par in parents %} -
    • {{ par.get_title() }} @@ -16,7 +16,7 @@
      • {{ 'Apparait aussi dans ces paniers' | trans }}
      • {% for basket in baskets %} -
      • {##} diff --git a/templates/web/prod/preview/basket_train.html.twig b/templates/web/prod/preview/basket_train.html.twig index 02c974d632..f6fa06fa76 100644 --- a/templates/web/prod/preview/basket_train.html.twig +++ b/templates/web/prod/preview/basket_train.html.twig @@ -49,10 +49,10 @@
    - -
    - {{ 'preview:: demarrer le diaporama' | trans }} - {{ 'preview:: arreter le diaporama' | trans }} + +
    + {{ 'preview:: demarrer le diaporama' | trans }} + {{ 'preview:: arreter le diaporama' | trans }}
    diff --git a/templates/web/prod/preview/caption.html.twig b/templates/web/prod/preview/caption.html.twig index a966f22c91..9b3bf9c82a 100644 --- a/templates/web/prod/preview/caption.html.twig +++ b/templates/web/prod/preview/caption.html.twig @@ -5,7 +5,7 @@ {% if can_edit %}
    - + {{ 'action : editer' | trans }} diff --git a/templates/web/prod/preview/feed_train.html.twig b/templates/web/prod/preview/feed_train.html.twig index 3e012d4ea5..7f18cc1e4e 100644 --- a/templates/web/prod/preview/feed_train.html.twig +++ b/templates/web/prod/preview/feed_train.html.twig @@ -47,10 +47,10 @@
    - -
    - {{ 'preview:: demarrer le diaporama' | trans }} - {{ 'preview:: arreter le diaporama' | trans }} + +
    + {{ 'preview:: demarrer le diaporama' | trans }} + {{ 'preview:: arreter le diaporama' | trans }}
    diff --git a/templates/web/prod/preview/reg_train.html.twig b/templates/web/prod/preview/reg_train.html.twig index e7f4b244da..df0b278bce 100644 --- a/templates/web/prod/preview/reg_train.html.twig +++ b/templates/web/prod/preview/reg_train.html.twig @@ -25,7 +25,7 @@ %}
    -
    - -
    - {{ 'preview:: demarrer le diaporama' | trans }} - {{ 'preview:: arreter le diaporama' | trans }} + +
    + {{ 'preview:: demarrer le diaporama' | trans }} + {{ 'preview:: arreter le diaporama' | trans }}
    diff --git a/templates/web/prod/preview/result_train.html.twig b/templates/web/prod/preview/result_train.html.twig index 822eb42304..3ccb066060 100644 --- a/templates/web/prod/preview/result_train.html.twig +++ b/templates/web/prod/preview/result_train.html.twig @@ -43,10 +43,10 @@
    - -
    - {{ 'preview:: demarrer le diaporama' | trans }} - {{ 'preview:: arreter le diaporama' | trans }} + +
    + {{ 'preview:: demarrer le diaporama' | trans }} + {{ 'preview:: arreter le diaporama' | trans }}
    diff --git a/templates/web/prod/preview/result_train_options.html.twig b/templates/web/prod/preview/result_train_options.html.twig index da5af48f49..a115724f8c 100644 --- a/templates/web/prod/preview/result_train_options.html.twig +++ b/templates/web/prod/preview/result_train_options.html.twig @@ -1,10 +1,10 @@
    - - {{ 'preview:: demarrer le diaporama' | trans }} - {{ 'preview:: arreter le diaporama' | trans }} -
    + + {{ 'preview:: demarrer le diaporama' | trans }} + {{ 'preview:: arreter le diaporama' | trans }} +
    diff --git a/templates/web/prod/preview/tools.html.twig b/templates/web/prod/preview/tools.html.twig index 422210e269..4176fabeea 100644 --- a/templates/web/prod/preview/tools.html.twig +++ b/templates/web/prod/preview/tools.html.twig @@ -2,7 +2,7 @@ {% if (record.is_from_basket is empty) and app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(record.get_base_id(), 'canputinalbum') %}
    + onclick="prodModule.addToBasket('{{record.get_sbas_id()}}','{{record.get_record_id()}}',false,this);return(false);">
    {% endif %} @@ -11,18 +11,18 @@ {% endif %} -
    +
    {% if app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(record.get_base_id(), 'candwnldhd') or app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(record.get_base_id(), 'candwnldpreview') %} -
    +
    {# #} diff --git a/templates/web/prod/results/item.html.twig b/templates/web/prod/results/item.html.twig index b4a554fa98..54cecf32e7 100644 --- a/templates/web/prod/results/item.html.twig +++ b/templates/web/prod/results/item.html.twig @@ -6,7 +6,7 @@ sbas="{{ record.databoxId }}" id="{{'PUBLI_' ~ entry.id ~ '_' ~ record.id }}" class="IMGT diapo type-{{ record.type }}" - onDblClick="openPreview('FEED',{{ record.getNumber }},{{ entry.id }});" + onDblClick="recordPreviewModule.openPreview('FEED',{{ record.getNumber }},{{ entry.id }});" >
    diff --git a/templates/web/prod/results/record.html.twig b/templates/web/prod/results/record.html.twig index 48dc7cf2f1..72ad795d2b 100644 --- a/templates/web/prod/results/record.html.twig +++ b/templates/web/prod/results/record.html.twig @@ -5,7 +5,7 @@ sbas="{{ record.databoxId }}" id="{{ prefix|default('IMGT') }}_{{ record.id }}" class="IMGT diapo {% if record.story %}grouping{% endif %} type-{{ record.type }}" - onDblClick="openPreview('{{ record.story ? 'REG' : 'RESULT' }}', '{{ record.position|default(0) }}', '{{ record.id }}');"> + onDblClick="recordPreviewModule.openPreview('{{ record.story ? 'REG' : 'RESULT' }}', '{{ record.position|default(0) }}', '{{ record.id }}');">
    @@ -103,7 +103,7 @@ {% if granted_on_collection(record.baseId, 'canputinalbum') and not record.story %}
    + onclick="prodModule.addToBasket('{{record.databoxId}}','{{record.recordId}}',false,this);return(false);"> {{ 'action : ajouter au panier' | trans }}
    @@ -111,14 +111,14 @@ {% if granted_on_collection(record.baseId, 'candwnldpreview') or granted_on_collection(record.baseId, 'candwnldhd') %}
    + onclick="prodModule.openDownloadModal('{{record.id}}','lst');return(false);"> {{ 'action : exporter' | trans }}
    {% endif %}
    + onclick="prodModule.openPrintModal('{{record.id}}');return(false);"> {{ 'action : print' | trans }}
    @@ -128,7 +128,7 @@ {% if record.story is empty %}
    + onclick="prodModule.openShareModal('{{record.baseId}}','{{record.recordId}}');"> {{ 'reponses:: partager' | trans }}
    From 394fb3eb11c69bd00a0271c0811ce43a8f351209 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Thu, 25 Feb 2016 17:28:09 +0100 Subject: [PATCH 101/383] hotfix js --- resources/www/prod/js/core/selectable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/www/prod/js/core/selectable.js b/resources/www/prod/js/core/selectable.js index 24f9c4080f..6a53492f15 100644 --- a/resources/www/prod/js/core/selectable.js +++ b/resources/www/prod/js/core/selectable.js @@ -133,7 +133,7 @@ } } - function utilsModule.is_ctrl_key(event) { + /*function is_ctrl_key(event) { if (event.altKey) return true; if (event.ctrlKey) @@ -150,11 +150,11 @@ return false; } - function utilsModule.is_shift_key(event) { + function is_shift_key(event) { if (event.shiftKey) return true; return false; - } + }*/ Selectable.prototype = { From c7905140d517bb806d82d991981d1deec637b7cf Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Mon, 29 Feb 2016 12:55:23 +0100 Subject: [PATCH 102/383] apply PHRAS-945 --- resources/www/prod/js/components/preview/preview.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/www/prod/js/components/preview/preview.js b/resources/www/prod/js/components/preview/preview.js index bd3f1a9c2e..8973dbcf6b 100644 --- a/resources/www/prod/js/components/preview/preview.js +++ b/resources/www/prod/js/components/preview/preview.js @@ -69,6 +69,14 @@ var recordPreviewModule = (function (p4) { // update real absolute position with pagination: var absolutePos = parseInt(navigation.perPage,10) * (parseInt(navigation.page, 10) - 1) + parseInt(pos,10); + // if comes from story, work with relative positionning + if (env == 'REG') { + // @TODO - if event comes from workzone (basket|story), + // we can use the relative position in order to display the doubleclicked records + // except we can't know the original event in this implementation + absolutePos = 0; + } + prevAjax = $.ajax({ type: "POST", url: "../prod/records/", From 0b21732911e7b50e2ed0d5764f928a409de4cfa7 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Mon, 29 Feb 2016 13:00:55 +0100 Subject: [PATCH 103/383] apply PHRAS-995 --- resources/www/prod/js/prod.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/resources/www/prod/js/prod.js b/resources/www/prod/js/prod.js index df5a507e13..17c4b23e83 100644 --- a/resources/www/prod/js/prod.js +++ b/resources/www/prod/js/prod.js @@ -669,17 +669,19 @@ var prodModule = (function (p4, humane) { } else { + var minMargin = 5; var margin = 0; var el = $('#answers .diapo:first'); - var brdrWidth = el.css('border-width'); - var stdWidth = el.outerWidth() + 10; + var diapoWidth = el.outerWidth() + (minMargin * 2); var fllWidth = $('#answers').innerWidth(); - fllWidth -= 16; + fllWidth -= 26; - var n = Math.floor(fllWidth / (stdWidth)); + var n = Math.floor(fllWidth / (diapoWidth)); - margin = Math.floor((fllWidth % stdWidth) / (2 * n)); - $('#answers .diapo').css('margin', '5px ' + (5 + margin) + 'px'); + margin = Math.floor((fllWidth % diapoWidth) / (2 * n)); + margin = margin + minMargin; + + $('#answers .diapo').css('margin', '5px ' + (margin) + 'px'); } } From 4ff3239c924de987f9a1f7aa55cd659c446f2af9 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Mon, 29 Feb 2016 13:03:47 +0100 Subject: [PATCH 104/383] apply PHRAS-1016 --- .../www/prod/js/components/editor/record-editor.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/resources/www/prod/js/components/editor/record-editor.js b/resources/www/prod/js/components/editor/record-editor.js index 5f7ffdfc67..7a1c423187 100644 --- a/resources/www/prod/js/components/editor/record-editor.js +++ b/resources/www/prod/js/components/editor/record-editor.js @@ -105,7 +105,13 @@ var recordEditorModule = (function (p4) { $('body').append('
    '); - _edit_select_all(); + // if is a group, only select the group + if (p4.edit.what === 'GRP') { + _toggleGroupSelection(); + } else { + _edit_select_all(); + } + $('.previewTips, .DCESTips, .fieldTips', p4.edit.editBox).tooltip({ fixable: true, @@ -337,6 +343,12 @@ var recordEditorModule = (function (p4) { } } + function _toggleGroupSelection() { + var groupIndex = 0; + edit_clk_editimg(false, groupIndex); + + } + function _preset_paint(data) { $(".EDIT_presets_list", p4.edit.editBox).html(data.html); $(".EDIT_presets_list A.triangle").click( From 5eec250624be908c2b7f4be00f2cce1ed4532c5c Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Mon, 29 Feb 2016 15:36:02 +0100 Subject: [PATCH 105/383] modularize dialog Module (no more p4.dialog) --- resources/gulp/components/common.js | 2 +- resources/gulp/watch.js | 3 +- resources/www/admin/js/template-dialogs.js | 10 +- resources/www/common/js/jquery.Dialog.js | 50 +-- resources/www/common/js/jquery.common.js | 370 +++++++++--------- resources/www/common/js/jquery.tooltip.js | 4 +- .../js/components/editor/record-editor.js | 4 +- .../www/prod/js/components/preview/preview.js | 4 +- .../www/prod/js/components/publication.js | 8 +- resources/www/prod/js/components/push/push.js | 38 +- resources/www/prod/js/prod.js | 20 +- resources/www/report/js/report.js | 2 +- templates/web/common/dialog_export.html.twig | 22 +- templates/web/prod/Baskets/Create.html.twig | 4 +- templates/web/prod/Baskets/Reorder.html.twig | 4 +- templates/web/prod/Baskets/Update.html.twig | 2 +- templates/web/prod/Story/Create.html.twig | 4 +- templates/web/prod/Story/Reorder.html.twig | 2 +- .../prod/WorkZone/Browser/Browser.html.twig | 6 +- .../web/prod/actions/Bridge/index.html.twig | 4 +- .../actions/Feedback/List-Share.html.twig | 2 +- .../web/prod/actions/Property/index.html.twig | 2 +- .../web/prod/actions/Property/type.html.twig | 2 +- templates/web/prod/actions/Push.html.twig | 2 +- .../web/prod/actions/Tools/index.html.twig | 12 +- .../actions/delete_records_confirm.html.twig | 2 +- .../web/prod/actions/edit_default.html.twig | 4 +- templates/web/prod/orders/order_box.html.twig | 2 +- .../web/prod/orders/order_item.html.twig | 8 +- templates/web/prod/thesaurus.js.twig | 16 +- .../web/prod/upload/upload-flash.html.twig | 4 +- templates/web/prod/upload/upload.html.twig | 4 +- 32 files changed, 314 insertions(+), 309 deletions(-) diff --git a/resources/gulp/components/common.js b/resources/gulp/components/common.js index 52adf7f903..0a1111eea3 100644 --- a/resources/gulp/components/common.js +++ b/resources/gulp/components/common.js @@ -58,4 +58,4 @@ gulp.task('watch-common-css', function() { gulp.task('build-common', ['copy-common-images', 'build-common-css'], function(){ debugMode = false; return gulp.start('build-common-js'); -}); \ No newline at end of file +}); diff --git a/resources/gulp/watch.js b/resources/gulp/watch.js index 2bbb56f126..7f25545fa2 100644 --- a/resources/gulp/watch.js +++ b/resources/gulp/watch.js @@ -47,8 +47,7 @@ var browserSync = require('browser-sync').create(); gulp.task('sync', ['watch'], function(){ // will open browser in http://localhost:3000/ browserSync.init({ - proxy: "phraseanet-php55-nginx" - //proxy: "www.phraseanet.vb" + proxy: "dev.phraseanet.vb" }); gulp.watch(config.paths.build + '**/*.css').on('change', browserSync.reload); gulp.watch(config.paths.build + '**/*.js').on('change', browserSync.reload); diff --git a/resources/www/admin/js/template-dialogs.js b/resources/www/admin/js/template-dialogs.js index 1195650eab..1d3dd8c7ef 100644 --- a/resources/www/admin/js/template-dialogs.js +++ b/resources/www/admin/js/template-dialogs.js @@ -1,9 +1,9 @@ var dialogUserResetTemplateConfirm = function (callback) { var buttons = {}; - buttons[language.reset_template_do_reset_apply_button] = function () { p4.Dialog.Close(2); callback('1'); }; + buttons[language.reset_template_do_reset_apply_button] = function () { dialogModule.dialog.close(2); callback('1'); }; - var $dialog = p4.Dialog.Create({ + var $dialog = dialogModule.dialog.create({ size : '550x200', closeOnEscape : true, closeButton:false, @@ -17,10 +17,10 @@ var dialogUserResetTemplateConfirm = function (callback) { var dialogUserTemplate = function (callback) { var buttons = {}; - buttons[language.reset_template_do_not_reset_button] = function () { p4.Dialog.Close(1); callback('0'); }; - buttons[language.reset_template_do_reset_button] = function () { p4.Dialog.Close(1); dialogUserResetTemplateConfirm(callback); }; + buttons[language.reset_template_do_not_reset_button] = function () { dialogModule.dialog.close(1); callback('0'); }; + buttons[language.reset_template_do_reset_button] = function () { dialogModule.dialog.close(1); dialogUserResetTemplateConfirm(callback); }; - var $dialog = p4.Dialog.Create({ + var $dialog = dialogModule.dialog.create({ size : '550x200', closeOnEscape : true, closeButton:false, diff --git a/resources/www/common/js/jquery.Dialog.js b/resources/www/common/js/jquery.Dialog.js index 4e4426c959..05efb06e69 100644 --- a/resources/www/common/js/jquery.Dialog.js +++ b/resources/www/common/js/jquery.Dialog.js @@ -1,8 +1,7 @@ ; -var p4 = p4 || {}; +var dialogModule = (function ($) { -; -(function (p4, $) { + var _dialog = {}; function getLevel(level) { @@ -19,24 +18,24 @@ var p4 = p4 || {}; return 'DIALOG' + getLevel(level); }; - function addButtons(buttons, dialog) { + function _addButtons(buttons, dialog) { if (dialog.options.closeButton === true) { buttons[language.fermer] = function () { - dialog.Close(); + dialog.close(); }; } if (dialog.options.cancelButton === true) { buttons[language.annuler] = function () { - dialog.Close(); + dialog.close(); }; } return buttons; } - var phraseaDialog = function (options, level) { + var _phraseaDialog = function (options, level) { - var createDialog = function (level) { + var _createDialog = function (level) { var $dialog = $('#' + getId(level)); @@ -73,7 +72,7 @@ var p4 = p4 || {}; this.level = getLevel(level); - this.options.buttons = addButtons(this.options.buttons, this); + this.options.buttons = _addButtons(this.options.buttons, this); if (/\d+x\d+/.test(this.options.size)) { var dimension = this.options.size.split('x'); @@ -109,17 +108,17 @@ var p4 = p4 || {}; * - Small | 730 x 480 * **/ - this.$dialog = createDialog(this.level), + this.$dialog = _createDialog(this.level), zIndex = Math.min(this.level * 5000 + 5000, 32767); - var CloseCallback = function () { + var _closeCallback = function () { if (typeof $this.options.closeCallback === 'function') { $this.options.closeCallback($this.$dialog); } if ($this.closing === false) { $this.closing = true; - $this.Close(); + $this.close(); } }; @@ -140,7 +139,7 @@ var p4 = p4 || {}; open: function () { $(this).dialog("widget").css("z-index", zIndex); }, - close: CloseCallback + close: _closeCallback }) .dialog('open').addClass('dialog-' + this.options.size); @@ -164,9 +163,9 @@ var p4 = p4 || {}; return this; }; - phraseaDialog.prototype = { - Close: function () { - p4.Dialog.Close(this.level); + _phraseaDialog.prototype = { + close: function () { + _dialog.close(this.level); }, setContent: function (content) { this.$dialog.removeClass('loading').empty().append(content); @@ -218,7 +217,7 @@ var p4 = p4 || {}; }, setOption: function (optionName, optionValue) { if (optionName === 'buttons') { - optionValue = addButtons(optionValue, this); + optionValue = _addButtons(optionValue, this); } if (this.$dialog.data("ui-dialog")) { this.$dialog.dialog('option', optionName, optionValue); @@ -231,13 +230,13 @@ var p4 = p4 || {}; }; Dialog.prototype = { - Create: function (options, level) { + create: function (options, level) { - if (this.get(level) instanceof phraseaDialog) { - this.get(level).Close(); + if (this.get(level) instanceof _phraseaDialog) { + this.get(level).close(); } - $dialog = new phraseaDialog(options, level); + $dialog = new _phraseaDialog(options, level); this.currentStack[$dialog.getId()] = $dialog; @@ -253,7 +252,7 @@ var p4 = p4 || {}; return null; }, - Close: function (level) { + close: function (level) { $(window).unbind('resize.DIALOG' + getLevel(level)); @@ -272,6 +271,9 @@ var p4 = p4 || {}; } }; - p4.Dialog = new Dialog(); + _dialog = new Dialog(); + return { + dialog: _dialog + } -}(p4, jQuery)); +}(jQuery)); diff --git a/resources/www/common/js/jquery.common.js b/resources/www/common/js/jquery.common.js index 19edcba789..2bed238a19 100644 --- a/resources/www/common/js/jquery.common.js +++ b/resources/www/common/js/jquery.common.js @@ -1,210 +1,210 @@ var p4 = p4 || {}; -$(document).ready(function () { - $('input.input-button').hover( - function () { - $(this).addClass('hover'); - }, - function () { - $(this).removeClass('hover'); +var commonModule = (function ($, p4) { + $(document).ready(function () { + $('input.input-button').hover( + function () { + $(this).addClass('hover'); + }, + function () { + $(this).removeClass('hover'); + } + ); + + var locale = $.cookie('locale'); + + var jq_date = p4.lng = typeof locale !== "undefined" ? locale.split('_').reverse().pop() : 'en'; + + if (jq_date == 'en') { + jq_date = 'en-GB'; } - ); - var locale = $.cookie('locale'); + $.datepicker.setDefaults({showMonthAfterYear: false}); + $.datepicker.setDefaults($.datepicker.regional[jq_date]); - var jq_date = p4.lng = typeof locale !== "undefined" ? locale.split('_').reverse().pop() : 'en'; + $('body').on('click', '.infoDialog', function (event) { + _infoDialog($(this)); + }); - if (jq_date == 'en') { - jq_date = 'en-GB'; + var cache = $('#mainMenu .helpcontextmenu'); + $('.context-menu-item', cache).hover(function () { + $(this).addClass('context-menu-item-hover'); + }, function () { + $(this).removeClass('context-menu-item-hover'); + }); + + $('#help-trigger').contextMenu('#mainMenu .helpcontextmenu', {openEvt: 'click', dropDown: true, theme: 'vista', dropDown: true, + showTransition: 'slideDown', + hideTransition: 'hide', + shadow: false + }); + }); + + + + + function _infoDialog(el) { + $("#DIALOG").attr('title', '') + .empty() + .append(el.attr('infos')) + .dialog({ + + autoOpen: false, + closeOnEscape: true, + resizable: false, + draggable: false, + width: 600, + height: 400, + modal: true, + overlay: { + backgroundColor: '#000', + opacity: 0.7 + } + }).dialog('open').css({'overflow-x': 'auto', 'overflow-y': 'auto'}); + } + function showOverlay(n, appendto, callback, zIndex) { + + var div = "OVERLAY"; + if (typeof(n) != "undefined") + div += n; + if ($('#' + div).length === 0) { + if (typeof(appendto) == 'undefined') + appendto = 'body'; + $(appendto).append(''); + } + + var css = { + display: 'block', + opacity: 0, + right: 0, + bottom: 0, + position: 'absolute', + top: 0, + zIndex: zIndex, + left: 0 + }; + + if (parseInt(zIndex) > 0) + css['zIndex'] = parseInt(zIndex); + + if (typeof(callback) != 'function') + callback = function () { + }; + $('#' + div).css(css).addClass('overlay').fadeTo(500, 0.7).bind('click', function () { + (callback)(); + }); + if (( navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6/) )) { + $('select').css({ + visibility: 'hidden' + }); + } } - $.datepicker.setDefaults({showMonthAfterYear: false}); - $.datepicker.setDefaults($.datepicker.regional[jq_date]); - $('body').on('click', '.infoDialog', function (event) { - infoDialog($(this)); - }); - - var cache = $('#mainMenu .helpcontextmenu'); - $('.context-menu-item', cache).hover(function () { - $(this).addClass('context-menu-item-hover'); - }, function () { - $(this).removeClass('context-menu-item-hover'); - }); - - $('#help-trigger').contextMenu('#mainMenu .helpcontextmenu', {openEvt: 'click', dropDown: true, theme: 'vista', dropDown: true, - showTransition: 'slideDown', - hideTransition: 'hide', - shadow: false - }); -}); - - - - -function infoDialog(el) { - $("#DIALOG").attr('title', '') - .empty() - .append(el.attr('infos')) - .dialog({ - - autoOpen: false, - closeOnEscape: true, - resizable: false, - draggable: false, - width: 600, - height: 400, - modal: true, - overlay: { - backgroundColor: '#000', - opacity: 0.7 - } - }).dialog('open').css({'overflow-x': 'auto', 'overflow-y': 'auto'}); -} - -// @deprecated -function manageSession(data, showMessages) { - if (typeof(showMessages) == "undefined") - showMessages = false; - - if (data.status == 'disconnected' || data.status == 'session') { - disconnected(); - return false; + function hideOverlay(n) { + if (( navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6/) )) { + $('select').css({ + visibility: 'visible' + }); + } + var div = "OVERLAY"; + if (typeof(n) != "undefined") + div += n; + $('#' + div).hide().remove(); } - if (showMessages) { - var box = $('#notification_box'); - box.empty().append(data.notifications); - if (box.is(':visible')) - fix_notification_height(); - if ($('.notification.unread', box).length > 0) { - var trigger = $('#notification_trigger'); - $('.counter', trigger) - .empty() - .append($('.notification.unread', box).length); - $('.counter', trigger).css('visibility', 'visible'); + // @deprecated + function manageSession(data, showMessages) { + if (typeof(showMessages) == "undefined") + showMessages = false; + if (data.status == 'disconnected' || data.status == 'session') { + disconnected(); + return false; } - else - $('#notification_trigger .counter').css('visibility', 'hidden').empty(); + if (showMessages) { + var box = $('#notification_box'); + box.empty().append(data.notifications); - if (data.changed.length > 0) { - var current_open = $('.SSTT.ui-state-active'); - var current_sstt = current_open.length > 0 ? current_open.attr('id').split('_').pop() : false; + if (box.is(':visible')) + fix_notification_height(); + + if ($('.notification.unread', box).length > 0) { + var trigger = $('#notification_trigger'); + $('.counter', trigger) + .empty() + .append($('.notification.unread', box).length); + $('.counter', trigger).css('visibility', 'visible'); - var main_open = false; - for (var i = 0; i != data.changed.length; i++) { - var sstt = $('#SSTT_' + data.changed[i]); - if (sstt.size() === 0) { - if (main_open === false) { - $('#baskets .bloc').animate({'top': 30}, function () { - $('#baskets .alert_datas_changed:first').show() - }); - main_open = true; - } - } - else { - if (!sstt.hasClass('active')) - sstt.addClass('unread'); - else { - $('.alert_datas_changed', $('#SSTT_content_' + data.changed[i])).show(); - } - } } - } - if ('' !== $.trim(data.message)) { - if ($('#MESSAGE').length === 0) - $('body').append('
    '); - $('#MESSAGE') - .empty() - .append('

    ' + data.message + '

    ') - .attr('title', 'Global Message') - .dialog({ - autoOpen: false, - closeOnEscape: true, - resizable: false, - draggable: false, - modal: true, - close: function () { - if ($('.dialog_remove:checked', $(this)).length > 0) { - // setTemporaryPref - $.ajax({ - type: "POST", - url: "/user/preferences/temporary/", - data: { - prop: 'message', - value: 0 - }, - success: function (data) { - return; - } + else + $('#notification_trigger .counter').css('visibility', 'hidden').empty(); + + if (data.changed.length > 0) { + var current_open = $('.SSTT.ui-state-active'); + var current_sstt = current_open.length > 0 ? current_open.attr('id').split('_').pop() : false; + + var main_open = false; + for (var i = 0; i != data.changed.length; i++) { + var sstt = $('#SSTT_' + data.changed[i]); + if (sstt.size() === 0) { + if (main_open === false) { + $('#baskets .bloc').animate({'top': 30}, function () { + $('#baskets .alert_datas_changed:first').show() }); + main_open = true; } } - }) - .dialog('open'); + else { + if (!sstt.hasClass('active')) + sstt.addClass('unread'); + else { + $('.alert_datas_changed', $('#SSTT_content_' + data.changed[i])).show(); + } + } + } + } + if ('' !== $.trim(data.message)) { + if ($('#MESSAGE').length === 0) + $('body').append('
    '); + $('#MESSAGE') + .empty() + .append('

    ' + data.message + '

    ') + .attr('title', 'Global Message') + .dialog({ + autoOpen: false, + closeOnEscape: true, + resizable: false, + draggable: false, + modal: true, + close: function () { + if ($('.dialog_remove:checked', $(this)).length > 0) { + // setTemporaryPref + $.ajax({ + type: "POST", + url: "/user/preferences/temporary/", + data: { + prop: 'message', + value: 0 + }, + success: function (data) { + return; + } + }); + } + } + }) + .dialog('open'); + } } + return true; } - return true; -} - - - -function showOverlay(n, appendto, callback, zIndex) { - - var div = "OVERLAY"; - if (typeof(n) != "undefined") - div += n; - if ($('#' + div).length === 0) { - if (typeof(appendto) == 'undefined') - appendto = 'body'; - $(appendto).append(''); + return { + showOverlay: showOverlay, + hideOverlay: hideOverlay, + manageSession: manageSession } - var css = { - display: 'block', - opacity: 0, - right: 0, - bottom: 0, - position: 'absolute', - top: 0, - zIndex: zIndex, - left: 0 - }; - - if (parseInt(zIndex) > 0) - css['zIndex'] = parseInt(zIndex); - - if (typeof(callback) != 'function') - callback = function () { - }; - $('#' + div).css(css).addClass('overlay').fadeTo(500, 0.7).bind('click', function () { - (callback)(); - }); - if (( navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6/) )) { - $('select').css({ - visibility: 'hidden' - }); - } -} - -function hideDwnl() { - hideOverlay(2); - $('#MODALDL').css({ - 'display': 'none' - }); -} - -function hideOverlay(n) { - if (( navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6/) )) { - $('select').css({ - visibility: 'visible' - }); - } - var div = "OVERLAY"; - if (typeof(n) != "undefined") - div += n; - $('#' + div).hide().remove(); -} +})(jQuery, p4); diff --git a/resources/www/common/js/jquery.tooltip.js b/resources/www/common/js/jquery.tooltip.js index 27764d1895..bdc1eaa703 100644 --- a/resources/www/common/js/jquery.tooltip.js +++ b/resources/www/common/js/jquery.tooltip.js @@ -572,7 +572,7 @@ event.cancelBubble = true; if (event.stopPropagation) event.stopPropagation(); - showOverlay('_tooltip', 'body', unfix_tooltip, settings(this).fixableIndex); + commonModule.showOverlay('_tooltip', 'body', unfix_tooltip, settings(this).fixableIndex); $('#tooltip .tooltip_closer').show().bind('click', unfix_tooltip); $.tooltip.blocked = true; } @@ -718,7 +718,7 @@ function unfix_tooltip() { $.tooltip.current = null; $('#tooltip').hide(); $('#tooltip .tooltip_closer').hide(); - hideOverlay('_tooltip'); + commonModule.hideOverlay('_tooltip'); } diff --git a/resources/www/prod/js/components/editor/record-editor.js b/resources/www/prod/js/components/editor/record-editor.js index 7a1c423187..2ae966789f 100644 --- a/resources/www/prod/js/components/editor/record-editor.js +++ b/resources/www/prod/js/components/editor/record-editor.js @@ -1262,7 +1262,7 @@ var recordEditorModule = (function (p4) { } $("#Edit_copyPreset_dlg").remove(); $('#EDITWINDOW').hide(); - hideOverlay(2); + commonModule.hideOverlay(2); if (p4.preview.open) recordPreviewModule.reloadPreview(); return; @@ -1307,7 +1307,7 @@ var recordEditorModule = (function (p4) { if (e) e.style.display = ""; } - self.setTimeout("$('#EDITWINDOW').fadeOut();hideOverlay(2);", 100); + self.setTimeout("$('#EDITWINDOW').fadeOut();commonModule.hideOverlay(2);", 100); } } diff --git a/resources/www/prod/js/components/preview/preview.js b/resources/www/prod/js/components/preview/preview.js index 8973dbcf6b..1c572821ae 100644 --- a/resources/www/prod/js/components/preview/preview.js +++ b/resources/www/prod/js/components/preview/preview.js @@ -24,7 +24,7 @@ var recordPreviewModule = (function (p4) { var justOpen = false; if (!p4.preview.open) { - showOverlay(); + commonModule.showOverlay(); $('#PREVIEWIMGCONT').disableSelection(); @@ -199,7 +199,7 @@ var recordPreviewModule = (function (p4) { function closePreview() { p4.preview.open = false; - hideOverlay(); + commonModule.hideOverlay(); $('#PREVIEWBOX').fadeTo(500, 0); $('#PREVIEWBOX').queue(function () { diff --git a/resources/www/prod/js/components/publication.js b/resources/www/prod/js/components/publication.js index 9ba8b754bd..4d2edc1aa4 100644 --- a/resources/www/prod/js/components/publication.js +++ b/resources/www/prod/js/components/publication.js @@ -200,7 +200,7 @@ var publicationModule = (function () { var buttons = {}; buttons[language.valider] = function () { - var dialog = p4.Dialog.get(1); + var dialog = dialogModule.dialog.get(1); var error = false; var $form = $('form.main_form', dialog.getDomElement()); @@ -258,13 +258,13 @@ var publicationModule = (function () { }); } - p4.Dialog.Close(1); + dialogModule.dialog.close(1); } }); - p4.Dialog.Close(1); + dialogModule.dialog.close(1); }; - var dialog = p4.Dialog.Create({ + var dialog = dialogModule.dialog.create({ size: 'Full', closeOnEscape: true, closeButton: true, diff --git a/resources/www/prod/js/components/push/push.js b/resources/www/prod/js/components/push/push.js index a655493de6..b160fdb3b5 100644 --- a/resources/www/prod/js/components/push/push.js +++ b/resources/www/prod/js/components/push/push.js @@ -37,18 +37,18 @@ var pushModule = (function (window, p4) { size: 'Medium', title: $this.html() }; - p4.Dialog.Create(options, 2).getDomElement().addClass('loading'); + dialogModule.dialog.create(options, 2).getDomElement().addClass('loading'); }, success: function (data) { - p4.Dialog.get(2).getDomElement().removeClass('loading').empty().append(data); + dialogModule.dialog.get(2).getDomElement().removeClass('loading').empty().append(data); return; }, error: function () { - p4.Dialog.get(2).Close(); + dialogModule.dialog.get(2).Close(); return; }, timeout: function () { - p4.Dialog.get(2).Close(); + dialogModule.dialog.get(2).Close(); return; } }); @@ -73,7 +73,7 @@ var pushModule = (function (window, p4) { title: $(this).attr('title') }; - $dialog = p4.Dialog.Create(options, 2); + $dialog = dialogModule.dialog.create(options, 2); $dialog.setContent(content); $dialog.getDomElement().find('a.adder').bind('click', function () { @@ -117,7 +117,7 @@ var pushModule = (function (window, p4) { success: function (data) { if (data.success) { humane.info(data.message); - p4.Dialog.Close(1); + dialogModule.dialog.close(1); p4.WorkZone.refresh(); } else { @@ -153,7 +153,7 @@ var pushModule = (function (window, p4) { closeButton: true, title: language.warning } - var $dialogAlert = p4.Dialog.Create(options, 3); + var $dialogAlert = dialogModule.dialog.create(options, 3); $dialogAlert.setContent(language.FeedBackNameMandatory); return false; @@ -179,7 +179,7 @@ var pushModule = (function (window, p4) { cancelButton: true }; - var $dialog = p4.Dialog.Create(options, 2); + var $dialog = dialogModule.dialog.create(options, 2); var $FeedBackForm = $('form[name="FeedBackForm"]', $container); @@ -427,7 +427,7 @@ var pushModule = (function (window, p4) { closeButton: true, title: $this.attr('title') }, - $dialog = p4.Dialog.Create(options, 2); + $dialog = dialogModule.dialog.create(options, 2); $dialog.load($this.attr('href'), 'GET'); @@ -447,18 +447,18 @@ var pushModule = (function (window, p4) { size: 'Medium', title: $this.html() }; - p4.Dialog.Create(options, 2).getDomElement().addClass('loading'); + dialogModule.dialog.create(options, 2).getDomElement().addClass('loading'); }, success: function (data) { - p4.Dialog.get(2).getDomElement().removeClass('loading').empty().append(data); + dialogModule.dialog.get(2).getDomElement().removeClass('loading').empty().append(data); return; }, error: function () { - p4.Dialog.get(2).Close(); + dialogModule.dialog.get(2).Close(); return; }, timeout: function () { - p4.Dialog.get(2).Close(); + dialogModule.dialog.get(2).Close(); return; } }); @@ -492,10 +492,10 @@ var pushModule = (function (window, p4) { var callbackOK = function () { $('a.list_refresh', $container).trigger('click'); - p4.Dialog.get(2).Close(); + dialogModule.dialog.get(2).Close(); }; - var name = $('input[name="name"]', p4.Dialog.get(2).getDomElement()).val(); + var name = $('input[name="name"]', dialogModule.dialog.get(2).getDomElement()).val(); if ($.trim(name) === '') { alert(language.listNameCannotBeEmpty); @@ -511,7 +511,7 @@ var pushModule = (function (window, p4) { size: '700x170' }; - p4.Dialog.Create(options, 2).setContent(box); + dialogModule.dialog.create(options, 2).setContent(box); }; var html = _.template($("#list_editor_dialog_add_tpl").html()); @@ -630,7 +630,7 @@ var pushModule = (function (window, p4) { var callbackOK = function () { $('#ListManager .all-lists a.list_refresh').trigger('click'); - p4.Dialog.get(2).Close(); + dialogModule.dialog.get(2).Close(); }; var List = new document.List(list_id); @@ -643,7 +643,7 @@ var pushModule = (function (window, p4) { size: 'Alert' }; - p4.Dialog.Create(options, 2).setContent(box); + dialogModule.dialog.create(options, 2).setContent(box); }; var html = _.template($("#list_editor_dialog_delete_tpl").html()); @@ -692,7 +692,7 @@ var pushModule = (function (window, p4) { function reloadBridge(url) { var options = $('#dialog_publicator form[name="current_datas"]').serializeArray(); - var dialog = p4.Dialog.get(1); + var dialog = dialogModule.dialog.get(1); dialog.load(url, 'POST', options); } diff --git a/resources/www/prod/js/prod.js b/resources/www/prod/js/prod.js index 17c4b23e83..0158b8e73d 100644 --- a/resources/www/prod/js/prod.js +++ b/resources/www/prod/js/prod.js @@ -34,7 +34,7 @@ var prodModule = (function (p4, humane) { closeOnEscape: true }; - $dialog = p4.Dialog.Create(options); + $dialog = dialogModule.dialog.create(options); $.ajax({ type: "GET", @@ -79,7 +79,7 @@ var prodModule = (function (p4, humane) { } }; - $dialog = p4.Dialog.Create(options); + $dialog = dialogModule.dialog.create(options); searchForm.appendTo($dialog.getDomElement()); @@ -373,7 +373,11 @@ var prodModule = (function (p4, humane) { if ($('#MODALDL').is(':visible')) { switch (event.keyCode) { case 27: - hideDwnl(); + // hide download + commonModule.hideOverlay(2); + $('#MODALDL').css({ + 'display': 'none' + }); break; } } @@ -708,7 +712,7 @@ var prodModule = (function (p4, humane) { function openRecordEditor(type, value) { $('#idFrameE').empty().addClass('loading'); - showOverlay(2); + commonModule.showOverlay(2); $('#EDITWINDOW').show(); @@ -754,7 +758,7 @@ var prodModule = (function (p4, humane) { } function openShareModal(bas, rec) { - var dialog = p4.Dialog.Create({ + var dialog = dialogModule.dialog.create({ title: language['share'] }); @@ -802,7 +806,7 @@ var prodModule = (function (p4, humane) { function openToolModal(datas, activeTab) { - var dialog = p4.Dialog.Create({ + var dialog = dialogModule.dialog.create({ size: 'Medium', title: language.toolbox, loading: true @@ -832,7 +836,7 @@ var prodModule = (function (p4, humane) { } // @TODO duplicate with external module function _onOpenDownloadModal(datas) { - var dialog = p4.Dialog.Create({title: language['export']}); + var dialog = dialogModule.dialog.create({title: language['export']}); $.post("../prod/export/multi-export/", datas, function (data) { @@ -899,7 +903,7 @@ var prodModule = (function (p4, humane) { return false; } - var $dialog = p4.Dialog.Create({ + var $dialog = dialogModule.dialog.create({ size: 'Small', title: language.deleteRecords }); diff --git a/resources/www/report/js/report.js b/resources/www/report/js/report.js index 21031b1f22..a929d86868 100644 --- a/resources/www/report/js/report.js +++ b/resources/www/report/js/report.js @@ -1099,7 +1099,7 @@ function pollNotifications() { }, success: function (data) { if (data) { - manageSession(data); + commonModule.manageSession(data); } var t = 120000; if (data.apps && parseInt(data.apps) > 1) { diff --git a/templates/web/common/dialog_export.html.twig b/templates/web/common/dialog_export.html.twig index e1aad473d1..67a287acb0 100644 --- a/templates/web/common/dialog_export.html.twig +++ b/templates/web/common/dialog_export.html.twig @@ -80,8 +80,8 @@ {% if app['conf'].get(['registry', 'actions', 'auth-required-for-export']) and app.getAuthenticatedUser().isGuest() %} - -{% endblock %} - -{% block content %} -
    -
    - -
    -
    -
    - - - - - - - -
    -
    {% if first_item %}{{first_item.getOrd()}}{% endif %}
    -
    -
    - {% if first_item %}{{first_item.getRecord(app).get_title}}{% endif %} -
    -
    -
    -
    -
    -
    - -
    -
    -
    - - - - - - - -
    -
    -
    -
    - {% if first_item %}{{first_item.getRecord(app).get_title}}{% endif %} -
    -
    -
    -
    -
    - -
    -
    -
    -
    - - - - -
    - - {{ 'notice' | trans }} -
    -
    - -
    -
    - -
    -
    -
    -
    -
    -
    - - - - - - - -
    - - - -
    -
    -
    -
    - -
    -
    - {% include 'lightbox/IE6/feed_container.html.twig' %} -
    -
    -
    -
    - - - -{% endblock %} - - diff --git a/templates/web/lightbox/IE6/feed_container.html.twig b/templates/web/lightbox/IE6/feed_container.html.twig deleted file mode 100644 index 4553ae4471..0000000000 --- a/templates/web/lightbox/IE6/feed_container.html.twig +++ /dev/null @@ -1,20 +0,0 @@ - -{% block basket %} - - -{% endblock basket %} diff --git a/templates/web/lightbox/IE6/feed_options_box.html.twig b/templates/web/lightbox/IE6/feed_options_box.html.twig deleted file mode 100644 index 572154e56f..0000000000 --- a/templates/web/lightbox/IE6/feed_options_box.html.twig +++ /dev/null @@ -1,30 +0,0 @@ - - {% if feed_element %} - - - - - - - -
    - -
    - | - {% endif %} -
    - diff --git a/templates/web/lightbox/IE6/index.html.twig b/templates/web/lightbox/IE6/index.html.twig deleted file mode 100644 index 2f2b4341ab..0000000000 --- a/templates/web/lightbox/IE6/index.html.twig +++ /dev/null @@ -1,151 +0,0 @@ -{% extends "lightbox/index_layout.html.twig" %} - -{% import 'common/thumbnail.html.twig' as thumbnail %} - -{% block javascript %} - - -{% endblock %} - -{% block stylesheet %} - -{% endblock %} - - {% block icon %} - - {% endblock %} - -{% block content %} -
    - - - - - - - - - {% for basket in baskets_collection %} - {% if basket.getValidation() %} - {% set basket_length = basket.getElements().count() %} - - - - {% endif %} - {% endfor %} - - - - - {% for basket in baskets_collection %} - {% if basket.getValidation() is null %} - {% set basket_length = basket.getElements().count() %} - - - - {% endif %} - {% endfor %} - -
    -

    {{ 'Validations' | trans }}

    -
    - {{ 'Voici vos validations en cours' | trans }} -
    -
    - - - - - - - - -
    - {% if basket_length > 0%} - {{thumbnail.format(basket.getELements().first().getRecord(app).get_thumbnail, 170, 170, '', true, false)}} - {% endif %} - - -
    - - - - - - - - - - - -
    -

    - {{basket.getName()}} -

    - {% if basket.getValidation().isFinished() %} - {{ '(validation) session terminee' | trans }} - {% elseif basket.getValidation().getParticipant(app.getAuthenticatedUser()).getIsConfirmed() %} - {{ '(validation) envoyee' | trans }} - {% else %} - {{ '(validation) a envoyer' | trans }} - {% endif %} -
    - ({% trans with {'%basket_length%' : basket_length} %}%basket_length% documents{% endtrans %}) -
    -
    {{ basket.getDescription() }}
    -
    {{ basket.getValidation.getValidationString(app, app.getAuthenticatedUser()) }}
    -
    -
    -
    - -
    -
    -

    {{ 'Paniers' | trans }}

    -
    - {{ 'Voici vos paniers' | trans }} -
    -
    - - - - - - - - -
    - {% if basket_length > 0%} - {{thumbnail.format(basket.getElements().first().getRecord(app).get_thumbnail, 170, 170, '', true, false)}} - {% endif %} - - -
    - - - - - - - - - - - -
    -

    - {{basket.getName()}} -

    -
    - ({% trans with {'%basket_length%' : basket_length} %}%basket_length% documents{% endtrans %}) -
    -
    {{basket.getDescription()}}
    -
    -
    -
    - -
    -
    -
    -{% endblock %} - - diff --git a/templates/web/lightbox/IE6/sc_container.html.twig b/templates/web/lightbox/IE6/sc_container.html.twig deleted file mode 100644 index 5fcf85bc77..0000000000 --- a/templates/web/lightbox/IE6/sc_container.html.twig +++ /dev/null @@ -1,28 +0,0 @@ - -{% block basket %} - - -{% endblock basket %} diff --git a/templates/web/lightbox/IE6/sc_options_box.html.twig b/templates/web/lightbox/IE6/sc_options_box.html.twig deleted file mode 100644 index 3f056e8e14..0000000000 --- a/templates/web/lightbox/IE6/sc_options_box.html.twig +++ /dev/null @@ -1,42 +0,0 @@ - - {% if basket_element %} - - - - - - - -
    - -
    - | - {% if basket_element.getBasket().getValidation() %} - - {% endif %} - {% endif %} -
    - diff --git a/templates/web/lightbox/IE6/validate.html.twig b/templates/web/lightbox/IE6/validate.html.twig deleted file mode 100644 index 5f15e29cc8..0000000000 --- a/templates/web/lightbox/IE6/validate.html.twig +++ /dev/null @@ -1,159 +0,0 @@ -{% extends "lightbox/index_layout.html.twig" %} - -{% import 'common/thumbnail.html.twig' as thumbnail %} -{% import 'common/macros.html.twig' as macro %} - -{% block javascript %} - - -{% endblock %} - -{% block content %} - {% set basket_element = basket.getElements().first() %} -
    -
    -
    -
    -
    - - - - - - - -
    -
    {% if basket_element %}{{basket_element.getOrd()}}{% endif %}
    -
    -
    - {% if basket_element %}{{basket_element.getRecord(app).get_title}}{% endif %} -
    -
    -
    - {% include 'lightbox/IE6/sc_options_box.html.twig' %} -
    -
    -
    - -
    -
    -
    - - - - - - - -
    -
    -
    -
    - {% if basket_element %}{{basket_element.getRecord(app).get_title}}{% endif %} -
    -
    -
    -
    -
    - -
    -
    -
    -
    - - - - {% if basket.getValidation() %} - - {% endif %} - -
    - - {{ 'notice' | trans }} - - - {{ 'Validation' | trans }} -
    -
    - -
    -
    - -
    -
    - {% if basket.getValidation() %} -
    - {% include 'lightbox/IE6/agreement_box.html.twig' %} -
    - {% include 'lightbox/IE6/basket_options.html.twig' %} -
    -
    - {% endif %} -
    -
    -
    -
    - - - - - -
    - - - -
    -
    - -
    -
    - {% include 'lightbox/IE6/sc_container.html.twig' %} -
    -
    -
    -
    - - - -{% endblock %} - - From ab368a7dee4155cdb8a0d587876b61d1aa772c54 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Mon, 29 Feb 2016 17:31:29 +0100 Subject: [PATCH 108/383] wip: js modularization of lightbox and cleanup --- resources/gulp/components/common.js | 1 + resources/gulp/components/prod.js | 1 - resources/www/common/js/components/dialog.js | 21 +- .../{prod => common}/js/components/utils.js | 0 resources/www/lightbox/js/jquery.lightbox.js | 1819 ++++++++--------- .../js/components/editor/record-editor.js | 1 - resources/www/prod/js/components/push/push.js | 14 +- resources/www/prod/js/core/selectable.js | 24 - resources/www/prod/js/prod.js | 8 +- templates/web/common/dialog_export.html.twig | 12 +- templates/web/lightbox/validate.html.twig | 2 +- templates/web/prod/Baskets/Reorder.html.twig | 2 +- templates/web/prod/Baskets/Update.html.twig | 2 +- templates/web/prod/Story/Reorder.html.twig | 2 +- .../prod/WorkZone/Browser/Browser.html.twig | 6 +- .../web/prod/actions/Bridge/index.html.twig | 4 +- .../web/prod/actions/Property/index.html.twig | 4 +- .../web/prod/actions/Property/type.html.twig | 4 +- .../web/prod/actions/Tools/index.html.twig | 8 +- .../actions/delete_records_confirm.html.twig | 4 +- templates/web/prod/thesaurus.js.twig | 18 +- 21 files changed, 966 insertions(+), 991 deletions(-) rename resources/www/{prod => common}/js/components/utils.js (100%) diff --git a/resources/gulp/components/common.js b/resources/gulp/components/common.js index 14985278db..b4c28a2d46 100644 --- a/resources/gulp/components/common.js +++ b/resources/gulp/components/common.js @@ -26,6 +26,7 @@ gulp.task('build-common-css', ['build-common-font-css'],function(){ gulp.task('build-common-js', function(){ var commonGroup = [ + config.paths.src + 'common/js/components/utils.js', config.paths.src + 'common/js/components/user.js', // config.paths.dist + 'assets/bootstrap/js/bootstrap.js', // should append no conflict config.paths.src + 'vendors/jquery-mousewheel/js/jquery.mousewheel.js', diff --git a/resources/gulp/components/prod.js b/resources/gulp/components/prod.js index d436fea27d..16db8ef6b8 100644 --- a/resources/gulp/components/prod.js +++ b/resources/gulp/components/prod.js @@ -84,7 +84,6 @@ gulp.task('build-prod-js', function(){ config.paths.src + 'prod/js/components/workzone/workzone-basket.js', config.paths.src + 'prod/js/components/workzone/workzone-facets.js', config.paths.src + 'prod/js/components/workzone/workzone-thesaurus.js', - config.paths.src + 'prod/js/components/utils.js', config.paths.src + 'prod/js/components/cgu.js', config.paths.src + 'prod/js/components/preferences.js', // config.paths.src + 'prod/js/jquery.form.2.49.js', diff --git a/resources/www/common/js/components/dialog.js b/resources/www/common/js/components/dialog.js index 05efb06e69..75e23e5369 100644 --- a/resources/www/common/js/components/dialog.js +++ b/resources/www/common/js/components/dialog.js @@ -1,8 +1,23 @@ ; var dialogModule = (function ($) { - + var $body = null; + var bodySize = {}; var _dialog = {}; + $('document').ready(function(){ + $body = $('body'); + + $(window).on('resize', function () { + bodySize.y = $body.height(); + bodySize.x = $body.width(); + + //@TODO modal resize should be in a stream + $('.overlay').height(bodySize.y).width(bodySize.x); + //_resizeAll(); + }); + }); + + function getLevel(level) { level = parseInt(level); @@ -79,6 +94,10 @@ var dialogModule = (function ($) { height = dimension[1]; width = dimension[0]; } else { + + bodySize.y = $body.height(); + bodySize.x = $body.width(); + switch (this.options.size) { case 'Full': height = bodySize.y - 30; diff --git a/resources/www/prod/js/components/utils.js b/resources/www/common/js/components/utils.js similarity index 100% rename from resources/www/prod/js/components/utils.js rename to resources/www/common/js/components/utils.js diff --git a/resources/www/lightbox/js/jquery.lightbox.js b/resources/www/lightbox/js/jquery.lightbox.js index cf2de62217..7ae5c766df 100644 --- a/resources/www/lightbox/js/jquery.lightbox.js +++ b/resources/www/lightbox/js/jquery.lightbox.js @@ -1,980 +1,963 @@ -var p4 = p4 || {}; +var lightboxModule = (function($){ + var _releasable = false; + var _bodySize = { + x: 0, + y: 0 + }; + $(document).ready(function () { -p4.releasable = false; + _bodySize.y = $('#mainContainer').height(); + _bodySize.x = $('#mainContainer').width(); -var bodySize = { - x: 0, - y: 0 -}; + $(this).data('slideshow', false); + $(this).data('slideshow_ctime', false); -$(document).ready(function () { - - bodySize.y = $('#mainContainer').height(); - bodySize.x = $('#mainContainer').width(); - - $(this).data('slideshow', false); - $(this).data('slideshow_ctime', false); - - $('#mainMenu, .unselectable').disableSelection(); - - display_basket(); - - $(window).bind('mousedown',function () { - $(this).focus(); - }).trigger('mousedown'); - - $('.basket_wrapper').hover( - function () { - $(this).addClass('hover'); - }, - function () { - $(this).removeClass('hover'); - } - ).bind('click', function () { - var id = $('input[name=ssel_id]', this).val(); - document.location = '/lightbox/validate/' + id + '/'; - return; + $(window).bind('beforeunload', function () { + if (_releasable !== false) { + if (confirm(_releasable)) { + $('#basket_options .confirm_report').trigger('click'); + } + } }); - $('.basket_downloader').bind('click', function () { - download_basket(); + + + $('#mainMenu, .unselectable').disableSelection(); + + _display_basket(); + + $(window).bind('mousedown',function () { + $(this).focus(); + }).trigger('mousedown'); + + $('.basket_wrapper').hover( + function () { + $(this).addClass('hover'); + }, + function () { + $(this).removeClass('hover'); + } + ).bind('click', function () { + var id = $('input[name=ssel_id]', this).val(); + document.location = '/lightbox/validate/' + id + '/'; + return; + }); + $('.basket_downloader').bind('click', function () { + _downloadBasket(); + }); + if ($('.right_column_wrapper_user').length > 0) { + $('.right_column_title, #right_column_validation_toggle').bind('click',function () { + if (!$('.right_column_wrapper_caption').is(':visible')) { + $('.right_column_wrapper_user').height($('.right_column_wrapper_user').height()).css('top', 'auto').animate({ + 'height': 0 + }); + $('.right_column_wrapper_caption').slideDown(); + $('#right_column_validation_toggle').show(); + } + else { + $('.right_column_wrapper_user').height('auto').animate({ + 'top': $('.right_column_title').height() + }); + $('.right_column_wrapper_caption').slideUp(); + $('#right_column_validation_toggle').hide(); + } + var title = $('.right_column_title'); + title.hasClass('expanded') ? title.removeClass('expanded') : title.addClass('expanded'); + }).addClass('clickable'); + } + var sselcont = $('#sc_container .basket_element:first'); + if (sselcont.length > 0) { + _display_basket_element(false, sselcont.attr('id').split('_').pop()); + } + + + _setSizeable($('#record_main .lightbox_container, #record_compare .lightbox_container')); + + $('#navigation') + .bind('change', + function () { + window.location.replace(window.location.protocol + "//" + window.location.host + '/lightbox/validate/' + $(this).val() + '/'); + } + ); + + $('#left_scroller') + .bind('click', + function () { + _scrollElements(false); + } + ); + + $('#right_scroller') + .bind('click', function () { + _scrollElements(true); + } + ); + + $(window) + .bind('resize', function () { + _resizeLightbox(); + } + ); + _bind_keyboard(); }); - if ($('.right_column_wrapper_user').length > 0) { - $('.right_column_title, #right_column_validation_toggle').bind('click',function () { - if (!$('.right_column_wrapper_caption').is(':visible')) { - $('.right_column_wrapper_user').height($('.right_column_wrapper_user').height()).css('top', 'auto').animate({ - 'height': 0 - }); - $('.right_column_wrapper_caption').slideDown(); - $('#right_column_validation_toggle').show(); - } - else { - $('.right_column_wrapper_user').height('auto').animate({ - 'top': $('.right_column_title').height() - }); - $('.right_column_wrapper_caption').slideUp(); - $('#right_column_validation_toggle').hide(); - } - var title = $('.right_column_title'); - title.hasClass('expanded') ? title.removeClass('expanded') : title.addClass('expanded'); + + function _resizeLightbox() { + _bodySize.y = $('#mainContainer').height(); + _bodySize.x = $('#mainContainer').width(); + _displayRecord($('#record_compare').css('visibility') != 'hidden'); + } + + function _display_basket() { + var sc_wrapper = $('#sc_wrapper'); + var basket_options = $('#basket_options'); + + $('.report').on('click',function () { + _loadReport(); + return false; }).addClass('clickable'); - } - var sselcont = $('#sc_container .basket_element:first'); - if (sselcont.length > 0) { - display_basket_element(false, sselcont.attr('id').split('_').pop()); + // $('#basket_infos .report').button({ + // icons: { + // primary: 'ui-icon-document' + // } + // }).bind('click',function(){ + // $(this).blur(); + // }); + $('.confirm_report', basket_options).button() + .bind('click', function () { + _setRelease($(this)); + }); + + $('.basket_element', sc_wrapper).parent() + .bind('click', function (event) { + _scid_click(event, this); + return false; + }); + + $('.agree_button, .disagree_button', sc_wrapper).bind('click',function (event) { + + var sselcont_id = $(this).closest('.basket_element').attr('id').split('_').pop(); + + var agreement = $(this).hasClass('agree_button') ? '1' : '-1'; + + _setAgreement(event, $(this), sselcont_id, agreement); + return false; + }).addClass('clickable'); + + n = $('.basket_element', sc_wrapper).length; + $('#sc_container').width(n * $('.basket_element_wrapper:first', sc_wrapper).outerWidth() + 1); + + $('.previewTips').tooltip(); } - set_sizeable($('#record_main .lightbox_container, #record_compare .lightbox_container')); - - $('#navigation') - .bind('change', - function () { - window.location.replace(window.location.protocol + "//" + window.location.host + '/lightbox/validate/' + $(this).val() + '/'); - } - ); - - $('#left_scroller') - .bind('click', - function () { - scroll_elements(false); - } - ); - - $('#right_scroller') - .bind('click', function () { - scroll_elements(true); - } - ); - - $(window) - .bind('resize', function () { - resize(); - } - ); - bind_keyboard(); -}); - -$(window).bind('beforeunload', function () { - if (p4.releasable !== false) { - if (confirm(p4.releasable)) { - $('#basket_options .confirm_report').trigger('click'); - } + function setReleasable(val) { + _releasable = val; } -}); -function bind_keyboard() { - $(document).bind('keydown', function (event) { + function _bind_keyboard() { + $(document).bind('keydown', function (event) { - var stop = false; - $('.notes_wrapper').each(function (i, n) { - if (parseInt($(n).css('top')) >= 0) - stop = true; - }); + var stop = false; + $('.notes_wrapper').each(function (i, n) { + if (parseInt($(n).css('top')) >= 0) + stop = true; + }); - if (stop) + if (stop) + return true; + + var cancelKey = false; + var el, id; + switch (event.keyCode) { + case 39: + _getNext(); + cancelKey = true; + break; + case 37: + _getPrev(); + cancelKey = true; + break; + case 32: + var bool = !$(document).data('slideshow'); + _slideshow(bool); + break; + case 38: + el = $('#sc_container .basket_element.selected'); + if (el.length === 1) { + id = el.attr('id').split('_').pop(); + _setAgreement(event, el, id, 1); + } + break; + case 40: + el = $('#sc_container .basket_element.selected'); + if (el.length === 1) { + id = el.attr('id').split('_').pop(); + _setAgreement(event, el, id, -1); + } + break; + default: + break; + } + + if (cancelKey) { + event.cancelBubble = true; + if (event.stopPropagation) + event.stopPropagation(); + return(false); + } return true; - - var cancelKey = false; - var el, id; - switch (event.keyCode) { - case 39: - get_next(); - cancelKey = true; - break; - case 37: - get_prev(); - cancelKey = true; - break; - case 32: - var bool = !$(document).data('slideshow'); - slideshow(bool); - break; - case 38: - el = $('#sc_container .basket_element.selected'); - if (el.length === 1) { - id = el.attr('id').split('_').pop(); - set_agreement(event, el, id, 1); - } - break; - case 40: - el = $('#sc_container .basket_element.selected'); - if (el.length === 1) { - id = el.attr('id').split('_').pop(); - set_agreement(event, el, id, -1); - } - break; - default: - break; - } - - if (cancelKey) { - event.cancelBubble = true; - if (event.stopPropagation) - event.stopPropagation(); - return(false); - } - return true; - }); -} - -function is_ctrl_key(event) { - if (event.altKey) - return true; - if (event.ctrlKey) - return true; - if (event.metaKey) // apple key opera - return true; - if (event.keyCode == '17') // apple key opera - return true; - if (event.keyCode == '224') // apple key mozilla - return true; - if (event.keyCode == '91') // apple key safari - return true; - - return false; -} - -function is_shift_key(event) { - if (event.shiftKey) - return true; - return false; -} - -function resize() { - bodySize.y = $('#mainContainer').height(); - bodySize.x = $('#mainContainer').width(); - display_record($('#record_compare').css('visibility') != 'hidden'); -} - -function set_release(el) { - $('.loader', el).css({ - visibility: 'visible' - }); - $.ajax({ - type: "POST", - url: "/lightbox/ajax/SET_RELEASE/" + $('#navigation').val() + "/", - dataType: 'json', - error: function (data) { - $('.loader', el).css({ - visibility: 'hidden' - }); - }, - timeout: function (data) { - $('.loader', el).css({ - visibility: 'hidden' - }); - }, - success: function (data) { - $('.loader', el).css({ - visibility: 'hidden' - }); - if (data.datas) { - alert(data.datas); - } - if (!data.error) { - p4.releasable = false; - } - - return; - } - }); -} - -function load_report() { - $.ajax({ - type: "GET", - url: "/lightbox/ajax/LOAD_REPORT/" + $('#navigation').val() + "/", - dataType: 'html', - success: function (data) { - $('#report').empty().append(data); - $('#report .reportTips').tooltip({ - delay: false - }); - $('#report').dialog({ - width: 600, - modal: true, - resizable: false, - height: Math.round($(window).height() * 0.8) - }); - - return; - } - }); -} - -function display_basket() { - var sc_wrapper = $('#sc_wrapper'); - var basket_options = $('#basket_options'); - - $('.report').on('click',function () { - load_report(); - return false; - }).addClass('clickable'); - // $('#basket_infos .report').button({ - // icons: { - // primary: 'ui-icon-document' - // } - // }).bind('click',function(){ - // $(this).blur(); - // }); - $('.confirm_report', basket_options).button() - .bind('click', function () { - set_release($(this)); }); + } - $('.basket_element', sc_wrapper).parent() - .bind('click', function (event) { - scid_click(event, this); - return false; + function _loadReport() { + $.ajax({ + type: "GET", + url: "/lightbox/ajax/LOAD_REPORT/" + $('#navigation').val() + "/", + dataType: 'html', + success: function (data) { + $('#report').empty().append(data); + $('#report .reportTips').tooltip({ + delay: false + }); + $('#report').dialog({ + width: 600, + modal: true, + resizable: false, + height: Math.round($(window).height() * 0.8) + }); + + return; + } }); - - $('.agree_button, .disagree_button', sc_wrapper).bind('click',function (event) { - - var sselcont_id = $(this).closest('.basket_element').attr('id').split('_').pop(); - - var agreement = $(this).hasClass('agree_button') ? '1' : '-1'; - - set_agreement(event, $(this), sselcont_id, agreement); - return false; - }).addClass('clickable'); - - n = $('.basket_element', sc_wrapper).length; - $('#sc_container').width(n * $('.basket_element_wrapper:first', sc_wrapper).outerWidth() + 1); - - $('.previewTips').tooltip(); -} - - -function scid_click(event, el) { - var compare = is_ctrl_key(event); - - if (compare) { - if ($('.basket_element', el).hasClass('selected')) - return; - } - else { - $('#sc_container .basket_element.selected').removeClass('selected'); - $('.basket_element', el).addClass('selected'); } - var sselcont_id = $('.basket_element', el).attr('id').split('_').pop(); - var ssel_id = $('#navigation').val(); - var container = $('#sc_container'); + function _scid_click(event, el) { + var compare = utilsModule.is_ctrl_key(event); - var request = container.data('request'); - if (request && typeof(request.abort) == 'function') { - request.abort(); - } - - request = $.ajax({ - type: "GET", - url: $(el).attr('href'),//"/lightbox/ajax/LOAD_BASKET_ELEMENT/"+sselcont_id+'/', - dataType: 'json', - success: function (datas) { - var container = false; - var data = datas; - - if (compare) { - container = $('#record_compare'); - } - else { - container = $('#record_main'); - - $('#record_infos .lightbox_container') - .empty() - .append(data.caption); - - $('#basket_infos') - .empty() - .append(data.agreement_html); - } - - $('.display_id', container) - .empty() - .append(data.number); - - $('.title', container) - .empty() - .append(data.title) - .attr('title', data.title); - - var options_container = $('.options', container); - options_container - .empty() - .append(data.options_html); - - $('.lightbox_container', container).empty() - .append(data.preview + data.selector_html + data.note_html); - - - display_basket_element(compare, sselcont_id); - - - return; - } - }); - container.data('request', request); -} - -function save_note(container, button) { - var sselcont_id = $(button).attr('id').split('_').pop(); - var note = $('.notes_wrapper textarea', container).val(); - - $.ajax({ - type: "POST", - url: "/lightbox/ajax/SET_NOTE/" + sselcont_id + "/", - dataType: 'json', - data: { - note: note - }, - success: function (datas) { - hide_notes(container); - $('.notes_wrapper', container).remove(); - $('.lightbox_container', container).append(datas.datas); - activate_notes(container); - return; - } - }); - -} - -function display_basket_element(compare, sselcont_id) { - var container; - if (compare) { - container = $('#record_compare'); - } - else { - container = $('#record_main'); - } - $('.record_image', container).removeAttr('ondragstart'); - $('.record_image', container).draggable(); - - var options_container = $('.options', container); - - $('.download_button', options_container).bind('click', function () { - // $(this).blur(); - download($(this).next('form[name=download_form]').find('input').val()); - }); - - $('.comment_button', options_container).bind('click', function () { - // $(this).blur(); - if ($('.lightbox_container', container).hasClass('note_editing')) { - hide_notes(container); - } - else { - show_notes(container); - } - } - ); - - activate_notes(container); - - $('.previous_button', options_container).bind('click', function () { - // $(this).blur(); - get_prev(); - }); - - $('.play_button', options_container).bind('click', function () { - // $(this).blur(); - slideshow(true); - }); - - $('.pause_button', options_container).bind('click', function () { - // $(this).blur(); - slideshow(false); - }); - - if ($(document).data('slideshow')) { - $('.play_button, .next_button.play, .previous_button.play', options_container).hide(); - } - else { - $('.pause_button, .next_button.pause, .previous_button.pause', options_container).hide(); - } - - $('.next_button', options_container).bind('click', function () { - // $(this).blur(); - slideshow(false); - get_next(); - }); - - - $('.lightbox_container', container).bind('dblclick', function (event) { - display_record(); - }); - - - $('#record_wrapper .agree_' + sselcont_id + ', .big_box.agree') - .bind('click', - function (event) { - set_agreement(event, $(this), sselcont_id, '1'); - } - ) - .addClass('clickable'); - - $('#record_wrapper .disagree_' + sselcont_id + ', .big_box.disagree') - .bind('click', - function (event) { - set_agreement(event, $(this), sselcont_id, '-1'); - } - ) - .addClass('clickable'); - - if (compare == $('#record_wrapper').hasClass('single')) { if (compare) { - // $('.agreement_selector').show(); - // $('#record_wrapper').stop().animate({right:0},100,function(){display_record(compare);}); - $('#record_wrapper').css({ - right: 0 - }); - display_record(compare); - $('#right_column').hide(); + if ($('.basket_element', el).hasClass('selected')) + return; } else { - // $('.agreement_selector').hide(); - $('#record_wrapper').css({ - right: 250 - }); - display_record(compare); - $('#right_column').show(); - $('#record_compare .lightbox_container').empty(); + $('#sc_container .basket_element.selected').removeClass('selected'); + $('.basket_element', el).addClass('selected'); } - } - else { - display_record(compare); - } + var sselcont_id = $('.basket_element', el).attr('id').split('_').pop(); + var ssel_id = $('#navigation').val(); -} + var container = $('#sc_container'); -function show_notes(container) { - $('.notes_wrapper', container).animate({ - top: 0 - }); - $('.lightbox_container', container).addClass('note_editing'); -} - -function hide_notes(container) { - $('.notes_wrapper', container).animate({ - top: '-100%' - }); - $('.lightbox_container', container).removeClass('note_editing'); -} - -function activate_notes(container) { - $('.note_closer', container).button({ - text: true - }).bind('click', function () { - $(this).blur(); - hide_notes(container); - return false; + var request = container.data('request'); + if (request && typeof(request.abort) == 'function') { + request.abort(); } - ); - $('.note_saver', container).button({ - text: true - }).bind('click', function () { - $(this).blur(); - save_note(container, this); - return false; - } - ); -} + request = $.ajax({ + type: "GET", + url: $(el).attr('href'),//"/lightbox/ajax/LOAD_BASKET_ELEMENT/"+sselcont_id+'/', + dataType: 'json', + success: function (datas) { + var container = false; + var data = datas; -function is_viewable(el) { - var sc_wrapper = $('#sc_wrapper'); - var sc_container = $('#sc_container'); + if (compare) { + container = $('#record_compare'); + } + else { + container = $('#record_main'); - var el_width = $(el).parent().outerWidth(); - var el_position = $(el).parent().position(); - var sc_scroll_left = sc_wrapper.scrollLeft(); + $('#record_infos .lightbox_container') + .empty() + .append(data.caption); - var boundup = sc_wrapper.width(), - bounddown = 0, - placeup = el_position.left + el_width - sc_scroll_left, - placedown = el_position.left - sc_scroll_left; + $('#basket_infos') + .empty() + .append(data.agreement_html); + } - if (placeup <= boundup && placedown >= bounddown) - return true; - return false; -} + $('.display_id', container) + .empty() + .append(data.number); -function adjust_visibility(el) { - if (is_viewable(el)) - return; + $('.title', container) + .empty() + .append(data.title) + .attr('title', data.title); - var sc_wrapper = $('#sc_wrapper'); - var el_parent = $(el).parent(); + var options_container = $('.options', container); + options_container + .empty() + .append(data.options_html); - var sc_left = el_parent.position().left + el_parent.outerWidth() / 2 - sc_wrapper.width() / 2; + $('.lightbox_container', container).empty() + .append(data.preview + data.selector_html + data.note_html); - sc_wrapper.stop().animate({ - 'scrollLeft': sc_left - }); -} -function get_next() { - var current_wrapper = $('#sc_container .basket_element.selected').parent().parent(); + _display_basket_element(compare, sselcont_id); - if (current_wrapper.length === 0) - return; - current_wrapper = current_wrapper.next(); - if (current_wrapper.length === 0) - current_wrapper = $('#sc_container .basket_element_wrapper:first'); - - $('.basket_element', current_wrapper).parent().trigger('click'); - - adjust_visibility($('.basket_element', current_wrapper)); - - if ($(document).data('slideshow')) { - var timer = setTimeout('get_next();', 3500); - $(document).data('slideshow_ctime', timer); - } -} - -function get_prev() { - var current_wrapper = $('#sc_container .basket_element.selected').parent().parent(); - - if (current_wrapper.length === 0) - return; - - slideshow(false); - - current_wrapper = current_wrapper.prev(); - if (current_wrapper.length === 0) - current_wrapper = $('#sc_container .basket_element_wrapper:last'); - - $('.basket_element', current_wrapper).parent().trigger('click'); - - adjust_visibility($('.basket_element', current_wrapper)); -} - -function slideshow(boolean_value) { - if (boolean_value == $(document).data('slideshow')) - return; - - if (!boolean_value && $(document).data('slideshow_ctime')) { - clearTimeout($(document).data('slideshow_ctime')); - $(document).data('slideshow_ctime', false); - } - - $(document).data('slideshow', boolean_value); - - var headers = $('#record_wrapper .header'); - - if (boolean_value) { - $('.play_button, .next_button.play, .previous_button.play', headers).hide(); - $('.pause_button, .next_button.pause, .previous_button.pause', headers).show(); - get_next(); - } - else { - $('.pause_button, .next_button.pause, .previous_button.pause', headers).hide(); - $('.play_button, .next_button.play, .previous_button.play', headers).show(); - } -} - -function set_sizeable(container) { - - $(container).bind('mousewheel', function (event, delta) { - - if ($(this).hasClass('note_editing')) - return; - - var record = $('.record_image', this); - - if (record.length === 0) - return; - - var o_top = parseInt(record.css('top')); - var o_left = parseInt(record.css('left')); - - var o_width, o_height, width, height; - - if (delta > 0) { - if (record.width() > 29788 || record.height() >= 29788) return; - o_width = record.width(); - o_height = record.height(); - width = Math.round(o_width * 1.1); - height = Math.round(o_height * 1.1); - } - else { - if (record.width() < 30 || record.height() < 30) - return; - o_width = record.width(); - o_height = record.height(); - width = Math.round(o_width / 1.05); - height = Math.round(o_height / 1.05); - } - - var top = Math.round((height / o_height) * (o_top - $(this).height() / 2) + $(this).height() / 2); - var left = Math.round((width / o_width) * (o_left - $(this).width() / 2) + $(this).width() / 2); - - record.width(width).height(height).css({ - top: top, - left: left + } }); - }); + container.data('request', request); + } -} + function _display_basket_element(compare, sselcont_id) { + var container; + if (compare) { + container = $('#record_compare'); + } + else { + container = $('#record_main'); + } + $('.record_image', container).removeAttr('ondragstart'); + $('.record_image', container).draggable(); -function set_agreement(event, el, sselcont_id, boolean_value) { - if (event.stopPropagation) - event.stopPropagation(); - event.cancelBubble = true; + var options_container = $('.options', container); - var id = + $('.download_button', options_container).bind('click', function () { + // $(this).blur(); + _download($(this).next('form[name=download_form]').find('input').val()); + }); + + $('.comment_button', options_container).bind('click', function () { + // $(this).blur(); + if ($('.lightbox_container', container).hasClass('note_editing')) { + _hideNotes(container); + } + else { + _showNotes(container); + } + } + ); + + _activateNotes(container); + + $('.previous_button', options_container).bind('click', function () { + // $(this).blur(); + _getPrev(); + }); + + $('.play_button', options_container).bind('click', function () { + // $(this).blur(); + _slideshow(true); + }); + + $('.pause_button', options_container).bind('click', function () { + // $(this).blur(); + _slideshow(false); + }); + + if ($(document).data('slideshow')) { + $('.play_button, .next_button.play, .previous_button.play', options_container).hide(); + } + else { + $('.pause_button, .next_button.pause, .previous_button.pause', options_container).hide(); + } + + $('.next_button', options_container).bind('click', function () { + // $(this).blur(); + _slideshow(false); + _getNext(); + }); + + + $('.lightbox_container', container).bind('dblclick', function (event) { + _displayRecord(); + }); + + + $('#record_wrapper .agree_' + sselcont_id + ', .big_box.agree') + .bind('click', + function (event) { + _setAgreement(event, $(this), sselcont_id, '1'); + } + ) + .addClass('clickable'); + + $('#record_wrapper .disagree_' + sselcont_id + ', .big_box.disagree') + .bind('click', + function (event) { + _setAgreement(event, $(this), sselcont_id, '-1'); + } + ) + .addClass('clickable'); + + if (compare == $('#record_wrapper').hasClass('single')) { + if (compare) { + // $('.agreement_selector').show(); + // $('#record_wrapper').stop().animate({right:0},100,function(){display_record(compare);}); + $('#record_wrapper').css({ + right: 0 + }); + _displayRecord(compare); + $('#right_column').hide(); + } + else { + // $('.agreement_selector').hide(); + $('#record_wrapper').css({ + right: 250 + }); + _displayRecord(compare); + $('#right_column').show(); + $('#record_compare .lightbox_container').empty(); + } + + } + else { + _displayRecord(compare); + } + + } + + function _getPrev() { + var current_wrapper = $('#sc_container .basket_element.selected').parent().parent(); + + if (current_wrapper.length === 0) + return; + + _slideshow(false); + + current_wrapper = current_wrapper.prev(); + if (current_wrapper.length === 0) + current_wrapper = $('#sc_container .basket_element_wrapper:last'); + + $('.basket_element', current_wrapper).parent().trigger('click'); + + _adjust_visibility($('.basket_element', current_wrapper)); + } + + function _getNext() { + var current_wrapper = $('#sc_container .basket_element.selected').parent().parent(); + + if (current_wrapper.length === 0) + return; + + current_wrapper = current_wrapper.next(); + if (current_wrapper.length === 0) + current_wrapper = $('#sc_container .basket_element_wrapper:first'); + + $('.basket_element', current_wrapper).parent().trigger('click'); + + _adjust_visibility($('.basket_element', current_wrapper)); + + if ($(document).data('slideshow')) { + var timer = setTimeout('get_next();', 3500); + $(document).data('slideshow_ctime', timer); + } + } + + function _slideshow(boolean_value) { + if (boolean_value == $(document).data('slideshow')) + return; + + if (!boolean_value && $(document).data('slideshow_ctime')) { + clearTimeout($(document).data('slideshow_ctime')); + $(document).data('slideshow_ctime', false); + } + + $(document).data('slideshow', boolean_value); + + var headers = $('#record_wrapper .header'); + + if (boolean_value) { + $('.play_button, .next_button.play, .previous_button.play', headers).hide(); + $('.pause_button, .next_button.pause, .previous_button.pause', headers).show(); + _getNext(); + } + else { + $('.pause_button, .next_button.pause, .previous_button.pause', headers).hide(); + $('.play_button, .next_button.play, .previous_button.play', headers).show(); + } + } + + function _adjust_visibility(el) { + if (_isViewable(el)) + return; + + var sc_wrapper = $('#sc_wrapper'); + var el_parent = $(el).parent(); + + var sc_left = el_parent.position().left + el_parent.outerWidth() / 2 - sc_wrapper.width() / 2; + + sc_wrapper.stop().animate({ + 'scrollLeft': sc_left + }); + } + + + function _setAgreement(event, el, sselcont_id, boolean_value) { + if (event.stopPropagation) + event.stopPropagation(); + event.cancelBubble = true; + + var id = + + $.ajax({ + type: "POST", + url: "/lightbox/ajax/SET_ELEMENT_AGREEMENT/" + sselcont_id + "/", + dataType: 'json', + data: { + agreement: boolean_value + }, + success: function (datas) { + if (!datas.error) { + if (boolean_value == '1') { + $('.agree_' + sselcont_id + '').removeClass('not_decided'); + $('.disagree_' + sselcont_id + '').addClass('not_decided'); + $('.userchoice.me').addClass('agree').removeClass('disagree'); + } + else { + $('.agree_' + sselcont_id + '').addClass('not_decided'); + $('.disagree_' + sselcont_id + '').removeClass('not_decided'); + $('.userchoice.me').addClass('disagree').removeClass('agree'); + } + _releasable = datas.releasable; + if (datas.releasable !== false) { + if (confirm(datas.releasable)) + $('#basket_options .confirm_report').trigger('click'); + } + } + else { + alert(datas.datas); + } + return; + } + }); + } + + function _displayRecord(compare) { + var main_container = $('#record_wrapper'); + + if (typeof compare == 'undefined') + compare = !main_container.hasClass('single'); + + var main_box = $('#record_main'); + var compare_box = $('#record_compare'); + + var main_record = $('.lightbox_container .record', main_box); + var compare_record = $('.lightbox_container .record', compare_box); + + var main_record_width = parseInt($('input[name=width]', main_box).val()); + var main_record_height = parseInt($('input[name=height]', main_box).val()); + var compare_record_width = parseInt($('input[name=width]', compare_box).val()); + var compare_record_height = parseInt($('input[name=height]', compare_box).val()); + + var main_container_width = main_container.width(); + var main_container_innerwidth = main_container.innerWidth(); + var main_container_height = main_container.height(); + var main_container_innerheight = main_container.innerHeight(); + + if (compare) { + $('.agreement_selector').show(); + main_container.addClass('comparison'); + + var double_portrait_width = main_container_innerwidth / 2; + var double_portrait_height = main_container_innerheight - $('.header', main_box).outerHeight(); + + var double_paysage_width = main_container_innerwidth; + var double_paysage_height = main_container_innerheight / 2 - $('.header', main_box).outerHeight(); + + var main_display_portrait = _calculateDisplay( + double_portrait_width, double_portrait_height, + main_record_width, main_record_height + ); + var main_display_paysage = _calculateDisplay( + double_paysage_width, double_paysage_height, + main_record_width, main_record_height + ); + + var compare_display_portrait = _calculateDisplay( + double_portrait_width, double_portrait_height, + compare_record_width, compare_record_height + ); + var compare_display_paysage = _calculateDisplay( + double_paysage_width, double_paysage_height, + compare_record_width, compare_record_height + ); + + var surface_main_portrait = main_display_portrait.width * main_display_portrait.height; + var surface_main_paysage = main_display_paysage.width * main_display_paysage.height; + var surface_compare_portrait = compare_display_portrait.width * compare_display_portrait.height; + var surface_compare_paysage = compare_display_paysage.width * compare_display_paysage.height; + + var double_portrait_surface = (surface_main_portrait + surface_compare_portrait) / 2; + var double_paysage_surface = (surface_main_paysage + surface_compare_paysage) / 2; + + var smooth_image = false; + + var m_width_image, m_height_image, c_width_image, c_height_image, dim_container; + + if (double_portrait_surface > double_paysage_surface) { + if (!main_container.hasClass('portrait')) { + smooth_image = true; + + _smoothTransform( + main_box, + '50%', + '100%', + function () { + _setContainerStatus('portrait'); + } + ); + + compare_box.css('visibility', 'hidden'); + + _smoothTransform( + compare_box, + '50%', + '100%', + function () { + compare_box.css('display', 'none') + .css('visibility', 'visible') + .fadeIn(); + } + ); + } + m_width_image = main_display_portrait.width; + m_height_image = main_display_portrait.height; + c_width_image = compare_display_portrait.width; + c_height_image = compare_display_portrait.height; + dim_container = { + width: double_portrait_width, + height: double_portrait_height + }; + } + else { + if (!main_container.hasClass('paysage')) { + smooth_image = true; + + _smoothTransform( + main_box, + '100%', + '50%', + function () { + _setContainerStatus('paysage'); + } + ); + + compare_box.css('visibility', 'hidden'); + + _smoothTransform( + compare_box, + '100%', + '50%', + function () { + compare_box.css('display', 'none') + .css('visibility', 'visible') + .fadeIn(); + } + ); + } + m_width_image = main_display_paysage.width; + m_height_image = main_display_paysage.height; + c_width_image = compare_display_paysage.width; + c_height_image = compare_display_paysage.height; + dim_container = { + width: double_paysage_width, + height: double_paysage_height + }; + } + + var image_callback = _setImagePosition(false, compare_record, c_width_image, c_height_image, dim_container, function () { + }); + _setImagePosition(smooth_image, main_record, m_width_image, m_height_image, dim_container, image_callback); + } + else { + $('.agreement_selector').hide(); + main_container.removeClass('comparison'); + + if (compare_box.is(':visible')) { + compare_box.hide().css('visibility', 'hidden').css('display', 'block'); + } + + var main_display = _calculateDisplay( + main_container_innerwidth, (main_container_innerheight - $('.header', main_box).outerHeight()), + main_record_width, main_record_height + ); + + if (!main_container.hasClass('single')) { + main_box.width('100%') + .height('100%'); + + _setContainerStatus('single'); + } + _setImagePosition(smooth_image, main_record, main_display.width, main_display.height, { + width: main_container_width, + height: (main_container_height - $('.header', main_box).outerHeight()) + }); + } + } + + function _calculateDisplay(display_width, display_height, width, height, margin) { + if (typeof margin == 'undefined') + margin = 10; + + var display_ratio = display_width / display_height; + var ratio = width / height; + var w, h; + + if (ratio > display_ratio)//landscape + { + w = display_width - 2 * margin; + if (w > width) + w = width; + h = w / ratio; + } + else { + h = display_height - 2 * margin; + if (h > height) + h = height; + w = ratio * h; + } + + return { + width: w, + height: h + }; + } + + function _downloadBasket() { + var ids = $.map($('#sc_container .download_form').toArray(), function (el, i) { + return $('input[name="basrec"]', $(el)).val(); + }); + _download(ids.join(';')); + } + + function _download(value) { + var dialog = dialogModule.dialog.create({title: typeof(language) !== 'undefined' ? language['export'] : ''}); + + $.post("/prod/export/multi-export/", "lst=" + value, function (data) { + + dialog.setContent(data); + + $('.tabs', dialog.getDomElement()).tabs(); + + $('.close_button', dialog.getDomElement()).bind('click', function () { + dialog.close(); + }); + + return false; + }); + } + + function _setSizeable(container) { + + $(container).bind('mousewheel', function (event, delta) { + + if ($(this).hasClass('note_editing')) + return; + + var record = $('.record_image', this); + + if (record.length === 0) + return; + + var o_top = parseInt(record.css('top')); + var o_left = parseInt(record.css('left')); + + var o_width, o_height, width, height; + + if (delta > 0) { + if (record.width() > 29788 || record.height() >= 29788) + return; + o_width = record.width(); + o_height = record.height(); + width = Math.round(o_width * 1.1); + height = Math.round(o_height * 1.1); + } + else { + if (record.width() < 30 || record.height() < 30) + return; + o_width = record.width(); + o_height = record.height(); + width = Math.round(o_width / 1.05); + height = Math.round(o_height / 1.05); + } + + var top = Math.round((height / o_height) * (o_top - $(this).height() / 2) + $(this).height() / 2); + var left = Math.round((width / o_width) * (o_left - $(this).width() / 2) + $(this).width() / 2); + + record.width(width).height(height).css({ + top: top, + left: left + }); + }); + + } + + function _setImagePosition(smooth, image, width, height, container, callback) { + var dimensions = {}; + + if (typeof container !== 'undefined') { + var c_width = container.width; + var c_height = container.height; + + dimensions.top = parseInt((c_height - height) / 2); + dimensions.left = parseInt((c_width - width) / 2); + } + if (typeof callback == 'undefined') { + callback = function () { + }; + } + + dimensions.width = width; + dimensions.height = height; + + if (smooth) { + $(image).stop().animate(dimensions, 500, callback); + } + else { + $(image).css(dimensions); + callback(); + } + } + + function _scrollElements(boolean_value) { + var sc_wrapper = $('#sc_wrapper'); + var value; + if (boolean_value) + value = sc_wrapper.scrollLeft() + 400; + else + value = sc_wrapper.scrollLeft() - 400; + + sc_wrapper.stop().animate({ + 'scrollLeft': value + }); + return; + } + + function _smoothTransform(box, width, height, callback) { + if (typeof callback == 'undefined') + callback = function () { + }; + + $(box).stop() + .animate( + { + width: width, + height: height + }, + 500, + callback + ); + } + + function _setContainerStatus(status) { + $('#record_wrapper').removeClass('paysage portrait single').addClass(status); + } + + function _isViewable(el) { + var sc_wrapper = $('#sc_wrapper'); + var sc_container = $('#sc_container'); + + var el_width = $(el).parent().outerWidth(); + var el_position = $(el).parent().position(); + var sc_scroll_left = sc_wrapper.scrollLeft(); + + var boundup = sc_wrapper.width(), + bounddown = 0, + placeup = el_position.left + el_width - sc_scroll_left, + placedown = el_position.left - sc_scroll_left; + + if (placeup <= boundup && placedown >= bounddown) + return true; + return false; + } + + function _saveNote(container, button) { + var sselcont_id = $(button).attr('id').split('_').pop(); + var note = $('.notes_wrapper textarea', container).val(); $.ajax({ type: "POST", - url: "/lightbox/ajax/SET_ELEMENT_AGREEMENT/" + sselcont_id + "/", + url: "/lightbox/ajax/SET_NOTE/" + sselcont_id + "/", dataType: 'json', data: { - agreement: boolean_value + note: note }, success: function (datas) { - if (!datas.error) { - if (boolean_value == '1') { - $('.agree_' + sselcont_id + '').removeClass('not_decided'); - $('.disagree_' + sselcont_id + '').addClass('not_decided'); - $('.userchoice.me').addClass('agree').removeClass('disagree'); - } - else { - $('.agree_' + sselcont_id + '').addClass('not_decided'); - $('.disagree_' + sselcont_id + '').removeClass('not_decided'); - $('.userchoice.me').addClass('disagree').removeClass('agree'); - } - p4.releasable = datas.releasable; - if (datas.releasable !== false) { - if (confirm(datas.releasable)) - $('#basket_options .confirm_report').trigger('click'); - } - } - else { - alert(datas.datas); - } + _hideNotes(container); + $('.notes_wrapper', container).remove(); + $('.lightbox_container', container).append(datas.datas); + _activateNotes(container); return; } }); -} - -function calculate_display(display_width, display_height, width, height, margin) { - if (typeof margin == 'undefined') - margin = 10; - - var display_ratio = display_width / display_height; - var ratio = width / height; - var w, h; - - if (ratio > display_ratio)//landscape - { - w = display_width - 2 * margin; - if (w > width) - w = width; - h = w / ratio; } - else { - h = display_height - 2 * margin; - if (h > height) - h = height; - w = ratio * h; + + function _activateNotes(container) { + $('.note_closer', container).button({ + text: true + }).bind('click', function () { + $(this).blur(); + _hideNotes(container); + return false; + } + ); + + $('.note_saver', container).button({ + text: true + }).bind('click', function () { + $(this).blur(); + _saveNote(container, this); + return false; + } + ); + } + + + function _showNotes(container) { + $('.notes_wrapper', container).animate({ + top: 0 + }); + $('.lightbox_container', container).addClass('note_editing'); + } + + function _hideNotes(container) { + $('.notes_wrapper', container).animate({ + top: '-100%' + }); + $('.lightbox_container', container).removeClass('note_editing'); + } + + function _setRelease(el) { + $('.loader', el).css({ + visibility: 'visible' + }); + $.ajax({ + type: "POST", + url: "/lightbox/ajax/SET_RELEASE/" + $('#navigation').val() + "/", + dataType: 'json', + error: function (data) { + $('.loader', el).css({ + visibility: 'hidden' + }); + }, + timeout: function (data) { + $('.loader', el).css({ + visibility: 'hidden' + }); + }, + success: function (data) { + $('.loader', el).css({ + visibility: 'hidden' + }); + if (data.datas) { + alert(data.datas); + } + if (!data.error) { + _releasable = false; + } + + return; + } + }); } return { - width: w, - height: h - }; -} - - -function display_record(compare) { - var main_container = $('#record_wrapper'); - - if (typeof compare == 'undefined') - compare = !main_container.hasClass('single'); - - var main_box = $('#record_main'); - var compare_box = $('#record_compare'); - - var main_record = $('.lightbox_container .record', main_box); - var compare_record = $('.lightbox_container .record', compare_box); - - var main_record_width = parseInt($('input[name=width]', main_box).val()); - var main_record_height = parseInt($('input[name=height]', main_box).val()); - var compare_record_width = parseInt($('input[name=width]', compare_box).val()); - var compare_record_height = parseInt($('input[name=height]', compare_box).val()); - - var main_container_width = main_container.width(); - var main_container_innerwidth = main_container.innerWidth(); - var main_container_height = main_container.height(); - var main_container_innerheight = main_container.innerHeight(); - - if (compare) { - $('.agreement_selector').show(); - main_container.addClass('comparison'); - - var double_portrait_width = main_container_innerwidth / 2; - var double_portrait_height = main_container_innerheight - $('.header', main_box).outerHeight(); - - var double_paysage_width = main_container_innerwidth; - var double_paysage_height = main_container_innerheight / 2 - $('.header', main_box).outerHeight(); - - var main_display_portrait = calculate_display( - double_portrait_width, double_portrait_height, - main_record_width, main_record_height - ); - var main_display_paysage = calculate_display( - double_paysage_width, double_paysage_height, - main_record_width, main_record_height - ); - - var compare_display_portrait = calculate_display( - double_portrait_width, double_portrait_height, - compare_record_width, compare_record_height - ); - var compare_display_paysage = calculate_display( - double_paysage_width, double_paysage_height, - compare_record_width, compare_record_height - ); - - var surface_main_portrait = main_display_portrait.width * main_display_portrait.height; - var surface_main_paysage = main_display_paysage.width * main_display_paysage.height; - var surface_compare_portrait = compare_display_portrait.width * compare_display_portrait.height; - var surface_compare_paysage = compare_display_paysage.width * compare_display_paysage.height; - - var double_portrait_surface = (surface_main_portrait + surface_compare_portrait) / 2; - var double_paysage_surface = (surface_main_paysage + surface_compare_paysage) / 2; - - var smooth_image = false; - - var m_width_image, m_height_image, c_width_image, c_height_image, dim_container; - - if (double_portrait_surface > double_paysage_surface) { - if (!main_container.hasClass('portrait')) { - smooth_image = true; - - smooth_transform( - main_box, - '50%', - '100%', - function () { - set_container_status('portrait'); - } - ); - - compare_box.css('visibility', 'hidden'); - - smooth_transform( - compare_box, - '50%', - '100%', - function () { - compare_box.css('display', 'none') - .css('visibility', 'visible') - .fadeIn(); - } - ); - } - m_width_image = main_display_portrait.width; - m_height_image = main_display_portrait.height; - c_width_image = compare_display_portrait.width; - c_height_image = compare_display_portrait.height; - dim_container = { - width: double_portrait_width, - height: double_portrait_height - }; - } - else { - if (!main_container.hasClass('paysage')) { - smooth_image = true; - - smooth_transform( - main_box, - '100%', - '50%', - function () { - set_container_status('paysage'); - } - ); - - compare_box.css('visibility', 'hidden'); - - smooth_transform( - compare_box, - '100%', - '50%', - function () { - compare_box.css('display', 'none') - .css('visibility', 'visible') - .fadeIn(); - } - ); - } - m_width_image = main_display_paysage.width; - m_height_image = main_display_paysage.height; - c_width_image = compare_display_paysage.width; - c_height_image = compare_display_paysage.height; - dim_container = { - width: double_paysage_width, - height: double_paysage_height - }; - } - - var image_callback = set_image_position(false, compare_record, c_width_image, c_height_image, dim_container, function () { - }); - set_image_position(smooth_image, main_record, m_width_image, m_height_image, dim_container, image_callback); + setReleasable: setReleasable } - else { - $('.agreement_selector').hide(); - main_container.removeClass('comparison'); - - if (compare_box.is(':visible')) { - compare_box.hide().css('visibility', 'hidden').css('display', 'block'); - } - - var main_display = calculate_display( - main_container_innerwidth, (main_container_innerheight - $('.header', main_box).outerHeight()), - main_record_width, main_record_height - ); - - if (!main_container.hasClass('single')) { - main_box.width('100%') - .height('100%'); - - set_container_status('single'); - } - set_image_position(smooth_image, main_record, main_display.width, main_display.height, { - width: main_container_width, - height: (main_container_height - $('.header', main_box).outerHeight()) - }); - } -} - -function set_container_status(status) { - $('#record_wrapper').removeClass('paysage portrait single').addClass(status); -} - -function set_image_position(smooth, image, width, height, container, callback) { - var dimensions = {}; - - if (typeof container !== 'undefined') { - var c_width = container.width; - var c_height = container.height; - - dimensions.top = parseInt((c_height - height) / 2); - dimensions.left = parseInt((c_width - width) / 2); - } - if (typeof callback == 'undefined') { - callback = function () { - }; - } - - dimensions.width = width; - dimensions.height = height; - - if (smooth) { - $(image).stop().animate(dimensions, 500, callback); - } - else { - $(image).css(dimensions); - callback(); - } -} - -function smooth_transform(box, width, height, callback) { - if (typeof callback == 'undefined') - callback = function () { - }; - - $(box).stop() - .animate( - { - width: width, - height: height - }, - 500, - callback - ); -} - - -function scroll_elements(boolean_value) { - var sc_wrapper = $('#sc_wrapper'); - var value; - if (boolean_value) - value = sc_wrapper.scrollLeft() + 400; - else - value = sc_wrapper.scrollLeft() - 400; - - sc_wrapper.stop().animate({ - 'scrollLeft': value - }); - return; -} - -function download_basket() { - var ids = $.map($('#sc_container .download_form').toArray(), function (el, i) { - return $('input[name="basrec"]', $(el)).val(); - }); - download(ids.join(';')); -} - -function download(value) { - var dialog = p4.Dialog.Create({title: typeof(language) !== 'undefined' ? language['export'] : ''}); - - $.post("/prod/export/multi-export/", "lst=" + value, function (data) { - - dialog.setContent(data); - - $('.tabs', dialog.getDomElement()).tabs(); - - $('.close_button', dialog.getDomElement()).bind('click', function () { - dialog.Close(); - }); - - return false; - }); -} - +})(jQuery); diff --git a/resources/www/prod/js/components/editor/record-editor.js b/resources/www/prod/js/components/editor/record-editor.js index 2ae966789f..04e649eff5 100644 --- a/resources/www/prod/js/components/editor/record-editor.js +++ b/resources/www/prod/js/components/editor/record-editor.js @@ -450,7 +450,6 @@ var recordEditorModule = (function (p4) { } function _setPreviewEdit() { - console.log('set preview edit on resize') if (!$('#TH_Opreview').is(':visible')) return false; diff --git a/resources/www/prod/js/components/push/push.js b/resources/www/prod/js/components/push/push.js index b160fdb3b5..16c586f355 100644 --- a/resources/www/prod/js/components/push/push.js +++ b/resources/www/prod/js/components/push/push.js @@ -44,11 +44,11 @@ var pushModule = (function (window, p4) { return; }, error: function () { - dialogModule.dialog.get(2).Close(); + dialogModule.dialog.get(2).close(); return; }, timeout: function () { - dialogModule.dialog.get(2).Close(); + dialogModule.dialog.get(2).close(); return; } }); @@ -159,7 +159,7 @@ var pushModule = (function (window, p4) { return false; } - $dialog.Close(); + $dialog.close(); $('input[name="name"]', $FeedBackForm).val($('input[name="name"]', $dialog.getDomElement()).val()); $('input[name="duration"]', $FeedBackForm).val($('select[name="duration"]', $dialog.getDomElement()).val()); @@ -454,11 +454,11 @@ var pushModule = (function (window, p4) { return; }, error: function () { - dialogModule.dialog.get(2).Close(); + dialogModule.dialog.get(2).close(); return; }, timeout: function () { - dialogModule.dialog.get(2).Close(); + dialogModule.dialog.get(2).close(); return; } }); @@ -492,7 +492,7 @@ var pushModule = (function (window, p4) { var callbackOK = function () { $('a.list_refresh', $container).trigger('click'); - dialogModule.dialog.get(2).Close(); + dialogModule.dialog.get(2).close(); }; var name = $('input[name="name"]', dialogModule.dialog.get(2).getDomElement()).val(); @@ -630,7 +630,7 @@ var pushModule = (function (window, p4) { var callbackOK = function () { $('#ListManager .all-lists a.list_refresh').trigger('click'); - dialogModule.dialog.get(2).Close(); + dialogModule.dialog.get(2).close(); }; var List = new document.List(list_id); diff --git a/resources/www/prod/js/core/selectable.js b/resources/www/prod/js/core/selectable.js index 6a53492f15..5f0ab5edd7 100644 --- a/resources/www/prod/js/core/selectable.js +++ b/resources/www/prod/js/core/selectable.js @@ -133,30 +133,6 @@ } } - /*function is_ctrl_key(event) { - if (event.altKey) - return true; - if (event.ctrlKey) - return true; - if (event.metaKey) // apple key opera - return true; - if (event.keyCode == '17') // apple key opera - return true; - if (event.keyCode == '224') // apple key mozilla - return true; - if (event.keyCode == '91') // apple key safari - return true; - - return false; - } - - function is_shift_key(event) { - if (event.shiftKey) - return true; - return false; - }*/ - - Selectable.prototype = { push: function (element) { if (this.options.allow_multiple === true || !this.has(element)) { diff --git a/resources/www/prod/js/prod.js b/resources/www/prod/js/prod.js index 0158b8e73d..8f022655ee 100644 --- a/resources/www/prod/js/prod.js +++ b/resources/www/prod/js/prod.js @@ -88,7 +88,7 @@ var prodModule = (function (p4, humane) { $dialog.getDomElement().find('form').bind('submit.conbo', function () { $(this).unbind('submit.conbo'); - $dialog.Close(); + $dialog.close(); return false; }); @@ -623,12 +623,10 @@ var prodModule = (function (p4, humane) { }); function _resizeAll() { - var body = $('#mainContainer'); + var body = $('body'); bodySize.y = body.height(); bodySize.x = body.width(); - $('.overlay').height(bodySize.y).width(bodySize.x); - var headBlockH = $('#headBlock').outerHeight(); var bodyY = bodySize.y - headBlockH - 2; var bodyW = bodySize.x - 2; @@ -845,7 +843,7 @@ var prodModule = (function (p4, humane) { $('.tabs', dialog.getDomElement()).tabs(); $('.close_button', dialog.getDomElement()).bind('click', function () { - dialog.Close(); + dialog.close(); }); return false; diff --git a/templates/web/common/dialog_export.html.twig b/templates/web/common/dialog_export.html.twig index 67a287acb0..f25f4b87b2 100644 --- a/templates/web/common/dialog_export.html.twig +++ b/templates/web/common/dialog_export.html.twig @@ -80,7 +80,7 @@ {% if app['conf'].get(['registry', 'actions', 'auth-required-for-export']) and app.getAuthenticatedUser().isGuest() %} {% endblock %} diff --git a/templates/web/prod/Baskets/Reorder.html.twig b/templates/web/prod/Baskets/Reorder.html.twig index d5439c035f..c759da93bd 100644 --- a/templates/web/prod/Baskets/Reorder.html.twig +++ b/templates/web/prod/Baskets/Reorder.html.twig @@ -202,7 +202,7 @@ alert(data.message); } p4.WorkZone.refresh('current'); - dialogModule.dialog.get(1).Close(); + dialogModule.dialog.get(1).close(); return; }, diff --git a/templates/web/prod/Baskets/Update.html.twig b/templates/web/prod/Baskets/Update.html.twig index e71c9c588a..dd98fdc923 100644 --- a/templates/web/prod/Baskets/Update.html.twig +++ b/templates/web/prod/Baskets/Update.html.twig @@ -29,7 +29,7 @@ }, success: function(data){ - $dialog = dialogModule.dialog.get(1).Close(); + $dialog = dialogModule.dialog.get(1).close(); if(data.success) { humane.info(data.message); return p4.WorkZone.refresh(data.basket.id); diff --git a/templates/web/prod/Story/Reorder.html.twig b/templates/web/prod/Story/Reorder.html.twig index 7b94d3c747..1e9b632b22 100644 --- a/templates/web/prod/Story/Reorder.html.twig +++ b/templates/web/prod/Story/Reorder.html.twig @@ -210,7 +210,7 @@ alert(data.message); } p4.WorkZone.refresh('current', null, false, 'story'); - dialogModule.dialog.get(1).Close(); + dialogModule.dialog.get(1).close(); return; }, diff --git a/templates/web/prod/WorkZone/Browser/Browser.html.twig b/templates/web/prod/WorkZone/Browser/Browser.html.twig index cc751382d0..efceb6676d 100644 --- a/templates/web/prod/WorkZone/Browser/Browser.html.twig +++ b/templates/web/prod/WorkZone/Browser/Browser.html.twig @@ -188,11 +188,11 @@ data: {}, success: function(datas){ if(datas.success) { - confirmBox.Close(); + confirmBox.close(); $('form[name="BasketBrowser"]', $container).trigger('submit'); p4.WorkZone.refresh(); } else { - confirmBox.Close(); + confirmBox.close(); var alertBox = dialogModule.dialog.create({ size : 'Alert', closeOnEscape : true, @@ -203,7 +203,7 @@ } }, error: function() { - confirmBox.Close(); + confirmBox.close(); var alertBox = dialogModule.dialog.create({ size : 'Alert', closeOnEscape : true, diff --git a/templates/web/prod/actions/Bridge/index.html.twig b/templates/web/prod/actions/Bridge/index.html.twig index dff328ad9c..70227e5feb 100644 --- a/templates/web/prod/actions/Bridge/index.html.twig +++ b/templates/web/prod/actions/Bridge/index.html.twig @@ -157,10 +157,10 @@ $(function() { data: {}, success: function(datas){ if(datas.success) { - confirmBox.Close(); + confirmBox.close(); pushModule.reloadBridge(managerUrl); } else { - confirmBox.Close(); + confirmBox.close(); var alertBox = dialogModule.dialog.create({ size : 'Alert', closeOnEscape : true, diff --git a/templates/web/prod/actions/Property/index.html.twig b/templates/web/prod/actions/Property/index.html.twig index 18595bcc75..c65ea701bb 100644 --- a/templates/web/prod/actions/Property/index.html.twig +++ b/templates/web/prod/actions/Property/index.html.twig @@ -151,7 +151,7 @@ var $dialogBox = $dialog.getDomElement(); $("button.cancel", $dialogBox).bind("click", function(){ - $dialog.Close(); + $dialog.close(); }); $("button.submiter", $dialogBox).bind("click", function(){ @@ -169,7 +169,7 @@ loader.show(); }, success: function(data){ - $dialog.Close(); + $dialog.close(); }, complete: function(){ $this.attr("disabled", false); diff --git a/templates/web/prod/actions/Property/type.html.twig b/templates/web/prod/actions/Property/type.html.twig index 502f76fa29..2d5fb35acb 100644 --- a/templates/web/prod/actions/Property/type.html.twig +++ b/templates/web/prod/actions/Property/type.html.twig @@ -59,7 +59,7 @@ var $dialogBox = $dialog.getDomElement(); $("button.cancel", $dialogBox).bind("click", function(){ - $dialog.Close(); + $dialog.close(); }); $("button.submiter", $dialogBox).bind("click", function(){ @@ -77,7 +77,7 @@ loader.show(); }, success: function(data){ - $dialog.Close(); + $dialog.close(); }, complete: function(){ $this.attr("disabled", false); diff --git a/templates/web/prod/actions/Tools/index.html.twig b/templates/web/prod/actions/Tools/index.html.twig index d7f8effad7..1e1d77331c 100644 --- a/templates/web/prod/actions/Tools/index.html.twig +++ b/templates/web/prod/actions/Tools/index.html.twig @@ -383,7 +383,7 @@ $(document).ready(function(){ humane.error(data.message); }else{ var dialog = dialogModule.dialog.get(1); - dialog.Close(); + dialog.close(); } }, complete: function(){ @@ -396,7 +396,7 @@ $(document).ready(function(){ $(".action_cancel", $scope).bind("click", function(){ var dialog = dialogModule.dialog.get(1); - dialog.Close(); + dialog.close(); return false; }); @@ -570,8 +570,8 @@ $(document).ready(function(){ if(data.success) { - dialog.Close(); - dialogModule.dialog.get(1).Close(); + dialog.close(); + dialogModule.dialog.get(1).close(); } else { diff --git a/templates/web/prod/actions/delete_records_confirm.html.twig b/templates/web/prod/actions/delete_records_confirm.html.twig index 495620744d..cdd9d587c3 100644 --- a/templates/web/prod/actions/delete_records_confirm.html.twig +++ b/templates/web/prod/actions/delete_records_confirm.html.twig @@ -35,7 +35,7 @@ var $cancelButton = $("button.cancel", $dialogBox); $cancelButton.bind("click", function(){ - $dialog.Close(); + $dialog.close(); }); $("button.submiter", $dialogBox).bind("click", function(){ @@ -56,7 +56,7 @@ loader.show(); }, success: function(data){ - $dialog.Close(); + $dialog.close(); $.each(data,function(i,n){ var imgt = $('#IMGT_'+n), chim = $('.CHIM_'+n), diff --git a/templates/web/prod/thesaurus.js.twig b/templates/web/prod/thesaurus.js.twig index e21e5099cf..293784b5cb 100644 --- a/templates/web/prod/thesaurus.js.twig +++ b/templates/web/prod/thesaurus.js.twig @@ -110,7 +110,7 @@ function T_replaceBy2(f) cancelButton: true, buttons: { "Ok" : function() { - confirmBox.Close(); + confirmBox.close(); T_replaceCandidates_OK(); } } @@ -248,7 +248,7 @@ function T_replaceCandidates_OK() trees.C._toReplace = null; thesauShowWizard("wiz_0", false); - replacingBox.Close(); + replacingBox.close(); if(result.msg != '') { @@ -346,10 +346,10 @@ function T_acceptCandidates_OK() } trees.C._toAccept = null; thesauShowWizard("wiz_0",false); - acceptingBox.Close(); + acceptingBox.close(); }, - error:function(){acceptingBox.Close();}, - timeout:function(){acceptingBox.Close();}, + error:function(){acceptingBox.close();}, + timeout:function(){acceptingBox.close();}, _ret: null // private alchemy }; @@ -387,7 +387,7 @@ function C_deleteCandidates_OK() timeout:10*60*1000, // 10 minutes ! success: function(result, textStatus) { - deletingBox.Close(); + deletingBox.close(); if(result.msg != '') { @@ -451,7 +451,7 @@ function T_acceptCandidates(menuItem, menu, type) cancelButton: true, buttons: { "Ok" : function() { - confirmBox.Close(); + confirmBox.close(); T_acceptCandidates_OK(); } } @@ -573,7 +573,7 @@ function C_MenuOption(menuItem, menu, option, parm) cancelButton: true, buttons: { "Ok" : function() { - confirmBox.Close(); + confirmBox.close(); C_deleteCandidates_OK(); } } @@ -638,7 +638,7 @@ function Xclick(e) { tids.pop(); var tid3 = tids.join('.'); - if(!is_ctrl_key(e) && !is_shift_key(e)) + if(!utilsModule.is_ctrl_key(e) && !utilsModule.is_shift_key(e)) { $("LI", trees[type].tree).removeClass('selected'); p4.thesau.lastClickedCandidate = null; From d7c89a2199eb5a8c77128a9ae77cd27d8304d536 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Wed, 2 Mar 2016 18:27:24 +0100 Subject: [PATCH 109/383] wip: move js modules into production-client npm module --- resources/gulp/components/prod.js | 9 +- resources/www/common/js/components/common.js | 4 +- resources/www/prod/js/components/cgu.js | 56 --- .../www/prod/js/components/preferences.js | 84 ---- .../www/prod/js/components/preview/preview.js | 29 +- .../www/prod/js/components/publication.js | 363 ------------------ .../www/prod/js/components/search/search.js | 49 +++ .../www/prod/js/components/video-editor.js | 26 +- .../js/components/workzone/workzone-basket.js | 3 +- .../js/components/workzone/workzone-facets.js | 3 +- .../components/workzone/workzone-thesaurus.js | 2 + .../prod/js/components/workzone/workzone.js | 125 +++++- resources/www/prod/js/prod.js | 232 +---------- .../web/common/index_bootstrap.html.twig | 4 +- .../web/prod/actions/Tools/index.html.twig | 7 +- templates/web/prod/index.html.twig | 25 +- 16 files changed, 230 insertions(+), 791 deletions(-) delete mode 100644 resources/www/prod/js/components/cgu.js delete mode 100644 resources/www/prod/js/components/preferences.js delete mode 100644 resources/www/prod/js/components/publication.js diff --git a/resources/gulp/components/prod.js b/resources/gulp/components/prod.js index 16db8ef6b8..33da8c9757 100644 --- a/resources/gulp/components/prod.js +++ b/resources/gulp/components/prod.js @@ -79,19 +79,18 @@ gulp.task('build-prod-js', function(){ config.paths.src + 'prod/js/components/search/search.js', config.paths.src + 'prod/js/components/search/search-result.js', - config.paths.src + 'prod/js/components/publication.js', + // config.paths.src + 'prod/js/components/publication.js', config.paths.src + 'prod/js/components/workzone/workzone.js', config.paths.src + 'prod/js/components/workzone/workzone-basket.js', config.paths.src + 'prod/js/components/workzone/workzone-facets.js', config.paths.src + 'prod/js/components/workzone/workzone-thesaurus.js', - config.paths.src + 'prod/js/components/cgu.js', - config.paths.src + 'prod/js/components/preferences.js', - // config.paths.src + 'prod/js/jquery.form.2.49.js', + // config.paths.src + 'prod/js/components/cgu.js', + // config.paths.src + 'prod/js/components/preferences.js', config.paths.src + 'prod/js/components/record/editable-record.js', config.paths.src + 'prod/js/components/push/push.js', config.paths.src + 'prod/js/prod.js', config.paths.src + 'prod/js/components/upload/upload.js', - config.paths.src + 'prod/js/components/video-editor.js', + // config.paths.src + 'prod/js/components/video-editor.js', config.paths.src + 'vendors/jquery-sprintf/js/jquery.sprintf.1.0.3.js', config.paths.src + 'prod/js/components/preview/preview.js', config.paths.src + 'prod/js/components/editor/record-editor.js', diff --git a/resources/www/common/js/components/common.js b/resources/www/common/js/components/common.js index 2bed238a19..5af0cfbf03 100644 --- a/resources/www/common/js/components/common.js +++ b/resources/www/common/js/components/common.js @@ -33,11 +33,11 @@ var commonModule = (function ($, p4) { $(this).removeClass('context-menu-item-hover'); }); - $('#help-trigger').contextMenu('#mainMenu .helpcontextmenu', {openEvt: 'click', dropDown: true, theme: 'vista', dropDown: true, + /*$('#help-trigger').contextMenu('#mainMenu .helpcontextmenu', {openEvt: 'click', dropDown: true, theme: 'vista', dropDown: true, showTransition: 'slideDown', hideTransition: 'hide', shadow: false - }); + });*/ }); diff --git a/resources/www/prod/js/components/cgu.js b/resources/www/prod/js/components/cgu.js deleted file mode 100644 index 9d762023e9..0000000000 --- a/resources/www/prod/js/components/cgu.js +++ /dev/null @@ -1,56 +0,0 @@ -var p4 = p4 || {}; - -var cguModule = (function (p4) { - function acceptCgus(name, value) { - userModule.setPref(name, value); - } - - function cancelCgus(id) { - - $.ajax({ - type: "POST", - url: "../prod/TOU/deny/" + id + "/", - dataType: 'json', - success: function (data) { - if (data.success) { - alert(language.cgusRelog); - self.location.replace(self.location.href); - } - else { - humane.error(data.message); - } - } - }); - - } - - function activateCgus() { - var $this = $('.cgu-dialog:first'); - $this.dialog({ - autoOpen: true, - closeOnEscape: false, - draggable: false, - modal: true, - resizable: false, - width: 800, - height: 500, - open: function () { - $this.parents(".ui-dialog:first").find(".ui-dialog-titlebar-close").remove(); - $('.cgus-accept', $(this)).bind('click', function () { - acceptCgus($('.cgus-accept', $this).attr('id'), $('.cgus-accept', $this).attr('date')); - $this.dialog('close').remove(); - activateCgus(); - }); - $('.cgus-cancel', $(this)).bind('click', function () { - if (confirm(language.warningDenyCgus)) { - cancelCgus($('.cgus-cancel', $this).attr('id').split('_').pop()); - } - }); - } - }); - } - - return { - activateCgus: activateCgus - }; -}(p4)); diff --git a/resources/www/prod/js/components/preferences.js b/resources/www/prod/js/components/preferences.js deleted file mode 100644 index ef851fb5a6..0000000000 --- a/resources/www/prod/js/components/preferences.js +++ /dev/null @@ -1,84 +0,0 @@ -var p4 = p4 || {}; - -var preferencesModule = (function (p4) { - function initLook() { - $('#nperpage_slider').slider({ - value: parseInt($('#nperpage_value').val()), - min: 10, - max: 100, - step: 10, - slide: function (event, ui) { - $('#nperpage_value').val(ui.value); - }, - stop: function (event, ui) { - userModule.setPref('images_per_page', $('#nperpage_value').val()); - } - }); - $('#sizeAns_slider').slider({ - value: parseInt($('#sizeAns_value').val()), - min: 90, - max: 270, - step: 10, - slide: function (event, ui) { - $('#sizeAns_value').val(ui.value); - }, - stop: function (event, ui) { - userModule.setPref('images_size', $('#sizeAns_value').val()); - } - }); - } - - // look_box - function setInitialStateOptions() { - var el = $('#look_box_settings select[name=start_page]'); - - switch (el.val()) { - case "LAST_QUERY": - case "PUBLI": - case "HELP": - $('#look_box_settings input[name=start_page_value]').hide(); - break; - case "QUERY": - $('#look_box_settings input[name=start_page_value]').show(); - break; - } - } - - function setInitialState() { - var el = $('#look_box_settings select[name=start_page]'); - var val = el.val(); - - - var start_page_query = $('#look_box_settings input[name=start_page_value]').val(); - - if (val === 'QUERY') { - userModule.setPref('start_page_query', start_page_query); - } - - userModule.setPref('start_page', val); - - } - - - function lookBox(el, event) { - $("#look_box").dialog({ - closeOnEscape: true, - resizable: false, - width: 450, - height: 500, - modal: true, - draggable: false, - overlay: { - backgroundColor: '#000', - opacity: 0.7 - } - }).dialog('open'); - } - - return { - initLook: initLook, - lookBox: lookBox, - setInitialStateOptions: setInitialStateOptions, - setInitialState: setInitialState - }; -}(p4)); diff --git a/resources/www/prod/js/components/preview/preview.js b/resources/www/prod/js/components/preview/preview.js index 1c572821ae..806e46a93a 100644 --- a/resources/www/prod/js/components/preview/preview.js +++ b/resources/www/prod/js/components/preview/preview.js @@ -7,6 +7,21 @@ var recordPreviewModule = (function (p4) { $(document).ready(function () { $('#PREVIEWIMGDESC').tabs(); + + $('#PREVIEWBOX .gui_vsplitter', p4.edit.editBox).draggable({ + axis: 'x', + containment: 'parent', + drag: function (event, ui) { + var x = $(ui.position.left)[0]; + if (x < 330 || x > (bodySize.x - 400)) { + return false; + } + var v = $(ui.position.left)[0]; + $("#PREVIEWLEFT").width(v); + $("#PREVIEWRIGHT").css("left", $(ui.position.left)[0]); + recordPreviewModule.resizePreview(); + } + }); }); /** @@ -285,11 +300,6 @@ var recordPreviewModule = (function (p4) { var h = parseInt(p4.preview.current.height); var w = parseInt(p4.preview.current.width); -// if(p4.preview.current.type == 'video') -// { -// var h = parseInt(p4.preview.current.flashcontent.height); -// var w = parseInt(p4.preview.current.flashcontent.width); -// } var t = 20; var de = 0; @@ -301,9 +311,6 @@ var recordPreviewModule = (function (p4) { de = 60; } - -// if(p4.preview.current.type != 'flash') -// { var ratioP = w / h; var ratioD = parseInt(p4.preview.width) / parseInt(p4.preview.height); @@ -320,13 +327,7 @@ var recordPreviewModule = (function (p4) { h = Math.round(w / ratioP); } } -// } -// else -// { -// h = Math.round(parseInt(p4.preview.height) - margY); -// w = Math.round(parseInt(p4.preview.width) - margX); -// } t = Math.round((parseInt(p4.preview.height) - h - de) / 2); var l = Math.round((parseInt(p4.preview.width) - w) / 2); $('#PREVIEWIMGCONT .record').css({ diff --git a/resources/www/prod/js/components/publication.js b/resources/www/prod/js/components/publication.js deleted file mode 100644 index 4d2edc1aa4..0000000000 --- a/resources/www/prod/js/components/publication.js +++ /dev/null @@ -1,363 +0,0 @@ -var publicationModule = (function () { - - var ajaxState = { - query: null, - isRunning: false - }; - - var curPage; - var $answers = $('#answers'); - - // refresh current view - $answers.on('click', '.feed_reload', function (event) { - event.preventDefault(); - fetchPublications(curPage) - }); - - // navigate to a specific feed - $answers.on('click', '.ajax_answers', function (event) { - event.preventDefault(); - var $this = $(this); - var append = $this.hasClass('append'); - var noScroll = $this.hasClass('no_scroll'); - - _fetchRemote($(event.currentTarget).attr('href'), {}) - .then(function (data) { - if (!append) { - $answers.empty(); - if (!noScroll) { - $answers.scrollTop(0); - } - $answers.append(data); - - $answers.find("img.lazyload").lazyload({ - container: $answers - }); - } - else { - $('.see_more.loading', $answers).remove(); - $answers.append(data); - - $answers.find("img.lazyload").lazyload({ - container: $answers - }); - - if (!noScroll) { - $answers.animate({ - 'scrollTop': ($answers.scrollTop() + $answers.innerHeight() - 80) - }); - } - } - searchModule.afterSearch(); - }); - - }); - - // subscribe_rss - $answers.on('click', '.subscribe_rss', function (event) { - event.preventDefault(); - var $this = $(this); - - if (typeof(renew) === 'undefined') - renew = 'false'; - else - renew = renew ? 'true' : 'false'; - - var buttons = {}; - buttons[language.renewRss] = function () { - $this.trigger({ - type: 'click', - renew: true - }); - }; - buttons[language.fermer] = function () { - $('#DIALOG').empty().dialog('destroy'); - }; - - event.stopPropagation(); - - $.ajax({ - type: "GET", - url: $this.attr('href') + (event.renew === true ? '?renew=true' : ''), - dataType: 'json', - success: function (data) { - if (data.texte !== false && data.titre !== false) { - if ($("#DIALOG").data("ui-dialog")) { - $("#DIALOG").dialog('destroy'); - } - $("#DIALOG").attr('title', data.titre) - .empty() - .append(data.texte) - .dialog({ - autoOpen: false, - closeOnEscape: true, - resizable: false, - draggable: false, - modal: true, - buttons: buttons, - width: 650, - height: 250, - overlay: { - backgroundColor: '#000', - opacity: 0.7 - } - }).dialog('open'); - - } - } - }); - }); - - // edit a feed - $answers.on('click', '.feed .entry a.feed_edit', function () { - var $this = $(this); - $.ajax({ - type: "GET", - url: $this.attr('href'), - dataType: 'html', - success: function (data) { - return _createPublicationModal(data); - } - }); - return false; - }); - - // remove a feed - $answers.on('click', '.feed .entry a.feed_delete', function () { - if (!confirm('etes vous sur de vouloir supprimer cette entree ?')) - return false; - var $this = $(this); - $.ajax({ - type: "POST", - url: $this.attr('href'), - dataType: 'json', - success: function (data) { - if (data.error === false) { - var $entry = $this.closest('.entry'); - $entry.animate({ - height: 0, - opacity: 0 - }, function () { - $entry.remove(); - }); - } - else - alert(data.message); - } - }); - return false; - }); - - - $answers.on('mouseover', '.feed .entry', function () { - $(this).addClass('hover'); - }); - - $answers.on('mouseout', '.feed .entry', function () { - $(this).removeClass('hover'); - }); - - $answers.on('click', '.see_more a', function (event) { - $see_more = $(this).closest('.see_more'); - $see_more.addClass('loading'); - }); - - - var _fetchRemote = function (url, data) { - var page = 0; - if (data.page === undefined) { - page = data.page; - } - - return ajaxState.query = $.ajax({ - type: "GET", - url: url, - dataType: 'html', - data: data, - beforeSend: function () { - if (ajaxState.isRunning && ajaxState.query.abort) - answAjax.abort(); - if (page === 0) - searchModule.clearAnswers(); - ajaxState.isRunning = true; - $answers.addClass('loading'); - }, - error: function () { - ajaxState.isRunning = false; - $answers.removeClass('loading'); - }, - timeout: function () { - ajaxState.isRunning = false; - $answers.removeClass('loading'); - }, - success: function (data) { - ajaxState.isRunning = false; - } - }); - }; - - var _createPublicationModal = function (data) { - - var buttons = {}; - buttons[language.valider] = function () { - var dialog = dialogModule.dialog.get(1); - var error = false; - var $form = $('form.main_form', dialog.getDomElement()); - - $('.required_text', $form).each(function (i, el) { - if ($.trim($(el).val()) === '') { - $(el).addClass('error'); - error = true; - } - }); - - if (error) { - alert(language.feed_require_fields); - } - - if ($('input[name="feed_id"]', $form).val() === '') { - alert(language.feed_require_feed); - error = true; - } - - if (error) { - return false; - } - - $.ajax({ - type: 'POST', - url: $form.attr('action'), - data: $form.serializeArray(), - dataType: 'json', - beforeSend: function () { - $('button', dialog.getDomElement()).prop('disabled', true); - }, - error: function () { - $('button', dialog.getDomElement()).prop('disabled', false); - }, - timeout: function () { - $('button', dialog.getDomElement()).prop('disabled', false); - }, - success: function (data) { - $('button', dialog.getDomElement()).prop('disabled', false); - if (data.error === true) { - alert(data.message); - return; - } - - if ($('form.main_form', dialog.getDomElement()).hasClass('entry_update')) { - var id = $('form input[name="entry_id"]', dialog.getDomElement()).val(); - var container = $('#entry_' + id); - - container.replaceWith(data.datas); - - container.hide().fadeIn(); - - $answers.find("img.lazyload").lazyload({ - container: $answers - }); - } - - dialogModule.dialog.close(1); - } - }); - dialogModule.dialog.close(1); - }; - - var dialog = dialogModule.dialog.create({ - size: 'Full', - closeOnEscape: true, - closeButton: true, - buttons: buttons - }); - - dialog.setContent(data); - - var $feeds_item = $('.feeds .feed', dialog.getDomElement()); - var $form = $('form.main_form', dialog.getDomElement()); - - $feeds_item.bind('click', function () { - $feeds_item.removeClass('selected'); - $(this).addClass('selected'); - $('input[name="feed_id"]', $form).val($('input', this).val()); - }).hover(function () { - $(this).addClass('hover'); - }, function () { - $(this).removeClass('hover'); - }); - - $form.bind('submit', function () { - return false; - }); - - return; - }; - - var fetchPublications = function (page) { - curPage = page; - return _fetchRemote('../prod/feeds/', { - page: page - }) - .then(function (data) { - $('.next_publi_link', $answers).remove(); - - $answers.append(data); - - $answers.find("img.lazyload").lazyload({ - container: $answers - }); - - searchModule.afterSearch(); - if (page > 0) { - $answers.stop().animate({ - scrollTop: $answers.scrollTop() + $answers.height() - }, 700); - } - return; - }); - }; - - - var publishRecords = function (type, value) { - var options = { - lst: '', - ssel: '', - act: '' - }; - - switch (type) { - case "IMGT": - case "CHIM": - options.lst = value; - break; - - case "STORY": - options.story = value; - break; - case "SSTT": - options.ssel = value; - break; - } - - $.post("../prod/feeds/requestavailable/" - , options - , function (data) { - - return _createPublicationModal(data); - }); - - return; - }; - - return { - fetchPublications: function (page) { - return fetchPublications(page); - }, - publishRecords: function (type, value) { - return publishRecords(type, value); - }, - openModal: function(data) { - return _createPublicationModal(data); - } - }; -})(); diff --git a/resources/www/prod/js/components/search/search.js b/resources/www/prod/js/components/search/search.js index 2407875986..98003eb353 100644 --- a/resources/www/prod/js/components/search/search.js +++ b/resources/www/prod/js/components/search/search.js @@ -1,6 +1,55 @@ var p4 = p4 || {}; var searchModule = (function (p4) { + $(document).ready(function(){ + $('.adv_search_button').on('click', function () { + var searchForm = $('#searchForm'); + var parent = searchForm.parent(); + + var options = { + size: (bodySize.x - 120)+'x'+(bodySize.y - 120), + loading: false, + closeCallback: function (dialog) { + + var datas = dialog.find('form.phrasea_query').appendTo(parent);//.clone(); + + $('.adv_trigger', searchForm).show(); + $('.adv_options', searchForm).hide(); + } + }; + + $dialog = dialogModule.dialog.create(options); + + searchForm.appendTo($dialog.getDomElement()); + + $dialog.getDomElement().find('.adv_options').show(); + $dialog.getDomElement().find('.adv_trigger').hide(); + + $dialog.getDomElement().find('form').bind('submit.conbo', function () { + $(this).unbind('submit.conbo'); + $dialog.close(); + return false; + }); + + + return false; + }); + + $('input[name=search_type]').bind('click', function () { + + var $this = $(this); + var $record_types = $('#recordtype_sel'); + + if ($this.hasClass('mode_type_reg')) { + $record_types.css("visibility", "hidden"); // better than hide because does not change layout + $record_types.prop("selectedIndex", 0); + } else { + $record_types.css("visibility", "visible"); + } + }); + + }); + function toggleCollection(deployer, todeploy_selector) { if($(deployer).hasClass("deployer_opened")) { diff --git a/resources/www/prod/js/components/video-editor.js b/resources/www/prod/js/components/video-editor.js index 4640dbb6fd..90f2e35204 100644 --- a/resources/www/prod/js/components/video-editor.js +++ b/resources/www/prod/js/components/video-editor.js @@ -1,8 +1,9 @@ +/* var videoEditorModule = (function (document) { - /***************** + /!***************** * Canva Object - *****************/ + *****************!/ var Canva = function (domCanva) { this.domCanva = domCanva; }; @@ -93,9 +94,9 @@ var videoEditorModule = (function (document) { }; - /****************** + /!****************** * Image Object - ******************/ + ******************!/ var Image = function (domElement) { this.domElement = domElement; }; @@ -112,9 +113,9 @@ var videoEditorModule = (function (document) { } }; - /****************** + /!****************** * Video Object inherits from Image object - ******************/ + ******************!/ var Video = function (domElement) { Image.call(this, domElement); @@ -130,9 +131,9 @@ var videoEditorModule = (function (document) { return this.aspectRatio; }; - /****************** + /!****************** * Cache Object - ******************/ + ******************!/ var Store = function () { this.datas = {}; }; @@ -163,9 +164,9 @@ var videoEditorModule = (function (document) { } }; - /****************** + /!****************** * Screenshot Object - ******************/ + ******************!/ var ScreenShot = function (id, canva, video, altCanvas) { var date = new Date(); @@ -214,9 +215,9 @@ var videoEditorModule = (function (document) { } }; - /** + /!** * THUMB EDITOR - */ + *!/ var ThumbnailEditor = function (videoId, canvaId, outputOptions) { var domElement = document.getElementById(videoId); @@ -320,3 +321,4 @@ var videoEditorModule = (function (document) { })(document); +*/ diff --git a/resources/www/prod/js/components/workzone/workzone-basket.js b/resources/www/prod/js/components/workzone/workzone-basket.js index f61cf1331f..778a324873 100644 --- a/resources/www/prod/js/components/workzone/workzone-basket.js +++ b/resources/www/prod/js/components/workzone/workzone-basket.js @@ -1,3 +1,4 @@ +/* var p4 = p4 || {}; var workzoneBasketModule = (function (p4) { @@ -104,4 +105,4 @@ var workzoneBasketModule = (function (p4) { openBasketPreferences: openBasketPreferences } -})(p4); \ No newline at end of file +})(p4);*/ diff --git a/resources/www/prod/js/components/workzone/workzone-facets.js b/resources/www/prod/js/components/workzone/workzone-facets.js index 177092a2e7..3b86d71d1d 100644 --- a/resources/www/prod/js/components/workzone/workzone-facets.js +++ b/resources/www/prod/js/components/workzone/workzone-facets.js @@ -1,3 +1,4 @@ +/* var p4 = p4 || {}; var workzoneFacetsModule = (function (p4) { @@ -159,4 +160,4 @@ var workzoneFacetsModule = (function (p4) { return { loadFacets: loadFacets, getSelectedFacets: getSelectedFacets, resetSelectedFacets: resetSelectedFacets} -})(p4); \ No newline at end of file +})(p4);*/ diff --git a/resources/www/prod/js/components/workzone/workzone-thesaurus.js b/resources/www/prod/js/components/workzone/workzone-thesaurus.js index 01631b2f58..8b6f0e2df1 100644 --- a/resources/www/prod/js/components/workzone/workzone-thesaurus.js +++ b/resources/www/prod/js/components/workzone/workzone-thesaurus.js @@ -1,3 +1,4 @@ +/* var p4 = p4 || {}; var workzoneThesaurusModule = (function (p4) { @@ -31,3 +32,4 @@ var workzoneThesaurusModule = (function (p4) { return {}; })(p4); +*/ diff --git a/resources/www/prod/js/components/workzone/workzone.js b/resources/www/prod/js/components/workzone/workzone.js index ac5ae1105d..2b10f79b03 100644 --- a/resources/www/prod/js/components/workzone/workzone.js +++ b/resources/www/prod/js/components/workzone/workzone.js @@ -1,8 +1,127 @@ var p4 = p4 || {}; var workzoneModule = (function (p4) { + var nextBasketScroll = false; var warnOnRemove = true; $(document).ready(function () { + $('#idFrameC').resizable({ + handles: 'e', + resize: function () { + answerSizer(); + linearizeUi(); + }, + stop: function () { + + var el = $('.SSTT.active').next().find('div:first'); + var w = el.find('div.chim-wrapper:first').outerWidth(); + var iw = el.innerWidth(); + var diff = $('#idFrameC').width() - el.outerWidth(); + var n = Math.floor(iw / w); + + $('#idFrameC').height('auto'); + + var nwidth = (n) * w + diff + n; + if (isNaN(nwidth)) { + _saveWindows(); + return; + } + if (nwidth < 265) + nwidth = 265; + if (el.find('div.chim-wrapper:first').hasClass('valid') && nwidth < 410) + nwidth = 410; + + + $('#idFrameC').stop().animate({ + width: nwidth + }, + 300, + 'linear', + function () { + answerSizer(); + linearizeUi(); + _saveWindows(); + }); + } + }); + + $('#idFrameC .ui-tabs-nav li').on('click', function (event) { + if($('#idFrameC').attr('data-status') == 'closed'){ + $('#idFrameC').width(300); + $('#rightFrame').css('left', 300); + $('#rightFrame').width($(window).width()-300); + $('#baskets, #proposals, #thesaurus_tab').hide(); + $('.ui-resizable-handle, #basket_menu_trigger').show(); + var IDname = $(this).attr('aria-controls'); + $('#'+IDname).show(); + } + + $('#idFrameC').attr('data-status', 'open'); + $('.WZbasketTab').css('background-position', '9px 21px'); + $('#idFrameC').removeClass('closed'); + }); + + var previousTab = ""; + + $('#idFrameC #retractableButton').bind('click', function (event) { + + if($('#idFrameC').attr('data-status') != 'closed'){ + $(this).find('i').removeClass('icon-double-angle-left').addClass('icon-double-angle-right') + $('#idFrameC').width(80); + $('#rightFrame').css('left', 80); + $('#rightFrame').width($(window).width()-80); + $('#idFrameC').attr('data-status', 'closed'); + $('#baskets, #proposals, #thesaurus_tab, .ui-resizable-handle, #basket_menu_trigger').hide(); + $('#idFrameC .ui-tabs-nav li').removeClass('ui-state-active'); + $('.WZbasketTab').css('background-position', '15px 16px'); + $('#idFrameC').addClass('closed'); + previousTab = $('#idFrameC .icon-menu').find('li.ui-tabs-active'); + }else{ + $(this).find('i').removeClass('icon-double-angle-right').addClass('icon-double-angle-left') + $('#idFrameC').width(300); + $('#rightFrame').css('left', 300); + $('#rightFrame').width($(window).width()-300); + $('#idFrameC').attr('data-status', 'open'); + $('.ui-resizable-handle, #basket_menu_trigger').show(); + $('.WZbasketTab').css('background-position', '9px 16px'); + $('#idFrameC').removeClass('closed'); + $('#idFrameC .icon-menu li').last().find('a').trigger('click'); + $('#idFrameC .icon-menu li').first().find('a').trigger('click'); + $(previousTab).find('a').trigger('click'); + } + + event.stopImmediatePropagation(); + //p4.WorkZone.close(); + return false; + }); + + $('#basket_menu_trigger').contextMenu('#basket_menu', { + openEvt: 'click', + dropDown: true, + theme: 'vista', + showTransition: 'slideDown', + hideTransition: 'hide', + shadow: false + }); + + $('#basket_menu_trigger').trigger("click"); + $('#basket_menu_trigger').trigger("click"); + + $('.basketTips').tooltip({ + delay: 200 + }); + + $('#idFrameC .tabs').tabs({ + activate: function (event, ui) { + if (ui.newTab.context.hash == "#thesaurus_tab") { + thesau_show(); + } + p4.WorkZone.open(); + } + }); + $('.basket_refresher').on('click', function () { + return p4.WorkZone.refresh('current'); + return false; + }); activeBaskets(); $('a.story_unfix').on('click', function () { @@ -117,7 +236,7 @@ var workzoneModule = (function (p4) { return; } - p4.next_bask_scroll = true; + nextBasketScroll = true; return; } }); @@ -250,8 +369,8 @@ var workzoneModule = (function (p4) { header: 'div.header', activate: function (event, ui) { var b_active = $('#baskets .SSTT.active'); - if (p4.next_bask_scroll) { - p4.next_bask_scroll = false; + if (nextBasketScroll) { + nextBasketScroll = false; if (!b_active.next().is(':visible')) return; diff --git a/resources/www/prod/js/prod.js b/resources/www/prod/js/prod.js index 8f022655ee..652bc03400 100644 --- a/resources/www/prod/js/prod.js +++ b/resources/www/prod/js/prod.js @@ -17,7 +17,7 @@ var prodModule = (function (p4, humane) { humane.info = humane.spawn({addnCls: 'humane-libnotify-info', timeout: 1000}); humane.error = humane.spawn({addnCls: 'humane-libnotify-error', timeout: 1000}); humane.forceNew = true; - cguModule.activateCgus(); + // cguModule.activateCgus(); $('body').on('click', 'a.dialog', function (event) { var $this = $(this), size = 'Medium'; @@ -49,52 +49,8 @@ var prodModule = (function (p4, humane) { return false; }); - $('input[name=search_type]').bind('click', function () { - console.log('search bind') - var $this = $(this); - var $record_types = $('#recordtype_sel'); - - console.log($this.hasClass('mode_type_reg'), $record_types) - if ($this.hasClass('mode_type_reg')) { - $record_types.css("visibility", "hidden"); // better than hide because does not change layout - $record_types.prop("selectedIndex", 0); - } else { - $record_types.css("visibility", "visible"); - } - }); - - $('.adv_search_button').on('click', function () { - var searchForm = $('#searchForm'); - var parent = searchForm.parent(); - - var options = { - size: (bodySize.x - 120)+'x'+(bodySize.y - 120), - loading: false, - closeCallback: function (dialog) { - - var datas = dialog.find('form.phrasea_query').appendTo(parent);//.clone(); - - $('.adv_trigger', searchForm).show(); - $('.adv_options', searchForm).hide(); - } - }; - - $dialog = dialogModule.dialog.create(options); - - searchForm.appendTo($dialog.getDomElement()); - - $dialog.getDomElement().find('.adv_options').show(); - $dialog.getDomElement().find('.adv_trigger').hide(); - - $dialog.getDomElement().find('form').bind('submit.conbo', function () { - $(this).unbind('submit.conbo'); - $dialog.close(); - return false; - }); - return false; - }); $(document).bind('contextmenu', function (event) { var targ; @@ -119,73 +75,22 @@ var prodModule = (function (p4, humane) { return gogo; }); - $('.basket_refresher').on('click', function () { - return p4.WorkZone.refresh('current'); - return false; - }); + $('#loader_bar').stop().animate({ width: '70%' }, 450); + p4.preview = { open: false, current: false }; - p4.currentViewMode = 'classic'; - p4.nbNoview = 0; p4.sel = []; - p4.baskSel = []; p4.edit = {}; p4.thesau = { tabs: null }; p4.active_zone = false; - p4.next_bask_scroll = false; - - - $('#backcolorpickerHolder').ColorPicker({ - flat: true, - color: '404040', - livePreview: false, - eventName: 'mouseover', - onSubmit: function (hsb, hex, rgb, el) { - var back_hex = ''; - var unactive = ''; - - - if (hsb.b >= 50) { - back_hex = '000000'; - - var sim_b = 0.1 * hsb.b; - } - else { - back_hex = 'FFFFFF'; - - var sim_b = 100 - 0.1 * (100 - hsb.b); - } - - var sim_b = 0.1 * hsb.b; - - var sim_rgb = utilsModule.hsl2rgb(hsb.h, hsb.s, sim_b); - var sim_hex = utilsModule.RGBtoHex(sim_rgb.r, sim_rgb.g, sim_rgb.b); - - userModule.setPref('background-selection', hex); - userModule.setPref('background-selection-disabled', sim_hex); - userModule.setPref('fontcolor-selection', back_hex); - - $('style[title=color_selection]').empty(); - - var datas = '.diapo.selected,#reorder_box .diapo.selected, #EDIT_ALL .diapo.selected, .list.selected, .list.selected .diapo' + - '{' + - ' COLOR: #' + back_hex + ';' + - ' BACKGROUND-COLOR: #' + hex + ';' + - '}'; - $('style[title=color_selection]').empty().text(datas); - } - }); - $('#backcolorpickerHolder').find('.colorpicker_submit').append($('#backcolorpickerHolder .submiter')).bind('click', function () { - $(this).highlight('#CCCCCC'); - }); $('#search_submit').on('mousedown', function (event) { return false; @@ -206,97 +111,9 @@ var prodModule = (function (p4, humane) { _triggerShortcuts(); }); - $('#idFrameC').resizable({ - handles: 'e', - resize: function () { - answerSizer(); - linearizeUi(); - }, - stop: function () { - - var el = $('.SSTT.active').next().find('div:first'); - var w = el.find('div.chim-wrapper:first').outerWidth(); - var iw = el.innerWidth(); - var diff = $('#idFrameC').width() - el.outerWidth(); - var n = Math.floor(iw / w); - - $('#idFrameC').height('auto'); - - var nwidth = (n) * w + diff + n; - if (isNaN(nwidth)) { - _saveWindows(); - return; - } - if (nwidth < 265) - nwidth = 265; - if (el.find('div.chim-wrapper:first').hasClass('valid') && nwidth < 410) - nwidth = 410; - $('#idFrameC').stop().animate({ - width: nwidth - }, - 300, - 'linear', - function () { - answerSizer(); - linearizeUi(); - _saveWindows(); - }); - } - }); - $('#idFrameC .ui-tabs-nav li').on('click', function (event) { - if($('#idFrameC').attr('data-status') == 'closed'){ - $('#idFrameC').width(300); - $('#rightFrame').css('left', 300); - $('#rightFrame').width($(window).width()-300); - $('#baskets, #proposals, #thesaurus_tab').hide(); - $('.ui-resizable-handle, #basket_menu_trigger').show(); - var IDname = $(this).attr('aria-controls'); - $('#'+IDname).show(); - } - - $('#idFrameC').attr('data-status', 'open'); - $('.WZbasketTab').css('background-position', '9px 21px'); - $('#idFrameC').removeClass('closed'); - }); - - var previousTab = ""; - - $('#idFrameC #retractableButton').bind('click', function (event) { - - if($('#idFrameC').attr('data-status') != 'closed'){ - $(this).find('i').removeClass('icon-double-angle-left').addClass('icon-double-angle-right') - $('#idFrameC').width(80); - $('#rightFrame').css('left', 80); - $('#rightFrame').width($(window).width()-80); - $('#idFrameC').attr('data-status', 'closed'); - $('#baskets, #proposals, #thesaurus_tab, .ui-resizable-handle, #basket_menu_trigger').hide(); - $('#idFrameC .ui-tabs-nav li').removeClass('ui-state-active'); - $('.WZbasketTab').css('background-position', '15px 16px'); - $('#idFrameC').addClass('closed'); - previousTab = $('#idFrameC .icon-menu').find('li.ui-tabs-active'); - }else{ - $(this).find('i').removeClass('icon-double-angle-right').addClass('icon-double-angle-left') - $('#idFrameC').width(300); - $('#rightFrame').css('left', 300); - $('#rightFrame').width($(window).width()-300); - $('#idFrameC').attr('data-status', 'open'); - $('.ui-resizable-handle, #basket_menu_trigger').show(); - $('.WZbasketTab').css('background-position', '9px 16px'); - $('#idFrameC').removeClass('closed'); - $('#idFrameC .icon-menu li').last().find('a').trigger('click'); - $('#idFrameC .icon-menu li').first().find('a').trigger('click'); - $(previousTab).find('a').trigger('click'); - } - - event.stopImmediatePropagation(); - //p4.WorkZone.close(); - return false; - }); - - $('#look_box .tabs').tabs(); _resizeAll(); @@ -307,17 +124,6 @@ var prodModule = (function (p4, humane) { $('body').append(''); - $('#basket_menu_trigger').contextMenu('#basket_menu', { - openEvt: 'click', - dropDown: true, - theme: 'vista', - showTransition: 'slideDown', - hideTransition: 'hide', - shadow: false - }); - - $('#basket_menu_trigger').trigger("click"); - $('#basket_menu_trigger').trigger("click"); $('.datepicker').datepicker({ changeYear: true, @@ -362,8 +168,6 @@ var prodModule = (function (p4, humane) { _initAnswerForm(); - preferencesModule.initLook(); - // setTimeout("pollNotifications();", 10000); $(this).bind('keydown', function (event) { @@ -574,33 +378,9 @@ var prodModule = (function (p4, humane) { $(this).removeClass('focused'); }); - $('.basketTips').tooltip({ - delay: 200 - }); - $('#idFrameC .tabs').tabs({ - activate: function (event, ui) { - if (ui.newTab.context.hash == "#thesaurus_tab") { - thesau_show(); - } - p4.WorkZone.open(); - } - }); - $('#PREVIEWBOX .gui_vsplitter', p4.edit.editBox).draggable({ - axis: 'x', - containment: 'parent', - drag: function (event, ui) { - var x = $(ui.position.left)[0]; - if (x < 330 || x > (bodySize.x - 400)) { - return false; - } - var v = $(ui.position.left)[0]; - $("#PREVIEWLEFT").width(v); - $("#PREVIEWRIGHT").css("left", $(ui.position.left)[0]); - recordPreviewModule.resizePreview(); - } - }); + $('input.input_select_copy').on('focus', function () { $(this).select(); @@ -688,14 +468,14 @@ var prodModule = (function (p4, humane) { } - function doSpecialSearch(qry, allbase) { + /*function doSpecialSearch(qry, allbase) { if (allbase) { searchModule.toggleDatabase(true); } workzoneFacetsModule.resetSelectedFacets(); $('#EDIT_query').val(decodeURIComponent(qry).replace(/\+/g, " ")); searchModule.newSearch(qry); - } + }*/ function addToBasket(sbas_id, record_id, event, singleSelection) { var singleSelection = singleSelection || false; diff --git a/templates/web/common/index_bootstrap.html.twig b/templates/web/common/index_bootstrap.html.twig index 45b9d6c40d..a24b8b8d22 100644 --- a/templates/web/common/index_bootstrap.html.twig +++ b/templates/web/common/index_bootstrap.html.twig @@ -19,13 +19,13 @@ {% if app.debug %} - + {# + #} {% endif %} {##} diff --git a/templates/web/prod/actions/Tools/index.html.twig b/templates/web/prod/actions/Tools/index.html.twig index 1e1d77331c..df061551f2 100644 --- a/templates/web/prod/actions/Tools/index.html.twig +++ b/templates/web/prod/actions/Tools/index.html.twig @@ -402,11 +402,14 @@ $(document).ready(function(){ }); //thumbExtractor - - var ThumbEditor = new videoEditorModule.ThumbnailEditor("thumb_video", "thumb_canvas", { + var ThumbEditor = new ProductionApplication.VideoEditor("thumb_video", "thumb_canvas", { altCanvas: $('#alt_canvas_container .alt_canvas') }); + /*var ThumbEditor = new videoEditorModule.ThumbnailEditor("thumb_video", "thumb_canvas", { + altCanvas: $('#alt_canvas_container .alt_canvas') + });*/ + if(ThumbEditor.isSupported()) { var $sliderWrapper = $("#thumb_wrapper", $scope); diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index f47d0ddace..e2811e0020 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -393,7 +393,7 @@
    {% include "prod/toolbar.html.twig" with {acl: app.getAclForUser(app.getAuthenticatedUser())} %} - {{ 'Preferences' | trans }} + {{ 'Preferences' | trans }}
    @@ -403,22 +403,6 @@
    -
    @@ -611,7 +595,7 @@

    {{ 'Affichage au demarrage' | trans }}

    {% set start_page_pref = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'start_page') %} - @@ -626,7 +610,7 @@ - +
    @@ -752,7 +736,7 @@ {% set initialAppState = 'publication' %} {% endif %} - ProductionApplication.bootstrap({ + var prodApp = ProductionApplication.bootstrap({ lang: "{{ app.locale }}", baseUrl: '{{ app['request'].getUriForPath('/') }}', basePath: '{{ app.request.basePath|e('js') }}', @@ -763,6 +747,7 @@ }, initialState: "{{ initialAppState }}" }) + prodApp.appEvents.emit('search.doSpecialSearch', {'special': true}); $(document).ready(function(){ workzoneModule.setRemoveWarning("{% if app['settings'].getUserSetting(app.getAuthenticatedUser(), "warning_on_delete_story") %}true{% else %}false{% endif %}"); From cf1fd82a5b1acfb3f6bda93aad14a1e9b8fddee1 Mon Sep 17 00:00:00 2001 From: Florian Blouet Date: Thu, 3 Mar 2016 18:46:32 +0100 Subject: [PATCH 110/383] wip: move js module into external production client --- resources/gulp/components/prod.js | 8 +- .../js/components/search/search-result.js | 2 +- .../www/prod/js/components/search/search.js | 400 +--------- .../js/components/workzone/workzone-basket.js | 108 --- .../js/components/workzone/workzone-facets.js | 163 ---- .../components/workzone/workzone-thesaurus.js | 35 - .../prod/js/components/workzone/workzone.js | 735 ------------------ resources/www/prod/js/prod.js | 528 +------------ templates/web/prod/WorkZone/Macros.html.twig | 2 +- .../actions/delete_records_confirm.html.twig | 2 +- templates/web/prod/index.html.twig | 43 +- templates/web/prod/thesaurus.js.twig | 7 +- 12 files changed, 59 insertions(+), 1974 deletions(-) delete mode 100644 resources/www/prod/js/components/workzone/workzone-basket.js delete mode 100644 resources/www/prod/js/components/workzone/workzone-facets.js delete mode 100644 resources/www/prod/js/components/workzone/workzone-thesaurus.js delete mode 100644 resources/www/prod/js/components/workzone/workzone.js diff --git a/resources/gulp/components/prod.js b/resources/gulp/components/prod.js index 33da8c9757..09eb47f04b 100644 --- a/resources/gulp/components/prod.js +++ b/resources/gulp/components/prod.js @@ -80,10 +80,10 @@ gulp.task('build-prod-js', function(){ config.paths.src + 'prod/js/components/search/search.js', config.paths.src + 'prod/js/components/search/search-result.js', // config.paths.src + 'prod/js/components/publication.js', - config.paths.src + 'prod/js/components/workzone/workzone.js', - config.paths.src + 'prod/js/components/workzone/workzone-basket.js', - config.paths.src + 'prod/js/components/workzone/workzone-facets.js', - config.paths.src + 'prod/js/components/workzone/workzone-thesaurus.js', + // config.paths.src + 'prod/js/components/workzone/workzone.js', + // config.paths.src + 'prod/js/components/workzone/workzone-basket.js', + // config.paths.src + 'prod/js/components/workzone/workzone-facets.js', + // config.paths.src + 'prod/js/components/workzone/workzone-thesaurus.js', // config.paths.src + 'prod/js/components/cgu.js', // config.paths.src + 'prod/js/components/preferences.js', config.paths.src + 'prod/js/components/record/editable-record.js', diff --git a/resources/www/prod/js/components/search/search-result.js b/resources/www/prod/js/components/search/search-result.js index f9cc184d7a..58e2d053c9 100644 --- a/resources/www/prod/js/components/search/search-result.js +++ b/resources/www/prod/js/components/search/search-result.js @@ -10,7 +10,7 @@ var searchResultModule = (function (p4, window) { $('#answercontextwrap table:visible').hide(); }, selectStop: function (event, selection) { - searchModule.viewNbSelect(); + prodApp.appEvents.emit('search.doRefreshSelection') }, callbackSelection: function (element) { var elements = $(element).attr('id').split('_'); diff --git a/resources/www/prod/js/components/search/search.js b/resources/www/prod/js/components/search/search.js index 98003eb353..dd7d140bd9 100644 --- a/resources/www/prod/js/components/search/search.js +++ b/resources/www/prod/js/components/search/search.js @@ -1,410 +1,12 @@ var p4 = p4 || {}; var searchModule = (function (p4) { - $(document).ready(function(){ - $('.adv_search_button').on('click', function () { - var searchForm = $('#searchForm'); - var parent = searchForm.parent(); - - var options = { - size: (bodySize.x - 120)+'x'+(bodySize.y - 120), - loading: false, - closeCallback: function (dialog) { - - var datas = dialog.find('form.phrasea_query').appendTo(parent);//.clone(); - - $('.adv_trigger', searchForm).show(); - $('.adv_options', searchForm).hide(); - } - }; - - $dialog = dialogModule.dialog.create(options); - - searchForm.appendTo($dialog.getDomElement()); - - $dialog.getDomElement().find('.adv_options').show(); - $dialog.getDomElement().find('.adv_trigger').hide(); - - $dialog.getDomElement().find('form').bind('submit.conbo', function () { - $(this).unbind('submit.conbo'); - $dialog.close(); - return false; - }); - return false; - }); - $('input[name=search_type]').bind('click', function () { - - var $this = $(this); - var $record_types = $('#recordtype_sel'); - - if ($this.hasClass('mode_type_reg')) { - $record_types.css("visibility", "hidden"); // better than hide because does not change layout - $record_types.prop("selectedIndex", 0); - } else { - $record_types.css("visibility", "visible"); - } - }); - - }); - - function toggleCollection(deployer, todeploy_selector) - { - if($(deployer).hasClass("deployer_opened")) { - $(deployer).removeClass("deployer_opened").addClass("deployer_closed"); - $(todeploy_selector).hide(); - } - else { - $(deployer).removeClass("deployer_closed").addClass("deployer_opened"); - $(todeploy_selector).show(); - } - } - /** - * adv search : check/uncheck all the collections (called by the buttons "all"/"none") - * - * @param bool - */ - function toggleDatabase(bool) { - $('form.phrasea_query .sbas_list').each(function () { - - var sbas_id = $(this).find('input[name=reference]:first').val(); - if (bool) - $(this).find(':checkbox').prop('checked', true); - else - $(this).find(':checkbox').prop('checked', false); - }); - - checkFilters(true); - } - - function resetSearch() { - var container = $("#ADVSRCH_OPTIONS_ZONE"); - var fieldsSort = $('#ADVSRCH_SORT_ZONE select[name=sort]', container); - var fieldsSortOrd = $('#ADVSRCH_SORT_ZONE select[name=ord]', container); - var dateFilterSelect = $('#ADVSRCH_DATE_ZONE select', container); - - $("option.default-selection", fieldsSort).prop("selected", true); - $("option.default-selection", fieldsSortOrd).prop("selected", true); - - $('#ADVSRCH_FIELDS_ZONE option').prop("selected", false); - $('#ADVSRCH_OPTIONS_ZONE input:checkbox.field_switch').prop("checked", false); - - $("option:eq(0)", dateFilterSelect).prop("selected", true); - $('#ADVSRCH_OPTIONS_ZONE .datepicker').val(''); - $('form.adv_search_bind input:text').val(''); - toggleDatabase(true); - } - - function selectDatabase(el, sbas_id) { - console.log('ok select') - var bool = $(el).prop('checked'); - $.each($('.sbascont_' + sbas_id + ' :checkbox'), function () { - this.checked = bool; - }); - - checkFilters(true); - } - - function clearAnswers() { - $('#formAnswerPage').val(''); - $('#searchForm input[name="nba"]').val(''); - $('#answers, #dyn_tool').empty(); - } - - function newSearch(query) { - p4.Results.Selection.empty(); - - searchModule.clearAnswers(); - $('#SENT_query').val(query); - var histo = $('#history-queries ul'); - - histo.prepend('
  • ' + query + '
  • '); - - var lis = $('li', histo); - if (lis.length > 25) { - $('li:last', histo).remove(); - } - - $('#idFrameC li.proposals_WZ').removeClass('active'); - - $('#searchForm').submit(); - return false; - } - - function beforeSearch() { - if (answAjaxrunning) - return; - answAjaxrunning = true; - - searchModule.clearAnswers(); - $('#tooltip').css({ - 'display': 'none' - }); - $('#answers').addClass('loading').empty(); - $('#answercontextwrap').remove(); - } - - function afterSearch() { - if ($('#answercontextwrap').length === 0) - $('body').append('
    '); - - $.each($('#answers .contextMenuTrigger'), function () { - - var id = $(this).closest('.IMGT').attr('id').split('_').slice(1, 3).join('_'); - - $(this).contextMenu('#IMGT_' + id + ' .answercontextmenu', { - appendTo: '#answercontextwrap', - openEvt: 'click', - dropDown: true, - theme: 'vista', - showTransition: 'slideDown', - hideTransition: 'hide', - shadow: false - }); - }); - - answAjaxrunning = false; - $('#answers').removeClass('loading'); - $('.captionTips, .captionRolloverTips').tooltip({ - delay: 0, - isBrowsable: false, - extraClass: 'caption-tooltip-container' - }); - $('.infoTips').tooltip({ - delay: 0 - }); - $('.previewTips').tooltip({ - fixable: true - }); - $('.thumb .rollovable').hover( - function () { - $('.rollover-gif-hover', this).show(); - $('.rollover-gif-out', this).hide(); - }, - function () { - $('.rollover-gif-hover', this).hide(); - $('.rollover-gif-out', this).show(); - } - ); - viewNbSelect(); - $('#answers div.IMGT').draggable({ - helper: function () { - $('body').append('
    ' + p4.Results.Selection.length() + '
    '); - return $('#dragDropCursor'); - }, - scope: "objects", - distance: 20, - scroll: false, - cursorAt: { - top: -10, - left: -20 - }, - start: function (event, ui) { - if (!$(this).hasClass('selected')) - return false; - } - }); - prodModule.linearizeUi(); - } - - function checkFilters(save) { - var danger = false; - var search = { - bases: {}, - fields: [], - dates: {}, - status: [], - elasticSort: {} - - }; - - var adv_box = $('form.phrasea_query .adv_options'); - var container = $("#ADVSRCH_OPTIONS_ZONE"); - var fieldsSort = $('#ADVSRCH_SORT_ZONE select[name=sort]', container); - var fieldsSortOrd = $('#ADVSRCH_SORT_ZONE select[name=ord]', container); - var fieldsSelect = $('#ADVSRCH_FIELDS_ZONE select', container); - var dateFilterSelect = $('#ADVSRCH_DATE_ZONE select', container); - var scroll = fieldsSelect.scrollTop(); - - // hide all the fields in the "sort by" select, so only the relevant ones will be shown again - $("option.dbx", fieldsSort).hide().prop("disabled", true); // dbx is for "field of databases" - - // hide all the fields in the "fields" select, so only the relevant ones will be shown again - $("option.dbx", fieldsSelect).hide().prop("disabled", true); // option[0] is "all fields" - - // hide all the fields in the "date field" select, so only the relevant ones will be shown again - $("option.dbx", dateFilterSelect).hide().prop("disabled", true); // dbx = all "field" entries in the select = all except the firstt - - var nbTotalSelectedColls = 0; - $.each($('.sbascont', adv_box), function () { - var $this = $(this); - - var sbas_id = $this.parent().find('input[name="reference"]').val(); - search.bases[sbas_id] = []; - - var nbCols = 0; - var nbSelectedColls = 0; - $this.find('.checkbas').each(function (idx, el) { - nbCols++; - if($(this).prop('checked')) { - nbSelectedColls++; - nbTotalSelectedColls++; - search.bases[sbas_id].push($(this).val()); - } - }); - - // display the number of selected colls for the databox - $('.infos_sbas_' + sbas_id).empty().append(nbSelectedColls + '/' + nbCols); - - // if one coll is not checked, show danger - if(nbSelectedColls != nbCols) { - $("#ADVSRCH_SBAS_LABEL_" + sbas_id).addClass("danger"); - danger = true; - } - else { - $("#ADVSRCH_SBAS_LABEL_" + sbas_id).removeClass("danger"); - } - - if(nbSelectedColls == 0) { - // no collections checked for this databox - // hide the status bits - $("#ADVSRCH_SB_ZONE_"+sbas_id, container).hide(); - // uncheck - $("#ADVSRCH_SB_ZONE_"+sbas_id+" input:checkbox", container).prop("checked", false); - } - else { - // at least one coll checked for this databox - // show again the relevant fields in "sort by" select - $(".db_"+sbas_id, fieldsSort).show().prop("disabled", false); - // show again the relevant fields in "from fields" select - $(".db_"+sbas_id, fieldsSelect).show().prop("disabled", false); - // show the sb - $("#ADVSRCH_SB_ZONE_"+sbas_id, container).show(); - // show again the relevant fields in "date field" select - $(".db_"+sbas_id, dateFilterSelect).show().prop("disabled", false); - } - }); - - if (nbTotalSelectedColls == 0) { - // no collections checked at all - // hide irrelevant filters - $("#ADVSRCH_OPTIONS_ZONE").hide(); - } - else { - // at least one collection checked - // show relevant filters - $("#ADVSRCH_OPTIONS_ZONE").show(); - } - - // --------- sort -------- - - // if no field is selected for sort, select the default option - if($("option:selected:enabled", fieldsSort).length == 0) { - $("option.default-selection", fieldsSort).prop("selected", true); - $("option.default-selection", fieldsSortOrd).prop("selected", true); - } - - search.elasticSort.by = $("option:selected:enabled", fieldsSort).val(); - search.elasticSort.order = $("option:selected:enabled", fieldsSortOrd).val(); - - //--------- from fields filter --------- - - // unselect the unavailable fields (or all fields if "all" is selected) - var optAllSelected = false; - $("option", fieldsSelect).each( - function(idx, opt) { - if(idx == 0) { - // nb: unselect the "all" field, so it acts as a button - optAllSelected = $(opt).is(":selected"); - } - if(idx == 0 || optAllSelected || $(opt).is(":disabled") || !$(opt).is(":visible") ) { - $(opt).prop("selected", false); - } - } - ); - - // here only the relevant fields are selected - search.fields = fieldsSelect.val(); - if(search.fields == null || search.fields.length == 0) { - $('#ADVSRCH_FIELDS_ZONE', container).removeClass('danger'); - search.fields = []; - } - else { - $('#ADVSRCH_FIELDS_ZONE', container).addClass('danger'); - danger = true; - } - - //--------- status bits filter --------- - - // here only the relevant sb are checked - for(sbas_id in search.bases) { - var nchecked = 0; - $("#ADVSRCH_SB_ZONE_"+sbas_id+" :checkbox[checked]", container).each(function () { - var n = $(this).attr('n'); - search.status[n] = $(this).val().split('_'); - nchecked++; - }); - if(nchecked == 0) { - $("#ADVSRCH_SB_ZONE_"+sbas_id, container).removeClass('danger'); - } - else { - $("#ADVSRCH_SB_ZONE_"+sbas_id, container).addClass('danger'); - danger = true; - } - } - - //--------- dates filter --------- - - // if no date field is selected for filter, select the first option - $('#ADVSRCH_DATE_ZONE', adv_box).removeClass('danger'); - if($("option.dbx:selected:enabled", dateFilterSelect).length == 0) { - $("option:eq(0)", dateFilterSelect).prop("selected", true); - $("#ADVSRCH_DATE_SELECTORS", container).hide(); - } - else { - $("#ADVSRCH_DATE_SELECTORS", container).show(); - search.dates.minbound = $('#ADVSRCH_DATE_ZONE input[name=date_min]', adv_box).val(); - search.dates.maxbound = $('#ADVSRCH_DATE_ZONE input[name=date_max]', adv_box).val(); - search.dates.field = $('#ADVSRCH_DATE_ZONE select[name=date_field]', adv_box).val(); - console.log(search.dates.minbound, search.dates.maxbound, search.dates.field) - if ($.trim(search.dates.minbound) || $.trim(search.dates.maxbound)) { - danger = true; - $('#ADVSRCH_DATE_ZONE', adv_box).addClass('danger'); - } - } - - fieldsSelect.scrollTop(scroll); - - // if one filter shows danger, show it on the query - if (danger) { - $('#EDIT_query').addClass('danger'); - } - else { - $('#EDIT_query').removeClass('danger'); - } - - if (save === true) { - userModule.setPref('search', JSON.stringify(search)); - } - } - - function viewNbSelect() { - $("#nbrecsel").empty().append(p4.Results.Selection.length()); - } return { - checkFilters: checkFilters, - toggleDatabase: toggleDatabase, - toggleCollection: toggleCollection, - selectDatabase: selectDatabase, - beforeSearch: beforeSearch, - afterSearch: afterSearch, - clearAnswers: clearAnswers, - newSearch: newSearch, - resetSearch: resetSearch, - viewNbSelect: viewNbSelect + }; }(p4)); diff --git a/resources/www/prod/js/components/workzone/workzone-basket.js b/resources/www/prod/js/components/workzone/workzone-basket.js deleted file mode 100644 index 778a324873..0000000000 --- a/resources/www/prod/js/components/workzone/workzone-basket.js +++ /dev/null @@ -1,108 +0,0 @@ -/* -var p4 = p4 || {}; - -var workzoneBasketModule = (function (p4) { - - function archiveBasket(basket_id) { - $.ajax({ - type: "POST", - url: "../prod/baskets/" + basket_id + "/archive/?archive=1", - dataType: 'json', - beforeSend: function () { - - }, - success: function (data) { - if (data.success) { - var basket = $('#SSTT_' + basket_id); - var next = basket.next(); - - if (next.data("ui-droppable")) { - next.droppable('destroy'); - } - - next.slideUp().remove(); - - if (basket.data("ui-droppable")) { - basket.droppable('destroy'); - } - - basket.slideUp().remove(); - - if ($('#baskets .SSTT').length === 0) { - return p4.WorkZone.refresh(false); - } - } - else { - alert(data.message); - } - return; - } - }); - } - - function deleteBasket(item) { - if ($("#DIALOG").data("ui-dialog")) { - $("#DIALOG").dialog('destroy'); - } - - var k = $(item).attr('id').split('_').slice(1, 2).pop(); // id de chutier - $.ajax({ - type: "POST", - url: "../prod/baskets/" + k + '/delete/', - dataType: 'json', - beforeSend: function () { - - }, - success: function (data) { - if (data.success) { - var basket = $('#SSTT_' + k); - var next = basket.next(); - - if (next.data("ui-droppable")) { - next.droppable('destroy'); - } - - next.slideUp().remove(); - - if (basket.data("ui-droppable")) { - basket.droppable('destroy'); - } - - basket.slideUp().remove(); - - if ($('#baskets .SSTT').length === 0) { - return p4.WorkZone.refresh(false); - } - } - else { - alert(data.message); - } - return; - } - }); - } - - function openBasketPreferences() { - $('#basket_preferences').dialog({ - closeOnEscape: true, - resizable: false, - width: 450, - height: 500, - modal: true, - draggable: false, - overlay: { - backgroundColor: '#000', - opacity: 0.7 - } - }).dialog('open'); - } - - - - return { - archiveBasket: archiveBasket, - deleteBasket: deleteBasket, - openBasketPreferences: openBasketPreferences - - } -})(p4);*/ diff --git a/resources/www/prod/js/components/workzone/workzone-facets.js b/resources/www/prod/js/components/workzone/workzone-facets.js deleted file mode 100644 index 3b86d71d1d..0000000000 --- a/resources/www/prod/js/components/workzone/workzone-facets.js +++ /dev/null @@ -1,163 +0,0 @@ -/* -var p4 = p4 || {}; - -var workzoneFacetsModule = (function (p4) { - var selectedFacetValues = []; - var getSelectedFacets = function() { - return selectedFacetValues; - } - var resetSelectedFacets = function() { - selectedFacetValues = []; - return selectedFacetValues; - }; - var loadFacets = function(facets) { - // Convert facets data to fancytree source format - var treeSource = _.map(facets, function(facet) { - // Values - var values = _.map(facet.values, function(value) { - return { - title: value.value + ' (' + value.count + ')', - query: value.query, - label: value.value, - tooltip: value.value + ' (' + value.count + ')' - } - }); - // Facet - return { - name: facet.name, - title: facet.label, - folder: true, - children: values, - expanded: _.isUndefined(selectedFacetValues[facet.name]) - }; - }); - - treeSource.sort(_sortFacets('title', true, function(a){return a.toUpperCase()})); - - treeSource = _sortByPredefinedFacets(treeSource, 'name', ['Base_Name', 'Collection_Name', 'Type_Name']); - - return _getFacetsTree().reload(treeSource); - }; - - // from stackoverflow - // http://stackoverflow.com/questions/979256/sorting-an-array-of-javascript-objects/979325#979325 - function _sortFacets(field, reverse, primer) { - var key = function (x) {return primer ? primer(x[field]) : x[field]}; - - return function (a,b) { - var A = key(a), B = key(b); - return ( (A < B) ? -1 : ((A > B) ? 1 : 0) ) * [-1,1][+!!reverse]; - } - } - - function _sortByPredefinedFacets(source, field, predefinedFieldOrder) { - var filteredSource = source, - ordered = []; - - _.forEach(predefinedFieldOrder, function (fieldValue, index) { - _.forEach(source, function (facet, facetIndex) { - if (facet[field] !== undefined) { - if (facet[field] === fieldValue) { - ordered.push(facet); - // remove from filtered - filteredSource.splice(facetIndex, 1); - } - } - }); - }); - - var olen = filteredSource.length; - // fill predefined facets with non predefined facets - for (var i = 0; i < olen; i++) { - ordered.push(filteredSource[i]); - } - return ordered; - } - - function _getFacetsTree() { - var $facetsTree = $('#proposals'); - if (!$facetsTree.data('ui-fancytree')) { - $facetsTree.fancytree({ - clickFolderMode: 3, // activate and expand - icons:false, - source: [], - activate: function(event, data){ - var query = data.node.data.query; - if (query) { - var facet = data.node.parent; - selectedFacetValues[facet.title] = data.node.data; - _facetCombinedSearch(); - } - }, - renderNode: function(event, data){ - var facetFilter = ""; - if(data.node.folder && !_.isUndefined(selectedFacetValues[data.node.title])) { - facetFilter = selectedFacetValues[data.node.title].label; - - var s_label = document.createElement("SPAN"); - s_label.setAttribute("class", "facetFilter-label"); - s_label.setAttribute("title", facetFilter); - - var length = 15; - var facetFilterString = facetFilter; - if( facetFilterString.length > length) { - facetFilterString = facetFilterString.substring(0,length) + '…'; - } - s_label.appendChild(document.createTextNode(facetFilterString)); - - var s_closer = document.createElement("A"); - s_closer.setAttribute("class", "facetFilter-closer"); - - var s_gradient = document.createElement("SPAN"); - s_gradient.setAttribute("class", "facetFilter-gradient"); - s_gradient.appendChild(document.createTextNode("\u00A0")); - - s_label.appendChild(s_gradient); - - var s_facet = document.createElement("SPAN"); - s_facet.setAttribute("class", "facetFilter"); - s_facet.appendChild(s_label); - s_closer = $(s_facet.appendChild(s_closer)); - s_closer.data("facetTitle", data.node.title); - - s_closer.click( - function(event) { - event.stopPropagation(); - var facetTitle = $(this).data("facetTitle"); - delete selectedFacetValues[facetTitle]; - _facetCombinedSearch(); - return false; - } - ); - - $(".fancytree-folder", data.node.li).append( - $(s_facet) - ); - } - } - }); - - } - return $facetsTree.fancytree('getTree'); - } - - function _facetCombinedSearch() { - var q = $("#EDIT_query").val(); - var q_facet = ""; - _.each(_.values(selectedFacetValues), function(facetValue) { - q_facet += (q_facet ? " AND " : "") + '(' + facetValue.query + ')'; - }); - if(q_facet) { - if(q) { - q = '(' + q + ') AND ' - } - q += q_facet; - } - - searchModule.checkFilters(); - searchModule.newSearch(q); - } - - return { loadFacets: loadFacets, getSelectedFacets: getSelectedFacets, resetSelectedFacets: resetSelectedFacets} - -})(p4);*/ diff --git a/resources/www/prod/js/components/workzone/workzone-thesaurus.js b/resources/www/prod/js/components/workzone/workzone-thesaurus.js deleted file mode 100644 index 8b6f0e2df1..0000000000 --- a/resources/www/prod/js/components/workzone/workzone-thesaurus.js +++ /dev/null @@ -1,35 +0,0 @@ -/* -var p4 = p4 || {}; - -var workzoneThesaurusModule = (function (p4) { - $(document).ready(function () { - - $('#thesaurus_tab .input-medium').on('keyup', function(){ - if($('#thesaurus_tab .input-medium').val() != ''){ - $('#thesaurus_tab .th_clear').show(); - }else{ - $('#thesaurus_tab .th_clear').hide(); - } - }); - - $('.th_clear').on('click', function(){ - $('#thesaurus_tab .input-medium').val(''); - $('#thesaurus_tab .gform').submit(); - $('#thesaurus_tab .th_clear').hide(); - }); - - $('.treeview>li.expandable>.hitarea').on('click', function(){ - if($(this).css('background-position') == '99% 22px'){ - $(this).css('background-position', '99% -28px'); - $(this).addClass('active'); - }else{ - $(this).css('background-position', '99% 22px'); - $(this).removeClass('active'); - } - }); - - }); - - return {}; -})(p4); -*/ diff --git a/resources/www/prod/js/components/workzone/workzone.js b/resources/www/prod/js/components/workzone/workzone.js deleted file mode 100644 index 2b10f79b03..0000000000 --- a/resources/www/prod/js/components/workzone/workzone.js +++ /dev/null @@ -1,735 +0,0 @@ -var p4 = p4 || {}; - -var workzoneModule = (function (p4) { - var nextBasketScroll = false; - var warnOnRemove = true; - $(document).ready(function () { - $('#idFrameC').resizable({ - handles: 'e', - resize: function () { - answerSizer(); - linearizeUi(); - }, - stop: function () { - - var el = $('.SSTT.active').next().find('div:first'); - var w = el.find('div.chim-wrapper:first').outerWidth(); - var iw = el.innerWidth(); - var diff = $('#idFrameC').width() - el.outerWidth(); - var n = Math.floor(iw / w); - - $('#idFrameC').height('auto'); - - var nwidth = (n) * w + diff + n; - if (isNaN(nwidth)) { - _saveWindows(); - return; - } - if (nwidth < 265) - nwidth = 265; - if (el.find('div.chim-wrapper:first').hasClass('valid') && nwidth < 410) - nwidth = 410; - - - $('#idFrameC').stop().animate({ - width: nwidth - }, - 300, - 'linear', - function () { - answerSizer(); - linearizeUi(); - _saveWindows(); - }); - } - }); - - $('#idFrameC .ui-tabs-nav li').on('click', function (event) { - if($('#idFrameC').attr('data-status') == 'closed'){ - $('#idFrameC').width(300); - $('#rightFrame').css('left', 300); - $('#rightFrame').width($(window).width()-300); - $('#baskets, #proposals, #thesaurus_tab').hide(); - $('.ui-resizable-handle, #basket_menu_trigger').show(); - var IDname = $(this).attr('aria-controls'); - $('#'+IDname).show(); - } - - $('#idFrameC').attr('data-status', 'open'); - $('.WZbasketTab').css('background-position', '9px 21px'); - $('#idFrameC').removeClass('closed'); - }); - - var previousTab = ""; - - $('#idFrameC #retractableButton').bind('click', function (event) { - - if($('#idFrameC').attr('data-status') != 'closed'){ - $(this).find('i').removeClass('icon-double-angle-left').addClass('icon-double-angle-right') - $('#idFrameC').width(80); - $('#rightFrame').css('left', 80); - $('#rightFrame').width($(window).width()-80); - $('#idFrameC').attr('data-status', 'closed'); - $('#baskets, #proposals, #thesaurus_tab, .ui-resizable-handle, #basket_menu_trigger').hide(); - $('#idFrameC .ui-tabs-nav li').removeClass('ui-state-active'); - $('.WZbasketTab').css('background-position', '15px 16px'); - $('#idFrameC').addClass('closed'); - previousTab = $('#idFrameC .icon-menu').find('li.ui-tabs-active'); - }else{ - $(this).find('i').removeClass('icon-double-angle-right').addClass('icon-double-angle-left') - $('#idFrameC').width(300); - $('#rightFrame').css('left', 300); - $('#rightFrame').width($(window).width()-300); - $('#idFrameC').attr('data-status', 'open'); - $('.ui-resizable-handle, #basket_menu_trigger').show(); - $('.WZbasketTab').css('background-position', '9px 16px'); - $('#idFrameC').removeClass('closed'); - $('#idFrameC .icon-menu li').last().find('a').trigger('click'); - $('#idFrameC .icon-menu li').first().find('a').trigger('click'); - $(previousTab).find('a').trigger('click'); - } - - event.stopImmediatePropagation(); - //p4.WorkZone.close(); - return false; - }); - - $('#basket_menu_trigger').contextMenu('#basket_menu', { - openEvt: 'click', - dropDown: true, - theme: 'vista', - showTransition: 'slideDown', - hideTransition: 'hide', - shadow: false - }); - - $('#basket_menu_trigger').trigger("click"); - $('#basket_menu_trigger').trigger("click"); - - $('.basketTips').tooltip({ - delay: 200 - }); - - $('#idFrameC .tabs').tabs({ - activate: function (event, ui) { - if (ui.newTab.context.hash == "#thesaurus_tab") { - thesau_show(); - } - p4.WorkZone.open(); - } - }); - $('.basket_refresher').on('click', function () { - return p4.WorkZone.refresh('current'); - return false; - }); - activeBaskets(); - - $('a.story_unfix').on('click', function () { - unfix($(this).attr('href')); - - return false; - }); - - p4.WorkZone = { - 'Selection': new Selectable($('#baskets'), {selector: '.CHIM'}), - 'refresh': refreshBaskets, - 'addElementToBasket': function (sbas_id, record_id, event, singleSelection) { - singleSelection = !!singleSelection || false; - - if ($('#baskets .SSTT.active').length === 1) { - return dropOnBask(event, $('#IMGT_' + sbas_id + '_' + record_id), $('#baskets .SSTT.active'), singleSelection); - } else { - humane.info(language.noActiveBasket); - } - }, - "removeElementFromBasket": WorkZoneElementRemover, - 'reloadCurrent': function () { - var sstt = $('#baskets .content:visible'); - if (sstt.length === 0) - return; - getContent(sstt.prev()); - }, - 'close': function () { - var frame = $('#idFrameC'), that = this; - - if (!frame.hasClass('closed')) { - // hide tabs content - $('#idFrameC .tabs > .ui-tabs-panel').hide(); - - frame.data('openwidth', frame.width()); - frame.animate({width: 100}, - 300, - 'linear', - function () { - prodModule.answerSizer(); - prodModule.linearizeUi(); - $('#answers').trigger('resize'); - }); - frame.addClass('closed'); - $('.escamote', frame).hide(); - frame.unbind('click.escamote').bind('click.escamote', function () { - that.open(); - }); - } - }, - 'open': function () { - var frame = $('#idFrameC'); - - if (frame.hasClass('closed')) { - var width = frame.data('openwidth') ? frame.data('openwidth') : 300; - frame.css({width: width}); - prodModule.answerSizer(); - prodModule.linearizeUi(); - frame.removeClass('closed'); - $('.escamote', frame).show(); - frame.unbind('click.escamote'); - // show tabs content - var activeTabIdx = $('#idFrameC .tabs').tabs("option", "active"); - $('#idFrameC .tabs > div:eq(' + activeTabIdx + ')').show(); - } - } - }; - }); - - function refreshBaskets(baskId, sort, scrolltobottom, type) { - type = typeof type === 'undefined' ? 'basket' : type; - - var active = $('#baskets .SSTT.ui-state-active'); - if (baskId === 'current' && active.length > 0) { - baskId = active.attr('id').split('_').slice(1, 2).pop(); - } - sort = ($.inArray(sort, ['date', 'name']) >= 0) ? sort : ''; - - scrolltobottom = typeof scrolltobottom === 'undefined' ? false : scrolltobottom; - - $.ajax({ - type: "GET", - url: "../prod/WorkZone/", - data: { - id: baskId, - sort: sort, - type: type - }, - beforeSend: function () { - $('#basketcontextwrap').remove(); - }, - success: function (data) { - var cache = $("#idFrameC #baskets"); - - if ($(".SSTT", cache).data("ui-droppable")) { - $(".SSTT", cache).droppable('destroy'); - } - if ($(".bloc", cache).data("ui-droppable")) { - $('.bloc', cache).droppable('destroy'); - } - if (cache.data("ui-accordion")) { - cache.accordion('destroy').empty().append(data); - } - - activeBaskets(); - $('.basketTips').tooltip({ - delay: 200 - }); - cache.disableSelection(); - - if (!scrolltobottom) { - return; - } - - nextBasketScroll = true; - return; - } - }); - } - - function setTemporaryPref(name, value) { - $.ajax({ - type: "POST", - url: "/user/preferences/temporary/", - data: { - prop: name, - value: value - }, - success: function (data) { - return; - } - }); - } - - $("#baskets div.content select[name=valid_ord]").on('change', function () { - var active = $('#baskets .SSTT.ui-state-active'); - if (active.length === 0) { - return; - } - - var order = $(this).val(); - - getContent(active, order); - }); - - function WorkZoneElementRemover(el, confirm) { - var context = el.data('context'); - - if (confirm !== true && $(el).hasClass('groupings') && warnOnRemove) { - var buttons = {}; - - buttons[language.valider] = function () { - $("#DIALOG-baskets").dialog('close').remove(); - WorkZoneElementRemover(el, true); - }; - - buttons[language.annuler] = function () { - $("#DIALOG-baskets").dialog('close').remove(); - }; - - var texte = '

    ' + language.confirmRemoveReg + '

    ' + language.hideMessage + '
    '; - $('body').append('
    '); - $("#DIALOG-baskets").attr('title', language.removeTitle) - .empty() - .append(texte) - .dialog({ - autoOpen: false, - closeOnEscape: true, - resizable: false, - draggable: false, - modal: true, - buttons: buttons, - overlay: { - backgroundColor: '#000', - opacity: 0.7 - } - }).dialog('open'); - return; - } - - var id = $(el).attr('id').split('_').slice(2, 4).join('_'); - - $.ajax({ - type: "POST", - url: $(el).attr('href'), - dataType: 'json', - beforeSend: function () { - $('.wrapCHIM_' + id).find('.CHIM').fadeOut(); - }, - success: function (data) { - if (data.success) { - humane.info(data.message); - p4.WorkZone.Selection.remove(id); - - if ($('.wrapCHIM_' + id).find('.CHIM').data("ui-draggable")) { - $('.wrapCHIM_' + id).find('.CHIM').draggable('destroy'); - } - - $('.wrapCHIM_' + id).remove(); - - if (context === "reg_train_basket") { - var carousel = $("#PREVIEWCURRENTCONT"); - var carouselItemLength = $('li', carousel).length; - var selectedItem = $("li.prevTrainCurrent.selected", carousel); - var selectedItemIndex = $('li', carousel).index(selectedItem); - - // item is first and list has at least 2 items - if (selectedItemIndex === 0 && carouselItemLength > 1) { - // click next item - selectedItem.next().find("img").trigger("click"); - // item is last item and list has at least 2 items - } else if (carouselItemLength > 1 && selectedItemIndex === (carouselItemLength - 1)) { - // click previous item - selectedItem.prev().find("img").trigger("click"); - // Basket is empty - } else if (carouselItemLength > 1) { - // click next item - selectedItem.next().find("img").trigger("click"); - } else { - recordPreviewModule.closePreview(); - } - - selectedItem.remove(); - } else { - return p4.WorkZone.reloadCurrent(); - } - } else { - humane.error(data.message); - $('.wrapCHIM_' + id).find('.CHIM').fadeIn(); - } - return; - } - }); - return false; - } - - - function activeBaskets() { - var cache = $("#idFrameC #baskets"); - - cache.accordion({ - active: 'active', - heightStyle: "content", - collapsible: true, - header: 'div.header', - activate: function (event, ui) { - var b_active = $('#baskets .SSTT.active'); - if (nextBasketScroll) { - nextBasketScroll = false; - - if (!b_active.next().is(':visible')) - return; - - var t = $('#baskets .SSTT.active').position().top + b_active.next().height() - 200; - - t = t < 0 ? 0 : t; - - $('#baskets .bloc').stop().animate({ - scrollTop: t - }); - } - - var uiactive = $(this).find('.ui-state-active'); - b_active.not('.ui-state-active').removeClass('active'); - - if (uiactive.length === 0) { - return; - /* everything is closed */ - } - - uiactive.addClass('ui-state-focus active'); - - p4.WorkZone.Selection.empty(); - - getContent(uiactive); - - }, - beforeActivate: function (event, ui) { - ui.newHeader.addClass('active'); - $('#basketcontextwrap .basketcontextmenu').hide(); - } - }); - - $('.bloc', cache).droppable({ - accept: function (elem) { - if ($(elem).hasClass('grouping') && !$(elem).hasClass('SSTT')) - return true; - return false; - }, - scope: 'objects', - hoverClass: 'groupDrop', - tolerance: 'pointer', - drop: function () { - fix(); - } - }); - - if ($('.SSTT.active', cache).length > 0) { - var el = $('.SSTT.active', cache)[0]; - $(el).trigger('click'); - } - - $(".SSTT, .content", cache) - .droppable({ - scope: 'objects', - hoverClass: 'baskDrop', - tolerance: 'pointer', - accept: function (elem) { - if ($(elem).hasClass('CHIM')) { - if ($(elem).closest('.content').prev()[0] === $(this)[0]) { - return false; - } - } - if ($(elem).hasClass('grouping') || $(elem).parent()[0] === $(this)[0]) - return false; - return true; - }, - drop: function (event, ui) { - dropOnBask(event, ui.draggable, $(this)); - } - }); - - if ($('#basketcontextwrap').length === 0) - $('body').append('
    '); - - $('.context-menu-item', cache).hover(function () { - $(this).addClass('context-menu-item-hover'); - }, function () { - $(this).removeClass('context-menu-item-hover'); - }); - $.each($(".SSTT", cache), function () { - var el = $(this); - $(this).find('.contextMenuTrigger').contextMenu('#' + $(this).attr('id') + ' .contextMenu', { - 'appendTo': '#basketcontextwrap', - openEvt: 'click', - theme: 'vista', - dropDown: true, - showTransition: 'slideDown', - hideTransition: 'hide', - shadow: false - }); - }); - - } - - function getContent(header, order) { - if (window.console) { - console.log('Reload content for ', header); - } - - var url = $('a', header).attr('href'); - - if (typeof order !== 'undefined') { - url += '?order=' + order; - } - - $.ajax({ - type: "GET", - url: url, - dataType: 'html', - beforeSend: function () { - $('#tooltip').hide(); - header.next().addClass('loading'); - }, - success: function (data) { - header.removeClass('unread'); - - var dest = header.next(); - if (dest.data("ui-droppable")) { - dest.droppable('destroy') - } - dest.empty().removeClass('loading'); - - dest.append(data); - - $('a.WorkZoneElementRemover', dest).bind('mousedown',function (event) { - return false; - }).bind('click', function (event) { - return WorkZoneElementRemover($(this), false); - }); - - dest.droppable({ - accept: function (elem) { - if ($(elem).hasClass('CHIM')) { - if ($(elem).closest('.content')[0] === $(this)[0]) { - return false; - } - } - if ($(elem).hasClass('grouping') || $(elem).parent()[0] === $(this)[0]) - return false; - return true; - }, - hoverClass: 'baskDrop', - scope: 'objects', - drop: function (event, ui) { - dropOnBask(event, ui.draggable, $(this).prev()); - }, - tolerance: 'pointer' - }); - - $('.noteTips, .captionRolloverTips', dest).tooltip(); - - dest.find('.CHIM').draggable({ - helper: function () { - $('body').append('
    ' + - '
    ' + - p4.WorkZone.Selection.length() + '
    '); - return $('#dragDropCursor'); - }, - scope: "objects", - distance: 20, - scroll: false, - refreshPositions: true, - cursorAt: { - top: 10, - left: -20 - }, - start: function (event, ui) { - var baskets = $('#baskets'); - baskets.append('
    ' + - '
    '); - $('.bottom-scroller', baskets).bind('mousemove', function () { - $('#baskets .bloc').scrollTop($('#baskets .bloc').scrollTop() + 30); - }); - $('.top-scroller', baskets).bind('mousemove', function () { - $('#baskets .bloc').scrollTop($('#baskets .bloc').scrollTop() - 30); - }); - }, - stop: function () { - $('#baskets').find('.top-scroller, .bottom-scroller') - .unbind() - .remove(); - }, - drag: function (event, ui) { - if (utilsModule.is_ctrl_key(event) || $(this).closest('.content').hasClass('grouping')) - $('#dragDropCursor div').empty().append('+ ' + p4.WorkZone.Selection.length()); - else - $('#dragDropCursor div').empty().append(p4.WorkZone.Selection.length()); - - } - }); - prodModule.answerSizer(); - return; - } - }); - } - - function dropOnBask(event, from, destKey, singleSelection) { - var action = "", from = $(from), dest_uri = '', lstbr = [], sselcont = [], act = "ADD"; - - if (from.hasClass("CHIM")) { - /* Element(s) come from an open object in the workzone */ - action = $(' #baskets .ui-state-active').hasClass('grouping') ? 'REG2' : 'CHU2'; - } else { - /* Element(s) come from result */ - action = 'IMGT2'; - } - - action += destKey.hasClass('grouping') ? 'REG' : 'CHU'; - - if (destKey.hasClass('content')) { - /* I dropped on content */ - dest_uri = $('a', destKey.prev()).attr('href'); - } else { - /* I dropped on Title */ - dest_uri = $('a', destKey).attr('href'); - } - - if (window.console) { - window.console.log('Requested action is ', action, ' and act on ', dest_uri); - } - - if (action === "IMGT2CHU" || action === "IMGT2REG") { - if ($(from).hasClass('.baskAdder')) { - lstbr = [$(from).attr('id').split('_').slice(2, 4).join('_')]; - } else if (singleSelection) { - if (from.length === 1) { - lstbr = [$(from).attr('id').split('_').slice(1, 3).join('_')]; - } else { - lstbr = [$(from).selector.split('_').slice(1, 3).join('_')]; - } - } else { - lstbr = p4.Results.Selection.get(); - } - } else { - sselcont = $.map(p4.WorkZone.Selection.get(), function (n, i) { - return $('.CHIM_' + n, $('#baskets .content:visible')).attr('id').split('_').slice(1, 2).pop(); - }); - lstbr = p4.WorkZone.Selection.get(); - } - - switch (action) { - case "CHU2CHU" : - if (!utilsModule.is_ctrl_key(event)) act = "MOV"; - break; - case "IMGT2REG": - case "CHU2REG" : - case "REG2REG": - var sameSbas = true, sbas_reg = destKey.attr('sbas'); - - for (var i = 0; i < lstbr.length && sameSbas; i++) { - if (lstbr[i].split('_').shift() !== sbas_reg) { - sameSbas = false; - break; - } - } - - if (sameSbas === false) { - return p4.Alerts('', language.reg_wrong_sbas); - } - - break; - } - - switch (act + action) { - case 'MOVCHU2CHU': - var url = dest_uri + "stealElements/"; - var data = { - elements: sselcont - }; - break; - case 'ADDCHU2REG': - case 'ADDREG2REG': - case 'ADDIMGT2REG': - case 'ADDCHU2CHU': - case 'ADDREG2CHU': - case 'ADDIMGT2CHU': - var url = dest_uri + "addElements/"; - var data = { - lst: lstbr.join(';') - }; - break; - default: - if (window.console) { - console.log('Should not happen'); - } - return; - break; - } - - if (window.console) { - window.console.log('About to execute ajax POST on ', url, ' with datas ', data); - } - - $.ajax({ - type: "POST", - url: url, - data: data, - dataType: 'json', - beforeSend: function () { - - }, - success: function (data) { - if (!data.success) { - humane.error(data.message); - } else { - humane.info(data.message); - } - if (act === 'MOV' || $(destKey).next().is(':visible') === true || $(destKey).hasClass('content') === true) { - $('.CHIM.selected:visible').fadeOut(); - p4.WorkZone.Selection.empty(); - return p4.WorkZone.reloadCurrent(); - } - - return; - } - }); - } - - function fix() { - $.ajax({ - type: "POST", - url: "../prod/WorkZone/attachStories/", - data: {stories: p4.Results.Selection.get()}, - dataType: "json", - success: function (data) { - humane.info(data.message); - p4.WorkZone.refresh(); - } - }); - } - - function unfix(link) { - $.ajax({ - type: "POST", - url: link, - dataType: "json", - success: function (data) { - humane.info(data.message); - p4.WorkZone.refresh(); - } - }); - } - - function setRemoveWarning(state) { - warnOnRemove = state; - } - // remove record from basket/story preferences - function toggleRemoveWarning(el) { - var state = !el.checked; - userModule.setPref('reg_delete', (state ? '1' : '0')); - warnOnRemove = state; - } - - return { - setRemoveWarning: setRemoveWarning, - toggleRemoveWarning: toggleRemoveWarning - } -}(p4)); diff --git a/resources/www/prod/js/prod.js b/resources/www/prod/js/prod.js index 652bc03400..38c2b214b0 100644 --- a/resources/www/prod/js/prod.js +++ b/resources/www/prod/js/prod.js @@ -12,397 +12,18 @@ var bodySize = { var prodModule = (function (p4, humane) { - document.getElementById('loader_bar').style.width = '30%'; - $(document).ready(function () { - humane.info = humane.spawn({addnCls: 'humane-libnotify-info', timeout: 1000}); - humane.error = humane.spawn({addnCls: 'humane-libnotify-error', timeout: 1000}); - humane.forceNew = true; - // cguModule.activateCgus(); - $('body').on('click', 'a.dialog', function (event) { - var $this = $(this), size = 'Medium'; - - if ($this.hasClass('small-dialog')) { - size = 'Small'; - } else if ($this.hasClass('full-dialog')) { - size = 'Full'; - } - - var options = { - size: size, - loading: true, - title: $this.attr('title'), - closeOnEscape: true - }; - - $dialog = dialogModule.dialog.create(options); - - $.ajax({ - type: "GET", - url: $this.attr('href'), - dataType: 'html', - success: function (data) { - $dialog.setContent(data); - return; - } - }); - - return false; - }); - - - - - $(document).bind('contextmenu', function (event) { - var targ; - if (event.target) - targ = event.target; - else if (event.srcElement) - targ = event.srcElement; - if (targ.nodeType === 3)// safari bug - targ = targ.parentNode; - - var gogo = true; - var targ_name = targ.nodeName ? targ.nodeName.toLowerCase() : false; - - if (targ_name !== 'input' && targ_name.toLowerCase() !== 'textarea') { - gogo = false; - } - if (targ_name === 'input') { - if ($(targ).is(':checkbox')) - gogo = false; - } - - return gogo; - }); - - - - $('#loader_bar').stop().animate({ - width: '70%' - }, 450); - - p4.preview = { - open: false, - current: false - }; - p4.sel = []; - p4.edit = {}; - p4.thesau = { - tabs: null - }; - p4.active_zone = false; - - $('#search_submit').on('mousedown', function (event) { - return false; - }); - - $('#history-queries ul li').on('mouseover',function () { - $(this).addClass('hover'); - }).on('mouseout', function () { - $(this).removeClass('hover'); - }); - - startThesaurus(); - searchModule.checkFilters(); - - _activeZoning(); - - $('.shortcuts-trigger').bind('click', function () { - _triggerShortcuts(); - }); - - - - - - _resizeAll(); - - $(window).bind('resize', function () { - _resizeAll(); - }); - $('body').append(''); - - $('body').append(''); - - - $('.datepicker').datepicker({ - changeYear: true, - changeMonth: true, - dateFormat: 'yy/mm/dd' - }); - - /*$.ajaxSetup({ - - error: function (jqXHR, textStatus, errorThrown) { - //Request is aborted - if (errorThrown === 'abort') { - return false; - } else { - showModal('error', { - title: language.errorAjaxRequest + ' ' + jqXHR.responseText - }); - } - }, - timeout: function () { - showModal('timeout', { - title: 'Server not responding' - }); - } - });*/ - - $('.tools .answer_selector').bind('click',function () { - _answerSelector($(this)); - - }).bind('mouseover',function (event) { - if (utilsModule.is_ctrl_key(event)) { - $(this).addClass('add_selector'); - } - else { - $(this).removeClass('add_selector'); - } - }).bind('mouseout', function () { - $(this).removeClass('add_selector'); - }); - - // getLanguage(); - - _initAnswerForm(); - - // setTimeout("pollNotifications();", 10000); - - $(this).bind('keydown', function (event) { - var cancelKey = false; - var shortCut = false; - - if ($('#MODALDL').is(':visible')) { - switch (event.keyCode) { - case 27: - // hide download - commonModule.hideOverlay(2); - $('#MODALDL').css({ - 'display': 'none' - }); - break; - } - } - else { - if ($('#EDITWINDOW').is(':visible')) { - - switch (event.keyCode) { - case 9: // tab ou shift-tab - recordEditorModule.edit_chgFld(event, utilsModule.is_shift_key(event) ? -1 : 1); - cancelKey = shortCut = true; - break; - case 27: - recordEditorModule.edit_cancelMultiDesc(event); - shortCut = true; - break; - - case 33: // pg up - if (!p4.edit.textareaIsDirty || recordEditorModule.edit_validField(event, "ask_ok")) - recordEditorModule.skipImage(event, 1); - cancelKey = true; - break; - case 34: // pg dn - if (!p4.edit.textareaIsDirty || recordEditorModule.edit_validField(event, "ask_ok")) - recordEditorModule.skipImage(event, -1); - cancelKey = true; - break; - } - - } - else { - if (p4.preview.open) { - if (($('#dialog_dwnl:visible').length === 0 && $('#DIALOG1').length === 0 && $('#DIALOG2').length === 0)) { - switch (event.keyCode) { - case 39: - recordPreviewModule.getNext(); - cancelKey = shortCut = true; - break; - case 37: - recordPreviewModule.getPrevious(); - cancelKey = shortCut = true; - break; - case 27://escape - recordPreviewModule.closePreview(); - break; - case 32: - if (p4.slideShow) - recordPreviewModule.stopSlide(); - else - recordPreviewModule.startSlide(); - cancelKey = shortCut = true; - break; - } - } - } - else { - if ($('#EDIT_query').hasClass('focused')) - return true; - - if ($('.overlay').is(':visible')) - return true; - - if ($('.ui-widget-overlay').is(':visible')) - return true; - - switch (p4.active_zone) { - case 'rightFrame': - switch (event.keyCode) { - case 65: // a - if (utilsModule.is_ctrl_key(event)) { - $('.tools .answer_selector.all_selector').trigger('click'); - cancelKey = shortCut = true; - } - break; - case 80://P - if (utilsModule.is_ctrl_key(event)) { - _onOpenPrintModal("lst=" + p4.Results.Selection.serialize()); - cancelKey = shortCut = true; - } - break; - case 69://e - if (utilsModule.is_ctrl_key(event)) { - openRecordEditor('IMGT', p4.Results.Selection.serialize()); - cancelKey = shortCut = true; - } - break; - case 40: // down arrow - $('#answers').scrollTop($('#answers').scrollTop() + 30); - cancelKey = shortCut = true; - break; - case 38: // down arrow - $('#answers').scrollTop($('#answers').scrollTop() - 30); - cancelKey = shortCut = true; - break; - case 37://previous page - $('#PREV_PAGE').trigger('click'); - shortCut = true; - break; - case 39://previous page - $('#NEXT_PAGE').trigger('click'); - shortCut = true; - break; - case 9://tab - if (!utilsModule.is_ctrl_key(event) && !$('.ui-widget-overlay').is(':visible') && !$('.overlay_box').is(':visible')) { - document.getElementById('EDIT_query').focus(); - cancelKey = shortCut = true; - } - break; - } - break; - - - case 'idFrameC': - switch (event.keyCode) { - case 65: // a - if (utilsModule.is_ctrl_key(event)) { - p4.WorkZone.Selection.selectAll(); - cancelKey = shortCut = true; - } - break; - case 80://P - if (utilsModule.is_ctrl_key(event)) { - _onOpenPrintModal("lst=" + p4.WorkZone.Selection.serialize()); - cancelKey = shortCut = true; - } - break; - case 69://e - if (utilsModule.is_ctrl_key(event)) { - openRecordEditor('IMGT', p4.WorkZone.Selection.serialize()); - cancelKey = shortCut = true; - } - break; - // case 46://del - // _deleteRecords(p4.Results.Selection.serialize()); - // cancelKey = true; - // break; - case 40: // down arrow - $('#baskets div.bloc').scrollTop($('#baskets div.bloc').scrollTop() + 30); - cancelKey = shortCut = true; - break; - case 38: // down arrow - $('#baskets div.bloc').scrollTop($('#baskets div.bloc').scrollTop() - 30); - cancelKey = shortCut = true; - break; - // case 37://previous page - // $('#PREV_PAGE').trigger('click'); - // break; - // case 39://previous page - // $('#NEXT_PAGE').trigger('click'); - // break; - case 9://tab - if (!utilsModule.is_ctrl_key(event) && !$('.ui-widget-overlay').is(':visible') && !$('.overlay_box').is(':visible')) { - document.getElementById('EDIT_query').focus(); - cancelKey = shortCut = true; - } - break; - } - break; - - - case 'mainMenu': - break; - - - case 'headBlock': - break; - - default: - break; - - } - } - } - } - - if (!$('#EDIT_query').hasClass('focused') && event.keyCode !== 17) { - - if ($('#keyboard-dialog.auto').length > 0 && shortCut) { - _triggerShortcuts(); - } - } - if (cancelKey) { - event.cancelBubble = true; - if (event.stopPropagation) - event.stopPropagation(); - return(false); - } - return(true); - }); - - - $('#EDIT_query').bind('focus',function () { - $(this).addClass('focused'); - }).bind('blur', function () { - $(this).removeClass('focused'); - }); - - - - - - $('input.input_select_copy').on('focus', function () { - $(this).select(); - }); - $('input.input_select_copy').on('blur', function () { - $(this).deselect(); - }); - $('input.input_select_copy').on('click', function () { - $(this).select(); - }); - - $('#loader_bar').stop().animate({ - width: '100%' - }, 450, function () { - $('#loader').parent().fadeOut('slow', function () { - $(this).remove(); - }); - }); - - }); - - function _resizeAll() { + p4.preview = { + open: false, + current: false + }; + p4.sel = []; + p4.edit = {}; + p4.thesau = { + tabs: null + }; + p4.active_zone = false; + + /*function _resizeAll() { var body = $('body'); bodySize.y = body.height(); bodySize.x = body.width(); @@ -466,17 +87,17 @@ var prodModule = (function (p4, humane) { $('#answers .diapo').css('margin', '5px ' + (margin) + 'px'); } - } - - /*function doSpecialSearch(qry, allbase) { - if (allbase) { - searchModule.toggleDatabase(true); - } - workzoneFacetsModule.resetSelectedFacets(); - $('#EDIT_query').val(decodeURIComponent(qry).replace(/\+/g, " ")); - searchModule.newSearch(qry); }*/ + function doSpecialSearch(qry, allbase) { + if (allbase) { + prodApp.appEvents.emit('search.doToggleDatabase', true); + } + prodApp.appEvents.emit('facets.doResetSelectedFacets'); + $('#EDIT_query').val(decodeURIComponent(qry).replace(/\+/g, " ")); + prodApp.appEvents.emit('search.doNewSearch', qry); + } + function addToBasket(sbas_id, record_id, event, singleSelection) { var singleSelection = singleSelection || false; p4.WorkZone.addElementToBasket(sbas_id, record_id, event, singleSelection); @@ -656,7 +277,7 @@ var prodModule = (function (p4, humane) { var buttons = {}; buttons[language.valider] = function (e) { - workzoneBasketModule.deleteBasket(el); + prodApp.appEvents.emit('baskets.doDeleteBasket', el); }; $('#DIALOG').empty().append(language.confirmDel).attr('title', language.attention).dialog({ @@ -707,93 +328,7 @@ var prodModule = (function (p4, humane) { $('#TOPIC_TRI' + id + ' ,#TOPIC_UL' + id).removeClass('opened').addClass('closed'); } - function _initAnswerForm() { - var searchForm = $('#searchForm'); - $('button[type="submit"]', searchForm).bind('click', function () { - workzoneFacetsModule.resetSelectedFacets(); - searchModule.newSearch($("#EDIT_query").val()); - return false; - }); - searchForm.unbind('submit').bind('submit', function () { - - var $this = $(this), - method = $this.attr('method') ? $this.attr('method') : 'POST'; - - var data = $this.serializeArray(); - - answAjax = $.ajax({ - type: method, - url: $this.attr('action'), - data: data, - dataType: 'json', - beforeSend: function (formData) { - if (answAjaxrunning && answAjax.abort) - answAjax.abort(); - searchModule.beforeSearch(); - }, - error: function () { - answAjaxrunning = false; - $('#answers').removeClass('loading'); - }, - timeout: function () { - answAjaxrunning = false; - $('#answers').removeClass('loading'); - }, - success: function (datas) { - - // DEBUG QUERY PARSER - try { - console.info(JSON.parse(datas.parsed_query)); - } - catch(e) {} - - $('#answers').empty().append(datas.results).removeClass('loading'); - - $("#answers img.lazyload").lazyload({ - container: $('#answers') - }); - - workzoneFacetsModule.loadFacets(datas.facets); - - $('#answers').append('
    '); - - $('#tool_results').empty().append(datas.infos); - $('#tool_navigate').empty().append(datas.navigationTpl); - - $.each(p4.Results.Selection.get(), function (i, el) { - $('#IMGT_' + el).addClass('selected'); - }); - - p4.tot = datas.total_answers; - p4.tot_options = datas.form; - p4.tot_query = datas.query; - p4.navigation = datas.navigation; - - if (datas.next_page) { - $("#NEXT_PAGE, #answersNext").bind('click', function () { - searchResultModule.gotopage(datas.next_page); - }); - } - else { - $("#NEXT_PAGE").unbind('click'); - } - - if (datas.prev_page) { - $("#PREV_PAGE").bind('click', function () { - searchResultModule.gotopage(datas.prev_page); - }); - } - else { - $("#PREV_PAGE").unbind('click'); - } - - searchModule.afterSearch(); - } - }); - return false; - }); - } function _triggerShortcuts() { @@ -841,18 +376,7 @@ var prodModule = (function (p4, humane) { return false; } - function _activeZoning() { - $('#idFrameC, #rightFrame').bind('mousedown', function (event) { - var old_zone = p4.active_zone; - p4.active_zone = $(this).attr('id'); - if (p4.active_zone !== old_zone && p4.active_zone !== 'headBlock') { - $('.effectiveZone.activeZone').removeClass('activeZone'); - $('.effectiveZone', this).addClass('activeZone');//.flash('#555555'); - } - $('#EDIT_query').blur(); - }); - $('#rightFrame').trigger('mousedown'); - } + function _answerSelector(el) { if (el.hasClass('all_selector')) { @@ -894,7 +418,7 @@ var prodModule = (function (p4, humane) { } } - function _saveWindows() { + /*function _saveWindows() { var key = ''; var value = ''; @@ -909,10 +433,8 @@ var prodModule = (function (p4, humane) { } userModule.setPref(key, value); } - +*/ return { - linearizeUi: linearizeUi, - answerSizer: answerSizer, openRecordEditor: openRecordEditor, openPrintModal: openPrintModal, openShareModal: openShareModal, diff --git a/templates/web/prod/WorkZone/Macros.html.twig b/templates/web/prod/WorkZone/Macros.html.twig index 886384af86..bbe46a7502 100644 --- a/templates/web/prod/WorkZone/Macros.html.twig +++ b/templates/web/prod/WorkZone/Macros.html.twig @@ -167,7 +167,7 @@
    + onclick="prodApp.appEvents.emit('baskets.doArchiveBasket', {{ basket.getId() }});return false;"> {{ 'Archive' | trans }}
    diff --git a/templates/web/prod/actions/delete_records_confirm.html.twig b/templates/web/prod/actions/delete_records_confirm.html.twig index cdd9d587c3..cc9d041080 100644 --- a/templates/web/prod/actions/delete_records_confirm.html.twig +++ b/templates/web/prod/actions/delete_records_confirm.html.twig @@ -82,7 +82,7 @@ p4.WorkZone.Selection.remove(n); } }); - searchModule.viewNbSelect(); + prodApp.appEvents.emit('search.doRefreshSelection') }, complete: function(){ $this.prop('disabled', false); diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index e2811e0020..0bea9bb023 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -5,9 +5,8 @@
    - - + +
    - +
    -
    +
    - +
    @@ -207,7 +204,8 @@ {% for n, stat in status %}
    - +
    {% if stat['img_off'] %} @@ -216,7 +214,8 @@
    - +
    {% if stat['img_on'] %} @@ -231,9 +230,9 @@
    - - - + + +
    @@ -252,7 +251,7 @@ {% if thesaurus %}
    -
    {{ 'prod::editing:remplace: options de remplacement' | trans }} - + {{ 'prod::editing:remplace::option : utiliser une expression reguliere' | trans }} {% set help_link = 'https://secure.wikimedia.org/wikipedia/en/wiki/Regular_expression' %} {% if app['locale'] == 'de' %} @@ -351,8 +350,8 @@
    - - + +
    @@ -424,6 +423,21 @@ {% elseif not_actionable == 1 %} alert("{{ 'prod::editing: 1 document ne peut etre edite car vos droits sont induffisants' | trans | e('js') }}"); {% endif %} - recordEditorModule.startThisEditing({{ databox.get_sbas_id }},{% if recordsRequest.isSingleStory() %}'GRP'{% else %}'LST'{% endif %},"",''); + prodApp.appEvents.emit('recordEditor.start', { + databoxId: {{ databox.get_sbas_id }}, + mode: {% if recordsRequest.isSingleStory() %}'GRP'{% else %}'LST'{% endif %}, + state: { + T_statbits: {{ JSonStatus|raw }}, + T_fields: {{ JSonFields|raw }}, + T_records: {{ JSonRecords|raw }}, + T_sgval: {{ JSonSuggValues|raw }}, + T_id: {{ JSonIds|raw }}, + T_pos: {{ JSonIds|raw }}, + T_mval: [] + } + }); + + + {% endif %} diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 0bea9bb023..1ca5d7ecde 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -668,7 +668,7 @@
    -
    diff --git a/templates/web/prod/preview/appears_in.html.twig b/templates/web/prod/preview/appears_in.html.twig index ca7772cdce..e6087d49ab 100644 --- a/templates/web/prod/preview/appears_in.html.twig +++ b/templates/web/prod/preview/appears_in.html.twig @@ -3,8 +3,11 @@
    • {{ 'Apparait aussi dans ces reportages' | trans }}
    • {% for par in parents %} -
    • +
    • {{ par.get_title() }}
    • @@ -16,8 +19,11 @@
      • {{ 'Apparait aussi dans ces paniers' | trans }}
      • {% for basket in baskets %} -
      • +
      • {##} {% if basket.getValidation() %} diff --git a/templates/web/prod/preview/basket_train.html.twig b/templates/web/prod/preview/basket_train.html.twig index f6fa06fa76..d5b2ef8c04 100644 --- a/templates/web/prod/preview/basket_train.html.twig +++ b/templates/web/prod/preview/basket_train.html.twig @@ -49,10 +49,10 @@
    - -
    - {{ 'preview:: demarrer le diaporama' | trans }} - {{ 'preview:: arreter le diaporama' | trans }} + +
    + {{ 'preview:: demarrer le diaporama' | trans }} + {{ 'preview:: arreter le diaporama' | trans }}
    diff --git a/templates/web/prod/preview/caption.html.twig b/templates/web/prod/preview/caption.html.twig index 9b3bf9c82a..286ca7549d 100644 --- a/templates/web/prod/preview/caption.html.twig +++ b/templates/web/prod/preview/caption.html.twig @@ -5,7 +5,7 @@ {% if can_edit %}
    - + {{ 'action : editer' | trans }} diff --git a/templates/web/prod/preview/feed_train.html.twig b/templates/web/prod/preview/feed_train.html.twig index 7f18cc1e4e..bcbfa1bc79 100644 --- a/templates/web/prod/preview/feed_train.html.twig +++ b/templates/web/prod/preview/feed_train.html.twig @@ -47,10 +47,10 @@
    - -
    - {{ 'preview:: demarrer le diaporama' | trans }} - {{ 'preview:: arreter le diaporama' | trans }} + +
    + {{ 'preview:: demarrer le diaporama' | trans }} + {{ 'preview:: arreter le diaporama' | trans }}
    diff --git a/templates/web/prod/preview/reg_train.html.twig b/templates/web/prod/preview/reg_train.html.twig index df0b278bce..c6a5c7fa9c 100644 --- a/templates/web/prod/preview/reg_train.html.twig +++ b/templates/web/prod/preview/reg_train.html.twig @@ -25,7 +25,10 @@ %}
    -
    - -
    - {{ 'preview:: demarrer le diaporama' | trans }} - {{ 'preview:: arreter le diaporama' | trans }} + +
    + {{ 'preview:: demarrer le diaporama' | trans }} + {{ 'preview:: arreter le diaporama' | trans }}
    diff --git a/templates/web/prod/preview/result_train.html.twig b/templates/web/prod/preview/result_train.html.twig index 3ccb066060..f6ac58bb79 100644 --- a/templates/web/prod/preview/result_train.html.twig +++ b/templates/web/prod/preview/result_train.html.twig @@ -43,10 +43,10 @@
    - -
    - {{ 'preview:: demarrer le diaporama' | trans }} - {{ 'preview:: arreter le diaporama' | trans }} + +
    + {{ 'preview:: demarrer le diaporama' | trans }} + {{ 'preview:: arreter le diaporama' | trans }}
    diff --git a/templates/web/prod/preview/result_train_options.html.twig b/templates/web/prod/preview/result_train_options.html.twig index a115724f8c..0d497b8260 100644 --- a/templates/web/prod/preview/result_train_options.html.twig +++ b/templates/web/prod/preview/result_train_options.html.twig @@ -1,10 +1,10 @@
    - - {{ 'preview:: demarrer le diaporama' | trans }} - {{ 'preview:: arreter le diaporama' | trans }} -
    + + {{ 'preview:: demarrer le diaporama' | trans }} + {{ 'preview:: arreter le diaporama' | trans }} +
    diff --git a/templates/web/prod/preview/tools.html.twig b/templates/web/prod/preview/tools.html.twig index 4176fabeea..31243b2d46 100644 --- a/templates/web/prod/preview/tools.html.twig +++ b/templates/web/prod/preview/tools.html.twig @@ -17,12 +17,12 @@ {% endif %} -
    + {% if app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(record.get_base_id(), 'candwnldhd') or app.getAclForUser(app.getAuthenticatedUser()).has_right_on_base(record.get_base_id(), 'candwnldpreview') %} -
    +
    {# #} diff --git a/templates/web/prod/results/item.html.twig b/templates/web/prod/results/item.html.twig index 54cecf32e7..45bfc33d7d 100644 --- a/templates/web/prod/results/item.html.twig +++ b/templates/web/prod/results/item.html.twig @@ -5,8 +5,10 @@
    diff --git a/templates/web/prod/results/record.html.twig b/templates/web/prod/results/record.html.twig index 72ad795d2b..333a9cc227 100644 --- a/templates/web/prod/results/record.html.twig +++ b/templates/web/prod/results/record.html.twig @@ -4,8 +4,11 @@
    + class="IMGT diapo {% if record.story %}grouping{% endif %} type-{{ record.type }} open-preview-action" + data-kind="{{ record.story ? 'REG' : 'RESULT' }}" + data-position="{{ record.position|default(0) }}" + data-id="{{ record.id }}" + >
    @@ -110,15 +113,14 @@ {% endif %} {% if granted_on_collection(record.baseId, 'candwnldpreview') or granted_on_collection(record.baseId, 'candwnldhd') %}
    -
    +
    {{ 'action : exporter' | trans }}
    {% endif %}
    -
    +
    @@ -127,8 +129,7 @@ and granted_on_databox(record.databoxId, 'bas_chupub')) %} {% if record.story is empty %}
    -
    +
    diff --git a/templates/web/prod/thesaurus.js.twig b/templates/web/prod/thesaurus.js.twig index 73f3fd0f05..c691e3d327 100644 --- a/templates/web/prod/thesaurus.js.twig +++ b/templates/web/prod/thesaurus.js.twig @@ -599,9 +599,9 @@ function Xclick(e) if((type=='T'||type=='C') && tid.substr(1, 4)=="X_P") // TX_P ou CX_P { var ul = li.children('ul').eq(0); - if(ul.css("display")=='none' || is_ctrl_key(e)) + if(ul.css("display")=='none' || prodApp.utils.is_ctrl_key(e)) { - if(is_ctrl_key(e)) + if(prodApp.utils.is_ctrl_key(e)) { ul.text("{{ 'prod::thesaurusTab:tree:loading' | trans }}"); li.removeAttr('loaded'); From ea3abbeb54d6952235a5b2bbcefa97dc9ba954a1 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Thu, 10 Mar 2016 12:06:49 +0100 Subject: [PATCH 112/383] wip: remove prod js modules dependencies --- .../Controller/Prod/QueryController.php | 22 +- .../Controller/Prod/RootController.php | 9 - lib/classes/queries.php | 286 ---- resources/gulp/components/prod.js | 16 +- .../js/components/record/editable-record.js | 450 ------ .../js/components/search/search-result.js | 32 - .../www/prod/js/components/search/search.js | 12 - .../www/prod/js/components/upload/upload.js | 254 --- .../www/prod/js/components/video-editor.js | 324 ---- resources/www/prod/js/core/selectable.js | 223 --- resources/www/prod/js/prod.js | 92 +- templates/web/common/menubar.html.twig | 2 +- templates/web/prod/Baskets/Create.html.twig | 52 - templates/web/prod/Baskets/Reorder.html.twig | 184 --- templates/web/prod/Baskets/Update.html.twig | 44 - templates/web/prod/Story/Create.html.twig | 51 - templates/web/prod/Story/Reorder.html.twig | 192 --- .../prod/WorkZone/Browser/Browser.html.twig | 223 --- templates/web/prod/WorkZone/Macros.html.twig | 13 +- templates/web/prod/index.html.twig | 76 +- templates/web/prod/preview/tools.html.twig | 7 +- templates/web/prod/results/record.html.twig | 7 +- templates/web/prod/tab_thesaurus.html.twig | 12 +- templates/web/prod/thesaurus.js.twig | 1366 ----------------- templates/web/prod/upload/upload.html.twig | 9 +- 25 files changed, 97 insertions(+), 3861 deletions(-) delete mode 100644 lib/classes/queries.php delete mode 100644 resources/www/prod/js/components/record/editable-record.js delete mode 100644 resources/www/prod/js/components/search/search-result.js delete mode 100644 resources/www/prod/js/components/search/search.js delete mode 100644 resources/www/prod/js/components/upload/upload.js delete mode 100644 resources/www/prod/js/components/video-editor.js delete mode 100644 resources/www/prod/js/core/selectable.js delete mode 100644 templates/web/prod/thesaurus.js.twig diff --git a/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php b/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php index ee8e61c421..966e37f9bb 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php @@ -97,41 +97,41 @@ class QueryController extends Controller } for ($i = 1; ($i <= 4 && (($i <= $npages) === true)); $i++) { if ($i == $page) - $string .= ''; + $string .= ''; else - $string .= "" . $i . ""; + $string .= '' . $i . ''; } if ($npages > 4) $string .= ""; - $string .= ""; + $string .= ''; } else { $start = $npages - 4; if (($start) > 0){ - $string .= ""; - $string .= ""; + $string .= ''; + $string .= ''; }else $start = 1; for ($i = ($start); $i <= $npages; $i++) { if ($i == $page) - $string .= ''; + $string .= ''; else - $string .= "" . $i . ""; + $string .= '' . $i . ''; } if($page < $npages){ $string .= ""; } } } else { - $string .= ""; + $string .= ''; for ($i = ($page - 2); $i <= ($page + 2); $i++) { if ($i == $page) - $string .= ''; + $string .= ''; else - $string .= "" . $i . ""; + $string .= '' . $i . ''; } - $string .= ""; + $string .= ''; } } $string .= '
    '; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/RootController.php b/lib/Alchemy/Phrasea/Controller/Prod/RootController.php index be23d9ba4f..01e20fbf6c 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/RootController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/RootController.php @@ -76,14 +76,7 @@ class RootController extends Controller $thjslist = ""; - $queries_topics = ''; - $conf = $this->getConf(); - if ($conf->get(['registry', 'classic', 'render-topics']) == 'popups') { - $queries_topics = \queries::dropdown_topics($this->app['translator'], $this->app['locale']); - } elseif ($conf->get(['registry', 'classic', 'render-topics']) == 'tree') { - $queries_topics = \queries::tree_topics($this->app['locale']); - } $sbas = $bas2sbas = []; @@ -130,9 +123,7 @@ class RootController extends Controller 'feeds' => $feeds, 'aggregate' => $aggregate, 'GV_google_api' => $conf->get(['registry', 'webservices', 'google-charts-enabled']), - 'queries_topics' => $queries_topics, 'search_status' => \databox_status::getSearchStatus($this->app), - 'queries_history' => \queries::history($this->app, $user->getId()), 'thesau_js_list' => $thjslist, 'thesau_json_sbas' => json_encode($sbas), 'thesau_json_bas2sbas' => json_encode($bas2sbas), diff --git a/lib/classes/queries.php b/lib/classes/queries.php deleted file mode 100644 index 66ef36abfd..0000000000 --- a/lib/classes/queries.php +++ /dev/null @@ -1,286 +0,0 @@ -display->css; - } - - $out .= ''; - - $out .='
    -
    '; - - if ($sxTopics) { - $defaultview = mb_strtolower($sxTopics->display->defaultview); - if ( ! $defaultview) - $defaultview = 'static'; - $out .= ( "
      \n"); - $out .= self::drawTopics($sxTopics->topics, 0, '', $defaultview); - $out .= ( "\n
    \n"); - } - - $out .= '
    -
    '; - - return $out; - } - - public static function topics_exists($I18n) - { - if (file_exists(__DIR__ . '/../../config/topics/topics_' . $I18n . '.xml')) { - return true; - } - - if (file_exists(__DIR__ . '/../../config/topics/topics.xml')) { - return true; - } - - return false; - } - - public static function dropdown_topics(TranslatorInterface $translator, $I18n) - { - $out = ''; - - $xmlTopics = ''; - $sxTopics = null; - - if (file_exists(__DIR__ . '/../../config/topics/topics_' . $I18n . '.xml')) - $xmlTopics = __DIR__ . '/../../config/topics/topics_' . $I18n . '.xml'; - - if ($xmlTopics == '') { - if (file_exists(__DIR__ . '/../../config/topics/topics.xml')) { - $xmlTopics = __DIR__ . '/../../config/topics/topics.xml'; - } - } - - if ($xmlTopics == '') { - return ''; - } - - $jsTopics = 'null'; - $maxdepth = 0; - if (false !== $sxTopics = simplexml_load_file($xmlTopics)) { - $jsTopics = self::topicsAsJS($sxTopics->topics, 0, $maxdepth); - } - - $out .= ' '; - - $out .= '
    -
    -
    - - - - -
    ' . $translator->trans('boutton::chercher') . ' : -
    - ' . $translator->trans('client::recherche: dans les categories') . '
    '; - - for ($i = 0; $i <= $maxdepth; $i ++) { - $out .= '

    - -

    '; - } - $out .= '
    - -
    -
    -
    -
    - '; - - return $out; - } - - public static function history(Application $app, $usrId) - { - $history = '
      '; - - $queries = $app['repo.user-queries']->findBy(['user' => $usrId], ['created' => 'ASC'], 25, 0); - - foreach ($queries as $query) { - $history .= '
    • getQuery()) . '\')">' . $query->getQuery() . '
    • '; - } - - $history .= '
        '; - - return $history; - } - - private static function hastopics(&$topics) - { - foreach ($topics->topics as $subtopic) { - return true; - } - - return false; - } - - private static function topicsAsJS($topics, $depth, &$maxdepth) - { - if ($depth > $maxdepth) - $maxdepth = $depth; - $t = ''; - $tab = str_repeat("\t", $depth); - foreach ($topics->topic as $subtopic) { - $t .= $t ? "$tab, " : "$tab "; - $t .= '{ '; - $t .= 'label:"' . p4string::MakeString(utf8_decode($subtopic->label), 'js') . '"'; - if ($q = $subtopic->query) { - $q = str_replace(["\\", "'", "\r", "\n"], ["\\\\", "\\'", "\\r", "\\n"], $subtopic->query); - $t .= ", query:'" . $q . "'"; - } else { - $t .= ', query:null'; - } - if (self::hastopics($subtopic)) { - $t .= ', topics:' . "\n" . self::topicsAsJS($subtopic->topics, $depth + 1, $maxdepth); //, $fullquery) ; - } else { - $t .= ', topics:null'; - } - $t .= " }\n"; - } - - return("$tab" . "[\n" . $t . "\n$tab]"); - } - - private static function drawTopics($topics, $depth = 0, $triid = '', $defaultview) - { - $n = 0; - $out = ''; - foreach ($topics->topic as $subtopic) { - $tid = $triid . '_' . $n; - $s = $subtopic->label; - $l = p4string::MakeString($s, 'html'); - $l = '' . $l . ''; - if ($subtopic->query) { - $q = str_replace(["\\", "\"", "'", "\r", "\n"], ["\\\\", """, "\\'", "\\r", "\\n"], $subtopic->query); - $q = '' . $l . ''; - } else { - $q = $l; - } - if (self::hastopics($subtopic)) { - $view = mb_strtolower($subtopic['view']); - if ( ! $view) - $view = $defaultview; - switch ($view) { - case 'opened': - $out .= ( '
      •  ' . $q . '
      • ' . "\n"); - $out .= ( "
          \n"); - $out .= self::drawTopics($subtopic->topics, $depth + 1, $tid, $defaultview); - $out .= ( "
        \n
        \n"); - break; - case 'closed': - $out .= ( '
      •  ' . $q . '
      • ' . "\n"); - $out .= ( "
          \n"); - $out .= self::drawTopics($subtopic->topics, $depth + 1, $tid, $defaultview); - $out .= ( "
        \n
        \n"); - break; - case 'static': - default: - $out .= ( '
      •   ' . $q . '
      • ' . "\n"); - $out .= ( "
          \n"); - $out .= self::drawTopics($subtopic->topics, $depth + 1, $tid, $defaultview); - $out .= ( "
        \n
        \n"); - break; - } - } else { - $out .= ( '
      •   ' . $q . '
      • ' . "\n"); - } - $n ++; - } - - return $out; - } -} diff --git a/resources/gulp/components/prod.js b/resources/gulp/components/prod.js index 9dad5d02c7..34621f8b47 100644 --- a/resources/gulp/components/prod.js +++ b/resources/gulp/components/prod.js @@ -65,20 +65,20 @@ gulp.task('build-prod-css', ['build-prod-skin-black', 'build-prod-skin-grey', 'b }); gulp.task('build-prod-js', function(){ var prodGroup = [ - config.paths.vendors + 'underscore-amd/underscore.js', + // config.paths.vendors + 'underscore-amd/underscore.js', config.paths.src + 'vendors/colorpicker/js/colorpicker.js', - config.paths.vendors + 'jquery.lazyload/jquery.lazyload.js', - config.paths.vendors + 'humane-js/humane.js', // @TODO > extra files + //config.paths.vendors + 'jquery.lazyload/jquery.lazyload.js', + // config.paths.vendors + 'humane-js/humane.js', // @TODO > extra files config.paths.vendors + 'blueimp-load-image/js/load-image.js', // @TODO > extra files config.paths.vendors + 'jquery-file-upload/js/jquery.iframe-transport.js', config.paths.vendors + 'jquery-file-upload/js/jquery.fileupload.js', config.paths.vendors + 'geonames-server-jquery-plugin/jquery.geonames.js', //config.paths.src + 'prod/js/core/lists.js', - config.paths.src + 'prod/js/core/selectable.js', + //config.paths.src + 'prod/js/core/selectable.js', config.paths.src + 'prod/js/core/alert.js', - config.paths.src + 'prod/js/components/search/search.js', - config.paths.src + 'prod/js/components/search/search-result.js', + //config.paths.src + 'prod/js/components/search/search.js', + //config.paths.src + 'prod/js/components/search/search-result.js', // config.paths.src + 'prod/js/components/publication.js', // config.paths.src + 'prod/js/components/workzone/workzone.js', // config.paths.src + 'prod/js/components/workzone/workzone-basket.js', @@ -86,10 +86,10 @@ gulp.task('build-prod-js', function(){ // config.paths.src + 'prod/js/components/workzone/workzone-thesaurus.js', // config.paths.src + 'prod/js/components/cgu.js', // config.paths.src + 'prod/js/components/preferences.js', - config.paths.src + 'prod/js/components/record/editable-record.js', + //config.paths.src + 'prod/js/components/record/editable-record.js', //config.paths.src + 'prod/js/components/push/push.js', config.paths.src + 'prod/js/prod.js', - config.paths.src + 'prod/js/components/upload/upload.js', + //config.paths.src + 'prod/js/components/upload/upload.js', // config.paths.src + 'prod/js/components/video-editor.js', config.paths.src + 'vendors/jquery-sprintf/js/jquery.sprintf.1.0.3.js', //config.paths.src + 'prod/js/components/preview/preview.js', diff --git a/resources/www/prod/js/components/record/editable-record.js b/resources/www/prod/js/components/record/editable-record.js deleted file mode 100644 index 6828bf6d2e..0000000000 --- a/resources/www/prod/js/components/record/editable-record.js +++ /dev/null @@ -1,450 +0,0 @@ -(function (window) { - - function checkVocabId(VocabularyId) { - if (typeof VocabularyId === 'undefined') - VocabularyId = null; - - if (VocabularyId === '') - VocabularyId = null; - - return VocabularyId; - } - - var recordFieldValue = function (meta_id, value, VocabularyId) { - - VocabularyId = checkVocabId(VocabularyId); - - this.datas = { - meta_id: meta_id, - value: value, - VocabularyId: VocabularyId - }; - - var $this = this; - }; - - recordFieldValue.prototype = { - getValue: function () { - return this.datas.value; - }, - getMetaId: function () { - return this.datas.meta_id; - }, - getVocabularyId: function () { - return this.datas.VocabularyId; - }, - setValue: function (value, VocabularyId) { - - this.datas.value = value; - this.datas.VocabularyId = checkVocabId(VocabularyId); - return this; - }, - remove: function () { - this.datas.value = ''; - this.datas.VocabularyId = null; - - return this; - } - }; - - var databoxField = function (name, label, meta_struct_id, options) { - - var defaults = { - multi: false, - required: false, - readonly: false, - maxLength: null, - minLength: null, - type: 'string', - separator: null, - vocabularyControl: null, - vocabularyRestricted: false - }, - options = (typeof options == 'object') ? options : {}; - - if (isNaN(meta_struct_id)) { - throw 'meta_struct_id should be a number'; - } - - this.name = name; - this.label = label; - this.meta_struct_id = meta_struct_id; - this.options = jQuery.extend(defaults, options); - - if (this.options.multi === true && this.options.separator === null) { - this.options.separator = ';'; - } - - }; - - databoxField.prototype = { - getMetaStructId: function () { - return this.meta_struct_id; - }, - getName: function () { - return this.name; - }, - getLabel: function () { - return this.label; - }, - isMulti: function () { - return this.options.multi; - }, - isRequired: function () { - return this.options.required; - }, - isReadonly: function () { - return this.options.readonly; - }, - getMaxLength: function () { - return this.options.maxLength; - }, - getMinLength: function () { - return this.options.minLength; - }, - getType: function () { - return this.options.type; - }, - getSeparator: function () { - return this.options.separator; - } - }; - - var recordField = function (databoxField, arrayValues) { - - this.databoxField = databoxField; - this.options = { - dirty: false - }; - this.datas = new Array(); - - if (arrayValues instanceof Array) { - if (arrayValues.length > 1 && !databoxField.isMulti()) - throw 'You can not add multiple values to a non multi field ' + databoxField.getName(); - - var first = true; - - for (v in arrayValues) { - if (typeof arrayValues[v] !== 'object') { - if (window.console) { - console.error('Trying to add a non-recordFieldValue to the field...'); - } - - continue; - } - - if (isNaN(arrayValues[v].getMetaId())) { - if (window.console) { - console.error('Trying to add a recordFieldValue without metaId...'); - } - - continue; - } - - if (!first && this.options.multi === false) { - if (window.console) { - console.error('Trying to add multi values in a non-multi field'); - } - } - - if (window.console) { - console.log('adding a value : ', arrayValues[v]); - } - - this.datas.push(arrayValues[v]); - first = false; - } - } - - var $this = this; - } - recordField.prototype = { - getName: function () { - return this.databoxField.getName(); - }, - getMetaStructId: function () { - return this.databoxField.getMetaStructId(); - }, - isMulti: function () { - return this.databoxField.isMulti(); - }, - isRequired: function () { - return this.databoxField.isRequired(); - }, - isDirty: function () { - return this.options.dirty; - }, - addValue: function (value, merge, VocabularyId) { - - VocabularyId = checkVocabId(VocabularyId); - - merge = !!merge; - - if (this.databoxField.isReadonly()) { - if (window.console) { - console.error('Unable to set a value to a readonly field'); - } - - return; - } - - if (window.console) { - console.log('adding value ', value, ' vocId : ', VocabularyId, ' ; merge is ', merge); - } - - if (this.isMulti()) { - if (!this.hasValue(value, VocabularyId)) { - if (window.console) { - console.log('adding new multi value ', value); - } - this.datas.push(new recordFieldValue(null, value, VocabularyId)); - this.options.dirty = true; - } - else { - if (window.console) { - console.log('already have ', value); - } - } - } - else { - if (merge === true && this.isEmpty() === false && VocabularyId === null) { - if (window.console) { - console.log('Merging value ', value); - } - this.datas[0].setValue(this.datas[0].getValue() + ' ' + value, VocabularyId); - - this.options.dirty = true; - } - else { - if (merge === true && this.isEmpty() === false && VocabularyId !== null) { - if (window.console) { - console.error('Cannot merge vocabularies'); - } - this.datas[0].setValue(value, VocabularyId); - } - else { - - if (!this.hasValue(value, VocabularyId)) { - if (this.datas.length === 0) { - if (window.console) { - console.log('Adding new value ', value); - } - this.datas.push(new recordFieldValue(null, value, VocabularyId)); - } - else { - if (window.console) { - console.log('Updating value ', value); - } - this.datas[0].setValue(value, VocabularyId); - } - this.options.dirty = true; - } - } - } - } - - return this; - }, - hasValue: function (value, VocabularyId) { - - if (typeof value === 'undefined') { - if (window.console) { - console.error('Trying to check the presence of an undefined value'); - } - } - - VocabularyId = checkVocabId(VocabularyId); - - for (d in this.datas) { - if (VocabularyId !== null) { - if (this.datas[d].getVocabularyId() === VocabularyId) { - if (window.console) { - console.log('already got the vocab ID'); - } - return true; - } - } - else if (this.datas[d].getVocabularyId() === null && this.datas[d].getValue() == value) { - if (window.console) { - console.log('already got this value'); - } - return true; - } - } - return false; - }, - removeValue: function (value, vocabularyId) { - - if (this.databoxField.isReadonly()) { - if (window.console) { - console.error('Unable to set a value to a readonly field'); - } - - return; - } - - vocabularyId = checkVocabId(vocabularyId); - - if (window.console) { - console.log('Try to remove value ', value, vocabularyId, this.datas); - } - - for (d in this.datas) { - if (window.console) { - console.log('loopin... ', this.datas[d].getValue()); - } - if (this.datas[d].getVocabularyId() !== null) { - if (this.datas[d].getVocabularyId() == vocabularyId) { - if (window.console) { - console.log('Found within the vocab ! removing... '); - } - this.datas[d].remove(); - this.options.dirty = true; - } - } - else if (this.datas[d].getValue() == value) { - if (window.console) { - console.log('Found ! removing... '); - } - this.datas[d].remove(); - this.options.dirty = true; - } - } - return this; - }, - isEmpty: function () { - var empty = true; - - for (d in this.datas) { - if (this.datas[d].getValue() !== '') - empty = false; - } - return empty; - }, - empty: function () { - - if (this.databoxField.isReadonly()) { - if (window.console) { - console.error('Unable to set a value to a readonly field'); - } - - return; - } - - for (d in this.datas) { - this.datas[d].remove(); - this.options.dirty = true; - } - return this; - }, - getValue: function () { - - if (this.isMulti()) - throw 'This field is multi, I can not give you a single value'; - - if (this.isEmpty()) - return null; - - return this.datas[0]; - }, - getValues: function () { - - if (!this.isMulti()) { - throw 'This field is not multi, I can not give you multiple values'; - } - - if (this.isEmpty()) - return new Array(); - - var arrayValues = []; - - for (d in this.datas) { - if (this.datas[d].getValue() === '') - continue; - - arrayValues.push(this.datas[d]); - } - - return arrayValues; - }, - sort: function (algo) { - this.datas.sort(algo); - - return this; - }, - getSerializedValues: function () { - - var arrayValues = []; - var values = this.getValues(); - - for (v in values) { - arrayValues.push(values[v].getValue()); - } - - return arrayValues.join(' ; '); - }, - replaceValue: function (search, replace) { - - if (this.databoxField.isReadonly()) { - if (window.console) { - console.error('Unable to set a value to a readonly field'); - } - - return 0; - } - - var n = 0; - - for (d in this.datas) { - if (this.datas[d].getVocabularyId() !== null) { - continue; - } - - var value = this.datas[d].getValue(); - var replacedValue = value.replace(search, replace); - - if (value === replacedValue) { - continue; - } - - n++; - - this.removeValue(value); - - if (!this.hasValue(replacedValue)) { - this.addValue(replacedValue); - } - - this.options.dirty = true; - } - - return n; - }, - exportDatas: function () { - - var returnValue = new Array(); - - for (d in this.datas) { - var temp = { - meta_id: this.datas[d].getMetaId() ? this.datas[d].getMetaId() : '', - meta_struct_id: this.getMetaStructId(), - value: this.datas[d].getValue() - }; - - if (this.datas[d].getVocabularyId()) { - temp.vocabularyId = this.datas[d].getVocabularyId(); - } - returnValue.push(temp); - } - - return returnValue; - } - }; - - window.p4 = window.p4 || {}; - - window.p4.databoxField = databoxField; - window.p4.recordFieldValue = recordFieldValue; - window.p4.recordField = recordField; - -})(window); diff --git a/resources/www/prod/js/components/search/search-result.js b/resources/www/prod/js/components/search/search-result.js deleted file mode 100644 index 58e2d053c9..0000000000 --- a/resources/www/prod/js/components/search/search-result.js +++ /dev/null @@ -1,32 +0,0 @@ -var p4 = p4 || {}; - -var searchResultModule = (function (p4, window) { - - p4.Results = { - 'Selection': new Selectable($('#answers'), { - selector: '.IMGT', - limit: 800, - selectStart: function (event, selection) { - $('#answercontextwrap table:visible').hide(); - }, - selectStop: function (event, selection) { - prodApp.appEvents.emit('search.doRefreshSelection') - }, - callbackSelection: function (element) { - var elements = $(element).attr('id').split('_'); - - return elements.slice(elements.length - 2, elements.length).join('_'); - } - }) - }; - - function gotopage(pag) { - $('#searchForm input[name="sel"]').val(p4.Results.Selection.serialize()); - $('#formAnswerPage').val(pag); - $('#searchForm').submit(); - } - - return { - gotopage: gotopage - }; -}(p4, window)); diff --git a/resources/www/prod/js/components/search/search.js b/resources/www/prod/js/components/search/search.js deleted file mode 100644 index dd7d140bd9..0000000000 --- a/resources/www/prod/js/components/search/search.js +++ /dev/null @@ -1,12 +0,0 @@ -var p4 = p4 || {}; - -var searchModule = (function (p4) { - - - - - - return { - - }; -}(p4)); diff --git a/resources/www/prod/js/components/upload/upload.js b/resources/www/prod/js/components/upload/upload.js deleted file mode 100644 index 99853bf7eb..0000000000 --- a/resources/www/prod/js/components/upload/upload.js +++ /dev/null @@ -1,254 +0,0 @@ -; -var p4 = p4 || {}; - -; -(function (p4, $) { - - /** - * UPLOADER MANAGER - */ - var UploaderManager = function (options) { - - var options = options || {}; - - if (false === ("container" in options)) { - throw "missing container parameter"; - } - else if (!options.container.jquery) { - throw "container parameter must be a jquery dom element"; - } - - if (false === ("settingsBox" in options)) { - throw "missing settingBox parameter"; - } - else if (!options.settingsBox.jquery) { - throw "container parameter must be a jquery dom element"; - } - - if (false === ("uploadBox" in options)) { - throw "missing uploadBox parameter"; - } - else if (!options.uploadBox.jquery) { - throw "container parameter must be a jquery dom element"; - } - - if (false === ("downloadBox" in options)) { - throw "missing downloadBox parameter"; - } - else if (!options.downloadBox.jquery) { - throw "container parameter must be a jquery dom element"; - } - - this.recordClass = options.recordClass || 'upload-record'; - - this.options = options; - - this.options.uploadBox.wrapInner('
          '); - - this.options.uploadBox = this.options.uploadBox.find('ul:first'); - - this.options.downloadBox.wrapInner('
            '); - - this.options.downloadBox = this.options.downloadBox.find('ul:first'); - - if ($.isFunction($.fn.sortable)) { - this.options.uploadBox.sortable(); - } - - this.uploadIndex = 0; - - this.Queue = new Queue(); - this.Formater = new Formater(); - this.Preview = new Preview(); - }; - - UploaderManager.prototype = { - setOptions: function (options) { - return $.extend(this.options, options); - }, - getContainer: function () { - return this.options.container; - }, - getUploadBox: function () { - return this.options.uploadBox; - }, - getSettingsBox: function () { - return this.options.settingsBox; - }, - getDownloadBox: function () { - return this.options.downloadBox; - }, - clearUploadBox: function () { - this.getUploadBox().empty(); - this.uploadIndex = 0; - this.Queue.clear(); - }, - getDatas: function () { - return this.Queue.all(); - }, - getData: function (index) { - return this.Queue.get(index); - }, - addData: function (data) { - this.uploadIndex++; - data.uploadIndex = this.uploadIndex; - this.Queue.set(this.uploadIndex, data); - }, - removeData: function (index) { - this.Queue.remove(index); - }, - addAttributeToData: function (indexOfData, attribute, value) { - var data = this.getData(indexOfData); - if ($.type(attribute) === "string") { - data[attribute] = value; - this.Queue.set(indexOfData, data); - } - }, - getUploadIndex: function () { - return this.uploadIndex; - }, - hasData: function () { - return !this.Queue.isEmpty(); - }, - countData: function () { - return this.Queue.getLength(); - } - }; - - - /** - * PREVIEW - * - * Dependency : loadImage function - * @see https://github.com/blueimp/JavaScript-Load-Image - * - * Options - * maxWidth: (int) Max width of preview - * maxHeight: (int) Max height of preview - * minWidth: (int) Min width of preview - * minHeight: (int) Min height of preview - * canva: (boolean) render preview as canva if supported by the navigator - */ - - var Preview = function () { - this.options = { - fileType: /^image\/(gif|jpeg|png|jpg)$/, - maxSize: 5242880 // 5MB - }; - }; - - Preview.prototype = { - setOptions: function (options) { - this.options = $.extend(this.options, options); - }, - getOptions: function () { - return this.options; - }, - render: function (file, callback) { - if (typeof loadImage === 'function' && this.options.fileType.test(file.type)) { - if ($.type(this.options.maxSize) !== 'number' || file.size < this.options.maxSize) { - var options = { - maxWidth: this.options.maxWidth || 150, - maxHeight: this.options.maxHeight || 75, - minWidth: this.options.minWidth || 80, - minHeight: this.options.minHeight || 40, - canvas: this.options.canva || true - }; - loadImage(file, callback, options); - } - } - } - }; - - - /** - * FORMATER - */ - - var Formater = function () { - - }; - - Formater.prototype = { - size: function (bytes) { - if (typeof bytes !== 'number') { - throw bytes + ' is not a number'; - } - if (bytes >= 1073741824) { - return (bytes / 1073741824).toFixed(2) + ' GB'; - } - if (bytes >= 1048576) { - return (bytes / 1048576).toFixed(2) + ' MB'; - } - return (bytes / 1024).toFixed(2) + ' KB'; - }, - bitrate: function (bits) { - if (typeof bits !== 'number') { - throw bits + ' is not a number'; - } - // 1 byte = 8 bits - var bytes = (bits >> 3); - - if (bytes >= (1 << 30)) { - return (bytes / (1 << 30)).toFixed(2) + ' Go/s'; - } - if (bytes >= (1 << 20)) { - return (bytes / (1 << 20)).toFixed(2) + ' Mo/s'; - } - if (bytes >= (1 << 10)) { - return (bytes / (1 << 10)).toFixed(2) + ' Ko/s'; - } - return bytes + ' o/s'; - }, - pourcent: function (current, total) { - return (current / total * 100).toFixed(2); - } - }; - - /** - * QUEUE - */ - var Queue = function () { - this.list = {}; - }; - - Queue.prototype = { - all: function () { - return this.list; - }, - set: function (id, item) { - this.list[id] = item; - return this; - }, - get: function (id) { - if (!this.list[id]) { - throw 'Unknown ID' + id; - } - return this.list[id]; - }, - remove: function (id) { - delete this.list[id]; - }, - getLength: function () { - var count = 0; - for (var k in this.list) { - if (this.list.hasOwnProperty(k)) { - ++count; - } - } - return count; - }, - isEmpty: function () { - return this.getLength() === 0; - }, - clear: function () { - var $this = this; - $.each(this.list, function (k) { - $this.remove(k); - }); - } - }; - - p4.UploaderManager = UploaderManager; - -})(p4, jQuery); diff --git a/resources/www/prod/js/components/video-editor.js b/resources/www/prod/js/components/video-editor.js deleted file mode 100644 index 90f2e35204..0000000000 --- a/resources/www/prod/js/components/video-editor.js +++ /dev/null @@ -1,324 +0,0 @@ -/* -var videoEditorModule = (function (document) { - - /!***************** - * Canva Object - *****************!/ - var Canva = function (domCanva) { - this.domCanva = domCanva; - }; - - Canva.prototype = { - resize: function (elementDomNode, forceWidth) { - - var w = elementDomNode.getWidth(); - var h = null; - var maxH = elementDomNode.getHeight(); - var ratio = 1; - - if ('' !== elementDomNode.getAspectRatio()) { - ratio = parseFloat(elementDomNode.getAspectRatio()); - - h = Math.round(w * (1 / ratio)); - - if (h > maxH) { - h = maxH; - w = Math.round(h * ratio); - } - } else { - h = maxH; - } - - if( forceWidth !== undefined ) { - w = parseInt(forceWidth, 10); - - if (elementDomNode.getAspectRatio() !== '') { - h = Math.round(w * (1 / ratio)); - } else { - h = maxH; - } - } - - this.domCanva.setAttribute("width", w); - this.domCanva.setAttribute("height", h); - - return this; - }, - getContext2d: function () { - - if (undefined === this.domCanva.getContext) { - return G_vmlCanvasManager - .initElement(this.domCanva) - .getContext("2d"); - } - - return this.domCanva.getContext('2d'); - }, - extractImage: function () { - return this.domCanva.toDataURL("image/png"); - }, - reset: function () { - var context = this.getContext2d(); - var w = this.getWidth(); - var h = this.getHeight(); - - context.save(); - context.setTransform(1, 0, 0, 1, 0, 0); - context.clearRect(0, 0, w, h); - context.restore(); - - return this; - }, - copy: function (elementDomNode) { - var context = this.getContext2d(); - - context.drawImage( - elementDomNode.getDomElement() - , 0 - , 0 - , this.getWidth() - , this.getHeight() - ); - - return this; - }, - getDomElement: function () { - return this.domCanva; - }, - getHeight: function () { - return this.domCanva.offsetHeight; - }, - getWidth: function () { - return this.domCanva.offsetWidth; - } - }; - - - /!****************** - * Image Object - ******************!/ - var Image = function (domElement) { - this.domElement = domElement; - }; - - Image.prototype = { - getDomElement: function () { - return this.domElement; - }, - getHeight: function () { - return this.domElement.offsetHeight; - }, - getWidth: function () { - return this.domElement.offsetWidth; - } - }; - - /!****************** - * Video Object inherits from Image object - ******************!/ - - var Video = function (domElement) { - Image.call(this, domElement); - this.aspectRatio = domElement.getAttribute('data-ratio'); - }; - - Video.prototype = new Image(); - Video.prototype.constructor = Video; - Video.prototype.getCurrentTime = function () { - return Math.floor(this.domElement.currentTime); - }; - Video.prototype.getAspectRatio = function () { - return this.aspectRatio; - }; - - /!****************** - * Cache Object - ******************!/ - var Store = function () { - this.datas = {}; - }; - - Store.prototype = { - set: function (id, item) { - this.datas[id] = item; - return this; - }, - get: function (id) { - if (!this.datas[id]) { - throw 'Unknown ID'; - } - return this.datas[id]; - }, - remove: function (id) { - // never reuse same id - this.datas[id] = null; - }, - getLength: function () { - var count = 0; - for (var k in this.datas) { - if (this.datas.hasOwnProperty(k)) { - ++count; - } - } - return count; - } - }; - - /!****************** - * Screenshot Object - ******************!/ - var ScreenShot = function (id, canva, video, altCanvas) { - - var date = new Date(); - var options = options || {}; - canva.resize(video); - canva.copy(video); - - // handle alternative canvas: - var altCanvas = altCanvas == undefined ? [] : altCanvas; - this.altScreenShots = []; - if( altCanvas.length > 0 ) { - for(var i = 0; i< altCanvas.length; i++) { - var canvaEl = altCanvas[i].el; - canvaEl.resize(video, altCanvas[i].width); - canvaEl.copy(video); - - this.altScreenShots.push({ - dataURI: canvaEl.extractImage(), - name: altCanvas[i].name - }) - } - } - - this.id = id; - this.timestamp = date.getTime(); - this.dataURI = canva.extractImage(); - this.videoTime = video.getCurrentTime(); - - }; - - ScreenShot.prototype = { - getId: function () { - return this.id; - }, - getDataURI: function () { - return this.dataURI; - }, - getTimeStamp: function () { - return this.timestamp; - }, - getVideoTime: function () { - return this.videoTime; - }, - getAltScreenShots: function() { - return this.altScreenShots; - } - }; - - /!** - * THUMB EDITOR - *!/ - var ThumbnailEditor = function (videoId, canvaId, outputOptions) { - - var domElement = document.getElementById(videoId); - - if (null !== domElement) { - var editorVideo = new Video(domElement); - } - var store = new Store(); - - function getCanva() { - return document.getElementById(canvaId); - } - - var outputOptions = outputOptions || {}; - - function setAltCanvas() { - var domElements = [], - altCanvas = outputOptions.altCanvas; - if( altCanvas.length > 0 ) { - for(var i = 0; i< altCanvas.length; i++) { - domElements.push({ - el: new Canva(altCanvas[i]), - width: altCanvas[i].getAttribute('data-width'), - name: altCanvas[i].getAttribute('data-name') - } ); - } - } - return domElements; - } - - return { - isSupported: function () { - var elem = document.createElement('canvas'); - - return !!document.getElementById(videoId) && document.getElementById(canvaId) - && !!elem.getContext && !!elem.getContext('2d'); - }, - screenshot: function () { - var screenshot = new ScreenShot( - store.getLength() + 1, - new Canva(getCanva()), - editorVideo, - setAltCanvas() - ); - - store.set(screenshot.getId(), screenshot); - - return screenshot; - }, - store: store, - copy: function (mainSource, altSources) { - - var elementDomNode = document.createElement('img'); - elementDomNode.src = mainSource; - - var element = new Image(elementDomNode); - var editorCanva = new Canva(getCanva()); - var altEditorCanva = setAltCanvas(); - editorCanva - .reset() - .resize(editorVideo) - .copy(element); - - - // handle alternative canvas: - if( altEditorCanva.length > 0 ) { - for(var i = 0; i< altEditorCanva.length; i++) { - - var tmpEl = document.createElement('img'); - tmpEl.src = altSources[i].dataURI; - - var canvaEl = altEditorCanva[i].el; - - canvaEl - .reset() - .resize(editorVideo, altEditorCanva[i].width) - .copy(new Image(tmpEl)); // @TODO: should copy the right stored image - } - } - }, - getCanvaImage: function () { - var canva = new Canva(getCanva()); - - return canva.extractImage(); - }, - resetCanva: function () { - var editorCanva = new Canva(getCanva()); - editorCanva.reset(); - }, - getNbScreenshot: function () { - return store.getLength(); - } - }; - }; - - // document.THUMB_EDITOR = ThumbEditor; - - return { - ThumbnailEditor: ThumbnailEditor - } - -})(document); - -*/ diff --git a/resources/www/prod/js/core/selectable.js b/resources/www/prod/js/core/selectable.js deleted file mode 100644 index 5f0ab5edd7..0000000000 --- a/resources/www/prod/js/core/selectable.js +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Selection Object - * - * - */ - -(function (window) { - - var Selectable = function ($container, options) { - - var defaults = { - allow_multiple: false, - selector: '', - callbackSelection: null, - selectStart: null, - selectStop: null, - limit: null - }, - options = (typeof options == 'object') ? options : {}; - - var $this = this; - - if ($container.data('selectionnable')) { - /* this container is already selectionnable */ - if (window.console) { - console.error('Trying to apply new selection to existing one'); - } - - return $container.data('selectionnable'); - } - - this.$container = $container; - this.options = jQuery.extend(defaults, options); - this.datas = new Array(); - - this.$container.data('selectionnable', this); - this.$container.addClass('selectionnable'); - this.$container - .on('click', this.options.selector, function(event) { - event.preventDefault(); - if (typeof $this.options.selectStart === 'function') { - $this.options.selectStart(jQuery.extend(jQuery.Event('selectStart'), event), $this); - } - - var $that = jQuery(this); - - var k = get_value($that, $this); - - if (utilsModule.is_shift_key(event) && jQuery('.last_selected', this.$container).filter($this.options.selector).length != 0) { - var lst = jQuery($this.options.selector, this.$container); - - var index1 = jQuery.inArray(jQuery('.last_selected', this.$container).filter($this.options.selector)[0], lst); - var index2 = jQuery.inArray($that[0], lst); - - if (index2 < index1) { - var tmp = index1; - index1 = (index2 - 1) < 0 ? index2 : (index2 - 1); - index2 = tmp; - } - - var stopped = false; - - if (index2 != -1 && index1 != -1) { - var exp = $this.options.selector + ':gt(' + index1 + '):lt(' + (index2 - index1) + ')'; - - $.each(jQuery(exp, this.$container), function (i, n) { - if (!jQuery(n).hasClass('selected') && stopped === false) { - if (!$this.hasReachLimit()) { - var k = get_value(jQuery(n), $this); - $this.push(k); - jQuery(n).addClass('selected'); - } - else { - alert(language.max_record_selected); - stopped = true; - } - } - }); - } - - if ($this.has(k) === false && stopped === false) { - if (!$this.hasReachLimit()) { - $this.push(k); - $that.addClass('selected'); - } - else { - alert(language.max_record_selected); - } - } - } - else { - if (!utilsModule.is_ctrl_key(event)) { - $this.empty().push(k); - jQuery('.selected', this.$container).filter($this.options.selector).removeClass('selected'); - $that.addClass('selected'); - } - else { - if ($this.has(k) === true) { - $this.remove(k); - $that.removeClass('selected'); - } - else { - if (!$this.hasReachLimit()) { - $this.push(k); - $that.addClass('selected'); - } - else { - alert(language.max_record_selected); - } - } - } - } - - jQuery('.last_selected', this.$container).removeClass('last_selected'); - $that.addClass('last_selected'); - - - if (typeof $this.options.selectStop === 'function') { - $this.options.selectStop(jQuery.extend(jQuery.Event('selectStop'), event), $this); - } - - }); - - return; - }; - - function get_value(element, Selectable) { - if (typeof Selectable.options.callbackSelection === 'function') { - return Selectable.options.callbackSelection(jQuery(element)); - } - else { - return jQuery('input[name="id"]', jQuery(element)).val(); - } - } - - Selectable.prototype = { - push: function (element) { - if (this.options.allow_multiple === true || !this.has(element)) { - this.datas.push(element); - } - - return this; - }, - hasReachLimit: function () { - if (this.options.limit !== null && this.options.limit <= this.datas.length) { - return true; - } - return false; - }, - remove: function (element) { - this.datas = jQuery.grep(this.datas, function (n) { - return(n !== element); - }); - - return this; - }, - has: function (element) { - - return jQuery.inArray(element, this.datas) >= 0; - }, - get: function () { - - return this.datas; - }, - empty: function () { - var $this = this; - this.datas = new Array(); - - jQuery(this.options.selector, this.$container).filter('.selected:visible').removeClass('selected'); - - if (typeof $this.options.selectStop === 'function') { - $this.options.selectStop(jQuery.Event('selectStop'), $this); - } - - return this; - }, - length: function () { - - return this.datas.length; - }, - size: function () { - - return this.datas.length; - }, - serialize: function (separator) { - - separator = separator || ';'; - - return this.datas.join(separator); - }, - selectAll: function () { - this.select('*'); - - return this; - }, - select: function (selector) { - var $this = this, - stopped = false; - - jQuery(this.options.selector, this.$container).filter(selector).not('.selected').filter(':visible').each(function () { - if (!$this.hasReachLimit()) { - $this.push(get_value(this, $this)); - $(this).addClass('selected'); - } - else { - if (stopped === false) { - alert(language.max_record_selected); - } - stopped = true; - } - }); - - - if (typeof $this.options.selectStop === 'function') { - $this.options.selectStop(jQuery.Event('selectStop'), $this); - } - - return this; - } - }; - - window.Selectable = Selectable; -})(window); diff --git a/resources/www/prod/js/prod.js b/resources/www/prod/js/prod.js index 23f1457af9..06eb8c5a9f 100644 --- a/resources/www/prod/js/prod.js +++ b/resources/www/prod/js/prod.js @@ -10,103 +10,23 @@ var bodySize = { y: 0 }; -var prodModule = (function (p4, humane) { - +var prodModule = (function (p4) { + console.log('prod') p4.preview = { open: false, current: false }; - p4.sel = []; - p4.edit = {}; - p4.thesau = { - tabs: null - }; - p4.active_zone = false; - function doSpecialSearch(qry, allbase) { - if (allbase) { - prodApp.appEvents.emit('search.doToggleDatabase', true); - } - prodApp.appEvents.emit('facets.doResetSelectedFacets'); - $('#EDIT_query').val(decodeURIComponent(qry).replace(/\+/g, " ")); - prodApp.appEvents.emit('search.doNewSearch', qry); - } - function addToBasket(sbas_id, record_id, event, singleSelection) { - var singleSelection = singleSelection || false; - p4.WorkZone.addElementToBasket(sbas_id, record_id, event, singleSelection); - } - - function removeFromBasket(el, confirm) { + /*function removeFromBasket(el, confirm) { var confirm = confirm || false; p4.WorkZone.removeElementFromBasket(el, confirm); } - /*function openRecordEditor(type, value) { - - $('#idFrameE').empty().addClass('loading'); - commonModule.showOverlay(2); - - $('#EDITWINDOW').show(); - - var options = { - lst: '', - ssel: '', - act: '' - }; - - switch (type) { - case "IMGT": - options.lst = value; - break; - - case "SSTT": - options.ssel = value; - break; - - case "STORY": - options.story = value; - break; - } - - $.ajax({ - url: "../prod/records/edit/", - type: "POST", - dataType: "html", - data: options, - success: function (data) { - recordEditorModule.initialize(); - $('#idFrameE').removeClass('loading').empty().html(data); - $('#tooltip').hide(); - return; - }, - error: function (XHR, textStatus, errorThrown) { - if (XHR.status === 0) { - return false; - } - } - }); - - return; - }*/ - - - - function toggleTopic(id) { - var o = $('#TOPIC_UL' + id); - if ($('#TOPIC_UL' + id).hasClass('closed')) - $('#TOPIC_TRI' + id + ' ,#TOPIC_UL' + id).removeClass('closed').addClass('opened'); - else - $('#TOPIC_TRI' + id + ' ,#TOPIC_UL' + id).removeClass('opened').addClass('closed'); - } - return { - doSpecialSearch: doSpecialSearch, - addToBasket: addToBasket, - removeFromBasket: removeFromBasket, - toggleTopic: toggleTopic - } -})(p4, humane); + removeFromBasket: removeFromBasket + }*/ +})(p4); //var language = {}; // handled with external prodution module diff --git a/templates/web/common/menubar.html.twig b/templates/web/common/menubar.html.twig index f991ad9499..da6e6b7571 100644 --- a/templates/web/common/menubar.html.twig +++ b/templates/web/common/menubar.html.twig @@ -67,7 +67,7 @@ {% set link = path('upload_flash_form') %} {% endif %} - + {{ 'admin::monitor: module upload' | trans }} diff --git a/templates/web/prod/Baskets/Create.html.twig b/templates/web/prod/Baskets/Create.html.twig index 11a19600cd..a758c16e61 100644 --- a/templates/web/prod/Baskets/Create.html.twig +++ b/templates/web/prod/Baskets/Create.html.twig @@ -10,55 +10,3 @@ {{ 'Ajouter ma selection courrante' | trans }} - - diff --git a/templates/web/prod/Baskets/Reorder.html.twig b/templates/web/prod/Baskets/Reorder.html.twig index c759da93bd..c68999cc5b 100644 --- a/templates/web/prod/Baskets/Reorder.html.twig +++ b/templates/web/prod/Baskets/Reorder.html.twig @@ -34,187 +34,3 @@ {% endfor %}
    - - diff --git a/templates/web/prod/Baskets/Update.html.twig b/templates/web/prod/Baskets/Update.html.twig index dd98fdc923..c5b577252d 100644 --- a/templates/web/prod/Baskets/Update.html.twig +++ b/templates/web/prod/Baskets/Update.html.twig @@ -6,48 +6,4 @@ -
    diff --git a/templates/web/prod/Story/Create.html.twig b/templates/web/prod/Story/Create.html.twig index 16a2a2c1a9..c4b9dc2040 100644 --- a/templates/web/prod/Story/Create.html.twig +++ b/templates/web/prod/Story/Create.html.twig @@ -14,55 +14,4 @@ {{ 'Ajouter ma selection courrante' | trans }} - - diff --git a/templates/web/prod/Story/Reorder.html.twig b/templates/web/prod/Story/Reorder.html.twig index 1e9b632b22..c0acfe8045 100644 --- a/templates/web/prod/Story/Reorder.html.twig +++ b/templates/web/prod/Story/Reorder.html.twig @@ -34,195 +34,3 @@ {% endfor %}
    - - diff --git a/templates/web/prod/WorkZone/Browser/Browser.html.twig b/templates/web/prod/WorkZone/Browser/Browser.html.twig index efceb6676d..7ba9370ec7 100644 --- a/templates/web/prod/WorkZone/Browser/Browser.html.twig +++ b/templates/web/prod/WorkZone/Browser/Browser.html.twig @@ -84,226 +84,3 @@
    - diff --git a/templates/web/prod/WorkZone/Macros.html.twig b/templates/web/prod/WorkZone/Macros.html.twig index 4a0ddd487a..2b759d6f41 100644 --- a/templates/web/prod/WorkZone/Macros.html.twig +++ b/templates/web/prod/WorkZone/Macros.html.twig @@ -149,7 +149,7 @@
    @@ -166,19 +166,19 @@ {% endif %}
    -
    +
    {{ 'Archive' | trans }}
    -
    +
    {{ 'action : supprimer' | trans }}
    @@ -245,7 +245,10 @@
    - + {{ databox['name'] }}
    +

    {{ 'You are using the HTML5 uploader.' | trans }} {% if not app['browser'].supportFileAPI() %} @@ -141,8 +141,11 @@ {% include "prod/templates/upload.html.twig" %} -

    {{ 'prod::editing:remplace: options de remplacement' | trans }} - + {{ 'prod::editing:remplace::option : utiliser une expression reguliere' | trans }} {% set help_link = 'https://secure.wikimedia.org/wikipedia/en/wiki/Regular_expression' %} {% if app['locale'] == 'de' %} @@ -333,7 +333,7 @@

    - +
    {% endif %} - {% endfor %} - {% for sbasId, baseInfo in inscriptions %} {% if attribute(baseInfo["config"]["cgu"], app['locale']) is defined %} {% set TOU = attribute(baseInfo["config"]["cgu"], app['locale']) %} @@ -164,7 +162,7 @@ - + {% endif %} {% for collInfo in baseInfo["config"]["collections"] if (collInfo['registration'] is none and collInfo['can-register']) %} From 4d2ecf65916816d0e3b6d490c62fe29a3fa9347c Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Fri, 8 Apr 2016 13:42:33 +0200 Subject: [PATCH 210/383] add extra configuration for geoProviders - bump Phraseanet-production-client --- lib/conf.d/configuration.yml | 22 +++++++++++++++++++--- package.json | 2 +- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index ccaac7bf20..732e55a795 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -212,6 +212,22 @@ embed_bundle: player: flexpaper enable-pdfjs: true geocoding-providers: - - - name: 'mapBox' - public-key: '' + - + name: 'mapBox' + enabled: true + public-key: '' + default-position: + - 2.335062 + - 48.879162 + default-zoom: 2 + marker-default-zoom: 11 + position-fields: + - + name: GpsCompositePosition + type: latlng + # - + # name: Longitude + # type: lng + # - + # name: Latitude + # type: lat diff --git a/package.json b/package.json index 24e63dec9c..f50537df2b 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,6 @@ "postinstall": "./node_modules/.bin/gulp install;" }, "dependencies": { - "phraseanet-production-client": "~0.14.0" + "phraseanet-production-client": "~0.15.0" } } From b38afcd5d6fdc28251200faf5b23ffd1ab8fd9c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 5 Apr 2016 11:30:08 +0200 Subject: [PATCH 211/383] PHPCS in DataboxConnectionProvider --- .../Phrasea/Databox/DataboxConnectionProvider.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/Databox/DataboxConnectionProvider.php b/lib/Alchemy/Phrasea/Databox/DataboxConnectionProvider.php index a1601dd00d..f1e8c160e7 100644 --- a/lib/Alchemy/Phrasea/Databox/DataboxConnectionProvider.php +++ b/lib/Alchemy/Phrasea/Databox/DataboxConnectionProvider.php @@ -1,10 +1,20 @@ Date: Tue, 5 Apr 2016 17:27:39 +0200 Subject: [PATCH 212/383] In place refactoring of media_subdef --- lib/classes/media/subdef.php | 372 +++++++++++++++++------------------ 1 file changed, 185 insertions(+), 187 deletions(-) diff --git a/lib/classes/media/subdef.php b/lib/classes/media/subdef.php index cdad987a06..0f167e426e 100644 --- a/lib/classes/media/subdef.php +++ b/lib/classes/media/subdef.php @@ -115,102 +115,102 @@ class media_subdef extends media_abstract implements cache_cacheableInterface $this->record = $record; $this->load($substitute); - $this->generate_url(); - - parent::__construct($this->width, $this->height, $this->url); + parent::__construct($this->width, $this->height, $this->generateUrl()); } /** * @param bool $substitute - * @return $this + * @return void */ protected function load($substitute) { try { - $datas = $this->get_data_from_cache(); - if (!is_array($datas)) { - throw new \Exception('Could not retrieve data'); - } - $this->mime = $datas['mime']; - $this->width = $datas['width']; - $this->height = $datas['height']; - $this->size = $datas['size']; - $this->etag = $datas['etag']; - $this->path = $datas['path']; - $this->url = $datas['url']; - $this->file = $datas['file']; - $this->is_physically_present = $datas['physically_present']; - $this->is_substituted = $datas['is_substituted']; - $this->subdef_id = $datas['subdef_id']; - $this->modification_date = $datas['modification_date']; - $this->creation_date = $datas['creation_date']; - - return $this; - } catch (\Exception $e) { - + $data = $this->get_data_from_cache(); + } catch (Exception $e) { + $data = false; } - $connbas = $this->record->getDatabox()->get_connection(); + if (is_array($data)) { + $this->loadFromArray($data); - $sql = "SELECT subdef_id, name, file, width, height, mime," - . " path, size, substit, created_on, updated_on, etag" - . " FROM subdef" - . " WHERE name = :name AND record_id = :record_id"; + return; + } - $params = [ + $sql = <<<'SQL' +SELECT subdef_id, name, file, width, height, mime, path, size, substit, created_on, updated_on, etag +FROM subdef +WHERE name = :name AND record_id = :record_id +SQL; + + $row = $this->getDataboxConnection()->fetchAssoc($sql, [ ':record_id' => $this->record->getRecordId(), ':name' => $this->name - ]; - - $stmt = $connbas->prepare($sql); - $stmt->execute($params); - $row = $stmt->fetch(PDO::FETCH_ASSOC); - $stmt->closeCursor(); + ]); if ($row) { - $this->width = (int) $row['width']; - $this->size = (int) $row['size']; - $this->height = (int) $row['height']; - $this->mime = $row['mime']; - $this->file = $row['file']; - $this->path = p4string::addEndSlash($row['path']); - $this->is_physically_present = file_exists($this->getRealPath()); - $this->etag = $row['etag']; - $this->is_substituted = ! ! $row['substit']; - $this->subdef_id = (int) $row['subdef_id']; - - if ($row['updated_on']) - $this->modification_date = new DateTime($row['updated_on']); - if ($row['created_on']) - $this->creation_date = new DateTime($row['created_on']); - + $this->loadFromArray([ + 'width' => (int)$row['width'], + 'size' => (int)$row['size'], + 'height' => (int)$row['height'], + 'mime' => $row['mime'], + 'file' => $row['file'], + 'path' => p4string::addEndSlash($row['path']), + 'physically_present' => true, + 'is_substituted' => (bool)$row['substit'], + 'subdef_id' => (int)$row['subdef_id'], + 'updated_on' => $row['updated_on'], + 'created_on' => $row['created_on'], + 'etag' => $row['etag'] ?: null, + ]); } elseif ($substitute === false) { throw new Exception_Media_SubdefNotFound($this->name . ' not found'); } if (! $row) { - $this->find_substitute_file(); + $this->markPhysicallyUnavailable(); } - $datas = [ - 'mime' => $this->mime, - 'width' => $this->width, - 'size' => $this->size, - 'height' => $this->height, - 'etag' => $this->etag, - 'path' => $this->path, - 'url' => $this->url, - 'file' => $this->file, + $this->set_data_to_cache($this->toArray()); + } + + private function loadFromArray(array $data) + { + $this->mime = $data['mime']; + $this->width = $data['width']; + $this->height = $data['height']; + $this->size = $data['size']; + $this->etag = $data['etag']; + $this->path = $data['path']; + $this->file = $data['file']; + $this->is_physically_present = $data['physically_present']; + $this->is_substituted = $data['is_substituted']; + $this->subdef_id = $data['subdef_id']; + $this->modification_date = isset($data['updated_on']) ? new DateTime($data['updated_on']) : null; + $this->creation_date = isset($data['created_on']) ? new DateTime($data['created_on']) : null; + $this->url = isset($data['url']) ? Url::factory((string)$data['url']) : $this->generateUrl(); + + if ($this->is_physically_present && !file_exists($this->getRealPath())) { + $this->markPhysicallyUnavailable(); + } + } + + private function toArray() + { + return [ + 'width' => $this->width, + 'size' => $this->size, + 'height' => $this->height, + 'mime' => $this->mime, + 'file' => $this->file, + 'path' => $this->path, 'physically_present' => $this->is_physically_present, - 'is_substituted' => $this->is_substituted, - 'subdef_id' => $this->subdef_id, - 'modification_date' => $this->modification_date, - 'creation_date' => $this->creation_date, + 'is_substituted' => $this->is_substituted, + 'subdef_id' => $this->subdef_id, + 'updated_on' => $this->modification_date ? $this->modification_date->format(DATE_ATOM) : '', + 'created_on' => $this->creation_date ? $this->creation_date->format(DATE_ATOM) : '', + 'etag' => $this->etag, + 'url' => (string)$this->url, ]; - - $this->set_data_to_cache($datas); - - return $this; } /** @@ -225,11 +225,13 @@ class media_subdef extends media_abstract implements cache_cacheableInterface $this->delete_data_from_cache(); - if ($this->get_permalink() instanceof media_Permalink_Adapter) { - $this->get_permalink()->delete_data_from_cache(); + $permalink = $this->get_permalink(); + + if ($permalink instanceof media_Permalink_Adapter) { + $permalink->delete_data_from_cache(); } - $this->find_substitute_file(); + $this->markPhysicallyUnavailable(); } return $this; @@ -245,57 +247,55 @@ class media_subdef extends media_abstract implements cache_cacheableInterface $subdef_id = $this->subdef_id; $this->remove_file(); - $connbas = $this->record->getDatabox()->get_connection(); + $connection = $this->getDataboxConnection(); - $sql = "DELETE FROM subdef WHERE subdef_id = :subdef_id"; - $stmt = $connbas->prepare($sql); - $stmt->execute(['subdef_id'=>$subdef_id]); - $stmt->closeCursor(); + $connection->executeUpdate( + 'DELETE FROM subdef WHERE subdef_id = :subdef_id', + ['subdef_id' => $subdef_id] + ); - $sql = "DELETE FROM permalinks WHERE subdef_id = :subdef_id"; - $stmt = $connbas->prepare($sql); - $stmt->execute(['subdef_id'=>$subdef_id]); - $stmt->closeCursor(); + $connection->executeUpdate( + 'DELETE FROM permalinks WHERE subdef_id = :subdef_id', + ['subdef_id'=>$subdef_id] + ); $this->delete_data_from_cache(); $this->record->delete_data_from_cache(record_adapter::CACHE_SUBDEFS); } - /** - * Find a substitution file for a subdef - * - * @return \media_subdef - */ - protected function find_substitute_file() + private function getSubstituteFilename() { if ($this->record->isStory()) { - $this->mime = 'image/png'; - $this->width = 256; - $this->height = 256; - $this->path = $this->app['root.path'] . '/www/assets/common/images/icons/substitution/'; - $this->file = 'regroup_thumb.png'; - $this->url = Url::factory('/assets/common/images/icons/substitution/regroup_thumb.png'); - } else { - $mime = $this->record->getMimeType(); - $mime = trim($mime) != '' ? str_replace('/', '_', $mime) : 'application_octet-stream'; - - $this->mime = 'image/png'; - $this->width = 256; - $this->height = 256; - $this->path = $this->app['root.path'] . '/www/assets/common/images/icons/substitution/'; - $this->file = str_replace('+', '%20', $mime) . '.png'; - $this->url = Url::factory('/assets/common/images/icons/substitution/' . $this->file); + return 'regroup_thumb.png'; } + $mime = $this->record->getMimeType(); + $mime = trim($mime) != '' ? str_replace('/', '_', $mime) : 'application_octet-stream'; + + return str_replace('+', '%20', $mime) . '.png'; + } + + /** + * Find a substitution file for a subdef + * @return void + */ + protected function markPhysicallyUnavailable() + { $this->is_physically_present = false; - if ( ! file_exists($this->path . $this->file)) { + $this->mime = 'image/png'; + $this->width = 256; + $this->height = 256; + $this->file = $this->getSubstituteFilename(); + + $this->path = $this->app['root.path'] . '/www/assets/common/images/icons/substitution/'; + $this->url = Url::factory('/assets/common/images/icons/substitution/' . $this->file); + + if (!file_exists($this->getRealPath())) { $this->path = $this->app['root.path'] . '/www/assets/common/images/icons/'; $this->file = 'substitution.png'; $this->url = Url::factory('/assets/common/images/icons/' . $this->file); } - - return $this; } /** @@ -319,8 +319,9 @@ class media_subdef extends media_abstract implements cache_cacheableInterface */ public function get_permalink() { - if ( ! $this->permalink && $this->is_physically_present()) + if (null === $this->permalink && $this->is_physically_present()) { $this->permalink = media_Permalink_Adapter::getPermalink($this->app, $this->record->getDatabox(), $this); + } return $this->permalink; } @@ -337,8 +338,9 @@ class media_subdef extends media_abstract implements cache_cacheableInterface { if (!$this->etag && $this->is_physically_present()) { $file = new SplFileInfo($this->getRealPath()); + if ($file->isFile()) { - $this->setEtag(md5($file->getMTime())); + $this->setEtag(md5($file->getRealPath() . $file->getMTime())); } } @@ -349,10 +351,10 @@ class media_subdef extends media_abstract implements cache_cacheableInterface { $this->etag = $etag; - $sql = "UPDATE subdef SET etag = :etag WHERE subdef_id = :subdef_id"; - $stmt = $this->record->getDatabox()->get_connection()->prepare($sql); - $stmt->execute([':subdef_id' => $this->subdef_id, ':etag' => $etag]); - $stmt->closeCursor(); + $this->getDataboxConnection()->executeUpdate( + 'UPDATE subdef SET etag = :etag WHERE subdef_id = :subdef_id', + [':subdef_id' => $this->subdef_id, ':etag' => $etag] + ); return $this; } @@ -361,13 +363,13 @@ class media_subdef extends media_abstract implements cache_cacheableInterface { $this->is_substituted = !!$substit; - $sql = "UPDATE subdef SET substit = :substit, updated_on=NOW() WHERE subdef_id = :subdef_id"; - $stmt = $this->record->getDatabox()->get_connection()->prepare($sql); - $stmt->execute(array( - ':subdef_id' => $this->subdef_id, - ':substit' => $this->is_substituted - )); - $stmt->closeCursor(); + $this->getDataboxConnection()->executeUpdate( + 'UPDATE subdef SET substit = :substit, updated_on=NOW() WHERE subdef_id = :subdef_id', + [ + ':subdef_id' => $this->subdef_id, + ':substit' => $this->is_substituted + ] + ); $this->delete_data_from_cache(); @@ -387,31 +389,22 @@ class media_subdef extends media_abstract implements cache_cacheableInterface */ public function get_type() { - switch ($this->mime) { - case 'video/mp4': - $type = self::TYPE_VIDEO_MP4; - break; - case 'video/x-flv': - $type = self::TYPE_VIDEO_FLV; - break; - case 'application/x-shockwave-flash': - $type = self::TYPE_FLEXPAPER; - break; - case 'audio/mpeg': - case 'audio/mp3': - $type = self::TYPE_AUDIO_MP3; - break; - case 'image/jpeg': - case 'image/png': - case 'image/gif': - $type = self::TYPE_IMAGE; - break; - default: - $type = self::TYPE_NO_PLAYER; - break; + static $types = [ + 'application/x-shockwave-flash' => self::TYPE_FLEXPAPER, + 'audio/mp3' => self::TYPE_AUDIO_MP3, + 'audio/mpeg' => self::TYPE_AUDIO_MP3, + 'image/gif' => self::TYPE_IMAGE, + 'image/jpeg' => self::TYPE_IMAGE, + 'image/png' => self::TYPE_IMAGE, + 'video/mp4' => self::TYPE_VIDEO_MP4, + 'video/x-flv' => self::TYPE_VIDEO_FLV, + ]; + + if (isset($types[$this->mime])) { + return $types[$this->mime]; } - return $type; + return self::TYPE_NO_PLAYER; } /** @@ -496,11 +489,11 @@ class media_subdef extends media_abstract implements cache_cacheableInterface } /** - * @return string + * @return Url */ public function renew_url() { - $this->generate_url(); + $this->url = $this->generateUrl(); return $this->get_url(); } @@ -520,7 +513,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface public function getDevices() { - if ($this->get_name() == 'document') { + if ($this->get_name() === 'document') { return [\databox_subdef::DEVICE_ALL]; } @@ -559,27 +552,26 @@ class media_subdef extends media_abstract implements cache_cacheableInterface $media = $mediavorus->guess($this->getRealPath()); - $sql = "UPDATE subdef SET height = :height , width = :width, updated_on = NOW()" - . " WHERE record_id = :record_id AND name = :name"; + $sql = <<<'SQL' +UPDATE subdef SET height = :height , width = :width, updated_on = NOW() +WHERE record_id = :record_id AND name = :name +SQL; - $params = [ - ':width' => $media->getWidth(), - ':height' => $media->getHeight(), - ':record_id' => $this->get_record_id(), - ':name' => $this->get_name(), - ]; - - $stmt = $this->record->getDatabox()->get_connection()->prepare($sql); - $stmt->execute($params); - $stmt->closeCursor(); + $this->getDataboxConnection()->executeUpdate( + $sql, + [ + ':width' => $media->getWidth(), + ':height' => $media->getHeight(), + ':record_id' => $this->get_record_id(), + ':name' => $this->get_name(), + ] + ); $this->width = $media->getWidth(); $this->height = $media->getHeight(); $this->delete_data_from_cache(); - unset($media); - return $this; } @@ -646,7 +638,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface public static function create(Application $app, \record_adapter $record, $name, MediaInterface $media) { $databox = $record->getDatabox(); - $connbas = $databox->get_connection(); + $connection = $databox->get_connection(); $path = $media->getFile()->getPath(); $newname = $media->getFile()->getFilename(); @@ -670,23 +662,23 @@ class media_subdef extends media_abstract implements cache_cacheableInterface $params[':height'] = $media->getHeight(); } - $sql = "INSERT INTO subdef" - . " (record_id, name, path, file, width, height, mime, size, dispatched, created_on, updated_on)" - . " VALUES (:record_id, :name, :path, :file, :width, :height, :mime, :size, :dispatched, NOW(), NOW())" - . " ON DUPLICATE KEY UPDATE" - . " path = VALUES(path), file = VALUES(file)," - . " width = VALUES(width) , height = VALUES(height), mime = VALUES(mime)," - . " size = VALUES(size), dispatched = VALUES(dispatched), updated_on = NOW()"; + $sql = <<<'SQL' +INSERT INTO subdef (record_id, name, path, file, width, height, mime, size, dispatched, created_on, updated_on) +VALUES (:record_id, :name, :path, :file, :width, :height, :mime, :size, :dispatched, NOW(), NOW()) +ON DUPLICATE KEY UPDATE +path = VALUES(path), file = VALUES(file), width = VALUES(width) , height = VALUES(height), mime = VALUES(mime), +size = VALUES(size), dispatched = VALUES(dispatched), updated_on = NOW() +SQL; - $stmt = $connbas->prepare($sql); - $stmt->execute($params); - $stmt->closeCursor(); + $connection->executeUpdate($sql, $params); $subdef = new self($app, $record, $name); $subdef->delete_data_from_cache(); - if ($subdef->get_permalink() instanceof media_Permalink_Adapter) { - $subdef->get_permalink()->delete_data_from_cache(); + $permalink = $subdef->get_permalink(); + + if ($permalink instanceof media_Permalink_Adapter) { + $permalink->delete_data_from_cache(); } if ($name === 'thumbnail') { @@ -695,43 +687,41 @@ class media_subdef extends media_abstract implements cache_cacheableInterface $symlinker->symlink($subdef->getRealPath()); } - unset($media); - return $subdef; } - protected function generate_url() + /** + * @return Url + */ + protected function generateUrl() { if (!$this->is_physically_present()) { - return; + $this->markPhysicallyUnavailable(); + + return $this->url; } // serve thumbnails using static file service if ($this->get_name() === 'thumbnail') { if (null !== $url = $this->app['phraseanet.static-file']->getUrl($this->getRealPath())) { $url->getQuery()->offsetSet('etag', $this->getEtag()); - $this->url = $url; - return; + return $url; } } - if ($this->app['phraseanet.h264-factory']->isH264Enabled() && in_array($this->mime, ['video/mp4'])) { + if ($this->app['phraseanet.h264-factory']->isH264Enabled() && in_array($this->mime, ['video/mp4'], false)) { if (null !== $url = $this->app['phraseanet.h264']->getUrl($this->getRealPath())) { - $this->url = $url; - - return; + return $url; } } - $this->url = Url::factory($this->app->path('datafile', [ + return Url::factory($this->app->path('datafile', [ 'sbas_id' => $this->record->getDataboxId(), 'record_id' => $this->record->getRecordId(), 'subdef' => $this->get_name(), 'etag' => $this->getEtag(), ])); - - return; } public function get_cache_key($option = null) @@ -785,4 +775,12 @@ class media_subdef extends media_abstract implements cache_cacheableInterface { return $this->path . 'stamp_' . $this->file; } + + /** + * @return \Doctrine\DBAL\Connection + */ + private function getDataboxConnection() + { + return $this->record->getDatabox()->get_connection(); + } } From d0dcdf6e6f3a0548f3deda98f70f97e437788a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 5 Apr 2016 18:52:17 +0200 Subject: [PATCH 213/383] Add NullableDateTime formatting class --- .../Phrasea/Controller/Api/V1Controller.php | 21 ++++++++----------- .../Phrasea/Feed/Formatter/AtomFormatter.php | 6 ++---- .../Feed/Formatter/CoolirisFormatter.php | 6 ++---- .../Phrasea/Feed/Formatter/RssFormatter.php | 8 +++---- .../Order/Controller/ApiOrderController.php | 4 ++-- .../Phrasea/Utilities/NullableDateTime.php | 19 +++++++++++++++++ lib/classes/ACL.php | 9 ++++---- lib/classes/Bridge/Element.php | 7 ++++--- lib/classes/media/subdef.php | 5 +++-- 9 files changed, 49 insertions(+), 36 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Utilities/NullableDateTime.php diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index 540c6104b0..126611ef2b 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -61,6 +61,7 @@ use Alchemy\Phrasea\SearchEngine\SearchEngineResult; use Alchemy\Phrasea\SearchEngine\SearchEngineSuggestion; use Alchemy\Phrasea\Status\StatusStructure; use Alchemy\Phrasea\TaskManager\LiveInformation; +use Alchemy\Phrasea\Utilities\NullableDateTime; use Doctrine\ORM\EntityManager; use Symfony\Component\Form\Form; use Symfony\Component\HttpFoundation\File\UploadedFile; @@ -138,10 +139,10 @@ class V1Controller extends Controller 'pid' => $data['process-id'], 'jobId' => $task->getJobId(), 'period' => $task->getPeriod(), - 'last_exec_time' => $task->getLastExecution() ? $task->getLastExecution()->format(DATE_ATOM) : null, - 'last_execution' => $task->getLastExecution() ? $task->getLastExecution()->format(DATE_ATOM) : null, - 'updated' => $task->getUpdated() ? $task->getUpdated()->format(DATE_ATOM) : null, - 'created' => $task->getCreated() ? $task->getCreated()->format(DATE_ATOM) : null, + 'last_exec_time' => NullableDateTime::format($task->getLastExecution()), + 'last_execution' => NullableDateTime::format($task->getLastExecution()), + 'updated' => NullableDateTime::format($task->getUpdated()), + 'created' => NullableDateTime::format($task->getCreated()), 'auto_start' => $task->getStatus() === Task::STATUS_STARTED, 'crashed' => $task->getCrashed(), ]; @@ -709,9 +710,9 @@ class V1Controller extends Controller 'position' => $user->getActivity() ?: null, 'company' => $user->getCompany() ?: null, 'geoname_id' => $user->getGeonameId() ?: null, - 'last_connection' => $user->getLastConnection() ? $user->getLastConnection()->format(DATE_ATOM) : null, - 'created_on' => $user->getCreated() ? $user->getCreated()->format(DATE_ATOM) : null, - 'updated_on' => $user->getUpdated() ? $user->getUpdated()->format(DATE_ATOM) : null, + 'last_connection' => NullableDateTime::format($user->getLastConnection()), + 'created_on' => NullableDateTime::format($user->getCreated()), + 'updated_on' => NullableDateTime::format($user->getUpdated()), 'locale' => $user->getLocale() ?: null, ]; } @@ -1466,11 +1467,7 @@ class V1Controller extends Controller ]; }, iterator_to_array($basket->getValidation()->getParticipants())); - $expires_on_atom = $basket->getValidation()->getExpires(); - - if ($expires_on_atom instanceof \DateTime) { - $expires_on_atom = $expires_on_atom->format(DATE_ATOM); - } + $expires_on_atom = NullableDateTime::format($basket->getValidation()->getExpires()); $ret = array_merge([ 'validation_users' => $users, diff --git a/lib/Alchemy/Phrasea/Feed/Formatter/AtomFormatter.php b/lib/Alchemy/Phrasea/Feed/Formatter/AtomFormatter.php index be7533249d..5371f97a41 100644 --- a/lib/Alchemy/Phrasea/Feed/Formatter/AtomFormatter.php +++ b/lib/Alchemy/Phrasea/Feed/Formatter/AtomFormatter.php @@ -17,6 +17,7 @@ use Alchemy\Phrasea\Feed\FeedInterface; use Alchemy\Phrasea\Feed\Link\FeedLink; use Alchemy\Phrasea\Feed\Link\LinkGeneratorCollection; use Alchemy\Phrasea\Model\Entities\User; +use Alchemy\Phrasea\Utilities\NullableDateTime; use Symfony\Component\HttpFoundation\Response; class AtomFormatter extends FeedFormatterAbstract implements FeedFormatterInterface @@ -48,8 +49,6 @@ class AtomFormatter extends FeedFormatterAbstract implements FeedFormatterInterf */ public function format(FeedInterface $feed, $page, User $user = null, $generator = 'Phraseanet', Application $app = null) { - $updated_on = $feed->getUpdatedOn(); - $document = new \DOMDocument('1.0', 'UTF-8'); $document->formatOutput = true; $document->standalone = true; @@ -59,8 +58,7 @@ class AtomFormatter extends FeedFormatterAbstract implements FeedFormatterInterf $root->setAttribute('xmlns:media', 'http://search.yahoo.com/mrss/'); $this->addTag($document, $root, 'title', $feed->getTitle()); - if ($updated_on instanceof \DateTime) { - $updated_on = $updated_on->format(DATE_ATOM); + if (null !== $updated_on = NullableDateTime::format($feed->getUpdatedOn())) { $this->addTag($document, $root, 'updated', $updated_on); } diff --git a/lib/Alchemy/Phrasea/Feed/Formatter/CoolirisFormatter.php b/lib/Alchemy/Phrasea/Feed/Formatter/CoolirisFormatter.php index 936a5aba87..a7f81addf9 100644 --- a/lib/Alchemy/Phrasea/Feed/Formatter/CoolirisFormatter.php +++ b/lib/Alchemy/Phrasea/Feed/Formatter/CoolirisFormatter.php @@ -19,6 +19,7 @@ use Alchemy\Phrasea\Model\Entities\FeedEntry; use Alchemy\Phrasea\Model\Entities\FeedItem; use Alchemy\Phrasea\Feed\Link\LinkGeneratorCollection; use Alchemy\Phrasea\Model\Entities\User; +use Alchemy\Phrasea\Utilities\NullableDateTime; use DateTime; use Symfony\Component\HttpFoundation\Response; @@ -52,8 +53,6 @@ class CoolirisFormatter extends FeedFormatterAbstract implements FeedFormatterIn */ public function format(FeedInterface $feed, $page, User $user = null, $generator = 'Phraseanet', Application $app = null) { - $updated_on = $feed->getUpdatedOn(); - $doc = new \DOMDocument('1.0', 'UTF-8'); $doc->formatOutput = true; $doc->standalone = true; @@ -89,8 +88,7 @@ class CoolirisFormatter extends FeedFormatterAbstract implements FeedFormatterIn $this->addTag($doc, $channel, 'managingEditor', $this->managingEditor); if (isset($this->webMaster)) $this->addTag($doc, $channel, 'webMaster', $this->webMaster); - if ($updated_on instanceof DateTime) { - $updated_on = $updated_on->format(DATE_RFC2822); + if (null !== $updated_on = NullableDateTime::format($feed->getUpdatedOn(), DATE_RFC2822)) { $this->addTag($doc, $channel, 'pubDate', $updated_on); } if (isset($this->lastBuildDate) && $this->lastBuildDate instanceof DateTime) { diff --git a/lib/Alchemy/Phrasea/Feed/Formatter/RssFormatter.php b/lib/Alchemy/Phrasea/Feed/Formatter/RssFormatter.php index ec892d2fc3..9e5a923470 100644 --- a/lib/Alchemy/Phrasea/Feed/Formatter/RssFormatter.php +++ b/lib/Alchemy/Phrasea/Feed/Formatter/RssFormatter.php @@ -17,6 +17,7 @@ use Alchemy\Phrasea\Feed\Link\FeedLink; use Alchemy\Phrasea\Feed\Link\LinkGeneratorCollection; use Alchemy\Phrasea\Feed\RSS\FeedRSSImage; use Alchemy\Phrasea\Model\Entities\User; +use Alchemy\Phrasea\Utilities\NullableDateTime; use Symfony\Component\HttpFoundation\Response; use Alchemy\Phrasea\Model\Entities\FeedEntry; use Alchemy\Phrasea\Feed\Link\FeedLinkGenerator; @@ -51,8 +52,6 @@ class RssFormatter extends FeedFormatterAbstract implements FeedFormatterInterfa */ public function format(FeedInterface $feed, $page, User $user = null, $generator = 'Phraseanet', Application $app = null) { - $updated_on = $feed->getUpdatedOn(); - $next = $prev = null; if ($feed->hasPage($page + 1, self::PAGE_SIZE)) { @@ -104,11 +103,10 @@ class RssFormatter extends FeedFormatterAbstract implements FeedFormatterInterfa $this->addTag($doc, $channel, 'managingEditor', $this->managingEditor); if (isset($this->webMaster)) $this->addTag($doc, $channel, 'webMaster', $this->webMaster); - if ($updated_on instanceof \DateTime) { - $updated_on = $updated_on->format(DATE_RFC2822); + if (null !== $updated_on = NullableDateTime::format($feed->getUpdatedOn(), DATE_RFC2822)) { $this->addTag($doc, $channel, 'pubDate', $updated_on); } - if (isset($this->lastBuildDate) && $this->lastBuildDate instanceof DateTime) { + if (isset($this->lastBuildDate) && $this->lastBuildDate instanceof \DateTime) { $last_build = $this->lastBuildDate->format(DATE_RFC2822); $this->addTag($doc, $channel, 'lastBuildDate', $last_build); } diff --git a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php index 06f2ca60a1..f11b3f2202 100644 --- a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php +++ b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php @@ -94,8 +94,8 @@ class ApiOrderController extends BaseOrderController $pager = new Pagerfanta(new DoctrineORMAdapter($builder, false)); $pager->setCurrentPage($page); $pager->setMaxPerPage($perPage); - $paginator = new PagerfantaPaginatorAdapter($pager, $routeGenerator); - $resource->setPaginator($paginator); + + $resource->setPaginator(new PagerfantaPaginatorAdapter($pager, $routeGenerator)); return $this->returnResourceResponse($request, $fractal, $resource); } diff --git a/lib/Alchemy/Phrasea/Utilities/NullableDateTime.php b/lib/Alchemy/Phrasea/Utilities/NullableDateTime.php new file mode 100644 index 0000000000..6f47da81c7 --- /dev/null +++ b/lib/Alchemy/Phrasea/Utilities/NullableDateTime.php @@ -0,0 +1,19 @@ +format($format) : $default; + } +} diff --git a/lib/classes/ACL.php b/lib/classes/ACL.php index 649a781528..f5f62f4cb5 100644 --- a/lib/classes/ACL.php +++ b/lib/classes/ACL.php @@ -26,6 +26,7 @@ use Alchemy\Phrasea\Core\Event\Acl\SysadminChangedEvent; use Alchemy\Phrasea\Model\Entities\User; use Alchemy\Phrasea\Model\RecordInterface; use Alchemy\Phrasea\Model\RecordReferenceInterface; +use Alchemy\Phrasea\Utilities\NullableDateTime; use Doctrine\DBAL\DBALException; @@ -1706,10 +1707,10 @@ class ACL implements cache_cacheableInterface } $params = [ - ':usr_id' => $this->user->getId() - , ':base_id' => $base_id - , 'limited_from' => ($limit_from ? $limit_from->format(DATE_ISO8601) : null) - , 'limited_to' => ($limit_to ? $limit_to->format(DATE_ISO8601) : null) + ':usr_id' => $this->user->getId(), + ':base_id' => $base_id, + 'limited_from' => NullableDateTime::format($limit_from, DATE_ISO8601), + 'limited_to' => NullableDateTime::format($limit_to, DATE_ISO8601), ]; $stmt = $this->app->getApplicationBox()->get_connection()->prepare($sql); diff --git a/lib/classes/Bridge/Element.php b/lib/classes/Bridge/Element.php index 4283e7f9eb..5a81808e55 100644 --- a/lib/classes/Bridge/Element.php +++ b/lib/classes/Bridge/Element.php @@ -10,6 +10,7 @@ */ use Alchemy\Phrasea\Application; +use Alchemy\Phrasea\Utilities\NullableDateTime; class Bridge_Element { @@ -383,9 +384,9 @@ class Bridge_Element SET uploaded_on = :uploaded_on, updated_on = :update WHERE id = :id'; $params = [ - ':uploaded_on' => $this->uploaded_on ? $this->uploaded_on->format(DATE_ISO8601) : null - , ':id' => $this->id - , ':update' => $this->updated_on->format(DATE_ISO8601) + ':uploaded_on' => NullableDateTime::format($this->uploaded_on, DATE_ISO8601), + ':id' => $this->id, + ':update' => $this->updated_on->format(DATE_ISO8601), ]; $stmt = $this->app->getApplicationBox()->get_connection()->prepare($sql); diff --git a/lib/classes/media/subdef.php b/lib/classes/media/subdef.php index 0f167e426e..f37a154df0 100644 --- a/lib/classes/media/subdef.php +++ b/lib/classes/media/subdef.php @@ -11,6 +11,7 @@ use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Http\StaticFile\Symlink\SymLinker; +use Alchemy\Phrasea\Utilities\NullableDateTime; use Guzzle\Http\Url; use MediaAlchemyst\Alchemyst; use MediaVorus\Media\MediaInterface; @@ -206,8 +207,8 @@ SQL; 'physically_present' => $this->is_physically_present, 'is_substituted' => $this->is_substituted, 'subdef_id' => $this->subdef_id, - 'updated_on' => $this->modification_date ? $this->modification_date->format(DATE_ATOM) : '', - 'created_on' => $this->creation_date ? $this->creation_date->format(DATE_ATOM) : '', + 'updated_on' => NullableDateTime::format($this->modification_date), + 'created_on' => NullableDateTime::format($this->creation_date), 'etag' => $this->etag, 'url' => (string)$this->url, ]; From 6140c5cc7327af251be31299382e3efef05c461d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 7 Apr 2016 14:52:36 +0200 Subject: [PATCH 214/383] Refactor media_subdef --- .../Phrasea/Cache/MultiGetPutAdapter.php | 87 ++++++++ .../Provider/RepositoriesServiceProvider.php | 19 ++ .../DataboxBoundRepositoryProvider.php | 2 +- .../CachedMediaSubdefDataRepository.php | 155 ++++++++++++++ .../Subdef/DbalMediaSubdefDataRepository.php | 201 ++++++++++++++++++ .../Subdef/MediaSubdefDataRepository.php | 33 +++ .../Databox/Subdef/MediaSubdefHydrator.php | 49 +++++ .../Databox/Subdef/MediaSubdefRepository.php | 103 +++++++++ .../Subdef/MediaSubdefRepositoryFactory.php | 60 ++++++ .../Phrasea/Order/OrderElementTransformer.php | 24 +-- lib/classes/media/subdef.php | 41 +++- lib/classes/record/adapter.php | 56 ++--- 12 files changed, 784 insertions(+), 46 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Cache/MultiGetPutAdapter.php create mode 100644 lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php create mode 100644 lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php create mode 100644 lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefDataRepository.php create mode 100644 lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefHydrator.php create mode 100644 lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php create mode 100644 lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepositoryFactory.php diff --git a/lib/Alchemy/Phrasea/Cache/MultiGetPutAdapter.php b/lib/Alchemy/Phrasea/Cache/MultiGetPutAdapter.php new file mode 100644 index 0000000000..7c4cd9699e --- /dev/null +++ b/lib/Alchemy/Phrasea/Cache/MultiGetPutAdapter.php @@ -0,0 +1,87 @@ +cache = $cache; + } + + public function fetch($id) + { + return $this->cache->fetch($id); + } + + public function contains($id) + { + return $this->cache->contains($id); + } + + public function save($id, $data, $lifeTime = 0) + { + return $this->cache->save($id, $data, $lifeTime); + } + + public function delete($id) + { + return $this->cache->delete($id); + } + + public function getStats() + { + return $this->cache->getStats(); + } + + public function fetchMultiple(array $keys) + { + if ($this->cache instanceof MultiGetCache) { + return $this->cache->fetchMultiple($keys); + } + + $data = []; + + foreach ($keys as $key) { + $value = $this->fetch($key); + + if (false !== $value || true === $this->contains($key)) { + $data[$key] = $value; + } + } + + return $data; + } + + public function saveMultiple(array $keysAndValues, $lifetime = 0) + { + if ($this->cache instanceof MultiPutCache) { + $this->cache->saveMultiple($keysAndValues, $lifetime); + } + + foreach ($keysAndValues as $key => $value) { + if (!$this->cache->save($key, $value, $lifetime)) { + return false; + } + } + + return true; + } +} diff --git a/lib/Alchemy/Phrasea/Core/Provider/RepositoriesServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/RepositoriesServiceProvider.php index 61d2fbbd83..dc2db210ed 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/RepositoriesServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/RepositoriesServiceProvider.php @@ -20,13 +20,16 @@ use Alchemy\Phrasea\Collection\Reference\ArrayCacheCollectionReferenceRepository use Alchemy\Phrasea\Collection\Reference\DbalCollectionReferenceRepository; use Alchemy\Phrasea\Databox\ArrayCacheDataboxRepository; use Alchemy\Phrasea\Databox\CachingDataboxRepositoryDecorator; +use Alchemy\Phrasea\Databox\DataboxBoundRepositoryProvider; use Alchemy\Phrasea\Databox\DataboxConnectionProvider; use Alchemy\Phrasea\Databox\DataboxFactory; use Alchemy\Phrasea\Databox\DbalDataboxRepository; use Alchemy\Phrasea\Databox\Field\DataboxFieldFactory; use Alchemy\Phrasea\Databox\Field\DbalDataboxFieldRepository; use Alchemy\Phrasea\Databox\Record\LegacyRecordRepository; +use Alchemy\Phrasea\Databox\Subdef\MediaSubdefRepositoryFactory; use Alchemy\Phrasea\Model\Repositories\BasketRepository; +use Alchemy\Phrasea\Record\RecordReference; use Silex\Application; use Silex\ServiceProviderInterface; @@ -198,6 +201,22 @@ class RepositoriesServiceProvider implements ServiceProviderInterface return new CollectionRepositoryRegistry($app, $repositoryFactory, $app['repo.collection-references']); }); + + $app['provider.repo.media_subdef'] = $app->share(function (PhraseaApplication $app) { + $connectionProvider = new DataboxConnectionProvider($app['phraseanet.appbox']); + + $factoryProvider = function ($databoxId) use ($app) { + return function (array $data) use ($app, $databoxId) { + $recordReference = RecordReference::createFromDataboxIdAndRecordId($databoxId, $data['record_id']); + + return new \media_subdef($app, $recordReference, $data['name'], false, $data); + }; + }; + + $repositoryFactory = new MediaSubdefRepositoryFactory($connectionProvider, $app['cache'], $factoryProvider); + + return new DataboxBoundRepositoryProvider($repositoryFactory); + }); } public function boot(Application $app) diff --git a/lib/Alchemy/Phrasea/Databox/DataboxBoundRepositoryProvider.php b/lib/Alchemy/Phrasea/Databox/DataboxBoundRepositoryProvider.php index ec76b31c3e..20b2b4b3cc 100644 --- a/lib/Alchemy/Phrasea/Databox/DataboxBoundRepositoryProvider.php +++ b/lib/Alchemy/Phrasea/Databox/DataboxBoundRepositoryProvider.php @@ -1,5 +1,5 @@ decorated = $decorated; + $this->cache = $cache instanceof MultiGetCache && $cache instanceof MultiPutCache + ? $cache + : new MultiGetPutAdapter($cache); + $this->baseKey = $baseKey; + } + + /** + * @return int + */ + public function getLifeTime() + { + return $this->lifeTime; + } + + /** + * @param int $lifeTime + */ + public function setLifeTime($lifeTime) + { + $this->lifeTime = (int)$lifeTime; + } + + public function findByRecordIdsAndNames(array $recordIds, array $names = null) + { + // Can not cache when names are not known + if (null !== $names) { + $keys = $this->generateCacheKeys($recordIds, $names); + $data = $this->cache->fetchMultiple($keys); + + if (count($keys) === count($data)) { + return $this->filterNonNull($data); + } + } + + $retrieved = $this->decorated->findByRecordIdsAndNames($recordIds, $names); + + $data = isset($keys) ? array_fill_keys($keys, null) : []; + + foreach ($retrieved as $item) { + $data[$this->getCacheKey($item)] = $item; + } + + $this->cache->saveMultiple($data, $this->lifeTime); + + return $this->filterNonNull($data); + } + + /** + * @param array $data + * @return array + */ + private function filterNonNull(array $data) + { + return array_values(array_filter($data, function ($value) { + return null !== $value; + })); + } + + public function delete(array $subdefIds) + { + $deleted = $this->decorated->delete($subdefIds); + + $keys = array_map([$this, 'getCacheKey'], $subdefIds); + + $this->cache->saveMultiple(array_fill_keys($keys, null), $this->lifeTime); + + return $deleted; + } + + public function save(array $data) + { + $this->decorated->save($data); + + $toSave = []; + + foreach ($data as $item) { + $toSave[$this->getCacheKey($item)] = $item; + } + + $this->cache->saveMultiple($toSave, $this->lifeTime); + } + + private function getCacheKey(array $data) + { + return $this->baseKey . json_encode([$data['record_id'], $data['name']]); + } + + /** + * @param int[] $recordIds + * @param string[] $names + * @return array[] + */ + private function generateCacheKeys(array $recordIds, array $names) + { + $cacheKeys = []; + + foreach ($recordIds as $recordId) { + foreach ($names as $name) { + $cacheKeys = [ + 'record_id' => $recordId, + 'name' => $name, + ]; + } + } + + return array_map([$this, 'getCacheKey'], $cacheKeys); + } +} diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php new file mode 100644 index 0000000000..3f3a52dcb5 --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php @@ -0,0 +1,201 @@ +connection = $connection; + } + + /** + * @param int[] $recordIds + * @param string[]|null $names + * @return array[] + */ + public function findByRecordIdsAndNames(array $recordIds, array $names = null) + { + if (!$recordIds || (null !== $names && !$names)) { + return []; + } + + $sql = $this->getSelectSQL() . ' WHERE record_id IN (:recordIds)'; + $params = ['recordIds' => $recordIds]; + $types = ['recordIds' => Connection::PARAM_INT_ARRAY]; + + if ($names) { + $sql .= ' AND name IN (:names)'; + $params['names'] = $names; + $types['names'] = Connection::PARAM_STR_ARRAY; + } + + return $this->connection->fetchAll($sql, $params, $types); + } + + /** + * @param array[] $subdefIds + * @return int The number of affected rows + * @throws \Exception + */ + public function delete(array $subdefIds) + { + if (!$subdefIds) { + return 0; + } + + $statement = $this->connection->prepare('DELETE FROM subdef WHERE record_id = :recordId AND name = :name'); + + $this->connection->beginTransaction(); + + try { + $deleted = array_reduce($subdefIds, function ($carry, $data) use ($statement) { + $carry += $statement->execute([ + 'recordId' => $data['record_id'], + 'name' => $data['name'], + ]); + + return $carry; + }, 0); + + $this->connection->commit(); + } catch (\Exception $exception) { + $this->connection->rollBack(); + + throw $exception; + } + + return $deleted; + } + + /** + * @param array $data + * @throws \Exception + */ + public function save(array $data) + { + $this->connection->transactional(function () use ($data) { + $partitions = $this->partitionInsertAndUpdate($data); + + $updateNeeded = $this->createMissing($partitions['insert']); + + $this->updatePresent($partitions['update'] + $updateNeeded); + }); + } + + /** + * @param array $data + * @return array + */ + private function partitionInsertAndUpdate(array $data) + { + $partitions = [ + 'insert' => [], + 'update' => [], + ]; + + foreach ($data as $index => $item) { + $partitions[isset($item['subdef_id']) ? 'update' : 'insert'][$index] = $item; + } + + return $partitions; + } + + /** + * @param array $toInsert + * @return array + * @throws DBALException + */ + private function createMissing(array $toInsert) + { + if (!$toInsert) { + return []; + } + + $updateNeeded = []; + + $sql = <<<'SQL' +INSERT INTO subdef (record_id, name, path, file, width, height, mime, size, substit, etag, created_on, updated_on, dispatched) +VALUES (:recordId, :name, :path, :file, :width, :height, :mime, :size, :substit, :etag, NOW(), NOW(), 1) +SQL; + $statement = $this->connection->prepare($sql); + + foreach ($toInsert as $index => $partition) { + try { + $statement->execute($this->getParametersFromArray($partition)); + } catch (DriverException $exception) { + $updateNeeded[$index] = $partition; + } + } + + return $updateNeeded; + } + + /** + * @param array $data + * @return array + */ + private function getParametersFromArray(array $data) + { + return [ + 'recordId' => $data['record_id'], + 'name' => $data['name'], + 'path' => $data['path'], + 'file' => $data['file'], + 'width' => $data['width'], + 'height' => $data['height'], + 'mime' => $data['mime'], + 'size' => $data['size'], + 'substit' => $data['substit'], + 'etag' => $data['etag'], + ]; + } + + /** + * @param array $toUpdate + * @throws DBALException + */ + private function updatePresent(array $toUpdate) + { + if (!$toUpdate) { + return; + } + + $sql = <<<'SQL' +UPDATE subdef +SET path = :path, file = :file, width = :width, height = :height, mime = :mime, + size = :size, substit = :substit, etag = :etag, updated_on = NOW() +WHERE record_id = :recordId AND name = :name +SQL; + $statement = $this->connection->prepare($sql); + + foreach ($toUpdate as $index => $partition) { + $statement->execute($this->getParametersFromArray($partition)); + } + } + + private function getSelectSQL() + { + return <<<'SQL' +SELECT subdef_id, record_id, name, path, file, width, height, mime, size, substit, etag, created_on, updated_on +FROM subdef +SQL; + } +} diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefDataRepository.php new file mode 100644 index 0000000000..c97f4dc6fc --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefDataRepository.php @@ -0,0 +1,33 @@ +loadFromArray($data); + }; + + $closure->call($instance, $data); + } + + /** + * @param \media_subdef $instance + * @return array + * @throws \Assert\AssertionFailedException + */ + public function extract($instance) + { + Assertion::isInstanceOf($instance, \media_subdef::class); + + $closure = function () { + return $this->toArray(); + }; + + return $closure->call($instance); + } +} diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php new file mode 100644 index 0000000000..b1c6f9836d --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php @@ -0,0 +1,103 @@ +repository = $repository; + $this->subdefFactory = $subdefFactory; + $this->hydrator = $hydrator ?: new MediaSubdefHydrator(); + } + + /** + * @param int[] $recordIds + * @param string[] $names + * @return \media_subdef[] + */ + public function findByRecordIdsAndNames(array $recordIds, array $names = null) + { + if (! $recordIds) { + return []; + } + + $data = $this->repository->findByRecordIdsAndNames($recordIds, $names); + + return $this->hydrateAll($data); + } + + public function clear() + { + $this->idMap = []; + } + + /** + * @param string $index + * @param array $data + * @return \media_subdef + */ + private function hydrate($index, array $data) + { + if (isset($this->idMap[$index])) { + $this->hydrator->hydrate($this->idMap[$index], $data); + + return $this->idMap[$index]; + } + + $factory = $this->subdefFactory; + + $instance = $factory($data); + Assertion::isInstanceOf($instance, \media_subdef::class); + + $this->idMap[$index] = $instance; + + return $instance; + } + + /** + * @param array $data + * @return \media_subdef[] + */ + private function hydrateAll(array $data) + { + $instances = []; + + foreach ($data as $item) { + $instances[] = $this->hydrate(json_encode([$item['record_id'], $item['name']]), $item); + } + + return $instances; + } +} diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepositoryFactory.php b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepositoryFactory.php new file mode 100644 index 0000000000..e2d1d14265 --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepositoryFactory.php @@ -0,0 +1,60 @@ +connectionProvider = $connectionProvider; + $this->cache = $cache; + $this->mediaSubdefFactoryProvider = $mediaSubdefFactoryProvider; + } + + public function createRepositoryFor($databoxId) + { + $connection = $this->connectionProvider->getConnection($databoxId); + + $dbalRepository = new DbalMediaSubdefDataRepository($connection); + $dataRepository = new CachedMediaSubdefDataRepository($dbalRepository, $this->cache, sprintf('databox%d:', $databoxId)); + + $provider = $this->mediaSubdefFactoryProvider; + $factory = $provider($databoxId); + + if (!is_callable($factory)) { + throw new \UnexpectedValueException(sprintf( + 'Media subdef factory is expected to be callable, got %s', + is_object($factory) ? get_class($factory) : gettype($factory) + )); + } + + return new MediaSubdefRepository($dataRepository, $factory); + } +} diff --git a/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php b/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php index 3ca40411d0..88366ce3d5 100644 --- a/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php +++ b/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php @@ -11,6 +11,7 @@ namespace Alchemy\Phrasea\Order; use Alchemy\Phrasea\Application; +use Alchemy\Phrasea\Databox\Subdef\MediaSubdefRepository; use Alchemy\Phrasea\Media\MediaSubDefinitionUrlGenerator; use Alchemy\Phrasea\Model\Entities\OrderElement; use League\Fractal\ParamBag; @@ -109,19 +110,8 @@ class OrderElementTransformer extends TransformerAbstract } } - $subdefs = []; - - foreach ($subdefNames as $subdefName) { - if ($record->has_subdef($subdefName)) { - try { - $subdefs[$subdefName] = new \media_subdef($this->app, $record, $subdefName); - } catch (\Exception_Media_SubdefNotFound $exception) { - // ignore missing subdef - } - } - } - - return $subdefs; + return $this->getMediaSubDefRepository($databox->get_sbas_id()) + ->findByRecordIdsAndNames([$element->getRecordId()], $subdefNames); } /** @@ -131,4 +121,12 @@ class OrderElementTransformer extends TransformerAbstract { return $this->app['media_accessor.subdef_url_generator']; } + + /** + * @return MediaSubdefRepository + */ + private function getMediaSubDefRepository($databoxId) + { + return $this->app['provider.repo.media_subdef']->getRepositoryForDatabox($databoxId); + } } diff --git a/lib/classes/media/subdef.php b/lib/classes/media/subdef.php index f37a154df0..9f4d9eedba 100644 --- a/lib/classes/media/subdef.php +++ b/lib/classes/media/subdef.php @@ -11,6 +11,7 @@ use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Http\StaticFile\Symlink\SymLinker; +use Alchemy\Phrasea\Model\RecordReferenceInterface; use Alchemy\Phrasea\Utilities\NullableDateTime; use Guzzle\Http\Url; use MediaAlchemyst\Alchemyst; @@ -104,17 +105,25 @@ class media_subdef extends media_abstract implements cache_cacheableInterface const TC_DATA_LIGHTVALUE = 'LightValue'; /** - * @param Application $app - * @param record_adapter $record - * @param string $name - * @param bool $substitute + * @param Application $app + * @param RecordReferenceInterface $record + * @param string $name + * @param bool $substitute + * @param array|null $data */ - public function __construct(Application $app, record_adapter $record, $name, $substitute = false) + public function __construct(Application $app, RecordReferenceInterface $record, $name, $substitute = false, array $data = null) { $this->app = $app; $this->name = $name; - $this->record = $record; - $this->load($substitute); + $this->record = $record instanceof record_adapter + ? $record + : $app->findDataboxById($record->getDataboxId())->get_record($record->getId()); + + if (null !== $data) { + $this->loadFromArray($data); + } else { + $this->load($substitute); + } parent::__construct($this->width, $this->height, $this->generateUrl()); } @@ -176,6 +185,24 @@ SQL; private function loadFromArray(array $data) { + if (!$data) { + $data = [ + 'mime' => 'unknown', + 'width' => 0, + 'height' => 0, + 'size' => 0, + 'etag' => null, + 'path' => '', + 'file' => '', + 'physically_present' => false, + 'is_substituted' => false, + 'subdef_id' => null, + 'updated_on' => null, + 'created_on' => null, + 'url' => null, + ]; + } + $this->mime = $data['mime']; $this->width = $data['width']; $this->height = $data['height']; diff --git a/lib/classes/record/adapter.php b/lib/classes/record/adapter.php index 8f87aeeeb1..a1104accf8 100644 --- a/lib/classes/record/adapter.php +++ b/lib/classes/record/adapter.php @@ -20,6 +20,7 @@ use Alchemy\Phrasea\Core\Event\Record\RecordEvent; use Alchemy\Phrasea\Core\Event\Record\RecordEvents; use Alchemy\Phrasea\Core\Event\Record\StatusChangedEvent; use Alchemy\Phrasea\Core\PhraseaTokens; +use Alchemy\Phrasea\Databox\Subdef\MediaSubdefRepository; use Alchemy\Phrasea\Filesystem\FilesystemService; use Alchemy\Phrasea\Media\TechnicalData; use Alchemy\Phrasea\Media\TechnicalDataSet; @@ -571,7 +572,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface public function has_subdef($name) { - return in_array($name, $this->get_available_subdefs()); + return in_array($name, $this->get_available_subdefs(), false); } /** @@ -586,17 +587,13 @@ class record_adapter implements RecordInterface, cache_cacheableInterface return $this->subdefs[$name]; } - if (!in_array($name, $this->get_available_subdefs())) { + if (!in_array($name, $this->get_available_subdefs(), false)) { throw new Exception_Media_SubdefNotFound(sprintf("subdef `%s` not found", $name)); } - if (!$this->subdefs) { - $this->subdefs = []; - } + $subdefs = $this->getMediaSubdefRepository()->findByRecordIdsAndNames([$this->getRecordId()], [$name]); - $substitute = ($name !== 'document'); - - return $this->subdefs[$name] = new media_subdef($this->app, $this, $name, $substitute); + return $subdefs ? reset($subdefs) : new media_subdef($this->app, $this, $name, ($name !== 'document')); } /** @@ -614,7 +611,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface if (isset($availableSubdefs['document'])) { - $mime_ok = !$mimes || in_array($availableSubdefs['document']->get_mime(), (array) $mimes); + $mime_ok = !$mimes || in_array($availableSubdefs['document']->get_mime(), (array) $mimes, false); $devices_ok = !$devices || array_intersect($availableSubdefs['document']->getDevices(), (array) $devices); if ($mime_ok && $devices_ok) { @@ -663,13 +660,20 @@ class record_adapter implements RecordInterface, cache_cacheableInterface */ public function get_subdefs() { - if (!$this->subdefs) { - $this->subdefs = []; + if (null !== $this->subdefs) { + return $this->subdefs; } - $subdefs = $this->get_available_subdefs(); - foreach ($subdefs as $name) { - $this->get_subdef($name); + $this->subdefs = []; + + foreach ($this->getMediaSubdefRepository()->findByRecordIdsAndNames([$this->getRecordId()]) as $subdef) { + $this->subdefs[$subdef->get_name()] = $subdef; + } + + foreach (['preview', 'thumbnail'] as $name) { + if (!$this->subdefs[$name]) { + $this->subdefs[$name] = new media_subdef($this->app, $this, $name, true, []); + } } return $this->subdefs; @@ -680,6 +684,10 @@ class record_adapter implements RecordInterface, cache_cacheableInterface */ protected function get_available_subdefs() { + if (null !== $this->subdefs) { + return array_keys($this->subdefs); + } + try { $data = $this->get_data_from_cache(self::CACHE_SUBDEFS); } catch (\Exception $e) { @@ -690,18 +698,8 @@ class record_adapter implements RecordInterface, cache_cacheableInterface return $data; } - $rs = $this->getDataboxConnection()->fetchAll( - 'SELECT name FROM subdef WHERE record_id = :record_id', - ['record_id' => $this->getRecordId()] - ); + $subdefs = array_keys($this->get_subdefs()); - $subdefs = ['preview', 'thumbnail']; - - foreach ($rs as $row) { - $subdefs[] = $row['name']; - } - - $subdefs = array_unique($subdefs); $this->set_data_to_cache($subdefs, self::CACHE_SUBDEFS); return $subdefs; @@ -1878,4 +1876,12 @@ class record_adapter implements RecordInterface, cache_cacheableInterface return $this->connection; } + + /** + * @return MediaSubdefRepository + */ + private function getMediaSubdefRepository() + { + return $this->app['provider.repo.media_subdef']->getRepositoryForDatabox($this->getDataboxId()); + } } From 72e53b5687ef85750afb6cb623b5e5843c71bd2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 7 Apr 2016 15:59:45 +0200 Subject: [PATCH 215/383] several fixups --- .../CachedMediaSubdefDataRepository.php | 2 +- .../Subdef/DbalMediaSubdefDataRepository.php | 22 +++++++++++++- lib/classes/media/subdef.php | 12 ++++---- lib/classes/record/adapter.php | 30 ++++++++----------- 4 files changed, 40 insertions(+), 26 deletions(-) diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php index bba3fe583d..ea0e88fb70 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php @@ -143,7 +143,7 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository foreach ($recordIds as $recordId) { foreach ($names as $name) { - $cacheKeys = [ + $cacheKeys[] = [ 'record_id' => $recordId, 'name' => $name, ]; diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php index 3f3a52dcb5..388ee4d248 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php @@ -47,7 +47,7 @@ class DbalMediaSubdefDataRepository implements MediaSubdefDataRepository $types['names'] = Connection::PARAM_STR_ARRAY; } - return $this->connection->fetchAll($sql, $params, $types); + return array_map([$this, 'sqlToPhp'], $this->connection->fetchAll($sql, $params, $types)); } /** @@ -198,4 +198,24 @@ SELECT subdef_id, record_id, name, path, file, width, height, mime, size, substi FROM subdef SQL; } + + private function sqlToPhp(array $data) + { + return [ + 'subdef_id' => (int)$data['subdef_id'], + 'record_id' => (int)$data['record_id'], + 'name' => $data['name'], + 'path' => $data['path'], + 'file' => $data['file'], + 'width' => (int)$data['width'], + 'height' => (int)$data['height'], + 'mime' => $data['mime'], + 'size' => (int)$data['size'], + 'is_substituted' => (bool)$data['substit'], + 'etag' => $data['etag'], + 'created_on' => $data['created_on'], + 'updated_on' => $data['updated_on'], + 'physically_present' => true, + ]; + } } diff --git a/lib/classes/media/subdef.php b/lib/classes/media/subdef.php index 9f4d9eedba..a9164fdfb5 100644 --- a/lib/classes/media/subdef.php +++ b/lib/classes/media/subdef.php @@ -204,15 +204,15 @@ SQL; } $this->mime = $data['mime']; - $this->width = $data['width']; - $this->height = $data['height']; - $this->size = $data['size']; + $this->width = (int)$data['width']; + $this->height = (int)$data['height']; + $this->size = (int)$data['size']; $this->etag = $data['etag']; $this->path = $data['path']; $this->file = $data['file']; - $this->is_physically_present = $data['physically_present']; - $this->is_substituted = $data['is_substituted']; - $this->subdef_id = $data['subdef_id']; + $this->is_physically_present = (bool)$data['physically_present']; + $this->is_substituted = (bool)$data['is_substituted']; + $this->subdef_id = $data['subdef_id'] === null ? null : (bool)$data['subdef_id']; $this->modification_date = isset($data['updated_on']) ? new DateTime($data['updated_on']) : null; $this->creation_date = isset($data['created_on']) ? new DateTime($data['created_on']) : null; $this->url = isset($data['url']) ? Url::factory((string)$data['url']) : $this->generateUrl(); diff --git a/lib/classes/record/adapter.php b/lib/classes/record/adapter.php index a1104accf8..0dbfcf2e7a 100644 --- a/lib/classes/record/adapter.php +++ b/lib/classes/record/adapter.php @@ -671,7 +671,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface } foreach (['preview', 'thumbnail'] as $name) { - if (!$this->subdefs[$name]) { + if (!isset($this->subdefs[$name])) { $this->subdefs[$name] = new media_subdef($this->app, $this, $name, true, []); } } @@ -1267,12 +1267,12 @@ class record_adapter implements RecordInterface, cache_cacheableInterface } $connection = $this->getDataboxConnection(); - $sql = 'DELETE FROM technical_datas WHERE record_id = :record_id'; - $stmt = $connection->prepare($sql); - $stmt->execute([':record_id' => $this->getRecordId()]); - $stmt->closeCursor(); + $connection->executeUpdate('DELETE FROM technical_datas WHERE record_id = :record_id', [ + ':record_id' => $this->getRecordId(), + ]); $sqlValues = []; + foreach ($document->readTechnicalDatas($mediavorus) as $name => $value) { if (is_null($value)) { continue; @@ -1283,21 +1283,15 @@ class record_adapter implements RecordInterface, cache_cacheableInterface $value = 0; } } - $sqlValues[] = join(',', array( - 'null', - $connection->quote($this->getRecordId()), - $connection->quote($name), - $connection->quote($value), - )); + $sqlValues[] = [$this->getRecordId(), $name, $value]; } - $sql = "INSERT INTO technical_datas (id, record_id, name, value)" - . " VALUES (" . join('),(', $sqlValues) . ")"; - ; - $stmt = $connection->prepare($sql); - $stmt->execute(); - - $stmt->closeCursor(); + if ($sqlValues) { + $connection->transactional(function (Connection $connection) use ($sqlValues) { + $statement = $connection->prepare('INSERT INTO technical_datas (record_id, name, value) VALUES (?, ?, ?)'); + array_walk($sqlValues, [$statement, 'execute']); + }); + } $this->delete_data_from_cache(self::CACHE_TECHNICAL_DATA); From 902b01df592cc3ad0e18f1639fa4660a0b37b7db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 7 Apr 2016 16:37:07 +0200 Subject: [PATCH 216/383] Rename method to be consistent accross library --- .../Subdef/DbalMediaSubdefDataRepository.php | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php index 388ee4d248..2538699093 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php @@ -133,13 +133,13 @@ class DbalMediaSubdefDataRepository implements MediaSubdefDataRepository $sql = <<<'SQL' INSERT INTO subdef (record_id, name, path, file, width, height, mime, size, substit, etag, created_on, updated_on, dispatched) -VALUES (:recordId, :name, :path, :file, :width, :height, :mime, :size, :substit, :etag, NOW(), NOW(), 1) +VALUES (:record_id, :name, :path, :file, :width, :height, :mime, :size, :substit, :etag, NOW(), NOW(), 1) SQL; $statement = $this->connection->prepare($sql); foreach ($toInsert as $index => $partition) { try { - $statement->execute($this->getParametersFromArray($partition)); + $statement->execute($this->phpToSql($partition)); } catch (DriverException $exception) { $updateNeeded[$index] = $partition; } @@ -148,26 +148,6 @@ SQL; return $updateNeeded; } - /** - * @param array $data - * @return array - */ - private function getParametersFromArray(array $data) - { - return [ - 'recordId' => $data['record_id'], - 'name' => $data['name'], - 'path' => $data['path'], - 'file' => $data['file'], - 'width' => $data['width'], - 'height' => $data['height'], - 'mime' => $data['mime'], - 'size' => $data['size'], - 'substit' => $data['substit'], - 'etag' => $data['etag'], - ]; - } - /** * @param array $toUpdate * @throws DBALException @@ -182,12 +162,12 @@ SQL; UPDATE subdef SET path = :path, file = :file, width = :width, height = :height, mime = :mime, size = :size, substit = :substit, etag = :etag, updated_on = NOW() -WHERE record_id = :recordId AND name = :name +WHERE record_id = :record_id AND name = :name SQL; $statement = $this->connection->prepare($sql); foreach ($toUpdate as $index => $partition) { - $statement->execute($this->getParametersFromArray($partition)); + $statement->execute($this->phpToSql($partition)); } } @@ -199,6 +179,26 @@ FROM subdef SQL; } + /** + * @param array $data + * @return array + */ + private function phpToSql(array $data) + { + return [ + 'record_id' => $data['record_id'], + 'name' => $data['name'], + 'path' => $data['path'], + 'file' => $data['file'], + 'width' => $data['width'], + 'height' => $data['height'], + 'mime' => $data['mime'], + 'size' => $data['size'], + 'substit' => $data['is_substituted'], + 'etag' => $data['etag'], + ]; + } + private function sqlToPhp(array $data) { return [ From 23580bbd6a6a075834bacf9db5055023d736a28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 7 Apr 2016 18:01:38 +0200 Subject: [PATCH 217/383] Add save capability to MediaSubdefRepository --- ...ultiGetPutAdapter.php => MultiAdapter.php} | 2 +- .../Provider/RepositoriesServiceProvider.php | 17 +++--- .../CachedMediaSubdefDataRepository.php | 13 ++--- .../Databox/Subdef/MediaSubdefRepository.php | 29 ++++++++++ lib/classes/media/subdef.php | 53 +++++++++++-------- lib/classes/record/adapter.php | 4 +- 6 files changed, 78 insertions(+), 40 deletions(-) rename lib/Alchemy/Phrasea/Cache/{MultiGetPutAdapter.php => MultiAdapter.php} (96%) diff --git a/lib/Alchemy/Phrasea/Cache/MultiGetPutAdapter.php b/lib/Alchemy/Phrasea/Cache/MultiAdapter.php similarity index 96% rename from lib/Alchemy/Phrasea/Cache/MultiGetPutAdapter.php rename to lib/Alchemy/Phrasea/Cache/MultiAdapter.php index 7c4cd9699e..e1aec58979 100644 --- a/lib/Alchemy/Phrasea/Cache/MultiGetPutAdapter.php +++ b/lib/Alchemy/Phrasea/Cache/MultiAdapter.php @@ -14,7 +14,7 @@ use Doctrine\Common\Cache\Cache; use Doctrine\Common\Cache\MultiGetCache; use Doctrine\Common\Cache\MultiPutCache; -class MultiGetPutAdapter implements Cache, MultiGetCache, MultiPutCache +class MultiAdapter implements Cache, MultiGetCache, MultiPutCache { /** * @var Cache diff --git a/lib/Alchemy/Phrasea/Core/Provider/RepositoriesServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/RepositoriesServiceProvider.php index dc2db210ed..69dc09e197 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/RepositoriesServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/RepositoriesServiceProvider.php @@ -202,16 +202,17 @@ class RepositoriesServiceProvider implements ServiceProviderInterface return new CollectionRepositoryRegistry($app, $repositoryFactory, $app['repo.collection-references']); }); + $app['provider.factory.media_subdef'] = $app->protect(function ($databoxId) use ($app) { + return function (array $data) use ($app, $databoxId) { + $recordReference = RecordReference::createFromDataboxIdAndRecordId($databoxId, $data['record_id']); + + return new \media_subdef($app, $recordReference, $data['name'], false, $data); + }; + }); + $app['provider.repo.media_subdef'] = $app->share(function (PhraseaApplication $app) { $connectionProvider = new DataboxConnectionProvider($app['phraseanet.appbox']); - - $factoryProvider = function ($databoxId) use ($app) { - return function (array $data) use ($app, $databoxId) { - $recordReference = RecordReference::createFromDataboxIdAndRecordId($databoxId, $data['record_id']); - - return new \media_subdef($app, $recordReference, $data['name'], false, $data); - }; - }; + $factoryProvider = $app['provider.factory.media_subdef']; $repositoryFactory = new MediaSubdefRepositoryFactory($connectionProvider, $app['cache'], $factoryProvider); diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php index ea0e88fb70..bd0a97b345 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php @@ -10,7 +10,7 @@ namespace Alchemy\Phrasea\Databox\Subdef; -use Alchemy\Phrasea\Cache\MultiGetPutAdapter; +use Alchemy\Phrasea\Cache\MultiAdapter; use Doctrine\Common\Cache\Cache; use Doctrine\Common\Cache\MultiGetCache; use Doctrine\Common\Cache\MultiPutCache; @@ -47,7 +47,7 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository $this->decorated = $decorated; $this->cache = $cache instanceof MultiGetCache && $cache instanceof MultiPutCache ? $cache - : new MultiGetPutAdapter($cache); + : new MultiAdapter($cache); $this->baseKey = $baseKey; } @@ -118,13 +118,10 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository { $this->decorated->save($data); - $toSave = []; + $keys = array_map([$this, 'getCacheKey'], $data); - foreach ($data as $item) { - $toSave[$this->getCacheKey($item)] = $item; - } - - $this->cache->saveMultiple($toSave, $this->lifeTime); + // all saved keys are now stalled. decorated repository could modify values on store (update time for example) + array_walk($keys, [$this->cache, 'delete']); } private function getCacheKey(array $data) diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php index b1c6f9836d..b694a02e55 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php @@ -42,6 +42,18 @@ class MediaSubdefRepository $this->hydrator = $hydrator ?: new MediaSubdefHydrator(); } + /** + * @param int $recordId + * @param string $name + * @return \media_subdef|null + */ + public function findOneByRecordIdAndName($recordId, $name) + { + $subdefs = $this->repository->findByRecordIdsAndNames([$recordId], [$name]); + + return $subdefs ? reset($this->hydrateAll($subdefs)) : null; + } + /** * @param int[] $recordIds * @param string[] $names @@ -58,6 +70,23 @@ class MediaSubdefRepository return $this->hydrateAll($data); } + /** + * @param \media_subdef|\media_subdef[] $subdefs + */ + public function save($subdefs) + { + if (!is_array($subdefs) || !$subdefs instanceof \Traversable) { + $subdefs = [$subdefs]; + } elseif ($subdefs instanceof \Traversable) { + $subdefs = iterator_to_array($subdefs); + } + Assertion::allIsInstanceOf($subdefs, \media_subdef::class); + + $data = array_map([$this->hydrator, 'extract'], $subdefs); + + $this->repository->save($data); + } + public function clear() { $this->idMap = []; diff --git a/lib/classes/media/subdef.php b/lib/classes/media/subdef.php index a9164fdfb5..824373b5d3 100644 --- a/lib/classes/media/subdef.php +++ b/lib/classes/media/subdef.php @@ -10,9 +10,11 @@ */ use Alchemy\Phrasea\Application; +use Alchemy\Phrasea\Databox\Subdef\MediaSubdefRepository; use Alchemy\Phrasea\Http\StaticFile\Symlink\SymLinker; use Alchemy\Phrasea\Model\RecordReferenceInterface; use Alchemy\Phrasea\Utilities\NullableDateTime; +use Assert\Assertion; use Guzzle\Http\Url; use MediaAlchemyst\Alchemyst; use MediaVorus\Media\MediaInterface; @@ -20,6 +22,16 @@ use MediaVorus\MediaVorus; class media_subdef extends media_abstract implements cache_cacheableInterface { + /** + * @param Application $app + * @param int $databoxId + * @return MediaSubdefRepository + */ + private static function getMediaSubdefRepository(Application $app, $databoxId) + { + return $app['provider.repo.media_subdef']->getRepositoryForDatabox($databoxId); + } + /** @var Application */ protected $app; @@ -672,36 +684,35 @@ SQL; $newname = $media->getFile()->getFilename(); $params = [ - ':record_id' => $record->getRecordId(), - ':name' => $name, - ':path' => $path, - ':file' => $newname, - ':width' => 0, - ':height' => 0, - ':mime' => $media->getFile()->getMimeType(), - ':size' => $media->getFile()->getSize(), - ':dispatched' => 1, + 'record_id' => $record->getRecordId(), + 'name' => $name, + 'path' => $path, + 'file' => $newname, + 'width' => 0, + 'height' => 0, + 'mime' => $media->getFile()->getMimeType(), + 'size' => $media->getFile()->getSize(), ]; if (method_exists($media, 'getWidth') && null !== $media->getWidth()) { - $params[':width'] = $media->getWidth(); + $params['width'] = $media->getWidth(); } if (method_exists($media, 'getHeight') && null !== $media->getHeight()) { - $params[':height'] = $media->getHeight(); + $params['height'] = $media->getHeight(); } - $sql = <<<'SQL' -INSERT INTO subdef (record_id, name, path, file, width, height, mime, size, dispatched, created_on, updated_on) -VALUES (:record_id, :name, :path, :file, :width, :height, :mime, :size, :dispatched, NOW(), NOW()) -ON DUPLICATE KEY UPDATE -path = VALUES(path), file = VALUES(file), width = VALUES(width) , height = VALUES(height), mime = VALUES(mime), -size = VALUES(size), dispatched = VALUES(dispatched), updated_on = NOW() -SQL; + $factoryProvider = $app['provider.factory.media_subdef']; + $factory = $factoryProvider($record->getDataboxId()); - $connection->executeUpdate($sql, $params); + $subdef = $factory($params); + Assertion::isInstanceOf($subdef, \media_subdef::class); - $subdef = new self($app, $record, $name); - $subdef->delete_data_from_cache(); + /** @var MediaSubdefRepository $repository */ + $repository = $app['provider.repo.media_subdef']->getRepositoryForDatabox($record->getDataboxId()); + $repository->save($subdef); + + // Refresh from Database. + $subdef = $repository->findOneByRecordIdAndName($record->getRecordId(), $name); $permalink = $subdef->get_permalink(); diff --git a/lib/classes/record/adapter.php b/lib/classes/record/adapter.php index 0dbfcf2e7a..8631b29c77 100644 --- a/lib/classes/record/adapter.php +++ b/lib/classes/record/adapter.php @@ -591,9 +591,9 @@ class record_adapter implements RecordInterface, cache_cacheableInterface throw new Exception_Media_SubdefNotFound(sprintf("subdef `%s` not found", $name)); } - $subdefs = $this->getMediaSubdefRepository()->findByRecordIdsAndNames([$this->getRecordId()], [$name]); + $subdefs = $this->getMediaSubdefRepository()->findOneByRecordIdsAndNames($this->getRecordId(), $name); - return $subdefs ? reset($subdefs) : new media_subdef($this->app, $this, $name, ($name !== 'document')); + return $subdefs ?: new media_subdef($this->app, $this, $name, ($name !== 'document')); } /** From ac2351bd19648f3ce8ca4b3efd7eded7573688b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 7 Apr 2016 22:52:57 +0200 Subject: [PATCH 218/383] fixup several issues --- .../CachedMediaSubdefDataRepository.php | 2 +- .../Subdef/DbalMediaSubdefDataRepository.php | 4 +- .../Databox/Subdef/MediaSubdefRepository.php | 8 +++- lib/classes/media/subdef.php | 41 +++++++++---------- lib/classes/record/adapter.php | 2 +- .../Phrasea/Application/OverviewTest.php | 18 ++++---- tests/classes/media/subdefTest.php | 7 ++-- 7 files changed, 45 insertions(+), 37 deletions(-) diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php index bd0a97b345..548b9fb373 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php @@ -126,7 +126,7 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository private function getCacheKey(array $data) { - return $this->baseKey . json_encode([$data['record_id'], $data['name']]); + return $this->baseKey . 'media_subdef=' . json_encode([$data['record_id'], $data['name']]); } /** diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php index 2538699093..4440c0543c 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php @@ -61,14 +61,14 @@ class DbalMediaSubdefDataRepository implements MediaSubdefDataRepository return 0; } - $statement = $this->connection->prepare('DELETE FROM subdef WHERE record_id = :recordId AND name = :name'); + $statement = $this->connection->prepare('DELETE FROM subdef WHERE record_id = :record_id AND name = :name'); $this->connection->beginTransaction(); try { $deleted = array_reduce($subdefIds, function ($carry, $data) use ($statement) { $carry += $statement->execute([ - 'recordId' => $data['record_id'], + 'record_id' => $data['record_id'], 'name' => $data['name'], ]); diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php index b694a02e55..8622b3aa52 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php @@ -51,7 +51,13 @@ class MediaSubdefRepository { $subdefs = $this->repository->findByRecordIdsAndNames([$recordId], [$name]); - return $subdefs ? reset($this->hydrateAll($subdefs)) : null; + if (!$subdefs) { + return null; + } + + $instances = $this->hydrateAll($subdefs); + + return reset($instances); } /** diff --git a/lib/classes/media/subdef.php b/lib/classes/media/subdef.php index 824373b5d3..f9eecd1888 100644 --- a/lib/classes/media/subdef.php +++ b/lib/classes/media/subdef.php @@ -129,7 +129,7 @@ class media_subdef extends media_abstract implements cache_cacheableInterface $this->name = $name; $this->record = $record instanceof record_adapter ? $record - : $app->findDataboxById($record->getDataboxId())->get_record($record->getId()); + : $app->findDataboxById($record->getDataboxId())->get_record($record->getRecordId()); if (null !== $data) { $this->loadFromArray($data); @@ -165,8 +165,8 @@ WHERE name = :name AND record_id = :record_id SQL; $row = $this->getDataboxConnection()->fetchAssoc($sql, [ - ':record_id' => $this->record->getRecordId(), - ':name' => $this->name + 'record_id' => $this->record->getRecordId(), + 'name' => $this->name ]); if ($row) { @@ -203,7 +203,6 @@ SQL; 'width' => 0, 'height' => 0, 'size' => 0, - 'etag' => null, 'path' => '', 'file' => '', 'physically_present' => false, @@ -219,12 +218,12 @@ SQL; $this->width = (int)$data['width']; $this->height = (int)$data['height']; $this->size = (int)$data['size']; - $this->etag = $data['etag']; - $this->path = $data['path']; + $this->etag = isset($data['etag']) ? $data['etag'] : null; + $this->path = p4string::addEndSlash($data['path']); $this->file = $data['file']; $this->is_physically_present = (bool)$data['physically_present']; $this->is_substituted = (bool)$data['is_substituted']; - $this->subdef_id = $data['subdef_id'] === null ? null : (bool)$data['subdef_id']; + $this->subdef_id = isset($data['subdef_id']) || array_key_exists('subdef_id', $data) ? (int)$data['subdef_id'] : null; $this->modification_date = isset($data['updated_on']) ? new DateTime($data['updated_on']) : null; $this->creation_date = isset($data['created_on']) ? new DateTime($data['created_on']) : null; $this->url = isset($data['url']) ? Url::factory((string)$data['url']) : $this->generateUrl(); @@ -237,6 +236,8 @@ SQL; private function toArray() { return [ + 'record_id' => $this->get_record_id(), + 'name' => $this->get_name(), 'width' => $this->width, 'size' => $this->size, 'height' => $this->height, @@ -675,23 +676,22 @@ SQL; return $datas; } - public static function create(Application $app, \record_adapter $record, $name, MediaInterface $media) + public static function create(Application $app, RecordReferenceInterface $record, $name, MediaInterface $media) { - $databox = $record->getDatabox(); - $connection = $databox->get_connection(); - $path = $media->getFile()->getPath(); $newname = $media->getFile()->getFilename(); $params = [ - 'record_id' => $record->getRecordId(), - 'name' => $name, - 'path' => $path, - 'file' => $newname, - 'width' => 0, - 'height' => 0, - 'mime' => $media->getFile()->getMimeType(), - 'size' => $media->getFile()->getSize(), + 'record_id' => $record->getRecordId(), + 'name' => $name, + 'path' => $path, + 'file' => $newname, + 'width' => 0, + 'height' => 0, + 'mime' => $media->getFile()->getMimeType(), + 'size' => $media->getFile()->getSize(), + 'physically_present' => true, + 'is_substituted' => false, ]; if (method_exists($media, 'getWidth') && null !== $media->getWidth()) { @@ -707,8 +707,7 @@ SQL; $subdef = $factory($params); Assertion::isInstanceOf($subdef, \media_subdef::class); - /** @var MediaSubdefRepository $repository */ - $repository = $app['provider.repo.media_subdef']->getRepositoryForDatabox($record->getDataboxId()); + $repository = self::getMediaSubdefRepository($app, $record->getDataboxId()); $repository->save($subdef); // Refresh from Database. diff --git a/lib/classes/record/adapter.php b/lib/classes/record/adapter.php index 8631b29c77..fc1d435d14 100644 --- a/lib/classes/record/adapter.php +++ b/lib/classes/record/adapter.php @@ -591,7 +591,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface throw new Exception_Media_SubdefNotFound(sprintf("subdef `%s` not found", $name)); } - $subdefs = $this->getMediaSubdefRepository()->findOneByRecordIdsAndNames($this->getRecordId(), $name); + $subdefs = $this->getMediaSubdefRepository()->findOneByRecordIdAndName($this->getRecordId(), $name); return $subdefs ?: new media_subdef($this->app, $this, $name, ($name !== 'document')); } diff --git a/tests/Alchemy/Tests/Phrasea/Application/OverviewTest.php b/tests/Alchemy/Tests/Phrasea/Application/OverviewTest.php index 749dce7a5d..5e2d3ca11a 100644 --- a/tests/Alchemy/Tests/Phrasea/Application/OverviewTest.php +++ b/tests/Alchemy/Tests/Phrasea/Application/OverviewTest.php @@ -34,21 +34,23 @@ class OverviewTest extends \PhraseanetAuthenticatedWebTestCase ->method('get') ->will($this->returnValue($acl)); - self::$DI['app']['acl'] = $aclProvider; + $app = $this->getApplication(); + $app['acl'] = $aclProvider; - $path = self::$DI['app']['url_generator']->generate('datafile', [ - 'sbas_id' => self::$DI['record_1']->get_sbas_id(), - 'record_id' => self::$DI['record_1']->get_record_id(), + $record1 = $this->getRecord1(); + + $path = $app['url_generator']->generate('datafile', [ + 'sbas_id' => $record1->getDataboxId(), + 'record_id' => $record1->getRecordId(), 'subdef' => $subdef, ]); - self::$DI['client']->request('GET', $path); - $response = self::$DI['client']->getResponse(); + $response = $this->request('GET', $path); $this->assertEquals(200, $response->getStatusCode()); $this->assertEquals('inline', explode(';', $response->headers->get('content-disposition'))[0]); - $this->assertEquals(self::$DI['record_1']->get_preview()->get_mime(), $response->headers->get('content-type')); - $this->assertEquals(self::$DI['record_1']->get_preview()->get_size(), $response->headers->get('content-length')); + $this->assertEquals($record1->get_preview()->get_mime(), $response->headers->get('content-type')); + $this->assertEquals($record1->get_preview()->get_size(), $response->headers->get('content-length')); } public function testDatafilesNonExistentSubdef() diff --git a/tests/classes/media/subdefTest.php b/tests/classes/media/subdefTest.php index 14f8262025..d8948a7730 100644 --- a/tests/classes/media/subdefTest.php +++ b/tests/classes/media/subdefTest.php @@ -28,10 +28,11 @@ class media_subdefTest extends \PhraseanetTestCase parent::setUp(); if (null === self::$recordonbleu) { - $file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . "/../../files/iphone_pic.jpg"), self::$DI['collection']); + $app = $this->getApplication(); + $file = new File($app, $app['mediavorus']->guess(__DIR__ . "/../../files/iphone_pic.jpg"), self::$DI['collection']); - self::$recordonbleu = record_adapter::createFromFile($file, self::$DI['app']); - self::$DI['app']['subdef.generator']->generateSubdefs(self::$recordonbleu); + self::$recordonbleu = record_adapter::createFromFile($file, $app); + $app['subdef.generator']->generateSubdefs(self::$recordonbleu); foreach (self::$recordonbleu->get_subdefs() as $subdef) { if ($subdef->get_name() == 'document') { From 1f206690f7ebb8bdc97c9837b555d4c104e30e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 7 Apr 2016 23:13:29 +0200 Subject: [PATCH 219/383] Fix Namespace mismatch and PHP7 call --- lib/Alchemy/Phrasea/Cache/MultiAdapter.php | 10 +++++----- .../Subdef/CachedMediaSubdefDataRepository.php | 7 ++++++- .../Phrasea/Databox/Subdef/MediaSubdefHydrator.php | 12 ++++++------ 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/Alchemy/Phrasea/Cache/MultiAdapter.php b/lib/Alchemy/Phrasea/Cache/MultiAdapter.php index e1aec58979..820171a9f9 100644 --- a/lib/Alchemy/Phrasea/Cache/MultiAdapter.php +++ b/lib/Alchemy/Phrasea/Cache/MultiAdapter.php @@ -10,18 +10,18 @@ namespace Alchemy\Phrasea\Cache; -use Doctrine\Common\Cache\Cache; +use Doctrine\Common\Cache\Cache as DoctrineCache; use Doctrine\Common\Cache\MultiGetCache; use Doctrine\Common\Cache\MultiPutCache; -class MultiAdapter implements Cache, MultiGetCache, MultiPutCache +class MultiAdapter implements DoctrineCache, MultiGetCache, MultiPutCache { /** - * @var Cache + * @var DoctrineCache */ private $cache; - public function __construct(Cache $cache) + public function __construct(DoctrineCache $cache) { $this->cache = $cache; } @@ -73,7 +73,7 @@ class MultiAdapter implements Cache, MultiGetCache, MultiPutCache public function saveMultiple(array $keysAndValues, $lifetime = 0) { if ($this->cache instanceof MultiPutCache) { - $this->cache->saveMultiple($keysAndValues, $lifetime); + return $this->cache->saveMultiple($keysAndValues, $lifetime); } foreach ($keysAndValues as $key => $value) { diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php index 548b9fb373..66a84a86ed 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php @@ -67,6 +67,11 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository $this->lifeTime = (int)$lifeTime; } + /** + * @param int[] $recordIds + * @param string[]|null $names + * @return array + */ public function findByRecordIdsAndNames(array $recordIds, array $names = null) { // Can not cache when names are not known @@ -132,7 +137,7 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository /** * @param int[] $recordIds * @param string[] $names - * @return array[] + * @return string[] */ private function generateCacheKeys(array $recordIds, array $names) { diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefHydrator.php b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefHydrator.php index ac8919822c..085e3ea102 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefHydrator.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefHydrator.php @@ -24,11 +24,11 @@ class MediaSubdefHydrator implements Hydrator { Assertion::isInstanceOf($instance, \media_subdef::class); - $closure = function (array $data) { + $closure = \Closure::bind(function (array $data) { $this->loadFromArray($data); - }; + }, $instance, \media_subdef::class); - $closure->call($instance, $data); + $closure($data); } /** @@ -40,10 +40,10 @@ class MediaSubdefHydrator implements Hydrator { Assertion::isInstanceOf($instance, \media_subdef::class); - $closure = function () { + $closure = \Closure::bind(function () { return $this->toArray(); - }; + }, $instance, \media_subdef::class); - return $closure->call($instance); + return $closure(); } } From 4504cb4108040881e5a7414709deff1bc0f21d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 7 Apr 2016 23:47:25 +0200 Subject: [PATCH 220/383] Reduce complexity of media_subdef::loadFromArray() --- lib/classes/media/subdef.php | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/lib/classes/media/subdef.php b/lib/classes/media/subdef.php index f9eecd1888..384e418a37 100644 --- a/lib/classes/media/subdef.php +++ b/lib/classes/media/subdef.php @@ -214,21 +214,29 @@ SQL; ]; } + $normalizer = function ($field, callable $then, callable $else = null) use ($data) { + if (isset($data[$field]) || array_key_exists($field, $data)) { + return $then($data[$field]); + } + + return $else ? $else() : null; + }; + $this->mime = $data['mime']; $this->width = (int)$data['width']; $this->height = (int)$data['height']; $this->size = (int)$data['size']; - $this->etag = isset($data['etag']) ? $data['etag'] : null; + $this->etag = $normalizer('etag', 'strval'); $this->path = p4string::addEndSlash($data['path']); $this->file = $data['file']; $this->is_physically_present = (bool)$data['physically_present']; $this->is_substituted = (bool)$data['is_substituted']; - $this->subdef_id = isset($data['subdef_id']) || array_key_exists('subdef_id', $data) ? (int)$data['subdef_id'] : null; - $this->modification_date = isset($data['updated_on']) ? new DateTime($data['updated_on']) : null; - $this->creation_date = isset($data['created_on']) ? new DateTime($data['created_on']) : null; - $this->url = isset($data['url']) ? Url::factory((string)$data['url']) : $this->generateUrl(); + $this->subdef_id = $normalizer('subdef_id', 'intval'); + $this->modification_date = $normalizer('updated_on', 'date_create'); + $this->creation_date = $normalizer('created_on', 'date_create'); + $this->url = $normalizer('url', [Url::class, 'factory'], [$this, 'generateUrl']); - if ($this->is_physically_present && !file_exists($this->getRealPath())) { + if (!$this->isStillAccessible()) { $this->markPhysicallyUnavailable(); } } @@ -821,4 +829,12 @@ SQL; { return $this->record->getDatabox()->get_connection(); } + + /** + * @return bool + */ + private function isStillAccessible() + { + return $this->is_physically_present && file_exists($this->getRealPath()); + } } From 46154895236a9310336752a8f79c1db28262054e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 7 Apr 2016 23:54:32 +0200 Subject: [PATCH 221/383] fixup edge case in subdefTest --- tests/classes/media/subdefTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/classes/media/subdefTest.php b/tests/classes/media/subdefTest.php index d8948a7730..f097da6a7b 100644 --- a/tests/classes/media/subdefTest.php +++ b/tests/classes/media/subdefTest.php @@ -35,7 +35,7 @@ class media_subdefTest extends \PhraseanetTestCase $app['subdef.generator']->generateSubdefs(self::$recordonbleu); foreach (self::$recordonbleu->get_subdefs() as $subdef) { - if ($subdef->get_name() == 'document') { + if (!in_array($subdef->get_name(), ['thumbnail', 'preview'], true)) { continue; } From c4d7ec209344d6463c059868055088dc16de89d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Fri, 8 Apr 2016 11:37:46 +0200 Subject: [PATCH 222/383] Try improve Scrutinizer results --- lib/Alchemy/Phrasea/Cache/MultiAdapter.php | 7 +- .../CachedMediaSubdefDataRepository.php | 47 +++++---- .../Subdef/DbalMediaSubdefDataRepository.php | 95 +++++++++++++++---- lib/classes/media/subdef.php | 50 ++++++++-- 4 files changed, 151 insertions(+), 48 deletions(-) diff --git a/lib/Alchemy/Phrasea/Cache/MultiAdapter.php b/lib/Alchemy/Phrasea/Cache/MultiAdapter.php index 820171a9f9..56e0e55692 100644 --- a/lib/Alchemy/Phrasea/Cache/MultiAdapter.php +++ b/lib/Alchemy/Phrasea/Cache/MultiAdapter.php @@ -57,15 +57,14 @@ class MultiAdapter implements DoctrineCache, MultiGetCache, MultiPutCache return $this->cache->fetchMultiple($keys); } - $data = []; - - foreach ($keys as $key) { + // Pass data by reference to avoid copies of whole array on key add. + $data = array_reduce($keys, function (array &$data, $key) { $value = $this->fetch($key); if (false !== $value || true === $this->contains($key)) { $data[$key] = $value; } - } + }, []); return $data; } diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php index 66a84a86ed..e172e2de7d 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php @@ -74,9 +74,9 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository */ public function findByRecordIdsAndNames(array $recordIds, array $names = null) { - // Can not cache when names are not known - if (null !== $names) { - $keys = $this->generateCacheKeys($recordIds, $names); + $keys = $this->generateCacheKeys($recordIds, $names); + + if ($keys) { $data = $this->cache->fetchMultiple($keys); if (count($keys) === count($data)) { @@ -84,17 +84,7 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository } } - $retrieved = $this->decorated->findByRecordIdsAndNames($recordIds, $names); - - $data = isset($keys) ? array_fill_keys($keys, null) : []; - - foreach ($retrieved as $item) { - $data[$this->getCacheKey($item)] = $item; - } - - $this->cache->saveMultiple($data, $this->lifeTime); - - return $this->filterNonNull($data); + return $this->fetchAndSave($recordIds, $names, $keys); } /** @@ -136,11 +126,15 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository /** * @param int[] $recordIds - * @param string[] $names + * @param string[]|null $names * @return string[] */ - private function generateCacheKeys(array $recordIds, array $names) + private function generateCacheKeys(array $recordIds, array $names = null) { + if (null === $names) { + return []; + } + $cacheKeys = []; foreach ($recordIds as $recordId) { @@ -154,4 +148,25 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository return array_map([$this, 'getCacheKey'], $cacheKeys); } + + /** + * @param array $recordIds + * @param array|null $names + * @param array $keys Known keys supposed to be fetched + * @return array + */ + private function fetchAndSave(array $recordIds, array $names = null, array $keys = []) + { + $retrieved = $this->decorated->findByRecordIdsAndNames($recordIds, $names); + + $data = array_fill_keys($keys, null); + + foreach ($retrieved as $item) { + $data[$this->getCacheKey($item)] = $item; + } + + $this->cache->saveMultiple($data, $this->lifeTime); + + return $this->filterNonNull($data); + } } diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php index 4440c0543c..baf8f9c519 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/DbalMediaSubdefDataRepository.php @@ -129,19 +129,15 @@ class DbalMediaSubdefDataRepository implements MediaSubdefDataRepository return []; } + $statement = $this->connection->prepare($this->getInsertSql()); + $updateNeeded = []; - $sql = <<<'SQL' -INSERT INTO subdef (record_id, name, path, file, width, height, mime, size, substit, etag, created_on, updated_on, dispatched) -VALUES (:record_id, :name, :path, :file, :width, :height, :mime, :size, :substit, :etag, NOW(), NOW(), 1) -SQL; - $statement = $this->connection->prepare($sql); - - foreach ($toInsert as $index => $partition) { + foreach ($toInsert as $index => $data) { try { - $statement->execute($this->phpToSql($partition)); + $statement->execute($this->phpToSql($data)); } catch (DriverException $exception) { - $updateNeeded[$index] = $partition; + $updateNeeded[$index] = $data; } } @@ -158,16 +154,10 @@ SQL; return; } - $sql = <<<'SQL' -UPDATE subdef -SET path = :path, file = :file, width = :width, height = :height, mime = :mime, - size = :size, substit = :substit, etag = :etag, updated_on = NOW() -WHERE record_id = :record_id AND name = :name -SQL; - $statement = $this->connection->prepare($sql); + $statement = $this->connection->prepare($this->getUpdateSql()); - foreach ($toUpdate as $index => $partition) { - $statement->execute($this->phpToSql($partition)); + foreach ($toUpdate as $data) { + $statement->execute($this->phpToSql($data)); } } @@ -218,4 +208,73 @@ SQL; 'physically_present' => true, ]; } + + /** + * @return string + */ + private function getInsertSql() + { + static $sql; + + if (null !== $sql) { + return $sql; + } + + $values = [ + 'record_id' => ':record_id', + 'name' => ':name', + 'path' => ':path', + 'file' => ':file', + 'width' => ':width', + 'height' => ':height', + 'mime' => ':mime', + 'size' => ':size', + 'substit' => ':substit', + 'etag' => ':etag', + 'created_on' => 'NOW()', + 'updated_on' => 'NOW()', + 'dispatched' => '1', + ]; + + $sql = sprintf( + 'INSERT INTO subdef (%s) VALUES (%s)', + implode(', ', array_keys($values)), + implode(', ', array_values($values)) + ); + + return $sql; + } + + /** + * @return string + */ + private function getUpdateSql() + { + static $sql; + + if (null !== $sql) { + return $sql; + } + + $values = [ + 'path = :path', + 'file = :file', + 'width = :width', + 'height = :height', + 'mime = :mime', + 'size = :size', + 'substit = :substit', + 'etag = :etag', + 'updated_on = NOW()', + ]; + + $where = [ + 'record_id = :record_id', + 'name = :name', + ]; + + $sql = sprintf('UPDATE subdef SET %s WHERE %s', implode(', ', $values), implode(' AND ', $where)); + + return $sql; + } } diff --git a/lib/classes/media/subdef.php b/lib/classes/media/subdef.php index 384e418a37..a2fb9d1349 100644 --- a/lib/classes/media/subdef.php +++ b/lib/classes/media/subdef.php @@ -747,17 +747,15 @@ SQL; return $this->url; } - // serve thumbnails using static file service - if ($this->get_name() === 'thumbnail') { - if (null !== $url = $this->app['phraseanet.static-file']->getUrl($this->getRealPath())) { - $url->getQuery()->offsetSet('etag', $this->getEtag()); + $generators = [ + [$this , 'tryGetThumbnailUrl'], + [$this , 'tryGetVideoUrl'], + ]; - return $url; - } - } - - if ($this->app['phraseanet.h264-factory']->isH264Enabled() && in_array($this->mime, ['video/mp4'], false)) { - if (null !== $url = $this->app['phraseanet.h264']->getUrl($this->getRealPath())) { + foreach ($generators as $generator) { + $url = $generator(); + + if ($url instanceof Url) { return $url; } } @@ -837,4 +835,36 @@ SQL; { return $this->is_physically_present && file_exists($this->getRealPath()); } + + /** + * @return Url|null + */ + protected function tryGetThumbnailUrl() + { + if ('thumbnail' !== $this->get_name()) { + return null; + } + + $url = $this->app['phraseanet.static-file']->getUrl($this->getRealPath()); + + if (null === $url) { + return null; + } + + $url->getQuery()->offsetSet('etag', $this->getEtag()); + + return $url; + } + + /** + * @return Url|null + */ + protected function tryGetVideoUrl() + { + if ($this->mime !== 'video/mp4' || !$this->app['phraseanet.h264-factory']->isH264Enabled()) { + return null; + } + + return $this->app['phraseanet.h264']->getUrl($this->getRealPath()); + } } From 461538089402625df18c7a6c4ffd7a6355470b4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Fri, 8 Apr 2016 12:04:02 +0200 Subject: [PATCH 223/383] PHPCS detected by Scrutinizer --- .../Databox/Subdef/CachedMediaSubdefDataRepository.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php index e172e2de7d..e630f502d9 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php @@ -150,9 +150,9 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository } /** - * @param array $recordIds - * @param array|null $names - * @param array $keys Known keys supposed to be fetched + * @param int[] $recordIds + * @param string[]|null $names + * @param string[] $keys Known keys supposed to be fetched * @return array */ private function fetchAndSave(array $recordIds, array $names = null, array $keys = []) From e33781b62c2c17dae42456ffc2ca4d892a7d83d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Fri, 8 Apr 2016 19:12:43 +0200 Subject: [PATCH 224/383] Refactor media_Permalink_Adapter to be able to fetch more than one at a time --- lib/Alchemy/Phrasea/Application.php | 2 + .../Provider/RepositoriesServiceProvider.php | 22 +- .../Databox/Subdef/MediaSubdefService.php | 120 ++++++ .../Subdef/MediaSubdefServiceProvider.php | 49 +++ .../Order/Controller/ApiOrderController.php | 69 +++- .../Order/Controller/BaseOrderController.php | 8 +- lib/Alchemy/Phrasea/Order/OrderValidator.php | 2 +- .../Record/RecordReferenceCollection.php | 56 ++- lib/classes/media/Permalink/Adapter.php | 383 +++++++++++++----- 9 files changed, 575 insertions(+), 136 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php create mode 100644 lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefServiceProvider.php diff --git a/lib/Alchemy/Phrasea/Application.php b/lib/Alchemy/Phrasea/Application.php index 1df82b6b60..2214926e63 100644 --- a/lib/Alchemy/Phrasea/Application.php +++ b/lib/Alchemy/Phrasea/Application.php @@ -73,6 +73,7 @@ use Alchemy\Phrasea\Core\Provider\UnicodeServiceProvider; use Alchemy\Phrasea\Core\Provider\WebhookServiceProvider; use Alchemy\Phrasea\Core\Provider\ZippyServiceProvider; use Alchemy\Phrasea\Core\Provider\WebProfilerServiceProvider as PhraseaWebProfilerServiceProvider; +use Alchemy\Phrasea\Databox\Subdef\MediaSubdefServiceProvider; use Alchemy\Phrasea\Exception\InvalidArgumentException; use Alchemy\Phrasea\Filesystem\FilesystemServiceProvider; use Alchemy\Phrasea\Filesystem\ApplicationPathServiceGenerator; @@ -192,6 +193,7 @@ class Application extends SilexApplication $this->register(new RepositoriesServiceProvider()); $this->register(new ManipulatorServiceProvider()); $this->register(new TechnicalDataServiceProvider()); + $this->register(new MediaSubdefServiceProvider()); $this->register(new InstallerServiceProvider()); $this->register(new PhraseaVersionServiceProvider()); diff --git a/lib/Alchemy/Phrasea/Core/Provider/RepositoriesServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/RepositoriesServiceProvider.php index 69dc09e197..be6bae51d3 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/RepositoriesServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/RepositoriesServiceProvider.php @@ -1,5 +1,5 @@ protect(function ($databoxId) use ($app) { - return function (array $data) use ($app, $databoxId) { - $recordReference = RecordReference::createFromDataboxIdAndRecordId($databoxId, $data['record_id']); - - return new \media_subdef($app, $recordReference, $data['name'], false, $data); - }; - }); - - $app['provider.repo.media_subdef'] = $app->share(function (PhraseaApplication $app) { - $connectionProvider = new DataboxConnectionProvider($app['phraseanet.appbox']); - $factoryProvider = $app['provider.factory.media_subdef']; - - $repositoryFactory = new MediaSubdefRepositoryFactory($connectionProvider, $app['cache'], $factoryProvider); - - return new DataboxBoundRepositoryProvider($repositoryFactory); - }); } public function boot(Application $app) diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php new file mode 100644 index 0000000000..6315e42568 --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php @@ -0,0 +1,120 @@ +repositoryProvider = $repositoryProvider; + } + + /** + * Returns all available subdefs grouped by each record reference and by its name + * + * @param RecordReferenceInterface[]|RecordReferenceCollection $records + * @return \media_subdef[][] + */ + public function findSubdefsByRecordReferenceFromCollection($records) + { + $subdefs = $this->reduceRecordReferenceCollection( + $records, + function (array &$carry, array $subdefs, array $indexes) { + /** @var \media_subdef $subdef */ + foreach ($subdefs as $subdef) { + $index = $indexes[$subdef->get_record_id()]; + + $carry[$index][$subdef->get_name()] = $subdef; + } + }, + array_fill_keys(array_keys(iterator_to_array($records)), []) + ); + + ksort($subdefs); + + return $subdefs; + } + + /** + * @param RecordReferenceInterface[]|RecordReferenceCollection $records + * @return \media_subdef[] + */ + public function findSubdefsFromRecordReferenceCollection($records) + { + $groups = $this->reduceRecordReferenceCollection( + $records, + function (array &$carry, array $subdefs) { + $carry[] = $subdefs; + + return $carry; + }, + [] + ); + + if ($groups) { + return call_user_func_array('array_merge', $groups); + } + + return []; + } + + /** + * @param RecordReferenceInterface[]|RecordReferenceCollection $records + * @param callable $process + * @param mixed $initialValue + * @return mixed + */ + private function reduceRecordReferenceCollection($records, callable $process, $initialValue) + { + $records = $this->normalizeRecordCollection($records); + + $carry = $initialValue; + + foreach ($records->groupPerDataboxId() as $databoxId => $indexes) { + $subdefs = $this->getRepositoryForDatabox($databoxId)->findByRecordIdsAndNames(array_keys($indexes)); + + $carry = $process($carry, $subdefs, $indexes); + } + + return $carry; + } + + /** + * @param int $databoxId + * @return MediaSubdefRepository + */ + private function getRepositoryForDatabox($databoxId) + { + return $this->repositoryProvider->getRepositoryForDatabox($databoxId); + } + + /** + * @param RecordReferenceInterface[]|RecordReferenceCollection $records + * @return RecordReferenceCollection + */ + private function normalizeRecordCollection($records) + { + if ($records instanceof RecordReferenceCollection) { + return $records; + } + + return new RecordReferenceCollection($records); + } +} diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefServiceProvider.php b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefServiceProvider.php new file mode 100644 index 0000000000..a9ae274166 --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefServiceProvider.php @@ -0,0 +1,49 @@ +protect(function ($databoxId) use ($app) { + return function (array $data) use ($app, $databoxId) { + $recordReference = RecordReference::createFromDataboxIdAndRecordId($databoxId, $data['record_id']); + + return new \media_subdef($app, $recordReference, $data['name'], false, $data); + }; + }); + + $app['provider.repo.media_subdef'] = $app->share(function (Application $app) { + $connectionProvider = new DataboxConnectionProvider($app['phraseanet.appbox']); + $factoryProvider = $app['provider.factory.media_subdef']; + + $repositoryFactory = new MediaSubdefRepositoryFactory($connectionProvider, $app['cache'], $factoryProvider); + + return new DataboxBoundRepositoryProvider($repositoryFactory); + }); + + $app['service.media_subdef'] = $app->share(function (Application $app) { + return new MediaSubdefService($app['provider.repo.media_subdef']); + }); + } + + public function boot(Application $app) + { + // no-op + } +} diff --git a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php index f11b3f2202..9e66818822 100644 --- a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php +++ b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php @@ -17,10 +17,13 @@ use Alchemy\Phrasea\Core\Event\OrderEvent; use Alchemy\Phrasea\Core\PhraseaEvents; use Alchemy\Phrasea\Model\Entities\BasketElement; use Alchemy\Phrasea\Model\Entities\Order; +use Alchemy\Phrasea\Model\Entities\OrderElement; use Alchemy\Phrasea\Order\OrderElementTransformer; use Alchemy\Phrasea\Order\OrderFiller; use Alchemy\Phrasea\Order\OrderTransformer; +use Alchemy\Phrasea\Record\RecordReference; use Alchemy\Phrasea\Record\RecordReferenceCollection; +use Assert\Assertion; use Doctrine\Common\Collections\ArrayCollection; use League\Fractal\Manager; use League\Fractal\Pagination\PagerfantaPaginatorAdapter; @@ -89,7 +92,13 @@ class ApiOrderController extends BaseOrderController ; } - $resource = new Collection($builder->getQuery()->getResult(), $this->getOrderTransformer()); + $collection = $builder->getQuery()->getResult(); + + if (in_array('elements.resource_links', $fractal->getRequestedIncludes(), false)) { + $this->fetchResourceLinksData($collection); + } + + $resource = new Collection($collection, $this->getOrderTransformer()); $pager = new Pagerfanta(new DoctrineORMAdapter($builder, false)); $pager->setCurrentPage($page); @@ -235,4 +244,62 @@ class ApiOrderController extends BaseOrderController return $elementIds; } + + /** + * @param Order[] $orders + */ + private function fetchResourceLinksData(array $orders) + { + $elements = $this->gatherElements($orders); + + $baseIds = array_keys(array_reduce($elements, function (array &$baseIds, OrderElement $element) { + $baseIds[$element->getBaseId()] = true; + }, [])); + + $collectionToDataboxMap = []; + + foreach ($this->app['repo.collection-references']->findMany($baseIds) as $collectionReference) { + $collectionToDataboxMap[$collectionReference->getBaseId()] = $collectionReference->getDataboxId(); + } + + $records = RecordReferenceCollection::fromListExtractor( + $elements, + function (OrderElement $element) use ($collectionToDataboxMap) { + return isset($collectionToDataboxMap[$element->getBaseId()]) + ? [$collectionToDataboxMap[$element->getBaseId()], $element->getRecordId()] + : null; + }, + function (array $data) { + list ($databoxId, $recordId) = $data; + + return RecordReference::createFromDataboxIdAndRecordId($databoxId, $recordId); + } + ); + + // Load all records + $records->toRecords($this->getApplicationBox()); + + // Load all subdefs + $subdefs = $this->app['service.media_subdef']->findSubdefsFromRecordReferenceCollection($records); + \media_Permalink_Adapter::getMany($this->app, $subdefs); + } + + /** + * @param Order[] $orders + * @return OrderElement[] + */ + private function gatherElements(array $orders) + { + Assertion::allIsInstanceOf($orders, Order::class); + + $elements = []; + + foreach ($orders as $order) { + foreach ($order->getElements() as $element) { + $elements[] = $element; + } + } + + return $elements; + } } diff --git a/lib/Alchemy/Phrasea/Order/Controller/BaseOrderController.php b/lib/Alchemy/Phrasea/Order/Controller/BaseOrderController.php index eaee31a899..14f10cb5da 100644 --- a/lib/Alchemy/Phrasea/Order/Controller/BaseOrderController.php +++ b/lib/Alchemy/Phrasea/Order/Controller/BaseOrderController.php @@ -189,10 +189,12 @@ class BaseOrderController extends Controller $references = new RecordReferenceCollection(); - foreach ($elements as $element) { - $reference = RecordReference::createFromDataboxIdAndRecordId($element->getSbasId(), $element->getRecordId()); + $basket->getElements()->forAll(function (BasketElement $element) use ($references) { + $references->addRecordReference($element->getSbasId(), $element->getRecordId()); + }); - $references->addRecordReference($reference); + foreach ($elements as $element) { + $references->addRecordReference($element->getSbasId(), $element->getRecordId()); } $groups = $references->groupPerDataboxId(); diff --git a/lib/Alchemy/Phrasea/Order/OrderValidator.php b/lib/Alchemy/Phrasea/Order/OrderValidator.php index d0e919040f..55339c2697 100644 --- a/lib/Alchemy/Phrasea/Order/OrderValidator.php +++ b/lib/Alchemy/Phrasea/Order/OrderValidator.php @@ -137,7 +137,7 @@ class OrderValidator throw new \RuntimeException('At least one collection was not found.'); } - $references->addRecordReference(RecordReference::createFromDataboxIdAndRecordId( + $references->add(RecordReference::createFromDataboxIdAndRecordId( $databoxIdMap[$orderElement->getBaseId()], $orderElement->getRecordId() )); diff --git a/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php b/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php index 001c4fe93b..69497f16b7 100644 --- a/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php +++ b/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php @@ -25,11 +25,48 @@ class RecordReferenceCollection implements \IteratorAggregate $references = []; - foreach ($records as $index => $record) { + foreach ($records as $record) { if (isset($record['id'])) { - $references[$index] = RecordReference::createFromRecordReference($record['id']); + $references[] = RecordReference::createFromRecordReference($record['id']); } elseif (isset($record['databox_id'], $record['record_id'])) { - $references[$index] = RecordReference::createFromDataboxIdAndRecordId($record['databox_id'], $record['record_id']); + $references[] = RecordReference::createFromDataboxIdAndRecordId($record['databox_id'], $record['record_id']); + } + } + + return new self($references); + } + + /** + * Append all RecordReferences extracted via call to extractor on each element + * + * @param array|\Traversable $list List of elements to process + * @param callable $extractor Extracts data from each element or return null if unavailable + * @param callable $creator Creates Reference from extracted data. no-op when null + * @return RecordReferenceCollection + */ + public static function fromListExtractor($list, callable $extractor, callable $creator = null) + { + Assertion::isTraversable($list); + + $references = []; + + if (null === $creator) { + $creator = function ($data) { + return $data; + }; + } + + foreach ($list as $item) { + $data = $extractor($item); + + if (null === $data) { + continue; + } + + $reference = $creator($data); + + if ($reference instanceof RecordReferenceInterface) { + $references[] = $reference; } } @@ -53,15 +90,24 @@ class RecordReferenceCollection implements \IteratorAggregate { Assertion::allIsInstanceOf($references, RecordReferenceInterface::class); - $this->references = $references instanceof \Traversable ? iterator_to_array($references) : $references; + $this->references = $references instanceof \Traversable ? iterator_to_array($references, false) : array_values($references); } - public function addRecordReference(RecordReferenceInterface $reference) + public function add(RecordReferenceInterface $reference) { $this->references[] = $reference; $this->groups = null; } + /** + * @param int $databoxId + * @param int $recordId + */ + public function addRecordReference($databoxId, $recordId) + { + $this->add(RecordReference::createFromDataboxIdAndRecordId($databoxId, $recordId)); + } + public function getIterator() { return new \ArrayIterator($this->references); diff --git a/lib/classes/media/Permalink/Adapter.php b/lib/classes/media/Permalink/Adapter.php index d7f0382c8b..f701f9e056 100644 --- a/lib/classes/media/Permalink/Adapter.php +++ b/lib/classes/media/Permalink/Adapter.php @@ -12,6 +12,9 @@ use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Exception\RuntimeException; use Alchemy\Phrasea\Model\Manipulator\TokenManipulator; +use Alchemy\Phrasea\Utilities\NullableDateTime; +use Assert\Assertion; +use Doctrine\DBAL\Connection; use Doctrine\DBAL\DBALException; use Guzzle\Http\Url; @@ -37,17 +40,22 @@ class media_Permalink_Adapter implements cache_cacheableInterface protected $app; /** - * @param Application $app - * @param databox $databox - * @param media_subdef $media_subdef + * @param Application $app + * @param databox $databox + * @param media_subdef $media_subdef + * @param array $data */ - public function __construct(Application $app, databox $databox, media_subdef $media_subdef) + public function __construct(Application $app, databox $databox, media_subdef $media_subdef, array $data = null) { $this->app = $app; $this->databox = $databox; $this->media_subdef = $media_subdef; - $this->load(); + if (null === $data) { + $this->load(); + } else { + $this->loadFromData($data); + } } /** @@ -106,12 +114,12 @@ class media_Permalink_Adapter implements cache_cacheableInterface $label = $this->get_label() . '.' . pathinfo($this->media_subdef->get_file(), PATHINFO_EXTENSION); return Url::factory($this->app->url('permalinks_permalink', [ - 'sbas_id' => $this->media_subdef->get_sbas_id(), + 'sbas_id' => $this->media_subdef->get_sbas_id(), 'record_id' => $this->media_subdef->get_record_id(), - 'subdef' => $this->media_subdef->get_name(), + 'subdef' => $this->media_subdef->get_name(), /** @Ignore */ - 'label' => $label, - 'token' => $this->get_token(), + 'label' => $label, + 'token' => $this->get_token(), ])); } @@ -121,10 +129,10 @@ class media_Permalink_Adapter implements cache_cacheableInterface public function get_page() { return $this->app->url('permalinks_permaview', [ - 'sbas_id' => $this->media_subdef->get_sbas_id(), + 'sbas_id' => $this->media_subdef->get_sbas_id(), 'record_id' => $this->media_subdef->get_record_id(), - 'subdef' => $this->media_subdef->get_name(), - 'token' => $this->get_token(), + 'subdef' => $this->media_subdef->get_name(), + 'token' => $this->get_token(), ]); } @@ -139,7 +147,7 @@ class media_Permalink_Adapter implements cache_cacheableInterface $sql = 'UPDATE permalinks SET token = :token, last_modified = NOW() WHERE id = :id'; $stmt = $this->databox->get_connection()->prepare($sql); - $stmt->execute([':token' => $this->token, ':id' => $this->get_id()]); + $stmt->execute([':token' => $this->token, ':id' => $this->get_id()]); $stmt->closeCursor(); $this->delete_data_from_cache(); @@ -148,24 +156,17 @@ class media_Permalink_Adapter implements cache_cacheableInterface } /** - * @param string $is_activated + * @param bool $is_activated * @return $this */ public function set_is_activated($is_activated) { - $this->is_activated = ! ! $is_activated; + $this->is_activated = (bool)$is_activated; - $sql = 'UPDATE permalinks SET activated = :activated, last_modified = NOW() - WHERE id = :id'; - $stmt = $this->databox->get_connection()->prepare($sql); - - $params = [ - ':activated' => $this->is_activated, - ':id' => $this->get_id() - ]; - - $stmt->execute($params); - $stmt->closeCursor(); + $this->databox->get_connection()->executeUpdate( + 'UPDATE permalinks SET activated = :activated, last_modified = NOW() WHERE id = :id', + [ 'activated' => $this->is_activated, 'id' => $this->get_id()] + ); $this->delete_data_from_cache(); @@ -179,81 +180,79 @@ class media_Permalink_Adapter implements cache_cacheableInterface public function set_label($label) { $label = trim($label) ? trim($label) : 'untitled'; - while (strpos($label, ' ') !== false) + + while (strpos($label, ' ') !== false) { $label = str_replace(' ', ' ', $label); + } $this->label = $this->app['unicode']->remove_nonazAZ09( str_replace(' ', '-', $label) ); - $sql = 'UPDATE permalinks SET label = :label, last_modified = NOW() - WHERE id = :id'; - $stmt = $this->databox->get_connection()->prepare($sql); - $stmt->execute([':label' => $this->label, ':id' => $this->get_id()]); - $stmt->closeCursor(); + $this->databox->get_connection()->executeUpdate( + 'UPDATE permalinks SET label = :label, last_modified = NOW() WHERE id = :id', + ['label' => $this->label, 'id' => $this->get_id()] + ); $this->delete_data_from_cache(); return $this; } - /** - * @return $this - */ protected function load() { try { - $datas = $this->get_data_from_cache(); - $this->id = $datas['id']; - $this->token = $datas['token']; - $this->is_activated = $datas['is_activated']; - $this->created_on = $datas['created_on']; - $this->last_modified = $datas['last_modified']; - $this->label = $datas['label']; - - return $this; + $data = $this->get_data_from_cache(); } catch (\Exception $e) { - + $data = false; } - $sql = ' - SELECT p.id, p.token, p.activated, p.created_on, p.last_modified, p.label - FROM permalinks p - WHERE p.subdef_id = :subdef_id'; - $stmt = $this->databox->get_connection()->prepare($sql); - $stmt->execute([':subdef_id' => $this->media_subdef->get_subdef_id()]); - $row = $stmt->fetch(PDO::FETCH_ASSOC); - $stmt->closeCursor(); + if (is_array($data)) { + $this->loadFromData($data); - if (!$row) { - throw new Exception_Media_SubdefNotFound (); + return; } - $this->id = (int) $row['id']; - $this->token = $row['token']; - $this->is_activated = ! ! $row['activated']; - $this->created_on = new DateTime($row['created_on']); - $this->last_modified = new DateTime($row['last_modified']); - $this->label = $row['label']; + $data = $this->databox->get_connection()->fetchAssoc( + self::getSelectSql(), + [':subdef_id' => $this->media_subdef->get_subdef_id()] + ); + + if (!$data) { + throw new Exception_Media_SubdefNotFound(); + } + + $this->loadFromData($data); + + $this->set_data_to_cache($this->toArray()); + } + + private function loadFromData(array $data) + { + $this->id = (int)$data['id']; + $this->token = $data['token']; + $this->is_activated = (bool)$data['is_activated']; + $this->created_on = new DateTime($data['created_on']); + $this->last_modified = new DateTime($data['last_modified']); + $this->label = $data['label']; + } + + private function toArray() + { + return [ + 'id' => $this->id, + 'token' => $this->token, + 'is_activated' => $this->is_activated, + 'created_on' => NullableDateTime::format($this->created_on), + 'last_modified' => NullableDateTime::format($this->last_modified), + 'label' => $this->label, - $datas = [ - 'id' => $this->id, - 'token' => $this->token, - 'is_activated' => $this->is_activated, - 'created_on' => $this->created_on, - 'last_modified' => $this->last_modified, - /** @Ignore */ - 'label' => $this->label, ]; - - $this->set_data_to_cache($datas); - - return $this; } /** - * @param Application $app - * @param databox $databox + * @param Application $app + * @param databox $databox * @param media_subdef $media_subdef * @return $this */ @@ -262,57 +261,219 @@ class media_Permalink_Adapter implements cache_cacheableInterface try { return new self($app, $databox, $media_subdef); } catch (\Exception $e) { - + // Could not load, try to create } return self::create($app, $databox, $media_subdef); } /** - * @param Application $app - * @param databox $databox + * @param Application $app + * @param media_subdef[] $subdefs + * @return media_Permalink_Adapter[] + */ + public static function getMany(Application $app, $subdefs) + { + Assertion::allIsInstanceOf($subdefs, media_subdef::class); + + $permalinks = []; + $subdefPerDatabox = []; + + foreach ($subdefs as $index => $subdef) { + if (!isset($subdefPerDatabox[$subdef->get_sbas_id()])) { + $subdefPerDatabox[$subdef->get_sbas_id()] = []; + } + $subdefPerDatabox[$subdef->get_sbas_id()][$index] = $subdef; + + $permalinks[$index] = null; + } + + foreach ($subdefPerDatabox as $databoxId => $media_subdefs) { + $databox = $app->findDataboxById($databoxId); + + $subdefIds = array_map(function (media_subdef $media_subdef) { + return $media_subdef->get_subdef_id(); + }, $media_subdefs); + + $data = self::fetchData($databox, $subdefIds); + self::createMany($app, $databox, array_diff_key($media_subdefs, $data)); + $data = array_replace($data, self::fetchData($databox, array_diff_key($subdefIds, $data))); + + foreach ($media_subdefs as $index => $subdef) { + if (!isset($data[$index])) { + throw new \RuntimeException('Could not fetch some data. Should never happen'); + } + + $permalinks[$index] = new self($app, $databox, $subdef, $data[$index]); + } + } + + return $permalinks; + } + + /** + * Returns present data in storage with same indexes but different order + * + * @param databox $databox + * @param int[] $subdefIds + * @return array + */ + private static function fetchData(databox $databox, array $subdefIds) + { + $found = []; + $missing = []; + + foreach ($subdefIds as $index => $subdefId) { + try { + $data = self::doGetDataFromCache($databox, $subdefId); + } catch (Exception $exception) { + $data = false; + } + + if (is_array($data)) { + $found[$index] = $data; + + continue; + } + + $missing[$index] = $subdefId; + } + + if (!$missing) { + return $found; + } + + $dbalData = $databox->get_connection()->fetchAll( + self::getSelectSql(), + ['subdef_id' => array_values($missing)], + ['subdef_id' => Connection::PARAM_INT_ARRAY] + ); + + foreach ($dbalData as $item) { + $foundIndexes = []; + + $databox->set_data_to_cache($item, self::generateCacheKey($item['subdef_id'])); + + foreach ($missing as $index => $subdefId) { + if ($subdefId === $item['subdef_id']) { + $foundIndexes[] = $index; + } + } + + foreach ($foundIndexes as $foundIndex) { + $found[$foundIndex] = $item; + unset($missing[$foundIndex]); + } + } + + return $found; + } + + /** + * @param Application $app + * @param databox $databox + * @param media_subdef[] $subdefs + * @throws DBALException + * @throws \InvalidArgumentException + */ + public static function createMany(Application $app, databox $databox, $subdefs) + { + $databoxId = $databox->get_sbas_id(); + $recordIds = []; + + foreach ($subdefs as $media_subdef) { + if ($media_subdef->get_sbas_id() !== $databoxId) { + throw new InvalidArgumentException(sprintf( + 'All subdefs should be from databox %d, got %d', + $databoxId, + $media_subdef->get_sbas_id() + )); + } + + $recordIds[] = $media_subdef->get_record_id(); + } + + $databoxRecords = $databox->getRecordRepository()->findByRecordIds($recordIds); + + /** @var record_adapter[] $records */ + $records = array_combine( + array_map(function (record_adapter $record) { + return $record->getRecordId(); + }, $databoxRecords), + $databoxRecords + ); + + if (count(array_unique($recordIds)) !== count($records)) { + throw new \RuntimeException('Some records are missing'); + } + + $generator = $app['random.medium']; + + $data = []; + + foreach ($subdefs as $media_subdef) { + $data[] = [ + 'subdef_id' => $media_subdef->get_subdef_id(), + 'token' => $generator->generateString(64, TokenManipulator::LETTERS_AND_NUMBERS), + 'label' => $records[$media_subdef->get_record_id()]->get_title(false, null, true), + ]; + } + + try { + $databox->get_connection()->transactional(function (Connection $connection) use ($data) { + $sql = <<<'SQL' +INSERT INTO permalinks (subdef_id, token, activated, created_on, last_modified, label) +VALUES (:subdef_id, :token, 1, NOW(), NOW(), :label) +SQL; + + $statement = $connection->prepare($sql); + + foreach ($data as $params) { + $statement->execute($params); + } + }); + } catch (Exception $e) { + throw new RuntimeException('Permalink already exists', $e->getCode(), $e); + } + } + + /** + * @param Application $app + * @param databox $databox * @param media_subdef $media_subdef * @return $this */ public static function create(Application $app, databox $databox, media_subdef $media_subdef) { - $sql = 'INSERT INTO permalinks - (id, subdef_id, token, activated, created_on, last_modified, label) - VALUES (null, :subdef_id, :token, :activated, NOW(), NOW(), "")'; + self::createMany($app, $databox, [$media_subdef]); - $params = [ - ':subdef_id' => $media_subdef->get_subdef_id() - , ':token' => $app['random.medium']->generateString(64, TokenManipulator::LETTERS_AND_NUMBERS) - , ':activated' => '1' - ]; + return self::getPermalink($app, $databox, $media_subdef); + } - $error = null; - $stmt = $databox->get_connection()->prepare($sql); - try { - $stmt->execute($params); - } catch (DBALException $e) { - $error = $e; - } - $stmt->closeCursor(); - - if ($error) { - throw new RuntimeException('Permalink already exists', $e->getCode(), $e); - } - - $permalink = self::getPermalink($app, $databox, $media_subdef); - $permalink->set_label(strip_tags($media_subdef->get_record()->get_title(false, null, true))); - - return $permalink; + private static function generateCacheKey($id, $option = null) + { + return 'permalink_' . $id . ($option ? '_' . $option : ''); } public function get_cache_key($option = null) { - return 'permalink_' . $this->media_subdef->get_subdef_id() . ($option ? '_' . $option : ''); + return self::generateCacheKey($this->media_subdef->get_subdef_id(), $option); + } + + /** + * @param databox $databox + * @param int $subdefId + * @param null $option + * @return string + */ + private static function doGetDataFromCache(databox $databox, $subdefId, $option = null) + { + return $databox->get_data_from_cache(self::generateCacheKey($subdefId, $option)); } public function get_data_from_cache($option = null) { - return $this->databox->get_data_from_cache($this->get_cache_key($option)); + return self::doGetDataFromCache($this->databox, $this->media_subdef->get_subdef_id(), $option); } public function set_data_to_cache($value, $option = null, $duration = 0) @@ -324,4 +485,16 @@ class media_Permalink_Adapter implements cache_cacheableInterface { $this->databox->delete_data_from_cache($this->get_cache_key($option)); } + + /** + * @return string + */ + protected static function getSelectSql() + { + return <<<'SQL' +SELECT p.id, p.token, p.activated AS is_activated, p.created_on, p.last_modified, p.label +FROM permalinks p +WHERE p.subdef_id IN (:subdef_id) +SQL; + } } From 1274e0f7b319e3e4bd12ced92640a628e7fe310f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Fri, 8 Apr 2016 20:22:16 +0200 Subject: [PATCH 225/383] Fixups issues in reduce calls. --- lib/Alchemy/Phrasea/Cache/MultiAdapter.php | 2 ++ .../Order/Controller/ApiOrderController.php | 2 ++ lib/classes/media/Permalink/Adapter.php | 21 ++++++++++--------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/Alchemy/Phrasea/Cache/MultiAdapter.php b/lib/Alchemy/Phrasea/Cache/MultiAdapter.php index 56e0e55692..d9133275a3 100644 --- a/lib/Alchemy/Phrasea/Cache/MultiAdapter.php +++ b/lib/Alchemy/Phrasea/Cache/MultiAdapter.php @@ -64,6 +64,8 @@ class MultiAdapter implements DoctrineCache, MultiGetCache, MultiPutCache if (false !== $value || true === $this->contains($key)) { $data[$key] = $value; } + + return $data; }, []); return $data; diff --git a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php index 9e66818822..5953dfcd21 100644 --- a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php +++ b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php @@ -254,6 +254,8 @@ class ApiOrderController extends BaseOrderController $baseIds = array_keys(array_reduce($elements, function (array &$baseIds, OrderElement $element) { $baseIds[$element->getBaseId()] = true; + + return $baseIds; }, [])); $collectionToDataboxMap = []; diff --git a/lib/classes/media/Permalink/Adapter.php b/lib/classes/media/Permalink/Adapter.php index f701f9e056..d383a364dc 100644 --- a/lib/classes/media/Permalink/Adapter.php +++ b/lib/classes/media/Permalink/Adapter.php @@ -296,8 +296,13 @@ class media_Permalink_Adapter implements cache_cacheableInterface }, $media_subdefs); $data = self::fetchData($databox, $subdefIds); - self::createMany($app, $databox, array_diff_key($media_subdefs, $data)); - $data = array_replace($data, self::fetchData($databox, array_diff_key($subdefIds, $data))); + + $missing = array_diff_key($media_subdefs, $data); + + if ($missing) { + self::createMany($app, $databox, $missing); + $data = array_replace($data, self::fetchData($databox, array_diff_key($subdefIds, $data))); + } foreach ($media_subdefs as $index => $subdef) { if (!isset($data[$index])) { @@ -350,15 +355,11 @@ class media_Permalink_Adapter implements cache_cacheableInterface ); foreach ($dbalData as $item) { - $foundIndexes = []; + $itemSubdefId = $item['subdef_id']; - $databox->set_data_to_cache($item, self::generateCacheKey($item['subdef_id'])); + $databox->set_data_to_cache($item, self::generateCacheKey($itemSubdefId)); - foreach ($missing as $index => $subdefId) { - if ($subdefId === $item['subdef_id']) { - $foundIndexes[] = $index; - } - } + $foundIndexes = array_keys(array_intersect($missing, [$itemSubdefId])); foreach ($foundIndexes as $foundIndex) { $found[$foundIndex] = $item; @@ -492,7 +493,7 @@ SQL; protected static function getSelectSql() { return <<<'SQL' -SELECT p.id, p.token, p.activated AS is_activated, p.created_on, p.last_modified, p.label +SELECT p.id, p.subdef_id, p.token, p.activated AS is_activated, p.created_on, p.last_modified, p.label FROM permalinks p WHERE p.subdef_id IN (:subdef_id) SQL; From ae32c3e9649abb437d436a8fe1dcda5e8eecfd89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 11 Apr 2016 21:20:17 +0200 Subject: [PATCH 226/383] Refactor to use views --- .../Databox/Subdef/MediaSubdefService.php | 2 +- .../Order/Controller/ApiOrderController.php | 176 +++++++++++++++--- .../Phrasea/Order/OrderElementTransformer.php | 68 ++----- .../Phrasea/Order/OrderElementViewModel.php | 82 ++++++++ .../Phrasea/Order/OrderTransformer.php | 7 +- lib/Alchemy/Phrasea/Order/OrderViewModel.php | 60 ++++++ lib/Alchemy/Phrasea/Order/SubdefViewModel.php | 46 +++++ .../Record/RecordReferenceCollection.php | 77 ++++++-- 8 files changed, 416 insertions(+), 102 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Order/OrderElementViewModel.php create mode 100644 lib/Alchemy/Phrasea/Order/OrderViewModel.php create mode 100644 lib/Alchemy/Phrasea/Order/SubdefViewModel.php diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php index 6315e42568..60a3c9d9d8 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php @@ -90,7 +90,7 @@ class MediaSubdefService foreach ($records->groupPerDataboxId() as $databoxId => $indexes) { $subdefs = $this->getRepositoryForDatabox($databoxId)->findByRecordIdsAndNames(array_keys($indexes)); - $carry = $process($carry, $subdefs, $indexes); + $carry = $process($carry, $subdefs, $indexes, $databoxId); } return $carry; diff --git a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php index 5953dfcd21..9bd74cb8a6 100644 --- a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php +++ b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php @@ -18,9 +18,13 @@ use Alchemy\Phrasea\Core\PhraseaEvents; use Alchemy\Phrasea\Model\Entities\BasketElement; use Alchemy\Phrasea\Model\Entities\Order; use Alchemy\Phrasea\Model\Entities\OrderElement; +use Alchemy\Phrasea\Model\RecordReferenceInterface; use Alchemy\Phrasea\Order\OrderElementTransformer; +use Alchemy\Phrasea\Order\OrderElementViewModel; use Alchemy\Phrasea\Order\OrderFiller; use Alchemy\Phrasea\Order\OrderTransformer; +use Alchemy\Phrasea\Order\OrderViewModel; +use Alchemy\Phrasea\Order\SubdefViewModel; use Alchemy\Phrasea\Record\RecordReference; use Alchemy\Phrasea\Record\RecordReferenceCollection; use Assert\Assertion; @@ -92,11 +96,8 @@ class ApiOrderController extends BaseOrderController ; } - $collection = $builder->getQuery()->getResult(); - - if (in_array('elements.resource_links', $fractal->getRequestedIncludes(), false)) { - $this->fetchResourceLinksData($collection); - } + $collection = $this->buildOrderViewModels($builder->getQuery()->getResult()); + $this->fillViewModels($collection, $fractal->getRequestedIncludes()); $resource = new Collection($collection, $this->getOrderTransformer()); @@ -118,15 +119,21 @@ class ApiOrderController extends BaseOrderController { $order = $this->findOr404($orderId); - $includes = $request->get('includes', []); + $fractal = $this->parseIncludes($request->get('includes', [])); if ($order->getUser()->getId() !== $this->getAuthenticatedUser()->getId()) { throw new AccessDeniedHttpException(sprintf('Cannot access order "%d"', $order->getId())); } - $resource = new Item($order, $this->getOrderTransformer()); + $model = $this->buildOrderViewModel($order); - return $this->returnResourceResponse($request, $includes, $resource); + $resource = new Item($model, $this->getOrderTransformer()); + + if (in_array('elements.resource_links', $fractal->getRequestedIncludes(), false)) { + $this->fillViewModels([$resource]); + } + + return $this->returnResourceResponse($request, $fractal, $resource); } public function acceptElementsAction(Request $request, $orderId) @@ -199,7 +206,7 @@ class ApiOrderController extends BaseOrderController */ private function getOrderTransformer() { - return new OrderTransformer(new OrderElementTransformer($this->app)); + return new OrderTransformer(new OrderElementTransformer($this->app['media_accessor.subdef_url_generator'])); } /** @@ -246,26 +253,34 @@ class ApiOrderController extends BaseOrderController } /** - * @param Order[] $orders + * @param OrderViewModel[] $models + * @param array $includes + * @return void */ - private function fetchResourceLinksData(array $orders) + private function fillViewModels(array $models, array $includes) { - $elements = $this->gatherElements($orders); - - $baseIds = array_keys(array_reduce($elements, function (array &$baseIds, OrderElement $element) { - $baseIds[$element->getBaseId()] = true; - - return $baseIds; - }, [])); - - $collectionToDataboxMap = []; - - foreach ($this->app['repo.collection-references']->findMany($baseIds) as $collectionReference) { - $collectionToDataboxMap[$collectionReference->getBaseId()] = $collectionReference->getDataboxId(); + if (!in_array('elements', $includes, true)) { + return; } + $elements = $this->gatherElements($models); + + $allElements = $elements ? call_user_func_array('array_merge', $elements) : []; + $allElements = array_combine( + array_map(function (OrderElement $element) { + return $element->getId(); + }, $allElements), + $allElements + ); + + if (!$allElements) { + return; + } + + $collectionToDataboxMap = $this->mapBaseIdToDataboxId($allElements); + $records = RecordReferenceCollection::fromListExtractor( - $elements, + $allElements, function (OrderElement $element) use ($collectionToDataboxMap) { return isset($collectionToDataboxMap[$element->getBaseId()]) ? [$collectionToDataboxMap[$element->getBaseId()], $element->getRecordId()] @@ -278,30 +293,129 @@ class ApiOrderController extends BaseOrderController } ); + $this->createOrderElementViewModels($models, $elements, $records); + + if (!in_array('elements.resource_links', $includes, true)) { + return; + } + // Load all records $records->toRecords($this->getApplicationBox()); // Load all subdefs $subdefs = $this->app['service.media_subdef']->findSubdefsFromRecordReferenceCollection($records); - \media_Permalink_Adapter::getMany($this->app, $subdefs); + $links = \media_Permalink_Adapter::getMany($this->app, $subdefs); + + $orderableViews = []; + + $views = array_map(null, $subdefs, $links); + + foreach ($views as $view) { + /** + * @var \media_subdef $subdef + * @var \media_Permalink_Adapter $link + */ + list ($subdef, $link) = $view; + + $databoxId = $subdef->get_sbas_id(); + $recordId = $subdef->get_record_id(); + + if (!isset($orderableViews[$databoxId][$recordId])) { + $orderableViews[$databoxId][$recordId] = []; + } + + $orderableViews[$databoxId][$recordId][] = new SubdefViewModel($subdef, $link); + } + + foreach ($models as $model) { + foreach ($model->getElements() as $element) { + $databoxId = $collectionToDataboxMap[$element->getElement()->getBaseId()]; + $recordId = $element->getElement()->getRecordId(); + + if (isset($orderableViews[$databoxId][$recordId])) { + $element->setOrderableMediaSubdefs($orderableViews[$databoxId][$recordId]); + } + } + } } /** * @param Order[] $orders - * @return OrderElement[] + * @return OrderViewModel[] */ - private function gatherElements(array $orders) + private function buildOrderViewModels(array $orders) { Assertion::allIsInstanceOf($orders, Order::class); + return array_map(function (Order $order) { + return new OrderViewModel($order); + }, $orders); + } + + private function buildOrderViewModel(Order $order) + { + return new OrderViewModel($order); + } + + /** + * @param OrderViewModel[] $models + * @return OrderElement[][] + */ + private function gatherElements(array $models) + { + Assertion::allIsInstanceOf($models, OrderViewModel::class); + $elements = []; - foreach ($orders as $order) { - foreach ($order->getElements() as $element) { - $elements[] = $element; - } + foreach ($models as $index => $model) { + $elements[$index] = $model->getOrder()->getElements()->toArray(); } return $elements; } + + /** + * @param OrderElement[] $elements + * @return array + */ + private function mapBaseIdToDataboxId(array $elements) + { + $baseIds = array_keys(array_reduce($elements, function (array &$baseIds, OrderElement $element) { + $baseIds[$element->getBaseId()] = true; + + return $baseIds; + }, [])); + + $collectionToDataboxMap = []; + + foreach ($this->app['repo.collection-references']->findMany($baseIds) as $collectionReference) { + $collectionToDataboxMap[$collectionReference->getBaseId()] = $collectionReference->getDataboxId(); + } + + return $collectionToDataboxMap; + } + + /** + * @param OrderViewModel[] $orderViewModels + * @param OrderElement[][] $elements + * @param RecordReferenceInterface[]|RecordReferenceCollection $records + * @return void + */ + private function createOrderElementViewModels(array $orderViewModels, $elements, $records) + { + $user = $this->getAuthenticatedUser(); + + foreach ($orderViewModels as $index => $model) { + $models = []; + + /** @var OrderElement $element */ + foreach ($elements[$index] as $elementIndex => $element) { + if (isset($records[$element->getId()])) { + $models[$elementIndex] = new OrderElementViewModel($element, $records[$element->getId()], $user); + } + } + + $model->setViewElements($models); + } + } } diff --git a/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php b/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php index 88366ce3d5..7b49837daf 100644 --- a/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php +++ b/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php @@ -11,9 +11,7 @@ namespace Alchemy\Phrasea\Order; use Alchemy\Phrasea\Application; -use Alchemy\Phrasea\Databox\Subdef\MediaSubdefRepository; use Alchemy\Phrasea\Media\MediaSubDefinitionUrlGenerator; -use Alchemy\Phrasea\Model\Entities\OrderElement; use League\Fractal\ParamBag; use League\Fractal\TransformerAbstract; @@ -24,22 +22,25 @@ class OrderElementTransformer extends TransformerAbstract private $validParams = ['ttl']; /** - * @var Application + * @var MediaSubDefinitionUrlGenerator */ - private $app; + private $urlGenerator; - public function __construct(Application $app) + public function __construct(MediaSubDefinitionUrlGenerator $urlGenerator) { - $this->app = $app; + $this->urlGenerator = $urlGenerator; } - public function transform(OrderElement $element) + public function transform(OrderElementViewModel $model) { + $element = $model->getElement(); + $record = $model->getRecordReference(); + $data = [ 'id' => $element->getId(), 'record' => [ - 'databox_id' => $element->getSbasId($this->app), - 'record_id' => $element->getRecordId(), + 'databox_id' => $record->getDataboxId(), + 'record_id' => $record->getRecordId(), ], ]; @@ -53,7 +54,7 @@ class OrderElementTransformer extends TransformerAbstract return $data; } - public function includeResourceLinks(OrderElement $element, ParamBag $params = null) + public function includeResourceLinks(OrderElementViewModel $model, ParamBag $params = null) { $ttl = null; @@ -71,13 +72,11 @@ class OrderElementTransformer extends TransformerAbstract list ($ttl) = $params->get('ttl'); } - $generator = $this->getSubdefUrlGenerator(); - if (null === $ttl) { - $ttl = $generator->getDefaultTTL(); + $ttl = $this->urlGenerator->getDefaultTTL(); } - $urls = $generator->generateMany($this->app->getAuthenticatedUser(), $this->findOrderableMediaSubdef($element), $ttl); + $urls = $this->urlGenerator->generateMany($model->getAuthenticatedUser(), $model->getOrderableMediaSubdefs(), $ttl); $urls = array_map(null, array_keys($urls), array_values($urls)); return $this->collection($urls, function (array $data) use ($ttl) { @@ -88,45 +87,4 @@ class OrderElementTransformer extends TransformerAbstract ]; }); } - - /** - * @param OrderElement $element - * @return \media_subdef[] - */ - private function findOrderableMediaSubdef(OrderElement $element) - { - if (false !== $element->getDeny()) { - return []; - } - - $databox = $this->app->findDataboxById($element->getSbasId($this->app)); - $record = $databox->get_record($element->getRecordId()); - - $subdefNames = []; - - foreach ($databox->get_subdef_structure()->getSubdefGroup($record->getType()) as $databoxSubdef) { - if ($databoxSubdef->isOrderable()) { - $subdefNames[] = $databoxSubdef->get_name(); - } - } - - return $this->getMediaSubDefRepository($databox->get_sbas_id()) - ->findByRecordIdsAndNames([$element->getRecordId()], $subdefNames); - } - - /** - * @return MediaSubDefinitionUrlGenerator - */ - private function getSubdefUrlGenerator() - { - return $this->app['media_accessor.subdef_url_generator']; - } - - /** - * @return MediaSubdefRepository - */ - private function getMediaSubDefRepository($databoxId) - { - return $this->app['provider.repo.media_subdef']->getRepositoryForDatabox($databoxId); - } } diff --git a/lib/Alchemy/Phrasea/Order/OrderElementViewModel.php b/lib/Alchemy/Phrasea/Order/OrderElementViewModel.php new file mode 100644 index 0000000000..f7fe265619 --- /dev/null +++ b/lib/Alchemy/Phrasea/Order/OrderElementViewModel.php @@ -0,0 +1,82 @@ +element = $element; + $this->record = $record; + $this->user = $user; + } + + public function getElement() + { + return $this->element; + } + + public function getRecordReference() + { + return $this->record; + } + + public function getAuthenticatedUser() + { + return $this->user; + } + + /** + * @param SubdefViewModel[] $subdefs + */ + public function setOrderableMediaSubdefs($subdefs) + { + Assertion::allIsInstanceOf($subdefs, SubdefViewModel::class); + + $this->subdefs = $subdefs instanceof \Traversable ? iterator_to_array($subdefs) : $subdefs; + } + + public function getOrderableMediaSubdefs() + { + return $this->subdefs; + } +} diff --git a/lib/Alchemy/Phrasea/Order/OrderTransformer.php b/lib/Alchemy/Phrasea/Order/OrderTransformer.php index e9a106a148..9775031da1 100644 --- a/lib/Alchemy/Phrasea/Order/OrderTransformer.php +++ b/lib/Alchemy/Phrasea/Order/OrderTransformer.php @@ -10,7 +10,6 @@ namespace Alchemy\Phrasea\Order; -use Alchemy\Phrasea\Model\Entities\Order; use League\Fractal\TransformerAbstract; class OrderTransformer extends TransformerAbstract @@ -29,8 +28,10 @@ class OrderTransformer extends TransformerAbstract $this->elementTransformer = $elementTransformer; } - public function transform(Order $order) + public function transform(OrderViewModel $view) { + $order = $view->getOrder(); + $data = [ 'id' => (int)$order->getId(), 'owner_id' => (int)$order->getUser()->getId(), @@ -46,7 +47,7 @@ class OrderTransformer extends TransformerAbstract return $data; } - public function includeElements(Order $order) + public function includeElements(OrderViewModel $order) { $elements = $order->getElements(); diff --git a/lib/Alchemy/Phrasea/Order/OrderViewModel.php b/lib/Alchemy/Phrasea/Order/OrderViewModel.php new file mode 100644 index 0000000000..6acb27bb90 --- /dev/null +++ b/lib/Alchemy/Phrasea/Order/OrderViewModel.php @@ -0,0 +1,60 @@ +order = $order; + } + + /** + * @param $viewElements + */ + public function setViewElements($viewElements) + { + Assertion::allIsInstanceOf($viewElements, OrderElementViewModel::class); + + $this->viewElements = $viewElements instanceof \Traversable ? iterator_to_array($viewElements) : $viewElements; + } + + /** + * @return Order + */ + public function getOrder() + { + return $this->order; + } + + /** + * @return OrderElementViewModel[] + */ + public function getElements() + { + return $this->viewElements; + } +} diff --git a/lib/Alchemy/Phrasea/Order/SubdefViewModel.php b/lib/Alchemy/Phrasea/Order/SubdefViewModel.php new file mode 100644 index 0000000000..c42840a05d --- /dev/null +++ b/lib/Alchemy/Phrasea/Order/SubdefViewModel.php @@ -0,0 +1,46 @@ +subdef = $subdef; + $this->link = $link; + } + + /** + * @return \media_subdef + */ + public function getSubdef() + { + return $this->subdef; + } + + /** + * @return \media_Permalink_Adapter + */ + public function getLink() + { + return $this->link; + } +} diff --git a/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php b/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php index 69497f16b7..97bb80ceef 100644 --- a/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php +++ b/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php @@ -13,7 +13,7 @@ namespace Alchemy\Phrasea\Record; use Alchemy\Phrasea\Model\RecordReferenceInterface; use Assert\Assertion; -class RecordReferenceCollection implements \IteratorAggregate +class RecordReferenceCollection implements \IteratorAggregate, \ArrayAccess { /** * @param array $records @@ -25,11 +25,11 @@ class RecordReferenceCollection implements \IteratorAggregate $references = []; - foreach ($records as $record) { + foreach ($records as $index => $record) { if (isset($record['id'])) { - $references[] = RecordReference::createFromRecordReference($record['id']); + $references[$index] = RecordReference::createFromRecordReference($record['id']); } elseif (isset($record['databox_id'], $record['record_id'])) { - $references[] = RecordReference::createFromDataboxIdAndRecordId($record['databox_id'], $record['record_id']); + $references[$index] = RecordReference::createFromDataboxIdAndRecordId($record['databox_id'], $record['record_id']); } } @@ -56,7 +56,7 @@ class RecordReferenceCollection implements \IteratorAggregate }; } - foreach ($list as $item) { + foreach ($list as $index => $item) { $data = $extractor($item); if (null === $data) { @@ -66,7 +66,7 @@ class RecordReferenceCollection implements \IteratorAggregate $reference = $creator($data); if ($reference instanceof RecordReferenceInterface) { - $references[] = $reference; + $references[$index] = $reference; } } @@ -90,22 +90,35 @@ class RecordReferenceCollection implements \IteratorAggregate { Assertion::allIsInstanceOf($references, RecordReferenceInterface::class); - $this->references = $references instanceof \Traversable ? iterator_to_array($references, false) : array_values($references); + $this->references = $references instanceof \Traversable ? iterator_to_array($references, true) : $references; } - public function add(RecordReferenceInterface $reference) + /** + * @param RecordReferenceInterface $reference + * @param null|string|int $index + */ + public function add(RecordReferenceInterface $reference, $index = null) { - $this->references[] = $reference; $this->groups = null; + + if (null === $index) { + $this->references[] = $reference; + + return; + } + + $this->references[$index] = $reference; } /** * @param int $databoxId * @param int $recordId + * @param null|string|int $index + * @return void */ - public function addRecordReference($databoxId, $recordId) + public function addRecordReference($databoxId, $recordId, $index = null) { - $this->add(RecordReference::createFromDataboxIdAndRecordId($databoxId, $recordId)); + $this->add(RecordReference::createFromDataboxIdAndRecordId($databoxId, $recordId), $index); } public function getIterator() @@ -161,8 +174,48 @@ class RecordReferenceCollection implements \IteratorAggregate } } - ksort($records); + $indexes = array_flip(array_keys($this->references)); + + uksort($records, function ($keyA, $keyB) use ($indexes) { + $indexA = $indexes[$keyA]; + $indexB = $indexes[$keyB]; + + if ($indexA < $indexB) { + return -1; + } elseif ($indexA > $indexB) { + return 1; + } + + return 0; + }); return $records; } + + public function offsetExists($offset) + { + return isset($this->references[$offset]); + } + + /** + * @param mixed $offset + * @return RecordReferenceInterface + */ + public function offsetGet($offset) + { + return $this->references[$offset]; + } + + public function offsetSet($offset, $value) + { + Assertion::isInstanceOf($value, RecordReferenceInterface::class); + + $this->add($value, $offset); + } + + public function offsetUnset($offset) + { + unset($this->references[$offset]); + $this->groups = null; + } } From 90fa5fee18e08a6fa6d2d14331b9358591aead5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 11 Apr 2016 21:38:03 +0200 Subject: [PATCH 227/383] Remove SubdefViewModel as currently useless --- .../Order/Controller/ApiOrderController.php | 24 ++++------ .../Phrasea/Order/OrderElementViewModel.php | 4 +- lib/Alchemy/Phrasea/Order/SubdefViewModel.php | 46 ------------------- 3 files changed, 10 insertions(+), 64 deletions(-) delete mode 100644 lib/Alchemy/Phrasea/Order/SubdefViewModel.php diff --git a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php index 9bd74cb8a6..de97b19e64 100644 --- a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php +++ b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php @@ -304,27 +304,19 @@ class ApiOrderController extends BaseOrderController // Load all subdefs $subdefs = $this->app['service.media_subdef']->findSubdefsFromRecordReferenceCollection($records); - $links = \media_Permalink_Adapter::getMany($this->app, $subdefs); + \media_Permalink_Adapter::getMany($this->app, $subdefs); - $orderableViews = []; - - $views = array_map(null, $subdefs, $links); - - foreach ($views as $view) { - /** - * @var \media_subdef $subdef - * @var \media_Permalink_Adapter $link - */ - list ($subdef, $link) = $view; + $orderableSubdefs = []; + foreach ($subdefs as $subdef) { $databoxId = $subdef->get_sbas_id(); $recordId = $subdef->get_record_id(); - if (!isset($orderableViews[$databoxId][$recordId])) { - $orderableViews[$databoxId][$recordId] = []; + if (!isset($orderableSubdefs[$databoxId][$recordId])) { + $orderableSubdefs[$databoxId][$recordId] = []; } - $orderableViews[$databoxId][$recordId][] = new SubdefViewModel($subdef, $link); + $orderableSubdefs[$databoxId][$recordId][] = $subdef; } foreach ($models as $model) { @@ -332,8 +324,8 @@ class ApiOrderController extends BaseOrderController $databoxId = $collectionToDataboxMap[$element->getElement()->getBaseId()]; $recordId = $element->getElement()->getRecordId(); - if (isset($orderableViews[$databoxId][$recordId])) { - $element->setOrderableMediaSubdefs($orderableViews[$databoxId][$recordId]); + if (isset($orderableSubdefs[$databoxId][$recordId])) { + $element->setOrderableMediaSubdefs($orderableSubdefs[$databoxId][$recordId]); } } } diff --git a/lib/Alchemy/Phrasea/Order/OrderElementViewModel.php b/lib/Alchemy/Phrasea/Order/OrderElementViewModel.php index f7fe265619..9440f54a7e 100644 --- a/lib/Alchemy/Phrasea/Order/OrderElementViewModel.php +++ b/lib/Alchemy/Phrasea/Order/OrderElementViewModel.php @@ -66,11 +66,11 @@ class OrderElementViewModel } /** - * @param SubdefViewModel[] $subdefs + * @param \media_subdef[] $subdefs */ public function setOrderableMediaSubdefs($subdefs) { - Assertion::allIsInstanceOf($subdefs, SubdefViewModel::class); + Assertion::allIsInstanceOf($subdefs, \media_subdef::class); $this->subdefs = $subdefs instanceof \Traversable ? iterator_to_array($subdefs) : $subdefs; } diff --git a/lib/Alchemy/Phrasea/Order/SubdefViewModel.php b/lib/Alchemy/Phrasea/Order/SubdefViewModel.php deleted file mode 100644 index c42840a05d..0000000000 --- a/lib/Alchemy/Phrasea/Order/SubdefViewModel.php +++ /dev/null @@ -1,46 +0,0 @@ -subdef = $subdef; - $this->link = $link; - } - - /** - * @return \media_subdef - */ - public function getSubdef() - { - return $this->subdef; - } - - /** - * @return \media_Permalink_Adapter - */ - public function getLink() - { - return $this->link; - } -} From 8d845eabbc24b3751174710ceebf3c90db9119db Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Tue, 12 Apr 2016 09:17:59 +0000 Subject: [PATCH 228/383] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- .../Databox/Subdef/MediaSubdefRepository.php | 2 +- .../Order/Controller/ApiOrderController.php | 1 - lib/classes/media/Permalink/Adapter.php | 2 +- lib/classes/media/subdef.php | 16 ++++++++---- lib/classes/record/adapter.php | 26 +++++++++---------- 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php index 8622b3aa52..aba28b6fd1 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefRepository.php @@ -67,7 +67,7 @@ class MediaSubdefRepository */ public function findByRecordIdsAndNames(array $recordIds, array $names = null) { - if (! $recordIds) { + if (!$recordIds) { return []; } diff --git a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php index de97b19e64..96d38a51ed 100644 --- a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php +++ b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php @@ -24,7 +24,6 @@ use Alchemy\Phrasea\Order\OrderElementViewModel; use Alchemy\Phrasea\Order\OrderFiller; use Alchemy\Phrasea\Order\OrderTransformer; use Alchemy\Phrasea\Order\OrderViewModel; -use Alchemy\Phrasea\Order\SubdefViewModel; use Alchemy\Phrasea\Record\RecordReference; use Alchemy\Phrasea\Record\RecordReferenceCollection; use Assert\Assertion; diff --git a/lib/classes/media/Permalink/Adapter.php b/lib/classes/media/Permalink/Adapter.php index d383a364dc..38c662b3f2 100644 --- a/lib/classes/media/Permalink/Adapter.php +++ b/lib/classes/media/Permalink/Adapter.php @@ -165,7 +165,7 @@ class media_Permalink_Adapter implements cache_cacheableInterface $this->databox->get_connection()->executeUpdate( 'UPDATE permalinks SET activated = :activated, last_modified = NOW() WHERE id = :id', - [ 'activated' => $this->is_activated, 'id' => $this->get_id()] + ['activated' => $this->is_activated, 'id' => $this->get_id()] ); $this->delete_data_from_cache(); diff --git a/lib/classes/media/subdef.php b/lib/classes/media/subdef.php index a2fb9d1349..7150a3c989 100644 --- a/lib/classes/media/subdef.php +++ b/lib/classes/media/subdef.php @@ -188,7 +188,7 @@ SQL; throw new Exception_Media_SubdefNotFound($this->name . ' not found'); } - if (! $row) { + if (!$row) { $this->markPhysicallyUnavailable(); } @@ -396,6 +396,9 @@ SQL; return $this->etag; } + /** + * @param string|null $etag + */ public function setEtag($etag) { $this->etag = $etag; @@ -408,6 +411,9 @@ SQL; return $this; } + /** + * @param boolean $substit + */ public function set_substituted($substit) { $this->is_substituted = !!$substit; @@ -586,7 +592,7 @@ SQL; */ public function rotate($angle, Alchemyst $alchemyst, MediaVorus $mediavorus) { - if ( ! $this->is_physically_present()) { + if (!$this->is_physically_present()) { throw new \Alchemy\Phrasea\Exception\RuntimeException('You can not rotate a substitution'); } @@ -632,7 +638,7 @@ SQL; */ public function readTechnicalDatas(MediaVorus $mediavorus) { - if ( ! $this->is_physically_present()) { + if (!$this->is_physically_present()) { return []; } @@ -748,8 +754,8 @@ SQL; } $generators = [ - [$this , 'tryGetThumbnailUrl'], - [$this , 'tryGetVideoUrl'], + [$this, 'tryGetThumbnailUrl'], + [$this, 'tryGetVideoUrl'], ]; foreach ($generators as $generator) { diff --git a/lib/classes/record/adapter.php b/lib/classes/record/adapter.php index fc1d435d14..42dbac6254 100644 --- a/lib/classes/record/adapter.php +++ b/lib/classes/record/adapter.php @@ -107,7 +107,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface { $this->app = $app; $this->reference = RecordReference::createFromDataboxIdAndRecordId($sbas_id, $record_id); - $this->number = (int) $number; + $this->number = (int)$number; if ($load) { $this->load(); @@ -198,7 +198,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface */ public function setNumber($number) { - $this->number = (int) $number; + $this->number = (int)$number; return $this; } @@ -611,15 +611,15 @@ class record_adapter implements RecordInterface, cache_cacheableInterface if (isset($availableSubdefs['document'])) { - $mime_ok = !$mimes || in_array($availableSubdefs['document']->get_mime(), (array) $mimes, false); - $devices_ok = !$devices || array_intersect($availableSubdefs['document']->getDevices(), (array) $devices); + $mime_ok = !$mimes || in_array($availableSubdefs['document']->get_mime(), (array)$mimes, false); + $devices_ok = !$devices || array_intersect($availableSubdefs['document']->getDevices(), (array)$devices); if ($mime_ok && $devices_ok) { $subdefs['document'] = $availableSubdefs['document']; } } - $searchDevices = array_merge((array) $devices, (array) databox_subdef::DEVICE_ALL); + $searchDevices = array_merge((array)$devices, (array)databox_subdef::DEVICE_ALL); $type = $this->isStory() ? 'image' : $this->getType(); @@ -645,7 +645,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface continue; } - if ($mimes && !in_array($subdef->get_mime(), (array) $mimes)) { + if ($mimes && !in_array($subdef->get_mime(), (array)$mimes)) { continue; } @@ -769,7 +769,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface $collection = []; foreach ($fields as $field) { - $values = array_map(function(caption_Field_Value $fieldValue) { + $values = array_map(function (caption_Field_Value $fieldValue) { return $fieldValue->getValue(); }, $field->get_values()); @@ -1078,16 +1078,16 @@ class record_adapter implements RecordInterface, cache_cacheableInterface } $record = $this; - $wanted_subdefs = array_map(function(databox_subdef $subDef) { + $wanted_subdefs = array_map(function (databox_subdef $subDef) { return $subDef->get_name(); - }, array_filter(iterator_to_array($subDefDefinitions), function(databox_subdef $subDef) use ($record) { + }, array_filter(iterator_to_array($subDefDefinitions), function (databox_subdef $subDef) use ($record) { return !$record->has_subdef($subDef->get_name()); })); - $missing_subdefs = array_map(function(media_subdef $subDef) { + $missing_subdefs = array_map(function (media_subdef $subDef) { return $subDef->get_name(); - }, array_filter($this->get_subdefs(), function(media_subdef $subdef) { + }, array_filter($this->get_subdefs(), function (media_subdef $subdef) { return !$subdef->is_physically_present(); })); @@ -1569,8 +1569,8 @@ class record_adapter implements RecordInterface, cache_cacheableInterface */ public static function get_records_by_originalname(databox $databox, $original_name, $caseSensitive = false, $offset_start = 0, $how_many = 10) { - $offset_start = (int) ($offset_start < 0 ? 0 : $offset_start); - $how_many = (int) (($how_many > 20 || $how_many < 1) ? 10 : $how_many); + $offset_start = (int)($offset_start < 0 ? 0 : $offset_start); + $how_many = (int)(($how_many > 20 || $how_many < 1) ? 10 : $how_many); $sql = sprintf( 'SELECT record_id FROM record WHERE originalname = :original_name COLLATE %s LIMIT %d, %d', From cde66acb35cbfed4642d6bbf0c0b293ba1651187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 12 Apr 2016 12:10:00 +0200 Subject: [PATCH 229/383] Single Order Proper view models filling. --- lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php index 96d38a51ed..064aa92d97 100644 --- a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php +++ b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php @@ -125,13 +125,10 @@ class ApiOrderController extends BaseOrderController } $model = $this->buildOrderViewModel($order); + $this->fillViewModels([$model], $fractal->getRequestedIncludes()); $resource = new Item($model, $this->getOrderTransformer()); - if (in_array('elements.resource_links', $fractal->getRequestedIncludes(), false)) { - $this->fillViewModels([$resource]); - } - return $this->returnResourceResponse($request, $fractal, $resource); } From b4e6a4bcb76b6c634553f1df5d363fc6e92dc4af Mon Sep 17 00:00:00 2001 From: Thibaud Fabre Date: Tue, 12 Apr 2016 16:34:17 +0200 Subject: [PATCH 230/383] Extract view builder class to build view model --- .../Order/Controller/ApiOrderController.php | 183 ++------------- .../Phrasea/Order/OrderElementTransformer.php | 4 +- ...mentViewModel.php => OrderElementView.php} | 15 +- .../Phrasea/Order/OrderTransformer.php | 4 +- .../{OrderViewModel.php => OrderView.php} | 11 +- .../Phrasea/Order/OrderViewBuilder.php | 222 ++++++++++++++++++ 6 files changed, 263 insertions(+), 176 deletions(-) rename lib/Alchemy/Phrasea/Order/{OrderElementViewModel.php => OrderElementView.php} (88%) rename lib/Alchemy/Phrasea/Order/{OrderViewModel.php => OrderView.php} (87%) create mode 100644 lib/Alchemy/Phrasea/Order/OrderViewBuilder.php diff --git a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php index 064aa92d97..2b0e05a618 100644 --- a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php +++ b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php @@ -20,10 +20,11 @@ use Alchemy\Phrasea\Model\Entities\Order; use Alchemy\Phrasea\Model\Entities\OrderElement; use Alchemy\Phrasea\Model\RecordReferenceInterface; use Alchemy\Phrasea\Order\OrderElementTransformer; -use Alchemy\Phrasea\Order\OrderElementViewModel; +use Alchemy\Phrasea\Order\OrderElementView; use Alchemy\Phrasea\Order\OrderFiller; use Alchemy\Phrasea\Order\OrderTransformer; -use Alchemy\Phrasea\Order\OrderViewModel; +use Alchemy\Phrasea\Order\OrderView; +use Alchemy\Phrasea\Order\OrderViewBuilder; use Alchemy\Phrasea\Record\RecordReference; use Alchemy\Phrasea\Record\RecordReferenceCollection; use Assert\Assertion; @@ -74,7 +75,7 @@ class ApiOrderController extends BaseOrderController { $page = max((int) $request->get('page', '1'), 1); $perPage = min(max((int)$request->get('per_page', '10'), 1), 100); - $fractal = $this->parseIncludes($request->get('includes', [])); + $fractal = $this->buildFractalManager($request->get('includes', [])); $routeGenerator = function ($page) use ($perPage) { return $this->app->path('api_v2_orders_index', [ @@ -95,8 +96,10 @@ class ApiOrderController extends BaseOrderController ; } - $collection = $this->buildOrderViewModels($builder->getQuery()->getResult()); - $this->fillViewModels($collection, $fractal->getRequestedIncludes()); + $collection = $this->getViewBuilder()->buildViews( + $builder->getQuery()->getResult(), + $fractal->getRequestedIncludes() + ); $resource = new Collection($collection, $this->getOrderTransformer()); @@ -118,15 +121,13 @@ class ApiOrderController extends BaseOrderController { $order = $this->findOr404($orderId); - $fractal = $this->parseIncludes($request->get('includes', [])); + $fractal = $this->buildFractalManager($request->get('includes', [])); if ($order->getUser()->getId() !== $this->getAuthenticatedUser()->getId()) { throw new AccessDeniedHttpException(sprintf('Cannot access order "%d"', $order->getId())); } - $model = $this->buildOrderViewModel($order); - $this->fillViewModels([$model], $fractal->getRequestedIncludes()); - + $model = $this->getViewBuilder()->buildView($order, $fractal->getRequestedIncludes()); $resource = new Item($model, $this->getOrderTransformer()); return $this->returnResourceResponse($request, $fractal, $resource); @@ -209,7 +210,7 @@ class ApiOrderController extends BaseOrderController * @param string|array $includes * @return Manager */ - private function parseIncludes($includes) + private function buildFractalManager($includes) { $fractal = new Manager(); @@ -226,7 +227,7 @@ class ApiOrderController extends BaseOrderController */ private function returnResourceResponse(Request $request, $includes, ResourceInterface $resource) { - $fractal = $includes instanceof Manager ? $includes : $this->parseIncludes($includes); + $fractal = $includes instanceof Manager ? $includes : $this->buildFractalManager($includes); return Result::create($request, $fractal->createData($resource)->toArray())->createResponse(); } @@ -248,162 +249,12 @@ class ApiOrderController extends BaseOrderController return $elementIds; } - /** - * @param OrderViewModel[] $models - * @param array $includes - * @return void - */ - private function fillViewModels(array $models, array $includes) + private function getViewBuilder() { - if (!in_array('elements', $includes, true)) { - return; - } - - $elements = $this->gatherElements($models); - - $allElements = $elements ? call_user_func_array('array_merge', $elements) : []; - $allElements = array_combine( - array_map(function (OrderElement $element) { - return $element->getId(); - }, $allElements), - $allElements + return new OrderViewBuilder( + $this->app, + $this->getApplicationBox(), + $this->app['service.media_subdef'] ); - - if (!$allElements) { - return; - } - - $collectionToDataboxMap = $this->mapBaseIdToDataboxId($allElements); - - $records = RecordReferenceCollection::fromListExtractor( - $allElements, - function (OrderElement $element) use ($collectionToDataboxMap) { - return isset($collectionToDataboxMap[$element->getBaseId()]) - ? [$collectionToDataboxMap[$element->getBaseId()], $element->getRecordId()] - : null; - }, - function (array $data) { - list ($databoxId, $recordId) = $data; - - return RecordReference::createFromDataboxIdAndRecordId($databoxId, $recordId); - } - ); - - $this->createOrderElementViewModels($models, $elements, $records); - - if (!in_array('elements.resource_links', $includes, true)) { - return; - } - - // Load all records - $records->toRecords($this->getApplicationBox()); - - // Load all subdefs - $subdefs = $this->app['service.media_subdef']->findSubdefsFromRecordReferenceCollection($records); - \media_Permalink_Adapter::getMany($this->app, $subdefs); - - $orderableSubdefs = []; - - foreach ($subdefs as $subdef) { - $databoxId = $subdef->get_sbas_id(); - $recordId = $subdef->get_record_id(); - - if (!isset($orderableSubdefs[$databoxId][$recordId])) { - $orderableSubdefs[$databoxId][$recordId] = []; - } - - $orderableSubdefs[$databoxId][$recordId][] = $subdef; - } - - foreach ($models as $model) { - foreach ($model->getElements() as $element) { - $databoxId = $collectionToDataboxMap[$element->getElement()->getBaseId()]; - $recordId = $element->getElement()->getRecordId(); - - if (isset($orderableSubdefs[$databoxId][$recordId])) { - $element->setOrderableMediaSubdefs($orderableSubdefs[$databoxId][$recordId]); - } - } - } - } - - /** - * @param Order[] $orders - * @return OrderViewModel[] - */ - private function buildOrderViewModels(array $orders) - { - Assertion::allIsInstanceOf($orders, Order::class); - - return array_map(function (Order $order) { - return new OrderViewModel($order); - }, $orders); - } - - private function buildOrderViewModel(Order $order) - { - return new OrderViewModel($order); - } - - /** - * @param OrderViewModel[] $models - * @return OrderElement[][] - */ - private function gatherElements(array $models) - { - Assertion::allIsInstanceOf($models, OrderViewModel::class); - - $elements = []; - - foreach ($models as $index => $model) { - $elements[$index] = $model->getOrder()->getElements()->toArray(); - } - - return $elements; - } - - /** - * @param OrderElement[] $elements - * @return array - */ - private function mapBaseIdToDataboxId(array $elements) - { - $baseIds = array_keys(array_reduce($elements, function (array &$baseIds, OrderElement $element) { - $baseIds[$element->getBaseId()] = true; - - return $baseIds; - }, [])); - - $collectionToDataboxMap = []; - - foreach ($this->app['repo.collection-references']->findMany($baseIds) as $collectionReference) { - $collectionToDataboxMap[$collectionReference->getBaseId()] = $collectionReference->getDataboxId(); - } - - return $collectionToDataboxMap; - } - - /** - * @param OrderViewModel[] $orderViewModels - * @param OrderElement[][] $elements - * @param RecordReferenceInterface[]|RecordReferenceCollection $records - * @return void - */ - private function createOrderElementViewModels(array $orderViewModels, $elements, $records) - { - $user = $this->getAuthenticatedUser(); - - foreach ($orderViewModels as $index => $model) { - $models = []; - - /** @var OrderElement $element */ - foreach ($elements[$index] as $elementIndex => $element) { - if (isset($records[$element->getId()])) { - $models[$elementIndex] = new OrderElementViewModel($element, $records[$element->getId()], $user); - } - } - - $model->setViewElements($models); - } } } diff --git a/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php b/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php index 7b49837daf..a7878f344e 100644 --- a/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php +++ b/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php @@ -31,7 +31,7 @@ class OrderElementTransformer extends TransformerAbstract $this->urlGenerator = $urlGenerator; } - public function transform(OrderElementViewModel $model) + public function transform(OrderElementView $model) { $element = $model->getElement(); $record = $model->getRecordReference(); @@ -54,7 +54,7 @@ class OrderElementTransformer extends TransformerAbstract return $data; } - public function includeResourceLinks(OrderElementViewModel $model, ParamBag $params = null) + public function includeResourceLinks(OrderElementView $model, ParamBag $params = null) { $ttl = null; diff --git a/lib/Alchemy/Phrasea/Order/OrderElementViewModel.php b/lib/Alchemy/Phrasea/Order/OrderElementView.php similarity index 88% rename from lib/Alchemy/Phrasea/Order/OrderElementViewModel.php rename to lib/Alchemy/Phrasea/Order/OrderElementView.php index 9440f54a7e..a4d2c31135 100644 --- a/lib/Alchemy/Phrasea/Order/OrderElementViewModel.php +++ b/lib/Alchemy/Phrasea/Order/OrderElementView.php @@ -15,7 +15,7 @@ use Alchemy\Phrasea\Model\Entities\User; use Alchemy\Phrasea\Model\RecordReferenceInterface; use Assert\Assertion; -class OrderElementViewModel +class OrderElementView { /** * @var OrderElement @@ -39,6 +39,7 @@ class OrderElementViewModel /** * OrderElementViewModel constructor. + * * @param OrderElement $element * @param RecordReferenceInterface $record * @param User $user @@ -50,16 +51,25 @@ class OrderElementViewModel $this->user = $user; } + /** + * @return OrderElement + */ public function getElement() { return $this->element; } + /** + * @return RecordReferenceInterface + */ public function getRecordReference() { return $this->record; } + /** + * @return User + */ public function getAuthenticatedUser() { return $this->user; @@ -75,6 +85,9 @@ class OrderElementViewModel $this->subdefs = $subdefs instanceof \Traversable ? iterator_to_array($subdefs) : $subdefs; } + /** + * @return \media_subdef[] + */ public function getOrderableMediaSubdefs() { return $this->subdefs; diff --git a/lib/Alchemy/Phrasea/Order/OrderTransformer.php b/lib/Alchemy/Phrasea/Order/OrderTransformer.php index 9775031da1..9838e9dafa 100644 --- a/lib/Alchemy/Phrasea/Order/OrderTransformer.php +++ b/lib/Alchemy/Phrasea/Order/OrderTransformer.php @@ -28,7 +28,7 @@ class OrderTransformer extends TransformerAbstract $this->elementTransformer = $elementTransformer; } - public function transform(OrderViewModel $view) + public function transform(OrderView $view) { $order = $view->getOrder(); @@ -47,7 +47,7 @@ class OrderTransformer extends TransformerAbstract return $data; } - public function includeElements(OrderViewModel $order) + public function includeElements(OrderView $order) { $elements = $order->getElements(); diff --git a/lib/Alchemy/Phrasea/Order/OrderViewModel.php b/lib/Alchemy/Phrasea/Order/OrderView.php similarity index 87% rename from lib/Alchemy/Phrasea/Order/OrderViewModel.php rename to lib/Alchemy/Phrasea/Order/OrderView.php index 6acb27bb90..cd43659ba1 100644 --- a/lib/Alchemy/Phrasea/Order/OrderViewModel.php +++ b/lib/Alchemy/Phrasea/Order/OrderView.php @@ -13,14 +13,15 @@ namespace Alchemy\Phrasea\Order; use Alchemy\Phrasea\Model\Entities\Order; use Assert\Assertion; -class OrderViewModel +class OrderView { /** * @var Order */ private $order; + /** - * @var OrderElementViewModel[] + * @var OrderElementView[] */ private $viewElements = []; @@ -33,11 +34,11 @@ class OrderViewModel } /** - * @param $viewElements + * @param OrderElementView[] $viewElements */ public function setViewElements($viewElements) { - Assertion::allIsInstanceOf($viewElements, OrderElementViewModel::class); + Assertion::allIsInstanceOf($viewElements, OrderElementView::class); $this->viewElements = $viewElements instanceof \Traversable ? iterator_to_array($viewElements) : $viewElements; } @@ -51,7 +52,7 @@ class OrderViewModel } /** - * @return OrderElementViewModel[] + * @return OrderElementView[] */ public function getElements() { diff --git a/lib/Alchemy/Phrasea/Order/OrderViewBuilder.php b/lib/Alchemy/Phrasea/Order/OrderViewBuilder.php new file mode 100644 index 0000000000..88f5dc6600 --- /dev/null +++ b/lib/Alchemy/Phrasea/Order/OrderViewBuilder.php @@ -0,0 +1,222 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Alchemy\Phrasea\Order; + +use Alchemy\Phrasea\Application; +use Alchemy\Phrasea\Databox\Subdef\MediaSubdefService; +use Alchemy\Phrasea\Model\Entities\Order; +use Alchemy\Phrasea\Model\Entities\OrderElement; +use Alchemy\Phrasea\Model\Entities\User; +use Alchemy\Phrasea\Model\RecordReferenceInterface; +use Alchemy\Phrasea\Record\RecordReference; +use Alchemy\Phrasea\Record\RecordReferenceCollection; +use Assert\Assertion; + +class OrderViewBuilder +{ + + /** + * @var Application + */ + private $application; + + /** + * @var \appbox + */ + private $applicationBox; + + /** + * @var MediaSubdefService + */ + private $mediaSubdefService; + + /** + * @param Application $application + * @param \appbox $appbox + * @param MediaSubdefService $subdefService + */ + public function __construct(Application $application, \appbox $appbox, MediaSubdefService $subdefService) + { + $this->application = $application; + $this->applicationBox = $appbox; + $this->mediaSubdefService = $subdefService; + } + + public function buildView(Order $order, array $includes) + { + $view = new OrderView($order); + + $this->fillViews([$view], $includes); + + return $view; + } + + /** + * @param Order[] $orders + * @param string[] $includes + * @return OrderView[] + */ + public function buildViews(array $orders, array $includes) + { + Assertion::allIsInstanceOf($orders, Order::class); + + $views = array_map(function (Order $order) { + return new OrderView($order); + }, $orders); + + $this->fillViews($views, $includes); + + return $views; + } + + /** + * @param OrderView[] $views + * @param array $includes + * @return void + */ + private function fillViews(array $views, array $includes) + { + if (!in_array('elements', $includes, true)) { + return; + } + + $elements = $this->gatherElements($views); + + $allElements = $elements ? call_user_func_array('array_merge', $elements) : []; + $allElements = array_combine( + array_map(function (OrderElement $element) { + return $element->getId(); + }, $allElements), + $allElements + ); + + if (!$allElements) { + return; + } + + $collectionToDataboxMap = $this->mapBaseIdToDataboxId($allElements); + + $records = RecordReferenceCollection::fromListExtractor( + $allElements, + function (OrderElement $element) use ($collectionToDataboxMap) { + return isset($collectionToDataboxMap[$element->getBaseId()]) + ? [$collectionToDataboxMap[$element->getBaseId()], $element->getRecordId()] + : null; + }, + function (array $data) { + list ($databoxId, $recordId) = $data; + + return RecordReference::createFromDataboxIdAndRecordId($databoxId, $recordId); + } + ); + + $this->createOrderElementViews($views, $elements, $records); + + if (!in_array('elements.resource_links', $includes, true)) { + return; + } + + // Load all records + $records->toRecords($this->applicationBox); + + // Load all subdefs + $subdefs = $this->mediaSubdefService->findSubdefsFromRecordReferenceCollection($records); + \media_Permalink_Adapter::getMany($this->application, $subdefs); + + $orderableSubdefs = []; + + foreach ($subdefs as $subdef) { + $databoxId = $subdef->get_sbas_id(); + $recordId = $subdef->get_record_id(); + + if (!isset($orderableSubdefs[$databoxId][$recordId])) { + $orderableSubdefs[$databoxId][$recordId] = []; + } + + $orderableSubdefs[$databoxId][$recordId][] = $subdef; + } + + foreach ($views as $model) { + foreach ($model->getElements() as $element) { + $databoxId = $collectionToDataboxMap[$element->getElement()->getBaseId()]; + $recordId = $element->getElement()->getRecordId(); + + if (isset($orderableSubdefs[$databoxId][$recordId])) { + $element->setOrderableMediaSubdefs($orderableSubdefs[$databoxId][$recordId]); + } + } + } + } + + + /** + * @param OrderView[] $elements + * @return OrderElement[][] + */ + private function gatherElements(array $elements) + { + Assertion::allIsInstanceOf($elements, OrderView::class); + + $elements = []; + + foreach ($elements as $index => $model) { + $elements[$index] = $model->getOrder()->getElements()->toArray(); + } + + return $elements; + } + + /** + * @param OrderElement[] $elements + * @return array + */ + private function mapBaseIdToDataboxId(array $elements) + { + $baseIds = array_keys(array_reduce($elements, function (array &$baseIds, OrderElement $element) { + $baseIds[$element->getBaseId()] = true; + + return $baseIds; + }, [])); + + $collectionToDataboxMap = []; + + foreach ($this->application['repo.collection-references']->findMany($baseIds) as $collectionReference) { + $collectionToDataboxMap[$collectionReference->getBaseId()] = $collectionReference->getDataboxId(); + } + + return $collectionToDataboxMap; + } + + /** + * @param OrderView[] $orderViews + * @param OrderElement[][] $elements + * @param RecordReferenceInterface[]|RecordReferenceCollection $records + * @return void + */ + private function createOrderElementViews(array $orderViews, $elements, $records) + { + $user = $this->application->getAuthenticatedUser(); + + foreach ($orderViews as $index => $model) { + $models = []; + + /** @var OrderElement $element */ + foreach ($elements[$index] as $elementIndex => $element) { + if (isset($records[$element->getId()])) { + $models[$elementIndex] = new OrderElementView($element, $records[$element->getId()], $user); + } + } + + $model->setViewElements($models); + } + } +} From 6d1045bbc8bcfcb12fece128ade31b4d2febfab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 12 Apr 2016 18:11:16 +0200 Subject: [PATCH 231/383] Fix Badly renamed variable --- lib/Alchemy/Phrasea/Order/OrderViewBuilder.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Alchemy/Phrasea/Order/OrderViewBuilder.php b/lib/Alchemy/Phrasea/Order/OrderViewBuilder.php index 88f5dc6600..dc150897c5 100644 --- a/lib/Alchemy/Phrasea/Order/OrderViewBuilder.php +++ b/lib/Alchemy/Phrasea/Order/OrderViewBuilder.php @@ -159,17 +159,17 @@ class OrderViewBuilder /** - * @param OrderView[] $elements + * @param OrderView[] $orderViews * @return OrderElement[][] */ - private function gatherElements(array $elements) + private function gatherElements(array $orderViews) { - Assertion::allIsInstanceOf($elements, OrderView::class); + Assertion::allIsInstanceOf($orderViews, OrderView::class); $elements = []; - foreach ($elements as $index => $model) { - $elements[$index] = $model->getOrder()->getElements()->toArray(); + foreach ($orderViews as $index => $orderView) { + $elements[$index] = $orderView->getOrder()->getElements()->toArray(); } return $elements; From bae28329ab86802b59d98a7e033603e5dd741855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 12 Apr 2016 12:23:18 +0200 Subject: [PATCH 232/383] Add doctrine/cache to required dependencies --- composer.json | 1 + composer.lock | 60 +++++++++++++++++++++------------------------------ 2 files changed, 25 insertions(+), 36 deletions(-) diff --git a/composer.json b/composer.json index 507a9b7d79..87c5145838 100644 --- a/composer.json +++ b/composer.json @@ -47,6 +47,7 @@ "dailymotion/sdk": "~1.5", "data-uri/data-uri": "~0.1.0", "dflydev/doctrine-orm-service-provider": "~1.0", + "doctrine/cache": "^1.6", "doctrine/dbal": "^2.4.0", "doctrine/migrations": "^1.0.0", "doctrine/orm": "^2.4.0", diff --git a/composer.lock b/composer.lock index af6777eb03..e9aa12e5bf 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "4d87bea1754aa828f26ba156c8ddc6f9", - "content-hash": "4cedf96f99dc6755eb4ec60d9d9f97f5", + "hash": "c14533f5de6e67350e76f68e5814e122", + "content-hash": "b49e25a0ed3d566b1411aa46f3f563df", "packages": [ { "name": "alchemy-fr/tcpdf-clone", @@ -15,12 +15,6 @@ "url": "https://github.com/alchemy-fr/tcpdf-clone.git", "reference": "2ba0248a7187f1626df6c128750650416267f0e7" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/tcpdf-clone/zipball/2ba0248a7187f1626df6c128750650416267f0e7", - "reference": "2ba0248a7187f1626df6c128750650416267f0e7", - "shasum": "" - }, "require": { "php": ">=5.3.0" }, @@ -67,10 +61,6 @@ "qrcode", "tcpdf" ], - "support": { - "source": "https://github.com/alchemy-fr/tcpdf-clone/tree/6.0.039", - "issues": "https://github.com/alchemy-fr/tcpdf-clone/issues" - }, "time": "2013-10-13 16:11:17" }, { @@ -546,12 +536,6 @@ "url": "https://github.com/alchemy-fr/symfony-cors.git", "reference": "dbf7fcff1ce9fc1265db12955476ff169eab7375" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/symfony-cors/zipball/dbf7fcff1ce9fc1265db12955476ff169eab7375", - "reference": "dbf7fcff1ce9fc1265db12955476ff169eab7375", - "shasum": "" - }, "require": { "symfony/http-kernel": "^2.3.0|^3.0.0" }, @@ -572,7 +556,11 @@ "Alchemy\\CorsBundle\\": "src/Bundle/" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "Alchemy\\Cors\\Tests\\": "tests/unit/Component/" + } + }, "license": [ "MIT" ], @@ -1803,12 +1791,12 @@ "source": { "type": "git", "url": "https://github.com/igorw/evenement.git", - "reference": "fa966683e7df3e5dd5929d984a44abfbd6bafe8d" + "reference": "v1.0.0" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/igorw/evenement/zipball/fa966683e7df3e5dd5929d984a44abfbd6bafe8d", - "reference": "fa966683e7df3e5dd5929d984a44abfbd6bafe8d", + "reference": "v1.0.0", "shasum": "" }, "require": { @@ -1835,7 +1823,7 @@ "keywords": [ "event-dispatcher" ], - "time": "2012-05-30 15:01:08" + "time": "2012-05-30 08:01:08" }, { "name": "facebook/php-sdk", @@ -1881,7 +1869,6 @@ "facebook", "sdk" ], - "abandoned": "facebook/php-sdk-v4", "time": "2013-11-19 23:11:14" }, { @@ -2723,12 +2710,12 @@ "source": { "type": "git", "url": "https://github.com/hoaproject/Stream.git", - "reference": "3bc446bc00849bf51166adc415d77aa375d48d8c" + "reference": "011ab91d942f1d7096deade4c8a10fe57d51c5b3" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/hoaproject/Stream/zipball/3bc446bc00849bf51166adc415d77aa375d48d8c", - "reference": "3bc446bc00849bf51166adc415d77aa375d48d8c", + "reference": "011ab91d942f1d7096deade4c8a10fe57d51c5b3", "shasum": "" }, "require": { @@ -2773,7 +2760,7 @@ "stream", "wrapper" ], - "time": "2015-10-26 12:21:43" + "time": "2015-10-22 06:30:43" }, { "name": "hoa/ustring", @@ -3804,7 +3791,7 @@ ], "authors": [ { - "name": "Steve Clay", + "name": "Stephen Clay", "email": "steve@mrclay.org", "homepage": "http://www.mrclay.org/", "role": "Developer" @@ -3990,21 +3977,21 @@ "source": { "type": "git", "url": "https://github.com/romainneutron/Imagine-Silex-Service-Provider.git", - "reference": "a8a7862ae90419f2b23746cd8436c2310e4eb084" + "reference": "0.1.2" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/romainneutron/Imagine-Silex-Service-Provider/zipball/a8a7862ae90419f2b23746cd8436c2310e4eb084", - "reference": "a8a7862ae90419f2b23746cd8436c2310e4eb084", + "reference": "0.1.2", "shasum": "" }, "require": { "imagine/imagine": "*", "php": ">=5.3.3", - "silex/silex": "~1.0" + "silex/silex": ">=1.0,<2.0" }, "require-dev": { - "symfony/browser-kit": "~2.0" + "symfony/browser-kit": ">=2.0,<3.0" }, "type": "library", "autoload": { @@ -4810,12 +4797,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "ce4c36bdc9310ba76fdd167f16978f14ab3b8e42" + "reference": "438196c8f66647073bcaf99908b543bda7ffd6d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/ce4c36bdc9310ba76fdd167f16978f14ab3b8e42", - "reference": "ce4c36bdc9310ba76fdd167f16978f14ab3b8e42", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/438196c8f66647073bcaf99908b543bda7ffd6d4", + "reference": "438196c8f66647073bcaf99908b543bda7ffd6d4", "shasum": "" }, "conflict": { @@ -4849,6 +4836,7 @@ "phpmailer/phpmailer": ">=5,<5.2.14", "pusher/pusher-php-server": "<2.2.1", "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", + "shopware/shopware": "<4.3.7|>=5,<5.1|>=5.1,<5.1.5", "silverstripe/cms": ">=3.1,<3.1.11|>=3,<=3.0.11", "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", "silverstripe/framework": ">=3,<3.1|>=3.1,<3.2|>=3.2,<3.3", @@ -4920,7 +4908,7 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2016-03-15 19:40:54" + "time": "2016-04-11 16:52:34" }, { "name": "seld/jsonlint", @@ -5423,7 +5411,7 @@ }, { "name": "Phraseanet Team", - "email": "info@alchemy.fr", + "email": "support@alchemy.fr", "homepage": "http://www.phraseanet.com/" } ], From 2b0418c38f907ca21ec52d49644e41c28fc725f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 13 Apr 2016 14:46:13 +0200 Subject: [PATCH 233/383] Fixup ParamBag handling --- .../Phrasea/Order/OrderElementTransformer.php | 39 +++++++++++++------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php b/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php index a7878f344e..d28ef5d036 100644 --- a/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php +++ b/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php @@ -10,7 +10,6 @@ namespace Alchemy\Phrasea\Order; -use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Media\MediaSubDefinitionUrlGenerator; use League\Fractal\ParamBag; use League\Fractal\TransformerAbstract; @@ -58,20 +57,19 @@ class OrderElementTransformer extends TransformerAbstract { $ttl = null; - if ($params) { - $usedParams = array_keys(iterator_to_array($params)); + $parameterArray = $this->extractParamBagValues($params); + $usedParams = array_keys(array_filter($parameterArray)); - if (array_diff($usedParams, $this->validParams)) { - throw new \RuntimeException(sprintf( - 'Invalid param(s): "%s". Valid param(s): "%s"', - implode(', ', $usedParams), - implode(', ', $this->validParams) - )); - } - - list ($ttl) = $params->get('ttl'); + if (array_diff($usedParams, $this->validParams)) { + throw new \RuntimeException(sprintf( + 'Invalid param(s): "%s". Valid param(s): "%s"', + implode(', ', $usedParams), + implode(', ', $this->validParams) + )); } + list ($ttl) = $parameterArray['ttl']; + if (null === $ttl) { $ttl = $this->urlGenerator->getDefaultTTL(); } @@ -87,4 +85,21 @@ class OrderElementTransformer extends TransformerAbstract ]; }); } + + /** + * @param ParamBag|null $params + * @return array + */ + private function extractParamBagValues(ParamBag $params = null) + { + $array = array_fill_keys($this->validParams, null); + + if ($params) { + array_walk($array, function (&$value, $key) use ($params) { + $value = $params[$key]; + }); + } + + return $array; + } } From 33f42f6ba2cc4be6b1d38269ad9b2466e2d03f98 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Wed, 13 Apr 2016 14:52:06 +0200 Subject: [PATCH 234/383] Bump phraseanet-production-client - added gps coords search --- package.json | 2 +- resources/www/common/images/icons/map.png | Bin 0 -> 1304 bytes templates/web/prod/index.html.twig | 3 +++ 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 resources/www/common/images/icons/map.png diff --git a/package.json b/package.json index f50537df2b..fc6f52a80a 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,6 @@ "postinstall": "./node_modules/.bin/gulp install;" }, "dependencies": { - "phraseanet-production-client": "~0.15.0" + "phraseanet-production-client": "~0.16.0" } } diff --git a/resources/www/common/images/icons/map.png b/resources/www/common/images/icons/map.png new file mode 100644 index 0000000000000000000000000000000000000000..4e8d1ec0aca3c23a229d36380147d4b7ffa5a3e6 GIT binary patch literal 1304 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%o>>?5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8hm3bwJ6}oxF$}kgLQj3#|G7CyF^YauyCMG83 zmzLNn0bL65LT&-v*t}wBFaZNhzap_f-%!s0*lEl2^R8JRMC7?NanVBh8MviV~7DkpXZkFb*hK8=DPNvRIj*d)-x;Uhz81{Kz)%D~FAI zKGce*EnMXnb?T|z{JO)oW{DA%^PAWtF8Y4kslsXO$y&AY(7p}RT@>xO3tU?DlT9Cf z%S`{k!+hb0U8cR`NpIIp3$rhf-SOYo)%XIR_y&edj)FI$n{0N5S+s}7x;jR* zIKD^@txUB!ZzuWs`JDxNfikZW_$I|nNmcbT4eeWMX}-?e<-@~NxVJ)H4BP+8pW!0wN=Yd%kLwwtE6 zefx=n)_HIIJypK#Fnjg9(2K{h|Do=j>M2uPG*vIgE2rMtmix!OhQokip;x4W*?s + + +
    From 44119b85594bcae33742d07448f53bc0b1070a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 13 Apr 2016 15:11:09 +0200 Subject: [PATCH 235/383] Properly set subdef name when transforming OrderElement --- .../Phrasea/Order/OrderElementTransformer.php | 17 ++++++++++------- lib/Alchemy/Phrasea/Order/OrderViewBuilder.php | 1 - 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php b/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php index d28ef5d036..2e961dcf93 100644 --- a/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php +++ b/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php @@ -55,8 +55,6 @@ class OrderElementTransformer extends TransformerAbstract public function includeResourceLinks(OrderElementView $model, ParamBag $params = null) { - $ttl = null; - $parameterArray = $this->extractParamBagValues($params); $usedParams = array_keys(array_filter($parameterArray)); @@ -74,13 +72,18 @@ class OrderElementTransformer extends TransformerAbstract $ttl = $this->urlGenerator->getDefaultTTL(); } - $urls = $this->urlGenerator->generateMany($model->getAuthenticatedUser(), $model->getOrderableMediaSubdefs(), $ttl); - $urls = array_map(null, array_keys($urls), array_values($urls)); + $subdefs = $model->getOrderableMediaSubdefs(); + $urls = $this->urlGenerator->generateMany($model->getAuthenticatedUser(), $subdefs, $ttl); + + $data = array_map(null, $subdefs, $urls); + + return $this->collection($data, function (array $data) use ($ttl) { + /** @var \media_subdef $subdef */ + list($subdef, $url) = $data; - return $this->collection($urls, function (array $data) use ($ttl) { return [ - 'name' => $data[0], - 'url' => $data[1], + 'name' => $subdef->get_name(), + 'url' => $url, 'url_ttl' => $ttl, ]; }); diff --git a/lib/Alchemy/Phrasea/Order/OrderViewBuilder.php b/lib/Alchemy/Phrasea/Order/OrderViewBuilder.php index dc150897c5..bd31b48dbf 100644 --- a/lib/Alchemy/Phrasea/Order/OrderViewBuilder.php +++ b/lib/Alchemy/Phrasea/Order/OrderViewBuilder.php @@ -15,7 +15,6 @@ use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Databox\Subdef\MediaSubdefService; use Alchemy\Phrasea\Model\Entities\Order; use Alchemy\Phrasea\Model\Entities\OrderElement; -use Alchemy\Phrasea\Model\Entities\User; use Alchemy\Phrasea\Model\RecordReferenceInterface; use Alchemy\Phrasea\Record\RecordReference; use Alchemy\Phrasea\Record\RecordReferenceCollection; From 7a25b499e347c464f9a980fc8d66d7f0de47d12e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 13 Apr 2016 18:50:39 +0200 Subject: [PATCH 236/383] Deprecated set_binary_status and use setStatus instead. --- lib/Alchemy/Phrasea/Border/Manager.php | 2 +- .../Phrasea/Command/Upgrade/Step35.php | 2 +- .../Phrasea/Controller/Api/V1Controller.php | 2 +- .../Controller/Prod/EditController.php | 2 +- .../Controller/Prod/PropertyController.php | 2 +- .../Model/Manipulator/LazaretManipulator.php | 2 +- .../Phrasea/TaskManager/Job/ArchiveJob.php | 2 +- .../TaskManager/Job/RecordMoverJob.php | 2 +- lib/classes/record/adapter.php | 27 ++++++++++--------- tests/classes/ACLTest.php | 10 +++---- tests/classes/record/adapterTest.php | 4 +-- 11 files changed, 30 insertions(+), 27 deletions(-) diff --git a/lib/Alchemy/Phrasea/Border/Manager.php b/lib/Alchemy/Phrasea/Border/Manager.php index 23346e594d..b2b6be2c71 100644 --- a/lib/Alchemy/Phrasea/Border/Manager.php +++ b/lib/Alchemy/Phrasea/Border/Manager.php @@ -314,7 +314,7 @@ class Manager break; case AttributeInterface::NAME_STATUS: /** @var StatusAttr $attribute */ - $element->set_binary_status(decbin(bindec($element->get_status()) | bindec($attribute->getValue()))); + $element->setStatus(decbin(bindec($element->get_status()) | bindec($attribute->getValue()))); break; case AttributeInterface::NAME_STORY: diff --git a/lib/Alchemy/Phrasea/Command/Upgrade/Step35.php b/lib/Alchemy/Phrasea/Command/Upgrade/Step35.php index d3219effe6..c9246cf319 100644 --- a/lib/Alchemy/Phrasea/Command/Upgrade/Step35.php +++ b/lib/Alchemy/Phrasea/Command/Upgrade/Step35.php @@ -84,7 +84,7 @@ class Step35 implements DatasUpgraderInterface } try { - $record->set_binary_status($row['status']); + $record->setStatus($row['status']); } catch (\Exception $e) { $this->app['monolog']->addError(sprintf("Error while upgrading status for record %d on databox %d : %s", $record->getRecordId(), $record->getDataboxId(), $e->getMessage())); } diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index 126611ef2b..dc3e614abd 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -1564,7 +1564,7 @@ class V1Controller extends Controller $datas = substr($datas, 0, ($n)) . $value . substr($datas, ($n + 2)); } - $record->set_binary_status(strrev($datas)); + $record->setStatus(strrev($datas)); // @todo Move event dispatch inside record_adapter class (keeps things encapsulated) $this->dispatch(PhraseaEvents::RECORD_EDIT, new RecordEdit($record)); diff --git a/lib/Alchemy/Phrasea/Controller/Prod/EditController.php b/lib/Alchemy/Phrasea/Controller/Prod/EditController.php index 354aa27ddc..2a97741f9b 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/EditController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/EditController.php @@ -361,7 +361,7 @@ class EditController extends Controller $newstat = \databox_status::operation_or($newstat, $mask_or); } - $record->set_binary_status($newstat); + $record->setStatus($newstat); } $record diff --git a/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php b/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php index c6997a1325..277eba8235 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php @@ -196,7 +196,7 @@ class PropertyController extends Controller $newStatus .= isset($postStatus[$i]) ? ($postStatus[$i] ? '1' : '0') : $currentStatus[$i]; } - $record->set_binary_status(strrev($newStatus)); + $record->setStatus(strrev($newStatus)); return [ 'current_status' => $currentStatus, diff --git a/lib/Alchemy/Phrasea/Model/Manipulator/LazaretManipulator.php b/lib/Alchemy/Phrasea/Model/Manipulator/LazaretManipulator.php index 98dac9ad8b..7febfbc983 100644 --- a/lib/Alchemy/Phrasea/Model/Manipulator/LazaretManipulator.php +++ b/lib/Alchemy/Phrasea/Model/Manipulator/LazaretManipulator.php @@ -194,7 +194,7 @@ class LazaretManipulator $value->appendChild($record); break; case AttributeInterface::NAME_STATUS: - $record->set_binary_status($attribute->getValue()); + $record->setStatus($attribute->getValue()); break; case AttributeInterface::NAME_METAFIELD: /** @var Border\Attribute\MetaField $attribute */ diff --git a/lib/Alchemy/Phrasea/TaskManager/Job/ArchiveJob.php b/lib/Alchemy/Phrasea/TaskManager/Job/ArchiveJob.php index c5c5313a3b..210d00e85e 100644 --- a/lib/Alchemy/Phrasea/TaskManager/Job/ArchiveJob.php +++ b/lib/Alchemy/Phrasea/TaskManager/Job/ArchiveJob.php @@ -1011,7 +1011,7 @@ class ArchiveJob extends AbstractJob $story->set_metadatas($metaFields->toMetadataArray($metadatasStructure), true); } - $story->set_binary_status(\databox_status::operation_or($stat0, $stat1)); + $story->setStatus(\databox_status::operation_or($stat0, $stat1)); $story->rebuild_subdefs(); unset($media); diff --git a/lib/Alchemy/Phrasea/TaskManager/Job/RecordMoverJob.php b/lib/Alchemy/Phrasea/TaskManager/Job/RecordMoverJob.php index 07a175e8a0..5cb37ca047 100644 --- a/lib/Alchemy/Phrasea/TaskManager/Job/RecordMoverJob.php +++ b/lib/Alchemy/Phrasea/TaskManager/Job/RecordMoverJob.php @@ -98,7 +98,7 @@ class RecordMoverJob extends AbstractJob } } $status = implode('', $status); - $rec->set_binary_status($status); + $rec->setStatus($status); if ($logsql) { $this->log('debug', sprintf("on sbas %s set rid %s status to %s \n", $row['sbas_id'], $row['record_id'], $status)); } diff --git a/lib/classes/record/adapter.php b/lib/classes/record/adapter.php index 42dbac6254..18a3c35383 100644 --- a/lib/classes/record/adapter.php +++ b/lib/classes/record/adapter.php @@ -1109,21 +1109,13 @@ class record_adapter implements RecordInterface, cache_cacheableInterface } /** - * @param string $status + * @param string $status * @return record_adapter + * @deprecated use {@link self::setStatus()} instead */ public function set_binary_status($status) { - $connection = $this->getDataboxConnection(); - - $connection->executeUpdate( - 'UPDATE record SET moddate = NOW(), status = :status WHERE record_id= :record_id', - ['status' => bindec($status), 'record_id' => $this->getRecordId()] - ); - - $this->delete_data_from_cache(self::CACHE_STATUS); - - $this->dispatch(RecordEvents::STATUS_CHANGED, new StatusChangedEvent($this)); + $this->setStatus($status); return $this; } @@ -1795,11 +1787,22 @@ class record_adapter implements RecordInterface, cache_cacheableInterface return $this->reference->getId(); } + /** + * @param string $status + * @return void + */ public function setStatus($status) { - $this->set_binary_status($status); + $connection = $this->getDataboxConnection(); + + $connection->executeUpdate( + 'UPDATE record SET moddate = NOW(), status = :status WHERE record_id=:record_id', + ['status' => bindec($status), 'record_id' => $this->getRecordId()] + ); $this->delete_data_from_cache(self::CACHE_STATUS); + + $this->dispatch(RecordEvents::STATUS_CHANGED, new StatusChangedEvent($this)); } /** {@inheritdoc} */ diff --git a/tests/classes/ACLTest.php b/tests/classes/ACLTest.php index 47db1c4d6a..11ee12c1eb 100644 --- a/tests/classes/ACLTest.php +++ b/tests/classes/ACLTest.php @@ -33,25 +33,25 @@ class ACLTest extends \PhraseanetTestCase { $record1 = $this->getRecord1(); - $record1->set_binary_status(str_repeat('0', 32)); + $record1->setStatus(str_repeat('0', 32)); $this->object->set_masks_on_base($record1->getBaseId(), '10000', '10000', '0', '0'); - $record1->set_binary_status('10000'); + $record1->setStatus('10000'); $this->assertFalse($this->object->has_status_access_to_record($record1)); - $record1->set_binary_status('00000'); + $record1->setStatus('00000'); $this->assertTrue($this->object->has_status_access_to_record($record1)); $this->object->set_masks_on_base($record1->getBaseId(), '10000', '10000', '10000', '10000'); $this->assertFalse($this->object->has_status_access_to_record($record1)); - $record1->set_binary_status('10000'); + $record1->setStatus('10000'); $this->assertTrue($this->object->has_status_access_to_record($record1)); $this->object->set_masks_on_base($record1->getBaseId(), '0', '0', '0', '0'); $this->assertTrue($this->object->has_status_access_to_record($record1)); - $record1->set_binary_status(str_repeat('0', 32)); + $record1->setStatus(str_repeat('0', 32)); $this->assertTrue($this->object->has_status_access_to_record($record1)); } diff --git a/tests/classes/record/adapterTest.php b/tests/classes/record/adapterTest.php index a87cfc9111..b32b2cdc51 100644 --- a/tests/classes/record/adapterTest.php +++ b/tests/classes/record/adapterTest.php @@ -474,7 +474,7 @@ class record_adapterTest extends \PhraseanetAuthenticatedTestCase } $record_1 = $this->getRecord1(); - $record_1->set_binary_status($status); + $record_1->setStatus($status); $this->assertEquals($status, $record_1->get_status()); } @@ -539,7 +539,7 @@ class record_adapterTest extends \PhraseanetAuthenticatedTestCase { $record_1 = $this->getRecord1(); $record = new \record_adapter($this->getApplication(), $record_1->getDataboxId(), $record_1->getRecordId()); - $record->set_binary_status('1001001001010101'); + $record->setStatus('1001001001010101'); $this->assertSame('00000000000000001001001001010101', $record->get_status()); } } From fdf8b3e026553547053a91705308be50dee9ee6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 13 Apr 2016 19:45:51 +0200 Subject: [PATCH 237/383] Remove ElasticSearchEngine Test as currently totally broken --- .../SearchEngine/ElasticSearchEngineTest.php | 54 -- .../SearchEngine/SearchEngineAbstractTest.php | 719 ------------------ 2 files changed, 773 deletions(-) delete mode 100644 tests/Alchemy/Tests/Phrasea/SearchEngine/ElasticSearchEngineTest.php delete mode 100644 tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineAbstractTest.php diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/ElasticSearchEngineTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/ElasticSearchEngineTest.php deleted file mode 100644 index 1848ef38ef..0000000000 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/ElasticSearchEngineTest.php +++ /dev/null @@ -1,54 +0,0 @@ -markTestSkipped(); - if (false === @file_get_contents('http://localhost:9200')) { - $this->markTestSkipped('Unable to connect to elasticsearch.'); - } - - parent::setUp(); - - /** @var Indexer $indexer */ - $indexer = self::$DI['app']['elasticsearch.indexer']; - - // Re-index everything - ob_start(); - $indexer->deleteIndex(); - $indexer->createIndex(); - $indexer->populateIndex(); - ob_end_clean(); - } - - public function initialize() - { - // Change the index name - self::$DI['app']['conf']->set(['main', 'search-engine', 'options', 'index'], 'test'); - - self::$searchEngine = $es = new ElasticSearchEngine( - self::$DI['app'], - self::$DI['app']['elasticsearch.client'], - self::$DI['app']['elasticsearch.options']['index'] - ); - - self::$searchEngineClass = 'Alchemy\Phrasea\SearchEngine\Elastic\ElasticSearchEngine'; - } - - public function testAutocomplete() - { - $this->markTestSkipped("Not implemented yet."); - } - - protected function updateIndex(array $stemms = []) - { - $client = self::$searchEngine->getClient(); - $client->indices()->refresh(); - } -} diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineAbstractTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineAbstractTest.php deleted file mode 100644 index 4944c714ef..0000000000 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineAbstractTest.php +++ /dev/null @@ -1,719 +0,0 @@ -get_databox()->get_meta_structure()->get_elements() as $field) { - if (!$field->isBusiness()) { - continue; - } - $found = true; - } - - if (!$found) { - $field = \databox_field::create(self::$DI['app'], self::$DI['record_2']->get_databox(), 'testBusiness' . mt_rand(), false); - $field->set_business(true); - $field->save(); - } - - foreach (self::$DI['app']->getDataboxes() as $databox) { - break; - } - } - - $this->initialize(); - - if (!self::$searchEngine instanceof SearchEngineInterface) { - $this->markTestSkipped('Unable to initialize search Engine'); - } - - $options = new SearchEngineOptions(); - $options->onCollections($databox->get_collections()); - - $this->options = $options; - } - - public static function tearDownAfterClass() - { - self::$searchEngine = self::$searchEngineClass = self::$initialized = null; - parent::tearDownAfterClass(); - } - - /** - * @return SearchEngineOptions - */ - private function getOptions() - { - return $this->options; - } - - public function testQueryRecordId() - { - $record = self::$DI['record_2']; - $query_string = 'recordid=' . $record->get_record_id(); - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $this->options); - $this->assertEquals(1, $results->getTotal()); - - $result = $results->getResults()->first(); - - $this->assertEquals($record->get_record_id(), $result->get_record_id()); - $this->assertEquals($record->get_sbas_id(), $result->get_sbas_id()); - } - - public function testQueryStoryId() - { - $record = self::$DI['record_2']; - $query_string = 'storyid=' . $record->get_record_id(); - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $this->options); - $this->assertEquals(1, $results->getTotal()); - - $result = $results->getResults()->first(); - - $this->assertEquals($record->get_record_id(), $result->get_record_id()); - $this->assertEquals($record->get_sbas_id(), $result->get_sbas_id()); - } - - public function testQueryByDateMin() - { - $record = self::$DI['record_2']; - $query_string = 'boomboklot' . $record->get_record_id() . 'dateMin'; - - $this->editRecord($query_string, $record); - - $date_field = $this->editDateRecord('2012-12-21 12:12:00', $record); - - if (!$date_field) { - $this->markTestSkipped('unable to add a date to record'); - } - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - $options = $this->getOptions(); - $options->setDateFields([$date_field]); - $options->setMinDate(\DateTime::createFromFormat('Y-m-d H:i:s', '2012-12-23 01:01:00')); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(0, $results->getTotal()); - - $options->setMinDate(\DateTime::createFromFormat('Y-m-d H:i:s', '2012-12-20 01:01:00')); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(1, $results->getTotal()); - } - - private function editDateRecord($date, \record_adapter $record) - { - $date_field = null; - - foreach ($record->getDatabox()->get_meta_structure() as $databox_field) { - if ($databox_field->get_type() != \databox_field::TYPE_DATE) { - continue; - } - - $date_field = $databox_field; - - break; - } - - if ($date_field) { - - $toupdate = []; - - try { - $values = $record->get_caption()->get_field($databox_field->get_name())->get_values(); - $value = array_pop($values); - $meta_id = $value->getId(); - } catch (\Exception $e) { - $meta_id = null; - } - - $toupdate[$databox_field->get_id()] = [ - 'meta_id' => $meta_id - , 'meta_struct_id' => $databox_field->get_id() - , 'value' => $date - ]; - - $record->set_metadatas($toupdate); - } - - return $date_field; - } - - public function testQueryByDateMax() - { - $record = self::$DI['record_2']; - $query_string = 'boomboklot' . $record->get_record_id() . 'dateMax'; - - $this->editRecord($query_string, $record); - - $date_field = $this->editDateRecord('2012-12-21 12:12:00', $record); - - if (!$date_field) { - $this->markTestSkipped('unable to add a date to record'); - } - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - $options = $this->getOptions(); - $options->setDateFields([$date_field]); - $options->setMaxDate(\DateTime::createFromFormat('Y-m-d H:i:s', '2012-12-20 01:01:00')); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(0, $results->getTotal()); - - $options->setMaxDate(\DateTime::createFromFormat('Y-m-d H:i:s', '2012-12-23 01:01:00')); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(1, $results->getTotal()); - } - - public function testQueryByDateRange() - { - $record = self::$DI['record_2']; - $query_string = 'boomboklot' . $record->get_record_id() . 'dateRange'; - - $this->editRecord($query_string, $record); - - $date_field = $this->editDateRecord('2012-12-21 12:12:00', $record); - - if (!$date_field) { - $this->markTestSkipped('unable to add a date to record'); - } - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - $options = $this->getOptions(); - $options->setDateFields([$date_field]); - $options->setMinDate(\DateTime::createFromFormat('Y-m-d H:i:s', '2012-12-18 01:01:00')); - $options->setMaxDate(\DateTime::createFromFormat('Y-m-d H:i:s', '2012-12-20 01:01:00')); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(0, $results->getTotal()); - - $options->setMaxDate(\DateTime::createFromFormat('Y-m-d H:i:s', '2012-12-22 01:01:00')); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(1, $results->getTotal()); - } - - protected function editRecord($string2add, \record_adapter &$record, $indexable = true, $business = false) - { - $toupdate = []; - $field = null; - - foreach ($record->getDatabox()->get_meta_structure()->get_elements() as $field) { - - if ($indexable !== $field->is_indexable() || $field->isBusiness() !== $business) { - continue; - } - - try { - $values = $record->get_caption()->get_field($field->get_name())->get_values(); - $value = array_pop($values); - $meta_id = $value->getId(); - } catch (\Exception $e) { - $meta_id = null; - } - - $toupdate[$field->get_id()] = [ - 'meta_id' => $meta_id - , 'meta_struct_id' => $field->get_id() - , 'value' => $string2add - ]; - break; - } - - $record->set_metadatas($toupdate); - - return $field; - } - - public function testRecordNotIndexed() - { - $record = self::$DI['record_2']; - $query_string = 'boomboklot' . $record->get_record_id() . 'defaultNotIndexed'; - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $this->options); - $this->assertEquals(0, $results->getTotal()); - - $this->editRecord($query_string, $record); - - self::$searchEngine->resetCache(); - $this->updateIndex(); - $results = self::$searchEngine->query($query_string, 0, 1, $this->options); - $this->assertEquals(1, $results->getTotal()); - } - - public function testAddRecord() - { - $record = self::$DI['record_2']; - $query_string = 'boomboklot' . $record->get_record_id() . 'defaultAdd'; - - $this->editRecord($query_string, $record); - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $this->options); - $this->assertEquals(1, $results->getTotal()); - } - - public function testUpdateRecord() - { - $record = self::$DI['record_2']; - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - $query_string = 'boomboklot' . $record->get_record_id() . 'updateRecord'; - - $this->editRecord($query_string, $record); - - self::$searchEngine->updateRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $this->options); - $this->assertEquals(1, $results->getTotal()); - } - - protected function getDefaultOptions() - { - $appbox = self::$DI['app']['phraseanet.appbox']; - foreach ($appbox->get_databoxes() as $databox) { - break; - } - $options = new SearchEngineOptions(); - $options->onCollections($databox->get_collections()); - - return $options; - } - - /** - * @dataProvider provideStemmData - */ - public function testUpdateRecordWithStemm($language, $word, $stemm) - { - if (!self::$searchEngine->hasStemming()) { - $this->markTestSkipped(sprintf( - '%s does not support stemm, passing stemmatization for language %s', - get_class(self::$searchEngine), - $language - )); - } - - $options = $this->getDefaultOptions(); - $options->setStemming(true); - $options->setLocale($language); - - $record = self::$DI['record_2']; - $index_string = sprintf( - 'boomboklot%dstemmed%s %s', - $record->get_record_id(), - $language, - $word - ); - $query_string = sprintf( - 'boomboklot%dstemmed%s %s', - $record->get_record_id(), - $language, - $stemm - ); - - $this->editRecord($index_string, $record); - - self::$searchEngine->addRecord($record); - $this->updateIndex([$language]); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(1, $results->getTotal()); - } - - public function provideStemmData() - { - $stemms = []; - - $examples = [ - 'fr' => ['word' => 'chevaux', 'stemm' => 'cheval'], - 'en' => ['word' => 'consistency', 'stemm' => 'consistent'], - 'de' => ['word' => 'aufeinanderfolgender', 'stemm' => 'aufeinanderfolg'], - 'nl' => ['word' => 'lichamelijk', 'stemm' => 'licham'], - ]; - - foreach (Application::getAvailableLanguages() as $languageCode => $name) { - $data = explode('_', $languageCode); - $code = $data[0]; - - if (!isset($examples[$code])) { - $this->fail(sprintf('Missing stemm examples for language %s', $code)); - } - - $stemms[] = [ - $code, - $examples[$code]['word'], - $examples[$code]['stemm'], - ]; - } - - return $stemms; - } - - public function testUpdateQueryOnField() - { - $options = $this->getDefaultOptions(); - $record = self::$DI['record_2']; - - $query_string = 'boomboklot' . $record->get_record_id() . 'onfield'; - - $field = $this->editRecord($query_string, $record); - $options->setFields([$field]); - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(1, $results->getTotal()); - } - - public function testBusinessFieldAvailable() - { - $options = $this->getDefaultOptions(); - $record = self::$DI['record_2']; - - $query_string = 'boomboklot' . $record->get_record_id() . 'businessAvailable'; - - $this->editRecord($query_string, $record, true, true); - $options->allowBusinessFieldsOn([$record->get_collection()]); - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(1, $results->getTotal()); - } - - public function testBusinessFieldNotAvailable() - { - $record = self::$DI['record_2']; - $query_string = 'boomboklot' . $record->get_record_id() . 'businessNotAvailable'; - - $this->editRecord($query_string, $record, true, true); - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $this->options); - $this->assertEquals(0, $results->getTotal()); - } - - public function testUpdateQueryOnEmptyField() - { - $options = $this->getDefaultOptions(); - - $record = self::$DI['record_2']; - $query_string = 'boomboklot' . $record->get_record_id() . 'anotherfield'; - - $selectedField = $this->editRecord($query_string, $record); - - foreach ($record->get_databox()->get_meta_structure()->get_elements() as $field) { - if ($selectedField->get_id() != $field->get_id()) { - $options->setFields([$field]); - - break; - } - } - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(0, $results->getTotal()); - } - - public function testUpdateNonIndexableRecord() - { - $record = self::$DI['record_2']; - $query_string = 'boomboklot_no_index_' . $record->get_record_id() . '_'; - - $field = $this->editRecord($query_string, $record, false); - if (!$field) { - $this->markTestSkipped('No non-indexable field found'); - } - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $this->options); - $this->assertEquals(0, $results->getTotal()); - } - - public function testDeleteRecord() - { - $record = self::$DI['record_2']; - $query_string = 'boomboklot' . $record->get_record_id() . 'deleteRecord'; - - $field = $this->editRecord($query_string, $record); - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - self::$searchEngine->removeRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $this->options); - $this->assertEquals(0, $results->getTotal()); - - $options = $this->getDefaultOptions(); - $options->setFields([$field]); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(0, $results->getTotal()); - } - - /** - * @dataProvider provideStemmData - */ - public function testDeleteRecordWithinStemmContext($language, $word, $stemm) - { - $record = self::$DI['record_2']; - $index_string = 'boomboklot' . $record->get_record_id() . 'deleteRecordInStemmContext '.$word; - $query_string = 'boomboklot' . $record->get_record_id() . 'deleteRecordInStemmContext '.$stemm; - - $options = $this->getDefaultOptions(); - $options->setStemming(true); - $options->setLocale($language); - - $field = $this->editRecord($index_string, $record); - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - self::$searchEngine->removeRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(0, $results->getTotal()); - - $options->setFields([$field]); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(0, $results->getTotal()); - } - - public function testAvailableTypes() - { - $this->assertTrue(is_array(self::$searchEngine->getAvailableTypes())); - foreach (self::$searchEngine->getAvailableTypes() as $type) { - $this->assertTrue(in_array($type, [SearchEngineInterface::GEM_TYPE_ENTRY, SearchEngineInterface::GEM_TYPE_RECORD, SearchEngineInterface::GEM_TYPE_STORY])); - } - } - - public function testStatus() - { - foreach (self::$searchEngine->getStatus() as $StatusKeyValue) { - $this->assertTrue(is_array($StatusKeyValue)); - $this->assertTrue(is_scalar($StatusKeyValue[0])); - $this->assertTrue(is_scalar($StatusKeyValue[1])); - } - } - - public function testAddStory() - { - $story = self::$DI['record_story_1']; - $query_string = 'story' . $story->get_record_id() . 'addStory'; - - $options = $this->getDefaultOptions(); - $options->setSearchType(SearchEngineOptions::RECORD_GROUPING); - - $this->editRecord($query_string, $story); - - self::$searchEngine->addStory($story); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(1, $results->getTotal()); - } - - public function testUpdateStory() - { - $story = self::$DI['record_story_1']; - - $options = $this->getDefaultOptions(); - $options->setSearchType(SearchEngineOptions::RECORD_GROUPING); - - self::$searchEngine->addStory($story); - $this->updateIndex(); - - $query_string = 'story' . $story->get_record_id() . 'updateStory'; - $this->editRecord($query_string, $story); - - self::$searchEngine->updateStory($story); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(1, $results->getTotal()); - } - - public function testStatusQueryOnOverOff() - { - $options = $this->getDefaultOptions(); - $record = self::$DI['record_2']; - $record->set_binary_status('00000'); - - $query_string = 'boomboklot' . $record->get_record_id() . 'statusQueryOff'; - $this->editRecord($query_string, $record); - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - $options->setStatus([4 => ['on' => [$record->get_databox()->get_sbas_id()]]]); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(0, $results->getTotal()); - } - - public function testStatusQueryOnOverOn() - { - $options = $this->getDefaultOptions(); - - $record = self::$DI['record_2']; - $record->set_binary_status('10000'); - - $options->setStatus([4 => ['on' => [$record->get_databox()->get_sbas_id()]]]); - - $query_string = 'boomboklot' . $record->get_record_id() . 'statusQueryOnOverOn'; - $this->editRecord($query_string, $record); - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(1, $results->getTotal()); - } - - public function testStatusQueryOffOverOn() - { - $options = $this->getDefaultOptions(); - - $record = self::$DI['record_2']; - $record->set_binary_status('10000'); - - $options->setStatus([4 => ['off' => [$record->get_databox()->get_sbas_id()]]]); - - $query_string = 'boomboklot' . $record->get_record_id() . 'statusQueryOff'; - $this->editRecord($query_string, $record); - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(0, $results->getTotal()); - } - - public function testStatusQueryOffOverOff() - { - $options = $this->getDefaultOptions(); - - $record = self::$DI['record_2']; - $record->set_binary_status('00000'); - - $options->setStatus([4 => ['off' => [$record->get_databox()->get_sbas_id()]]]); - - $query_string = 'boomboklot' . $record->get_record_id() . 'statusQueryOff'; - $this->editRecord($query_string, $record); - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(1, $results->getTotal()); - } - - public function testStatusQueryUpdate() - { - $options = $this->getDefaultOptions(); - $record = self::$DI['record_2']; - $record->set_binary_status('00000'); - - $query_string = 'boomboklot' . $record->get_record_id() . 'statusQueryUpdate'; - $this->editRecord($query_string, $record); - - self::$searchEngine->addRecord($record); - $this->updateIndex(); - - $options->setStatus([4 => ['on' => [$record->get_databox()->get_sbas_id()]]]); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $options); - $this->assertEquals(0, $results->getTotal()); - - $record->set_binary_status('10000'); - - self::$searchEngine->updateRecord($record); - $this->updateIndex(); - - self::$searchEngine->resetCache(); - $results = self::$searchEngine->query($query_string, 0, 1, $this->options); - $this->assertEquals(1, $results->getTotal()); - } - - abstract public function initialize(); - - abstract public function testAutocomplete(); - - abstract protected function updateIndex(array $stemms = []); -} From 4171ab9e8d96243065be8a61d6c5d0d7e83d4205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 13 Apr 2016 19:51:56 +0200 Subject: [PATCH 238/383] Rename record_adapter::get_status into getStatus --- lib/Alchemy/Phrasea/Border/Manager.php | 2 +- .../Phrasea/Controller/Api/V1Controller.php | 2 +- .../Controller/Prod/EditController.php | 4 +- .../Controller/Prod/PropertyController.php | 2 +- .../Model/Serializer/ESRecordSerializer.php | 2 +- .../TaskManager/Job/RecordMoverJob.php | 2 +- lib/classes/record/adapter.php | 29 +++++--------- .../Phrasea/Controller/Api/ApiJsonTest.php | 40 +++++++++---------- .../Phrasea/Controller/Api/ApiTestCase.php | 2 +- .../Phrasea/Controller/Prod/PropertyTest.php | 6 +-- .../Phrasea/Controller/Prod/UploadTest.php | 2 +- tests/classes/record/adapterTest.php | 6 +-- 12 files changed, 45 insertions(+), 54 deletions(-) diff --git a/lib/Alchemy/Phrasea/Border/Manager.php b/lib/Alchemy/Phrasea/Border/Manager.php index b2b6be2c71..d8abc9ac99 100644 --- a/lib/Alchemy/Phrasea/Border/Manager.php +++ b/lib/Alchemy/Phrasea/Border/Manager.php @@ -314,7 +314,7 @@ class Manager break; case AttributeInterface::NAME_STATUS: /** @var StatusAttr $attribute */ - $element->setStatus(decbin(bindec($element->get_status()) | bindec($attribute->getValue()))); + $element->setStatus(decbin(bindec($element->getStatus()) | bindec($attribute->getValue()))); break; case AttributeInterface::NAME_STORY: diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index dc3e614abd..13b79cccfc 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -1545,7 +1545,7 @@ class V1Controller extends Controller $status = $request->get('status'); - $datas = strrev($record->get_status()); + $datas = strrev($record->getStatus()); if (!is_array($status)) { return $this->getBadRequestAction($request); diff --git a/lib/Alchemy/Phrasea/Controller/Prod/EditController.php b/lib/Alchemy/Phrasea/Controller/Prod/EditController.php index 2a97741f9b..c719bda833 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/EditController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/EditController.php @@ -158,7 +158,7 @@ class EditController extends Controller if ($this->getAclForUser()->has_right_on_base($record->getBaseId(), 'chgstatus')) { $elements[$indice]['editableStatus'] = true; foreach ($status as $n => $s) { - $tmp_val = substr(strrev($record->get_status()), $n, 1); + $tmp_val = substr(strrev($record->getStatus()), $n, 1); $elements[$indice]['statbits'][$n]['value'] = ($tmp_val == '1') ? '1' : '0'; $elements[$indice]['statbits'][$n]['dirty'] = false; } @@ -347,7 +347,7 @@ class EditController extends Controller $this->getDispatcher()->dispatch(PhraseaEvents::RECORD_EDIT, new RecordEdit($record)); } - $newstat = $record->get_status(); + $newstat = $record->getStatus(); $statbits = ltrim($statbits, 'x'); if (!in_array($statbits, ['', 'null'])) { $mask_and = ltrim(str_replace(['x', '0', '1', 'z'], ['1', 'z', '0', '1'], $statbits), '0'); diff --git a/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php b/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php index 277eba8235..317aeb7cb7 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/PropertyController.php @@ -189,7 +189,7 @@ class PropertyController extends Controller if (isset($postStatus[$sbasId]) && is_array($postStatus[$sbasId])) { $postStatus = $postStatus[$sbasId]; - $currentStatus = strrev($record->get_status()); + $currentStatus = strrev($record->getStatus()); $newStatus = ''; foreach (range(0, 31) as $i) { diff --git a/lib/Alchemy/Phrasea/Model/Serializer/ESRecordSerializer.php b/lib/Alchemy/Phrasea/Model/Serializer/ESRecordSerializer.php index e3a991c436..8c63c947dd 100644 --- a/lib/Alchemy/Phrasea/Model/Serializer/ESRecordSerializer.php +++ b/lib/Alchemy/Phrasea/Model/Serializer/ESRecordSerializer.php @@ -50,7 +50,7 @@ class ESRecordSerializer extends AbstractSerializer } $i = 0; - foreach (preg_split('//', strrev($record->get_status()), -1, PREG_SPLIT_NO_EMPTY) as $val) { + foreach (preg_split('//', strrev($record->getStatus()), -1, PREG_SPLIT_NO_EMPTY) as $val) { $status['status-'.$i] = (int) $val; $i++; } diff --git a/lib/Alchemy/Phrasea/TaskManager/Job/RecordMoverJob.php b/lib/Alchemy/Phrasea/TaskManager/Job/RecordMoverJob.php index 5cb37ca047..9e2878cdd0 100644 --- a/lib/Alchemy/Phrasea/TaskManager/Job/RecordMoverJob.php +++ b/lib/Alchemy/Phrasea/TaskManager/Job/RecordMoverJob.php @@ -91,7 +91,7 @@ class RecordMoverJob extends AbstractJob // change sb ? if (array_key_exists('sb', $row)) { - $status = str_split($rec->get_status()); + $status = str_split($rec->getStatus()); foreach (str_split(strrev($row['sb'])) as $bit => $val) { if ($val == '0' || $val == '1') { $status[31 - $bit] = $val; diff --git a/lib/classes/record/adapter.php b/lib/classes/record/adapter.php index 18a3c35383..8b59ad0693 100644 --- a/lib/classes/record/adapter.php +++ b/lib/classes/record/adapter.php @@ -1,5 +1,5 @@ setStatus($status); - - return $this; - } - private function dispatch($eventName, RecordEvent $event) { $this->app['dispatcher']->dispatch($eventName, $event); @@ -1793,9 +1780,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface */ public function setStatus($status) { - $connection = $this->getDataboxConnection(); - - $connection->executeUpdate( + $this->getDataboxConnection()->executeUpdate( 'UPDATE record SET moddate = NOW(), status = :status WHERE record_id=:record_id', ['status' => bindec($status), 'record_id' => $this->getRecordId()] ); @@ -1805,10 +1790,18 @@ class record_adapter implements RecordInterface, cache_cacheableInterface $this->dispatch(RecordEvents::STATUS_CHANGED, new StatusChangedEvent($this)); } + /** + * @return string + */ + public function getStatus() + { + return $this->get_status(); + } + /** {@inheritdoc} */ public function getStatusBitField() { - return bindec($this->get_status()); + return bindec($this->getStatus()); } /** {@inheritdoc} */ diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php index 97fb95fb95..4fbad594a2 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php @@ -1234,13 +1234,15 @@ class ApiJsonTest extends ApiTestCase public function testRecordsSetStatus() { - self::$DI['app']['phraseanet.SE'] = $this->createSearchEngineMock(); + $app = $this->getApplication(); + $app['phraseanet.SE'] = $this->createSearchEngineMock(); $this->setToken($this->userAccessToken); - $route = '/api/v1/records/' . self::$DI['record_1']->get_sbas_id() . '/' . self::$DI['record_1']->get_record_id() . '/setstatus/'; + $record1 = $this->getRecord1(); + $route = '/api/v1/records/' . $record1->getDataboxId() . '/' . $record1->getRecordId() . '/setstatus/'; - $record_status = strrev(self::$DI['record_1']->get_status()); - $statusStructure = self::$DI['record_1']->getStatusStructure(); + $record_status = strrev($record1->getStatus()); + $statusStructure = $record1->getStatusStructure(); $tochange = []; foreach ($statusStructure as $n => $datas) { @@ -1248,20 +1250,18 @@ class ApiJsonTest extends ApiTestCase } $this->evaluateMethodNotAllowedRoute($route, ['GET', 'PUT', 'DELETE']); - self::$DI['client']->request('POST', $route, $this->getParameters(['status' => $tochange]), [], ['HTTP_Accept' => $this->getAcceptMimeType()]); - $content = $this->unserialize(self::$DI['client']->getResponse()->getContent()); + $response = $this->request('POST', $route, $this->getParameters(['status' => $tochange]), ['HTTP_Accept' => $this->getAcceptMimeType()]); + $content = $this->unserialize($response->getContent()); - /** - * Get fresh record_1 - */ - $testRecord = new \record_adapter(self::$DI['app'], self::$DI['record_1']->get_sbas_id(), self::$DI['record_1']->get_record_id()); + // Get fresh record_1 + $testRecord = new \record_adapter($app, $record1->getDataboxId(), $record1->getRecordId()); - $this->evaluateResponse200(self::$DI['client']->getResponse()); + $this->evaluateResponse200($response); $this->evaluateMeta200($content); $this->evaluateRecordsStatusResponse($testRecord, $content); - $record_status = strrev($testRecord->get_status()); + $record_status = strrev($testRecord->getStatus()); foreach ($statusStructure as $n => $datas) { $this->assertEquals(substr($record_status, ($n), 1), $tochange[$n]); } @@ -1270,25 +1270,23 @@ class ApiJsonTest extends ApiTestCase $tochange[$n] = $value == '0' ? '1' : '0'; } - self::$DI['client']->request('POST', $route, $this->getParameters(['status' => $tochange]), [], ['HTTP_Accept' => $this->getAcceptMimeType()]); - $content = $this->unserialize(self::$DI['client']->getResponse()->getContent()); + $response = $this->request('POST', $route, $this->getParameters(['status' => $tochange]), ['HTTP_Accept' => $this->getAcceptMimeType()]); + $content = $this->unserialize($response->getContent()); - /** - * Get fresh record_1 - */ - $testRecord = new \record_adapter(self::$DI['app'], $testRecord->getDataboxId(), $testRecord->getRecordId()); + // Get fresh record_1 + $testRecord = new \record_adapter($app, $testRecord->getDataboxId(), $testRecord->getRecordId()); - $this->evaluateResponse200(self::$DI['client']->getResponse()); + $this->evaluateResponse200($response); $this->evaluateMeta200($content); $this->evaluateRecordsStatusResponse($testRecord, $content); - $record_status = strrev($testRecord->get_status()); + $record_status = strrev($testRecord->getStatus()); foreach ($statusStructure as $n => $datas) { $this->assertEquals(substr($record_status, ($n), 1), $tochange[$n]); } - self::$DI['record_1']->set_binary_status(str_repeat('0', 32)); + $record1->setStatus(str_repeat('0', 32)); } public function testMoveRecordToCollection() diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiTestCase.php b/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiTestCase.php index 63ece34f27..054f779076 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiTestCase.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiTestCase.php @@ -696,7 +696,7 @@ abstract class ApiTestCase extends \PhraseanetWebTestCase { $statusStructure = $record->getDatabox()->getStatusStructure(); - $r_status = strrev($record->get_status()); + $r_status = strrev($record->getStatus()); $this->assertArrayHasKey('status', $content['response']); $this->assertEquals(count((array) $content['response']['status']), count($statusStructure->toArray())); foreach ($content['response']['status'] as $status) { diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Prod/PropertyTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Prod/PropertyTest.php index 5bceadbbb7..2389da527e 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Prod/PropertyTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Prod/PropertyTest.php @@ -119,8 +119,8 @@ class PropertyTest extends \PhraseanetAuthenticatedWebTestCase $record = new \record_adapter(self::$DI['app'], $record->getDataboxId(), $record->getRecordId()); $story = new \record_adapter(self::$DI['app'], $story->getDataboxId(), $story->getRecordId()); - $recordStatus = strrev($record->get_status()); - $storyStatus = strrev($story->get_status()); + $recordStatus = strrev($record->getStatus()); + $storyStatus = strrev($story->getStatus()); $this->assertEquals(1, substr($recordStatus, 6, 1)); $this->assertEquals(1, substr($recordStatus, 8, 1)); @@ -131,7 +131,7 @@ class PropertyTest extends \PhraseanetAuthenticatedWebTestCase $this->assertEquals(1, substr($storyStatus, 11, 1)); foreach ($story->getChildren() as $child) { - $childStatus = strrev($child->get_status()); + $childStatus = strrev($child->getStatus()); $this->assertEquals(1, substr($childStatus, 6, 1)); $this->assertEquals(1, substr($childStatus, 8, 1)); $this->assertEquals(1, substr($childStatus, 11, 1)); diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Prod/UploadTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Prod/UploadTest.php index 97bc731f56..65832cf4dc 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Prod/UploadTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Prod/UploadTest.php @@ -377,7 +377,7 @@ class UploadTest extends \PhraseanetAuthenticatedWebTestCase $id = explode('_', $datas['id']); $record = new \record_adapter(self::$DI['app'], $id[0], $id[1]); $this->assertFalse($record->isStory()); - $this->assertEquals(1, substr(strrev($record->get_status()), 4, 1)); + $this->assertEquals(1, substr(strrev($record->getStatus()), 4, 1)); $this->assertEquals([], $datas['reasons']); } diff --git a/tests/classes/record/adapterTest.php b/tests/classes/record/adapterTest.php index b32b2cdc51..c0eafba115 100644 --- a/tests/classes/record/adapterTest.php +++ b/tests/classes/record/adapterTest.php @@ -232,7 +232,7 @@ class record_adapterTest extends \PhraseanetAuthenticatedTestCase public function testGet_status() { - $this->assertRegExp('/[01]{32}/', $this->getRecord1()->get_status()); + $this->assertRegExp('/[01]{32}/', $this->getRecord1()->getStatus()); } public function testGet_subdef() @@ -476,7 +476,7 @@ class record_adapterTest extends \PhraseanetAuthenticatedTestCase $record_1 = $this->getRecord1(); $record_1->setStatus($status); - $this->assertEquals($status, $record_1->get_status()); + $this->assertEquals($status, $record_1->getStatus()); } public function testGet_record_by_sha() @@ -540,6 +540,6 @@ class record_adapterTest extends \PhraseanetAuthenticatedTestCase $record_1 = $this->getRecord1(); $record = new \record_adapter($this->getApplication(), $record_1->getDataboxId(), $record_1->getRecordId()); $record->setStatus('1001001001010101'); - $this->assertSame('00000000000000001001001001010101', $record->get_status()); + $this->assertSame('00000000000000001001001001010101', $record->getStatus()); } } From 0fb219cb67d46f6c9dc3b435c59dcea891e63964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 13 Apr 2016 19:55:54 +0200 Subject: [PATCH 239/383] Remove legacy record_adapter::get_status --- .../Databox/Record/LegacyRecordRepository.php | 3 +- lib/classes/cache/databox.php | 2 - lib/classes/record/adapter.php | 61 +++---------------- 3 files changed, 12 insertions(+), 54 deletions(-) diff --git a/lib/Alchemy/Phrasea/Databox/Record/LegacyRecordRepository.php b/lib/Alchemy/Phrasea/Databox/Record/LegacyRecordRepository.php index bc098412af..53d68bfc0c 100644 --- a/lib/Alchemy/Phrasea/Databox/Record/LegacyRecordRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Record/LegacyRecordRepository.php @@ -125,7 +125,8 @@ class LegacyRecordRepository implements RecordRepository $connection->quoteIdentifier('type'), 'originalname AS originalName', 'sha256', - 'mime' + 'mime', + 'LPAD(BIN(status), 32, \'0\') as status' ) ->from('record', 'r'); } diff --git a/lib/classes/cache/databox.php b/lib/classes/cache/databox.php index 229eb7676c..4e9ed4dd82 100644 --- a/lib/classes/cache/databox.php +++ b/lib/classes/cache/databox.php @@ -75,8 +75,6 @@ class cache_databox $databox->delete_data_from_cache($key); $key = 'record_' . $sbas_id . '_' . $row['value'] . '_' . \record_adapter::CACHE_SHA256; $databox->delete_data_from_cache($key); - $key = 'record_' . $sbas_id . '_' . $row['value'] . '_' . \record_adapter::CACHE_STATUS; - $databox->delete_data_from_cache($key); $key = 'record_' . $sbas_id . '_' . $row['value'] . '_' . \record_adapter::CACHE_TECHNICAL_DATA; $databox->delete_data_from_cache($key); diff --git a/lib/classes/record/adapter.php b/lib/classes/record/adapter.php index 8b59ad0693..eeb048b1cb 100644 --- a/lib/classes/record/adapter.php +++ b/lib/classes/record/adapter.php @@ -48,7 +48,6 @@ class record_adapter implements RecordInterface, cache_cacheableInterface const CACHE_SHA256 = 'sha256'; const CACHE_SUBDEFS = 'subdefs'; const CACHE_GROUPING = 'grouping'; - const CACHE_STATUS = 'status'; /** * @param Application $app @@ -78,6 +77,10 @@ class record_adapter implements RecordInterface, cache_cacheableInterface private $collection_id; private $mime; private $number; + + /** + * @var string + */ private $status; private $subdefs; private $type; @@ -524,51 +527,6 @@ class record_adapter implements RecordInterface, cache_cacheableInterface return $this->sha256; } - /** - * @return string - */ - public function get_status() - { - if (!$this->status) { - $this->status = $this->retrieve_status(); - } - - return $this->status; - } - - /** - * @return string - * @throws Exception - * @throws \Doctrine\DBAL\DBALException - */ - protected function retrieve_status() - { - try { - $data = $this->get_data_from_cache(self::CACHE_STATUS); - } catch (Exception $e) { - $data = false; - } - - if (false !== $data) { - return $data; - } - - $status = $this->getDataboxConnection()->fetchColumn( - 'SELECT BIN(status) as status FROM record WHERE record_id = :record_id', - [':record_id' => $this->getRecordId()] - ); - - if (false === $status) { - throw new Exception('status not found'); - } - - $status = str_pad($status, 32, '0', STR_PAD_LEFT); - - $this->set_data_to_cache($status, self::CACHE_STATUS); - - return $status; - } - public function has_subdef($name) { return in_array($name, $this->get_available_subdefs(), false); @@ -1490,9 +1448,6 @@ class record_adapter implements RecordInterface, cache_cacheableInterface { switch ($option) { - case self::CACHE_STATUS: - $this->status = null; - break; case self::CACHE_SUBDEFS: $this->subdefs = null; break; @@ -1785,7 +1740,9 @@ class record_adapter implements RecordInterface, cache_cacheableInterface ['status' => bindec($status), 'record_id' => $this->getRecordId()] ); - $this->delete_data_from_cache(self::CACHE_STATUS); + $this->status = str_pad($status, 32, '0', STR_PAD_LEFT); + // modification date is now unknown, delete from cache to reload on another record + $this->delete_data_from_cache(); $this->dispatch(RecordEvents::STATUS_CHANGED, new StatusChangedEvent($this)); } @@ -1795,7 +1752,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface */ public function getStatus() { - return $this->get_status(); + return $this->status; } /** {@inheritdoc} */ @@ -1828,6 +1785,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface 'created' => $this->created->format(DATE_ISO8601), 'base_id' => $this->base_id, 'collection_id' => $this->collection_id, + 'status' => $this->status, ]; $this->set_data_to_cache($data); @@ -1853,6 +1811,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface $this->original_name = $row['originalName']; $this->sha256 = $row['sha256']; $this->mime = $row['mime']; + $this->status = str_pad($row['status'], 32, '0', STR_PAD_LEFT); } /** From f40daa71ef2060ad60415b61bdd32531938c74ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 13 Apr 2016 20:12:44 +0200 Subject: [PATCH 240/383] fix ManagerTest not to use record_adapter::get_status --- .../Tests/Phrasea/Border/ManagerTest.php | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/tests/Alchemy/Tests/Phrasea/Border/ManagerTest.php b/tests/Alchemy/Tests/Phrasea/Border/ManagerTest.php index 1556d918d1..5dedd2bc7a 100644 --- a/tests/Alchemy/Tests/Phrasea/Border/ManagerTest.php +++ b/tests/Alchemy/Tests/Phrasea/Border/ManagerTest.php @@ -13,6 +13,7 @@ use Alchemy\Phrasea\Border\Attribute\MetaField; use Alchemy\Phrasea\Border\Attribute\Metadata; use Alchemy\Phrasea\Border\Attribute\Status; use Alchemy\Phrasea\Border\Attribute\Story; +use Alchemy\Phrasea\Model\Entities\LazaretFile; /** * @group functional @@ -144,13 +145,15 @@ class ManagerTest extends \PhraseanetAuthenticatedWebTestCase $records = []; $postProcessRecord = function ($record) use (&$records) { - $records[] = $record; - }; + $records[] = $record; + }; - $file = File::buildFromPathfile(self::$file1, self::$DI['collection'], self::$DI['app']); + $app = $this->getApplication(); + $collection = $this->getCollection(); + $file = File::buildFromPathfile(self::$file1, $collection, $app); $first = $odd = false; $tofetch = []; - foreach (self::$DI['collection']->get_databox()->get_meta_structure() as $databox_field) { + foreach ($collection->get_databox()->get_meta_structure() as $databox_field) { if ($databox_field->is_readonly()) { continue; } @@ -196,7 +199,7 @@ class ManagerTest extends \PhraseanetAuthenticatedWebTestCase $odd = !$odd; } - $story = \record_adapter::createStory(self::$DI['app'], self::$DI['collection']); + $story = \record_adapter::createStory($app, $collection); $file->addAttribute(new Story($story)); $status = ''; @@ -208,17 +211,19 @@ class ManagerTest extends \PhraseanetAuthenticatedWebTestCase } } - $file->addAttribute(new Status(self::$DI['app'], strrev($status))); + $file->addAttribute(new Status($app, strrev($status))); - self::$DI['app']['phraseanet.SE'] = $this->createSearchEngineMock(); + $app['phraseanet.SE'] = $this->createSearchEngineMock(); $this->assertEquals(Manager::RECORD_CREATED, $this->object->process($this->session, $file, $postProcessRecord, Manager::FORCE_RECORD)); + /** @var \record_adapter $record */ $record = current($records); + $this->assertInstanceOf(\record_adapter::class, $record); $found = false; foreach ($record->get_grouping_parents()->get_elements() as $parent_story) { - if ($parent_story->get_serialize_key() === $story->getId()) { + if ($parent_story->getId() === $story->getId()) { $found = true; } } @@ -227,18 +232,19 @@ class ManagerTest extends \PhraseanetAuthenticatedWebTestCase $this->fail('Unable to find story in parents'); } - $status = strrev($record->get_status()); + $status = strrev($record->getStatus()); $this->assertEquals(32, strlen($status)); $this->assertEquals('1', substr($status, 4, 1)); $this->assertEquals('1', substr($status, 8, 1)); foreach ($tofetch as $name => $values) { - $found = []; + foreach ($record->get_caption()->get_field($name)->get_values() as $value) { $found[] = $value->getValue(); } + $this->assertEquals($values, $found); } @@ -261,10 +267,12 @@ class ManagerTest extends \PhraseanetAuthenticatedWebTestCase $lazaret = $element; }; - $file = File::buildFromPathfile(self::$file1, self::$DI['collection'], self::$DI['app']); + $app = $this->getApplication(); + $collection = $this->getCollection(); + $file = File::buildFromPathfile(self::$file1, $collection, $app); $odd = false; $tofetchMeta = $tofetchField = []; - foreach (self::$DI['collection']->get_databox()->get_meta_structure() as $databox_field) { + foreach ($collection->get_databox()->get_meta_structure() as $databox_field) { if ($databox_field->is_readonly()) { continue; } @@ -300,14 +308,16 @@ class ManagerTest extends \PhraseanetAuthenticatedWebTestCase $odd = !$odd; } - $file->addAttribute(new Story(self::$DI['record_story_1'])); + $story = $this->getRecordStory1(); + $file->addAttribute(new Story($story)); $status = '1'; + foreach (range(1, 31) as $i) { $status .= '0'; } - $file->addAttribute(new Status(self::$DI['app'], $status)); + $file->addAttribute(new Status($app, $status)); $this->assertEquals(Manager::LAZARET_CREATED, $this->object->process($this->session, $file, $postProcessRecord, Manager::FORCE_LAZARET)); @@ -315,12 +325,13 @@ class ManagerTest extends \PhraseanetAuthenticatedWebTestCase $foundMeta = $foundField = []; - /* @var $lazaret \Alchemy\Phrasea\Model\Entities\LazaretFile */ + /** @var LazaretFile $lazaret */ foreach ($lazaret->getAttributes() as $attr) { - $attribute = Factory::getFileAttribute(self::$DI['app'], $attr->getName(), $attr->getValue()); + $attribute = Factory::getFileAttribute($app, $attr->getName(), $attr->getValue()); if ($attribute->getName() == AttributeInterface::NAME_STORY) { - if ($attribute->getValue()->get_serialize_key() == self::$DI['record_story_1']->get_serialize_key()) { + /** @var Story $attribute */ + if ($attribute->getValue()->getId() == $story->getId()) { $story_found = true; } } elseif ($attribute->getName() == AttributeInterface::NAME_METADATA) { From 11b63e5a2bf03ee7885d252a7ac0c2908f86c048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 13 Apr 2016 22:04:45 +0200 Subject: [PATCH 241/383] Add missing property copy on mirror --- lib/classes/record/adapter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/classes/record/adapter.php b/lib/classes/record/adapter.php index eeb048b1cb..b765eee819 100644 --- a/lib/classes/record/adapter.php +++ b/lib/classes/record/adapter.php @@ -140,6 +140,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface $this->created = $record->getCreated(); $this->base_id = $record->getBaseId(); $this->collection_id = $record->getCollectionId(); + $this->status = $record->getStatus(); } /** From e542b34388035344b9cbce6a635bfc7da02630f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 14 Apr 2016 12:11:24 +0200 Subject: [PATCH 242/383] Add caching of all subdefs --- .../CachedMediaSubdefDataRepository.php | 85 ++++++++++++++----- 1 file changed, 63 insertions(+), 22 deletions(-) diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php index e630f502d9..dda9ae8a54 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php @@ -74,7 +74,7 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository */ public function findByRecordIdsAndNames(array $recordIds, array $names = null) { - $keys = $this->generateCacheKeys($recordIds, $names); + $keys = $this->computeKeys($recordIds, $names); if ($keys) { $data = $this->cache->fetchMultiple($keys); @@ -102,7 +102,7 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository { $deleted = $this->decorated->delete($subdefIds); - $keys = array_map([$this, 'getCacheKey'], $subdefIds); + $keys = array_map([$this, 'dataToKey'], $subdefIds); $this->cache->saveMultiple(array_fill_keys($keys, null), $this->lifeTime); @@ -113,40 +113,54 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository { $this->decorated->save($data); - $keys = array_map([$this, 'getCacheKey'], $data); + $keys = array_map([$this, 'dataToKey'], $data); // all saved keys are now stalled. decorated repository could modify values on store (update time for example) array_walk($keys, [$this->cache, 'delete']); } - private function getCacheKey(array $data) + /** + * @param array $data + * @return string + */ + private function dataToKey(array $data) { - return $this->baseKey . 'media_subdef=' . json_encode([$data['record_id'], $data['name']]); + return $this->getCacheKey($data['record_id'], $data['name']); + } + + /** + * @param int $recordId + * @param string|null $name + * @return string + */ + private function getCacheKey($recordId, $name = null) + { + return $this->baseKey . 'media_subdef' . json_encode([(int)$recordId, $name]); } /** * @param int[] $recordIds - * @param string[]|null $names + * @param string[] $names * @return string[] */ - private function generateCacheKeys(array $recordIds, array $names = null) + private function generateCacheKeys(array $recordIds, array $names) { - if (null === $names) { - return []; - } + $namesCount = count($names); - $cacheKeys = []; + $keys = array_map(function ($recordId) use ($namesCount, $names) { + return array_map([$this, 'getCacheKey'], array_fill(0, $namesCount, $recordId), $names); + }, $recordIds); - foreach ($recordIds as $recordId) { - foreach ($names as $name) { - $cacheKeys[] = [ - 'record_id' => $recordId, - 'name' => $name, - ]; - } - } + return $keys ? call_user_func_array('array_merge', $keys) : []; + } - return array_map([$this, 'getCacheKey'], $cacheKeys); + /** + * @param int[] $recordIds + * @return string[] + */ + private function generateAllCacheKeys(array $recordIds) + { + return array_map([$this, 'getCacheKey'], $recordIds, array_fill(0, count($recordIds), null)); } /** @@ -159,14 +173,41 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository { $retrieved = $this->decorated->findByRecordIdsAndNames($recordIds, $names); + if (null === $names) { + $extra = array_fill_keys($this->generateAllCacheKeys($recordIds), []); + + foreach ($retrieved as $item) { + $extra[$this->getCacheKey($item['record_id'])][] = $this->getCacheKey($item['record_id'], $item['name']); + } + } + $data = array_fill_keys($keys, null); foreach ($retrieved as $item) { - $data[$this->getCacheKey($item)] = $item; + $data[$this->dataToKey($item)] = $item; } - $this->cache->saveMultiple($data, $this->lifeTime); + $this->cache->saveMultiple(isset($extra) ? array_merge($data, $extra) : $data, $this->lifeTime); return $this->filterNonNull($data); } + + /** + * @param int[] $recordIds + * @param string[]|null $names + * @return string[] + */ + private function computeKeys(array $recordIds, array $names = null) + { + if (!$recordIds) { + return []; + } elseif (null !== $names) { + return $this->generateCacheKeys($recordIds, $names); + } + + $keys = $this->generateAllCacheKeys($recordIds); + $data = $this->cache->fetchMultiple($keys); + + return count($keys) === count($data) ? call_user_func_array('array_merge', $data) : []; + } } From 753ab559923c31ee24d84c9efa30f5f7e0bd7a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 14 Apr 2016 14:24:05 +0200 Subject: [PATCH 243/383] fix cache invalidation on save --- .../Subdef/CachedMediaSubdefDataRepository.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php index dda9ae8a54..e576a6b1f1 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php @@ -113,9 +113,15 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository { $this->decorated->save($data); - $keys = array_map([$this, 'dataToKey'], $data); - // all saved keys are now stalled. decorated repository could modify values on store (update time for example) + $recordIds = []; + + foreach ($data as $item) { + $recordIds[] = $item['record_id']; + } + + $keys = array_merge(array_map([$this, 'dataToKey'], $data), $this->generateAllCacheKeys($recordIds)); + array_walk($keys, [$this->cache, 'delete']); } @@ -160,6 +166,8 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository */ private function generateAllCacheKeys(array $recordIds) { + $recordIds = array_unique($recordIds); + return array_map([$this, 'getCacheKey'], $recordIds, array_fill(0, count($recordIds), null)); } From 6801b8a5fa84a84cb07dbe21e81c5dcba5884add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 14 Apr 2016 15:09:20 +0200 Subject: [PATCH 244/383] reduce fetchAndSave complexity --- .../CachedMediaSubdefDataRepository.php | 49 ++++++++++++++----- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php index e576a6b1f1..712575c628 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php @@ -181,21 +181,11 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository { $retrieved = $this->decorated->findByRecordIdsAndNames($recordIds, $names); - if (null === $names) { - $extra = array_fill_keys($this->generateAllCacheKeys($recordIds), []); + $data = $this->normalizeRetrievedData($retrieved, $keys); - foreach ($retrieved as $item) { - $extra[$this->getCacheKey($item['record_id'])][] = $this->getCacheKey($item['record_id'], $item['name']); - } - } + $toCache = null === $names ? $this->appendCacheExtraData($data, $retrieved, $recordIds) : $data; - $data = array_fill_keys($keys, null); - - foreach ($retrieved as $item) { - $data[$this->dataToKey($item)] = $item; - } - - $this->cache->saveMultiple(isset($extra) ? array_merge($data, $extra) : $data, $this->lifeTime); + $this->cache->saveMultiple($toCache, $this->lifeTime); return $this->filterNonNull($data); } @@ -218,4 +208,37 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository return count($keys) === count($data) ? call_user_func_array('array_merge', $data) : []; } + + /** + * @param array $retrieved + * @param array $keys + * @return array + */ + private function normalizeRetrievedData(array $retrieved, array $keys) + { + $data = array_fill_keys($keys, null); + + foreach ($retrieved as $item) { + $data[$this->dataToKey($item)] = $item; + } + + return $data; + } + + /** + * @param array $data + * @param array $retrieved + * @param array $recordIds + * @return array + */ + private function appendCacheExtraData(array $data, array $retrieved, array $recordIds) + { + $extra = array_fill_keys($this->generateAllCacheKeys($recordIds), []); + + foreach ($retrieved as $item) { + $extra[$this->getCacheKey($item['record_id'])][] = $this->getCacheKey($item['record_id'], $item['name']); + } + + return array_merge($data, $extra); + } } From 0d362c479ef7f75dbf5356f06d4d3c429dac42ba Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Thu, 14 Apr 2016 15:51:42 +0200 Subject: [PATCH 245/383] add localization for maps, msic fixes --- .../Controller/Prod/LanguageController.php | 9 +++++++-- package.json | 2 +- resources/www/common/images/icons/map-active.png | Bin 0 -> 1304 bytes .../prod/skins/ui-components/_search-form.scss | 2 -- .../web/prod/actions/edit_default.html.twig | 1 + 5 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 resources/www/common/images/icons/map-active.png diff --git a/lib/Alchemy/Phrasea/Controller/Prod/LanguageController.php b/lib/Alchemy/Phrasea/Controller/Prod/LanguageController.php index 12e4360c18..b75cdfae1b 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/LanguageController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/LanguageController.php @@ -17,13 +17,13 @@ class LanguageController /** @var TranslatorInterface */ private $translator; private $serverName; - + public function __construct(TranslatorInterface $translator, $serverName) { $this->translator = $translator; $this->serverName = $serverName; } - + public function getTranslationsAction() { $translator = $this->translator; @@ -111,6 +111,11 @@ class LanguageController 'toolbox' => $translator->trans('Tool box'), 'print' => $translator->trans('Print'), 'attention' => $translator->trans('Attention !'), + 'mapMarkerEdit' => $translator->trans('Edit position'), + 'mapMarkerAdd' => $translator->trans('Add a position'), + 'mapMarkerMoveLabel' => $translator->trans('Drag and drop the pin to move position'), + 'mapMarkerEditCancel' => $translator->trans('Cancel'), + 'mapMarkerEditSubmit' => $translator->trans('Submit'), ]); } } diff --git a/package.json b/package.json index fc6f52a80a..f97a3ac59a 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,6 @@ "postinstall": "./node_modules/.bin/gulp install;" }, "dependencies": { - "phraseanet-production-client": "~0.16.0" + "phraseanet-production-client": "~0.16.2" } } diff --git a/resources/www/common/images/icons/map-active.png b/resources/www/common/images/icons/map-active.png new file mode 100644 index 0000000000000000000000000000000000000000..81e7d2bf3fbbe41bc7965272c7825c4a8ca48edc GIT binary patch literal 1304 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%o>>?5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8hm3bwJ6}oxF$}kgLQj3#|G7CyF^YauyCMG83 zmzLNn0bL65LT-VtFWlg~VrW1CgG|37u|VHY&pf(~1RD?6IsxA(xEJ)Q4 zN-fSWElLK)N18HBGcfG%TLe-Fbd8luesXDUYF>$_i>(q+L@y;X#mdsn+1S;@)zQt- z*wxU`)zre($jr&b#m&vg!rZ{k*#M^3Gq1QLF)uk4rZ*Fz*AlN@E9aur#FG4?ko^1{ zSnLI4`V{Iy*T!IvE(6TRNGTTUsbV^`>C)JyfqNPQCg-$LNEi7b&`7LclZx zV!{(IkONQtsd>OOUj$6tPYexQ7#JAaJY5_^DsHX0?61KRD8v3?X72Y5mL6W)u3Xa+ zFFJVCVnf#LoFnUsCSIOaG@ID1V_x|@+ zZm(*d7+*Wf{Qdd$_xF51wq;ov&-4{7l@gDBtMxd0&fQ{v`R~s!((g8M?LGCIBgAoj z-lp@ao-;hVF8H~AYu&5D^>Jpi^Ql@%ZSL*<)~)FicvmFO-!gx}gQZG0FQ~3)*Pir^ z>(2jWiwrXwif6Q%uvmQKlAIUAaxNh-JW$}70^i&lH9&XK;N+U3aV<1ne) zXw8w8%Z_X`d48;YxnBLB1IuqYGGi`h5T5QO_VE)^vcMIPH zE=sO4U!d0Y>DsBKtCJt8WiWQT?`J$)z}#DK$TaZl6}AV0Vh<$TcHU_7tVq7y$@D#E zM)qg5x~P?}r22lyhZa9%-XnegxRJl*ljN60)t_bdJU;esic3;=wyu4D@FMnGJoyjr rEMB7GrP=vUO7rrz+{gBhoEsP!7=j~1Qd}0C1eH~uu6{1-oD!M<5lz`Y literal 0 HcmV?d00001 diff --git a/resources/www/prod/skins/ui-components/_search-form.scss b/resources/www/prod/skins/ui-components/_search-form.scss index a0ce129c26..689a7dd186 100644 --- a/resources/www/prod/skins/ui-components/_search-form.scss +++ b/resources/www/prod/skins/ui-components/_search-form.scss @@ -121,5 +121,3 @@ form.phrasea_query input.query { vertical-align: middle; max-height: 22px; } - - diff --git a/templates/web/prod/actions/edit_default.html.twig b/templates/web/prod/actions/edit_default.html.twig index 0cdfb53f20..7db2dcc88c 100644 --- a/templates/web/prod/actions/edit_default.html.twig +++ b/templates/web/prod/actions/edit_default.html.twig @@ -411,6 +411,7 @@ mode: {% if recordsRequest.isSingleStory() %}'GRP'{% else %}'LST'{% endif %}, notActionable: {{ not_actionable }}, notActionableMsg: '{{notActionableMsg}}', + diapoSize: {{ app['settings'].getUserSetting(app.getAuthenticatedUser(), 'editing_images_size') }}, state: { T_statbits: {{ JSonStatus|raw }}, T_fields: {{ JSonFields|raw }}, From 5aef71f4671608d3b8c77cb8699cd05f899180b3 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Thu, 14 Apr 2016 15:54:44 +0200 Subject: [PATCH 246/383] linting --- .../Phrasea/Controller/Prod/LanguageController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Prod/LanguageController.php b/lib/Alchemy/Phrasea/Controller/Prod/LanguageController.php index b75cdfae1b..ea20307283 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/LanguageController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/LanguageController.php @@ -111,11 +111,11 @@ class LanguageController 'toolbox' => $translator->trans('Tool box'), 'print' => $translator->trans('Print'), 'attention' => $translator->trans('Attention !'), - 'mapMarkerEdit' => $translator->trans('Edit position'), - 'mapMarkerAdd' => $translator->trans('Add a position'), - 'mapMarkerMoveLabel' => $translator->trans('Drag and drop the pin to move position'), - 'mapMarkerEditCancel' => $translator->trans('Cancel'), - 'mapMarkerEditSubmit' => $translator->trans('Submit'), + 'mapMarkerEdit' => $translator->trans('Edit position'), + 'mapMarkerAdd' => $translator->trans('Add a position'), + 'mapMarkerMoveLabel' => $translator->trans('Drag and drop the pin to move position'), + 'mapMarkerEditCancel' => $translator->trans('Cancel'), + 'mapMarkerEditSubmit' => $translator->trans('Submit'), ]); } } From 439517a4b541236cfe076c3d0a02565a66e65018 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 14 Apr 2016 16:33:09 +0200 Subject: [PATCH 247/383] PHRAS-1072_Export-Logs-To-ES #time 15m add : 'ip' type to ES mapping builder so a 'ip' field can be created into ES logs --- lib/Alchemy/Phrasea/SearchEngine/Elastic/Mapping.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Mapping.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Mapping.php index 2f44fcc7bd..aad818cc95 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Mapping.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Mapping.php @@ -36,6 +36,7 @@ class Mapping const TYPE_LONG = 'long'; const TYPE_SHORT = 'short'; const TYPE_BYTE = 'byte'; + const TYPE_IP = 'ip'; // Compound types const TYPE_OBJECT = 'object'; @@ -49,6 +50,7 @@ class Mapping self::TYPE_LONG, self::TYPE_SHORT, self::TYPE_BYTE, + self::TYPE_IP, ); public function add($name, $type) From 97c622005557b8c8e595c571b37abace37f9f113 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Fri, 15 Apr 2016 14:21:28 +0200 Subject: [PATCH 248/383] Bump Phraseanet production client - misc fixes - update loading animation --- package.json | 2 +- resources/www/common/images/icons/loading.svg | 6 ++++++ resources/www/prod/skins/000000/skin-000000.scss | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 resources/www/common/images/icons/loading.svg diff --git a/package.json b/package.json index f97a3ac59a..e050f37b8a 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,6 @@ "postinstall": "./node_modules/.bin/gulp install;" }, "dependencies": { - "phraseanet-production-client": "~0.16.2" + "phraseanet-production-client": "~0.17.0" } } diff --git a/resources/www/common/images/icons/loading.svg b/resources/www/common/images/icons/loading.svg new file mode 100644 index 0000000000..51cd6e71d4 --- /dev/null +++ b/resources/www/common/images/icons/loading.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/resources/www/prod/skins/000000/skin-000000.scss b/resources/www/prod/skins/000000/skin-000000.scss index dc60c02f8a..60e83d915a 100644 --- a/resources/www/prod/skins/000000/skin-000000.scss +++ b/resources/www/prod/skins/000000/skin-000000.scss @@ -99,7 +99,7 @@ $editTextMultiValueHighlightBg: #222222; $preferencesLabelColor: #999999; $activeStateIcon: 'ui-icons_cccccc_256x240.png'; -$accordionLoaderImg: 'loader-white.gif'; +$accordionLoaderImg: 'loading.svg'; $accordionBgHeaderHover: #474747; $inputButtonHoverColor: #FEFEFE; @@ -113,7 +113,7 @@ $overlayBg: #111111; $tabsNavBg: #666666; $tabsNavBgActive: $mediumBackgroundColor; -$contentLoaderImg: 'loader-white.gif'; +$contentLoaderImg: 'loading.svg'; $btnBackground: #f2f2f2; $btnBackgroundHighlight: #D6D6D6; From 581d5115afb751b1dbbc2b6677d1f53104b5a607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Fri, 15 Apr 2016 15:28:31 +0200 Subject: [PATCH 249/383] Add FirstResult and MaxPerPage properties to SearchEngineOptions --- .../SearchEngine/SearchEngineOptions.php | 210 +++++++++++------- .../SearchEngine/SearchEngineOptionsTest.php | 2 + 2 files changed, 136 insertions(+), 76 deletions(-) diff --git a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php index 0b1dad1798..52528740de 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php +++ b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php @@ -14,6 +14,8 @@ namespace Alchemy\Phrasea\SearchEngine; use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Authentication\ACLProvider; use Alchemy\Phrasea\Authentication\Authenticator; +use Alchemy\Phrasea\Collection\Reference\CollectionReferenceCollection; +use Assert\Assertion; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; @@ -47,9 +49,76 @@ class SearchEngineOptions 'stemming', 'sort_by', 'sort_ord', - 'business_fields' + 'business_fields', + 'max_per_page', + 'first_result', ]; + /** + * @param Application $app + * @return array + */ + private static function getHydrateMethods(Application $app) + { + $fieldNormalizer = function ($value) use ($app) { + return array_map(function ($serialized) use ($app) { + $data = explode('_', $serialized, 2); + + return $app->findDataboxById($data[0])->get_meta_structure()->get_element($data[1]); + }, $value); + }; + + $collectionNormalizer = function ($value) use ($app) { + $references = new CollectionReferenceCollection($app['repo.collection-references']->findMany($value)); + + $collections = []; + + foreach ($references->groupByDataboxIdAndCollectionId() as $databoxId => $indexes) { + $repository = $app['repo.collections-registry']->getRepositoryByDatabox($databoxId); + + foreach ($indexes as $collectionId => $index) { + $collections[] = $repository->find($collectionId); + } + } + + return $collections; + }; + + $methods = [ + 'record_type' => 'setRecordType', + 'search_type' => 'setSearchType', + 'status' => 'setStatus', + 'date_min' => function ($value, SearchEngineOptions $options) { + $options->setMinDate($value ? \DateTime::createFromFormat(DATE_ATOM, $value) : null); + }, + 'date_max' => function ($value, SearchEngineOptions $options) { + $options->setMaxDate($value ? \DateTime::createFromFormat(DATE_ATOM, $value) : null); + }, + 'i18n' => function ($value, SearchEngineOptions $options) { + if ($value) { + $options->setLocale($value); + } + }, + 'stemming' => 'setStemming', + 'date_fields' => function ($value, SearchEngineOptions $options) use ($fieldNormalizer) { + $options->setDateFields($fieldNormalizer($value)); + }, + 'fields' => function ($value, SearchEngineOptions $options) use ($fieldNormalizer) { + $options->setFields($fieldNormalizer($value)); + }, + 'collections' => function ($value, SearchEngineOptions $options) use ($collectionNormalizer) { + $options->onCollections($collectionNormalizer($value)); + }, + 'business_fields' => function ($value, SearchEngineOptions $options) use ($collectionNormalizer) { + $options->allowBusinessFieldsOn($collectionNormalizer($value)); + }, + 'first_result' => 'setFirstResult', + 'max_per_page' => 'setMaxPerPage', + ]; + + return $methods; + } + /** @var string */ protected $record_type; @@ -77,6 +146,16 @@ class SearchEngineOptions protected $sort_ord = self::SORT_MODE_DESC; protected $business_fields = []; + /** + * @var int + */ + private $max_per_page = 10; + + /** + * @var int + */ + private $first_result = 0; + /** * Defines locale code to use for query * @@ -452,86 +531,34 @@ class SearchEngineOptions $options = new static(); $options->disallowBusinessFields(); - $sort_by = $sort_ord = null; + $methods = self::getHydrateMethods($app); + + $sort_by = null; + $methods['sort_by'] = function ($value) use (&$sort_by) { + $sort_by = $value; + }; + + $sort_ord = null; + $methods['sort_ord'] = function ($value) use (&$sort_ord) { + $sort_ord = $value; + }; foreach ($serialized as $key => $value) { - - switch (true) { - case is_null($value): - $value = null; - break; - case in_array($key, ['date_min', 'date_max']): - $value = \DateTime::createFromFormat(DATE_ATOM, $value); - break; - case $value instanceof \stdClass: - $tmpvalue = (array) $value; - $value = []; - - foreach ($tmpvalue as $k => $data) { - $k = ctype_digit($k) ? (int) $k : $k; - $value[$k] = $data; - } - break; - case in_array($key, ['date_fields', 'fields']): - $value = array_map(function ($serialized) use ($app) { - $data = explode('_', $serialized); - - return $app->findDataboxById($data[0])->get_meta_structure()->get_element($data[1]); - }, $value); - break; - case in_array($key, ['collections', 'business_fields']): - $value = array_map(function ($base_id) use ($app) { - return \collection::getByBaseId($app, $base_id); - }, $value); - break; + if (!isset($methods[$key])) { + throw new \RuntimeException(sprintf('Unable to handle key `%s`', $key)); } - switch ($key) { - case 'record_type': - $options->setRecordType($value); - break; - case 'search_type': - $options->setSearchType($value); - break; - case 'status': - $options->setStatus($value); - break; - case 'date_min': - $options->setMinDate($value); - break; - case 'date_max': - $options->setMaxDate($value); - break; - case 'i18n': - if ($value) { - $options->setLocale($value); - } - break; - case 'stemming': - $options->setStemming($value); - break; - case 'sort_by': - $sort_by = $value; - break; - case 'sort_ord': - $sort_ord = $value; - break; - case 'date_fields': - $options->setDateFields($value); - break; - case 'fields': - $options->setFields($value); - break; - case 'collections': - $options->onCollections($value); - break; - case 'business_fields': - $options->allowBusinessFieldsOn($value); - break; - default: - throw new \RuntimeException(sprintf('Unable to handle key `%s`', $key)); - break; + $callable = $methods[$key]; + + if (is_string($callable) && method_exists($options, $callable)) { + $callable = [$options, $callable]; } + + if ($value instanceof \stdClass) { + $value = (array)$value; + } + + $callable($value); } if ($sort_by) { @@ -682,4 +709,35 @@ class SearchEngineOptions return $options; } + + public function setMaxPerPage($max_per_page) + { + Assertion::greaterOrEqualThan($max_per_page, 0); + + $this->max_per_page = (int)$max_per_page; + } + + public function getMaxPerPage() + { + return $this->max_per_page; + } + + /** + * @param int $first_result + * @return void + */ + public function setFirstResult($first_result) + { + Assertion::greaterOrEqualThan($first_result, 0); + + $this->first_result = (int)$first_result; + } + + /** + * @return int + */ + public function getFirstResult() + { + return $this->first_result; + } } diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php index 3276d1ed99..9605c9aece 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php @@ -38,6 +38,8 @@ class SearchEngineOptionsTest extends \PhraseanetTestCase $options->setMinDate(\DateTime::createFromFormat(DATE_ATOM, $min_date->format(DATE_ATOM))); $options->setMaxDate(\DateTime::createFromFormat(DATE_ATOM, $max_date->format(DATE_ATOM))); + $options->setFirstResult(3); + $options->setMaxPerPage(42); $serialized = $options->serialize(); From 033542ac2f5cba1e866d5b3376bb6b2b7d4351de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Fri, 15 Apr 2016 16:34:47 +0200 Subject: [PATCH 250/383] Remove some arguments from query and add them to options --- .../Phrasea/Controller/Api/SearchController.php | 13 ++++++------- .../Phrasea/Controller/Api/V1Controller.php | 10 +++++----- .../Phrasea/Controller/Prod/QueryController.php | 10 +++++----- .../SearchEngine/Elastic/ElasticSearchEngine.php | 12 +++++++----- .../SearchEngine/SearchEngineInterface.php | 7 ++----- .../Phrasea/SearchEngine/SearchEngineOptions.php | 16 ++++++++-------- lib/classes/caption/record.php | 15 +++++++++++++++ lib/classes/databox/descriptionStructure.php | 10 ++++++++++ lib/classes/record/preview.php | 15 +++++++++++---- .../SearchEngine/SearchEngineOptionsTest.php | 2 +- 10 files changed, 70 insertions(+), 40 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Api/SearchController.php b/lib/Alchemy/Phrasea/Controller/Api/SearchController.php index 9a8ca841eb..e1113b3919 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/SearchController.php +++ b/lib/Alchemy/Phrasea/Controller/Api/SearchController.php @@ -1,5 +1,5 @@ app, $request); - - $offsetStart = (int) ($request->get('offset_start') ?: 0); - $perPage = (int) $request->get('per_page') ?: 10; + $options->setFirstResult($request->get('offset_start') ?: 0); + $options->setMaxResults($request->get('per_page') ?: 10); $query = (string) $request->get('query'); $this->getSearchEngine()->resetCache(); - $search_result = $this->getSearchEngine()->query($query, $offsetStart, $perPage, $options); + $search_result = $this->getSearchEngine()->query($query, $options); $this->getUserManipulator()->logQuery($this->getAuthenticatedUser(), $search_result->getQuery()); @@ -74,8 +73,8 @@ class SearchController extends Controller $this->getSearchEngine()->clearCache(); $ret = [ - 'offset_start' => $offsetStart, - 'per_page' => $perPage, + 'offset_start' => $options->getFirstResult(), + 'per_page' => $options->getMaxResults(), 'available_results' => $search_result->getAvailable(), 'total_results' => $search_result->getTotal(), 'error' => (string)$search_result->getError(), diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index 13b79cccfc..add7eccc8c 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -1088,13 +1088,13 @@ class V1Controller extends Controller { $options = SearchEngineOptions::fromRequest($this->app, $request); - $offsetStart = (int) ($request->get('offset_start') ?: 0); - $perPage = (int) $request->get('per_page') ?: 10; + $options->setFirstResult((int) ($request->get('offset_start') ?: 0)); + $options->setMaxResults((int) $request->get('per_page') ?: 10); $query = (string) $request->get('query'); $this->getSearchEngine()->resetCache(); - $search_result = $this->getSearchEngine()->query($query, $offsetStart, $perPage, $options); + $search_result = $this->getSearchEngine()->query($query, $options); $this->getUserManipulator()->logQuery($this->getAuthenticatedUser(), $search_result->getQuery()); @@ -1112,8 +1112,8 @@ class V1Controller extends Controller $this->getSearchEngine()->clearCache(); $ret = [ - 'offset_start' => $offsetStart, - 'per_page' => $perPage, + 'offset_start' => $options->getFirstResult(), + 'per_page' => $options->getMaxResults(), 'available_results' => $search_result->getAvailable(), 'total_results' => $search_result->getTotal(), 'error' => (string)$search_result->getError(), diff --git a/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php b/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php index 8c1a179de1..57c7df6692 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php @@ -43,8 +43,6 @@ class QueryController extends Controller $options = SearchEngineOptions::fromRequest($this->app, $request); - $form = $options->serialize(); - $perPage = (int) $this->getSettings()->getUserSetting($this->getAuthenticatedUser(), 'images_per_page'); $page = (int) $request->request->get('pag'); @@ -56,13 +54,15 @@ class QueryController extends Controller $page = 1; } + $options->setFirstResult(($page - 1) * $perPage); + $options->setMaxResults($perPage); + $user = $this->getAuthenticatedUser(); $userManipulator = $this->getUserManipulator(); $userManipulator->logQuery($user, $query); try { - /** @var SearchEngineResult $result */ - $result = $engine->query($query, (($page - 1) * $perPage), $perPage, $options); + $result = $engine->query($query, $options); if ($this->getSettings()->getUserSetting($user, 'start_page') === 'LAST_QUERY') { $userManipulator->setUserSetting($user, 'start_page_query', $query); @@ -216,7 +216,7 @@ class QueryController extends Controller $json['total_answers'] = (int) $result->getAvailable(); $json['next_page'] = ($page < $npages && $result->getAvailable() > 0) ? ($page + 1) : false; $json['prev_page'] = ($page > 1 && $result->getAvailable() > 0) ? ($page - 1) : false; - $json['form'] = $form; + $json['form'] = $options->serialize(); } catch(\Exception $e) { // we'd like a message from the parser so get all the exceptions messages diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticSearchEngine.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticSearchEngine.php index a6ec2a1bf6..073325d510 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticSearchEngine.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticSearchEngine.php @@ -268,7 +268,7 @@ class ElasticSearchEngine implements SearchEngineInterface /** * {@inheritdoc} */ - public function query($string, $offset, $perPage, SearchEngineOptions $options = null) + public function query($string, SearchEngineOptions $options = null) { $options = $options ?: new SearchEngineOptions(); $context = $this->context_factory->createContext($options); @@ -282,13 +282,15 @@ class ElasticSearchEngine implements SearchEngineInterface // ask ES to return field _version (incremental version number of document) $params['body']['version'] = true; - $params['body']['from'] = $offset; - $params['body']['size'] = $perPage; + $params['body']['from'] = $options->getFirstResult(); + $params['body']['size'] = $options->getMaxResults(); if($this->options->getHighlight()) { $params['body']['highlight'] = $this->buildHighlightRules($context); } - if ($aggs = $this->getAggregationQueryParams($options)) { + $aggs = $this->getAggregationQueryParams($options); + + if ($aggs) { $params['body']['aggs'] = $aggs; } @@ -314,7 +316,7 @@ class ElasticSearchEngine implements SearchEngineInterface $results, // ArrayCollection of results json_encode($query), $res['took'], // duration - $offset, // offset start + $options->getFirstResult(), $res['hits']['total'], // available $res['hits']['total'], // total null, // error diff --git a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineInterface.php b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineInterface.php index e9bc7a01b0..e0f993d70b 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineInterface.php +++ b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineInterface.php @@ -76,7 +76,7 @@ interface SearchEngineInterface /** * - * @return an array of self::GEM_TYPE_* indexed types + * @return array an array of self::GEM_TYPE_* indexed types */ public function getAvailableTypes(); @@ -162,15 +162,12 @@ interface SearchEngineInterface public function updateFeedEntry(FeedEntry $entry); /** - * * @param string $query - * @param integer $offset - * @param integer $perPage * @param SearchEngineOptions $options * * @return SearchEngineResult */ - public function query($query, $offset, $perPage, SearchEngineOptions $options = null); + public function query($query, SearchEngineOptions $options = null); /** * Return an array of suggestions corresponding to the last word of the diff --git a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php index 52528740de..f2aafb682c 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php +++ b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php @@ -50,7 +50,7 @@ class SearchEngineOptions 'sort_by', 'sort_ord', 'business_fields', - 'max_per_page', + 'max_results', 'first_result', ]; @@ -113,7 +113,7 @@ class SearchEngineOptions $options->allowBusinessFieldsOn($collectionNormalizer($value)); }, 'first_result' => 'setFirstResult', - 'max_per_page' => 'setMaxPerPage', + 'max_results' => 'setResults', ]; return $methods; @@ -149,7 +149,7 @@ class SearchEngineOptions /** * @var int */ - private $max_per_page = 10; + private $max_results = 10; /** * @var int @@ -710,16 +710,16 @@ class SearchEngineOptions return $options; } - public function setMaxPerPage($max_per_page) + public function setMaxResults($max_results) { - Assertion::greaterOrEqualThan($max_per_page, 0); + Assertion::greaterOrEqualThan($max_results, 0); - $this->max_per_page = (int)$max_per_page; + $this->max_results = (int)$max_results; } - public function getMaxPerPage() + public function getMaxResults() { - return $this->max_per_page; + return $this->max_results; } /** diff --git a/lib/classes/caption/record.php b/lib/classes/caption/record.php index 714ac8aeef..c3199f625a 100644 --- a/lib/classes/caption/record.php +++ b/lib/classes/caption/record.php @@ -192,6 +192,21 @@ SQL; return false; } + /** + * @return caption_field[] + */ + public function getDCFields() + { + $databoxDcesFieldIds = array_map(function (databox_field $databox_field) { + return $databox_field->get_id(); + }, $this->getDatabox()->get_meta_structure()->getDcesFields()); + + return array_intersect_key( + $this->retrieve_fields(), + array_fill_keys($databoxDcesFieldIds, null) + ); + } + /** * @param string $label * @return caption_field|null diff --git a/lib/classes/databox/descriptionStructure.php b/lib/classes/databox/descriptionStructure.php index 1e81488939..d772d0e514 100644 --- a/lib/classes/databox/descriptionStructure.php +++ b/lib/classes/databox/descriptionStructure.php @@ -114,6 +114,16 @@ class databox_descriptionStructure implements IteratorAggregate, Countable : null; } + /** + * @return databox_field[] + */ + public function getDcesFields() + { + return array_filter($this->elements, function (databox_field $field) { + return null !== $field->get_dces_element(); + }); + } + /** * @param string $label * @return databox_field|null diff --git a/lib/classes/record/preview.php b/lib/classes/record/preview.php index 83513249c6..4c84db903e 100644 --- a/lib/classes/record/preview.php +++ b/lib/classes/record/preview.php @@ -89,8 +89,13 @@ class record_preview extends record_adapter if (null === $search_engine) { throw new \LogicException('Search Engine should be provided'); } + if (!$options) { + $options = new SearchEngineOptions(); + } + $options->setFirstResult($pos); + $options->setMaxResults(1); - $results = $search_engine->query($query, (int) ($pos), 1, $options); + $results = $search_engine->query($query, $options); if ($results->getResults()->isEmpty()) { throw new Exception('Record introuvable'); @@ -187,9 +192,11 @@ class record_preview extends record_adapter switch ($this->env) { case 'RESULT': - $perPage = 56; - $index = ($this->pos - 3) < 0 ? 0 : ($this->pos - 3); - $results = $this->searchEngine->query($this->query, $index, $perPage, $this->options); + $options = $this->options ?: new SearchEngineOptions(); + $options->setFirstResult(($this->pos - 3) < 0 ? 0 : ($this->pos - 3)); + $options->setMaxResults(56); + + $results = $this->searchEngine->query($this->query, $options); $this->train = $results->getResults()->toArray(); break; diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php index 9605c9aece..ef9e66cf31 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php @@ -39,7 +39,7 @@ class SearchEngineOptionsTest extends \PhraseanetTestCase $options->setMinDate(\DateTime::createFromFormat(DATE_ATOM, $min_date->format(DATE_ATOM))); $options->setMaxDate(\DateTime::createFromFormat(DATE_ATOM, $max_date->format(DATE_ATOM))); $options->setFirstResult(3); - $options->setMaxPerPage(42); + $options->setMaxResults(42); $serialized = $options->serialize(); From fef27d31bd59dec4667912b480aa6af17915e49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Fri, 15 Apr 2016 17:09:18 +0200 Subject: [PATCH 251/383] Fix calls to Options setters --- .../SearchEngine/SearchEngineOptions.php | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php index f2aafb682c..ac682970c8 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php +++ b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php @@ -56,7 +56,7 @@ class SearchEngineOptions /** * @param Application $app - * @return array + * @return callable[] */ private static function getHydrateMethods(Application $app) { @@ -84,10 +84,16 @@ class SearchEngineOptions return $collections; }; - $methods = [ - 'record_type' => 'setRecordType', - 'search_type' => 'setSearchType', - 'status' => 'setStatus', + $optionSetter = function ($setter) { + return function ($value, SearchEngineOptions $options) use ($setter) { + $options->{$setter}($value); + }; + }; + + return [ + 'record_type' => $optionSetter('setRecordType'), + 'search_type' => $optionSetter('setSearchType'), + 'status' => $optionSetter('setStatus'), 'date_min' => function ($value, SearchEngineOptions $options) { $options->setMinDate($value ? \DateTime::createFromFormat(DATE_ATOM, $value) : null); }, @@ -99,7 +105,7 @@ class SearchEngineOptions $options->setLocale($value); } }, - 'stemming' => 'setStemming', + 'stemming' => $optionSetter('setStemming'), 'date_fields' => function ($value, SearchEngineOptions $options) use ($fieldNormalizer) { $options->setDateFields($fieldNormalizer($value)); }, @@ -112,11 +118,9 @@ class SearchEngineOptions 'business_fields' => function ($value, SearchEngineOptions $options) use ($collectionNormalizer) { $options->allowBusinessFieldsOn($collectionNormalizer($value)); }, - 'first_result' => 'setFirstResult', - 'max_results' => 'setResults', + 'first_result' => $optionSetter('setFirstResult'), + 'max_results' => $optionSetter('setMaxResults'), ]; - - return $methods; } /** @var string */ @@ -548,17 +552,13 @@ class SearchEngineOptions throw new \RuntimeException(sprintf('Unable to handle key `%s`', $key)); } - $callable = $methods[$key]; - - if (is_string($callable) && method_exists($options, $callable)) { - $callable = [$options, $callable]; - } - if ($value instanceof \stdClass) { $value = (array)$value; } - $callable($value); + $callable = $methods[$key]; + + $callable($value, $options); } if ($sort_by) { From e46ce07fbb06902fc5e9ec3164d9a30985adeba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Fri, 15 Apr 2016 17:37:23 +0200 Subject: [PATCH 252/383] remove unusable @covers annotations --- .../Phrasea/Controller/Api/ApiJsonTest.php | 9 ++++--- .../Phrasea/Controller/Prod/QueryTest.php | 11 +-------- .../Phrasea/Controller/Prod/RecordsTest.php | 24 ------------------- 3 files changed, 7 insertions(+), 37 deletions(-) diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php index 4fbad594a2..6945e4c151 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php @@ -903,11 +903,14 @@ class ApiJsonTest extends ApiTestCase ->method('getSuggestions') ->will($this->returnValue(new ArrayCollection())); - self::$DI['app']['phraseanet.SE'] = $this->getMock('Alchemy\Phrasea\SearchEngine\SearchEngineInterface'); + $app = $this->getApplication(); + $mock = $this->getMock('Alchemy\Phrasea\SearchEngine\SearchEngineInterface'); + $app['phraseanet.SE'] = $mock; - self::$DI['app']['phraseanet.SE']->expects($this->once()) + $mock + ->expects($this->once()) ->method('query') - ->with('koala', 0, 10) + ->withAnyParameters() ->will($this->returnValue( $this->getMockBuilder('Alchemy\Phrasea\SearchEngine\SearchEngineResult') ->disableOriginalConstructor() diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Prod/QueryTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Prod/QueryTest.php index a89a2a2877..3cc103a18b 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Prod/QueryTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Prod/QueryTest.php @@ -13,10 +13,6 @@ use Prophecy\Argument; */ class QueryTest extends \PhraseanetAuthenticatedWebTestCase { - - /** - * @covers Alchemy\Phrasea\Controller\Prod\Query::query - */ public function testQuery() { $route = '/prod/query/'; @@ -46,9 +42,6 @@ class QueryTest extends \PhraseanetAuthenticatedWebTestCase $this->assertInternalType('array', $data); } - /** - * @covers Alchemy\Phrasea\Controller\Prod\Query::queryAnswerTrain - */ public function testQueryAnswerTrain() { $app = $this->mockElasticsearchResult(self::$DI['record_2']); @@ -58,13 +51,11 @@ class QueryTest extends \PhraseanetAuthenticatedWebTestCase $options->onCollections($app->getAclForUser($app->getAuthenticatedUser())->get_granted_base()); $serializedOptions = $options->serialize(); - $client = $this->getClient(); - $client->request('POST', '/prod/query/answer-train/', [ + $response = $this->request('POST', '/prod/query/answer-train/', [ 'options_serial' => $serializedOptions, 'pos' => 0, 'query' => '' ]); - $response = $client->getResponse(); $this->assertTrue($response->isOk()); $datas = (array) json_decode($response->getContent()); $this->assertArrayHasKey('current', $datas); diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Prod/RecordsTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Prod/RecordsTest.php index f188060e4d..2a94180c1f 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Prod/RecordsTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Prod/RecordsTest.php @@ -18,9 +18,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase { protected $client; - /** - * @covers Alchemy\Phrasea\Controller\Prod\Records::whatCanIDelete - */ public function testWhatCanIDelete() { self::$DI['client']->request('POST', '/prod/records/delete/what/', ['lst' => self::$DI['record_1']->get_serialize_key()]); @@ -29,9 +26,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase unset($response); } - /** - * @covers Alchemy\Phrasea\Controller\Prod\Records::doDeleteRecords - */ public function testDoDeleteRecords() { $file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/cestlafete.jpg'), self::$DI['collection']); @@ -47,9 +41,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase } } - /** - * @covers Alchemy\Phrasea\Controller\Prod\Records::renewUrl - */ public function testRenewUrl() { $file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/cestlafete.jpg'), self::$DI['collection']); @@ -60,9 +51,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase $record->delete(); } - /** - * @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord - */ public function testGetRecordDetailNotAjax() { self::$DI['client']->request('POST', '/prod/records/'); @@ -108,9 +96,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase $this->assertArrayHasKey('title', $data); } - /** - * @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord - */ public function testGetRecordDetailResult() { $app = $this->mockElasticsearchResult(self::$DI['record_1']); @@ -141,9 +126,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase $this->assertArrayHasKey('title', $data); } - /** - * @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord - */ public function testGetRecordDetailREG() { $this->authenticate(self::$DI['app']); @@ -168,9 +150,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase $this->assertObjectHasAttribute('title', $data); } - /** - * @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord - */ public function testGetRecordDetailBasket() { $this->authenticate(self::$DI['app']); @@ -198,9 +177,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase unset($response, $data); } - /** - * @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord - */ public function testGetRecordDetailFeed() { $this->authenticate(self::$DI['app']); From b4917aace0a3dfd2f7405105b585deab93a5ecb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Fri, 15 Apr 2016 17:53:59 +0200 Subject: [PATCH 253/383] fix search engine query mock --- tests/classes/PhraseanetAuthenticatedWebTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/classes/PhraseanetAuthenticatedWebTestCase.php b/tests/classes/PhraseanetAuthenticatedWebTestCase.php index 09a456bb7a..732b422ed2 100644 --- a/tests/classes/PhraseanetAuthenticatedWebTestCase.php +++ b/tests/classes/PhraseanetAuthenticatedWebTestCase.php @@ -221,7 +221,7 @@ abstract class PhraseanetAuthenticatedWebTestCase extends \PhraseanetAuthenticat ); $searchEngine = $this->prophesize(SearchEngineInterface::class); - $searchEngine->query('', 0, Argument::any(), Argument::any()) + $searchEngine->query('', Argument::any()) ->willReturn($result); $app['search_engine'] = $searchEngine->reveal(); From 96dee674822bcbaed1716966188b23dd33dfcfc0 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Mon, 25 Apr 2016 17:14:51 +0200 Subject: [PATCH 254/383] PHRAS-1091_ORDER_ROUTE_STORIES #time 10m fix : remove stories from ordered items --- lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php index 2b0e05a618..d8a6e5d672 100644 --- a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php +++ b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php @@ -190,7 +190,7 @@ class ApiOrderController extends BaseOrderController $filtered = []; foreach ($records as $index => $record) { - if ($acl->has_right_on_base($record->getBaseId(), 'cancmd')) { + if (!$record->isStory() && $acl->has_right_on_base($record->getBaseId(), 'cancmd')) { $filtered[$index] = $record; } } From 95b52c038b7934a94b384d6e2b8363c2fef873bb Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Wed, 27 Apr 2016 20:06:36 +0200 Subject: [PATCH 255/383] PHRAS-1094_ES-LIB-UPGRADE #time 1d change : upgrade the php-es lib to 2.x --- composer.json | 2 +- .../Core/Provider/SearchEngineServiceProvider.php | 10 ++++++++-- lib/Alchemy/Phrasea/SearchEngine/Elastic/Mapping.php | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 87c5145838..56c00e8229 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "doctrine/dbal": "^2.4.0", "doctrine/migrations": "^1.0.0", "doctrine/orm": "^2.4.0", - "elasticsearch/elasticsearch": "~1.0", + "elasticsearch/elasticsearch": "~2.0", "facebook/php-sdk": "~3.0", "firebase/php-jwt": "^3.0.0", "gedmo/doctrine-extensions": "~2.3.0", diff --git a/lib/Alchemy/Phrasea/Core/Provider/SearchEngineServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/SearchEngineServiceProvider.php index d78e5f6dca..8826f5055c 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/SearchEngineServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/SearchEngineServiceProvider.php @@ -29,7 +29,7 @@ use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryContextFactory; use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryCompiler; use Alchemy\Phrasea\SearchEngine\Elastic\Structure\GlobalStructure; use Alchemy\Phrasea\SearchEngine\Elastic\Thesaurus; -use Elasticsearch\Client; +use Elasticsearch\ClientBuilder; use Hoa\Compiler; use Hoa\File; use Monolog\Handler\ErrorLogHandler; @@ -153,7 +153,13 @@ class SearchEngineServiceProvider implements ServiceProviderInterface $clientParams['logging'] = true; } - return new Client($clientParams); + $clientBuilder = ClientBuilder::create() + ->setHosts($clientParams['hosts']); + if(array_key_exists('logObject', $clientParams)) { + $clientBuilder->setLogger($clientParams['logObject']); + } + + return $clientBuilder->build(); }); $app['elasticsearch.options'] = $app->share(function($app) { diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Mapping.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Mapping.php index aad818cc95..90558d315a 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Mapping.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Mapping.php @@ -106,7 +106,7 @@ class Mapping unset($field['index_analyzer'], $field['search_analyzer']); break; case 'indexing': - $field['index_analyzer'] = $analyzer; + $field['analyzer'] = $analyzer; break; case 'searching': $field['search_analyzer'] = $analyzer; From 5a3d7f6ff1049b5512bd04595b5fe0bdf3cf2e09 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 28 Apr 2016 11:17:38 +0200 Subject: [PATCH 256/383] PHRAS-1094_ES-LIB-UPGRADE #time 10m --- composer.lock | 371 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 266 insertions(+), 105 deletions(-) diff --git a/composer.lock b/composer.lock index e9aa12e5bf..ec11b04543 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "c14533f5de6e67350e76f68e5814e122", - "content-hash": "b49e25a0ed3d566b1411aa46f3f563df", + "hash": "befb0baa21178f9579b2ea7340bc2243", + "content-hash": "e45d7dc1efd9ba860d7d6e73c96e62e3", "packages": [ { "name": "alchemy-fr/tcpdf-clone", @@ -15,6 +15,12 @@ "url": "https://github.com/alchemy-fr/tcpdf-clone.git", "reference": "2ba0248a7187f1626df6c128750650416267f0e7" }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alchemy-fr/tcpdf-clone/zipball/2ba0248a7187f1626df6c128750650416267f0e7", + "reference": "2ba0248a7187f1626df6c128750650416267f0e7", + "shasum": "" + }, "require": { "php": ">=5.3.0" }, @@ -61,6 +67,10 @@ "qrcode", "tcpdf" ], + "support": { + "source": "https://github.com/alchemy-fr/tcpdf-clone/tree/6.0.039", + "issues": "https://github.com/alchemy-fr/tcpdf-clone/issues" + }, "time": "2013-10-13 16:11:17" }, { @@ -536,6 +546,12 @@ "url": "https://github.com/alchemy-fr/symfony-cors.git", "reference": "dbf7fcff1ce9fc1265db12955476ff169eab7375" }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alchemy-fr/symfony-cors/zipball/dbf7fcff1ce9fc1265db12955476ff169eab7375", + "reference": "dbf7fcff1ce9fc1265db12955476ff169eab7375", + "shasum": "" + }, "require": { "symfony/http-kernel": "^2.3.0|^3.0.0" }, @@ -556,11 +572,7 @@ "Alchemy\\CorsBundle\\": "src/Bundle/" } }, - "autoload-dev": { - "psr-4": { - "Alchemy\\Cors\\Tests\\": "tests/unit/Component/" - } - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -700,16 +712,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "2.8.27", + "version": "2.8.29", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "c1605360b6624958a5397601ad5543cd45fcf8f7" + "reference": "83b86d1bbbca452b00a1f0bbea6fcbb506c76650" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c1605360b6624958a5397601ad5543cd45fcf8f7", - "reference": "c1605360b6624958a5397601ad5543cd45fcf8f7", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/83b86d1bbbca452b00a1f0bbea6fcbb506c76650", + "reference": "83b86d1bbbca452b00a1f0bbea6fcbb506c76650", "shasum": "" }, "require": { @@ -759,20 +771,20 @@ "s3", "sdk" ], - "time": "2016-01-30 00:53:32" + "time": "2016-04-11 17:00:10" }, { "name": "beberlei/assert", - "version": "v2.4", + "version": "v2.5", "source": { "type": "git", "url": "https://github.com/beberlei/assert.git", - "reference": "7281b1fd8118b31cb9162c2fb5a4cc6f01d62ed6" + "reference": "91e2690c4ecc8a4e3e2d333430069f6a0c694a7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/beberlei/assert/zipball/7281b1fd8118b31cb9162c2fb5a4cc6f01d62ed6", - "reference": "7281b1fd8118b31cb9162c2fb5a4cc6f01d62ed6", + "url": "https://api.github.com/repos/beberlei/assert/zipball/91e2690c4ecc8a4e3e2d333430069f6a0c694a7a", + "reference": "91e2690c4ecc8a4e3e2d333430069f6a0c694a7a", "shasum": "" }, "require": { @@ -812,7 +824,7 @@ "assertion", "validation" ], - "time": "2015-08-21 16:50:17" + "time": "2016-03-22 14:34:51" }, { "name": "behat/transliterator", @@ -856,16 +868,16 @@ }, { "name": "cocur/slugify", - "version": "v2.0", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/cocur/slugify.git", - "reference": "912bf41f940f9a4e38ff1284b1841eaa71911d7f" + "reference": "eee9879958875921082293dbdbf4866b641864f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cocur/slugify/zipball/912bf41f940f9a4e38ff1284b1841eaa71911d7f", - "reference": "912bf41f940f9a4e38ff1284b1841eaa71911d7f", + "url": "https://api.github.com/repos/cocur/slugify/zipball/eee9879958875921082293dbdbf4866b641864f2", + "reference": "eee9879958875921082293dbdbf4866b641864f2", "shasum": "" }, "require": { @@ -881,6 +893,7 @@ "pimple/pimple": "~1.1", "plumphp/plum": "~0.1", "silex/silex": "~1.3", + "symfony/config": "~2.4|~3.0", "symfony/dependency-injection": "~2.4|~3.0", "symfony/http-kernel": "~2.4|~3.0", "twig/twig": "~1.12", @@ -914,7 +927,7 @@ "slug", "slugify" ], - "time": "2016-02-24 21:50:50" + "time": "2016-04-08 18:57:21" }, { "name": "dailymotion/sdk", @@ -1730,42 +1743,39 @@ }, { "name": "elasticsearch/elasticsearch", - "version": "v1.1.0", + "version": "v2.1.5", "source": { "type": "git", "url": "https://github.com/elastic/elasticsearch-php.git", - "reference": "fd304b1c12778c9eab9b1c1a9e07d791f40bd56d" + "reference": "c1675245c0a6f789cbb80b3e0b333b9ef521a627" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/fd304b1c12778c9eab9b1c1a9e07d791f40bd56d", - "reference": "fd304b1c12778c9eab9b1c1a9e07d791f40bd56d", + "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/c1675245c0a6f789cbb80b3e0b333b9ef521a627", + "reference": "c1675245c0a6f789cbb80b3e0b333b9ef521a627", "shasum": "" }, "require": { - "ext-curl": "*", - "guzzle/guzzle": "~3.7", - "monolog/monolog": "~1.5", - "php": ">=5.3.9", - "pimple/pimple": "~1.0", + "guzzlehttp/ringphp": "~1.0", + "php": ">=5.4", "psr/log": "~1.0" }, "require-dev": { "athletic/athletic": "~0.1", "cpliakas/git-wrapper": "~1.0", - "mikey179/vfsstream": "~1.2", - "mockery/mockery": "dev-master@dev", - "phpunit/phpunit": "3.7.*", - "satooshi/php-coveralls": "dev-master", + "mockery/mockery": "0.9.4", + "phpunit/phpunit": "~4.7", "symfony/yaml": "2.4.3 as 2.4.2", "twig/twig": "1.*" }, + "suggest": { + "ext-curl": "*", + "monolog/monolog": "Allows for client-level logging and tracing" + }, "type": "library", "autoload": { - "psr-0": { - "Elasticsearch": "src/", - "Elasticsearch\\Tests": "tests/", - "Elasticsearch\\Benchmarks": "benchmarks/" + "psr-4": { + "Elasticsearch\\": "src/Elasticsearch/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1783,7 +1793,7 @@ "elasticsearch", "search" ], - "time": "2014-05-07 15:54:46" + "time": "2016-03-18 16:31:37" }, { "name": "evenement/evenement", @@ -1791,12 +1801,12 @@ "source": { "type": "git", "url": "https://github.com/igorw/evenement.git", - "reference": "v1.0.0" + "reference": "fa966683e7df3e5dd5929d984a44abfbd6bafe8d" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/igorw/evenement/zipball/fa966683e7df3e5dd5929d984a44abfbd6bafe8d", - "reference": "v1.0.0", + "reference": "fa966683e7df3e5dd5929d984a44abfbd6bafe8d", "shasum": "" }, "require": { @@ -1823,7 +1833,7 @@ "keywords": [ "event-dispatcher" ], - "time": "2012-05-30 08:01:08" + "time": "2012-05-30 15:01:08" }, { "name": "facebook/php-sdk", @@ -1869,6 +1879,7 @@ "facebook", "sdk" ], + "abandoned": "facebook/php-sdk-v4", "time": "2013-11-19 23:11:14" }, { @@ -2144,6 +2155,107 @@ ], "time": "2015-03-18 18:23:50" }, + { + "name": "guzzlehttp/ringphp", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/RingPHP.git", + "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", + "reference": "dbbb91d7f6c191e5e405e900e3102ac7f261bc0b", + "shasum": "" + }, + "require": { + "guzzlehttp/streams": "~3.0", + "php": ">=5.4.0", + "react/promise": "~2.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "ext-curl": "Guzzle will use specific adapters if cURL is present" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Ring\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.", + "time": "2015-05-20 03:37:09" + }, + { + "name": "guzzlehttp/streams", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/streams.git", + "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", + "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Stream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Provides a simple abstraction over streams of data", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "Guzzle", + "stream" + ], + "time": "2014-10-12 19:18:40" + }, { "name": "hoa/compiler", "version": "2.15.10.29", @@ -2710,12 +2822,12 @@ "source": { "type": "git", "url": "https://github.com/hoaproject/Stream.git", - "reference": "011ab91d942f1d7096deade4c8a10fe57d51c5b3" + "reference": "3bc446bc00849bf51166adc415d77aa375d48d8c" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/hoaproject/Stream/zipball/3bc446bc00849bf51166adc415d77aa375d48d8c", - "reference": "011ab91d942f1d7096deade4c8a10fe57d51c5b3", + "reference": "3bc446bc00849bf51166adc415d77aa375d48d8c", "shasum": "" }, "require": { @@ -2760,7 +2872,7 @@ "stream", "wrapper" ], - "time": "2015-10-22 06:30:43" + "time": "2015-10-26 12:21:43" }, { "name": "hoa/ustring", @@ -3418,16 +3530,16 @@ }, { "name": "league/flysystem", - "version": "1.0.20", + "version": "1.0.21", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "e87a786e3ae12a25cf78a71bb07b4b384bfaa83a" + "reference": "35a83cf67d80d7040f306c77b0a84b9fbcc4fbfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/e87a786e3ae12a25cf78a71bb07b4b384bfaa83a", - "reference": "e87a786e3ae12a25cf78a71bb07b4b384bfaa83a", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/35a83cf67d80d7040f306c77b0a84b9fbcc4fbfb", + "reference": "35a83cf67d80d7040f306c77b0a84b9fbcc4fbfb", "shasum": "" }, "require": { @@ -3497,7 +3609,7 @@ "sftp", "storage" ], - "time": "2016-03-14 21:54:11" + "time": "2016-04-22 10:56:25" }, { "name": "league/flysystem-aws-s3-v2", @@ -3685,16 +3797,16 @@ }, { "name": "monolog/monolog", - "version": "1.18.1", + "version": "1.19.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "a5f2734e8c16f3aa21b3da09715d10e15b4d2d45" + "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/a5f2734e8c16f3aa21b3da09715d10e15b4d2d45", - "reference": "a5f2734e8c16f3aa21b3da09715d10e15b4d2d45", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/5f56ed5212dc509c8dc8caeba2715732abb32dbf", + "reference": "5f56ed5212dc509c8dc8caeba2715732abb32dbf", "shasum": "" }, "require": { @@ -3709,13 +3821,13 @@ "doctrine/couchdb": "~1.0@dev", "graylog2/gelf-php": "~1.0", "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", "phpunit/phpunit": "~4.5", "phpunit/phpunit-mock-objects": "2.3.0", "raven/raven": "^0.13", "ruflin/elastica": ">=0.90 <3.0", - "swiftmailer/swiftmailer": "~5.3", - "videlalvaro/php-amqplib": "~2.4" + "swiftmailer/swiftmailer": "~5.3" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", @@ -3724,11 +3836,11 @@ "ext-mongo": "Allow sending log messages to a MongoDB server", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", "php-console/php-console": "Allow sending log messages to Google Chrome", "raven/raven": "Allow sending log messages to a Sentry server", "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, "type": "library", "extra": { @@ -3759,7 +3871,7 @@ "logging", "psr-3" ], - "time": "2016-03-13 16:08:35" + "time": "2016-04-12 18:29:35" }, { "name": "mrclay/minify", @@ -3791,7 +3903,7 @@ ], "authors": [ { - "name": "Stephen Clay", + "name": "Steve Clay", "email": "steve@mrclay.org", "homepage": "http://www.mrclay.org/", "role": "Developer" @@ -3977,21 +4089,21 @@ "source": { "type": "git", "url": "https://github.com/romainneutron/Imagine-Silex-Service-Provider.git", - "reference": "0.1.2" + "reference": "a8a7862ae90419f2b23746cd8436c2310e4eb084" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/romainneutron/Imagine-Silex-Service-Provider/zipball/a8a7862ae90419f2b23746cd8436c2310e4eb084", - "reference": "0.1.2", + "reference": "a8a7862ae90419f2b23746cd8436c2310e4eb084", "shasum": "" }, "require": { "imagine/imagine": "*", "php": ">=5.3.3", - "silex/silex": ">=1.0,<2.0" + "silex/silex": "~1.0" }, "require-dev": { - "symfony/browser-kit": ">=2.0,<3.0" + "symfony/browser-kit": "~2.0" }, "type": "library", "autoload": { @@ -4235,16 +4347,16 @@ }, { "name": "paragonie/random_compat", - "version": "v1.2.2", + "version": "v1.4.1", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "b3313b618f4edd76523572531d5d7e22fe747430" + "reference": "c7e26a21ba357863de030f0b9e701c7d04593774" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/b3313b618f4edd76523572531d5d7e22fe747430", - "reference": "b3313b618f4edd76523572531d5d7e22fe747430", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/c7e26a21ba357863de030f0b9e701c7d04593774", + "reference": "c7e26a21ba357863de030f0b9e701c7d04593774", "shasum": "" }, "require": { @@ -4279,7 +4391,7 @@ "pseudorandom", "random" ], - "time": "2016-03-11 19:54:08" + "time": "2016-03-18 20:34:03" }, { "name": "php-ffmpeg/php-ffmpeg", @@ -4722,19 +4834,20 @@ }, { "name": "ramsey/uuid", - "version": "3.2.0", + "version": "3.4.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "adee1ba4a6885ed800021a98dd69ae2394d695ec" + "reference": "b4fe3b7387cb323fd15ad5837cae992422c9fa5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/adee1ba4a6885ed800021a98dd69ae2394d695ec", - "reference": "adee1ba4a6885ed800021a98dd69ae2394d695ec", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/b4fe3b7387cb323fd15ad5837cae992422c9fa5c", + "reference": "b4fe3b7387cb323fd15ad5837cae992422c9fa5c", "shasum": "" }, "require": { + "paragonie/random_compat": "^1.0|^2.0", "php": ">=5.4" }, "replace": { @@ -4742,8 +4855,11 @@ }, "require-dev": { "apigen/apigen": "^4.1", + "codeception/aspect-mock": "1.0.0", + "goaop/framework": "1.0.0-alpha.2", "ircmaxell/random-lib": "^1.1", "jakub-onderka/php-parallel-lint": "^0.9.0", + "mockery/mockery": "^0.9.4", "moontoast/math": "^1.1", "phpunit/phpunit": "^4.7|^5.0", "satooshi/php-coveralls": "^0.6.1", @@ -4758,6 +4874,11 @@ "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, "autoload": { "psr-4": { "Ramsey\\Uuid\\": "src/" @@ -4789,7 +4910,51 @@ "identifier", "uuid" ], - "time": "2016-02-17 23:32:34" + "time": "2016-04-24 00:30:41" + }, + { + "name": "react/promise", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "f942da7b505d1a294284ab343d05df42d02ad6d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/f942da7b505d1a294284ab343d05df42d02ad6d9", + "reference": "f942da7b505d1a294284ab343d05df42d02ad6d9", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "React\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "time": "2016-03-31 13:10:33" }, { "name": "roave/security-advisories", @@ -4797,12 +4962,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "438196c8f66647073bcaf99908b543bda7ffd6d4" + "reference": "c671d3899901257a98ec4c4fd39685d14112efc7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/438196c8f66647073bcaf99908b543bda7ffd6d4", - "reference": "438196c8f66647073bcaf99908b543bda7ffd6d4", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/c671d3899901257a98ec4c4fd39685d14112efc7", + "reference": "c671d3899901257a98ec4c4fd39685d14112efc7", "shasum": "" }, "conflict": { @@ -4888,7 +5053,7 @@ "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1", "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6", "zendframework/zendframework": ">=2,<2.4.9|>=2.5,<2.5.1", - "zendframework/zendframework1": ">=1,<1.11.15|>=1.12,<1.12.17", + "zendframework/zendframework1": ">=1,<1.11.15|>=1.12,<1.12.18", "zendframework/zendopenid": ">=2,<2.0.2", "zendframework/zendxml": ">=1,<1.0.1", "zf-commons/zfc-user": "<1.2.2", @@ -4908,7 +5073,7 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2016-04-11 16:52:34" + "time": "2016-04-21 06:36:58" }, { "name": "seld/jsonlint", @@ -5411,7 +5576,7 @@ }, { "name": "Phraseanet Team", - "email": "support@alchemy.fr", + "email": "info@alchemy.fr", "homepage": "http://www.phraseanet.com/" } ], @@ -5989,16 +6154,16 @@ }, { "name": "symfony/symfony", - "version": "v2.8.3", + "version": "v2.8.4", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", - "reference": "7a9a5fce7ce6e448e527f635463dda00761e12c2" + "reference": "9e14f9f4869c19188a376eab61d9a1c1f1fee347" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/7a9a5fce7ce6e448e527f635463dda00761e12c2", - "reference": "7a9a5fce7ce6e448e527f635463dda00761e12c2", + "url": "https://api.github.com/repos/symfony/symfony/zipball/9e14f9f4869c19188a376eab61d9a1c1f1fee347", + "reference": "9e14f9f4869c19188a376eab61d9a1c1f1fee347", "shasum": "" }, "require": { @@ -6085,11 +6250,7 @@ }, "autoload": { "psr-4": { - "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", - "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", - "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/", - "Symfony\\Bridge\\Swiftmailer\\": "src/Symfony/Bridge/Swiftmailer/", - "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", + "Symfony\\Bridge\\": "src/Symfony/Bridge/", "Symfony\\Bundle\\": "src/Symfony/Bundle/", "Symfony\\Component\\": "src/Symfony/Component/" }, @@ -6119,7 +6280,7 @@ "keywords": [ "framework" ], - "time": "2016-02-28 21:06:29" + "time": "2016-03-27 12:57:53" }, { "name": "themattharris/tmhoauth", @@ -6560,27 +6721,27 @@ }, { "name": "zendframework/zend-code", - "version": "2.6.2", + "version": "2.6.3", "source": { "type": "git", "url": "https://github.com/zendframework/zend-code.git", - "reference": "c4e8f976a772cfb14b47dabd69b5245a423082b4" + "reference": "95033f061b083e16cdee60530ec260d7d628b887" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-code/zipball/c4e8f976a772cfb14b47dabd69b5245a423082b4", - "reference": "c4e8f976a772cfb14b47dabd69b5245a423082b4", + "url": "https://api.github.com/repos/zendframework/zend-code/zipball/95033f061b083e16cdee60530ec260d7d628b887", + "reference": "95033f061b083e16cdee60530ec260d7d628b887", "shasum": "" }, "require": { - "php": ">=5.5", - "zendframework/zend-eventmanager": "^2.6|^3.0" + "php": "^5.5 || 7.0.0 - 7.0.4 || ^7.0.6", + "zendframework/zend-eventmanager": "^2.6 || ^3.0" }, "require-dev": { "doctrine/annotations": "~1.0", "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "zendframework/zend-stdlib": "~2.7" + "phpunit/phpunit": "^4.8.21", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "suggest": { "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", @@ -6608,7 +6769,7 @@ "code", "zf2" ], - "time": "2016-01-05 05:58:37" + "time": "2016-04-20 17:26:42" }, { "name": "zendframework/zend-eventmanager", @@ -6668,16 +6829,16 @@ "packages-dev": [ { "name": "mikey179/vfsStream", - "version": "v1.6.2", + "version": "v1.6.3", "source": { "type": "git", "url": "https://github.com/mikey179/vfsStream.git", - "reference": "fefd182fa739d4e23d9dc7c80d3344f528d600ab" + "reference": "c19925cd0390d3c436a0203ae859afa460d0474b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/fefd182fa739d4e23d9dc7c80d3344f528d600ab", - "reference": "fefd182fa739d4e23d9dc7c80d3344f528d600ab", + "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/c19925cd0390d3c436a0203ae859afa460d0474b", + "reference": "c19925cd0390d3c436a0203ae859afa460d0474b", "shasum": "" }, "require": { @@ -6710,7 +6871,7 @@ ], "description": "Virtual file system to mock the real file system in unit tests.", "homepage": "http://vfs.bovigo.org/", - "time": "2016-01-13 09:41:49" + "time": "2016-04-09 09:42:01" }, { "name": "phpdocumentor/reflection-docblock", From dc4d9d393577b2252d56c0f1a6b69904270f8882 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 28 Apr 2016 14:05:06 +0200 Subject: [PATCH 257/383] PHRAS-1094_ES-LIB-UPGRADE #time 1h enforce libsass to match node version --- circle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/circle.yml b/circle.yml index 88a3c58bb7..eb8db2e626 100644 --- a/circle.yml +++ b/circle.yml @@ -25,6 +25,7 @@ dependencies: - pecl install json - yes '' | pecl install zmq-beta - sed -i 's/^\(session.cache_limiter = \).*/\1""/' ~/.phpenv/versions/$(phpenv global)/etc/php.ini + - npm rebuild node-sass override: - composer install --no-progress --no-interaction --optimize-autoloader post: From bb17d26fa8532e331f0d3191e7e996a567c6b38e Mon Sep 17 00:00:00 2001 From: Gilles MATEU Date: Sun, 1 May 2016 17:55:33 +0200 Subject: [PATCH 258/383] spelling error in Configuration.php "Confguration compiled." instead of "Configuration compiled." --- lib/Alchemy/Phrasea/Command/Compile/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/Command/Compile/Configuration.php b/lib/Alchemy/Phrasea/Command/Compile/Configuration.php index 9e84e3330b..76527bc46f 100644 --- a/lib/Alchemy/Phrasea/Command/Compile/Configuration.php +++ b/lib/Alchemy/Phrasea/Command/Compile/Configuration.php @@ -26,7 +26,7 @@ class Configuration extends Command protected function doExecute(InputInterface $input, OutputInterface $output) { $this->container['configuration.store']->compileAndWrite(); - $output->writeln("Confguration compiled."); + $output->writeln("Configuration compiled."); return 0; } From 0eada5fbe181f7a2a2e3c5321874e2492808a745 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Wed, 11 May 2016 11:13:47 +0200 Subject: [PATCH 259/383] enable/disable geolocalized search button if providers available - add npm run dev command --- lib/Alchemy/Phrasea/Controller/Prod/RootController.php | 2 +- package.json | 3 ++- templates/web/prod/index.html.twig | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Prod/RootController.php b/lib/Alchemy/Phrasea/Controller/Prod/RootController.php index 8818cd0259..08e62ed1bf 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/RootController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/RootController.php @@ -123,7 +123,7 @@ class RootController extends Controller 'feeds' => $feeds, 'aggregate' => $aggregate, 'GV_google_api' => $conf->get(['registry', 'webservices', 'google-charts-enabled']), - 'geocodingProviders' => json_encode($conf->get(['geocoding-providers'])), + 'geocodingProviders' => $conf->get(['geocoding-providers']), 'search_status' => \databox_status::getSearchStatus($this->app), 'thesau_js_list' => $thjslist, 'thesau_json_sbas' => json_encode($sbas), diff --git a/package.json b/package.json index e050f37b8a..7cf4fd5eb4 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,11 @@ "node": ">=5.8" }, "scripts": { + "dev": "./node_modules/.bin/gulp sync;", "build": "./node_modules/.bin/gulp build;", "postinstall": "./node_modules/.bin/gulp install;" }, "dependencies": { - "phraseanet-production-client": "~0.17.0" + "phraseanet-production-client": "~0.17.1" } } diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 6458d95c17..287186e706 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -105,7 +105,7 @@ }, initialState: "{{ initialAppState }}", geonameServerUrl: '{{ app['geonames.server-uri'] }}', - geocodingProviders: {{ geocodingProviders|raw }}, + geocodingProviders: {{ geocodingProviders|json_encode()|raw}}, thesaurusConfig: { replaceMessage: '{{ 'prod::thesaurusTab:dlg:Remplacement du candidat "%(from)s" par "%(to)s"' | trans }}', replaceInProgressMsg: '{{ 'prod::thesaurusTab:dlg:Remplacement en cours.' | trans }}', @@ -267,9 +267,11 @@ + {% if geocodingProviders|length > 0 %} + {% endif %}
    From b7d1849e243610bacf975b12a620f8a3dd00b409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 11 May 2016 15:21:26 +0200 Subject: [PATCH 260/383] Tweak travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4c1e8fb7de..4a507f47c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ before_install: - yes | pecl install imagick-beta install: - if [[ $TRAVIS_PHP_VERSION = 5.* ]];then travis_retry composer install --no-progress --no-interaction --optimize-autoloader; fi; - - if [[ $TRAVIS_PHP_VERSION = 7.* ]];then travis_retry composer remove --no-update phpunit/phpunit; travis_retry composer require --dev phpunit/phpunit --sort-packages --optimize-autoloader --update-with-dependencies --no-progress --no-interaction; fi; + - if [[ $TRAVIS_PHP_VERSION = 7.* ]];then travis_retry composer install --no-interaction --no-progress --ignore-platform-reqs; travis_retry composer remove --no-interaction --dev phpunit/phpunit; travis_retry composer require --dev phpunit/phpunit --sort-packages --optimize-autoloader --no-progress --no-interaction; fi; - travis_retry npm install before_script: - mysql -e 'CREATE DATABASE update39_test;CREATE DATABASE ab_test;CREATE DATABASE db_test;SET @@global.sql_mode=STRICT_ALL_TABLES;SET @@global.max_allowed_packet=33554432;SET @@global.wait_timeout=999999;' From 2932963ecbf5682e5e5c38db7181482106c82ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 11 May 2016 15:54:31 +0200 Subject: [PATCH 261/383] Use composer update instead of install with PHP7 --- .travis.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a507f47c1..8fc2707978 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ before_install: - yes | pecl install imagick-beta install: - if [[ $TRAVIS_PHP_VERSION = 5.* ]];then travis_retry composer install --no-progress --no-interaction --optimize-autoloader; fi; - - if [[ $TRAVIS_PHP_VERSION = 7.* ]];then travis_retry composer install --no-interaction --no-progress --ignore-platform-reqs; travis_retry composer remove --no-interaction --dev phpunit/phpunit; travis_retry composer require --dev phpunit/phpunit --sort-packages --optimize-autoloader --no-progress --no-interaction; fi; + - if [[ $TRAVIS_PHP_VERSION = 7.* ]];then travis_retry composer update --no-progress --no-interaction --optimize-autoloader; fi; - travis_retry npm install before_script: - mysql -e 'CREATE DATABASE update39_test;CREATE DATABASE ab_test;CREATE DATABASE db_test;SET @@global.sql_mode=STRICT_ALL_TABLES;SET @@global.max_allowed_packet=33554432;SET @@global.wait_timeout=999999;' diff --git a/composer.json b/composer.json index 56c00e8229..9aee8b75f4 100644 --- a/composer.json +++ b/composer.json @@ -103,7 +103,7 @@ }, "require-dev": { "mikey179/vfsStream": "~1.5", - "phpunit/phpunit": "^4.8" + "phpunit/phpunit": "^4.8|^5.0" }, "autoload": { "psr-0": { From ebd0fa5685195056d5febd283982e7e31547cd18 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Wed, 11 May 2016 18:51:04 +0200 Subject: [PATCH 262/383] PHRAS-999 - push > list manager > remove useless notify button --- templates/web/prod/actions/Feedback/List-Share.html.twig | 3 --- 1 file changed, 3 deletions(-) diff --git a/templates/web/prod/actions/Feedback/List-Share.html.twig b/templates/web/prod/actions/Feedback/List-Share.html.twig index 940ccbc4f8..393109bbcb 100644 --- a/templates/web/prod/actions/Feedback/List-Share.html.twig +++ b/templates/web/prod/actions/Feedback/List-Share.html.twig @@ -58,9 +58,6 @@ {% endif %} - - -
    @@ -232,7 +231,7 @@
    - +
    From acb42e1afbfbf239491639214b1ffee4b9c4b3c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 4 Apr 2016 10:28:37 +0200 Subject: [PATCH 192/383] Adds a Pull request template --- PULL_REQUEST_TEMPLATE.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 PULL_REQUEST_TEMPLATE.md diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..a37aa2475b --- /dev/null +++ b/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Changelog +### Changed + - Breaking change + +### Fixes + - PHRAS-XXX: Short description of bug and fix + - Short description of bug and fix without issue/ticket + +### Adds + - PHRAS-XXX: Short feature description + - Short feature description without issue/ticket + +### Removes + - PHRAS-XXX: Short feature removal description + - Short feature removal description without issue/ticket + From 40cf44c07f37a20d90a4f41f94d8b05b84cab27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 4 Apr 2016 10:50:33 +0200 Subject: [PATCH 193/383] Add MediaAccessor subdef url generator --- .../Phrasea/Controller/Api/V1Controller.php | 30 +----- .../ControllerProvider/MediaAccessor.php | 6 ++ .../Media/MediaSubDefinitionUrlGenerator.php | 97 +++++++++++++++++++ 3 files changed, 104 insertions(+), 29 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Media/MediaSubDefinitionUrlGenerator.php diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index 6b94842078..540c6104b0 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -47,7 +47,6 @@ use Alchemy\Phrasea\Model\Entities\ValidationData; use Alchemy\Phrasea\Model\Entities\ValidationParticipant; use Alchemy\Phrasea\Model\Manipulator\TaskManipulator; use Alchemy\Phrasea\Model\Manipulator\UserManipulator; -use Alchemy\Phrasea\Model\Provider\SecretProvider; use Alchemy\Phrasea\Model\RecordReferenceInterface; use Alchemy\Phrasea\Model\Repositories\BasketRepository; use Alchemy\Phrasea\Model\Repositories\FeedEntryRepository; @@ -63,7 +62,6 @@ use Alchemy\Phrasea\SearchEngine\SearchEngineSuggestion; use Alchemy\Phrasea\Status\StatusStructure; use Alchemy\Phrasea\TaskManager\LiveInformation; use Doctrine\ORM\EntityManager; -use Firebase\JWT\JWT; use Symfony\Component\Form\Form; use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\Request; @@ -1004,37 +1002,11 @@ class V1Controller extends Controller 'substituted' => $media->is_substituted(), 'created_on' => $media->get_creation_date()->format(DATE_ATOM), 'updated_on' => $media->get_modification_date()->format(DATE_ATOM), - 'url' => $this->generateSubDefinitionUrl($issuer, $media, $urlTTL), + 'url' => $this->app['media_accessor.subdef_url_generator']->generate($issuer, $media, $urlTTL), 'url_ttl' => $urlTTL, ]; } - /** - * @param User $issuer - * @param \media_subdef $subdef - * @param int $url_ttl - * @return string - */ - private function generateSubDefinitionUrl(User $issuer, \media_subdef $subdef, $url_ttl) - { - $payload = [ - 'iat' => time(), - 'iss' => $issuer->getId(), - 'sdef' => [$subdef->get_sbas_id(), $subdef->get_record_id(), $subdef->get_name()], - ]; - if ($url_ttl >= 0) { - $payload['exp'] = $payload['iat'] + $url_ttl; - } - - /** @var SecretProvider $provider */ - $provider = $this->app['provider.secrets']; - $secret = $provider->getSecretForUser($issuer); - - return $this->app->url('media_accessor', [ - 'token' => JWT::encode($payload, $secret->getToken(), 'HS256', $secret->getId()), - ]); - } - private function listPermalink(\media_Permalink_Adapter $permalink) { $downloadUrl = $permalink->get_url(); diff --git a/lib/Alchemy/Phrasea/ControllerProvider/MediaAccessor.php b/lib/Alchemy/Phrasea/ControllerProvider/MediaAccessor.php index a9987bf7e5..1bbb1c5e7c 100644 --- a/lib/Alchemy/Phrasea/ControllerProvider/MediaAccessor.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/MediaAccessor.php @@ -10,6 +10,7 @@ namespace Alchemy\Phrasea\ControllerProvider; use Alchemy\Phrasea\Controller\MediaAccessorController; +use Alchemy\Phrasea\Media\MediaSubDefinitionUrlGenerator; use Alchemy\Phrasea\Model\Entities\Secret; use Alchemy\Phrasea\Model\Provider\DefaultSecretProvider; use Doctrine\ORM\EntityManagerInterface; @@ -33,6 +34,11 @@ class MediaAccessor implements ServiceProviderInterface, ControllerProviderInter return new DefaultSecretProvider($app['repo.secrets'], $app['random.medium']); }); + $app['media_accessor.subdef_url_generator'] = $app->share(function (Application $app) { + return new MediaSubDefinitionUrlGenerator($app['url_generator'], $app['provider.secrets']); + }); + + $app['controller.media_accessor'] = $app->share(function (Application $app) { return (new MediaAccessorController($app)) ->setAllowedAlgorithms(['HS256']) diff --git a/lib/Alchemy/Phrasea/Media/MediaSubDefinitionUrlGenerator.php b/lib/Alchemy/Phrasea/Media/MediaSubDefinitionUrlGenerator.php new file mode 100644 index 0000000000..74fcb596c0 --- /dev/null +++ b/lib/Alchemy/Phrasea/Media/MediaSubDefinitionUrlGenerator.php @@ -0,0 +1,97 @@ +urlGenerator = $urlGenerator; + $this->secretProvider = $secretProvider; + } + + /** + * @param User $issuer + * @param \media_subdef $subdef + * @param int $url_ttl + * @return string + */ + public function generate(User $issuer, \media_subdef $subdef, $url_ttl) + { + $payload = [ + 'iat' => time(), + 'iss' => $issuer->getId(), + 'sdef' => [$subdef->get_sbas_id(), $subdef->get_record_id(), $subdef->get_name()], + ]; + + if ($url_ttl >= 0) { + $payload['exp'] = $payload['iat'] + $url_ttl; + } + + $secret = $this->secretProvider->getSecretForUser($issuer); + + return $this->urlGenerator->generate('media_accessor', [ + 'token' => JWT::encode($payload, $secret->getToken(), 'HS256', $secret->getId()), + ], UrlGeneratorInterface::ABSOLUTE_URL); + } + + /** + * @param User $issuer + * @param \media_subdef[] $subdefs + * @param int $url_ttl + * @return string[] + */ + public function generateMany(User $issuer, $subdefs, $url_ttl) + { + Assertion::allIsInstanceOf($subdefs, \media_subdef::class); + + $payloads = []; + + $payload = [ + 'iat' => time(), + 'iss' => $issuer->getId(), + 'sdef' => null, + ]; + + if ($url_ttl >= 0) { + $payload['exp'] = $payload['iat'] + $url_ttl; + } + + foreach ($subdefs as $index => $subdef) { + $payload['sdef'] = [$subdef->get_sbas_id(), $subdef->get_record_id(), $subdef->get_name()]; + + $payloads[$index] = $payload; + } + + $secret = $this->secretProvider->getSecretForUser($issuer); + + return array_map(function ($payload) use ($secret) { + return $this->urlGenerator->generate('media_accessor', [ + 'token' => JWT::encode($payload, $secret->getToken(), 'HS256', $secret->getId()), + ], UrlGeneratorInterface::ABSOLUTE_URL); + }, $payloads); + } +} From f64651ba3f479f7aabd9521cc45ecff09c071d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 4 Apr 2016 11:46:20 +0200 Subject: [PATCH 194/383] Add default ttl-url to MediaSubdefinitionUrlGenerator --- .../ControllerProvider/MediaAccessor.php | 4 +++- .../Media/MediaSubDefinitionUrlGenerator.php | 21 ++++++++++++++----- .../Order/Controller/ApiOrderController.php | 17 ++++++++++++--- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/lib/Alchemy/Phrasea/ControllerProvider/MediaAccessor.php b/lib/Alchemy/Phrasea/ControllerProvider/MediaAccessor.php index 1bbb1c5e7c..44b7fe658f 100644 --- a/lib/Alchemy/Phrasea/ControllerProvider/MediaAccessor.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/MediaAccessor.php @@ -35,7 +35,9 @@ class MediaAccessor implements ServiceProviderInterface, ControllerProviderInter }); $app['media_accessor.subdef_url_generator'] = $app->share(function (Application $app) { - return new MediaSubDefinitionUrlGenerator($app['url_generator'], $app['provider.secrets']); + $defaultTTL = (int)$app['conf']->get(['registry', 'general', 'default-subdef-url-ttl'], 0); + + return new MediaSubDefinitionUrlGenerator($app['url_generator'], $app['provider.secrets'], $defaultTTL); }); diff --git a/lib/Alchemy/Phrasea/Media/MediaSubDefinitionUrlGenerator.php b/lib/Alchemy/Phrasea/Media/MediaSubDefinitionUrlGenerator.php index 74fcb596c0..ef08d2edd7 100644 --- a/lib/Alchemy/Phrasea/Media/MediaSubDefinitionUrlGenerator.php +++ b/lib/Alchemy/Phrasea/Media/MediaSubDefinitionUrlGenerator.php @@ -27,10 +27,18 @@ class MediaSubDefinitionUrlGenerator */ private $secretProvider; - public function __construct(UrlGeneratorInterface $urlGenerator, SecretProvider $secretProvider) + /** + * @var int + */ + private $defaultTTL; + + public function __construct(UrlGeneratorInterface $urlGenerator, SecretProvider $secretProvider, $defaultTTL = 0) { + Assertion::integer($defaultTTL); + $this->urlGenerator = $urlGenerator; $this->secretProvider = $secretProvider; + $this->defaultTTL = (int)$defaultTTL; } /** @@ -39,15 +47,17 @@ class MediaSubDefinitionUrlGenerator * @param int $url_ttl * @return string */ - public function generate(User $issuer, \media_subdef $subdef, $url_ttl) + public function generate(User $issuer, \media_subdef $subdef, $url_ttl = null) { + $url_ttl = $url_ttl ?: $this->defaultTTL; + $payload = [ 'iat' => time(), 'iss' => $issuer->getId(), 'sdef' => [$subdef->get_sbas_id(), $subdef->get_record_id(), $subdef->get_name()], ]; - if ($url_ttl >= 0) { + if ($url_ttl > 0) { $payload['exp'] = $payload['iat'] + $url_ttl; } @@ -64,9 +74,10 @@ class MediaSubDefinitionUrlGenerator * @param int $url_ttl * @return string[] */ - public function generateMany(User $issuer, $subdefs, $url_ttl) + public function generateMany(User $issuer, $subdefs, $url_ttl = null) { Assertion::allIsInstanceOf($subdefs, \media_subdef::class); + $url_ttl = $url_ttl ?: $this->defaultTTL; $payloads = []; @@ -76,7 +87,7 @@ class MediaSubDefinitionUrlGenerator 'sdef' => null, ]; - if ($url_ttl >= 0) { + if ($url_ttl > 0) { $payload['exp'] = $payload['iat'] + $url_ttl; } diff --git a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php index 05109d57b1..e6216dd10a 100644 --- a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php +++ b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php @@ -190,15 +190,26 @@ class ApiOrderController extends BaseOrderController } /** - * @param Request $request * @param string|array $includes + * @return Manager + */ + private function parseIncludes($includes) + { + $fractal = new Manager(); + $fractal->parseIncludes($includes); + + return $fractal; + } + + /** + * @param Request $request + * @param string|array|Manager $includes * @param ResourceInterface $resource * @return Response */ private function returnResourceResponse(Request $request, $includes, ResourceInterface $resource) { - $fractal = new Manager(); - $fractal->parseIncludes($includes); + $fractal = $includes instanceof Manager ? $includes : $this->parseIncludes($includes); return Result::create($request, $fractal->createData($resource)->toArray())->createResponse(); } From fe6bb51351b8b706e5f745decf7111692592ae03 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Wed, 30 Mar 2016 17:01:58 +0200 Subject: [PATCH 195/383] PHRAS-1055 #time 1h - no bug concerning --max_record - add try/catch so the job don't stop on errors --- lib/Alchemy/Phrasea/Command/BuildSubdefs.php | 37 +++++++++++--------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php index 2fc61bc35a..c61905c7e1 100644 --- a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php +++ b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php @@ -28,10 +28,10 @@ class BuildSubdefs extends Command $this->setDescription('Build subviews for given subview names and record types'); $this->addArgument('databox', InputArgument::REQUIRED, 'The databox id'); - $this->addArgument('type', InputArgument::REQUIRED, 'Types of the document to rebuild'); - $this->addArgument('subdefs', InputArgument::REQUIRED, 'Names of sub-definition to re-build'); - $this->addOption('max_record', 'max', InputOption::VALUE_OPTIONAL, 'Max record id'); + $this->addArgument('type', InputArgument::REQUIRED, 'Type(s) of document(s) to rebuild ex. "image,video"'); + $this->addArgument('subdefs', InputArgument::REQUIRED, 'Name(s) of sub-definition(s) to re-build, ex. "thumbnail,preview"'); $this->addOption('min_record', 'min', InputOption::VALUE_OPTIONAL, 'Min record id'); + $this->addOption('max_record', 'max', InputOption::VALUE_OPTIONAL, 'Max record id'); $this->addOption('with-substitution', 'wsubstit', InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records as well'); $this->addOption('substitution-only', 'substito', InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records only'); } @@ -96,23 +96,28 @@ class BuildSubdefs extends Command foreach ($rows as $row) { $output->write(sprintf(' (#%s)', $row['record_id'])); - $record = $databox->get_record($row['record_id']); + try { + $record = $databox->get_record($row['record_id']); - $subdefs = array_filter($record->get_subdefs(), function(media_subdef $subdef) use ($subdefsName) { - return in_array($subdef->get_name(), $subdefsName); - }); + $subdefs = array_filter($record->get_subdefs(), function (media_subdef $subdef) use ($subdefsName) { + return in_array($subdef->get_name(), $subdefsName); + }); - /** @var media_subdef $subdef */ - foreach ($subdefs as $subdef) { - $subdef->remove_file(); - if (($withSubstitution && $subdef->is_substituted()) || $substitutionOnly) { - $subdef->set_substituted(false); + /** @var media_subdef $subdef */ + foreach ($subdefs as $subdef) { + $subdef->remove_file(); + if (($withSubstitution && $subdef->is_substituted()) || $substitutionOnly) { + $subdef->set_substituted(false); + } } - } - /** @var SubdefGenerator $subdefGenerator */ - $subdefGenerator = $this->container['subdef.generator']; - $subdefGenerator->generateSubdefs($record, $subdefsName); + /** @var SubdefGenerator $subdefGenerator */ + $subdefGenerator = $this->container['subdef.generator']; + $subdefGenerator->generateSubdefs($record, $subdefsName); + } + catch(\Exception $e) { + + } $progress->advance(); } From 95683735b67356a3b873fd6a5a2393a019267bed Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Wed, 30 Mar 2016 20:48:14 +0200 Subject: [PATCH 196/383] PHRAS-1055 #time 5h - add option --dry - add verbose print (-v) - add "ALL" for type and subdef arguments - fix "substitute" options - fix show sql with arguments --- lib/Alchemy/Phrasea/Command/BuildSubdefs.php | 174 +++++++++++-------- 1 file changed, 102 insertions(+), 72 deletions(-) diff --git a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php index c61905c7e1..173676668b 100644 --- a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php +++ b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php @@ -10,8 +10,11 @@ namespace Alchemy\Phrasea\Command; +use Alchemy\Phrasea\Databox\SubdefGroup; use Alchemy\Phrasea\Exception\InvalidArgumentException; use Alchemy\Phrasea\Media\SubdefGenerator; +use databox_subdef; +use databox_subdefsStructure; use Doctrine\DBAL\Connection; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; @@ -28,12 +31,13 @@ class BuildSubdefs extends Command $this->setDescription('Build subviews for given subview names and record types'); $this->addArgument('databox', InputArgument::REQUIRED, 'The databox id'); - $this->addArgument('type', InputArgument::REQUIRED, 'Type(s) of document(s) to rebuild ex. "image,video"'); - $this->addArgument('subdefs', InputArgument::REQUIRED, 'Name(s) of sub-definition(s) to re-build, ex. "thumbnail,preview"'); + $this->addArgument('type', InputArgument::REQUIRED, 'Type(s) of document(s) to rebuild ex. "image,video", or "ALL"'); + $this->addArgument('subdefs', InputArgument::REQUIRED, 'Name(s) of sub-definition(s) to re-build, ex. "thumbnail,preview", or "ALL"'); $this->addOption('min_record', 'min', InputOption::VALUE_OPTIONAL, 'Min record id'); $this->addOption('max_record', 'max', InputOption::VALUE_OPTIONAL, 'Max record id'); $this->addOption('with-substitution', 'wsubstit', InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records as well'); $this->addOption('substitution-only', 'substito', InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records only'); + $this->addOption('dry', '', InputOption::VALUE_NONE, 'dry run, list but do nothing'); } /** @@ -43,127 +47,153 @@ class BuildSubdefs extends Command { $availableTypes = array('document', 'audio', 'video', 'image', 'flash', 'map'); - $typesOption = $input->getArgument('type'); - - $recordsType = explode(',', $typesOption); - $recordsType = array_filter($recordsType, function($type) use($availableTypes) { - return in_array($type, $availableTypes); - }); - - if (count($recordsType) === 0) { - $output->write(sprintf('Invalid records type provided %s', implode(', ', $availableTypes))); - return; - } - - $subdefsOption = $input->getArgument('subdefs'); - $subdefsName = explode(',', $subdefsOption); - - if (count($subdefsOption) === 0) { - $output->write('No subdef options provided'); - return; - } - $min = $input->getOption('min_record'); $max = $input->getOption('max_record'); - $substitutionOnly = $input->getOption('substitution-only'); - $withSubstitution = $input->getOption('with-substitution'); + $substitutionOnly = $input->getOption('substitution-only') ? true : false; + $withSubstitution = $input->getOption('with-substitution') ? true : false; + $dry = $input->getOption('dry') ? true : false; - if (false !== $withSubstitution && false !== $substitutionOnly) { - throw new InvalidArgumentException('Conflict, you can not ask for --substitution-only && --with-substitution parameters at the same time'); + if ($withSubstitution && $substitutionOnly) { + throw new InvalidArgumentException('--substitution-only and --with-substitution are mutually exclusive'); } - list($sql, $params, $types) = $this->generateSQL($subdefsName, $recordsType, $min, $max, $withSubstitution, $substitutionOnly); - $databox = $this->container->findDataboxById($input->getArgument('databox')); $connection = $databox->get_connection(); + $subdefsNameByType = []; + + $typesOption = $input->getArgument('type'); + $typesArray = explode(',', $typesOption); + + $subdefsOption = $input->getArgument('subdefs'); + $subdefsArray = explode(',', $subdefsOption); + + /** @var SubdefGroup $sg */ + foreach($databox->get_subdef_structure() as $sg) + { + if($typesOption == "ALL" || in_array($sg->getName(), $typesArray)) { + $subdefsNameByType[$sg->getName()] = []; + /** @var databox_subdef $sd */ + foreach ($sg as $sd) { + if($subdefsOption == "ALL" || in_array($sd->get_name(), $subdefsArray)) { + $subdefsNameByType[$sg->getName()][] = $sd->get_name(); + } + } + } + } + + $recordsType = array_keys($subdefsNameByType); + + list($sql, $params, $types) = $this->generateSQL($connection, $recordsType, $min, $max); + $sqlCount = sprintf('SELECT COUNT(*) FROM (%s) AS c', $sql); $output->writeln($sqlCount); + $totalRecords = (int)$connection->executeQuery($sqlCount, $params, $types)->fetchColumn(); if ($totalRecords === 0) { return; } - $progress = new ProgressBar($output, $totalRecords); - - $progress->start(); - - $progress->display(); + $progress = null; + if($output->getVerbosity() < OutputInterface::VERBOSITY_VERBOSE) { + $progress = new ProgressBar($output, $totalRecords); + $progress->start(); + $progress->display(); + } $rows = $connection->executeQuery($sql, $params, $types)->fetchAll(\PDO::FETCH_ASSOC); foreach ($rows as $row) { - $output->write(sprintf(' (#%s)', $row['record_id'])); + $type = $row['type']; + $output->write(sprintf(' [#%s] (%s)', $row['record_id'], $type)); try { $record = $databox->get_record($row['record_id']); - $subdefs = array_filter($record->get_subdefs(), function (media_subdef $subdef) use ($subdefsName) { - return in_array($subdef->get_name(), $subdefsName); - }); + $subdefNamesToDo = array_flip($subdefsNameByType[$type]); // do all subdefs ? /** @var media_subdef $subdef */ - foreach ($subdefs as $subdef) { - $subdef->remove_file(); - if (($withSubstitution && $subdef->is_substituted()) || $substitutionOnly) { + foreach ($record->get_subdefs() as $subdef) { + if(!in_array($subdef->get_name(), $subdefsNameByType[$type])) { + continue; + } + if($subdef->is_substituted()) { + if(!$withSubstitution && !$substitutionOnly) { + unset($subdefNamesToDo[$subdef->get_name()]); + continue; + } + } + else { + if($substitutionOnly) { + unset($subdefNamesToDo[$subdef->get_name()]); + continue; + } + } + // here an existing subdef must be re-done + if(!$dry) { + $subdef->remove_file(); $subdef->set_substituted(false); } } - /** @var SubdefGenerator $subdefGenerator */ - $subdefGenerator = $this->container['subdef.generator']; - $subdefGenerator->generateSubdefs($record, $subdefsName); + $subdefNamesToDo = array_keys($subdefNamesToDo); + if(!empty($subdefNamesToDo)) { + if(!$dry) { + /** @var SubdefGenerator $subdefGenerator */ + $subdefGenerator = $this->container['subdef.generator']; + $subdefGenerator->generateSubdefs($record, $subdefNamesToDo); + } + + if($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) { + $output->writeln(sprintf(" subdefs[%s] done", join(',', $subdefNamesToDo))); + } + } + else { + if($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) { + $output->writeln(sprintf(" nothing to do")); + } + } } catch(\Exception $e) { - + if($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) { + $output->writeln(sprintf("failed")); + } } - $progress->advance(); + if($progress) { + $progress->advance(); + } } - $progress->finish(); + if($progress) { + $progress->finish(); + $output->writeln(""); + } } /** - * @param string[] $subdefNames * @param string[] $recordTypes * @param null|int $min * @param null|int $max - * @param bool $withSubstitution - * @param bool $substitutionOnly * @return array */ - protected function generateSQL(array $subdefNames, array $recordTypes, $min, $max, $withSubstitution, $substitutionOnly) + protected function generateSQL(Connection $connection, array $recordTypes, $min, $max) { - $sql = <<<'SQL' -SELECT DISTINCT(r.record_id) AS record_id -FROM record r LEFT JOIN subdef s ON (r.record_id = s.record_id AND s.name IN (?)) -WHERE r.type IN (?) -SQL; + $sql = "SELECT record_id, type FROM record WHERE parent_record_id=0"; - $types = array(Connection::PARAM_STR_ARRAY, Connection::PARAM_STR_ARRAY); - $params = array($subdefNames, $recordTypes); + $types = array_map(function($v) use($connection){return $connection->quote($v);}, $recordTypes); + if(!empty($types)) { + $sql .= ' AND type IN(' . join(',', $types) . ')'; + } if (null !== $min) { - $sql .= ' AND (r.record_id >= ?)'; - - $params[] = (int)$min; - $types[] = \PDO::PARAM_INT; + $sql .= ' AND (record_id >= ' . $connection->quote($min) . ')'; } if (null !== $max) { - $sql .= ' AND (r.record_id <= ?)'; - - $params[] = (int)$max; - $types[] = \PDO::PARAM_INT; + $sql .= ' AND (record_id <= ' . $connection->quote($max) . ')'; } - if (false === $withSubstitution) { - $sql .= ' AND (ISNULL(s.substit) OR s.substit = ?)'; - $params[] = $substitutionOnly ? 1 : 0; - $types[] = \PDO::PARAM_INT; - } - - return array($sql, $params, $types); + return array($sql, [], []); } } From 81b636d4de7c17a87c0628652f2df0aee29523bb Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 31 Mar 2016 17:38:46 +0200 Subject: [PATCH 197/383] PHRAS-1055 #time 5h - better error handling - argument "databox" can be specified as id, dbname or viewname - add option "--partition=n/N" - argument "type" changed to option "--record_type=a,b,c" (can also be set as "--record_type=a,b --record_type=c") - argument "subdefs" changed to option "--name=x,y,z" (can also be set as "--name=x,y --name=z") - option "--with-substitution" changed to "--with_substituted" - option "--substitution-only" changed to "--substituted-only" --- lib/Alchemy/Phrasea/Command/BuildSubdefs.php | 254 +++++++++++++------ 1 file changed, 179 insertions(+), 75 deletions(-) diff --git a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php index 173676668b..731d8e1796 100644 --- a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php +++ b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php @@ -25,19 +25,159 @@ use media_subdef; class BuildSubdefs extends Command { + const OPTION_DISTINT_VALUES = 0; + const OPTION_ALL_VALUES = 1; + + /** @var InputInterface */ + private $input; + /** @var OutputInterface */ + private $output; + /** @var bool */ + var $argsOK; + /** @var \Databox */ + var $databox; + /** @var connection */ + var $connection; + var $recmin; + var $recmax; + var $substitutedOnly; + var $withSubstituted; + var $subdefsNameByType; + + /** @var int */ + private $partitionIndex; + /** @var int */ + private $partitionCount; + + /** @var bool */ + var $dry; + public function __construct($name = null) { parent::__construct($name); $this->setDescription('Build subviews for given subview names and record types'); - $this->addArgument('databox', InputArgument::REQUIRED, 'The databox id'); - $this->addArgument('type', InputArgument::REQUIRED, 'Type(s) of document(s) to rebuild ex. "image,video", or "ALL"'); - $this->addArgument('subdefs', InputArgument::REQUIRED, 'Name(s) of sub-definition(s) to re-build, ex. "thumbnail,preview", or "ALL"'); - $this->addOption('min_record', 'min', InputOption::VALUE_OPTIONAL, 'Min record id'); - $this->addOption('max_record', 'max', InputOption::VALUE_OPTIONAL, 'Max record id'); - $this->addOption('with-substitution', 'wsubstit', InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records as well'); - $this->addOption('substitution-only', 'substito', InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records only'); - $this->addOption('dry', '', InputOption::VALUE_NONE, 'dry run, list but do nothing'); + $this->addArgument('databox', InputArgument::REQUIRED, 'The id (or dbname or viewname) of the databox'); + $this->addOption('record_type', null, InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Type(s) of records(s) to (re)build ex. "image,video", dafault=ALL'); + $this->addOption('name', null, InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Name(s) of sub-definition(s) to (re)build, ex. "thumbnail,preview", default=ALL'); + $this->addOption('min_record', null, InputOption::VALUE_OPTIONAL, 'Min record id'); + $this->addOption('max_record', null, InputOption::VALUE_OPTIONAL, 'Max record id'); + $this->addOption('with_substituted', null, InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records as well'); + $this->addOption('substituted_only', null, InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records only'); + $this->addOption('partition', null, InputOption::VALUE_REQUIRED, 'n/N : work only on records belonging to partition \'n\''); + $this->addOption('dry', null, InputOption::VALUE_NONE, 'dry run, list but don\'t act'); + } + + /** + * merge options so one can mix csv-option and/or multiple options + * ex. with keepUnique = false : --opt=a,b --opt=c --opt=b ==> [a,b,c,b] + * ex. with keepUnique = true : --opt=a,b --opt=c --opt=b ==> [a,b,c] + * + * @param InputInterface $input + * @param string $optionName + * @param int $option + * @return array + */ + private function getOptionAsArray(InputInterface $input, $optionName, $option) + { + $ret = []; + foreach($input->getOption($optionName) as $v0) { + foreach(explode(',', $v0) as $v) { + $v = trim($v); + if($option & self::OPTION_ALL_VALUES || !in_array($v, $ret)) { + $ret[] = $v; + } + } + } + + return $ret; + } + + /** + * print a string if verbosity >= verbose (-v) + * @param string $s + */ + private function verbose($s) + { + if($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) { + $this->output->write($s); + } + } + + /** + * sanity check the cmd line options + * + */ + protected function interact(InputInterface $input, OutputInterface $output) + { + $this->argsOK = true; + + // find the databox / collection by id or by name + $this->databox = null; + $d = trim($input->getArgument('databox')); + foreach ($this->container->getDataboxes() as $db) { + if ($db->get_sbas_id() == (int)$d || $db->get_viewname() == $d || $db->get_dbname() == $d) { + $this->databox = $db; + $this->connection = $db->get_connection(); + break; + } + } + if ($this->databox == null) { + $output->writeln(sprintf("Unknown databox \"%s\"", $input->getArgument('databox'))); + $this->argsOK = false; + } + + // get options + $this->dry = $input->getOption('dry') ? true : false; + $this->recmin = $input->getOption('min_record'); + $this->recmax = $input->getOption('max_record'); + $this->substitutedOnly = $input->getOption('substituted_only') ? true : false; + $this->withSubstituted = $input->getOption('with_substituted') ? true : false; + if ($this->withSubstituted && $this->substitutedOnly) { + $output->writeln("--substituted_only and --with_substituted are mutually exclusive"); + $this->argsOK = false; + } + + // validate types and subdefs + $this->subdefsNameByType = []; + + if($this->databox !== null) { + $types = $this->getOptionAsArray($input, 'record_type', self::OPTION_DISTINT_VALUES); + $names = $this->getOptionAsArray($input, 'name', self::OPTION_DISTINT_VALUES); + + /** @var SubdefGroup $sg */ + foreach ($this->databox->get_subdef_structure() as $sg) { + if (empty($types) || in_array($sg->getName(), $types)) { + $this->subdefsNameByType[$sg->getName()] = []; + /** @var databox_subdef $sd */ + foreach ($sg as $sd) { + if (empty($names) || in_array($sd->get_name(), $names)) { + $this->subdefsNameByType[$sg->getName()][] = $sd->get_name(); + } + } + } + } + foreach ($types as $t) { + if (!array_key_exists($t, $this->subdefsNameByType)) { + $output->writeln(sprintf("unknown type \"%s\"", $t)); + $this->argsOK = false; + } + } + } + + // validate partition + $this->partitionIndex = $this->partitionCount = null; + if( ($arg = $input->getOption('partition')) !== null) { + $arg = explode('/', $arg); + if(count($arg) == 2 && ($arg0 = (int)trim($arg[0]))>0 && ($arg1 = (int)trim($arg[1]))>1 && $arg0<=$arg1 ) { + $this->partitionIndex = $arg0; + $this->partitionCount = $arg1; + } + else { + $output->writeln(sprintf('partition must be n/N')); + $this->argsOK = false; + } + } } /** @@ -45,54 +185,21 @@ class BuildSubdefs extends Command */ protected function doExecute(InputInterface $input, OutputInterface $output) { - $availableTypes = array('document', 'audio', 'video', 'image', 'flash', 'map'); - - $min = $input->getOption('min_record'); - $max = $input->getOption('max_record'); - $substitutionOnly = $input->getOption('substitution-only') ? true : false; - $withSubstitution = $input->getOption('with-substitution') ? true : false; - $dry = $input->getOption('dry') ? true : false; - - if ($withSubstitution && $substitutionOnly) { - throw new InvalidArgumentException('--substitution-only and --with-substitution are mutually exclusive'); + if(!$this->argsOK) { + return -1; } + $this->input = $input; + $this->output = $output; - $databox = $this->container->findDataboxById($input->getArgument('databox')); - $connection = $databox->get_connection(); - - $subdefsNameByType = []; - - $typesOption = $input->getArgument('type'); - $typesArray = explode(',', $typesOption); - - $subdefsOption = $input->getArgument('subdefs'); - $subdefsArray = explode(',', $subdefsOption); - - /** @var SubdefGroup $sg */ - foreach($databox->get_subdef_structure() as $sg) - { - if($typesOption == "ALL" || in_array($sg->getName(), $typesArray)) { - $subdefsNameByType[$sg->getName()] = []; - /** @var databox_subdef $sd */ - foreach ($sg as $sd) { - if($subdefsOption == "ALL" || in_array($sd->get_name(), $subdefsArray)) { - $subdefsNameByType[$sg->getName()][] = $sd->get_name(); - } - } - } - } - - $recordsType = array_keys($subdefsNameByType); - - list($sql, $params, $types) = $this->generateSQL($connection, $recordsType, $min, $max); + list($sql, $params, $types) = $this->getSQL(); $sqlCount = sprintf('SELECT COUNT(*) FROM (%s) AS c', $sql); $output->writeln($sqlCount); - $totalRecords = (int)$connection->executeQuery($sqlCount, $params, $types)->fetchColumn(); + $totalRecords = (int)$this->connection->executeQuery($sqlCount, $params, $types)->fetchColumn(); if ($totalRecords === 0) { - return; + return 0; } $progress = null; @@ -102,36 +209,36 @@ class BuildSubdefs extends Command $progress->display(); } - $rows = $connection->executeQuery($sql, $params, $types)->fetchAll(\PDO::FETCH_ASSOC); + $rows = $this->connection->executeQuery($sql, $params, $types)->fetchAll(\PDO::FETCH_ASSOC); foreach ($rows as $row) { $type = $row['type']; $output->write(sprintf(' [#%s] (%s)', $row['record_id'], $type)); try { - $record = $databox->get_record($row['record_id']); + $record = $this->databox->get_record($row['record_id']); - $subdefNamesToDo = array_flip($subdefsNameByType[$type]); // do all subdefs ? + $subdefNamesToDo = array_flip($this->subdefsNameByType[$type]); // do all subdefs ? /** @var media_subdef $subdef */ foreach ($record->get_subdefs() as $subdef) { - if(!in_array($subdef->get_name(), $subdefsNameByType[$type])) { + if(!in_array($subdef->get_name(), $this->subdefsNameByType[$type])) { continue; } if($subdef->is_substituted()) { - if(!$withSubstitution && !$substitutionOnly) { + if(!$this->withSubstituted && !$this->substitutedOnly) { unset($subdefNamesToDo[$subdef->get_name()]); continue; } } else { - if($substitutionOnly) { + if($this->substitutedOnly) { unset($subdefNamesToDo[$subdef->get_name()]); continue; } } // here an existing subdef must be re-done - if(!$dry) { + if(!$this->dry) { $subdef->remove_file(); $subdef->set_substituted(false); } @@ -139,26 +246,20 @@ class BuildSubdefs extends Command $subdefNamesToDo = array_keys($subdefNamesToDo); if(!empty($subdefNamesToDo)) { - if(!$dry) { + if(!$this->dry) { /** @var SubdefGenerator $subdefGenerator */ $subdefGenerator = $this->container['subdef.generator']; $subdefGenerator->generateSubdefs($record, $subdefNamesToDo); } - if($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) { - $output->writeln(sprintf(" subdefs[%s] done", join(',', $subdefNamesToDo))); - } + $this->verbose(sprintf(" subdefs[%s] done\n", join(',', $subdefNamesToDo))); } else { - if($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) { - $output->writeln(sprintf(" nothing to do")); - } + $this->verbose(" nothing to do\n"); } } catch(\Exception $e) { - if($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) { - $output->writeln(sprintf("failed")); - } + $this->verbose("failed\n"); } if($progress) { @@ -168,30 +269,33 @@ class BuildSubdefs extends Command if($progress) { $progress->finish(); - $output->writeln(""); + $output->writeln(''); } + + return 0; } /** - * @param string[] $recordTypes - * @param null|int $min - * @param null|int $max * @return array */ - protected function generateSQL(Connection $connection, array $recordTypes, $min, $max) + protected function getSQL() { $sql = "SELECT record_id, type FROM record WHERE parent_record_id=0"; - $types = array_map(function($v) use($connection){return $connection->quote($v);}, $recordTypes); + $recordTypes = array_keys($this->subdefsNameByType); + $types = array_map(function($v) {return $this->connection->quote($v);}, $recordTypes); if(!empty($types)) { $sql .= ' AND type IN(' . join(',', $types) . ')'; } - if (null !== $min) { - $sql .= ' AND (record_id >= ' . $connection->quote($min) . ')'; + if ($this->recmin !== null) { + $sql .= ' AND (record_id >= ' . (int)($this->recmin) . ')'; } - if (null !== $max) { - $sql .= ' AND (record_id <= ' . $connection->quote($max) . ')'; + if ($this->recmax) { + $sql .= ' AND (record_id <= ' . (int)($this->recmax) . ')'; + } + if($this->partitionCount !== null && $this->partitionIndex !== null) { + $sql .= ' AND MOD(record_id, ' . $this->partitionCount . ')=' . ($this->partitionIndex-1); } return array($sql, [], []); From 4e37af63862f60998247bb2495e224ce21915fb7 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 31 Mar 2016 19:30:11 +0200 Subject: [PATCH 198/383] PHRAS-1055 #time 2h - change lone argument (databox) to option "--databox" (mandatory) - add option "--missing_only" to create missing subdefs after structure change. - add option "--garbage_collect" to remove orphan subdefs left by structure change. --- lib/Alchemy/Phrasea/Command/BuildSubdefs.php | 65 +++++++++++++++----- lib/classes/media/subdef.php | 26 ++++++++ lib/classes/record/adapter.php | 2 +- 3 files changed, 76 insertions(+), 17 deletions(-) diff --git a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php index 731d8e1796..6a66c5e221 100644 --- a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php +++ b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php @@ -42,6 +42,9 @@ class BuildSubdefs extends Command var $recmax; var $substitutedOnly; var $withSubstituted; + var $missingOnly; + var $garbageCollect; + var $subdefsNameByType; /** @var int */ @@ -57,13 +60,15 @@ class BuildSubdefs extends Command parent::__construct($name); $this->setDescription('Build subviews for given subview names and record types'); - $this->addArgument('databox', InputArgument::REQUIRED, 'The id (or dbname or viewname) of the databox'); + $this->addOption('databox', null, InputOption::VALUE_REQUIRED, 'Mandatory : The id (or dbname or viewname) of the databox'); $this->addOption('record_type', null, InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Type(s) of records(s) to (re)build ex. "image,video", dafault=ALL'); $this->addOption('name', null, InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Name(s) of sub-definition(s) to (re)build, ex. "thumbnail,preview", default=ALL'); $this->addOption('min_record', null, InputOption::VALUE_OPTIONAL, 'Min record id'); $this->addOption('max_record', null, InputOption::VALUE_OPTIONAL, 'Max record id'); $this->addOption('with_substituted', null, InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records as well'); $this->addOption('substituted_only', null, InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records only'); + $this->addOption('missing_only', null, InputOption::VALUE_NONE, 'Regenerate only missing subdefs'); + $this->addOption('garbage_collect', null, InputOption::VALUE_NONE, 'Delete subdefs not in structure anymore'); $this->addOption('partition', null, InputOption::VALUE_REQUIRED, 'n/N : work only on records belonging to partition \'n\''); $this->addOption('dry', null, InputOption::VALUE_NONE, 'dry run, list but don\'t act'); } @@ -114,16 +119,22 @@ class BuildSubdefs extends Command // find the databox / collection by id or by name $this->databox = null; - $d = trim($input->getArgument('databox')); - foreach ($this->container->getDataboxes() as $db) { - if ($db->get_sbas_id() == (int)$d || $db->get_viewname() == $d || $db->get_dbname() == $d) { - $this->databox = $db; - $this->connection = $db->get_connection(); - break; + if(($d = $input->getOption('databox')) !== null) { + $d = trim($d); + foreach ($this->container->getDataboxes() as $db) { + if ($db->get_sbas_id() == (int)$d || $db->get_viewname() == $d || $db->get_dbname() == $d) { + $this->databox = $db; + $this->connection = $db->get_connection(); + break; + } + } + if ($this->databox == null) { + $output->writeln(sprintf("Unknown databox \"%s\"", $input->getOption('databox'))); + $this->argsOK = false; } } - if ($this->databox == null) { - $output->writeln(sprintf("Unknown databox \"%s\"", $input->getArgument('databox'))); + else { + $output->writeln(sprintf("Missing mandatory options --databox")); $this->argsOK = false; } @@ -133,17 +144,24 @@ class BuildSubdefs extends Command $this->recmax = $input->getOption('max_record'); $this->substitutedOnly = $input->getOption('substituted_only') ? true : false; $this->withSubstituted = $input->getOption('with_substituted') ? true : false; + $this->missingOnly = $input->getOption('missing_only') ? true : false; + $this->garbageCollect = $input->getOption('garbage_collect') ? true : false; + $types = $this->getOptionAsArray($input, 'record_type', self::OPTION_DISTINT_VALUES); + $names = $this->getOptionAsArray($input, 'name', self::OPTION_DISTINT_VALUES); + if ($this->withSubstituted && $this->substitutedOnly) { $output->writeln("--substituted_only and --with_substituted are mutually exclusive"); $this->argsOK = false; } + if($this->garbageCollect && !empty($names)) { + $output->writeln("--garbage_collect and --name are mutually exclusive"); + $this->argsOK = false; + } // validate types and subdefs $this->subdefsNameByType = []; if($this->databox !== null) { - $types = $this->getOptionAsArray($input, 'record_type', self::OPTION_DISTINT_VALUES); - $names = $this->getOptionAsArray($input, 'name', self::OPTION_DISTINT_VALUES); /** @var SubdefGroup $sg */ foreach ($this->databox->get_subdef_structure() as $sg) { @@ -222,18 +240,33 @@ class BuildSubdefs extends Command /** @var media_subdef $subdef */ foreach ($record->get_subdefs() as $subdef) { - if(!in_array($subdef->get_name(), $this->subdefsNameByType[$type])) { + $name = $subdef->get_name(); + if($name == "document") { + continue; + } + if(!in_array($name, $this->subdefsNameByType[$type])) { + // this existing subdef is unknown in structure + if($this->garbageCollect) { + if(!$this->dry) { + $subdef->delete(); + } + $this->verbose(sprintf(" \"%s\" deleted,", $name)); + } + continue; + } + if($this->missingOnly) { + unset($subdefNamesToDo[$name]); continue; } if($subdef->is_substituted()) { if(!$this->withSubstituted && !$this->substitutedOnly) { - unset($subdefNamesToDo[$subdef->get_name()]); + unset($subdefNamesToDo[$name]); continue; } } else { if($this->substitutedOnly) { - unset($subdefNamesToDo[$subdef->get_name()]); + unset($subdefNamesToDo[$name]); continue; } } @@ -252,10 +285,10 @@ class BuildSubdefs extends Command $subdefGenerator->generateSubdefs($record, $subdefNamesToDo); } - $this->verbose(sprintf(" subdefs[%s] done\n", join(',', $subdefNamesToDo))); + $this->verbose(sprintf(" subdefs[%s] built\n", join(',', $subdefNamesToDo))); } else { - $this->verbose(" nothing to do\n"); + $this->verbose(" nothing to build\n"); } } catch(\Exception $e) { diff --git a/lib/classes/media/subdef.php b/lib/classes/media/subdef.php index 9e5f3a5f82..cdad987a06 100644 --- a/lib/classes/media/subdef.php +++ b/lib/classes/media/subdef.php @@ -235,6 +235,32 @@ class media_subdef extends media_abstract implements cache_cacheableInterface return $this; } + /** + * delete this subdef + * + * @throws \Doctrine\DBAL\DBALException + */ + public function delete() + { + $subdef_id = $this->subdef_id; + $this->remove_file(); + + $connbas = $this->record->getDatabox()->get_connection(); + + $sql = "DELETE FROM subdef WHERE subdef_id = :subdef_id"; + $stmt = $connbas->prepare($sql); + $stmt->execute(['subdef_id'=>$subdef_id]); + $stmt->closeCursor(); + + $sql = "DELETE FROM permalinks WHERE subdef_id = :subdef_id"; + $stmt = $connbas->prepare($sql); + $stmt->execute(['subdef_id'=>$subdef_id]); + $stmt->closeCursor(); + + $this->delete_data_from_cache(); + $this->record->delete_data_from_cache(record_adapter::CACHE_SUBDEFS); + } + /** * Find a substitution file for a subdef * diff --git a/lib/classes/record/adapter.php b/lib/classes/record/adapter.php index 5d5b55ba28..8f87aeeeb1 100644 --- a/lib/classes/record/adapter.php +++ b/lib/classes/record/adapter.php @@ -691,7 +691,7 @@ class record_adapter implements RecordInterface, cache_cacheableInterface } $rs = $this->getDataboxConnection()->fetchAll( - 'SELECT name FROM subdef s LEFT JOIN record r ON s.record_id = r.record_id WHERE r.record_id = :record_id', + 'SELECT name FROM subdef WHERE record_id = :record_id', ['record_id' => $this->getRecordId()] ); From 0f40eb586113e0dd6789be1995bad982b2344836 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 31 Mar 2016 19:32:54 +0200 Subject: [PATCH 199/383] PHRAS-1055 #time 1m - cleanup --- lib/Alchemy/Phrasea/Command/BuildSubdefs.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php index 6a66c5e221..49a462052e 100644 --- a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php +++ b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php @@ -11,10 +11,8 @@ namespace Alchemy\Phrasea\Command; use Alchemy\Phrasea\Databox\SubdefGroup; -use Alchemy\Phrasea\Exception\InvalidArgumentException; use Alchemy\Phrasea\Media\SubdefGenerator; use databox_subdef; -use databox_subdefsStructure; use Doctrine\DBAL\Connection; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; From 05b2c876efb5c1ad31200cd4700da97f41003324 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Mon, 4 Apr 2016 14:40:38 +0200 Subject: [PATCH 200/383] PHRAS-1055 #time 2h - cleanup - add option "--reset_subdef_flag" - add option "--set_writemeta_flag" --- lib/Alchemy/Phrasea/Command/BuildSubdefs.php | 136 ++++++++++++------- 1 file changed, 88 insertions(+), 48 deletions(-) diff --git a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php index 49a462052e..9e34924757 100644 --- a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php +++ b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php @@ -10,6 +10,7 @@ namespace Alchemy\Phrasea\Command; +use Alchemy\Phrasea\Core\PhraseaTokens; use Alchemy\Phrasea\Databox\SubdefGroup; use Alchemy\Phrasea\Media\SubdefGenerator; use databox_subdef; @@ -31,44 +32,56 @@ class BuildSubdefs extends Command /** @var OutputInterface */ private $output; /** @var bool */ - var $argsOK; + private $argsOK; /** @var \Databox */ - var $databox; + private $databox; /** @var connection */ - var $connection; - var $recmin; - var $recmax; - var $substitutedOnly; - var $withSubstituted; - var $missingOnly; - var $garbageCollect; - - var $subdefsNameByType; + private $connection; + /** @var int */ + private $recmin; + /** @var int */ + private $recmax; + /** @var bool */ + private $substitutedOnly; + /** @var bool */ + private $withSubstituted; + /** @var bool */ + private $missingOnly; + /** @var bool */ + private $garbageCollect; /** @var int */ private $partitionIndex; /** @var int */ private $partitionCount; - /** @var bool */ - var $dry; + private $resetSubdefFlag; + /** @var bool */ + private $setWritemetaFlag; + /** @var bool */ + private $dry; + + /** @var array */ + private $subdefsNameByType; public function __construct($name = null) { parent::__construct($name); $this->setDescription('Build subviews for given subview names and record types'); - $this->addOption('databox', null, InputOption::VALUE_REQUIRED, 'Mandatory : The id (or dbname or viewname) of the databox'); - $this->addOption('record_type', null, InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Type(s) of records(s) to (re)build ex. "image,video", dafault=ALL'); - $this->addOption('name', null, InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Name(s) of sub-definition(s) to (re)build, ex. "thumbnail,preview", default=ALL'); - $this->addOption('min_record', null, InputOption::VALUE_OPTIONAL, 'Min record id'); - $this->addOption('max_record', null, InputOption::VALUE_OPTIONAL, 'Max record id'); - $this->addOption('with_substituted', null, InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records as well'); - $this->addOption('substituted_only', null, InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records only'); - $this->addOption('missing_only', null, InputOption::VALUE_NONE, 'Regenerate only missing subdefs'); - $this->addOption('garbage_collect', null, InputOption::VALUE_NONE, 'Delete subdefs not in structure anymore'); - $this->addOption('partition', null, InputOption::VALUE_REQUIRED, 'n/N : work only on records belonging to partition \'n\''); - $this->addOption('dry', null, InputOption::VALUE_NONE, 'dry run, list but don\'t act'); + $this->addOption('databox', null, InputOption::VALUE_REQUIRED, 'Mandatory : The id (or dbname or viewname) of the databox'); + $this->addOption('record_type', null, InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Type(s) of records(s) to (re)build ex. "image,video", dafault=ALL'); + $this->addOption('name', null, InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, 'Name(s) of sub-definition(s) to (re)build, ex. "thumbnail,preview", default=ALL'); + $this->addOption('min_record', null, InputOption::VALUE_OPTIONAL, 'Min record id'); + $this->addOption('max_record', null, InputOption::VALUE_OPTIONAL, 'Max record id'); + $this->addOption('with_substituted', null, InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records as well'); + $this->addOption('substituted_only', null, InputOption::VALUE_NONE, 'Regenerate subdefs for substituted records only'); + $this->addOption('missing_only', null, InputOption::VALUE_NONE, 'Regenerate only missing subdefs'); + $this->addOption('garbage_collect', null, InputOption::VALUE_NONE, 'Delete subdefs not in structure anymore'); + $this->addOption('partition', null, InputOption::VALUE_REQUIRED, 'n/N : work only on records belonging to partition \'n\''); + $this->addOption('reset_subdef_flag', null, InputOption::VALUE_NONE, 'Reset "make-subdef" flag (should only be used when working on all subdefs, that is NO --name filter)'); + $this->addOption('set_writemeta_flag', null, InputOption::VALUE_NONE, 'Set "write-metadata" flag (should only be used when working on all subdefs, that is NO --name filter)'); + $this->addOption('dry', null, InputOption::VALUE_NONE, 'dry run, list but don\'t act'); } /** @@ -110,10 +123,13 @@ class BuildSubdefs extends Command /** * sanity check the cmd line options * + * @param InputInterface $input + * @param OutputInterface $output + * @return bool */ - protected function interact(InputInterface $input, OutputInterface $output) + protected function sanitizeArgs(InputInterface $input, OutputInterface $output) { - $this->argsOK = true; + $argsOK = true; // find the databox / collection by id or by name $this->databox = null; @@ -128,32 +144,34 @@ class BuildSubdefs extends Command } if ($this->databox == null) { $output->writeln(sprintf("Unknown databox \"%s\"", $input->getOption('databox'))); - $this->argsOK = false; + $argsOK = false; } } else { $output->writeln(sprintf("Missing mandatory options --databox")); - $this->argsOK = false; + $argsOK = false; } // get options - $this->dry = $input->getOption('dry') ? true : false; - $this->recmin = $input->getOption('min_record'); - $this->recmax = $input->getOption('max_record'); - $this->substitutedOnly = $input->getOption('substituted_only') ? true : false; - $this->withSubstituted = $input->getOption('with_substituted') ? true : false; - $this->missingOnly = $input->getOption('missing_only') ? true : false; - $this->garbageCollect = $input->getOption('garbage_collect') ? true : false; + $this->dry = $input->getOption('dry') ? true : false; + $this->recmin = $input->getOption('min_record'); + $this->recmax = $input->getOption('max_record'); + $this->substitutedOnly = $input->getOption('substituted_only') ? true : false; + $this->withSubstituted = $input->getOption('with_substituted') ? true : false; + $this->missingOnly = $input->getOption('missing_only') ? true : false; + $this->garbageCollect = $input->getOption('garbage_collect') ? true : false; + $this->resetSubdefFlag = $input->getOption('reset_subdef_flag') ? true : false; + $this->setWritemetaFlag = $input->getOption('set_writemeta_flag') ? true : false; $types = $this->getOptionAsArray($input, 'record_type', self::OPTION_DISTINT_VALUES); $names = $this->getOptionAsArray($input, 'name', self::OPTION_DISTINT_VALUES); if ($this->withSubstituted && $this->substitutedOnly) { $output->writeln("--substituted_only and --with_substituted are mutually exclusive"); - $this->argsOK = false; + $argsOK = false; } if($this->garbageCollect && !empty($names)) { $output->writeln("--garbage_collect and --name are mutually exclusive"); - $this->argsOK = false; + $argsOK = false; } // validate types and subdefs @@ -176,7 +194,7 @@ class BuildSubdefs extends Command foreach ($types as $t) { if (!array_key_exists($t, $this->subdefsNameByType)) { $output->writeln(sprintf("unknown type \"%s\"", $t)); - $this->argsOK = false; + $argsOK = false; } } } @@ -191,9 +209,16 @@ class BuildSubdefs extends Command } else { $output->writeln(sprintf('partition must be n/N')); - $this->argsOK = false; + $argsOK = false; } } + + // warning about changing jeton when not working on all subdefs + if(!empty($names) && ($this->resetSubdefFlag || $this->setWritemetaFlag)) { + $output->writeln("warning : changing record status bit but working on a subset of subdefs."); + } + + return $argsOK; } /** @@ -201,18 +226,19 @@ class BuildSubdefs extends Command */ protected function doExecute(InputInterface $input, OutputInterface $output) { - if(!$this->argsOK) { + if(!$this->sanitizeArgs($input, $output)) { return -1; } + $this->input = $input; $this->output = $output; - list($sql, $params, $types) = $this->getSQL(); + $sql = $this->getSQL(); + $this->verbose($sql . "\n"); $sqlCount = sprintf('SELECT COUNT(*) FROM (%s) AS c', $sql); - $output->writeln($sqlCount); - $totalRecords = (int)$this->connection->executeQuery($sqlCount, $params, $types)->fetchColumn(); + $totalRecords = (int)$this->connection->executeQuery($sqlCount)->fetchColumn(); if ($totalRecords === 0) { return 0; @@ -225,7 +251,7 @@ class BuildSubdefs extends Command $progress->display(); } - $rows = $this->connection->executeQuery($sql, $params, $types)->fetchAll(\PDO::FETCH_ASSOC); + $rows = $this->connection->executeQuery($sql)->fetchAll(\PDO::FETCH_ASSOC); foreach ($rows as $row) { $type = $row['type']; @@ -283,11 +309,25 @@ class BuildSubdefs extends Command $subdefGenerator->generateSubdefs($record, $subdefNamesToDo); } - $this->verbose(sprintf(" subdefs[%s] built\n", join(',', $subdefNamesToDo))); + $this->verbose(sprintf(" subdefs[%s] built\n", implode(',', $subdefNamesToDo))); } else { $this->verbose(" nothing to build\n"); } + + if($this->resetSubdefFlag|| $this->setWritemetaFlag) { + // subdef created, ask to rewrite metadata + $sql = 'UPDATE record' + . ' SET jeton=(jeton & ~(:flag_and)) | :flag_or' + . ' WHERE record_id=:record_id'; + + $this->connection->executeUpdate($sql, [ + ':record_id' => $row['record_id'], + ':flag_and' => $this->resetSubdefFlag ? PhraseaTokens::MAKE_SUBDEF : 0, + ':flag_or' => ($this->setWritemetaFlag ? PhraseaTokens::WRITE_META_SUBDEF : 0) + ]); + + } } catch(\Exception $e) { $this->verbose("failed\n"); @@ -307,7 +347,7 @@ class BuildSubdefs extends Command } /** - * @return array + * @return string */ protected function getSQL() { @@ -317,7 +357,7 @@ class BuildSubdefs extends Command $types = array_map(function($v) {return $this->connection->quote($v);}, $recordTypes); if(!empty($types)) { - $sql .= ' AND type IN(' . join(',', $types) . ')'; + $sql .= ' AND type IN(' . implode(',', $types) . ')'; } if ($this->recmin !== null) { $sql .= ' AND (record_id >= ' . (int)($this->recmin) . ')'; @@ -329,6 +369,6 @@ class BuildSubdefs extends Command $sql .= ' AND MOD(record_id, ' . $this->partitionCount . ')=' . ($this->partitionIndex-1); } - return array($sql, [], []); + return $sql; } } From 6cb9e8b80b65bc7e14321c3dbce596fbb29d5851 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Mon, 4 Apr 2016 14:44:39 +0200 Subject: [PATCH 201/383] PHRAS-1055 #time 1m - fix vocabulary (flag) --- lib/Alchemy/Phrasea/Command/BuildSubdefs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php index 9e34924757..b927744c2c 100644 --- a/lib/Alchemy/Phrasea/Command/BuildSubdefs.php +++ b/lib/Alchemy/Phrasea/Command/BuildSubdefs.php @@ -215,7 +215,7 @@ class BuildSubdefs extends Command // warning about changing jeton when not working on all subdefs if(!empty($names) && ($this->resetSubdefFlag || $this->setWritemetaFlag)) { - $output->writeln("warning : changing record status bit but working on a subset of subdefs."); + $output->writeln("warning : changing record flag(s) but working on a subset of subdefs."); } return $argsOK; From 5a9f3e227347ae3048095fdab824a5d3677babf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 4 Apr 2016 16:06:11 +0200 Subject: [PATCH 202/383] Add ability to retrieve Subdef url when fetching orders --- .../Media/MediaSubDefinitionUrlGenerator.php | 8 ++ .../Order/Controller/ApiOrderController.php | 17 ++-- .../Phrasea/Order/OrderElementTransformer.php | 90 ++++++++++++++++++- .../Phrasea/Order/OrderTransformer.php | 4 +- 4 files changed, 110 insertions(+), 9 deletions(-) diff --git a/lib/Alchemy/Phrasea/Media/MediaSubDefinitionUrlGenerator.php b/lib/Alchemy/Phrasea/Media/MediaSubDefinitionUrlGenerator.php index ef08d2edd7..ac751c6da7 100644 --- a/lib/Alchemy/Phrasea/Media/MediaSubDefinitionUrlGenerator.php +++ b/lib/Alchemy/Phrasea/Media/MediaSubDefinitionUrlGenerator.php @@ -41,6 +41,14 @@ class MediaSubDefinitionUrlGenerator $this->defaultTTL = (int)$defaultTTL; } + /** + * @return int + */ + public function getDefaultTTL() + { + return $this->defaultTTL; + } + /** * @param User $issuer * @param \media_subdef $subdef diff --git a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php index e6216dd10a..06f2ca60a1 100644 --- a/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php +++ b/lib/Alchemy/Phrasea/Order/Controller/ApiOrderController.php @@ -68,7 +68,7 @@ class ApiOrderController extends BaseOrderController { $page = max((int) $request->get('page', '1'), 1); $perPage = min(max((int)$request->get('per_page', '10'), 1), 100); - $includes = $request->get('includes', []); + $fractal = $this->parseIncludes($request->get('includes', [])); $routeGenerator = function ($page) use ($perPage) { return $this->app->path('api_v2_orders_index', [ @@ -77,14 +77,18 @@ class ApiOrderController extends BaseOrderController ]); }; - $builder = $this->app['repo.orders']->createQueryBuilder('o'); $builder ->where($builder->expr()->eq('o.user', $this->getAuthenticatedUser()->getId())) - ->setFirstResult(($page - 1) * $perPage) - ->setMaxResults($perPage) ; + if (in_array('elements', $fractal->getRequestedIncludes(), false)) { + $builder + ->addSelect('e') + ->leftJoin('o.elements', 'e') + ; + } + $resource = new Collection($builder->getQuery()->getResult(), $this->getOrderTransformer()); $pager = new Pagerfanta(new DoctrineORMAdapter($builder, false)); @@ -93,7 +97,7 @@ class ApiOrderController extends BaseOrderController $paginator = new PagerfantaPaginatorAdapter($pager, $routeGenerator); $resource->setPaginator($paginator); - return $this->returnResourceResponse($request, $includes, $resource); + return $this->returnResourceResponse($request, $fractal, $resource); } /** @@ -196,7 +200,8 @@ class ApiOrderController extends BaseOrderController private function parseIncludes($includes) { $fractal = new Manager(); - $fractal->parseIncludes($includes); + + $fractal->parseIncludes($includes ?: []); return $fractal; } diff --git a/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php b/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php index a37dd76c42..3ca40411d0 100644 --- a/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php +++ b/lib/Alchemy/Phrasea/Order/OrderElementTransformer.php @@ -1,5 +1,5 @@ getOrderMaster()) { $data['validator_id'] = $element->getOrderMaster()->getId(); $data['status'] = $element->getDeny() ? 'rejected' : 'accepted'; @@ -43,4 +51,84 @@ class OrderElementTransformer extends TransformerAbstract return $data; } + + public function includeResourceLinks(OrderElement $element, ParamBag $params = null) + { + $ttl = null; + + if ($params) { + $usedParams = array_keys(iterator_to_array($params)); + + if (array_diff($usedParams, $this->validParams)) { + throw new \RuntimeException(sprintf( + 'Invalid param(s): "%s". Valid param(s): "%s"', + implode(', ', $usedParams), + implode(', ', $this->validParams) + )); + } + + list ($ttl) = $params->get('ttl'); + } + + $generator = $this->getSubdefUrlGenerator(); + + if (null === $ttl) { + $ttl = $generator->getDefaultTTL(); + } + + $urls = $generator->generateMany($this->app->getAuthenticatedUser(), $this->findOrderableMediaSubdef($element), $ttl); + $urls = array_map(null, array_keys($urls), array_values($urls)); + + return $this->collection($urls, function (array $data) use ($ttl) { + return [ + 'name' => $data[0], + 'url' => $data[1], + 'url_ttl' => $ttl, + ]; + }); + } + + /** + * @param OrderElement $element + * @return \media_subdef[] + */ + private function findOrderableMediaSubdef(OrderElement $element) + { + if (false !== $element->getDeny()) { + return []; + } + + $databox = $this->app->findDataboxById($element->getSbasId($this->app)); + $record = $databox->get_record($element->getRecordId()); + + $subdefNames = []; + + foreach ($databox->get_subdef_structure()->getSubdefGroup($record->getType()) as $databoxSubdef) { + if ($databoxSubdef->isOrderable()) { + $subdefNames[] = $databoxSubdef->get_name(); + } + } + + $subdefs = []; + + foreach ($subdefNames as $subdefName) { + if ($record->has_subdef($subdefName)) { + try { + $subdefs[$subdefName] = new \media_subdef($this->app, $record, $subdefName); + } catch (\Exception_Media_SubdefNotFound $exception) { + // ignore missing subdef + } + } + } + + return $subdefs; + } + + /** + * @return MediaSubDefinitionUrlGenerator + */ + private function getSubdefUrlGenerator() + { + return $this->app['media_accessor.subdef_url_generator']; + } } diff --git a/lib/Alchemy/Phrasea/Order/OrderTransformer.php b/lib/Alchemy/Phrasea/Order/OrderTransformer.php index 54b515228f..e9a106a148 100644 --- a/lib/Alchemy/Phrasea/Order/OrderTransformer.php +++ b/lib/Alchemy/Phrasea/Order/OrderTransformer.php @@ -1,5 +1,5 @@ (int)$order->getUser()->getId(), 'created' => $order->getCreatedOn()->format(DATE_ATOM), 'usage' => $order->getOrderUsage(), + 'status' => 0 === $order->getTodo() ? 'finished' : 'pending' ]; if ($order->getDeadline()) { From e0134010b535b6a1e7606bf5e2a4c47a6bef5537 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Mon, 4 Apr 2016 18:58:17 +0200 Subject: [PATCH 203/383] allow plugins to consume production app services --- package.json | 2 +- templates/web/prod/index.html.twig | 158 ++++++++++++++--------------- 2 files changed, 80 insertions(+), 80 deletions(-) diff --git a/package.json b/package.json index c6cf8c3ea6..a14b6c1b0d 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,6 @@ "postinstall": "./node_modules/.bin/gulp install;" }, "dependencies": { - "phraseanet-production-client": "~0.11.0" + "phraseanet-production-client": "~0.12.0" } } diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index c239959da5..1d1b81fbdf 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -82,6 +82,85 @@ {% endblock %} {% block javascript %} + + + {% include "common/templates.html.twig" %} {% endblock %} @@ -701,85 +780,6 @@ - - - {% endblock %} From 856a7b3ebee12c28e110f935ec0de74ac6159265 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Mon, 4 Apr 2016 16:30:58 +0200 Subject: [PATCH 204/383] wip: add mapBox to recordEditor --- .../www/prod/skins/ui-components/_modal-edit.scss | 6 +++--- templates/web/prod/actions/edit_default.html.twig | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/www/prod/skins/ui-components/_modal-edit.scss b/resources/www/prod/skins/ui-components/_modal-edit.scss index 26d4d82048..742c1adcc4 100644 --- a/resources/www/prod/skins/ui-components/_modal-edit.scss +++ b/resources/www/prod/skins/ui-components/_modal-edit.scss @@ -308,7 +308,7 @@ overflow-x: auto; overflow-y: scroll; } -#idFrameE { +#EDITWINDOW { .ui-datepicker-inline { background-color: $darkerBackgroundColor; background-repeat: repeat-x; @@ -413,13 +413,13 @@ div.thesaurus { } } -#idFrameE #TH_Ofull, #idFrameTH #TH_Oprop, #idFrameTH #TH_Oclip { +#EDITWINDOW #TH_Ofull, #idFrameTH #TH_Oprop, #idFrameTH #TH_Oclip { margin: 0; padding: 0; width: 100%; } -#idFrameE { +#EDITWINDOW { div.searchZone { position: absolute; top: 0px; diff --git a/templates/web/prod/actions/edit_default.html.twig b/templates/web/prod/actions/edit_default.html.twig index fa93393b6f..0cdfb53f20 100644 --- a/templates/web/prod/actions/edit_default.html.twig +++ b/templates/web/prod/actions/edit_default.html.twig @@ -260,11 +260,6 @@
    {% endif %} -
    -
    - -
    -
    @@ -345,6 +340,11 @@
      +
      +
      + +
      +
      From 8aaf924d5db22060661ff5af5e0864360b7bb4e0 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Tue, 5 Apr 2016 15:42:11 +0200 Subject: [PATCH 205/383] MapBox integration into record editor --- package.json | 2 +- resources/www/prod/skins/ui-components/_modal-edit.scss | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a14b6c1b0d..032be25f55 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,6 @@ "postinstall": "./node_modules/.bin/gulp install;" }, "dependencies": { - "phraseanet-production-client": "~0.12.0" + "phraseanet-production-client": "~0.13.0" } } diff --git a/resources/www/prod/skins/ui-components/_modal-edit.scss b/resources/www/prod/skins/ui-components/_modal-edit.scss index 742c1adcc4..e7abd4c9b1 100644 --- a/resources/www/prod/skins/ui-components/_modal-edit.scss +++ b/resources/www/prod/skins/ui-components/_modal-edit.scss @@ -503,6 +503,9 @@ div.thesaurus { .geoname-add-action { cursor: pointer; } + .ui-state-highlight { + color: #2e7db2; + } } } } From 68670dd02809e266ce97178842131890ab09d015 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Wed, 6 Apr 2016 17:37:22 +0200 Subject: [PATCH 206/383] add mapBox services into record preview --- config/configuration.sample.yml | 4 ++++ .../Controller/Prod/RecordController.php | 7 ++++++ .../Controller/Prod/RootController.php | 1 + lib/conf.d/configuration.yml | 4 ++++ package.json | 2 +- .../skins/ui-components/_modal-preview.scss | 23 +++++++++++++------ templates/web/prod/index.html.twig | 3 ++- 7 files changed, 35 insertions(+), 9 deletions(-) diff --git a/config/configuration.sample.yml b/config/configuration.sample.yml index f20aad5338..9fe381da3e 100644 --- a/config/configuration.sample.yml +++ b/config/configuration.sample.yml @@ -234,3 +234,7 @@ embed_bundle: document: player: flexpaper enable-pdfjs: true +geocoding-providers: + - + name: 'mapBox' + public-key: '' diff --git a/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php b/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php index d378691b84..257184f66f 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php @@ -80,6 +80,12 @@ class RecordController extends Controller $train = $this->render('prod/preview/feed_train.html.twig', ['record' => $record]); } + $recordCaptions = []; + foreach ($record->get_caption()->get_fields(null, true) as $field) { + // get field's values + $recordCaptions[$field->get_name()] = $field->get_serialized_values(); + } + return $this->app->json([ "desc" => $this->render('prod/preview/caption.html.twig', [ 'record' => $record, @@ -87,6 +93,7 @@ class RecordController extends Controller 'searchEngine' => $searchEngine, 'searchOptions' => $options, ]), + "recordCaptions"=> $recordCaptions, "html_preview" => $this->render('common/preview.html.twig', [ 'record' => $record ]), diff --git a/lib/Alchemy/Phrasea/Controller/Prod/RootController.php b/lib/Alchemy/Phrasea/Controller/Prod/RootController.php index 01e20fbf6c..8818cd0259 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/RootController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/RootController.php @@ -123,6 +123,7 @@ class RootController extends Controller 'feeds' => $feeds, 'aggregate' => $aggregate, 'GV_google_api' => $conf->get(['registry', 'webservices', 'google-charts-enabled']), + 'geocodingProviders' => json_encode($conf->get(['geocoding-providers'])), 'search_status' => \databox_status::getSearchStatus($this->app), 'thesau_js_list' => $thjslist, 'thesau_json_sbas' => json_encode($sbas), diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index 3a312ed3bb..ccaac7bf20 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -211,3 +211,7 @@ embed_bundle: document: player: flexpaper enable-pdfjs: true +geocoding-providers: + - + name: 'mapBox' + public-key: '' diff --git a/package.json b/package.json index 032be25f55..24e63dec9c 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,6 @@ "postinstall": "./node_modules/.bin/gulp install;" }, "dependencies": { - "phraseanet-production-client": "~0.13.0" + "phraseanet-production-client": "~0.14.0" } } diff --git a/resources/www/prod/skins/ui-components/_modal-preview.scss b/resources/www/prod/skins/ui-components/_modal-preview.scss index 925230b781..2c34375c2b 100644 --- a/resources/www/prod/skins/ui-components/_modal-preview.scss +++ b/resources/www/prod/skins/ui-components/_modal-preview.scss @@ -17,10 +17,10 @@ } #PREVIEWBOX #PREVIEWTITLE_COLLNAME { - display:none; + display: none; } -.PREVIEW_PIC,.PREVIEW_HD { +.PREVIEW_PIC, .PREVIEW_HD { position: absolute; } @@ -37,6 +37,10 @@ overflow: auto; } +#PREVIEWIMGDESC.PNB10 { + bottom: 0; +} + #PREVIEWIMGDESCINNER span.fieldName { font-weight: bold; } @@ -129,8 +133,7 @@ overflow-y: hidden; } -#PREVIEWCURRENTCONT::-webkit-scrollbar-track -{ +#PREVIEWCURRENTCONT::-webkit-scrollbar-track { border-radius: 0; background-color: #262626; } @@ -146,7 +149,6 @@ background-color: #595959; } - #PREVIEWCURRENTCONT ul { position: relative; height: 80px; @@ -194,7 +196,6 @@ top: auto; } - #PREVIEWTOOL img, #PREVIEWTOOL span { float: left; } @@ -206,7 +207,7 @@ z-index: 97; } -.prevTrainCurrent .doc_infos img,.diapo .doc_infos img { +.prevTrainCurrent .doc_infos img, .diapo .doc_infos img { vertical-align: middle; } @@ -214,9 +215,17 @@ background-color: darken($darkerBackgroundColor, 10); color: $darkerTextColor; } + #PREVIEWIMGCONT { .documentTips { width: 100%; height: 100%; } } + +#PREVIEWRIGHT { + top: 7px; + left: 60%; + overflow: hidden; + bottom: 10px; +} diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 1d1b81fbdf..3251ef4e6b 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -105,6 +105,7 @@ }, initialState: "{{ initialAppState }}", geonameServerUrl: '{{ app['geonames.server-uri'] }}', + geocodingProviders: {{ geocodingProviders|raw }}, thesaurusConfig: { replaceMessage: '{{ 'prod::thesaurusTab:dlg:Remplacement du candidat "%(from)s" par "%(to)s"' | trans }}', replaceInProgressMsg: '{{ 'prod::thesaurusTab:dlg:Remplacement en cours.' | trans }}', @@ -702,7 +703,7 @@
      -
      +
      • {{ 'preview:: Description' | trans }}
      • From da4ab636fe168d3e815d0ec14105407faf51ad78 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Wed, 6 Apr 2016 18:26:05 +0200 Subject: [PATCH 207/383] PHRAS-1061 #time 2d - fix : small error in "rightPanel.js" - remove : obsolete files about phrasea/sphinx engines. - add : buttons "drop index" / "create index" in admin/es settings --- .../Admin/SearchEngineController.php | 19 +++++++++ .../ControllerProvider/Admin/SearchEngine.php | 10 ++++- .../Core/Configuration/Configuration.php | 3 ++ .../Elastic/ElasticsearchSettingsFormType.php | 8 ++++ .../search-engine/elastic-search.html.twig | 19 +++++++++ .../web/admin/search-engine/phrasea.html.twig | 21 ---------- .../search-engine/sphinx-search.html.twig | 26 ------------- .../apps/admin/main/views/rightPanel.js | 4 +- .../admin/search-engine/views/es_config.js | 39 +++++++++++++++++++ 9 files changed, 98 insertions(+), 51 deletions(-) delete mode 100644 templates/web/admin/search-engine/phrasea.html.twig delete mode 100644 templates/web/admin/search-engine/sphinx-search.html.twig create mode 100644 www/scripts/apps/admin/search-engine/views/es_config.js diff --git a/lib/Alchemy/Phrasea/Controller/Admin/SearchEngineController.php b/lib/Alchemy/Phrasea/Controller/Admin/SearchEngineController.php index 2c0a3be48e..30b4b84782 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/SearchEngineController.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/SearchEngineController.php @@ -38,9 +38,28 @@ class SearchEngineController extends Controller return $this->render('admin/search-engine/elastic-search.html.twig', [ 'form' => $form->createView(), + 'indexer' => $this->app['elasticsearch.indexer'] ]); } + public function dropIndexAction(Request $request) + { + $indexer = $this->app['elasticsearch.indexer']; + if ($indexer->indexExists()) { + $indexer->deleteIndex(); + } + return $this->app->redirectPath('admin_searchengine_form'); + } + + public function createIndexAction(Request $request) + { + $indexer = $this->app['elasticsearch.indexer']; + if (!$indexer->indexExists()) { + $indexer->createIndex(); + } + return $this->app->redirectPath('admin_searchengine_form'); + } + /** * @return ElasticsearchOptions */ diff --git a/lib/Alchemy/Phrasea/ControllerProvider/Admin/SearchEngine.php b/lib/Alchemy/Phrasea/ControllerProvider/Admin/SearchEngine.php index b2da35b10b..139e133d09 100644 --- a/lib/Alchemy/Phrasea/ControllerProvider/Admin/SearchEngine.php +++ b/lib/Alchemy/Phrasea/ControllerProvider/Admin/SearchEngine.php @@ -37,9 +37,15 @@ class SearchEngine implements ControllerProviderInterface, ServiceProviderInterf /** @var ControllerCollection $controllers */ $controllers = $app['controllers_factory']; + $controllers->post('/drop_index', 'controller.admin.search-engine:dropIndexAction') + ->bind("admin_searchengine_drop_index"); + + $controllers->post('/create_index', 'controller.admin.search-engine:createIndexAction') + ->bind("admin_searchengine_create_index"); + $controllers->match('/', 'controller.admin.search-engine:formConfigurationPanelAction') - ->method('GET|POST') - ->bind('admin_searchengine_form'); + ->method('GET|POST') + ->bind('admin_searchengine_form'); return $controllers; } diff --git a/lib/Alchemy/Phrasea/Core/Configuration/Configuration.php b/lib/Alchemy/Phrasea/Core/Configuration/Configuration.php index d62fa8d52d..6457dc2187 100644 --- a/lib/Alchemy/Phrasea/Core/Configuration/Configuration.php +++ b/lib/Alchemy/Phrasea/Core/Configuration/Configuration.php @@ -212,6 +212,9 @@ class Configuration implements ConfigurationInterface private function writeCacheConfig($content) { $this->dumpFile($this->compiled, $content, 0600); + if(function_exists("opcache_invalidate")) { + opcache_invalidate($this->compiled); + } } private function isConfigFresh() diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticsearchSettingsFormType.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticsearchSettingsFormType.php index 2bd893309e..7874269643 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticsearchSettingsFormType.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticsearchSettingsFormType.php @@ -30,6 +30,14 @@ class ElasticsearchSettingsFormType extends AbstractType 'label' => 'ElasticSearch index name', 'constraints' => new NotBlank(), ]) + ->add('esSettingsDropIndexButton', 'button', [ + 'label' => "Drop index", + 'attr' => ['data-id' => "esSettingsDropIndexButton"] + ]) + ->add('esSettingsCreateIndexButton', 'button', [ + 'label' => "Create index", + 'attr' => ['data-id' => "esSettingsCreateIndexButton"] + ]) ->add('shards', 'integer', [ 'label' => 'Number of shards', 'constraints' => new Range(['min' => 1]), diff --git a/templates/web/admin/search-engine/elastic-search.html.twig b/templates/web/admin/search-engine/elastic-search.html.twig index 3f347614d4..d4fd99361f 100644 --- a/templates/web/admin/search-engine/elastic-search.html.twig +++ b/templates/web/admin/search-engine/elastic-search.html.twig @@ -1,3 +1,22 @@

        {{ 'ElasticSearch configuration' | trans }}

        {{ form(form) }} + + + +
        +
        + +
        Really drop index ?
        + +{% block javascript %} + + +{% endblock %} diff --git a/templates/web/admin/search-engine/phrasea.html.twig b/templates/web/admin/search-engine/phrasea.html.twig deleted file mode 100644 index 88871479d2..0000000000 --- a/templates/web/admin/search-engine/phrasea.html.twig +++ /dev/null @@ -1,21 +0,0 @@ - - -
        -
        - {{ 'Stemming' | trans }} - {{ 'Enable stemming' | trans }}  -
        -
        - {{ 'Default sort' | trans }} - -
        -
        - -
        -
        diff --git a/templates/web/admin/search-engine/sphinx-search.html.twig b/templates/web/admin/search-engine/sphinx-search.html.twig deleted file mode 100644 index 5ae9b85257..0000000000 --- a/templates/web/admin/search-engine/sphinx-search.html.twig +++ /dev/null @@ -1,26 +0,0 @@ -

        {{ 'SphinxSearch search-engine configuration' | trans }}

        - -
        -
        {{ 'Sphinx Search connection configuration' | trans }}
        - -
        {{ 'Sphinx Search server' | trans }}
        - - -
        {{ 'Sphinx Search RealTime server' | trans }}
        - - - -
        {{ 'Charset to use for indexation' | trans }}
        - {% for charset, charsetObject in charsets %} - {{ charsetObject.get_name() }} - {% endfor %} -

        -
        {{ 'Date fields available for search' | trans }}
        - {% for field in date_fields %} - {{ field }} - {% endfor %} - - -
        - - \ No newline at end of file diff --git a/www/scripts/apps/admin/main/views/rightPanel.js b/www/scripts/apps/admin/main/views/rightPanel.js index 89b15fc828..84f70b95d0 100644 --- a/www/scripts/apps/admin/main/views/rightPanel.js +++ b/www/scripts/apps/admin/main/views/rightPanel.js @@ -73,11 +73,11 @@ define([ event.preventDefault(); var $this = this; var link = $(event.currentTarget); - var url = link.attr('action') || 'GET'; + var url = link.attr('action'); if(url) { $.ajax({ - type: link.attr('method'), + type: link.attr('method') || 'GET', url: url, data: link.serializeArray(), success: function (data) { diff --git a/www/scripts/apps/admin/search-engine/views/es_config.js b/www/scripts/apps/admin/search-engine/views/es_config.js new file mode 100644 index 0000000000..23ba10f4ee --- /dev/null +++ b/www/scripts/apps/admin/search-engine/views/es_config.js @@ -0,0 +1,39 @@ +function searchEngineConfigurationFormInit(indexExists) { + $("#dropIndexConfirmDialog").dialog({ + autoOpen: false, + modal: true, + title: "Drop index", + buttons: [ + { + text: "Ok", + click: function () { + $("#ElasticSearchDropIndexForm").submit(); + $("#dropIndexConfirmDialog").dialog("close"); + } + }, + { + text: "Cancel", + click: function () { + $("#dropIndexConfirmDialog").dialog("close"); + } + } + ] + }); + + if(indexExists) { + $("BUTTON[data-id=esSettingsCreateIndexButton]").hide(); + $("BUTTON[data-id=esSettingsDropIndexButton]").show().bind("click", function (event) { + event.preventDefault(); + $("#dropIndexConfirmDialog").dialog("open"); + return false; + }); + } + else { + $("BUTTON[data-id=esSettingsDropIndexButton]").hide(); + $("BUTTON[data-id=esSettingsCreateIndexButton]").show().bind("click", function (event) { + event.preventDefault(); + $("#ElasticSearchCreateIndexForm").submit(); + return false; + }); + } +} From 2e3edee2316f11cc63be95aa9a31c321c2bd3555 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 7 Apr 2016 15:49:32 +0200 Subject: [PATCH 208/383] PHRAS-1061 #time 1h moved "index" buttons near "index name" field --- .../search-engine/elastic-search.html.twig | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/templates/web/admin/search-engine/elastic-search.html.twig b/templates/web/admin/search-engine/elastic-search.html.twig index d4fd99361f..e6eaa97148 100644 --- a/templates/web/admin/search-engine/elastic-search.html.twig +++ b/templates/web/admin/search-engine/elastic-search.html.twig @@ -1,6 +1,29 @@

        {{ 'ElasticSearch configuration' | trans }}

        -{{ form(form) }} +{{ form_start(form) }} + {{ form_errors(form) }} + + {{ form_row(form.host) }} + {{ form_row(form.port) }} + +
        + {{ form_label(form.indexName) }} + {{ form_errors(form.indexName) }} + {{ form_widget(form.indexName) }} + + {{ form_label(form.esSettingsDropIndexButton) }} + {{ form_widget(form.esSettingsDropIndexButton) }} + + {{ form_label(form.esSettingsCreateIndexButton) }} + {{ form_widget(form.esSettingsCreateIndexButton) }} +
        + + {{ form_row(form.shards) }} + {{ form_row(form.replicas) }} + {{ form_row(form.minScore) }} + {{ form_row(form.highlight) }} + {{ form_row(form.save) }} +{{ form_end(form) }}
        From 66df83dfc90a01983ba8ea2c05006e0ce84a21c4 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Thu, 7 Apr 2016 17:58:24 +0200 Subject: [PATCH 209/383] PHRAS-1046 - fix cgu par database listing in account access --- templates/web/account/access.html.twig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/templates/web/account/access.html.twig b/templates/web/account/access.html.twig index 96a2d7bf7c..928153a67a 100644 --- a/templates/web/account/access.html.twig +++ b/templates/web/account/access.html.twig @@ -152,9 +152,7 @@
      {{ TOU['value'] }}
      {{ TOU['value']|raw }}
      From 4647824355b753379f0444f9ed8faf4eec39894f Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 12 May 2016 15:45:40 +0200 Subject: [PATCH 263/383] PHRAS-1101_THMB-TRAIN-IN-PREVIEW #time 3h fix : preview mode is ok when some collections are unchecked --- lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php index ac682970c8..9bc7ca7f72 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php +++ b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php @@ -14,6 +14,7 @@ namespace Alchemy\Phrasea\SearchEngine; use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Authentication\ACLProvider; use Alchemy\Phrasea\Authentication\Authenticator; +use Alchemy\Phrasea\Collection\CollectionRepository; use Alchemy\Phrasea\Collection\Reference\CollectionReferenceCollection; use Assert\Assertion; use Symfony\Component\HttpFoundation\Request; @@ -74,10 +75,12 @@ class SearchEngineOptions $collections = []; foreach ($references->groupByDataboxIdAndCollectionId() as $databoxId => $indexes) { + /** @var CollectionRepository $repository */ $repository = $app['repo.collections-registry']->getRepositoryByDatabox($databoxId); foreach ($indexes as $collectionId => $index) { - $collections[] = $repository->find($collectionId); + $coll = $repository->find($collectionId); + $collections[$coll->get_base_id()] = $coll; } } From 0474703d622bfc92cd3c17be7e0de68f70ceed63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 18 Apr 2016 11:36:03 +0200 Subject: [PATCH 264/383] Change Api SearchController to use Fractal --- .../Controller/Api/SearchController.php | 50 +++++++---------- .../Phrasea/Search/SearchResultView.php | 34 ++++++++++++ .../Phrasea/Search/V2SearchTransformer.php | 54 +++++++++++++++++++ 3 files changed, 107 insertions(+), 31 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Search/SearchResultView.php create mode 100644 lib/Alchemy/Phrasea/Search/V2SearchTransformer.php diff --git a/lib/Alchemy/Phrasea/Controller/Api/SearchController.php b/lib/Alchemy/Phrasea/Controller/Api/SearchController.php index e1113b3919..e9a654cf9e 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/SearchController.php +++ b/lib/Alchemy/Phrasea/Controller/Api/SearchController.php @@ -12,10 +12,15 @@ namespace Alchemy\Phrasea\Controller\Api; use Alchemy\Phrasea\Controller\Controller; use Alchemy\Phrasea\Model\Manipulator\UserManipulator; +use Alchemy\Phrasea\Search\SearchResultView; +use Alchemy\Phrasea\Search\V2SearchTransformer; use Alchemy\Phrasea\SearchEngine\SearchEngineInterface; use Alchemy\Phrasea\SearchEngine\SearchEngineLogger; use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; use Alchemy\Phrasea\SearchEngine\SearchEngineResult; +use League\Fractal\Manager; +use League\Fractal\Resource\Item; +use League\Fractal\Serializer\ArraySerializer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -28,25 +33,21 @@ class SearchController extends Controller */ public function searchAction(Request $request) { - list($ret, $search_result) = $this->searchAndFormatEngineResult($request); + $fractal = new Manager(); + $fractal->setSerializer(new ArraySerializer()); + $fractal->parseIncludes([]); - /** @var SearchEngineResult $search_result */ - $ret['search_type'] = $search_result->getOptions()->getSearchType(); - $ret['results'] = []; - - foreach ($search_result->getResults() as $record) { - $ret['results'][] = [ - 'databox_id' => $record->getDataboxId(), - 'record_id' => $record->getRecordId(), - 'collection_id' => $record->getCollectionId(), - 'version' => $record->getUpdated()->getTimestamp(), - ]; - } + $searchView = new SearchResultView($this->doSearch($request)); + $ret = $fractal->createData(new Item($searchView, new V2SearchTransformer()))->toArray(); return Result::create($request, $ret)->createResponse(); } - private function searchAndFormatEngineResult(Request $request) + /** + * @param Request $request + * @return SearchEngineResult + */ + private function doSearch(Request $request) { $options = SearchEngineOptions::fromRequest($this->app, $request); $options->setFirstResult($request->get('offset_start') ?: 0); @@ -55,9 +56,9 @@ class SearchController extends Controller $query = (string) $request->get('query'); $this->getSearchEngine()->resetCache(); - $search_result = $this->getSearchEngine()->query($query, $options); + $result = $this->getSearchEngine()->query($query, $options); - $this->getUserManipulator()->logQuery($this->getAuthenticatedUser(), $search_result->getQuery()); + $this->getUserManipulator()->logQuery($this->getAuthenticatedUser(), $result->getQuery()); foreach ($options->getDataboxes() as $databox) { $colls = array_map(function (\collection $collection) { @@ -67,25 +68,12 @@ class SearchController extends Controller })); $this->getSearchEngineLogger() - ->log($databox, $search_result->getQuery(), $search_result->getTotal(), $colls); + ->log($databox, $result->getQuery(), $result->getTotal(), $colls); } $this->getSearchEngine()->clearCache(); - $ret = [ - 'offset_start' => $options->getFirstResult(), - 'per_page' => $options->getMaxResults(), - 'available_results' => $search_result->getAvailable(), - 'total_results' => $search_result->getTotal(), - 'error' => (string)$search_result->getError(), - 'warning' => (string)$search_result->getWarning(), - 'query_time' => $search_result->getDuration(), - 'search_indexes' => $search_result->getIndexes(), - 'facets' => $search_result->getFacets(), - 'results' => [], - ]; - - return [$ret, $search_result]; + return $result; } /** diff --git a/lib/Alchemy/Phrasea/Search/SearchResultView.php b/lib/Alchemy/Phrasea/Search/SearchResultView.php new file mode 100644 index 0000000000..47c35e0ab3 --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/SearchResultView.php @@ -0,0 +1,34 @@ +result = $result; + } + + /** + * @return SearchEngineResult + */ + public function getResult() + { + return $this->result; + } +} diff --git a/lib/Alchemy/Phrasea/Search/V2SearchTransformer.php b/lib/Alchemy/Phrasea/Search/V2SearchTransformer.php new file mode 100644 index 0000000000..1600302536 --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/V2SearchTransformer.php @@ -0,0 +1,54 @@ + $searchView->getResult()->getOptions()->getFirstResult(), + 'per_page' => $searchView->getResult()->getOptions()->getMaxResults(), + 'available_results' => $searchView->getResult()->getAvailable(), + 'total_results' => $searchView->getResult()->getTotal(), + 'error' => (string)$searchView->getResult()->getError(), + 'warning' => (string)$searchView->getResult()->getWarning(), + 'query_time' => $searchView->getResult()->getDuration(), + 'search_indexes' => $searchView->getResult()->getIndexes(), + 'facets' => $searchView->getResult()->getFacets(), + 'search_type' => $searchView->getResult()->getOptions()->getSearchType(), + 'results' => $this->listResults($searchView->getResult()->getResults()), + ]; + } + + /** + * @param RecordInterface[] $results + * @return array + */ + public function listResults($results) + { + $data = []; + + foreach ($results as $record) { + $data[] = [ + 'databox_id' => $record->getDataboxId(), + 'record_id' => $record->getRecordId(), + 'collection_id' => $record->getCollectionId(), + 'version' => $record->getUpdated()->getTimestamp(), + ]; + } + + return $data; + } +} From 0832343c668455b9eb1754983e0cf7856b29de27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 18 Apr 2016 19:25:59 +0200 Subject: [PATCH 265/383] WIP --- .../Controller/Api/SearchController.php | 2 +- .../Phrasea/Controller/Api/V1Controller.php | 196 +++++++++++++----- .../Phrasea/Fractal/ArraySerializer.php | 49 +++++ lib/Alchemy/Phrasea/Search/CaptionAware.php | 35 ++++ lib/Alchemy/Phrasea/Search/CaptionView.php | 32 +++ .../Phrasea/Search/RecordTransformer.php | 109 ++++++++++ lib/Alchemy/Phrasea/Search/RecordView.php | 53 +++++ .../Phrasea/Search/SearchResultView.php | 49 +++++ .../Phrasea/Search/StoryTransformer.php | 109 ++++++++++ lib/Alchemy/Phrasea/Search/StoryView.php | 63 ++++++ .../Phrasea/Search/SubdefTransformer.php | 21 ++ lib/Alchemy/Phrasea/Search/SubdefView.php | 32 +++ lib/Alchemy/Phrasea/Search/SubdefsAware.php | 52 +++++ .../Search/TechnicalDataTransformer.php | 25 +++ .../Phrasea/Search/TechnicalDataView.php | 34 +++ .../V1SearchCompositeResultTransformer.php | 49 +++++ .../V1SearchRecordsResultTransformer.php | 29 +++ .../Search/V1SearchResultTransformer.php | 31 +++ .../Phrasea/Search/V1SearchTransformer.php | 44 ++++ .../Phrasea/Search/V2SearchTransformer.php | 20 +- 20 files changed, 969 insertions(+), 65 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Fractal/ArraySerializer.php create mode 100644 lib/Alchemy/Phrasea/Search/CaptionAware.php create mode 100644 lib/Alchemy/Phrasea/Search/CaptionView.php create mode 100644 lib/Alchemy/Phrasea/Search/RecordTransformer.php create mode 100644 lib/Alchemy/Phrasea/Search/RecordView.php create mode 100644 lib/Alchemy/Phrasea/Search/StoryTransformer.php create mode 100644 lib/Alchemy/Phrasea/Search/StoryView.php create mode 100644 lib/Alchemy/Phrasea/Search/SubdefTransformer.php create mode 100644 lib/Alchemy/Phrasea/Search/SubdefView.php create mode 100644 lib/Alchemy/Phrasea/Search/SubdefsAware.php create mode 100644 lib/Alchemy/Phrasea/Search/TechnicalDataTransformer.php create mode 100644 lib/Alchemy/Phrasea/Search/TechnicalDataView.php create mode 100644 lib/Alchemy/Phrasea/Search/V1SearchCompositeResultTransformer.php create mode 100644 lib/Alchemy/Phrasea/Search/V1SearchRecordsResultTransformer.php create mode 100644 lib/Alchemy/Phrasea/Search/V1SearchResultTransformer.php create mode 100644 lib/Alchemy/Phrasea/Search/V1SearchTransformer.php diff --git a/lib/Alchemy/Phrasea/Controller/Api/SearchController.php b/lib/Alchemy/Phrasea/Controller/Api/SearchController.php index e9a654cf9e..04a4f4e742 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/SearchController.php +++ b/lib/Alchemy/Phrasea/Controller/Api/SearchController.php @@ -11,6 +11,7 @@ namespace Alchemy\Phrasea\Controller\Api; use Alchemy\Phrasea\Controller\Controller; +use Alchemy\Phrasea\Fractal\ArraySerializer; use Alchemy\Phrasea\Model\Manipulator\UserManipulator; use Alchemy\Phrasea\Search\SearchResultView; use Alchemy\Phrasea\Search\V2SearchTransformer; @@ -20,7 +21,6 @@ use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; use Alchemy\Phrasea\SearchEngine\SearchEngineResult; use League\Fractal\Manager; use League\Fractal\Resource\Item; -use League\Fractal\Serializer\ArraySerializer; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index c6d3a068a2..7ea64a89cc 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -32,6 +32,7 @@ use Alchemy\Phrasea\Core\Version; use Alchemy\Phrasea\Feed\Aggregate; use Alchemy\Phrasea\Feed\FeedInterface; use Alchemy\Phrasea\Form\Login\PhraseaRenewPasswordForm; +use Alchemy\Phrasea\Fractal\ArraySerializer; use Alchemy\Phrasea\Model\Entities\ApiOauthToken; use Alchemy\Phrasea\Model\Entities\Basket; use Alchemy\Phrasea\Model\Entities\BasketElement; @@ -54,15 +55,24 @@ use Alchemy\Phrasea\Model\Repositories\FeedRepository; use Alchemy\Phrasea\Model\Repositories\LazaretFileRepository; use Alchemy\Phrasea\Model\Repositories\TaskRepository; use Alchemy\Phrasea\Record\RecordReferenceCollection; +use Alchemy\Phrasea\Search\RecordTransformer; +use Alchemy\Phrasea\Search\RecordView; +use Alchemy\Phrasea\Search\SearchResultView; +use Alchemy\Phrasea\Search\StoryTransformer; +use Alchemy\Phrasea\Search\StoryView; +use Alchemy\Phrasea\Search\SubdefTransformer; +use Alchemy\Phrasea\Search\V1SearchCompositeResultTransformer; +use Alchemy\Phrasea\Search\V1SearchRecordsResultTransformer; +use Alchemy\Phrasea\Search\V1SearchResultTransformer; use Alchemy\Phrasea\SearchEngine\SearchEngineInterface; use Alchemy\Phrasea\SearchEngine\SearchEngineLogger; use Alchemy\Phrasea\SearchEngine\SearchEngineOptions; use Alchemy\Phrasea\SearchEngine\SearchEngineResult; -use Alchemy\Phrasea\SearchEngine\SearchEngineSuggestion; use Alchemy\Phrasea\Status\StatusStructure; use Alchemy\Phrasea\TaskManager\LiveInformation; use Alchemy\Phrasea\Utilities\NullableDateTime; use Doctrine\ORM\EntityManager; +use League\Fractal\Resource\Item; use Symfony\Component\Form\Form; use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\Request; @@ -1035,24 +1045,18 @@ class V1Controller extends Controller */ public function searchAction(Request $request) { - list($ret, $search_result) = $this->prepareSearchRequest($request); + $fractal = new \League\Fractal\Manager(); + $fractal->setSerializer(new ArraySerializer()); + $fractal->parseIncludes($this->resolveSearchIncludes($request)); - $records = []; - $stories = []; + $searchView = $this->buildSearchView($this->doSearch($request)); - /** @var SearchEngineResult $search_result */ - foreach ($search_result->getResults() as $record) { - if ($record->isStory()) { - $stories[] = $record; - } else { - $records[] = $record; - } - } + $recordTransformer = new RecordTransformer(); + $storyTransformer = new StoryTransformer(new SubdefTransformer(), $recordTransformer); + $compositeTransformer = new V1SearchCompositeResultTransformer($recordTransformer, $storyTransformer); + $searchTransformer = new V1SearchResultTransformer($compositeTransformer); - $ret['results'] = [ - 'records' => $this->listRecords($request, $records), - 'stories' => $this->listStories($request, $stories), - ]; + $ret = $fractal->createData(new Item($searchView, $searchTransformer))->toArray(); return Result::create($request, $ret)->createResponse(); } @@ -1068,33 +1072,141 @@ class V1Controller extends Controller */ public function searchRecordsAction(Request $request) { - list($ret, $search_result) = $this->prepareSearchRequest($request); + $fractal = new \League\Fractal\Manager(); + $fractal->setSerializer(new ArraySerializer()); + $fractal->parseIncludes($this->resolveSearchRecordsIncludes($request)); - /** @var SearchEngineResult $search_result */ - foreach ($search_result->getResults() as $es_record) { - try { - $record = new \record_adapter($this->app, $es_record->getDataboxId(), $es_record->getRecordId()); - } catch (\Exception $e) { - continue; - } + $searchView = $this->buildSearchRecordsView($this->doSearch($request)); - $ret['results'][] = $this->listRecord($request, $record); - } + $searchTransformer = new V1SearchRecordsResultTransformer(new RecordTransformer()); + + $ret = $fractal->createData(new Item($searchView, $searchTransformer))->toArray(); return Result::create($request, $ret)->createResponse(); } - private function prepareSearchRequest(Request $request) + /** + * @param SearchEngineResult $result + * @return SearchResultView + */ + private function buildSearchView(SearchEngineResult $result) + { + + $references = new RecordReferenceCollection($result->getResults()); + + $records = []; + $stories = []; + + foreach ($references->toRecords($this->getApplicationBox()) as $record) { + if ($record->isStory()) { + $stories[] = $record; + } else { + $records[] = $record; + } + } + + $resultView = new SearchResultView($result); + + if ($stories) { + $storyViews = []; + + foreach ($stories as $story) { + $storyViews[] = new StoryView($story); + } + + $resultView->setStories($storyViews); + } + + if ($records) { + $recordViews = []; + + foreach ($records as $record) { + $recordViews[] = new RecordView($record); + } + + $resultView->setRecords($recordViews); + } + + return $resultView; + } + + /** + * @param SearchEngineResult $result + * @return SearchResultView + */ + private function buildSearchRecordsView(SearchEngineResult $result) + { + $references = new RecordReferenceCollection($result->getResults()); + + $recordViews = []; + + foreach ($references->toRecords($this->getApplicationBox()) as $record) { + $recordViews[] = new RecordView($record); + } + + $resultView = new SearchResultView($result); + $resultView->setRecords($recordViews); + + return $resultView; + } + + /** + * Returns requested includes + * + * @param Request $request + * @return string[] + */ + private function resolveSearchIncludes(Request $request) + { + if (!$request->attributes->get('_extended', false)) { + return []; + } + + return [ + 'results.stories.records.subdefs', + 'results.stories.records.metadata', + 'results.stories.records.caption', + 'results.stories.records.status', + 'results.records.subdefs', + 'results.records.metadata', + 'results.records.caption', + 'results.records.status', + ]; + } + + /** + * Returns requested includes + * + * @param Request $request + * @return string[] + */ + private function resolveSearchRecordsIncludes(Request $request) + { + if (!$request->attributes->get('_extended', false)) { + return []; + } + + return [ + 'results.subdefs', + 'results.metadata', + 'results.caption', + 'results.status', + ]; + } + + /** + * @param Request $request + * @return SearchEngineResult + */ + private function doSearch(Request $request) { $options = SearchEngineOptions::fromRequest($this->app, $request); + $options->setFirstResult((int)($request->get('offset_start') ?: 0)); + $options->setMaxResults((int)$request->get('per_page') ?: 10); - $options->setFirstResult((int) ($request->get('offset_start') ?: 0)); - $options->setMaxResults((int) $request->get('per_page') ?: 10); - - $query = (string) $request->get('query'); $this->getSearchEngine()->resetCache(); - $search_result = $this->getSearchEngine()->query($query, $options); + $search_result = $this->getSearchEngine()->query((string)$request->get('query'), $options); $this->getUserManipulator()->logQuery($this->getAuthenticatedUser(), $search_result->getQuery()); @@ -1111,25 +1223,7 @@ class V1Controller extends Controller $this->getSearchEngine()->clearCache(); - $ret = [ - 'offset_start' => $options->getFirstResult(), - 'per_page' => $options->getMaxResults(), - 'available_results' => $search_result->getAvailable(), - 'total_results' => $search_result->getTotal(), - 'error' => (string)$search_result->getError(), - 'warning' => (string)$search_result->getWarning(), - 'query_time' => $search_result->getDuration(), - 'search_indexes' => $search_result->getIndexes(), - 'suggestions' => array_map( - function (SearchEngineSuggestion $suggestion) { - return $suggestion->toArray(); - }, $search_result->getSuggestions()->toArray()), - 'facets' => $search_result->getFacets(), - 'results' => [], - 'query' => $search_result->getQuery(), - ]; - - return [$ret, $search_result]; + return $search_result; } /** diff --git a/lib/Alchemy/Phrasea/Fractal/ArraySerializer.php b/lib/Alchemy/Phrasea/Fractal/ArraySerializer.php new file mode 100644 index 0000000000..5ea77600f2 --- /dev/null +++ b/lib/Alchemy/Phrasea/Fractal/ArraySerializer.php @@ -0,0 +1,49 @@ +caption = $caption; + } + + /** + * @return CaptionView + */ + public function getCaption() + { + return $this->caption; + } +} diff --git a/lib/Alchemy/Phrasea/Search/CaptionView.php b/lib/Alchemy/Phrasea/Search/CaptionView.php new file mode 100644 index 0000000000..a31c584613 --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/CaptionView.php @@ -0,0 +1,32 @@ +caption = $caption; + } + + /** + * @return \caption_record + */ + public function getCaption() + { + return $this->caption; + } +} diff --git a/lib/Alchemy/Phrasea/Search/RecordTransformer.php b/lib/Alchemy/Phrasea/Search/RecordTransformer.php new file mode 100644 index 0000000000..e1948dac14 --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/RecordTransformer.php @@ -0,0 +1,109 @@ +subdefTransformer = $subdefTransformer; + $this->technicalDataTransformer = $technicalDataTransformer; + } + + public function transform(RecordView $recordView) + { + $record = $recordView->getRecord(); + + return [ + 'databox_id' => $record->getDataboxId(), + 'record_id' => $record->getRecordId(), + 'mime_type' => $record->getMimeType(), + 'title' => $record->get_title(), + 'original_name' => $record->get_original_name(), + 'updated_on' => $record->getUpdated()->format(DATE_ATOM), + 'created_on' => $record->getCreated()->format(DATE_ATOM), + 'collection_id' => $record->getCollectionId(), + 'base_id' => $record->getBaseId(), + 'sha256' => $record->getSha256(), + 'phrasea_type' => $record->getType(), + 'uuid' => $record->getUuid(), + ]; + } + + public function includeThumbnail(RecordView $recordView) + { + return $this->item($recordView->getSubdef('thumbnail'), $this->subdefTransformer); + } + + public function includeTechnicalInformations(RecordView $recordView) + { + return $this->collection($recordView->getTechnicalDataView()->getDataSet(), $this->technicalDataTransformer); + } + + public function includeSubdefs(RecordView $recordView) + { + return $this->collection($recordView->getSubdefs(), $this->subdefTransformer); + } + + public function includeMetadata(RecordView $recordView) + { + $ret = []; + + foreach ($recordView->getCaption()->getCaption()->get_fields() as $field) { + $databox_field = $field->get_databox_field(); + + $fieldData = [ + 'meta_structure_id' => $field->get_meta_struct_id(), + 'name' => $field->get_name(), + 'labels' => [ + 'fr' => $databox_field->get_label('fr'), + 'en' => $databox_field->get_label('en'), + 'de' => $databox_field->get_label('de'), + 'nl' => $databox_field->get_label('nl'), + ], + ]; + + foreach ($field->get_values() as $value) { + $data = [ + 'meta_id' => $value->getId(), + 'value' => $value->getValue(), + ]; + + $ret[] = array_replace($fieldData, $data); + } + } + + return $this->collection($recordView->getCaption(), ) + } + + public function includeStatus(RecordView $recordView) + { + } + + public function includeCaption(RecordView $recordView) + { + } +} diff --git a/lib/Alchemy/Phrasea/Search/RecordView.php b/lib/Alchemy/Phrasea/Search/RecordView.php new file mode 100644 index 0000000000..aa97a210bd --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/RecordView.php @@ -0,0 +1,53 @@ +record = $record; + } + + /** + * @return \record_adapter + */ + public function getRecord() + { + return $this->record; + } + + public function setTechnicalDataView(TechnicalDataView $technicalDataView) + { + $this->technicalDataView = $technicalDataView; + } + + /** + * @return TechnicalDataView + */ + public function getTechnicalDataView() + { + return $this->technicalDataView; + } +} diff --git a/lib/Alchemy/Phrasea/Search/SearchResultView.php b/lib/Alchemy/Phrasea/Search/SearchResultView.php index 47c35e0ab3..e4a80edc24 100644 --- a/lib/Alchemy/Phrasea/Search/SearchResultView.php +++ b/lib/Alchemy/Phrasea/Search/SearchResultView.php @@ -11,6 +11,7 @@ namespace Alchemy\Phrasea\Search; use Alchemy\Phrasea\SearchEngine\SearchEngineResult; +use Assert\Assertion; class SearchResultView { @@ -19,6 +20,16 @@ class SearchResultView */ private $result; + /** + * @var StoryView[] + */ + private $stories = []; + + /** + * @var RecordView[] + */ + private $records = []; + public function __construct(SearchEngineResult $result) { $this->result = $result; @@ -31,4 +42,42 @@ class SearchResultView { return $this->result; } + + /** + * @param StoryView[] $stories + * @return void + */ + public function setStories($stories) + { + Assertion::allIsInstanceOf($this->stories, StoryView::class); + + $this->stories = $stories instanceof \Traversable ? iterator_to_array($stories, false) : array_values($stories); + } + + /** + * @return StoryView[] + */ + public function getStories() + { + return $this->stories; + } + + /** + * @param RecordView[] $records + * @return void + */ + public function setRecords($records) + { + Assertion::allIsInstanceOf($records, RecordView::class); + + $this->records = $records instanceof \Traversable ? iterator_to_array($records, false) : array_values($records); + } + + /** + * @return RecordView[] + */ + public function getRecords() + { + return $this->records; + } } diff --git a/lib/Alchemy/Phrasea/Search/StoryTransformer.php b/lib/Alchemy/Phrasea/Search/StoryTransformer.php new file mode 100644 index 0000000000..df73f5580d --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/StoryTransformer.php @@ -0,0 +1,109 @@ +subdefTransformer = $subdefTransformer; + $this->recordTransformer = $recordTransformer; + } + + public function transform(StoryView $storyView) + { + $story = $storyView->getStory(); + + return [ + '@entity@' => 'http://api.phraseanet.com/api/objects/story', + 'databox_id' => $story->getDataboxId(), + 'story_id' => $story->getRecordId(), + 'updated_on' => NullableDateTime::format($story->getUpdated()), + 'created_on' => NullableDateTime::format($story->getUpdated()), + 'collection_id' => $story->getCollectionId(), + 'base_id' => $story->getBaseId(), + 'uuid' => $story->getUuid(), + ]; + } + + public function includeThumbnail(StoryView $storyView) + { + return $this->item($storyView->getSubdef('thumbnail'), $this->subdefTransformer); + } + + public function includeMetadatas(StoryView $storyView) + { + return $this->item($storyView->getCaption(), $this->getCaptionTransformer()); + } + + public function includeRecords(StoryView $storyView) + { + return $this->collection($storyView->getChildren(), $this->recordTransformer); + } + + /** + * @return \Closure + */ + private function getCaptionTransformer() + { + /** + * @param \caption_field[] $fields + * @param string $dcField + * @return string|null + */ + $format = function ($fields, $dcField) { + return isset($fields[$dcField]) ? $fields[$dcField]->get_serialized_values() : null; + }; + + return function (CaptionView $captionView) use ($format) { + $caption = $captionView->getCaption()->getDCFields(); + + return [ + '@entity@' => 'http://api.phraseanet.com/api/objects/story-metadata-bag', + 'dc:contributor' => $format($caption, \databox_Field_DCESAbstract::Contributor), + 'dc:coverage' => $format($caption, \databox_Field_DCESAbstract::Coverage), + 'dc:creator' => $format($caption, \databox_Field_DCESAbstract::Creator), + 'dc:date' => $format($caption, \databox_Field_DCESAbstract::Date), + 'dc:description' => $format($caption, \databox_Field_DCESAbstract::Description), + 'dc:format' => $format($caption, \databox_Field_DCESAbstract::Format), + 'dc:identifier' => $format($caption, \databox_Field_DCESAbstract::Identifier), + 'dc:language' => $format($caption, \databox_Field_DCESAbstract::Language), + 'dc:publisher' => $format($caption, \databox_Field_DCESAbstract::Publisher), + 'dc:relation' => $format($caption, \databox_Field_DCESAbstract::Relation), + 'dc:rights' => $format($caption, \databox_Field_DCESAbstract::Rights), + 'dc:source' => $format($caption, \databox_Field_DCESAbstract::Source), + 'dc:subject' => $format($caption, \databox_Field_DCESAbstract::Subject), + 'dc:title' => $format($caption, \databox_Field_DCESAbstract::Title), + 'dc:type' => $format($caption, \databox_Field_DCESAbstract::Type), + ]; + }; + } +} diff --git a/lib/Alchemy/Phrasea/Search/StoryView.php b/lib/Alchemy/Phrasea/Search/StoryView.php new file mode 100644 index 0000000000..30aebafce3 --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/StoryView.php @@ -0,0 +1,63 @@ +story = $story; + } + + /** + * @return \record_adapter + */ + public function getStory() + { + return $this->story; + } + + /** + * @param RecordView[] $children + */ + public function setChildren($children) + { + Assertion::allIsInstanceOf($children, RecordView::class); + + $this->children = $children instanceof \Traversable ? iterator_to_array($children, false) : array_values($children); + } + + /** + * @return RecordView[] + */ + public function getChildren() + { + return $this->children; + } +} diff --git a/lib/Alchemy/Phrasea/Search/SubdefTransformer.php b/lib/Alchemy/Phrasea/Search/SubdefTransformer.php new file mode 100644 index 0000000000..24cdee94d9 --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/SubdefTransformer.php @@ -0,0 +1,21 @@ +subdef = $subdef; + } + + /** + * @return \media_subdef + */ + public function getSubdef() + { + return $this->subdef; + } +} diff --git a/lib/Alchemy/Phrasea/Search/SubdefsAware.php b/lib/Alchemy/Phrasea/Search/SubdefsAware.php new file mode 100644 index 0000000000..9edf617552 --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/SubdefsAware.php @@ -0,0 +1,52 @@ +subdefs = []; + + foreach ($subdefs as $subdef) { + $this->subdefs[$subdef->getSubdef()->get_name()] = $subdef; + } + } + + /** + * @param string $name + * @return SubdefView + */ + public function getSubdef($name) + { + return $this->subdefs[$name]; + } + + /** + * @return SubdefView + */ + public function getSubdefs() + { + return $this->subdefs; + } +} diff --git a/lib/Alchemy/Phrasea/Search/TechnicalDataTransformer.php b/lib/Alchemy/Phrasea/Search/TechnicalDataTransformer.php new file mode 100644 index 0000000000..6b67aba3b5 --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/TechnicalDataTransformer.php @@ -0,0 +1,25 @@ + $technicalData->getName(), + 'value' => $technicalData->getValue(), + ]; + } +} diff --git a/lib/Alchemy/Phrasea/Search/TechnicalDataView.php b/lib/Alchemy/Phrasea/Search/TechnicalDataView.php new file mode 100644 index 0000000000..16b00cf259 --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/TechnicalDataView.php @@ -0,0 +1,34 @@ +dataSet = $dataSet; + } + + /** + * @return TechnicalDataSet + */ + public function getDataSet() + { + return $this->dataSet; + } +} diff --git a/lib/Alchemy/Phrasea/Search/V1SearchCompositeResultTransformer.php b/lib/Alchemy/Phrasea/Search/V1SearchCompositeResultTransformer.php new file mode 100644 index 0000000000..f8b46894df --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/V1SearchCompositeResultTransformer.php @@ -0,0 +1,49 @@ +recordTransformer = $recordTransformer; + $this->storyTransformer = $storyTransformer; + } + + public function transform() + { + return []; + } + + public function includeRecords(SearchResultView $resultView) + { + return $this->collection($resultView->getRecords(), $this->recordTransformer); + } + + public function includeStories(SearchResultView $resultView) + { + return $this->collection($resultView->getStories(), $this->storyTransformer); + } +} diff --git a/lib/Alchemy/Phrasea/Search/V1SearchRecordsResultTransformer.php b/lib/Alchemy/Phrasea/Search/V1SearchRecordsResultTransformer.php new file mode 100644 index 0000000000..b731ac2495 --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/V1SearchRecordsResultTransformer.php @@ -0,0 +1,29 @@ +recordTransformer = $recordTransformer; + } + + public function includeResults(SearchResultView $resultView) + { + return $this->collection($resultView->getRecords(), $this->recordTransformer); + } +} diff --git a/lib/Alchemy/Phrasea/Search/V1SearchResultTransformer.php b/lib/Alchemy/Phrasea/Search/V1SearchResultTransformer.php new file mode 100644 index 0000000000..1e391eb288 --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/V1SearchResultTransformer.php @@ -0,0 +1,31 @@ +transformer = $transformer; + } + + public function includeResults(SearchResultView $resultView) + { + return $this->item($resultView, $this->transformer); + } +} diff --git a/lib/Alchemy/Phrasea/Search/V1SearchTransformer.php b/lib/Alchemy/Phrasea/Search/V1SearchTransformer.php new file mode 100644 index 0000000000..af60018284 --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/V1SearchTransformer.php @@ -0,0 +1,44 @@ +getResult(); + + return [ + 'offset_start' => $result->getOptions()->getFirstResult(), + 'per_page' => $result->getOptions()->getMaxResults(), + 'available_results' => $result->getAvailable(), + 'total_results' => $result->getTotal(), + 'error' => (string)$result->getError(), + 'warning' => (string)$result->getWarning(), + 'query_time' => $result->getDuration(), + 'search_indexes' => $result->getIndexes(), + 'suggestions' => array_map( + function (SearchEngineSuggestion $suggestion) { + return $suggestion->toArray(); + }, $result->getSuggestions()->toArray()), + 'facets' => $result->getFacets(), + 'query' => $result->getQuery(), + ]; + } + + abstract public function includeResults(SearchResultView $resultView); +} diff --git a/lib/Alchemy/Phrasea/Search/V2SearchTransformer.php b/lib/Alchemy/Phrasea/Search/V2SearchTransformer.php index 1600302536..26c518f2ea 100644 --- a/lib/Alchemy/Phrasea/Search/V2SearchTransformer.php +++ b/lib/Alchemy/Phrasea/Search/V2SearchTransformer.php @@ -15,6 +15,9 @@ use League\Fractal\TransformerAbstract; class V2SearchTransformer extends TransformerAbstract { + protected $availableIncludes = ['results']; + protected $defaultIncludes = ['results']; + public function transform(SearchResultView $searchView) { return [ @@ -28,27 +31,18 @@ class V2SearchTransformer extends TransformerAbstract 'search_indexes' => $searchView->getResult()->getIndexes(), 'facets' => $searchView->getResult()->getFacets(), 'search_type' => $searchView->getResult()->getOptions()->getSearchType(), - 'results' => $this->listResults($searchView->getResult()->getResults()), ]; } - /** - * @param RecordInterface[] $results - * @return array - */ - public function listResults($results) + public function includeResults(SearchResultView $searchView) { - $data = []; - - foreach ($results as $record) { - $data[] = [ + return $this->collection($searchView->getResult()->getResults(), function (RecordInterface $record) { + return [ 'databox_id' => $record->getDataboxId(), 'record_id' => $record->getRecordId(), 'collection_id' => $record->getCollectionId(), 'version' => $record->getUpdated()->getTimestamp(), ]; - } - - return $data; + }); } } From 0030e51561ba8fbfcedca7ee4675be0bc36adecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 19 Apr 2016 11:04:55 +0200 Subject: [PATCH 266/383] WIP RecordTransformer --- .../Phrasea/Controller/Api/V1Controller.php | 9 ++- lib/Alchemy/Phrasea/Search/CaptionView.php | 29 ++++++++++ .../Phrasea/Search/RecordTransformer.php | 57 ++++++++++++++----- 3 files changed, 79 insertions(+), 16 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index 7ea64a89cc..391ba31bf4 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -61,6 +61,7 @@ use Alchemy\Phrasea\Search\SearchResultView; use Alchemy\Phrasea\Search\StoryTransformer; use Alchemy\Phrasea\Search\StoryView; use Alchemy\Phrasea\Search\SubdefTransformer; +use Alchemy\Phrasea\Search\TechnicalDataTransformer; use Alchemy\Phrasea\Search\V1SearchCompositeResultTransformer; use Alchemy\Phrasea\Search\V1SearchRecordsResultTransformer; use Alchemy\Phrasea\Search\V1SearchResultTransformer; @@ -1051,8 +1052,9 @@ class V1Controller extends Controller $searchView = $this->buildSearchView($this->doSearch($request)); - $recordTransformer = new RecordTransformer(); - $storyTransformer = new StoryTransformer(new SubdefTransformer(), $recordTransformer); + $subdefTransformer = new SubdefTransformer(); + $recordTransformer = new RecordTransformer($subdefTransformer, new TechnicalDataTransformer()); + $storyTransformer = new StoryTransformer($subdefTransformer, $recordTransformer); $compositeTransformer = new V1SearchCompositeResultTransformer($recordTransformer, $storyTransformer); $searchTransformer = new V1SearchResultTransformer($compositeTransformer); @@ -1078,7 +1080,8 @@ class V1Controller extends Controller $searchView = $this->buildSearchRecordsView($this->doSearch($request)); - $searchTransformer = new V1SearchRecordsResultTransformer(new RecordTransformer()); + $recordTransformer = new RecordTransformer(new SubdefTransformer(), new TechnicalDataTransformer()); + $searchTransformer = new V1SearchRecordsResultTransformer($recordTransformer); $ret = $fractal->createData(new Item($searchView, $searchTransformer))->toArray(); diff --git a/lib/Alchemy/Phrasea/Search/CaptionView.php b/lib/Alchemy/Phrasea/Search/CaptionView.php index a31c584613..3a51af0d26 100644 --- a/lib/Alchemy/Phrasea/Search/CaptionView.php +++ b/lib/Alchemy/Phrasea/Search/CaptionView.php @@ -10,6 +10,8 @@ namespace Alchemy\Phrasea\Search; +use Assert\Assertion; + class CaptionView { /** @@ -17,6 +19,11 @@ class CaptionView */ private $caption; + /** + * @var \caption_field[] + */ + private $fields = []; + public function __construct(\caption_record $caption) { $this->caption = $caption; @@ -29,4 +36,26 @@ class CaptionView { return $this->caption; } + + /** + * @param \caption_field[] $fields + */ + public function setFields($fields) + { + Assertion::allIsInstanceOf($fields, \caption_field::class); + + $this->fields = []; + + foreach ($fields as $field) { + $this->fields[$field->get_name()] = $field; + } + } + + /** + * @return \caption_field[] + */ + public function getFields() + { + return $this->fields; + } } diff --git a/lib/Alchemy/Phrasea/Search/RecordTransformer.php b/lib/Alchemy/Phrasea/Search/RecordTransformer.php index e1948dac14..adfebd9147 100644 --- a/lib/Alchemy/Phrasea/Search/RecordTransformer.php +++ b/lib/Alchemy/Phrasea/Search/RecordTransformer.php @@ -55,7 +55,9 @@ class RecordTransformer extends TransformerAbstract public function includeThumbnail(RecordView $recordView) { - return $this->item($recordView->getSubdef('thumbnail'), $this->subdefTransformer); + $thumbnailView = $recordView->getSubdef('thumbnail'); + + return $thumbnailView ? $this->item($thumbnailView, $this->subdefTransformer) : null; } public function includeTechnicalInformations(RecordView $recordView) @@ -70,12 +72,13 @@ class RecordTransformer extends TransformerAbstract public function includeMetadata(RecordView $recordView) { - $ret = []; + $fieldData = []; + $values = []; - foreach ($recordView->getCaption()->getCaption()->get_fields() as $field) { + foreach ($recordView->getCaption()->getFields() as $field) { $databox_field = $field->get_databox_field(); - $fieldData = [ + $fieldData[$field->get_meta_struct_id()] = [ 'meta_structure_id' => $field->get_meta_struct_id(), 'name' => $field->get_name(), 'labels' => [ @@ -86,24 +89,52 @@ class RecordTransformer extends TransformerAbstract ], ]; - foreach ($field->get_values() as $value) { - $data = [ - 'meta_id' => $value->getId(), - 'value' => $value->getValue(), - ]; - - $ret[] = array_replace($fieldData, $data); - } + $values[] = $field->get_values(); } - return $this->collection($recordView->getCaption(), ) + if ($values) { + $values = call_user_func_array('array_merge', $values); + } + + return $this->collection($values, function (\caption_Field_Value $value) use ($fieldData) { + $data = $fieldData[$value->getDatabox_field()->get_id()]; + + $data['meta_id'] = $value->getId(); + $data['value'] = $value->getValue(); + + return $data; + }); } public function includeStatus(RecordView $recordView) { + $data = []; + + $bitMask = $recordView->getRecord()->getStatusBitField(); + + foreach ($recordView->getRecord()->getDatabox()->getStatusStructure() as $bit => $status) { + $data[] = [ + 'bit' => $bit, + 'mask' => $bitMask, + ]; + } + + return $this->collection($data, function (array $bitData) { + return [ + 'bit' => $bitData['bit'], + 'state' => \databox_status::bitIsSet($bitData['mask'], $bitData['bit']), + ]; + }); } public function includeCaption(RecordView $recordView) { + return $this->collection($recordView->getCaption()->getFields(), function (\caption_field $field) { + return [ + 'meta_structure_id' => $field->get_meta_struct_id(), + 'name' => $field->get_name(), + 'value' => $field->get_serialized_values(';'), + ]; + }); } } From 23eff5fe28a80487b6153c45ce20d9f3fcb56849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 21 Apr 2016 20:52:37 +0200 Subject: [PATCH 267/383] WIP progress on List Records --- .../Phrasea/Controller/Api/V1Controller.php | 168 +++++++++++++++--- .../Databox/Subdef/MediaSubdefService.php | 28 ++- .../Phrasea/Fractal/ArraySerializer.php | 4 +- .../Phrasea/Media/TechnicalDataService.php | 8 +- .../Phrasea/Search/PermalinkTransformer.php | 36 ++++ lib/Alchemy/Phrasea/Search/PermalinkView.php | 32 ++++ .../Phrasea/Search/RecordTransformer.php | 4 +- .../Phrasea/Search/SubdefTransformer.php | 63 ++++++- lib/Alchemy/Phrasea/Search/SubdefView.php | 67 +++++++ lib/Alchemy/Phrasea/Search/SubdefsAware.php | 10 +- 10 files changed, 378 insertions(+), 42 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Search/PermalinkTransformer.php create mode 100644 lib/Alchemy/Phrasea/Search/PermalinkView.php diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index 391ba31bf4..fd703b6ed0 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -55,13 +55,17 @@ use Alchemy\Phrasea\Model\Repositories\FeedRepository; use Alchemy\Phrasea\Model\Repositories\LazaretFileRepository; use Alchemy\Phrasea\Model\Repositories\TaskRepository; use Alchemy\Phrasea\Record\RecordReferenceCollection; +use Alchemy\Phrasea\Search\PermalinkTransformer; +use Alchemy\Phrasea\Search\PermalinkView; use Alchemy\Phrasea\Search\RecordTransformer; use Alchemy\Phrasea\Search\RecordView; use Alchemy\Phrasea\Search\SearchResultView; use Alchemy\Phrasea\Search\StoryTransformer; use Alchemy\Phrasea\Search\StoryView; use Alchemy\Phrasea\Search\SubdefTransformer; +use Alchemy\Phrasea\Search\SubdefView; use Alchemy\Phrasea\Search\TechnicalDataTransformer; +use Alchemy\Phrasea\Search\TechnicalDataView; use Alchemy\Phrasea\Search\V1SearchCompositeResultTransformer; use Alchemy\Phrasea\Search\V1SearchRecordsResultTransformer; use Alchemy\Phrasea\Search\V1SearchResultTransformer; @@ -306,7 +310,7 @@ class V1Controller extends Controller 'active' => $conf->get(['main', 'bridge', 'dailymotion', 'enabled']), 'clientId' => $conf->get(['main', 'bridge', 'dailymotion', 'client_id']), 'clientSecret' => $conf->get(['main', 'bridge', 'dailymotion', 'client_secret']), - ] + ], ], 'navigator' => ['active' => $conf->get(['registry', 'api-clients', 'navigator-enabled']),], 'office-plugin' => ['active' => $conf->get(['registry', 'api-clients', 'office-enabled']),], @@ -388,7 +392,7 @@ class V1Controller extends Controller 'validationReminder' => $conf->get(['registry', 'actions', 'validation-reminder-days']), 'expirationValue' => $conf->get(['registry', 'actions', 'validation-expiration-days']), ], - ] + ], ]; } @@ -455,7 +459,7 @@ class V1Controller extends Controller public function getDataboxCollectionsAction(Request $request, $databox_id) { $ret = [ - "collections" => $this->listDataboxCollections($this->findDataboxById($databox_id)) + "collections" => $this->listDataboxCollections($this->findDataboxById($databox_id)), ]; return Result::create($request, $ret)->createResponse(); @@ -534,7 +538,7 @@ class V1Controller extends Controller $ret = [ "document_metadatas" => $this->listDataboxMetadataFields( $this->findDataboxById($databox_id)->get_meta_structure() - ) + ), ]; return Result::create($request, $ret)->createResponse(); @@ -751,7 +755,7 @@ class V1Controller extends Controller 'databox_id' => $base->get_sbas_id(), 'base_id' => $base->get_base_id(), 'collection_id' => $base->get_coll_id(), - 'rights' => $baseGrants + 'rights' => $baseGrants, ]; } @@ -799,7 +803,7 @@ class V1Controller extends Controller $service = $this->getAccountService(); $command = new UpdatePasswordCommand(); $form = $this->app->form(new PhraseaRenewPasswordForm(), $command, [ - 'csrf_protection' => false + 'csrf_protection' => false, ]); $form->handleRequest($request); @@ -1078,9 +1082,14 @@ class V1Controller extends Controller $fractal->setSerializer(new ArraySerializer()); $fractal->parseIncludes($this->resolveSearchRecordsIncludes($request)); - $searchView = $this->buildSearchRecordsView($this->doSearch($request)); + $searchView = $this->buildSearchRecordsView( + $this->doSearch($request), + $fractal->getRequestedIncludes(), + $this->resolveSubdefUrlTTL($request) + ); - $recordTransformer = new RecordTransformer(new SubdefTransformer(), new TechnicalDataTransformer()); + $subdefTransformer = new SubdefTransformer($this->app['acl'], $this->getAuthenticatedUser(), new PermalinkTransformer()); + $recordTransformer = new RecordTransformer($subdefTransformer, new TechnicalDataTransformer()); $searchTransformer = new V1SearchRecordsResultTransformer($recordTransformer); $ret = $fractal->createData(new Item($searchView, $searchTransformer))->toArray(); @@ -1135,16 +1144,32 @@ class V1Controller extends Controller /** * @param SearchEngineResult $result + * @param string[] $includes + * @param int $urlTTL * @return SearchResultView */ - private function buildSearchRecordsView(SearchEngineResult $result) + private function buildSearchRecordsView(SearchEngineResult $result, array $includes, $urlTTL) { $references = new RecordReferenceCollection($result->getResults()); + $subdefViews = $this->buildSubdefsViews( + $references, + in_array('results.subdefs', $includes, true) ? null : ['thumbnail'], + $urlTTL + ); + + $technicalDatasets = $this->app['service.technical_data']->fetchRecordsTechnicalData($references); + if (array_intersect($includes, ['results.metadata', 'results.caption'])) { + } + $recordViews = []; - foreach ($references->toRecords($this->getApplicationBox()) as $record) { - $recordViews[] = new RecordView($record); + foreach ($references->toRecords($this->getApplicationBox()) as $index => $record) { + $recordView = new RecordView($record); + $recordView->setSubdefs($subdefViews[$index]); + $recordView->setTechnicalDataView(new TechnicalDataView($technicalDatasets[$index])); + + $recordViews[] = $recordView; } $resultView = new SearchResultView($result); @@ -1153,6 +1178,70 @@ class V1Controller extends Controller return $resultView; } + /** + * @param RecordReferenceCollection $references + * @param array|null $names + * @param int $urlTTL + * @return SubdefView[][] + */ + private function buildSubdefsViews(RecordReferenceCollection $references, array $names = null, $urlTTL) + { + $subdefGroups = $this->app['service.media_subdef'] + ->findSubdefsByRecordReferenceFromCollection($references, $names); + + $fakeSubdefs = []; + + foreach ($subdefGroups as $index => $subdefGroup) { + if (!isset($subdefGroup['thumbnail'])) { + $fakeSubdef = new \media_subdef($this->app, $references[$index], 'thumbnail', true, []); + $fakeSubdefs[spl_object_hash($fakeSubdef)] = $fakeSubdef; + + $subdefGroups[$index]['thumbnail'] = $fakeSubdef; + } + } + + $allSubdefs = $this->mergeGroupsIntoOneList($subdefGroups); + $allPermalinks = \media_Permalink_Adapter::getMany( + $this->app, + array_filter($allSubdefs, function (\media_subdef $subdef) use ($fakeSubdefs) { + return !isset($fakeSubdefs[spl_object_hash($subdef)]); + }) + ); + $urls = $this->app['media_accessor.subdef_url_generator'] + ->generateMany($this->getAuthenticatedUser(), $allSubdefs, $urlTTL); + + $subdefViews = []; + + /** @var \media_subdef $subdef */ + foreach ($allSubdefs as $index => $subdef) { + $subdefView = new SubdefView($subdef); + + if (isset($allPermalinks[$index])) { + $subdefView->setPermalinkView(new PermalinkView($allPermalinks[$index])); + } + + $subdefView->setUrl($urls[$index]); + $subdefView->setUrlTTL($urlTTL); + + $subdefViews[spl_object_hash($subdef)] = $subdefView; + } + + $reorderedGroups = []; + + /** @var \media_subdef[] $subdefGroup */ + foreach ($subdefGroups as $index => $subdefGroup) { + $reordered = []; + + foreach ($subdefGroup as $subdef) { + $reordered[] = $subdefViews[spl_object_hash($subdef)]; + } + + $reorderedGroups[$index] = $reordered; + } + + return $reorderedGroups; + } + /** * Returns requested includes * @@ -1171,9 +1260,9 @@ class V1Controller extends Controller 'results.stories.records.caption', 'results.stories.records.status', 'results.records.subdefs', - 'results.records.metadata', - 'results.records.caption', - 'results.records.status', + //'results.records.metadata', + //'results.records.caption', + //'results.records.status', ]; } @@ -1191,12 +1280,27 @@ class V1Controller extends Controller return [ 'results.subdefs', - 'results.metadata', - 'results.caption', + //'results.metadata', + //'results.caption', 'results.status', ]; } + /** + * @param Request $request + * @return int + */ + private function resolveSubdefUrlTTL(Request $request) + { + $urlTTL = $request->query->get('subdef_url_ttl'); + + if (null !== $urlTTL) { + return (int)$urlTTL; + } + + return $this->getConf()->get(['registry', 'general', 'default-subdef-url-ttl']); + } + /** * @param Request $request * @return SearchEngineResult @@ -1495,7 +1599,7 @@ class V1Controller extends Controller foreach ($record->getStatusStructure() as $bit => $status) { $ret[] = [ 'bit' => $bit, - 'state' => \databox_status::bitIsSet($record->getStatusBitField(), $bit) + 'state' => \databox_status::bitIsSet($record->getStatusBitField(), $bit), ]; } @@ -1783,7 +1887,7 @@ class V1Controller extends Controller { $ret = [ "basket" => $this->listBasket($basket), - "basket_elements" => $this->listBasketContent($request, $basket) + "basket_elements" => $this->listBasketContent($request, $basket), ]; return Result::create($request, $ret)->createResponse(); @@ -2186,7 +2290,7 @@ class V1Controller extends Controller $metadatas[] = array( 'meta_struct_id' => $field->get_id(), 'meta_id' => null, - 'value' => $data->{'title'} + 'value' => $data->{'title'}, ); $thumbtitle_set = true; } @@ -2207,7 +2311,7 @@ class V1Controller extends Controller $metadatas[] = array( 'meta_struct_id' => $field->get_id(), 'meta_id' => null, - 'value' => $value + 'value' => $value, ); } } @@ -2351,7 +2455,7 @@ class V1Controller extends Controller { $ret = [ "user" => $this->listUser($this->getAuthenticatedUser()), - "collections" => $this->listUserCollections($this->getAuthenticatedUser()) + "collections" => $this->listUserCollections($this->getAuthenticatedUser()), ]; if (defined('API_SKIP_USER_REGISTRATIONS') && ! constant('API_SKIP_USER_REGISTRATIONS')) { @@ -2414,7 +2518,7 @@ class V1Controller extends Controller $command = new UpdatePasswordCommand(); /** @var Form $form */ $form = $this->app->form(new PhraseaRenewPasswordForm(), $command, [ - 'csrf_protection' => false + 'csrf_protection' => false, ]); $form->submit($data); @@ -2453,7 +2557,7 @@ class V1Controller extends Controller return Result::create($request, [ 'user' => $user, - 'token' => $token + 'token' => $token, ])->createResponse(); } @@ -2711,4 +2815,22 @@ class V1Controller extends Controller return $caption; } + + /** + * @param array $groups + * @return array|mixed + */ + private function mergeGroupsIntoOneList(array $groups) + { + // Strips keys from the internal array + array_walk($groups, function (array &$group) { + $group = array_values($group); + }); + + if ($groups) { + return call_user_func_array('array_merge', $groups); + } + + return []; + } } diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php index 60a3c9d9d8..af26adff99 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php @@ -30,9 +30,10 @@ class MediaSubdefService * Returns all available subdefs grouped by each record reference and by its name * * @param RecordReferenceInterface[]|RecordReferenceCollection $records + * @param null|array $names * @return \media_subdef[][] */ - public function findSubdefsByRecordReferenceFromCollection($records) + public function findSubdefsByRecordReferenceFromCollection($records, array $names = null) { $subdefs = $this->reduceRecordReferenceCollection( $records, @@ -43,20 +44,28 @@ class MediaSubdefService $carry[$index][$subdef->get_name()] = $subdef; } + + return $carry; }, - array_fill_keys(array_keys(iterator_to_array($records)), []) + array_fill_keys(array_keys($records instanceof \Traversable ? iterator_to_array($records) : $records), []), + $names ); - ksort($subdefs); + $reordered = []; - return $subdefs; + foreach ($records as $index => $record) { + $reordered[$index] = $subdefs[$index]; + } + + return $reordered; } /** * @param RecordReferenceInterface[]|RecordReferenceCollection $records + * @param null|string[] $names * @return \media_subdef[] */ - public function findSubdefsFromRecordReferenceCollection($records) + public function findSubdefsFromRecordReferenceCollection($records, array $names = null) { $groups = $this->reduceRecordReferenceCollection( $records, @@ -65,7 +74,8 @@ class MediaSubdefService return $carry; }, - [] + [], + $names ); if ($groups) { @@ -79,16 +89,18 @@ class MediaSubdefService * @param RecordReferenceInterface[]|RecordReferenceCollection $records * @param callable $process * @param mixed $initialValue + * @param null|string[] $names * @return mixed */ - private function reduceRecordReferenceCollection($records, callable $process, $initialValue) + private function reduceRecordReferenceCollection($records, callable $process, $initialValue, array $names = null) { $records = $this->normalizeRecordCollection($records); $carry = $initialValue; foreach ($records->groupPerDataboxId() as $databoxId => $indexes) { - $subdefs = $this->getRepositoryForDatabox($databoxId)->findByRecordIdsAndNames(array_keys($indexes)); + $subdefs = $this->getRepositoryForDatabox($databoxId) + ->findByRecordIdsAndNames(array_keys($indexes), $names); $carry = $process($carry, $subdefs, $indexes, $databoxId); } diff --git a/lib/Alchemy/Phrasea/Fractal/ArraySerializer.php b/lib/Alchemy/Phrasea/Fractal/ArraySerializer.php index 5ea77600f2..a1ca0df69c 100644 --- a/lib/Alchemy/Phrasea/Fractal/ArraySerializer.php +++ b/lib/Alchemy/Phrasea/Fractal/ArraySerializer.php @@ -19,12 +19,12 @@ class ArraySerializer extends SerializerAbstract { public function collection($resourceKey, array $data) { - return $data; + return array_values(array_filter($data)); } public function item($resourceKey, array $data) { - return $data; + return $data ?: null; } public function includedData(ResourceInterface $resource, array $data) diff --git a/lib/Alchemy/Phrasea/Media/TechnicalDataService.php b/lib/Alchemy/Phrasea/Media/TechnicalDataService.php index da1449cfc2..984928167d 100644 --- a/lib/Alchemy/Phrasea/Media/TechnicalDataService.php +++ b/lib/Alchemy/Phrasea/Media/TechnicalDataService.php @@ -45,8 +45,12 @@ class TechnicalDataService } } - ksort($sets); + $reorder = []; - return $sets; + foreach ($references as $index => $reference) { + $reorder[$index] = isset($sets[$index]) ? $sets[$index] : new RecordTechnicalDataSet($reference->getRecordId()); + } + + return $reorder; } } diff --git a/lib/Alchemy/Phrasea/Search/PermalinkTransformer.php b/lib/Alchemy/Phrasea/Search/PermalinkTransformer.php new file mode 100644 index 0000000000..6bb22be37d --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/PermalinkTransformer.php @@ -0,0 +1,36 @@ +getPermalink(); + + $downloadUrl = $permalink->get_url(); + $downloadUrl->getQuery()->set('download', '1'); + + return [ + 'created_on' => $permalink->get_created_on()->format(DATE_ATOM), + 'id' => $permalink->get_id(), + 'is_activated' => $permalink->get_is_activated(), + /** @Ignore */ + 'label' => $permalink->get_label(), + 'updated_on' => $permalink->get_last_modified()->format(DATE_ATOM), + 'page_url' => $permalink->get_page(), + 'download_url' => (string)$downloadUrl, + 'url' => (string)$permalink->get_url(), + ]; + } +} diff --git a/lib/Alchemy/Phrasea/Search/PermalinkView.php b/lib/Alchemy/Phrasea/Search/PermalinkView.php new file mode 100644 index 0000000000..72c38b9a78 --- /dev/null +++ b/lib/Alchemy/Phrasea/Search/PermalinkView.php @@ -0,0 +1,32 @@ +permalink = $permalink; + } + + /** + * @return \media_Permalink_Adapter + */ + public function getPermalink() + { + return $this->permalink; + } +} diff --git a/lib/Alchemy/Phrasea/Search/RecordTransformer.php b/lib/Alchemy/Phrasea/Search/RecordTransformer.php index adfebd9147..9fdb3a9847 100644 --- a/lib/Alchemy/Phrasea/Search/RecordTransformer.php +++ b/lib/Alchemy/Phrasea/Search/RecordTransformer.php @@ -55,9 +55,7 @@ class RecordTransformer extends TransformerAbstract public function includeThumbnail(RecordView $recordView) { - $thumbnailView = $recordView->getSubdef('thumbnail'); - - return $thumbnailView ? $this->item($thumbnailView, $this->subdefTransformer) : null; + return $this->item($recordView->getSubdef('thumbnail'), $this->subdefTransformer); } public function includeTechnicalInformations(RecordView $recordView) diff --git a/lib/Alchemy/Phrasea/Search/SubdefTransformer.php b/lib/Alchemy/Phrasea/Search/SubdefTransformer.php index 24cdee94d9..c8c63f0bc9 100644 --- a/lib/Alchemy/Phrasea/Search/SubdefTransformer.php +++ b/lib/Alchemy/Phrasea/Search/SubdefTransformer.php @@ -10,12 +10,73 @@ namespace Alchemy\Phrasea\Search; +use Alchemy\Phrasea\Authentication\ACLProvider; +use Alchemy\Phrasea\Model\Entities\User; use League\Fractal\TransformerAbstract; class SubdefTransformer extends TransformerAbstract { + /** + * @var ACLProvider + */ + private $aclProvider; + + /** + * @var User + */ + private $user; + + /** + * @var PermalinkTransformer + */ + private $permalinkTransformer; + + public function __construct(ACLProvider $aclProvider, User $user, PermalinkTransformer $permalinkTransformer) + { + $this->aclProvider = $aclProvider; + $this->user = $user; + $this->permalinkTransformer = $permalinkTransformer; + } + public function transform(SubdefView $subdefView) { - return []; + $media = $subdefView->getSubdef(); + + if (!$media->is_physically_present()) { + return []; + } + + $acl = $this->aclProvider->get($this->user); + $record = $media->get_record(); + + if ($media->get_name() !== 'document' && false === $acl->has_access_to_subdef($record, $media->get_name())) { + return []; + } + if ($media->get_name() === 'document' + && !$acl->has_right_on_base($record->getBaseId(), 'candwnldhd') + && !$acl->has_hd_grant($record) + ) { + return []; + } + + $permalink = $subdefView->getPermalinkView() + ? $this->permalinkTransformer->transform($subdefView->getPermalinkView()) + : null; + + return [ + 'name' => $media->get_name(), + 'permalink' => $permalink, + 'height' => $media->get_height(), + 'width' => $media->get_width(), + 'filesize' => $media->get_size(), + 'devices' => $media->getDevices(), + 'player_type' => $media->get_type(), + 'mime_type' => $media->get_mime(), + 'substituted' => $media->is_substituted(), + 'created_on' => $media->get_creation_date()->format(DATE_ATOM), + 'updated_on' => $media->get_modification_date()->format(DATE_ATOM), + 'url' => $subdefView->getUrl(), + 'url_ttl' => $subdefView->getUrlTTL(), + ]; } } diff --git a/lib/Alchemy/Phrasea/Search/SubdefView.php b/lib/Alchemy/Phrasea/Search/SubdefView.php index c7e7613e32..01064aec89 100644 --- a/lib/Alchemy/Phrasea/Search/SubdefView.php +++ b/lib/Alchemy/Phrasea/Search/SubdefView.php @@ -10,6 +10,8 @@ namespace Alchemy\Phrasea\Search; +use Assert\Assertion; + class SubdefView { /** @@ -17,6 +19,21 @@ class SubdefView */ private $subdef; + /** + * @var PermalinkView + */ + private $permalinkView; + + /** + * @var string + */ + private $url; + + /** + * @var int + */ + private $urlTTL; + public function __construct(\media_subdef $subdef) { $this->subdef = $subdef; @@ -29,4 +46,54 @@ class SubdefView { return $this->subdef; } + + /** + * @param PermalinkView $permalinkView + */ + public function setPermalinkView($permalinkView) + { + $this->permalinkView = $permalinkView; + } + + /** + * @return PermalinkView + */ + public function getPermalinkView() + { + return $this->permalinkView; + } + + /** + * @param string $url + */ + public function setUrl($url) + { + $this->url = (string)$url; + } + + /** + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * @param null|int $urlTTL + */ + public function setUrlTTL($urlTTL) + { + Assertion::nullOrIntegerish($urlTTL); + + $this->urlTTL = null === $urlTTL ? null : (int)$urlTTL; + } + + /** + * @return null|int + */ + public function getUrlTTL() + { + return $this->urlTTL; + } } diff --git a/lib/Alchemy/Phrasea/Search/SubdefsAware.php b/lib/Alchemy/Phrasea/Search/SubdefsAware.php index 9edf617552..6bf89e055f 100644 --- a/lib/Alchemy/Phrasea/Search/SubdefsAware.php +++ b/lib/Alchemy/Phrasea/Search/SubdefsAware.php @@ -1,5 +1,5 @@ subdefs[$name]; + if (isset($this->subdefs[$name])) { + return $this->subdefs[$name]; + } + + throw new \OutOfBoundsException(sprintf('There are no subdef named "%s"', $name)); } /** From f6c3672eeb33798ff31a1f697ca0c9aece87a977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Fri, 22 Apr 2016 12:22:27 +0200 Subject: [PATCH 268/383] Add RecordCollection class to avoid multiple record_adapter fetching --- .../Phrasea/Databox/DataboxGroupable.php | 41 ++++ .../Phrasea/Record/PerDataboxRecordId.php | 20 ++ .../Phrasea/Record/RecordCollection.php | 218 ++++++++++++++++++ .../Record/RecordReferenceCollection.php | 73 +++++- 4 files changed, 350 insertions(+), 2 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Databox/DataboxGroupable.php create mode 100644 lib/Alchemy/Phrasea/Record/PerDataboxRecordId.php create mode 100644 lib/Alchemy/Phrasea/Record/RecordCollection.php diff --git a/lib/Alchemy/Phrasea/Databox/DataboxGroupable.php b/lib/Alchemy/Phrasea/Databox/DataboxGroupable.php new file mode 100644 index 0000000000..75bd392a68 --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/DataboxGroupable.php @@ -0,0 +1,41 @@ + + */ + public function groupByDatabox(); + + /** + * Returns databoxes ids + * + * @return int[] + */ + public function getDataboxIds(); + + /** + * @param int $databoxId + * @return array + */ + public function getDataboxGroup($databoxId); + + /** + * Reorder groups if needed + * + * @return void + */ + public function reorderGroups(); +} diff --git a/lib/Alchemy/Phrasea/Record/PerDataboxRecordId.php b/lib/Alchemy/Phrasea/Record/PerDataboxRecordId.php new file mode 100644 index 0000000000..8699990e55 --- /dev/null +++ b/lib/Alchemy/Phrasea/Record/PerDataboxRecordId.php @@ -0,0 +1,20 @@ + + */ + private $groups; + + /** + * @var bool + */ + private $reorderNeeded = false; + + public function __construct($records = []) + { + Assertion::allIsInstanceOf($records, \record_adapter::class); + + foreach ($records as $index => $record) { + $this->add($record, $index); + } + } + + /** + * @param \record_adapter $record + * @param null|int|string $index + * @return void + */ + public function add(\record_adapter $record, $index = null) + { + if (null === $index) { + $this->addWithUnknownIndex($record); + + return; + } + + if (isset($this->records[$index])){ + unset($this->groups[$this->records[$index]->getDataboxId()][$index]); + $this->reorderNeeded = true; + } + + $this->records[$index] = $record; + + $this->addIndexToGroups($record, $index); + } + + /** + * @return \ArrayIterator + */ + public function getIterator() + { + return new \ArrayIterator($this->records); + } + + /** + * @param int|string $offset + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->records[$offset]); + } + + /** + * @param int|string $offset + * @return \record_adapter + */ + public function offsetGet($offset) + { + return $this->records[$offset]; + } + + /** + * @param int|string $offset + * @param \record_adapter $value + */ + public function offsetSet($offset, $value) + { + Assertion::isInstanceOf($value, \record_adapter::class); + + $this->add($value, $offset); + } + + /** + * @param int|string $offset + * @return void + */ + public function offsetUnset($offset) + { + if (isset($this->records[$offset])) { + unset($this->groups[$this->records[$offset]->getDataboxId()][$offset]); + } + + unset($this->records[$offset]); + } + + /** + * @return int + */ + public function count() + { + return count($this->records); + } + + /** + * Returns records groups by databoxId (possibly not in order) + * + * @return \record_adapter[][] + */ + public function groupByDatabox() + { + return $this->groups; + } + + /** + * @return int[] + */ + public function getDataboxIds() + { + return array_keys($this->groups); + } + + /** + * @param int $databoxId + * @return \record_adapter[] + */ + public function getDataboxGroup($databoxId) + { + return isset($this->groups[$databoxId]) ? $this->groups[$databoxId] : []; + } + + /** + * @return void + */ + public function reorderGroups() + { + if (!$this->reorderNeeded) { + return; + } + + $groups = []; + + foreach ($this->records as $index => $record) { + $databoxId = $record->getDataboxId(); + + if (!isset($groups[$databoxId])) { + $groups[$databoxId] = []; + } + + $groups[$databoxId][$index] = $record; + } + + $this->groups = $groups; + $this->reorderNeeded = false; + } + + /** + * @param int $databoxId + * @return int[] + */ + public function getDataboxRecordIds($databoxId) + { + $recordIds = []; + + foreach ($this->getDataboxGroup($databoxId) as $record) { + $recordIds[$record->getRecordId()] = true; + } + + return array_keys($recordIds); + } + + /** + * @param \record_adapter $record + * @return void + */ + private function addWithUnknownIndex(\record_adapter $record) + { + $this->records[] = $record; + + end($this->records); + + $this->addIndexToGroups($record, key($this->records)); + } + + /** + * @param \record_adapter $record + * @param int|string $index + * @return void + */ + private function addIndexToGroups(\record_adapter $record, $index) + { + $databoxId = $record->getDataboxId(); + + if (!isset($this->groups[$databoxId])) { + $this->groups[$databoxId] = []; + } + + $this->groups[$databoxId][$index] = $record; + } +} diff --git a/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php b/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php index 97bb80ceef..787bbe5f93 100644 --- a/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php +++ b/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php @@ -10,10 +10,11 @@ namespace Alchemy\Phrasea\Record; +use Alchemy\Phrasea\Databox\DataboxGroupable; use Alchemy\Phrasea\Model\RecordReferenceInterface; use Assert\Assertion; -class RecordReferenceCollection implements \IteratorAggregate, \ArrayAccess +class RecordReferenceCollection implements \IteratorAggregate, \ArrayAccess, \Countable, DataboxGroupable, PerDataboxRecordId { /** * @param array $records @@ -192,13 +193,17 @@ class RecordReferenceCollection implements \IteratorAggregate, \ArrayAccess return $records; } + /** + * @param int|string $offset + * @return bool + */ public function offsetExists($offset) { return isset($this->references[$offset]); } /** - * @param mixed $offset + * @param int|string $offset * @return RecordReferenceInterface */ public function offsetGet($offset) @@ -206,6 +211,10 @@ class RecordReferenceCollection implements \IteratorAggregate, \ArrayAccess return $this->references[$offset]; } + /** + * @param int|string $offset + * @param RecordReferenceInterface $value + */ public function offsetSet($offset, $value) { Assertion::isInstanceOf($value, RecordReferenceInterface::class); @@ -213,9 +222,69 @@ class RecordReferenceCollection implements \IteratorAggregate, \ArrayAccess $this->add($value, $offset); } + /** + * @param int|string $offset + * @return void + */ public function offsetUnset($offset) { unset($this->references[$offset]); $this->groups = null; } + + /** + * @return RecordReferenceInterface[][] + */ + public function groupByDatabox() + { + $this->reorderGroups(); + + return $this->groups; + } + + public function reorderGroups() + { + if ($this->groups) { + return; + } + + $groups = []; + + foreach ($this->references as $index => $reference) { + if (!isset($groups[$reference->getDataboxId()])) { + $groups[$reference->getDataboxId()] = []; + } + + $groups[$reference->getDataboxId()][$index] = $reference; + } + + $this->groups = $groups; + } + + /** + * @param int $databoxId + * @return RecordReferenceInterface[] + */ + public function getDataboxGroup($databoxId) + { + $this->reorderGroups(); + + return isset($this->groups[$databoxId]) ? $this->groups[$databoxId] : []; + } + + public function getDataboxRecordIds($databoxId) + { + $recordsIds = []; + + foreach ($this->getDataboxGroup($databoxId) as $references) { + $recordsIds[$references->getRecordId()] = true; + } + + return array_keys($recordsIds); + } + + public function count() + { + return count($this->references); + } } From ae4d46216ff94a4a5011ffeef9a5d76d2bda5e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 9 May 2016 18:52:08 +0200 Subject: [PATCH 269/383] Add Caption Service and Repositories --- lib/Alchemy/Phrasea/Application.php | 2 + .../Phrasea/Controller/Api/V1Controller.php | 5 +- .../Caption/CachedCaptionDataRepository.php | 100 +++++++++++++ .../Databox/Caption/CaptionDataRepository.php | 20 +++ .../Databox/Caption/CaptionRepository.php | 74 ++++++++++ .../Caption/CaptionRepositoryFactory.php | 60 ++++++++ .../Databox/Caption/CaptionService.php | 67 +++++++++ .../Caption/CaptionServiceProvider.php | 49 ++++++ .../Caption/DbalCaptionDataRepository.php | 64 ++++++++ .../Phrasea/Media/TechnicalDataService.php | 2 +- lib/classes/caption/record.php | 139 ++++++++++-------- 11 files changed, 518 insertions(+), 64 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Databox/Caption/CachedCaptionDataRepository.php create mode 100644 lib/Alchemy/Phrasea/Databox/Caption/CaptionDataRepository.php create mode 100644 lib/Alchemy/Phrasea/Databox/Caption/CaptionRepository.php create mode 100644 lib/Alchemy/Phrasea/Databox/Caption/CaptionRepositoryFactory.php create mode 100644 lib/Alchemy/Phrasea/Databox/Caption/CaptionService.php create mode 100644 lib/Alchemy/Phrasea/Databox/Caption/CaptionServiceProvider.php create mode 100644 lib/Alchemy/Phrasea/Databox/Caption/DbalCaptionDataRepository.php diff --git a/lib/Alchemy/Phrasea/Application.php b/lib/Alchemy/Phrasea/Application.php index 2214926e63..cef66745ac 100644 --- a/lib/Alchemy/Phrasea/Application.php +++ b/lib/Alchemy/Phrasea/Application.php @@ -73,6 +73,7 @@ use Alchemy\Phrasea\Core\Provider\UnicodeServiceProvider; use Alchemy\Phrasea\Core\Provider\WebhookServiceProvider; use Alchemy\Phrasea\Core\Provider\ZippyServiceProvider; use Alchemy\Phrasea\Core\Provider\WebProfilerServiceProvider as PhraseaWebProfilerServiceProvider; +use Alchemy\Phrasea\Databox\Caption\CaptionServiceProvider; use Alchemy\Phrasea\Databox\Subdef\MediaSubdefServiceProvider; use Alchemy\Phrasea\Exception\InvalidArgumentException; use Alchemy\Phrasea\Filesystem\FilesystemServiceProvider; @@ -194,6 +195,7 @@ class Application extends SilexApplication $this->register(new ManipulatorServiceProvider()); $this->register(new TechnicalDataServiceProvider()); $this->register(new MediaSubdefServiceProvider()); + $this->register(new CaptionServiceProvider()); $this->register(new InstallerServiceProvider()); $this->register(new PhraseaVersionServiceProvider()); diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index fd703b6ed0..1eb0333724 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -1159,6 +1159,7 @@ class V1Controller extends Controller ); $technicalDatasets = $this->app['service.technical_data']->fetchRecordsTechnicalData($references); + if (array_intersect($includes, ['results.metadata', 'results.caption'])) { } @@ -1280,8 +1281,8 @@ class V1Controller extends Controller return [ 'results.subdefs', - //'results.metadata', - //'results.caption', + 'results.metadata', + 'results.caption', 'results.status', ]; } diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CachedCaptionDataRepository.php b/lib/Alchemy/Phrasea/Databox/Caption/CachedCaptionDataRepository.php new file mode 100644 index 0000000000..44d214a575 --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Caption/CachedCaptionDataRepository.php @@ -0,0 +1,100 @@ +decorated = $decorated; + $this->cache = $cache instanceof MultiGetCache && $cache instanceof MultiPutCache + ? $cache + : new MultiAdapter($cache); + $this->baseKey = $baseKey; + } + + /** + * @return int + */ + public function getLifeTime() + { + return $this->lifeTime; + } + + /** + * @param int $lifeTime + */ + public function setLifeTime($lifeTime) + { + $this->lifeTime = (int)$lifeTime; + } + + /** + * @param array $recordIds + * @return \array[] + */ + public function findByRecordIds(array $recordIds) + { + $keys = $this->computeKeys($recordIds); + + $data = $this->cache->fetchMultiple($keys); + + if (count($data) === count($keys)) { + return $data; + } + + $data = $this->decorated->findByRecordIds($recordIds); + + $this->cache->saveMultiple(array_combine(array_values($keys), array_values($data))); + + return $data; + } + + /** + * @param int[] $recordIds + * @return string[] + */ + private function computeKeys(array $recordIds) + { + return array_map(function ($recordId) { + return $this->baseKey . 'caption' . json_encode([(int)$recordId]); + }, $recordIds); + } +} diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionDataRepository.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionDataRepository.php new file mode 100644 index 0000000000..826df7b0b2 --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Caption/CaptionDataRepository.php @@ -0,0 +1,20 @@ +dataRepository = $dataRepository; + $this->captionFactory = $captionFactory; + } + + public function findByRecordIds(array $recordIds) + { + $this->fetchMissing($recordIds); + + $instances = []; + + foreach ($recordIds as $index => $recordId) { + $instances[$index] = $this->idMap[$recordId]; + } + + return $instances; + } + + public function clear() + { + $this->idMap = []; + } + + private function fetchMissing(array $recordIds) + { + $missing = array_diff($recordIds, array_keys($this->idMap)); + + if (!$missing) { + return; + } + + $data = $this->dataRepository->findByRecordIds($missing); + + $factory = $this->captionFactory; + + foreach ($data as $item) { + Assertion::keyIsset($item, 'record_id'); + + $this->idMap[(int)$item['record_id']] = $factory($item); + } + } +} diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepositoryFactory.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepositoryFactory.php new file mode 100644 index 0000000000..d796224bca --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepositoryFactory.php @@ -0,0 +1,60 @@ +connectionProvider = $connectionProvider; + $this->cache = $cache; + $this->captionFactoryProvider = $captionFactoryProvider; + } + + public function createRepositoryFor($databoxId) + { + $connection = $this->connectionProvider->getConnection($databoxId); + + $dbalRepository = new DbalCaptionDataRepository($connection); + $dataRepository = new CachedCaptionDataRepository($dbalRepository, $this->cache, sprintf('databox%d:', $databoxId)); + + $provider = $this->captionFactoryProvider; + $factory = $provider($databoxId); + + if (!is_callable($factory)) { + throw new \UnexpectedValueException(sprintf( + 'Caption factory is expected to be callable, got %s', + is_object($factory) ? get_class($factory) : gettype($factory) + )); + } + + return new CaptionRepository($dataRepository, $factory); + } +} diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionService.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionService.php new file mode 100644 index 0000000000..e27cad063d --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Caption/CaptionService.php @@ -0,0 +1,67 @@ +repositoryProvider = $repositoryProvider; + } + + public function findByReferenceCollection($references) + { + $references = $this->normalizeReferenceCollection($references); + + $groups = []; + + foreach ($references->groupPerDataboxId() as $databoxId => $indexes) { + $this->getRepositoryForDatabox($databoxId)->findByRecordIds(array_keys($indexes)); + } + + if ($groups) { + return call_user_func_array('array_merge', $groups); + } + + return []; + } + + /** + * @param RecordReferenceInterface[]|RecordReferenceCollection $references + * @return RecordReferenceCollection + */ + public function normalizeReferenceCollection($references) + { + if ($references instanceof RecordReferenceCollection) { + return $references; + } + + return new RecordReferenceCollection($references); + } + + /** + * @param int $databoxId + * @return CaptionRepository + */ + private function getRepositoryForDatabox($databoxId) + { + return $this->repositoryProvider->getRepositoryForDatabox($databoxId); + } +} diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionServiceProvider.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionServiceProvider.php new file mode 100644 index 0000000000..1163317680 --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Caption/CaptionServiceProvider.php @@ -0,0 +1,49 @@ +protect(function ($databoxId) use ($app) { + return function (array $data) use ($app, $databoxId) { + $recordReference = RecordReference::createFromDataboxIdAndRecordId($databoxId, $data['record_id']); + + return new \caption_record($app, $recordReference, $data); + }; + }); + + $app['provider.repo.caption'] = $app->share(function (Application $app) { + $connectionProvider = new DataboxConnectionProvider($app['phraseanet.appbox']); + $factoryProvider = $app['provider.factory.caption']; + + $repositoryFactory = new CaptionRepositoryFactory($connectionProvider, $app['cache'], $factoryProvider); + + return new DataboxBoundRepositoryProvider($repositoryFactory); + }); + + $app['service.caption'] = $app->share(function (Application $app) { + return new CaptionService($app['provider.repo.caption']); + }); + } + + public function boot(Application $app) + { + // no-op + } +} diff --git a/lib/Alchemy/Phrasea/Databox/Caption/DbalCaptionDataRepository.php b/lib/Alchemy/Phrasea/Databox/Caption/DbalCaptionDataRepository.php new file mode 100644 index 0000000000..a8ab78bc93 --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Caption/DbalCaptionDataRepository.php @@ -0,0 +1,64 @@ +connection = $connection; + } + + public function findByRecordIds(array $recordIds) + { + if (!$recordIds) { + return []; + } + + $sql = <<<'SQL' +SELECT m.record_id, m.id AS meta_id, s.id AS structure_id, value, VocabularyType, VocabularyId +FROM metadatas m INNER JOIN metadatas_structure s ON s.id = m.meta_struct_id +WHERE m.record_id IN (:recordIds) +ORDER BY m.record_id ASC, s.sorter ASC +SQL; + + $data = $this->connection->fetchAll( + $sql, ['recordIds' => $recordIds], ['recordIds' => Connection::PARAM_INT_ARRAY] + ); + + return $this->mapByRecordId($data, $recordIds); + } + + /** + * @param array $data + * @param int[] $recordIds + * @return array[] + */ + private function mapByRecordId(array $data, array $recordIds) + { + $groups = array_fill_keys($recordIds, []); + + foreach ($data as $item) { + $recordId = $item['record_id']; + + $groups[$recordId][] = $item; + } + + return $groups; + } +} diff --git a/lib/Alchemy/Phrasea/Media/TechnicalDataService.php b/lib/Alchemy/Phrasea/Media/TechnicalDataService.php index 984928167d..0d443d0228 100644 --- a/lib/Alchemy/Phrasea/Media/TechnicalDataService.php +++ b/lib/Alchemy/Phrasea/Media/TechnicalDataService.php @@ -31,7 +31,7 @@ class TechnicalDataService */ public function fetchRecordsTechnicalData($references) { - if (!$references instanceof RecordReferenceCollection) { + if (!$references instanceof RecordReferenceCollection) { $references = new RecordReferenceCollection($references); } diff --git a/lib/classes/caption/record.php b/lib/classes/caption/record.php index c3199f625a..2b90d0a3d3 100644 --- a/lib/classes/caption/record.php +++ b/lib/classes/caption/record.php @@ -29,10 +29,16 @@ class caption_record implements cache_cacheableInterface */ protected $app; - public function __construct(Application $app, RecordReferenceInterface $record) + /** + * @param Application $app + * @param RecordReferenceInterface $record + * @param array[]|null $fieldsData + */ + public function __construct(Application $app, RecordReferenceInterface $record, array $fieldsData = null) { $this->app = $app; $this->record = $record; + $this->fields = null === $fieldsData ? null : $this->mapFieldsFromData($fieldsData); } public function toArray($includeBusinessFields) @@ -61,8 +67,6 @@ class caption_record implements cache_cacheableInterface return $this->fields; } - $databox = $this->getDatabox(); - try { $fields = $this->get_data_from_cache(); } catch (\Exception $e) { @@ -72,70 +76,14 @@ FROM metadatas m INNER JOIN metadatas_structure s ON s.id = m.meta_struct_id WHERE m.record_id = :record_id ORDER BY s.sorter ASC SQL; - $fields = $databox->get_connection() + $fields = $this->getDatabox()->get_connection() ->executeQuery($sql, [':record_id' => $this->record->getRecordId()]) ->fetchAll(PDO::FETCH_ASSOC); $this->set_data_to_cache($fields); } - $rec_fields = array(); - - if ($fields) { - $databox_descriptionStructure = $databox->get_meta_structure(); - $record = $databox->get_record($this->record->getRecordId()); - - // first group values by field - $caption_fields = []; - foreach ($fields as $row) { - $structure_id = $row['structure_id']; - if(!array_key_exists($structure_id, $caption_fields)) { - $caption_fields[$structure_id] = [ - 'db_field' => $databox_descriptionStructure->get_element($structure_id), - 'values' => [] - ]; - } - - if (count($caption_fields[$structure_id]['values']) > 0 && !$caption_fields[$structure_id]['db_field']->is_multi()) { - // Inconsistent, should not happen - continue; - } - - // build an EMPTY caption_Field_Value - $cfv = new caption_Field_Value( - $this->app, - $caption_fields[$structure_id]['db_field'], - $record, - $row['meta_id'], - caption_Field_Value::DONT_RETRIEVE_VALUES // ask caption_Field_Value "no n+1 sql" - ); - - // inject the value we already know - $cfv->injectValues($row['value'], $row['VocabularyType'], $row['VocabularyId']); - - // add the value to the field - $caption_fields[$structure_id]['values'][] = $cfv; - } - - // now build a "caption_field" with already known "caption_Field_Value"s - foreach($caption_fields as $structure_id => $caption_field) { - - // build an EMPTY caption_field - $cf = new caption_field( - $this->app, - $caption_field['db_field'], - $record, - caption_field::DONT_RETRIEVE_VALUES // ask caption_field "no n+1 sql" - ); - - // inject the value we already know - $cf->injectValues($caption_field['values']); - - // add the field to the fields - $rec_fields[$structure_id] = $cf; - } - } - $this->fields = $rec_fields; + $this->fields = $this->mapFieldsFromData($fields); return $this->fields; } @@ -315,4 +263,73 @@ SQL; { return $this->app->findDataboxById($this->record->getDataboxId()); } + + /** + * @param array $data + * @return caption_field[] + */ + protected function mapFieldsFromData($data) + { + if (!$data) { + return []; + } + + $rec_fields = array(); + + $databox = $this->getDatabox(); + $databox_descriptionStructure = $databox->get_meta_structure(); + $record = $databox->get_record($this->record->getRecordId()); + + // first group values by field + $caption_fields = []; + foreach ($data as $row) { + $structure_id = $row['structure_id']; + if (!array_key_exists($structure_id, $caption_fields)) { + $caption_fields[$structure_id] = [ + 'db_field' => $databox_descriptionStructure->get_element($structure_id), + 'values' => [] + ]; + } + + if (count($caption_fields[$structure_id]['values']) > 0 && !$caption_fields[$structure_id]['db_field']->is_multi()) { + // Inconsistent, should not happen + continue; + } + + // build an EMPTY caption_Field_Value + $cfv = new caption_Field_Value( + $this->app, + $caption_fields[$structure_id]['db_field'], + $record, + $row['meta_id'], + caption_Field_Value::DONT_RETRIEVE_VALUES // ask caption_Field_Value "no n+1 sql" + ); + + // inject the value we already know + $cfv->injectValues($row['value'], $row['VocabularyType'], $row['VocabularyId']); + + // add the value to the field + $caption_fields[$structure_id]['values'][] = $cfv; + } + + // now build a "caption_field" with already known "caption_Field_Value"s + foreach ($caption_fields as $structure_id => $caption_field) { + + // build an EMPTY caption_field + $cf = new caption_field( + $this->app, + $caption_field['db_field'], + $record, + caption_field::DONT_RETRIEVE_VALUES // ask caption_field "no n+1 sql" + ); + + // inject the value we already know + $cf->injectValues($caption_field['values']); + + // add the field to the fields + $rec_fields[$structure_id] = $cf; + } + + return $rec_fields; + } } From 2341641c9e6d83ea1259ea27ba1921a8ad7ffa9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 10 May 2016 14:24:57 +0200 Subject: [PATCH 270/383] Caption Service tweak --- .../Phrasea/Controller/Api/V1Controller.php | 53 ++++++++++++--- .../Caption/CachedCaptionDataRepository.php | 26 +++++-- .../Databox/Caption/CaptionCacheInvalider.php | 68 +++++++++++++++++++ .../Databox/Caption/CaptionRepository.php | 6 +- .../Caption/CaptionRepositoryFactory.php | 2 +- .../Databox/Caption/CaptionService.php | 28 ++++++-- .../Caption/CaptionServiceProvider.php | 7 +- tests/classes/caption/recordTest.php | 2 +- 8 files changed, 161 insertions(+), 31 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Databox/Caption/CaptionCacheInvalider.php diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index 1eb0333724..cd6a391596 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -55,6 +55,7 @@ use Alchemy\Phrasea\Model\Repositories\FeedRepository; use Alchemy\Phrasea\Model\Repositories\LazaretFileRepository; use Alchemy\Phrasea\Model\Repositories\TaskRepository; use Alchemy\Phrasea\Record\RecordReferenceCollection; +use Alchemy\Phrasea\Search\CaptionView; use Alchemy\Phrasea\Search\PermalinkTransformer; use Alchemy\Phrasea\Search\PermalinkView; use Alchemy\Phrasea\Search\RecordTransformer; @@ -1160,17 +1161,34 @@ class V1Controller extends Controller $technicalDatasets = $this->app['service.technical_data']->fetchRecordsTechnicalData($references); - if (array_intersect($includes, ['results.metadata', 'results.caption'])) { - } + $recordViews = $this->buildRecordViews($references); - $recordViews = []; - - foreach ($references->toRecords($this->getApplicationBox()) as $index => $record) { - $recordView = new RecordView($record); + foreach ($recordViews as $index => $recordView) { $recordView->setSubdefs($subdefViews[$index]); $recordView->setTechnicalDataView(new TechnicalDataView($technicalDatasets[$index])); + } - $recordViews[] = $recordView; + if (array_intersect($includes, ['results.metadata', 'results.caption'])) { + $acl = $this->getAclForUser(); + + $canSeeBusiness = []; + + foreach ($references->getDataboxIds() as $databoxId) { + $canSeeBusiness[$databoxId] = $acl->can_see_business_fields($this->findDataboxById($databoxId)); + } + + $captions = $this->app['service.caption']->findByReferenceCollection($references); + + foreach ($recordViews as $index => $recordView) { + $caption = $captions[$index]; + + $captionView = new CaptionView($caption); + + $databoxId = $recordView->getRecord()->getDataboxId(); + $captionView->setFields($caption->get_fields(null, $canSeeBusiness[$databoxId])); + + $recordView->setCaption($captionView); + } } $resultView = new SearchResultView($result); @@ -1261,9 +1279,9 @@ class V1Controller extends Controller 'results.stories.records.caption', 'results.stories.records.status', 'results.records.subdefs', - //'results.records.metadata', - //'results.records.caption', - //'results.records.status', + 'results.records.metadata', + 'results.records.caption', + 'results.records.status', ]; } @@ -2834,4 +2852,19 @@ class V1Controller extends Controller return []; } + + /** + * @param RecordReferenceCollection $references + * @return RecordView[] + */ + private function buildRecordViews(RecordReferenceCollection $references) + { + $recordViews = []; + + foreach ($references->toRecords($this->getApplicationBox()) as $index => $record) { + $recordViews[$index] = new RecordView($record); + } + + return $recordViews; + } } diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CachedCaptionDataRepository.php b/lib/Alchemy/Phrasea/Databox/Caption/CachedCaptionDataRepository.php index 44d214a575..f10c3e4f00 100644 --- a/lib/Alchemy/Phrasea/Databox/Caption/CachedCaptionDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Caption/CachedCaptionDataRepository.php @@ -77,24 +77,40 @@ class CachedCaptionDataRepository implements CaptionDataRepository $data = $this->cache->fetchMultiple($keys); if (count($data) === count($keys)) { - return $data; + return array_combine($recordIds, $data); } $data = $this->decorated->findByRecordIds($recordIds); - $this->cache->saveMultiple(array_combine(array_values($keys), array_values($data))); + $this->cache->saveMultiple(array_combine($keys, $data)); return $data; } + /** + * @param int $recordId + * @return void + */ + public function invalidate($recordId) + { + $this->cache->delete($this->computeKey($recordId)); + } + /** * @param int[] $recordIds * @return string[] */ private function computeKeys(array $recordIds) { - return array_map(function ($recordId) { - return $this->baseKey . 'caption' . json_encode([(int)$recordId]); - }, $recordIds); + return array_map([$this, 'computeKey'], $recordIds); + } + + /** + * @param int $recordId + * @return string + */ + private function computeKey($recordId) + { + return sprintf('%scaption[%d]', $this->baseKey, $recordId); } } diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionCacheInvalider.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionCacheInvalider.php new file mode 100644 index 0000000000..b4efd6d5a3 --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Caption/CaptionCacheInvalider.php @@ -0,0 +1,68 @@ + 'onMetadataChange', + ]; + } + + /** + * @var callable + */ + private $locator; + + /** + * @param callable $locator CachedCaptionDataRepository provider + */ + public function __construct(callable $locator) + { + $this->locator = $locator; + } + + public function onMetadataChange(MetadataChangedEvent $event) + { + $record = $event->getRecord(); + + $repository = $this->getCaptionRepository($record->getDataboxId()); + $repository->invalidate($record->getRecordId()); + } + + /** + * @param int $databoxId + * @return CachedCaptionDataRepository + */ + private function getCaptionRepository($databoxId) + { + $locator = $this->locator; + + /** @var DataboxBoundRepositoryProvider $repositoryProvider */ + $repositoryProvider = $locator(); + + Assertion::isInstanceOf($repositoryProvider, DataboxBoundRepositoryProvider::class); + + $repository = $repositoryProvider->getRepositoryForDatabox($databoxId); + + Assertion::isInstanceOf($repository, CachedCaptionDataRepository::class); + + return $repository; + } +} diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepository.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepository.php index ca19468a32..eb9cee0a77 100644 --- a/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepository.php @@ -65,10 +65,8 @@ class CaptionRepository $factory = $this->captionFactory; - foreach ($data as $item) { - Assertion::keyIsset($item, 'record_id'); - - $this->idMap[(int)$item['record_id']] = $factory($item); + foreach ($data as $recordId => $item) { + $this->idMap[(int)$recordId] = $factory($recordId, $item); } } } diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepositoryFactory.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepositoryFactory.php index d796224bca..d48ab0e395 100644 --- a/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepositoryFactory.php +++ b/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepositoryFactory.php @@ -43,7 +43,7 @@ class CaptionRepositoryFactory implements DataboxBoundRepositoryFactory $connection = $this->connectionProvider->getConnection($databoxId); $dbalRepository = new DbalCaptionDataRepository($connection); - $dataRepository = new CachedCaptionDataRepository($dbalRepository, $this->cache, sprintf('databox%d:', $databoxId)); + $dataRepository = new CachedCaptionDataRepository($dbalRepository, $this->cache, sprintf('databox[%d]:', $databoxId)); $provider = $this->captionFactoryProvider; $factory = $provider($databoxId); diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionService.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionService.php index e27cad063d..b7c3db9b33 100644 --- a/lib/Alchemy/Phrasea/Databox/Caption/CaptionService.php +++ b/lib/Alchemy/Phrasea/Databox/Caption/CaptionService.php @@ -33,21 +33,19 @@ class CaptionService $groups = []; foreach ($references->groupPerDataboxId() as $databoxId => $indexes) { - $this->getRepositoryForDatabox($databoxId)->findByRecordIds(array_keys($indexes)); + $captions = $this->getRepositoryForDatabox($databoxId)->findByRecordIds(array_keys($indexes)); + + $groups[$databoxId] = array_combine($indexes, $captions); } - if ($groups) { - return call_user_func_array('array_merge', $groups); - } - - return []; + return $this->reorderInstances($references, $groups); } /** * @param RecordReferenceInterface[]|RecordReferenceCollection $references * @return RecordReferenceCollection */ - public function normalizeReferenceCollection($references) + private function normalizeReferenceCollection($references) { if ($references instanceof RecordReferenceCollection) { return $references; @@ -64,4 +62,20 @@ class CaptionService { return $this->repositoryProvider->getRepositoryForDatabox($databoxId); } + + /** + * @param RecordReferenceCollection $references + * @param \caption_record[][] $groups + * @return \caption_record[] + */ + private function reorderInstances(RecordReferenceCollection $references, array $groups) + { + $captions = []; + + foreach ($references as $index => $reference) { + $captions[$index] = $groups[$reference->getDataboxId()][$index]; + } + + return $captions; + } } diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionServiceProvider.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionServiceProvider.php index 1163317680..bc5cbee3bf 100644 --- a/lib/Alchemy/Phrasea/Databox/Caption/CaptionServiceProvider.php +++ b/lib/Alchemy/Phrasea/Databox/Caption/CaptionServiceProvider.php @@ -10,6 +10,7 @@ namespace Alchemy\Phrasea\Databox\Caption; +use Alchemy\Phrasea\Controller\LazyLocator; use Alchemy\Phrasea\Databox\DataboxBoundRepositoryProvider; use Alchemy\Phrasea\Databox\DataboxConnectionProvider; use Alchemy\Phrasea\Record\RecordReference; @@ -21,8 +22,8 @@ class CaptionServiceProvider implements ServiceProviderInterface public function register(Application $app) { $app['provider.factory.caption'] = $app->protect(function ($databoxId) use ($app) { - return function (array $data) use ($app, $databoxId) { - $recordReference = RecordReference::createFromDataboxIdAndRecordId($databoxId, $data['record_id']); + return function ($recordId, array $data) use ($app, $databoxId) { + $recordReference = RecordReference::createFromDataboxIdAndRecordId($databoxId, $recordId); return new \caption_record($app, $recordReference, $data); }; @@ -44,6 +45,6 @@ class CaptionServiceProvider implements ServiceProviderInterface public function boot(Application $app) { - // no-op + $app['dispatcher']->addSubscriber(new CaptionCacheInvalider(new LazyLocator($app, 'provider.repo.caption'))); } } diff --git a/tests/classes/caption/recordTest.php b/tests/classes/caption/recordTest.php index 02c8eb86a8..b853949550 100644 --- a/tests/classes/caption/recordTest.php +++ b/tests/classes/caption/recordTest.php @@ -17,7 +17,7 @@ class caption_recordTest extends \PhraseanetTestCase public function setUp() { parent::setUp(); - $this->object = new caption_record(self::$DI['app'], self::$DI['record_1'], self::$DI['record_1']->get_databox()); + $this->object = new caption_record(self::$DI['app'], self::$DI['record_1']); } /** From 9f615dfb5dc2d945a0616e70993b09c81ce15127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 10 May 2016 16:28:38 +0200 Subject: [PATCH 271/383] Subscriber is on DataRepository not actual repository --- .../Phrasea/Controller/Api/V1Controller.php | 42 ++++++------- .../Caption/CaptionDataRepositoryFactory.php | 43 +++++++++++++ .../Databox/Caption/CaptionRepository.php | 2 - .../Caption/CaptionRepositoryFactory.php | 60 ------------------- .../Caption/CaptionServiceProvider.php | 26 ++++++-- .../ClosureDataboxBoundRepositoryFactory.php | 31 ++++++++++ 6 files changed, 115 insertions(+), 89 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Databox/Caption/CaptionDataRepositoryFactory.php delete mode 100644 lib/Alchemy/Phrasea/Databox/Caption/CaptionRepositoryFactory.php create mode 100644 lib/Alchemy/Phrasea/Databox/ClosureDataboxBoundRepositoryFactory.php diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index cd6a391596..d142e5b27a 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -1057,7 +1057,7 @@ class V1Controller extends Controller $searchView = $this->buildSearchView($this->doSearch($request)); - $subdefTransformer = new SubdefTransformer(); + $subdefTransformer = new SubdefTransformer($this->app['acl'], $this->getAuthenticatedUser(), new PermalinkTransformer()); $recordTransformer = new RecordTransformer($subdefTransformer, new TechnicalDataTransformer()); $storyTransformer = new StoryTransformer($subdefTransformer, $recordTransformer); $compositeTransformer = new V1SearchCompositeResultTransformer($recordTransformer, $storyTransformer); @@ -1269,20 +1269,20 @@ class V1Controller extends Controller */ private function resolveSearchIncludes(Request $request) { - if (!$request->attributes->get('_extended', false)) { - return []; + if ($request->attributes->get('_extended', false)) { + return [ + 'results.stories.records.subdefs', + 'results.stories.records.metadata', + 'results.stories.records.caption', + 'results.stories.records.status', + 'results.records.subdefs', + 'results.records.metadata', + 'results.records.caption', + 'results.records.status', + ]; } - return [ - 'results.stories.records.subdefs', - 'results.stories.records.metadata', - 'results.stories.records.caption', - 'results.stories.records.status', - 'results.records.subdefs', - 'results.records.metadata', - 'results.records.caption', - 'results.records.status', - ]; + return []; } /** @@ -1293,16 +1293,16 @@ class V1Controller extends Controller */ private function resolveSearchRecordsIncludes(Request $request) { - if (!$request->attributes->get('_extended', false)) { - return []; + if ($request->attributes->get('_extended', false)) { + return [ + 'results.subdefs', + 'results.metadata', + 'results.caption', + 'results.status', + ]; } - return [ - 'results.subdefs', - 'results.metadata', - 'results.caption', - 'results.status', - ]; + return []; } /** diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionDataRepositoryFactory.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionDataRepositoryFactory.php new file mode 100644 index 0000000000..12faab9deb --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/Caption/CaptionDataRepositoryFactory.php @@ -0,0 +1,43 @@ +connectionProvider = $connectionProvider; + $this->cache = $cache; + } + + public function createRepositoryFor($databoxId) + { + return new CachedCaptionDataRepository( + new DbalCaptionDataRepository($this->connectionProvider->getConnection($databoxId)), + $this->cache, + sprintf('databox[%d]:', $databoxId) + ); + } +} diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepository.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepository.php index eb9cee0a77..e66de9b226 100644 --- a/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepository.php @@ -10,8 +10,6 @@ namespace Alchemy\Phrasea\Databox\Caption; -use Assert\Assertion; - class CaptionRepository { /** diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepositoryFactory.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepositoryFactory.php deleted file mode 100644 index d48ab0e395..0000000000 --- a/lib/Alchemy/Phrasea/Databox/Caption/CaptionRepositoryFactory.php +++ /dev/null @@ -1,60 +0,0 @@ -connectionProvider = $connectionProvider; - $this->cache = $cache; - $this->captionFactoryProvider = $captionFactoryProvider; - } - - public function createRepositoryFor($databoxId) - { - $connection = $this->connectionProvider->getConnection($databoxId); - - $dbalRepository = new DbalCaptionDataRepository($connection); - $dataRepository = new CachedCaptionDataRepository($dbalRepository, $this->cache, sprintf('databox[%d]:', $databoxId)); - - $provider = $this->captionFactoryProvider; - $factory = $provider($databoxId); - - if (!is_callable($factory)) { - throw new \UnexpectedValueException(sprintf( - 'Caption factory is expected to be callable, got %s', - is_object($factory) ? get_class($factory) : gettype($factory) - )); - } - - return new CaptionRepository($dataRepository, $factory); - } -} diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionServiceProvider.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionServiceProvider.php index bc5cbee3bf..3f63153e33 100644 --- a/lib/Alchemy/Phrasea/Databox/Caption/CaptionServiceProvider.php +++ b/lib/Alchemy/Phrasea/Databox/Caption/CaptionServiceProvider.php @@ -11,6 +11,7 @@ namespace Alchemy\Phrasea\Databox\Caption; use Alchemy\Phrasea\Controller\LazyLocator; +use Alchemy\Phrasea\Databox\ClosureDataboxBoundRepositoryFactory; use Alchemy\Phrasea\Databox\DataboxBoundRepositoryProvider; use Alchemy\Phrasea\Databox\DataboxConnectionProvider; use Alchemy\Phrasea\Record\RecordReference; @@ -29,13 +30,26 @@ class CaptionServiceProvider implements ServiceProviderInterface }; }); + $app['provider.data_repo.caption'] = $app->share(function (Application $app) { + return new DataboxBoundRepositoryProvider(new CaptionDataRepositoryFactory( + new DataboxConnectionProvider($app['phraseanet.appbox']), + $app['cache'] + )); + }); + $app['provider.repo.caption'] = $app->share(function (Application $app) { - $connectionProvider = new DataboxConnectionProvider($app['phraseanet.appbox']); - $factoryProvider = $app['provider.factory.caption']; + return new DataboxBoundRepositoryProvider( + new ClosureDataboxBoundRepositoryFactory(function ($databoxId) use ($app) { + /** @var CaptionDataRepository $dataRepository */ + $dataRepository = $app['provider.data_repo.caption']->getRepositoryForDatabox($databoxId); + $captionFactoryProvider = $app['provider.factory.caption']; - $repositoryFactory = new CaptionRepositoryFactory($connectionProvider, $app['cache'], $factoryProvider); - - return new DataboxBoundRepositoryProvider($repositoryFactory); + return new CaptionRepository( + $dataRepository, + $captionFactoryProvider($databoxId) + ); + }) + ); }); $app['service.caption'] = $app->share(function (Application $app) { @@ -45,6 +59,6 @@ class CaptionServiceProvider implements ServiceProviderInterface public function boot(Application $app) { - $app['dispatcher']->addSubscriber(new CaptionCacheInvalider(new LazyLocator($app, 'provider.repo.caption'))); + $app['dispatcher']->addSubscriber(new CaptionCacheInvalider(new LazyLocator($app, 'provider.data_repo.caption'))); } } diff --git a/lib/Alchemy/Phrasea/Databox/ClosureDataboxBoundRepositoryFactory.php b/lib/Alchemy/Phrasea/Databox/ClosureDataboxBoundRepositoryFactory.php new file mode 100644 index 0000000000..88776f4bb5 --- /dev/null +++ b/lib/Alchemy/Phrasea/Databox/ClosureDataboxBoundRepositoryFactory.php @@ -0,0 +1,31 @@ +factory = $factory; + } + + public function createRepositoryFor($databoxId) + { + $factory = $this->factory; + + return $factory($databoxId); + } +} From b61a8a74181ea96562287e550c678c6376b7b550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Tue, 10 May 2016 18:10:08 +0200 Subject: [PATCH 272/383] Fixup calls order to avoid N+1 --- .../Phrasea/Controller/Api/V1Controller.php | 4 +-- lib/classes/caption/record.php | 30 +++++++++---------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index d142e5b27a..10109e1743 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -1153,6 +1153,8 @@ class V1Controller extends Controller { $references = new RecordReferenceCollection($result->getResults()); + $recordViews = $this->buildRecordViews($references); + $subdefViews = $this->buildSubdefsViews( $references, in_array('results.subdefs', $includes, true) ? null : ['thumbnail'], @@ -1161,8 +1163,6 @@ class V1Controller extends Controller $technicalDatasets = $this->app['service.technical_data']->fetchRecordsTechnicalData($references); - $recordViews = $this->buildRecordViews($references); - foreach ($recordViews as $index => $recordView) { $recordView->setSubdefs($subdefViews[$index]); $recordView->setTechnicalDataView(new TechnicalDataView($technicalDatasets[$index])); diff --git a/lib/classes/caption/record.php b/lib/classes/caption/record.php index 2b90d0a3d3..478cf909a7 100644 --- a/lib/classes/caption/record.php +++ b/lib/classes/caption/record.php @@ -9,6 +9,7 @@ */ use Alchemy\Phrasea\Application; +use Alchemy\Phrasea\Databox\Caption\CachedCaptionDataRepository; use Alchemy\Phrasea\Model\RecordReferenceInterface; use Alchemy\Phrasea\Model\Serializer\CaptionSerializer; @@ -67,23 +68,9 @@ class caption_record implements cache_cacheableInterface return $this->fields; } - try { - $fields = $this->get_data_from_cache(); - } catch (\Exception $e) { - $sql = <<<'SQL' -SELECT m.id AS meta_id, s.id AS structure_id, value, VocabularyType, VocabularyId -FROM metadatas m INNER JOIN metadatas_structure s ON s.id = m.meta_struct_id -WHERE m.record_id = :record_id -ORDER BY s.sorter ASC -SQL; - $fields = $this->getDatabox()->get_connection() - ->executeQuery($sql, [':record_id' => $this->record->getRecordId()]) - ->fetchAll(PDO::FETCH_ASSOC); + $data = $this->getDataRepository()->findByRecordIds([$this->getRecordReference()->getRecordId()]); - $this->set_data_to_cache($fields); - } - - $this->fields = $this->mapFieldsFromData($fields); + $this->fields = $this->mapFieldsFromData(array_shift($data)); return $this->fields; } @@ -253,6 +240,8 @@ SQL; { $this->fields = null; + $this->getDataRepository()->invalidate($this->getRecordReference()->getRecordId()); + return $this->getDatabox()->delete_data_from_cache($this->get_cache_key($option)); } @@ -332,4 +321,13 @@ SQL; return $rec_fields; } + + /** + * @return CachedCaptionDataRepository + */ + private function getDataRepository() + { + return $this->app['provider.data_repo.caption'] + ->getRepositoryForDatabox($this->getRecordReference()->getDataboxId()); + } } From 7da4a65a930ac6c7580818a35eca5575434d9042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 12 May 2016 14:41:40 +0200 Subject: [PATCH 273/383] Handle non unique recordIds in Repositories --- .../Phrasea/Databox/Caption/CachedCaptionDataRepository.php | 2 +- .../Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CachedCaptionDataRepository.php b/lib/Alchemy/Phrasea/Databox/Caption/CachedCaptionDataRepository.php index f10c3e4f00..cdb31aa701 100644 --- a/lib/Alchemy/Phrasea/Databox/Caption/CachedCaptionDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Caption/CachedCaptionDataRepository.php @@ -102,7 +102,7 @@ class CachedCaptionDataRepository implements CaptionDataRepository */ private function computeKeys(array $recordIds) { - return array_map([$this, 'computeKey'], $recordIds); + return array_map([$this, 'computeKey'], array_unique($recordIds)); } /** diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php index 712575c628..f2f147bc2b 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/CachedMediaSubdefDataRepository.php @@ -151,11 +151,12 @@ class CachedMediaSubdefDataRepository implements MediaSubdefDataRepository */ private function generateCacheKeys(array $recordIds, array $names) { + $names = array_unique($names); $namesCount = count($names); $keys = array_map(function ($recordId) use ($namesCount, $names) { return array_map([$this, 'getCacheKey'], array_fill(0, $namesCount, $recordId), $names); - }, $recordIds); + }, array_unique($recordIds)); return $keys ? call_user_func_array('array_merge', $keys) : []; } From 9842af9b1aab83cbc22cc1855408618b23e0a09f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 12 May 2016 14:43:50 +0200 Subject: [PATCH 274/383] Error in Assertion in OrderElement add --- .../Order/Controller/BaseOrderController.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/Alchemy/Phrasea/Order/Controller/BaseOrderController.php b/lib/Alchemy/Phrasea/Order/Controller/BaseOrderController.php index 14f10cb5da..dfb3ecc3c4 100644 --- a/lib/Alchemy/Phrasea/Order/Controller/BaseOrderController.php +++ b/lib/Alchemy/Phrasea/Order/Controller/BaseOrderController.php @@ -187,20 +187,23 @@ class BaseOrderController extends Controller return; } - $references = new RecordReferenceCollection(); + $basketReferences = new RecordReferenceCollection(); - $basket->getElements()->forAll(function (BasketElement $element) use ($references) { - $references->addRecordReference($element->getSbasId(), $element->getRecordId()); + $basket->getElements()->forAll(function (BasketElement $element) use ($basketReferences) { + $basketReferences->addRecordReference($element->getSbasId(), $element->getRecordId()); }); + $toAddReferences = new RecordReferenceCollection(); + foreach ($elements as $element) { - $references->addRecordReference($element->getSbasId(), $element->getRecordId()); + $toAddReferences->addRecordReference($element->getSbasId(), $element->getRecordId()); } - $groups = $references->groupPerDataboxId(); + foreach ($toAddReferences->getDataboxIds() as $databoxId) { + $toAddRecordIds = $toAddReferences->getDataboxRecordIds($databoxId); + $basketRecordIds = $basketReferences->getDataboxRecordIds($databoxId); - foreach ($basket->getElements() as $element) { - if (isset($groups[$element->getSbasId()][$element->getRecordId()])) { + if (array_intersect($toAddRecordIds, $basketRecordIds)) { throw new ConflictHttpException('Some records have already been handled'); } } From b80a2767fb544db04de92ef58fda6b723b003538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 12 May 2016 14:43:13 +0200 Subject: [PATCH 275/383] Remove groupByDataboxIds method as not safe --- .../Databox/Caption/CaptionService.php | 27 +++++++--- .../Databox/Subdef/MediaSubdefService.php | 27 +++++++--- .../Phrasea/Media/TechnicalDataService.php | 19 +++++-- .../Record/RecordReferenceCollection.php | 52 +++++++------------ 4 files changed, 74 insertions(+), 51 deletions(-) diff --git a/lib/Alchemy/Phrasea/Databox/Caption/CaptionService.php b/lib/Alchemy/Phrasea/Databox/Caption/CaptionService.php index b7c3db9b33..42fa2f4a3e 100644 --- a/lib/Alchemy/Phrasea/Databox/Caption/CaptionService.php +++ b/lib/Alchemy/Phrasea/Databox/Caption/CaptionService.php @@ -32,10 +32,10 @@ class CaptionService $groups = []; - foreach ($references->groupPerDataboxId() as $databoxId => $indexes) { - $captions = $this->getRepositoryForDatabox($databoxId)->findByRecordIds(array_keys($indexes)); + foreach ($references->getDataboxIds() as $databoxId) { + $recordIds = $references->getDataboxRecordIds($databoxId); - $groups[$databoxId] = array_combine($indexes, $captions); + $groups[$databoxId] = $this->getRepositoryForDatabox($databoxId)->findByRecordIds($recordIds); } return $this->reorderInstances($references, $groups); @@ -72,10 +72,25 @@ class CaptionService { $captions = []; - foreach ($references as $index => $reference) { - $captions[$index] = $groups[$reference->getDataboxId()][$index]; + foreach ($groups as $databoxId => $group) { + $captions[$databoxId] = array_reduce($group, function (array &$carry, \caption_record $caption) { + $carry[$caption->getRecordReference()->getRecordId()] = $caption; + + return $carry; + }, []); } - return $captions; + $instances = []; + + foreach ($references as $index => $reference) { + $databoxId = $reference->getDataboxId(); + $recordId = $reference->getRecordId(); + + if (isset($captions[$databoxId][$recordId])) { + $instances[$index] = $captions[$databoxId][$recordId]; + } + } + + return $instances; } } diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php index af26adff99..23802b9424 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php @@ -37,12 +37,23 @@ class MediaSubdefService { $subdefs = $this->reduceRecordReferenceCollection( $records, - function (array &$carry, array $subdefs, array $indexes) { + function (array &$carry, array $subdefs, array $references) { + $subdefsByRecordId = []; + /** @var \media_subdef $subdef */ foreach ($subdefs as $subdef) { - $index = $indexes[$subdef->get_record_id()]; + $recordId = $subdef->get_record_id(); - $carry[$index][$subdef->get_name()] = $subdef; + if (!isset($subdefsByRecordId[$recordId])) { + $subdefsByRecordId[$recordId] = []; + } + + $subdefsByRecordId[$recordId][$subdef->get_name()] = $subdef; + } + + /** @var RecordReferenceInterface $reference */ + foreach ($references as $index => $reference) { + $carry[$index] = $subdefsByRecordId[$reference->getRecordId()]; } return $carry; @@ -98,11 +109,13 @@ class MediaSubdefService $carry = $initialValue; - foreach ($records->groupPerDataboxId() as $databoxId => $indexes) { - $subdefs = $this->getRepositoryForDatabox($databoxId) - ->findByRecordIdsAndNames(array_keys($indexes), $names); + foreach ($records->getDataboxIds() as $databoxId) { + $recordIds = $records->getDataboxRecordIds($databoxId); - $carry = $process($carry, $subdefs, $indexes, $databoxId); + $subdefs = $this->getRepositoryForDatabox($databoxId) + ->findByRecordIdsAndNames($recordIds, $names); + + $carry = $process($carry, $subdefs, $records->getDataboxGroup($databoxId), $databoxId); } return $carry; diff --git a/lib/Alchemy/Phrasea/Media/TechnicalDataService.php b/lib/Alchemy/Phrasea/Media/TechnicalDataService.php index 0d443d0228..977c9b0d1f 100644 --- a/lib/Alchemy/Phrasea/Media/TechnicalDataService.php +++ b/lib/Alchemy/Phrasea/Media/TechnicalDataService.php @@ -37,18 +37,27 @@ class TechnicalDataService $sets = []; - foreach ($references->groupPerDataboxId() as $databoxId => $indexes) { - foreach ($this->provider->getRepositoryFor($databoxId)->findByRecordIds(array_keys($indexes)) as $set) { - $index = $indexes[$set->getRecordId()]; + foreach ($references->getDataboxIds() as $databoxId) { + $recordIds = $references->getDataboxRecordIds($databoxId); - $sets[$index] = $set; + $setPerRecordId = []; + + foreach ($this->provider->getRepositoryFor($databoxId)->findByRecordIds($recordIds) as $set) { + $setPerRecordId[$set->getRecordId()] = $set; } + + $sets[$databoxId] = $setPerRecordId; } $reorder = []; foreach ($references as $index => $reference) { - $reorder[$index] = isset($sets[$index]) ? $sets[$index] : new RecordTechnicalDataSet($reference->getRecordId()); + $databoxId = $reference->getDataboxId(); + $recordId = $reference->getRecordId(); + + $reorder[$index] = isset($sets[$databoxId][$recordId]) + ? $sets[$databoxId][$recordId] + : new RecordTechnicalDataSet($recordId); } return $reorder; diff --git a/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php b/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php index 787bbe5f93..0fb616fc25 100644 --- a/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php +++ b/lib/Alchemy/Phrasea/Record/RecordReferenceCollection.php @@ -127,34 +127,16 @@ class RecordReferenceCollection implements \IteratorAggregate, \ArrayAccess, \Co return new \ArrayIterator($this->references); } - /** - * @return array> - */ - public function groupPerDataboxId() - { - if (null === $this->groups) { - $this->groups = []; - - foreach ($this->references as $index => $reference) { - $databoxId = $reference->getDataboxId(); - - if (!isset($this->groups[$databoxId])) { - $this->groups[$databoxId] = []; - } - - $this->groups[$databoxId][$reference->getRecordId()] = $index; - } - } - - return $this->groups; - } - /** * @return array */ public function getDataboxIds() { - return array_keys($this->groupPerDataboxId()); + if (null === $this->groups) { + $this->reorderGroups(); + } + + return array_keys($this->groups); } /** @@ -163,12 +145,11 @@ class RecordReferenceCollection implements \IteratorAggregate, \ArrayAccess, \Co */ public function toRecords(\appbox $appbox) { - $groups = $this->groupPerDataboxId(); - $records = []; - foreach ($groups as $databoxId => $recordIds) { + foreach ($this->getDataboxIds() as $databoxId) { $databox = $appbox->get_databox($databoxId); + $recordIds = $this->getDataboxRecordIds($databoxId); foreach ($databox->getRecordRepository()->findByRecordIds(array_keys($recordIds)) as $record) { $records[$recordIds[$record->getRecordId()]] = $record; @@ -237,14 +218,16 @@ class RecordReferenceCollection implements \IteratorAggregate, \ArrayAccess, \Co */ public function groupByDatabox() { - $this->reorderGroups(); + if (null === $this->groups) { + $this->reorderGroups(); + } return $this->groups; } public function reorderGroups() { - if ($this->groups) { + if (null !== $this->groups) { return; } @@ -267,20 +250,23 @@ class RecordReferenceCollection implements \IteratorAggregate, \ArrayAccess, \Co */ public function getDataboxGroup($databoxId) { - $this->reorderGroups(); + // avoid call to reorderGroups when not needed + if (null === $this->groups) { + $this->reorderGroups(); + } return isset($this->groups[$databoxId]) ? $this->groups[$databoxId] : []; } public function getDataboxRecordIds($databoxId) { - $recordsIds = []; + $indexes = []; - foreach ($this->getDataboxGroup($databoxId) as $references) { - $recordsIds[$references->getRecordId()] = true; + foreach ($this->getDataboxGroup($databoxId) as $index => $references) { + $indexes[$references->getRecordId()] = $index; } - return array_keys($recordsIds); + return array_flip($indexes); } public function count() From 40fafd73148c365a8445dfcd1a457af08db8d483 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 12 May 2016 16:28:14 +0200 Subject: [PATCH 276/383] PHRAS-1101_THMB-TRAIN-IN-PREVIEW #time 30m fix test, set initial values for searchengineoptions --- .../Phrasea/SearchEngine/SearchEngineOptions.php | 4 ++-- .../Phrasea/SearchEngine/SearchEngineOptionsTest.php | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php index 9bc7ca7f72..eefd8bcd72 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php +++ b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php @@ -127,9 +127,9 @@ class SearchEngineOptions } /** @var string */ - protected $record_type; + protected $record_type = self::TYPE_ALL; - protected $search_type = 0; + protected $search_type = self::RECORD_RECORD; /** @var \collection[] */ protected $collections = []; /** @var null|\databox[] */ diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php index ef9e66cf31..7ebe080917 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/SearchEngineOptionsTest.php @@ -21,11 +21,13 @@ class SearchEngineOptionsTest extends \PhraseanetTestCase $app = self::$DI['app']; /** @var \collection $collection */ $collection = self::$DI['collection']; + $collections[$collection->get_base_id()] = $collection; $options = new SearchEngineOptions($app); - $options->onCollections([$collection]); - - $options->allowBusinessFieldsOn([$collection]); + $options->onCollections($collections); + $options->setRecordType(SearchEngineOptions::TYPE_ALL); + $options->setSearchType(SearchEngineOptions::RECORD_RECORD); + $options->allowBusinessFieldsOn($collections); foreach ($collection->get_databox()->get_meta_structure() as $field) { $options->setFields([$field]); @@ -35,9 +37,9 @@ class SearchEngineOptionsTest extends \PhraseanetTestCase $min_date = new \DateTime('-5 days'); $max_date = new \DateTime('+5 days'); - $options->setMinDate(\DateTime::createFromFormat(DATE_ATOM, $min_date->format(DATE_ATOM))); $options->setMaxDate(\DateTime::createFromFormat(DATE_ATOM, $max_date->format(DATE_ATOM))); + $options->setFirstResult(3); $options->setMaxResults(42); From 3139fccecc9dae57c6ddb1710f40873264fdfb45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Fri, 13 May 2016 15:50:06 +0200 Subject: [PATCH 277/383] Add some fractal utility classes --- .../Phrasea/Controller/Api/V1Controller.php | 244 ++++++++++++++---- .../Phrasea/Fractal/CallbackTransformer.php | 37 +++ .../Phrasea/Fractal/IncludeResolver.php | 77 ++++++ lib/Alchemy/Phrasea/Fractal/NullResource.php | 26 ++ .../ResourceTransformerAccessibleScope.php | 49 ++++ .../SearchResultTransformerResolver.php | 38 +++ .../Phrasea/Fractal/TransformerResolver.php | 22 ++ .../Phrasea/Media/TechnicalDataService.php | 6 +- .../Record/RecordReferenceCollection.php | 29 +-- 9 files changed, 459 insertions(+), 69 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Fractal/CallbackTransformer.php create mode 100644 lib/Alchemy/Phrasea/Fractal/IncludeResolver.php create mode 100644 lib/Alchemy/Phrasea/Fractal/NullResource.php create mode 100644 lib/Alchemy/Phrasea/Fractal/ResourceTransformerAccessibleScope.php create mode 100644 lib/Alchemy/Phrasea/Fractal/SearchResultTransformerResolver.php create mode 100644 lib/Alchemy/Phrasea/Fractal/TransformerResolver.php diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index 10109e1743..b9855c56db 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -29,10 +29,14 @@ use Alchemy\Phrasea\Controller\Controller; use Alchemy\Phrasea\Core\Event\RecordEdit; use Alchemy\Phrasea\Core\PhraseaEvents; use Alchemy\Phrasea\Core\Version; +use Alchemy\Phrasea\Databox\DataboxGroupable; use Alchemy\Phrasea\Feed\Aggregate; use Alchemy\Phrasea\Feed\FeedInterface; use Alchemy\Phrasea\Form\Login\PhraseaRenewPasswordForm; use Alchemy\Phrasea\Fractal\ArraySerializer; +use Alchemy\Phrasea\Fractal\CallbackTransformer; +use Alchemy\Phrasea\Fractal\IncludeResolver; +use Alchemy\Phrasea\Fractal\SearchResultTransformerResolver; use Alchemy\Phrasea\Model\Entities\ApiOauthToken; use Alchemy\Phrasea\Model\Entities\Basket; use Alchemy\Phrasea\Model\Entities\BasketElement; @@ -54,6 +58,7 @@ use Alchemy\Phrasea\Model\Repositories\FeedEntryRepository; use Alchemy\Phrasea\Model\Repositories\FeedRepository; use Alchemy\Phrasea\Model\Repositories\LazaretFileRepository; use Alchemy\Phrasea\Model\Repositories\TaskRepository; +use Alchemy\Phrasea\Record\RecordCollection; use Alchemy\Phrasea\Record\RecordReferenceCollection; use Alchemy\Phrasea\Search\CaptionView; use Alchemy\Phrasea\Search\PermalinkTransformer; @@ -1051,17 +1056,45 @@ class V1Controller extends Controller */ public function searchAction(Request $request) { + $subdefTransformer = new SubdefTransformer($this->app['acl'], $this->getAuthenticatedUser(), new PermalinkTransformer()); + $technicalDataTransformer = new TechnicalDataTransformer(); + $recordTransformer = new RecordTransformer($subdefTransformer, $technicalDataTransformer); + $storyTransformer = new StoryTransformer($subdefTransformer, $recordTransformer); + $compositeTransformer = new V1SearchCompositeResultTransformer($recordTransformer, $storyTransformer); + $searchTransformer = new V1SearchResultTransformer($compositeTransformer); + + $transformerResolver = new SearchResultTransformerResolver([ + '' => $searchTransformer, + 'results' => $compositeTransformer, + 'results.stories' => $storyTransformer, + 'results.stories.thumbnail' => $subdefTransformer, + 'results.stories.metadatas' => new CallbackTransformer(), + 'results.stories.records' => $recordTransformer, + 'results.stories.records.thumbnail' => $subdefTransformer, + 'results.stories.records.technical_informations' => $technicalDataTransformer, + 'results.stories.records.subdefs' => $subdefTransformer, + 'results.stories.records.metadata' => new CallbackTransformer(), + 'results.stories.records.status' => new CallbackTransformer(), + 'results.stories.records.caption' => new CallbackTransformer(), + 'results.records' => $recordTransformer, + 'results.records.thumbnail' => $subdefTransformer, + 'results.records.technical_informations' => $technicalDataTransformer, + 'results.records.subdefs' => $subdefTransformer, + 'results.records.metadata' => new CallbackTransformer(), + 'results.records.status' => new CallbackTransformer(), + 'results.records.caption' => new CallbackTransformer(), + ]); + $includeResolver = new IncludeResolver($transformerResolver); + $fractal = new \League\Fractal\Manager(); $fractal->setSerializer(new ArraySerializer()); $fractal->parseIncludes($this->resolveSearchIncludes($request)); - $searchView = $this->buildSearchView($this->doSearch($request)); - - $subdefTransformer = new SubdefTransformer($this->app['acl'], $this->getAuthenticatedUser(), new PermalinkTransformer()); - $recordTransformer = new RecordTransformer($subdefTransformer, new TechnicalDataTransformer()); - $storyTransformer = new StoryTransformer($subdefTransformer, $recordTransformer); - $compositeTransformer = new V1SearchCompositeResultTransformer($recordTransformer, $storyTransformer); - $searchTransformer = new V1SearchResultTransformer($compositeTransformer); + $searchView = $this->buildSearchView( + $this->doSearch($request), + $includeResolver->resolve($fractal), + $this->resolveSubdefUrlTTL($request) + ); $ret = $fractal->createData(new Item($searchView, $searchTransformer))->toArray(); @@ -1100,41 +1133,119 @@ class V1Controller extends Controller /** * @param SearchEngineResult $result + * @param string[] $includes + * @param int $urlTTL * @return SearchResultView */ - private function buildSearchView(SearchEngineResult $result) + private function buildSearchView(SearchEngineResult $result, array $includes, $urlTTL) { - $references = new RecordReferenceCollection($result->getResults()); - $records = []; - $stories = []; + $records = new RecordCollection(); + $stories = new RecordCollection(); foreach ($references->toRecords($this->getApplicationBox()) as $record) { if ($record->isStory()) { - $stories[] = $record; + $stories[$record->getId()] = $record; } else { - $records[] = $record; + $records[$record->getId()] = $record; } } $resultView = new SearchResultView($result); - if ($stories) { - $storyViews = []; + if ($stories->count() > 0) { + $user = $this->getAuthenticatedUser(); + $children = []; - foreach ($stories as $story) { - $storyViews[] = new StoryView($story); + foreach ($stories->getDataboxIds() as $databoxId) { + $storyIds = $stories->getDataboxRecordIds($databoxId); + + $selections = $this->findDataboxById($databoxId) + ->getRecordRepository() + ->findChildren($storyIds, $user); + $children[$databoxId] = array_combine($storyIds, $selections); + } + + /** @var StoryView[] $storyViews */ + $storyViews = []; + /** @var RecordView[] $childrenViews */ + $childrenViews = []; + + foreach ($stories as $index => $story) { + $storyView = new StoryView($story); + + $selection = $children[$story->getDataboxId()][$story->getRecordId()]; + + $childrenView = $this->buildRecordViews($selection); + + foreach ($childrenView as $view) { + $childrenViews[spl_object_hash($view)] = $view; + } + + $storyView->setChildren($childrenView); + + $storyViews[$index] = $storyView; + } + + if (in_array('results.stories.thumbnail', $includes, true)) { + $subdefViews = $this->buildSubdefsViews($stories, ['thumbnail'], $urlTTL); + + foreach ($storyViews as $index => $storyView) { + $storyView->setSubdefs($subdefViews[$index]); + } + } + + if (in_array('results.stories.metadatas', $includes, true)) { + $captions = $this->app['service.caption']->findByReferenceCollection($stories); + $canSeeBusiness = $this->retrieveSeeBusinessPerDatabox($stories); + + $this->buildCaptionViews($storyViews, $captions, $canSeeBusiness); + } + + $allChildren = new RecordCollection(); + foreach ($childrenViews as $index => $childrenView) { + $allChildren[$index] = $childrenView->getRecord(); + } + + $names = in_array('results.stories.records.subdefs', $includes, true) ? null : ['thumbnail']; + $subdefViews = $this->buildSubdefsViews($allChildren, $names, $urlTTL); + $technicalDatasets = $this->app['service.technical_data']->fetchRecordsTechnicalData($allChildren); + + $newHashes = []; + foreach ($childrenViews as $index => $recordView) { + $newHashes[spl_object_hash($recordView)] = $recordView; + $recordView->setSubdefs($subdefViews[$index]); + $recordView->setTechnicalDataView(new TechnicalDataView($technicalDatasets[$index])); + } + + if (array_intersect($includes, ['results.stories.records.metadata', 'results.stories.records.caption'])) { + $captions = $this->app['service.caption']->findByReferenceCollection($allChildren); + $canSeeBusiness = $this->retrieveSeeBusinessPerDatabox($allChildren); + + $this->buildCaptionViews($childrenViews, $captions, $canSeeBusiness); } $resultView->setStories($storyViews); } - if ($records) { - $recordViews = []; + if ($records->count() > 0) { + $names = in_array('results.records.subdefs', $includes, true) ? null : ['thumbnail']; + $recordViews = $this->buildRecordViews($records); + $subdefViews = $this->buildSubdefsViews($records, $names, $urlTTL); - foreach ($records as $record) { - $recordViews[] = new RecordView($record); + $technicalDatasets = $this->app['service.technical_data']->fetchRecordsTechnicalData($records); + + foreach ($recordViews as $index => $recordView) { + $recordView->setSubdefs($subdefViews[$index]); + $recordView->setTechnicalDataView(new TechnicalDataView($technicalDatasets[$index])); + } + + if (array_intersect($includes, ['results.records.metadata', 'results.records.caption'])) { + $captions = $this->app['service.caption']->findByReferenceCollection($records); + $canSeeBusiness = $this->retrieveSeeBusinessPerDatabox($records); + + $this->buildCaptionViews($recordViews, $captions, $canSeeBusiness); } $resultView->setRecords($recordViews); @@ -1153,14 +1264,10 @@ class V1Controller extends Controller { $references = new RecordReferenceCollection($result->getResults()); + $names = in_array('results.subdefs', $includes, true) ? null : ['thumbnail']; + $recordViews = $this->buildRecordViews($references); - - $subdefViews = $this->buildSubdefsViews( - $references, - in_array('results.subdefs', $includes, true) ? null : ['thumbnail'], - $urlTTL - ); - + $subdefViews = $this->buildSubdefsViews($references, $names, $urlTTL); $technicalDatasets = $this->app['service.technical_data']->fetchRecordsTechnicalData($references); foreach ($recordViews as $index => $recordView) { @@ -1169,26 +1276,10 @@ class V1Controller extends Controller } if (array_intersect($includes, ['results.metadata', 'results.caption'])) { - $acl = $this->getAclForUser(); - - $canSeeBusiness = []; - - foreach ($references->getDataboxIds() as $databoxId) { - $canSeeBusiness[$databoxId] = $acl->can_see_business_fields($this->findDataboxById($databoxId)); - } - $captions = $this->app['service.caption']->findByReferenceCollection($references); + $canSeeBusiness = $this->retrieveSeeBusinessPerDatabox($references); - foreach ($recordViews as $index => $recordView) { - $caption = $captions[$index]; - - $captionView = new CaptionView($caption); - - $databoxId = $recordView->getRecord()->getDataboxId(); - $captionView->setFields($caption->get_fields(null, $canSeeBusiness[$databoxId])); - - $recordView->setCaption($captionView); - } + $this->buildCaptionViews($recordViews, $captions, $canSeeBusiness); } $resultView = new SearchResultView($result); @@ -1198,12 +1289,12 @@ class V1Controller extends Controller } /** - * @param RecordReferenceCollection $references + * @param RecordReferenceInterface[]|RecordReferenceCollection|DataboxGroupable $references * @param array|null $names * @param int $urlTTL * @return SubdefView[][] */ - private function buildSubdefsViews(RecordReferenceCollection $references, array $names = null, $urlTTL) + private function buildSubdefsViews($references, array $names = null, $urlTTL) { $subdefGroups = $this->app['service.media_subdef'] ->findSubdefsByRecordReferenceFromCollection($references, $names); @@ -2854,17 +2945,68 @@ class V1Controller extends Controller } /** - * @param RecordReferenceCollection $references + * @param RecordReferenceCollection|RecordCollection|\record_adapter[] $references * @return RecordView[] */ - private function buildRecordViews(RecordReferenceCollection $references) + private function buildRecordViews($references) { + if ($references instanceof RecordReferenceCollection) { + $references = new RecordCollection($references->toRecords($this->getApplicationBox())); + } elseif (!$references instanceof RecordCollection) { + $references = new RecordCollection($references); + } + $recordViews = []; - foreach ($references->toRecords($this->getApplicationBox()) as $index => $record) { + foreach ($references as $index => $record) { $recordViews[$index] = new RecordView($record); } return $recordViews; } + + /** + * @param RecordReferenceInterface[]|DataboxGroupable $references + * @return array + */ + private function retrieveSeeBusinessPerDatabox($references) + { + if (!$references instanceof DataboxGroupable) { + $references = new RecordReferenceCollection($references); + } + + $acl = $this->getAclForUser(); + + $canSeeBusiness = []; + + foreach ($references->getDataboxIds() as $databoxId) { + $canSeeBusiness[$databoxId] = $acl->can_see_business_fields($this->findDataboxById($databoxId)); + } + + $rights = []; + + foreach ($references as $index => $reference) { + $rights[$index] = $canSeeBusiness[$reference->getDataboxId()]; + } + + return $rights; + } + + /** + * @param RecordView[] $recordViews + * @param \caption_record[] $captions + * @param bool[] $canSeeBusiness + */ + private function buildCaptionViews($recordViews, $captions, $canSeeBusiness) + { + foreach ($recordViews as $index => $recordView) { + $caption = $captions[$index]; + + $captionView = new CaptionView($caption); + + $captionView->setFields($caption->get_fields(null, isset($canSeeBusiness[$index]) && (bool)$canSeeBusiness[$index])); + + $recordView->setCaption($captionView); + } + } } diff --git a/lib/Alchemy/Phrasea/Fractal/CallbackTransformer.php b/lib/Alchemy/Phrasea/Fractal/CallbackTransformer.php new file mode 100644 index 0000000000..41fb5df8ac --- /dev/null +++ b/lib/Alchemy/Phrasea/Fractal/CallbackTransformer.php @@ -0,0 +1,37 @@ +callback = $callback; + } + + public function transform() + { + return call_user_func_array($this->callback, func_get_args()); + } +} diff --git a/lib/Alchemy/Phrasea/Fractal/IncludeResolver.php b/lib/Alchemy/Phrasea/Fractal/IncludeResolver.php new file mode 100644 index 0000000000..df76ac97a3 --- /dev/null +++ b/lib/Alchemy/Phrasea/Fractal/IncludeResolver.php @@ -0,0 +1,77 @@ +transformerResolver = $transformerResolver; + } + + /** + * @param Manager $manager + * @return array + */ + public function resolve(Manager $manager) + { + $scope = new ResourceTransformerAccessibleScope($manager, $this->createNullResource()); + $scopes = []; + + $this->appendScopeIdentifiers($scopes, $scope); + + return array_values(array_filter($scopes)); + } + + private function appendScopeIdentifiers(array &$scopes, ResourceTransformerAccessibleScope $scope) + { + foreach ($this->figureOutWhichIncludes($scope) as $include) { + $scopeIdentifier = $scope->getIdentifier($include); + + $scopes[] = $scopeIdentifier; + + $childScope = $scope->createChildScope($include, $this->createNullResource($scopeIdentifier)); + + $this->appendScopeIdentifiers($scopes, $childScope); + } + } + + private function figureOutWhichIncludes(ResourceTransformerAccessibleScope $scope) + { + $transformer = $scope->getResourceTransformer(); + + $includes = $transformer->getDefaultIncludes(); + + foreach ($transformer->getAvailableIncludes() as $include) { + if ($scope->isRequested($include)) { + $includes[] = $include; + } + } + + return array_values(array_filter(array_unique($includes))); + } + + /** + * @param string $scopeIdentifier + * @return NullResource + */ + private function createNullResource($scopeIdentifier = '') + { + return new NullResource($this->transformerResolver->resolve($scopeIdentifier)); + } +} diff --git a/lib/Alchemy/Phrasea/Fractal/NullResource.php b/lib/Alchemy/Phrasea/Fractal/NullResource.php new file mode 100644 index 0000000000..edc3aa61b8 --- /dev/null +++ b/lib/Alchemy/Phrasea/Fractal/NullResource.php @@ -0,0 +1,26 @@ +resource->getTransformer(); + + if ($transformer instanceof TransformerAbstract) { + return $transformer; + } + + return new CallbackTransformer($transformer); + } + + /** + * @param string $scopeIdentifier + * @param ResourceInterface $resource + * @return ResourceTransformerAccessibleScope + */ + public function createChildScope($scopeIdentifier, ResourceInterface $resource) + { + $child = new self($this->manager, $resource, $scopeIdentifier); + + $scopeArray = $this->getParentScopes(); + $scopeArray[] = $this->getScopeIdentifier(); + + $child->setParentScopes($scopeArray); + + return $child; + } +} diff --git a/lib/Alchemy/Phrasea/Fractal/SearchResultTransformerResolver.php b/lib/Alchemy/Phrasea/Fractal/SearchResultTransformerResolver.php new file mode 100644 index 0000000000..b935a041e6 --- /dev/null +++ b/lib/Alchemy/Phrasea/Fractal/SearchResultTransformerResolver.php @@ -0,0 +1,38 @@ +transformers = $transformers; + } + + public function resolve($scopeIdentifier) + { + if (!isset($this->transformers[$scopeIdentifier])) { + throw new \RuntimeException(sprintf('Unknown scope identifier: %s', $scopeIdentifier)); + } + + return $this->transformers[$scopeIdentifier]; + } +} diff --git a/lib/Alchemy/Phrasea/Fractal/TransformerResolver.php b/lib/Alchemy/Phrasea/Fractal/TransformerResolver.php new file mode 100644 index 0000000000..1780e6ce70 --- /dev/null +++ b/lib/Alchemy/Phrasea/Fractal/TransformerResolver.php @@ -0,0 +1,22 @@ +getDataboxIds(); + $records = array_fill_keys($databoxIds, []); - foreach ($this->getDataboxIds() as $databoxId) { + foreach ($databoxIds as $databoxId) { $databox = $appbox->get_databox($databoxId); $recordIds = $this->getDataboxRecordIds($databoxId); - foreach ($databox->getRecordRepository()->findByRecordIds(array_keys($recordIds)) as $record) { - $records[$recordIds[$record->getRecordId()]] = $record; + foreach ($databox->getRecordRepository()->findByRecordIds($recordIds) as $record) { + $records[$record->getDataboxId()][$record->getRecordId()] = $record; } } - $indexes = array_flip(array_keys($this->references)); + $sorted = []; - uksort($records, function ($keyA, $keyB) use ($indexes) { - $indexA = $indexes[$keyA]; - $indexB = $indexes[$keyB]; + foreach ($this->references as $index => $reference) { + $databoxId = $reference->getDataboxId(); + $recordId = $reference->getRecordId(); - if ($indexA < $indexB) { - return -1; - } elseif ($indexA > $indexB) { - return 1; + if (isset($records[$databoxId][$recordId])) { + $sorted[$index] = $records[$databoxId][$recordId]; } + } - return 0; - }); - - return $records; + return $sorted; } /** From df0aee31a068a9284fe7b007d12297236dc26762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 16 May 2016 18:19:14 +0200 Subject: [PATCH 278/383] Bump fractal version to development one. --- composer.json | 7 +- composer.lock | 99 +++++++++---------- .../Phrasea/Controller/Api/V1Controller.php | 2 - .../Databox/Subdef/MediaSubdefService.php | 4 +- .../Phrasea/Fractal/ArraySerializer.php | 7 +- .../Phrasea/Search/SubdefTransformer.php | 6 +- .../Phrasea/Controller/Api/ApiJsonTest.php | 26 ++--- 7 files changed, 80 insertions(+), 71 deletions(-) diff --git a/composer.json b/composer.json index 9aee8b75f4..d225ce42fd 100644 --- a/composer.json +++ b/composer.json @@ -25,6 +25,10 @@ { "type": "vcs", "url": "https://github.com/alchemy-fr/embed-bundle.git" + }, + { + "type": "git", + "url": "https://github.com/bburnichon/fractal.git" } ], "require": { @@ -38,7 +42,7 @@ "alchemy/oauth2php": "1.0.0", "alchemy/phlickr": "0.2.9", "alchemy/phpexiftool": "^0.5.0", - "alchemy/rest-bundle": "^0.0.4", + "alchemy/rest-bundle": "^0.0.5", "alchemy/symfony-cors": "^0.1.0", "alchemy/task-manager": "2.0.x-dev@dev", "alchemy/zippy": "^0.3.0", @@ -69,6 +73,7 @@ "justinrainbow/json-schema": "~1.3", "league/flysystem": "^1.0", "league/flysystem-aws-s3-v2": "^1.0", + "league/fractal": "dev-bug/null-resource-serialization#d84aa1e as 0.13.0", "media-alchemyst/media-alchemyst": "^0.5", "monolog/monolog": "~1.3", "mrclay/minify": "~2.1.6", diff --git a/composer.lock b/composer.lock index e52e7ca25b..586c07aff9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "2f0d3c97831221555b3c1d1a725f897e", - "content-hash": "898155bdbf7333a2634c4b04053469ea", + "hash": "364406a454e9033151c8a2075ecb240f", + "content-hash": "e2785509e5ac412cd184fcb0c3f1bd5f", "packages": [ { "name": "alchemy-fr/tcpdf-clone", @@ -15,12 +15,6 @@ "url": "https://github.com/alchemy-fr/tcpdf-clone.git", "reference": "2ba0248a7187f1626df6c128750650416267f0e7" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/tcpdf-clone/zipball/2ba0248a7187f1626df6c128750650416267f0e7", - "reference": "2ba0248a7187f1626df6c128750650416267f0e7", - "shasum": "" - }, "require": { "php": ">=5.3.0" }, @@ -67,10 +61,6 @@ "qrcode", "tcpdf" ], - "support": { - "source": "https://github.com/alchemy-fr/tcpdf-clone/tree/6.0.039", - "issues": "https://github.com/alchemy-fr/tcpdf-clone/issues" - }, "time": "2013-10-13 16:11:17" }, { @@ -489,20 +479,21 @@ }, { "name": "alchemy/rest-bundle", - "version": "0.0.4", + "version": "0.0.5", "source": { "type": "git", "url": "https://github.com/alchemy-fr/rest-bundle.git", - "reference": "9048a99dd328cd2d01efaad16e6af648d11ad2b4" + "reference": "e795b3cd565086d575ee919d1b23279656c982ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/rest-bundle/zipball/9048a99dd328cd2d01efaad16e6af648d11ad2b4", - "reference": "9048a99dd328cd2d01efaad16e6af648d11ad2b4", + "url": "https://api.github.com/repos/alchemy-fr/rest-bundle/zipball/e795b3cd565086d575ee919d1b23279656c982ad", + "reference": "e795b3cd565086d575ee919d1b23279656c982ad", "shasum": "" }, "require": { - "league/fractal": "^0.12.0", + "league/fractal": "^0.12.0|^0.13.0", + "php": ">=5.4", "willdurand/negotiation": "~2.0@dev" }, "require-dev": { @@ -536,7 +527,7 @@ } ], "description": "Simple REST utility bundle", - "time": "2016-02-20 22:35:16" + "time": "2016-05-16 09:37:34" }, { "name": "alchemy/symfony-cors", @@ -546,12 +537,6 @@ "url": "https://github.com/alchemy-fr/symfony-cors.git", "reference": "dbf7fcff1ce9fc1265db12955476ff169eab7375" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/symfony-cors/zipball/dbf7fcff1ce9fc1265db12955476ff169eab7375", - "reference": "dbf7fcff1ce9fc1265db12955476ff169eab7375", - "shasum": "" - }, "require": { "symfony/http-kernel": "^2.3.0|^3.0.0" }, @@ -572,7 +557,11 @@ "Alchemy\\CorsBundle\\": "src/Bundle/" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "Alchemy\\Cors\\Tests\\": "tests/unit/Component/" + } + }, "license": [ "MIT" ], @@ -1801,12 +1790,12 @@ "source": { "type": "git", "url": "https://github.com/igorw/evenement.git", - "reference": "fa966683e7df3e5dd5929d984a44abfbd6bafe8d" + "reference": "v1.0.0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/igorw/evenement/zipball/fa966683e7df3e5dd5929d984a44abfbd6bafe8d", - "reference": "fa966683e7df3e5dd5929d984a44abfbd6bafe8d", + "url": "https://api.github.com/repos/igorw/evenement/zipball/v1.0.0", + "reference": "v1.0.0", "shasum": "" }, "require": { @@ -1833,7 +1822,7 @@ "keywords": [ "event-dispatcher" ], - "time": "2012-05-30 15:01:08" + "time": "2012-05-30 08:01:08" }, { "name": "facebook/php-sdk", @@ -2822,12 +2811,12 @@ "source": { "type": "git", "url": "https://github.com/hoaproject/Stream.git", - "reference": "3bc446bc00849bf51166adc415d77aa375d48d8c" + "reference": "011ab91d942f1d7096deade4c8a10fe57d51c5b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hoaproject/Stream/zipball/3bc446bc00849bf51166adc415d77aa375d48d8c", - "reference": "3bc446bc00849bf51166adc415d77aa375d48d8c", + "url": "https://api.github.com/repos/hoaproject/Stream/zipball/011ab91d942f1d7096deade4c8a10fe57d51c5b3", + "reference": "011ab91d942f1d7096deade4c8a10fe57d51c5b3", "shasum": "" }, "require": { @@ -2872,7 +2861,7 @@ "stream", "wrapper" ], - "time": "2015-10-26 12:21:43" + "time": "2015-10-22 06:30:43" }, { "name": "hoa/ustring", @@ -3660,17 +3649,11 @@ }, { "name": "league/fractal", - "version": "0.12.0", + "version": "dev-bug/null-resource-serialization", "source": { "type": "git", - "url": "https://github.com/thephpleague/fractal.git", - "reference": "0a51dcb6398dc2377d086210d0624996a1df8322" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/fractal/zipball/0a51dcb6398dc2377d086210d0624996a1df8322", - "reference": "0a51dcb6398dc2377d086210d0624996a1df8322", - "shasum": "" + "url": "https://github.com/bburnichon/fractal.git", + "reference": "d84aa1e" }, "require": { "php": ">=5.4" @@ -3699,7 +3682,11 @@ "League\\Fractal\\": "src" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "League\\Fractal\\Test\\": "test" + } + }, "license": [ "MIT" ], @@ -3719,7 +3706,7 @@ "league", "rest" ], - "time": "2015-03-19 15:16:43" + "time": "2016-05-16 14:18:29" }, { "name": "media-alchemyst/media-alchemyst", @@ -3903,7 +3890,7 @@ ], "authors": [ { - "name": "Steve Clay", + "name": "Stephen Clay", "email": "steve@mrclay.org", "homepage": "http://www.mrclay.org/", "role": "Developer" @@ -4089,21 +4076,21 @@ "source": { "type": "git", "url": "https://github.com/romainneutron/Imagine-Silex-Service-Provider.git", - "reference": "a8a7862ae90419f2b23746cd8436c2310e4eb084" + "reference": "0.1.2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/romainneutron/Imagine-Silex-Service-Provider/zipball/a8a7862ae90419f2b23746cd8436c2310e4eb084", - "reference": "a8a7862ae90419f2b23746cd8436c2310e4eb084", + "url": "https://api.github.com/repos/romainneutron/Imagine-Silex-Service-Provider/zipball/0.1.2", + "reference": "0.1.2", "shasum": "" }, "require": { "imagine/imagine": "*", "php": ">=5.3.3", - "silex/silex": "~1.0" + "silex/silex": ">=1.0,<2.0" }, "require-dev": { - "symfony/browser-kit": "~2.0" + "symfony/browser-kit": ">=2.0,<3.0" }, "type": "library", "autoload": { @@ -5576,7 +5563,7 @@ }, { "name": "Phraseanet Team", - "email": "info@alchemy.fr", + "email": "support@alchemy.fr", "homepage": "http://www.phraseanet.com/" } ], @@ -7728,12 +7715,20 @@ "time": "2015-06-21 13:59:46" } ], - "aliases": [], + "aliases": [ + { + "alias": "0.13.0", + "alias_normalized": "0.13.0.0", + "version": "dev-bug/null-resource-serialization", + "package": "league/fractal" + } + ], "minimum-stability": "stable", "stability-flags": { "alchemy/task-manager": 20, "imagine/imagine": 20, "jms/translation-bundle": 20, + "league/fractal": 20, "neutron/process-manager": 20, "roave/security-advisories": 20, "willdurand/negotiation": 15 diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index b9855c56db..83740c3e56 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -1212,9 +1212,7 @@ class V1Controller extends Controller $subdefViews = $this->buildSubdefsViews($allChildren, $names, $urlTTL); $technicalDatasets = $this->app['service.technical_data']->fetchRecordsTechnicalData($allChildren); - $newHashes = []; foreach ($childrenViews as $index => $recordView) { - $newHashes[spl_object_hash($recordView)] = $recordView; $recordView->setSubdefs($subdefViews[$index]); $recordView->setTechnicalDataView(new TechnicalDataView($technicalDatasets[$index])); } diff --git a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php index 23802b9424..ae7c75d80b 100644 --- a/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php +++ b/lib/Alchemy/Phrasea/Databox/Subdef/MediaSubdefService.php @@ -53,7 +53,9 @@ class MediaSubdefService /** @var RecordReferenceInterface $reference */ foreach ($references as $index => $reference) { - $carry[$index] = $subdefsByRecordId[$reference->getRecordId()]; + if (isset($subdefsByRecordId[$reference->getRecordId()])) { + $carry[$index] = $subdefsByRecordId[$reference->getRecordId()]; + }; } return $carry; diff --git a/lib/Alchemy/Phrasea/Fractal/ArraySerializer.php b/lib/Alchemy/Phrasea/Fractal/ArraySerializer.php index a1ca0df69c..264b42803b 100644 --- a/lib/Alchemy/Phrasea/Fractal/ArraySerializer.php +++ b/lib/Alchemy/Phrasea/Fractal/ArraySerializer.php @@ -24,7 +24,12 @@ class ArraySerializer extends SerializerAbstract public function item($resourceKey, array $data) { - return $data ?: null; + return $data; + } + + public function null($resourceKey) + { + return null; } public function includedData(ResourceInterface $resource, array $data) diff --git a/lib/Alchemy/Phrasea/Search/SubdefTransformer.php b/lib/Alchemy/Phrasea/Search/SubdefTransformer.php index c8c63f0bc9..ecd43ff032 100644 --- a/lib/Alchemy/Phrasea/Search/SubdefTransformer.php +++ b/lib/Alchemy/Phrasea/Search/SubdefTransformer.php @@ -43,20 +43,20 @@ class SubdefTransformer extends TransformerAbstract $media = $subdefView->getSubdef(); if (!$media->is_physically_present()) { - return []; + return null; } $acl = $this->aclProvider->get($this->user); $record = $media->get_record(); if ($media->get_name() !== 'document' && false === $acl->has_access_to_subdef($record, $media->get_name())) { - return []; + return null; } if ($media->get_name() === 'document' && !$acl->has_right_on_base($record->getBaseId(), 'candwnldhd') && !$acl->has_hd_grant($record) ) { - return []; + return null; } $permalink = $subdefView->getPermalinkView() diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php index 6945e4c151..eed46a878d 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php @@ -800,25 +800,29 @@ class ApiJsonTest extends ApiTestCase public function testSearchRoute() { - self::$DI['app']['manipulator.user'] = $this->getMockBuilder('Alchemy\Phrasea\Model\Manipulator\UserManipulator') + $app = $this->getApplication(); + + $app['manipulator.user'] = $this->getMockBuilder('Alchemy\Phrasea\Model\Manipulator\UserManipulator') ->setConstructorArgs([ - self::$DI['app']['model.user-manager'], - self::$DI['app']['auth.password-encoder'], - self::$DI['app']['geonames.connector'], - self::$DI['app']['repo.users'], - self::$DI['app']['random.low'], - self::$DI['app']['dispatcher'], + $app['model.user-manager'], + $app['auth.password-encoder'], + $app['geonames.connector'], + $app['repo.users'], + $app['random.low'], + $app['dispatcher'], ]) ->setMethods(['logQuery']) ->getMock(); - self::$DI['app']['manipulator.user']->expects($this->once())->method('logQuery'); + $app['manipulator.user']->expects($this->once())->method('logQuery'); $this->setToken($this->userAccessToken); - self::$DI['client']->request('POST', '/api/v1/search/', $this->getParameters(), [], ['HTTP_Accept' => $this->getAcceptMimeType()]); - $content = $this->unserialize(self::$DI['client']->getResponse()->getContent()); + $response = $this->request('POST', '/api/v1/search/', $this->getParameters(), [ + 'HTTP_Accept' => $this->getAcceptMimeType(), + ]); + $content = $this->unserialize($response->getContent()); - $this->evaluateResponse200(self::$DI['client']->getResponse()); + $this->evaluateResponse200($response); $this->evaluateMeta200($content); $response = $content['response']; From 6b27cde40f1e03408715822e63500d0ec51b42c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 16 May 2016 19:33:29 +0200 Subject: [PATCH 279/383] Properly initialize RecordCollection --- lib/Alchemy/Phrasea/Record/RecordCollection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/Record/RecordCollection.php b/lib/Alchemy/Phrasea/Record/RecordCollection.php index 8f9eff2fd9..9351cbb71b 100644 --- a/lib/Alchemy/Phrasea/Record/RecordCollection.php +++ b/lib/Alchemy/Phrasea/Record/RecordCollection.php @@ -23,7 +23,7 @@ class RecordCollection implements \IteratorAggregate, \ArrayAccess, \Countable, /** * @var array */ - private $groups; + private $groups = []; /** * @var bool From bf63a9649757943fd602e2c6c533c8f21805179b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 16 May 2016 19:33:54 +0200 Subject: [PATCH 280/383] Remove client dependency in test, use $this->request instead --- .../Tests/Phrasea/Controller/Api/ApiJsonTest.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php index eed46a878d..fd03f65094 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Api/ApiJsonTest.php @@ -841,17 +841,15 @@ class ApiJsonTest extends ApiTestCase self::$DI['record_story_1']; - $client = $this->getClient(); - $client->request( + $response = $this->request( 'POST', '/api/v1/search/', $this->getParameters(['search_type' => SearchEngineOptions::RECORD_GROUPING]), - [], ['HTTP_Accept' => $this->getAcceptMimeType()] ); - $content = $this->unserialize($client->getResponse()->getContent()); + $content = $this->unserialize($response->getContent()); - $this->evaluateResponse200($client->getResponse()); + $this->evaluateResponse200($response); $this->evaluateMeta200($content); $response = $content['response']; @@ -877,10 +875,10 @@ class ApiJsonTest extends ApiTestCase public function testRecordsSearchRoute() { $this->setToken($this->userAccessToken); - self::$DI['client']->request('POST', '/api/v1/records/search/', $this->getParameters(), [], ['HTTP_Accept' => $this->getAcceptMimeType()]); - $content = $this->unserialize(self::$DI['client']->getResponse()->getContent()); + $response = $this->request('POST', '/api/v1/records/search/', $this->getParameters(), ['HTTP_Accept' => $this->getAcceptMimeType()]); + $content = $this->unserialize($response->getContent()); - $this->evaluateResponse200(self::$DI['client']->getResponse()); + $this->evaluateResponse200($response); $this->evaluateMeta200($content); $response = $content['response']; From 99a23a0753109937cbb40be7c6527a3ee213cb35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 16 May 2016 19:34:45 +0200 Subject: [PATCH 281/383] Use same init process in searchRecordsAction and searchAction --- .../Phrasea/Controller/Api/V1Controller.php | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index 83740c3e56..8fb90c9fd9 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -1112,20 +1112,33 @@ class V1Controller extends Controller */ public function searchRecordsAction(Request $request) { + $subdefTransformer = new SubdefTransformer($this->app['acl'], $this->getAuthenticatedUser(), new PermalinkTransformer()); + $technicalDataTransformer = new TechnicalDataTransformer(); + $recordTransformer = new RecordTransformer($subdefTransformer, $technicalDataTransformer); + $searchTransformer = new V1SearchRecordsResultTransformer($recordTransformer); + + $transformerResolver = new SearchResultTransformerResolver([ + '' => $searchTransformer, + 'results' => $recordTransformer, + 'results.thumbnail' => $subdefTransformer, + 'results.technical_informations' => $technicalDataTransformer, + 'results.subdefs' => $subdefTransformer, + 'results.metadata' => new CallbackTransformer(), + 'results.status' => new CallbackTransformer(), + 'results.caption' => new CallbackTransformer(), + ]); + $includeResolver = new IncludeResolver($transformerResolver); + $fractal = new \League\Fractal\Manager(); $fractal->setSerializer(new ArraySerializer()); $fractal->parseIncludes($this->resolveSearchRecordsIncludes($request)); $searchView = $this->buildSearchRecordsView( $this->doSearch($request), - $fractal->getRequestedIncludes(), + $includeResolver->resolve($fractal), $this->resolveSubdefUrlTTL($request) ); - $subdefTransformer = new SubdefTransformer($this->app['acl'], $this->getAuthenticatedUser(), new PermalinkTransformer()); - $recordTransformer = new RecordTransformer($subdefTransformer, new TechnicalDataTransformer()); - $searchTransformer = new V1SearchRecordsResultTransformer($recordTransformer); - $ret = $fractal->createData(new Item($searchView, $searchTransformer))->toArray(); return Result::create($request, $ret)->createResponse(); From 33ec01a2c83323df993d6cbecc5e14b6de9bf79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 16 May 2016 19:35:26 +0200 Subject: [PATCH 282/383] Use RecordCollection as it filters out missing records --- lib/Alchemy/Phrasea/Controller/Api/V1Controller.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index 8fb90c9fd9..8d98033337 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -1274,6 +1274,7 @@ class V1Controller extends Controller private function buildSearchRecordsView(SearchEngineResult $result, array $includes, $urlTTL) { $references = new RecordReferenceCollection($result->getResults()); + $references = new RecordCollection($references->toRecords($this->getApplicationBox())); $names = in_array('results.subdefs', $includes, true) ? null : ['thumbnail']; @@ -2956,14 +2957,12 @@ class V1Controller extends Controller } /** - * @param RecordReferenceCollection|RecordCollection|\record_adapter[] $references + * @param RecordCollection|\record_adapter[] $references * @return RecordView[] */ private function buildRecordViews($references) { - if ($references instanceof RecordReferenceCollection) { - $references = new RecordCollection($references->toRecords($this->getApplicationBox())); - } elseif (!$references instanceof RecordCollection) { + if (!$references instanceof RecordCollection) { $references = new RecordCollection($references); } From 1682535dfb5823eafcdc76804cd49c246176b975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Mon, 16 May 2016 19:36:04 +0200 Subject: [PATCH 283/383] Bump fractal with fix on null resource --- composer.json | 2 +- composer.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index d225ce42fd..f30a098848 100644 --- a/composer.json +++ b/composer.json @@ -73,7 +73,7 @@ "justinrainbow/json-schema": "~1.3", "league/flysystem": "^1.0", "league/flysystem-aws-s3-v2": "^1.0", - "league/fractal": "dev-bug/null-resource-serialization#d84aa1e as 0.13.0", + "league/fractal": "dev-bug/null-resource-serialization#891856f as 0.13.0", "media-alchemyst/media-alchemyst": "^0.5", "monolog/monolog": "~1.3", "mrclay/minify": "~2.1.6", diff --git a/composer.lock b/composer.lock index 586c07aff9..9f1115632a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "364406a454e9033151c8a2075ecb240f", - "content-hash": "e2785509e5ac412cd184fcb0c3f1bd5f", + "hash": "685ed8f8578c211ee14ebc00703ab281", + "content-hash": "acd719252dc8e17e752f2e87f571a7b5", "packages": [ { "name": "alchemy-fr/tcpdf-clone", @@ -3653,7 +3653,7 @@ "source": { "type": "git", "url": "https://github.com/bburnichon/fractal.git", - "reference": "d84aa1e" + "reference": "891856f" }, "require": { "php": ">=5.4" @@ -3706,7 +3706,7 @@ "league", "rest" ], - "time": "2016-05-16 14:18:29" + "time": "2016-05-16 16:41:03" }, { "name": "media-alchemyst/media-alchemyst", From b4068e00f193b1b3176ca734ab6ea847291060ae Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Tue, 17 May 2016 17:43:51 +0200 Subject: [PATCH 284/383] PHRAS-1105_Thesaurus_NOTOK_ES_2.3 wip --- .../Elastic/ElasticSearchEngine.php | 2 +- .../Phrasea/SearchEngine/Elastic/Indexer.php | 2 + .../Elastic/Indexer/Record/Fetcher.php | 1 + .../Record/Hydrator/ThesaurusHydrator.php | 9 +- .../SearchEngine/Elastic/Thesaurus.php | 104 ++++++++++++++++-- 5 files changed, 105 insertions(+), 13 deletions(-) diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticSearchEngine.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticSearchEngine.php index 073325d510..ba28fc5880 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticSearchEngine.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticSearchEngine.php @@ -293,7 +293,7 @@ class ElasticSearchEngine implements SearchEngineInterface if ($aggs) { $params['body']['aggs'] = $aggs; } - +file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n%s\n\n", __FILE__, __LINE__, var_export($params, true), json_encode($params, JSON_PRETTY_PRINT)), FILE_APPEND); $res = $this->client->search($params); $results = new ArrayCollection(); diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer.php index bc0da95783..97d5d08b85 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer.php @@ -118,6 +118,8 @@ class Indexer // everything ready to search $bulk->flush(); $this->client->indices()->refresh(); + $this->client->indices()->clearCache(); + $this->client->indices()->flushSynced(); } if ($what & self::RECORDS) { diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Fetcher.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Fetcher.php index 187809c573..c870a3c329 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Fetcher.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Fetcher.php @@ -81,6 +81,7 @@ class Fetcher foreach ($this->hydrators as $hydrator) { $hydrator->hydrateRecords($records); } +file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($records, true)), FILE_APPEND); foreach ($records as $record) { if (!isset($record['id'])) { throw new Exception('No record hydrator set the "id" key.'); diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Hydrator/ThesaurusHydrator.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Hydrator/ThesaurusHydrator.php index 66b6d2cc6d..2a4c515ba4 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Hydrator/ThesaurusHydrator.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Hydrator/ThesaurusHydrator.php @@ -62,6 +62,7 @@ class ThesaurusHydrator implements HydratorInterface $filters = array(); $field_names = array(); foreach ($fields as $name => $root_concepts) { +// file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s : %s\n", __FILE__, __LINE__, var_export($name, true), var_export($root_concepts, true)), FILE_APPEND); // Loop through all values to prepare bulk query $field_values = \igorw\get_in($record, explode('.', $index_fields[$name])); if ($field_values !== null) { @@ -78,8 +79,13 @@ class ThesaurusHydrator implements HydratorInterface } } } - + if(empty($terms)) { + return; + } +file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($values, true)), FILE_APPEND); +file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($terms, true)), FILE_APPEND); $bulk = $this->thesaurus->findConceptsBulk($terms, null, $filters, true); +file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($bulk, true)), FILE_APPEND); foreach ($bulk as $offset => $item_concepts) { if ($item_concepts && is_array($item_concepts) && count($item_concepts)>0) { @@ -91,5 +97,6 @@ class ThesaurusHydrator implements HydratorInterface $this->candidate_terms->insert($field_names[$offset], $values[$offset]); } } +// file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($record, true)), FILE_APPEND); } } diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus.php index 85f99fa1d8..89d5d94963 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus.php @@ -48,7 +48,7 @@ class Thesaurus public function findConceptsBulk(array $terms, $lang = null, $filter = null, $strict = false) { $this->logger->debug(sprintf('Finding linked concepts in bulk for %d terms', count($terms))); - +file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) Finding linked concepts in bulk for %d terms : %s\n", __FILE__, __LINE__, count($terms), var_export($terms, true)), FILE_APPEND); // We use the same filter for all terms when a single one is given $filters = is_array($filter) ? $filter @@ -62,7 +62,7 @@ class Thesaurus foreach ($terms as $index => $term) { $concepts[] = $this->findConcepts($term, $lang, $filters[$index], $strict); } - +// file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($concepts, true)), FILE_APPEND); return $concepts; } @@ -79,19 +79,105 @@ class Thesaurus * @return Concept[] Matching concepts */ public function findConcepts($term, $lang = null, Filter $filter = null, $strict = false) + { + return $strict ? + $this->findConceptsStrict($term, $lang, $filter) + : + $this->findConceptsFuzzy($term, $lang, $filter) + ; + } + + private function findConceptsStrict($term, $lang = null, Filter $filter = null) { if (!($term instanceof TermInterface)) { $term = new Term($term); } $this->logger->info(sprintf('Searching for term %s', $term), array( - 'strict' => $strict, + 'strict' => true, 'lang' => $lang )); +file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($term, true)), FILE_APPEND); - if ($strict) { - $field_suffix = '.strict'; - } elseif ($lang) { + $field_suffix = '.strict'; + + $field = sprintf('value%s', $field_suffix); + $query = array(); + $query['match'][$field]['query'] = $term->getValue(); + $query['match'][$field]['operator'] = 'and'; + + if ($term->hasContext()) { + $value_query = $query; + $field = sprintf('context%s', $field_suffix); + $context_query = array(); + $context_query['match'][$field]['query'] = $term->getContext(); + $context_query['match'][$field]['operator'] = 'and'; + $query = array(); + $query['bool']['must'][0] = $value_query; + $query['bool']['must'][1] = $context_query; + } else { + $context_filter = array(); + $context_filter['missing']['field'] = 'context'; + $query = self::applyQueryFilter($query, $context_filter); + } + + if ($lang) { + $lang_filter = array(); + $lang_filter['term']['lang'] = $lang; + $query = self::applyQueryFilter($query, $lang_filter); + } + + if ($filter) { + $this->logger->debug('Using filter', array('filter' => Filter::dump($filter))); + $query = self::applyQueryFilter($query, $filter->getQueryFilter()); + } + + // Path deduplication + $aggs = array(); + $aggs['dedup']['terms']['field'] = 'path.raw'; + + // Search request + $params = array(); + $params['index'] = $this->options->getIndexName(); + $params['type'] = TermIndexer::TYPE_NAME; + $params['body']['query'] = $query; + $params['body']['aggs'] = $aggs; + // No need to get any hits since we extract data from aggs + $params['body']['size'] = 0; + + $this->logger->debug('Sending search', $params['body']); + $response = $this->client->search($params); +file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n%s\n\n", __FILE__, __LINE__, json_encode($params, JSON_PRETTY_PRINT), var_export($response, true)), FILE_APPEND); + // Extract concept paths from response + $concepts = array(); + $buckets = \igorw\get_in($response, ['aggregations', 'dedup', 'buckets'], []); + $keys = array(); + foreach ($buckets as $bucket) { + if (isset($bucket['key'])) { + $keys[] = $bucket['key']; + $concepts[] = new Concept($bucket['key']); + } + } + + $this->logger->info(sprintf('Found %d matching concepts', count($concepts)), + array('concepts' => $keys) + ); + + return $concepts; + } + + private function findConceptsFuzzy($term, $lang = null, Filter $filter = null) + { + if (!($term instanceof TermInterface)) { + $term = new Term($term); + } + + $this->logger->info(sprintf('Searching for term %s', $term), array( + 'strict' => false, + 'lang' => $lang + )); +file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($term, true)), FILE_APPEND); + if($lang) { $field_suffix = sprintf('.%s', $lang); } else { $field_suffix = ''; @@ -114,10 +200,6 @@ class Thesaurus $query = array(); $query['bool']['must'][0] = $value_query; $query['bool']['must'][1] = $context_query; - } elseif ($strict) { - $context_filter = array(); - $context_filter['missing']['field'] = 'context'; - $query = self::applyQueryFilter($query, $context_filter); } if ($lang) { @@ -151,7 +233,7 @@ class Thesaurus $this->logger->debug('Sending search', $params['body']); $response = $this->client->search($params); - +file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n%s\n\n", __FILE__, __LINE__, json_encode($params, JSON_PRETTY_PRINT), var_export($response, true)), FILE_APPEND); // Extract concept paths from response $concepts = array(); $buckets = \igorw\get_in($response, ['aggregations', 'dedup', 'buckets'], []); From 392fa30f0a0e3129e2a612d82879651d0f30988b Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Tue, 17 May 2016 20:14:31 +0200 Subject: [PATCH 285/383] PHRAS-1105_Thesaurus_NOTOK_ES_2.3 wip --- .../SearchEngine/Elastic/Thesaurus.php | 55 ++++++++++++------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus.php index 89d5d94963..5e3ef41092 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus.php @@ -80,6 +80,7 @@ file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) Finding linked con */ public function findConcepts($term, $lang = null, Filter $filter = null, $strict = false) { +file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($term, true)), FILE_APPEND); return $strict ? $this->findConceptsStrict($term, $lang, $filter) : @@ -97,33 +98,47 @@ file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) Finding linked con 'strict' => true, 'lang' => $lang )); -file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($term, true)), FILE_APPEND); - $field_suffix = '.strict'; - - $field = sprintf('value%s', $field_suffix); - $query = array(); - $query['match'][$field]['query'] = $term->getValue(); - $query['match'][$field]['operator'] = 'and'; + $query = [ + 'match' => [ + 'value.strict' => [ + 'query' => $term->getValue(), + 'operator' => 'and', + ], + ], + ]; if ($term->hasContext()) { - $value_query = $query; - $field = sprintf('context%s', $field_suffix); - $context_query = array(); - $context_query['match'][$field]['query'] = $term->getContext(); - $context_query['match'][$field]['operator'] = 'and'; - $query = array(); - $query['bool']['must'][0] = $value_query; - $query['bool']['must'][1] = $context_query; + $query = [ + 'bool' => [ + 'must' => [ + 0 => $query, + 1 => [ + 'match' => [ + 'context.strict' => [ + 'query' => $term->getContext(), + 'operator' => 'and', + ], + ], + ], + ], + ], + ]; } else { - $context_filter = array(); - $context_filter['missing']['field'] = 'context'; + $context_filter = [ + 'missing' => [ + 'field' => 'context' + ] + ]; $query = self::applyQueryFilter($query, $context_filter); } if ($lang) { - $lang_filter = array(); - $lang_filter['term']['lang'] = $lang; + $lang_filter = [ + 'term' => [ + 'lang' => $lang + ] + ]; $query = self::applyQueryFilter($query, $lang_filter); } @@ -176,7 +191,7 @@ file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n%s\n\n", __FIL 'strict' => false, 'lang' => $lang )); -file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($term, true)), FILE_APPEND); + if($lang) { $field_suffix = sprintf('.%s', $lang); } else { From 083f1941b00eecc72b07cacd7a523659dcc60993 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Tue, 17 May 2016 20:19:17 +0200 Subject: [PATCH 286/383] PHRAS-1101_THMB-TRAIN-IN-PREVIEW - fix : some elements of "train" don't display preview/caption when selected (due to code exception) --- lib/classes/caption/Field/Value.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/classes/caption/Field/Value.php b/lib/classes/caption/Field/Value.php index b51ef904bf..5305e8f2fd 100644 --- a/lib/classes/caption/Field/Value.php +++ b/lib/classes/caption/Field/Value.php @@ -337,6 +337,8 @@ class caption_Field_Value implements cache_cacheableInterface */ public function highlight_thesaurus() { + $this->isThesaurusValue = false; + $value = $this->getValue(); $databox = $this->databox_field->get_databox(); $XPATH_thesaurus = $databox->get_xpath_thesaurus(); @@ -386,8 +388,6 @@ class caption_Field_Value implements cache_cacheableInterface $this->value = $bestnode->getAttribute('v'); $this->qjs = $term . ($context ? '[' . $context . ']' : ''); $this->isThesaurusValue = true; - } else { - $this->isThesaurusValue = false; } return $this->value; From ee9c766fa11a55701359dfa6d93c8ede8602d9bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 18 May 2016 11:41:46 +0200 Subject: [PATCH 287/383] Add TraceableArraySerializer to be able to debug calls --- .../Phrasea/Controller/Api/V1Controller.php | 6 +- .../Phrasea/Fractal/GetSerializationEvent.php | 53 ++++++++++++++++ .../Fractal/TraceableArraySerializer.php | 63 +++++++++++++++++++ 3 files changed, 120 insertions(+), 2 deletions(-) create mode 100644 lib/Alchemy/Phrasea/Fractal/GetSerializationEvent.php create mode 100644 lib/Alchemy/Phrasea/Fractal/TraceableArraySerializer.php diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index 8d98033337..c80a3e563c 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -37,6 +37,7 @@ use Alchemy\Phrasea\Fractal\ArraySerializer; use Alchemy\Phrasea\Fractal\CallbackTransformer; use Alchemy\Phrasea\Fractal\IncludeResolver; use Alchemy\Phrasea\Fractal\SearchResultTransformerResolver; +use Alchemy\Phrasea\Fractal\TraceableArraySerializer; use Alchemy\Phrasea\Model\Entities\ApiOauthToken; use Alchemy\Phrasea\Model\Entities\Basket; use Alchemy\Phrasea\Model\Entities\BasketElement; @@ -1087,11 +1088,12 @@ class V1Controller extends Controller $includeResolver = new IncludeResolver($transformerResolver); $fractal = new \League\Fractal\Manager(); - $fractal->setSerializer(new ArraySerializer()); + $fractal->setSerializer(new TraceableArraySerializer($this->app['dispatcher'])); $fractal->parseIncludes($this->resolveSearchIncludes($request)); + $result = $this->doSearch($request); $searchView = $this->buildSearchView( - $this->doSearch($request), + $result, $includeResolver->resolve($fractal), $this->resolveSubdefUrlTTL($request) ); diff --git a/lib/Alchemy/Phrasea/Fractal/GetSerializationEvent.php b/lib/Alchemy/Phrasea/Fractal/GetSerializationEvent.php new file mode 100644 index 0000000000..d1f7c1194f --- /dev/null +++ b/lib/Alchemy/Phrasea/Fractal/GetSerializationEvent.php @@ -0,0 +1,53 @@ +resourceKey = $resourceKey; + $this->data = $data; + } + + /** + * @return mixed + */ + public function getResourceKey() + { + return $this->resourceKey; + } + + /** + * @return mixed + */ + public function getData() + { + return $this->data; + } + + public function setSerialization($serialization) + { + $this->serialization = $serialization; + $this->stopPropagation(); + } + + public function getSerialization() + { + return $this->serialization; + } +} diff --git a/lib/Alchemy/Phrasea/Fractal/TraceableArraySerializer.php b/lib/Alchemy/Phrasea/Fractal/TraceableArraySerializer.php new file mode 100644 index 0000000000..8e35f1bdf5 --- /dev/null +++ b/lib/Alchemy/Phrasea/Fractal/TraceableArraySerializer.php @@ -0,0 +1,63 @@ +dispatcher = $dispatcher; + } + + public function collection($resourceKey, array $data) + { + /** @var GetSerializationEvent $event */ + $event = $this->dispatcher->dispatch('fractal.serializer.collection', new GetSerializationEvent($resourceKey, $data)); + + $serialization = parent::collection($resourceKey, $data); + + $event->setSerialization($serialization); + + return $serialization; + } + + public function item($resourceKey, array $data) + { + /** @var GetSerializationEvent $event */ + $event = $this->dispatcher->dispatch('fractal.serializer.item', new GetSerializationEvent($resourceKey, $data)); + + $serialization = parent::item($resourceKey, $data); + + $event->setSerialization($serialization); + + return $serialization; + } + + public function null($resourceKey) + { + /** @var GetSerializationEvent $event */ + $event = $this->dispatcher->dispatch('fractal.serializer.null', new GetSerializationEvent($resourceKey, null)); + + $serialization = parent::null($resourceKey); + + $event->setSerialization($serialization); + + return $serialization; + } + +} From 3b965f9d39d13d69739d53e33a365f4208940625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 18 May 2016 11:42:01 +0200 Subject: [PATCH 288/383] Fixup wrong variable used in check --- lib/Alchemy/Phrasea/Search/SearchResultView.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/Search/SearchResultView.php b/lib/Alchemy/Phrasea/Search/SearchResultView.php index e4a80edc24..e2c2b2d642 100644 --- a/lib/Alchemy/Phrasea/Search/SearchResultView.php +++ b/lib/Alchemy/Phrasea/Search/SearchResultView.php @@ -49,7 +49,7 @@ class SearchResultView */ public function setStories($stories) { - Assertion::allIsInstanceOf($this->stories, StoryView::class); + Assertion::allIsInstanceOf($stories, StoryView::class); $this->stories = $stories instanceof \Traversable ? iterator_to_array($stories, false) : array_values($stories); } From 96fce57ae349f4e8d62a8dba4af5857f791426ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 18 May 2016 11:46:10 +0200 Subject: [PATCH 289/383] Make some list Methods private and remove unused one. --- .../Phrasea/Controller/Api/V1Controller.php | 27 +++---------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index c80a3e563c..9fb9922644 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -1462,7 +1462,7 @@ class V1Controller extends Controller * @param RecordReferenceInterface[]|RecordReferenceCollection $records * @return array */ - public function listRecords(Request $request, $records) + private function listRecords(Request $request, $records) { if (!$records instanceof RecordReferenceCollection) { $records = new RecordReferenceCollection($records); @@ -1488,7 +1488,7 @@ class V1Controller extends Controller * @param \record_adapter $record * @return array */ - public function listRecord(Request $request, \record_adapter $record) + private function listRecord(Request $request, \record_adapter $record) { $technicalInformation = []; foreach ($record->get_technical_infos()->getValues() as $name => $value) { @@ -1524,27 +1524,6 @@ class V1Controller extends Controller return $data; } - /** - * @param Request $request - * @param RecordReferenceInterface[]|RecordReferenceCollection $stories - * @return array - * @throws \Exception - */ - public function listStories(Request $request, $stories) - { - if (!$stories instanceof RecordReferenceCollection) { - $stories = new RecordReferenceCollection($stories); - } - - $data = []; - - foreach ($stories->toRecords($this->getApplicationBox()) as $story) { - $data[] = $this->listStory($request, $story); - } - - return $data; - } - /** * Retrieve detailed information about one story * @@ -1553,7 +1532,7 @@ class V1Controller extends Controller * @return array * @throws \Exception */ - public function listStory(Request $request, \record_adapter $story) + private function listStory(Request $request, \record_adapter $story) { if (!$story->isStory()) { return Result::createError($request, 404, 'Story not found')->createResponse(); From 7c8ca9b2f6ebf8e10f07283ecbe093199cf71f53 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Wed, 18 May 2016 17:04:30 +0200 Subject: [PATCH 290/383] PHRAS-1106 - fix thesaurus search options - bump Phraseanet production client --- package.json | 2 +- templates/web/prod/tab_thesaurus.html.twig | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 7cf4fd5eb4..52176c664b 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,6 @@ "postinstall": "./node_modules/.bin/gulp install;" }, "dependencies": { - "phraseanet-production-client": "~0.17.1" + "phraseanet-production-client": "~0.17.2" } } diff --git a/templates/web/prod/tab_thesaurus.html.twig b/templates/web/prod/tab_thesaurus.html.twig index 8fc481bc66..fe35e47e42 100644 --- a/templates/web/prod/tab_thesaurus.html.twig +++ b/templates/web/prod/tab_thesaurus.html.twig @@ -33,7 +33,7 @@
      -
      +
        {% for base in search_datas['bases'] %} {% if base['thesaurus'] %} @@ -52,7 +52,7 @@ {% if has_access_to_module %}
        -
        +
          {% for base in search_datas['bases'] %} {% if base['cterms'] %} From 3377dddd9ab1c91cb71c5f24364586e4ae6b2aa5 Mon Sep 17 00:00:00 2001 From: Anthony C Date: Tue, 23 Feb 2016 19:38:20 +0100 Subject: [PATCH 291/383] Translated using Weblate (French) Currently translated at 100.0% (2298 of 2298 strings) --- resources/locales/messages.fr.xlf | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/resources/locales/messages.fr.xlf b/resources/locales/messages.fr.xlf index 75195ad74a..911523327c 100644 --- a/resources/locales/messages.fr.xlf +++ b/resources/locales/messages.fr.xlf @@ -1,4 +1,4 @@ - +
          @@ -7,8 +7,8 @@
          - - + + Form/Configuration/EmailFormType.php Form/Login/PhraseaAuthenticationForm.php @@ -3157,9 +3157,9 @@ Générer un fichier audio Media/Subdef/Audio.php - + Generates an image - Generates an image + Generates an image Media/Subdef/Image.php @@ -6164,9 +6164,9 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Dispositif ciblé classes/databox/subdef.php - + Task Edition - Task Edition + Task edition task-manager/task-editor/task.html.twig @@ -10343,9 +10343,9 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Statistiques de visualisation prod/preview/popularity.html.twig - + previewLinkLabel - Prévisualiser + Prévisualiser prod/Share/record.html.twig prod/Share/record.html.twig prod/Share/record.html.twig @@ -11820,9 +11820,9 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le subdef.document web/admin/subdefs.html.twig - + subdef.orderable - subdef.orderable + Orderable web/admin/subdefs.html.twig web/admin/subdefs.html.twig From d931754faae0c90e1492ebe2c6fa391667f66adc Mon Sep 17 00:00:00 2001 From: Anthony C Date: Tue, 23 Feb 2016 19:42:22 +0100 Subject: [PATCH 292/383] Translated using Weblate (English) Currently translated at 99.9% (2297 of 2298 strings) --- resources/locales/messages.en.xlf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/locales/messages.en.xlf b/resources/locales/messages.en.xlf index 7c7f243a4d..30a6674632 100644 --- a/resources/locales/messages.en.xlf +++ b/resources/locales/messages.en.xlf @@ -1,4 +1,4 @@ - +
          @@ -7,8 +7,8 @@
          - - + + Form/Configuration/EmailFormType.php Form/Login/PhraseaAuthenticationForm.php @@ -6166,9 +6166,9 @@ Pushed documents are also available in a received basket within Phraseanet Produ Target device classes/databox/subdef.php
          - + Task Edition - Task Edition + Task edition task-manager/task-editor/task.html.twig @@ -11821,9 +11821,9 @@ Pushed documents are also available in a received basket within Phraseanet Produ subdef.document web/admin/subdefs.html.twig - + subdef.orderable - subdef.orderable + Orderable web/admin/subdefs.html.twig web/admin/subdefs.html.twig From 7cb9b034ae29ce2150ad8b01a61c34605d05bafd Mon Sep 17 00:00:00 2001 From: Anthony C Date: Tue, 23 Feb 2016 19:47:08 +0100 Subject: [PATCH 293/383] Translated using Weblate (French) Currently translated at 100.0% (2298 of 2298 strings) --- resources/locales/messages.fr.xlf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/locales/messages.fr.xlf b/resources/locales/messages.fr.xlf index 911523327c..2bcf678f92 100644 --- a/resources/locales/messages.fr.xlf +++ b/resources/locales/messages.fr.xlf @@ -3159,7 +3159,7 @@ Generates an image - Generates an image + Générer une image Media/Subdef/Image.php @@ -6166,7 +6166,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Task Edition - Task edition + Edition de la tâche task-manager/task-editor/task.html.twig @@ -11822,7 +11822,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le subdef.orderable - Orderable + Peut être commandé web/admin/subdefs.html.twig web/admin/subdefs.html.twig From 846497e3aee13a604989c56b06bb75bbfa952ea9 Mon Sep 17 00:00:00 2001 From: Anthony C Date: Mon, 29 Feb 2016 16:18:56 +0100 Subject: [PATCH 294/383] Translated using Weblate (French) Currently translated at 100.0% (2299 of 2299 strings) --- resources/locales/messages.fr.xlf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/locales/messages.fr.xlf b/resources/locales/messages.fr.xlf index 2bcf678f92..0b3a4567f3 100644 --- a/resources/locales/messages.fr.xlf +++ b/resources/locales/messages.fr.xlf @@ -11815,9 +11815,9 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Activer les recherches sur ce status dans la recherche avancée. admin/statusbit/edit.html.twig - + subdef.document - subdef.document + Sous définition web/admin/subdefs.html.twig From 971896bc265385ee46b8f21c81d52c075439e987 Mon Sep 17 00:00:00 2001 From: Anthony C Date: Mon, 29 Feb 2016 16:20:37 +0100 Subject: [PATCH 295/383] Translated using Weblate (English) Currently translated at 100.0% (2299 of 2299 strings) --- resources/locales/messages.en.xlf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/locales/messages.en.xlf b/resources/locales/messages.en.xlf index 30a6674632..a2080dea79 100644 --- a/resources/locales/messages.en.xlf +++ b/resources/locales/messages.en.xlf @@ -3157,9 +3157,9 @@ Creates an audio file Media/Subdef/Audio.php - + Generates an image - Generates an image + Generates an image Media/Subdef/Image.php @@ -11816,9 +11816,9 @@ Pushed documents are also available in a received basket within Phraseanet Produ Enable status search in advanced search. admin/statusbit/edit.html.twig - + subdef.document - subdef.document + Original document web/admin/subdefs.html.twig From b313f0017d5065331cd5d4c6aee1d89b4bc4d30a Mon Sep 17 00:00:00 2001 From: Anthony C Date: Mon, 29 Feb 2016 16:21:44 +0100 Subject: [PATCH 296/383] Translated using Weblate (French) Currently translated at 100.0% (2299 of 2299 strings) --- resources/locales/messages.fr.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/locales/messages.fr.xlf b/resources/locales/messages.fr.xlf index 0b3a4567f3..701a5c7239 100644 --- a/resources/locales/messages.fr.xlf +++ b/resources/locales/messages.fr.xlf @@ -11817,7 +11817,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le subdef.document - Sous définition + Document original web/admin/subdefs.html.twig From e683e78affa45a0371434db4da6da16093cfb9e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Thu, 19 May 2016 12:41:55 +0200 Subject: [PATCH 297/383] Dump current source translations --- resources/locales/messages.de.xlf | 1254 ++++++++++++-------------- resources/locales/messages.en.xlf | 1260 ++++++++++++--------------- resources/locales/messages.fr.xlf | 1260 ++++++++++++--------------- resources/locales/messages.nl.xlf | 1254 ++++++++++++-------------- resources/locales/validators.de.xlf | 2 +- resources/locales/validators.en.xlf | 2 +- resources/locales/validators.fr.xlf | 2 +- resources/locales/validators.nl.xlf | 2 +- 8 files changed, 2278 insertions(+), 2758 deletions(-) diff --git a/resources/locales/messages.de.xlf b/resources/locales/messages.de.xlf index 0c0ed3af4a..11c21df64c 100644 --- a/resources/locales/messages.de.xlf +++ b/resources/locales/messages.de.xlf @@ -1,6 +1,6 @@ - +
          The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -39,16 +39,14 @@ %basket_length% documents %basket_length% dokument(e) - mobile/lightbox/validate.html.twig - lightbox/IE6/index.html.twig - lightbox/IE6/index.html.twig + mobile/lightbox/validate.html.twig web/lightbox/index.html.twig web/lightbox/index.html.twig %countable% documents can not be modified. %countable% dokumente können nicht geändert werden - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig %d collection selected @@ -73,22 +71,22 @@ %docs_not_orderable% documents ne peuvent pas etre commandes %docs_not_orderable% dokumente können nicht bestellt werden - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig %docs_orderable% documents commandes %docs_orderable% bestellte Dokumente - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig %entry_length% documents %entry_length% documents - mobile/lightbox/feed.html.twig + mobile/lightbox/feed.html.twig %length% peoples %length% Leute - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig actions/Feedback/ListsMacros.html.twig @@ -317,19 +315,16 @@ (validation) a envoyer zu senden - lightbox/IE6/index.html.twig web/lightbox/index.html.twig (validation) envoyee gesendet - lightbox/IE6/index.html.twig web/lightbox/index.html.twig (validation) session terminee Session beendet - lightbox/IE6/index.html.twig web/lightbox/index.html.twig @@ -408,7 +403,7 @@ A field value contains an invalid character Ein Feldwert beinhaltet ein ungültiges Zeichen - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A file has been thrown to the quarantine. @@ -438,7 +433,7 @@ A required field is missing or has an empty value Ein Plichtfeld fehlt oder wurde nicht ausgefüllt - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A task has been created, please run it to complete empty collection @@ -458,17 +453,17 @@ A value does not match an expected format Ein Wert passt nicht für das erwartete Format - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A value exceeds the maximum allowable length Ein Wert überschreitet die zulässige Maximallänge - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A value has been deprecated and is no longer valid Ein Wert ist veraltet und ist nicht mehr gültig - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php API Webhook @@ -524,7 +519,7 @@ Access to the above bases constitutes acceptance of the following Terms of Use (TOU). Access to the above bases constitutes acceptance of the following Terms of Use (TOU). - web/account/access.html.twig + web/account/access.html.twig Access user have readonly access @@ -561,7 +556,7 @@ Accuse de reception indisponible, vous n'avez pas declare d'adresse email Es ist nicht möglich, eine Empfangsbestätigung zu erhalten. Grund: eine fehlende E-Mail Adresse - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Action Forbidden : You are not the publisher @@ -581,7 +576,7 @@ Activate highlight Activate highlight - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Active @@ -608,7 +603,7 @@ Activite Aktivität - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Add @@ -626,6 +621,11 @@ admin/fields/templates.html.twig admin/fields/templates.html.twig + + Add a position + Add a position + Controller/Prod/LanguageController.php + Add an admin einen Administrator hinzufügen @@ -659,12 +659,12 @@ Adresse email du nouvel utilisateur Email Adresse der neuen Benutzer - web/admin/index.html.twig + web/admin/index.html.twig Advanced Search Erweiterte Suche - web/prod/index.html.twig + web/prod/index.html.twig Advanced field parameters @@ -674,37 +674,37 @@ Affichage Anzeige - web/prod/index.html.twig + web/prod/index.html.twig Affichage au demarrage beim Start anzeigen - web/prod/index.html.twig + web/prod/index.html.twig Afficher la fiche descriptive das beschriftliche Blatt anzeigen - web/prod/index.html.twig + web/prod/index.html.twig Afficher le titre den Titel anzeigen - web/prod/index.html.twig + web/prod/index.html.twig Afficher les status die Zustände anzeigen - web/prod/index.html.twig + web/prod/index.html.twig Afficher une icone eine Ikone anzeigen - web/prod/index.html.twig + web/prod/index.html.twig After metadata After metadata - web/prod/index.html.twig + web/prod/index.html.twig Aggregation @@ -714,12 +714,12 @@ Aide die Hilfe - web/prod/index.html.twig + web/prod/index.html.twig Aide sur les expressions regulieres Hilfe zu reguläre Ausdrücken - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Ajouter a @@ -737,7 +737,7 @@ Ajouter un nouvel utilisateur einen neuen Benutzer hinzufügen - web/admin/index.html.twig + web/admin/index.html.twig Ajouter un publisher @@ -752,11 +752,11 @@ All Alle - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig WorkZone/Browser/Browser.html.twig @@ -861,8 +861,7 @@ Controller/Admin/DataboxesController.php Controller/Prod/BasketController.php Controller/Prod/LazaretController.php - Controller/Prod/MoveCollectionController.php - Controller/Prod/OrderController.php + Controller/Prod/MoveCollectionController.php Controller/Prod/StoryController.php Controller/Prod/ToolsController.php Model/Manipulator/LazaretManipulator.php @@ -877,12 +876,12 @@ An error occured while denying, please retry or contact an admin if problem persists Ein Fehler ist aufgetreten bei der Verweigerung. Bitte versuchen Sie es erneut oder wenden Sie sich an Ihren Systemadministrator - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php An error occured while sending, please retry or contact an admin if problem persists Ein Fehler ist aufgetreten beim Senden. Bitte versuchen Sie es erneut oder wenden Sie sich an Ihren Systemadministrator - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php An error occured while upload the file. Please retry @@ -910,9 +909,10 @@ Ein Fehler ist aufgetreten Controller/Admin/CollectionController.php Controller/Admin/DataboxController.php - Controller/Api/V1Controller.php - Controller/Api/V1Controller.php + Controller/Api/V1Controller.php + Controller/Api/V1Controller.php Controller/Prod/BasketController.php + Order/Controller/ProdOrderController.php web/admin/statusbit.html.twig @@ -948,7 +948,7 @@ Apparait aussi dans ces paniers erscheint auch in diesen Sammelkörben - prod/preview/appears_in.html.twig + prod/preview/appears_in.html.twig Apparait aussi dans ces reportages @@ -1020,7 +1020,7 @@ Apply template Vorlage anwenden - web/admin/index.html.twig + web/admin/index.html.twig Apply to all selected documents @@ -1030,7 +1030,7 @@ Archive Archivieren - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig Are you sure you want delete users rights ? @@ -1062,7 +1062,7 @@ Attention Vorsicht Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig prod/results/help.html.twig @@ -1098,7 +1098,7 @@ Aucun statut editable Kein editierbarer Status - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Aucune @@ -1138,7 +1138,7 @@ Audio Audio - web/prod/index.html.twig + web/prod/index.html.twig Audio Birate @@ -1245,8 +1245,8 @@ Back Zurück - mobile/lightbox/index.html.twig - mobile/lightbox/validate.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/validate.html.twig Back to Feedback @@ -1326,7 +1326,7 @@ Basket is not found Basket is not found - Model/Repositories/BasketRepository.php + Model/Repositories/BasketRepository.php Basket updated @@ -1361,8 +1361,8 @@ Browse Baskets Sammelkörbe durchsuchen - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Browser @@ -1377,10 +1377,10 @@ By checking this box, you accept %beginning_link% Terms of Use %end_link% Wenn Sie dieses Kästchen anwählen, akzeptieren Sie die %beginning_link% Nutzeungsbedingungen %end_link% - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig By default it is available for admins @@ -1390,7 +1390,7 @@ By field By field - web/prod/index.html.twig + web/prod/index.html.twig C dans l'air @@ -1415,6 +1415,7 @@ Cancel Abbrechen + Controller/Prod/LanguageController.php admin/fields/templates.html.twig task-manager/task-editor/task.html.twig user/import/view.html.twig @@ -1469,7 +1470,7 @@ Ce champ est decrit comme un element DublinCore Dieses Feld wird als einen Dublin Core Element beschrieben - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Ce champ est en lecture seule @@ -1484,14 +1485,14 @@ Ce champ est obligatoire Dieses Feld ist ein Pflichtfeld - Bridge/Api/Dailymotion.php - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Ce champ est relie a une branche de thesaurus @@ -1506,18 +1507,18 @@ Ce champ est trop court %length% caracteres min Ce champ est trop court %length% caracteres min - Bridge/Api/Dailymotion.php - Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php Ce champ est trop long %length% caracteres max Ce champ est trop long %length% caracteres max - Bridge/Api/Dailymotion.php - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Ce champ est utilise en titre a l'affichage @@ -1552,7 +1553,7 @@ Certains champs sont obligatoires, veuillez les remplir Bitte füllen Sie die erforderlichen Felder aus - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Ces informations sont directement fournies par la norme de metadonnees de ce champ : %norm_name% @@ -1577,12 +1578,7 @@ Chargement Ladend - web/prod/index.html.twig - - - Charset to use for indexation - Zeichensatz für die Indexierung zu benutzen - admin/search-engine/sphinx-search.html.twig + web/prod/index.html.twig Chercher @@ -1616,7 +1612,7 @@ Civility Anrede - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Clear @@ -1648,7 +1644,7 @@ Cocher toute la colonne die ganze Spalte markieren - web/admin/index.html.twig + web/admin/index.html.twig Cochez les cases correspondantes aux colonnes que vous desirez voire apparaitre dans le report @@ -1707,7 +1703,7 @@ Commande du %date% Commande du %date% - Controller/Prod/OrderController.php + Phrasea/Order/OrderBasketProvider.php Commandes @@ -1717,7 +1713,7 @@ Company Unternehmen - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig actions/Feedback/ListsMacros.html.twig prod/User/Add.html.twig @@ -1752,7 +1748,7 @@ Configuration Konfiguration - web/prod/index.html.twig + web/prod/index.html.twig Confirm new email address @@ -1762,7 +1758,7 @@ Confirm reset users rights before applying template Zurücksetzung von Benutzerrechten bestätigen, bevor Sie die Vorlage anwenden - web/admin/index.html.twig + web/admin/index.html.twig Confirmation de votre mot de passe @@ -1858,12 +1854,12 @@ Couleur de selection Farbauswahl - web/prod/index.html.twig + web/prod/index.html.twig Country Land - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig actions/Feedback/ListsMacros.html.twig @@ -1871,6 +1867,11 @@ Ein Konto manuell erstellen web/login/register.html.twig + + Create index + Create index + SearchEngine/Elastic/ElasticsearchSettingsFormType.php + Create new subdef Neuen subdef erstellen @@ -1921,17 +1922,17 @@ Creer un model eine Vorlage erstellen - web/admin/index.html.twig + web/admin/index.html.twig Creer un modele eine Vorlage erstellen - web/admin/index.html.twig + web/admin/index.html.twig Creer un utilisateur einen Benutzer erstellen - web/admin/index.html.twig + web/admin/index.html.twig Creer une nouvelle applications @@ -1962,7 +1963,7 @@ Current operations cannot be executed because the site is temporarily in maintenance mode. Wait a few minutes and try your request again Aktuelle Operationen können nicht ausgeführt werden, da die Website kurzzeitig im Wartungs-Modus ist. Bitte warten Sie oder versuchen Sie es später noch einmal. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Current password @@ -2039,7 +2040,7 @@ Date Added Date Added - web/prod/index.html.twig + web/prod/index.html.twig Date Creation @@ -2061,11 +2062,6 @@ Abfrage Datum prod/orders/order_box.html.twig - - Date fields available for search - verfügbare Datumsfelder für die Suche - admin/search-engine/sphinx-search.html.twig - De von @@ -2086,12 +2082,12 @@ Decocher toute la colonne die ganze Spalte unmarkieren - web/admin/index.html.twig + web/admin/index.html.twig Deconnexion Abmeldung - mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig Decouvrez la documentation @@ -2128,11 +2124,6 @@ Standard Suchoptionen Form/Configuration/SearchEngineFormType.php - - Default sort - Standard-Sortierung - admin/search-engine/phrasea.html.twig - Default validation links duration Standarddauer für die Validierungslinke @@ -2164,7 +2155,7 @@ admin/task-manager/index.html.twig admin/task-manager/templates.html.twig prod/actions/delete_records_confirm.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig prod/upload/lazaret.html.twig prod/upload/lazaret.html.twig @@ -2298,7 +2289,7 @@ Display technical data Display technical data - web/prod/index.html.twig + web/prod/index.html.twig Display thumbnails @@ -2308,7 +2299,7 @@ Do not display Do not display - web/prod/index.html.twig + web/prod/index.html.twig Do not forget to restart the tasks scheduler @@ -2333,14 +2324,15 @@ Do you want to send your report ? Möchten Sie Ihren Bericht senden ? - Phrasea/Controller/LightboxController.php - mobile/lightbox/validate.html.twig - web/lightbox/validate.html.twig + Phrasea/Controller/LightboxController.php + mobile/lightbox/validate.html.twig + mobile/lightbox/validate.html.twig + web/lightbox/validate.html.twig Document Dokument - web/prod/index.html.twig + web/prod/index.html.twig Document Type Sharing @@ -2375,10 +2367,10 @@ Documents indisponibles Dokument(e) nicht verfügbar - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Don't worry, You can modify your configuration later @@ -2395,11 +2387,21 @@ Download von Dokumenten actions/Download/prepare.html.twig + + Drag and drop the pin to move position + Drag and drop the pin to move position + Controller/Prod/LanguageController.php + Droits Rechte web/admin/editusers_quotas.html.twig + + Drop index + Drop index + SearchEngine/Elastic/ElasticsearchSettingsFormType.php + Duree Dauer @@ -2436,12 +2438,17 @@ Bearbeiten admin/task-manager/index.html.twig admin/task-manager/templates.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + + + Edit position + Edit position + Controller/Prod/LanguageController.php Editer Editer - actions/publish/publish_edit.html.twig + actions/publish/publish_edit.html.twig Edition @@ -2468,7 +2475,7 @@ Edition impossible Bearbeitung nicht möglich - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Editor @@ -2592,8 +2599,8 @@ En cours d'encodage Kodierung läuft - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php actions/Bridge/records_list.html.twig @@ -2656,11 +2663,6 @@ Enable possibility to notify users when publishing a new feed entry Form/Configuration/ActionsFormType.php - - Enable stemming - Stemming erlauben - admin/search-engine/phrasea.html.twig - Enable thesaurus Thesaurus aktivieren @@ -2700,7 +2702,7 @@ Entrez plusieurs adresses email en les separant par des points-virgules Trennen Sie die E-Mail Adressen mit Strichpunkten wenn sie an mehrere Empfänger gleichzeitig Dokumente senden wollen - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Entry removed from list @@ -2720,7 +2722,7 @@ Envoie avec succes erfolgreich versendet - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php Erreur @@ -2741,12 +2743,12 @@ Erreur YouTube a rencontré une erreur lors du traitement de la requête. Fehler: YouTube hat einen Fehler bei der Bearbeitung der Anfrage gefunden. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur d'encodage Kodierungsfehler - Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php Erreur de login / mot de passe @@ -2756,32 +2758,32 @@ Erreur la requête a été mal formée ou contenait des données valides. Die Anfrage wurde schlecht formuliert oder beinhaltet ungültige Zeichen - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur la ressource que vous tentez de modifier n'existe pas. Fehler: die Ressource die Sie versuchen zu verändern, existiert nicht. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur le service Youtube n'est pas accessible pour le moment. Veuillez réessayer plus tard. Fehler: die YouTube Dienstleistung ist zurzeit nicht erreichbar. Bitte versuchen Sie es später noch einmal. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur lors de l'authentification au service Youtube, Veuillez vous déconnecter, puis vous reconnecter. Fehler bei der Youtube Authentifizierung. Bitte loggen Sie sich zuerst aus und dann wieder ein. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur lors de l'envoi de la requête. Erreur d'authentification. Fehler beim Versenden einer Anfrage. Authentifizierungsfehler. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur lors de la mise a jour des donnes Fehler während Datenaktualisierung - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php Erreur lors de la tentative ; errreur : %message% @@ -2793,7 +2795,7 @@ Erreur lors de votre authentification Anmeldungsfehler - actions/Bridge/callback.html.twig + actions/Bridge/callback.html.twig Erreur lors du contact avec le serveur WEB @@ -2803,7 +2805,7 @@ Erreur vous avez essayé d'exécuter une requête non prise en charge par Youtube Fehler: Sie haben versucht eine Anfrage die von YouTube nicht unterstützt wird auszuführen. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Error while connecting to FTP @@ -2890,7 +2892,7 @@ FTP FTP - web/account/account.html.twig + web/account/account.html.twig FTP Export @@ -2934,7 +2936,7 @@ Field %name% could not be created, please try again or contact an admin. Field %name% could not be created, please try again or contact an admin. - Controller/Admin/FieldsController.php + Controller/Admin/FieldsController.php Field %name% could not be saved, please try again or contact an admin. @@ -3007,8 +3009,8 @@ Fils disponibles verfügbare Threads - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig Filter @@ -3046,7 +3048,7 @@ Flash Flash web/common/technical_datas.html.twig - web/prod/index.html.twig + web/prod/index.html.twig Flatten layers @@ -3166,6 +3168,11 @@ Generates an image Media/Subdef/Image.php + + Geo Search + Geo Search + web/prod/index.html.twig + Geonames server address GeoNames Serveradresse @@ -3214,7 +3221,7 @@ Graphiste (preview au rollover) Grafiker (Voransicht mit Rollover) - web/prod/index.html.twig + web/prod/index.html.twig Great @@ -3250,7 +3257,7 @@ Guest, you must be authenticated to have the right to download. Guest, you must be authenticated to have the right to download. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig HD Download @@ -3266,7 +3273,7 @@ Help Hilfe - login/layout/base-layout.html.twig + login/layout/base-layout.html.twig Hi, Please log in @@ -3281,10 +3288,10 @@ Home Home - mobile/lightbox/feed.html.twig - mobile/lightbox/validate.html.twig + mobile/lightbox/feed.html.twig + mobile/lightbox/validate.html.twig login/include/language-block.html.twig - login/layout/base-layout.html.twig + login/layout/base-layout.html.twig Homepage slideshow @@ -3315,7 +3322,7 @@ Iconographe (description au rollover) Bildredakteur (Beschreibung mit Rollover) - web/prod/index.html.twig + web/prod/index.html.twig Id @@ -3360,7 +3367,7 @@ Image Bild - web/prod/index.html.twig + web/prod/index.html.twig ImageMagick @@ -3385,14 +3392,14 @@ In the answer grid In the answer grid - web/prod/index.html.twig + web/prod/index.html.twig Include Business-fields in caption Geschäftsfelder in Beschriftung enthalten - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Incorrect please try again @@ -3424,7 +3431,7 @@ Informations personnelles vertrauliche Informationen - web/account/account.html.twig + web/account/account.html.twig Infos @@ -3447,16 +3454,6 @@ Installation wird derzeit bearbeitet, bitte warten Sie... web/setup/step2.html.twig - - Installer Google Chrome - Google Chrome installieren - login/layout/base-layout.html.twig - - - Installer Google Chrome Frame - Google Chrome Frame installieren - login/layout/base-layout.html.twig - Invalid captcha answer. ungültige CAPTCHA Antwort @@ -3505,7 +3502,7 @@ Invalid target collection ungültige Zielkollektion - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php Invalid unlock link. @@ -3548,7 +3545,7 @@ L'upload a echoue Upload ist fehlgeschlagen Bridge/Api/Flickr.php - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php L'upload concernant le record %title% sur le compte %bridge_name% a echoue pour les raisons suivantes : %reason% @@ -3558,17 +3555,17 @@ L'utilisateur approuve ce document Benutzer genehmigt dieses Dokument - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig L'utilisateur desapprouve ce document Benutzer lehnt dieses Dokument ab - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig L'utilisateur n'a pas encore donne son avis sur ce document Benutzer hat seine Meinung nocht nicht gegeben - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig LAST 20 @@ -3588,27 +3585,27 @@ La sous resolution n'est pas disponible pour les documents suivants Unterauflösung für die folgende Dokumente ist nicht verfügbar - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig La taille maximale d'une video est de %duration% minutes. La taille maximale d'une video est de %duration% minutes. - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php La video a ete rejetee Das Video wurde abgelehnt - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php La video a ete supprimee Das Video wurde gelöscht Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php La video est restreinte @@ -3699,16 +3696,16 @@ Le poids maximum d'un fichier est de %size% Le poids maximum d'un fichier est de %size% - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php Le record n'a pas de fichier physique Der Datensatz hat keine physikalische Datei - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php Le token n'a pas encore ete genere @@ -3723,8 +3720,8 @@ Les documents ne peuvent pas etre exportes Dokumente können nicht heruntergeladen werden - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Les elements ne peuvent etre uploades (problemes de type ou de droit) @@ -3756,12 +3753,12 @@ Les status de certains documents ne sont pas accessibles par manque de droits Status von einigen Dokumenten werden nicht erreichbar, fehlende Rechte - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Les termes apparaissent dans le(s) champs Die Begriffe befinden sich in Feld(er): - web/prod/index.html.twig + web/prod/index.html.twig Light Value @@ -3837,12 +3834,6 @@ Live Suche admin/fields/templates.html.twig - - Loading - Ladend - actions/Bridge/index.html.twig - actions/Property/index.html.twig - Loading database documentary structure ... Laden der dokumentarischen Datenbankstruktur… @@ -3894,7 +3885,7 @@ Ma derniere question meine letzte Suchabfrage - web/prod/index.html.twig + web/prod/index.html.twig Mail line %line% is empty @@ -3987,11 +3978,6 @@ Phraseanet Automatische Meldung templates/web/email-template.html.twig - - Mettez à jour votre navigateur ou téléchargez un navigateur plus récent. - Aktualisieren Sie Ihr Webbrowser oder herunterladen Sie die neueste Version eines Webbrowsers. - login/layout/base-layout.html.twig - Mettre a jour aktualisieren @@ -4036,7 +4022,7 @@ Missing target collection Zielkollektion fehlt - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php Missing tests parameter @@ -4051,7 +4037,7 @@ Mode de presentation Anzeigemodus - web/prod/index.html.twig + web/prod/index.html.twig Modele de donnees @@ -4087,12 +4073,12 @@ Move %countable% records to the chosen collection in the list. %countable% Datensätze zur ausgewählten Kollektion verschieben - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig Move one record to the chosen collection in the list. Einen Datensatz zur ausgewählten Kollektion verschieben - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig Moves records @@ -4177,7 +4163,7 @@ No URL available keine verfügbare URL - prod/Share/record.html.twig + prod/Share/record.html.twig No account yet? @@ -4207,7 +4193,7 @@ No document selected Kein ausgewähltes Dokument - prod/actions/delete_records_confirm.html.twig + prod/actions/delete_records_confirm.html.twig No elements to push @@ -4278,7 +4264,7 @@ Nom du nouveau modele Name der neue Vorlage - web/admin/index.html.twig + web/admin/index.html.twig Nom du nouveau panier @@ -4336,7 +4322,7 @@ Notification par email E-Mail Benachrichtigungen - web/account/account.html.twig + web/account/account.html.twig Notifications @@ -4348,11 +4334,6 @@ Allgemeine Benachrichtigungen classes/eventsmanager/broker.php - - Notify - Benachrichtigen - actions/Feedback/List-Share.html.twig - Notify third party application when an event occurs in Phraseanet Notify third party application when an event occurs in Phraseanet @@ -4361,7 +4342,7 @@ Notify users about this publication Die Benutzer über diese Veröffentlichung informieren - actions/publish/publish.html.twig + actions/publish/publish.html.twig Nous vous rappelons qu'il est de votre responsabilité de vous assurer que le contenu de la vidéo que vous allez mettre en ligne est conforme aux conditions d'utilisations @@ -4401,12 +4382,12 @@ Number of replicas Number of replicas - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Number of shards Number of shards - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Number of threads to use for FFMpeg @@ -4416,8 +4397,8 @@ OK OK - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php Ok @@ -4427,7 +4408,7 @@ One document can not be modified. Ein Dokument kann nicht geändert werden - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig Only %nbEditableDocuments% records can be modified. @@ -4459,14 +4440,14 @@ Order has been denied Bestellung wurde verweigert - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php prod/orders/order_box.html.twig prod/orders/order_item.html.twig Order has been sent Bestellung wurde gesendet - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php prod/orders/order_box.html.twig prod/orders/order_item.html.twig @@ -4521,17 +4502,15 @@ Paniers Sammelkörbe - mobile/lightbox/index.html.twig - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig - lightbox/IE6/validate.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig web/lightbox/validate.html.twig Par %author% Von %author% - mobile/lightbox/feed.html.twig + mobile/lightbox/feed.html.twig prod/results/entry.html.twig prod/results/feeds_entry.html.twig @@ -4540,7 +4519,7 @@ Passwort Form/Login/PhraseaAuthenticationForm.php Form/Login/PhraseaRegisterForm.php - web/account/account.html.twig + web/account/account.html.twig Password (confirmation) @@ -4585,19 +4564,14 @@ Photos Bilder - Bridge/Api/Flickr.php + Bridge/Api/Flickr.php Photosets Fotosets - Bridge/Api/Flickr.php + Bridge/Api/Flickr.php Bridge/Flickr/actionelements.html.twig - - Phrasea search-engine configuration - Phrasea Suchmaschine Konfiguration - admin/search-engine/phrasea.html.twig - Phraseanet DataBoxes are MySQL databases, queryable by Phraseanet ApplicationBox. Phraseanet DataBoxes sind MySQL Datenbanken, die von Phraseanet ApplicationBox abgefragt werden können. @@ -4738,7 +4712,7 @@ Position Funktion - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Pour davantage d'informations, consulter le lien suivant %lien% @@ -4759,10 +4733,9 @@ Preferences Einstellungen - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Prefix for notification emails @@ -4777,12 +4750,12 @@ Presentation de vignettes Miniaturansichten - web/prod/index.html.twig + web/prod/index.html.twig Presentation de vignettes de panier Vorstellung der Voransichten des Sammelkorbes - web/prod/index.html.twig + web/prod/index.html.twig Previous @@ -4831,12 +4804,12 @@ admin/publications/wrapper.html.twig web/admin/tree.html.twig web/common/menubar.html.twig - web/prod/index.html.twig + web/prod/index.html.twig Publier Publier - actions/publish/publish.html.twig + actions/publish/publish.html.twig Publique @@ -4853,7 +4826,7 @@ Push Push Controller/Prod/LanguageController.php - eventsmanager/notify/push.php + eventsmanager/notify/push.php Push configuration @@ -4869,41 +4842,41 @@ Push::filter on companies Unternehmensname web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on countries Land web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on emails E-Mail web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on login Benutzername web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on name Nachname/Vorname - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on templates Letzte Vorlage - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter starts beginnt mit web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::une validation est une demande d'appreciation a d'autres personnes @@ -4939,90 +4912,90 @@ Raccourcis claviers de la zone des paniers : Sammelkörbe und Funktionen Abkürzungen - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis claviers en cours de editing : Fenster Abkürzungen bearbeiten - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis claviers en cours de preview : Fenster Abkürzungen, Detailansicht - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis claviers en cours de recherche : Hauptfenster Abkürzungen - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis:: ctrl-a : tout selectionner ctrl-a : alles auswählen - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Raccourcis:: ctrl-e : editer la selection ctrl-e : Auswahl bearbeiten - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Raccourcis:: ctrl-p : imprimer la selection ctrl-p : drucken - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::espace : arreter/demarrer le diaporama Dia-Schau starten - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche bas : scroll vertical Abwärtspfeil: vertikal scrollen - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche droite : page suivante Rechtspfeil: nächste Seite - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche gauche : en arriere Abwärtspfeil: letztes Dokument - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche gauche : en avant Rechtspfeil: nächstes Dokument - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche gauche : page precedente Linkspfeil: vorherige Seite - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche haut : scroll vertical Pfeil oben: vertikal scrollen - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::tab/shift-tab se ballade dans les champs tab/shift-tab : Feld ändern - web/prod/index.html.twig + web/prod/index.html.twig Rappel : Il vous reste %number% jours pour valider %title% de %user% Rappel : Il vous reste %number% jours pour valider %title% de %user% - eventsmanager/notify/validationreminder.php + eventsmanager/notify/validationreminder.php Rappel pour une demande de validation Erinnerung für eine Bestätigungsanfrage - eventsmanager/notify/validationreminder.php + eventsmanager/notify/validationreminder.php Rapport de Validation @@ -5033,7 +5006,7 @@ Re-initialiser Zurücksetzen prod/Baskets/Reorder.html.twig - web/prod/index.html.twig + web/prod/index.html.twig prod/Story/Reorder.html.twig @@ -5041,10 +5014,10 @@ wieder ordnen prod/Baskets/Reorder.html.twig prod/Story/Reorder.html.twig - prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig Read-only @@ -5064,7 +5037,7 @@ Receive notification when I receive a push Eine Benachrichtigung bekommen, wenn einen Push empfangen wird - eventsmanager/notify/push.php + eventsmanager/notify/push.php Receive notification when a publication is available @@ -5135,7 +5108,7 @@ Recevoir un accuse de reception a %my_email% Empfangsbestätigung zu %my_email% bekommen - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Recherche multicritères @@ -5145,7 +5118,7 @@ Rechercher dans un champ date im Feld "Datum" suchen - web/prod/index.html.twig + web/prod/index.html.twig Recommendations @@ -5165,7 +5138,7 @@ Record Not Found Datensatz wurde nicht gefunden - Controller/Api/V1Controller.php + Controller/Api/V1Controller.php Record removed from basket @@ -5190,7 +5163,7 @@ Records have been successfuly moved Datensätze wurden erfolgreich bewegt - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php Records type @@ -5246,7 +5219,7 @@ Relevance Relevance - web/prod/index.html.twig + web/prod/index.html.twig Remember me @@ -5271,7 +5244,7 @@ Remove from basket aus dem Sammelkorb entfernen - prod/preview/tools.html.twig + prod/preview/tools.html.twig Remove watermark @@ -5340,7 +5313,7 @@ Require email validation to activate the account Email Validierung erfordern, um Konto zu aktivieren - web/admin/index.html.twig + web/admin/index.html.twig Required @@ -5360,12 +5333,12 @@ Reset and apply Reset and apply - web/admin/index.html.twig + web/admin/index.html.twig Reset and apply template Zurücksetzen und Vorlage anwenden - web/admin/index.html.twig + web/admin/index.html.twig Reset cache @@ -5375,7 +5348,7 @@ Reset rights before applying template? Möchten Sie die Benutzerrechte zurücksetzen, bevor Sie die Vorlage anwenden? - web/admin/index.html.twig + web/admin/index.html.twig Resolution @@ -5461,7 +5434,7 @@ Rights will be erased before applying template, do you confirm? Benutzerrechte werden gelöscht, bevor Sie die Vorlage anwenden. Bestätigen? - web/admin/index.html.twig + web/admin/index.html.twig Role @@ -5636,7 +5609,7 @@ Selecteur de theme Thema Selektor - web/prod/index.html.twig + web/prod/index.html.twig Selectionnez des documents et @@ -5657,7 +5630,7 @@ Send an email to the user to setup his password Eine Email zum Benutzer senden, um sein Passwort festzulegen - web/admin/index.html.twig + web/admin/index.html.twig Send to Facebook @@ -5693,7 +5666,7 @@ Service youtube introuvable. YouTube Service nicht gefunden - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Session persistente @@ -5719,7 +5692,7 @@ Set sharing permission Legen sie die sharing Berechtigungen fest - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Set statuses restrictions @@ -5771,7 +5744,7 @@ Si cette fenetre ne se ferme pas automatiquement, fermez la, et raffraichissez votre compte Wenn dieses Fenster nicht automatisch schließt, dann schließen Sie es und aktualisieren Sie Ihr Konto. - actions/Bridge/callback.html.twig + actions/Bridge/callback.html.twig Si vous aviez besoin de plus de parametres, %debut_lien%Afficher d'avantage d'options%fin_lien% @@ -5783,11 +5756,6 @@ Wenn Sie sie nicht beachten werden die Dokumente korrekt indiziert aber die Metadaten könnten eventuell falsch sein. prod/Tooltip/DataboxFieldRestrictions.html.twig - - Si vous ne pouvez pas installer un autre navigateur, utilisez Google Chrome Frame. - Wenn Sie nicht ein anderes Webbrowser installieren können, benutzen Sie Google Chrome Frame - login/layout/base-layout.html.twig - Single image Einzelbild @@ -5834,11 +5802,6 @@ Es ist etwas schief gelaufen ! Controller/Admin/RootController.php - - Something wrong happened, please retry or contact an admin. - Ein Fehler ist aufgetreten, bitte bitte wiederholen Sie oder wenden Sie sich an Ihren Systemadministrator - WorkZone/Browser/Browser.html.twig - Something wrong happened, please try again or contact an admin. Ein Fehler ist aufgetreten. Bitte versuchen Sie es erneut oder wenden Sie sich an Ihren Systemadministrator @@ -5872,26 +5835,6 @@ admin/publications/fiche.html.twig admin/publications/list.html.twig - - Sphinx Search RealTime server - Sphinx Search RealTime Server - admin/search-engine/sphinx-search.html.twig - - - Sphinx Search connection configuration - Sphinx Search Anschlusskonfiguration - admin/search-engine/sphinx-search.html.twig - - - Sphinx Search server - Sphinx Search Server - admin/search-engine/sphinx-search.html.twig - - - SphinxSearch search-engine configuration - Sphinx Search Suchmachine Konfiguration - admin/search-engine/sphinx-search.html.twig - Stamp logo Stempel Logo @@ -5924,7 +5867,7 @@ Status des documents a rechercher Zustand der Dokumente zu suchen - web/prod/index.html.twig + web/prod/index.html.twig Status edition @@ -5946,11 +5889,6 @@ Zustand prod/orders/order_box.html.twig - - Stemming - Stemming - admin/search-engine/phrasea.html.twig - Stop Stop @@ -5974,7 +5912,7 @@ Story Not Found Bericht wurde nicht gefunden - Controller/Api/V1Controller.php + Controller/Api/V1Controller.php Story created @@ -6026,6 +5964,11 @@ Subdef Name web/admin/subdefs.html.twig + + Submit + Submit + Controller/Prod/LanguageController.php + Substitute Ersatz @@ -6041,13 +5984,12 @@ Success Erfolg api/auth/native_app_access_token.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Successful install Erfolgreiche Installation - web/admin/index.html.twig + web/admin/index.html.twig Successful removal @@ -6201,7 +6143,7 @@ Template Schablone - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Temporary access to the following collections @@ -6217,7 +6159,7 @@ Terms of Use Nutzungsbedingungen Form/Login/PhraseaRegisterForm.php - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Terms of service @@ -6230,7 +6172,7 @@ Controller/Prod/TOUController.php web/admin/tree.html.twig web/login/cgus.html.twig - login/layout/base-layout.html.twig + login/layout/base-layout.html.twig The URL you used is out of date, please login @@ -6240,7 +6182,7 @@ The Youtube servers have received too many calls from the same caller in a short amount of time. Die YouTube Server haben zu viele Anfragen vom gleichen Server in kurzer Zeit erhalten - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php The application is going down for maintenance, please logout. @@ -6251,12 +6193,12 @@ The authentication token specified in the Authorization header has expired. Authentisierungs Token im angegebenen Authentisierungskopf ist abgelaufen - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php The authentication token specified in the Authorization header is invalid Authentisierungs Token in angegebenen Authentisierungskopf ist nicht gültig - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php The delivery to %email% failed for the following reason : %reason% @@ -6286,7 +6228,7 @@ The file does not match available color Diese Datei passt verfügbare Farben nicht zusammen - Border/Checker/Colorspace.php + Border/Checker/Colorspace.php The file does not match available extensions @@ -6333,7 +6275,7 @@ The records have been properly ordered Datensäzte wurden richtig bestellt - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php prod/orders/order_box.html.twig @@ -6364,17 +6306,17 @@ Theme Thema - web/prod/index.html.twig + web/prod/index.html.twig There is no one to validate orders, please contact an administrator Niemand, um die Bestellungen zu bestätigen. Bitte wenden Sie sich an Ihren Systemadministrator. - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php There is no record eligible for an order Es gibt keinen auswählbaren Datensatz für die Bestellung - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php There is no user to add. @@ -6384,7 +6326,7 @@ Thesaurus Min score Thesaurus Min score - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Thesaurus branch @@ -6425,23 +6367,23 @@ This feed is public Dieses Feed ist öffentlich admin/publications/list.html.twig - actions/publish/publish.html.twig + actions/publish/publish.html.twig This field is required Dieses Feld ist erforderlich - web/admin/index.html.twig + web/admin/index.html.twig This field represents the title of the document This field represents the title of the document - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig This file is too big Datei ist zu gross Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig This is a template @@ -6461,7 +6403,7 @@ This user does not participate to the validation but is only viewer. Dieser Benutzer darf nicht teilnehmen, nur ansehen. - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig This user has no rights @@ -6545,7 +6487,7 @@ Tout type Bildschirmtyp - web/prod/index.html.twig + web/prod/index.html.twig Toutes les publications @@ -6577,7 +6519,7 @@ Trier par Sortieren nach - web/prod/index.html.twig + web/prod/index.html.twig Try to extract embedded thumbnails @@ -6602,7 +6544,7 @@ Type de documents Dokumenttyp - web/prod/index.html.twig + web/prod/index.html.twig Type nombre @@ -6623,12 +6565,12 @@ Un document commande Ein bestelltes Dokument - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Un document ne peut etre commande Ein Dokument kann nicht bestellt werden - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Unable to add file to Phraseanet @@ -6713,7 +6655,7 @@ Unauthorized action Unauthorized action - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Une fois la publication supprimee, les donnees publiees seront definitivement perdues. Continuer ? @@ -6723,7 +6665,7 @@ Une question personnelle eine persönliche Frage - web/prod/index.html.twig + web/prod/index.html.twig Une selection @@ -6830,7 +6772,7 @@ Use latest search settings on Production loading Use latest search settings on Production loading - web/prod/index.html.twig + web/prod/index.html.twig Use my Phraseanet account @@ -6908,7 +6850,7 @@ Users Benutzer - Vocabulary/ControlProvider/UserProvider.php + Vocabulary/ControlProvider/UserProvider.php user/import/view.html.twig web/admin/users.html.twig prod/actions/Push.html.twig @@ -6938,7 +6880,6 @@ VALIDATION Bestätigung web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig web/lightbox/validate.html.twig @@ -6953,8 +6894,7 @@ eventsmanager/notify/validate.php eventsmanager/notify/validationdone.php eventsmanager/notify/validationreminder.php - eventsmanager/notify/validationreminder.php - lightbox/IE6/validate.html.twig + eventsmanager/notify/validationreminder.php Validation from %user% @@ -6969,10 +6909,8 @@ Validations Bestätigung - mobile/lightbox/index.html.twig - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig - lightbox/IE6/validate.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig web/lightbox/validate.html.twig @@ -7009,7 +6947,7 @@ Video Video - web/prod/index.html.twig + web/prod/index.html.twig Video Codec @@ -7025,7 +6963,7 @@ View Ansehen - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig View on %title% @@ -7040,7 +6978,7 @@ Vocabulary not found Vokabeln nicht gefunden - Controller/Prod/EditController.php + Controller/Prod/EditController.php Vocabulary type @@ -7050,15 +6988,13 @@ Voici vos paniers Ihre Sammelkörbe - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig Voici vos validations en cours Hier sind Ihre aktuellen Bewertungen - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig @@ -7134,7 +7070,7 @@ Vous devez selectionner un type de sous definitions Sie müssen einen Typ von Unterauflösungen auswählen - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Vous devez specifier une adresse email et un mot de passe valides @@ -7154,7 +7090,7 @@ Vous etes authentifie avec succes Sie haben sich erfolgreich angemeldet. - actions/Bridge/callback.html.twig + actions/Bridge/callback.html.twig Vous etes maintenant deconnecte. A bientot. @@ -7164,12 +7100,12 @@ Vous n'avez pas assez de droits sur certains elements selectionnes Sie haben nicht genügende Rechte auf einige ausgewählte Elemente. - actions/Bridge/index.html.twig + actions/Bridge/index.html.twig Vous n'avez pas assez de droits sur les elements selectionnes Sie haben nicht genügende Rechte auf die ausgewählte Elemente. - actions/Bridge/index.html.twig + actions/Bridge/index.html.twig Vous n'avez pas les droits pour supprimer certains documents @@ -7196,7 +7132,7 @@ Sie haben kein Element ausgewählt. Bridge/Dailymotion/upload.html.twig Bridge/Flickr/upload.html.twig - actions/Bridge/index.html.twig + actions/Bridge/index.html.twig Bridge/Youtube/upload.html.twig @@ -7228,17 +7164,12 @@ Vous pouvez quitter la plupart des fenetres survolantes via la touche echap esc : Sie können die meiste Teile der Overlay Fenster schliessen - web/prod/index.html.twig + web/prod/index.html.twig Warning ! Warnung ! - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Warning, this database is not empty @@ -7312,13 +7243,13 @@ Would you like to receive an e-mail when your download is ready ? Möchten Sie eine Email erhalten wenn Ihr Download abgeschlossen ist ? - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Would you like to reset rights before applying the template? Möchten Sie die Benutzerrechte zurücksetzen, bevor Sie die Vorlage anwenden? - web/admin/index.html.twig - web/admin/index.html.twig + web/admin/index.html.twig + web/admin/index.html.twig Write Metas @@ -7328,8 +7259,8 @@ YYYY/MM/DD YYYY/MM/DD - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Yes @@ -7352,16 +7283,6 @@ Sie sind dabei, um Rückmeldung für %nb_push_items% Datensätze zu bitten prod/actions/Push.html.twig - - You are about to delete this account. Would you like to continue ? - Der Zugang wird gelöscht. Möchten Sie fortfahren? - actions/Bridge/index.html.twig - - - You are about to delete this basket. Would you like to continue ? - Sie sind bereits, diesen Sammekork zu löschen. Möchten Sie fortfahren? - WorkZone/Browser/Browser.html.twig - You are about to push %nb_push_items% records, %nb_not_available% records can not be processed. Sie sind dabei, %nb_push_items% Datensätze via Push zu senden, %nb_not_available% Datensätze können nicht verarbeitet werden. @@ -7375,7 +7296,7 @@ You are attempting to exceed the storage limit on your account and must delete existing entries before inserting new entries Sie versuchen, die Speicherbegrenzung auf Ihrem Konto zu überschreiten. Zuerst müssen Sie alte Einträge löschen, bevor Sie neue Einträge einfügen können. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php You are not allowed to add users @@ -7424,7 +7345,7 @@ You can alternatively receive an email when the download is ready. Sie können zur Bestätigung eine Email erhalten wenn Ihr Download abgeschlossen ist. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig You can choose only one record @@ -7439,7 +7360,7 @@ You can not directly download more than %max_download% Mo ; time to package all documents is too long You can not download more than %max_download% Mo ; time to package all documents is too long - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig You can not edit this story @@ -7480,12 +7401,12 @@ You do not have rights to remove selected documents Sie besitzen nicht genügend Zugriffsrechte, um die ausgewählte Dokumente zu löschen - prod/actions/delete_records_confirm.html.twig + prod/actions/delete_records_confirm.html.twig You do not have the permission to move records to %collection% You do not have the permission to move records to %collection% - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php You have %quantity% days to validate the selection. @@ -7505,7 +7426,7 @@ You have not access to this basket You have not access to this basket - Model/Repositories/BasketRepository.php + Model/Repositories/BasketRepository.php You have selected %nbReceivedDocuments% records. @@ -7520,7 +7441,7 @@ You have to give your feedback at least on one document to send a report Sie müssen Ihr Feedback mindestens an einem Dokument geben, um einen Bericht zu senden - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php You have to wait for an administrator approval for your access request @@ -7535,7 +7456,7 @@ You must agree to the Terms of Use to continue. Sie müssen die Nutzungsbedingungen akzeptieren, um fortzufahren - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig You must give a destination collection @@ -7657,19 +7578,19 @@ a propos Über - mobile/lightbox/index.html.twig - mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig action : ajouter au panier Zum Sammelkorb hinzufügen prod/preview/tools.html.twig - prod/results/record.html.twig + prod/results/record.html.twig action : bridge Bridge - web/prod/index.html.twig + web/prod/index.html.twig web/prod/toolbar.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig @@ -7694,12 +7615,10 @@ action : exporter Exportieren web/lightbox/feed.html.twig - lightbox/IE6/feed.html.twig - lightbox/IE6/validate.html.twig web/lightbox/validate.html.twig - web/prod/index.html.twig - prod/preview/tools.html.twig - prod/results/record.html.twig + web/prod/index.html.twig + prod/preview/tools.html.twig + prod/results/record.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig prod/WorkZone/Story.html.twig @@ -7714,8 +7633,8 @@ action : print Drucken - prod/preview/tools.html.twig - prod/results/record.html.twig + prod/preview/tools.html.twig + prod/results/record.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig prod/WorkZone/Story.html.twig @@ -7723,7 +7642,7 @@ action : publier Veröffentlichen - web/prod/index.html.twig + web/prod/index.html.twig web/prod/toolbar.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig @@ -7749,22 +7668,22 @@ Löschen web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig prod/WorkZone/Story.html.twig action:: nouveau panier Neuer - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig action:: nouveau reportage Neuer Bericht - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig action::Valider @@ -7775,19 +7694,19 @@ action::detacher entfernen - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig action::editer Bearbeiten - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig action::exporter Exportieren prod/WorkZone/Macros.html.twig prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig action::renommer @@ -8141,7 +8060,7 @@ Tätigkeit Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig @@ -8150,24 +8069,24 @@ Adresse Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur changer mon mot de passe mein Passwort ändern - web/account/account.html.twig + web/account/account.html.twig admin::compte-utilisateur code postal PLZ Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur confirmer la nouvelle adresse email @@ -8189,21 +8108,21 @@ E-Mail Controller/Admin/UserController.php Event/Subscriber/RegistrationSubscriber.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig web/admin/users.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur fax Fax Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur id utilisateur @@ -8215,8 +8134,8 @@ Benutzername Core/Provider/RegistrationServiceProvider.php api/auth/end_user_authorization.html.twig - web/account/account.html.twig - web/account/account.html.twig + web/account/account.html.twig + web/account/account.html.twig web/account/reset-email.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig @@ -8227,7 +8146,7 @@ admin::compte-utilisateur mot de passe Passwort api/auth/end_user_authorization.html.twig - web/account/account.html.twig + web/account/account.html.twig web/account/reset-email.html.twig web/common/dialog_export.html.twig web/setup/step2.html.twig @@ -8238,11 +8157,11 @@ Controller/Admin/UserController.php Event/Subscriber/RegistrationSubscriber.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur nouvelle adresse email @@ -8260,10 +8179,10 @@ Beruf Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur prenom @@ -8271,16 +8190,16 @@ Controller/Admin/UserController.php Event/Subscriber/RegistrationSubscriber.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur sexe Anrede Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig @@ -8288,12 +8207,12 @@ Firma Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig web/admin/users.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur tel @@ -8304,11 +8223,11 @@ admin::compte-utilisateur telephone Telefon Controller/Admin/UserController.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur un email de confirmation vient de vous etre envoye. Veuillez suivre les instructions contenue pour continuer @@ -8320,9 +8239,9 @@ Ort Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur: L'email a correctement ete mis a jour @@ -8372,13 +8291,13 @@ admin::compte-utilisateur:ftp: repertoire de destination ftp FTP Zielordner - web/account/account.html.twig + web/account/account.html.twig web/common/dialog_export.html.twig admin::compte-utilisateur:ftp: Activer le compte FTP FTP-Funktion aktivieren - web/account/account.html.twig + web/account/account.html.twig admin::compte-utilisateur:ftp: Le mot de passe est errone @@ -8388,13 +8307,13 @@ admin::compte-utilisateur:ftp: Nombre d'essais max maximale Anzahl von Versuchen - web/account/account.html.twig + web/account/account.html.twig web/common/dialog_export.html.twig admin::compte-utilisateur:ftp: Utiliser le mode passif Passiv Mode benutzen - web/account/account.html.twig + web/account/account.html.twig web/common/dialog_export.html.twig @@ -8410,31 +8329,31 @@ admin::compte-utilisateur:ftp: prefixe des noms de dossier ftp Ordner Namens-Prefix - web/account/account.html.twig + web/account/account.html.twig admin::compte-utilisateur:sexe: madame Frau Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur:sexe: mademoiselle Fräulein Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur:sexe: monsieur Herr Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::monitor: bases sur lesquelles l'utilisateur est connecte : @@ -8464,7 +8383,7 @@ Client Controller/Admin/ConnectedUsersController.php lib/classes/phrasea.php - classes/record/preview.php + classes/record/preview.php web/admin/connected-users.html.twig @@ -8484,7 +8403,7 @@ Prod Controller/Admin/ConnectedUsersController.php lib/classes/phrasea.php - classes/record/preview.php + classes/record/preview.php web/admin/connected-users.html.twig @@ -8514,9 +8433,9 @@ admin::monitor: module validation Lightbox Controller/Admin/ConnectedUsersController.php - Phrasea/Controller/LightboxController.php - Phrasea/Controller/LightboxController.php - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php lib/classes/phrasea.php web/common/menubar.html.twig @@ -8699,7 +8618,7 @@ alert Vorsicht - actions/Tools/index.html.twig + actions/Tools/index.html.twig all caches services have been flushed @@ -8710,7 +8629,6 @@ an error occured Ein Fehler ist aufgetreten Controller/Prod/ToolsController.php - actions/Tools/index.html.twig an error occured : %message% @@ -8740,7 +8658,7 @@ audio Audio - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php task-manager/task-editor/subdefs.html.twig @@ -8786,19 +8704,19 @@ boutton:: selectionner aucune base Keine - web/prod/index.html.twig + web/prod/index.html.twig boutton:: selectionner toutes les bases Alle - web/prod/index.html.twig + web/prod/index.html.twig boutton::ajouter hinzufügen admin/collection/suggested_value.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig boutton::annuler @@ -8807,22 +8725,22 @@ Controller/Prod/LanguageController.php web/account/reset-email.html.twig admin/collection/create.html.twig - web/admin/index.html.twig + web/admin/index.html.twig admin/publications/fiche.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Bridge/Dailymotion/video_modify.html.twig Bridge/Dailymotion/video_modify.html.twig Bridge/Flickr/photo_modify.html.twig Bridge/Flickr/photo_modify.html.twig Bridge/Youtube/video_modify.html.twig Bridge/Youtube/video_modify.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig - web/prod/tab_thesaurus.html.twig - web/report/all_content.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + web/prod/tab_thesaurus.html.twig + web/report/all_content.html.twig web/thesaurus/accept.html.twig web/thesaurus/accept.html.twig web/thesaurus/export-text-dialog.html.twig @@ -8844,11 +8762,9 @@ boutton::chercher suchen - lib/classes/queries.php - lib/classes/queries.php web/admin/users.html.twig - actions/Feedback/list.html.twig - web/prod/thesaurus.js.twig + actions/Feedback/list.html.twig + web/prod/index.html.twig web/thesaurus/thesaurus.html.twig web/thesaurus/thesaurus.html.twig @@ -8861,7 +8777,7 @@ boutton::commander bestellen - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig boutton::creer @@ -8873,8 +8789,6 @@ boutton::demarrer Dia Show web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig @@ -8891,13 +8805,13 @@ boutton::envoyer senden - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig boutton::essayer probieren - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig boutton::exporter @@ -8908,12 +8822,12 @@ boutton::fermer schliessen Controller/Prod/LanguageController.php - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig web/lightbox/sc_note.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod/actions/Push.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig web/thesaurus/accept.html.twig web/thesaurus/accept.html.twig web/thesaurus/export-topics.html.twig @@ -8947,8 +8861,6 @@ boutton::pause Pause web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig @@ -8956,10 +8868,6 @@ vorherige web/lightbox/feed_options_box.html.twig web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/setup/step2.html.twig @@ -8972,7 +8880,7 @@ boutton::rechercher suchen Controller/Prod/LanguageController.php - web/prod/index.html.twig + web/prod/index.html.twig boutton::refresh @@ -8987,7 +8895,7 @@ boutton::remplacer ersetzen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig boutton::renouveller @@ -9028,10 +8936,6 @@ folgende web/lightbox/feed_options_box.html.twig web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/setup/step2.html.twig @@ -9059,26 +8963,22 @@ Bridge/Flickr/actionelements.html.twig Bridge/Youtube/actioncontainers.html.twig Bridge/Youtube/actionelements.html.twig + web/prod/index.html.twig prod/results/entry.html.twig prod/results/feeds_entry.html.twig - web/prod/thesaurus.js.twig web/thesaurus/presets.html.twig boutton::telecharger download - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig boutton::telecharger tous les documents Alle Dokumente herunterladen web/lightbox/feed.html.twig - lightbox/IE6/feed.html.twig - lightbox/IE6/validate.html.twig web/lightbox/validate.html.twig @@ -9091,8 +8991,8 @@ boutton::valider Bestätigen Controller/Prod/LanguageController.php - mobile/lightbox/note_form.html.twig - web/account/account.html.twig + mobile/lightbox/note_form.html.twig + web/account/account.html.twig web/account/reset-email.html.twig admin/collection/collection.html.twig admin/collection/create.html.twig @@ -9102,8 +9002,6 @@ web/admin/editusers.html.twig admin/publications/fiche.html.twig admin/publications/list.html.twig - admin/search-engine/phrasea.html.twig - admin/search-engine/sphinx-search.html.twig web/admin/setup.html.twig admin/statusbit/edit.html.twig web/admin/structure.html.twig @@ -9126,13 +9024,13 @@ Bridge/Youtube/video_deleteelement.html.twig Bridge/Youtube/video_modify.html.twig Bridge/Youtube/video_moveinto_playlist.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod/Baskets/Reorder.html.twig prod/Baskets/Update.html.twig - web/prod/index.html.twig + web/prod/index.html.twig prod/Story/Reorder.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig web/thesaurus/accept.html.twig web/thesaurus/export-text-dialog.html.twig web/thesaurus/export-topics-dialog.html.twig @@ -9227,8 +9125,8 @@ chargement Verladung - web/prod/tab_thesaurus.html.twig - web/prod/tab_thesaurus.html.twig + web/prod/tab_thesaurus.html.twig + web/prod/tab_thesaurus.html.twig charger d'avantage de publications @@ -9246,7 +9144,7 @@ wählen admin/collection/create.html.twig admin/databox/databox.html.twig - web/prod/index.html.twig + web/prod/index.html.twig classe @@ -9259,11 +9157,6 @@ Zugriff Klasse web/admin/subdefs.html.twig - - client::recherche: dans les categories - In den Kategorien - lib/classes/queries.php - cocher tout Alles aktivieren @@ -9277,12 +9170,12 @@ commande::deadline Termin - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig commande::utilisation prevue Verwendungszweck - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig configuration @@ -9321,7 +9214,7 @@ delete Löschen - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig descendant @@ -9336,7 +9229,7 @@ document Dokument - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php web/admin/subdefs.html.twig web/admin/subdefs.html.twig task-manager/task-editor/subdefs.html.twig @@ -9355,15 +9248,15 @@ edit edit - web/account/account.html.twig - web/account/account.html.twig - web/account/account.html.twig + web/account/account.html.twig + web/account/account.html.twig + web/account/account.html.twig prod/WorkZone/Macros.html.twig edit: chosiir limage du regroupement Als Hauptbild einrichten - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig edit:: Ajouter %s au champ courrant @@ -9388,7 +9281,7 @@ edit::Certains champs doivent etre remplis pour valider cet editing Einige Felder müssen ausgefüllt werden, um diese Bearbeitung zu bestätigen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig edit::certains documents possedent des champs requis non remplis. Merci de les remplir pour valider votre editing @@ -9398,7 +9291,7 @@ edit::preset:: titre Titel - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig effacer (OK) ou quitter (Annuler) ? @@ -9415,27 +9308,22 @@ Email nicht gültig eventsmanager/notify/downloadmailfail.php - - erreur : Vous n'avez pas les droits - Sie haben keinen Zugriff darauf - prod/actions/collection_default.html.twig - export:: FTP FTP - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export:: commande bestellen - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export:: envoi par mail E-Mail - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export:: erreur : aucun document selectionne @@ -9445,29 +9333,29 @@ export:: telechargement Download - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::ftp: reglages manuels manuelle Einstellungen - classes/set/export.php + classes/set/export.php export::mail: contenu du mail Textinhalt - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::mail: destinataire zu - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::mail: fichiers joint E-Mail Anhänge - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::titre: nom original du document @@ -9508,7 +9396,7 @@ flash flash - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php task-manager/task-editor/subdefs.html.twig @@ -9582,7 +9470,7 @@ image Bild - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php task-manager/task-editor/subdefs.html.twig @@ -9634,13 +9522,12 @@ lightbox::recaptitulatif Übersicht web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig web/lightbox/validate.html.twig login:: Changer mon adresse email meine E-Mail Adresse ändern - web/account/account.html.twig + web/account/account.html.twig login:: Envoyer a nouveau le mail de confirmation @@ -9655,7 +9542,7 @@ login:: Mon compte Mein Benutzerkonto - web/account/account.html.twig + web/account/account.html.twig web/common/menubar.html.twig @@ -9704,12 +9591,12 @@ login::register: Faire une demande d'acces Eine Zugriffanfrage machen - web/account/access.html.twig + web/account/access.html.twig login::register: L'acces aux bases ci-dessous implique l'acceptation des Conditions Generales d'Utilisation (CGU) suivantes Der Zugriff auf die folgenden Datenbanken erfolgt nur mit der Bestätigung der folgenden Allgemeinen Nutzenbedingungen - web/account/access.html.twig + web/account/access.html.twig login::register: email confirmation email Pour valider votre inscription a la base de donnees, merci de confirmer votre e-mail en suivant le lien ci-dessous. @@ -9810,7 +9697,7 @@ no image selected Kein Bild wurde ausgewählt - actions/Tools/index.html.twig + actions/Tools/index.html.twig non @@ -9822,8 +9709,6 @@ notice Beschreibung web/lightbox/feed.html.twig - lightbox/IE6/feed.html.twig - lightbox/IE6/validate.html.twig web/lightbox/validate.html.twig @@ -9876,17 +9761,17 @@ panier:: ordre Validation ascendante gut bewertet - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig panier:: ordre Validation descendante weniger gut bewertet - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig panier:: ordre du panier Sammelkorb Reihenfolge - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig panier:: renommer le panier @@ -9976,7 +9861,7 @@ phraseanet:: adresse Adresse - web/account/account.html.twig + web/account/account.html.twig admin/collection/collection.html.twig web/admin/connected-users.html.twig web/common/dialog_export.html.twig @@ -10047,17 +9932,17 @@ phraseanet:: prereglages Voreinstellungen - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig phraseanet:: presse-papier Zwischenablage - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig phraseanet:: preview Voransicht - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod/actions/printer_default.html.twig @@ -10081,7 +9966,7 @@ phraseanet:: thesaurus Thesaurus - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig web/prod/tab_headers.html.twig web/thesaurus/index.html.twig web/thesaurus/load-thesaurus.html.twig @@ -10096,15 +9981,15 @@ phraseanet:: tri par date nach Datum sortieren - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig web/thesaurus/export-topics-dialog.html.twig phraseanet:: tri par nom alphabetische Sortierung - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig phraseanet:: user @@ -10127,26 +10012,26 @@ ladend Controller/Prod/LanguageController.php admin/collection/suggested_value.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig web/thesaurus/thesaurus.html.twig phraseanet::erreur: La connection au serveur Phraseanet semble etre indisponible Die Verbindung mit Phraseanet Server ist derzeit nich verfügbar Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig phraseanet::erreur: Une erreur est survenue, si ce probleme persiste, contactez le support technique Leider ist ein Fehler aufgetreten. Sollte sich dieser Fehler wiederholen kontaktieren Sie bitte den Administrator Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig phraseanet::erreur: Votre session est fermee, veuillez vous re-authentifier Sie sind nun abgemeldet. Bitte loggen Sie sich wieder ein Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig web/thesaurus/thesaurus.html.twig @@ -10237,12 +10122,12 @@ phraseanet::time:: a zu - web/prod/index.html.twig + web/prod/index.html.twig phraseanet::time:: de von - web/prod/index.html.twig + web/prod/index.html.twig phraseanet::type:: audios @@ -10252,7 +10137,7 @@ phraseanet::type:: documents Dokumente - web/prod/index.html.twig + web/prod/index.html.twig web/prod/toolbar.html.twig @@ -10263,7 +10148,7 @@ phraseanet::type:: reportages Berichte - web/prod/index.html.twig + web/prod/index.html.twig phraseanet::type:: videos @@ -10304,24 +10189,24 @@ preview:: Description Beschreibung - web/prod/index.html.twig + web/prod/index.html.twig preview:: Historique Historie - web/prod/index.html.twig + web/prod/index.html.twig preview:: Popularite Beliebtheit - web/prod/index.html.twig + web/prod/index.html.twig preview:: arreter le diaporama stoppen prod/preview/basket_train.html.twig prod/preview/feed_train.html.twig - prod/preview/reg_train.html.twig + prod/preview/reg_train.html.twig prod/preview/result_train.html.twig prod/preview/result_train_options.html.twig @@ -10330,7 +10215,7 @@ Dia-Schau prod/preview/basket_train.html.twig prod/preview/feed_train.html.twig - prod/preview/reg_train.html.twig + prod/preview/reg_train.html.twig prod/preview/result_train.html.twig prod/preview/result_train_options.html.twig @@ -10396,28 +10281,28 @@ processing verarbeitend - actions/Tools/index.html.twig + actions/Tools/index.html.twig prod::Les enregistrements ne provienent pas tous de la meme base et ne peuvent donc etre traites ensemble Achtung: Die ausgewählten Dokumente kommen nicht alle aus der selben Datenbank und können nicht zusammen bearbeitet werden - prod/actions/collection_default.html.twig + Controller/Prod/MoveCollectionController.php actions/Property/index.html.twig prod::Vous n'avez le droit d'effectuer l'operation sur aucun document Sie haben keine Berechtigung, diesen Vorgang auf diese Dokumente durchzuführen - prod/actions/collection_default.html.twig + Controller/Prod/MoveCollectionController.php prod::collection deplacer egalement les documents rattaches a ce(s) regroupement(s) Möchten Sie auch die Dokumente, die mit diesen Berichten verknüpft sind, verschieben? - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig prod::edit: Impossible d'editer simultanement des documents provenant de bases differentes Es ist nicht möglich, Dokumente die aus verschiedenen Bilddatenbanken stammen gleichzeitig zu bearbeiten - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing valeurs heterogenes, choisir 'remplacer', 'ajouter' ou 'annuler' @@ -10427,32 +10312,32 @@ prod::editing: %not_actionable% documents ne peuvent etre edites car vos droits sont induffisants %not_actionable% Dokumente können nicht bearbeitet werden, da Sie keine Rechte darauf haben - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: 1 document ne peut etre edite car vos droits sont induffisants Keine Bearbeitung möglich. Sie haben keinen Zugriff auf die Dokumente - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: aucun documents ne peuvent etre edites car vos droits sont induffisants Es können keine Dokumente bearbeitet werden, da Sie keine Berechtigung für das Bearbeiten haben - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: modeles de fiches Vorlage - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: rechercher-remplacer suchen / ersetzen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: valider ou annuler les modifications Änderungen bestätigen oder abbrechen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing::annulation: abandonner les modification ? @@ -10462,67 +10347,67 @@ prod::editing::fields: status Status - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing::replace: remplacer dans le champ In dem Feld ersetzen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing::replace: remplacer dans tous les champs In allen Feldern ersetzen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:indexation en cours Indexierung in Vorbereitung - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace: chaine remplacante ersetzen durch - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace: options de remplacement Optionen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option : utiliser une expression reguliere regulärer Ausdruck - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option la valeur du cahmp doit etre exacte vollständiges Feld - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option la valeur est comprise dans le champ im Feld gehalten - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option respecter la casse Gross- und Kleinschreibung unterschieden - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option: remplacer toutes les occurences alles ersetzen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option: rester insensible a la casse Gross- und Kleinschreibung nicht unterschieden - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:replace: chaine a rechercher Suchen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::facet:base_label @@ -10552,12 +10437,12 @@ prod::thesaurusTab:cmenu:Accepter en %lng_code% in %lng_code% annehmen - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:cmenu:Remplacer par... ersetzen durch - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:%number% record(s) updated @@ -10567,52 +10452,52 @@ prod::thesaurusTab:dlg:Acceptation en cours. Annahme... - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:Remplacement du candidat "%(from)s" par "%(to)s" prod::thesaurusTab:dlg:Remplacement du candidat "%(from)s" par "%(to)s" - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:Remplacement en cours. Ersetzung... - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:Suppression en cours. Löschen... - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:accepter le terme candidat "%s" ? prod::thesaurusTab:dlg:accepter le terme candidat "%s" ? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:accepter les %d termes candidats ? die %d möglichen Begriffe annehmen? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:remplacer le terme "%s" des fiches par : prod::thesaurusTab:dlg:remplacer le terme "%s" des fiches par : - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:remplacer les %d termes des fiches par : %d Begriffe von der Beschreibung ersetzen durch: - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:supprimer le terme "%s" des fiches ? prod::thesaurusTab:dlg:supprimer le terme "%s" des fiches ? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:supprimer les %d termes des fiches ? %d Begriffe von der Beschreibung(en) löschen? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:too many (%number%) records to update (limit=%maximum%) @@ -10627,18 +10512,17 @@ prod::thesaurusTab:tmenu:Accepter comme synonyme als Synonym annehmen - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:tmenu:Accepter comme terme specifique als bestimmter Begriff annehmen - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:tree:loading wird geladen - web/prod/thesaurus.js.twig - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:wizard:accepter le terme candidat @@ -10648,12 +10532,12 @@ prod::thesaurusTab:wizard:clic-droit / accepter le terme candidat "%s" prod::thesaurusTab:wizard:clic-droit / accepter le terme candidat "%s" - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:wizard:clic-droit / accepter les %s termes candidats Rechtsclick / %s mögliche Begriffe annehmen - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:wizard:remplacer par le terme @@ -10676,26 +10560,26 @@ publication : autheur Autor - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication : email autheur Autor E-Mail - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication : sous titre Untertitel - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication : titre Titel - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication::Voici votre fil RSS personnel. Il vous permettra d'etre tenu au courrant des publications. @@ -10739,12 +10623,12 @@ raccourci :: a propos des raccourcis claviers Über Abkürzungen - web/prod/index.html.twig + web/prod/index.html.twig raccourcis :: ne plus montrer cette aide diese Hilfe nicht mehr anzeigen - web/prod/index.html.twig + web/prod/index.html.twig rafraichir @@ -10758,7 +10642,7 @@ rechercher dans tous les champs Alle Felder - web/prod/index.html.twig + web/prod/index.html.twig recordtype @@ -10788,17 +10672,17 @@ reponses:: images par pages : Suchergebnisse nach Seite - web/prod/index.html.twig + web/prod/index.html.twig reponses:: mode liste Liste - web/prod/index.html.twig + web/prod/index.html.twig reponses:: mode vignettes Miniaturansichten - web/prod/index.html.twig + web/prod/index.html.twig reponses:: partager @@ -10818,12 +10702,12 @@ reponses:: taille des images : Miniaturansichtengrösse - web/prod/index.html.twig + web/prod/index.html.twig reponses::document sans titre ohne Titel - classes/record/adapter.php + classes/record/adapter.php report :: aucun resultat trouve @@ -10911,7 +10795,7 @@ web/report/ajax_dashboard_content_child.html.twig web/report/ajax_data_content.html.twig web/report/ajax_data_content.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig web/report/chart.html.twig web/report/chart.html.twig web/report/report_layout.html.twig @@ -10958,7 +10842,7 @@ report:: Heures Stunden - web/report/all_content.html.twig + web/report/all_content.html.twig report:: IP @@ -11176,7 +11060,7 @@ report:: jour Tag Controller/Report/ActivityController.php - web/report/all_content.html.twig + web/report/all_content.html.twig report:: module @@ -11268,7 +11152,7 @@ report:: page d'accueil Hautpseite - classes/record/preview.php + classes/record/preview.php report:: par %user_infos% @@ -11515,7 +11399,7 @@ report:: visualiseur cooliris Cooliris Viewer - classes/record/preview.php + classes/record/preview.php report::Changement de collection vers : %coll_name% @@ -11551,7 +11435,7 @@ report::Heures Module web/report/ajax_data_content.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig report::Impression des formats : %format% @@ -11566,17 +11450,17 @@ report::Nombre de connexions Verbindungen - web/report/all_content.html.twig + web/report/all_content.html.twig report::Nombre de document ajoute Anzahl von hinzugefügten Dokumenten - web/report/all_content.html.twig + web/report/all_content.html.twig report::Nombre de document edite Anzahl von bearbeiteten Dokumenten - web/report/all_content.html.twig + web/report/all_content.html.twig report::Publication de %dest% @@ -11601,9 +11485,9 @@ report::acces direct Direkt Zugriff - classes/record/preview.php - classes/record/preview.php - classes/record/preview.php + classes/record/preview.php + classes/record/preview.php + classes/record/preview.php report::activite @@ -11657,13 +11541,13 @@ reportage Reportage - Phrasea/Twig/PhraseanetExtension.php - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php resultat numero %number% resultat numero %number% - classes/record/preview.php + classes/record/preview.php retourne "automobile", "automate", "autoroute", ... @@ -12564,7 +12448,7 @@ thumbnail validation Miniaturansicht Bestätigung - actions/Tools/index.html.twig + actions/Tools/index.html.twig to @@ -12642,21 +12526,19 @@ validation:: NON Nein - mobile/lightbox/basket_element.html.twig + mobile/lightbox/basket_element.html.twig web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig validation:: OUI Ja - mobile/lightbox/basket_element.html.twig + mobile/lightbox/basket_element.html.twig web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig validation:: editer ma note mein Kommentar verändern - mobile/lightbox/basket_element.html.twig + mobile/lightbox/basket_element.html.twig validation:: note @@ -12671,12 +12553,10 @@ validation::envoyer mon rapport Meinen Bericht senden - mobile/lightbox/validate.html.twig - mobile/lightbox/validate.html.twig + mobile/lightbox/validate.html.twig + mobile/lightbox/validate.html.twig web/lightbox/basket_options.html.twig web/lightbox/basket_options.html.twig - lightbox/IE6/basket_options.html.twig - lightbox/IE6/basket_options.html.twig version @@ -12686,7 +12566,7 @@ veuillez choisir au minimum une collection Mindestens eine Kollektion muss ausgewählt werden - web/report/all_content.html.twig + web/report/all_content.html.twig video diff --git a/resources/locales/messages.en.xlf b/resources/locales/messages.en.xlf index a2080dea79..10520bd1cd 100644 --- a/resources/locales/messages.en.xlf +++ b/resources/locales/messages.en.xlf @@ -1,14 +1,14 @@ - + - +
          The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.
          - - + + Form/Configuration/EmailFormType.php Form/Login/PhraseaAuthenticationForm.php @@ -35,16 +35,14 @@ %basket_length% documents %basket_length% document(s) - mobile/lightbox/validate.html.twig - lightbox/IE6/index.html.twig - lightbox/IE6/index.html.twig + mobile/lightbox/validate.html.twig web/lightbox/index.html.twig web/lightbox/index.html.twig %countable% documents can not be modified. %countable% documents cannot be modified. - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig %d collection selected @@ -69,22 +67,22 @@ %docs_not_orderable% documents ne peuvent pas etre commandes %docs_not_orderable% document(s) can't be ordered - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig %docs_orderable% documents commandes %docs_orderable% ordered document(s) - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig %entry_length% documents %entry_length% documents - mobile/lightbox/feed.html.twig + mobile/lightbox/feed.html.twig %length% peoples %length% people - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig actions/Feedback/ListsMacros.html.twig @@ -313,19 +311,16 @@ (validation) a envoyer Feedback request to send - lightbox/IE6/index.html.twig web/lightbox/index.html.twig (validation) envoyee Feedback request sent. - lightbox/IE6/index.html.twig web/lightbox/index.html.twig (validation) session terminee Feedback session ended. - lightbox/IE6/index.html.twig web/lightbox/index.html.twig @@ -404,7 +399,7 @@ A field value contains an invalid character A value in field contains an invalid character - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A file has been thrown to the quarantine. @@ -434,7 +429,7 @@ A required field is missing or has an empty value A required field is missing or has an empty value - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A task has been created, please run it to complete empty collection @@ -454,17 +449,17 @@ A value does not match an expected format A value does not match an expected format - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A value exceeds the maximum allowable length A value exceeds the maximum allowed length - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A value has been deprecated and is no longer valid A value has been deprecated and is no longer valid - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php API Webhook @@ -520,7 +515,7 @@ Access to the above bases constitutes acceptance of the following Terms of Use (TOU). Accessing to the bases below means acceptance of the following Terms of Use. - web/account/access.html.twig + web/account/access.html.twig Access user have readonly access @@ -557,7 +552,7 @@ Accuse de reception indisponible, vous n'avez pas declare d'adresse email Unable to send an acknowledgement: Missing e-mail address. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Action Forbidden : You are not the publisher @@ -577,7 +572,7 @@ Activate highlight Activate highlight - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Active @@ -604,7 +599,7 @@ Activite Activity - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Add @@ -622,6 +617,11 @@ admin/fields/templates.html.twig admin/fields/templates.html.twig + + Add a position + Add a position + Controller/Prod/LanguageController.php + Add an admin Add an admin @@ -655,12 +655,12 @@ Adresse email du nouvel utilisateur New user e-mail address - web/admin/index.html.twig + web/admin/index.html.twig Advanced Search Advanced search - web/prod/index.html.twig + web/prod/index.html.twig Advanced field parameters @@ -670,37 +670,37 @@ Affichage Display - web/prod/index.html.twig + web/prod/index.html.twig Affichage au demarrage Display On startup - web/prod/index.html.twig + web/prod/index.html.twig Afficher la fiche descriptive Show Caption - web/prod/index.html.twig + web/prod/index.html.twig Afficher le titre Show Title - web/prod/index.html.twig + web/prod/index.html.twig Afficher les status Show Status - web/prod/index.html.twig + web/prod/index.html.twig Afficher une icone Display an Icon - web/prod/index.html.twig + web/prod/index.html.twig After metadata After captions - web/prod/index.html.twig + web/prod/index.html.twig Aggregation @@ -710,12 +710,12 @@ Aide Help - web/prod/index.html.twig + web/prod/index.html.twig Aide sur les expressions regulieres Help about Regular expressions - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Ajouter a @@ -733,7 +733,7 @@ Ajouter un nouvel utilisateur Add a new user - web/admin/index.html.twig + web/admin/index.html.twig Ajouter un publisher @@ -748,11 +748,11 @@ All All - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig WorkZone/Browser/Browser.html.twig @@ -857,8 +857,7 @@ Controller/Admin/DataboxesController.php Controller/Prod/BasketController.php Controller/Prod/LazaretController.php - Controller/Prod/MoveCollectionController.php - Controller/Prod/OrderController.php + Controller/Prod/MoveCollectionController.php Controller/Prod/StoryController.php Controller/Prod/ToolsController.php Model/Manipulator/LazaretManipulator.php @@ -873,12 +872,12 @@ An error occured while denying, please retry or contact an admin if problem persists An error occurred while denying. Please retry or contact an administrator if problem persists. - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php An error occured while sending, please retry or contact an admin if problem persists An error occured while sending. Please retry or contact an administrator if problem persists. - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php An error occured while upload the file. Please retry @@ -906,9 +905,10 @@ An error occurred Controller/Admin/CollectionController.php Controller/Admin/DataboxController.php - Controller/Api/V1Controller.php - Controller/Api/V1Controller.php + Controller/Api/V1Controller.php + Controller/Api/V1Controller.php Controller/Prod/BasketController.php + Order/Controller/ProdOrderController.php web/admin/statusbit.html.twig @@ -944,7 +944,7 @@ Apparait aussi dans ces paniers Also in the following baskets - prod/preview/appears_in.html.twig + prod/preview/appears_in.html.twig Apparait aussi dans ces reportages @@ -1016,7 +1016,7 @@ Apply template Apply template - web/admin/index.html.twig + web/admin/index.html.twig Apply to all selected documents @@ -1026,7 +1026,7 @@ Archive Archive - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig Are you sure you want delete users rights ? @@ -1058,7 +1058,7 @@ Attention Warning Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig prod/results/help.html.twig @@ -1094,7 +1094,7 @@ Aucun statut editable No editable status - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Aucune @@ -1134,7 +1134,7 @@ Audio Audio - web/prod/index.html.twig + web/prod/index.html.twig Audio Birate @@ -1241,8 +1241,8 @@ Back Previous - mobile/lightbox/index.html.twig - mobile/lightbox/validate.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/validate.html.twig Back to Feedback @@ -1322,7 +1322,7 @@ Basket is not found Basket is not found - Model/Repositories/BasketRepository.php + Model/Repositories/BasketRepository.php Basket updated @@ -1357,8 +1357,8 @@ Browse Baskets Browse baskets - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Browser @@ -1373,10 +1373,10 @@ By checking this box, you accept %beginning_link% Terms of Use %end_link% By checking this box, you have read and agree to the %beginning_link% Terms of Use %end_link% - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig By default it is available for admins @@ -1386,7 +1386,7 @@ By field By field - web/prod/index.html.twig + web/prod/index.html.twig C dans l'air @@ -1411,6 +1411,7 @@ Cancel Cancel + Controller/Prod/LanguageController.php admin/fields/templates.html.twig task-manager/task-editor/task.html.twig user/import/view.html.twig @@ -1465,7 +1466,7 @@ Ce champ est decrit comme un element DublinCore This field has a Dublin Core link - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Ce champ est en lecture seule @@ -1480,14 +1481,14 @@ Ce champ est obligatoire This field is mandatory - Bridge/Api/Dailymotion.php - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Ce champ est relie a une branche de thesaurus @@ -1502,18 +1503,18 @@ Ce champ est trop court %length% caracteres min Too short, expecting %length% characters min. - Bridge/Api/Dailymotion.php - Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php Ce champ est trop long %length% caracteres max Too long, expecting %length% characters max. - Bridge/Api/Dailymotion.php - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Ce champ est utilise en titre a l'affichage @@ -1548,7 +1549,7 @@ Certains champs sont obligatoires, veuillez les remplir Some fields must be completed - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Ces informations sont directement fournies par la norme de metadonnees de ce champ : %norm_name% @@ -1573,12 +1574,7 @@ Chargement Loading... - web/prod/index.html.twig - - - Charset to use for indexation - Charset to use for indexation - admin/search-engine/sphinx-search.html.twig + web/prod/index.html.twig Chercher @@ -1612,7 +1608,7 @@ Civility Title - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Clear @@ -1644,7 +1640,7 @@ Cocher toute la colonne Check all boxes from column - web/admin/index.html.twig + web/admin/index.html.twig Cochez les cases correspondantes aux colonnes que vous desirez voire apparaitre dans le report @@ -1703,7 +1699,7 @@ Commande du %date% Order of %date% - Controller/Prod/OrderController.php + Phrasea/Order/OrderBasketProvider.php Commandes @@ -1713,7 +1709,7 @@ Company Company - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig actions/Feedback/ListsMacros.html.twig prod/User/Add.html.twig @@ -1748,7 +1744,7 @@ Configuration Configuration - web/prod/index.html.twig + web/prod/index.html.twig Confirm new email address @@ -1758,7 +1754,7 @@ Confirm reset users rights before applying template Confirm the reset of selected users'rights before applying the template - web/admin/index.html.twig + web/admin/index.html.twig Confirmation de votre mot de passe @@ -1854,12 +1850,12 @@ Couleur de selection Selection color - web/prod/index.html.twig + web/prod/index.html.twig Country Country - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig actions/Feedback/ListsMacros.html.twig @@ -1867,6 +1863,11 @@ Create an account manually web/login/register.html.twig + + Create index + Create index + SearchEngine/Elastic/ElasticsearchSettingsFormType.php + Create new subdef Create new subview @@ -1917,17 +1918,17 @@ Creer un model Create a template user - web/admin/index.html.twig + web/admin/index.html.twig Creer un modele Create a template - web/admin/index.html.twig + web/admin/index.html.twig Creer un utilisateur Create a new user - web/admin/index.html.twig + web/admin/index.html.twig Creer une nouvelle applications @@ -1958,7 +1959,7 @@ Current operations cannot be executed because the site is temporarily in maintenance mode. Wait a few minutes and try your request again The site is temporarily in maintenance mode, current operations cannot be done. Wait a few minutes and try again. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Current password @@ -2035,7 +2036,7 @@ Date Added Date added - web/prod/index.html.twig + web/prod/index.html.twig Date Creation @@ -2057,11 +2058,6 @@ Request date prod/orders/order_box.html.twig - - Date fields available for search - Date fields available for search - admin/search-engine/sphinx-search.html.twig - De From @@ -2082,12 +2078,12 @@ Decocher toute la colonne Uncheck all boxes from column - web/admin/index.html.twig + web/admin/index.html.twig Deconnexion Logout - mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig Decouvrez la documentation @@ -2124,11 +2120,6 @@ Default searched type Form/Configuration/SearchEngineFormType.php - - Default sort - Default sort - admin/search-engine/phrasea.html.twig - Default validation links duration Default feedback links duration @@ -2160,7 +2151,7 @@ admin/task-manager/index.html.twig admin/task-manager/templates.html.twig prod/actions/delete_records_confirm.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig prod/upload/lazaret.html.twig prod/upload/lazaret.html.twig @@ -2294,7 +2285,7 @@ Display technical data Display technical data - web/prod/index.html.twig + web/prod/index.html.twig Display thumbnails @@ -2304,7 +2295,7 @@ Do not display Do not display - web/prod/index.html.twig + web/prod/index.html.twig Do not forget to restart the tasks scheduler @@ -2329,14 +2320,15 @@ Do you want to send your report ? Send your Report ? - Phrasea/Controller/LightboxController.php - mobile/lightbox/validate.html.twig - web/lightbox/validate.html.twig + Phrasea/Controller/LightboxController.php + mobile/lightbox/validate.html.twig + mobile/lightbox/validate.html.twig + web/lightbox/validate.html.twig Document Document - web/prod/index.html.twig + web/prod/index.html.twig Document Type Sharing @@ -2371,10 +2363,10 @@ Documents indisponibles Document(s) unavailable - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Don't worry, You can modify your configuration later @@ -2391,11 +2383,21 @@ Documents downloads. actions/Download/prepare.html.twig + + Drag and drop the pin to move position + Drag and drop the pin to move position + Controller/Prod/LanguageController.php + Droits Rights web/admin/editusers_quotas.html.twig + + Drop index + Drop index + SearchEngine/Elastic/ElasticsearchSettingsFormType.php + Duree Length @@ -2432,12 +2434,17 @@ Edit admin/task-manager/index.html.twig admin/task-manager/templates.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + + + Edit position + Edit position + Controller/Prod/LanguageController.php Editer Edit - actions/publish/publish_edit.html.twig + actions/publish/publish_edit.html.twig Edition @@ -2464,7 +2471,7 @@ Edition impossible Unable to edit - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Editor @@ -2588,8 +2595,8 @@ En cours d'encodage Encoding in progress - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php actions/Bridge/records_list.html.twig @@ -2652,11 +2659,6 @@ Enable possibility to notify users when publishing a news feed entry Form/Configuration/ActionsFormType.php - - Enable stemming - Enable stemming - admin/search-engine/phrasea.html.twig - Enable thesaurus Enable Thesaurus @@ -2696,7 +2698,7 @@ Entrez plusieurs adresses email en les separant par des points-virgules Use a semicolon between e-mail addresses. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Entry removed from list @@ -2716,7 +2718,7 @@ Envoie avec succes Succesfully delivered - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php Erreur @@ -2737,12 +2739,12 @@ Erreur YouTube a rencontré une erreur lors du traitement de la requête. Youtube has encountered an error processing query - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur d'encodage Encoding Error - Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php Erreur de login / mot de passe @@ -2752,32 +2754,32 @@ Erreur la requête a été mal formée ou contenait des données valides. Query is badly formulated or contains unvalid datas - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur la ressource que vous tentez de modifier n'existe pas. The resource you are trying to modify doesn't exist or has been deleted - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur le service Youtube n'est pas accessible pour le moment. Veuillez réessayer plus tard. YouTube service is unavailable. Please try again later. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur lors de l'authentification au service Youtube, Veuillez vous déconnecter, puis vous reconnecter. Unable to authenticate on Youtube service, Please disconnect and try to connect again - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur lors de l'envoi de la requête. Erreur d'authentification. Authentication Error - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur lors de la mise a jour des donnes Error when updating data - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php Erreur lors de la tentative ; errreur : %message% @@ -2789,7 +2791,7 @@ Erreur lors de votre authentification Authentication failed - actions/Bridge/callback.html.twig + actions/Bridge/callback.html.twig Erreur lors du contact avec le serveur WEB @@ -2799,7 +2801,7 @@ Erreur vous avez essayé d'exécuter une requête non prise en charge par Youtube Attempted query is not supported by Youtube - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Error while connecting to FTP @@ -2886,7 +2888,7 @@ FTP FTP - web/account/account.html.twig + web/account/account.html.twig FTP Export @@ -2930,7 +2932,7 @@ Field %name% could not be created, please try again or contact an admin. Field %name% could not be created, please try again or contact an admin. - Controller/Admin/FieldsController.php + Controller/Admin/FieldsController.php Field %name% could not be saved, please try again or contact an admin. @@ -3003,8 +3005,8 @@ Fils disponibles Available feed - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig Filter @@ -3042,7 +3044,7 @@ Flash Flash web/common/technical_datas.html.twig - web/prod/index.html.twig + web/prod/index.html.twig Flatten layers @@ -3162,6 +3164,11 @@ Generates an image Media/Subdef/Image.php + + Geo Search + Geo Search + web/prod/index.html.twig + Geonames server address Geonames server address @@ -3210,7 +3217,7 @@ Graphiste (preview au rollover) Graphist (preview on rollover) - web/prod/index.html.twig + web/prod/index.html.twig Great @@ -3246,7 +3253,7 @@ Guest, you must be authenticated to have the right to download. You must be authenticated to have the right to download. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig HD Download @@ -3262,7 +3269,7 @@ Help Help - login/layout/base-layout.html.twig + login/layout/base-layout.html.twig Hi, Please log in @@ -3277,10 +3284,10 @@ Home Home - mobile/lightbox/feed.html.twig - mobile/lightbox/validate.html.twig + mobile/lightbox/feed.html.twig + mobile/lightbox/validate.html.twig login/include/language-block.html.twig - login/layout/base-layout.html.twig + login/layout/base-layout.html.twig Homepage slideshow @@ -3311,7 +3318,7 @@ Iconographe (description au rollover) Iconograph (caption on rollover) - web/prod/index.html.twig + web/prod/index.html.twig Id @@ -3356,7 +3363,7 @@ Image Image - web/prod/index.html.twig + web/prod/index.html.twig ImageMagick @@ -3381,14 +3388,14 @@ In the answer grid In the answer grid - web/prod/index.html.twig + web/prod/index.html.twig Include Business-fields in caption Include Business fields in captions - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Incorrect please try again @@ -3420,7 +3427,7 @@ Informations personnelles Your information - web/account/account.html.twig + web/account/account.html.twig Infos @@ -3443,16 +3450,6 @@ Installation in progress, please wait... web/setup/step2.html.twig - - Installer Google Chrome - Install Google Chrome - login/layout/base-layout.html.twig - - - Installer Google Chrome Frame - Install Google Chrome Frame for Internet Explorer - login/layout/base-layout.html.twig - Invalid captcha answer. Invalid CAPTCHA answer. @@ -3501,7 +3498,7 @@ Invalid target collection Invalid target collection - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php Invalid unlock link. @@ -3544,7 +3541,7 @@ L'upload a echoue Upload failed Bridge/Api/Flickr.php - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php L'upload concernant le record %title% sur le compte %bridge_name% a echoue pour les raisons suivantes : %reason% @@ -3554,17 +3551,17 @@ L'utilisateur approuve ce document User approves this document - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig L'utilisateur desapprouve ce document User disapproves this document - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig L'utilisateur n'a pas encore donne son avis sur ce document User hasn't decided yet - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig LAST 20 @@ -3584,27 +3581,27 @@ La sous resolution n'est pas disponible pour les documents suivants Subviews unavailable for the following document(s) - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig La taille maximale d'une video est de %duration% minutes. The maximum duration for a video is %duration% minutes. - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php La video a ete rejetee Video has been rejected - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php La video a ete supprimee Video has been deleted Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php La video est restreinte @@ -3695,16 +3692,16 @@ Le poids maximum d'un fichier est de %size% Maximum filesize is %size% - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php Le record n'a pas de fichier physique No physical file for this record - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php Le token n'a pas encore ete genere @@ -3719,8 +3716,8 @@ Les documents ne peuvent pas etre exportes Documents can not be downloaded - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Les elements ne peuvent etre uploades (problemes de type ou de droit) @@ -3752,12 +3749,12 @@ Les status de certains documents ne sont pas accessibles par manque de droits your user rights do not allow you to modify Status for some of the selected documents - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Les termes apparaissent dans le(s) champs Word(s) from field(s) - web/prod/index.html.twig + web/prod/index.html.twig Light Value @@ -3833,12 +3830,6 @@ Live search admin/fields/templates.html.twig - - Loading - Loading - actions/Bridge/index.html.twig - actions/Property/index.html.twig - Loading database documentary structure ... Loading database structure setup... @@ -3890,7 +3881,7 @@ Ma derniere question My last query - web/prod/index.html.twig + web/prod/index.html.twig Mail line %line% is empty @@ -3983,11 +3974,6 @@ Automatic message from Phraseanet templates/web/email-template.html.twig - - Mettez à jour votre navigateur ou téléchargez un navigateur plus récent. - Upgrade your current browser or download a newer one. - login/layout/base-layout.html.twig - Mettre a jour Update @@ -4032,7 +4018,7 @@ Missing target collection Missing target collection - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php Missing tests parameter @@ -4047,7 +4033,7 @@ Mode de presentation Display mode - web/prod/index.html.twig + web/prod/index.html.twig Modele de donnees @@ -4083,12 +4069,12 @@ Move %countable% records to the chosen collection in the list. Move %countable% selected records to the chosen collection in the list. - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig Move one record to the chosen collection in the list. Move one record to the chosen collection in the list. - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig Moves records @@ -4173,7 +4159,7 @@ No URL available No URL available - prod/Share/record.html.twig + prod/Share/record.html.twig No account yet? @@ -4203,7 +4189,7 @@ No document selected No document selected - prod/actions/delete_records_confirm.html.twig + prod/actions/delete_records_confirm.html.twig No elements to push @@ -4274,7 +4260,7 @@ Nom du nouveau modele New template name - web/admin/index.html.twig + web/admin/index.html.twig Nom du nouveau panier @@ -4332,7 +4318,7 @@ Notification par email E-mail notifications - web/account/account.html.twig + web/account/account.html.twig Notifications @@ -4344,11 +4330,6 @@ Global notifications classes/eventsmanager/broker.php - - Notify - Notify - actions/Feedback/List-Share.html.twig - Notify third party application when an event occurs in Phraseanet Notify third party application when an event occurs in Phraseanet @@ -4357,7 +4338,7 @@ Notify users about this publication Notify users about this publication. - actions/publish/publish.html.twig + actions/publish/publish.html.twig Nous vous rappelons qu'il est de votre responsabilité de vous assurer que le contenu de la vidéo que vous allez mettre en ligne est conforme aux conditions d'utilisations @@ -4397,12 +4378,12 @@ Number of replicas Number of replicas - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Number of shards Number of shards - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Number of threads to use for FFMpeg @@ -4412,8 +4393,8 @@ OK OK - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php Ok @@ -4423,7 +4404,7 @@ One document can not be modified. One document can not be modified. - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig Only %nbEditableDocuments% records can be modified. @@ -4455,14 +4436,14 @@ Order has been denied The order has been denied. - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php prod/orders/order_box.html.twig prod/orders/order_item.html.twig Order has been sent The order has been sent. - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php prod/orders/order_box.html.twig prod/orders/order_item.html.twig @@ -4517,17 +4498,15 @@ Paniers Baskets - mobile/lightbox/index.html.twig - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig - lightbox/IE6/validate.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig web/lightbox/validate.html.twig Par %author% by %author% - mobile/lightbox/feed.html.twig + mobile/lightbox/feed.html.twig prod/results/entry.html.twig prod/results/feeds_entry.html.twig @@ -4536,7 +4515,7 @@ Password Form/Login/PhraseaAuthenticationForm.php Form/Login/PhraseaRegisterForm.php - web/account/account.html.twig + web/account/account.html.twig Password (confirmation) @@ -4581,19 +4560,14 @@ Photos Photos - Bridge/Api/Flickr.php + Bridge/Api/Flickr.php Photosets Photos set - Bridge/Api/Flickr.php + Bridge/Api/Flickr.php Bridge/Flickr/actionelements.html.twig - - Phrasea search-engine configuration - Phrasea search engine configuration - admin/search-engine/phrasea.html.twig - Phraseanet DataBoxes are MySQL databases, queryable by Phraseanet ApplicationBox. Phraseanet DataBoxes are MySQL databases, searchable by Phraseanet ApplicationBox. @@ -4734,7 +4708,7 @@ Position Position - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Pour davantage d'informations, consulter le lien suivant %lien% @@ -4755,10 +4729,9 @@ Preferences Settings - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Prefix for notification emails @@ -4773,12 +4746,12 @@ Presentation de vignettes Thumbnails - web/prod/index.html.twig + web/prod/index.html.twig Presentation de vignettes de panier Basket display setup - web/prod/index.html.twig + web/prod/index.html.twig Previous @@ -4827,12 +4800,12 @@ admin/publications/wrapper.html.twig web/admin/tree.html.twig web/common/menubar.html.twig - web/prod/index.html.twig + web/prod/index.html.twig Publier Publish - actions/publish/publish.html.twig + actions/publish/publish.html.twig Publique @@ -4849,7 +4822,7 @@ Push Push Controller/Prod/LanguageController.php - eventsmanager/notify/push.php + eventsmanager/notify/push.php Push configuration @@ -4865,41 +4838,41 @@ Push::filter on companies Company web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on countries Country web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on emails E-mail web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on login Login web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on name Last name/First name - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on templates Last template - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter starts Starts with web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::une validation est une demande d'appreciation a d'autres personnes @@ -4939,90 +4912,90 @@ Pushed documents are also available in a received basket within Phraseanet Produ Raccourcis claviers de la zone des paniers : - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis claviers en cours de editing : Edit window shortcuts - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis claviers en cours de preview : Detailed View window shortcut - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis claviers en cours de recherche : Main windows shortcuts - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis:: ctrl-a : tout selectionner ctrl-a : select all - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Raccourcis:: ctrl-e : editer la selection ctrl-e : edit selection - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Raccourcis:: ctrl-p : imprimer la selection ctrl-p : print selected - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::espace : arreter/demarrer le diaporama space : start/stop diaporama - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche bas : scroll vertical down arrow : vertical scroll - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche droite : page suivante right arrow : next page - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche gauche : en arriere left arrow : previous document - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche gauche : en avant right arrow : next document - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche gauche : page precedente left arrow : previous page - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche haut : scroll vertical up arrow : vertical scroll - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::tab/shift-tab se ballade dans les champs tab/shift-tab : change field - web/prod/index.html.twig + web/prod/index.html.twig Rappel : Il vous reste %number% jours pour valider %title% de %user% Reminder: You have %number% day left to validate %title% from %user% - eventsmanager/notify/validationreminder.php + eventsmanager/notify/validationreminder.php Rappel pour une demande de validation Reminder for a feedback - eventsmanager/notify/validationreminder.php + eventsmanager/notify/validationreminder.php Rapport de Validation @@ -5033,7 +5006,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Re-initialiser Reset prod/Baskets/Reorder.html.twig - web/prod/index.html.twig + web/prod/index.html.twig prod/Story/Reorder.html.twig @@ -5041,10 +5014,10 @@ Pushed documents are also available in a received basket within Phraseanet Produ Set order prod/Baskets/Reorder.html.twig prod/Story/Reorder.html.twig - prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig Read-only @@ -5064,7 +5037,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Receive notification when I receive a push Receive notifications for pushes - eventsmanager/notify/push.php + eventsmanager/notify/push.php Receive notification when a publication is available @@ -5135,7 +5108,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Recevoir un accuse de reception a %my_email% Receive an acknowledgement at %my_email% - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Recherche multicritères @@ -5145,7 +5118,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Rechercher dans un champ date In a date field - web/prod/index.html.twig + web/prod/index.html.twig Recommendations @@ -5165,7 +5138,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Record Not Found Record not found - Controller/Api/V1Controller.php + Controller/Api/V1Controller.php Record removed from basket @@ -5190,7 +5163,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Records have been successfuly moved Records have been successfuly moved - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php Records type @@ -5246,7 +5219,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Relevance Relevance - web/prod/index.html.twig + web/prod/index.html.twig Remember me @@ -5271,7 +5244,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Remove from basket Remove from basket - prod/preview/tools.html.twig + prod/preview/tools.html.twig Remove watermark @@ -5340,7 +5313,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Require email validation to activate the account Require e-mail validation to activate the account. - web/admin/index.html.twig + web/admin/index.html.twig Required @@ -5360,12 +5333,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ Reset and apply Reset and apply - web/admin/index.html.twig + web/admin/index.html.twig Reset and apply template Reset and apply template - web/admin/index.html.twig + web/admin/index.html.twig Reset cache @@ -5375,7 +5348,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Reset rights before applying template? Reset rights before applying template? - web/admin/index.html.twig + web/admin/index.html.twig Resolution @@ -5461,7 +5434,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Rights will be erased before applying template, do you confirm? Rights will be erased before applying template, do you confirm? - web/admin/index.html.twig + web/admin/index.html.twig Role @@ -5636,7 +5609,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Selecteur de theme Theme picker - web/prod/index.html.twig + web/prod/index.html.twig Selectionnez des documents et @@ -5657,7 +5630,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Send an email to the user to setup his password Send user an e-mail for password setup. - web/admin/index.html.twig + web/admin/index.html.twig Send to Facebook @@ -5693,7 +5666,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Service youtube introuvable. Youtube Service cannot be found. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Session persistente @@ -5719,7 +5692,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Set sharing permission Set sharing permission - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Set statuses restrictions @@ -5771,7 +5744,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Si cette fenetre ne se ferme pas automatiquement, fermez la, et raffraichissez votre compte This window should close automatically, if not, close it and refresh your account - actions/Bridge/callback.html.twig + actions/Bridge/callback.html.twig Si vous aviez besoin de plus de parametres, %debut_lien%Afficher d'avantage d'options%fin_lien% @@ -5783,11 +5756,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ If you do not follow them, documents will be correctly indexed but metadatas writing could be incorrect prod/Tooltip/DataboxFieldRestrictions.html.twig - - Si vous ne pouvez pas installer un autre navigateur, utilisez Google Chrome Frame. - Internet Explorer users: If you cannot use or install another browser, we recommend to use Google Chrome Frame. - login/layout/base-layout.html.twig - Single image Single image @@ -5834,11 +5802,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ Something wrong happened Controller/Admin/RootController.php - - Something wrong happened, please retry or contact an admin. - Something wrong happened. Please retry or contact an administrator. - WorkZone/Browser/Browser.html.twig - Something wrong happened, please try again or contact an admin. Something wrong happened. Please try again or contact an administrator. @@ -5872,26 +5835,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ admin/publications/fiche.html.twig admin/publications/list.html.twig - - Sphinx Search RealTime server - Sphinx RealTime server - admin/search-engine/sphinx-search.html.twig - - - Sphinx Search connection configuration - Sphinx connection configuration - admin/search-engine/sphinx-search.html.twig - - - Sphinx Search server - Sphinx Search Server - admin/search-engine/sphinx-search.html.twig - - - SphinxSearch search-engine configuration - Sphinx engine configuration - admin/search-engine/sphinx-search.html.twig - Stamp logo Stamp logo @@ -5924,7 +5867,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Status des documents a rechercher Document status - web/prod/index.html.twig + web/prod/index.html.twig Status edition @@ -5946,11 +5889,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ Status prod/orders/order_box.html.twig - - Stemming - Stemming - admin/search-engine/phrasea.html.twig - Stop Stop @@ -5974,7 +5912,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Story Not Found Story not found - Controller/Api/V1Controller.php + Controller/Api/V1Controller.php Story created @@ -6026,6 +5964,11 @@ Pushed documents are also available in a received basket within Phraseanet Produ Subview name web/admin/subdefs.html.twig + + Submit + Submit + Controller/Prod/LanguageController.php + Substitute Substitute @@ -6041,13 +5984,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ Success Success api/auth/native_app_access_token.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Successful install Successful installation - web/admin/index.html.twig + web/admin/index.html.twig Successful removal @@ -6201,7 +6143,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Template Template - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Temporary access to the following collections @@ -6217,7 +6159,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Terms of Use Terms of use Form/Login/PhraseaRegisterForm.php - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Terms of service @@ -6230,7 +6172,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Controller/Prod/TOUController.php web/admin/tree.html.twig web/login/cgus.html.twig - login/layout/base-layout.html.twig + login/layout/base-layout.html.twig The URL you used is out of date, please login @@ -6240,7 +6182,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ The Youtube servers have received too many calls from the same caller in a short amount of time. Youtube server has received too many close calls from same caller - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php The application is going down for maintenance, please logout. @@ -6251,12 +6193,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ The authentication token specified in the Authorization header has expired. The authentication token specified in the authorization header has expired. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php The authentication token specified in the Authorization header is invalid The authentication token specified in the authorization header is invalid - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php The delivery to %email% failed for the following reason : %reason% @@ -6286,7 +6228,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ The file does not match available color The file does not match allowed colors - Border/Checker/Colorspace.php + Border/Checker/Colorspace.php The file does not match available extensions @@ -6333,7 +6275,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ The records have been properly ordered These documents have been properly ordered. - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php prod/orders/order_box.html.twig @@ -6364,17 +6306,17 @@ Pushed documents are also available in a received basket within Phraseanet Produ Theme Skin - web/prod/index.html.twig + web/prod/index.html.twig There is no one to validate orders, please contact an administrator There is no one to validate orders. Please contact an administrator. - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php There is no record eligible for an order There is no records eligible for an order. - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php There is no user to add. @@ -6384,7 +6326,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Thesaurus Min score Thesaurus Min score - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Thesaurus branch @@ -6425,23 +6367,23 @@ Pushed documents are also available in a received basket within Phraseanet Produ This feed is public This feed is public admin/publications/list.html.twig - actions/publish/publish.html.twig + actions/publish/publish.html.twig This field is required This field is required - web/admin/index.html.twig + web/admin/index.html.twig This field represents the title of the document This field is set as the title of the document - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig This file is too big This file is too big Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig This is a template @@ -6461,7 +6403,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ This user does not participate to the validation but is only viewer. This user does not participate to the feedback request but is only viewer. - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig This user has no rights @@ -6545,7 +6487,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Tout type All types - web/prod/index.html.twig + web/prod/index.html.twig Toutes les publications @@ -6577,7 +6519,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Trier par Sort by - web/prod/index.html.twig + web/prod/index.html.twig Try to extract embedded thumbnails @@ -6602,7 +6544,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Type de documents Document(s) Type - web/prod/index.html.twig + web/prod/index.html.twig Type nombre @@ -6623,12 +6565,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ Un document commande One document ordered. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Un document ne peut etre commande One document can not be ordered. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Unable to add file to Phraseanet @@ -6713,7 +6655,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Unauthorized action Unauthorized action - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Une fois la publication supprimee, les donnees publiees seront definitivement perdues. Continuer ? @@ -6723,7 +6665,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Une question personnelle The query - web/prod/index.html.twig + web/prod/index.html.twig Une selection @@ -6830,7 +6772,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Use latest search settings on Production loading Use latest search settings on Production when loading - web/prod/index.html.twig + web/prod/index.html.twig Use my Phraseanet account @@ -6908,7 +6850,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Users Users - Vocabulary/ControlProvider/UserProvider.php + Vocabulary/ControlProvider/UserProvider.php user/import/view.html.twig web/admin/users.html.twig prod/actions/Push.html.twig @@ -6938,7 +6880,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ VALIDATION Feedback web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig web/lightbox/validate.html.twig @@ -6953,8 +6894,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ eventsmanager/notify/validate.php eventsmanager/notify/validationdone.php eventsmanager/notify/validationreminder.php - eventsmanager/notify/validationreminder.php - lightbox/IE6/validate.html.twig + eventsmanager/notify/validationreminder.php Validation from %user% @@ -6969,10 +6909,8 @@ Pushed documents are also available in a received basket within Phraseanet Produ Validations Feedbacks - mobile/lightbox/index.html.twig - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig - lightbox/IE6/validate.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig web/lightbox/validate.html.twig @@ -7009,7 +6947,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Video Video - web/prod/index.html.twig + web/prod/index.html.twig Video Codec @@ -7025,7 +6963,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ View View - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig View on %title% @@ -7040,7 +6978,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Vocabulary not found Vocabulary not found - Controller/Prod/EditController.php + Controller/Prod/EditController.php Vocabulary type @@ -7050,15 +6988,13 @@ Pushed documents are also available in a received basket within Phraseanet Produ Voici vos paniers Your Basket(s) - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig Voici vos validations en cours Your feedbacks in progress - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig @@ -7134,7 +7070,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Vous devez selectionner un type de sous definitions Select type of subviews - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Vous devez specifier une adresse email et un mot de passe valides @@ -7154,7 +7090,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Vous etes authentifie avec succes You are successfully authenticated - actions/Bridge/callback.html.twig + actions/Bridge/callback.html.twig Vous etes maintenant deconnecte. A bientot. @@ -7164,12 +7100,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ Vous n'avez pas assez de droits sur certains elements selectionnes You don't have required rights on some of the selected documents - actions/Bridge/index.html.twig + actions/Bridge/index.html.twig Vous n'avez pas assez de droits sur les elements selectionnes You miss some rights on the selected documents - actions/Bridge/index.html.twig + actions/Bridge/index.html.twig Vous n'avez pas les droits pour supprimer certains documents @@ -7196,7 +7132,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ No document selected Bridge/Dailymotion/upload.html.twig Bridge/Flickr/upload.html.twig - actions/Bridge/index.html.twig + actions/Bridge/index.html.twig Bridge/Youtube/upload.html.twig @@ -7228,17 +7164,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ Vous pouvez quitter la plupart des fenetres survolantes via la touche echap esc : close most of overlayed windows - web/prod/index.html.twig + web/prod/index.html.twig Warning ! Warning! - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Warning, this database is not empty @@ -7312,13 +7243,13 @@ Pushed documents are also available in a received basket within Phraseanet Produ Would you like to receive an e-mail when your download is ready ? Would you like to receive an e-mail when download is ready ? - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Would you like to reset rights before applying the template? Reset rights before applying the template? - web/admin/index.html.twig - web/admin/index.html.twig + web/admin/index.html.twig + web/admin/index.html.twig Write Metas @@ -7328,8 +7259,8 @@ Pushed documents are also available in a received basket within Phraseanet Produ YYYY/MM/DD YYYY/MM/DD - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Yes @@ -7352,16 +7283,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ You are about to ask a feedback for %nb_push_items% records. prod/actions/Push.html.twig - - You are about to delete this account. Would you like to continue ? - You are about to delete this account. Would you like to continue? - actions/Bridge/index.html.twig - - - You are about to delete this basket. Would you like to continue ? - You are about to delete this basket. Would you like to continue? - WorkZone/Browser/Browser.html.twig - You are about to push %nb_push_items% records, %nb_not_available% records can not be processed. You are about to push %nb_push_items% records, %nb_not_available% records can not be processed. @@ -7375,7 +7296,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ You are attempting to exceed the storage limit on your account and must delete existing entries before inserting new entries Maximum storage size reached on your account, delete existing entries before adding new ones - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php You are not allowed to add users @@ -7424,7 +7345,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ You can alternatively receive an email when the download is ready. Alternatively, you can receive an e-mail when the download is ready. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig You can choose only one record @@ -7439,7 +7360,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ You can not directly download more than %max_download% Mo ; time to package all documents is too long You can't directly download more than %max_download% Mo ; time to package all documents would be too long. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig You can not edit this story @@ -7480,12 +7401,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ You do not have rights to remove selected documents You don't have rights to remove selected documents. - prod/actions/delete_records_confirm.html.twig + prod/actions/delete_records_confirm.html.twig You do not have the permission to move records to %collection% You do not have the permission to move records to %collection% - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php You have %quantity% days to validate the selection. @@ -7505,7 +7426,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ You have not access to this basket You cannot access to this basket - Model/Repositories/BasketRepository.php + Model/Repositories/BasketRepository.php You have selected %nbReceivedDocuments% records. @@ -7520,7 +7441,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ You have to give your feedback at least on one document to send a report You have to give at least one document feedback to send a report - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php You have to wait for an administrator approval for your access request @@ -7535,7 +7456,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ You must agree to the Terms of Use to continue. You must accept the Terms of Use to continue. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig You must give a destination collection @@ -7657,19 +7578,19 @@ Pushed documents are also available in a received basket within Phraseanet Produ a propos About - mobile/lightbox/index.html.twig - mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig action : ajouter au panier Add to Basket prod/preview/tools.html.twig - prod/results/record.html.twig + prod/results/record.html.twig action : bridge Bridge - web/prod/index.html.twig + web/prod/index.html.twig web/prod/toolbar.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig @@ -7694,12 +7615,10 @@ Pushed documents are also available in a received basket within Phraseanet Produ action : exporter Export web/lightbox/feed.html.twig - lightbox/IE6/feed.html.twig - lightbox/IE6/validate.html.twig web/lightbox/validate.html.twig - web/prod/index.html.twig - prod/preview/tools.html.twig - prod/results/record.html.twig + web/prod/index.html.twig + prod/preview/tools.html.twig + prod/results/record.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig prod/WorkZone/Story.html.twig @@ -7714,8 +7633,8 @@ Pushed documents are also available in a received basket within Phraseanet Produ action : print Print - prod/preview/tools.html.twig - prod/results/record.html.twig + prod/preview/tools.html.twig + prod/results/record.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig prod/WorkZone/Story.html.twig @@ -7723,7 +7642,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ action : publier Publish - web/prod/index.html.twig + web/prod/index.html.twig web/prod/toolbar.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig @@ -7749,22 +7668,22 @@ Pushed documents are also available in a received basket within Phraseanet Produ Delete web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig prod/WorkZone/Story.html.twig action:: nouveau panier New basket - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig action:: nouveau reportage New Story - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig action::Valider @@ -7775,19 +7694,19 @@ Pushed documents are also available in a received basket within Phraseanet Produ action::detacher Release from Basket zone - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig action::editer Edit - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig action::exporter Export prod/WorkZone/Macros.html.twig prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig action::renommer @@ -8141,7 +8060,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Activity Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig @@ -8150,24 +8069,24 @@ Pushed documents are also available in a received basket within Phraseanet Produ Address Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur changer mon mot de passe Change password - web/account/account.html.twig + web/account/account.html.twig admin::compte-utilisateur code postal Zip code Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur confirmer la nouvelle adresse email @@ -8189,21 +8108,21 @@ Pushed documents are also available in a received basket within Phraseanet Produ E-mail Controller/Admin/UserController.php Event/Subscriber/RegistrationSubscriber.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig web/admin/users.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur fax Fax Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur id utilisateur @@ -8215,8 +8134,8 @@ Pushed documents are also available in a received basket within Phraseanet Produ Login Core/Provider/RegistrationServiceProvider.php api/auth/end_user_authorization.html.twig - web/account/account.html.twig - web/account/account.html.twig + web/account/account.html.twig + web/account/account.html.twig web/account/reset-email.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig @@ -8227,7 +8146,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ admin::compte-utilisateur mot de passe Password api/auth/end_user_authorization.html.twig - web/account/account.html.twig + web/account/account.html.twig web/account/reset-email.html.twig web/common/dialog_export.html.twig web/setup/step2.html.twig @@ -8238,11 +8157,11 @@ Pushed documents are also available in a received basket within Phraseanet Produ Controller/Admin/UserController.php Event/Subscriber/RegistrationSubscriber.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur nouvelle adresse email @@ -8260,10 +8179,10 @@ Pushed documents are also available in a received basket within Phraseanet Produ Job Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur prenom @@ -8271,16 +8190,16 @@ Pushed documents are also available in a received basket within Phraseanet Produ Controller/Admin/UserController.php Event/Subscriber/RegistrationSubscriber.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur sexe Gender Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig @@ -8288,12 +8207,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ Company Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig web/admin/users.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur tel @@ -8304,11 +8223,11 @@ Pushed documents are also available in a received basket within Phraseanet Produ admin::compte-utilisateur telephone Phone Controller/Admin/UserController.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur un email de confirmation vient de vous etre envoye. Veuillez suivre les instructions contenue pour continuer @@ -8320,9 +8239,9 @@ Pushed documents are also available in a received basket within Phraseanet Produ City Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur: L'email a correctement ete mis a jour @@ -8372,13 +8291,13 @@ Pushed documents are also available in a received basket within Phraseanet Produ admin::compte-utilisateur:ftp: repertoire de destination ftp Ftp reception folder - web/account/account.html.twig + web/account/account.html.twig web/common/dialog_export.html.twig admin::compte-utilisateur:ftp: Activer le compte FTP Enable FTP fonction - web/account/account.html.twig + web/account/account.html.twig admin::compte-utilisateur:ftp: Le mot de passe est errone @@ -8388,13 +8307,13 @@ Pushed documents are also available in a received basket within Phraseanet Produ admin::compte-utilisateur:ftp: Nombre d'essais max Max. retry - web/account/account.html.twig + web/account/account.html.twig web/common/dialog_export.html.twig admin::compte-utilisateur:ftp: Utiliser le mode passif Use passive mode - web/account/account.html.twig + web/account/account.html.twig web/common/dialog_export.html.twig @@ -8410,31 +8329,31 @@ Pushed documents are also available in a received basket within Phraseanet Produ admin::compte-utilisateur:ftp: prefixe des noms de dossier ftp Repository prefix name - web/account/account.html.twig + web/account/account.html.twig admin::compte-utilisateur:sexe: madame Mrs. Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur:sexe: mademoiselle Miss Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur:sexe: monsieur Mr. Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::monitor: bases sur lesquelles l'utilisateur est connecte : @@ -8464,7 +8383,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Client Controller/Admin/ConnectedUsersController.php lib/classes/phrasea.php - classes/record/preview.php + classes/record/preview.php web/admin/connected-users.html.twig @@ -8484,7 +8403,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Production Controller/Admin/ConnectedUsersController.php lib/classes/phrasea.php - classes/record/preview.php + classes/record/preview.php web/admin/connected-users.html.twig @@ -8514,9 +8433,9 @@ Pushed documents are also available in a received basket within Phraseanet Produ admin::monitor: module validation Lightbox Controller/Admin/ConnectedUsersController.php - Phrasea/Controller/LightboxController.php - Phrasea/Controller/LightboxController.php - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php lib/classes/phrasea.php web/common/menubar.html.twig @@ -8699,7 +8618,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ alert Warning - actions/Tools/index.html.twig + actions/Tools/index.html.twig all caches services have been flushed @@ -8710,7 +8629,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ an error occured an error occured Controller/Prod/ToolsController.php - actions/Tools/index.html.twig an error occured : %message% @@ -8740,7 +8658,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ audio audio - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php task-manager/task-editor/subdefs.html.twig @@ -8786,19 +8704,19 @@ Pushed documents are also available in a received basket within Phraseanet Produ boutton:: selectionner aucune base None - web/prod/index.html.twig + web/prod/index.html.twig boutton:: selectionner toutes les bases All - web/prod/index.html.twig + web/prod/index.html.twig boutton::ajouter Add admin/collection/suggested_value.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig boutton::annuler @@ -8807,22 +8725,22 @@ Pushed documents are also available in a received basket within Phraseanet Produ Controller/Prod/LanguageController.php web/account/reset-email.html.twig admin/collection/create.html.twig - web/admin/index.html.twig + web/admin/index.html.twig admin/publications/fiche.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Bridge/Dailymotion/video_modify.html.twig Bridge/Dailymotion/video_modify.html.twig Bridge/Flickr/photo_modify.html.twig Bridge/Flickr/photo_modify.html.twig Bridge/Youtube/video_modify.html.twig Bridge/Youtube/video_modify.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig - web/prod/tab_thesaurus.html.twig - web/report/all_content.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + web/prod/tab_thesaurus.html.twig + web/report/all_content.html.twig web/thesaurus/accept.html.twig web/thesaurus/accept.html.twig web/thesaurus/export-text-dialog.html.twig @@ -8844,11 +8762,9 @@ Pushed documents are also available in a received basket within Phraseanet Produ boutton::chercher Search - lib/classes/queries.php - lib/classes/queries.php web/admin/users.html.twig - actions/Feedback/list.html.twig - web/prod/thesaurus.js.twig + actions/Feedback/list.html.twig + web/prod/index.html.twig web/thesaurus/thesaurus.html.twig web/thesaurus/thesaurus.html.twig @@ -8861,7 +8777,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ boutton::commander Order - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig boutton::creer @@ -8873,8 +8789,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ boutton::demarrer Slideshow web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig @@ -8891,13 +8805,13 @@ Pushed documents are also available in a received basket within Phraseanet Produ boutton::envoyer Send - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig boutton::essayer Try - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig boutton::exporter @@ -8908,12 +8822,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ boutton::fermer Close Controller/Prod/LanguageController.php - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig web/lightbox/sc_note.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod/actions/Push.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig web/thesaurus/accept.html.twig web/thesaurus/accept.html.twig web/thesaurus/export-topics.html.twig @@ -8947,8 +8861,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ boutton::pause Pause web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig @@ -8956,10 +8868,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ Previous web/lightbox/feed_options_box.html.twig web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/setup/step2.html.twig @@ -8972,7 +8880,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ boutton::rechercher Search Controller/Prod/LanguageController.php - web/prod/index.html.twig + web/prod/index.html.twig boutton::refresh @@ -8987,7 +8895,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ boutton::remplacer Replace - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig boutton::renouveller @@ -9028,10 +8936,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ Next web/lightbox/feed_options_box.html.twig web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/setup/step2.html.twig @@ -9059,26 +8963,22 @@ Pushed documents are also available in a received basket within Phraseanet Produ Bridge/Flickr/actionelements.html.twig Bridge/Youtube/actioncontainers.html.twig Bridge/Youtube/actionelements.html.twig + web/prod/index.html.twig prod/results/entry.html.twig prod/results/feeds_entry.html.twig - web/prod/thesaurus.js.twig web/thesaurus/presets.html.twig boutton::telecharger Download - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig boutton::telecharger tous les documents Download all web/lightbox/feed.html.twig - lightbox/IE6/feed.html.twig - lightbox/IE6/validate.html.twig web/lightbox/validate.html.twig @@ -9091,8 +8991,8 @@ Pushed documents are also available in a received basket within Phraseanet Produ boutton::valider Validate Controller/Prod/LanguageController.php - mobile/lightbox/note_form.html.twig - web/account/account.html.twig + mobile/lightbox/note_form.html.twig + web/account/account.html.twig web/account/reset-email.html.twig admin/collection/collection.html.twig admin/collection/create.html.twig @@ -9102,8 +9002,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ web/admin/editusers.html.twig admin/publications/fiche.html.twig admin/publications/list.html.twig - admin/search-engine/phrasea.html.twig - admin/search-engine/sphinx-search.html.twig web/admin/setup.html.twig admin/statusbit/edit.html.twig web/admin/structure.html.twig @@ -9126,13 +9024,13 @@ Pushed documents are also available in a received basket within Phraseanet Produ Bridge/Youtube/video_deleteelement.html.twig Bridge/Youtube/video_modify.html.twig Bridge/Youtube/video_moveinto_playlist.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod/Baskets/Reorder.html.twig prod/Baskets/Update.html.twig - web/prod/index.html.twig + web/prod/index.html.twig prod/Story/Reorder.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig web/thesaurus/accept.html.twig web/thesaurus/export-text-dialog.html.twig web/thesaurus/export-topics-dialog.html.twig @@ -9227,8 +9125,8 @@ Pushed documents are also available in a received basket within Phraseanet Produ chargement Loading - web/prod/tab_thesaurus.html.twig - web/prod/tab_thesaurus.html.twig + web/prod/tab_thesaurus.html.twig + web/prod/tab_thesaurus.html.twig charger d'avantage de publications @@ -9246,7 +9144,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Select admin/collection/create.html.twig admin/databox/databox.html.twig - web/prod/index.html.twig + web/prod/index.html.twig classe @@ -9259,11 +9157,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ Access Class web/admin/subdefs.html.twig - - client::recherche: dans les categories - In categories - lib/classes/queries.php - cocher tout Select all @@ -9277,12 +9170,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ commande::deadline Deadline - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig commande::utilisation prevue Intended use - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig configuration @@ -9321,7 +9214,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ delete Delete - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig descendant @@ -9336,7 +9229,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ document document - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php web/admin/subdefs.html.twig web/admin/subdefs.html.twig task-manager/task-editor/subdefs.html.twig @@ -9355,15 +9248,15 @@ Pushed documents are also available in a received basket within Phraseanet Produ edit edit - web/account/account.html.twig - web/account/account.html.twig - web/account/account.html.twig + web/account/account.html.twig + web/account/account.html.twig + web/account/account.html.twig prod/WorkZone/Macros.html.twig edit: chosiir limage du regroupement Set as cover document - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig edit:: Ajouter %s au champ courrant @@ -9388,7 +9281,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ edit::Certains champs doivent etre remplis pour valider cet editing Some fields must be filled in to save changes - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig edit::certains documents possedent des champs requis non remplis. Merci de les remplir pour valider votre editing @@ -9398,7 +9291,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ edit::preset:: titre Title - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig effacer (OK) ou quitter (Annuler) ? @@ -9415,27 +9308,22 @@ Pushed documents are also available in a received basket within Phraseanet Produ E-mail is not valid. eventsmanager/notify/downloadmailfail.php - - erreur : Vous n'avez pas les droits - You do not have the required permissions. - prod/actions/collection_default.html.twig - export:: FTP FTP - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export:: commande Order - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export:: envoi par mail E-Mail - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export:: erreur : aucun document selectionne @@ -9445,29 +9333,29 @@ Pushed documents are also available in a received basket within Phraseanet Produ export:: telechargement Download - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::ftp: reglages manuels Manual settings - classes/set/export.php + classes/set/export.php export::mail: contenu du mail Content - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::mail: destinataire To - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::mail: fichiers joint Attachment(s) - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::titre: nom original du document @@ -9508,7 +9396,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ flash flash - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php task-manager/task-editor/subdefs.html.twig @@ -9582,7 +9470,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ image Image - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php task-manager/task-editor/subdefs.html.twig @@ -9634,13 +9522,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ lightbox::recaptitulatif Summary web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig web/lightbox/validate.html.twig login:: Changer mon adresse email Change my e-mail - web/account/account.html.twig + web/account/account.html.twig login:: Envoyer a nouveau le mail de confirmation @@ -9655,7 +9542,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ login:: Mon compte My account - web/account/account.html.twig + web/account/account.html.twig web/common/menubar.html.twig @@ -9704,12 +9591,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ login::register: Faire une demande d'acces Register - web/account/access.html.twig + web/account/access.html.twig login::register: L'acces aux bases ci-dessous implique l'acceptation des Conditions Generales d'Utilisation (CGU) suivantes To access the following collections, you must accept General Terms of Use. - web/account/access.html.twig + web/account/access.html.twig login::register: email confirmation email Pour valider votre inscription a la base de donnees, merci de confirmer votre e-mail en suivant le lien ci-dessous. @@ -9810,7 +9697,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ no image selected No Document selected - actions/Tools/index.html.twig + actions/Tools/index.html.twig non @@ -9822,8 +9709,6 @@ Pushed documents are also available in a received basket within Phraseanet Produ notice Caption web/lightbox/feed.html.twig - lightbox/IE6/feed.html.twig - lightbox/IE6/validate.html.twig web/lightbox/validate.html.twig @@ -9876,17 +9761,17 @@ Pushed documents are also available in a received basket within Phraseanet Produ panier:: ordre Validation ascendante Most approved - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig panier:: ordre Validation descendante Less approved - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig panier:: ordre du panier Basket order - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig panier:: renommer le panier @@ -9976,7 +9861,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ phraseanet:: adresse Address - web/account/account.html.twig + web/account/account.html.twig admin/collection/collection.html.twig web/admin/connected-users.html.twig web/common/dialog_export.html.twig @@ -10047,17 +9932,17 @@ Pushed documents are also available in a received basket within Phraseanet Produ phraseanet:: prereglages Presets - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig phraseanet:: presse-papier Clipboard - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig phraseanet:: preview Preview - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod/actions/printer_default.html.twig @@ -10081,7 +9966,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ phraseanet:: thesaurus Thesaurus - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig web/prod/tab_headers.html.twig web/thesaurus/index.html.twig web/thesaurus/load-thesaurus.html.twig @@ -10096,15 +9981,15 @@ Pushed documents are also available in a received basket within Phraseanet Produ phraseanet:: tri par date Sort by date - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig web/thesaurus/export-topics-dialog.html.twig phraseanet:: tri par nom Sort by name - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig phraseanet:: user @@ -10127,26 +10012,26 @@ Pushed documents are also available in a received basket within Phraseanet Produ Loading Controller/Prod/LanguageController.php admin/collection/suggested_value.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig web/thesaurus/thesaurus.html.twig phraseanet::erreur: La connection au serveur Phraseanet semble etre indisponible Server connection is not available Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig phraseanet::erreur: Une erreur est survenue, si ce probleme persiste, contactez le support technique An error occurred. If this problem happens again, please contact technical support Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig phraseanet::erreur: Votre session est fermee, veuillez vous re-authentifier Your session is closed, please re-authentificate Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig web/thesaurus/thesaurus.html.twig @@ -10237,12 +10122,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ phraseanet::time:: a To - web/prod/index.html.twig + web/prod/index.html.twig phraseanet::time:: de From - web/prod/index.html.twig + web/prod/index.html.twig phraseanet::type:: audios @@ -10252,7 +10137,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ phraseanet::type:: documents Documents - web/prod/index.html.twig + web/prod/index.html.twig web/prod/toolbar.html.twig @@ -10263,7 +10148,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ phraseanet::type:: reportages Stories - web/prod/index.html.twig + web/prod/index.html.twig phraseanet::type:: videos @@ -10304,24 +10189,24 @@ Pushed documents are also available in a received basket within Phraseanet Produ preview:: Description Caption - web/prod/index.html.twig + web/prod/index.html.twig preview:: Historique Timeline - web/prod/index.html.twig + web/prod/index.html.twig preview:: Popularite Statistics - web/prod/index.html.twig + web/prod/index.html.twig preview:: arreter le diaporama Stop prod/preview/basket_train.html.twig prod/preview/feed_train.html.twig - prod/preview/reg_train.html.twig + prod/preview/reg_train.html.twig prod/preview/result_train.html.twig prod/preview/result_train_options.html.twig @@ -10330,7 +10215,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ Slideshow prod/preview/basket_train.html.twig prod/preview/feed_train.html.twig - prod/preview/reg_train.html.twig + prod/preview/reg_train.html.twig prod/preview/result_train.html.twig prod/preview/result_train_options.html.twig @@ -10396,28 +10281,28 @@ Pushed documents are also available in a received basket within Phraseanet Produ processing Processing... - actions/Tools/index.html.twig + actions/Tools/index.html.twig prod::Les enregistrements ne provienent pas tous de la meme base et ne peuvent donc etre traites ensemble Unable to perform action, selected documents come from different databases - prod/actions/collection_default.html.twig + Controller/Prod/MoveCollectionController.php actions/Property/index.html.twig prod::Vous n'avez le droit d'effectuer l'operation sur aucun document You do not have the required permissions on selected documents - prod/actions/collection_default.html.twig + Controller/Prod/MoveCollectionController.php prod::collection deplacer egalement les documents rattaches a ce(s) regroupement(s) Move also Stories linked documents ? - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig prod::edit: Impossible d'editer simultanement des documents provenant de bases differentes Selected documents come from differents databases, unable to edit - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing valeurs heterogenes, choisir 'remplacer', 'ajouter' ou 'annuler' @@ -10427,32 +10312,32 @@ Pushed documents are also available in a received basket within Phraseanet Produ prod::editing: %not_actionable% documents ne peuvent etre edites car vos droits sont induffisants Your user rights do not allow you to edit %not_actionable% documents from selection - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: 1 document ne peut etre edite car vos droits sont induffisants You do not have the required permissions to edit 1 document - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: aucun documents ne peuvent etre edites car vos droits sont induffisants Your user rights do not allow you to edit any of the selected documents - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: modeles de fiches Caption template - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: rechercher-remplacer Find / Replace - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: valider ou annuler les modifications Valid changes or Cancel - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing::annulation: abandonner les modification ? @@ -10462,67 +10347,67 @@ Pushed documents are also available in a received basket within Phraseanet Produ prod::editing::fields: status Status - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing::replace: remplacer dans le champ Replace in field - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing::replace: remplacer dans tous les champs Replace in all fields - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:indexation en cours Processing indexation - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace: chaine remplacante Replace with - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace: options de remplacement Options - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option : utiliser une expression reguliere Regular expression - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option la valeur du cahmp doit etre exacte Whole field - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option la valeur est comprise dans le champ In field - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option respecter la casse Case sensitive - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option: remplacer toutes les occurences Replace All - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option: rester insensible a la casse Case insensitive - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:replace: chaine a rechercher Find - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::facet:base_label @@ -10552,12 +10437,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ prod::thesaurusTab:cmenu:Accepter en %lng_code% Accept in %lng_code% - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:cmenu:Remplacer par... Replace with - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:%number% record(s) updated @@ -10567,52 +10452,52 @@ Pushed documents are also available in a received basket within Phraseanet Produ prod::thesaurusTab:dlg:Acceptation en cours. Accepting... - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:Remplacement du candidat "%(from)s" par "%(to)s" Replace "%(from)s" by "%(to)s" - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:Remplacement en cours. Replacing... - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:Suppression en cours. Deleting... - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:accepter le terme candidat "%s" ? Accept "%s" in thesaurus? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:accepter les %d termes candidats ? Accept %d candidate terms ? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:remplacer le terme "%s" des fiches par : Replace "%s" in notes with: - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:remplacer les %d termes des fiches par : Replace "%d" terms from caption(s) by - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:supprimer le terme "%s" des fiches ? Delete "%s" in notes? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:supprimer les %d termes des fiches ? Delete %d terms from caption(s) - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:too many (%number%) records to update (limit=%maximum%) @@ -10627,18 +10512,17 @@ Pushed documents are also available in a received basket within Phraseanet Produ prod::thesaurusTab:tmenu:Accepter comme synonyme Accept as a synonym - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:tmenu:Accepter comme terme specifique Accept as new term - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:tree:loading Loading... - web/prod/thesaurus.js.twig - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:wizard:accepter le terme candidat @@ -10648,12 +10532,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ prod::thesaurusTab:wizard:clic-droit / accepter le terme candidat "%s" Right-click / Accept term "%s" - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:wizard:clic-droit / accepter les %s termes candidats Accept %s candidate terms - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:wizard:remplacer par le terme @@ -10676,26 +10560,26 @@ Pushed documents are also available in a received basket within Phraseanet Produ publication : autheur Author - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication : email autheur Author's e-mail - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication : sous titre Sub Title - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication : titre Title - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication::Voici votre fil RSS personnel. Il vous permettra d'etre tenu au courrant des publications. @@ -10739,12 +10623,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ raccourci :: a propos des raccourcis claviers About shortcuts - web/prod/index.html.twig + web/prod/index.html.twig raccourcis :: ne plus montrer cette aide Do not display this help anymore - web/prod/index.html.twig + web/prod/index.html.twig rafraichir @@ -10758,7 +10642,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ rechercher dans tous les champs All fields - web/prod/index.html.twig + web/prod/index.html.twig recordtype @@ -10788,17 +10672,17 @@ Pushed documents are also available in a received basket within Phraseanet Produ reponses:: images par pages : Results per page - web/prod/index.html.twig + web/prod/index.html.twig reponses:: mode liste List - web/prod/index.html.twig + web/prod/index.html.twig reponses:: mode vignettes Thumbnails - web/prod/index.html.twig + web/prod/index.html.twig reponses:: partager @@ -10818,12 +10702,12 @@ Pushed documents are also available in a received basket within Phraseanet Produ reponses:: taille des images : Thumbnails size - web/prod/index.html.twig + web/prod/index.html.twig reponses::document sans titre Untitled - classes/record/adapter.php + classes/record/adapter.php report :: aucun resultat trouve @@ -10911,7 +10795,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ web/report/ajax_dashboard_content_child.html.twig web/report/ajax_data_content.html.twig web/report/ajax_data_content.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig web/report/chart.html.twig web/report/chart.html.twig web/report/report_layout.html.twig @@ -10958,7 +10842,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ report:: Heures Hours - web/report/all_content.html.twig + web/report/all_content.html.twig report:: IP @@ -11176,7 +11060,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ report:: jour Day Controller/Report/ActivityController.php - web/report/all_content.html.twig + web/report/all_content.html.twig report:: module @@ -11268,7 +11152,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ report:: page d'accueil Home page - classes/record/preview.php + classes/record/preview.php report:: par %user_infos% @@ -11515,7 +11399,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ report:: visualiseur cooliris Cooliris viewer - classes/record/preview.php + classes/record/preview.php report::Changement de collection vers : %coll_name% @@ -11551,7 +11435,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ report::Heures Hours web/report/ajax_data_content.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig report::Impression des formats : %format% @@ -11566,17 +11450,17 @@ Pushed documents are also available in a received basket within Phraseanet Produ report::Nombre de connexions Connections - web/report/all_content.html.twig + web/report/all_content.html.twig report::Nombre de document ajoute Number of documents added - web/report/all_content.html.twig + web/report/all_content.html.twig report::Nombre de document edite Number of documents edited - web/report/all_content.html.twig + web/report/all_content.html.twig report::Publication de %dest% @@ -11601,9 +11485,9 @@ Pushed documents are also available in a received basket within Phraseanet Produ report::acces direct Direct access - classes/record/preview.php - classes/record/preview.php - classes/record/preview.php + classes/record/preview.php + classes/record/preview.php + classes/record/preview.php report::activite @@ -11657,13 +11541,13 @@ Pushed documents are also available in a received basket within Phraseanet Produ reportage Feature - Phrasea/Twig/PhraseanetExtension.php - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php resultat numero %number% Result number %number% - classes/record/preview.php + classes/record/preview.php retourne "automobile", "automate", "autoroute", ... @@ -12564,7 +12448,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ thumbnail validation Confirm thumbnail - actions/Tools/index.html.twig + actions/Tools/index.html.twig to @@ -12642,21 +12526,19 @@ Pushed documents are also available in a received basket within Phraseanet Produ validation:: NON NO - mobile/lightbox/basket_element.html.twig + mobile/lightbox/basket_element.html.twig web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig validation:: OUI YES - mobile/lightbox/basket_element.html.twig + mobile/lightbox/basket_element.html.twig web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig validation:: editer ma note Modify my notes - mobile/lightbox/basket_element.html.twig + mobile/lightbox/basket_element.html.twig validation:: note @@ -12671,12 +12553,10 @@ Pushed documents are also available in a received basket within Phraseanet Produ validation::envoyer mon rapport Send my feedback - mobile/lightbox/validate.html.twig - mobile/lightbox/validate.html.twig + mobile/lightbox/validate.html.twig + mobile/lightbox/validate.html.twig web/lightbox/basket_options.html.twig web/lightbox/basket_options.html.twig - lightbox/IE6/basket_options.html.twig - lightbox/IE6/basket_options.html.twig version @@ -12686,7 +12566,7 @@ Pushed documents are also available in a received basket within Phraseanet Produ veuillez choisir au minimum une collection At least one collection must be selected - web/report/all_content.html.twig + web/report/all_content.html.twig video diff --git a/resources/locales/messages.fr.xlf b/resources/locales/messages.fr.xlf index 701a5c7239..98c35db62e 100644 --- a/resources/locales/messages.fr.xlf +++ b/resources/locales/messages.fr.xlf @@ -1,14 +1,14 @@ - + - +
          The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.
          - - + + Form/Configuration/EmailFormType.php Form/Login/PhraseaAuthenticationForm.php @@ -35,16 +35,14 @@ %basket_length% documents %basket_length% documents - mobile/lightbox/validate.html.twig - lightbox/IE6/index.html.twig - lightbox/IE6/index.html.twig + mobile/lightbox/validate.html.twig web/lightbox/index.html.twig web/lightbox/index.html.twig %countable% documents can not be modified. %countable% documents ne peuvent être modifiés. - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig %d collection selected @@ -69,22 +67,22 @@ %docs_not_orderable% documents ne peuvent pas etre commandes %docs_not_orderable% documents ne peuvent être commandés - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig %docs_orderable% documents commandes %docs_orderable% documents commandés - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig %entry_length% documents %entry_length% documents - mobile/lightbox/feed.html.twig + mobile/lightbox/feed.html.twig %length% peoples %length% personne(s) - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig actions/Feedback/ListsMacros.html.twig @@ -313,19 +311,16 @@ (validation) a envoyer Rapport de validation à envoyer - lightbox/IE6/index.html.twig web/lightbox/index.html.twig (validation) envoyee Rapport de validation envoyé - lightbox/IE6/index.html.twig web/lightbox/index.html.twig (validation) session terminee Session terminée - lightbox/IE6/index.html.twig web/lightbox/index.html.twig @@ -404,7 +399,7 @@ A field value contains an invalid character Le contenu saisi contient un caractère non valide - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A file has been thrown to the quarantine. @@ -434,7 +429,7 @@ A required field is missing or has an empty value Un champ obligatoire n'est pas rempli - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A task has been created, please run it to complete empty collection @@ -454,17 +449,17 @@ A value does not match an expected format La contenu saisi ne correspond pas au contenu attendu - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A value exceeds the maximum allowable length Le contenu saisi dépasse la quantité maximum de caractères autorisés - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A value has been deprecated and is no longer valid Une valeur est dépréciée ou n'est plus valide - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php API Webhook @@ -520,7 +515,7 @@ Access to the above bases constitutes acceptance of the following Terms of Use (TOU). [WRONG] Access to the above bases constitutes acceptance of the following Terms of Use (TOU). - web/account/access.html.twig + web/account/access.html.twig Access user have readonly access @@ -557,7 +552,7 @@ Accuse de reception indisponible, vous n'avez pas declare d'adresse email Accusé de récéption indisponible ; vous n'avez pas déclaré d'adresse e-mail - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Action Forbidden : You are not the publisher @@ -577,7 +572,7 @@ Activate highlight Activer le surlignage - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Active @@ -604,7 +599,7 @@ Activite Activité - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Add @@ -622,6 +617,11 @@ admin/fields/templates.html.twig admin/fields/templates.html.twig + + Add a position + Add a position + Controller/Prod/LanguageController.php + Add an admin Ajouter un administrateur Phraseanet @@ -655,12 +655,12 @@ Adresse email du nouvel utilisateur Adresse e-mail du nouvel utilisateur - web/admin/index.html.twig + web/admin/index.html.twig Advanced Search Recherche avancée - web/prod/index.html.twig + web/prod/index.html.twig Advanced field parameters @@ -670,37 +670,37 @@ Affichage Affichage - web/prod/index.html.twig + web/prod/index.html.twig Affichage au demarrage Afficher au démarrage - web/prod/index.html.twig + web/prod/index.html.twig Afficher la fiche descriptive Afficher la notice - web/prod/index.html.twig + web/prod/index.html.twig Afficher le titre Afficher le titre - web/prod/index.html.twig + web/prod/index.html.twig Afficher les status Afficher les Status - web/prod/index.html.twig + web/prod/index.html.twig Afficher une icone Afficher une icône - web/prod/index.html.twig + web/prod/index.html.twig After metadata Dans l'infobulle de description, après les métadonnées - web/prod/index.html.twig + web/prod/index.html.twig Aggregation @@ -710,12 +710,12 @@ Aide Aide - web/prod/index.html.twig + web/prod/index.html.twig Aide sur les expressions regulieres Aide sur les expressions régulières - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Ajouter a @@ -733,7 +733,7 @@ Ajouter un nouvel utilisateur Ajouter un nouvel utilisateur - web/admin/index.html.twig + web/admin/index.html.twig Ajouter un publisher @@ -748,11 +748,11 @@ All Tout - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig WorkZone/Browser/Browser.html.twig @@ -857,8 +857,7 @@ Controller/Admin/DataboxesController.php Controller/Prod/BasketController.php Controller/Prod/LazaretController.php - Controller/Prod/MoveCollectionController.php - Controller/Prod/OrderController.php + Controller/Prod/MoveCollectionController.php Controller/Prod/StoryController.php Controller/Prod/ToolsController.php Model/Manipulator/LazaretManipulator.php @@ -873,12 +872,12 @@ An error occured while denying, please retry or contact an admin if problem persists Une erreur s'est produite lors du refus. Veuillez réessayer ou contacter un administrateur si le problème persiste - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php An error occured while sending, please retry or contact an admin if problem persists Une erreur s'est produite lors de l'envoi. Veuillez réessayer ou contacter un administrateur si le problème persiste. - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php An error occured while upload the file. Please retry @@ -906,9 +905,10 @@ Un erreur est survenue Controller/Admin/CollectionController.php Controller/Admin/DataboxController.php - Controller/Api/V1Controller.php - Controller/Api/V1Controller.php + Controller/Api/V1Controller.php + Controller/Api/V1Controller.php Controller/Prod/BasketController.php + Order/Controller/ProdOrderController.php web/admin/statusbit.html.twig @@ -944,7 +944,7 @@ Apparait aussi dans ces paniers Aussi dans les paniers suivants - prod/preview/appears_in.html.twig + prod/preview/appears_in.html.twig Apparait aussi dans ces reportages @@ -1016,7 +1016,7 @@ Apply template Appliquer le modèle - web/admin/index.html.twig + web/admin/index.html.twig Apply to all selected documents @@ -1026,7 +1026,7 @@ Archive Archiver - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig Are you sure you want delete users rights ? @@ -1058,7 +1058,7 @@ Attention Attention Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig prod/results/help.html.twig @@ -1094,7 +1094,7 @@ Aucun statut editable Aucun status à éditer - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Aucune @@ -1134,7 +1134,7 @@ Audio Audio - web/prod/index.html.twig + web/prod/index.html.twig Audio Birate @@ -1241,8 +1241,8 @@ Back Retour - mobile/lightbox/index.html.twig - mobile/lightbox/validate.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/validate.html.twig Back to Feedback @@ -1322,7 +1322,7 @@ Basket is not found Panier non trouvé - Model/Repositories/BasketRepository.php + Model/Repositories/BasketRepository.php Basket updated @@ -1357,8 +1357,8 @@ Browse Baskets Parcourir les paniers - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Browser @@ -1373,10 +1373,10 @@ By checking this box, you accept %beginning_link% Terms of Use %end_link% En cochant cette case, vous acceptez les %beginning_link% conditions générales d'utilisation %end_link% - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig By default it is available for admins @@ -1386,7 +1386,7 @@ By field Par champ - web/prod/index.html.twig + web/prod/index.html.twig C dans l'air @@ -1411,6 +1411,7 @@ Cancel Annuler + Controller/Prod/LanguageController.php admin/fields/templates.html.twig task-manager/task-editor/task.html.twig user/import/view.html.twig @@ -1465,7 +1466,7 @@ Ce champ est decrit comme un element DublinCore Ce champ est décrit comme un élément DublinCore - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Ce champ est en lecture seule @@ -1480,14 +1481,14 @@ Ce champ est obligatoire Ce champ est obligatoire - Bridge/Api/Dailymotion.php - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Ce champ est relie a une branche de thesaurus @@ -1502,18 +1503,18 @@ Ce champ est trop court %length% caracteres min Ce champ est trop court (%length% caractères min.) - Bridge/Api/Dailymotion.php - Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php Ce champ est trop long %length% caracteres max Ce champ est trop long (%length% caractères max.) - Bridge/Api/Dailymotion.php - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Ce champ est utilise en titre a l'affichage @@ -1548,7 +1549,7 @@ Certains champs sont obligatoires, veuillez les remplir Certains champs sont obligatoires, veuillez les completer - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Ces informations sont directement fournies par la norme de metadonnees de ce champ : %norm_name% @@ -1573,12 +1574,7 @@ Chargement Chargement... - web/prod/index.html.twig - - - Charset to use for indexation - Jeu de caractères à utiliser pour l'indexation - admin/search-engine/sphinx-search.html.twig + web/prod/index.html.twig Chercher @@ -1612,7 +1608,7 @@ Civility Civilité - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Clear @@ -1644,7 +1640,7 @@ Cocher toute la colonne Cocher toute la colonne - web/admin/index.html.twig + web/admin/index.html.twig Cochez les cases correspondantes aux colonnes que vous desirez voire apparaitre dans le report @@ -1703,7 +1699,7 @@ Commande du %date% Commande du %date% - Controller/Prod/OrderController.php + Phrasea/Order/OrderBasketProvider.php Commandes @@ -1713,7 +1709,7 @@ Company Entreprise - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig actions/Feedback/ListsMacros.html.twig prod/User/Add.html.twig @@ -1748,7 +1744,7 @@ Configuration Configuration - web/prod/index.html.twig + web/prod/index.html.twig Confirm new email address @@ -1758,7 +1754,7 @@ Confirm reset users rights before applying template Confirmez la réinitialisation les droits utilisateurs avant d'appliquer le modèle. - web/admin/index.html.twig + web/admin/index.html.twig Confirmation de votre mot de passe @@ -1854,12 +1850,12 @@ Couleur de selection Couleur de sélection - web/prod/index.html.twig + web/prod/index.html.twig Country Pays - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig actions/Feedback/ListsMacros.html.twig @@ -1867,6 +1863,11 @@ Créez un compte manuellement web/login/register.html.twig + + Create index + Create index + SearchEngine/Elastic/ElasticsearchSettingsFormType.php + Create new subdef Créer une nouvelle sous résolution @@ -1917,17 +1918,17 @@ Creer un model Créer un modèle - web/admin/index.html.twig + web/admin/index.html.twig Creer un modele Créer un modèle - web/admin/index.html.twig + web/admin/index.html.twig Creer un utilisateur Créer un utilisateur - web/admin/index.html.twig + web/admin/index.html.twig Creer une nouvelle applications @@ -1958,7 +1959,7 @@ Current operations cannot be executed because the site is temporarily in maintenance mode. Wait a few minutes and try your request again Cette opération ne peut aboutir, le site est en mode maintenance. Patientez quelques instants puis essayez à nouveau. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Current password @@ -2035,7 +2036,7 @@ Date Added Date d'ajout - web/prod/index.html.twig + web/prod/index.html.twig Date Creation @@ -2057,11 +2058,6 @@ Date de la demande prod/orders/order_box.html.twig - - Date fields available for search - Champs de type date disponibles pour la recherche - admin/search-engine/sphinx-search.html.twig - De De @@ -2082,12 +2078,12 @@ Decocher toute la colonne Décocher toute la colonne - web/admin/index.html.twig + web/admin/index.html.twig Deconnexion Déconnexion - mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig Decouvrez la documentation @@ -2124,11 +2120,6 @@ Type de média recherchés par défaut Form/Configuration/SearchEngineFormType.php - - Default sort - Tri par défaut - admin/search-engine/phrasea.html.twig - Default validation links duration Durée de validité (en jours) des liens générés pour les process de Push et de Validation @@ -2160,7 +2151,7 @@ admin/task-manager/index.html.twig admin/task-manager/templates.html.twig prod/actions/delete_records_confirm.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig prod/upload/lazaret.html.twig prod/upload/lazaret.html.twig @@ -2294,7 +2285,7 @@ Display technical data Affichage des informations techniques - web/prod/index.html.twig + web/prod/index.html.twig Display thumbnails @@ -2304,7 +2295,7 @@ Do not display Masquer les informations techniques - web/prod/index.html.twig + web/prod/index.html.twig Do not forget to restart the tasks scheduler @@ -2329,14 +2320,15 @@ Do you want to send your report ? Souhaitez-vous envoyer votre rapport ? - Phrasea/Controller/LightboxController.php - mobile/lightbox/validate.html.twig - web/lightbox/validate.html.twig + Phrasea/Controller/LightboxController.php + mobile/lightbox/validate.html.twig + mobile/lightbox/validate.html.twig + web/lightbox/validate.html.twig Document Document - web/prod/index.html.twig + web/prod/index.html.twig Document Type Sharing @@ -2371,10 +2363,10 @@ Documents indisponibles Documents indisponibles - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Don't worry, You can modify your configuration later @@ -2391,11 +2383,21 @@ Téléchargement de documents actions/Download/prepare.html.twig + + Drag and drop the pin to move position + Drag and drop the pin to move position + Controller/Prod/LanguageController.php + Droits Droits web/admin/editusers_quotas.html.twig + + Drop index + Drop index + SearchEngine/Elastic/ElasticsearchSettingsFormType.php + Duree Durée @@ -2432,12 +2434,17 @@ Editer admin/task-manager/index.html.twig admin/task-manager/templates.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + + + Edit position + Edit position + Controller/Prod/LanguageController.php Editer Editer - actions/publish/publish_edit.html.twig + actions/publish/publish_edit.html.twig Edition @@ -2464,7 +2471,7 @@ Edition impossible Edition impossible - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Editor @@ -2588,8 +2595,8 @@ En cours d'encodage En cours d'encodage - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php actions/Bridge/records_list.html.twig @@ -2652,11 +2659,6 @@ A la publication, permettre de notifier les utilisateurs d'une nouvelle entrée dans un flux Form/Configuration/ActionsFormType.php - - Enable stemming - Activiter les Stemmes - admin/search-engine/phrasea.html.twig - Enable thesaurus Activer le thésaurus @@ -2696,7 +2698,7 @@ Entrez plusieurs adresses email en les separant par des points-virgules Entrez plusieurs adresses e-mail en les séparant par des points-virgules - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Entry removed from list @@ -2716,7 +2718,7 @@ Envoie avec succes Envoi avec succès - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php Erreur @@ -2737,12 +2739,12 @@ Erreur YouTube a rencontré une erreur lors du traitement de la requête. Youtube a rencontré une erreur lors du traitement de la requête. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur d'encodage Erreur d'encodage - Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php Erreur de login / mot de passe @@ -2752,32 +2754,32 @@ Erreur la requête a été mal formée ou contenait des données valides. La requête a été mal formulée ou contenait des données non valides - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur la ressource que vous tentez de modifier n'existe pas. Erreur : la ressource que vous tentez de modifier n'existe pas. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur le service Youtube n'est pas accessible pour le moment. Veuillez réessayer plus tard. Erreur le service Youtube est indisponible pour le moment. Veuillez réessayer plus tard. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur lors de l'authentification au service Youtube, Veuillez vous déconnecter, puis vous reconnecter. Erreur lors de l'authentification au service Youtube. Veuillez vous déconnecter, puis vous reconnecter. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur lors de l'envoi de la requête. Erreur d'authentification. Erreur lors de l'envoi de la requête : erreur d'authentification. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur lors de la mise a jour des donnes Erreur lors de la mise à jour des données - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php Erreur lors de la tentative ; errreur : %message% @@ -2789,7 +2791,7 @@ Erreur lors de votre authentification Erreur d'authentification - actions/Bridge/callback.html.twig + actions/Bridge/callback.html.twig Erreur lors du contact avec le serveur WEB @@ -2799,7 +2801,7 @@ Erreur vous avez essayé d'exécuter une requête non prise en charge par Youtube Vous avez essayé d'exécuter une requête non prise en charge par Youtube - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Error while connecting to FTP @@ -2886,7 +2888,7 @@ FTP Serveur FTP - web/account/account.html.twig + web/account/account.html.twig FTP Export @@ -2930,7 +2932,7 @@ Field %name% could not be created, please try again or contact an admin. Le champ %name% ne peut être créé. Essayer de nouveau ou contacter un administrateur. - Controller/Admin/FieldsController.php + Controller/Admin/FieldsController.php Field %name% could not be saved, please try again or contact an admin. @@ -3003,8 +3005,8 @@ Fils disponibles Fils disponibles - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig Filter @@ -3042,7 +3044,7 @@ Flash Flash web/common/technical_datas.html.twig - web/prod/index.html.twig + web/prod/index.html.twig Flatten layers @@ -3162,6 +3164,11 @@ Générer une image Media/Subdef/Image.php + + Geo Search + Geo Search + web/prod/index.html.twig + Geonames server address Adresse du serveur de Géolocalisation Geonames @@ -3210,7 +3217,7 @@ Graphiste (preview au rollover) Graphiste (prévisualisation au rollover) - web/prod/index.html.twig + web/prod/index.html.twig Great @@ -3246,7 +3253,7 @@ Guest, you must be authenticated to have the right to download. Vous devez vous authentifier pour télécharger. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig HD Download @@ -3262,7 +3269,7 @@ Help Aide - login/layout/base-layout.html.twig + login/layout/base-layout.html.twig Hi, Please log in @@ -3277,10 +3284,10 @@ Home Accueil - mobile/lightbox/feed.html.twig - mobile/lightbox/validate.html.twig + mobile/lightbox/feed.html.twig + mobile/lightbox/validate.html.twig login/include/language-block.html.twig - login/layout/base-layout.html.twig + login/layout/base-layout.html.twig Homepage slideshow @@ -3311,7 +3318,7 @@ Iconographe (description au rollover) Iconographe (description au rollover) - web/prod/index.html.twig + web/prod/index.html.twig Id @@ -3356,7 +3363,7 @@ Image Image - web/prod/index.html.twig + web/prod/index.html.twig ImageMagick @@ -3381,14 +3388,14 @@ In the answer grid Dans une infobulle séparée - web/prod/index.html.twig + web/prod/index.html.twig Include Business-fields in caption Inclure les champs métier dans la notice - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Incorrect please try again @@ -3420,7 +3427,7 @@ Informations personnelles Informations personnelles - web/account/account.html.twig + web/account/account.html.twig Infos @@ -3443,16 +3450,6 @@ L'installation est en cours, patientez... web/setup/step2.html.twig - - Installer Google Chrome - Installer le navigateur Chrome - login/layout/base-layout.html.twig - - - Installer Google Chrome Frame - Installer Google Chrome Frame pour Internet Explorer - login/layout/base-layout.html.twig - Invalid captcha answer. La réponse au code CAPTCHA est incorrecte. @@ -3501,7 +3498,7 @@ Invalid target collection Collection de destination invalide - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php Invalid unlock link. @@ -3544,7 +3541,7 @@ L'upload a echoue L'upload a échoué Bridge/Api/Flickr.php - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php L'upload concernant le record %title% sur le compte %bridge_name% a echoue pour les raisons suivantes : %reason% @@ -3554,17 +3551,17 @@ L'utilisateur approuve ce document L'utilisateur approuve ce document - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig L'utilisateur desapprouve ce document L'utilisateur désapprouve ce document - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig L'utilisateur n'a pas encore donne son avis sur ce document L'utilisateur n'a pas encore donné son avis sur ce document - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig LAST 20 @@ -3584,27 +3581,27 @@ La sous resolution n'est pas disponible pour les documents suivants La sous-résolution n'est pas disponible pour les documents suivants - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig La taille maximale d'une video est de %duration% minutes. La durée d'une vidéo est limitée à %duration% minutes. - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php La video a ete rejetee La vidéo a été rejetée - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php La video a ete supprimee La vidéo a été supprimée Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php La video est restreinte @@ -3695,16 +3692,16 @@ Le poids maximum d'un fichier est de %size% Le poids de fichier est limité à %size% - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php Le record n'a pas de fichier physique L'enregistrement n'a pas de fichier physique - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php Le token n'a pas encore ete genere @@ -3719,8 +3716,8 @@ Les documents ne peuvent pas etre exportes Les documents ne peuvent pas être exportés - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Les elements ne peuvent etre uploades (problemes de type ou de droit) @@ -3752,12 +3749,12 @@ Les status de certains documents ne sont pas accessibles par manque de droits Vous ne disposez pas des droits nécessaires pour accéder aux status de certains documents - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Les termes apparaissent dans le(s) champs Le(s) mot(s) contenu(s) dans le(s) champ(s) - web/prod/index.html.twig + web/prod/index.html.twig Light Value @@ -3833,12 +3830,6 @@ Recherche dynamique admin/fields/templates.html.twig - - Loading - Chargement en cours - actions/Bridge/index.html.twig - actions/Property/index.html.twig - Loading database documentary structure ... Chargement de la structure documentaire @@ -3890,7 +3881,7 @@ Ma derniere question Ma dernière question - web/prod/index.html.twig + web/prod/index.html.twig Mail line %line% is empty @@ -3983,11 +3974,6 @@ Message automatique de Phraseanet templates/web/email-template.html.twig - - Mettez à jour votre navigateur ou téléchargez un navigateur plus récent. - Mettez à jour votre navigateur ou bien téléchargez-en un plus récent. - login/layout/base-layout.html.twig - Mettre a jour Mettre à jour @@ -4032,7 +4018,7 @@ Missing target collection Collection de destination manquante - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php Missing tests parameter @@ -4047,7 +4033,7 @@ Mode de presentation Mode de présentation - web/prod/index.html.twig + web/prod/index.html.twig Modele de donnees @@ -4083,12 +4069,12 @@ Move %countable% records to the chosen collection in the list. Déplacer les %countable% enregistrements sélectionnés vers la collection choisie dans la liste. - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig Move one record to the chosen collection in the list. Déplacer l'enregistrement vers la collection choisie dans la liste. - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig Moves records @@ -4173,7 +4159,7 @@ No URL available Aucune URL de disponible - prod/Share/record.html.twig + prod/Share/record.html.twig No account yet? @@ -4203,7 +4189,7 @@ No document selected Aucun document sélectionné - prod/actions/delete_records_confirm.html.twig + prod/actions/delete_records_confirm.html.twig No elements to push @@ -4274,7 +4260,7 @@ Nom du nouveau modele Nom du nouveau modèle - web/admin/index.html.twig + web/admin/index.html.twig Nom du nouveau panier @@ -4332,7 +4318,7 @@ Notification par email Notifications par e-mail - web/account/account.html.twig + web/account/account.html.twig Notifications @@ -4344,11 +4330,6 @@ Notifications globales classes/eventsmanager/broker.php - - Notify - Notifier - actions/Feedback/List-Share.html.twig - Notify third party application when an event occurs in Phraseanet Notifier l'application tierce lorsqu'un événement de produit dans Phraseanet @@ -4357,7 +4338,7 @@ Notify users about this publication Notifier les utilisateurs à propos de cette publication. - actions/publish/publish.html.twig + actions/publish/publish.html.twig Nous vous rappelons qu'il est de votre responsabilité de vous assurer que le contenu de la vidéo que vous allez mettre en ligne est conforme aux conditions d'utilisations @@ -4397,12 +4378,12 @@ Number of replicas Nombre de répliques (Replica Shards) - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Number of shards Nombre de Shards Elastic - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Number of threads to use for FFMpeg @@ -4412,8 +4393,8 @@ OK OK - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php Ok @@ -4423,7 +4404,7 @@ One document can not be modified. Un document ne peut être modifié. - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig Only %nbEditableDocuments% records can be modified. @@ -4455,14 +4436,14 @@ Order has been denied La commande a été refusée - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php prod/orders/order_box.html.twig prod/orders/order_item.html.twig Order has been sent La commande a été envoyée - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php prod/orders/order_box.html.twig prod/orders/order_item.html.twig @@ -4517,17 +4498,15 @@ Paniers Paniers - mobile/lightbox/index.html.twig - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig - lightbox/IE6/validate.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig web/lightbox/validate.html.twig Par %author% Par %author% - mobile/lightbox/feed.html.twig + mobile/lightbox/feed.html.twig prod/results/entry.html.twig prod/results/feeds_entry.html.twig @@ -4536,7 +4515,7 @@ Mot de passe Form/Login/PhraseaAuthenticationForm.php Form/Login/PhraseaRegisterForm.php - web/account/account.html.twig + web/account/account.html.twig Password (confirmation) @@ -4581,19 +4560,14 @@ Photos Images - Bridge/Api/Flickr.php + Bridge/Api/Flickr.php Photosets Albums Flickr - Bridge/Api/Flickr.php + Bridge/Api/Flickr.php Bridge/Flickr/actionelements.html.twig - - Phrasea search-engine configuration - Configuration du moteur de recherche Phrasea - admin/search-engine/phrasea.html.twig - Phraseanet DataBoxes are MySQL databases, queryable by Phraseanet ApplicationBox. Les Databoxes Phraseanet sont des bases de données MySQL, requêtables par l'ApplicationBox Phraseanet. @@ -4734,7 +4708,7 @@ Position Poste - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Pour davantage d'informations, consulter le lien suivant %lien% @@ -4755,10 +4729,9 @@ Preferences Préférences - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Prefix for notification emails @@ -4773,12 +4746,12 @@ Presentation de vignettes Présentation de vignettes - web/prod/index.html.twig + web/prod/index.html.twig Presentation de vignettes de panier Présentation des vignettes de panier - web/prod/index.html.twig + web/prod/index.html.twig Previous @@ -4827,12 +4800,12 @@ admin/publications/wrapper.html.twig web/admin/tree.html.twig web/common/menubar.html.twig - web/prod/index.html.twig + web/prod/index.html.twig Publier Publier - actions/publish/publish.html.twig + actions/publish/publish.html.twig Publique @@ -4849,7 +4822,7 @@ Push Push Controller/Prod/LanguageController.php - eventsmanager/notify/push.php + eventsmanager/notify/push.php Push configuration @@ -4865,41 +4838,41 @@ Push::filter on companies Société web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on countries Pays web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on emails E-mail web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on login Identifiant web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on name Nom/Prénom - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on templates Dernier modèle - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter starts Commence par web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::une validation est une demande d'appreciation a d'autres personnes @@ -4937,90 +4910,90 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Raccourcis claviers de la zone des paniers : - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis claviers en cours de editing : Raccourci de la fenêtre d'édition - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis claviers en cours de preview : Raccourcis de la fenêtre vue détaillée - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis claviers en cours de recherche : Raccourcis de la fenêtre principale - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis:: ctrl-a : tout selectionner ctrl-a : sélectionner tout - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Raccourcis:: ctrl-e : editer la selection ctrl-e : éditer la sélection - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Raccourcis:: ctrl-p : imprimer la selection ctrl-p : imprimer la sélection - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::espace : arreter/demarrer le diaporama espace : démarrer/arrêter le diaporama - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche bas : scroll vertical flèche basse : défilement vers le bas - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche droite : page suivante flèche droite : page suivante - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche gauche : en arriere flèche gauche : document précédent - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche gauche : en avant flèche droite : document suivant - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche gauche : page precedente flèche gauche : page précédente - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche haut : scroll vertical flèche haute : défilement vers le haut - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::tab/shift-tab se ballade dans les champs Tab/shift-tab : Changer de champs - web/prod/index.html.twig + web/prod/index.html.twig Rappel : Il vous reste %number% jours pour valider %title% de %user% Il vous reste %number% jours pour valider %title% de %user% - eventsmanager/notify/validationreminder.php + eventsmanager/notify/validationreminder.php Rappel pour une demande de validation Rappel pour une demande de validation se terminant bientôt - eventsmanager/notify/validationreminder.php + eventsmanager/notify/validationreminder.php Rapport de Validation @@ -5031,7 +5004,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Re-initialiser Ré-initialiser prod/Baskets/Reorder.html.twig - web/prod/index.html.twig + web/prod/index.html.twig prod/Story/Reorder.html.twig @@ -5039,10 +5012,10 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Ordonner prod/Baskets/Reorder.html.twig prod/Story/Reorder.html.twig - prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig Read-only @@ -5062,7 +5035,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Receive notification when I receive a push Recevoir une notification lors de la réception d'un Push - eventsmanager/notify/push.php + eventsmanager/notify/push.php Receive notification when a publication is available @@ -5133,7 +5106,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Recevoir un accuse de reception a %my_email% Demander un accusé de réception à transmettre à l'adresse %my_email% - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Recherche multicritères @@ -5143,7 +5116,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Rechercher dans un champ date Dans un champ date - web/prod/index.html.twig + web/prod/index.html.twig Recommendations @@ -5163,7 +5136,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Record Not Found Enregistrement non trouvé - Controller/Api/V1Controller.php + Controller/Api/V1Controller.php Record removed from basket @@ -5188,7 +5161,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Records have been successfuly moved Les enregistrements ont été déplacés avec succès. - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php Records type @@ -5244,7 +5217,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Relevance Pertinence - web/prod/index.html.twig + web/prod/index.html.twig Remember me @@ -5269,7 +5242,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Remove from basket Retirer du panier - prod/preview/tools.html.twig + prod/preview/tools.html.twig Remove watermark @@ -5338,7 +5311,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Require email validation to activate the account Demander une confirmation par e-mail pour valider le compte - web/admin/index.html.twig + web/admin/index.html.twig Required @@ -5358,12 +5331,12 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Reset and apply Réinitialiser et appliquer - web/admin/index.html.twig + web/admin/index.html.twig Reset and apply template Réinitialiser et appliquer le modèle - web/admin/index.html.twig + web/admin/index.html.twig Reset cache @@ -5373,7 +5346,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Reset rights before applying template? Réinitialiser les droits avant d'appliquer modèle ? - web/admin/index.html.twig + web/admin/index.html.twig Resolution @@ -5459,7 +5432,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Rights will be erased before applying template, do you confirm? Les droits seront effacés avant d'appliquer le modèle. Confirmez-vous l'action ? - web/admin/index.html.twig + web/admin/index.html.twig Role @@ -5634,7 +5607,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Selecteur de theme Sélecteur de thème - web/prod/index.html.twig + web/prod/index.html.twig Selectionnez des documents et @@ -5655,7 +5628,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Send an email to the user to setup his password Envoyer un e-mail à l'utilisateur pour créer son mot de passe - web/admin/index.html.twig + web/admin/index.html.twig Send to Facebook @@ -5691,7 +5664,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Service youtube introuvable. Service Youtube introuvable - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Session persistente @@ -5717,7 +5690,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Set sharing permission Réglage des partages - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Set statuses restrictions @@ -5769,7 +5742,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Si cette fenetre ne se ferme pas automatiquement, fermez la, et raffraichissez votre compte Si cette fenêtre ne se ferme pas automatiquement, fermez la, et rafraîchissez votre compte - actions/Bridge/callback.html.twig + actions/Bridge/callback.html.twig Si vous aviez besoin de plus de parametres, %debut_lien%Afficher d'avantage d'options%fin_lien% @@ -5781,11 +5754,6 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Si vous ne les respectez pas, les documents seront correctement indexés, mais les métadonnées inscrites risquent d’être erronées prod/Tooltip/DataboxFieldRestrictions.html.twig - - Si vous ne pouvez pas installer un autre navigateur, utilisez Google Chrome Frame. - Utilisateur d'Internet Explorer, si vous ne pouvez pas installer un autre navigateur, utilisez Google Chrome Frame. - login/layout/base-layout.html.twig - Single image Image seule @@ -5832,11 +5800,6 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Un problème est survenu Controller/Admin/RootController.php - - Something wrong happened, please retry or contact an admin. - Quelque chose d'inattendu s'est produit. Veuillez réessayer ou contacter un administrateur. - WorkZone/Browser/Browser.html.twig - Something wrong happened, please try again or contact an admin. Quelque chose ne fonctionne pas correctement. Veuillez réessayer ou contactez un administrateur. @@ -5870,26 +5833,6 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis admin/publications/fiche.html.twig admin/publications/list.html.twig - - Sphinx Search RealTime server - Serveur d'indexation temps-réel SphinxSearch - admin/search-engine/sphinx-search.html.twig - - - Sphinx Search connection configuration - Configuration de la connexion du moteur Sphinx - admin/search-engine/sphinx-search.html.twig - - - Sphinx Search server - Serveur Sphinx - admin/search-engine/sphinx-search.html.twig - - - SphinxSearch search-engine configuration - Configuration du moteur de recherche Sphinx - admin/search-engine/sphinx-search.html.twig - Stamp logo Logo de Stamp @@ -5922,7 +5865,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Status des documents a rechercher Status des documents pour la recherche - web/prod/index.html.twig + web/prod/index.html.twig Status edition @@ -5944,11 +5887,6 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Etat prod/orders/order_box.html.twig - - Stemming - Stemmes - admin/search-engine/phrasea.html.twig - Stop Arrêter @@ -5972,7 +5910,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Story Not Found Reportage inconnu - Controller/Api/V1Controller.php + Controller/Api/V1Controller.php Story created @@ -6024,6 +5962,11 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Nom de la sous résolution web/admin/subdefs.html.twig + + Submit + Submit + Controller/Prod/LanguageController.php + Substitute Substituer @@ -6039,13 +5982,12 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Success Succès api/auth/native_app_access_token.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Successful install Installation réussie - web/admin/index.html.twig + web/admin/index.html.twig Successful removal @@ -6199,7 +6141,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Template Modèle - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Temporary access to the following collections @@ -6215,7 +6157,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Terms of Use Conditions générales d'utilisation Form/Login/PhraseaRegisterForm.php - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Terms of service @@ -6228,7 +6170,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Controller/Prod/TOUController.php web/admin/tree.html.twig web/login/cgus.html.twig - login/layout/base-layout.html.twig + login/layout/base-layout.html.twig The URL you used is out of date, please login @@ -6238,7 +6180,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis The Youtube servers have received too many calls from the same caller in a short amount of time. Le Serveur Youtube a reçu trop de requêtes de la même source dans un intervalle trop court - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php The application is going down for maintenance, please logout. @@ -6249,12 +6191,12 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis The authentication token specified in the Authorization header has expired. Le jeton d'authentification spécifié dans l’entête Autorisation est expiré - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php The authentication token specified in the Authorization header is invalid Le token d'authentification n'est pas valide - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php The delivery to %email% failed for the following reason : %reason% @@ -6284,7 +6226,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis The file does not match available color Ce fichier ne correspond pas aux espaces couleurs autorisés - Border/Checker/Colorspace.php + Border/Checker/Colorspace.php The file does not match available extensions @@ -6331,7 +6273,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis The records have been properly ordered Les documents ont été correctement commandés - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php prod/orders/order_box.html.twig @@ -6362,17 +6304,17 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Theme Thème - web/prod/index.html.twig + web/prod/index.html.twig There is no one to validate orders, please contact an administrator Personne ne peut valider de commande. Veuillez prendre contact avec un administrateur en lui indiquant ce message d'erreur. - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php There is no record eligible for an order Aucun document n'est éligible à une commande. - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php There is no user to add. @@ -6382,7 +6324,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Thesaurus Min score Hits minimum du Thésaurus - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Thesaurus branch @@ -6423,23 +6365,23 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis This feed is public Ce flux est public admin/publications/list.html.twig - actions/publish/publish.html.twig + actions/publish/publish.html.twig This field is required Ce champ est obligatoire - web/admin/index.html.twig + web/admin/index.html.twig This field represents the title of the document Ce champ est utilisé pour affecter un titre à l'enregistrement - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig This file is too big Ce fichier est trop volumineux Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig This is a template @@ -6459,7 +6401,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis This user does not participate to the validation but is only viewer. Cet utilisateur ne participe pas à la demande de validation - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig This user has no rights @@ -6543,7 +6485,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Tout type Tous types - web/prod/index.html.twig + web/prod/index.html.twig Toutes les publications @@ -6575,7 +6517,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Trier par Trier par - web/prod/index.html.twig + web/prod/index.html.twig Try to extract embedded thumbnails @@ -6600,7 +6542,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Type de documents Type de document - web/prod/index.html.twig + web/prod/index.html.twig Type nombre @@ -6621,12 +6563,12 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Un document commande Un document commandé. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Un document ne peut etre commande Un document ne peut être commandé. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Unable to add file to Phraseanet @@ -6711,7 +6653,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Unauthorized action Action non autorisée - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Une fois la publication supprimee, les donnees publiees seront definitivement perdues. Continuer ? @@ -6721,7 +6663,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Une question personnelle La question - web/prod/index.html.twig + web/prod/index.html.twig Une selection @@ -6828,7 +6770,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Use latest search settings on Production loading Utiliser la dernière question posée au lancement de Production - web/prod/index.html.twig + web/prod/index.html.twig Use my Phraseanet account @@ -6906,7 +6848,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Users Utilisateurs - Vocabulary/ControlProvider/UserProvider.php + Vocabulary/ControlProvider/UserProvider.php user/import/view.html.twig web/admin/users.html.twig prod/actions/Push.html.twig @@ -6936,7 +6878,6 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis VALIDATION Validation web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig web/lightbox/validate.html.twig @@ -6951,8 +6892,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis eventsmanager/notify/validate.php eventsmanager/notify/validationdone.php eventsmanager/notify/validationreminder.php - eventsmanager/notify/validationreminder.php - lightbox/IE6/validate.html.twig + eventsmanager/notify/validationreminder.php Validation from %user% @@ -6967,10 +6907,8 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Validations Validations - mobile/lightbox/index.html.twig - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig - lightbox/IE6/validate.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig web/lightbox/validate.html.twig @@ -7007,7 +6945,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Video Vidéo - web/prod/index.html.twig + web/prod/index.html.twig Video Codec @@ -7023,7 +6961,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis View Voir - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig View on %title% @@ -7038,7 +6976,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Vocabulary not found Vocabulaire non trouvé - Controller/Prod/EditController.php + Controller/Prod/EditController.php Vocabulary type @@ -7048,15 +6986,13 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Voici vos paniers Paniers disponibles - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig Voici vos validations en cours Demandes de validations en cours - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig @@ -7132,7 +7068,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Vous devez selectionner un type de sous definitions Vous devez sélectionner un type de sous-définitions - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Vous devez specifier une adresse email et un mot de passe valides @@ -7152,7 +7088,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Vous etes authentifie avec succes Vous êtes authentifié avec succès - actions/Bridge/callback.html.twig + actions/Bridge/callback.html.twig Vous etes maintenant deconnecte. A bientot. @@ -7162,12 +7098,12 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Vous n'avez pas assez de droits sur certains elements selectionnes Vous ne disposez pas des droits requis sur certains documents sélectionnés - actions/Bridge/index.html.twig + actions/Bridge/index.html.twig Vous n'avez pas assez de droits sur les elements selectionnes Vous ne disposez pas des droits requis sur les documents sélectionnés - actions/Bridge/index.html.twig + actions/Bridge/index.html.twig Vous n'avez pas les droits pour supprimer certains documents @@ -7194,7 +7130,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Aucun document sélectionné Bridge/Dailymotion/upload.html.twig Bridge/Flickr/upload.html.twig - actions/Bridge/index.html.twig + actions/Bridge/index.html.twig Bridge/Youtube/upload.html.twig @@ -7226,17 +7162,12 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Vous pouvez quitter la plupart des fenetres survolantes via la touche echap Vous pouvez fermer la plupart des fênetres en sur impression avec la touche echap - web/prod/index.html.twig + web/prod/index.html.twig Warning ! Attention ! - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Warning, this database is not empty @@ -7310,13 +7241,13 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Would you like to receive an e-mail when your download is ready ? Souhaitez-vous recevoir un e-mail quand votre téléchargement est prêt ? - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Would you like to reset rights before applying the template? Souhaitez-vous réinitialiser les droits avant d'appliquer le modèle ? - web/admin/index.html.twig - web/admin/index.html.twig + web/admin/index.html.twig + web/admin/index.html.twig Write Metas @@ -7326,8 +7257,8 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis YYYY/MM/DD YYYY/MM/DD - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Yes @@ -7350,16 +7281,6 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Vous êtes sur le point d'envoyer une demande de validation pour %nb_push_items% documents. prod/actions/Push.html.twig - - You are about to delete this account. Would you like to continue ? - Vous êtes sur le point de supprimer ce compte. Êtes-vous sûr de vouloir continuer ? - actions/Bridge/index.html.twig - - - You are about to delete this basket. Would you like to continue ? - Vous êtes sur le point de supprimer ce panier. Continuer ? - WorkZone/Browser/Browser.html.twig - You are about to push %nb_push_items% records, %nb_not_available% records can not be processed. Vous êtes sur le point d'adresser %nb_push_items% documents or seuls %nb_not_available% peuvent être pris en compte. @@ -7373,7 +7294,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis You are attempting to exceed the storage limit on your account and must delete existing entries before inserting new entries Vous dépassez la taille maximale de stockage autorisée par votre compte, veuillez supprimer des documents avant d'en ajouter de nouveaux. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php You are not allowed to add users @@ -7422,7 +7343,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis You can alternatively receive an email when the download is ready. Vous pouvez être informé par e-mail quand votre téléchargement est prêt. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig You can choose only one record @@ -7437,7 +7358,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis You can not directly download more than %max_download% Mo ; time to package all documents is too long Vous ne pouvez pas télécharger directement plus de %max_download% Mo de données. Le temps nécessaire pour zipper tous les documents serait trop long. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig You can not edit this story @@ -7478,12 +7399,12 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis You do not have rights to remove selected documents Vous n'avez pas les droits pour supprimer les documents sélectionnés - prod/actions/delete_records_confirm.html.twig + prod/actions/delete_records_confirm.html.twig You do not have the permission to move records to %collection% Vous ne disposez pas des autorisations requises pour déplacer les enregistrements vers la collection %collection% - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php You have %quantity% days to validate the selection. @@ -7503,7 +7424,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis You have not access to this basket Vous n'avez pas accès à ce panier - Model/Repositories/BasketRepository.php + Model/Repositories/BasketRepository.php You have selected %nbReceivedDocuments% records. @@ -7518,7 +7439,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis You have to give your feedback at least on one document to send a report Vous devez donner au moins un avis pour envoyer un report - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php You have to wait for an administrator approval for your access request @@ -7533,7 +7454,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis You must agree to the Terms of Use to continue. Vous devez accepter les conditions générales d'utilisation pour poursuivre. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig You must give a destination collection @@ -7655,19 +7576,19 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis a propos A propos - mobile/lightbox/index.html.twig - mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig action : ajouter au panier Ajouter au panier prod/preview/tools.html.twig - prod/results/record.html.twig + prod/results/record.html.twig action : bridge Bridge - web/prod/index.html.twig + web/prod/index.html.twig web/prod/toolbar.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig @@ -7692,12 +7613,10 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis action : exporter Exporter web/lightbox/feed.html.twig - lightbox/IE6/feed.html.twig - lightbox/IE6/validate.html.twig web/lightbox/validate.html.twig - web/prod/index.html.twig - prod/preview/tools.html.twig - prod/results/record.html.twig + web/prod/index.html.twig + prod/preview/tools.html.twig + prod/results/record.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig prod/WorkZone/Story.html.twig @@ -7712,8 +7631,8 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis action : print Imprimer - prod/preview/tools.html.twig - prod/results/record.html.twig + prod/preview/tools.html.twig + prod/results/record.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig prod/WorkZone/Story.html.twig @@ -7721,7 +7640,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis action : publier Publier - web/prod/index.html.twig + web/prod/index.html.twig web/prod/toolbar.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig @@ -7747,22 +7666,22 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Supprimer web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig prod/WorkZone/Story.html.twig action:: nouveau panier Nouveau panier - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig action:: nouveau reportage Nouveau reportage - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig action::Valider @@ -7773,19 +7692,19 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis action::detacher Détacher - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig action::editer Editer - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig action::exporter Exporter prod/WorkZone/Macros.html.twig prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig action::renommer @@ -8139,7 +8058,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Activité Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig @@ -8148,24 +8067,24 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Adresse Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur changer mon mot de passe Changer mon mot de passe - web/account/account.html.twig + web/account/account.html.twig admin::compte-utilisateur code postal Code postal Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur confirmer la nouvelle adresse email @@ -8187,21 +8106,21 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis E-mail Controller/Admin/UserController.php Event/Subscriber/RegistrationSubscriber.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig web/admin/users.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur fax Fax Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur id utilisateur @@ -8213,8 +8132,8 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Identifiant Core/Provider/RegistrationServiceProvider.php api/auth/end_user_authorization.html.twig - web/account/account.html.twig - web/account/account.html.twig + web/account/account.html.twig + web/account/account.html.twig web/account/reset-email.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig @@ -8225,7 +8144,7 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis admin::compte-utilisateur mot de passe Mot de passe api/auth/end_user_authorization.html.twig - web/account/account.html.twig + web/account/account.html.twig web/account/reset-email.html.twig web/common/dialog_export.html.twig web/setup/step2.html.twig @@ -8236,11 +8155,11 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Controller/Admin/UserController.php Event/Subscriber/RegistrationSubscriber.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur nouvelle adresse email @@ -8258,10 +8177,10 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Poste Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur prenom @@ -8269,16 +8188,16 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Controller/Admin/UserController.php Event/Subscriber/RegistrationSubscriber.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur sexe Civilité Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig @@ -8286,12 +8205,12 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Société Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig web/admin/users.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur tel @@ -8302,11 +8221,11 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis admin::compte-utilisateur telephone Téléphone Controller/Admin/UserController.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur un email de confirmation vient de vous etre envoye. Veuillez suivre les instructions contenue pour continuer @@ -8318,9 +8237,9 @@ Pour les utilisateurs authentifiés, la demande de validation est également dis Ville Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur: L'email a correctement ete mis a jour @@ -8371,13 +8290,13 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le admin::compte-utilisateur:ftp: repertoire de destination ftp Dossier distant - web/account/account.html.twig + web/account/account.html.twig web/common/dialog_export.html.twig admin::compte-utilisateur:ftp: Activer le compte FTP Activer la fonction FTP - web/account/account.html.twig + web/account/account.html.twig admin::compte-utilisateur:ftp: Le mot de passe est errone @@ -8387,13 +8306,13 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le admin::compte-utilisateur:ftp: Nombre d'essais max Nombre d'essais - web/account/account.html.twig + web/account/account.html.twig web/common/dialog_export.html.twig admin::compte-utilisateur:ftp: Utiliser le mode passif Utiliser le mode passif - web/account/account.html.twig + web/account/account.html.twig web/common/dialog_export.html.twig @@ -8409,31 +8328,31 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le admin::compte-utilisateur:ftp: prefixe des noms de dossier ftp Préfixe des noms de dossier - web/account/account.html.twig + web/account/account.html.twig admin::compte-utilisateur:sexe: madame Mme Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur:sexe: mademoiselle Mlle Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur:sexe: monsieur M. Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::monitor: bases sur lesquelles l'utilisateur est connecte : @@ -8463,7 +8382,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Classic Controller/Admin/ConnectedUsersController.php lib/classes/phrasea.php - classes/record/preview.php + classes/record/preview.php web/admin/connected-users.html.twig @@ -8483,7 +8402,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Production Controller/Admin/ConnectedUsersController.php lib/classes/phrasea.php - classes/record/preview.php + classes/record/preview.php web/admin/connected-users.html.twig @@ -8513,9 +8432,9 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le admin::monitor: module validation Lightbox Controller/Admin/ConnectedUsersController.php - Phrasea/Controller/LightboxController.php - Phrasea/Controller/LightboxController.php - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php lib/classes/phrasea.php web/common/menubar.html.twig @@ -8698,7 +8617,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le alert Alerte - actions/Tools/index.html.twig + actions/Tools/index.html.twig all caches services have been flushed @@ -8709,7 +8628,6 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le an error occured une erreur est survenue Controller/Prod/ToolsController.php - actions/Tools/index.html.twig an error occured : %message% @@ -8739,7 +8657,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le audio audios - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php task-manager/task-editor/subdefs.html.twig @@ -8785,19 +8703,19 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le boutton:: selectionner aucune base Aucune - web/prod/index.html.twig + web/prod/index.html.twig boutton:: selectionner toutes les bases Toutes - web/prod/index.html.twig + web/prod/index.html.twig boutton::ajouter Ajouter admin/collection/suggested_value.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig boutton::annuler @@ -8806,22 +8724,22 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Controller/Prod/LanguageController.php web/account/reset-email.html.twig admin/collection/create.html.twig - web/admin/index.html.twig + web/admin/index.html.twig admin/publications/fiche.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Bridge/Dailymotion/video_modify.html.twig Bridge/Dailymotion/video_modify.html.twig Bridge/Flickr/photo_modify.html.twig Bridge/Flickr/photo_modify.html.twig Bridge/Youtube/video_modify.html.twig Bridge/Youtube/video_modify.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig - web/prod/tab_thesaurus.html.twig - web/report/all_content.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + web/prod/tab_thesaurus.html.twig + web/report/all_content.html.twig web/thesaurus/accept.html.twig web/thesaurus/accept.html.twig web/thesaurus/export-text-dialog.html.twig @@ -8843,11 +8761,9 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le boutton::chercher Chercher - lib/classes/queries.php - lib/classes/queries.php web/admin/users.html.twig - actions/Feedback/list.html.twig - web/prod/thesaurus.js.twig + actions/Feedback/list.html.twig + web/prod/index.html.twig web/thesaurus/thesaurus.html.twig web/thesaurus/thesaurus.html.twig @@ -8860,7 +8776,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le boutton::commander Commander - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig boutton::creer @@ -8872,8 +8788,6 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le boutton::demarrer Diaporama web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig @@ -8890,13 +8804,13 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le boutton::envoyer Envoyer - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig boutton::essayer Essayer - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig boutton::exporter @@ -8907,12 +8821,12 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le boutton::fermer Fermer Controller/Prod/LanguageController.php - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig web/lightbox/sc_note.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod/actions/Push.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig web/thesaurus/accept.html.twig web/thesaurus/accept.html.twig web/thesaurus/export-topics.html.twig @@ -8946,8 +8860,6 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le boutton::pause Pause web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig @@ -8955,10 +8867,6 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le précédent web/lightbox/feed_options_box.html.twig web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/setup/step2.html.twig @@ -8971,7 +8879,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le boutton::rechercher Rechercher Controller/Prod/LanguageController.php - web/prod/index.html.twig + web/prod/index.html.twig boutton::refresh @@ -8986,7 +8894,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le boutton::remplacer Remplacer - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig boutton::renouveller @@ -9027,10 +8935,6 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le suivant web/lightbox/feed_options_box.html.twig web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/setup/step2.html.twig @@ -9058,26 +8962,22 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Bridge/Flickr/actionelements.html.twig Bridge/Youtube/actioncontainers.html.twig Bridge/Youtube/actionelements.html.twig + web/prod/index.html.twig prod/results/entry.html.twig prod/results/feeds_entry.html.twig - web/prod/thesaurus.js.twig web/thesaurus/presets.html.twig boutton::telecharger Télécharger - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig boutton::telecharger tous les documents Tout télécharger web/lightbox/feed.html.twig - lightbox/IE6/feed.html.twig - lightbox/IE6/validate.html.twig web/lightbox/validate.html.twig @@ -9090,8 +8990,8 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le boutton::valider Valider Controller/Prod/LanguageController.php - mobile/lightbox/note_form.html.twig - web/account/account.html.twig + mobile/lightbox/note_form.html.twig + web/account/account.html.twig web/account/reset-email.html.twig admin/collection/collection.html.twig admin/collection/create.html.twig @@ -9101,8 +9001,6 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le web/admin/editusers.html.twig admin/publications/fiche.html.twig admin/publications/list.html.twig - admin/search-engine/phrasea.html.twig - admin/search-engine/sphinx-search.html.twig web/admin/setup.html.twig admin/statusbit/edit.html.twig web/admin/structure.html.twig @@ -9125,13 +9023,13 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Bridge/Youtube/video_deleteelement.html.twig Bridge/Youtube/video_modify.html.twig Bridge/Youtube/video_moveinto_playlist.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod/Baskets/Reorder.html.twig prod/Baskets/Update.html.twig - web/prod/index.html.twig + web/prod/index.html.twig prod/Story/Reorder.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig web/thesaurus/accept.html.twig web/thesaurus/export-text-dialog.html.twig web/thesaurus/export-topics-dialog.html.twig @@ -9226,8 +9124,8 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le chargement Chargement - web/prod/tab_thesaurus.html.twig - web/prod/tab_thesaurus.html.twig + web/prod/tab_thesaurus.html.twig + web/prod/tab_thesaurus.html.twig charger d'avantage de publications @@ -9245,7 +9143,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Choisir admin/collection/create.html.twig admin/databox/databox.html.twig - web/prod/index.html.twig + web/prod/index.html.twig classe @@ -9258,11 +9156,6 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Classe des sous-définitions web/admin/subdefs.html.twig - - client::recherche: dans les categories - Dans les catégories - lib/classes/queries.php - cocher tout Tout cocher @@ -9276,12 +9169,12 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le commande::deadline Date limite - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig commande::utilisation prevue Utilisation prévue - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig configuration @@ -9320,7 +9213,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le delete Supprimer - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig descendant @@ -9335,7 +9228,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le document documents - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php web/admin/subdefs.html.twig web/admin/subdefs.html.twig task-manager/task-editor/subdefs.html.twig @@ -9354,15 +9247,15 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le edit Editer - web/account/account.html.twig - web/account/account.html.twig - web/account/account.html.twig + web/account/account.html.twig + web/account/account.html.twig + web/account/account.html.twig prod/WorkZone/Macros.html.twig edit: chosiir limage du regroupement Définir comme image principale - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig edit:: Ajouter %s au champ courrant @@ -9387,7 +9280,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le edit::Certains champs doivent etre remplis pour valider cet editing Certains champs doivent être remplis pour valider - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig edit::certains documents possedent des champs requis non remplis. Merci de les remplir pour valider votre editing @@ -9397,7 +9290,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le edit::preset:: titre Nom du modèle - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig effacer (OK) ou quitter (Annuler) ? @@ -9414,27 +9307,22 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Adresse e-mail non valide eventsmanager/notify/downloadmailfail.php - - erreur : Vous n'avez pas les droits - Vous ne possédez pas des autorisations d'accès requises - prod/actions/collection_default.html.twig - export:: FTP FTP - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export:: commande Commander - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export:: envoi par mail E-Mail - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export:: erreur : aucun document selectionne @@ -9444,29 +9332,29 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le export:: telechargement Téléchargement - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::ftp: reglages manuels Réglages manuels - classes/set/export.php + classes/set/export.php export::mail: contenu du mail Texte - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::mail: destinataire A - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::mail: fichiers joint Fichier(s) joint(s) - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::titre: nom original du document @@ -9507,7 +9395,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le flash Flash - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php task-manager/task-editor/subdefs.html.twig @@ -9581,7 +9469,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le image images - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php task-manager/task-editor/subdefs.html.twig @@ -9633,13 +9521,12 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le lightbox::recaptitulatif Récapitulatif web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig web/lightbox/validate.html.twig login:: Changer mon adresse email Changer mon adresse e-mail - web/account/account.html.twig + web/account/account.html.twig login:: Envoyer a nouveau le mail de confirmation @@ -9654,7 +9541,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le login:: Mon compte Mon Compte - web/account/account.html.twig + web/account/account.html.twig web/common/menubar.html.twig @@ -9703,12 +9590,12 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le login::register: Faire une demande d'acces Faire une demande d'accès - web/account/access.html.twig + web/account/access.html.twig login::register: L'acces aux bases ci-dessous implique l'acceptation des Conditions Generales d'Utilisation (CGU) suivantes L'accès aux collections ci-dessous implique l'acceptation des Conditions Générales d'Utilisation suivantes - web/account/access.html.twig + web/account/access.html.twig login::register: email confirmation email Pour valider votre inscription a la base de donnees, merci de confirmer votre e-mail en suivant le lien ci-dessous. @@ -9809,7 +9696,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le no image selected Aucune image sélectionnée - actions/Tools/index.html.twig + actions/Tools/index.html.twig non @@ -9821,8 +9708,6 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le notice Notice web/lightbox/feed.html.twig - lightbox/IE6/feed.html.twig - lightbox/IE6/validate.html.twig web/lightbox/validate.html.twig @@ -9875,17 +9760,17 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le panier:: ordre Validation ascendante Mieux noté - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig panier:: ordre Validation descendante Moins noté - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig panier:: ordre du panier Ordre du panier - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig panier:: renommer le panier @@ -9975,7 +9860,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le phraseanet:: adresse Adresse - web/account/account.html.twig + web/account/account.html.twig admin/collection/collection.html.twig web/admin/connected-users.html.twig web/common/dialog_export.html.twig @@ -10046,17 +9931,17 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le phraseanet:: prereglages Préréglages - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig phraseanet:: presse-papier Presse-papier - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig phraseanet:: preview Prévisualisation - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod/actions/printer_default.html.twig @@ -10080,7 +9965,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le phraseanet:: thesaurus Thésaurus - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig web/prod/tab_headers.html.twig web/thesaurus/index.html.twig web/thesaurus/load-thesaurus.html.twig @@ -10095,15 +9980,15 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le phraseanet:: tri par date Tri par date - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig web/thesaurus/export-topics-dialog.html.twig phraseanet:: tri par nom Tri alphabétique - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig phraseanet:: user @@ -10126,26 +10011,26 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Chargement Controller/Prod/LanguageController.php admin/collection/suggested_value.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig web/thesaurus/thesaurus.html.twig phraseanet::erreur: La connection au serveur Phraseanet semble etre indisponible La connexion au serveur Phraseanet semble être indisponible. Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig phraseanet::erreur: Une erreur est survenue, si ce probleme persiste, contactez le support technique Une erreur est survenue, si le problème persiste, contactez le support technique Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig phraseanet::erreur: Votre session est fermee, veuillez vous re-authentifier Votre session a expiré. Veuillez vous ré-authentifier Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig web/thesaurus/thesaurus.html.twig @@ -10236,12 +10121,12 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le phraseanet::time:: a A - web/prod/index.html.twig + web/prod/index.html.twig phraseanet::time:: de De - web/prod/index.html.twig + web/prod/index.html.twig phraseanet::type:: audios @@ -10251,7 +10136,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le phraseanet::type:: documents Documents - web/prod/index.html.twig + web/prod/index.html.twig web/prod/toolbar.html.twig @@ -10262,7 +10147,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le phraseanet::type:: reportages Reportages - web/prod/index.html.twig + web/prod/index.html.twig phraseanet::type:: videos @@ -10303,24 +10188,24 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le preview:: Description Notice - web/prod/index.html.twig + web/prod/index.html.twig preview:: Historique Historique - web/prod/index.html.twig + web/prod/index.html.twig preview:: Popularite Popularité - web/prod/index.html.twig + web/prod/index.html.twig preview:: arreter le diaporama Arrêter prod/preview/basket_train.html.twig prod/preview/feed_train.html.twig - prod/preview/reg_train.html.twig + prod/preview/reg_train.html.twig prod/preview/result_train.html.twig prod/preview/result_train_options.html.twig @@ -10329,7 +10214,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le Diaporama prod/preview/basket_train.html.twig prod/preview/feed_train.html.twig - prod/preview/reg_train.html.twig + prod/preview/reg_train.html.twig prod/preview/result_train.html.twig prod/preview/result_train_options.html.twig @@ -10395,28 +10280,28 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le processing En cours... - actions/Tools/index.html.twig + actions/Tools/index.html.twig prod::Les enregistrements ne provienent pas tous de la meme base et ne peuvent donc etre traites ensemble Cette action n'est pas possible, les documents sélectionnés proviennent de bases différentes. - prod/actions/collection_default.html.twig + Controller/Prod/MoveCollectionController.php actions/Property/index.html.twig prod::Vous n'avez le droit d'effectuer l'operation sur aucun document Vous ne possédez pas les autorisations d'accès requises sur les documents pour effectuer cette action. - prod/actions/collection_default.html.twig + Controller/Prod/MoveCollectionController.php prod::collection deplacer egalement les documents rattaches a ce(s) regroupement(s) Déplacer également les documents de ces reportages ? - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig prod::edit: Impossible d'editer simultanement des documents provenant de bases differentes Impossible d'éditer simultanément des documents provenant de bases différentes - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing valeurs heterogenes, choisir 'remplacer', 'ajouter' ou 'annuler' @@ -10426,32 +10311,32 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le prod::editing: %not_actionable% documents ne peuvent etre edites car vos droits sont induffisants %not_actionable% document(s) éditables, vous ne disposez pas des autorisations nécessaires - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: 1 document ne peut etre edite car vos droits sont induffisants Vous ne possédez pas les autorisations d'accès requises pour éditer 1 document - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: aucun documents ne peuvent etre edites car vos droits sont induffisants Aucun document ne peut être édité car vous ne disposez pas des autorisations nécessaires - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: modeles de fiches Modèles - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: rechercher-remplacer Rechercher / Remplacer - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: valider ou annuler les modifications Valider ou annuler les modifications - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing::annulation: abandonner les modification ? @@ -10461,67 +10346,67 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le prod::editing::fields: status Status - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing::replace: remplacer dans le champ Remplacer dans le champ - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing::replace: remplacer dans tous les champs Remplacer dans tous les champs - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:indexation en cours Indexation en cours - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace: chaine remplacante Remplacer par - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace: options de remplacement Options - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option : utiliser une expression reguliere Expression régulière - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option la valeur du cahmp doit etre exacte Champ complet - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option la valeur est comprise dans le champ Contenu dans le champ - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option respecter la casse Respecter la casse - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option: remplacer toutes les occurences Remplacer tout - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option: rester insensible a la casse Insensible à la casse - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:replace: chaine a rechercher Rechercher - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::facet:base_label @@ -10551,12 +10436,12 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le prod::thesaurusTab:cmenu:Accepter en %lng_code% Accepter en %lng_code% - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:cmenu:Remplacer par... Remplacer par - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:%number% record(s) updated @@ -10566,52 +10451,52 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le prod::thesaurusTab:dlg:Acceptation en cours. Acceptation... - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:Remplacement du candidat "%(from)s" par "%(to)s" Remplacer le terme candidat "%(from)s" par "%(to)s" ? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:Remplacement en cours. Remplacement... - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:Suppression en cours. Suppression... - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:accepter le terme candidat "%s" ? Accepter le terme candidat "%s" ? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:accepter les %d termes candidats ? Accepter les %d termes candidats ? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:remplacer le terme "%s" des fiches par : Remplacer dans les notices le terme "%s" par : - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:remplacer les %d termes des fiches par : Remplacer les "%d" termes des fiches par - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:supprimer le terme "%s" des fiches ? Supprimer des notices le terme "%s" ? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:supprimer les %d termes des fiches ? Supprimer les %d termes des fiches ? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:too many (%number%) records to update (limit=%maximum%) @@ -10626,18 +10511,17 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le prod::thesaurusTab:tmenu:Accepter comme synonyme Accepter comme synonyme - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:tmenu:Accepter comme terme specifique Accepter comme terme spécifique - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:tree:loading Chargement... - web/prod/thesaurus.js.twig - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:wizard:accepter le terme candidat @@ -10647,12 +10531,12 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le prod::thesaurusTab:wizard:clic-droit / accepter le terme candidat "%s" Accepter le terme candidat "%s" - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:wizard:clic-droit / accepter les %s termes candidats Accepter les %s termes candidats - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:wizard:remplacer par le terme @@ -10675,26 +10559,26 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le publication : autheur Auteur - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication : email autheur Adresse e-mail de l'auteur - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication : sous titre Sous-titre - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication : titre Titre de la publication - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication::Voici votre fil RSS personnel. Il vous permettra d'etre tenu au courrant des publications. @@ -10738,12 +10622,12 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le raccourci :: a propos des raccourcis claviers A propos des raccourcis clavier - web/prod/index.html.twig + web/prod/index.html.twig raccourcis :: ne plus montrer cette aide Ne plus montrer cette aide - web/prod/index.html.twig + web/prod/index.html.twig rafraichir @@ -10757,7 +10641,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le rechercher dans tous les champs Tous les champs - web/prod/index.html.twig + web/prod/index.html.twig recordtype @@ -10787,17 +10671,17 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le reponses:: images par pages : Résultats par page - web/prod/index.html.twig + web/prod/index.html.twig reponses:: mode liste Liste - web/prod/index.html.twig + web/prod/index.html.twig reponses:: mode vignettes Vignettes - web/prod/index.html.twig + web/prod/index.html.twig reponses:: partager @@ -10817,12 +10701,12 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le reponses:: taille des images : Taille des vignettes - web/prod/index.html.twig + web/prod/index.html.twig reponses::document sans titre Sans titre - classes/record/adapter.php + classes/record/adapter.php report :: aucun resultat trouve @@ -10910,7 +10794,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le web/report/ajax_dashboard_content_child.html.twig web/report/ajax_data_content.html.twig web/report/ajax_data_content.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig web/report/chart.html.twig web/report/chart.html.twig web/report/report_layout.html.twig @@ -10957,7 +10841,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le report:: Heures Heures - web/report/all_content.html.twig + web/report/all_content.html.twig report:: IP @@ -11175,7 +11059,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le report:: jour Jour Controller/Report/ActivityController.php - web/report/all_content.html.twig + web/report/all_content.html.twig report:: module @@ -11267,7 +11151,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le report:: page d'accueil Accueil - classes/record/preview.php + classes/record/preview.php report:: par %user_infos% @@ -11514,7 +11398,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le report:: visualiseur cooliris Visualiseur Cooliris - classes/record/preview.php + classes/record/preview.php report::Changement de collection vers : %coll_name% @@ -11550,7 +11434,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le report::Heures Heures web/report/ajax_data_content.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig report::Impression des formats : %format% @@ -11565,17 +11449,17 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le report::Nombre de connexions Nombre de connexions - web/report/all_content.html.twig + web/report/all_content.html.twig report::Nombre de document ajoute Nombre de documents ajoutés - web/report/all_content.html.twig + web/report/all_content.html.twig report::Nombre de document edite Nombre de documents édités - web/report/all_content.html.twig + web/report/all_content.html.twig report::Publication de %dest% @@ -11600,9 +11484,9 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le report::acces direct Accès direct - classes/record/preview.php - classes/record/preview.php - classes/record/preview.php + classes/record/preview.php + classes/record/preview.php + classes/record/preview.php report::activite @@ -11656,13 +11540,13 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le reportage Reportage - Phrasea/Twig/PhraseanetExtension.php - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php resultat numero %number% résultat numéro %number% - classes/record/preview.php + classes/record/preview.php retourne "automobile", "automate", "autoroute", ... @@ -12563,7 +12447,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le thumbnail validation Validation de la vignette - actions/Tools/index.html.twig + actions/Tools/index.html.twig to @@ -12641,21 +12525,19 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le validation:: NON Non - mobile/lightbox/basket_element.html.twig + mobile/lightbox/basket_element.html.twig web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig validation:: OUI Oui - mobile/lightbox/basket_element.html.twig + mobile/lightbox/basket_element.html.twig web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig validation:: editer ma note Modifier mon annotation - mobile/lightbox/basket_element.html.twig + mobile/lightbox/basket_element.html.twig validation:: note @@ -12670,12 +12552,10 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le validation::envoyer mon rapport Envoyer mon rapport - mobile/lightbox/validate.html.twig - mobile/lightbox/validate.html.twig + mobile/lightbox/validate.html.twig + mobile/lightbox/validate.html.twig web/lightbox/basket_options.html.twig web/lightbox/basket_options.html.twig - lightbox/IE6/basket_options.html.twig - lightbox/IE6/basket_options.html.twig version @@ -12685,7 +12565,7 @@ Si vous recevez cet e-mail sans l'avoir sollicité, merci de l'ignorer ou de le veuillez choisir au minimum une collection Veuillez choisir au moins une collection - web/report/all_content.html.twig + web/report/all_content.html.twig video diff --git a/resources/locales/messages.nl.xlf b/resources/locales/messages.nl.xlf index dde93ed97e..20d0297a09 100644 --- a/resources/locales/messages.nl.xlf +++ b/resources/locales/messages.nl.xlf @@ -1,6 +1,6 @@ - +
          The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -39,16 +39,14 @@ %basket_length% documents %basket_length% documenten - mobile/lightbox/validate.html.twig - lightbox/IE6/index.html.twig - lightbox/IE6/index.html.twig + mobile/lightbox/validate.html.twig web/lightbox/index.html.twig web/lightbox/index.html.twig %countable% documents can not be modified. %countable% documenten kunnen niet worden aangepast. - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig %d collection selected @@ -73,22 +71,22 @@ %docs_not_orderable% documents ne peuvent pas etre commandes %docs_not_orderable% documenten kunnen niet worden besteld - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig %docs_orderable% documents commandes %docs_orderable% documenten besteld - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig %entry_length% documents %entry_length% documenten - mobile/lightbox/feed.html.twig + mobile/lightbox/feed.html.twig %length% peoples %length% personen - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig actions/Feedback/ListsMacros.html.twig @@ -317,19 +315,16 @@ (validation) a envoyer te versturen - lightbox/IE6/index.html.twig web/lightbox/index.html.twig (validation) envoyee verstuurd - lightbox/IE6/index.html.twig web/lightbox/index.html.twig (validation) session terminee sessie beïndigd - lightbox/IE6/index.html.twig web/lightbox/index.html.twig @@ -408,7 +403,7 @@ A field value contains an invalid character Een veld bevat een ongeldig teken - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A file has been thrown to the quarantine. @@ -438,7 +433,7 @@ A required field is missing or has an empty value Een verplicht veld ontbreekt of heeft geen waarde - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A task has been created, please run it to complete empty collection @@ -458,17 +453,17 @@ A value does not match an expected format Een waarde voldoet niet aan het verwachte formaat - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A value exceeds the maximum allowable length Een waarde overschrijdt de maximum toegelaten lengte - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php A value has been deprecated and is no longer valid Een waarde is verouderd en niet langer meer geldig - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php API Webhook @@ -524,7 +519,7 @@ Access to the above bases constitutes acceptance of the following Terms of Use (TOU). Access to the above bases constitutes acceptance of the following Terms of Use (TOU). - web/account/access.html.twig + web/account/access.html.twig Access user have readonly access @@ -561,7 +556,7 @@ Accuse de reception indisponible, vous n'avez pas declare d'adresse email Ontvangstbevestiging niet beschikbaar is, u hebt geen emailadres opgegeven - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Action Forbidden : You are not the publisher @@ -581,7 +576,7 @@ Activate highlight Activate highlight - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Active @@ -608,7 +603,7 @@ Activite Activiteit - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Add @@ -626,6 +621,11 @@ admin/fields/templates.html.twig admin/fields/templates.html.twig + + Add a position + Add a position + Controller/Prod/LanguageController.php + Add an admin Voeg een beheerder toe @@ -659,12 +659,12 @@ Adresse email du nouvel utilisateur Email adres van de nieuwe gebruiker - web/admin/index.html.twig + web/admin/index.html.twig Advanced Search Geavanceerd zoeken - web/prod/index.html.twig + web/prod/index.html.twig Advanced field parameters @@ -674,37 +674,37 @@ Affichage Tonen - web/prod/index.html.twig + web/prod/index.html.twig Affichage au demarrage Tonen bij opstart - web/prod/index.html.twig + web/prod/index.html.twig Afficher la fiche descriptive De beschrijvingsfiche tonen - web/prod/index.html.twig + web/prod/index.html.twig Afficher le titre De titel tonen - web/prod/index.html.twig + web/prod/index.html.twig Afficher les status De statussen tonen - web/prod/index.html.twig + web/prod/index.html.twig Afficher une icone Pictogram tonen - web/prod/index.html.twig + web/prod/index.html.twig After metadata After metadata - web/prod/index.html.twig + web/prod/index.html.twig Aggregation @@ -714,12 +714,12 @@ Aide Help - web/prod/index.html.twig + web/prod/index.html.twig Aide sur les expressions regulieres Help over reguliere expressies - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Ajouter a @@ -737,7 +737,7 @@ Ajouter un nouvel utilisateur Voeg een nieuwe gebruiker toe - web/admin/index.html.twig + web/admin/index.html.twig Ajouter un publisher @@ -752,11 +752,11 @@ All Alle - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + actions/Feedback/list.html.twig WorkZone/Browser/Browser.html.twig @@ -861,8 +861,7 @@ Controller/Admin/DataboxesController.php Controller/Prod/BasketController.php Controller/Prod/LazaretController.php - Controller/Prod/MoveCollectionController.php - Controller/Prod/OrderController.php + Controller/Prod/MoveCollectionController.php Controller/Prod/StoryController.php Controller/Prod/ToolsController.php Model/Manipulator/LazaretManipulator.php @@ -877,12 +876,12 @@ An error occured while denying, please retry or contact an admin if problem persists Er heeft zich een fout voorgedaan tijdens het weigeren, gelieve opnieuw te proberen of contact op te nemen met een beheerder als het probleem blijft bestaan - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php An error occured while sending, please retry or contact an admin if problem persists Er heeft zich een fout voorgedaan tijdens het versturen, gelieve opnieuw te proberen of contact op te nemen met een beheerder als het probleem blijft bestaan - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php An error occured while upload the file. Please retry @@ -910,9 +909,10 @@ Er is een fout opgetreden Controller/Admin/CollectionController.php Controller/Admin/DataboxController.php - Controller/Api/V1Controller.php - Controller/Api/V1Controller.php + Controller/Api/V1Controller.php + Controller/Api/V1Controller.php Controller/Prod/BasketController.php + Order/Controller/ProdOrderController.php web/admin/statusbit.html.twig @@ -948,7 +948,7 @@ Apparait aussi dans ces paniers Word ook in deze mandjes weergegeven - prod/preview/appears_in.html.twig + prod/preview/appears_in.html.twig Apparait aussi dans ces reportages @@ -1020,7 +1020,7 @@ Apply template Pas de template toe - web/admin/index.html.twig + web/admin/index.html.twig Apply to all selected documents @@ -1030,7 +1030,7 @@ Archive Archief - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig Are you sure you want delete users rights ? @@ -1062,7 +1062,7 @@ Attention Let op! Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig prod/results/help.html.twig @@ -1098,7 +1098,7 @@ Aucun statut editable Geen enkele bewerkbare status - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Aucune @@ -1138,7 +1138,7 @@ Audio Audio - web/prod/index.html.twig + web/prod/index.html.twig Audio Birate @@ -1245,8 +1245,8 @@ Back Terug - mobile/lightbox/index.html.twig - mobile/lightbox/validate.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/validate.html.twig Back to Feedback @@ -1326,7 +1326,7 @@ Basket is not found Basket is not found - Model/Repositories/BasketRepository.php + Model/Repositories/BasketRepository.php Basket updated @@ -1361,8 +1361,8 @@ Browse Baskets Mandjes doorbladeren - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Browser @@ -1377,10 +1377,10 @@ By checking this box, you accept %beginning_link% Terms of Use %end_link% Door deze optie aan te klikken aanvaardt u %beginning_link% Gebruiksvoorwaarden %end_link% - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig By default it is available for admins @@ -1390,7 +1390,7 @@ By field By field - web/prod/index.html.twig + web/prod/index.html.twig C dans l'air @@ -1415,6 +1415,7 @@ Cancel Annuleren + Controller/Prod/LanguageController.php admin/fields/templates.html.twig task-manager/task-editor/task.html.twig user/import/view.html.twig @@ -1469,7 +1470,7 @@ Ce champ est decrit comme un element DublinCore Dit veld is beschreven als een DublinCore element - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Ce champ est en lecture seule @@ -1484,14 +1485,14 @@ Ce champ est obligatoire Dit veld is verplicht - Bridge/Api/Dailymotion.php - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Ce champ est relie a une branche de thesaurus @@ -1506,18 +1507,18 @@ Ce champ est trop court %length% caracteres min Ce champ est trop court %length% caracteres min - Bridge/Api/Dailymotion.php - Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php Ce champ est trop long %length% caracteres max Ce champ est trop long %length% caracteres max - Bridge/Api/Dailymotion.php - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Ce champ est utilise en titre a l'affichage @@ -1552,7 +1553,7 @@ Certains champs sont obligatoires, veuillez les remplir Sommige velden zijn verplicht, wilt u ze invullen - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Ces informations sont directement fournies par la norme de metadonnees de ce champ : %norm_name% @@ -1577,12 +1578,7 @@ Chargement Laden - web/prod/index.html.twig - - - Charset to use for indexation - Te gebruiken karakterset voor de indexatie - admin/search-engine/sphinx-search.html.twig + web/prod/index.html.twig Chercher @@ -1616,7 +1612,7 @@ Civility Beleefdheid - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Clear @@ -1648,7 +1644,7 @@ Cocher toute la colonne Verberg de hele kolom - web/admin/index.html.twig + web/admin/index.html.twig Cochez les cases correspondantes aux colonnes que vous desirez voire apparaitre dans le report @@ -1707,7 +1703,7 @@ Commande du %date% Commande du %date% - Controller/Prod/OrderController.php + Phrasea/Order/OrderBasketProvider.php Commandes @@ -1717,7 +1713,7 @@ Company Bedrijf - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig actions/Feedback/ListsMacros.html.twig prod/User/Add.html.twig @@ -1752,7 +1748,7 @@ Configuration Configuratie - web/prod/index.html.twig + web/prod/index.html.twig Confirm new email address @@ -1762,7 +1758,7 @@ Confirm reset users rights before applying template Bevestig reset van de gebruikersrechten alvorens de template toe te passen - web/admin/index.html.twig + web/admin/index.html.twig Confirmation de votre mot de passe @@ -1858,12 +1854,12 @@ Couleur de selection Kleur van de selectie - web/prod/index.html.twig + web/prod/index.html.twig Country Land - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig actions/Feedback/ListsMacros.html.twig @@ -1871,6 +1867,11 @@ Maak manueel een gebruiker web/login/register.html.twig + + Create index + Create index + SearchEngine/Elastic/ElasticsearchSettingsFormType.php + Create new subdef Maak nieuwe thumbnail @@ -1921,17 +1922,17 @@ Creer un model Maak een model - web/admin/index.html.twig + web/admin/index.html.twig Creer un modele Maak een model - web/admin/index.html.twig + web/admin/index.html.twig Creer un utilisateur Maak een gebruiker - web/admin/index.html.twig + web/admin/index.html.twig Creer une nouvelle applications @@ -1962,7 +1963,7 @@ Current operations cannot be executed because the site is temporarily in maintenance mode. Wait a few minutes and try your request again De bewerkingen kunnen niet uitgevoerd worden doordat de site in onderhoudsmodus is. Wacht een paar minuten en probeer het opnieuw. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Current password @@ -2039,7 +2040,7 @@ Date Added Date Added - web/prod/index.html.twig + web/prod/index.html.twig Date Creation @@ -2061,11 +2062,6 @@ Datum van de aanvraag prod/orders/order_box.html.twig - - Date fields available for search - Datum velden zijn beschikbaar bij het zoeken - admin/search-engine/sphinx-search.html.twig - De De @@ -2086,12 +2082,12 @@ Decocher toute la colonne Toon de hele kolom - web/admin/index.html.twig + web/admin/index.html.twig Deconnexion Log out - mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig Decouvrez la documentation @@ -2128,11 +2124,6 @@ Standaard gezocht type Form/Configuration/SearchEngineFormType.php - - Default sort - Standaard sortering - admin/search-engine/phrasea.html.twig - Default validation links duration Standaard tijd voor de validatie links @@ -2164,7 +2155,7 @@ admin/task-manager/index.html.twig admin/task-manager/templates.html.twig prod/actions/delete_records_confirm.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig prod/upload/lazaret.html.twig prod/upload/lazaret.html.twig @@ -2298,7 +2289,7 @@ Display technical data Display technical data - web/prod/index.html.twig + web/prod/index.html.twig Display thumbnails @@ -2308,7 +2299,7 @@ Do not display Do not display - web/prod/index.html.twig + web/prod/index.html.twig Do not forget to restart the tasks scheduler @@ -2333,14 +2324,15 @@ Do you want to send your report ? Wenst u uw rapport te sturen ? - Phrasea/Controller/LightboxController.php - mobile/lightbox/validate.html.twig - web/lightbox/validate.html.twig + Phrasea/Controller/LightboxController.php + mobile/lightbox/validate.html.twig + mobile/lightbox/validate.html.twig + web/lightbox/validate.html.twig Document Document - web/prod/index.html.twig + web/prod/index.html.twig Document Type Sharing @@ -2375,10 +2367,10 @@ Documents indisponibles Documenten niet beschikbaar - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Don't worry, You can modify your configuration later @@ -2395,11 +2387,21 @@ Download van documenten actions/Download/prepare.html.twig + + Drag and drop the pin to move position + Drag and drop the pin to move position + Controller/Prod/LanguageController.php + Droits Rechten web/admin/editusers_quotas.html.twig + + Drop index + Drop index + SearchEngine/Elastic/ElasticsearchSettingsFormType.php + Duree Duur @@ -2436,12 +2438,17 @@ Wijzigen admin/task-manager/index.html.twig admin/task-manager/templates.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig + + + Edit position + Edit position + Controller/Prod/LanguageController.php Editer Editer - actions/publish/publish_edit.html.twig + actions/publish/publish_edit.html.twig Edition @@ -2468,7 +2475,7 @@ Edition impossible Kan niet worden bewerkt - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Editor @@ -2592,8 +2599,8 @@ En cours d'encodage Bezig met coderen - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php actions/Bridge/records_list.html.twig @@ -2656,11 +2663,6 @@ Enable possibility to notify users when publishing a new feed entry Form/Configuration/ActionsFormType.php - - Enable stemming - Sta stoppen toe - admin/search-engine/phrasea.html.twig - Enable thesaurus Maak de thesaurus actief @@ -2700,7 +2702,7 @@ Entrez plusieurs adresses email en les separant par des points-virgules Geef meerdere email adressen op door ze te scheiden met een punt coma - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Entry removed from list @@ -2720,7 +2722,7 @@ Envoie avec succes Met succes verstuurd - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php Erreur @@ -2741,12 +2743,12 @@ Erreur YouTube a rencontré une erreur lors du traitement de la requête. Fout Youtube geeft een fout gemeld bij het verwerken van de aanvraag. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur d'encodage Fout bij het coderen - Bridge/Api/Dailymotion.php + Bridge/Api/Dailymotion.php Erreur de login / mot de passe @@ -2756,32 +2758,32 @@ Erreur la requête a été mal formée ou contenait des données valides. Fout het verzoek was slecht gevraagd of bevatte geen geldige gegevens. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur la ressource que vous tentez de modifier n'existe pas. Fout de hulpbron die u probeert te veranderen, bestaat niet. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur le service Youtube n'est pas accessible pour le moment. Veuillez réessayer plus tard. Fout Youtube is momenteel niet bereikbaar. Gelieve later eens opnieuw te proberen. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur lors de l'authentification au service Youtube, Veuillez vous déconnecter, puis vous reconnecter. Fout door de authenticatie bij Youtube, gelieve eerst te uit te loggen en dan opnieuw in te loggen - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur lors de l'envoi de la requête. Erreur d'authentification. Fout bij het verzenden van uw verzoek. Authenticatie fout. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Erreur lors de la mise a jour des donnes Fouten bij de update van de gegevens - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php Erreur lors de la tentative ; errreur : %message% @@ -2793,7 +2795,7 @@ Erreur lors de votre authentification Fout bij uw authenticatie - actions/Bridge/callback.html.twig + actions/Bridge/callback.html.twig Erreur lors du contact avec le serveur WEB @@ -2803,7 +2805,7 @@ Erreur vous avez essayé d'exécuter une requête non prise en charge par Youtube Fout u hebt geprobeerd een aanvraag te verwerken die niet toegestaan is door Youtube - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Error while connecting to FTP @@ -2890,7 +2892,7 @@ FTP FTP - web/account/account.html.twig + web/account/account.html.twig FTP Export @@ -2934,7 +2936,7 @@ Field %name% could not be created, please try again or contact an admin. Field %name% could not be created, please try again or contact an admin. - Controller/Admin/FieldsController.php + Controller/Admin/FieldsController.php Field %name% could not be saved, please try again or contact an admin. @@ -3007,8 +3009,8 @@ Fils disponibles Beschikbare paden - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig Filter @@ -3046,7 +3048,7 @@ Flash Flash web/common/technical_datas.html.twig - web/prod/index.html.twig + web/prod/index.html.twig Flatten layers @@ -3166,6 +3168,11 @@ Generates an image Media/Subdef/Image.php + + Geo Search + Geo Search + web/prod/index.html.twig + Geonames server address Geonames server adres @@ -3214,7 +3221,7 @@ Graphiste (preview au rollover) Graficus (preview au rollover) - web/prod/index.html.twig + web/prod/index.html.twig Great @@ -3250,7 +3257,7 @@ Guest, you must be authenticated to have the right to download. Guest, you must be authenticated to have the right to download. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig HD Download @@ -3266,7 +3273,7 @@ Help Help - login/layout/base-layout.html.twig + login/layout/base-layout.html.twig Hi, Please log in @@ -3281,10 +3288,10 @@ Home Startpagina - mobile/lightbox/feed.html.twig - mobile/lightbox/validate.html.twig + mobile/lightbox/feed.html.twig + mobile/lightbox/validate.html.twig login/include/language-block.html.twig - login/layout/base-layout.html.twig + login/layout/base-layout.html.twig Homepage slideshow @@ -3315,7 +3322,7 @@ Iconographe (description au rollover) Iconographe (beschrijving bij de rollover) - web/prod/index.html.twig + web/prod/index.html.twig Id @@ -3360,7 +3367,7 @@ Image Beeld - web/prod/index.html.twig + web/prod/index.html.twig ImageMagick @@ -3385,14 +3392,14 @@ In the answer grid In the answer grid - web/prod/index.html.twig + web/prod/index.html.twig Include Business-fields in caption Business-fields opnemen in caption - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Incorrect please try again @@ -3424,7 +3431,7 @@ Informations personnelles Persoonlijke informaties - web/account/account.html.twig + web/account/account.html.twig Infos @@ -3447,16 +3454,6 @@ Installatie is momenteel bezig, gelieve te wachten... web/setup/step2.html.twig - - Installer Google Chrome - Installeer Google Chrome - login/layout/base-layout.html.twig - - - Installer Google Chrome Frame - Installeer Google Chrome Frame - login/layout/base-layout.html.twig - Invalid captcha answer. Ongeldig captcha antwoord @@ -3505,7 +3502,7 @@ Invalid target collection Ongeldige doel collectie - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php Invalid unlock link. @@ -3548,7 +3545,7 @@ L'upload a echoue De upload is mislukt Bridge/Api/Flickr.php - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php L'upload concernant le record %title% sur le compte %bridge_name% a echoue pour les raisons suivantes : %reason% @@ -3558,17 +3555,17 @@ L'utilisateur approuve ce document De gebruiker keurt dit document goed - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig L'utilisateur desapprouve ce document De gebruiker keurt dit document af - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig L'utilisateur n'a pas encore donne son avis sur ce document De gebruiker heeft nog zijn mening niet gegeven over dit document - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig LAST 20 @@ -3588,27 +3585,27 @@ La sous resolution n'est pas disponible pour les documents suivants De onder resolutie is niet beschikbaar voor de volgende documenten - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig La taille maximale d'une video est de %duration% minutes. La taille maximale d'une video est de %duration% minutes. - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php La video a ete rejetee De video werd verworpen - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php La video a ete supprimee De video werd verwijderd Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php La video est restreinte @@ -3699,16 +3696,16 @@ Le poids maximum d'un fichier est de %size% Le poids maximum d'un fichier est de %size% - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php Le record n'a pas de fichier physique Het record heeft geen fisieke documenten - Bridge/Api/Dailymotion.php - Bridge/Api/Flickr.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Flickr.php + Bridge/Api/Youtube.php Le token n'a pas encore ete genere @@ -3723,8 +3720,8 @@ Les documents ne peuvent pas etre exportes De documenten kunnen niet worden geëxporteerd - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Les elements ne peuvent etre uploades (problemes de type ou de droit) @@ -3756,12 +3753,12 @@ Les status de certains documents ne sont pas accessibles par manque de droits De status van bepaalde documenten is niet toegestaan omwille van gebrek aan rechten. - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig Les termes apparaissent dans le(s) champs De termen verschijnen in de veld(en) - web/prod/index.html.twig + web/prod/index.html.twig Light Value @@ -3837,12 +3834,6 @@ Live zoeken admin/fields/templates.html.twig - - Loading - Bezig met laden - actions/Bridge/index.html.twig - actions/Property/index.html.twig - Loading database documentary structure ... Documentatie databasestructuur laden ... @@ -3894,7 +3885,7 @@ Ma derniere question Mijn laatste vraag - web/prod/index.html.twig + web/prod/index.html.twig Mail line %line% is empty @@ -3987,11 +3978,6 @@ Automatishe melding van Phraseanet templates/web/email-template.html.twig - - Mettez à jour votre navigateur ou téléchargez un navigateur plus récent. - Vernieuw uw browser of download een meer recentere browser. - login/layout/base-layout.html.twig - Mettre a jour Update @@ -4036,7 +4022,7 @@ Missing target collection Doel collectie bestaat niet - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php Missing tests parameter @@ -4051,7 +4037,7 @@ Mode de presentation Presentatie mode - web/prod/index.html.twig + web/prod/index.html.twig Modele de donnees @@ -4087,12 +4073,12 @@ Move %countable% records to the chosen collection in the list. Verplaats %countable% records naar de gekozen collectie in de lijst. - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig Move one record to the chosen collection in the list. Verplaats één record naar de gekozen collectie in de lijst. - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig Moves records @@ -4177,7 +4163,7 @@ No URL available Geen URL beschikbaar - prod/Share/record.html.twig + prod/Share/record.html.twig No account yet? @@ -4207,7 +4193,7 @@ No document selected Geen document geselecteerd - prod/actions/delete_records_confirm.html.twig + prod/actions/delete_records_confirm.html.twig No elements to push @@ -4278,7 +4264,7 @@ Nom du nouveau modele Naam van het nieuwe model - web/admin/index.html.twig + web/admin/index.html.twig Nom du nouveau panier @@ -4336,7 +4322,7 @@ Notification par email Melding via email - web/account/account.html.twig + web/account/account.html.twig Notifications @@ -4348,11 +4334,6 @@ Algemene meldingen classes/eventsmanager/broker.php - - Notify - Verwittig - actions/Feedback/List-Share.html.twig - Notify third party application when an event occurs in Phraseanet Notify third party application when an event occurs in Phraseanet @@ -4361,7 +4342,7 @@ Notify users about this publication Meld gebruikers over deze publicatie - actions/publish/publish.html.twig + actions/publish/publish.html.twig Nous vous rappelons qu'il est de votre responsabilité de vous assurer que le contenu de la vidéo que vous allez mettre en ligne est conforme aux conditions d'utilisations @@ -4401,12 +4382,12 @@ Number of replicas Number of replicas - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Number of shards Number of shards - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Number of threads to use for FFMpeg @@ -4416,8 +4397,8 @@ OK OK - Bridge/Api/Dailymotion.php - Bridge/Api/Youtube.php + Bridge/Api/Dailymotion.php + Bridge/Api/Youtube.php Ok @@ -4427,7 +4408,7 @@ One document can not be modified. Eén document kan niet worden aangepast. - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig Only %nbEditableDocuments% records can be modified. @@ -4459,14 +4440,14 @@ Order has been denied Bestelling werd geweigerd - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php prod/orders/order_box.html.twig prod/orders/order_item.html.twig Order has been sent Bestelling is verstuurd - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php prod/orders/order_box.html.twig prod/orders/order_item.html.twig @@ -4521,17 +4502,15 @@ Paniers Mandjes - mobile/lightbox/index.html.twig - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig - lightbox/IE6/validate.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig web/lightbox/validate.html.twig Par %author% Per %author% - mobile/lightbox/feed.html.twig + mobile/lightbox/feed.html.twig prod/results/entry.html.twig prod/results/feeds_entry.html.twig @@ -4540,7 +4519,7 @@ Wachtwoord Form/Login/PhraseaAuthenticationForm.php Form/Login/PhraseaRegisterForm.php - web/account/account.html.twig + web/account/account.html.twig Password (confirmation) @@ -4585,19 +4564,14 @@ Photos Foto's - Bridge/Api/Flickr.php + Bridge/Api/Flickr.php Photosets Fotosets - Bridge/Api/Flickr.php + Bridge/Api/Flickr.php Bridge/Flickr/actionelements.html.twig - - Phrasea search-engine configuration - Phrasea zoekmotor configuratie - admin/search-engine/phrasea.html.twig - Phraseanet DataBoxes are MySQL databases, queryable by Phraseanet ApplicationBox. Phraseanet DataBoxes zijn MySQL databases, queryable door Phraseanet ApplicationBox. @@ -4738,7 +4712,7 @@ Position Functie - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Pour davantage d'informations, consulter le lien suivant %lien% @@ -4759,10 +4733,9 @@ Preferences Voorkeuren - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Prefix for notification emails @@ -4777,12 +4750,12 @@ Presentation de vignettes Presentatie van de thumbnails - web/prod/index.html.twig + web/prod/index.html.twig Presentation de vignettes de panier Presentatie van de thumbnails in het mandje - web/prod/index.html.twig + web/prod/index.html.twig Previous @@ -4831,12 +4804,12 @@ admin/publications/wrapper.html.twig web/admin/tree.html.twig web/common/menubar.html.twig - web/prod/index.html.twig + web/prod/index.html.twig Publier Publier - actions/publish/publish.html.twig + actions/publish/publish.html.twig Publique @@ -4853,7 +4826,7 @@ Push Push Controller/Prod/LanguageController.php - eventsmanager/notify/push.php + eventsmanager/notify/push.php Push configuration @@ -4869,41 +4842,41 @@ Push::filter on companies filter op bedrijven web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on countries filter op landen web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on emails filter op emails web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on login filter bij login web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on name filter op naam - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter on templates filter op templates - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::filter starts filter starts web/admin/users.html.twig - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Push::une validation est une demande d'appreciation a d'autres personnes @@ -4939,90 +4912,90 @@ Raccourcis claviers de la zone des paniers : Sneltoetsen in de mandjes zone : - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis claviers en cours de editing : Sneltoetsen tijdens het bewerken : - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis claviers en cours de preview : Sneltoetsen tijdens de voorvertoning : - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis claviers en cours de recherche : Sneltoetsen tijdens het zoeken : - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis:: ctrl-a : tout selectionner ctrl-a : alles selecteren - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Raccourcis:: ctrl-e : editer la selection ctrl-e : bewerk de selectie - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Raccourcis:: ctrl-p : imprimer la selection ctrl-p : print de selectie - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::espace : arreter/demarrer le diaporama espace : start/stop de slideshow - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche bas : scroll vertical pijl onder : verticale scroll - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche droite : page suivante pijl rechts : volgende pagina - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche gauche : en arriere pijl links : achterwaarts - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche gauche : en avant pijl rechts : voorwaarts - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche gauche : page precedente pijl links : vorige pagina - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::fleche haut : scroll vertical pijl boven : verticale scroll - web/prod/index.html.twig + web/prod/index.html.twig Raccourcis::tab/shift-tab se ballade dans les champs tab/shift-tab verspringt tussen de velden - web/prod/index.html.twig + web/prod/index.html.twig Rappel : Il vous reste %number% jours pour valider %title% de %user% Rappel : Il vous reste %number% jours pour valider %title% de %user% - eventsmanager/notify/validationreminder.php + eventsmanager/notify/validationreminder.php Rappel pour une demande de validation Aanmaning voor een goedkeuringsaanvraag - eventsmanager/notify/validationreminder.php + eventsmanager/notify/validationreminder.php Rapport de Validation @@ -5033,7 +5006,7 @@ Re-initialiser Herinitialiseren prod/Baskets/Reorder.html.twig - web/prod/index.html.twig + web/prod/index.html.twig prod/Story/Reorder.html.twig @@ -5041,10 +5014,10 @@ Hersorteren prod/Baskets/Reorder.html.twig prod/Story/Reorder.html.twig - prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig Read-only @@ -5064,7 +5037,7 @@ Receive notification when I receive a push Ontvang een mededeling wanneer ik een pus ontvang - eventsmanager/notify/push.php + eventsmanager/notify/push.php Receive notification when a publication is available @@ -5135,7 +5108,7 @@ Recevoir un accuse de reception a %my_email% Ontvangen van een bevestigingsmail van ontvangst van %my_email% - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Recherche multicritères @@ -5145,7 +5118,7 @@ Rechercher dans un champ date Zoeken in een datum veld - web/prod/index.html.twig + web/prod/index.html.twig Recommendations @@ -5165,7 +5138,7 @@ Record Not Found Document niet gevonden - Controller/Api/V1Controller.php + Controller/Api/V1Controller.php Record removed from basket @@ -5190,7 +5163,7 @@ Records have been successfuly moved Records werden met succes verplaatst - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php Records type @@ -5246,7 +5219,7 @@ Relevance Relevance - web/prod/index.html.twig + web/prod/index.html.twig Remember me @@ -5271,7 +5244,7 @@ Remove from basket Verwijder uit het mandje - prod/preview/tools.html.twig + prod/preview/tools.html.twig Remove watermark @@ -5340,7 +5313,7 @@ Require email validation to activate the account Email validatie verwacht om de gebruiker te activeren - web/admin/index.html.twig + web/admin/index.html.twig Required @@ -5360,12 +5333,12 @@ Reset and apply Reset en pas toe - web/admin/index.html.twig + web/admin/index.html.twig Reset and apply template Reset en pas de template toe - web/admin/index.html.twig + web/admin/index.html.twig Reset cache @@ -5375,7 +5348,7 @@ Reset rights before applying template? De rechten resetten alvorens de template toe te passen? - web/admin/index.html.twig + web/admin/index.html.twig Resolution @@ -5461,7 +5434,7 @@ Rights will be erased before applying template, do you confirm? Rechten worden gewist voor het toe passen van de template, bent u zeker? - web/admin/index.html.twig + web/admin/index.html.twig Role @@ -5636,7 +5609,7 @@ Selecteur de theme Thema selector - web/prod/index.html.twig + web/prod/index.html.twig Selectionnez des documents et @@ -5657,7 +5630,7 @@ Send an email to the user to setup his password Stuur een email naar de gebruiker om zijn wachtwoord in te stellen - web/admin/index.html.twig + web/admin/index.html.twig Send to Facebook @@ -5693,7 +5666,7 @@ Service youtube introuvable. Youtube service kan niet gevonden worden. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php Session persistente @@ -5719,7 +5692,7 @@ Set sharing permission Stel deel permissies in - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Set statuses restrictions @@ -5771,7 +5744,7 @@ Si cette fenetre ne se ferme pas automatiquement, fermez la, et raffraichissez votre compte Als dit venster zich niet automatisch sluit, sluit het dan, en refresh uw venster - actions/Bridge/callback.html.twig + actions/Bridge/callback.html.twig Si vous aviez besoin de plus de parametres, %debut_lien%Afficher d'avantage d'options%fin_lien% @@ -5783,11 +5756,6 @@ Als u deze niet respecteert, zullen de documenten correct geïndexeerd worden, maar de beschreven meta data's kunnen verkeerd zijn prod/Tooltip/DataboxFieldRestrictions.html.twig - - Si vous ne pouvez pas installer un autre navigateur, utilisez Google Chrome Frame. - Als u geen andere browser kunt installeren, gebruik dan Google Chrome Frame. - login/layout/base-layout.html.twig - Single image Enkel beeld @@ -5834,11 +5802,6 @@ Er is iets verkeerd gelopen Controller/Admin/RootController.php - - Something wrong happened, please retry or contact an admin. - Er is iets verkeerd gelopen, gelieve opnieuw te proberen of contact op te nemen met een beheerder - WorkZone/Browser/Browser.html.twig - Something wrong happened, please try again or contact an admin. Er heeft zich een fout voorgedaan, gelieve opnieuw te proberen of contact op te nemen met een beheerder. @@ -5872,26 +5835,6 @@ admin/publications/fiche.html.twig admin/publications/list.html.twig - - Sphinx Search RealTime server - Sphinx Search RealTime server - admin/search-engine/sphinx-search.html.twig - - - Sphinx Search connection configuration - Sphinx Search connectie configuratie - admin/search-engine/sphinx-search.html.twig - - - Sphinx Search server - Sphinx Search server - admin/search-engine/sphinx-search.html.twig - - - SphinxSearch search-engine configuration - SphinxSearch zoekmotor configuratie - admin/search-engine/sphinx-search.html.twig - Stamp logo Stempel logo @@ -5924,7 +5867,7 @@ Status des documents a rechercher Status van de te zoeken documenten - web/prod/index.html.twig + web/prod/index.html.twig Status edition @@ -5946,11 +5889,6 @@ Statut prod/orders/order_box.html.twig - - Stemming - Stoppen - admin/search-engine/phrasea.html.twig - Stop Stop @@ -5974,7 +5912,7 @@ Story Not Found Artikel niet gevonden - Controller/Api/V1Controller.php + Controller/Api/V1Controller.php Story created @@ -6026,6 +5964,11 @@ Thumbnail naam web/admin/subdefs.html.twig + + Submit + Submit + Controller/Prod/LanguageController.php + Substitute Vervangen @@ -6041,13 +5984,12 @@ Success Gelukt api/auth/native_app_access_token.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Successful install Installatie geslaagd - web/admin/index.html.twig + web/admin/index.html.twig Successful removal @@ -6201,7 +6143,7 @@ Template Sjabloon - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig Temporary access to the following collections @@ -6217,7 +6159,7 @@ Terms of Use Gebruiksvoorwaarden Form/Login/PhraseaRegisterForm.php - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Terms of service @@ -6230,7 +6172,7 @@ Controller/Prod/TOUController.php web/admin/tree.html.twig web/login/cgus.html.twig - login/layout/base-layout.html.twig + login/layout/base-layout.html.twig The URL you used is out of date, please login @@ -6240,7 +6182,7 @@ The Youtube servers have received too many calls from the same caller in a short amount of time. De Youtube server hebben teveel aanvragen ontvangen van de zelfde gebruiker in een te korte tijd. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php The application is going down for maintenance, please logout. @@ -6251,12 +6193,12 @@ The authentication token specified in the Authorization header has expired. De authentication token vermeld in de Authorization header is verlopen. - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php The authentication token specified in the Authorization header is invalid The authentication token vermeld in de Authorization header is niet geldig - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php The delivery to %email% failed for the following reason : %reason% @@ -6286,7 +6228,7 @@ The file does not match available color Het bestand komt niet met de beschikbare kleur overeen - Border/Checker/Colorspace.php + Border/Checker/Colorspace.php The file does not match available extensions @@ -6333,7 +6275,7 @@ The records have been properly ordered De records werden correct gesorteerd - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php prod/orders/order_box.html.twig @@ -6364,17 +6306,17 @@ Theme Thema - web/prod/index.html.twig + web/prod/index.html.twig There is no one to validate orders, please contact an administrator Er is niemand om de opdrachten goed te keuren, gelieve een beheerder te contacteren - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php There is no record eligible for an order Er is geen geldig document voor een opdracht - Controller/Prod/OrderController.php + Order/Controller/ProdOrderController.php There is no user to add. @@ -6384,7 +6326,7 @@ Thesaurus Min score Thesaurus Min score - SearchEngine/Elastic/ElasticsearchSettingsFormType.php + SearchEngine/Elastic/ElasticsearchSettingsFormType.php Thesaurus branch @@ -6425,23 +6367,23 @@ This feed is public Deze feed is publiek admin/publications/list.html.twig - actions/publish/publish.html.twig + actions/publish/publish.html.twig This field is required Dit veld is verplicht - web/admin/index.html.twig + web/admin/index.html.twig This field represents the title of the document Dit veld vertegenwoordigt de titel van het document - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig This file is too big Deze file is te groot Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig This is a template @@ -6461,7 +6403,7 @@ This user does not participate to the validation but is only viewer. Deze gebruiker maakt geen deel uit van de goedkeuring maar is enkel een bezoeker. - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig This user has no rights @@ -6545,7 +6487,7 @@ Tout type Alle type - web/prod/index.html.twig + web/prod/index.html.twig Toutes les publications @@ -6577,7 +6519,7 @@ Trier par Sorteren op - web/prod/index.html.twig + web/prod/index.html.twig Try to extract embedded thumbnails @@ -6602,7 +6544,7 @@ Type de documents Type van de documenten - web/prod/index.html.twig + web/prod/index.html.twig Type nombre @@ -6623,12 +6565,12 @@ Un document commande Een document bestelling - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Un document ne peut etre commande Eén document kan niet worden besteld - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Unable to add file to Phraseanet @@ -6713,7 +6655,7 @@ Unauthorized action Unauthorized action - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Une fois la publication supprimee, les donnees publiees seront definitivement perdues. Continuer ? @@ -6723,7 +6665,7 @@ Une question personnelle Een persoonlijke vraag - web/prod/index.html.twig + web/prod/index.html.twig Une selection @@ -6830,7 +6772,7 @@ Use latest search settings on Production loading Use latest search settings on Production loading - web/prod/index.html.twig + web/prod/index.html.twig Use my Phraseanet account @@ -6908,7 +6850,7 @@ Users Gebruikers - Vocabulary/ControlProvider/UserProvider.php + Vocabulary/ControlProvider/UserProvider.php user/import/view.html.twig web/admin/users.html.twig prod/actions/Push.html.twig @@ -6938,7 +6880,6 @@ VALIDATION VALIDATIE web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig web/lightbox/validate.html.twig @@ -6953,8 +6894,7 @@ eventsmanager/notify/validate.php eventsmanager/notify/validationdone.php eventsmanager/notify/validationreminder.php - eventsmanager/notify/validationreminder.php - lightbox/IE6/validate.html.twig + eventsmanager/notify/validationreminder.php Validation from %user% @@ -6969,10 +6909,8 @@ Validations Controles - mobile/lightbox/index.html.twig - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig - lightbox/IE6/validate.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig web/lightbox/validate.html.twig @@ -7009,7 +6947,7 @@ Video Video - web/prod/index.html.twig + web/prod/index.html.twig Video Codec @@ -7025,7 +6963,7 @@ View Bekijken - actions/Feedback/list.html.twig + actions/Feedback/list.html.twig View on %title% @@ -7040,7 +6978,7 @@ Vocabulary not found Vocabulary niet gevonden - Controller/Prod/EditController.php + Controller/Prod/EditController.php Vocabulary type @@ -7050,15 +6988,13 @@ Voici vos paniers Uw mandjes - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig Voici vos validations en cours Een controle in proces - mobile/lightbox/index.html.twig - lightbox/IE6/index.html.twig + mobile/lightbox/index.html.twig web/lightbox/index.html.twig @@ -7134,7 +7070,7 @@ Vous devez selectionner un type de sous definitions U moet een type thumbnail selecteren - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Vous devez specifier une adresse email et un mot de passe valides @@ -7154,7 +7090,7 @@ Vous etes authentifie avec succes U bent met succes geauthenticeerd - actions/Bridge/callback.html.twig + actions/Bridge/callback.html.twig Vous etes maintenant deconnecte. A bientot. @@ -7164,12 +7100,12 @@ Vous n'avez pas assez de droits sur certains elements selectionnes U hebt niet voldoende rechten op de bepaalde geslecteerde elementen - actions/Bridge/index.html.twig + actions/Bridge/index.html.twig Vous n'avez pas assez de droits sur les elements selectionnes U hebt niet voldoende rechten op de geslecteerde elementen - actions/Bridge/index.html.twig + actions/Bridge/index.html.twig Vous n'avez pas les droits pour supprimer certains documents @@ -7196,7 +7132,7 @@ U hebt geen enkel element geselecteerd Bridge/Dailymotion/upload.html.twig Bridge/Flickr/upload.html.twig - actions/Bridge/index.html.twig + actions/Bridge/index.html.twig Bridge/Youtube/upload.html.twig @@ -7228,17 +7164,12 @@ Vous pouvez quitter la plupart des fenetres survolantes via la touche echap U kunt het grootste deel van de bovenliggende vensters sluiten met de escape toets - web/prod/index.html.twig + web/prod/index.html.twig Warning ! Waarschuwing ! - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Warning, this database is not empty @@ -7312,13 +7243,13 @@ Would you like to receive an e-mail when your download is ready ? Wilt u een email ontvangen wanneer de download klaar is ? - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Would you like to reset rights before applying the template? Wilt u de rechten resetten alvorens de template toe te passen? - web/admin/index.html.twig - web/admin/index.html.twig + web/admin/index.html.twig + web/admin/index.html.twig Write Metas @@ -7328,8 +7259,8 @@ YYYY/MM/DD YYYY/MM/DD - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig Yes @@ -7352,16 +7283,6 @@ U staat op het punt om feedback te vragen voor %nb_push_items% records. prod/actions/Push.html.twig - - You are about to delete this account. Would you like to continue ? - U staat op het punt deze gebruiker te verwijderen. Wilt u doorgaan? - actions/Bridge/index.html.twig - - - You are about to delete this basket. Would you like to continue ? - U staat op het punt dit mandje te verwijderen. Wilt u doorgaan? - WorkZone/Browser/Browser.html.twig - You are about to push %nb_push_items% records, %nb_not_available% records can not be processed. U staat op het punt om %nb_push_items% records door te sturen, %nb_not_available% records kunnen niet worden uitgevoerd. @@ -7375,7 +7296,7 @@ You are attempting to exceed the storage limit on your account and must delete existing entries before inserting new entries U probeert de toegelaten opslagruimte te overschrijden voor uw gebruiker, u moet bestaande documenten verwijderen alvorens nieuwe aan te maken - Bridge/Api/Youtube.php + Bridge/Api/Youtube.php You are not allowed to add users @@ -7424,7 +7345,7 @@ You can alternatively receive an email when the download is ready. Als alternatief kunt u een email ontvangen wanneer de download klaar is. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig You can choose only one record @@ -7439,7 +7360,7 @@ You can not directly download more than %max_download% Mo ; time to package all documents is too long U kan niet meer dan %max_download% Mb downloaded ; tijd om alle documenten compresseren is te lang - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig You can not edit this story @@ -7480,12 +7401,12 @@ You do not have rights to remove selected documents U hebt geen rechten om de geselecteerde documenten te verwijderen - prod/actions/delete_records_confirm.html.twig + prod/actions/delete_records_confirm.html.twig You do not have the permission to move records to %collection% You do not have the permission to move records to %collection% - Controller/Prod/MoveCollectionController.php + Controller/Prod/MoveCollectionController.php You have %quantity% days to validate the selection. @@ -7505,7 +7426,7 @@ You have not access to this basket You have not access to this basket - Model/Repositories/BasketRepository.php + Model/Repositories/BasketRepository.php You have selected %nbReceivedDocuments% records. @@ -7520,7 +7441,7 @@ You have to give your feedback at least on one document to send a report U moet op tenminste één document feedback geven om een rapport te versturen - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php You have to wait for an administrator approval for your access request @@ -7535,7 +7456,7 @@ You must agree to the Terms of Use to continue. U moet de gebruiksvoorwaarden aanvaarden. - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig You must give a destination collection @@ -7657,19 +7578,19 @@ a propos Over - mobile/lightbox/index.html.twig - mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig + mobile/lightbox/index.html.twig action : ajouter au panier aan mandje toevoegen prod/preview/tools.html.twig - prod/results/record.html.twig + prod/results/record.html.twig action : bridge Bridge - web/prod/index.html.twig + web/prod/index.html.twig web/prod/toolbar.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig @@ -7694,12 +7615,10 @@ action : exporter Exporteer web/lightbox/feed.html.twig - lightbox/IE6/feed.html.twig - lightbox/IE6/validate.html.twig web/lightbox/validate.html.twig - web/prod/index.html.twig - prod/preview/tools.html.twig - prod/results/record.html.twig + web/prod/index.html.twig + prod/preview/tools.html.twig + prod/results/record.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig prod/WorkZone/Story.html.twig @@ -7714,8 +7633,8 @@ action : print Print - prod/preview/tools.html.twig - prod/results/record.html.twig + prod/preview/tools.html.twig + prod/results/record.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig prod/WorkZone/Story.html.twig @@ -7723,7 +7642,7 @@ action : publier Publiceren - web/prod/index.html.twig + web/prod/index.html.twig web/prod/toolbar.html.twig web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig @@ -7749,22 +7668,22 @@ Verwijderen web/prod/toolbar.html.twig prod/WorkZone/Basket.html.twig - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig prod/WorkZone/Story.html.twig action:: nouveau panier Nieuw mandje - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig action:: nouveau reportage Nieuwe reportage - web/prod/index.html.twig - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig action::Valider @@ -7775,19 +7694,19 @@ action::detacher Ontkoppelen - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig action::editer Aanpassen - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig action::exporter Exporteren prod/WorkZone/Macros.html.twig prod/WorkZone/Macros.html.twig - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig action::renommer @@ -8141,7 +8060,7 @@ Activiteit Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig @@ -8150,24 +8069,24 @@ Adres Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur changer mon mot de passe Verander mijn paswoord - web/account/account.html.twig + web/account/account.html.twig admin::compte-utilisateur code postal Postcode Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur confirmer la nouvelle adresse email @@ -8189,21 +8108,21 @@ Email Controller/Admin/UserController.php Event/Subscriber/RegistrationSubscriber.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig web/admin/users.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur fax Fax Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur id utilisateur @@ -8215,8 +8134,8 @@ Identificatie Core/Provider/RegistrationServiceProvider.php api/auth/end_user_authorization.html.twig - web/account/account.html.twig - web/account/account.html.twig + web/account/account.html.twig + web/account/account.html.twig web/account/reset-email.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig @@ -8227,7 +8146,7 @@ admin::compte-utilisateur mot de passe Paswoord api/auth/end_user_authorization.html.twig - web/account/account.html.twig + web/account/account.html.twig web/account/reset-email.html.twig web/common/dialog_export.html.twig web/setup/step2.html.twig @@ -8238,11 +8157,11 @@ Controller/Admin/UserController.php Event/Subscriber/RegistrationSubscriber.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur nouvelle adresse email @@ -8260,10 +8179,10 @@ Postcode Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur prenom @@ -8271,16 +8190,16 @@ Controller/Admin/UserController.php Event/Subscriber/RegistrationSubscriber.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur sexe Geslacht Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig @@ -8288,12 +8207,12 @@ Bedrijf Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig web/admin/users.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur tel @@ -8304,11 +8223,11 @@ admin::compte-utilisateur telephone Telefoon Controller/Admin/UserController.php - web/account/account.html.twig + web/account/account.html.twig web/admin/connected-users.html.twig web/admin/editusers.html.twig admin/user/registrations.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur un email de confirmation vient de vous etre envoye. Veuillez suivre les instructions contenue pour continuer @@ -8320,9 +8239,9 @@ Star Controller/Admin/UserController.php Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur: L'email a correctement ete mis a jour @@ -8372,13 +8291,13 @@ admin::compte-utilisateur:ftp: repertoire de destination ftp Bestemmings ftp-map - web/account/account.html.twig + web/account/account.html.twig web/common/dialog_export.html.twig admin::compte-utilisateur:ftp: Activer le compte FTP De FTP-account activeren - web/account/account.html.twig + web/account/account.html.twig admin::compte-utilisateur:ftp: Le mot de passe est errone @@ -8388,13 +8307,13 @@ admin::compte-utilisateur:ftp: Nombre d'essais max Aantal max probeersels - web/account/account.html.twig + web/account/account.html.twig web/common/dialog_export.html.twig admin::compte-utilisateur:ftp: Utiliser le mode passif Gebruik de passive mode - web/account/account.html.twig + web/account/account.html.twig web/common/dialog_export.html.twig @@ -8410,31 +8329,31 @@ admin::compte-utilisateur:ftp: prefixe des noms de dossier ftp Voorvoegsel bij de namen van de ftp map - web/account/account.html.twig + web/account/account.html.twig admin::compte-utilisateur:sexe: madame Mevrouw Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur:sexe: mademoiselle Jufrouw Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::compte-utilisateur:sexe: monsieur De heer Core/Provider/RegistrationServiceProvider.php - web/account/account.html.twig + web/account/account.html.twig web/admin/editusers.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig admin::monitor: bases sur lesquelles l'utilisateur est connecte : @@ -8464,7 +8383,7 @@ Klant module Controller/Admin/ConnectedUsersController.php lib/classes/phrasea.php - classes/record/preview.php + classes/record/preview.php web/admin/connected-users.html.twig @@ -8484,7 +8403,7 @@ Productie Controller/Admin/ConnectedUsersController.php lib/classes/phrasea.php - classes/record/preview.php + classes/record/preview.php web/admin/connected-users.html.twig @@ -8514,9 +8433,9 @@ admin::monitor: module validation Lightbox Controller/Admin/ConnectedUsersController.php - Phrasea/Controller/LightboxController.php - Phrasea/Controller/LightboxController.php - Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php + Phrasea/Controller/LightboxController.php lib/classes/phrasea.php web/common/menubar.html.twig @@ -8699,7 +8618,7 @@ alert alert - actions/Tools/index.html.twig + actions/Tools/index.html.twig all caches services have been flushed @@ -8710,7 +8629,6 @@ an error occured een fout geeft zich voorgedaan Controller/Prod/ToolsController.php - actions/Tools/index.html.twig an error occured : %message% @@ -8740,7 +8658,7 @@ audio Audio - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php task-manager/task-editor/subdefs.html.twig @@ -8786,19 +8704,19 @@ boutton:: selectionner aucune base Selecteer geen enkele database - web/prod/index.html.twig + web/prod/index.html.twig boutton:: selectionner toutes les bases Selecteer alle databases - web/prod/index.html.twig + web/prod/index.html.twig boutton::ajouter Toevoegen admin/collection/suggested_value.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig boutton::annuler @@ -8807,22 +8725,22 @@ Controller/Prod/LanguageController.php web/account/reset-email.html.twig admin/collection/create.html.twig - web/admin/index.html.twig + web/admin/index.html.twig admin/publications/fiche.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig Bridge/Dailymotion/video_modify.html.twig Bridge/Dailymotion/video_modify.html.twig Bridge/Flickr/photo_modify.html.twig Bridge/Flickr/photo_modify.html.twig Bridge/Youtube/video_modify.html.twig Bridge/Youtube/video_modify.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig - web/prod/tab_thesaurus.html.twig - web/report/all_content.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + web/prod/tab_thesaurus.html.twig + web/report/all_content.html.twig web/thesaurus/accept.html.twig web/thesaurus/accept.html.twig web/thesaurus/export-text-dialog.html.twig @@ -8844,11 +8762,9 @@ boutton::chercher zoeken - lib/classes/queries.php - lib/classes/queries.php web/admin/users.html.twig - actions/Feedback/list.html.twig - web/prod/thesaurus.js.twig + actions/Feedback/list.html.twig + web/prod/index.html.twig web/thesaurus/thesaurus.html.twig web/thesaurus/thesaurus.html.twig @@ -8861,7 +8777,7 @@ boutton::commander Bestellen - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig boutton::creer @@ -8873,8 +8789,6 @@ boutton::demarrer Starten web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig @@ -8891,13 +8805,13 @@ boutton::envoyer Verzenden - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig boutton::essayer Proberen - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig boutton::exporter @@ -8908,12 +8822,12 @@ boutton::fermer Sluiten Controller/Prod/LanguageController.php - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig web/lightbox/sc_note.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod/actions/Push.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig web/thesaurus/accept.html.twig web/thesaurus/accept.html.twig web/thesaurus/export-topics.html.twig @@ -8947,8 +8861,6 @@ boutton::pause Pauze web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig @@ -8956,10 +8868,6 @@ vorige web/lightbox/feed_options_box.html.twig web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/setup/step2.html.twig @@ -8972,7 +8880,7 @@ boutton::rechercher zoeken Controller/Prod/LanguageController.php - web/prod/index.html.twig + web/prod/index.html.twig boutton::refresh @@ -8987,7 +8895,7 @@ boutton::remplacer Vervangen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig boutton::renouveller @@ -9028,10 +8936,6 @@ volgende web/lightbox/feed_options_box.html.twig web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig web/setup/step2.html.twig @@ -9059,26 +8963,22 @@ Bridge/Flickr/actionelements.html.twig Bridge/Youtube/actioncontainers.html.twig Bridge/Youtube/actionelements.html.twig + web/prod/index.html.twig prod/results/entry.html.twig prod/results/feeds_entry.html.twig - web/prod/thesaurus.js.twig web/thesaurus/presets.html.twig boutton::telecharger Downloaden - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig web/lightbox/feed_options_box.html.twig - lightbox/IE6/feed_options_box.html.twig - lightbox/IE6/sc_options_box.html.twig web/lightbox/sc_options_box.html.twig boutton::telecharger tous les documents Alle documenten downloaden web/lightbox/feed.html.twig - lightbox/IE6/feed.html.twig - lightbox/IE6/validate.html.twig web/lightbox/validate.html.twig @@ -9091,8 +8991,8 @@ boutton::valider bevestigen Controller/Prod/LanguageController.php - mobile/lightbox/note_form.html.twig - web/account/account.html.twig + mobile/lightbox/note_form.html.twig + web/account/account.html.twig web/account/reset-email.html.twig admin/collection/collection.html.twig admin/collection/create.html.twig @@ -9102,8 +9002,6 @@ web/admin/editusers.html.twig admin/publications/fiche.html.twig admin/publications/list.html.twig - admin/search-engine/phrasea.html.twig - admin/search-engine/sphinx-search.html.twig web/admin/setup.html.twig admin/statusbit/edit.html.twig web/admin/structure.html.twig @@ -9126,13 +9024,13 @@ Bridge/Youtube/video_deleteelement.html.twig Bridge/Youtube/video_modify.html.twig Bridge/Youtube/video_moveinto_playlist.html.twig - prod/actions/edit_default.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod/Baskets/Reorder.html.twig prod/Baskets/Update.html.twig - web/prod/index.html.twig + web/prod/index.html.twig prod/Story/Reorder.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig web/thesaurus/accept.html.twig web/thesaurus/export-text-dialog.html.twig web/thesaurus/export-topics-dialog.html.twig @@ -9227,8 +9125,8 @@ chargement laden - web/prod/tab_thesaurus.html.twig - web/prod/tab_thesaurus.html.twig + web/prod/tab_thesaurus.html.twig + web/prod/tab_thesaurus.html.twig charger d'avantage de publications @@ -9246,7 +9144,7 @@ kiezen admin/collection/create.html.twig admin/databox/databox.html.twig - web/prod/index.html.twig + web/prod/index.html.twig classe @@ -9259,11 +9157,6 @@ toegangs klasse web/admin/subdefs.html.twig - - client::recherche: dans les categories - in de categoriën - lib/classes/queries.php - cocher tout alles uitschakelen @@ -9277,12 +9170,12 @@ commande::deadline Deadline - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig commande::utilisation prevue Utilisation gepland - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig configuration @@ -9321,7 +9214,7 @@ delete Verwijderen - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig descendant @@ -9336,7 +9229,7 @@ document document - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php web/admin/subdefs.html.twig web/admin/subdefs.html.twig task-manager/task-editor/subdefs.html.twig @@ -9355,15 +9248,15 @@ edit edit - web/account/account.html.twig - web/account/account.html.twig - web/account/account.html.twig + web/account/account.html.twig + web/account/account.html.twig + web/account/account.html.twig prod/WorkZone/Macros.html.twig edit: chosiir limage du regroupement Kies het beeld voor de hergroepering - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig edit:: Ajouter %s au champ courrant @@ -9388,7 +9281,7 @@ edit::Certains champs doivent etre remplis pour valider cet editing Bepaalde velden moeten ingevuld worden om deze bewerking uit te voeren - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig edit::certains documents possedent des champs requis non remplis. Merci de les remplir pour valider votre editing @@ -9398,7 +9291,7 @@ edit::preset:: titre Titel - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig effacer (OK) ou quitter (Annuler) ? @@ -9415,27 +9308,22 @@ email is niet geldig eventsmanager/notify/downloadmailfail.php - - erreur : Vous n'avez pas les droits - U hebt niet de rechten - prod/actions/collection_default.html.twig - export:: FTP FTP - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export:: commande Opdracht - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export:: envoi par mail Verstuur per mail - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export:: erreur : aucun document selectionne @@ -9445,29 +9333,29 @@ export:: telechargement Download - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::ftp: reglages manuels Manuele instellingen - classes/set/export.php + classes/set/export.php export::mail: contenu du mail Inhoud van de mail - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::mail: destinataire Bestemmeling - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::mail: fichiers joint Toegevoegde bestanden - web/common/dialog_export.html.twig - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig + web/common/dialog_export.html.twig export::titre: nom original du document @@ -9508,7 +9396,7 @@ flash flash - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php task-manager/task-editor/subdefs.html.twig @@ -9582,7 +9470,7 @@ image Beeld - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php task-manager/task-editor/subdefs.html.twig @@ -9634,13 +9522,12 @@ lightbox::recaptitulatif Beknopt web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig web/lightbox/validate.html.twig login:: Changer mon adresse email Verander mijn email adres - web/account/account.html.twig + web/account/account.html.twig login:: Envoyer a nouveau le mail de confirmation @@ -9655,7 +9542,7 @@ login:: Mon compte Mijn account - web/account/account.html.twig + web/account/account.html.twig web/common/menubar.html.twig @@ -9704,12 +9591,12 @@ login::register: Faire une demande d'acces Doe een aanvraag voor toegang - web/account/access.html.twig + web/account/access.html.twig login::register: L'acces aux bases ci-dessous implique l'acceptation des Conditions Generales d'Utilisation (CGU) suivantes De toegang voor de onderstaande databases houdt in dat u volgende Algemene voorwaarden voor gebruik (CGU) toestaat - web/account/access.html.twig + web/account/access.html.twig login::register: email confirmation email Pour valider votre inscription a la base de donnees, merci de confirmer votre e-mail en suivant le lien ci-dessous. @@ -9810,7 +9697,7 @@ no image selected geen beeld geselecteerd - actions/Tools/index.html.twig + actions/Tools/index.html.twig non @@ -9822,8 +9709,6 @@ notice mededeling web/lightbox/feed.html.twig - lightbox/IE6/feed.html.twig - lightbox/IE6/validate.html.twig web/lightbox/validate.html.twig @@ -9876,17 +9761,17 @@ panier:: ordre Validation ascendante Oplopende validatie volgorde - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig panier:: ordre Validation descendante Aflopende validatie volgorde - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig panier:: ordre du panier Volgordre van het mandje - prod/WorkZone/Macros.html.twig + prod/WorkZone/Macros.html.twig panier:: renommer le panier @@ -9976,7 +9861,7 @@ phraseanet:: adresse Adres - web/account/account.html.twig + web/account/account.html.twig admin/collection/collection.html.twig web/admin/connected-users.html.twig web/common/dialog_export.html.twig @@ -10047,17 +9932,17 @@ phraseanet:: prereglages Voorinstellingen - web/common/dialog_export.html.twig + web/common/dialog_export.html.twig phraseanet:: presse-papier Klembord - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig phraseanet:: preview Voorvertoning - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod/actions/printer_default.html.twig @@ -10081,7 +9966,7 @@ phraseanet:: thesaurus Thesaurus - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig web/prod/tab_headers.html.twig web/thesaurus/index.html.twig web/thesaurus/load-thesaurus.html.twig @@ -10096,15 +9981,15 @@ phraseanet:: tri par date Op datum sorteren - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig web/thesaurus/export-topics-dialog.html.twig phraseanet:: tri par nom Op naam sorteren - web/prod/index.html.twig - web/prod/index.html.twig + web/prod/index.html.twig + web/prod/index.html.twig phraseanet:: user @@ -10127,26 +10012,26 @@ Laden Controller/Prod/LanguageController.php admin/collection/suggested_value.html.twig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig web/thesaurus/thesaurus.html.twig phraseanet::erreur: La connection au serveur Phraseanet semble etre indisponible De connectie met de Phraseanet server blijkt niet mogelijk te zijn Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig phraseanet::erreur: Une erreur est survenue, si ce probleme persiste, contactez le support technique Een fout heeft zicht voorgedaan, als dit probleem aanhoudt, contacteer dan de technishe support Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig phraseanet::erreur: Votre session est fermee, veuillez vous re-authentifier Uw sessile werd afgesloten, gelieve opnieuw in te loggen Controller/Prod/LanguageController.php - web/admin/index.html.twig + web/admin/index.html.twig web/thesaurus/thesaurus.html.twig @@ -10237,12 +10122,12 @@ phraseanet::time:: a a - web/prod/index.html.twig + web/prod/index.html.twig phraseanet::time:: de de - web/prod/index.html.twig + web/prod/index.html.twig phraseanet::type:: audios @@ -10252,7 +10137,7 @@ phraseanet::type:: documents Documenten - web/prod/index.html.twig + web/prod/index.html.twig web/prod/toolbar.html.twig @@ -10263,7 +10148,7 @@ phraseanet::type:: reportages Reportages - web/prod/index.html.twig + web/prod/index.html.twig phraseanet::type:: videos @@ -10304,24 +10189,24 @@ preview:: Description Beschrijving - web/prod/index.html.twig + web/prod/index.html.twig preview:: Historique Historie - web/prod/index.html.twig + web/prod/index.html.twig preview:: Popularite Populariteit - web/prod/index.html.twig + web/prod/index.html.twig preview:: arreter le diaporama stop de slideshow prod/preview/basket_train.html.twig prod/preview/feed_train.html.twig - prod/preview/reg_train.html.twig + prod/preview/reg_train.html.twig prod/preview/result_train.html.twig prod/preview/result_train_options.html.twig @@ -10330,7 +10215,7 @@ start de slideshow prod/preview/basket_train.html.twig prod/preview/feed_train.html.twig - prod/preview/reg_train.html.twig + prod/preview/reg_train.html.twig prod/preview/result_train.html.twig prod/preview/result_train_options.html.twig @@ -10396,28 +10281,28 @@ processing verwerken - actions/Tools/index.html.twig + actions/Tools/index.html.twig prod::Les enregistrements ne provienent pas tous de la meme base et ne peuvent donc etre traites ensemble De records zijn niet allemaal afkomstig van dezelfde database en kan dus niet samen behandeld worden - prod/actions/collection_default.html.twig + Controller/Prod/MoveCollectionController.php actions/Property/index.html.twig prod::Vous n'avez le droit d'effectuer l'operation sur aucun document U hebt niet het recht om deze handeling uit te voeren op geen enkel document - prod/actions/collection_default.html.twig + Controller/Prod/MoveCollectionController.php prod::collection deplacer egalement les documents rattaches a ce(s) regroupement(s) De collectie en de bijhorende documenten werden verplaats bij deze hergroepering - prod/actions/collection_default.html.twig + prod/actions/collection_default.html.twig prod::edit: Impossible d'editer simultanement des documents provenant de bases differentes Onmogelijk om documenten afkomstig van verschillende databases samen te bewerken - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing valeurs heterogenes, choisir 'remplacer', 'ajouter' ou 'annuler' @@ -10427,32 +10312,32 @@ prod::editing: %not_actionable% documents ne peuvent etre edites car vos droits sont induffisants %not_actionable% documenten kunnen niet bewerkt worden omdat u niet voldoende rechten heeft - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: 1 document ne peut etre edite car vos droits sont induffisants 1 document kan niet worden bewerkt omdat u niet voldoende rechten heeft - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: aucun documents ne peuvent etre edites car vos droits sont induffisants Geen enkel document kan worden bewerkt omdat u niet voldoende rechten heeft - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: modeles de fiches Bestandsmodellen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: rechercher-remplacer Zoeken-vervangen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing: valider ou annuler les modifications Bewaar of annuleer de aanpassingen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing::annulation: abandonner les modification ? @@ -10462,67 +10347,67 @@ prod::editing::fields: status Status - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing::replace: remplacer dans le champ Vervangen in het veld - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing::replace: remplacer dans tous les champs Vervangen in alle velden - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:indexation en cours Indexatie is bezig - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace: chaine remplacante Vervangende string - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace: options de remplacement Vervanging opties - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option : utiliser une expression reguliere Een reguliere expressie gebruiken - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option la valeur du cahmp doit etre exacte De waarde van het veld moet exact zijn - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option la valeur est comprise dans le champ De waarde is in het veld opgenomen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option respecter la casse Respecteer de hoofdlettergevoeligheid - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option: remplacer toutes les occurences Alle zoektekst vervangen - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:remplace::option: rester insensible a la casse Hoofdletterongevoelig blijven - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::editing:replace: chaine a rechercher String zoeken - prod/actions/edit_default.html.twig + prod/actions/edit_default.html.twig prod::facet:base_label @@ -10552,12 +10437,12 @@ prod::thesaurusTab:cmenu:Accepter en %lng_code% Aanvaardt als %lng_code% - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:cmenu:Remplacer par... Vervangen door... - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:%number% record(s) updated @@ -10567,52 +10452,52 @@ prod::thesaurusTab:dlg:Acceptation en cours. Aanvaarding is bezig. - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:Remplacement du candidat "%(from)s" par "%(to)s" prod::thesaurusTab:dlg:Remplacement du candidat "%(from)s" par "%(to)s" - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:Remplacement en cours. Vervanging is bezig. - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:Suppression en cours. Verwijderen is bezig. - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:accepter le terme candidat "%s" ? prod::thesaurusTab:dlg:accepter le terme candidat "%s" ? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:accepter les %d termes candidats ? aanvaardt %d candidaat termen ? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:remplacer le terme "%s" des fiches par : prod::thesaurusTab:dlg:remplacer le terme "%s" des fiches par : - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:remplacer les %d termes des fiches par : %d termen van de bestanden vervangen : - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:supprimer le terme "%s" des fiches ? prod::thesaurusTab:dlg:supprimer le terme "%s" des fiches ? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:supprimer les %d termes des fiches ? %d termen van de bestanden verwijderen ? - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:dlg:too many (%number%) records to update (limit=%maximum%) @@ -10627,18 +10512,17 @@ prod::thesaurusTab:tmenu:Accepter comme synonyme Aanvaardt als synonym - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:tmenu:Accepter comme terme specifique Aanvaardt als specifieke term - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:tree:loading laden - web/prod/thesaurus.js.twig - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:wizard:accepter le terme candidat @@ -10648,12 +10532,12 @@ prod::thesaurusTab:wizard:clic-droit / accepter le terme candidat "%s" prod::thesaurusTab:wizard:clic-droit / accepter le terme candidat "%s" - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:wizard:clic-droit / accepter les %s termes candidats clic-droit /aanvaardt de %s candidaat termen - web/prod/thesaurus.js.twig + web/prod/index.html.twig prod::thesaurusTab:wizard:remplacer par le terme @@ -10676,26 +10560,26 @@ publication : autheur Auteur - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication : email autheur Email auteur - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication : sous titre Onder titel - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication : titre Titel - actions/publish/publish.html.twig - actions/publish/publish_edit.html.twig + actions/publish/publish.html.twig + actions/publish/publish_edit.html.twig publication::Voici votre fil RSS personnel. Il vous permettra d'etre tenu au courrant des publications. @@ -10739,12 +10623,12 @@ raccourci :: a propos des raccourcis claviers Over toetsenbord sneltoetsen - web/prod/index.html.twig + web/prod/index.html.twig raccourcis :: ne plus montrer cette aide Deze help niet meer tonen - web/prod/index.html.twig + web/prod/index.html.twig rafraichir @@ -10758,7 +10642,7 @@ rechercher dans tous les champs in alle velden zoeken - web/prod/index.html.twig + web/prod/index.html.twig recordtype @@ -10788,17 +10672,17 @@ reponses:: images par pages : Beelden per pagina : - web/prod/index.html.twig + web/prod/index.html.twig reponses:: mode liste Lijst mode - web/prod/index.html.twig + web/prod/index.html.twig reponses:: mode vignettes Thumbnail mode - web/prod/index.html.twig + web/prod/index.html.twig reponses:: partager @@ -10818,12 +10702,12 @@ reponses:: taille des images : Grootte van de beelden : - web/prod/index.html.twig + web/prod/index.html.twig reponses::document sans titre Documenten zonder titel - classes/record/adapter.php + classes/record/adapter.php report :: aucun resultat trouve @@ -10911,7 +10795,7 @@ web/report/ajax_dashboard_content_child.html.twig web/report/ajax_data_content.html.twig web/report/ajax_data_content.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig web/report/chart.html.twig web/report/chart.html.twig web/report/report_layout.html.twig @@ -10958,7 +10842,7 @@ report:: Heures Uren - web/report/all_content.html.twig + web/report/all_content.html.twig report:: IP @@ -11176,7 +11060,7 @@ report:: jour Dag Controller/Report/ActivityController.php - web/report/all_content.html.twig + web/report/all_content.html.twig report:: module @@ -11268,7 +11152,7 @@ report:: page d'accueil Landingspagina - classes/record/preview.php + classes/record/preview.php report:: par %user_infos% @@ -11515,7 +11399,7 @@ report:: visualiseur cooliris Cooliris voorvertoning - classes/record/preview.php + classes/record/preview.php report::Changement de collection vers : %coll_name% @@ -11551,7 +11435,7 @@ report::Heures Uren web/report/ajax_data_content.html.twig - web/report/all_content.html.twig + web/report/all_content.html.twig report::Impression des formats : %format% @@ -11566,17 +11450,17 @@ report::Nombre de connexions Aantal connecties - web/report/all_content.html.twig + web/report/all_content.html.twig report::Nombre de document ajoute Aantel toegevoegde documenten - web/report/all_content.html.twig + web/report/all_content.html.twig report::Nombre de document edite Aantal bewerkte documenten - web/report/all_content.html.twig + web/report/all_content.html.twig report::Publication de %dest% @@ -11601,9 +11485,9 @@ report::acces direct Directe toegang - classes/record/preview.php - classes/record/preview.php - classes/record/preview.php + classes/record/preview.php + classes/record/preview.php + classes/record/preview.php report::activite @@ -11657,13 +11541,13 @@ reportage Reportage - Phrasea/Twig/PhraseanetExtension.php - Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php + Phrasea/Twig/PhraseanetExtension.php resultat numero %number% resultat numero %number% - classes/record/preview.php + classes/record/preview.php retourne "automobile", "automate", "autoroute", ... @@ -12564,7 +12448,7 @@ thumbnail validation thumbnail goedkeuring - actions/Tools/index.html.twig + actions/Tools/index.html.twig to @@ -12642,21 +12526,19 @@ validation:: NON NEE - mobile/lightbox/basket_element.html.twig + mobile/lightbox/basket_element.html.twig web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig validation:: OUI JA - mobile/lightbox/basket_element.html.twig + mobile/lightbox/basket_element.html.twig web/lightbox/agreement_box.html.twig - lightbox/IE6/agreement_box.html.twig validation:: editer ma note bewerk mijn mededeling - mobile/lightbox/basket_element.html.twig + mobile/lightbox/basket_element.html.twig validation:: note @@ -12671,12 +12553,10 @@ validation::envoyer mon rapport stuur mijn rapport - mobile/lightbox/validate.html.twig - mobile/lightbox/validate.html.twig + mobile/lightbox/validate.html.twig + mobile/lightbox/validate.html.twig web/lightbox/basket_options.html.twig web/lightbox/basket_options.html.twig - lightbox/IE6/basket_options.html.twig - lightbox/IE6/basket_options.html.twig version @@ -12686,7 +12566,7 @@ veuillez choisir au minimum une collection wilt u minimum één collectie kiezen - web/report/all_content.html.twig + web/report/all_content.html.twig video diff --git a/resources/locales/validators.de.xlf b/resources/locales/validators.de.xlf index 79a31cc061..c2c06ee7b0 100644 --- a/resources/locales/validators.de.xlf +++ b/resources/locales/validators.de.xlf @@ -1,6 +1,6 @@ - +
          The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. diff --git a/resources/locales/validators.en.xlf b/resources/locales/validators.en.xlf index 1f78cc4301..2671405191 100644 --- a/resources/locales/validators.en.xlf +++ b/resources/locales/validators.en.xlf @@ -1,6 +1,6 @@ - +
          The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. diff --git a/resources/locales/validators.fr.xlf b/resources/locales/validators.fr.xlf index 65fe1f04bc..4f7625d535 100644 --- a/resources/locales/validators.fr.xlf +++ b/resources/locales/validators.fr.xlf @@ -1,6 +1,6 @@ - +
          The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. diff --git a/resources/locales/validators.nl.xlf b/resources/locales/validators.nl.xlf index 82cecc9a45..2d655fac47 100644 --- a/resources/locales/validators.nl.xlf +++ b/resources/locales/validators.nl.xlf @@ -1,6 +1,6 @@ - +
          The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. From 144c2a9343aa0ee6d46e194a0361786340d5594f Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Thu, 19 May 2016 14:20:51 +0200 Subject: [PATCH 298/383] PHRAS-1105_Thesaurus_NOTOK_ES_2.3 -fix : during indexation, searching the thesaurus is done strictly, without score --- .../Elastic/ElasticSearchEngine.php | 3 +- .../Elastic/Indexer/Record/Fetcher.php | 1 - .../Record/Hydrator/ThesaurusHydrator.php | 5 -- .../SearchEngine/Elastic/Thesaurus.php | 72 ++++++++++++------- .../SearchEngine/Elastic/Thesaurus/Filter.php | 30 ++++++++ 5 files changed, 76 insertions(+), 35 deletions(-) diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticSearchEngine.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticSearchEngine.php index ba28fc5880..345c0aa0c8 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticSearchEngine.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/ElasticSearchEngine.php @@ -289,11 +289,10 @@ class ElasticSearchEngine implements SearchEngineInterface } $aggs = $this->getAggregationQueryParams($options); - if ($aggs) { $params['body']['aggs'] = $aggs; } -file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n%s\n\n", __FILE__, __LINE__, var_export($params, true), json_encode($params, JSON_PRETTY_PRINT)), FILE_APPEND); + $res = $this->client->search($params); $results = new ArrayCollection(); diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Fetcher.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Fetcher.php index c870a3c329..187809c573 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Fetcher.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Fetcher.php @@ -81,7 +81,6 @@ class Fetcher foreach ($this->hydrators as $hydrator) { $hydrator->hydrateRecords($records); } -file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($records, true)), FILE_APPEND); foreach ($records as $record) { if (!isset($record['id'])) { throw new Exception('No record hydrator set the "id" key.'); diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Hydrator/ThesaurusHydrator.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Hydrator/ThesaurusHydrator.php index 2a4c515ba4..4107285ac2 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Hydrator/ThesaurusHydrator.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Indexer/Record/Hydrator/ThesaurusHydrator.php @@ -62,7 +62,6 @@ class ThesaurusHydrator implements HydratorInterface $filters = array(); $field_names = array(); foreach ($fields as $name => $root_concepts) { -// file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s : %s\n", __FILE__, __LINE__, var_export($name, true), var_export($root_concepts, true)), FILE_APPEND); // Loop through all values to prepare bulk query $field_values = \igorw\get_in($record, explode('.', $index_fields[$name])); if ($field_values !== null) { @@ -82,10 +81,7 @@ class ThesaurusHydrator implements HydratorInterface if(empty($terms)) { return; } -file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($values, true)), FILE_APPEND); -file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($terms, true)), FILE_APPEND); $bulk = $this->thesaurus->findConceptsBulk($terms, null, $filters, true); -file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($bulk, true)), FILE_APPEND); foreach ($bulk as $offset => $item_concepts) { if ($item_concepts && is_array($item_concepts) && count($item_concepts)>0) { @@ -97,6 +93,5 @@ file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, _ $this->candidate_terms->insert($field_names[$offset], $values[$offset]); } } -// file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($record, true)), FILE_APPEND); } } diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus.php index 5e3ef41092..51942b5c28 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus.php @@ -48,7 +48,7 @@ class Thesaurus public function findConceptsBulk(array $terms, $lang = null, $filter = null, $strict = false) { $this->logger->debug(sprintf('Finding linked concepts in bulk for %d terms', count($terms))); -file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) Finding linked concepts in bulk for %d terms : %s\n", __FILE__, __LINE__, count($terms), var_export($terms, true)), FILE_APPEND); + // We use the same filter for all terms when a single one is given $filters = is_array($filter) ? $filter @@ -62,7 +62,7 @@ file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) Finding linked con foreach ($terms as $index => $term) { $concepts[] = $this->findConcepts($term, $lang, $filters[$index], $strict); } -// file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($concepts, true)), FILE_APPEND); + return $concepts; } @@ -80,7 +80,6 @@ file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) Finding linked con */ public function findConcepts($term, $lang = null, Filter $filter = null, $strict = false) { -file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, __LINE__, var_export($term, true)), FILE_APPEND); return $strict ? $this->findConceptsStrict($term, $lang, $filter) : @@ -99,7 +98,10 @@ file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, _ 'lang' => $lang )); - $query = [ + $must = []; + $filters = []; + + $must[] = [ 'match' => [ 'value.strict' => [ 'query' => $term->getValue(), @@ -107,44 +109,60 @@ file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, _ ], ], ]; - if ($term->hasContext()) { - $query = [ - 'bool' => [ - 'must' => [ - 0 => $query, - 1 => [ - 'match' => [ - 'context.strict' => [ - 'query' => $term->getContext(), - 'operator' => 'and', - ], - ], - ], + $must[] = [ + 'match' => [ + 'context.strict' => [ + 'query' => $term->getContext(), + 'operator' => 'and', ], ], ]; } else { - $context_filter = [ + $filters[] = [ 'missing' => [ 'field' => 'context' ] ]; - $query = self::applyQueryFilter($query, $context_filter); } - if ($lang) { - $lang_filter = [ + $filters[] = [ 'term' => [ 'lang' => $lang ] ]; - $query = self::applyQueryFilter($query, $lang_filter); + } + if ($filter) { + $filters = array_merge($filters, $filter->getQueryFilters()); + } + if(!empty($filters)) { + if (count($filters) > 1) { + $must[] = [ + 'constant_score' => [ + 'filter' => [ + 'and' => $filters + ] + ] + ]; + } + else { + $must[] = [ + 'constant_score' => [ + 'filter' => $filters[0] + ] + ]; + } } - if ($filter) { - $this->logger->debug('Using filter', array('filter' => Filter::dump($filter))); - $query = self::applyQueryFilter($query, $filter->getQueryFilter()); + if(count($must) > 1) { + $query = [ + 'bool' => [ + 'must' => $must + ] + ]; + } + else { + $query = $must[0]; } // Path deduplication @@ -162,7 +180,7 @@ file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n", __FILE__, _ $this->logger->debug('Sending search', $params['body']); $response = $this->client->search($params); -file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n%s\n\n", __FILE__, __LINE__, json_encode($params, JSON_PRETTY_PRINT), var_export($response, true)), FILE_APPEND); + // Extract concept paths from response $concepts = array(); $buckets = \igorw\get_in($response, ['aggregations', 'dedup', 'buckets'], []); @@ -248,7 +266,7 @@ file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n%s\n\n", __FIL $this->logger->debug('Sending search', $params['body']); $response = $this->client->search($params); -file_put_contents("/tmp/phraseanet-log.txt", sprintf("%s (%d) %s\n%s\n\n", __FILE__, __LINE__, json_encode($params, JSON_PRETTY_PRINT), var_export($response, true)), FILE_APPEND); + // Extract concept paths from response $concepts = array(); $buckets = \igorw\get_in($response, ['aggregations', 'dedup', 'buckets'], []); diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus/Filter.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus/Filter.php index 7e24307a83..f8ac7030e5 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus/Filter.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/Thesaurus/Filter.php @@ -46,4 +46,34 @@ class Filter return $filter; } + + public function getQueryFilters() + { + $filters = [ + [ + 'term' => [ + 'databox_id' => $this->databox_id + ] + ] + ]; + if(!empty($this->paths)) { + if (count($this->paths) == 1) { + $filters[] = [ + 'term' => [ + 'path' => $this->paths[0] + ] + ]; + } + else { + $filters[] = [ + 'terms' => [ + 'path' => $this->paths + ] + ]; + } + } + + return $filters; + } + } From 91bfa11754323af06eb24c3d09205982783baf7a Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Mon, 23 May 2016 11:52:35 +0200 Subject: [PATCH 299/383] PHRAS-851 - add databox name, collection name and logo to record title in preview Bump Phraseanet Production Client --- lib/Alchemy/Phrasea/Controller/Prod/RecordController.php | 1 + lib/classes/record/preview.php | 2 +- package.json | 2 +- resources/www/prod/skins/ui-components/_modal-preview.scss | 7 +++++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php b/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php index 257184f66f..9a48d92121 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php @@ -113,6 +113,7 @@ class RecordController extends Controller ]), "pos" => $record->getNumber(), "title" => str_replace(array('[[em]]', '[[/em]]'), array('', ''), $record->get_title($query, $searchEngine)), + "databox_name" => $record->getDatabox()->get_dbname(), "collection_name" => $record->getCollection()->get_name(), "collection_logo" => $record->getCollection()->getLogo($record->getBaseId(), $this->app), ]); diff --git a/lib/classes/record/preview.php b/lib/classes/record/preview.php index 4c84db903e..491c3ad280 100644 --- a/lib/classes/record/preview.php +++ b/lib/classes/record/preview.php @@ -258,7 +258,7 @@ class record_preview extends record_adapter return $this->title; } - $this->title = collection::getLogo($this->getBaseId(), $this->app) . ' '; + $this->title = ''; switch ($this->env) { diff --git a/package.json b/package.json index 52176c664b..b9d8f4cd37 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,6 @@ "postinstall": "./node_modules/.bin/gulp install;" }, "dependencies": { - "phraseanet-production-client": "~0.17.2" + "phraseanet-production-client": "~0.18.0" } } diff --git a/resources/www/prod/skins/ui-components/_modal-preview.scss b/resources/www/prod/skins/ui-components/_modal-preview.scss index 2c34375c2b..a4505184aa 100644 --- a/resources/www/prod/skins/ui-components/_modal-preview.scss +++ b/resources/www/prod/skins/ui-components/_modal-preview.scss @@ -16,8 +16,11 @@ cursor: pointer; } -#PREVIEWBOX #PREVIEWTITLE_COLLNAME { - display: none; +#PREVIEWBOX #PREVIEWTITLE_COLLLOGO { + img { + width: 16px; + height: 16px; + } } .PREVIEW_PIC, .PREVIEW_HD { From 2ce7b23a005c9690e953718812bb191e26e9b0ca Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Fri, 20 May 2016 15:04:38 +0200 Subject: [PATCH 300/383] PHRAS-1115 - fix lightbox mobile events handling --- templates/mobile/lightbox/basket_element.html.twig | 11 ++++++++++- templates/mobile/lightbox/note_form.html.twig | 10 ++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/templates/mobile/lightbox/basket_element.html.twig b/templates/mobile/lightbox/basket_element.html.twig index ef2881ad2c..2d2228f6c9 100644 --- a/templates/mobile/lightbox/basket_element.html.twig +++ b/templates/mobile/lightbox/basket_element.html.twig @@ -5,8 +5,17 @@ {% block javascript %} -{% endblock %} + +{% endblock %} {% block stylesheet %} diff --git a/templates/mobile/lightbox/note_form.html.twig b/templates/mobile/lightbox/note_form.html.twig index daa36631ab..ce307a3511 100644 --- a/templates/mobile/lightbox/note_form.html.twig +++ b/templates/mobile/lightbox/note_form.html.twig @@ -5,6 +5,16 @@ {% block javascript %} + {% endblock %} {% block stylesheet %} From cd530b4696e2a008f6ec08ba50c11d17c0f65302 Mon Sep 17 00:00:00 2001 From: Thibaud Fabre Date: Wed, 25 May 2016 17:40:10 +0200 Subject: [PATCH 301/383] Fix merge failure in V1Controller --- .../Phrasea/Controller/Api/V1Controller.php | 121 +----------------- 1 file changed, 1 insertion(+), 120 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php index db69f75d3e..981d26fe6c 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php +++ b/lib/Alchemy/Phrasea/Controller/Api/V1Controller.php @@ -85,10 +85,8 @@ use Alchemy\Phrasea\Status\StatusStructure; use Alchemy\Phrasea\TaskManager\LiveInformation; use Alchemy\Phrasea\Utilities\NullableDateTime; use Doctrine\ORM\EntityManager; -<<<<<<< HEAD -======= + use JMS\TranslationBundle\Annotation\Ignore; ->>>>>>> 4.0 use League\Fractal\Resource\Item; use Symfony\Component\Form\Form; use Symfony\Component\HttpFoundation\File\UploadedFile; @@ -1215,7 +1213,6 @@ class V1Controller extends Controller ->getRecordRepository() ->findChildren($storyIds, $user); $children[$databoxId] = array_combine($storyIds, $selections); -<<<<<<< HEAD } /** @var StoryView[] $storyViews */ @@ -1259,51 +1256,6 @@ class V1Controller extends Controller $allChildren[$index] = $childrenView->getRecord(); } -======= - } - - /** @var StoryView[] $storyViews */ - $storyViews = []; - /** @var RecordView[] $childrenViews */ - $childrenViews = []; - - foreach ($stories as $index => $story) { - $storyView = new StoryView($story); - - $selection = $children[$story->getDataboxId()][$story->getRecordId()]; - - $childrenView = $this->buildRecordViews($selection); - - foreach ($childrenView as $view) { - $childrenViews[spl_object_hash($view)] = $view; - } - - $storyView->setChildren($childrenView); - - $storyViews[$index] = $storyView; - } - - if (in_array('results.stories.thumbnail', $includes, true)) { - $subdefViews = $this->buildSubdefsViews($stories, ['thumbnail'], $urlTTL); - - foreach ($storyViews as $index => $storyView) { - $storyView->setSubdefs($subdefViews[$index]); - } - } - - if (in_array('results.stories.metadatas', $includes, true)) { - $captions = $this->app['service.caption']->findByReferenceCollection($stories); - $canSeeBusiness = $this->retrieveSeeBusinessPerDatabox($stories); - - $this->buildCaptionViews($storyViews, $captions, $canSeeBusiness); - } - - $allChildren = new RecordCollection(); - foreach ($childrenViews as $index => $childrenView) { - $allChildren[$index] = $childrenView->getRecord(); - } - ->>>>>>> 4.0 $names = in_array('results.stories.records.subdefs', $includes, true) ? null : ['thumbnail']; $subdefViews = $this->buildSubdefsViews($allChildren, $names, $urlTTL); $technicalDatasets = $this->app['service.technical_data']->fetchRecordsTechnicalData($allChildren); @@ -1420,7 +1372,6 @@ class V1Controller extends Controller /** @var \media_subdef $subdef */ foreach ($allSubdefs as $index => $subdef) { $subdefView = new SubdefView($subdef); -<<<<<<< HEAD if (isset($allPermalinks[$index])) { $subdefView->setPermalinkView(new PermalinkView($allPermalinks[$index])); @@ -1489,76 +1440,6 @@ class V1Controller extends Controller ]; } -======= - - if (isset($allPermalinks[$index])) { - $subdefView->setPermalinkView(new PermalinkView($allPermalinks[$index])); - } - - $subdefView->setUrl($urls[$index]); - $subdefView->setUrlTTL($urlTTL); - - $subdefViews[spl_object_hash($subdef)] = $subdefView; - } - - $reorderedGroups = []; - - /** @var \media_subdef[] $subdefGroup */ - foreach ($subdefGroups as $index => $subdefGroup) { - $reordered = []; - - foreach ($subdefGroup as $subdef) { - $reordered[] = $subdefViews[spl_object_hash($subdef)]; - } - - $reorderedGroups[$index] = $reordered; - } - - return $reorderedGroups; - } - - /** - * Returns requested includes - * - * @param Request $request - * @return string[] - */ - private function resolveSearchIncludes(Request $request) - { - if ($request->attributes->get('_extended', false)) { - return [ - 'results.stories.records.subdefs', - 'results.stories.records.metadata', - 'results.stories.records.caption', - 'results.stories.records.status', - 'results.records.subdefs', - 'results.records.metadata', - 'results.records.caption', - 'results.records.status', - ]; - } - - return []; - } - - /** - * Returns requested includes - * - * @param Request $request - * @return string[] - */ - private function resolveSearchRecordsIncludes(Request $request) - { - if ($request->attributes->get('_extended', false)) { - return [ - 'results.subdefs', - 'results.metadata', - 'results.caption', - 'results.status', - ]; - } - ->>>>>>> 4.0 return []; } From 11b850897a582e73d9610551d79367a7c2dfa9ab Mon Sep 17 00:00:00 2001 From: Thibaud Fabre Date: Wed, 25 May 2016 18:05:47 +0200 Subject: [PATCH 302/383] Remove unneeded method --- tests/classes/PhraseanetTestCase.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/tests/classes/PhraseanetTestCase.php b/tests/classes/PhraseanetTestCase.php index 6297845ae3..a3efdd2ea1 100644 --- a/tests/classes/PhraseanetTestCase.php +++ b/tests/classes/PhraseanetTestCase.php @@ -693,23 +693,7 @@ abstract class PhraseanetTestCase extends WebTestCase ->with($this->isInstanceOf($expectedMail), $this->equalTo($receipt)); $app['notification.deliverer'] = $delivererMock; } - - protected function mockNotificationsDeliverer(array &$expectedMails) - { - $app = $this->getApplication(); - $delivererMock = $this->getMockBuilder('Alchemy\Phrasea\Notification\Deliverer') - ->disableOriginalConstructor() - ->getMock(); - - $delivererMock->expects($this->any()) - ->method('deliver') - ->will($this->returnCallback(function ($email, $receipt) use (&$expectedMails) { - $this->assertTrue(isset($expectedMails[get_class($email)])); - $expectedMails[get_class($email)]++; - })); - $app['notification.deliverer'] = $delivererMock; - } - + protected function mockUserNotificationSettings($notificationName, $returnValue = true) { $app = $this->getApplication(); From 6a3bddf25981bae5c71432f003a74783cd6bd9f3 Mon Sep 17 00:00:00 2001 From: Mathieu Justeau Date: Fri, 27 May 2016 16:21:19 +0000 Subject: [PATCH 303/383] Fix upgrade from 3.8 to 4.0 --- lib/classes/patch/390alpha13a.php | 2 +- lib/classes/patch/390alpha6a.php | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/classes/patch/390alpha13a.php b/lib/classes/patch/390alpha13a.php index 3b96e50b46..6b6a3a054b 100644 --- a/lib/classes/patch/390alpha13a.php +++ b/lib/classes/patch/390alpha13a.php @@ -77,7 +77,7 @@ class patch_390alpha13a implements patchInterface foreach ($rs as $row) { try { - $user = $em->createQuery('SELECT PARTIAL u.{id} FROM Phraseanet:User s WHERE u.id = :id') + $user = $em->createQuery('SELECT PARTIAL u.{id} FROM Phraseanet:User u WHERE u.id = :id') ->setParameters(['id' => $row['usr_id']]) ->setHint(Query::HINT_FORCE_PARTIAL_LOAD, true) ->getSingleResult(); diff --git a/lib/classes/patch/390alpha6a.php b/lib/classes/patch/390alpha6a.php index d9e2a373c0..19fa31685d 100644 --- a/lib/classes/patch/390alpha6a.php +++ b/lib/classes/patch/390alpha6a.php @@ -110,7 +110,7 @@ class patch_390alpha6a extends patchAbstract ->setDestfolder($row['destfolder']) ->setSendermail($row['sendermail']) ->setTextMailReceiver($row['text_mail_sender']) - ->setTextMailSender($row['text_mail_reveiver']) + ->setTextMailSender($row['text_mail_receiver']) ->setUser($user) ->setCreated(new \DateTime($row['date'])) ->setUpdated(new \DateTime($row['date'])) @@ -122,18 +122,18 @@ class patch_390alpha6a extends patchAbstract $stmt->execute(['export_id' => $row['id']]); $rs = $stmt->fetchAll(\PDO::FETCH_ASSOC); - foreach ($rs as $element) { + foreach ($rs as $element_row) { $element = new FtpExportElement(); - $element->setBaseId($row['base_id']) - ->setRecordId($row['record_id']) - ->setBusinessfields($row['businessfields']) + $element->setBaseId($element_row['base_id']) + ->setRecordId($element_row['record_id']) + ->setBusinessfields($element_row['businessfields']) ->setCreated(new \DateTime($row['date'])) ->setUpdated(new \DateTime($row['date'])) - ->setDone(!!$row['done']) - ->setError(!!$row['error']) - ->setFilename($row['filename']) - ->setFolder($row['folder']) - ->setSubdef($row['subdef']) + ->setDone(!!$element_row['done']) + ->setError(!!$element_row['error']) + ->setFilename($element_row['filename']) + ->setFolder($element_row['folder']) + ->setSubdef($element_row['subdef']) ->setExport($export); $export->addElement($element); From 915b2eaf09cc52ff457bcdb06f320b60bb4078e7 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Tue, 31 May 2016 14:12:54 +0200 Subject: [PATCH 304/383] PHRAS-1125_PDF-THUMBNAIL-TITLE fix : on thumbnail grid (pdf), thumbnail title is now over the thumbnail image. --- lib/Alchemy/Phrasea/Out/Module/PDF.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/Out/Module/PDF.php b/lib/Alchemy/Phrasea/Out/Module/PDF.php index bdbd809655..ab62ce1aa4 100644 --- a/lib/Alchemy/Phrasea/Out/Module/PDF.php +++ b/lib/Alchemy/Phrasea/Out/Module/PDF.php @@ -190,8 +190,6 @@ class PDF $t = $irow . '-' . $x; $t = $rec->get_title(); - $this->pdf->MultiCell($DiapoW, $TitleH, $t, '0', 'C', false); - if ($links) { $lk = $this->pdf->AddLink(); $this->pdf->SetLink($lk, 0, $npages + $rec->getNumber()); @@ -209,6 +207,8 @@ class PDF , $wimg, $himg ); } + + $this->pdf->MultiCell($DiapoW, $TitleH, $t, '0', 'C', false); } } $this->pdf->SetLeftMargin($oldMargins['left']); From c279a04b85a827c789fe130da09eb93ca9dcbf71 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Wed, 23 Mar 2016 17:56:32 +0100 Subject: [PATCH 305/383] wip: move styles into phraseanet-production-client module --- resources/gulp/build.js | 2 - resources/gulp/components/prod.js | 54 +- .../gulp/components/vendors/colorpicker.js | 20 - .../vendors/jquery-image-enhancer.js | 17 - resources/gulp/watch.js | 1 - .../www/prod/skins/000000/skin-000000.scss | 163 ------ .../www/prod/skins/959595/skin-959595.scss | 179 ------ .../www/prod/skins/FFFFFF/skin-FFFFFF.scss | 192 ------ resources/www/prod/skins/skin-shared.scss | 550 ------------------ .../prod/skins/ui-components/_actions.scss | 113 ---- .../skins/ui-components/_answers-tools.scss | 117 ---- .../prod/skins/ui-components/_answers.scss | 241 -------- .../prod/skins/ui-components/_buttons.scss | 25 - .../skins/ui-components/_colorpicker.scss | 51 -- .../skins/ui-components/_context-menu.scss | 82 --- .../www/prod/skins/ui-components/_diapo.scss | 108 ---- .../www/prod/skins/ui-components/_forms.scss | 38 -- .../prod/skins/ui-components/_gui-misc.scss | 107 ---- .../www/prod/skins/ui-components/_gui.scss | 92 --- .../prod/skins/ui-components/_jquery-ui.scss | 287 --------- .../ui-components/_modal-basket-pref.scss | 146 ----- .../skins/ui-components/_modal-bridge.scss | 301 ---------- .../prod/skins/ui-components/_modal-edit.scss | 511 ---------------- .../skins/ui-components/_modal-export.scss | 33 -- .../ui-components/_modal-preferences.scss | 36 -- .../skins/ui-components/_modal-preview.scss | 234 -------- .../skins/ui-components/_modal-publish.scss | 50 -- .../prod/skins/ui-components/_modal-push.scss | 332 ----------- .../prod/skins/ui-components/_pagination.scss | 104 ---- .../skins/ui-components/_search-form.scss | 123 ---- .../skins/ui-components/_thumb-extractor.scss | 155 ----- .../www/prod/skins/ui-components/_upload.scss | 253 -------- .../ui-components/_workzone-baskets.scss | 185 ------ .../ui-components/_workzone-plugins.scss | 10 - .../ui-components/_workzone-proposals.scss | 159 ----- .../ui-components/_workzone-thesaurus.scss | 235 -------- .../prod/skins/ui-components/_workzone.scss | 196 ------- resources/www/prod/styles/_ie7.scss | 32 - resources/www/prod/styles/_ie8.scss | 25 - resources/www/prod/styles/main.scss | 150 ----- .../vendors/colorpicker/css/colorpicker.css | 161 ----- .../www/vendors/colorpicker/css/layout.css | 218 ------- .../www/vendors/colorpicker/images/Thumbs.db | Bin 19968 -> 0 bytes .../www/vendors/colorpicker/images/blank.gif | Bin 49 -> 0 bytes .../images/colorpicker_background.png | Bin 1806 -> 0 bytes .../colorpicker/images/colorpicker_hex.png | Bin 532 -> 0 bytes .../colorpicker/images/colorpicker_hsb_b.png | Bin 970 -> 0 bytes .../colorpicker/images/colorpicker_hsb_h.png | Bin 1012 -> 0 bytes .../colorpicker/images/colorpicker_hsb_s.png | Bin 1171 -> 0 bytes .../colorpicker/images/colorpicker_indic.gif | Bin 86 -> 0 bytes .../images/colorpicker_overlay.png | Bin 10355 -> 0 bytes .../colorpicker/images/colorpicker_rgb_b.png | Bin 970 -> 0 bytes .../colorpicker/images/colorpicker_rgb_g.png | Bin 1069 -> 0 bytes .../colorpicker/images/colorpicker_rgb_r.png | Bin 1066 -> 0 bytes .../colorpicker/images/colorpicker_select.gif | Bin 78 -> 0 bytes .../colorpicker/images/colorpicker_submit.png | Bin 984 -> 0 bytes .../colorpicker/images/custom_background.png | Bin 1916 -> 0 bytes .../vendors/colorpicker/images/custom_hex.png | Bin 562 -> 0 bytes .../colorpicker/images/custom_hsb_b.png | Bin 1097 -> 0 bytes .../colorpicker/images/custom_hsb_h.png | Bin 970 -> 0 bytes .../colorpicker/images/custom_hsb_s.png | Bin 1168 -> 0 bytes .../colorpicker/images/custom_indic.gif | Bin 86 -> 0 bytes .../colorpicker/images/custom_rgb_b.png | Bin 1008 -> 0 bytes .../colorpicker/images/custom_rgb_g.png | Bin 1069 -> 0 bytes .../colorpicker/images/custom_rgb_r.png | Bin 1018 -> 0 bytes .../colorpicker/images/custom_submit.png | Bin 997 -> 0 bytes .../www/vendors/colorpicker/images/select.png | Bin 506 -> 0 bytes .../vendors/colorpicker/images/select2.png | Bin 518 -> 0 bytes .../www/vendors/colorpicker/images/slider.png | Bin 315 -> 0 bytes .../www/vendors/colorpicker/js/colorpicker.js | 484 --------------- resources/www/vendors/colorpicker/js/eye.js | 34 -- .../www/vendors/colorpicker/js/layout.js | 67 --- resources/www/vendors/colorpicker/js/utils.js | 252 -------- .../colorpicker/styles/colorpicker.scss | 162 ------ .../js/jquery.image_enhancer.js | 236 -------- .../styles/jquery.image_enhancer.scss | 53 -- templates/web/prod/index.html.twig | 20 +- 77 files changed, 17 insertions(+), 7379 deletions(-) delete mode 100644 resources/gulp/components/vendors/colorpicker.js delete mode 100644 resources/gulp/components/vendors/jquery-image-enhancer.js delete mode 100644 resources/www/prod/skins/000000/skin-000000.scss delete mode 100644 resources/www/prod/skins/959595/skin-959595.scss delete mode 100644 resources/www/prod/skins/FFFFFF/skin-FFFFFF.scss delete mode 100644 resources/www/prod/skins/skin-shared.scss delete mode 100644 resources/www/prod/skins/ui-components/_actions.scss delete mode 100644 resources/www/prod/skins/ui-components/_answers-tools.scss delete mode 100644 resources/www/prod/skins/ui-components/_answers.scss delete mode 100644 resources/www/prod/skins/ui-components/_buttons.scss delete mode 100644 resources/www/prod/skins/ui-components/_colorpicker.scss delete mode 100644 resources/www/prod/skins/ui-components/_context-menu.scss delete mode 100644 resources/www/prod/skins/ui-components/_diapo.scss delete mode 100644 resources/www/prod/skins/ui-components/_forms.scss delete mode 100644 resources/www/prod/skins/ui-components/_gui-misc.scss delete mode 100644 resources/www/prod/skins/ui-components/_gui.scss delete mode 100644 resources/www/prod/skins/ui-components/_jquery-ui.scss delete mode 100644 resources/www/prod/skins/ui-components/_modal-basket-pref.scss delete mode 100644 resources/www/prod/skins/ui-components/_modal-bridge.scss delete mode 100644 resources/www/prod/skins/ui-components/_modal-edit.scss delete mode 100644 resources/www/prod/skins/ui-components/_modal-export.scss delete mode 100644 resources/www/prod/skins/ui-components/_modal-preferences.scss delete mode 100644 resources/www/prod/skins/ui-components/_modal-preview.scss delete mode 100644 resources/www/prod/skins/ui-components/_modal-publish.scss delete mode 100644 resources/www/prod/skins/ui-components/_modal-push.scss delete mode 100644 resources/www/prod/skins/ui-components/_pagination.scss delete mode 100644 resources/www/prod/skins/ui-components/_search-form.scss delete mode 100644 resources/www/prod/skins/ui-components/_thumb-extractor.scss delete mode 100644 resources/www/prod/skins/ui-components/_upload.scss delete mode 100644 resources/www/prod/skins/ui-components/_workzone-baskets.scss delete mode 100644 resources/www/prod/skins/ui-components/_workzone-plugins.scss delete mode 100644 resources/www/prod/skins/ui-components/_workzone-proposals.scss delete mode 100644 resources/www/prod/skins/ui-components/_workzone-thesaurus.scss delete mode 100644 resources/www/prod/skins/ui-components/_workzone.scss delete mode 100644 resources/www/prod/styles/_ie7.scss delete mode 100644 resources/www/prod/styles/_ie8.scss delete mode 100644 resources/www/prod/styles/main.scss delete mode 100644 resources/www/vendors/colorpicker/css/colorpicker.css delete mode 100644 resources/www/vendors/colorpicker/css/layout.css delete mode 100644 resources/www/vendors/colorpicker/images/Thumbs.db delete mode 100644 resources/www/vendors/colorpicker/images/blank.gif delete mode 100644 resources/www/vendors/colorpicker/images/colorpicker_background.png delete mode 100644 resources/www/vendors/colorpicker/images/colorpicker_hex.png delete mode 100644 resources/www/vendors/colorpicker/images/colorpicker_hsb_b.png delete mode 100644 resources/www/vendors/colorpicker/images/colorpicker_hsb_h.png delete mode 100644 resources/www/vendors/colorpicker/images/colorpicker_hsb_s.png delete mode 100644 resources/www/vendors/colorpicker/images/colorpicker_indic.gif delete mode 100644 resources/www/vendors/colorpicker/images/colorpicker_overlay.png delete mode 100644 resources/www/vendors/colorpicker/images/colorpicker_rgb_b.png delete mode 100644 resources/www/vendors/colorpicker/images/colorpicker_rgb_g.png delete mode 100644 resources/www/vendors/colorpicker/images/colorpicker_rgb_r.png delete mode 100644 resources/www/vendors/colorpicker/images/colorpicker_select.gif delete mode 100644 resources/www/vendors/colorpicker/images/colorpicker_submit.png delete mode 100644 resources/www/vendors/colorpicker/images/custom_background.png delete mode 100644 resources/www/vendors/colorpicker/images/custom_hex.png delete mode 100644 resources/www/vendors/colorpicker/images/custom_hsb_b.png delete mode 100644 resources/www/vendors/colorpicker/images/custom_hsb_h.png delete mode 100644 resources/www/vendors/colorpicker/images/custom_hsb_s.png delete mode 100644 resources/www/vendors/colorpicker/images/custom_indic.gif delete mode 100644 resources/www/vendors/colorpicker/images/custom_rgb_b.png delete mode 100644 resources/www/vendors/colorpicker/images/custom_rgb_g.png delete mode 100644 resources/www/vendors/colorpicker/images/custom_rgb_r.png delete mode 100644 resources/www/vendors/colorpicker/images/custom_submit.png delete mode 100644 resources/www/vendors/colorpicker/images/select.png delete mode 100644 resources/www/vendors/colorpicker/images/select2.png delete mode 100644 resources/www/vendors/colorpicker/images/slider.png delete mode 100644 resources/www/vendors/colorpicker/js/colorpicker.js delete mode 100644 resources/www/vendors/colorpicker/js/eye.js delete mode 100644 resources/www/vendors/colorpicker/js/layout.js delete mode 100644 resources/www/vendors/colorpicker/js/utils.js delete mode 100644 resources/www/vendors/colorpicker/styles/colorpicker.scss delete mode 100644 resources/www/vendors/jquery-image-enhancer/js/jquery.image_enhancer.js delete mode 100644 resources/www/vendors/jquery-image-enhancer/styles/jquery.image_enhancer.scss diff --git a/resources/gulp/build.js b/resources/gulp/build.js index 27b3f049bc..63dc8beba8 100644 --- a/resources/gulp/build.js +++ b/resources/gulp/build.js @@ -29,14 +29,12 @@ gulp.task('build-vendors', [ 'build-alchemy-embed', 'build-phraseanet-production-client', 'build-bootstrap', - 'build-colorpicker', 'build-html5shiv', 'build-jquery', 'build-jquery-ui', // will build themes too 'build-jquery-mobile', 'build-jquery-galleria', 'build-jquery-file-upload', - // 'build-jquery-image-enhancer', //bundled in prod only 'build-json2', 'build-modernizr', 'build-zxcvbn', diff --git a/resources/gulp/components/prod.js b/resources/gulp/components/prod.js index b53360f4da..ecefb99a6e 100644 --- a/resources/gulp/components/prod.js +++ b/resources/gulp/components/prod.js @@ -14,67 +14,17 @@ gulp.task('build-uploadFlash', function(){ return utils.buildJsGroup(uploadFlashGroup, 'uploadFlash', 'upload/js'); }); -gulp.task('copy-prod-skin-black-images', function(){ - return gulp.src([ - config.paths.src + 'prod/skins/000000/images/**/*' - ]) - .pipe(gulp.dest( config.paths.build + 'prod/skins/000000/images')); -}); - -gulp.task('copy-prod-skin-grey-images', function(){ - return gulp.src([ - config.paths.src + 'prod/skins/959595/images/**/*' - ]) - .pipe(gulp.dest( config.paths.build + 'prod/skins/959595/images')); -}); - -gulp.task('copy-prod-skin-white-images', function(){ - return gulp.src([ - config.paths.src + 'prod/skins/FFFFFF/images/**/*' - ]) - .pipe(gulp.dest( config.paths.build + 'prod/skins/FFFFFF/images')); -}); - gulp.task('copy-prod-images', function(){ return gulp.src([config.paths.src + 'prod/images/**/*']) .pipe(gulp.dest( config.paths.build + 'prod/images')); }); -gulp.task('build-prod-skin-black', ['copy-prod-skin-black-images'], function(){ - return utils.buildCssGroup([ - config.paths.src + 'prod/skins/000000/skin-000000.scss' - ], 'skin-000000', 'prod/skins/000000/', debugMode); -}); - -gulp.task('build-prod-skin-grey', ['copy-prod-skin-grey-images'], function(){ - return utils.buildCssGroup([ - config.paths.src + 'prod/skins/959595/skin-959595.scss' - ], 'skin-959595', 'prod/skins/959595/', debugMode); -}); - -gulp.task('build-prod-skin-white', ['copy-prod-skin-white-images'], function(){ - return utils.buildCssGroup([ - config.paths.src + 'prod/skins/FFFFFF/skin-FFFFFF.scss' - ], 'skin-FFFFFF', 'prod/skins/FFFFFF/', debugMode); -}); - -gulp.task('build-prod-css', ['build-prod-skin-black', 'build-prod-skin-grey', 'build-prod-skin-white'], function(){ - return utils.buildCssGroup([ - config.paths.src + 'prod/styles/main.scss' - ], 'prod', 'prod/css/', debugMode); -}); - gulp.task('test-prod', function () { return gulp.src(config.paths.src + 'prod/js/tests/*.html') .pipe(qunit()); }); -gulp.task('watch-prod-css', function() { - debugMode = true; - return gulp.watch(config.paths.src + 'prod/**/*.scss', ['build-prod-css']); -}); - -gulp.task('build-prod', ['copy-prod-images'], function(){ +gulp.task('build-prod', [], function(){ debugMode = false; - return gulp.start('build-prod-css'); + return gulp.start('copy-prod-images'); }); diff --git a/resources/gulp/components/vendors/colorpicker.js b/resources/gulp/components/vendors/colorpicker.js deleted file mode 100644 index 0d28ea8657..0000000000 --- a/resources/gulp/components/vendors/colorpicker.js +++ /dev/null @@ -1,20 +0,0 @@ -var gulp = require('gulp'); -var config = require('../../config.js'); -var utils = require('../../utils.js'); - -gulp.task('copy-colorpicker-images', function(){ - return gulp.src([config.paths.src + 'vendors/colorpicker/images/**/*']) - .pipe(gulp.dest( config.paths.build + 'vendors/colorpicker/images')); -}); - -gulp.task('build-colorpicker-css', function(){ - return utils.buildCssGroup([ - config.paths.src + 'vendors/colorpicker/styles/colorpicker.scss' - ], 'colorpicker', 'vendors/colorpicker'); -}); - -gulp.task('build-colorpicker', ['build-colorpicker-css', 'copy-colorpicker-images'], function(){ - return utils.buildJsGroup([ - config.paths.src + 'vendors/colorpicker/js/colorpicker.js' - ], 'colorpicker', 'vendors/colorpicker'); -}); \ No newline at end of file diff --git a/resources/gulp/components/vendors/jquery-image-enhancer.js b/resources/gulp/components/vendors/jquery-image-enhancer.js deleted file mode 100644 index d3c68031e5..0000000000 --- a/resources/gulp/components/vendors/jquery-image-enhancer.js +++ /dev/null @@ -1,17 +0,0 @@ -var gulp = require('gulp'); -var config = require('../../config.js'); -var utils = require('../../utils.js'); - - - -gulp.task('build-jquery-image-enhancer-css', function(){ - return utils.buildCssGroup([ - config.paths.src + 'vendors/jquery-image-enhancer/styles/jquery.image_enhancer.scss' - ], 'jquery-image-enhancer', 'vendors/jquery-image-enhancer'); -}); - -gulp.task('build-jquery-image-enhancer', ['build-jquery-image-enhancer-css'], function(){ - return utils.buildJsGroup([ - config.paths.src + 'vendors/jquery-image-enhancer/js/jquery.image_enhancer.js' - ], 'jquery-image-enhancer', 'vendors/jquery-image-enhancer'); -}); \ No newline at end of file diff --git a/resources/gulp/watch.js b/resources/gulp/watch.js index 20e48c9f4c..4c087a56d5 100644 --- a/resources/gulp/watch.js +++ b/resources/gulp/watch.js @@ -8,7 +8,6 @@ var utils = require('./utils.js'); gulp.task('watch-css', function(){ gulp.start('watch-common-css'); gulp.start('watch-oauth-css'); - gulp.start('watch-prod-css'); gulp.start('watch-thesaurus-css'); //gulp.start('watch-uploadFlash'); gulp.start('watch-lightbox-css'); diff --git a/resources/www/prod/skins/000000/skin-000000.scss b/resources/www/prod/skins/000000/skin-000000.scss deleted file mode 100644 index 60e83d915a..0000000000 --- a/resources/www/prod/skins/000000/skin-000000.scss +++ /dev/null @@ -1,163 +0,0 @@ -$skinsImagesPath: '/assets/vendors/jquery-ui/images/dark-hive/'; - -$defaultBorderColor: #303030; -$defaultBorderRadius: 2px; - -$textPrimaryColor: #FFFFFF; //#b1b1b1; -$textPrimaryHoverColor: #FFFFFF; -$textPrimaryActiveColor: #FFFFFF; -$textPrimaryInverseColor: #3b3b3b; -$textSecondaryColor: #999999; - -$highlightDarkerColor: #0c4554; - -$highlightBackgroundColor: #076882; -$highlightBackgroundAltColor: #0c4554; -$highlightBorderColor: #0c4554; -$highlightTextColor: #FFFFFF; - -$darkerBackgroundColor: #1A1A1A; -$darkerBorderColor: #404040; -$darkerTextColor: #FFFFFF; -$darkerTextHoverColor: #FFFFFF; - -$darkBackgroundColor: #292929; -$darkBorderColor: #303030; -$darkTextColor: #A6A6A6; - -$mediumBackgroundColor: #3b3b3b; -$mediumBackgroundHoverColor: #666666; -$mediumBorderColor: #303030; //#404040; // -$mediumBorderHighlightColor: $darkerBorderColor; //#666666; -$mediumTextColor: #a1a1a1; -$mediumTextHoverColor: #EAEAEA; -$mediumTextActiveColor: #EAEAEA; - -$lightBackgroundColor: #404040; -$lightBackgroundSelectedColor: lighten($lightBackgroundColor, 10); -$lightBackgroundActiveColor: lighten($lightBackgroundColor, 10); -$lightBorderColor: #404040; -$lightBorderSelectedColor: lighten($lightBorderColor, 10); -$lightBorderActiveColor: lighten($lightBorderColor, 10); -$lightTextColor: #FFFFFF; - -// inverse -$textInverseColor: #FFFFFF; -$textInverseHoverColor: #000; -$bgInverseHoverColor: #FFF; - -/******* GLOBAL PROD **********************************************************/ - -$scrollBgColor: #3b3b3b; - -$paginateBorderColor: #3b3b3b; -$paginateTextColor: #3b3b3b; -$paginateBg1: #141414; -$contextMenuBgHover: $highlightDarkerColor; - - -$uploadBg1: #FFFFFF; -$uploadBg2: #FFFFFF; -$uploadLoaderImg: 'loader-black.gif'; - -$bridgeDropdownToggleBg: #222222; -$bridgeDropdownMenuBg: #393939; -$bridgeDropdownMenuBorder: #515151; -$bridgeDropdownMenuColor: #aaaaaa; -$bridgeDropdownMenuHoverBg: #313131; -$bridgeDropdownMenuHoverColor: #FFFFFF; - -$thesaurusInputBackground: #ededed; - -$thesaurusContextMenuColor: #c0c0c0; - - -$basketsTextColor: #AAAAAA; - -$guiSplitterImg: 'vsplitter2.png'; - - - -$answersToolsBtnSeparatorBorder: #474747; -$answersToolsBtnBg: #393939; -$answersToolsBtnBorder: #515151; -$answersToolsBtnColor: #aaaaaa; -$answersToolsBtnHoverBg: #313131; -$answersToolsBtnHoverColor: #aaaaaa; - -$answersToolsBtnSettingsColor: darken($answersToolsBtnColor, 20); // ##949494 -$answersToolsBtnSettingsHoverBg: #393939; -$answersToolsBtnSettingsHoverColor: darken($answersToolsBtnColor, 20); -$answersToolsBtnSettingsBorder: #474747; - - - -$editTextMultiValueBg: #444444; -$editTextMultiValueBorder: #999999; -$editTextMultiValueHighlightBg: #222222; - -$preferencesLabelColor: #999999; - -$activeStateIcon: 'ui-icons_cccccc_256x240.png'; -$accordionLoaderImg: 'loading.svg'; -$accordionBgHeaderHover: #474747; - -$inputButtonHoverColor: #FEFEFE; -$inputFallbackBorderColor: #b1b1b1; - - -$dropdownDividerBg: #515151; -$dropdownDividerBorder: $darkerBorderColor; - -$overlayBg: #111111; - -$tabsNavBg: #666666; -$tabsNavBgActive: $mediumBackgroundColor; -$contentLoaderImg: 'loading.svg'; - -$btnBackground: #f2f2f2; -$btnBackgroundHighlight: #D6D6D6; -$btnColor: #737373; -$btnTextShadow: 0 -1px 0 rgba(0,0,0,0); - -$btnInverseBackground: #444444; -$btnInverseBackgroundHighlight: #393939; -$btnInverseColor: #AAAAAA; -$btnInverseTextShadow: 0 -1px 0 rgba(0,0,0,.25); -$btnGrpSeparatorColor: #242424; - -$widgetContentColor: $textPrimaryColor; - -$linkDefaultColor: #b1b1b1; -$linkDefaultHover: #838383; - -/******** MAIN MENU CONFIG ********/ -$mainMenuBackgroundColor: $mediumBackgroundColor; -$mainMenuBottomBorder: 1px solid $mediumBorderColor; -$mainMenuHeight: 41px; -$mainMenuMarginBottom: 0; -$mainMenuLinkColor: #b1b1b1; -$mainMenuLinkBackgroundHoverColor: transparent; -$mainMenuLinkHoverColor: $textPrimaryHoverColor; -@import '../../../_shared/styles/variables'; - -/******** WORKZONE TABS CONFIG ********/ -$workzoneBackgroundColor: $mediumBackgroundColor; -$workzoneTabBackgroundColor: $mediumBackgroundColor; - -$workzoneTabBgHover: #666666; -$workzoneTabBgActive: #333333; -$workzoneTabTopBorder: 1px solid #303030; -$workzoneTabBorderBottom: #303030; -$workzoneBasketAlertDataBg: #fff190; -$workzoneBasketAlertDataColor: #1a1a1a; -$workzoneToolsLabelColor: #7f7f7f; - -/******** PROPOSALS CONFIG ********/ -$proposalsTitleColor: #A6A6A6; -$proposalsTitleHoverColor: lighten($proposalsTitleColor, 10); // $mediumTextHoverColor -$proposalsTitleBorder: #303030; -$proposalsFacetHoverColor: #FFF; - -@import '../../../_shared/styles/jquery-ui/dark-hive'; -@import '../skin-shared'; diff --git a/resources/www/prod/skins/959595/skin-959595.scss b/resources/www/prod/skins/959595/skin-959595.scss deleted file mode 100644 index c9f96bd1eb..0000000000 --- a/resources/www/prod/skins/959595/skin-959595.scss +++ /dev/null @@ -1,179 +0,0 @@ -$skinsImagesPath: '/assets/vendors/jquery-ui/images/ui-lightness/'; - -$defaultBorderColor: #999999; -$defaultBorderRadius: 2px; - -$textPrimaryColor: #333333; -$textPrimaryHoverColor: #1a1a1a; -$textPrimaryActiveColor: #1a1a1a; -$textPrimaryInverseColor: #3b3b3b; -$textSecondaryColor: #999999; - -$highlightDarkerColor: #0c4554; - -$highlightBackgroundColor: #076882; -$highlightBackgroundAltColor: #0c4554; -$highlightBorderColor: #0c4554; -$highlightTextColor: #FFFFFF; - - -$darkerBackgroundColor: #D9D9D9; // #F1F1F1 <- to try -$darkerBorderColor: darken(#D9D9D9, 10); -$darkerTextColor: #333333; -$darkerTextHoverColor: #000000; - -$darkBackgroundColor: #9c9c9c; //B1B1B1; -$darkBorderColor: darken($darkBackgroundColor, 10); -$darkTextColor: #FFFFFF; - -$mediumBackgroundColor: #a6a6a6; // B2B2B2 <- to try -$mediumBorderColor: darken($mediumBackgroundColor, 10); -$mediumBorderHighlightColor: #666666; -$mediumTextColor: $textPrimaryColor; -$mediumTextHoverColor: #EAEAEA; -$mediumTextActiveColor: #EAEAEA; - -$lightBackgroundColor: #B1B1B1; -$lightBackgroundSelectedColor: darken($lightBackgroundColor, 10); -$lightBackgroundActiveColor: darken($lightBackgroundColor, 10); -$lightBorderColor: #B1B1B1; -$lightBorderSelectedColor: darken($lightBorderColor, 10); -$lightBorderActiveColor: darken($lightBorderColor, 10); -$lightTextColor: #3b3b3b; - -// inverse -$textInverseColor: #000; -$textInverseHoverColor: #000; -$bgInverseHoverColor: #FFF; - -/******* GLOBAL PROD **********************************************************/ - -$scrollBgColor: $mediumBackgroundColor; //#3b3b3b; - -$paginateBorderColor: #999999; -$paginateTextColor: #999999; -// $paginateBorder2Color: #999999; -// $paginateTextColor: #FFFFFF; -$paginateBg1: #D9D9D9; - -$uploadBg1: #FFFFFF; -$uploadBg2: transparent; -$uploadLoaderImg: 'loader-black.gif'; - -$bridgeDropdownToggleBg: #E6E6E6; -$bridgeDropdownMenuBg: #A4A4A4; -$bridgeDropdownMenuBorder: #666666; -$bridgeDropdownMenuColor: #EAEAEA; -$bridgeDropdownMenuHoverBg: #666666; -$bridgeDropdownMenuHoverColor: #FFFFFF; - -$thesaurusInputBackground: #d4d4d4; - - -$thesaurusContextMenuColor: #FFFFFF; - - -$basketsTextColor: #777777; - -$guiSplitterImg: 'vsplitter2-959595.png'; - - - - -$answersToolsBtnSeparatorBorder: #999; -$answersToolsBtnBg: #A4A4A4; -$answersToolsBtnBorder: #666666; -$answersToolsBtnColor: #EAEAEA; -$answersToolsBtnHoverBg: #666666; -$answersToolsBtnHoverColor: #FFFFFF; - -$answersToolsBtnSettingsColor: lighten($answersToolsBtnColor, 10); -$answersToolsBtnSettingsHoverBg: #393939; -$answersToolsBtnSettingsHoverColor: lighten($answersToolsBtnColor, 10); -$answersToolsBtnSettingsBorder: #999; - -// $diapoBorderColor: $darkerBorderColor; - -$editTextMultiValueBg: #FFFFFF; -$editTextMultiValueBorder: #999999; -$editTextMultiValueHighlightBg: #d0d0d0; - -$preferencesLabelColor: #333333; - -$activeStateIcon: 'ui-icons_ffffff_256x240.png'; -$accordionLoaderImg: 'loader-black.gif'; -$accordionBgHeaderHover: #999; - -$inputButtonHoverColor: #FEFEFE; -$inputFallbackBorderColor: #b1b1b1; - -$dropdownDividerBg: $darkerBorderColor; -$dropdownDividerBorder: $darkerBorderColor; - -$overlayBg: #B1B1B1; - -$tabsNavBg: #999999; -$tabsNavBgActive: #B2B2B2; //#D9D9D9; -$contentLoaderImg: 'loader-black.gif'; - -/*$btnBackground: #444444; //#B9B9B9; -$btnBackgroundHighlight: #393939; -$btnColor: #AAAAAA; -$btnTextShadow: 0 -1px 0 rgba(0,0,0,.25);*/ - -$btnBackground: #f2f2f2; -$btnBackgroundHighlight: #D6D6D6; -$btnColor: #737373; -$btnTextShadow: 0 -1px 0 rgba(0,0,0,0); - - - -$btnInverseBackground: #B9B9B9; -$btnInverseBackgroundHighlight: #A4A4A4; -$btnInverseColor: #EAEAEA; -$btnInverseTextShadow: 0 -1px 0 rgba(0,0,0,.25); -$btnGrpSeparatorColor: $defaultBorderColor; - -$widgetContentColor: $textPrimaryInverseColor; - -$linkDefaultColor: #444444; -$linkDefaultHover: #444444; - -// override jquery ui theme colors: -$uiTextContentColor: $mediumTextColor; -$uiTextTitleColor: $mediumTextColor; -$uiLinkColor: $darkTextColor; -$uiLinkFocusColor: $darkTextColor; -$uiLinkActiveColor: $darkTextColor; - - -/******** MAIN MENU CONFIG ********/ -// $mainMenuRightListBorderLeft: #999; -$mainMenuBottomBorder: none; -$mainMenuBackgroundColor: $mediumBackgroundColor; //BFBFBF; -$mainMenuBottomBorder: none; -$mainMenuMarginBottom: 0; -$mainMenuLinkColor: #FFF; -$mainMenuLinkBackgroundHoverColor: transparent; //$bgInverseHoverColor; -$mainMenuLinkHoverColor: $textPrimaryHoverColor; -@import '../../../_shared/styles/variables'; - -/******** WORKZONE TABS CONFIG ********/ -$workzoneBackgroundColor: $mediumBackgroundColor; -$workzoneTabBackgroundColor: $mediumBackgroundColor; -$workzoneTabBgHover: #999; -$workzoneTabBgActive: #999; -$workzoneTabTopBorder: 1px solid #999; -$workzoneTabBorderBottom: transparent; -$workzoneBasketAlertDataBg: #fff190; -$workzoneBasketAlertDataColor: #1a1a1a; -$workzoneToolsLabelColor: #FFFFFF; - -/******** PROPOSALS CONFIG ********/ -$proposalsTitleColor: #FFFFFF; -$proposalsTitleBorder: #666666; -$proposalsTitleHoverColor: lighten($proposalsTitleColor, 10); -$proposalsFacetHoverColor: #FFF; - -@import '../../../_shared/styles/jquery-ui/ui-lightness'; -@import '../skin-shared'; diff --git a/resources/www/prod/skins/FFFFFF/skin-FFFFFF.scss b/resources/www/prod/skins/FFFFFF/skin-FFFFFF.scss deleted file mode 100644 index df5149ca39..0000000000 --- a/resources/www/prod/skins/FFFFFF/skin-FFFFFF.scss +++ /dev/null @@ -1,192 +0,0 @@ -$skinsImagesPath: '/assets/vendors/jquery-ui/images/ui-lightness/'; - -$defaultBorderColor: #999999; -$defaultBorderRadius: 2px; - -$textPrimaryColor: #333333; -$textPrimaryHoverColor: #1a1a1a; -$textPrimaryActiveColor: #1a1a1a; -$textPrimaryInverseColor: #1a1a1a; //3b3b3b; -$textSecondaryColor: #999999; - -$highlightDarkerColor: #0c4554; - -$highlightBackgroundColor: #076882; -$highlightBackgroundAltColor: #0c4554; -$highlightBorderColor: #0c4554; -$highlightTextColor: #FFF; - - -$darkerBackgroundColor: #FFFFFF; // #F1F1F1 <- to try -$darkerBorderColor: #bfbfbf; -$darkerTextColor: #333; -$darkerTextHoverColor: #000000; - -$darkBackgroundColor: #FFFFFF; //B1B1B1; -$darkBorderColor: darken($darkBackgroundColor, 10); -$darkTextColor: #9c9c9c; - -$mediumBackgroundColor: #f2f2f2; // B2B2B2 <- to try -$mediumBorderColor: #FFF; //darken($mediumBackgroundColor, 10); -$mediumBorderHighlightColor: #bfbfbf; -$mediumTextColor: $textPrimaryColor; -$mediumTextHoverColor: #EAEAEA; -$mediumTextActiveColor: #EAEAEA; - -$lightBackgroundColor: #9c9c9c; -$lightBackgroundSelectedColor: darken($lightBackgroundColor, 10); -$lightBackgroundActiveColor: darken($lightBackgroundColor, 10); -$lightBorderColor: #B1B1B1; -$lightBorderSelectedColor: darken($lightBorderColor, 10); -$lightBorderActiveColor: darken($lightBorderColor, 10); -$lightTextColor: #3b3b3b; - -// inverse -$textInverseColor: #000; -$textInverseHoverColor: #000; -$bgInverseHoverColor: #333; - -/******* GLOBAL PROD **********************************************************/ -$scrollBgColor: $mediumBackgroundColor; //#3b3b3b; - -$paginateBorderColor: #bfbfbf; -$paginateTextColor: #FFFFFF; -$paginationLinkColor: #333; -// $paginateBorder2Color: #999999; -// $paginateTextColor: #FFFFFF; -$paginateBg1: #D9D9D9; - -$uploadBg1: #FFFFFF; -$uploadBg2: transparent; -$uploadLoaderImg: 'loader-black.gif'; - -$bridgeDropdownToggleBg: #E6E6E6; -$bridgeDropdownMenuBg: #f2f2f2; -$bridgeDropdownMenuBorder: #bfbfbf; -$bridgeDropdownMenuColor: #EAEAEA; -$bridgeDropdownMenuHoverBg: #bfbfbf; -$bridgeDropdownMenuHoverColor: #FFFFFF; - -$thesaurusInputBackground: #d4d4d4; -$thesaurusContextMenuColor: #FFFFFF; - - - -$basketsTextColor: #777777; - -$guiSplitterImg: 'vsplitter2-959595.png'; - -$answersToolsBtnSeparatorBorder: #EAEAEA; -$answersToolsBtnBg: #f2f2f2; -$answersToolsBtnBorder: #bfbfbf; -$answersToolsBtnColor: #5b5b5b; -$answersToolsBtnHoverBg: #bfbfbf; -$answersToolsBtnHoverColor: #FFFFFF; - -$answersToolsBtnSettingsColor: #000; //lighten($answersToolsBtnColor, 10); -$answersToolsBtnSettingsHoverBg: #393939; -$answersToolsBtnSettingsHoverColor: lighten($answersToolsBtnColor, 10); -$answersToolsBtnSettingsBorder: #EAEAEA; - -// $diapoBorderColor: $darkerBorderColor; - -$editTextMultiValueBg: #FFFFFF; -$editTextMultiValueBorder: #999999; -$editTextMultiValueHighlightBg: #d0d0d0; - -$preferencesLabelColor: #333333; - -$activeStateIcon: 'ui-icons_ffffff_256x240.png'; -$accordionLoaderImg: 'loader-black.gif'; -$accordionBgHeaderHover: #999; - -$inputButtonHoverColor: #FEFEFE; -$inputFallbackBorderColor: #b1b1b1; - -$dropdownDividerBg: $darkerBorderColor; -$dropdownDividerBorder: $darkerBorderColor; - -$overlayBg: #B1B1B1; - -$tabsNavBg: #999999; -$tabsNavBgActive: #B2B2B2; //#D9D9D9; -$contentLoaderImg: 'loader-black.gif'; - -/*$btnBackground: #444444; //#B9B9B9; -$btnBackgroundHighlight: #393939; -$btnColor: #AAAAAA; -$btnTextShadow: 0 -1px 0 rgba(0,0,0,.25);*/ - -$btnBackground: #f2f2f2; -$btnBackgroundHighlight: #D6D6D6; -$btnColor: #737373; -$btnTextShadow: 0 -1px 0 rgba(0,0,0,0); - - - -$btnInverseBackground: #f2f2f2; -$btnInverseBackgroundHighlight: #d6d6d6; -$btnInverseColor: #5b5b5b; -$btnInverseTextShadow: 0 -1px 0 rgba(255,255,255,.25); -$btnGrpSeparatorColor: $defaultBorderColor; - -$widgetContentColor: $textPrimaryInverseColor; - -$linkDefaultColor: #444444; -$linkDefaultHover: #444444; - -// override jquery ui theme colors: -$uiTextContentColor: $mediumTextColor; -$uiTextTitleColor: $mediumTextColor; -$uiLinkColor: $darkTextColor; -$uiLinkFocusColor: $darkTextColor; -$uiLinkActiveColor: $darkTextColor; - - -/******** MAIN MENU CONFIG ********/ -$mainMenuBottomBorder: none; -$mainMenuBackgroundColor: #1a1a1a; //BFBFBF; -$mainMenuBottomBorder: none; -$mainMenuMarginBottom: 0; -$mainMenuLinkColor: #FFFFFF; -$mainMenuLinkBackgroundHoverColor: transparent; //$bgInverseHoverColor; -$mainMenuLinkHoverColor: darken($mainMenuLinkColor, 10); -@import '../../../_shared/styles/variables'; - -/******** PROPOSALS CONFIG ********/ -$proposalsTitleColor: #333; -$proposalsTitleBorder: #bfbfbf; -$proposalsTitleHoverColor: lighten($proposalsTitleColor, 10); -$proposalsFacetHoverColor: #FFF; -//$proposalsContentTextColor: #FF0000; - -/******** WORKZONE TABS CONFIG ********/ -$workzoneBackgroundColor: $mediumBackgroundColor; -$workzoneTabBgHover: #EAEAEA; -$workzoneTabBgActive: #EAEAEA; -$workzoneTabTopBorder: 1px solid #EAEAEA; -$workzoneTabBorderBottom: transparent; -$workzoneBasketAlertDataBg: #fff190; -$workzoneBasketAlertDataColor: #1a1a1a; -$workzoneToolsLabelColor: #FFFFFF; - - -/******** TABS CONFIG ********/ -$tabContentBackgroundColor: #f5f5f5; -$tabBackgroundColor: #f2f2f2; -$tabTextColor: lighten($textPrimaryInverseColor, 10); -$tabActiveBackgroundColor: $tabContentBackgroundColor; -$tabActiveTextColor: $textPrimaryInverseColor; -$tabDisabledBackgroundColor: $tabBackgroundColor; -$tabDisabledTextColor: $mediumTextActiveColor; - -/******** ANSWERS INFOS CONFIG ********/ -$answersInfoDialogBg: $highlightBackgroundAltColor !default; -$answersInfoDialogColor: #FFFFFF !default; -$answersDocInfoBg: $highlightBackgroundAltColor !default; -$answersDocInfoBorder: #FAFAFA !default; -$answersDocInfoColor: #FFFFFF !default; -$answersLinkColor: #FFFFFF !default; -$answersInfoLabelColor: #FFFFFF !default; -@import '../../../_shared/styles/jquery-ui/ui-lightness'; -@import '../skin-shared'; diff --git a/resources/www/prod/skins/skin-shared.scss b/resources/www/prod/skins/skin-shared.scss deleted file mode 100644 index ef9f116ed7..0000000000 --- a/resources/www/prod/skins/skin-shared.scss +++ /dev/null @@ -1,550 +0,0 @@ -$proposalColor: #4c5d84; -$thesaurusColor: #884c92; -$basketsColor: #076882; -$pluginsColor: #FFF; - -@import '../../_shared/styles/variables'; - -::-webkit-scrollbar-track { - border-radius: 0; - background-color: $darkerBackgroundColor; -} - -::-webkit-scrollbar { - width: 6px; - border-radius: 0; -} - -::-webkit-scrollbar-thumb { - border-radius: 0; - width: 3px; - background-color: lighten($scrollBgColor, 5); -} - -::-webkit-scrollbar-button { - width: 0; - height: 0; - display: none; -} - -::-webkit-scrollbar-corner { - background-color: transparent; -} - -*::-moz-selection, *::selection { - background: #FFFFFF; - color: $textPrimaryColor; -} - -input::selection, textarea::selection, -input::-moz-selection, textarea::-moz-selection { - background: #404040; - color: $textInverseColor; -} - -label { - color: $textInverseColor; -} - -legend { - color: $textPrimaryColor; - width: auto; - border: none; -} - -body { - color: $darkerTextColor; - background-color: $darkerBackgroundColor; - font-family: $defaultFontFamily; - font-size: $mediumFontSize; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - overflow: hidden; - overflow-x: hidden; - overflow-y: hidden; -} - -html { - border: medium none; - height: 100%; - margin: 0; - padding: 0; - z-index: 1; - body { - z-index: 1; - } -} - -a { - COLOR: $linkDefaultColor; - TEXT-DECORATION: none -} - -a:hover { - COLOR: $linkDefaultHover; - TEXT-DECORATION: none -} - -EM { - FONT-STYLE: normal; - BACKGROUND-COLOR: #D82400; -} - -.clickable { - cursor: pointer; -} - -.ui-state-default, .ui-widget-content .ui-state-default, -.ui-widget-header .ui-state-default { - font-weight: normal; -} - -.ui-widget-overlay { - background-image: none; -} - -.ui-widget-content.ui-autocomplete { - background-color: black; - background-image: none; - z-index: 650; -} - -.ui-widget-content.ui-autocomplete .ui-state-hover, -.ui-widget-content.ui-autocomplete .ui-widget-content .ui-state-hover, -.ui-widget-content.ui-autocomplete .ui-widget-header .ui-state-hover, -.ui-widget-content.ui-autocomplete .ui-state-focus, -.ui-widget-content.ui-autocomplete .ui-widget-content .ui-state-focus, -.ui-widget-content.ui-autocomplete .ui-widget-header .ui-state-focus { - border: 1px solid #FFFFFF; -} - -#maincontainer { - min-width: 970px; - min-height: 500px; -} - -#mainContent { - margin-top: $mainMenuHeight; - // top: 40px; - min-width: 960px; - overflow-x: auto; - overflow-y: auto; -} - -.PNB { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; -} - -#rightFrame { - min-width: 660px !important; -} - -.PNB .ui-corner-top { - top: 77px; -} - -div#PREVIEWTITLEWRAPPER { - top: 10px; -} - -.PNB10 { - position: absolute; - top: 10px; - left: 10px; - right: 10px; - bottom: 10px; -} - -.minilogo { - max-height: 20px; -} - -.ww_window .ww_content { - overflow-x: hidden; - overflow-y: auto; -} - -.boxCloser { - cursor: pointer; - color: rgb(204, 204, 204); - font-weight: bold; - font-size: $mediumFontSize; - text-align: right; - text-decoration: underline; - height: 16px; -} - -/*.ww_status { - background-image: url('#{$skinsImagesPath}ww_title.gif'); - background-repeat: repeat-x; - color: #0077bc; - font-size: 8pt; -}*/ - -span.ww_winTitle { - letter-spacing: 1px; - color: #0077bc; - font-size: 8pt; - font-weight: bold; -} - -#divpage { - background-color: #212121; - padding: 10px 0; - margin: 0 10px; -} - -.desktop { - background-position: center center; - left: 0px; - overflow: hidden; - position: absolute; - top: 0px; -} - -.ui-helper-reset { - line-height: auto; -} - -.ui-tabs .ui-tabs-nav li a { - padding: 3px 5px 0; -} - -#keyboard-dialog h1 { - font-size: 14px; - font-weight: bold; - margin: 0; - text-align: left; -} - -#keyboard-dialog ul { - list-style-type: none; - margin: 5px 0 20px 40px; -} - -#keyboard-dialog ul li { - -} - -.cont_infos { - position: absolute; - bottom: 10px; - height: 60px; - top: auto; - text-align: center; - width: 70px; - right: 60px; - div { - line-height: 20px; - font-size: $smallFontSize; - font-weight: bold; - } - span { - cursor: pointer; - font-size: $smallFontSize; - } -} - - -#SPANTITLE img { - height: 16px; - vertical-align: middle; - margin: 0 10px; -} - -.cgu-dialog blockquote { - margin: 10px 30px; - overflow: auto; - max-height: 400px; - p { - margin: 10px 30px 10px 0; - } -} - -.chim-wrapper { - position: relative; - float: left; -} - -#tooltip { - position: absolute; - z-index: 32000; - overflow: hidden; -} - -.otherRegToolTip img { - vertical-align: middle; -} - -#ui-datepicker-div { - z-index: 2000; - background-color: $darkerBackgroundColor; - position: absolute; -} - -.ui-selectable-helper { - border: 1px dotted #CCCCCC; - z-index: 10000; -} - -/******* DIALOGS **************************************************************/ - -#dialog_dwnl h1 { - text-align: center; -} - -#dialog_dwnl .buttons_line { - margin: 10px 0; - text-align: center -} - -#dialog_dwnl .order_input { - width: 250px; -} - -#dialog_dwnl .undisposable { - float: left; - position: relative; - width: 100%; -} - -#dialog_dwnl .undisposable .thumb_wrapper { - float: left; - position: relative; - margin: 10px; -} - -#dialog_dwnl .undisposable .thumb { - float: left; - position: relative; -} - -/******* ORDER MANAGER ********************************************************/ - -#order_manager tr.order_row { - height: 28px; -} - -#order_manager .order_row.odd { - background-color: #404040; -} - -#order_manager .order_list .thumb_wrapper { - float: left; - position: relative; - margin: 10px; -} - -#order_manager .order_list li { - display: inline-block; - border-radius: $defaultBorderRadius; - border: 1px solid #FFFFFF; - margin: 0 5px; -} - -#order_manager .order_list .thumb { - float: left; - position: relative; -} - -#order_manager .order_list .selectable.selected { - background-color: #404040; -} - -#order_manager .order_list .selectable { - cursor: pointer; -} - -#order_manager .order_list .order_wrapper { - float: left; - position: relative; - margin: 5px; -} - -#order_manager table p { - margin: 2px 0; -} - -iframe { - border: none; - margin: 0; - padding: 0; -} - -h4 { - margin-top: 0px; - font-weight: normal; - font-size: 16px; - margin-bottom: 0px; - margin-left: 5px -} - -#notification_trigger .counter { - position: relative; - *position: static; - top: -2px; - margin: 11px 15px 0 0; - padding: 1px 4px; - background: none repeat scroll 0 0 red; - background-color: #DA4F49; - background-repeat: repeat-x; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - *border-color: transparent; - border-style: solid; - border-width: 1px; - border-radius: 4px 4px 4px 4px; - box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05); - font-size: $xmediumFontSize; - font-weight: bold; - line-height: 14px; - text-align: center; - color: $textInverseColor; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - float: left; -} - -#sizeAns_slider, #nperpage_slider, #EDIT_ZOOMSLIDER { - background-color: #666666; - border-color: #666666; - height: 10px; - -} - -#sizeAns_slider .ui-slider-handle, #nperpage_slider .ui-slider-handle, -#EDIT_ZOOMSLIDER .ui-slider-handle { - background-color: $darkerBackgroundColor; - width: 8px; - cursor: col-resize; -} - -/******* POPOVERS *************************************************************/ - -#tooltip .popover { - background-color: inherit; -} - -.popover-inner { - background-color: $darkerBackgroundColor; - border: 2px solid $darkerBorderColor; - padding: 0px; - color: $darkerTextColor; - border-radius: $defaultBorderRadius; -} - -.popover-inner .popover-title { - background-color: $mediumBackgroundColor; - border-radius: 0; -} - -.popover-inner .popover-content { - background-color: $darkerBackgroundColor; - hr { - background-color: $darkerTextColor; - border-color: $darkerBorderColor; - } -} - -.dragover { - BACKGROUND-COLOR: #fff100 -} - -/******* DIALOGS **************************************************************/ - -#dialog_dwnl input.required.error, -#dialog_dwnl textarea.required.error { - border: 1px solid red; -} - -.overlay, .ui-widget-overlay { - background-color: $overlayBg; - opacity: 0.7; - filter: alpha(opacity=70); -} - -.submenu .ui-buttonset { - z-index: 120; -} - -.dropdown-menu .divider { - background-color: $dropdownDividerBg; - border-bottom: 1px solid $dropdownDividerBorder; - margin: 3px 1px 3px 1px; -} - -.close { - color: $textPrimaryColor; - // box-shadow: inset 1px 1px 2px 0px rgba($darkerBackgroundColor,0.7); - &:hover { - color: $textPrimaryColor; - } -} - -.status-marker { - line-height: 10px; - border-radius: 50%; - width: 7px; - height: 7px; - display: inline-block; - margin-right: 8px; - margin-bottom: 0px; - &.status-active { - background-color: #58d5b5; - box-shadow: 0 0 6px #69fcd6; - } - &.status-inactive { - background-color: #aaaaaa; - box-shadow: inset 1px 1px 2px 0px rgba(0, 0, 0, 0.7); - } -} -#loader { - color: $textPrimaryInverseColor; -} - -.dl-horizontal { - dd { - &:before { - content: "\200b"; // unicode zero width space character - } - } -} -.videoTips { - width: 100%; - height: 100%; -} - -@import 'ui-components/jquery-ui'; -@import 'ui-components/context-menu'; -@import 'ui-components/forms'; -@import 'ui-components/buttons'; -@import 'ui-components/search-form'; -@import 'ui-components/workzone'; -@import 'ui-components/answers-tools'; -@import 'ui-components/answers'; -@import 'ui-components/colorpicker'; -@import 'ui-components/thumb-extractor'; -@import 'ui-components/pagination'; -@import 'ui-components/upload'; -@import 'ui-components/modal-basket-pref'; -@import 'ui-components/modal-publish'; -@import 'ui-components/modal-edit'; -@import 'ui-components/modal-export'; -@import 'ui-components/modal-bridge'; -@import '../../_shared/styles/main-menu'; -@import 'ui-components/workzone-thesaurus'; -@import 'ui-components/workzone-baskets'; -@import 'ui-components/workzone-proposals'; -@import 'ui-components/workzone-plugins'; -@import 'ui-components/actions'; -@import 'ui-components/gui'; -@import 'ui-components/gui-misc'; -@import 'ui-components/modal-preview'; -@import 'ui-components/modal-push'; -@import 'ui-components/diapo'; -@import 'ui-components/modal-preferences'; diff --git a/resources/www/prod/skins/ui-components/_actions.scss b/resources/www/prod/skins/ui-components/_actions.scss deleted file mode 100644 index 3afe4f688c..0000000000 --- a/resources/www/prod/skins/ui-components/_actions.scss +++ /dev/null @@ -1,113 +0,0 @@ - -/******* ACTIONS **************************************************************/ - - -/*#TOOL_disktt { - background-image: url('#{$skinsImagesPath}disktt_0.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_disktt.actif { - background-image: url('#{$skinsImagesPath}disktt_1.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_ppen { - background-image: url('#{$skinsImagesPath}ppen_0.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_ppen.actif { - background-image: url('#{$skinsImagesPath}ppen_1.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_chgstatus { - background-image: url('#{$skinsImagesPath}chgstatus_0.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_chgstatus.actif { - background-image: url('#{$skinsImagesPath}chgstatus_1.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_chgcoll { - background-image: url('#{$skinsImagesPath}chgcoll_0.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_chgcoll.actif { - background-image: url('#{$skinsImagesPath}chgcoll_1.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_pushdoc { - background-image: url('#{$skinsImagesPath}pushdoc_0.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_pushdoc.actif { - background-image: url('#{$skinsImagesPath}pushdoc_1.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_print { - background-image: url('#{$skinsImagesPath}print_0.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_print.actif { - background-image: url('#{$skinsImagesPath}print_1.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_imgtools{ - background-image: url('#{$skinsImagesPath}imgtools_0.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_imgtools.actif{ - background-image: url('#{$skinsImagesPath}imgtools_1.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_trash { - background-image: url('#{$skinsImagesPath}trash_0.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#TOOL_trash.actif { - background-image: url('#{$skinsImagesPath}trash_1.gif'); - background-position: center center; - background-repeat: no-repeat; -} -*/ -/* -.contextMenuTrigger { - color: $textPrimaryColor; - font-size: $smallFontSize; - margin-left: 5px; - line-height: 18px; - vertical-align: middle; -} - -.contextMenuTrigger:hover { - color: $textPrimaryColor; -} -*/ diff --git a/resources/www/prod/skins/ui-components/_answers-tools.scss b/resources/www/prod/skins/ui-components/_answers-tools.scss deleted file mode 100644 index 035937b985..0000000000 --- a/resources/www/prod/skins/ui-components/_answers-tools.scss +++ /dev/null @@ -1,117 +0,0 @@ -/******* idFrameT CSS *********************************************************/ - -#idFrameT { - margin-left: -20px; - margin-right: -20px; - #selectCase { - background: url('#{$iconsPath}ccoch0.gif') no-repeat center center; - padding-left: 16px; - } - .btn-toolbar { - margin-bottom: 0px; - margin-top: 0px; - background-color: $mediumBackgroundColor; - font-size: $smallFontSize; - z-index:100; - height:45px; - box-sizing: border-box; - border-bottom: none; //1px solid $darkerBorderColor; - } - .tools { - &:first-child .btn-group { - border-right: 1px solid $answersToolsBtnSeparatorBorder; - } - .btn-group { - float: left; - } - .classicButton button.btn, - .dropdownButton { - margin: 0; - } - .classicButton button.btn, - .dropdownButton button.btn { - height: 30px; - font-family: verdana,"Helvetica Neue",Helvetica,Arial,sans-serif; - font-size: $mediumFontSize; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - } - .classicButton button.btn-inverse, - .dropdownButton button.btn-inverse { - background-image: none; - background-color: $mediumBackgroundColor; - color: $answersToolsBtnColor; - border-radius: 0; - margin: 0; - height: 45px; - border: 0; - } - .classicButton button.btn-inverse { - border-right: 0; - } - .dropdownButton button.btn-inverse { - border-left: 0; - border-right: 0; - } - .classicButton button.btn-inverse:hover, - .dropdownButton button.btn-inverse:hover { - background-color: $answersToolsBtnBg; - *background-color: $answersToolsBtnBg; - color: $textPrimaryHoverColor; - } - - .classicButton button.btn-inverse img, - .dropdownButton button.btn-inverse img { - margin: 0 2px; - max-width: none; - } - .dropdown-menu { - min-width: 95px; - background-color: $answersToolsBtnBg; - *border: 1px solid $answersToolsBtnBorder; - a { - padding: 3px 10px; - font-size: $mediumFontSize; - color: $answersToolsBtnColor; - cursor: pointer; - &:hover { - background-color: $answersToolsBtnHoverBg; - color: $highlightTextColor; //$answersToolsBtnHoverColor; - } - } - img { - margin-right: 5px; - } - } - #settings { - display: block; - float: right; - line-height: 45px; - padding-right: 51px; - padding-left: 21px; - margin-right: 0; - color: $answersToolsBtnSettingsColor; - background: url('#{$iconsPath}icone_settings.png') right 15px no-repeat; - background-position: right 21px top 15px; - border-left: 1px solid $answersToolsBtnSettingsBorder; - &:hover { - background-color: $answersToolsBtnSettingsHoverBg; - } - } - } -} - -@media screen and (max-width: 1200px) { - #idFrameT .tools button.btn-inverse img { - display: none; - } - #idFrameT .tools #settings { - text-indent: -9000px; - padding-right: 0px; - padding-left: 0px; - margin-right: 8px; - width: 26px; - background-position: right 1px top 15px; - } -} \ No newline at end of file diff --git a/resources/www/prod/skins/ui-components/_answers.scss b/resources/www/prod/skins/ui-components/_answers.scss deleted file mode 100644 index 741d3302fb..0000000000 --- a/resources/www/prod/skins/ui-components/_answers.scss +++ /dev/null @@ -1,241 +0,0 @@ -$answersInfoDialogBg: $highlightBackgroundAltColor !default; -$answersInfoDialogColor: $highlightTextColor !default; -$answersDocInfoBg: $highlightBackgroundAltColor !default; -$answersDocInfoBorder: #000 !default; -$answersDocInfoColor: $highlightTextColor !default; -$answersLinkColor: #666666 !default; -$answersInfoLabelColor: #949494 !default; - -#TOPIC_UL li { - float: none; - margin: 0; -} - -#answers { - box-sizing: border-box; - .status { - img { - max-width: 16px; - max-height: 16px; - } - } - #answersNext { - width: 150px; - margin: 5px; - height: 193px; - line-height: 193px; - font-size: 25px; - color: $answersLinkColor; - cursor: pointer; - } - .list { - box-sizing: border-box; - position: relative; - float: left; - margin: 8px; - width: 600px; - overflow: hidden; - border: 3px solid $darkerBorderColor; - .diapo { - margin: 5px; - } - .desc { - .dl-horizontal { - margin-bottom: 0; - dt { - width: 70px; //100 - } - dd { - margin-left: 90px; //120 - } - } - } - } -} - -#idFrameT { - #answers { - background-color: $darkerBackgroundColor; - top: 55px; - bottom: 0; - margin-right: 0; - //overflow-y: hidden; - padding-left: 10px; - overflow-y: auto; - /*&:hover { - }*/ - } -} - -#answers_status{ - position: absolute; - bottom: 0px; - left: 10px; - height: 60px; - width: 400px; - z-index: 100; - table{ - width: 100%; - tr{ - height: 20px; - vertical-align: middle; - td.navigation{ - text-align: right; - } - } - } - .infos { - text-align: left; - line-height: 18px; - font-size: 11px; - color: $answersInfoDialogColor; - height: 60px; - .infoDialog { - float: left; - background: $answersInfoDialogBg; - color: $answersInfoDialogColor; - padding: 0 25px; - font-size: 11px; - padding-top: 24px; - margin-right: 10px; - height: 36px; - span { - font-size: 22px; - margin-bottom: 3px; - float: left; - margin-right: 10px; - } - } - #nbrecsel { - font-size: 22px; - margin-top: 7px; - float: left; - margin-right: 7px; - display: block; - height: 40px; - } - } - #docInfo { - height: 40px; - background: $answersDocInfoBg; - color: $answersDocInfoColor; - padding: 0 25px; - padding-top: 20px; - float: left; - min-width: 105px; - font-size: 11px; - line-height: 12px; - border-right: 1px solid $answersDocInfoBorder; - } -} - -/******* FEEDS ****************************************************************/ -#answers { - .feed { - position: relative; - clear: left; - margin: 10px; - .headblock { - max-width: 800px; - margin-bottom: 20px; - table { - width: 100%; - } - h1 { - font-size: 22px; - img { - margin-right: 15px; - } - } - a.subscribe_rss { - font-size: 14px; - margin-left: 15px; - } - } - .entry { - margin: 0 0 30px; - padding: 10px; - border: 1px solid $mediumBorderColor; //$answersFeedEntryBorder; - background-color: $mediumBackgroundColor; //$answersFeedEntryBg; - float: left; - &.hover { - border: 1px solid $mediumBorderHighlightColor; - } - h1 { - margin-bottom: 0; - } - table{ - &.head { - vertical-align: middle; - margin: 10px 0; - width: 600px; - } - a.tools { - display: none; - } - } - &.hover{ - table a.tools { - display: inline; - } - } - } - h1 { - font-weight: bold; - font-size: 20px; - .author { - font-size: $mediumFontSize; - font-weight: normal; - margin-left: 15px; - } - } - h1, - .post_date { - width: 100%; - } - p { - max-width: 600px; - line-height: 18px; - margin: 5px 0; - text-align: justify; - } - img { - vertical-align: middle; - } - - .entry, - h1, - p, - .contents, - .see_more, - .post_date { - position: relative; - clear: left; - } - .see_more { - height: 60px; - text-align: center; - font-weight: bold; - font-size: $mediumFontSize; - background-position: center bottom; - } - .contents { - clear: left; - } - .post_date { - text-align: right; - font-style: italic; - max-width: 600px; - *width: 600px; - margin-bottom: 20px; - } - - .dropdown-menu { - background-color: $darkerBackgroundColor; - border: 1px solid $darkerBorderColor; - a { - color: $darkerTextColor; - } - } - } -} diff --git a/resources/www/prod/skins/ui-components/_buttons.scss b/resources/www/prod/skins/ui-components/_buttons.scss deleted file mode 100644 index a2caad01cb..0000000000 --- a/resources/www/prod/skins/ui-components/_buttons.scss +++ /dev/null @@ -1,25 +0,0 @@ -@import '../../../../../www/bower_components/bootstrap-sass/vendor/assets/stylesheets/bootstrap/_mixins.scss'; -.btn, input[type="file"] { - //font-family: verdana,"Helvetica Neue",Helvetica,Arial,sans-serif; - //font-size: 12px; - //font-weight: bold; - // soften button edges: - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - @include buttonBackground($btnBackground, $btnBackgroundHighlight, $btnColor, $btnTextShadow); -} -// @TODO .btn-primary - -.ui-dialog .btn, .ui-widget-content .btn { - // font-family: verdana,"Helvetica Neue",Helvetica,Arial,sans-serif; - font-size: $mediumFontSize; - font-weight: bold; - color: $btnColor; -} - -.btn.btn-inverse { - @include buttonBackground($btnInverseBackground, $btnInverseBackgroundHighlight, $btnInverseColor, $btnInverseTextShadow); -} - -.input-append button.btn { - border-left: 1px solid $btnGrpSeparatorColor; -} \ No newline at end of file diff --git a/resources/www/prod/skins/ui-components/_colorpicker.scss b/resources/www/prod/skins/ui-components/_colorpicker.scss deleted file mode 100644 index 8f096a7859..0000000000 --- a/resources/www/prod/skins/ui-components/_colorpicker.scss +++ /dev/null @@ -1,51 +0,0 @@ -$colorpickerBoxBorder: #FFFFFF; -$colorpickerSubmitBorder: #404040; -$colorpickerFocusBorder: #999999; - -.colorpicker_box { - border: 1px solid $colorpickerBoxBorder; - cursor: pointer; - float: left; - margin: 2px; - padding: 0; -} -.colorpickerbox { - position: relative; - float: left; - .colorpicker { - width: 210px; - height: 220px; - } - .colorpicker_submit .submiter { - padding: 3px 0 0 0; - } - .colorpicker_submit { - background-image: none; - background-color: black; - height: 25px; - left: 90px; - overflow: hidden; - position: absolute; - top: 15px; - width: 100px; - border: 1px solid $colorpickerSubmitBorder; - cursor: pointer; - text-align: center; - } - .colorpicker_focus { - border: 1px solid $colorpickerFocusBorder; - border-radius: $defaultBorderRadius; - } - .colorpicker_current_color, - .colorpicker_field, - .colorpicker_hex { - display: none; - } - .colorpicker_color, - .colorpicker_hue { - top: 56px; - } - .colorpicker_new_color { - left: 14px; - } -} \ No newline at end of file diff --git a/resources/www/prod/skins/ui-components/_context-menu.scss b/resources/www/prod/skins/ui-components/_context-menu.scss deleted file mode 100644 index a9fc731098..0000000000 --- a/resources/www/prod/skins/ui-components/_context-menu.scss +++ /dev/null @@ -1,82 +0,0 @@ -/* -Menu contextuel - valeurs suggerees dans l'editing : Classic Windows Theme (default) */ -/* =============================== */ -.context-menu-theme-default { - border: 2px outset #FFFFFF; - background-color: #D4D0C8; -} - -.context-menu-theme-default .context-menu-item { - text-align: left; - cursor: pointer; - padding: 2px 20px 2px 5px; - color: black; - font-size: 9px; - white-space: nowrap; -} - -.context-menu-theme-default .context-menu-separator { - margin: 1px 2px; - font-size: 0px; - border-top: 1px solid #808080; - border-bottom: 1px solid #FFFFFF; -} - -.context-menu-theme-default .context-menu-item-disabled { - color: #808080; -} - -.context-menu-theme-default .context-menu-item .context-menu-item-inner { - background: none no-repeat fixed 999px 999px; /* Make sure icons don't appear */ -} - -.context-menu-theme-default .context-menu-item-hover { - background-color: #0A246A; - color: $textPrimaryHoverColor; -} - -.context-menu-theme-default .context-menu-item-disabled-hover { - background-color: #0A246A; -} - - -/******* DROPDOWN MENU ********************************************************/ - -.context-menu-theme-vista .context-menu-item .context-menu-item-inner { - padding: 4px 20px; - margin-left: 0; - color: #75ABFF; -} - -.context-menu-theme-vista .context-menu-item-hover { - background-image: none; - background-color: #75ABFF; - border: none; -} - -.context-menu-theme-vista .context-menu-item-hover .context-menu-item-inner { - color: #212121; -} - -.context-menu-theme-vista { - background-image: none; - background-color: #212121; - border-bottom-left-radius: $defaultBorderRadius; - border-bottom-right-radius: $defaultBorderRadius; -} - -.context-menu-theme-vista .context-menu-item .context-menu-item-inner.published { - background-image: url('#{$iconsPath}ticktick.png'); - background-repeat: no-repeat; - background-position: 5px center; -} - - -.context-menu-item a { - color: #75ABFF; -} - -.context-menu-item-hover a { - color: #212121; -} diff --git a/resources/www/prod/skins/ui-components/_diapo.scss b/resources/www/prod/skins/ui-components/_diapo.scss deleted file mode 100644 index 6f683bdae6..0000000000 --- a/resources/www/prod/skins/ui-components/_diapo.scss +++ /dev/null @@ -1,108 +0,0 @@ -$diapoBorderColor: $darkerBorderColor !default; - -/** - * Diapo are reused in answers, baskets, - */ - -#reorder_box .diapo { - height: 130px; - width: 100px; -} - -#reorder_box .diapo.ui-sortable-placeholder, -#reorder_box .diapo.ui-sortable-placeholderfollow { - background-color: orange; -} - -#reorder_box .CHIM.diapo img { - z-index: 1000; - position: relative; - margin: 0; -} - -#reorder_dialog .ui-sortable-placeholder, -#reorder_dialog .ui-sortable-placeholderfollow { - width: 100px; - height: 130px; - background-color: $mediumBackgroundColor; -} - -.diapo { - position: relative; - display: block; - float: left; - border: 1px solid $diapoBorderColor; - border-radius: $defaultBorderRadius; - text-align: center; - margin: 8px 5px; - &.selected { - cursor: url('#{$iconsPath}cursor-move.png'), -moz-grab; - } - - .thumb { - overflow: hidden; - position: relative; - .record { - position: relative; - margin: 0 auto; - } - } - - .bottom { - position: absolute; - bottom: 0; - z-index: 99; - &.actions { - /*.action-icon { - cursor: pointer; - font-size: 12px; - - }*/ - tr { - td { - &:first-child { - font-size: $xmediumFontSize; - line-height: $xmediumFontSize; - text-shadow: 1px 1px 2px $darkBackgroundColor; - - } - } - } - .icon-stack { - font-size: 11px; - cursor: pointer; - width: 19px; - height: 15px; - line-height: 12px; - //padding: 0; - //margin: 0; - } - .icon-stack-base { - color: #777777; //darken($darkerBackgroundColor, 10); - } - .icon-light { - color: $darkerBackgroundColor; //$darkerTextColor; - } - } - } - - .title { - overflow: hidden; - text-overflow: ellipsis; - line-height: 14px; - font-size: $mediumFontSize; - } - - .duration { - background-color: darken($darkerBackgroundColor, 10); - color: $darkerTextColor; - } -} - -.diapo.CHIM .thumb_wrapper { - padding: 6px 9px; -} - -.diapo.IMGT .thumb_wrapper { - padding: 0 11px; -} \ No newline at end of file diff --git a/resources/www/prod/skins/ui-components/_forms.scss b/resources/www/prod/skins/ui-components/_forms.scss deleted file mode 100644 index a7c82ee09c..0000000000 --- a/resources/www/prod/skins/ui-components/_forms.scss +++ /dev/null @@ -1,38 +0,0 @@ - -/******* INPUTS ***************************************************************/ -input.input-button.hover { - color: $inputButtonHoverColor; -} - -input.search { - padding-left: 25px; - background-image: url('#{$iconsPath}search.png'); - background-repeat: no-repeat; - background-position: 3px center; -} - -input, select, textarea { - margin: 2px; - padding: 2px; - *border: 1px solid $inputFallbackBorderColor; - font-family: verdana,"Helvetica Neue",Helvetica,Arial,sans-serif; -} - -input[type="radio"], input[type="checkbox"], .checkbox { - border: none; - background: transparent; -} - -input.btn-mini { - margin: 0 2px; - height: 12px; - width: auto; - cursor: default; - font-size: 12px; -} - -.input-small { - height: 25px; - font-family: verdana,"Helvetica Neue",Helvetica,Arial,sans-serif; - font-size: 12px; -} diff --git a/resources/www/prod/skins/ui-components/_gui-misc.scss b/resources/www/prod/skins/ui-components/_gui-misc.scss deleted file mode 100644 index d3d24c6419..0000000000 --- a/resources/www/prod/skins/ui-components/_gui-misc.scss +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************************/ - -DIV.finder { - white-space: nowrap -} - -DIV.finder DIV.content DIV.title { - MARGIN-TOP: -2px; - LEFT: 0px; - OVERFLOW: hidden; - white-space: nowrap; - POSITION: relative; - TOP: 0px -} - -DIV.finder DIV.content DIV.title SPAN { - POSITION: relative -} - -DIV.finder DIV.content DIV.title IMG { - LEFT: 0px; - POSITION: relative; - TOP: 0px -} - -DIV.finder DIV.content DIV.title TABLE { - white-space: nowrap -} - -DIV.finder DIV.content DIV.title TABLE TR { - white-space: nowrap -} - -DIV.finder DIV.content DIV.title TABLE TR TD { - OVERFLOW: hidden; - white-space: nowrap -} - -TABLE.ulist THEAD { - BACKGROUND-COLOR: #999999; - text-align: left; -} - -TABLE.ulist TBODY TR { - cursor: pointer; - height: 20px; -} - -TABLE.ulist TBODY TR.selected { - COLOR: $textPrimaryActiveColor; - BACKGROUND-COLOR: #191970 -} - -TABLE.ulist TBODY TR.g { - BACKGROUND-COLOR: #474747 -} - -PRE.xml { - FONT-SIZE: 12px; - MARGIN: 5px 4px; - BACKGROUND-COLOR: #f5f5f5 -} - -/******* EXPLAIN RESULTS ******************************************************/ - -DIV.myexplain { - white-space: nowrap; -} - -DIV.myexplain DIV.content DIV.title { - MARGIN-TOP: -2px; - LEFT: 0px; - OVERFLOW: hidden; - white-space: nowrap; - POSITION: relative; - TOP: 0px -} - -DIV.myexplain DIV.content DIV.title SPAN { - POSITION: relative -} - -DIV.myexplain DIV.content DIV.title IMG { - LEFT: 0px; - POSITION: relative; - TOP: 0px -} - -DIV.myexplain DIV.content DIV.title TABLE { - white-space: nowrap -} - -DIV.myexplain DIV.content DIV.title TABLE TR { - white-space: nowrap -} - -DIV.myexplain DIV.content DIV.title TABLE TR TD { - OVERFLOW: hidden; - white-space: nowrap -} - -TABLE.explain3 TR TD { - BORDER-RIGHT: #87ceeb 1px solid; - BORDER-TOP: #87ceeb 1px solid; - BORDER-LEFT: #87ceeb 1px solid; - BORDER-BOTTOM: #87ceeb 1px solid -} diff --git a/resources/www/prod/skins/ui-components/_gui.scss b/resources/www/prod/skins/ui-components/_gui.scss deleted file mode 100644 index b466a196d7..0000000000 --- a/resources/www/prod/skins/ui-components/_gui.scss +++ /dev/null @@ -1,92 +0,0 @@ - -/******* GUI ******************************************************************/ - -.gui_vsplitter,.ui-resizable-e { - top: 50%; - width: 13px; - padding: 0 0; - height: 54px; - position: absolute; - background-image: url('#{$iconsPath}vsplitter.png'); - background-color: $mediumBackgroundColor; - background-position: center center; - background-repeat: no-repeat; - right: 0; - cursor: col-resize; - z-index: 500; -} - -#PREVIEWBOX .gui_vsplitter, .ui-resizable-w { - top: 50%; - width: 10px; - padding: 35px 0; - height: 0; - position: absolute; - background-position: center center; - background-repeat: no-repeat; - left: -10px; - cursor: col-resize; - z-index: 500; - background-image: url('#{$iconsPath}#{$guiSplitterImg}'); -} - -.gui_hsplitter, .ui-resizable-s { - height: 10px; - left: 50%; - width: 0; - padding: 0 35px; - bottom: -10px; - position: absolute; - background-image: url('#{$iconsPath}hsplitter.png'); - background-position: center center; - background-repeat: no-repeat; - cursor: row-resize; -} -/* -.gui_hslider { - position: absolute; - height: 0px; - border: #959595 1px inset -} - -.gui_hslider DIV { - position: absolute; - top: -6px; - left: 0px; - width: 4px; - height: 10px; - border: #c0c0c0 1px outset; - background-color: #959595; - background-image: url('#{$skinsImagesPath}vsplitter.gif'); - cursor: pointer; -}*/ - -.gui_ckbox_0 { - display: block; - position: relative; - width: 12px; - height: 12px; - float: left; - background-image: url('#{$iconsPath}ccoch0.gif'); - cursor: pointer; -} - -.gui_ckbox_1 { - display: block; - position: relative; - width: 12px; - height: 12px; - float: left; - background-image: url('#{$iconsPath}ccoch1.gif'); - cursor: pointer; -} - -.gui_ckbox_2 { - display: block; - position: relative; - width: 12px; - height: 12px; - float: left; - background-image: url('#{$iconsPath}ccoch2.gif'); - cursor: pointer; -} \ No newline at end of file diff --git a/resources/www/prod/skins/ui-components/_jquery-ui.scss b/resources/www/prod/skins/ui-components/_jquery-ui.scss deleted file mode 100644 index c80db21fc9..0000000000 --- a/resources/www/prod/skins/ui-components/_jquery-ui.scss +++ /dev/null @@ -1,287 +0,0 @@ -$modalBorder: 1px solid $darkerBorderColor !default; -$modalBackground: $darkerBackgroundColor !default; - -$tabContentBackgroundColor: $mediumBackgroundColor !default; -$tabBackgroundColor: lighten($lightBackgroundColor, 5) !default; -$tabTextColor: $mediumTextColor !default; -$tabActiveBackgroundColor: $tabContentBackgroundColor !default; -$tabActiveTextColor: $lightTextColor !default; -$tabDisabledBackgroundColor: $tabBackgroundColor !default; -$tabDisabledTextColor: $mediumTextActiveColor !default; - -.ui-dialog .ui-dialog-content.loading, .loading { - background-image: url('#{$iconsPath}#{$contentLoaderImg}'); - background-position: center center; - background-repeat: no-repeat; -} - - -.ui-tabs { - background-color: transparent; - padding: 0; - border-style: none; -} - -.ui-tabs .ui-tabs-nav { - border: none; - padding: 0px; -} - -.ui-widget-header { - background: none; - border: transparent 0px none; -} -.ui-tabs { - .ui-tabs-nav { - li { - background-color: $tabBackgroundColor; - height: 30px; - border: none; - overflow: hidden; - a { - padding: 5px 8px; - //font-size: 0.8em; - font-size: $xmediumFontSize; - font-weight: normal; - color: $mediumTextColor; // more contrasted color - } - &.ui-tabs-active a, - &.ui-tabs-active { - font-size: $mediumFontSize; - color: $tabActiveTextColor; - background-color: $tabActiveBackgroundColor; //$tabsNavBgActive; - border: none; - } - - &.ui-state-disabled a, - &.ui-state-processing a { - cursor: pointer; - color: $mediumTextActiveColor; - } - - } - } - .ui-tabs-panel { - overflow-x: hidden; - overflow-y: auto; - display: block; - border-width: 0; - padding: 0px; - background-color: $tabContentBackgroundColor; - &.tabBox { - height: 405px; - overflow: auto; - position: relative; - padding: 10px; - - } - } - .ui-tabs-hide { - display: none !important; - } -} - - - - -.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { - cursor: pointer; - color: $tabTextColor; //$workzoneColor2; -} - -.ui-state-default, .ui-widget-content .ui-state-default { - background: none; -} - -.ui-tabs li.ui-state-active a, .ui-state-active a:link, .ui-state-active a { - color: $tabActiveTextColor; - font-weight: bold; - //font-size: 0.8em; -} - -.ui-state-active, .ui-widget-content .ui-state-active { - background: none; -} - -.ui-widget-content { - background-image: none; - background-color: transparent; - color: $widgetContentColor; -} - -.ui-dialog.ui-widget-content { - background-color: $darkerBackgroundColor; -} - -.ui-accordion .ui-accordion-content { - padding: 0; - min-height: 120px; - border: none !important; - border-radius: 0; -} - -.ui-accordion-icons .ui-accordion-header, -.ui-accordion-icons .ui-accordion-header a { - overflow: hidden; -} - -.ui-accordion-icons .ui-accordion-header a { - padding: 2px 25px; - white-space: nowrap; -} - -.ui-state-active .ui-icon { - background-image: url('#{$skinsImagesPath}#{$activeStateIcon}'); -} - - - -.ui-accordion .ui-accordion-content.loading { - background-image: url('#{$iconsPath}#{$accordionLoaderImg}'); - background-position: center center; - background-repeat: no-repeat; -} - -.ui-accordion .ui-accordion-header, .ui-accordion .ui-accordion-content { - margin: 3px 0; -} - -.ui-accordion .ui-accordion-header { - border: none; - background-repeat: repeat-x; - margin-bottom: 0; - height: 44px; - line-height: 44px; - background-color: $mediumBackgroundColor; - border-bottom: 1px solid $mediumBorderColor; //$accordionBorderColor; - border-radius: 0; -} - -.ui-accordion .ui-accordion-header.unread .workzone-menu-title { - font-style: italic; - font-weight: bold; -} - -.ui-accordion .ui-accordion-header.unread { - background-color: $basketsColor; - //background-image: url('#{$iconsPath}bask_new_back_light.png'); -} - -.ui-accordion .ui-accordion-header.header { - padding-bottom: 0; - padding-right: 0; - padding-top: 0; - margin-top: 0; -} - -.ui-accordion .ui-accordion-header.header:hover { - background-color: $accordionBgHeaderHover; -} - - -.ui-accordion .ui-accordion-content { - background-color: $darkBackgroundColor; - border-top: none; - margin-top: -1px; - margin-bottom: 0; -} - -.ui-accordion .ui-accordion-content.grouping { - border: 1px solid #2f4a6f; - border-top: none; -} - -// override jqurey ui theme value: -.ui-corner-all, .ui-corner-br { - border-radius: $defaultBorderRadius; -} -.ui-corner-top { - border-top-left-radius: $defaultBorderRadius; - border-top-right-radius: $defaultBorderRadius; -} -.ui-corner-bottom { - border-bottom-right-radius: $defaultBorderRadius; - border-bottom-left-radius: $defaultBorderRadius; -} -.ui-corner-right { - border-top-right-radius: $defaultBorderRadius; - border-bottom-right-radius: $defaultBorderRadius; -} -.ui-corner-left { - border-top-left-radius: $defaultBorderRadius; - border-bottom-left-radius: $defaultBorderRadius; -} - -.ui-dialog.ui-widget-content { - border: $modalBorder; - background: $modalBackground; -} - -.ui-dialog-titlebar { - min-height: 20px; -} - -.ui-dialog-content.dialog-Small select, -.ui-dialog-content.dialog-Small input[type="text"], -.ui-dialog-content.dialog-Small textarea { - width: 100%; -} - -.ui-dialog-content.dialog-Small textarea { - height: 60px; -} - -.ui-dialog-content label { - line-height: 18px; -} - -.ui-dialog-content p { - line-height: 18px; -} - -.ui-autocomplete.ui-state-hover, -.ui-autocomplete.ui-widget-content .ui-state-hover, -.ui-autocomplete.ui-widget-header .ui-state-hover, -.ui-autocomplete.ui-state-focus, -.ui-autocomplete.ui-widget-content .ui-state-focus, -.ui-autocomplete.ui-widget-header .ui-state-focus { - background-image:none; - background-color:#515151; - border:none; - margin:0; - border-radius: 0; -} - -.ui-autocomplete.ui-menu .ui-menu-item a.ui-state-hover, -.ui-autocomplete.ui-menu .ui-menu-item a.ui-state-active { - margin:0; -} - -.ui-autocomplete li.list-item { - width:280px; - min-height:45px; - display:block; -} - -.ui-autocomplete li.list-item .icon { - width:42px; -} - -.ui-autocomplete li.list-item .icon img { - max-width:32px; - max-height:32px; - text-align: center; - vertical-align: middle; - margin:5px; -} - -.ui-autocomplete { - min-height: 42px; - max-height: 200px; - overflow-y: auto; - overflow-x: hidden; - padding:1px 0; - border-top-left-radius: 0; - border-top-right-radius: 0; - padding-right: 20px; -} \ No newline at end of file diff --git a/resources/www/prod/skins/ui-components/_modal-basket-pref.scss b/resources/www/prod/skins/ui-components/_modal-basket-pref.scss deleted file mode 100644 index 291835346e..0000000000 --- a/resources/www/prod/skins/ui-components/_modal-basket-pref.scss +++ /dev/null @@ -1,146 +0,0 @@ -#BasketBrowser { - h1 { - font-size: 14px; - line-height: 20px; - margin: 0; - padding: 0; - } - - .Browser { - background-color: $mediumBackgroundColor; - } - - .Basket { - background-color: $mediumBackgroundColor; - display: none; - - .thumb_wrapper { - margin: 5px; - } - } - - .result { - position: relative; - height: 100px; - - .PNB10 { - overflow: hidden; - } - - table { - height: 80px; - } - - &.odd { - background-color: $darkBackgroundColor; - } - - td.thumbnail { - display: table-cell; - width: 105px; - height: 80px; - padding: 0; - border: none; - border-radius: 0; - box-shadow: none; - line-height: 18px; - text-align: center; - vertical-align: top; - - &.content { - width: 390px; - vertical-align: top; - } - - .counter { - bottom: 18px; - font-size: 14px; - position: relative; - right: 5px; - text-align: right; - } - } - } - - .results { - .datas { - top: 50px; - bottom: 50px; - overflow-y: auto; - overflow-x: hidden; - } - - .header, .footer { - height: 50px; - } - - .header { - bottom: auto; - } - - .footer { - top: auto; - } - - .result h1.title { - font-size: 14px; - } - } - - form { - h1 { - margin: 10px 0; - } - - ul li { - padding: 0; - border-top: 1px solid #9A9A9A; - &.first { - border-top: none; - } - label { - padding: 3px 0 2px 20px; - } - } - } - - h1.title .loader { - display: none; - margin: 4px; - } - - img { - vertical-align: middle; - } - - table { - width: 100%; - border: none; - vertical-align: top; - td.paginator { - text-align: right; - } - } - - input { - display: none; - &.Query { - padding: 3px; - display: block; - border-radius: 4px; - width: 155px; - padding-left: 25px; - } - } - - label { - cursor: pointer; - color: #9a9a9a; - } - - input:checked + label, - label.selected { - background-color: $highlightDarkerColor; - color: $highlightTextColor; - } -} diff --git a/resources/www/prod/skins/ui-components/_modal-bridge.scss b/resources/www/prod/skins/ui-components/_modal-bridge.scss deleted file mode 100644 index ed0d405d50..0000000000 --- a/resources/www/prod/skins/ui-components/_modal-bridge.scss +++ /dev/null @@ -1,301 +0,0 @@ -#pub_tabs .btn-group.open .btn-inverse.dropdown-toggle { - background-color: $bridgeDropdownToggleBg; - background-image: none; -} -#dialog_publicator { - .dropdown-menu { - min-width: 95px; - background-color: $bridgeDropdownMenuBg; - *border: 1px solid $bridgeDropdownMenuBorder; - a { - padding: 3px 10px; - color: $bridgeDropdownMenuColor; - cursor: pointer; - &:hover { - background-color: $bridgeDropdownMenuHoverBg; - color: $bridgeDropdownMenuHoverColor; - } - } - } - .ui-tabs-panel { - left: 200px; - } - .notice_box, - .error_box { - color: $textPrimaryInverseColor; - font-weight: bold; - margin: 5px auto; - padding: 5px 0; - text-align: center; - width: 90%; - } - .notice_box { - background-color: green; - color: $textPrimaryColor; - } - .error_box { - background-color: orange; - } - .api_banner { - height: 30px; - bottom: auto; - background-color: $lightBackgroundColor; - .submenu.ui-buttonset { - z-index: 600; - } - } - .api_content { - top: 30px; - bottom: 25px; - color: $textPrimaryColor; - .blockmenu { - bottom: auto; - background-repeat: repeat-x; - background-position: left bottom; - z-index: 1000; - width:100%; - height:40px - } - .blockresponse { - padding: 0 10px; - top: 40px; - overflow: auto; - z-index: 200; - .form-actions { - background-color: $darkerBackgroundColor; - border-top: none; - margin: 0; - } - } - } - .api_content .blockmenu a.selected, - .api_banner a.selected { - font-weight: bold; - color: $highlightBackgroundColor; - } - .api_infos { - top: auto; - height: 25px; - background-image: url('#{$iconsPath}api_info.png'); - background-repeat: repeat-x; - background-position: 0 0; - color: $textSecondaryColor; - } - .main_menu { - float: left; - } - .diapo { - width: 90px; - overflow: hidden; - .title { - height: 16px; - overflow: hidden; - } - &.pending_records { - width: 50px; - overflow: hidden; - } - &.ui-selected { - background-color: #404040; - } - &.ui-selecting { - background-color: #202020; - } - .thumb_wrapper { - padding: 5px; - } - } - - .api_thumbnail { - max-width: 120px; - } - - .duration_time { - background-color: darken($darkerBackgroundColor, 10); - color: $darkerTextColor; - font-weight: bold; - padding: 2px 4px; - position: absolute; - top: 0; - left: 0; - font-size: 11px; - } - -} - -#dialog_publicator .ui-state-default.not_configured a { - color: #888888; - font-style: italic; -} - -#dialog_publicator .ui-state-active a { - color: #0088CC; -} - -#dialog_publicator .ui-state-active.not_configured a { - color: #CCCCCC; - font-style: normal; -} - -#dialog_publicator .dropdown-menu .divider { - background-color: #515151; - border-bottom: 1px solid #404040; - margin: 3px 1px 3px 1px; -} - -#dialog_publicator .ui-tabs .ui-tabs-panel.loading { - background-image: url('#{$iconsPath}loader000.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#dialog_publicator .ui-tabs-panel .PNB10.container { - overflow-x: hidden; - overflow-y: auto; -} - -#dialog_publicator .blockresponse .element { - margin: 5px 10px; -} - -#dialog_publicator .element table { - border: none; - padding: 0; - margin: 0; - width: 100%; -} - -#dialog_publicator .element table tr { - vertical-align: top; -} - -#dialog_publicator .element table .title { - color: #0088CC; - font-weight: bold; -} - -#dialog_publicator .element table td.thumbnail { - width: 140px; - border: none; - border-radius: 0px; - box-shadow: none; - background-color: transparent; - text-align: center; -} - -#dialog_publicator .element table td.special { - width: 80px; -} - -#dialog_publicator .ui-tabs-panel .blockresponse a { - color: #0088CC; - text-decoration: none; -} - -#dialog_publicator .element_menu .default_action, -.element_menu .trigger { - z-index: 444; - font-size: $mediumFontSize; - font-weight: normal; - border-color: #666 -} - -#dialog_publicator .submenu { - display: none; - position: absolute; -} - -#dialog_publicator .multi_menu .submenu button { - background-color: #313131; - background-image: none; -} - -#dialog_publicator .multi_menu .submenu button.ui-state-hover { - background-color: #212121; -} - -#dialog_publicator .ui-state-active a { - color: #0077BC; -} - -#dialog_publicator .api_banner button { - border: 1px solid #515151; - background-color: #404040; -} - -#dialog_publicator .api_banner .submenu.ui-buttonset { - z-index: 600; -} - -#dialog_publicator .api_content .element { - padding: 5px; - color: $textPrimaryColor; -} - -#dialog_publicator .api_content .element.odd { - background-color: #404040; - -webkit-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25) inset, -2px -2px 4px rgba(0, 0, 0, 0.25) inset; - -moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25) inset, -2px -2px 4px rgba(0, 0, 0, 0.25) inset; - box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25) inset, -2px -2px 4px rgba(0, 0, 0, 0.25) inset; -} - -#dialog_publicator .api_content .element.even { - background-color: #666666; - -webkit-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25) inset, -2px -2px 4px rgba(0, 0, 0, 0.25) inset; - -moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25) inset, -2px -2px 4px rgba(0, 0, 0, 0.25) inset; - box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25) inset, -2px -2px 4px rgba(0, 0, 0, 0.25) inset; -} - -#dialog_publicator .api_content .element.selected { - background-color: #999999; -} - -#dialog_publicator .api_content .element table .informations { - width: 296px; -} - -#ul_main_pub_tabs { - width: 200px; - position: absolute; - overflow: hidden; - right: auto; -} - - -#ul_main_pub_tabs { - width: 200px; - position: absolute; - overflow: hidden; - right: auto; - margin-top: -1px; -} - -#ul_main_pub_tabs li { - padding-left: 20px; - background-repeat: no-repeat; - background-position: 6px center; -} - -#ul_main_pub_tabs li.bridge_Youtube { - background-image: url('#{$iconsPath}youtube-small.gif'); -} - -#ul_main_pub_tabs li.bridge_Dailymotion { - background-image: url('#{$iconsPath}dailymotion-small.gif'); -} - -#ul_main_pub_tabs li.bridge_Flickr { - background-image: url('#{$iconsPath}flickr-small.gif'); -} - - -#publicator_selection { - height: 190px; - bottom: auto; - background-color: $lightBackgroundColor; - > .PNB10 { - overflow: auto; - bottom: 50px; - background-color: $darkerBackgroundColor; - } -} diff --git a/resources/www/prod/skins/ui-components/_modal-edit.scss b/resources/www/prod/skins/ui-components/_modal-edit.scss deleted file mode 100644 index e7abd4c9b1..0000000000 --- a/resources/www/prod/skins/ui-components/_modal-edit.scss +++ /dev/null @@ -1,511 +0,0 @@ -/******* EDITION **************************************************************/ - -#EDIT_ALL { - white-space: normal; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - .content-wrapper { - margin: 10px; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - } -} - -#EDIT_TOP { - background-color: $mediumBackgroundColor; - position: absolute; - top: 0; - left: 0; - width: 100%; - overflow: visible; - border-radius: $defaultBorderRadius; -} - -#EDIT_MENU { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 20px; - overflow: hidden; -} - -.GRP_IMAGE_REP { - margin: 5px; - padding: 5px; - position: absolute; - top: 0; - left: 0; - width: 146px; - height: 156px; -} - -#EDIT_GRPDIAPO { - position: absolute; -} - -#EDIT_FILM2 { - border: 1px solid $darkerBorderColor; - background-color: $darkerBackgroundColor; - position: absolute; - top: 30px; - left: 10px; - bottom: 10px; - right: 10px; - overflow: auto; -} - -#EDIT_ZOOMSLIDER { - position: absolute; - top: 7px; - width: 80px; - right: 7px; - z-index: 9999; -} - -#EDIT_MID { - position: absolute; - left: 0; - bottom: 32px; - width: 100%; - border: none; - overflow: hidden; -} - -#EDIT_MID_L, #EDIT_MID_R { - position: absolute; - top: 0; - bottom: 0; - overflow: visible; -} - -#EDIT_MID_L { - background-color: $mediumBackgroundColor; - width: 700px; - left: 0; - border-radius: $defaultBorderRadius; -} - -#EDIT_MID_R { - width: 400px; - right: 0; - .ui-tabs-panel { - background-color: $mediumBackgroundColor; - } -} - -#EDIT_MID_R li.ui-tabs-active, -#EDIT_MID_R li.ui-state-active { - background-color: $mediumBackgroundColor; -} - -#divS_wrapper { - overflow-x: visible; - overflow-y: visible; - position: absolute; - top: 10px; - left: 10px; - bottom: 10px; - width: 390px; -} - -#divS { - overflow-x: hidden; - overflow-y: scroll; - position: absolute; - top: 0px; - left: 0px; - bottom: 0px; - right: 10px; - div.edit_field { - cursor: pointer; - font-weight: bold; - padding: 2px; - margin-right: 10px; - position: relative; - - .icon-stack { - font-size: 11px; - cursor: pointer; - width: 19px; - height: 15px; - line-height: 14px; - .icon-stack-base { - color: #777777; //darken($darkerBackgroundColor, 10); - } - .icon-light { - color: $darkerBackgroundColor; //$darkerTextColor; - } - } - } - div.edit_field.odd { - background-color: $darkBackgroundColor; - } - div.edit_field.hover { - background-color: $lightBackgroundColor; - color: $lightTextColor; - } - div.edit_field.active { - background-color: $lightBackgroundActiveColor; - border: 1px solid $lightBorderActiveColor; - } - span.fieldvalue { - white-space: normal; - font-weight: normal; - } -} - -#idEditZone { - position: absolute; - top: 10px; - right: 10px; - bottom: 10px; - left: 420px; -} - -#idFieldNameEdit { - width: 80px; - text-align: center; - overflow: hidden; -} - -#idEditZTextArea { - position: absolute; - top: 0; - left: 0; - width: 99%; - height: 99%; - margin: 0; - padding: 0; - font-size: 15px; -} - -#idEditDateZone { - position: absolute; - top: 30px; - left: 0; - display: none; -} - -#ZTextMultiValued { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: none; -} - -#ZTextStatus { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: none; -} - - -#idExplain { - top: auto; - height: 20px; - color: #FFB300; - text-align: right; - img { - vertical-align: middle; - width: 20px; - height: 20px; - } - .metadatas_restrictionsTips { - cursor: help; - } -} - -#idDivButtons { - bottom: 30px; - top: auto; - height: 20px; - display: none; - text-align: center; -} - -#EditSearch, #EditReplace { - width: 100%; - height: 45px; - font-size: 14px; -} - -#buttonEditing { - margin: 0; - padding: 0; - position: absolute; - left: 0; - bottom: 0; - width: 100%; - height: 28px; - overflow: hidden; - text-align: center; -} - -#EDIT_WORKING { - position: absolute; - top: 100px; - left: 1px; - width: 100%; - display: none; -} -.edit-zone-title { - height: 45px; - bottom: auto; -} -#EDIT_EDIT { - top: 45px; - bottom: 60px; - overflow-x: hidden; - overflow-y: auto; -} - -#EDIT_TOP .diapo div.titre { - overflow: hidden; - position: absolute; - top: 0px; - left: 0px; - width: 100%; - height: auto; - text-align: center; - z-index: 10; -} - -#Edit_copyPreset_dlg form span { - color: $textPrimaryColor; -} - -.Edit_preset_item { - position: relative; - top: 0px; - left: 0px; - width: 550px; - height: 250px; - overflow: auto; - color: $textSecondaryColor; -} - - -#ZTextMultiValued_values { - background-color: $editTextMultiValueBg; - border: 1px solid $editTextMultiValueBorder; - position: absolute; - top: 30px; - left: 4px; - right: 4px; - bottom: 4px; - overflow-x: auto; - overflow-y: scroll; -} -#EDITWINDOW { - .ui-datepicker-inline { - background-color: $darkerBackgroundColor; - background-repeat: repeat-x; - background-position: 50% top; - } - - #ZTextMultiValued_values { - div { - cursor: pointer; - height: 20px; - padding: 2px 14px 2px 2px; - table { - width: 100%; - border: none; - td { - vertical-align: middle; - &.options { - width: 40px; - text-align: right; - .add_all { - display: none; - } - } - } - } - &.hetero { - table { - td.options { - .add_all { - display: inline; - } - } - } - } - &.hilighted { - background-color: $editTextMultiValueHighlightBg; - } - i { - color: #FFFF00; - font-style: normal; - font-weight: 700; - background-color: #222222; - } - } - } - .hetero { - color: #ff8000; - } - .EDIT_presets_list { - padding-left: 3px; - padding-right: 6px; - li { - margin: 0px; - &.opened{ - div { - display: block; - } - .triRight { - display: none; - } - .triDown { - display: inherit; - } - } - .triDown { - display: none; - } - } - div { - display: none; - padding-left: 15px; - padding-bottom: 5px; - p { - font-size: 9px; - padding: 0px; - margin: 0px; - } - } - h1 { - margin: 0px; - padding: 0px; - font-size: 12px; - a.delete { - font-weight: 100; - font-size: 10px; - } - } - } -} - - -/******* THESAURUS ************************************************************/ -$thesaurusBorderColor: #a9a9a9 !default; -div.thesaurus { - margin-left: 2px; - white-space: nowrap; - p { - margin: 0; - } - div.c { - display: none - } -} - -#EDITWINDOW #TH_Ofull, #idFrameTH #TH_Oprop, #idFrameTH #TH_Oclip { - margin: 0; - padding: 0; - width: 100%; -} - -#EDITWINDOW { - div.searchZone { - position: absolute; - top: 0px; - left: 0px; - width: 100%; - height: 100%; - padding: 0px; - margin: 0px; - background: $darkerBackgroundColor; - border: $thesaurusBorderColor 1px solid; - } - div.thesaurus { - div.c { - display: none - } - div.o { - margin-bottom: 1px; - padding-bottom: 2px; - padding-left: 5px; - margin-left: 3px; - border-left: $thesaurusBorderColor 1px solid; - border-bottom: $thesaurusBorderColor 1px solid; - } - div.h { - margin-bottom: 1px; - padding-bottom: 2px; - padding-left: 5px; - margin-left: 3px; - border-left: $thesaurusBorderColor 1px solid; - border-bottom: $thesaurusBorderColor 1px solid; - } - u { - width: 9px; - height: 10px; - margin-right: 2px; - text-align: center; - display: inline-block; - font-size: 8px; - text-decoration: none; - background-color: #f0f0f0; - cursor: pointer; - color: black; - line-height: 10px; - &.w { - cursor: auto; - } - } - b { - cursor: pointer; - } - } - .ui-tabs { - position: absolute; - top: 0px; - left: 10px; - bottom: 0px; - right: 0; - .ui-tabs-nav { - background-color: transparent; - top: 0px; - left: 10px; - right: 10px; - margin-top: 0px; - border-top: 1px solid $workzoneTabTopBorder; - border-radius: 0; - height: 32px; - border-bottom: 1px solid $workzoneTabBorderBottom; - } - .ui-tabs-panel { - position: absolute; - top: 32px; - left: 0; - bottom: 0; - right: 0; - } - } - #geonameTabContainer { - ul.geoname-results { - list-style-type: none; - margin: 10px; - .geoname-add-action { - cursor: pointer; - } - .ui-state-highlight { - color: #2e7db2; - } - } - } -} diff --git a/resources/www/prod/skins/ui-components/_modal-export.scss b/resources/www/prod/skins/ui-components/_modal-export.scss deleted file mode 100644 index 9f0ba861df..0000000000 --- a/resources/www/prod/skins/ui-components/_modal-export.scss +++ /dev/null @@ -1,33 +0,0 @@ -/******* EXPORT ***************************************************************/ - -#printBox { - background-color: $mediumBackgroundColor; - border-radius: $defaultBorderRadius; -} - -#printBox h4, #download h4, -#sendmail h4, #ftp h4 { - margin-bottom: 10px; - font-weight: bold; - font-size: 14px; - line-height: 18px; - color: $textPrimaryColor; - text-decoration: none; -} - -#printBox label, #download label, -#sendmail label, #ftp label { - line-height: 18px; - color: $textPrimaryColor; -} - -#sendmail p, #ftp p, -.buttons_line p { - margin: 20px 0 10px 0; - font-weight: bold; -} - -#ftp .form-horizontal .control-group { - margin-bottom: 10px; -} - diff --git a/resources/www/prod/skins/ui-components/_modal-preferences.scss b/resources/www/prod/skins/ui-components/_modal-preferences.scss deleted file mode 100644 index 7c3b496e23..0000000000 --- a/resources/www/prod/skins/ui-components/_modal-preferences.scss +++ /dev/null @@ -1,36 +0,0 @@ -#look_box .input-small { - height: 22px; - font-family: verdana,"Helvetica Neue",Helvetica,Arial,sans-serif; - font-size: 12px; -} - -#look_box .btn { - margin: 2px; - font-weight: bold; - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); - font-family: verdana,"Helvetica Neue",Helvetica,Arial,sans-serif; -} - -#look_box .radio.inline, #look_box .checkbox.inline { - padding-top: 0px; -} - -#look_box label, #basket_preferences label { - line-height: 21px; - color: $preferencesLabelColor; -} - -#look_box h1, #basket_preferences h1 { - margin: 5px 0; - color: $textPrimaryColor; - font-size: 12px; - font-weight: bold; -} - -#look_box div.box, #basket_preferences div.box { - margin: 5px; - float: left; - width: 98%; -} \ No newline at end of file diff --git a/resources/www/prod/skins/ui-components/_modal-preview.scss b/resources/www/prod/skins/ui-components/_modal-preview.scss deleted file mode 100644 index a4505184aa..0000000000 --- a/resources/www/prod/skins/ui-components/_modal-preview.scss +++ /dev/null @@ -1,234 +0,0 @@ - -#PREVIEWBOX, #EDITWINDOW { - z-index: 1200; - background-color: $modalBackground; - display: none; - border: $modalBorder; //1px solid $darkerBorderColor; - border-radius: $defaultBorderRadius; -} - -#PREVIEWBOX img { - cursor: pointer; -} - -#PREVIEWBOX a.bounce { - BORDER-BOTTOM: #ffe000 1px dashed; - cursor: pointer; -} - -#PREVIEWBOX #PREVIEWTITLE_COLLLOGO { - img { - width: 16px; - height: 16px; - } -} - -.PREVIEW_PIC, .PREVIEW_HD { - position: absolute; -} - -#PREVIEWCURRENT li.selected { - background-color: $bgInverseHoverColor; -} - -#PREVIEWBOX li { - list-style-type: none; -} - -#PREVIEWIMGDESC .descBoxes { - top: 30px; - overflow: auto; -} - -#PREVIEWIMGDESC.PNB10 { - bottom: 0; -} - -#PREVIEWIMGDESCINNER span.fieldName { - font-weight: bold; -} - -#PREVIEWIMGDESC em { - background-color: red; -} - -#PREVIEWOTHERS { - background-color: $mediumBackgroundColor; - overflow-x: hidden; - overflow-y: auto; - left: 0; -} - -#PREVIEWOTHERSINNER ul { - margin: 0; - padding: 0; - position: relative; - float: left; - list-style-type: none; - width: 100%; -} - -#PREVIEWOTHERSINNER li { - position: relative; - float: left; - width: 150px; - margin: 4px 10px; - line-height: 14px; -} - -#PREVIEWOTHERSINNER li.otherRegToolTip { - height: 25px; - overflow: hidden; -} - -#PREVIEWOTHERSINNER li.title { - font-weight: bold; - font-size: $mediumFontSize; - margin: 10px 10px 5px; -} - -#PREVIEWOTHERSINNER li.otherRegToolTip, -#PREVIEWOTHERSINNER li.otherBaskToolTip { - background-color: $mediumBackgroundColor; - border-radius: $defaultBorderRadius; - cursor: pointer; -} - -#PREVIEWOTHERSINNER li.otherRegToolTip span.title { - line-height: 25px; - margin-left: 3px; -} - -#PREVIEWOTHERSINNER li .others_img { - position: relative; - float: left; - width: 25px; - height: 25px; -} - -#PREVIEWTITLEWRAPPER { - background-color: $mediumBackgroundColor; - bottom: 0; -} - -#SPANTITLE { - font-size: 16px; - line-height: 25px; - font-weight: bold; -} - -#PREVIEWCURRENTGLOB, .preview_col_film { - height: 96px; - width: 100%; -} - -#PREVIEWCURRENT { - background-color: $mediumBackgroundColor; -} - -#PREVIEWCURRENTCONT.group_case { - left: 106px; -} - -#PREVIEWCURRENTCONT { - right: 130px; - overflow-x: auto; - overflow-y: hidden; -} - -#PREVIEWCURRENTCONT::-webkit-scrollbar-track { - border-radius: 0; - background-color: #262626; -} - -#PREVIEWCURRENTCONT::-webkit-scrollbar { - height: 5px; - border-radius: 0; -} - -#PREVIEWCURRENTCONT::-webkit-scrollbar-thumb { - border-radius: 0; - width: 3px; - background-color: #595959; -} - -#PREVIEWCURRENTCONT ul { - position: relative; - height: 80px; - float: left; - margin: 0; - padding: 0; -} - -#PREVIEWCURRENT, #PREVIEWCURRENTGLOB { - overflow: hidden; -} - -#PREVMAINREG { - float: left; - position: relative; - width: 96px; - height: 96px; - text-align: center; - background-color: #FFFFFF; -} - -.prevTrainCurrent { - text-align: center; - position: relative; - float: left; - height: 80px; - width: 80px; -} - -#PREVIEWHD { - position: absolute; - width: 100%; - height: 100%; - text-align: center; - z-index: 6000; -} - -#PREVIEWTOOL { - position: absolute; - bottom: 10px; - right: 10px; - text-align: right; - width: 56px; - height: 60px; - top: auto; -} - -#PREVIEWTOOL img, #PREVIEWTOOL span { - float: left; -} - -.prevTrainCurrent .doc_infos, .diapo .doc_infos { - position: absolute; - float: left; - padding: 3px; - z-index: 97; -} - -.prevTrainCurrent .doc_infos img, .diapo .doc_infos img { - vertical-align: middle; -} - -.prevTrainCurrent .duration { - background-color: darken($darkerBackgroundColor, 10); - color: $darkerTextColor; -} - -#PREVIEWIMGCONT { - .documentTips { - width: 100%; - height: 100%; - } -} - -#PREVIEWRIGHT { - top: 7px; - left: 60%; - overflow: hidden; - bottom: 10px; -} diff --git a/resources/www/prod/skins/ui-components/_modal-publish.scss b/resources/www/prod/skins/ui-components/_modal-publish.scss deleted file mode 100644 index ab54d1f322..0000000000 --- a/resources/www/prod/skins/ui-components/_modal-publish.scss +++ /dev/null @@ -1,50 +0,0 @@ - -#modal_feed { - .record_list .ui-state-highlight { - width: 112px; - height: 118px; - position: relative; - float: left; - background: none; - background-color: $darkBackgroundColor; - border-color: $mediumBackgroundColor; - } - form { - .feeds { - color: $darkerTextColor; - overflow: auto; - .list { - margin: 10px 0; - } - .feed { - width: 95%; - height: 18px; - padding: 5px 0; - background-color: $darkerBackgroundColor; - border: 1px solid $darkerBorderColor; - color: $darkerTextColor; - font-size: $mediumFontSize; - cursor: pointer; - &.odd { - background-color: lighten($darkerBackgroundColor, 5); - color: $mediumTextColor; - } - &.hover { - background-color: $lightBackgroundColor; - color: $lightTextColor; - } - &.selected { - background-color: $highlightBackgroundColor; - color: $highlightTextColor; - } - span { - margin: 0 10px; - } - } - } - input.error, - textarea.error { - border: 1px solid red; - } - } -} diff --git a/resources/www/prod/skins/ui-components/_modal-push.scss b/resources/www/prod/skins/ui-components/_modal-push.scss deleted file mode 100644 index eb53f5551d..0000000000 --- a/resources/www/prod/skins/ui-components/_modal-push.scss +++ /dev/null @@ -1,332 +0,0 @@ -/** PUSH BOX */ -.PushBox .content { - background-color: $mediumBackgroundColor; -} - -.PushBox .LeftColumn h1 { - width: 100%; - text-align: center; - margin: 5px 0; - font-weight: bold; - font-size: 16px; -} - -.PushBox .LeftColumn ul { - margin: 10px 0; -} - -.PushBox .LeftColumn ul li img { - margin-right: 5px; - vertical-align: middle; -} - -.PushBox table { - width: 100%; - border: none; - overflow: hidden; - table-layout: fixed; -} - -.PushBox .user_content .header { - height: 35px; - right: 20px; - bottom: auto; -} - -.PushBox .user_content .footer { - height: 35px; - top: auto; - right: 20px; - bottom: 10px; - left: 10px; - text-align: right; -} - -.PushBox .user_content .badges { - top: 50px; - overflow: auto; - height: auto; - bottom: 50px; - left: 20px; - right: 20px; -} - -.PushBox .user_content .badges .badge .deleter { - float: right; - -} - -.PushBox .user_content .badges .badge { - width: 230px; - height: 80px; - margin: 10px; - display: inline-block; - background-color: #515150; - border: 3px solid #515150; - padding: 3px; -} - -.PushBox .user_content .badges .badge.selected { - border: 3px solid #EFEFEF; -} - -.PushBox .user_content .badges .badge .toggles .status_on .toggle_off { - display: none; -} - -.PushBox .user_content .badges .badge .toggles .status_off .toggle_on { - display: none; -} - -.PushBox .user_content .badges .badge td { - vertical-align: top; -} - -.PushBox .user_content .badges .badge td.toggle { - vertical-align: bottom; -} - -.PushBox .user_content .badges .badge .icon { - width: 80px; - background-color: #404040; -} - -.PushBox .user_content .badges .badge .infos { - padding-top: 3px; - padding-left: 5px; -} - -.PushBox .user_content .badges .badge table { - width: 95%; -} - -.PushBox .user_content .badges .badge .infos table { - height: 75px; -} - -.PushBox .user_content .badges .badge .infos tr { - height: 20px; -} - -.PushBox .user_content .badges .badge .infos tr.toggles { - height: 25px; - text-align: center; -} - -.PushBox .user_content .badges .badge .icon img { - margin: 7px; -} - -.PushBox .user_content .badges .badge .name { - font-weight: bold; - white-space: pre-line; - display: block; - font-size: $mediumFontSize; -} - -.PushBox .user_content .badges .badge .subtite { - display: block; - font-size: 10px; -} - -.PushBox .user_content .header .options { - text-align: right; -} - -.PushBox .all-lists .lists { - overflow: auto; -} - -.PushBox .LeftColumn .content ul.list li:nth-child(odd) { - background-color: none; -} - -.PushBox .LeftColumn .content ul.list li:nth-child(even) { - background-color: #515150; -} - -.PushBox .lists ul li:nth-child(odd) { - background-color: none; -} - -.PushBox .lists ul li:nth-child(even) { - background-color: #515150; -} - -.PushBox .LeftColumn .content ul.list li.selected { - background-color: #AAA; -} - -.PushBox .lists .list.selected { - background-color: #AAA; -} - -.PushBox .lists .list { - padding: 3px 0; -} - -.PushBox .welcome { - text-align: center; - font-size: 16px; - line-height: 18px; - margin: 20px 0; -} - -.PushBox .welcome h1 { - font-weight: bold; - margin: 40px 0; -} - -#list-editor-search-results { - -} - -#list-editor-search-results table td { - padding: 1px 0; - overflow: hidden; -} - -#list-editor-search-results table tr { - line-height: 24px; - vertical-align: middle; - cursor: pointer; -} - -#list-editor-search-results table tr.odd { - background-color: #515151; -} - -#list-editor-search-results table tr.selected { - background-color: #D18827; -} - -#list-editor-search-results table th.sortable span { - margin: 0 5px; -} - -#list-editor-search-results table th.sortable { - cursor: pointer; -} - -#list-editor-search-results table th.sortable.hover, -#list-editor-search-results table th.sortable.sorted { - background-color: #F0AD30; -} - -#list-editor-search-results table th.sortable span.ord_notifier { - display: none; -} - -#list-editor-search-results table th.sortable.sorted span.ord_notifier { - display: inline; -} - -#ListShare table { - width: 100%; - margin: 5px; - background-color: #505050; -} - -#ListManager .content.readonly .badge { - width: 250px; - display: inline-block; - margin: 5px; - background-color: #515150; - padding: 5px; -} - -#ListManager .content.readonly .badge .deleter { - float: right; -} - -#ListManager .content.readonly .badge table { - width: auto; - table-layout: fixed; -} - -#ListManager .content.readonly .badge .infos { - padding: 2px; -} - -#ListManager h1 span.title { - font-size: 24px; - line-height: 24px; - font-weight: bold; - vertical-align: middle; -} - -#PushBox .general_togglers li { - margin-top: 5px; -} - -#PushBox .general_togglers button { - margin: 0; - padding: 4px 5px; - width: 100%; -} - -#PushBox .general_togglers button .ui-button-text { - font-weight: lighter; -} - -#PushBox .content .list_saver { - padding-top: 20px; - padding-bottom: 20px; - display: block; -} - -#PushBox .content .list_saver input { - margin: 0; - padding: 4px 2px; - width: 115px; -} - -#PushBox .content .list_saver .btn { - margin: 0; - padding: 0; - height: 23px; -} - -#find-user { - line-height: 15px; -} - -#ListManager .content .lists span.action { - display: block; - text-align: center; - font-weight: bold; - width: 100%; -} - -#recommanded-users { - margin-top: 25px; - line-height: 15px; -} - -#recommanded-users a:last-child { - color: #0088CC; - text-decoration: none; -} - -#QuickAddUser table { - width: 100%; - table-layout: auto; -} - -#QuickAddUser table tr td { - padding: 5px; -} - -#QuickAddUser table td:last-child { - text-align: left; -} - -#QuickAddUser input { - border: 1px solid #CCCCCC; - border-radius: $defaultBorderRadius; - box-shadow: 0 1px 1px #EEEEEE; - display: inline-block; - margin: 0 5px 0 0; - padding: 4px; - width: 95%; -} diff --git a/resources/www/prod/skins/ui-components/_pagination.scss b/resources/www/prod/skins/ui-components/_pagination.scss deleted file mode 100644 index 23a1608ccf..0000000000 --- a/resources/www/prod/skins/ui-components/_pagination.scss +++ /dev/null @@ -1,104 +0,0 @@ -$paginationLinkColor: $linkDefaultColor !default; - -#tool_navigate input { - text-align: center; -} - -#tool_navigate a { - padding: 1px 5px; - margin: 0 4px; - background-color: #0077BC; - border-radius: $defaultBorderRadius; - font-size: $mediumFontSize; - line-height: 14px; - font-weight: bold; - cursor: pointer; - color: $paginationLinkColor -} - - -#paginate { - float: right; - margin: 0 65px 15px 0; - min-height: 52px; -} - -#idFrameT #answers:hover #paginate { - margin-right: 59px; -} - -#paginate #tool_navigate { - background-color: $paginateBg1; -} - -#paginate #tool_navigate #NEXT_PAGE:hover, -#paginate #tool_navigate #PREV_PAGE:hover, -#paginate #tool_navigate #last:hover, -#paginate #tool_navigate #first:hover { - background-color: $highlightBackgroundColor; -} - -#paginate #tool_navigate #NEXT_PAGE { - background: url('#{$iconsPath}sprite_paginate.png') -72px 20px no-repeat; - width: 49px; - border-left: 1px solid $paginateBorderColor; -} - -#paginate #tool_navigate #PREV_PAGE { - background: url('#{$iconsPath}sprite_paginate.png') -29px 20px no-repeat; - width: 49px; - border-right: 1px solid $paginateBorderColor; -} - -#paginate #tool_navigate #last { - background: url('#{$iconsPath}sprite_paginate.png') -121px 20px no-repeat; - width: 49px; - border-left: 1px solid $paginateBorderColor; -} - -#paginate #tool_navigate #first { - background: url('#{$iconsPath}sprite_paginate.png') 21px 20px no-repeat; - width: 49px; - border-right: 1px solid $paginateBorderColor; -} - -#paginate #tool_navigate #NEXT_PAGE:hover, -#paginate #tool_navigate #PREV_PAGE:hover, -#paginate #tool_navigate #last:hover, -#paginate #tool_navigate #first:hover { - background-image: url('#{$iconsPath}sprite_paginate_hover.png'); -} - - -#paginate #tool_navigate input, -#paginate #tool_navigate a { - border: none; - border-top: 1px solid $paginateBorderColor; - border-bottom: 1px solid $paginateBorderColor; - padding: 0; - margin: 0; - border-radius: 0; - height: 50px; - line-height: 50px; - vertical-align: middle; - width: 30px; - background: none; - font-weight: normal; - text-shadow: none; - box-shadow: none; - color: $paginationLinkColor; -} - -#paginate #tool_navigate:first-child { - border-left: 1px solid $paginateBorderColor; -} - -#paginate #tool_navigate:last-child { - border-right: 1px solid $paginateBorderColor; -} - -#paginate #tool_navigate input, -#paginate #tool_navigate a:hover { - color: $highlightTextColor; - background: $highlightBackgroundColor; -} diff --git a/resources/www/prod/skins/ui-components/_search-form.scss b/resources/www/prod/skins/ui-components/_search-form.scss deleted file mode 100644 index 689a7dd186..0000000000 --- a/resources/www/prod/skins/ui-components/_search-form.scss +++ /dev/null @@ -1,123 +0,0 @@ -/******* FORMULAIRE DE RECHERCHE **********************************************/ -form.phrasea_query input.query { - padding-left: 30px; - font-size: 16px; - margin: 0; - width: 59%; -} - -.searchFormWrapper { - margin: 30px 0 0 5px; - line-height: 30px; -} - -#searchForm { - width: 100%; - float: left; - .input-append { - float: left; - width: 50%; - .btn { - border:none; - } - a.btn { - height: 22px; - width: 20px; - } - button.btn { - height: 30px; - width: 110px; - } - } - .control-group { - float: right; - margin-left: 0; - } - .danger .danger_indicator, - .danger.danger_indicator { - border-color: #c9c900; - background-color: #FCEC98; - color: #000000; - } - -} -#adv_search { - table { - &.colllist { - width: 290px; - } - &.filterlist { - width: 600px; - } - } -} - -/******* SEARCH ***************************************************************/ - -#adv_search .sbasglob, -.adv_options .sbasglob, -#sbasfiltercont { - color: $lightTextColor; - margin: 0 0 0 10px; -} - -#searchForm input.input-small.datepicker::-webkit-input-placeholder { font-size:12px; } -#searchForm input.input-small.datepicker::-moz-placeholder { font-size:12px; } /* firefox 19+ */ -#searchForm input.input-small.datepicker:-ms-input-placeholder { font-size:12px; } /* ie */ -#searchForm input.input-small.datepicker:-moz-placeholder { font-size:12px; } - -#adv_search .sbasglob hr, -.adv_options .sbasglob hr, -.adv_options #sbasfiltercont hr { - margin: 10px 0; - border: 0; - border-top: 1px solid #666666; - border-bottom: 1px solid #AAAAAA; -} - -#adv_search .sbasglob .sbas_list, -.adv_options .sbasglob .sbas_list { - padding: 5px 0; - border-radius: $defaultBorderRadius; -} - -#adv_search .sbasglob .sbas_list.selected, -.adv_options .sbasglob .sbas_list.selected { - border: 2px solid $lightBorderSelectedColor; - background-color: $lightBackgroundSelectedColor; -} - -.sbasglob .btn-toolbar, -#sbasfiltercont .btn-toolbar { - margin: 10px; - text-align: center; -} - -.sbas_list label { - color: $lightTextColor; -} - -.clkbas { - white-space: normal; - margin:0 5px; - -webkit-column-break-inside:avoid; - -moz-column-break-inside:avoid; - -o-column-break-inside:avoid; - -ms-column-break-inside:avoid; - column-break-inside:avoid; - span { - cursor: pointer; - font-weight: bold; - margin: 0 5px; - } -} - -#searchForm .clkbas label { - overflow: hidden; - text-overflow: ellipsis; -} - -.clkbas img { - vertical-align: middle; - max-height: 22px; -} diff --git a/resources/www/prod/skins/ui-components/_thumb-extractor.scss b/resources/www/prod/skins/ui-components/_thumb-extractor.scss deleted file mode 100644 index e64f196425..0000000000 --- a/resources/www/prod/skins/ui-components/_thumb-extractor.scss +++ /dev/null @@ -1,155 +0,0 @@ -/******* THUMB EXTRACTOR ******************************************************/ - -#thumbExtractor { - background-color: $lightBackgroundColor; - .main_title { - height: 15px; - font-weight: bold; - top: 15px; - } - .part_title_left { - height: 20px; - width: 320px; - top: 30px; - left: 10px; - } - .part_title_right { - height: 20px; - width: 320px; - top: 30px; - left: 380px; - } - #thumb_info { - padding-top: 25px; - font-style: italic; - } - .frame_video { - border: 1px solid $darkerBorderColor; - height: 210px; - width: 320px; - top: 50px; - left: 10px; - } - #thumb_video { - height: 100%; - width: 100%; - } - .frame_canva { - border: 1px solid $darkerBorderColor; - border-bottom: none; - height: 210px; - line-height: 210px; - width: 320px; - top: 50px; - left: 380px; - z-index: 2; - text-align: center; - } - #thumb_canvas { - vertical-align: middle; - display: inline-block; - line-height: 20px; - } - .action_bar_left { - height: 20px; - width: 320px; - left: 10px; - top: 260px; - padding: 2px; - } - .action_bar_right { - height: 20px; - width: 320px; - top: 260px; - left: 380px; - display: table-row; - padding: 2px; - .action_icon { - padding-right: 10px; - display: table-cell; - vertical-align: middle; - &:hover { - cursor: pointer; - } - } - } - #thumb_reset_button { - width: 41px; - height: 41px; - position: absolute; - bottom: 10px; - right: 60px; - display: none; - line-height: 20px; - } - #thumb_delete_button { - width: 41px; - height: 41px; - position: absolute; - bottom: 10px; - right: 10px; - display: none; - line-height: 20px; - } - #thumb_delete_button, - #thumb_reset_button { - cursor: pointer; - } - #thumb_slider { - height: 95px; - width: 320px; - top: 285px; - left: 380px; - padding: 0; - overflow: auto; - } - #thumb_wrapper { - white-space: nowrap; - margin-top: 15px; - img { - display: inline-block; - width: 80px; - height: auto; - margin-left: 5px; - margin-right: 5px; - &.selected { - border: 2px solid $bgInverseHoverColor; - } - } - } - #thumb_camera_button { - cursor: pointer; - height: 50px; - width: 320px; - top: 300px; - left: 10px; - text-align: center; - } - .thumb_submit_action { - cursor: pointer; - height: 30px; - width: 80px; - top: 385px; - left: 620px; - padding: 0; - } - .action_frame .ui-slider .ui-slider-handle { - background-color: #FFFFFF; - } -} - -#thumb_confirm { - table { - table-layout: fixed; - width: 100%; - td { - padding: 5px; - text-align: center; - vertical-align: middle; - img.selected { - width: 160px; - height: auto; - } - } - } -} diff --git a/resources/www/prod/skins/ui-components/_upload.scss b/resources/www/prod/skins/ui-components/_upload.scss deleted file mode 100644 index a801e66a44..0000000000 --- a/resources/www/prod/skins/ui-components/_upload.scss +++ /dev/null @@ -1,253 +0,0 @@ - - -/******* UPLOAD MANAGER *******************************************************/ - -#uploadBoxLeft, #uploadBoxRight { - width: 48.5%; - height: 100%; - overflow: auto; - text-align: center; -} - -#uploadBoxLeft { - float: left; -} - -#uploadBoxRight { - float: right; -} - -#uploadBox { - height: 100%; - h5 { - margin-top: 20px; - margin-bottom: 10px; - font-size: $mediumFontSize; - font-weight: bold; - text-align: left; - } - .clear { - clear: both; - } - .upload-tabs { - height: 100%; - } - .ui-tabs .ui-tabs-panel { - padding: 20px; - } - .well { - margin: 0; - padding: 0.5%; - color: $textPrimaryInverseColor; - } - #fileupload { - height: 97%; - } - span.comment { - font-style: italic; - color: $textSecondaryColor; - } - .fileinput-button { - position: relative; - overflow: hidden; - input { - position: absolute; - top: 0; - right: 0; - margin: 0; - border: solid transparent; - border-width: 0 0 100px 200px; - opacity: 0; - filter: alpha(opacity=0); - -moz-transform: translate(-300px, 0) scale(4); - direction: ltr; - cursor: pointer; - } - } - .status-tab { - width: 100%; - margin-bottom: 10px; - td { - padding: 2px; - } - } - .status-tab-left { - width: 48%; - padding-right: 5px; - text-align: right; - } - .status-tab-right { - width: 48%; - padding-left: 5px; - text-align: left; - } - .status-tab-left input, - .status-tab-right input { - margin-left: 5px; - margin-right: 5px; - } - .thumbnails { - margin-left: -20px; - > li { - margin-left: 20px; - } - } - .upload-record { - height: 260px; - background-color: $uploadBg1; - .canva-wrapper { - height: 125px; - overflow: auto; - } - .name-doc { - height:40px; - overflow: hidden; - -o-text-overflow: ellipsis; /* pour Opera 9 */ - text-overflow: ellipsis; - font-weight: bold; - } - .infos-doc { - overflow: hidden; - -o-text-overflow: ellipsis; /* pour Opera 9 */ - text-overflow: ellipsis; - color: #777777; - height: 40px; - } - .error, .success{ - padding-top: 2px; - padding-bottom: 3px; - display: none; - overflow: auto; - } - .error { - padding: 0; - width: 100%; - } - .remove-element { - margin: 2px 0; - } - } - .flash-box .upload-record { - height: 160px; - background-color: $uploadBg2; - } - .select-label { - font-style: italic; - color: $textSecondaryColor; - } - .select-row { - font-weight: normal; - font-style: normal; - } - .progress { - margin-top: 4px; - margin-bottom: 10px; - height: 10px; - } - .uploader-button{ - text-align: center; - width:50%; - } - #addFileList { - width:100%; - table-layout:fixed; - border:none; - td{ - vertical-align: middle; - } - } - .uploader-icon { - width:15%; - text-align:left; - } - .uploader-info { - font-size:10px; - width:35%; - text-align:left; - p { - line-height:10px; - font-size:10px; - word-wrap: break-word; - } - a { - text-decoration: underline; - color: darkblue; - margin:5px 0; - } - } -} - -#uploadBoxRight .progress .progress-bar { - height: 10px; -} -#lazaretBox { - &.container-fluid { - margin: 0; - padding: 0; - } - .loading { - background-image: url('#{$iconsPath}#{$uploadLoaderImg}'); - background-position: center right; - background-repeat: no-repeat; - } - li.wrapper-item { - margin-bottom: 20px; - } - .lazaret-file h5, - .lazaret-proposals h5 { - margin-top: 0; - margin-bottom: 10px; - } - .lazaret-file p, - .lazaret-proposals p { - font-weight: bold; - overflow: hidden; - -o-text-overflow: ellipsis; /* for Opera 9 */ - text-overflow: ellipsis; - } - span.info { - display: inline; - font-weight: normal; - } - .lazaret-file, - .lazaret-proposals { - .thumbnails { - margin-left: 0; - background-color: #FFFFFF; - min-height: 234px; - li { - margin: 0; - } - img { - max-height: 480px; - } - - .record-thumb { - height: 180px; - } - } - } - .well { - .lazaret-file, - .lazaret-proposals { - a { - font-weight: normal; - color: $textPrimaryInverseColor; - &:hover { - color: $textInverseHoverColor; - } - } - } - } - - .lazaret-proposals .records-subititution { - margin: 0 10px 10px 0; - } - button, .btn { - font-weight: normal; - img { - margin-right: 5px; - vertical-align: middle; - } - } -} diff --git a/resources/www/prod/skins/ui-components/_workzone-baskets.scss b/resources/www/prod/skins/ui-components/_workzone-baskets.scss deleted file mode 100644 index f667a9702b..0000000000 --- a/resources/www/prod/skins/ui-components/_workzone-baskets.scss +++ /dev/null @@ -1,185 +0,0 @@ - -#idFrameC { - #baskets { - top: $tabHeight !important; - border-top: 1px solid $darkBorderColor; - > div { - // border-top: 1px solid $mediumBorderColor; - } - .bloc { - position: absolute; - top: 0; - left: 0; - right: 1px; - bottom: 0; - overflow-y: auto; - overflow-x: hidden; - &.groupDrop { - border: 3px solid #a00; - } - } - .content { - &.grouping .alert_datas_changed, - &.basket .alert_datas_changed { - position: relative; - margin: 10px 0; - right: 0; - left: 0; - } - } - .alert_datas_changed { - position: absolute; - top: 5px; - height: 20px; - right: 26px; - left: 10px; - background-color: $workzoneBasketAlertDataBg; - color: $workzoneBasketAlertDataColor; - text-align: center; - font-weight: bold; - font-size: $mediumFontSize; - display: none; - z-index: 5000; - } - .insidebloc { - top: 0; - } - .top-scroller, .bottom-scroller { - height: 80px; - position: absolute; - border: none; - top: 0px; - bottom: 0; - left: 0; - right: 0; - } - .top-scroller { - bottom: auto; - } - - .bottom-scroller { - top: auto; - } - .SSTT { - &.active { - &.ui-corner-top { - border: none; - top: 0; - background-color: $mediumBackgroundColor; - } - } - &.grouping { - &.active { - &.ui-corner-top { - border-bottom: none; - } - } - } - .title { - overflow: hidden; - left: 30px; - right: 40px; - height: 16px; - margin: 2px 0; - font-size: $mediumFontSize; - } - .menu { - text-align: right; - position: absolute; - right: 0; - top: 0; - padding: 3px; - margin: 0 5px 0 0; - table td { - width: 20px; - } - } - .workzone-menu-title { - text-overflow: ellipsis; - padding-right: 65px; - overflow: hidden; - white-space: nowrap; - display: block; - } - img { - max-height: 18px; - vertical-align: middle; - cursor: help; - margin-right: 9px; - } - } - .menu { - .contextMenuTrigger { - cursor: pointer; - display: block; - padding: 0; - margin: 0; - background: url('#{$iconsPath}contextMenuTrigger.png') 0 13px no-repeat; - height: 45px; - width: 13px; - } - } - .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { - color: $textPrimaryActiveColor; - //font-size: 1em; - } - } -} - -/** hack IE7 only */ -*:first-child + html .workzone-menu-title { - margin-right: 65px; -} - -.ui-accordion .ui-accordion-header.baskDrop { - color: red; -} - -#basket_menu_trigger { - padding: 32px 7px 0 0; - float: right; - font-size: 9px; - cursor: pointer; -} - -.CHIM.diapo { - width: 100px; - overflow: hidden; -} - -.CHIM.diapo .title, .CHIM.diapo .status { - position: relative; - height: 20px; - z-index: 15; - font-size: 0.8em -} - -.CHIM.diapo .title { - height: 15px; - margin: 2px 0; - overflow: hidden; -} - -.CHIM.diapo .bottom { - position: absolute; - bottom: 0; - right: 0; - z-index: 15; - vertical-align: middle; - .WorkZoneElementRemover { - padding: 3px; - } -} - -.CHIM.diapo .bottom span, .CHIM.diapo .bottom img { - cursor: pointer; - vertical-align: middle; - color: $textPrimaryColor; - font-size: 10px; -} - -.CHIM.diapo img { - margin-top: 9px; - z-index: 14; - position: relative; -} diff --git a/resources/www/prod/skins/ui-components/_workzone-plugins.scss b/resources/www/prod/skins/ui-components/_workzone-plugins.scss deleted file mode 100644 index 02983c7b6d..0000000000 --- a/resources/www/prod/skins/ui-components/_workzone-plugins.scss +++ /dev/null @@ -1,10 +0,0 @@ - -#idFrameC { - - #plugins { - //position: relative; - //left: 5px; - //border-top: 1px solid $darkBorderColor; - top: $tabHeight !important; - } -} diff --git a/resources/www/prod/skins/ui-components/_workzone-proposals.scss b/resources/www/prod/skins/ui-components/_workzone-proposals.scss deleted file mode 100644 index 20d0a9ef5c..0000000000 --- a/resources/www/prod/skins/ui-components/_workzone-proposals.scss +++ /dev/null @@ -1,159 +0,0 @@ -$proposalsTitleColor: $darkerTextColor !default; -$proposalsTitleHoverColor: $darkerTextHoverColor !default; -$proposalsContentTextColor: $darkerTextColor !default; -$proposalsContentTextColor: $darkerTextColor !default; -$proposalFacetColor: #FFF !default; -$proposalsFacetHoverColor: #FFF !default; -/******* PROPOSALS ************************************************************/ - - -#proposals { - position: relative; - left: 5px; - border-top: 1px solid $darkBorderColor; - top: $tabHeight !important; - *:focus { - outline: none; - } - ul { - ul { - background-color: $darkBackgroundColor; - } - li { - line-height: 17px; - font-size: $mediumFontSize; - } - &.fancytree-container { - background-color: $mediumBackgroundColor; - border: 0px none transparent; - overflow-x: hidden; - padding-left: 0; - padding-top: 0; - ul { - padding: 17px 0; - overflow: auto; - width: 101%; - max-height: 400px; - overflow-x: hidden; - li { - padding-left: 30px; - line-height: 25px; - white-space: pre-line !important; - &:hover { - background-color: $proposalColor; - .fancytree-title { - color: $proposalsFacetHoverColor; - // color: $textPrimaryHoverColor; - } - } - } - } - } - } - .fancytree-folder { - font-weight: bold; - font-size: $xmediumFontSize; - color: $proposalsTitleColor; - height: 49px; - line-height: 49px; - margin-left: 0; - border-left: 4px solid $mediumBackgroundColor; - border-bottom: 1px solid $mediumBorderColor; - .fancytree-title { - font-size: $xmediumFontSize; - margin-left: 10px; - } - &:hover { - border-left: 4px solid $proposalColor; - color: $proposalsTitleHoverColor; - .fancytree-title { - color: $proposalsTitleHoverColor; - } - } - .fancytree-expander { - &:before { - content: '\25C0'; /* U+25C0 BLACK LEFT-POINTING TRIANGLE */ - color: $mediumTextColor; - } - &:hover { - &:before { - color: $basketsColor; - } - } - - } - } - .fancytree-expanded { - .fancytree-expander:before { - content: '\25BC'; /* U+25BC BLACK BLACK DOWN-POINTING TRIANGLE */ - color: $textPrimaryHoverColor; - } - } - - - .fancytree-expander { - position: absolute; - right: 10px; - background-image: none; - margin: 0; - padding: 0; - width: auto; - height: auto; - font-weight: normal; - font-size: 65%; - } - - .fancytree-title { - font-size: $xmediumFontSize; - color: $proposalsTitleColor; - background-color: transparent; - border: 0px none transparent; - } - - .fancytree-node { - font-size: $xmediumFontSize; - color: $proposalsContentTextColor; - //background-color: transparent; - //border: 0px none transparent; - cursor: pointer; - } - - .facetFilter { - font-weight: normal; - position: absolute; - width: 127px; - height: 25px; - line-height: 25px; - vertical-align: middle; - border-radius: 4px; - right: 28px; - background-color: $proposalColor; - color: $proposalFacetColor; - padding-left: 13px; - padding-right: 13px; - margin-top: 11px; - } - - .facetFilter-label { - position: absolute; - left: 13px; - right: 14px; - overflow: hidden; - cursor: default; - } - - .facetFilter-gradient { - position: absolute; - width: 20px; - right: 0; - } - - .facetFilter-closer { - position: absolute; - right: 13px; - cursor: pointer; - background: url('#{$iconsPath}bgd_facetFilter.png') 0 5px no-repeat; - height: 25px; - width: 14px; - } -} diff --git a/resources/www/prod/skins/ui-components/_workzone-thesaurus.scss b/resources/www/prod/skins/ui-components/_workzone-thesaurus.scss deleted file mode 100644 index 445d615922..0000000000 --- a/resources/www/prod/skins/ui-components/_workzone-thesaurus.scss +++ /dev/null @@ -1,235 +0,0 @@ -$thesaurusTabHeight: $subTabHeight !default; -.treeview { - - li { - color: $mediumTextColor; - vertical-align: middle; - background-image: none; - } - > li.expandable { - min-height: 50px; - line-height: 47px; - vertical-align: middle; - position: relative; - background: none; - padding-top: 0; - padding-bottom: 0; - border-bottom: 1px solid $mediumBorderColor; - > .hitarea { - height: 51px; - background: url('#{$iconsPath}sprite_tree_first.png') 99% 22px no-repeat; - border-left: 5px $mediumBackgroundColor solid; - &:hover, - &.active { - border-left: 5px $thesaurusColor solid; - } - } - } - .hitarea { - background: none; - width: 100%; - height: 100%; - position: absolute; - } - ul { - li { - .hitarea { - background: url('#{$iconsPath}icon_tree.png') 0 0 no-repeat; - position: relative; - height: 9px; - width: 9px; - margin-top: 5px; - } - &:hover { - color: $textPrimaryColor; - } - span { - color: $mediumTextColor; - &.h { - color: $thesaurusColor !important; - } - } - } - } -} - -#THPD_T_treeBox { - font-size: $xmediumFontSize; - overflow-x: hidden; - overflow-y: hidden; - > div { - width: 100%; - display: inline-block; - } - &:hover { - overflow-y: auto; - } -} - -#THPD_T_treeBox::-webkit-scrollbar-track { - border-radius: 0; - background-color: #1f1f1f; -} - -#THPD_T_treeBox::-webkit-scrollbar { - width: 6px; - background-color: #474747; - display: none; -} - -/* ================================== -dans l'onglet thesaurus : arbres, menus contextuels -===================================== */ -.ui-tabs { - #thesaurus_tab { - top: $tabHeight !important; - border-top: 1px solid $darkBorderColor; - - } -} -#THPD_tabs { - right: 0; - - .ui-tabs-nav { - li.th_tab { - a { - color: $textPrimaryColor; - } - &.th_tab { - height: $thesaurusTabHeight; // in order to display bottom border - margin: 0; - border-bottom: 1px solid transparent; - box-sizing: border-box; - .ui-state-active { - border-bottom: 1px solid $thesaurusColor; - } - a { - height: $thesaurusTabHeight; - line-height: $thesaurusTabHeight; - vertical-align: middle; - margin: 0; - padding: 0 20px; - display: block; - text-decoration: none; - } - } - } - .ui-state-default A { - color: $thesaurusContextMenuColor; - } - .ui-tabs-active A { - color: $textPrimaryActiveColor; - text-decoration: underline; - } - } - .treeview { - ul { - background-color: $darkBackgroundColor; - margin-left: -16px; - padding-left: 16px; - li { - padding-top: 5px; - padding-bottom: 5px; - } - } - span { - cursor: pointer; - &.h { /* highlighted (filtered) */ - color: #FFFFD0; - font-weight: bold; - } - } - i { /* count of hits */ - color: #80FF80; - background-color: #606060; - font-style: normal; - margin-left: 10px; - padding-left: 3px; - padding-right: 3px; - font-family: courier; - } - } - - .treeview LI.selected SPAN { - background-color: $thesaurusColor !important; - color: $textPrimaryActiveColor !important; - } - - .treeview LI.selected SPAN { - background-color: #ff0000; - } - - .treeview LI.selected LI SPAN { - background-color: transparent; - } - - .context-menu-item-disabled { - background-color: #ff0000; - } -} -#idFrameC .ui-tabs { - #THPD_C.ui-tabs-panel, - #THPD_T.ui-tabs-panel{ - top: 46px; - } -} - -#THPD_T, #THPD_C { - // margin-top: 10px; - margin-left: 0px; -} - -#THPD_WIZARDS { - .gform { - .input-append { - width: 100%; - margin: 0; - padding: 0; - border: 1px solid $mediumBorderColor; - border-top: none; - input.input-medium { - width: 80%; - border-radius: 0; - height: 50px; - padding: 0 2.5%; - background: $thesaurusInputBackground; - border: none; - float: left; - margin: 0; - } - .th_ok { - width: 15%; - line-height: 50px; - vertical-align: middle; - padding: 0; - border-radius: 0; - background-color: $mediumBackgroundColor; - color: $mediumTextColor; - border: none; - margin: 0; - outline: none; - float: left; - box-shadow: none; - -webkit-appearance: none; - -moz-appearance: none; - } - .th_clear { - position: relative; - z-index: 1000; - float: right; - margin: -50px 15% 0 0; - display: none; - width: 30px; - line-height: 50px; - padding: 0; - border-radius: 0; - background: url('#{$iconsPath}icon_clear_search.png') 50% no-repeat; - border: none; - outline: none; - box-shadow: none; - -webkit-appearance: none; - } - } - } -} - diff --git a/resources/www/prod/skins/ui-components/_workzone.scss b/resources/www/prod/skins/ui-components/_workzone.scss deleted file mode 100644 index 5543055ad9..0000000000 --- a/resources/www/prod/skins/ui-components/_workzone.scss +++ /dev/null @@ -1,196 +0,0 @@ -$workzoneBackgroundColor: $darkBackgroundColor !default; //$mediumBackgroundColor !default; -$workzoneTopBorder: none !default; -$workzoneTabTopBorder: 1px solid $darkBorderColor !default; -$workzoneBorderTopColor: $mediumBorderColor !default; -$tabHeight: 86px !default; -$subTabHeight: 46px !default; - - -$workzoneTabContentBackgroundColor: $workzoneBackgroundColor !default; - -$workzoneTabBackgroundColor: $workzoneBackgroundColor !default; -$workzoneTabTextColor: $mediumTextColor !default; - -$workzoneTabActiveBackgroundColor: $tabContentBackgroundColor !default; -$workzoneTabActiveTextColor: $lightTextColor !default; - -$workzoneTabDisabledBackgroundColor: $tabBackgroundColor !default; -$workzoneTabDisabledTextColor: $mediumTextActiveColor !default; - - -/** - * Workzone - */ -#idFrameC { - top: 0 !important; - min-width: 300px; - bottom: 0 !important; - &.closed { - min-width: 0; - } - #retractableButton { - cursor: pointer; - width: 70px; - height: 85px; - float: right; - text-align: center; - line-height: 85px; - margin-bottom: -20px; - i { - font-size: 23px; - color: $mediumTextColor; - } - } - .wrapper { - background-color: $workzoneBackgroundColor; - right: 10px; - border-top: $workzoneTopBorder; //$workzoneBorderTop; - } - - .ui-tabs { - position: absolute; - top: 0px; - left: 0px; - bottom: 0px; - right: 0; - margin: 0; - padding: 0; - .ui-tabs-nav { - background-color: $workzoneTabContentBackgroundColor; - top: 0; - left: 10px; - right: 10px; - //margin-top: 21px; - // border-top: 1px solid $workzoneTabTopBorder; - border-radius: 0; - height: $subTabHeight; - border-bottom: 1px solid $workzoneTabBorderBottom; - box-sizing: border-box; - li { - width: auto; - height: $tabHeight; - display: inline-block; - background-color: $workzoneTabBackgroundColor; - z-index: 10; - border-radius: 0; - margin: 0; - box-sizing: border-box; - &.proposals_WZ { - &.ui-state-active { - a { - border-bottom: 3px solid $proposalColor; - } - } - &.active { - img.proposals_off { - display: none; - } - } - img.proposals_on { - display: none; - } - } - - /*&.proposals_WZ.ui-state-active a { - border-bottom: 3px solid #4c5d84; - }*/ - &.thesaurus.ui-state-active a { - border-bottom: 3px solid $thesaurusColor; - } - &.baskets.ui-state-active a { - border-bottom: 3px solid $basketsColor; - } - &.plugins.ui-state-active a { - border-bottom: 3px solid $pluginsColor; - } - - - a { - padding: 0; - margin: 0; - border-radius: 0; - &.escamote { - margin: 25px 25px 0 0; - } - } - &:hover { - a { - background-color: $workzoneTabBgHover; - border-bottom: 3px solid $workzoneTabBgHover; - } - } - &.ui-state-active { - a { - background-color: $workzoneTabBgActive; - border-bottom: 1px solid $thesaurusColor; - // height: 82px; - } - } - } - } - .ui-tabs-panel { - position: absolute; - top: 56px; - left: 0; - bottom: 0; - right: 0; - } - - } - ul.icon-menu { - width: 100%; - } - .icon-menu { - .WZtabs, .WZplugins { - display: block; - width: 70px; - height: 82px; - line-height: 82px; - vertical-align: middle; - text-align: center; - } - .WZbasketTab { - display: block; - background-image: url('#{$iconsPath}workzone32.png'); - background-repeat: no-repeat; - background-position: 9px 21px; - width: 70px; - height: 82px; - } - } - .closed { - .icon-menu li { - clear: left; - } - } - .ui-tabs-panel, - .ui-resizable-handle { - display: none; - } - .tools { - padding: 7px 0 7px 0; - text-align: left !important; - button { - background-color: transparent; - border: none; - width: 16px; - height: 22px; - cursor: pointer; - padding: 0; - } - label { - display: inline; - margin: 0 15px 0 0; - float: left; - font-size: $smallFontSize; - color: $workzoneToolsLabelColor; - line-height: 22px; - vertical-align: middle; - } - } -} - -.alert_datas_changed a { - color: #404040; - text-decoration: underline; -} diff --git a/resources/www/prod/styles/_ie7.scss b/resources/www/prod/styles/_ie7.scss deleted file mode 100644 index 8dec9593f9..0000000000 --- a/resources/www/prod/styles/_ie7.scss +++ /dev/null @@ -1,32 +0,0 @@ -.lt-ie8 { - div.diapo { - display:inline; - float:left; - position:relative; - margin:7px 4px; - - } - #baskets .insidebloc{ - left:10px; - position:absolute; - width:70%; - top:0; - } - - .list .diapo{ - margin:0; - } - - #adv_search table.colllist - { - width:270px; - } - - #adv_search table.filterlist - { - width:580px; - } - .loading{ - background-image:none; - } -} diff --git a/resources/www/prod/styles/_ie8.scss b/resources/www/prod/styles/_ie8.scss deleted file mode 100644 index 6e779ae041..0000000000 --- a/resources/www/prod/styles/_ie8.scss +++ /dev/null @@ -1,25 +0,0 @@ -.lt-ie9 { - #adv_search table.colllist - { - width:270px; - } - - #adv_search table.filterlist - { - width:580px; - } - .btn-image { - width: 16px; - height: 16px; - // border: 1px solid #FF0000; - } - #idFrameC { - .ui-tabs { - .ui-tabs-nav { - li { - margin-top: -20px; - } - } - } - } -} \ No newline at end of file diff --git a/resources/www/prod/styles/main.scss b/resources/www/prod/styles/main.scss deleted file mode 100644 index 223a50ab56..0000000000 --- a/resources/www/prod/styles/main.scss +++ /dev/null @@ -1,150 +0,0 @@ -@import '../../_shared/styles/variables'; -@import '../../../../www/bower_components/fancytree/dist/skin-win8/ui.fancytree'; // to inline import css file, don't put extension -@import '../../vendors/jquery-treeview/jquery.treeview'; -@import '../../../../www/bower_components/humane-js/themes/libnotify'; -@import '../../vendors/jquery-contextmenu/styles/jquery.contextmenu'; -@import '../../vendors/jquery-image-enhancer/styles/jquery.image_enhancer'; -@import '../../vendors/colorpicker/styles/colorpicker'; -@import '../../_shared/styles/main'; - - -#idFrameC { - top: 10px; - bottom: 10px; -} - -#idFrameC .ui-tabs { - bottom: 10px; - left: 0; -} - -#answers { - overflow-x: hidden; - overflow-y: auto; -} - -.caption-tooltip-container .popover-inner .popover-content { - overflow: auto; - overflow-x: hidden; - width: 100%; - box-sizing: border-box; -} - -.popover-inner .popover-content dl.dl-horizontal { - margin-top: 0; - margin-bottom: 0; - -} - -.popover-inner .popover-content dl.dl-horizontal:first-child{ - border-top: none; -} - -.dl-horizontal dt, .popover-inner .popover-content .dl-horizontal dt { - padding-top: 6px; - padding-bottom: 6px; - color: #808080; - text-align: left; - width: 100px ; - /*border-bottom: 1px solid #333;*/ -} - -.dl-horizontal dd, .popover-inner .popover-content .dl-horizontal dd { - padding-top: 6px; - padding-bottom: 6px; - margin-left: 120px; -} - -.break-word { - word-wrap: break-word; -} - -.ui-button:focus, .ui-button-text:focus { - outline: none; -} - -.descBoxes .dl-horizontal dt{ - float: none; - width: 100%; - padding: 0; -} -.descBoxes .dl-horizontal dd{ - padding-top: 0; - margin-left: 10px; -} - - -/** was inline code: */ -.noRepresent { - background-color: #A2F5F5; -} - -.disable { - display: none; -} - -.deployer_opened::before { - content: "\25BC"; -} - -.deployer_closed::before { - content: "\25B6"; -} - -/* Vertical Tabs */ -.ui-tabs-vertical .ui-tabs-nav { padding: .2em .1em .2em .2em; float: left; width: 12em; } -.ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; } -.ui-tabs-vertical .ui-tabs-nav li a { display:block; } -.ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; } -.ui-tabs-vertical .ui-tabs-panel { padding: 1em; float: right;} - -.history-collection { - background-image: url('#{$iconsPath}chgcoll_history.png'); -} - -.history-status { - background-image: url('#{$iconsPath}chgstatus_history.png'); -} - -.history-print { - background-image: url('#{$iconsPath}print_history.png'); -} - -.history-substit, .history-publish { - background-image: url('#{$iconsPath}imgtools_history.png'); -} - -.history-download, .history-mail, .history-ftp { - background-image: url('#{$iconsPath}disktt_history.png'); -} -.history-edit { - background-image: url('#{$iconsPath}ppen_history.png'); -} - -.history-validate, .history-push { - background-image: url('#{$iconsPath}push16.png'); -} - -.history-add { - background-image: url('#{$iconsPath}add.png'); -} - -.history-collection, .history-status, .history-print, .history-substit, .history-publish, .history-download, .history-mail, .history-ftp, .history-edit, .history-validate, .history-push, .history-add { - background-repeat: no-repeat; - background-position: center left; - background-size: 16px 16px; - padding-left: 24px; - min-height: 16px; -} - -@media only screen and (-webkit-min-device-pixel-ratio: 1.3), -only screen and (-o-min-device-pixel-ratio: 13/10), -only screen and (min-resolution: 120dpi) -{ - .history-collection, .history-status, .history-print, .history-substit, .history-publish, .history-download, .history-mail, .history-ftp, .history-edit, .history-validate, .history-push { - background-size: 16px 16px; - } -} - -@import 'ie7'; -@import 'ie8'; diff --git a/resources/www/vendors/colorpicker/css/colorpicker.css b/resources/www/vendors/colorpicker/css/colorpicker.css deleted file mode 100644 index 05b02b4856..0000000000 --- a/resources/www/vendors/colorpicker/css/colorpicker.css +++ /dev/null @@ -1,161 +0,0 @@ -.colorpicker { - width: 356px; - height: 176px; - overflow: hidden; - position: absolute; - background: url(../images/colorpicker_background.png); - font-family: Arial, Helvetica, sans-serif; - display: none; -} -.colorpicker_color { - width: 150px; - height: 150px; - left: 14px; - top: 13px; - position: absolute; - background: #f00; - overflow: hidden; - cursor: crosshair; -} -.colorpicker_color div { - position: absolute; - top: 0; - left: 0; - width: 150px; - height: 150px; - background: url(../images/colorpicker_overlay.png); -} -.colorpicker_color div div { - position: absolute; - top: 0; - left: 0; - width: 11px; - height: 11px; - overflow: hidden; - background: url(../images/colorpicker_select.gif); - margin: -5px 0 0 -5px; -} -.colorpicker_hue { - position: absolute; - top: 13px; - left: 171px; - width: 35px; - height: 150px; - cursor: n-resize; -} -.colorpicker_hue div { - position: absolute; - width: 35px; - height: 9px; - overflow: hidden; - background: url(../images/colorpicker_indic.gif) left top; - margin: -4px 0 0 0; - left: 0px; -} -.colorpicker_new_color { - position: absolute; - width: 60px; - height: 30px; - left: 213px; - top: 13px; - background: #f00; -} -.colorpicker_current_color { - position: absolute; - width: 60px; - height: 30px; - left: 283px; - top: 13px; - background: #f00; -} -.colorpicker input { - background-color: transparent; - border: 1px solid transparent; - position: absolute; - font-size: 10px; - font-family: Arial, Helvetica, sans-serif; - color: #898989; - top: 4px; - right: 11px; - text-align: right; - margin: 0; - padding: 0; - height: 11px; -} -.colorpicker_hex { - position: absolute; - width: 72px; - height: 22px; - background: url(../images/colorpicker_hex.png) top; - left: 212px; - top: 142px; -} -.colorpicker_hex input { - right: 6px; -} -.colorpicker_field { - height: 22px; - width: 62px; - background-position: top; - position: absolute; -} -.colorpicker_field span { - position: absolute; - width: 12px; - height: 22px; - overflow: hidden; - top: 0; - right: 0; - cursor: n-resize; -} -.colorpicker_rgb_r { - background-image: url(../images/colorpicker_rgb_r.png); - top: 52px; - left: 212px; -} -.colorpicker_rgb_g { - background-image: url(../images/colorpicker_rgb_g.png); - top: 82px; - left: 212px; -} -.colorpicker_rgb_b { - background-image: url(../images/colorpicker_rgb_b.png); - top: 112px; - left: 212px; -} -.colorpicker_hsb_h { - background-image: url(../images/colorpicker_hsb_h.png); - top: 52px; - left: 282px; -} -.colorpicker_hsb_s { - background-image: url(../images/colorpicker_hsb_s.png); - top: 82px; - left: 282px; -} -.colorpicker_hsb_b { - background-image: url(../images/colorpicker_hsb_b.png); - top: 112px; - left: 282px; -} -.colorpicker_submit { - position: absolute; - width: 22px; - height: 22px; - background: url(../images/colorpicker_submit.png) top; - left: 322px; - top: 142px; - overflow: hidden; -} -.colorpicker_focus { - background-position: center; -} -.colorpicker_hex.colorpicker_focus { - background-position: bottom; -} -.colorpicker_submit.colorpicker_focus { - background-position: bottom; -} -.colorpicker_slider { - background-position: bottom; -} diff --git a/resources/www/vendors/colorpicker/css/layout.css b/resources/www/vendors/colorpicker/css/layout.css deleted file mode 100644 index 8b3f00ff3f..0000000000 --- a/resources/www/vendors/colorpicker/css/layout.css +++ /dev/null @@ -1,218 +0,0 @@ -body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { - margin:0; - padding:0; -} -table { - border-collapse:collapse; - border-spacing:0; -} -fieldset,img { - border:0; -} -address,caption,cite,code,dfn,em,strong,th,var { - font-style:normal; - font-weight:normal; -} -ol,ul { - list-style:none; -} -caption,th { - text-align:left; -} -h1,h2,h3,h4,h5,h6 { - font-size:100%; - font-weight:normal; -} -q:before,q:after { - content:''; -} -abbr,acronym { border:0; -} -html, body { - background-color: #fff; - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - line-height: 18px; - color: #52697E; -} -body { - text-align: center; - overflow: auto; -} -.wrapper { - width: 700px; - margin: 0 auto; - text-align: left; -} -h1 { - font-size: 21px; - height: 47px; - line-height: 47px; - text-transform: uppercase; -} -.navigationTabs { - height: 23px; - line-height: 23px; - border-bottom: 1px solid #ccc; -} -.navigationTabs li { - float: left; - height: 23px; - line-height: 23px; - padding-right: 3px; -} -.navigationTabs li a{ - float: left; - dispaly: block; - height: 23px; - line-height: 23px; - padding: 0 10px; - overflow: hidden; - color: #52697E; - background-color: #eee; - position: relative; - text-decoration: none; -} -.navigationTabs li a:hover { - background-color: #f0f0f0; -} -.navigationTabs li a.active { - background-color: #fff; - border: 1px solid #ccc; - border-bottom: 0px solid; -} -.tabsContent { - border: 1px solid #ccc; - border-top: 0px solid; - width: 698px; - overflow: hidden; -} -.tab { - padding: 16px; - display: none; -} -.tab h2 { - font-weight: bold; - font-size: 16px; -} -.tab h3 { - font-weight: bold; - font-size: 14px; - margin-top: 20px; -} -.tab p { - margin-top: 16px; - clear: both; -} -.tab ul { - margin-top: 16px; - list-style: disc; -} -.tab li { - margin: 10px 0 0 35px; -} -.tab a { - color: #8FB0CF; -} -.tab strong { - font-weight: bold; -} -.tab pre { - font-size: 11px; - margin-top: 20px; - width: 668px; - overflow: auto; - clear: both; -} -.tab table { - width: 100%; -} -.tab table td { - padding: 6px 10px 6px 0; - vertical-align: top; -} -.tab dt { - margin-top: 16px; -} - -#colorSelector { - position: relative; - width: 36px; - height: 36px; - background: url(../images/select.png); -} -#colorSelector div { - position: absolute; - top: 3px; - left: 3px; - width: 30px; - height: 30px; - background: url(../images/select.png) center; -} -#colorSelector2 { - position: absolute; - top: 0; - left: 0; - width: 36px; - height: 36px; - background: url(../images/select2.png); -} -#colorSelector2 div { - position: absolute; - top: 4px; - left: 4px; - width: 28px; - height: 28px; - background: url(../images/select2.png) center; -} -#colorpickerHolder2 { - top: 32px; - left: 0; - width: 356px; - height: 0; - overflow: hidden; - position: absolute; -} -#colorpickerHolder2 .colorpicker { - background-image: url(../images/custom_background.png); - position: absolute; - bottom: 0; - left: 0; -} -#colorpickerHolder2 .colorpicker_hue div { - background-image: url(../images/custom_indic.gif); -} -#colorpickerHolder2 .colorpicker_hex { - background-image: url(../images/custom_hex.png); -} -#colorpickerHolder2 .colorpicker_rgb_r { - background-image: url(../images/custom_rgb_r.png); -} -#colorpickerHolder2 .colorpicker_rgb_g { - background-image: url(../images/custom_rgb_g.png); -} -#colorpickerHolder2 .colorpicker_rgb_b { - background-image: url(../images/custom_rgb_b.png); -} -#colorpickerHolder2 .colorpicker_hsb_s { - background-image: url(../images/custom_hsb_s.png); - display: none; -} -#colorpickerHolder2 .colorpicker_hsb_h { - background-image: url(../images/custom_hsb_h.png); - display: none; -} -#colorpickerHolder2 .colorpicker_hsb_b { - background-image: url(../images/custom_hsb_b.png); - display: none; -} -#colorpickerHolder2 .colorpicker_submit { - background-image: url(../images/custom_submit.png); -} -#colorpickerHolder2 .colorpicker input { - color: #778398; -} -#customWidget { - position: relative; - height: 36px; -} diff --git a/resources/www/vendors/colorpicker/images/Thumbs.db b/resources/www/vendors/colorpicker/images/Thumbs.db deleted file mode 100644 index d396c36dd87185c82fdc303e5736e526634ec549..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19968 zcmeI32|QI>|Npm{$UM)5C{syfJV~ZpNkT{}WKNPO>WC1L5S2ovWX?P%;|WFPF=GiC z%W!a<^Z%ai@YM6%=id9f&+GO3{qOI07w@yr*?XU48%fBB zkq-PAbI*^PKmAFLkdpkIKXLmMkMIo-=Px%wm62B7beT(9zLup{3nQ&&;@$o{658mXV#2iG`Jojg5|h zgOi<=lbMx`m3R^oGDt&CK|?`7!@8ArE9-wb5MClo)KFKdWF*@WQYI2ICK5s&aU3C` zfU6~5@K1q+6t0nyikfB%Ekr1UCzOPYjFg;=c-0X58XQN+nJAdI?NOs-F*rlD-IZ15 zMtB0X(81hlwqtDz!h6qN^rhLt&cVsWEwV#YZ09c7eRA^q6%^GEX=rL`>l`*bZe(n7 z!qm*l+UA_CoxOwGCHKo7o>#8=-SiI#ycHB25qU2v`u>B5F^NgZDNj?MrKRWP7Zes1 zmz0*()YjEEU|uygwRd!Ob@%l4^^cB?zyC1tadK*U@$;9Z<&{JR?IT<+>v0Nmi9sn5=ImNa;l+0=dRA*dSw#(e0W<405kXub7wD;Ho+u4h4 zTiAtVM@1HiMf+N^KUOf`KUK0{3igk3^&@m-Bv5%|Oz;41q|VdwgtJVyxE5)a{$_q=|w{Hk1YDIj! zvyNPTK}*1)@M{%CWEzthacXRkF2i()Q?vK+~a;PI4_%o+_iUQ`vg$=1D_ zllI}uXm3WemmnPh@eGM6&?T?9tg&a{T{D+}M0kHwQ*AD}wBULNe%S59%*H-^OZoLi zIh16<0E#&~bkt62E_p*GHYK82qO~U3;o&*aw}_sV9hy@!|Jl^#yh*c_h?oLrsYh;U zCmtkK80qhxt(HhVEk))pay%jr2;!AhVKr?C$dm4bH8ld#@Qi@mJZHJS)j{B%0M6mQ4Btac ztBW)Caq?LIr?_2hIE_r~ zBU5%W`mi9;PHBXP5yM4Bo#e)TEj^ufkIhjULEaor&tL{-PyHj6d8NUt`emMT&U3Sa zI;?F4P6ln&+wS>N3y%236lUZ~AGGkO4aatj#?A-6kIjlSY>#>UI%$W>qVv0ukZ}df z)tBwcD&x+!7&H39EIsFhfvI$jwGMA}4`J@$Tf(7Mx`IL6zH@hUKa(P~9-n02ah$w= zq|nQ>pv|dm=dB;wUHWbmU#8p}V#{W`K~)$3Wk833yhtG+TU1XwVbLbJ9fh$6hEAFH zyA=D`#_xJMBU{>_ucGzQf&nLDCb~%}fm+y!YACUs5nx8QI*a1h@58OFUKGWxw4>+K z&^0Obs!4iDWpG0?4#5qs55!Z5V%rD^jWOJJwc8B1E&7Yu9N*`RdhQJup;8dPF>Se! z(o`PyFv{D}<(X$(ZQX*WWj(W}qfu?1s5Yv6sw<(^jir&CX7+ZbLqh0pb?wCq+b^h?2F>e>1Cv|W;Bn!e7YJA35a(@33y zPCAn!(PkOJo#N+4_%d%M`tm#xWL9)d?Q_I4avLX5m*iIDZtSa*&}QJl6y6t#Q&SOV zQNy~jKgyh3zmqn0&C!y3r*x{>DapKDI`12|ROAUC{v4%qk}kZlanM2Op2rYhdsd;I ztpWaRL2-pO)L1O%wNiVxkUNSd8U%zo8}9i5F9sZi{zA6-;qHdew4onXA_pFWAa{=UtCy)7Zl=k4-A40U5|A@?_Gv>Y1x)?+x%yjU zbc9HJY@(v~_ee&cQ>J^&Qr(R8dZM5Bsr`1wrJ_=~(~Zn0)h`H1<`!{n^9a4wLf>%a zuBK=9$8n7RrTAdQ7x^}s_VJGGIU{$tvZQ<(NleNjeW~fVj;JBN)MGqKVrM(8V+M}o zwmVnkvdSsiq??GEI&<_*qH&V}?Q_Dpc=u@E69Hy9WjhH0+8* z(+GV(tBZfyGQv!msE<$o1W|*2RU(hn&J*W4R-nk-K$*FKaJ(Rik9YFF(byf^$0kqTf8=1b+qnMuL$1 zt>3=t(!acZ+cZoJ79;z&PX@86{(ks*{^3aZ*J!`e$m#!8?Uy)j{!hZ6vA+;)9v)EN z#6avX|C2z>pV%u>0WfVQ{E>700FexT%AaU2_)o&0DL=74A14}DArNg9|4AU`Pb>;d z-~Vv=gCVXEF#&}C!}HHIsc+P%rokdUtH;e0(G>g5Mh0QXbJtm%3{K;Cn~byy^Ux;y2g zg25<;-Ns3d=BKHT=ddc@Xgd&j{B92Fptx@dwrZTmmfG8VOiPJ18sB@*I*KZF+#;vm zg?-=?KTUMQ?nLe6kjL&Lq2u-!wayJ!I(s;M`o19fsQNI@YK9nZ%P~#kK7V}AJuC6Z)~lnq zX6dz2)F$2%zx`=6e#j125f_`tvEwK)GdS13$Buv1!%5I zU>oMg^lw&;Wi8SV&z6h56X~*XcemG6vi(l9ebKZJmMKBjCAT6I&MfM^DfW|U%KE-oTeU$r98iCVJD=Jwel zmguu3UjXMPh5A&0UZ?GH_~yr3sx|>$Rce&a3vTIKAx?>(?F>azTfY#HnZhsb*M>Jv z4e6m~rji>bn|!BR$?u@L3ca_Tibe&Wsb7w^qPi3jh$l-}>mjvr^~9wc<=*+S5@{*C z1UXi8EFI0R9r=ihs-l3Fat7)$QoF8PfQz z&M0g;vY0O3hyH%wzef3{*ge_k+Fjl-HApbF#Bukd7mw>~NZ<}{h^uq>H_f?UY)$Jg zK2VzdW%4*@^ zIr_YmsKZM$ac{g@uknQmCsw-rQ!*`_Ojtd`I(rWRp=2M%U3}5`MPK+|Zmv6ep$Wx` znl!h>ahjtSo2KzB_+~Wo%yltO%?UKaE_M1WN8!+w4L5)0G*QwYmRL!?(JVjf4=w0K z{|fq90@40or9b`;k3U#dNAaY+_u`E7Fb)}akqmi$&K^m@E2#l^PQ%7`!okxS6A2N# zksVh_n>Rm@hXnU7cvG%6^otbqhj5={aoDZ7TAZ8w+&nE@E#gq*duxM6<27w^e(@4) z+v46siw%KEQvPT+!A^G?_mu(*sw2-gB%k&k;V4T+^tQ!6Ev9y~m2^n`)C zDypD9WYEHbY}9JOTiO7ez;<(E|(0&>F@daHq92Dz*;)7h-Ejv395 zitdPe9*IuTVUXsp{qhKmCr7CaH^a_+N&#c#B&s27#*4v18U`>m z{Jv&%jjq5Z$qY)N3j0A|Ap-N&zS9Ez;Q>DV6_vp3`(TK8LNrq3&Zu0f+SsJR_DF*9 zO#;0{^&B@rK*sNVdj`aP;eTMrqs|(%iPxecG!CuhG zYN7pwMwH)?LI^1q<@IU@^Am>^SOrDFJP9^NvNwgB+gD)Z>!?q8ylO5Q?-94Evc|HSxn11`@O@B?lF{y+c_2;2gK0OES& zZP75`aV?2}lM~fTutz z@C--;(t!*h6UYLx0pc}1hixv92fP9bfI^@MC<0#bLEs%Q1PlWs zz$h>Vj05k155NTQ5tsy~fN9_pFar?JNu1=)0}H?+@EQ05ECI{F3a|=bfi++q*Z^?A zCV(dbry=skmthHiufKk`uKbs`-(mG+Ll3TRI?ryc%X_oq)#;nL=Y&U%j=PHrBD-30 zM+gWb_NsP=Q9)+`<}SNN#U1V2H#&V@o+}HxS?t?9w(2J(CB;6}&3Cy;M>wh`QLyBo zF3U^AeMdRNZSHpkRa-AL>&r+=;jqD`XFCk*!ao_Ftm~dFyI39M&zP9qR?B6wQ9v@< z^SS6j?xWioPpm~r=&xFJ1!fuI2LkcebI{WGme{d~264Ujxy{Q2#HX7AIZr^GYY7O- zqzVR3TdiLNio3rC;@;h+f5nA&VQ`RhkoWvq2J$e&DHA8B3Dcn1{^J8RuXO3~`#SKg zctL$y?0k*c;}^ncDva}m6OPSE8X0gl1u5q7nLJ#c)7h*zQ`br|#b*i}X1BVQ-yB|1 z$QCUwEs3#}nPPG}`iWut_rJB%@N-{PaWHk4i zHOLAriS~V2in`Hx@@5u24{}>FN*b!8w3RMuaSHN#KA}tdpOY&WO{=*nbRV%Av>8te zQjM0S1T?-sD;Z)EcIQ~Xb-2&+%ky#gW$7Du0S7djdpv{P5La91TxI6D{jwV}Iv&j0 zG|jpF35ITa8PnMw+$9mxt+~!0UmLfp)5*p8Ltdw|v99AI-J5%w>4HZT6?xfCtC2I^ z)f6KcV(FU2NiN!IcF&Usv>xdmt$c8(^kR4mU(p?z3-scSV_J1yE*w~;BW?W~28)y_ z^x3OZ*RCWFOf8z47f6ILOC0fTxcvFfi3>u?xQ0?b^%HH|t4ehr6p~%cdw#Emu);L>>~a6&;$;q9gi|3P%CO))fm%%3aH$>sf-wRW1Zs$z z^1|@z-b7~1ZnEPO|pQ7)QFz;>99Pche1;^7C43l9!e&~wS?=A?asEVm~Ds-dE5j?~&kx^fhBj|jZUc2E6 zM*OMcUQd0@O3ZA5!5i17)AnAx7e87RTnr@1ZJ{~ks+;ARr>9%%I?2w>A2qtUvydr$ zFzZIi6{&3UW19XkrsiA7voBByhb%qO5*_0^_EE207VI?}8MigAd>nrN%J4F~ge_HE zA(&ih3^IvkG~yyDsU^-awd<04##DE>NGJO|U0yzo-)BxuO1U)rRAvrV?J2C2#)jcF zL2qB8djpohBvaT^NkH)ARbLmwHS>Bb{p{`$^I0U(p&lZv&HnW>V4xF?&a-bQOV)YON)gvK-OLBg`1( z-CX3%DJM?*s*&?sS5(G1k_Uf0`l9Rn4*{k*g-Z8JOH0Coq=h3CL>@j25*-eq7vpN} zn_9{5R}+qY+bEQnucS$HR!cbM{>H9my!R|fZKCpKJxa0}1rsgR%OJ(4&^2K*8PaQC ziU~-SE}qrk0M&}oecajr%yWpk9F><@^|56bzbTD1&_GTE3*R8syvfA(-WRI#QyTbjLJEaCR+m@75@ zM=4Doh8@_gvm?z8udsl*6?dpTXDL>1oXb5wX6NBB!-B^qdlt{v=e%I_Y@zkKTvGPv zV5RnWki1f9@deTwjlxT$r8)FiLzB1oy}gZNw-UR0?T!sh#RP;W({gUV`=H-*&c~i- zo52q@k9V$NxB7T7YpJw4JP+L`ch|h%ES!@|hR(e;G5&Dz=52Z0`UyOG(|>PGaE9c_ zQPwkx=$9D@nFINfLR80^;N#@D7IYIs!6k7ISd$Q-9QZ=WA}Zyo_~C z&ojNFWvpXg4ZmZ{0dJevRZHBRC@~baOV^(M^#@eZK886Mh{wOjM7}AsQOb^kM`<`7tie5}V`RcMQ|7tO_f^AVJUzo9@P7o@{EZFOP zC`lP}A0|$?%vZZJ{=nhoPng`Np2K78j}|ht7TNR1oUKjm6jg=ek5(W~>b%x;+e2TQ zuB1PcsE;}z>~pc=%$S(6&ZvswO4Ee+JJqT2(&F-BS7AfVwp=YO@_=L1f_}dA4&B*x zmE?=3Zo7`f-;8MpvTnQmMoT@Wg=J^|jrYZ34^az*7`eR-PkR%hY*UWuD$I(DfZ7vdCLDm#BWTQ}9LGPB>V$nIX<4tx2TmjmTw zTn&4J^Eds*^w(y=LNk1fXo1-+=Z(tfo$7CS;vy|MD?d=3-x_6jnfv6pXk5~l>_9wo z77N~wT>#4(KYmhrg&_#_u_%&&T!T>reHt5y_p(Q=c2&+2y?Loxo0fXN*dHRhTp^G!@8p&L8Wi zo|WxQ4R|9Q?(*;#qHXR|8eL`PCm-#$4wBkd!W7**KzFyi zq0W}dYWFK4WfQl>@tQLIdOl0jyl&an!YPvlExPXe2dsTE-sx16Q_`gh`lyk+ZjHUS z$3aHVIrYSp+|Y?&9zK~a$*ipLqoi8Ac8HPDQDo(#=#KJn(Wd+1uiGnIg1;D)`+oKu zFN@jVu4$xk*XId8!soBPnRN{&q{RZO%T*1*;>@+*c%pshYnJH4FzYzKwpjvVDhn@* zcCVm>eu5?g8$DJI7A8%ui@8YeZO}OezJb;0ubcy_gDVyn>oKs zjQ-vGE0!k~ZKD0HTw;}{<-dfpvftIrlK5;T8u=0-)n$ey0IDmC`N!H^4o?q}`zi?w zz4qd%Ri3PDjeaZWbX7dU>s%pDD+eSU(q=pSzQP??1k?XPH7Hubh@))C1uLAN9TyT`6shWMfc5|%A(^h zJTjBdjnGape7iZw^ww`_UvvFJM$MF)qih_1rwc_!pfByXmmB#HifqA})||8cV`baM zwpwIfl4Q_0(Q~}A=(XEm+Ma4whez*)gj{*;E#rH6JQ3oG$~TyThlc=f4cbK=UX;Rd%}-j9554k#XIu& zQYJ$Pnm5zibd>hm-dYd8lid>(+dDE*UP`%>TvR)kok)h+@?J<)cDyVK+P0HnuJgHq z;Dx=dg-UpqO0A8%*YyZUz44W6il&!Oe-TqtC@3D#dpK@XZRA-p_RQp-Qc8aDdss(S z7p;wBu3QkUZe^G(yB8#t%9^9n7xKY->XfN9vQ8Q9vu6{Dv7h;mu?UK>E9}ZUC=*J6T6I`Mrt=u0#1Mx z#FP0hrr0mzZxHmSe}(Z^7!m&eYW)4X|NYbb@1}a^vV3mz5NFn#*B#MYZqzJ&Y8?m1 zOuOm$C29iF7?lM69Cug3!OC8>#AMc4XZ_8wXLIh&17ab?+@^OJ57@F~SgF1=?y|g`E zo_ohy!bkPD*t3^a&Lz39bsiluZ@t_u`=ybNeL;;ji9?c!_q>F~0j^II!wWA6h{OE) z_N!rdMzbCQ!kaWcj7#PiiQl}A1y>^dV?8r$$aPg%|Jm5gsG1C#Mq$+)EpZofae5o( z_%=%hXXiozR_}d*wQ@2og2A6m7qZh*>xIir>l`KWDTa)AZ#33K`uSPr8!e>b*ctG8 zJ=O6m3b5oc^#bps;x~esrF9(>2;k@Gp34$;%Q#^^y$2&(-p?AtdRNmtbijitM!W$Q zlUvsW(Oc0orX8rIXhkuyiPkXm=ew4^=;e*k_)QgE%jZVe<_&YtIEKLCB6O`Ks{?z_ z-rh-9yO@+Zxu&P~LPcGoF-9SKcir!=Abn{a68^ZSi-0U(Q8&>`JG>8o+ms}VfJEAn zO)>PFuS75O%;b-R%GdLYb-0HfgZvHkc8SSqCq$ePSC>t=6@8*ps#hSkuaVas^O0({ zZ{xD3&`K)S6g>B6v6i)X(e|7ISnJow(3LB8apc`0Qdo8~{Xw?y*@0Ab-zTT#RY*|h zTL<#11qx9$tqfSp8oa=wYSgts^J|-@)Q78A<6R!y7aU z&TB+~6*4H|=fHYN`xS28E}h?+_M&j5_Lt}Ct&bCmxPMv}!Il8rlVti1}P1J(ABP{Jsf*l5H+v;Dn zr02bjfcWxQ;^hr{ueYLTPpwc0Y{d!REUDe$??Amu)eLr-4bhr7wvGx^Vy%k{{j&Gr zH@oTTZ}AV+1dBak_(vxT3s=9Yl)hC|Vi1KmOZ$hSast(54Vvob{+Al&V}AwxbQ+=l zTR;8pcz^GGg=D59)%f{vnl6{nDxC1{)TovFeZ{ka&JC_1uED#&((i;GTe6!CTYIn# zwI(B$W6M;_(!6&5#Xh(7)X)UAYq}9M*JqvXhd&y%WJcF7w2izYAbVMNLf<54aLS0d zvq5Ka!G(Z4EMmoMz97*+A6$&1>fO}Wo632M^N<_MnU%Jgw~UaJ$B8eD<7IfXD?f+f zLU+G;jPB@_HR)1i!$M*XGOfzbRTDeu`Y@aOD1#TU8OrM)yWFv7TwdXIMq7l|2}rlf zr_U{z1g!A}ewQ8}c!^412*Y_BoLu#HsT#{`>p^{n6(0if$~PEqQR8Z|a$mmkx|Y?K zA7TKbeT^Uast9|!ez=E=nr!oQ+UWe-P5Gj>T;Oe&_dN`S(7jG6yue}J^T7o z*W$}<9*b{2npGKaD}OBDe_a?|H?NiV1^r=+(=~p@C-KGgh05ZPacpXGz(P@3(e12* zbeJO#G+9~&DzfNY>Fh|Ltj$Y2csQN9XW diff --git a/resources/www/vendors/colorpicker/images/colorpicker_background.png b/resources/www/vendors/colorpicker/images/colorpicker_background.png deleted file mode 100644 index 7e916d5d1fb69df663d461754c2c62975c24bae9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1806 zcmY*a3sh4_8jg|xxxBg%iJ>BP*FsvsM1h40OSwFRpu!c25hFn>4X&UG1OoDMxiq-q z0v1?Bh$i564M>1usU#F=w2H{XLj@@m5|98T2&^EF0LGnUw|lndo^R&PoSFaeegDi{ zMnZ!uAUgR#0nXfR*&=tOJ1u0C31Wwf*7p+NQN zpXMDb3$mm|8`O^W0(<9qPx2ncg6_In)DCAhy!U)ZM_uuTbBBF9zUP~A^)s5TBu3t} z)uL!Pdi7G9EM;CvnOC)m$~`#y;<>pV9OdwZ*DoK{@%j8Unl3f1GbL_pobpExkHv+F z&R27D`x3diUMX`iJf5qUmshmVvRb6h5fpMPjE(jvF08kVjF=ne2#^0wiNg_oPd+nw z$~G(1{n+Yg)oCLlzp_00s#vH9q)@k6y4vM89HtLwd}sTUACD(E7GF-cm|#n0wjL>p zkD%|r{bjoO=M2es=`HW945?+`ZK*U)oBzcDRs{ym7W*PQ$a=g-(8Cnc1B*j9>j7^9 z&@cJR|1C3x&P+a-Z~dAvFes_^9vYJKP2%cmM^1aruG;&yoj5D7D{LQFC`jJOjYE*jjr734#W{xjF>)6=oSr=WO<2{zkg8jaZusQ z0*5d6-Z;2BV=&CYJD5(Nc5l)>+?gCTrM(x+uqi2RI`}^Q@4aV|#)8H()<)quWeZas zcZ|tAQ1n%$o%5nYXpvK)L-W!{bGRzfp;;Dm0e{UN_jjk}x=e?W#6>osN&6naF;Y8L-8dMyla zb*!6IU6l#LvMnJ9H>T7r%T46s;9P@%3>BJ4BBA7FMVU8;?@0EPP1pcFkMeS@2?Sxq zdAFvGZ1Jf2S0f<^!p%LKc>fmb&E{ycyaJB4){VT25T#ncLwThWx4Z0yrLia~V@PYm zP(S2RPMU@--nA@6ke;3Abc7HjiQDM}RI8aZ|By`f^lw~=C&Rr87ZH%FzRa~mEFLxQ zSKeK~=UJZD8U)4X^_cWK8q%7;^@B*w&iW%%tLl!+f?Hy7Ji<2Az)>HGqZN1744P!A zg4q_=Ze&FxRFC+SXHI1K=TX3WnchKzYs3|7;0l`z!wQ$^BgFK^&O0E=sVXT#6;+h^ zn6Qv~s(<5Zr8Qca&h!D|pLCCv*hXK8M3OiHKuE)Ga=l-+7#lcX@my2>3d)=7Mo<*} z-%`gFO%-5EpIZ~)k&wt6dc_(MLD1wfGpZ6B*#4b0p~RI|KGls2G-2q&AcY_&1)E`f zUTFD0x}5?*-aWsuxXhXk2c#LCQ-E{D(;j5@cLe(r6<8cDR`SpD5cE_Eb_hs%Mp#8m z6xBlgZe&-2a~Du|7omoY9NIoQL?mom-|@W54htykk~Yf6YzU||5W4nzxmYYb)j2>R z@4F8|u0aqE7Pkn((hI$YU43T?O)^`TS%>`)Q&2m~Uv=~ALMw9&iTfgG>xK~tfOe6&xd_b(*^`+6r3B!G*Nz{l4snmP&d{zrXfGa&zxI^m zomy92z4vA)@5N_s!3%XeRbk;DYG)Rwo?Y~@%irei+1^|Aw(X{FaolFv!Aa}fafz07 zU419v!DeObH8q8nB~mZ-iZW$eBZ@NSJQX*#@7~Z&lP*R(U3f{|ggIgM&V)NCq%#nb REqJUjw7}4STECO%zX4*TCbs|p diff --git a/resources/www/vendors/colorpicker/images/colorpicker_hex.png b/resources/www/vendors/colorpicker/images/colorpicker_hex.png deleted file mode 100644 index 4e532d7c65393fe56d7463e1da3faa591f03de84..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 532 zcmV+v0_**WP)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA2nn^@KRCwC#n6YcZKorKmBnM{5VnN~}9ReD%Nhj%)e@2UckI?wn+*F*3;85I( zxENdy>|*I~AlHjh(Li4w_e~$k1>TSMlH7e>k|a?SftQq0B8sB@e$Nc7)9DBRzVCyb z1b`q2c!CKbZg`U5o2itl0Sv%)yQM?b>-9{KyTHhep8?|QckHZYvzcW~5d<@9^YvHp ztN^T5E7MqasmZKO0Qfo_tQD_Cp^cRCbkSPY3PWmOrwUtP=mYq!XfhrH$n!kUb8V{2 z2zJb@O#p!BU0T}j_bo$O28aMq#VY1=a}K4HFOx|FxU3(vcdlc4{G^oH07wS|@(ugl zu}h2#{EpG-rzyuU{=%QDL_0lRX0#t`gyJhJT=_461{Fr^gFFz2D& z?#3}Quw7Y-ZXCZam(0MPhC`Q9H4*H#%p;?>f&5sn>j`t-77IF5&!dq`sa#4$MD?Up z1Z7s}QYx2H{U_Ho#}=1TQ65E?QgHyga(l)Q>~phW+cE0rF`i(%vV0^K=++YE{0sm& WpVhv@?^YTB0000h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4P)S5VRCwC#nn6n&K^TU=-E6Jmny{kAgHdYMnDn-IF?jG$4BqP9gMtMis0Dw8 zAV{dW=nt@ez?%dVDIU_2gRqI_5Em~-k8ZNXWV1btZa3MO4c19#+Wqh_Zf2N=;hoLQ zLzrMN$n!kVR;sFUJkQ_V-BE`=I5@}w0L!vKVQ~Q9@px!O=Q!>KBXRE#RaJ4J1Hkq5 zH74#rAmB*#N9cI-&+9?5X8Zj7{P_5|^XQH{u=yKC6vb33b$ff;+uIw9#SFtZ zJw0vcV;BZjbSqURlaVB;VRjAxerlS1&~!NI`5fVIQh?ryB; zCRH|X*Y~znJyFxHP3oeqGU3e&1O9;`*C3*9*=)dr#lP& zn<{s4fg0h-$-2z|0F15BXa1p~(a}*s5CEWXbyYJAdmo&O{#YpD48vSpURq~=HZW^z zYn4ic=lPM5k&}~?zi?i#P(>mU00>*Q=~G~A=!rx^QIxK(E{0+5@9$+<_W68FXS3cg z9in$e&*$@{Qpx;xe0;nc^Q+Ji{h4jrtW!Iut3V(?BD!Pgx=!e-({Wy>6NMqMNDj~M~n z)!GO=qQA@t;I7t2;1S(50Ji7R-H^E z;Fxt5y+yKp{*YWFP<>kUy}douSY2JE!wBfrD*F4hvVtJ@ z_xH_*L>mEXHkOx{0bprq$rczQjer>#REvv?4Nu550(w0tO-7)tlOusf;N935Ms)0f sary=%7ro}V>f{=MmOlY4Yuc{?08g~^-7;vm)Bpeg07*qoM6N<$g2&OnRsaA1 diff --git a/resources/www/vendors/colorpicker/images/colorpicker_hsb_h.png b/resources/www/vendors/colorpicker/images/colorpicker_hsb_h.png deleted file mode 100644 index 3977ed9f21e3186eefd37b198a7cc3f8de6c69cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1012 zcmVh+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4dPzh1Z?xtc9W|d^8%pySrl!Jsywq01yZSfWhDafa5q;(RrSK!_25Mnz_o6R-Q8VL6wU6+%F4pRf-Q$MI@dS4=mAHh)9FT|@$~eByOWcX z!Cq-b_?cFRh?(5s;V}d2mk4K?&4-6bIBX^iheAZrO{%IS z0YIfv$z`+F(Rl#Sb=`U9^73-C*$nbL0E`QQVHk#CxMmUxbFA4+=9etvc4lVg#bpWz zInPX|)2gcCza|_G>$(mIxn`0I%UGFA#{CZCigR#qP_0(EKmY)WdwYgq^vWbf{@jo* zE^s3|JL^F2F_(#niAW>@0HNVwp65~TOfr++9V?g3RwW5{t@J$$rn?^>GJgkDFu7a~ z0J4_L6actnGO6o2dKt1Tm&@fyBr-HKgb=#EzCJrUYqeSQ+^ z@p#6tJ$H`nQONIahe-%W5W9r2sHGI!dV# zn9t`wEiLs)_< zqd%&uZ8MDk?wUrxmh*4WOQjM3lu9KVI=x0fd;SdeWoPH>w{N(;v%SrL5$IU%>swn} z&Ykoc0rTVI;o%`}Y;JDa?=Z*_rV$WDQ4~e15wPVDEf~Cg-q^s9M@L8IPO6Q7wKmq* z*8yN{ZOu_IR2l)>*Xq^PRofnVjezF$`JY}R@TxaQ3XQ;rsVRc!#0$pj@kcMZ?m6r9 i8Ue%TbFitZe+B@uIz19ZnQ%P-0000P)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA58A(JzRCwC#nn6h0U=+t+YIIeCZ8N0REt9otS9j@(Ajt5v?W7gKqX!Ee2!alT z*{jEbDCoQ>c=RY9Hf%t4)YgLZFxlE#lxYuB4{FKmYLj+{XqP4>>D<09+4?7kkiL)i zCw=+8yx$khX0s6l0a_EoFgQUFr>Ccyv)*xTdJ9d`TAin3TNEXx9h36D@HluRbgX0xZi|M`m->2&(y;zATt zUtgb2rxE!!7z{#JcW)%jt^)w9^msr~9*-v;i!CfHcs!of)m5L*$Fi&_47G}h;x`gy z*8u=lD!{P5zCN4HW;7V?-@EsXVF2Ld*VWaPbRbERt*xy_qcI!~ z@9yrBBxyFAg#ir>4MLasI!M{&seDmP)0v*(}F#R;yKycq%MgFbV-Kmy2at z6btolO5PRDr@!4Z$8p@>z3aEPu8Q|{ty*UoMyqW#X);+#XFW~m>+vyeF`IXyQO#NJ zbh~RrKwCuMN$DHKAJ?Z?3}IWn844lt{j9sYMg;ybB7j=*MBv)`?T7$s$rFKV>l!5j zc-gjXW@g6ebar)h4ST%+u)Mq+iA1Vh>;hK~hoekI)rdfi2>c2WDBo(VtgHlsL7oWA z&(HHjpvo(k$QAFtqAp4OL_n^=BM3sifqK^6t;x3f;LDd95%>>@z}MsBc8bzsTdm2i z6abo=n^j5#I^FK)FJH<8eAw7fFA-2=n(8G26ji+};bGxL%+uSO z+~1duRQyKZk=2THHElK;WdhRY=jtT_oYMBcdWk?qZ;mP?0uS5U5n4xHFiI<+dadUb l@49-4fb1urmzm6u0RTq3k6f>52*3aU002ovPDHLkV1hB)7U=*0 diff --git a/resources/www/vendors/colorpicker/images/colorpicker_indic.gif b/resources/www/vendors/colorpicker/images/colorpicker_indic.gif deleted file mode 100644 index f9fa95e2825eadd2d779ad270a71eddb94f94748..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86 zcmZ?wbhEHbRA%60n8?6jX=xc99sU3Re+C8y#h)yU3=B*RIzTo9NS=X7-KS;c>A7MD o3b%A+G;E1+{h2#gG;NlJnPP?C%HXh+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaAe`AI}URCwC#eanvINRp%)C+D=l9`;ZBJNpmnIHzu)uwC7iS()Jv(>)Z8B@~LP zskuk>0)q)45bjPo-NPtU5fxQ4Hh2FoGyC6W_AoQwfBXI$J?{4V&pZ36_xa*}$2NB_ z?N>dXcGqbk;n!C5)IX`whhWfkj zZ|>f95RKQ5eRkk%JDA36{(L^|`Fz^r@vz6^;rIL9ZnvA=Za4q_{k#48>#z3DfBw_{ z_P4+JPe1)+-@bjbFYphQerW$@W^I41;efT)R*v)1=Z=959-jt1_`&@upMCjUJi)=X zZ3jN@=LPT>91D+m>_@LR0MSMOasXBvK!V70fXLnL`FvXMy^X(*$D=(SkL`ZH`|Wn~ zkB^V`U4-G2W0=k|C!+Lzw@%8BKH^%dX*CvOT6`fP)f zassgc-|0lP){Yay7eeq^3=*3Gi}%Ch;Wl_|YMZ-TYi;YjTWhWFe_QW81Qtc5BU0_Z z2hjF&ege^mQag}*k5GO8+nyWj7&|86@4`q!^t?O*@;m;Lg~FZRnXzxda$U+wvP z+7wtYFe#9V5hes@A%dkRUI0naO%=FdBnp6(0n6d>MnTj$n(e?rfG~iLWBd_>PP8__ z(+9A|F_G@f%zN*~U~+eRJRSpB_Iy5l0P1$T_1o=c_xpXj-|zO@Z@(SD`t{de?d#XC z{@ZWAS?_%ctnrWeB5jo-Tan(zp!(!Hwt(W~_YmLFL{z$fE(2EZcmpK$gwifxBAqk< z)S1%EY|t43$S^{U=lkEjzcvK<)_Xr976J=3)%||AkB<-k@#9DT`1ok|`@Mbp_RYrc z_wV2RcDwx!tSC}c0j20?B2J@7O$62q4+}j+4|{!;|f;HN%S$BYFU=(?1YqZnxX`weR1*x8HvI zt$loa46W6E{P@vsx0^j4k7j0CV^xJU(PS$Csx64?h>ko+AS#hgQI*m}UeHSh5vfPO zA^;(cb>1(~ONaPoV1eG+M3m|Xq(O%xdSQebRJd!Zw!gNCEO10D`}p{r}OtL@{= zV8RG>h-;v}CicB#dposZ1ly4M2uuTL=I+}7*7N!FT~pcP@j#HZ0V)L60MfT_-}=YL z$F}RR0W7~z;S5j8T1ZlJpJjv*IO#YtxCP#iM^Tl9J!WPC6pj~IlHK`);)dP8`=B*& z@|GBMIz&rh=&GIaY^T5z{XL)0wnwUVzu()gw@y@uk3T*>+Q-L- zJsywk@p$wR898E2y`L;f(beq*jpPB?BI=8>G2Ta>d=YsZ_H$tecqGu3e>7;3DU(1p z9B$TB+g>6u0AeGNz74CO|Ne7|WUvh_gp)uAk7^j7M`Y@~AA)_?R(8MN{eHjq=kvJ@ zQ*;RVeVcv%{=MJtcY8b@N2I)Htcg*Wfhq%3OCnEbvWg7sqL+|@cJIgWs>kEgwg`Yt z07iOHl)*Iy3>9V5F3}^z>mkbZVghE~cjdhi>4p^L{_7V1g z0{~9$y2|#@IR}5r_7lhDm;p?O=Nm?-=ks}Ndp@7r-i>fXsgVf|opit72e{e}uC_<3 ze!t&+*I{i3zrMzkV}VZ$=b^Z6XxMkaV@to^kUt?gOiHX_yzFuUDu4!)P~G;6yK zYmy2B5UFUDMT!U@6`(~C#gvdIz?d>lRkkN0kpTrtM?EY4GI*4ZLrNP$9-|f75~#Nb zOr0$S1k=z}<8`zYAPelz=d-zc+go3(_uh93+`w+I+wImzltWwMcDwb*5lkG3jO_wdqZ9jWl)*V=c}FA~)&ti0CJ~Dr^iBXffP~R&SPB5P zk;Qd)9|9gb8XELq4L!D@k-BTGlL0#{4l~;jSWyY2Ql{}NA_-$sQ6cInPqdUNK&Xt4 z$}<)KuAwo>CTG?M#Q+O5*2%lVY!6INNsR!q5v3Sp+rHmG7=ouOcYWVy8--@pSbKzW z$Qax0cI%+Yd}t~J>HzEb?q5`aGy_cU-Jyx^28JiFpp}yqF{06U-$?Jt0QFr%4X^4s zz@+SkVKaau-vEe*TR$9lELQKj3_B|hTznCg`YAOA)%vI%_M)-)7=n(`l2Fvikxx=9 zmrOWHLPMRA<}qOtT)Z*11_*SR;dMcU+=yoYm?Ie&`U&Ze#JfWq%%Hyxt;O3;g`=tO zcn5Ez|oZXz`zEpBkq&_=+L&bCupL-Q2CW&kd<8#+*)@B3`1 zw?OnC`iqL%r^5NruvK8GnqBlF#C{)lW?#<@f+rm!k4CLptk zkhckqc|f1a`F3uOqv)dC^@}aQ`_lVNSOXUw6}aq;qSc^y>Aa)efSL*b#~KS~*Elxt zJ)ciEvxd(2*msER;h+PE+HNHr8R+n-(6Zn}g$nLxjWzR`5-?;X7LHVxQc6UVBBML5 z20?MIYK+QRhoW%j=#|y-R<@yD!p{TkWUQk&Dv4U*06^#cAX;@O=?owqR7li#+BOVQ z*ygxx9CMF!BTD&Bmm2{8Y&XmzRyA4?I6QI9BY-t^j6hR`$54hS9|I$qDne(VQ}j1_ zq_ERrOk5zEMC$9Lt2#_}IBlcH9lWYez3T_v!G4GHjxDBEfy6aBu$3yEJbcTV%9=ZYea32lYNVH5U(35x+esFTA!q8WhG zR3yUag{CM(sYVfNV=CMu4N_raTHLAZlr0Xxj;wG8Q^#h(;hBw$5~8%7N;*aAi)w%+ zz(q7UiAE4@xJjnVxq8&SQooMfT<;xftsA)MWD1~)=NZVo;c)|WPeee5Esyp z76aDB$fvqcp?J*M9rv)~zAefMcQ9i~$H{r`P#ff|aP()5$EV1K@1t_ih9IUM`wlHL z7TOIHx|>C~3pkXHQUD}ybIC>dR!vc+5cM-HWr2`yLF@1qw8K;%ADU>`3PP}B38!O* z2H?Sng+SZT?|M8Qk_y2>K#k>)m7b^$X%g3qfW&W{gOmzOU?MRe3Gr7b&w>WL8F)OP zK<-O-O!E^;Jn22Q5Qa{oNv4+2UxVnw`x)B{KtCq>+fidVHunv>LV6oE!Wc_z_JhZ2 zQfr5X0MwU?F=Fxl2AE8gW1?uodPj18T21dz?M!U?6F8voSE-<|leUuhfL4NOfG^{{`*g;9Ii#;wXD zqHxVoSrkz;o9QY7&qb``F_LWvI?e*+Hgwqc*E*MeMr0y7MBR6kZlD`>Bbx!2!>mWF zYa7*)+oG*PN$%w zt_I`hqr(BbFN|&{O9FJA;WU3`WguwjyuPlnqS|3}qD4ze6B(cdV6vbH%_rAI2SY}S zY+AbLaPVl!MfDn_*{(EJpsTPYx$h^mEAX(!!X7N5tqa{DEsnzTpw~T`;e-pv{x7sL zIC>EcvPtTz;$7JYYC6@dcPg_VJkduUXe@s3rO3=n14W{oD9@FnPLT&oF_*|g&riAv zCRw2KJ{;@;Dh4#WJS^^!h{csZS0ZrmD5QuCeu>LxV$!KAS z`H-jVmmK%JRu}1O-|O z7+xSNM5^L`EK^p5$O_SJIMFFYCWnc#ylAe&+{tl+f^A8>2Q4w7UYgCIi6U3fOO*jI zvJ_m@1fwZk(w|a7Kg#@qiKwRR1}fnoSlDg9P$tush(^Qr;^#*O2jD>foq(w*5Kp21QRz;xKiP)JTq(ZivUJ*4M*c&Cf4zNXh|6Nt-~rcO>{7*yE3$B9wB!nfU|ze z{P2BfRUoy}>nEok=`yn$;5ByL4|g3`qG1~2DfxpEp?BR$H#)5rsCwLwj9Ad1royOw zX7;zB)0((Lf>*>lYLCP(Qx*f$pXzwvMm`tq$3{hH>B8eg2#Qo5M81sx&8;$+DRM&~ zMl2&g3Zv9UZN(Us9Hzx%jnG)2AD6_c@yGqV)nb|PUki!>WV34@cwr5ny7 z(HuR233QXqz{4vm4*>N)!qWzTI%%E}$=dJbmy*VcBF-$DT>!RdBd9J08OhXf6s1zg zR_=NO2i-(w=`{Jl1;w+C5Q%?a#i6a zja7(ZA^4Jlakgev*2|@`J@>}Y?4Xo-mZj-s(Cnf;k>b6UyiU6m!5shV038|se`$CO{+KGj^ za@UFKPL>5N{9){IQ4R5;%_zdMNSE70)QZ5B+YQA`Q1)f9kCm-9qk7k8(QF|zRE>U- zKxc~~68aWQm~bWR#cfMeCU|k^2{^_Myo$cqhNGe`S{-)2q0{9;#qYqYA5QdltBQAa z#Ixoz5L>mEPLO8ShHK<9?zA z1`F4xV^B@;6osgYa4|~leCOELvcjZ|IMhbL%w(0($)d36sj>n^s?NhTtH;JM@ULkA;sr6{D{jt5Q3RN;hh)t)xB}*#`I>!uf;&-Faq$lBFOU z))4qYkGaYo8JJN-6Cja}JdY#$VBmr`L6@g2lfXX4XQN{BrE-AVvlSg#Vko;ID+Eu) zyNXH)C}kICMt4HPT_}$uqG~HnB3(3%KBPTiKa@bl+2f$Dz;1}FhmEKUZ`F$>9TWD0 zi_G;zjRSm2bG6ono8MY%4(|IfO6MA@+NPY$Jgx%GmB0>c35%wD1={RlkOno(cY!6v zdlh6LygSkzp7^1gMAnFceG358XhpzI`)*1%fqv@5A}Ci54=c4BUa=n%168d=qgILW z$+5Fyaf z$P!IaA-U)*z@3`)PFdmT$J)o@csv^YAgV3-SQSelTyQq3H5O<0C_qjDvjD0nTB#X2 zICroG8s(DRErQI{G03iPWfL$EuP=9`*9NNwo~Rae8ql0k_2hI~m#HwAer}ajV=@3n zYi0$OMiV_iscWA_HLzOEy(>5!zFu?73V#isG14yfbP_Omds|(D6;}{} z=zDcAKf5qO+l&_RH3SOwVnsiw!PK@guvWBI1PaxhCyqOfSjo0%O?C?a*+^r}<{y3v zu%ZYx=_chu@dot72InR^6xd+xfqUOjutyOpvm;)z8(x@dKbt5q74nIgH$|%|qD8&- z>UhdN5dHEc+RUQXWdG^JidUj3u2I3hV6Zr`sUV={MR1c}DJz@^@(U%Y8PFBbDC0AD zPZ*)ll9auFki7v_~b1yAh=mi zM90Qu9i^E@oe+{Y7xshHUGF&WE$V4^z1VC7$THmpls2^%qDUv|k(Ml3#C64L`?9Hw zGwF$URg6aGUrf;O==&xUJZ5DtdBKy@o>66q3ezHV1`74Xl71>vf?DXM)A6yHKQTBh z8^}r~SbeRcxnQMbhcXbZSd(clj3`RHGc`8R>ay_^E)?&P8&7MDj#il#i1(87o<=C& z7f%zQs8FFti+3onsLq9m;-c@sS9t=e*_GX>Ga&<4s}!dV?(Pt1r7*h_tG|SxOLP}6 zOAuKNHcC2SRyYIJXu6wG81Dzq8(IICR6B`SVHU@0o^tV5wZ{ZgyCk3}GG-vm<`rfW zU@sa77L8SgD}zFcdIC?MWS^Jz89U#3O@R<2mAz~?B(r#;C{k(qv%vG3=`<6QGbHt8 z+KE;H3_UK_%OHgjEo$831YlO|PAUji>H7*?bv1(-KW8HWZ^6Wg&CWNZuiFi8P63mm zIibQ*RC2Ml> zFH_-X%`L2YVJh+@vv{IeLM@9f74W>%QnT>-Cg$gHzqu#W=WIO`sE|D-QvzLqhbBiv zb;6tqE7RnoNHNhz;W`c3bTN)t)omGN`gQ5;aEZudfsw4`Ii#v&o2v;MEH7BA3ILuo zVzf;}smpuRc}bQ7P@rz^{yP=E6QNckm?vv!eP+Z`0Q`)I^(s|Trj&YbIJzjvpUzinttW-(<%rcL)9Wi)qPxDAU`B=QGa{B~ zMr;$$t4$^s%#Im;?1XwEx`ZJhI$WHsod`)QbkF3z=Hw>_7agTy{ zpY0cQMVRQLPsMuF(I5=arY2z~^9{q|axl4-BUFhB!Ofp(DK)!^_iK@(uINs+4XLb< z+sXw^mVng+1zui{GCk4OqRdTCGQ^e%b}{q0RQ_SwdPT@jD2;E$Vu@gnbXY40_6BqP zRAg&H{WsKDxMCp!M7<|ykQ>6k0UTkF#2F|7nj}cvQy(c1ehNfj%@ae?G6=r@rH|#>yg9&?4+fhiMZl z%tR+X`rPKhdRvM%Cjgt?S2`&3H10%5Xtia=XcDm)6i97N=$^_k+n6E`6J<}C9`wUE zVX(GI)LPP5q1X<3+oPGzHd&M{YB{!vSobKiODu+In{;soP}muf^w>A$q7R@lRT7|P z!k%@Mv#wI$5t2b_DTrLr4FuNh1{cc?Rim31SNE%wg2cSWHqmA29K|3)O1(5GR+oV` zn{+an3}PyJs$O)p&VuK6O1q4^qCuiPr^m~7!(}aqS7+(0K2K&?OMuNzRPs4t>+%ad z@;;d~D=AD+TC^RT1}|AuIT5jZ0?Za@ zw#&I-ErpL&J2Ko4sh@!5`3(W0tgI5b($#BbYd0hdi^vENZ8N=QSGa^^M8k#2ucemf zEM2EY$xI4FQ{{M;Qj0FG$=pExUPn6&XWsC$mF$K}_kvpD$nrI?roCSgC<%zII8V`o zXyyfQ9E)Gjq>XGLli6c~dqmHoS$0qAQ+6hFSVV;v3MGHcDN}8ko)SgrsofwWR1$46 zVQ<-Vc?C*d;YFF5>iaAJaJtA_WGB3!ze2mguJ?bufJZ#Ol!(-MV=4sA)B?RVE++Q4 zrj#nO!@Bb>j83ntAIl0>s#=gxt9({tOAYM zte*MmBwy-Y^_ebHZhJ+eO>WhL{K?s zWh$HiYvoobS!8NSmRKHe3vSyRWQZ@_+12K^%qwlHTqMeQkB%)OoyPpF#)&81F`9&welrH$>6{u?}?33s+-8X94F76wxD4njqnnm|Ol$W9& zXM7?ntk7YN3THOML_dYpSBW;otS!?(;f<%=mZ zfGZb`n*4#&wr2GDR-@nS#1^7ksJXH((kvRS*7&GRS`Jh}+f?=~FYRPv0&mi4-Gm?J zvvJGJVL^E^V+^8@O$<`IM67HwMbf0_0l30x_yv7t1)7|KDQeuK#}@;&^8SV82eL8A z>X<8jUWFP<+AN85DbP}2u{a;X@%Mf_oA$S(o4kklDK!Nyxkb)7+5nUH*~EAaJ*-)u z|BBU6l@rxseAfI|D1v*?pvO*sCo5tWouX~;-(hvuu~5-pt5{>LMU5D1u+8b)x;U{bWn@ zixoS_bmhIjSDiP zSl<4J-H;97i&1MP>MK`zl=X!x*u8jC)v@Jz5{1X=|EZj;8Rb}3swy6%d||y%c%D;X z<%C83S=GlgTB}gP3jmLvm%q!(XT2cy4Z2HT8RsQNz-U(hy%z<1N`e16^|FT<5Z(s6?j#VTsTon zCv+j|zDm~?MBhkUzpJ4xD=ELMv5FCF1wa*`T)?#mBA)?b&<c1aJ5yv7Ii& zw`g;5%eFTGI=fhwE_l<+5u_jrfR<~lcfe-xO)`&tXo<*dQIYJqtx|<5C>N=JdetX) z;xJ3*JkB!CV)W(zRX$gGsJPltRd=232Aj03tbk3?q`HzSS6lTeO-`84-dD9)Dz60> z+Ux?Tfce#^mF-g=$4az1EpD6Crj~$IeNBAHSHM$w4a55-Y6S017aXgOj{rm&aG&_v zbbKlo;)1psubrvz&B0s&mx^f1;4BRErLrH%ycnUr}i1xc5&CUZIL!(hh2Q% zVF85G$M?@|k?AL{c>H{+ImGMXwj@$S=VZlAuSDZz>MOkG?7UARP-F?H8dhbST)uG< z!K%^C=xT3K)>BF8i_z#$*_L=tD-o(3rHb2TQLIjdRp13+D1+sl!FqSlDp%v5IX1KR zE?#KMWB2aZOo25Spwjj?2I^fftq$5!4|=7?T)FV8`(!$;3Z&1t5Em}EcrwM}0M5Ww z-e&^BrF~uiYbyeJ`Q(WrcWTO3Cq^s)!3r0Of5txavt8_lKMNF-lT|rk)oAr81HO2o ztKQCk%draku>xSNOf71K!B`oTPaB*n9lUv!RxZM~$7%(XD-rkIv9hSU;RTQC-7E9m z_pA)~3P9g^PYW!Us@AN$Z{?y`0Y+$hym$e&j0)cY$}1;-^=h&guB=zD$d|} z_Zb(`yU}a`yg3zq62Mlt+}<6q&m6or<-uo2fw#utm5BUF(Xb9ITHWv9)mH{ug#2>Z zK&9)+K9#}q#er=r|KDVMK0T561VDQ6b7#P6U)~Mxt5@GENx_@c^yydbzcHKqvw^g1 zGZjC#ed)b_`TzOP{2K~q RdwKu>002ovPDHLkV1myV#+d*B diff --git a/resources/www/vendors/colorpicker/images/colorpicker_rgb_b.png b/resources/www/vendors/colorpicker/images/colorpicker_rgb_b.png deleted file mode 100644 index dfac595d017e279ff670df2c816e02d922660d9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 970 zcmV;*12z1KP)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4P)S5VRCwC#nn6n&K^TU=-E6Jmny{kAgHdYMnDn-IF?jG$4BqP9gMtMis0Dw8 zAV{dW=nt@ez?%dVDIU_2gRqI_5Em~-k8ZNXWV1btZa3MO4c19#+Wqh_Zf2N=;hoLQ zLzrMN$n!kVR;sFUJkQ_V-BE`=I5@}w0L!vKVQ~Q9@px!O=Q!>KBXRE#RaJ4J1Hkq5 zH74#rAmB*#N9cI-&+9?5X8Zj7{P_5|^XQH{u=yKC6vb33b$ff;+uIw9#SFtZ zJw0vcV;BZjbSqURlaVB;VRjAxerlS1&~!NI`5fVIQh?ryB; zCRH|X*Y~znJyFxHP3oeqGU3e&1O9;`*C3*9*=)dr#lP& zn<{s4fg0h-$-2z|0F15BXa1p~(a}*s5CEWXbyYJAdmo&O{#YpD48vSpURq~=HZW^z zYn4ic=lPM5k&}~?zi?i#P(>mU00>*Q=~G~A=!rx^QIxK(E{0+5@9$+<_W68FXS3cg z9in$e&*$@{Qpx;xe0;nc^Q+Ji{h4jrtW!Iut3V(?BD!Pgx=!e-({Wy>6NMqMNDj~M~n z)!GO=qQA@t;I7t2;1S(50Ji7R-H^E z;Fxt5y+yKp{*YWFP<>kUy}douSY2JE!wBfrD*F4hvVtJ@ z_xH_*L>mEXHkOx{0bprq$rczQjer>#REvv?4Nu550(w0tO-7)tlOusf;N935Ms)0f sary=%7ro}V>f{=MmOlY4Yuc{?08g~^-7;vm)Bpeg07*qoM6N<$g2&OnRsaA1 diff --git a/resources/www/vendors/colorpicker/images/colorpicker_rgb_g.png b/resources/www/vendors/colorpicker/images/colorpicker_rgb_g.png deleted file mode 100644 index 72b32760a5c40b7ab834d176ac588750a06f13f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1069 zcmV+|1k(G7P)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4vq?ljRCwC#na@w+KorMcp|EVXQK$+YM6*gzHqnN7BF59kyLV$Gkwjyn8-M%_ zE{RbNUKIZauO4)ds|T|oT-ef(s1a0_$f>a^t?r@HEtF8AJM1*eOAln2$@}v7PN(lv zVqjo^rfD!+2!cS;G+ihZOeejotBV8xi^T#a3=#mWR;yX1lO*|ym8f@!APA_W1Hk3w zB_iEkuh&r3o1~-lLnG2_dVP3!cw}V6=kpbd#Y`r1aB$FM>4rPdqTFGsf@RrABvLAs z_V)IUj*iC1$ET;KtLC7VuFaK9CiU4#0Js;$s%4Xtll%Mo+uPgi?d>#8=kxjb`T6VX zYnRih&Uxo>AeFAF`pIzskVqr~Lqpo^765pv442ErFwDvEaR>5>mzrVKEiOMUN%>sbW=d;^vxor09`ug(nG5}<=S@G^porYX_`AU~VE3z!TGDK12 zc|IHtTS-zB#k2Esx7%GV#GgQ4^p{X9P7p+z=e5~u7zO}#c6JsQ7vu3b&+`;T_4M>` z9GA&t7={6YXue?rfdBvuX|^c<5G>0+K0fLf%ChWqI(vJ2Z8lpnnM|cp%5P9_w|2W7 z>1kS1l^S-tomBpdnunPn2&bo~4-XFj(BI$hKzujU8^&M)%d(Orp*X1D81+?=O8VFB zIa!wfZPi~d9gF96vq~2P!K`gH<8pO-Jf@R=lh2dg9?y?N!gSI{gTWRNFc%T{RQW{l z*CWMo2;1uKCntz>kA*@lBG4iNxDWx@ z)`lq&7!3wLPfXOA@a^yrUm{@0H1Q<@4N1q72$V`Cvl4;&Z#A$c0u5CiPaZTH69Gx%^@W86{U8at z_Fg3dSGk-*1b!6?u~UR@?manP6sovBm$~8BD1qf>UcbEU>Hn@ zfYuw~a2Nn)W@dDT!IB76y{(>_nyMPXmk7v4umABS0u4PmVn_r&_Vpo@j@&Rtryjo2 npA4&xFA;ctuJh%cDE=M*G)vtq^hrv*00000NkvXXu0mjffA{0B diff --git a/resources/www/vendors/colorpicker/images/colorpicker_rgb_r.png b/resources/www/vendors/colorpicker/images/colorpicker_rgb_r.png deleted file mode 100644 index 4855fe03f8ea8d88b4f8ae625c7958eea65208ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1066 zcmV+_1l9YAP)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4ut`KgRCwC#nL$e%K@`W|#$^*@2)1ijA*P`i*Vs!8o}|Yj_z@}|6buN87D4dl zS;)b(p0whp5G)M=FI7^gQ8aB#6dSZ+h!%w1Y;?1+hmFg+nRFn+=R+9LJG1n=PBo8cw>y;UEFPWHNyPjRb(ErY56GCrR=VBT=6aj^j{C z2Y}PlQ$)I5E>~4mPm+!{9%_-UkM*gkDWxt5LNprP-`}sZ^r|P&B!6Kv=J9woH#gVT z*4Ee8bGcj~5O6x38Xwfs)pPCb?dfMH0U$33`jPQ?{QUg<*V)k*x3{;YrDbbti|2U@V!3Kl zRCTj#GL@3+Y**KVSOqeE%ahy@p z>gUg%wKI(2q+et*WIMxri^U8lz0dD&5CLNmfmf=FKMMPvNFYqBzie+K(*3%>zd-~V zL;x2efZ8e(fs*tF5oi#B1`)uT2$WAXLZQ&n(GgA41VQBU`NhRWQ51QeZ*Fd`W2iq+ zC9AKVB^iPU{58STq)rq?Q52=WX&5rCK1rt=MBqOp0vDN#+vPH1T5ZUz6aegYJElaS z&+mUTFi^oE5)R`_1gbJke2G9!((xn$q9_`b2vmO6z?uluwCZ>gfvT~NFA}u zJ+zYaydY?bOazXPk7GMK??WM;=NX3ieRZYrsgLwvFbDv_U{E6+Um_sgKZCuSp8l}3 zB-f`^k&G`9D5zq6Vq!wyh%XUP9v_#Nm*vX%__#5MfK({RB``K7i(FY*Q5vx(0tHD@ z%IN4Q0E~=`C@okM0nKam@bIvv1z#c{ReS!&mk88!bHtDcymY$}N=F_r<$jdLkY231 k>i80YySoaVIYIa{0Hu_2rW%yutN;K207*qoM6N<$f_Z=6i~s-t diff --git a/resources/www/vendors/colorpicker/images/colorpicker_select.gif b/resources/www/vendors/colorpicker/images/colorpicker_select.gif deleted file mode 100644 index 599f7f13a6854d198f501588948ffcf97bf9f365..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 78 zcmZ?wbhEHbij|08)1sO8@`> diff --git a/resources/www/vendors/colorpicker/images/colorpicker_submit.png b/resources/www/vendors/colorpicker/images/colorpicker_submit.png deleted file mode 100644 index 7f4c0825f53cc4faba8fc9e043502276765da1f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 984 zcmV;}11J26P)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4UP(kjRCwC#l;3aLR20X**Y`TM;~%lpWOcWu>lSTng3|pcNEB`2g@;K<+cQWY z@xLM7VCvg6R*=x(q3bFrqf^VEi|J^a#<62NaopJ9!D&c?Dnar9lXm0>pDUe@?m73~ z4=I<+ilSiD@O_^tic+msM@AHjMFxQ5IE)bt0Ht(X1Y>My)yQ<-5retIs8H*|7Z13? zPrUHG+_qWtj}ULo_;=1nmuBCc)-Nf|EIiTorNxc<%@yk|zrCVZLkMb`W;%{E7G4iN zdY`;^>*JEjL^t4S5m)PqP4!gn!t|B5ji+ioZtqDpHxS2Wp{R!++-@!2_(Y4UpgK4m zViuZ;a0>2(RyP)J-EMq2@vFSw;N4@5^iSl%HShG?6=}vnkb`7GE<#kGX$U5f)j^DG zO`a-yukBo4Eqs%fbh}*!AZ)eLTr4-l((DV8I3rsPQ%|p}SP9#JNLf&bBpDJZG zW<$AGB8VabkR(Z(yV_x(32nq4M4idHZe*o1M9zm)ay&Q^oD4ika}TwCNv{zQk|sL| zEVK!j0l0t*-&@MHmsF)f z27*#b=I7@-olgIr#Bm(QafeTW=}i0FOh-M7rpC5C;rX^4T9ibLF-mEF<1Bq({XG34 zgs?6|3$Q9c<*(6a0PyL%z)2^PzL$Tik72|p%JF@FT>Va&rlIR2BkGRB3|(JcTN@d1 z{p!_M20s~b?Xvgb4Q_GaQ_Xf@)!+uO)m$XyrsqoKoAMWHT2ux{DhP&ISOWy1~_n?w9g4TxaK54^@w;2!{Y}p; zD+Zr{ak)S?c%HM%;YW>mwawEyQ#A?io}b;W8h3kicY{-}@8&ydXB;}Ies{ij)7Phe zG~N1SJ||mV^{wS%HH#F5Bc;ZU@%bh!i@hcHIy=o@HdFr2EApLzn0+z+^4Nu zOL;5Ct@~O7B<5N_xIPXVm?>Aq*{2MZPJYk*w!_YXmZ@jWj9l%s3aMYoE&kA!MQJ)3 z+fN$dTTPvBkoT`1tWC%;t2|a08V%g1DqD1h8I`K-m+0B#44S5ebAxpF##Dg^E` zqc^r(?ZExs%T8g1nu7=p2B51P;3}z^?|Z*h;$1Q_(V+To`zu#S4R2moFj>h4Lwo~8 z$7<8+P}tmDz0T!#k4J;+>xh;486{@S#nBd7PL`3-NFx84l03Oz^m2QT*N&kd3P|%Z zE03FeicR9hru&uoCh6_s;c}fefnD+xR@yYFGOtM?>@bV{=^KSS z)ql8nKr!uS_@QzvW~dETIP!M)7V2*&=UjQxARV2^lvlcc>v{nhzkbi(rb(cqsjr@9jZIJ`!{X4di5R`E?t`re?;CT z^5Gn+V@>>W0l!o9Yrz9JK!)+F?-m*x8=gpp&}PD;S$X6v7>;dDXi{J#_r}pVJ3T^`JyH4+xCeGIuB^U>YDxS8w2kRDe z#7Rf;V@i~nHWu{A8{*E@IMJ9eo9vh@A+b-lYvUOj3}r%qkYe|2Gb|pX`nJ_rw42Fh+Z3O#AVMvr3TVZ5)TL?$`J}~K3*wwv0 zus|B^9CI6nrdhTPKD;nR8AYJ8b0(xFde;GN88#edI*hUi&C<0Xo@Phnp$%`?Hb~raXbeJb#qOw$i%+wY;1D{(x0=zLmB3-Bf9b0P*7x{ z7gug9t6wldkA0qRx6VRrVPAeE;o&D1qFlBzmw5c7YWiwTbFf=NwC8MTwER=+8-$p zgw99_yLb3n$#!&(5DiF$)pEoTtzy4tx9wB29x5E#e>HIDN1p_9k7lo%`mfeWbCjxw zJHbt%{iFfhKWH>7(qK@3F>>t+QwT8#qaRxEQC|e8@ejmnm?MuX!*;_i#l?&LouQ@e zk#e8TPs*L{ZWZ_iGh7FMS0q}q#ml9Q9>`?JP%o-}3;KVMjyXwR8nZm$V(=ZzCj7u^)> z&b_;2By6$Ao!cr~7wQ5Z7A}=(JI1w_*8_6QT#y->9v{*Ge8*8e~ z==fX{xbu@uTN9pKqId@u+7pc}gM(vJV&+G!GUj@kno5@=RjSN$-3h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA2xJg7oRCwC#n9oZBK@`Wot_u~SmxN3r5Ih70Mbu#-5IXvQ^oxZ4n2NCaJ3IzL z;2{X2q@qylU`7g|2rF%4hk7tIEDr$O-dD(j4er=)=917y8nqSkCx?994FUl(+=?D`-;|%FKoPJJ$1~Dk zjQIfzhr{G14>qP93*O5^1+Z8&qNbSh-ukFFnu>uX6LGWNXjh+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4&q+ix)wo?d?__$+*uo~9%|=tUwFNd)~@{SiSRM1iP1 zASj~8A5vMMMVJ*8R1oAJffN{u5l9L~`8X~2uCvq=70-M4+}rJswQaq-Zg0;SApbi87WN=0MN7>uxOXuEzPRdLb~V*S*6$YQ95zyOEewaw5Du|_wy;C zl5QB5;0os9F;P`G4YRr=s>-+YTXl_mIXfq}th88$(g^@ySk@z3C}ZNr)PjP-%&eTY zmgaYDo!&9Hr3=R@+?M4%IsyP~c$jy~!-q;UQj(TvddBXgC@T5b!SRV{VZi+S0#@m~ zs$4@F02JpNzV=hX(GdU;gpVz$sriF0BHT9P{M^}IRaF_O(@sp;*3vM%s@?%p_LdZ` z+&5@m;dP(MObv!>BN&ERn4g`tIi{xV>$qfvidRTyeHr&mMR}efjdr_VG`(-QU%#{H z0gK#RKO4mo}(8QE&)H;df{DkJDHkqTf0Y)ao#h_8^v`Gf7>PjXu6#^Hp!H*ShzQ7%2q5m++oRS(8F!Q%h>wkS zy5`zinpG;*zLLThzNv;K!^y0h`|3O0<9mr z@g2V~5`pxTB>w@cgc%_sAW!KDaWN*#s1hHm2~cLT*_|>a0v%nwZ(G{^M3(K{BVQsw zl1QmUfDps6@+AUlwMMB#K&=T=DiP4AgYvo@hyY27Y~1qwj{qV`KG$44DZE4^DQhCY zzwo(o{saJAzfgYp#$#m=0p2iIYoA=IKF*b|-F~V7BA^y5)0+C{-j(tt0_cxn&YeEW z6>i>psSF~35Xt2`4X?QQJ$vd1Uny%MfCLAD`iHLp;O?U)VWoVDfO_REso~ihj~e+B z0nuBMe2D-G9yXH>eR2;lBp})JU<4<5KtT P00000NkvXXu0mjfA`AaT diff --git a/resources/www/vendors/colorpicker/images/custom_hsb_h.png b/resources/www/vendors/colorpicker/images/custom_hsb_h.png deleted file mode 100644 index a217e9218e6a512b507a35e8a6141f0e56193439..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 970 zcmV;*12z1KP)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4P)S5VRCwC#m|aK|K^(yUyEA+4?d5?fXd;=M7I&7CAQ1#X&_j>CL_YN-gn@+F zgHSIeAw>3IK|;|7L=oge5IzJ#A^0E&>G?(8=|!HGo*#L7AKu<>4|8pMd)HkZt+#{w zXC7weW^aBB|Jj-SF*9F$o1tx>E$qcMycycAC@-ZBJ@9=M1Art+Kw)425XHpaLf3nT z*o$qs(c_|+-@n%!JfIWz{MV(NRK`u1oK!3sq$xeUk30*0rTO&r;Lz}xX3Q?2XDLZ^ zNtQLm=b0`ovGcrzGy{tZJ8^M;iCsNLZ*=us&BvV@!eqi&`J(hE1%Vf=JRxLR*23X^ zHtTjcstkxmW4fX%R1Gc%0Gw!YjZb;hvts~YStk9-f%l(m0w0fy0I;#P!Y~ZOFd0Yc z6v|xg8E^fO8d9H}oln`OnfJJ7mbVJzw2DT;EXx*f%c_Y}(B({td#$~-(d7^m2>@v8 zyhBz%)<4CSQ06-3bdbu#v?m=s^TUgQAW80>SVT-DWO+Bqe^ZT5c^X^}GWW!^H|6DM z{2&`t&HcxOX}{XxtgBuQu9KfyE}VDPRTnB@)bzR0U55`X2iGIf82PEXs$7=k;M$J@ zqW{A-4Q++h&2S`|@upE=bVXp?Ee;`O5dSyi! z_6LF|n~ze5J~HYyjR0NfpC{*ZC2Op&)zJu?In|^S_t5Z|X#`9oU=$;ucVssLNp#Z) zm`1=f0;Ul#jllmj0z<=NR2qTWnkv%>>_H8 zN}^l&B27_@0BI^lKr=??RZm8DS1SN?ceNr_7}^MstN?&p_nzJCxJ2r=d!JKa1US_; z?df}&-f3JTfPWoH*RQmY%H4;rv~L($))vJGczsJ=-;&x0XvXM>ju9#M``?gN>ukHI zbY@GK!e7T#7lFRVZvo)JlL2+7ag6|%dL;F~c&F(xt`Sh)F!UJ#{5Lm80~&$3`EU8J sdf~SzMzo^mJOqtv1hQW_1cCoK0IhW09jn*o82|tP07*qoM6N<$g4YtalK=n! diff --git a/resources/www/vendors/colorpicker/images/custom_hsb_s.png b/resources/www/vendors/colorpicker/images/custom_hsb_s.png deleted file mode 100644 index 7826b415077be23ed1b1bf05b2da62d4aa5b1c67..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1168 zcmV;B1aJF^P)h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA57D+@wRCwC#nQcf@Q5eUc-Fr6Onu3&AF^rild$UyX1q~x8l(L`*3O@uvFO(o; z_5wxr@*$1tgY{vMl7$6QeMqAy6e1xqkX2R|TUIxmtGu(iIrnyNAC8Ud=Dmt?_1xOS z`EYjbGoJs>o;~L|ziI4tJI8S#VLo05L|S~@48(C$eTIg-ib~hV#^6c%;`soO zlezfi8;3YL0sx8%PiTw9QdL!zm6bIwEpOSPl&u?AQj2Q*-QCgA(fXtl0Cw!$vnn?|%wceFNYM&oFvQ9@3=R%a03eJUpBbjP zxp`q)T3K1y!+W<%Hg9jJw`vg*Mw-&Q9tyNHEd`IT=#UEpqjD~4E z^RfC@Z$F3^H8z_~ryHfSWm(qgbTa*XVcv?&bj$btfnHa?*um@dDVpmsF>?L3*Xu+0 zyNG<2kdR<9neuc7gy{DU#-ng495vU+K24>ZIF9oRKKZ>NR5}3gyyPRArjJ2 zf+9GneqF87jYgx)wVGJz@o_T{>vs3KTv8sMfSye0b7#*&eJ)p4MuzH$z|-elQ6iu& zBJkq1T~TGrm!v941lAN}Dx|xuy)#M#qC|icBA~R%6M*&npp9OT#pigC=nPp5g7fdQCeDBTwIKaKxO%EOa#U(w2IzM!^(@?E$JU80&VS` zsw4ubW>b_1{D(wfc2d$OhEe0SngVs&z)y})BJlKi*ZoJ2WgLpv7LrQ@Xd0=N2vB3; zSaOMgR;yDh5zy*l)Jg<&+6m=42}FRVDYX&-MAM;h_SjzWOGMK|6M@hlJ|_?D1b{O~ zcb%xIR|gRYCCsVwSC1dqf#;_$G^l_GXhlEMv$c(piwF||u`vwu!e-l0Qj(pWefUUx zZQbpLdh413tIzMB(#G&_!c^|xjwk0X-;976L=pjnXgn@jo3O}(`?iG^i6#O_)CkmG zxeWl9>h6da$t42Xkw=pC+TE}fa*4p0M-sV20F9?}B#;Q$d%jF+*QfVdjmwBCrAMCe isv!dMU5CLC`)2?-k0%YdqHBTx0000b%7 diff --git a/resources/www/vendors/colorpicker/images/custom_rgb_b.png b/resources/www/vendors/colorpicker/images/custom_rgb_b.png deleted file mode 100644 index 80764e5d6dd8aac3c5ef87d83b45d29780af1fe9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1008 zcmVh+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4c1c7*RCwC#nrlcDK^(y6c4ze-dVNsvS$Lk7-d#%KDZNO9B8i}H)rSZIAqqt8 z0YMQxK1gMO7GYLYP(hF%0x2*QLy#1V@^M=3*;VR^9(UeDy}aA)!`iamU9KIiH$ywj zhuOK=n;*mfzdQ50Qw)ExxjjCBThS(Jpxfh1O-aHI-9F`j004$z0EPtu00M#F|Aj7f zhG-Kt;^>QkKy=@(+mI#^_t>{dQ7Uu;MwBWt`i+KWzHKxWRFsz@h)w_i7?usGHrkT0 zKD)TsoR@FvXls4b(GxyKYINaT<}LZ*vqJ!YN*N!1=fMNzxw_27Kw#GGrD;0r$o{Em zr*Oc+f?rZ}o~pp02LO~789ois!r37JfFKm%ceb>?)2NlMS?`CQ&YGI)1dVFi;abap z;i(3Ot;S6{u01$1wk*~o=Qus0RH+$;@h{9dT^@(i9mA9r5-&q%BL(iMs>(uxJ`fB( zYkAvrw{d&PJy!bo78ZWG&G~w+(Qlzc)0AaHD_6$tGgjLqx8AwgnFK+EkC766sd6FC zvaBgDTR8h41E#*A8A58#=dq7}E!nvj01ynuY^%f3_gk#u0aI07tIx{t`+u@5Sf|w# z8gra3Ppkq)NH30V*qD`|QSq0b>F@IrKMF4dTKJ9u+MBYo3KOg?j4Yg0AA=H2S+6(D>UXvXavf4 z6iLM0-qj}?0VIt844nb#OyNL5;7c;7b^0X;e+ zAaz;U2rQw?MnEci3qJQrEH1Yf zQ6tdZJMg-#bAQ~f6nSu? z`yT;Fl6FhB8z}0h=7q30U!wB#JbGiP}h1#QB`^wG77#IOc zkfwEwPs2OWH3IN=z??aGm}^|W^BfN&03pfMTTL&x^*w#!5Z{Tk5rBe?K;!+F0D#*M zT7;eG8UbqgE2-(ptB@XajezJY30)%qSF>|O&h+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4vq?ljRCwC#nO#UzVHn3B&&Qk_ilpY|_s0}>?nPou*fl}Rc5eb1HAxWC1`PusLBR4nqy_`E;96KC0+d@0;ym(%oi|yfg z_x$(ndC&X2zxj-gtMmpFpf&>hrG(yKl7$8#Cw*>SLjZuo;Q#~&0RVRU%J!1Z^$rQ} zmwJ}IY`1Uh(_^FL9O<6^I_pste+$N=s=rEqKRDJuFszy!3EUA98=rV2KbLRPF#vE- zl#}&+80~1kLz1G?r%oQ+pZBik&E1EcPBC0dXXnbwNOsLm0Dzy^*J;{|=Uw@S3#!VF zX>|sJ$s8sNZn@nSArH}L^-PS_YU5NoqiR=5JOE^8rVM_XWM{_!0KX4nMA2cakQ~TGSb(W#7`WfP_{jIVqaO2_=ywZB4+0`t6RrGF=5F>bK zPOLkvw4|`EvGqhzag0J~wV399e2Gg;OHPPh(CEBUFtqxQBU8@Lb=P0tPwZQLxpYyh zpHj{KT3+6rk({nnn9LT7)wTtt!W4|Fde7476CuD~nvI-Ac&)|&&7sp9c}fI&`-Wb40tAjTR$Fz3{g%LS zUK0W451*?SjsrkVWzm)E_t78%IF8YFt-gc4k5*R{GEQC-0g|;%YnvXsI@jqO86prB z9!e7dd1%nt((^PCFq$k|)ENFLn2M64^otuUPhDXKABg}#;IuWgKBL#SytsgI@|p+` ztVW>eUMB!Fw|B9f{3Qb9+9Rp;(Mu-}e~Ey{BZ0#I_nn4BBK|!9q`eQh+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4fJsC_RCwC#m|aK|K^(y6c4zO?v(zImG3)ZwJU`+t%!))43VaBAEQo?ckfMkq z9|U{Ie6UO_tx!s^pn{-;9_k?o3PD0RD7CZlPA}~|?M&1A_Pp(3&tvZcw~p4^!TmE2 zv%9l9KZgJ8%=`qS-za z#zPh5bu}lek5);fvfiF9%hXIn8@AEueU)hQqkD${0Et)>{ie1kXIsXWtjzSX(&AG! z2CL1kEy{7aJfQ|2kC#>S5LK}z8vszM(|r1DqW2B~02n5Se$)8XVw?Tt@pwNNjBb~s zvP>sWlDb*O4aSeU4Uq3DNE}3`h3ei-*WU$Bf;o_Ks=KU$8mO7(?GnVj>di+RrF-J4Ao=x&$$Jw&5j&;hEf5o zHv9gPLgdf~28VegfEN14kug@ub{D8wGy;_ebu4ke?Kkj7fHwkMF#>GI+D0IV&Km*V z2=GRLHv+s7_@74LZNC9YBcN7g@7&G3i+D8Ucb3qG|*Pp$OH45fX9bIv0!pj$^1A0f^(F($ZK*zl1m* zM3;y~5rr}WdFrfEou*NLMj}nJ+U$zdO%ZKa9`#@}H`D?Enj30yT5#G3gc7Eyt@pD2 zG*!Ra{ty8pK+vXXOXuV0o7^=5aCJ$lKX-zvwBCJ+h7o`er^?OlXVmy!I(s~Hlha0k z{y*t_@Eiber{@Lz55rv}K!h(z-H%>I+~KYfU|f>8YXsom>>N301jfdv;veh+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA4Ye_^wRCwC#l-+OJWE94q*RQ?AiR0MGMw%@}VN1KRu@(A31>#H7y28o^Y!?Ut zH(bGg!wuKmGLR-VIu&VBK^my6Efv{HS2f*~kA9_T6FaFBC$Swa;+ifQNNbT06G!jO zvEJv=Ip_8Hk%dI6Skkc95Pe>@SkgK|!9827XSY}YmStfd!2&Q0^Pjhf&nISQW;{z% z(K~Te4kS+vluw`R8|?3Ww!7VeOwG>oyleNTtJiPJE8m<63lXVDD0@(HZ*TL<_X-o` zd||Zv(&(GJFIOtn)+(;wm^jIOG5r2{F|Q!A1yw`d=dbbp$f-`3eDlkhs~EpHa_%o1 zSx6-PuCIsR8xddbUS$C=3~A=dQ@?8Bg(}Pv+!E`RB-z6sA>M#a zd8Gt}hjIWVUQ~Y$Iug4PC$bhYs1mR;paLooaJeYY=K*Ess5NZBY8_`|XBNVG-(4jq z91M!kW#}P517QFa$X1cBK&>IOsd##GjsyS$pwX~T7c(@mxby(E6pSp`HPAGWB3Plw zvdCCSXt(y^x~C^mwm^(jyaOnSpYacdWMYS+t084 z^2+w%(=O@I5mKuuYq`}Q?t~JPpM7%pt#fC0-?w*!dH2B<}EheYuo*06&0P2R(PVkSzLgcj` zVW8J0_-tX~r?D$-1b;*o|4o8p{{*)!{wMeoM(~F$ngoCMosr`UvD=f=@$qZFb7M_{ zzZwY*efmZ_!FT>n%gGzf>BeHwSS#&(ny T=Ar9_QX-DN@01`G*?mYE;P(j>ieaLJ zp1@KmP7DbnxHd5epSMZF>_Ios1X7kEzM%)`8u}mxVv)EwgAVwi+aL%gVHgVE_pQ>@ zbuG%W6jfCb)Fr3i6gRMr(1H#Un@BbTwH6Q2xnfI1$74|x z`a$b3REt~>BR!+Rjm(B~!)%yB$32-1&(IZ{4HWmQa;H~;maQBTMsJ;5 wu=L25Ib=s<$1=nh_wOs&FkN?ph+v*8l*BQUCyPMF0TmW&i*=2LJ#e`2#0~ zRsaA2j7da6RCwC#n88ZJKomvKOQ$N-q%EcB2MDDFapS&Ut2tcoJKO0Z5XR@gxT5=E@BPRC5JM(-{EmRs+wi z*>P|@#ScQvT9QAwUwvX=#Ku^(QHKpv2~+}=KqXKKR03@~kh1h#z3lU2-9S7%K9wHY zZlHd@zd1k|%qmdMx=&^ql(G#p7!3Z$L#9{gzl=qFW|hX6M^<+t`|yc1Y?-gyyEotInm#MOm!f^^y*-dYoVJ8o0wy4TmX zR?7dfn;bc9{iI8VpES5yofZaYh;TjCpK_UhilywQPp{V&o!)zNr-EuAP#7%xRC{Am z6GR!1|0e8}W%vqnuQi`zyC%VuOt~~QLec?j5=hH8t&PuqF6Zm0mDYFhgqkAab@NoR n(3#>M@3IhYo&TccjBE_r(UXjnZhw#mdW^x-)z4*}Q$iB}AxU+4 diff --git a/resources/www/vendors/colorpicker/js/colorpicker.js b/resources/www/vendors/colorpicker/js/colorpicker.js deleted file mode 100644 index 10a2b2244b..0000000000 --- a/resources/www/vendors/colorpicker/js/colorpicker.js +++ /dev/null @@ -1,484 +0,0 @@ -/** - * - * Color picker - * Author: Stefan Petre www.eyecon.ro - * - * Dual licensed under the MIT and GPL licenses - * - */ -(function ($) { - var ColorPicker = function () { - var - ids = {}, - inAction, - charMin = 65, - visible, - tpl = '
          ', - defaults = { - eventName: 'click', - onShow: function () {}, - onBeforeShow: function(){}, - onHide: function () {}, - onChange: function () {}, - onSubmit: function () {}, - color: 'ff0000', - livePreview: true, - flat: false - }, - fillRGBFields = function (hsb, cal) { - var rgb = HSBToRGB(hsb); - $(cal).data('colorpicker').fields - .eq(1).val(rgb.r).end() - .eq(2).val(rgb.g).end() - .eq(3).val(rgb.b).end(); - }, - fillHSBFields = function (hsb, cal) { - $(cal).data('colorpicker').fields - .eq(4).val(hsb.h).end() - .eq(5).val(hsb.s).end() - .eq(6).val(hsb.b).end(); - }, - fillHexFields = function (hsb, cal) { - $(cal).data('colorpicker').fields - .eq(0).val(HSBToHex(hsb)).end(); - }, - setSelector = function (hsb, cal) { - $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100})); - $(cal).data('colorpicker').selectorIndic.css({ - left: parseInt(150 * hsb.s/100, 10), - top: parseInt(150 * (100-hsb.b)/100, 10) - }); - }, - setHue = function (hsb, cal) { - $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10)); - }, - setCurrentColor = function (hsb, cal) { - $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb)); - }, - setNewColor = function (hsb, cal) { - $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb)); - }, - keyDown = function (ev) { - var pressedKey = ev.charCode || ev.keyCode || -1; - if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) { - return false; - } - var cal = $(this).parent().parent(); - if (cal.data('colorpicker').livePreview === true) { - change.apply(this); - } - }, - change = function (ev) { - var cal = $(this).parent().parent(), col; - if (this.parentNode.className.indexOf('_hex') > 0) { - cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value)); - } else if (this.parentNode.className.indexOf('_hsb') > 0) { - cal.data('colorpicker').color = col = fixHSB({ - h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10), - s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10), - b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10) - }); - } else { - cal.data('colorpicker').color = col = RGBToHSB(fixRGB({ - r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10), - g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10), - b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10) - })); - } - if (ev) { - fillRGBFields(col, cal.get(0)); - fillHexFields(col, cal.get(0)); - fillHSBFields(col, cal.get(0)); - } - setSelector(col, cal.get(0)); - setHue(col, cal.get(0)); - setNewColor(col, cal.get(0)); - cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]); - }, - blur = function (ev) { - var cal = $(this).parent().parent(); - cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus'); - }, - focus = function () { - charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65; - $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus'); - $(this).parent().addClass('colorpicker_focus'); - }, - downIncrement = function (ev) { - var field = $(this).parent().find('input').focus(); - var current = { - el: $(this).parent().addClass('colorpicker_slider'), - max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255), - y: ev.pageY, - field: field, - val: parseInt(field.val(), 10), - preview: $(this).parent().parent().data('colorpicker').livePreview - }; - $(document).bind('mouseup', current, upIncrement); - $(document).bind('mousemove', current, moveIncrement); - }, - moveIncrement = function (ev) { - ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10)))); - if (ev.data.preview) { - change.apply(ev.data.field.get(0), [true]); - } - return false; - }, - upIncrement = function (ev) { - change.apply(ev.data.field.get(0), [true]); - ev.data.el.removeClass('colorpicker_slider').find('input').focus(); - $(document).unbind('mouseup', upIncrement); - $(document).unbind('mousemove', moveIncrement); - return false; - }, - downHue = function (ev) { - var current = { - cal: $(this).parent(), - y: $(this).offset().top - }; - current.preview = current.cal.data('colorpicker').livePreview; - $(document).bind('mouseup', current, upHue); - $(document).bind('mousemove', current, moveHue); - }, - moveHue = function (ev) { - change.apply( - ev.data.cal.data('colorpicker') - .fields - .eq(4) - .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10)) - .get(0), - [ev.data.preview] - ); - return false; - }, - upHue = function (ev) { - fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); - fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); - $(document).unbind('mouseup', upHue); - $(document).unbind('mousemove', moveHue); - return false; - }, - downSelector = function (ev) { - var current = { - cal: $(this).parent(), - pos: $(this).offset() - }; - current.preview = current.cal.data('colorpicker').livePreview; - $(document).bind('mouseup', current, upSelector); - $(document).bind('mousemove', current, moveSelector); - }, - moveSelector = function (ev) { - change.apply( - ev.data.cal.data('colorpicker') - .fields - .eq(6) - .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10)) - .end() - .eq(5) - .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10)) - .get(0), - [ev.data.preview] - ); - return false; - }, - upSelector = function (ev) { - fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); - fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0)); - $(document).unbind('mouseup', upSelector); - $(document).unbind('mousemove', moveSelector); - return false; - }, - enterSubmit = function (ev) { - $(this).addClass('colorpicker_focus'); - }, - leaveSubmit = function (ev) { - $(this).removeClass('colorpicker_focus'); - }, - clickSubmit = function (ev) { - var cal = $(this).parent(); - var col = cal.data('colorpicker').color; - cal.data('colorpicker').origColor = col; - setCurrentColor(col, cal.get(0)); - cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el); - }, - show = function (ev) { - var cal = $('#' + $(this).data('colorpickerId')); - cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]); - var pos = $(this).offset(); - var viewPort = getViewport(); - var top = pos.top + this.offsetHeight; - var left = pos.left; - if (top + 176 > viewPort.t + viewPort.h) { - top -= this.offsetHeight + 176; - } - if (left + 356 > viewPort.l + viewPort.w) { - left -= 356; - } - cal.css({left: left + 'px', top: top + 'px'}); - if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) { - cal.show(); - } - $(document).bind('mousedown', {cal: cal}, hide); - return false; - }, - hide = function (ev) { - if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) { - if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) { - ev.data.cal.hide(); - } - $(document).unbind('mousedown', hide); - } - }, - isChildOf = function(parentEl, el, container) { - if (parentEl == el) { - return true; - } - if (parentEl.contains) { - return parentEl.contains(el); - } - if ( parentEl.compareDocumentPosition ) { - return !!(parentEl.compareDocumentPosition(el) & 16); - } - var prEl = el.parentNode; - while(prEl && prEl != container) { - if (prEl == parentEl) - return true; - prEl = prEl.parentNode; - } - return false; - }, - getViewport = function () { - var m = document.compatMode == 'CSS1Compat'; - return { - l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft), - t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop), - w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth), - h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight) - }; - }, - fixHSB = function (hsb) { - return { - h: Math.min(360, Math.max(0, hsb.h)), - s: Math.min(100, Math.max(0, hsb.s)), - b: Math.min(100, Math.max(0, hsb.b)) - }; - }, - fixRGB = function (rgb) { - return { - r: Math.min(255, Math.max(0, rgb.r)), - g: Math.min(255, Math.max(0, rgb.g)), - b: Math.min(255, Math.max(0, rgb.b)) - }; - }, - fixHex = function (hex) { - var len = 6 - hex.length; - if (len > 0) { - var o = []; - for (var i=0; i -1) ? hex.substring(1) : hex), 16); - return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)}; - }, - HexToHSB = function (hex) { - return RGBToHSB(HexToRGB(hex)); - }, - RGBToHSB = function (rgb) { - var hsb = { - h: 0, - s: 0, - b: 0 - }; - var min = Math.min(rgb.r, rgb.g, rgb.b); - var max = Math.max(rgb.r, rgb.g, rgb.b); - var delta = max - min; - hsb.b = max; - if (max != 0) { - - } - hsb.s = max != 0 ? 255 * delta / max : 0; - if (hsb.s != 0) { - if (rgb.r == max) { - hsb.h = (rgb.g - rgb.b) / delta; - } else if (rgb.g == max) { - hsb.h = 2 + (rgb.b - rgb.r) / delta; - } else { - hsb.h = 4 + (rgb.r - rgb.g) / delta; - } - } else { - hsb.h = -1; - } - hsb.h *= 60; - if (hsb.h < 0) { - hsb.h += 360; - } - hsb.s *= 100/255; - hsb.b *= 100/255; - return hsb; - }, - HSBToRGB = function (hsb) { - var rgb = {}; - var h = Math.round(hsb.h); - var s = Math.round(hsb.s*255/100); - var v = Math.round(hsb.b*255/100); - if(s == 0) { - rgb.r = rgb.g = rgb.b = v; - } else { - var t1 = v; - var t2 = (255-s)*v/255; - var t3 = (t1-t2)*(h%60)/60; - if(h==360) h = 0; - if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3} - else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3} - else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3} - else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3} - else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3} - else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3} - else {rgb.r=0; rgb.g=0; rgb.b=0} - } - return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)}; - }, - RGBToHex = function (rgb) { - var hex = [ - rgb.r.toString(16), - rgb.g.toString(16), - rgb.b.toString(16) - ]; - $.each(hex, function (nr, val) { - if (val.length == 1) { - hex[nr] = '0' + val; - } - }); - return hex.join(''); - }, - HSBToHex = function (hsb) { - return RGBToHex(HSBToRGB(hsb)); - }, - restoreOriginal = function () { - var cal = $(this).parent(); - var col = cal.data('colorpicker').origColor; - cal.data('colorpicker').color = col; - fillRGBFields(col, cal.get(0)); - fillHexFields(col, cal.get(0)); - fillHSBFields(col, cal.get(0)); - setSelector(col, cal.get(0)); - setHue(col, cal.get(0)); - setNewColor(col, cal.get(0)); - }; - return { - init: function (opt) { - opt = $.extend({}, defaults, opt||{}); - if (typeof opt.color == 'string') { - opt.color = HexToHSB(opt.color); - } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) { - opt.color = RGBToHSB(opt.color); - } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) { - opt.color = fixHSB(opt.color); - } else { - return this; - } - return this.each(function () { - if (!$(this).data('colorpickerId')) { - var options = $.extend({}, opt); - options.origColor = opt.color; - var id = 'collorpicker_' + parseInt(Math.random() * 1000); - $(this).data('colorpickerId', id); - var cal = $(tpl).attr('id', id); - if (options.flat) { - cal.appendTo(this).show(); - } else { - cal.appendTo(document.body); - } - options.fields = cal - .find('input') - .bind('keyup', keyDown) - .bind('change', change) - .bind('blur', blur) - .bind('focus', focus); - cal - .find('span').bind('mousedown', downIncrement).end() - .find('>div.colorpicker_current_color').bind('click', restoreOriginal); - options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector); - options.selectorIndic = options.selector.find('div div'); - options.el = this; - options.hue = cal.find('div.colorpicker_hue div'); - cal.find('div.colorpicker_hue').bind('mousedown', downHue); - options.newColor = cal.find('div.colorpicker_new_color'); - options.currentColor = cal.find('div.colorpicker_current_color'); - cal.data('colorpicker', options); - cal.find('div.colorpicker_submit') - .bind('mouseenter', enterSubmit) - .bind('mouseleave', leaveSubmit) - .bind('click', clickSubmit); - fillRGBFields(options.color, cal.get(0)); - fillHSBFields(options.color, cal.get(0)); - fillHexFields(options.color, cal.get(0)); - setHue(options.color, cal.get(0)); - setSelector(options.color, cal.get(0)); - setCurrentColor(options.color, cal.get(0)); - setNewColor(options.color, cal.get(0)); - if (options.flat) { - cal.css({ - position: 'relative', - display: 'block' - }); - } else { - $(this).bind(options.eventName, show); - } - } - }); - }, - showPicker: function() { - return this.each( function () { - if ($(this).data('colorpickerId')) { - show.apply(this); - } - }); - }, - hidePicker: function() { - return this.each( function () { - if ($(this).data('colorpickerId')) { - $('#' + $(this).data('colorpickerId')).hide(); - } - }); - }, - setColor: function(col) { - if (typeof col == 'string') { - col = HexToHSB(col); - } else if (col.r != undefined && col.g != undefined && col.b != undefined) { - col = RGBToHSB(col); - } else if (col.h != undefined && col.s != undefined && col.b != undefined) { - col = fixHSB(col); - } else { - return this; - } - return this.each(function(){ - if ($(this).data('colorpickerId')) { - var cal = $('#' + $(this).data('colorpickerId')); - cal.data('colorpicker').color = col; - cal.data('colorpicker').origColor = col; - fillRGBFields(col, cal.get(0)); - fillHSBFields(col, cal.get(0)); - fillHexFields(col, cal.get(0)); - setHue(col, cal.get(0)); - setSelector(col, cal.get(0)); - setCurrentColor(col, cal.get(0)); - setNewColor(col, cal.get(0)); - } - }); - } - }; - }(); - $.fn.extend({ - ColorPicker: ColorPicker.init, - ColorPickerHide: ColorPicker.hidePicker, - ColorPickerShow: ColorPicker.showPicker, - ColorPickerSetColor: ColorPicker.setColor - }); -})(jQuery) \ No newline at end of file diff --git a/resources/www/vendors/colorpicker/js/eye.js b/resources/www/vendors/colorpicker/js/eye.js deleted file mode 100644 index ea70e643f2..0000000000 --- a/resources/www/vendors/colorpicker/js/eye.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * - * Zoomimage - * Author: Stefan Petre www.eyecon.ro - * - */ -(function($){ - var EYE = window.EYE = function() { - var _registered = { - init: [] - }; - return { - init: function() { - $.each(_registered.init, function(nr, fn){ - fn.call(); - }); - }, - extend: function(prop) { - for (var i in prop) { - if (prop[i] != undefined) { - this[i] = prop[i]; - } - } - }, - register: function(fn, type) { - if (!_registered[type]) { - _registered[type] = []; - } - _registered[type].push(fn); - } - }; - }(); - $(EYE.init); -})(jQuery); diff --git a/resources/www/vendors/colorpicker/js/layout.js b/resources/www/vendors/colorpicker/js/layout.js deleted file mode 100644 index e0dfb8f332..0000000000 --- a/resources/www/vendors/colorpicker/js/layout.js +++ /dev/null @@ -1,67 +0,0 @@ -(function($){ - var initLayout = function() { - var hash = window.location.hash.replace('#', ''); - var currentTab = $('ul.navigationTabs a') - .bind('click', showTab) - .filter('a[rel=' + hash + ']'); - if (currentTab.size() == 0) { - currentTab = $('ul.navigationTabs a:first'); - } - showTab.apply(currentTab.get(0)); - $('#colorpickerHolder').ColorPicker({flat: true}); - $('#colorpickerHolder2').ColorPicker({ - flat: true, - color: '#00ff00', - onSubmit: function(hsb, hex, rgb) { - $('#colorSelector2 div').css('backgroundColor', '#' + hex); - } - }); - $('#colorpickerHolder2>div').css('position', 'absolute'); - var widt = false; - $('#colorSelector2').bind('click', function() { - $('#colorpickerHolder2').stop().animate({height: widt ? 0 : 173}, 500); - widt = !widt; - }); - $('#colorpickerField1, #colorpickerField2, #colorpickerField3').ColorPicker({ - onSubmit: function(hsb, hex, rgb, el) { - $(el).val(hex); - $(el).ColorPickerHide(); - }, - onBeforeShow: function () { - $(this).ColorPickerSetColor(this.value); - } - }) - .bind('keyup', function(){ - $(this).ColorPickerSetColor(this.value); - }); - $('#colorSelector').ColorPicker({ - color: '#0000ff', - onShow: function (colpkr) { - $(colpkr).fadeIn(500); - return false; - }, - onHide: function (colpkr) { - $(colpkr).fadeOut(500); - return false; - }, - onChange: function (hsb, hex, rgb) { - $('#colorSelector div').css('backgroundColor', '#' + hex); - } - }); - }; - - var showTab = function(e) { - var tabIndex = $('ul.navigationTabs a') - .removeClass('active') - .index(this); - $(this) - .addClass('active') - .blur(); - $('div.tab') - .hide() - .eq(tabIndex) - .show(); - }; - - EYE.register(initLayout, 'init'); -})(jQuery) \ No newline at end of file diff --git a/resources/www/vendors/colorpicker/js/utils.js b/resources/www/vendors/colorpicker/js/utils.js deleted file mode 100644 index cc7ce14ec3..0000000000 --- a/resources/www/vendors/colorpicker/js/utils.js +++ /dev/null @@ -1,252 +0,0 @@ -/** - * - * Utilities - * Author: Stefan Petre www.eyecon.ro - * - */ -(function($) { -EYE.extend({ - getPosition : function(e, forceIt) - { - var x = 0; - var y = 0; - var es = e.style; - var restoreStyles = false; - if (forceIt && jQuery.curCSS(e,'display') == 'none') { - var oldVisibility = es.visibility; - var oldPosition = es.position; - restoreStyles = true; - es.visibility = 'hidden'; - es.display = 'block'; - es.position = 'absolute'; - } - var el = e; - if (el.getBoundingClientRect) { // IE - var box = el.getBoundingClientRect(); - x = box.left + Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) - 2; - y = box.top + Math.max(document.documentElement.scrollTop, document.body.scrollTop) - 2; - } else { - x = el.offsetLeft; - y = el.offsetTop; - el = el.offsetParent; - if (e != el) { - while (el) { - x += el.offsetLeft; - y += el.offsetTop; - el = el.offsetParent; - } - } - if (jQuery.browser.safari && jQuery.curCSS(e, 'position') == 'absolute' ) { - x -= document.body.offsetLeft; - y -= document.body.offsetTop; - } - el = e.parentNode; - while (el && el.tagName.toUpperCase() != 'BODY' && el.tagName.toUpperCase() != 'HTML') - { - if (jQuery.curCSS(el, 'display') != 'inline') { - x -= el.scrollLeft; - y -= el.scrollTop; - } - el = el.parentNode; - } - } - if (restoreStyles == true) { - es.display = 'none'; - es.position = oldPosition; - es.visibility = oldVisibility; - } - return {x:x, y:y}; - }, - getSize : function(e) - { - var w = parseInt(jQuery.curCSS(e,'width'), 10); - var h = parseInt(jQuery.curCSS(e,'height'), 10); - var wb = 0; - var hb = 0; - if (jQuery.curCSS(e, 'display') != 'none') { - wb = e.offsetWidth; - hb = e.offsetHeight; - } else { - var es = e.style; - var oldVisibility = es.visibility; - var oldPosition = es.position; - es.visibility = 'hidden'; - es.display = 'block'; - es.position = 'absolute'; - wb = e.offsetWidth; - hb = e.offsetHeight; - es.display = 'none'; - es.position = oldPosition; - es.visibility = oldVisibility; - } - return {w:w, h:h, wb:wb, hb:hb}; - }, - getClient : function(e) - { - var h, w; - if (e) { - w = e.clientWidth; - h = e.clientHeight; - } else { - var de = document.documentElement; - w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; - h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; - } - return {w:w,h:h}; - }, - getScroll : function (e) - { - var t=0, l=0, w=0, h=0, iw=0, ih=0; - if (e && e.nodeName.toLowerCase() != 'body') { - t = e.scrollTop; - l = e.scrollLeft; - w = e.scrollWidth; - h = e.scrollHeight; - } else { - if (document.documentElement) { - t = document.documentElement.scrollTop; - l = document.documentElement.scrollLeft; - w = document.documentElement.scrollWidth; - h = document.documentElement.scrollHeight; - } else if (document.body) { - t = document.body.scrollTop; - l = document.body.scrollLeft; - w = document.body.scrollWidth; - h = document.body.scrollHeight; - } - if (typeof pageYOffset != 'undefined') { - t = pageYOffset; - l = pageXOffset; - } - iw = self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0; - ih = self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0; - } - return { t: t, l: l, w: w, h: h, iw: iw, ih: ih }; - }, - getMargins : function(e, toInteger) - { - var t = jQuery.curCSS(e,'marginTop') || ''; - var r = jQuery.curCSS(e,'marginRight') || ''; - var b = jQuery.curCSS(e,'marginBottom') || ''; - var l = jQuery.curCSS(e,'marginLeft') || ''; - if (toInteger) - return { - t: parseInt(t, 10)||0, - r: parseInt(r, 10)||0, - b: parseInt(b, 10)||0, - l: parseInt(l, 10) - }; - else - return {t: t, r: r, b: b, l: l}; - }, - getPadding : function(e, toInteger) - { - var t = jQuery.curCSS(e,'paddingTop') || ''; - var r = jQuery.curCSS(e,'paddingRight') || ''; - var b = jQuery.curCSS(e,'paddingBottom') || ''; - var l = jQuery.curCSS(e,'paddingLeft') || ''; - if (toInteger) - return { - t: parseInt(t, 10)||0, - r: parseInt(r, 10)||0, - b: parseInt(b, 10)||0, - l: parseInt(l, 10) - }; - else - return {t: t, r: r, b: b, l: l}; - }, - getBorder : function(e, toInteger) - { - var t = jQuery.curCSS(e,'borderTopWidth') || ''; - var r = jQuery.curCSS(e,'borderRightWidth') || ''; - var b = jQuery.curCSS(e,'borderBottomWidth') || ''; - var l = jQuery.curCSS(e,'borderLeftWidth') || ''; - if (toInteger) - return { - t: parseInt(t, 10)||0, - r: parseInt(r, 10)||0, - b: parseInt(b, 10)||0, - l: parseInt(l, 10)||0 - }; - else - return {t: t, r: r, b: b, l: l}; - }, - traverseDOM : function(nodeEl, func) - { - func(nodeEl); - nodeEl = nodeEl.firstChild; - while(nodeEl){ - EYE.traverseDOM(nodeEl, func); - nodeEl = nodeEl.nextSibling; - } - }, - getInnerWidth : function(el, scroll) { - var offsetW = el.offsetWidth; - return scroll ? Math.max(el.scrollWidth,offsetW) - offsetW + el.clientWidth:el.clientWidth; - }, - getInnerHeight : function(el, scroll) { - var offsetH = el.offsetHeight; - return scroll ? Math.max(el.scrollHeight,offsetH) - offsetH + el.clientHeight:el.clientHeight; - }, - getExtraWidth : function(el) { - if($.boxModel) - return (parseInt($.curCSS(el, 'paddingLeft'))||0) - + (parseInt($.curCSS(el, 'paddingRight'))||0) - + (parseInt($.curCSS(el, 'borderLeftWidth'))||0) - + (parseInt($.curCSS(el, 'borderRightWidth'))||0); - return 0; - }, - getExtraHeight : function(el) { - if($.boxModel) - return (parseInt($.curCSS(el, 'paddingTop'))||0) - + (parseInt($.curCSS(el, 'paddingBottom'))||0) - + (parseInt($.curCSS(el, 'borderTopWidth'))||0) - + (parseInt($.curCSS(el, 'borderBottomWidth'))||0); - return 0; - }, - isChildOf: function(parentEl, el, container) { - if (parentEl == el) { - return true; - } - if (!el || !el.nodeType || el.nodeType != 1) { - return false; - } - if (parentEl.contains && !$.browser.safari) { - return parentEl.contains(el); - } - if ( parentEl.compareDocumentPosition ) { - return !!(parentEl.compareDocumentPosition(el) & 16); - } - var prEl = el.parentNode; - while(prEl && prEl != container) { - if (prEl == parentEl) - return true; - prEl = prEl.parentNode; - } - return false; - }, - centerEl : function(el, axis) - { - var clientScroll = EYE.getScroll(); - var size = EYE.getSize(el); - if (!axis || axis == 'vertically') - $(el).css( - { - top: clientScroll.t + ((Math.min(clientScroll.h,clientScroll.ih) - size.hb)/2) + 'px' - } - ); - if (!axis || axis == 'horizontally') - $(el).css( - { - left: clientScroll.l + ((Math.min(clientScroll.w,clientScroll.iw) - size.wb)/2) + 'px' - } - ); - } -}); -if (!$.easing.easeout) { - $.easing.easeout = function(p, n, firstNum, delta, duration) { - return -delta * ((n=n/duration-1)*n*n*n - 1) + firstNum; - }; -} - -})(jQuery); \ No newline at end of file diff --git a/resources/www/vendors/colorpicker/styles/colorpicker.scss b/resources/www/vendors/colorpicker/styles/colorpicker.scss deleted file mode 100644 index 765d5d1fcf..0000000000 --- a/resources/www/vendors/colorpicker/styles/colorpicker.scss +++ /dev/null @@ -1,162 +0,0 @@ -$colorPickerImagesPath: '/assets/vendors/colorpicker/images/' !default; -.colorpicker { - width: 356px; - height: 176px; - overflow: hidden; - position: absolute; - background: url('#{$colorPickerImagesPath}colorpicker_background.png'); - font-family: Arial, Helvetica, sans-serif; - display: none; -} -.colorpicker_color { - width: 150px; - height: 150px; - left: 14px; - top: 13px; - position: absolute; - background: #f00; - overflow: hidden; - cursor: crosshair; -} -.colorpicker_color div { - position: absolute; - top: 0; - left: 0; - width: 150px; - height: 150px; - background: url('#{$colorPickerImagesPath}colorpicker_overlay.png'); -} -.colorpicker_color div div { - position: absolute; - top: 0; - left: 0; - width: 11px; - height: 11px; - overflow: hidden; - background: url('#{$colorPickerImagesPath}colorpicker_select.gif'); - margin: -5px 0 0 -5px; -} -.colorpicker_hue { - position: absolute; - top: 13px; - left: 171px; - width: 35px; - height: 150px; - cursor: n-resize; -} -.colorpicker_hue div { - position: absolute; - width: 35px; - height: 9px; - overflow: hidden; - background: url('#{$colorPickerImagesPath}colorpicker_indic.gif') left top; - margin: -4px 0 0 0; - left: 0px; -} -.colorpicker_new_color { - position: absolute; - width: 60px; - height: 30px; - left: 213px; - top: 13px; - background: #f00; -} -.colorpicker_current_color { - position: absolute; - width: 60px; - height: 30px; - left: 283px; - top: 13px; - background: #f00; -} -.colorpicker input { - background-color: transparent; - border: 1px solid transparent; - position: absolute; - font-size: 10px; - font-family: Arial, Helvetica, sans-serif; - color: #898989; - top: 4px; - right: 11px; - text-align: right; - margin: 0; - padding: 0; - height: 11px; -} -.colorpicker_hex { - position: absolute; - width: 72px; - height: 22px; - background: url('#{$colorPickerImagesPath}colorpicker_hex.png') top; - left: 212px; - top: 142px; -} -.colorpicker_hex input { - right: 6px; -} -.colorpicker_field { - height: 22px; - width: 62px; - background-position: top; - position: absolute; -} -.colorpicker_field span { - position: absolute; - width: 12px; - height: 22px; - overflow: hidden; - top: 0; - right: 0; - cursor: n-resize; -} -.colorpicker_rgb_r { - background-image: url('#{$colorPickerImagesPath}colorpicker_rgb_r.png'); - top: 52px; - left: 212px; -} -.colorpicker_rgb_g { - background-image: url('#{$colorPickerImagesPath}colorpicker_rgb_g.png'); - top: 82px; - left: 212px; -} -.colorpicker_rgb_b { - background-image: url('#{$colorPickerImagesPath}colorpicker_rgb_b.png'); - top: 112px; - left: 212px; -} -.colorpicker_hsb_h { - background-image: url('#{$colorPickerImagesPath}colorpicker_hsb_h.png'); - top: 52px; - left: 282px; -} -.colorpicker_hsb_s { - background-image: url('#{$colorPickerImagesPath}colorpicker_hsb_s.png'); - top: 82px; - left: 282px; -} -.colorpicker_hsb_b { - background-image: url('#{$colorPickerImagesPath}colorpicker_hsb_b.png'); - top: 112px; - left: 282px; -} -.colorpicker_submit { - position: absolute; - width: 22px; - height: 22px; - background: url('#{$colorPickerImagesPath}colorpicker_submit.png') top; - left: 322px; - top: 142px; - overflow: hidden; -} -.colorpicker_focus { - background-position: center; -} -.colorpicker_hex.colorpicker_focus { - background-position: bottom; -} -.colorpicker_submit.colorpicker_focus { - background-position: bottom; -} -.colorpicker_slider { - background-position: bottom; -} diff --git a/resources/www/vendors/jquery-image-enhancer/js/jquery.image_enhancer.js b/resources/www/vendors/jquery-image-enhancer/js/jquery.image_enhancer.js deleted file mode 100644 index e2710cff21..0000000000 --- a/resources/www/vendors/jquery-image-enhancer/js/jquery.image_enhancer.js +++ /dev/null @@ -1,236 +0,0 @@ -/* -(function ($) { - - var methods = { - init: function (options) { - var settings = { - 'zoomable': false, - 'display_full_screen': false - }; - return this.each(function () { - - var $this = $(this), data = $(this).data('image_enhance'); - - if (!data) { - if (options) { - $.extend(settings, options); - } - - var wrapper = $('.thumb_wrapper', $(this)); - var $image = $('img', $this); - - wrapper.css('position', 'relative'); - - reset_position($this); - - if (settings.display_full_screen) { - $image.parent() - .append(''); - - var $titlebar = $('.image_enhance_titlebar', $this); - - $('.image_enhance_title_bg', $titlebar).css('opacity', 0.5); - - $image.parent() - .bind('mouseover.image_enhance', function () { - $titlebar.stop().show().animate({ - 'height': 28 - }, 150); - }) - .bind('mouseout.image_enhance', function () { - $titlebar.stop().animate({ - 'height': 0 - }, 150, function () { - $titlebar.hide() - }); - }); - - $('.image_enhance_titlebar .full', wrapper).bind('click.image_enhance', function () { - $('body').append('
          \n\ - \n\ -
          close
          \n\ - \n\ -
          '); - - var $theatre = $('.image_enhance_theatre'); - var $theatre_img = $('img', $theatre); - $(window).bind('resize.image_enhance dblclick.image_enhance', function (event) { - - if (event.type == 'dblclick') { - $theatre_img.removeClass('zoomed'); - } - else { - if ($theatre_img.hasClass('zoomed')) - return; - } - var datas = calculate_sizes($(this).width(), $(this).height(), image_width, image_height, 80); - - $theatre_img.width(datas.width).height(datas.height).css('top', datas.top).css('left', datas.left); - }) - $(window).trigger('resize.image_enhance'); - $('.closer', $theatre).bind('click.image_enhance', function () { - $theatre.remove(); - }); - - if (typeof $theatre.disableSelection !== 'function' && window.console) - console.error('enhanced image require jquery UI\'s disableSelection'); - $('img', $theatre).disableSelection(); - }); - } - - - if (settings.zoomable) { - if (typeof $image.draggable !== 'function' && window.console) - console.error('zoomable require jquery UI\'s draggable'); - - if ($image.attr('ondragstart')) { - $image.removeAttr('ondragstart'); - } - $image.draggable(); - $image.css({ - 'max-width': 'none', - 'max-height': 'none' - }); - - var image_width = parseInt($('input[name="width"]', $this).val()); - var image_height = parseInt($('input[name="height"]', $this).val()); - var ratio = image_width / image_height; - - $this.bind('mousewheel',function (event, delta) { - $image.addClass('zoomed'); - if (delta > 0) { - event.stopPropagation(); - zoomPreview(true, ratio, $image, $(this)); - } - else { - event.stopPropagation(); - zoomPreview(false, ratio, $image, $(this)); - } - return false; - }).bind('dblclick', function (event) { - reset_position($this); - }); - } - - $(this).data('image_enhance', { - width: image_width, - height: image_height - }); - } - - }); - }, - destroy: function () { - return this.each(function () { - $(this).data('image_enhance', null); - $('.image_enhance_titlebar, .image_enhance_theatre', this).remove(); - }); - } - }; - - function zoomPreview(bool, ratio, $img, $container) { - if ($img.length === 0) - return; - - var t1 = parseInt($img.css('top')); - var l1 = parseInt($img.css('left')); - var w1 = $img.width(); - var h1 = $img.height(); - - var w2, t2; - - if (bool) { - if ((w1 * 1.08) < 32767) { - w2 = w1 * 1.08; - } else { - w2 = w1; - } - } - else { - if ((w1 / 1.08) > 20) { - w2 = w1 / 1.08; - } else { - w2 = w1; - } - } - - var datas = $(this).data('image_enhance'); - - h2 = Math.round(w2 / ratio); - w2 = Math.round(w2); - - t2 = Math.round(t1 - (h2 - h1) / 2) + 'px'; - var l2 = Math.round(l1 - (w2 - w1) / 2) + 'px'; - - var wPreview = $container.width() / 2; - var hPreview = $container.height() / 2; - - var nt = Math.round((h2 / h1) * (t1 - hPreview) + hPreview); - var nl = Math.round(((w2 / w1) * (l1 - wPreview)) + wPreview); - - $img.css({ - left: nl, - top: nt - }).width(w2).height(h2); - } - - function calculate_sizes(window_width, window_height, image_width, image_height, border) { - if (typeof border !== 'number') - border = 0; - - var width, height; - var ratio_display = window_width / window_height; - var ratio_image = image_width / image_height; - - if (ratio_image > ratio_display) { - width = window_width - border; - height = Math.round(width / ratio_image); - } - else { - height = window_height - border; - width = Math.round(height * ratio_image); - } - - var top = Math.round((window_height - height) / 2); - var left = Math.round((window_width - width ) / 2); - - return { - top: top, - left: left, - width: width, - height: height - }; - } - - function reset_position($this) { - var display_width = $this.width(); - var display_height = $this.height(); - var image_width = parseInt($('input[name="width"]', $this).val()); - var image_height = parseInt($('input[name="height"]', $this).val()); - - var datas = calculate_sizes(display_width, display_height, image_width, image_height); - var $image = $('img', $this); - - var top = Math.round((display_height - datas.height) / 2) + 'px'; - var left = Math.round((display_width - datas.width) / 2) + 'px'; - - $image.width(datas.width).height(datas.height).css({top: top, left: left}); - return; - } - - $.fn.image_enhance = function (method) { - - if (methods[method]) { - return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); - } else if (typeof method === 'object' || !method) { - return methods.init.apply(this, arguments); - } else { - $.error('Method ' + method + ' does not exist on jQuery.image_enhance'); - } - - - }; -})(jQuery); -*/ diff --git a/resources/www/vendors/jquery-image-enhancer/styles/jquery.image_enhancer.scss b/resources/www/vendors/jquery-image-enhancer/styles/jquery.image_enhancer.scss deleted file mode 100644 index 89c08c3cbf..0000000000 --- a/resources/www/vendors/jquery-image-enhancer/styles/jquery.image_enhancer.scss +++ /dev/null @@ -1,53 +0,0 @@ - -.image_enhance_titlebar { - width: 100%; - position: absolute; - top: 0; - height: 0; -} - -.image_enhance_title_options, -.image_enhance_title_bg { - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; - z-index: 800; - background-color: black; -} - -.image_enhance_title_options { - background-color: transparent; - z-index: 900; -} - -.image_enhance_theatre { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: black; - z-index: 8000 -} - -.image_enhance_theatre_closer_wrapper { - position: absolute; - top: 10px; - right: 10px; - z-index: 8200; -} - -.image_enhance_theatre img { - position: absolute; - top: 0; - left: 0; - z-index: 8100; -} - -.image_enhance_title_options span { - margin: 2px 5px; - float: right; - cursor: pointer; -} \ No newline at end of file diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 287186e706..2853e064eb 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -66,13 +66,9 @@ {% endblock %} {% block stylesheet %} - + {% if not app.debug %}{% endif %} - {% endblock %} {% block javascript %} + {% include "common/templates.html.twig" %} {% endblock %} @@ -586,10 +574,11 @@

        {{ 'Theme' | trans }}

        - {% for color, file in css %} +
        + {#{% for color, file in css %}
         
        - {% endfor %} + {% endfor %}#}
        @@ -781,21 +770,5 @@ - - - - {% endblock %} From 885edae1f2e1419d60ddf3e304ea816206c231c2 Mon Sep 17 00:00:00 2001 From: Florian BLOUET Date: Tue, 10 May 2016 17:32:33 +0200 Subject: [PATCH 307/383] add npm watch command, fix css link --- templates/web/prod/index.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 74fa79572f..90b4fd82d9 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -66,7 +66,7 @@ {% endblock %} {% block stylesheet %} - {% if not app.debug %}{% endif %} +