From 5721aae8c85ba63497f7a94335c44128b62f7004 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 28 May 2014 16:14:46 +0200 Subject: [PATCH 01/34] Fix PHRAS-134 Reportage is selected as wall in edit mode --- templates/web/prod/actions/edit_default.html.twig | 2 +- www/skins/prod/000000/prodcolor.css | 1 - www/skins/prod/959595/prodcolor.css | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/templates/web/prod/actions/edit_default.html.twig b/templates/web/prod/actions/edit_default.html.twig index 6eb2b714ba..3bd1794632 100644 --- a/templates/web/prod/actions/edit_default.html.twig +++ b/templates/web/prod/actions/edit_default.html.twig @@ -31,7 +31,7 @@ {% set class_status = '' %} {% endif %} -
+
{{ record.get_original_name() }}
diff --git a/www/skins/prod/000000/prodcolor.css b/www/skins/prod/000000/prodcolor.css index f472f948f3..f54b6b8eb8 100644 --- a/www/skins/prod/000000/prodcolor.css +++ b/www/skins/prod/000000/prodcolor.css @@ -2200,7 +2200,6 @@ DIV.thesaurus U.w { } .GRP_IMAGE_REP { - background-color: #B1B1B1; margin: 5px; padding: 5px; position: absolute; diff --git a/www/skins/prod/959595/prodcolor.css b/www/skins/prod/959595/prodcolor.css index 00c35bf4fc..94aa87bb55 100644 --- a/www/skins/prod/959595/prodcolor.css +++ b/www/skins/prod/959595/prodcolor.css @@ -2244,7 +2244,6 @@ DIV.thesaurus U.w { } .GRP_IMAGE_REP { - background-color: #B1B1B1; margin: 5px; padding: 5px; position: absolute; From 093d4f2cd1ae973f2da2f2403da0db002a0e6a2e Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 28 May 2014 16:33:03 +0200 Subject: [PATCH 02/34] Fix PHRAS-133 acknowledgment of receipt is not setted --- lib/Alchemy/Phrasea/Controller/Prod/Export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Export.php b/lib/Alchemy/Phrasea/Controller/Prod/Export.php index c8528d4977..296db31c6c 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Export.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Export.php @@ -297,7 +297,7 @@ public function exportMail(Application $app, Request $request) $mail->setButtonUrl($url); $mail->setExpiration($endDateObject); - $app['notification.deliverer']->deliver($mail); + $app['notification.deliverer']->deliver($mail, !!$request->request->get('reading_confirm', false)); unset($remaingEmails[$key]); } From 94fc8c4c0390b1eca293ff8d8173b378d5910e7e Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 28 May 2014 17:59:58 +0200 Subject: [PATCH 03/34] Fix PHRAS-130 autofill admin password in setup panel --- templates/web/admin/setup.html.twig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/web/admin/setup.html.twig b/templates/web/admin/setup.html.twig index 17a1d93564..9ae65cc4aa 100644 --- a/templates/web/admin/setup.html.twig +++ b/templates/web/admin/setup.html.twig @@ -35,7 +35,7 @@
-
+ {% for section in GV %}
{{ section['section'] }} @@ -63,7 +63,10 @@ {% elseif value['type'] == 'string' %}
{% elseif value['type'] == 'password' %} -
+
+ {# input type=password is double because of chrome and autofill issue see http://stackoverflow.com/questions/10938891/disable-autofill-in-chrome-without-disabling-autocomplete #} + + {% elseif value['type'] == 'text' %}
{% elseif value['type'] == 'enum' %} From 274192ae7193457c7a957a28b82dc30dd549580c Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 28 May 2014 19:28:35 +0200 Subject: [PATCH 04/34] Fix PHRAS-128 register fields mapping issue --- .../Phrasea/Core/Provider/RegistrationServiceProvider.php | 6 +++--- www/skins/login/less/skin.less | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Alchemy/Phrasea/Core/Provider/RegistrationServiceProvider.php b/lib/Alchemy/Phrasea/Core/Provider/RegistrationServiceProvider.php index a9abce7441..675e35ba17 100644 --- a/lib/Alchemy/Phrasea/Core/Provider/RegistrationServiceProvider.php +++ b/lib/Alchemy/Phrasea/Core/Provider/RegistrationServiceProvider.php @@ -77,7 +77,7 @@ public function register(Application $app) ), 'address' => array( 'label' => _('admin::compte-utilisateur adresse'), - 'type' => 'textarea', + 'type' => 'text', 'constraints' => array( new Assert\NotBlank(), ) @@ -96,7 +96,7 @@ public function register(Application $app) new Assert\NotBlank(), ) ), - 'position' => array( + 'job' => array( 'label' => _('admin::compte-utilisateur poste'), 'type' => 'text', 'constraints' => array( @@ -110,7 +110,7 @@ public function register(Application $app) new Assert\NotBlank(), ) ), - 'job' => array( + 'position' => array( 'label' => _('admin::compte-utilisateur activite'), 'type' => 'text', 'constraints' => array( diff --git a/www/skins/login/less/skin.less b/www/skins/login/less/skin.less index fd32830027..aeaaaa80b8 100644 --- a/www/skins/login/less/skin.less +++ b/www/skins/login/less/skin.less @@ -514,7 +514,7 @@ button[type=submit] { box-radius: @inputBorderRadius !important; } -.input-table input { +.input-table input, .input-table select, .input-table textarea { border: @inputBorder !important; background-color: @inputBackground !important; color: @textColor !important; From fc2e22c45a73e1b808e4d5f141f637529cf06e65 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 28 May 2014 19:38:08 +0200 Subject: [PATCH 05/34] Fix PHRAS-108 title is truncated if too long lets add a tooltip --- templates/web/prod/preview/appears_in.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/web/prod/preview/appears_in.html.twig b/templates/web/prod/preview/appears_in.html.twig index 21a4f63091..8a9d5b8f49 100644 --- a/templates/web/prod/preview/appears_in.html.twig +++ b/templates/web/prod/preview/appears_in.html.twig @@ -6,7 +6,7 @@
  • - {{ par.get_title() }} + {{ par.get_title() }}
  • {% endfor %} From 2dc08a53290eda5a66465644b2b021e1521000f4 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 23 Jul 2014 15:00:21 +0200 Subject: [PATCH 06/34] PHRAS-212 #fix oauth authorisaton confimation --- lib/Alchemy/Phrasea/Controller/Api/Oauth2.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Api/Oauth2.php b/lib/Alchemy/Phrasea/Controller/Api/Oauth2.php index fbcfec1cdb..982b1e8513 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/Oauth2.php +++ b/lib/Alchemy/Phrasea/Controller/Api/Oauth2.php @@ -90,9 +90,9 @@ public function connect(Application $app) } $app['authentication']->openAccount(\User_Adapter::getInstance($usr_id, $app)); + } else { + return new Response($app['twig']->render($template, array("auth" => $oauth2_adapter))); } - - return new Response($app['twig']->render($template, array("auth" => $oauth2_adapter))); } //check if current client is already authorized by current user From 94e502c12b3f99f509e4d8024a8c18fdca889f3b Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 23 Jul 2014 15:31:41 +0200 Subject: [PATCH 07/34] PHRAS-211 #fix status not applied --- templates/web/client/answers.html.twig | 2 +- templates/web/prod/results/record.html.twig | 2 +- templates/web/prod/upload/upload.html.twig | 16 +++++++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/templates/web/client/answers.html.twig b/templates/web/client/answers.html.twig index 06cf2cf43d..a6cfb771d8 100644 --- a/templates/web/client/answers.html.twig +++ b/templates/web/client/answers.html.twig @@ -144,7 +144,7 @@ {% else %} {% endif %} -
    +
    {{ record.get_title() }}
    {{ record.get_status_icons()|raw }}
    diff --git a/templates/web/prod/results/record.html.twig b/templates/web/prod/results/record.html.twig index 352f68f294..f2c96a2175 100644 --- a/templates/web/prod/results/record.html.twig +++ b/templates/web/prod/results/record.html.twig @@ -21,7 +21,7 @@ onDblClick="openPreview('RESULT',{{record.get_number}});"> {% endif %}
    -
    +
    {{ record.get_title() }}
    diff --git a/templates/web/prod/upload/upload.html.twig b/templates/web/prod/upload/upload.html.twig index f40b31bf09..5c153c36b2 100644 --- a/templates/web/prod/upload/upload.html.twig +++ b/templates/web/prod/upload/upload.html.twig @@ -394,13 +394,19 @@ $(document).ready(function () { //on submit file $('#fileupload', UploaderManager.getContainer()).bind('fileuploadsubmit', function (e, data) { var $this = $(this); + var params = []; + data.formData = []; //get form datas attached to the file - data.formData = $.extend( - data.context.find('input, select').serializeArray(), - $("input", $('.collection-status:visible', UploaderManager.getSettingsBox())).serializeArray(), - $("select", UploaderManager.getSettingsBox()).serializeArray() - ); + params.push(data.context.find('input, select').serializeArray()); + params.push($("input", $('.collection-status:visible', UploaderManager.getSettingsBox())).serializeArray()); + params.push($("select", UploaderManager.getSettingsBox()).serializeArray()); + + $.each(params, function(i, p) { + $.each(p, function (i, f){ + data.formData.push(f); + }); + }); data.formData.push({ "name": "b64_image", From 73ebd220a88e117c3777481674cd2894c055dbe9 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 23 Jul 2014 16:01:59 +0200 Subject: [PATCH 08/34] PHRAS-204 #fix cache icon status --- lib/classes/databox/status.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/classes/databox/status.php b/lib/classes/databox/status.php index 8dc5da54d6..b51328a3e3 100644 --- a/lib/classes/databox/status.php +++ b/lib/classes/databox/status.php @@ -110,11 +110,11 @@ private function __construct(Application $app, $sbas_id) $this->status[$bit]["img_on"] = null; if (is_file($path . "-stat_" . $bit . "_0.gif")) { - $this->status[$bit]["img_off"] = $url . "-stat_" . $bit . "_0.gif"; + $this->status[$bit]["img_off"] = $url . "-stat_" . $bit . "_0.gif?etag=".md5_file($path . "-stat_" . $bit . "_0.gif"); $this->status[$bit]["path_off"] = $path . "-stat_" . $bit . "_0.gif"; } if (is_file($path . "-stat_" . $bit . "_1.gif")) { - $this->status[$bit]["img_on"] = $url . "-stat_" . $bit . "_1.gif"; + $this->status[$bit]["img_on"] = $url . "-stat_" . $bit . "_1.gif?etag=".md5_file($path . "-stat_" . $bit . "_1.gif"); $this->status[$bit]["path_on"] = $path . "-stat_" . $bit . "_1.gif"; } From c8c10f2776417127e86f9cd62d6e99d73a54cfbb Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 23 Jul 2014 16:32:14 +0200 Subject: [PATCH 09/34] PHRAS-205 #fix validation reorder --- lib/Alchemy/Phrasea/Controller/Prod/Basket.php | 8 ++++++++ www/skins/prod/jquery.WorkZone.js | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Basket.php b/lib/Alchemy/Phrasea/Controller/Prod/Basket.php index 89b1660637..986c98584e 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Basket.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Basket.php @@ -234,14 +234,22 @@ public function removeBasketElement(Application $app, Request $request, $basket_ { $basket = $app['EM']->getRepository('\Entities\Basket') ->findUserBasket($app, $basket_id, $app['authentication']->getUser(), true); + $basketElement = $app['EM']->getRepository('\Entities\BasketElement') + ->find($basket_element_id); + $ord = $basketElement->getOrd(); foreach ($basket->getElements() as $basket_element) { + if ($basket_element->getOrd() > $ord) { + $basket_element->setOrd($basket_element->getOrd() - 1); + } /* @var $basket_element \Entities\BasketElement */ if ($basket_element->getId() == $basket_element_id) { + $basket->removeElement($basket_element); $app['EM']->remove($basket_element); } } + $app['EM']->persist($basket); $app['EM']->flush(); $data = array( diff --git a/www/skins/prod/jquery.WorkZone.js b/www/skins/prod/jquery.WorkZone.js index 63a137dee9..810d1886d4 100644 --- a/www/skins/prod/jquery.WorkZone.js +++ b/www/skins/prod/jquery.WorkZone.js @@ -155,6 +155,8 @@ var p4 = p4 || {}; } selectedItem.remove(); + } else { + return p4.WorkZone.reloadCurrent(); } } else { humane.error(data.message); @@ -308,8 +310,8 @@ var p4 = p4 || {}; $('a.WorkZoneElementRemover', dest).bind('mousedown',function (event) { return false; }).bind('click', function (event) { - return WorkZoneElementRemover($(this), false); - }); + return WorkZoneElementRemover($(this), false); + }); dest.droppable({ accept: function (elem) { From 12ae2c824543f857e07d5fde4893f63685b79441 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 23 Jul 2014 19:21:13 +0200 Subject: [PATCH 10/34] PHRAS-187 #fix push name validation --- www/skins/prod/jquery.Feedback.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/www/skins/prod/jquery.Feedback.js b/www/skins/prod/jquery.Feedback.js index 6268170163..96a142fc18 100644 --- a/www/skins/prod/jquery.Feedback.js +++ b/www/skins/prod/jquery.Feedback.js @@ -149,13 +149,13 @@ buttons[language.send] = function () { if ($.trim($('input[name="name"]', $dialog.getDomElement()).val()) === '') { - options = { + var options = { size: 'Alert', closeButton: true, title: language.warning - }, - $dialog = p4.Dialog.Create(options, 3); - $dialog.setContent(language.FeedBackNameMandatory); + } + var $dialogAlert = p4.Dialog.Create(options, 3); + $dialogAlert.setContent(language.FeedBackNameMandatory); return false; } From 8de09ac15a55babac1dce84ce5e2db4ea2555059 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 23 Jul 2014 19:21:33 +0200 Subject: [PATCH 11/34] PHRAS-96 PHRAS-81 #fix oauth authentication connection msg --- lib/Alchemy/Phrasea/Controller/Api/Oauth2.php | 16 +++++++--------- .../api/auth/end_user_authorization.html.twig | 5 +++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Api/Oauth2.php b/lib/Alchemy/Phrasea/Controller/Api/Oauth2.php index 982b1e8513..4d80b28015 100644 --- a/lib/Alchemy/Phrasea/Controller/Api/Oauth2.php +++ b/lib/Alchemy/Phrasea/Controller/Api/Oauth2.php @@ -49,7 +49,7 @@ public function connect(Application $app) $params = $oauth2_adapter->getAuthorizationRequestParameters($request); $app_authorized = false; - $errorMessage = false; + $error = $request->get('error', ''); $client = \API_OAuth2_Application::load_from_client_id($app, $params['client_id']); @@ -79,26 +79,24 @@ public function connect(Application $app) $usr_id = $app['auth.native']->getUsrId($request->get("login"), $request->get("password"), $request); if (null === $usr_id) { - $app['session']->getFlashBag()->set('error', _('login::erreur: Erreur d\'authentification')); - return $app->redirectPath('oauth2_authorize'); + return $app->redirectPath('oauth2_authorize', array_merge(array('error' => 'login'), $params)); } } catch (RequireCaptchaException $e) { - return $app->redirectPath('oauth2_authorize', array('error' => 'captcha')); + return $app->redirectPath('oauth2_authorize', array_merge(array('error' => 'captcha'), $params)); } catch (AccountLockedException $e) { - return $app->redirectPath('oauth2_authorize', array('error' => 'account-locked')); + return $app->redirectPath('oauth2_authorize', array_merge(array('error' => 'account-locked'), $params)); } $app['authentication']->openAccount(\User_Adapter::getInstance($usr_id, $app)); } else { - return new Response($app['twig']->render($template, array("auth" => $oauth2_adapter))); + return new Response($app['twig']->render($template, array('error' => $error, "auth" => $oauth2_adapter))); } } //check if current client is already authorized by current user $user_auth_clients = \API_OAuth2_Application::load_authorized_app_by_user( - $app - , $app['authentication']->getUser() + $app, $app['authentication']->getUser() ); foreach ($user_auth_clients as $auth_client) { @@ -114,7 +112,7 @@ public function connect(Application $app) if (!$app_authorized && $action_accept === null) { $params = array( "auth" => $oauth2_adapter, - "errorMessage" => $errorMessage, + "error" => $error, ); return new Response($app['twig']->render($template, $params)); diff --git a/templates/web/api/auth/end_user_authorization.html.twig b/templates/web/api/auth/end_user_authorization.html.twig index dd45fb90ef..0b47e45810 100644 --- a/templates/web/api/auth/end_user_authorization.html.twig +++ b/templates/web/api/auth/end_user_authorization.html.twig @@ -39,8 +39,9 @@ {% for key,value in auth.getParams %} {% endfor %} - {% if errorMessage is defined %} - + {% if error == 'login' %} +
    +

    {% trans 'Erreur de login / mot de passe' %}

    {% endif %}
    {% endif %} diff --git a/www/skins/prod/jquery.Feedback.js b/www/skins/prod/jquery.Feedback.js index 96a142fc18..055a27ea8c 100644 --- a/www/skins/prod/jquery.Feedback.js +++ b/www/skins/prod/jquery.Feedback.js @@ -514,7 +514,7 @@ var options = { cancelButton: true, buttons: buttons, - size: 'Alert' + size: '700x170' }; p4.Dialog.Create(options, 2).setContent(box); @@ -626,7 +626,7 @@ $('button.deleter', $container).bind('click', function (event) { - var list_id = $(this).find('input[name=list_id]').val(); + var list_id = $(this).data("list-id"); var makeDialog = function (box) { From ba9ff5d807c91c353e8ed82cf376501c51eb851c Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Fri, 25 Jul 2014 16:59:26 +0200 Subject: [PATCH 13/34] PHRAS-197 #fix add possibility to override cache namespace --- lib/Alchemy/Phrasea/Cache/Manager.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/Cache/Manager.php b/lib/Alchemy/Phrasea/Cache/Manager.php index 4f97c3f4c2..462cb9ebb8 100644 --- a/lib/Alchemy/Phrasea/Cache/Manager.php +++ b/lib/Alchemy/Phrasea/Cache/Manager.php @@ -79,7 +79,11 @@ public function factory($label, $name, $options) $cache = $this->factory->create('array', array()); } - $cache->setNamespace(md5(gethostname().'-'.__DIR__)); + if (isset($options['namespace']) && is_string($options['namespace'])) { + $cache->setNamespace($options['namespace']); + } else { + $cache->setNamespace(md5(gethostname().'-'.__DIR__)); + } $this->drivers[$label] = $cache; From 76cb4fad283862cbd420633fd56526b2e1a16c7d Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Fri, 25 Jul 2014 18:40:00 +0200 Subject: [PATCH 14/34] PHRAS-198 #fix add possibility to disable taskmanager per instance --- .../Phrasea/Controller/Admin/TaskManager.php | 10 ++++++++++ lib/classes/API/V1/adapter.php | 10 +++++++--- lib/classes/module/console/schedulerStart.php | 4 ++++ lib/classes/module/console/schedulerState.php | 5 +++++ lib/classes/module/console/schedulerStop.php | 5 +++++ lib/classes/module/console/taskrun.php | 4 ++++ lib/conf.d/_GV_template.inc | 13 +++++++++++++ templates/web/admin/tasks/list.html.twig | 12 ++++++++---- 8 files changed, 56 insertions(+), 7 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php b/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php index 3fffafd476..dc02751603 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php @@ -11,6 +11,7 @@ namespace Alchemy\Phrasea\Controller\Admin; +use Alchemy\Phrasea\Exception\RuntimeException; use Alchemy\Phrasea\Exception\XMLParseErrorException; use Silex\Application; use Silex\ControllerProviderInterface; @@ -71,6 +72,11 @@ public function connect(Application $app) * route /admin/scheduler/stop */ $controllers->get('/scheduler/stop', function (Application $app, Request $request) use ($app) { + + if ($app['phraseanet.registry"].get("GV_disable_task_manager']) { + throw new RuntimeException('The use of the task manager is disabled on this instance.'); + } + try { $app['task-manager']->setSchedulerState(\task_manager::STATE_TOSTOP); @@ -341,6 +347,10 @@ public function connect(Application $app) public function startScheduler(Application $app, Request $request) { + if ($app['phraseanet.registry"].get("GV_disable_task_manager']) { + throw new RuntimeException('The use of the task manager is disabled on this instance.'); + } + $app['session']->save(); set_time_limit(0); ignore_user_abort(true); diff --git a/lib/classes/API/V1/adapter.php b/lib/classes/API/V1/adapter.php index f9de385128..787c62b1bb 100644 --- a/lib/classes/API/V1/adapter.php +++ b/lib/classes/API/V1/adapter.php @@ -107,14 +107,18 @@ public function get_scheduler(Application $app) { $result = new \API_V1_result($app, $app['request'], $this); - $taskManager = $app['task-manager']; - $ret = $taskManager->getSchedulerState(); + if ($app['phraseanet.registry"].get("GV_disable_task_manager']) { + $ret = array('state' => 'disabled'); + } else { + $taskManager = $app['task-manager']; + $ret = $taskManager->getSchedulerState(); + } $ret['state'] = $ret['status']; unset($ret['qdelay'], $ret['status']); - if (null !== $ret['updated_on']) { + if (isset($ret['updated_on']) && null !== $ret['updated_on']) { $ret['updated_on'] = $ret['updated_on']->format(DATE_ATOM); } diff --git a/lib/classes/module/console/schedulerStart.php b/lib/classes/module/console/schedulerStart.php index 8f1c342f72..476ae1417d 100644 --- a/lib/classes/module/console/schedulerStart.php +++ b/lib/classes/module/console/schedulerStart.php @@ -17,6 +17,7 @@ */ use Alchemy\Phrasea\Command\Command; +use Alchemy\Phrasea\Exception\RuntimeException; use Monolog\Handler; use Monolog\Logger; use Symfony\Component\Console\Input\InputInterface; @@ -36,6 +37,9 @@ public function __construct($name = null) protected function doExecute(InputInterface $input, OutputInterface $output) { + if ($this->container['phraseanet.registry"].get("GV_disable_task_manager']) { + throw new RuntimeException('The use of the task manager is disabled on this instance.'); + } $logger = $this->container['task-manager.logger']; $streamHandler = new Handler\StreamHandler('php://stdout', $input->getOption('verbose') ? Logger::DEBUG : Logger::WARNING); diff --git a/lib/classes/module/console/schedulerState.php b/lib/classes/module/console/schedulerState.php index 4c5084fdb9..07641698dc 100644 --- a/lib/classes/module/console/schedulerState.php +++ b/lib/classes/module/console/schedulerState.php @@ -16,6 +16,7 @@ * @link www.phraseanet.com */ use Alchemy\Phrasea\Command\Command; +use Alchemy\Phrasea\Exception\RuntimeException; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -55,6 +56,10 @@ protected function doExecute(InputInterface $input, OutputInterface $output) return self::EXITCODE_SETUP_ERROR; } + if ($this->container['phraseanet.registry"].get("GV_disable_task_manager']) { + throw new RuntimeException('The use of the task manager is disabled on this instance.'); + } + $task_manager = $this->container['task-manager']; $exitCode = 0; diff --git a/lib/classes/module/console/schedulerStop.php b/lib/classes/module/console/schedulerStop.php index f64d689796..e638bd1447 100644 --- a/lib/classes/module/console/schedulerStop.php +++ b/lib/classes/module/console/schedulerStop.php @@ -16,6 +16,7 @@ * @link www.phraseanet.com */ use Alchemy\Phrasea\Command\Command; +use Alchemy\Phrasea\Exception\RuntimeException; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -33,6 +34,10 @@ public function __construct($name = null) protected function doExecute(InputInterface $input, OutputInterface $output) { + if ($this->container['phraseanet.registry"].get("GV_disable_task_manager']) { + throw new RuntimeException('The use of the task manager is disabled on this instance.'); + } + try { $task_manager = $this->container['task-manager']; $task_manager->setSchedulerState(task_manager::STATE_TOSTOP); diff --git a/lib/classes/module/console/taskrun.php b/lib/classes/module/console/taskrun.php index 85a2d040c3..0634c41aad 100644 --- a/lib/classes/module/console/taskrun.php +++ b/lib/classes/module/console/taskrun.php @@ -73,6 +73,10 @@ protected function doExecute(InputInterface $input, OutputInterface $output) return self::EXITCODE_SETUP_ERROR; } + if ($this->container['phraseanet.registry"].get("GV_disable_task_manager']) { + throw new RuntimeException('The use of the task manager is disabled on this instance.'); + } + $task_id = (int) $input->getArgument('task_id'); if ($task_id <= 0 || strlen($task_id) !== strlen($input->getArgument('task_id'))) { throw new \RuntimeException('Argument must be an Id.'); diff --git a/lib/conf.d/_GV_template.inc b/lib/conf.d/_GV_template.inc index d79333077f..40fd3c27b3 100644 --- a/lib/conf.d/_GV_template.inc +++ b/lib/conf.d/_GV_template.inc @@ -341,6 +341,19 @@ return call_user_func_array(function(Application $app) { 'required' => true ) ) + ), array( + 'section' => _('Task manager'), + 'rolled' => true, + 'vars' => array( + array( + 'type' => \registry::TYPE_BOOLEAN, + 'name' => 'GV_disable_task_manager', + 'comment' => _('Disable task manager'), + 'help' => '', + 'default' => false, + 'required' => true + ) + ) ), array( 'section' => _('Search engine'), 'rolled' => true, diff --git a/templates/web/admin/tasks/list.html.twig b/templates/web/admin/tasks/list.html.twig index caccdbe61c..6af3525cf2 100644 --- a/templates/web/admin/tasks/list.html.twig +++ b/templates/web/admin/tasks/list.html.twig @@ -33,8 +33,10 @@ @@ -55,8 +57,10 @@ From c752141ff25bc46609a235aff158882ee9821030 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Mon, 28 Jul 2014 11:59:21 +0200 Subject: [PATCH 15/34] Use configurtion file instead of GV --- config/configuration.sample.yml | 1 + .../Phrasea/Controller/Admin/TaskManager.php | 4 ++-- lib/classes/API/V1/adapter.php | 2 +- lib/classes/module/console/schedulerStart.php | 2 +- lib/classes/module/console/schedulerState.php | 2 +- lib/classes/module/console/schedulerStop.php | 2 +- lib/classes/module/console/taskrun.php | 2 +- lib/conf.d/_GV_template.inc | 13 ------------- lib/conf.d/configuration.yml | 1 + templates/web/admin/tasks/list.html.twig | 4 ++-- 10 files changed, 11 insertions(+), 22 deletions(-) diff --git a/config/configuration.sample.yml b/config/configuration.sample.yml index 3994ea49a7..50208d031e 100644 --- a/config/configuration.sample.yml +++ b/config/configuration.sample.yml @@ -28,6 +28,7 @@ main: type: Alchemy\Phrasea\SearchEngine\Phrasea\PhraseaEngine options: [] task-manager: + enabled: true logger: max-files: 10 enabled: true diff --git a/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php b/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php index dc02751603..87bcd6ec81 100644 --- a/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php +++ b/lib/Alchemy/Phrasea/Controller/Admin/TaskManager.php @@ -73,7 +73,7 @@ public function connect(Application $app) */ $controllers->get('/scheduler/stop', function (Application $app, Request $request) use ($app) { - if ($app['phraseanet.registry"].get("GV_disable_task_manager']) { + if (false === $app['phraseanet.configuration']['main']['task-manager']['enabled']) { throw new RuntimeException('The use of the task manager is disabled on this instance.'); } @@ -347,7 +347,7 @@ public function connect(Application $app) public function startScheduler(Application $app, Request $request) { - if ($app['phraseanet.registry"].get("GV_disable_task_manager']) { + if (false === $app['phraseanet.configuration']['main']['task-manager']['enabled']) { throw new RuntimeException('The use of the task manager is disabled on this instance.'); } diff --git a/lib/classes/API/V1/adapter.php b/lib/classes/API/V1/adapter.php index 787c62b1bb..eff8dcb7fa 100644 --- a/lib/classes/API/V1/adapter.php +++ b/lib/classes/API/V1/adapter.php @@ -107,7 +107,7 @@ public function get_scheduler(Application $app) { $result = new \API_V1_result($app, $app['request'], $this); - if ($app['phraseanet.registry"].get("GV_disable_task_manager']) { + if (false === $app['phraseanet.configuration']['main']['task-manager']['enabled']) { $ret = array('state' => 'disabled'); } else { $taskManager = $app['task-manager']; diff --git a/lib/classes/module/console/schedulerStart.php b/lib/classes/module/console/schedulerStart.php index 476ae1417d..d771f3a279 100644 --- a/lib/classes/module/console/schedulerStart.php +++ b/lib/classes/module/console/schedulerStart.php @@ -37,7 +37,7 @@ public function __construct($name = null) protected function doExecute(InputInterface $input, OutputInterface $output) { - if ($this->container['phraseanet.registry"].get("GV_disable_task_manager']) { + if (false === $this->container['phraseanet.configuration']['main']['task-manager']['enabled']) { throw new RuntimeException('The use of the task manager is disabled on this instance.'); } $logger = $this->container['task-manager.logger']; diff --git a/lib/classes/module/console/schedulerState.php b/lib/classes/module/console/schedulerState.php index 07641698dc..e6df72bea7 100644 --- a/lib/classes/module/console/schedulerState.php +++ b/lib/classes/module/console/schedulerState.php @@ -56,7 +56,7 @@ protected function doExecute(InputInterface $input, OutputInterface $output) return self::EXITCODE_SETUP_ERROR; } - if ($this->container['phraseanet.registry"].get("GV_disable_task_manager']) { + if (false === $this->container['phraseanet.configuration']['main']['task-manager']['enabled']) { throw new RuntimeException('The use of the task manager is disabled on this instance.'); } diff --git a/lib/classes/module/console/schedulerStop.php b/lib/classes/module/console/schedulerStop.php index e638bd1447..aa14e120eb 100644 --- a/lib/classes/module/console/schedulerStop.php +++ b/lib/classes/module/console/schedulerStop.php @@ -34,7 +34,7 @@ public function __construct($name = null) protected function doExecute(InputInterface $input, OutputInterface $output) { - if ($this->container['phraseanet.registry"].get("GV_disable_task_manager']) { + if (false === $this->container['phraseanet.configuration']['main']['task-manager']['enabled']) { throw new RuntimeException('The use of the task manager is disabled on this instance.'); } diff --git a/lib/classes/module/console/taskrun.php b/lib/classes/module/console/taskrun.php index 0634c41aad..4b39d56f0c 100644 --- a/lib/classes/module/console/taskrun.php +++ b/lib/classes/module/console/taskrun.php @@ -73,7 +73,7 @@ protected function doExecute(InputInterface $input, OutputInterface $output) return self::EXITCODE_SETUP_ERROR; } - if ($this->container['phraseanet.registry"].get("GV_disable_task_manager']) { + if (false === $this->container['phraseanet.configuration']['main']['task-manager']['enabled']) { throw new RuntimeException('The use of the task manager is disabled on this instance.'); } diff --git a/lib/conf.d/_GV_template.inc b/lib/conf.d/_GV_template.inc index 40fd3c27b3..d79333077f 100644 --- a/lib/conf.d/_GV_template.inc +++ b/lib/conf.d/_GV_template.inc @@ -341,19 +341,6 @@ return call_user_func_array(function(Application $app) { 'required' => true ) ) - ), array( - 'section' => _('Task manager'), - 'rolled' => true, - 'vars' => array( - array( - 'type' => \registry::TYPE_BOOLEAN, - 'name' => 'GV_disable_task_manager', - 'comment' => _('Disable task manager'), - 'help' => '', - 'default' => false, - 'required' => true - ) - ) ), array( 'section' => _('Search engine'), 'rolled' => true, diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index b3e8bb3031..688dff3587 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -28,6 +28,7 @@ main: type: Alchemy\Phrasea\SearchEngine\Phrasea\PhraseaEngine options: [] task-manager: + enabled: true logger: max-files: 10 enabled: true diff --git a/templates/web/admin/tasks/list.html.twig b/templates/web/admin/tasks/list.html.twig index 6af3525cf2..abf6a08fdf 100644 --- a/templates/web/admin/tasks/list.html.twig +++ b/templates/web/admin/tasks/list.html.twig @@ -33,7 +33,7 @@
    -
    + + + + + + + + + + + +

    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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/docs/extract.html b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/docs/extract.html new file mode 100644 index 0000000000..0f46958a3d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/docs/extract.html @@ -0,0 +1,176 @@ + + + + + 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/docs/file.html b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/docs/file.html new file mode 100644 index 0000000000..38aa0da55c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/docs/file.html @@ -0,0 +1,178 @@ + + + + + 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/docs/init.html b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/docs/init.html new file mode 100644 index 0000000000..da5b2be9a9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/docs/init.html @@ -0,0 +1,87 @@ + + + + + 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/files/sample b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/files/sample new file mode 100644 index 0000000000..01e34c31d9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/files/sample @@ -0,0 +1 @@ +sample file to test module. diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/files/sample.tar.bz2 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/files/sample.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..f7fbcf229f0fc0c218a89c7de41d9b62ef6406b7 GIT binary patch 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&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714!>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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/scope_defaults.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/scope_defaults.rb new file mode 100644 index 0000000000..6c814849a0 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/scope_defaults.rb @@ -0,0 +1,17 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/staging_parse.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/staging_parse.rb new file mode 100644 index 0000000000..666c887e3c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/lib/puppet/parser/functions/staging_parse.rb @@ -0,0 +1,36 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/deploy.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/deploy.pp new file mode 100644 index 0000000000..565038701f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/deploy.pp @@ -0,0 +1,42 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/extract.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/extract.pp new file mode 100644 index 0000000000..163da14926 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/extract.pp @@ -0,0 +1,95 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/file.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/file.pp new file mode 100644 index 0000000000..60b69d796b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/file.pp @@ -0,0 +1,115 @@ +# #### 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/init.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/init.pp new file mode 100644 index 0000000000..19bb2da40e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/init.pp @@ -0,0 +1,28 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/params.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/params.pp new file mode 100644 index 0000000000..95ee0a134d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/manifests/params.pp @@ -0,0 +1,26 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/defines/staging_deploy_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/defines/staging_deploy_spec.rb new file mode 100644 index 0000000000..66541d22f1 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/defines/staging_deploy_spec.rb @@ -0,0 +1,26 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/defines/staging_extract_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/defines/staging_extract_spec.rb new file mode 100644 index 0000000000..a3d742245d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/defines/staging_extract_spec.rb @@ -0,0 +1,58 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/defines/staging_file_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/defines/staging_file_spec.rb new file mode 100644 index 0000000000..ab1ee59e11 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/defines/staging_file_spec.rb @@ -0,0 +1,157 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/fixtures/hiera.yaml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/fixtures/hiera.yaml new file mode 100644 index 0000000000..771e483f53 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/fixtures/hiera.yaml @@ -0,0 +1,7 @@ +--- +:backends: - puppet + +:hierarchy: - common + +:puppet: + :datasource: data diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/spec_helper.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/spec_helper.rb new file mode 100644 index 0000000000..dc7e9f4a0e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/spec_helper.rb @@ -0,0 +1,2 @@ +require 'rubygems' +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/scope_defaults_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/scope_defaults_spec.rb new file mode 100644 index 0000000000..50c460de73 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/scope_defaults_spec.rb @@ -0,0 +1,45 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/staging_parse_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/staging_parse_spec.rb new file mode 100755 index 0000000000..c7c9c69f6d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/spec/unit/puppet/parser/functions/staging_parse_spec.rb @@ -0,0 +1,51 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/deploy.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/deploy.pp new file mode 100644 index 0000000000..cf9ac58d5a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/deploy.pp @@ -0,0 +1,4 @@ +staging::deploy { 'sample.tar.gz': + source => 'puppet:///modules/staging/sample.tar.gz', + target => '/usr/local', +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/extract.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/extract.pp new file mode 100644 index 0000000000..257f478cfd --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/extract.pp @@ -0,0 +1,25 @@ +$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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/file.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/file.pp new file mode 100644 index 0000000000..475cf5628c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/file.pp @@ -0,0 +1,17 @@ +$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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/init.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/init.pp new file mode 100644 index 0000000000..3015c10f04 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/init.pp @@ -0,0 +1 @@ +include staging diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/scope_defaults.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/scope_defaults.pp new file mode 100644 index 0000000000..3073ff4aaf --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/scope_defaults.pp @@ -0,0 +1,7 @@ +Exec { + path => '/bin', +} + +if scope_defaults('Exec', 'path') { + notice('good') +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/staging_parse.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/staging_parse.pp new file mode 100644 index 0000000000..117ad16684 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/staging/tests/staging_parse.pp @@ -0,0 +1,12 @@ +$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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/CHANGELOG.md b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/CHANGELOG.md new file mode 100644 index 0000000000..5a3597e340 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/CHANGELOG.md @@ -0,0 +1,413 @@ +## 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/CONTRIBUTING.md b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/CONTRIBUTING.md new file mode 100644 index 0000000000..5280da15ec --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/CONTRIBUTING.md @@ -0,0 +1,65 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/Gemfile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/Gemfile new file mode 100644 index 0000000000..bbef720351 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/Gemfile @@ -0,0 +1,33 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/Gemfile.lock b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/Gemfile.lock new file mode 100644 index 0000000000..cf4881eaaa --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/Gemfile.lock @@ -0,0 +1,174 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/LICENSE b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/LICENSE new file mode 100644 index 0000000000..ec0587c0d9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/LICENSE @@ -0,0 +1,19 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/Modulefile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/Modulefile new file mode 100644 index 0000000000..c5da72dacc --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/Modulefile @@ -0,0 +1,11 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/README.markdown b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/README.markdown new file mode 100644 index 0000000000..e9ad53b8b9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/README.markdown @@ -0,0 +1,1304 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/README_DEVELOPER.markdown b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/README_DEVELOPER.markdown new file mode 100644 index 0000000000..04349ed79b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/README_DEVELOPER.markdown @@ -0,0 +1,35 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/README_SPECS.markdown b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/README_SPECS.markdown new file mode 100644 index 0000000000..917b6310dd --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/README_SPECS.markdown @@ -0,0 +1,7 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/RELEASE_PROCESS.markdown b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/RELEASE_PROCESS.markdown new file mode 100644 index 0000000000..0f9328ed0f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/RELEASE_PROCESS.markdown @@ -0,0 +1,24 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/Rakefile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/Rakefile new file mode 100644 index 0000000000..4ed1327a3b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/Rakefile @@ -0,0 +1,18 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/facter_dot_d.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/facter_dot_d.rb new file mode 100644 index 0000000000..2c096b049d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/facter_dot_d.rb @@ -0,0 +1,202 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/pe_version.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/pe_version.rb new file mode 100644 index 0000000000..0cc0f64e95 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/pe_version.rb @@ -0,0 +1,53 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/puppet_vardir.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/puppet_vardir.rb new file mode 100644 index 0000000000..0e6af40e49 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/puppet_vardir.rb @@ -0,0 +1,26 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/root_home.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/root_home.rb new file mode 100644 index 0000000000..b4f87ff2ab --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/root_home.rb @@ -0,0 +1,32 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/util/puppet_settings.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/util/puppet_settings.rb new file mode 100644 index 0000000000..1ad945218a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/facter/util/puppet_settings.rb @@ -0,0 +1,21 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb new file mode 100644 index 0000000000..11d2d7fead --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/abs.rb @@ -0,0 +1,36 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/any2array.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/any2array.rb new file mode 100644 index 0000000000..e71407e89e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/any2array.rb @@ -0,0 +1,33 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/base64.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/base64.rb new file mode 100644 index 0000000000..617ba31b6e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/base64.rb @@ -0,0 +1,37 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/bool2num.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/bool2num.rb new file mode 100644 index 0000000000..9a07a8a119 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/bool2num.rb @@ -0,0 +1,49 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/capitalize.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/capitalize.rb new file mode 100644 index 0000000000..640d00b82f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/capitalize.rb @@ -0,0 +1,34 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb new file mode 100644 index 0000000000..4564a000ab --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chomp.rb @@ -0,0 +1,35 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb new file mode 100644 index 0000000000..f242af39ce --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/chop.rb @@ -0,0 +1,37 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/concat.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/concat.rb new file mode 100644 index 0000000000..6c8638222e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/concat.rb @@ -0,0 +1,41 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/count.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/count.rb new file mode 100644 index 0000000000..52de1b8a5a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/count.rb @@ -0,0 +1,22 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb new file mode 100644 index 0000000000..6df32e9c56 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb @@ -0,0 +1,44 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb new file mode 100644 index 0000000000..d7df306c79 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb @@ -0,0 +1,35 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete.rb new file mode 100644 index 0000000000..d03a29355e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete.rb @@ -0,0 +1,46 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_at.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_at.rb new file mode 100644 index 0000000000..3eb4b53756 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_at.rb @@ -0,0 +1,49 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb new file mode 100644 index 0000000000..f94d4da8d4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb @@ -0,0 +1,34 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_values.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_values.rb new file mode 100644 index 0000000000..f6c8c0e6b6 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/delete_values.rb @@ -0,0 +1,26 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/difference.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/difference.rb new file mode 100644 index 0000000000..cd258f7516 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/difference.rb @@ -0,0 +1,36 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/dirname.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/dirname.rb new file mode 100644 index 0000000000..ea8cc1e081 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/dirname.rb @@ -0,0 +1,15 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/downcase.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/downcase.rb new file mode 100644 index 0000000000..4066d210f7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/downcase.rb @@ -0,0 +1,33 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/empty.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/empty.rb new file mode 100644 index 0000000000..80ebb86b89 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/empty.rb @@ -0,0 +1,28 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb new file mode 100644 index 0000000000..f1da4aaaaf --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb @@ -0,0 +1,35 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb new file mode 100644 index 0000000000..05e5593fc1 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb @@ -0,0 +1,45 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/flatten.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/flatten.rb new file mode 100644 index 0000000000..a1ed183290 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/flatten.rb @@ -0,0 +1,33 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/floor.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/floor.rb new file mode 100644 index 0000000000..9a6f014d7c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/floor.rb @@ -0,0 +1,25 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb new file mode 100644 index 0000000000..6558206055 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb @@ -0,0 +1,46 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb new file mode 100644 index 0000000000..1421b91f52 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb @@ -0,0 +1,17 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getparam.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getparam.rb new file mode 100644 index 0000000000..6d510069f9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getparam.rb @@ -0,0 +1,35 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getvar.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getvar.rb new file mode 100644 index 0000000000..162114995b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/getvar.rb @@ -0,0 +1,26 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/grep.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/grep.rb new file mode 100644 index 0000000000..ceba9ecc8f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/grep.rb @@ -0,0 +1,33 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb new file mode 100644 index 0000000000..7f150a7176 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb @@ -0,0 +1,52 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb new file mode 100644 index 0000000000..842c8ec674 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb @@ -0,0 +1,25 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb new file mode 100644 index 0000000000..9ccf9024f7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb @@ -0,0 +1,25 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_key.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_key.rb new file mode 100644 index 0000000000..4657cc29cd --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/has_key.rb @@ -0,0 +1,28 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/hash.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/hash.rb new file mode 100644 index 0000000000..8cc4823be5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/hash.rb @@ -0,0 +1,41 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/intersection.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/intersection.rb new file mode 100644 index 0000000000..48f02e9d37 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/intersection.rb @@ -0,0 +1,34 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_array.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_array.rb new file mode 100644 index 0000000000..b39e184ae5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_array.rb @@ -0,0 +1,22 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_bool.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_bool.rb new file mode 100644 index 0000000000..8bbdbc8a14 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_bool.rb @@ -0,0 +1,22 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb new file mode 100644 index 0000000000..b3fee965a0 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb @@ -0,0 +1,50 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_float.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_float.rb new file mode 100644 index 0000000000..a2da94385b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_float.rb @@ -0,0 +1,30 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb new file mode 100644 index 0000000000..6da82c8c17 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb @@ -0,0 +1,26 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_hash.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_hash.rb new file mode 100644 index 0000000000..ad907f086f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_hash.rb @@ -0,0 +1,22 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_integer.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_integer.rb new file mode 100644 index 0000000000..c03d28df92 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_integer.rb @@ -0,0 +1,45 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb new file mode 100644 index 0000000000..a90adabe15 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb @@ -0,0 +1,32 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb new file mode 100644 index 0000000000..1b3088a26a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb @@ -0,0 +1,27 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb new file mode 100644 index 0000000000..e7e1d2a746 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb @@ -0,0 +1,75 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_string.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_string.rb new file mode 100644 index 0000000000..f5bef0457f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/is_string.rb @@ -0,0 +1,26 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join.rb new file mode 100644 index 0000000000..6c0a6ba026 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join.rb @@ -0,0 +1,41 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb new file mode 100644 index 0000000000..e9924fe2e6 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb @@ -0,0 +1,47 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/keys.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/keys.rb new file mode 100644 index 0000000000..f0d13b6476 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/keys.rb @@ -0,0 +1,26 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb new file mode 100644 index 0000000000..10c400501b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb @@ -0,0 +1,20 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/lstrip.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/lstrip.rb new file mode 100644 index 0000000000..3a64de3376 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/lstrip.rb @@ -0,0 +1,33 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/max.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/max.rb new file mode 100644 index 0000000000..60fb94ac04 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/max.rb @@ -0,0 +1,21 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/member.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/member.rb new file mode 100644 index 0000000000..43d76affd9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/member.rb @@ -0,0 +1,44 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/merge.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/merge.rb new file mode 100644 index 0000000000..1b39f20600 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/merge.rb @@ -0,0 +1,34 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/min.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/min.rb new file mode 100644 index 0000000000..6bd6ebf20c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/min.rb @@ -0,0 +1,21 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/num2bool.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/num2bool.rb new file mode 100644 index 0000000000..af0e6ed789 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/num2bool.rb @@ -0,0 +1,43 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parsejson.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parsejson.rb new file mode 100644 index 0000000000..a9a16a4524 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parsejson.rb @@ -0,0 +1,24 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb new file mode 100644 index 0000000000..53d54faff7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb @@ -0,0 +1,24 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick.rb new file mode 100644 index 0000000000..fdd0aefd72 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick.rb @@ -0,0 +1,29 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick_default.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick_default.rb new file mode 100644 index 0000000000..36e33abfa9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/pick_default.rb @@ -0,0 +1,35 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/prefix.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/prefix.rb new file mode 100644 index 0000000000..d02286afac --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/prefix.rb @@ -0,0 +1,45 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/range.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/range.rb new file mode 100644 index 0000000000..ffbdf84630 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/range.rb @@ -0,0 +1,88 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reject.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reject.rb new file mode 100644 index 0000000000..1953ffcf11 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reject.rb @@ -0,0 +1,31 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reverse.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reverse.rb new file mode 100644 index 0000000000..fe048690cd --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/reverse.rb @@ -0,0 +1,28 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/rstrip.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/rstrip.rb new file mode 100644 index 0000000000..29b0998205 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/rstrip.rb @@ -0,0 +1,32 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/shuffle.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/shuffle.rb new file mode 100644 index 0000000000..18134ab633 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/shuffle.rb @@ -0,0 +1,46 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/size.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/size.rb new file mode 100644 index 0000000000..cc207e3fad --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/size.rb @@ -0,0 +1,48 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/sort.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/sort.rb new file mode 100644 index 0000000000..cefbe5463b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/sort.rb @@ -0,0 +1,27 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb new file mode 100644 index 0000000000..81fadfdb2f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/squeeze.rb @@ -0,0 +1,36 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb new file mode 100644 index 0000000000..446732ece4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2bool.rb @@ -0,0 +1,46 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb new file mode 100644 index 0000000000..7fe7b0128a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb @@ -0,0 +1,32 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strftime.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strftime.rb new file mode 100644 index 0000000000..0b52adecdb --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strftime.rb @@ -0,0 +1,107 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strip.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strip.rb new file mode 100644 index 0000000000..5f4630d7de --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/strip.rb @@ -0,0 +1,39 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/suffix.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/suffix.rb new file mode 100644 index 0000000000..f7792d6f7a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/suffix.rb @@ -0,0 +1,45 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/swapcase.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/swapcase.rb new file mode 100644 index 0000000000..b9e6632533 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/swapcase.rb @@ -0,0 +1,39 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/time.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/time.rb new file mode 100644 index 0000000000..0cddaf86b9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/time.rb @@ -0,0 +1,49 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb new file mode 100644 index 0000000000..8ff73d10b4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb @@ -0,0 +1,28 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/type.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/type.rb new file mode 100644 index 0000000000..8d85f11585 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/type.rb @@ -0,0 +1,50 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/union.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/union.rb new file mode 100644 index 0000000000..c91bb80537 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/union.rb @@ -0,0 +1,34 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/unique.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/unique.rb new file mode 100644 index 0000000000..8844a74185 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/unique.rb @@ -0,0 +1,51 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/upcase.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/upcase.rb new file mode 100644 index 0000000000..fe6cadc3cc --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/upcase.rb @@ -0,0 +1,41 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/uriescape.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/uriescape.rb new file mode 100644 index 0000000000..0d81de5d10 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/uriescape.rb @@ -0,0 +1,35 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb new file mode 100644 index 0000000000..fe279744ec --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb @@ -0,0 +1,56 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_array.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_array.rb new file mode 100644 index 0000000000..34b511825c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_array.rb @@ -0,0 +1,33 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb new file mode 100644 index 0000000000..154d66091c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb @@ -0,0 +1,81 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb new file mode 100644 index 0000000000..59a08056b0 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb @@ -0,0 +1,34 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb new file mode 100644 index 0000000000..2ebe91cf78 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb @@ -0,0 +1,48 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb new file mode 100644 index 0000000000..9bdd543283 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb @@ -0,0 +1,33 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb new file mode 100644 index 0000000000..fc02748e81 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb @@ -0,0 +1,48 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb new file mode 100644 index 0000000000..b0f2558df7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb @@ -0,0 +1,49 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_re.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_re.rb new file mode 100644 index 0000000000..ca25a702c5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_re.rb @@ -0,0 +1,40 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb new file mode 100644 index 0000000000..7d534f3703 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb @@ -0,0 +1,71 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_string.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_string.rb new file mode 100644 index 0000000000..e667794a67 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/validate_string.rb @@ -0,0 +1,33 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values.rb new file mode 100644 index 0000000000..16067561b4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values.rb @@ -0,0 +1,39 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values_at.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values_at.rb new file mode 100644 index 0000000000..d3e69d97fc --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/values_at.rb @@ -0,0 +1,98 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/zip.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/zip.rb new file mode 100644 index 0000000000..2b56e9ca07 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/parser/functions/zip.rb @@ -0,0 +1,65 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/provider/file_line/ruby.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/provider/file_line/ruby.rb new file mode 100644 index 0000000000..94e7fac919 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/provider/file_line/ruby.rb @@ -0,0 +1,83 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/anchor.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/anchor.rb new file mode 100644 index 0000000000..fe1e5aa195 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/anchor.rb @@ -0,0 +1,46 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/file_line.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/file_line.rb new file mode 100644 index 0000000000..323fc4c9c7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/lib/puppet/type/file_line.rb @@ -0,0 +1,79 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/manifests/init.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/manifests/init.pp new file mode 100644 index 0000000000..500ad770d5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/manifests/init.pp @@ -0,0 +1,20 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/manifests/stages.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/manifests/stages.pp new file mode 100644 index 0000000000..eb15fd650d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/manifests/stages.pp @@ -0,0 +1,43 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/metadata.json b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/metadata.json new file mode 100644 index 0000000000..e3bacbe75f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/metadata.json @@ -0,0 +1,509 @@ +{ + "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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/abs_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/abs_spec.rb new file mode 100755 index 0000000000..8e056424ed --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/abs_spec.rb @@ -0,0 +1,30 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/any2array_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/any2array_spec.rb new file mode 100755 index 0000000000..467d6afda0 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/any2array_spec.rb @@ -0,0 +1,49 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/base64_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/base64_spec.rb new file mode 100755 index 0000000000..97e1738ef6 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/base64_spec.rb @@ -0,0 +1,18 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/bool2num_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/bool2num_spec.rb new file mode 100755 index 0000000000..7a70311ca7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/bool2num_spec.rb @@ -0,0 +1,34 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/build_csv.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/build_csv.rb new file mode 100755 index 0000000000..62ecbf13a4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/build_csv.rb @@ -0,0 +1,83 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/capitalize_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/capitalize_spec.rb new file mode 100755 index 0000000000..e5e7b7bf84 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/capitalize_spec.rb @@ -0,0 +1,33 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chomp_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chomp_spec.rb new file mode 100755 index 0000000000..f6c15956e4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chomp_spec.rb @@ -0,0 +1,21 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chop_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chop_spec.rb new file mode 100755 index 0000000000..dbc28da7ec --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/chop_spec.rb @@ -0,0 +1,45 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/concat_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/concat_spec.rb new file mode 100755 index 0000000000..7bda3653a0 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/concat_spec.rb @@ -0,0 +1,18 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/count_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/count_spec.rb new file mode 100755 index 0000000000..51a40ba5c1 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/count_spec.rb @@ -0,0 +1,30 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/deep_merge_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/deep_merge_spec.rb new file mode 100755 index 0000000000..c0f9b126d0 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/deep_merge_spec.rb @@ -0,0 +1,20 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/defined_with_params_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/defined_with_params_spec.rb new file mode 100755 index 0000000000..fc544508b9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/defined_with_params_spec.rb @@ -0,0 +1,22 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_at_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_at_spec.rb new file mode 100755 index 0000000000..db0c01f748 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_at_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_spec.rb new file mode 100755 index 0000000000..a28604ceaa --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb new file mode 100755 index 0000000000..b7eda1926c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_undef_values_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_values_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_values_spec.rb new file mode 100755 index 0000000000..6d2369c3e8 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/delete_values_spec.rb @@ -0,0 +1,25 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/difference_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/difference_spec.rb new file mode 100755 index 0000000000..2fae5c432f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/difference_spec.rb @@ -0,0 +1,26 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/dirname_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/dirname_spec.rb new file mode 100755 index 0000000000..97913ddb06 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/dirname_spec.rb @@ -0,0 +1,42 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/downcase_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/downcase_spec.rb new file mode 100755 index 0000000000..bc4e70692d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/downcase_spec.rb @@ -0,0 +1,39 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/empty_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/empty_spec.rb new file mode 100755 index 0000000000..8b46aacdad --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/empty_spec.rb @@ -0,0 +1,39 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_packages_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_packages_spec.rb new file mode 100755 index 0000000000..145bdc5e5d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_packages_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_resource_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_resource_spec.rb new file mode 100755 index 0000000000..c4d8887df2 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/ensure_resource_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/flatten_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/flatten_spec.rb new file mode 100755 index 0000000000..c4d66e0465 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/flatten_spec.rb @@ -0,0 +1,39 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/floor_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/floor_spec.rb new file mode 100755 index 0000000000..0dcdad9c2b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/floor_spec.rb @@ -0,0 +1,39 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb new file mode 100755 index 0000000000..b7f8bf8ab9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/fqdn_rotate_spec.rb @@ -0,0 +1,33 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/get_module_path_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/get_module_path_spec.rb new file mode 100755 index 0000000000..34d91fa3da --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/get_module_path_spec.rb @@ -0,0 +1,41 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getparam_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getparam_spec.rb new file mode 100755 index 0000000000..91fc9a00f3 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getparam_spec.rb @@ -0,0 +1,25 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getvar_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getvar_spec.rb new file mode 100755 index 0000000000..333c467f67 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/getvar_spec.rb @@ -0,0 +1,26 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/grep_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/grep_spec.rb new file mode 100755 index 0000000000..b39d48ecbe --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/grep_spec.rb @@ -0,0 +1,26 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_interface_with_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_interface_with_spec.rb new file mode 100755 index 0000000000..41ae19fd1c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_interface_with_spec.rb @@ -0,0 +1,44 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_address_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_address_spec.rb new file mode 100755 index 0000000000..7d5fd87292 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_address_spec.rb @@ -0,0 +1,33 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_network_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_network_spec.rb new file mode 100755 index 0000000000..692eaf9b4c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_ip_network_spec.rb @@ -0,0 +1,33 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_key_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_key_spec.rb new file mode 100755 index 0000000000..c8557cbeb6 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/has_key_spec.rb @@ -0,0 +1,41 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/hash_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/hash_spec.rb new file mode 100755 index 0000000000..ed53834bed --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/hash_spec.rb @@ -0,0 +1,26 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/intersection_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/intersection_spec.rb new file mode 100755 index 0000000000..66b8652978 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/intersection_spec.rb @@ -0,0 +1,27 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_array_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_array_spec.rb new file mode 100755 index 0000000000..9c6bad735f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_array_spec.rb @@ -0,0 +1,67 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_bool_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_bool_spec.rb new file mode 100755 index 0000000000..60079f95ef --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_bool_spec.rb @@ -0,0 +1,81 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_domain_name_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_domain_name_spec.rb new file mode 100755 index 0000000000..e0f03fa878 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_domain_name_spec.rb @@ -0,0 +1,83 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_float_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_float_spec.rb new file mode 100755 index 0000000000..338ba58d46 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_float_spec.rb @@ -0,0 +1,86 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_function_available_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_function_available_spec.rb new file mode 100755 index 0000000000..2b5dd6d173 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_function_available_spec.rb @@ -0,0 +1,58 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_hash_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_hash_spec.rb new file mode 100755 index 0000000000..2ef310abcc --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_hash_spec.rb @@ -0,0 +1,63 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_integer_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_integer_spec.rb new file mode 100755 index 0000000000..bf6902b904 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_integer_spec.rb @@ -0,0 +1,95 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_ip_address_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_ip_address_spec.rb new file mode 100755 index 0000000000..ed7a85439d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_ip_address_spec.rb @@ -0,0 +1,80 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_mac_address_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_mac_address_spec.rb new file mode 100755 index 0000000000..a2c892f435 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_mac_address_spec.rb @@ -0,0 +1,38 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_numeric_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_numeric_spec.rb new file mode 100755 index 0000000000..21c898841e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_numeric_spec.rb @@ -0,0 +1,95 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_string_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_string_spec.rb new file mode 100755 index 0000000000..94d8e96783 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/is_string_spec.rb @@ -0,0 +1,102 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb new file mode 100755 index 0000000000..70493fd5a2 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_keys_to_values_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_spec.rb new file mode 100755 index 0000000000..5397ce2c8c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/join_spec.rb @@ -0,0 +1,26 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/keys_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/keys_spec.rb new file mode 100755 index 0000000000..176918e91c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/keys_spec.rb @@ -0,0 +1,23 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/loadyaml_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/loadyaml_spec.rb new file mode 100644 index 0000000000..944a727359 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/loadyaml_spec.rb @@ -0,0 +1,31 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/lstrip_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/lstrip_spec.rb new file mode 100755 index 0000000000..3dc952fbc6 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/lstrip_spec.rb @@ -0,0 +1,34 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/max_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/max_spec.rb new file mode 100755 index 0000000000..f04e3d2833 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/max_spec.rb @@ -0,0 +1,20 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/member_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/member_spec.rb new file mode 100755 index 0000000000..b467dbbe9c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/member_spec.rb @@ -0,0 +1,26 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/merge_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/merge_spec.rb new file mode 100755 index 0000000000..a60e784ee6 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/merge_spec.rb @@ -0,0 +1,23 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/min_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/min_spec.rb new file mode 100755 index 0000000000..509092d3c7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/min_spec.rb @@ -0,0 +1,20 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-6-vcloud.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-6-vcloud.yml new file mode 100644 index 0000000000..ca9c1d3298 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-6-vcloud.yml @@ -0,0 +1,15 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64-pe.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64-pe.yml new file mode 100644 index 0000000000..7d9242f1b9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64-pe.yml @@ -0,0 +1,12 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64.yml new file mode 100644 index 0000000000..05540ed8c5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/centos-64-x64.yml @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/default.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/default.yml new file mode 100644 index 0000000000..4e2cb809e8 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/default.yml @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/fedora-18-x64.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/fedora-18-x64.yml new file mode 100644 index 0000000000..1361649830 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/fedora-18-x64.yml @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/sles-11-x64.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/sles-11-x64.yml new file mode 100644 index 0000000000..41abe2135e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/sles-11-x64.yml @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml new file mode 100644 index 0000000000..5ca1514e40 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-10044-x64.yml @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml new file mode 100644 index 0000000000..d065b304f8 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/num2bool_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/num2bool_spec.rb new file mode 100755 index 0000000000..1d99ba0251 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/num2bool_spec.rb @@ -0,0 +1,76 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parsejson_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parsejson_spec.rb new file mode 100755 index 0000000000..5097810272 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parsejson_spec.rb @@ -0,0 +1,34 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parseyaml_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parseyaml_spec.rb new file mode 100755 index 0000000000..4b4bf3df3d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/parseyaml_spec.rb @@ -0,0 +1,35 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_default_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_default_spec.rb new file mode 100755 index 0000000000..a663f54e8a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_default_spec.rb @@ -0,0 +1,54 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_spec.rb new file mode 100755 index 0000000000..46cf63f28f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/pick_spec.rb @@ -0,0 +1,44 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/prefix_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/prefix_spec.rb new file mode 100755 index 0000000000..de55530eb2 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/prefix_spec.rb @@ -0,0 +1,42 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/range_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/range_spec.rb new file mode 100755 index 0000000000..a3ccd3396a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/range_spec.rb @@ -0,0 +1,36 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reject_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reject_spec.rb new file mode 100755 index 0000000000..7f16a008dc --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reject_spec.rb @@ -0,0 +1,42 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reverse_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reverse_spec.rb new file mode 100755 index 0000000000..c3f01567a6 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/reverse_spec.rb @@ -0,0 +1,23 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/rstrip_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/rstrip_spec.rb new file mode 100755 index 0000000000..b57a8b0458 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/rstrip_spec.rb @@ -0,0 +1,34 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/shuffle_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/shuffle_spec.rb new file mode 100755 index 0000000000..02d1201dd0 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/shuffle_spec.rb @@ -0,0 +1,34 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/size_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/size_spec.rb new file mode 100755 index 0000000000..a52b778bde --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/size_spec.rb @@ -0,0 +1,55 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/sort_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/sort_spec.rb new file mode 100755 index 0000000000..c85bfabd5c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/sort_spec.rb @@ -0,0 +1,34 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/squeeze_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/squeeze_spec.rb new file mode 100755 index 0000000000..400a458c9b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/squeeze_spec.rb @@ -0,0 +1,47 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2bool_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2bool_spec.rb new file mode 100755 index 0000000000..cf549dab88 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2bool_spec.rb @@ -0,0 +1,31 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb new file mode 100755 index 0000000000..993e63bace --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/str2saltedsha512_spec.rb @@ -0,0 +1,22 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strftime_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strftime_spec.rb new file mode 100755 index 0000000000..53b7f903be --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strftime_spec.rb @@ -0,0 +1,22 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strip_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strip_spec.rb new file mode 100755 index 0000000000..906fd7abed --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/strip_spec.rb @@ -0,0 +1,34 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/suffix_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/suffix_spec.rb new file mode 100755 index 0000000000..630f866d70 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/suffix_spec.rb @@ -0,0 +1,42 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/swapcase_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/swapcase_spec.rb new file mode 100755 index 0000000000..b7894fbe27 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/swapcase_spec.rb @@ -0,0 +1,22 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/time_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/time_spec.rb new file mode 100755 index 0000000000..cdb296070c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/time_spec.rb @@ -0,0 +1,36 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/to_bytes_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/to_bytes_spec.rb new file mode 100755 index 0000000000..2b4c61f48d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/to_bytes_spec.rb @@ -0,0 +1,27 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/type_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/type_spec.rb new file mode 100755 index 0000000000..0043aad7cd --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/type_spec.rb @@ -0,0 +1,37 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/union_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/union_spec.rb new file mode 100755 index 0000000000..6db8d0cf96 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/union_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unique_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unique_spec.rb new file mode 100755 index 0000000000..bfadad19bf --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unique_spec.rb @@ -0,0 +1,33 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unsupported_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unsupported_spec.rb new file mode 100755 index 0000000000..1c559f67ec --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/unsupported_spec.rb @@ -0,0 +1,11 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/upcase_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/upcase_spec.rb new file mode 100755 index 0000000000..3d2906d725 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/upcase_spec.rb @@ -0,0 +1,33 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/uriescape_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/uriescape_spec.rb new file mode 100755 index 0000000000..7e30205e8d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/uriescape_spec.rb @@ -0,0 +1,23 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb new file mode 100755 index 0000000000..7082e848ef --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_absolute_path_spec.rb @@ -0,0 +1,31 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_array_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_array_spec.rb new file mode 100755 index 0000000000..b53e98c273 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_array_spec.rb @@ -0,0 +1,37 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_augeas_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_augeas_spec.rb new file mode 100755 index 0000000000..aeec67ae1b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_augeas_spec.rb @@ -0,0 +1,63 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_bool_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_bool_spec.rb new file mode 100755 index 0000000000..c837f089f2 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_bool_spec.rb @@ -0,0 +1,37 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_cmd_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_cmd_spec.rb new file mode 100755 index 0000000000..385676d14b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_cmd_spec.rb @@ -0,0 +1,50 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_hash_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_hash_spec.rb new file mode 100755 index 0000000000..52fb615bdf --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_hash_spec.rb @@ -0,0 +1,37 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb new file mode 100755 index 0000000000..64841c3716 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv4_address_spec.rb @@ -0,0 +1,31 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb new file mode 100755 index 0000000000..6426d1a526 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_ipv6_address_spec.rb @@ -0,0 +1,31 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_re_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_re_spec.rb new file mode 100755 index 0000000000..22f6d47d1d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_re_spec.rb @@ -0,0 +1,47 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_slength_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_slength_spec.rb new file mode 100755 index 0000000000..1ab2bb986e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_slength_spec.rb @@ -0,0 +1,72 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_string_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_string_spec.rb new file mode 100755 index 0000000000..8956f48c90 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/validate_string_spec.rb @@ -0,0 +1,36 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_at_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_at_spec.rb new file mode 100755 index 0000000000..da63cf307a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_at_spec.rb @@ -0,0 +1,73 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_spec.rb new file mode 100755 index 0000000000..7ef956e048 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/values_spec.rb @@ -0,0 +1,31 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/zip_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/zip_spec.rb new file mode 100755 index 0000000000..0e924e8492 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/acceptance/zip_spec.rb @@ -0,0 +1,74 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/classes/anchor_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/classes/anchor_spec.rb new file mode 100755 index 0000000000..2d4455e417 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/classes/anchor_spec.rb @@ -0,0 +1,30 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/fixtures/dscacheutil/root b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/fixtures/dscacheutil/root new file mode 100644 index 0000000000..1e34519b2a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/fixtures/dscacheutil/root @@ -0,0 +1,8 @@ +name: root +password: * +uid: 0 +gid: 0 +dir: /var/root +shell: /bin/bash +gecos: rawr Root + diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/abs_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/abs_spec.rb new file mode 100755 index 0000000000..c0b42970c5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/abs_spec.rb @@ -0,0 +1,25 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/any2array_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/any2array_spec.rb new file mode 100755 index 0000000000..b266e84f4f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/any2array_spec.rb @@ -0,0 +1,55 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/base64_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/base64_spec.rb new file mode 100755 index 0000000000..5faa5e66c7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/base64_spec.rb @@ -0,0 +1,34 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/bool2num_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/bool2num_spec.rb new file mode 100755 index 0000000000..518ac85ec5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/bool2num_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/capitalize_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/capitalize_spec.rb new file mode 100755 index 0000000000..69c9758f25 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/capitalize_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/chomp_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/chomp_spec.rb new file mode 100755 index 0000000000..e425365fcb --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/chomp_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/chop_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/chop_spec.rb new file mode 100755 index 0000000000..9e466de4b6 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/chop_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/concat_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/concat_spec.rb new file mode 100755 index 0000000000..6e67620966 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/concat_spec.rb @@ -0,0 +1,30 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/count_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/count_spec.rb new file mode 100755 index 0000000000..2453815c26 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/count_spec.rb @@ -0,0 +1,31 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/deep_merge_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/deep_merge_spec.rb new file mode 100755 index 0000000000..f1347014cf --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/deep_merge_spec.rb @@ -0,0 +1,105 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/defined_with_params_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/defined_with_params_spec.rb new file mode 100755 index 0000000000..28dbab3119 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/defined_with_params_spec.rb @@ -0,0 +1,37 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_at_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_at_spec.rb new file mode 100755 index 0000000000..593cf45929 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_at_spec.rb @@ -0,0 +1,25 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_spec.rb new file mode 100755 index 0000000000..1508a63e91 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_spec.rb @@ -0,0 +1,56 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_undef_values_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_undef_values_spec.rb new file mode 100755 index 0000000000..b341d888ae --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_undef_values_spec.rb @@ -0,0 +1,41 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_values_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_values_spec.rb new file mode 100755 index 0000000000..8d7f2315d4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/delete_values_spec.rb @@ -0,0 +1,36 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/difference_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/difference_spec.rb new file mode 100755 index 0000000000..9feff09189 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/difference_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/dirname_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/dirname_spec.rb new file mode 100755 index 0000000000..fb3b4feca7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/dirname_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/downcase_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/downcase_spec.rb new file mode 100755 index 0000000000..acef1f05d9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/downcase_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/empty_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/empty_spec.rb new file mode 100755 index 0000000000..7745875224 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/empty_spec.rb @@ -0,0 +1,23 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_packages_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_packages_spec.rb new file mode 100755 index 0000000000..436be10bc4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_packages_spec.rb @@ -0,0 +1,81 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_resource_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_resource_spec.rb new file mode 100755 index 0000000000..33bcac0d1f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/ensure_resource_spec.rb @@ -0,0 +1,113 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/flatten_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/flatten_spec.rb new file mode 100755 index 0000000000..dba7a6bbdb --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/flatten_spec.rb @@ -0,0 +1,27 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/floor_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/floor_spec.rb new file mode 100755 index 0000000000..dbc8c77358 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/floor_spec.rb @@ -0,0 +1,39 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/fqdn_rotate_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/fqdn_rotate_spec.rb new file mode 100755 index 0000000000..2577723351 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/fqdn_rotate_spec.rb @@ -0,0 +1,33 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/get_module_path_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/get_module_path_spec.rb new file mode 100755 index 0000000000..486bef6f20 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/get_module_path_spec.rb @@ -0,0 +1,46 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/getparam_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/getparam_spec.rb new file mode 100755 index 0000000000..bf024af0e5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/getparam_spec.rb @@ -0,0 +1,76 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/getvar_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/getvar_spec.rb new file mode 100755 index 0000000000..5ff834ee71 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/getvar_spec.rb @@ -0,0 +1,37 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/grep_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/grep_spec.rb new file mode 100755 index 0000000000..a93b842537 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/grep_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_interface_with_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_interface_with_spec.rb new file mode 100755 index 0000000000..c5264e4f30 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_interface_with_spec.rb @@ -0,0 +1,64 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_address_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_address_spec.rb new file mode 100755 index 0000000000..5a68460820 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_address_spec.rb @@ -0,0 +1,39 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_network_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_network_spec.rb new file mode 100755 index 0000000000..c3a289e372 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_ip_network_spec.rb @@ -0,0 +1,36 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_key_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_key_spec.rb new file mode 100755 index 0000000000..490daeae7c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/has_key_spec.rb @@ -0,0 +1,42 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/hash_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/hash_spec.rb new file mode 100755 index 0000000000..7c91be9077 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/hash_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/intersection_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/intersection_spec.rb new file mode 100755 index 0000000000..fd44f7fe3d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/intersection_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_array_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_array_spec.rb new file mode 100755 index 0000000000..e7f4bcd6df --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_array_spec.rb @@ -0,0 +1,29 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_bool_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_bool_spec.rb new file mode 100755 index 0000000000..c94e83a9d9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_bool_spec.rb @@ -0,0 +1,44 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_domain_name_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_domain_name_spec.rb new file mode 100755 index 0000000000..f2ea76dac7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_domain_name_spec.rb @@ -0,0 +1,64 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_float_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_float_spec.rb new file mode 100755 index 0000000000..b7d73b04a2 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_float_spec.rb @@ -0,0 +1,33 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_function_available.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_function_available.rb new file mode 100755 index 0000000000..d5669a7583 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_function_available.rb @@ -0,0 +1,31 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_hash_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_hash_spec.rb new file mode 100755 index 0000000000..bbebf39f9c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_hash_spec.rb @@ -0,0 +1,29 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_integer_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_integer_spec.rb new file mode 100755 index 0000000000..24141cc7b7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_integer_spec.rb @@ -0,0 +1,69 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_ip_address_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_ip_address_spec.rb new file mode 100755 index 0000000000..c0debb3d43 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_ip_address_spec.rb @@ -0,0 +1,39 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_mac_address_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_mac_address_spec.rb new file mode 100755 index 0000000000..ca9c590476 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_mac_address_spec.rb @@ -0,0 +1,29 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_numeric_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_numeric_spec.rb new file mode 100755 index 0000000000..1df1497871 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_numeric_spec.rb @@ -0,0 +1,119 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_string_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_string_spec.rb new file mode 100755 index 0000000000..3756bea8b5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/is_string_spec.rb @@ -0,0 +1,34 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_keys_to_values_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_keys_to_values_spec.rb new file mode 100755 index 0000000000..a52fb719f2 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_keys_to_values_spec.rb @@ -0,0 +1,40 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_spec.rb new file mode 100755 index 0000000000..aafa1a7f76 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/join_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/keys_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/keys_spec.rb new file mode 100755 index 0000000000..fdd7a7073e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/keys_spec.rb @@ -0,0 +1,21 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/loadyaml_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/loadyaml_spec.rb new file mode 100755 index 0000000000..fe16318267 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/loadyaml_spec.rb @@ -0,0 +1,25 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/lstrip_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/lstrip_spec.rb new file mode 100755 index 0000000000..b280ae7ac1 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/lstrip_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/max_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/max_spec.rb new file mode 100755 index 0000000000..ff6f2b361c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/max_spec.rb @@ -0,0 +1,27 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/member_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/member_spec.rb new file mode 100755 index 0000000000..6e9a023fa4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/member_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/merge_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/merge_spec.rb new file mode 100755 index 0000000000..15a5d94cf8 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/merge_spec.rb @@ -0,0 +1,52 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/min_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/min_spec.rb new file mode 100755 index 0000000000..71d593ef09 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/min_spec.rb @@ -0,0 +1,27 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/num2bool_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/num2bool_spec.rb new file mode 100755 index 0000000000..b56196d3c6 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/num2bool_spec.rb @@ -0,0 +1,67 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/parsejson_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/parsejson_spec.rb new file mode 100755 index 0000000000..f179ac111a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/parsejson_spec.rb @@ -0,0 +1,22 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/parseyaml_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/parseyaml_spec.rb new file mode 100755 index 0000000000..0c7aea8a5a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/parseyaml_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_default_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_default_spec.rb new file mode 100755 index 0000000000..c9235b5346 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_default_spec.rb @@ -0,0 +1,58 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_spec.rb new file mode 100755 index 0000000000..f53fa80005 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/pick_spec.rb @@ -0,0 +1,34 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/prefix_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/prefix_spec.rb new file mode 100755 index 0000000000..6e8ddc58ee --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/prefix_spec.rb @@ -0,0 +1,28 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/range_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/range_spec.rb new file mode 100755 index 0000000000..0e1ad376f6 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/range_spec.rb @@ -0,0 +1,70 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/reject_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/reject_spec.rb new file mode 100755 index 0000000000..f2cb741935 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/reject_spec.rb @@ -0,0 +1,20 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/reverse_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/reverse_spec.rb new file mode 100755 index 0000000000..1b59206547 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/reverse_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/rstrip_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/rstrip_spec.rb new file mode 100755 index 0000000000..d90de1d060 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/rstrip_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/shuffle_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/shuffle_spec.rb new file mode 100755 index 0000000000..93346d5370 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/shuffle_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/size_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/size_spec.rb new file mode 100755 index 0000000000..b1c435a302 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/size_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/sort_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/sort_spec.rb new file mode 100755 index 0000000000..3187a5aecb --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/sort_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/squeeze_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/squeeze_spec.rb new file mode 100755 index 0000000000..60e5a3028d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/squeeze_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2bool_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2bool_spec.rb new file mode 100755 index 0000000000..73c09c7292 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2bool_spec.rb @@ -0,0 +1,31 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2saltedsha512_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2saltedsha512_spec.rb new file mode 100755 index 0000000000..df8fb8e905 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/str2saltedsha512_spec.rb @@ -0,0 +1,45 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/strftime_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/strftime_spec.rb new file mode 100755 index 0000000000..df42b6f26b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/strftime_spec.rb @@ -0,0 +1,29 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/strip_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/strip_spec.rb new file mode 100755 index 0000000000..fccdd26067 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/strip_spec.rb @@ -0,0 +1,18 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/suffix_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/suffix_spec.rb new file mode 100755 index 0000000000..89ba3b8230 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/suffix_spec.rb @@ -0,0 +1,27 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/swapcase_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/swapcase_spec.rb new file mode 100755 index 0000000000..808b415876 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/swapcase_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/time_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/time_spec.rb new file mode 100755 index 0000000000..e9fb76e6ac --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/time_spec.rb @@ -0,0 +1,29 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/to_bytes_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/to_bytes_spec.rb new file mode 100755 index 0000000000..d1ea4c80cc --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/to_bytes_spec.rb @@ -0,0 +1,58 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/type_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/type_spec.rb new file mode 100755 index 0000000000..8fec88f266 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/type_spec.rb @@ -0,0 +1,43 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/union_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/union_spec.rb new file mode 100755 index 0000000000..0d282caa65 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/union_spec.rb @@ -0,0 +1,19 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/unique_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/unique_spec.rb new file mode 100755 index 0000000000..5d48d49b72 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/unique_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/upcase_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/upcase_spec.rb new file mode 100755 index 0000000000..5db55138a6 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/upcase_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/uriescape_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/uriescape_spec.rb new file mode 100755 index 0000000000..7211c88783 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/uriescape_spec.rb @@ -0,0 +1,24 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_absolute_path_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_absolute_path_spec.rb new file mode 100755 index 0000000000..342ae84825 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_absolute_path_spec.rb @@ -0,0 +1,84 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_array_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_array_spec.rb new file mode 100755 index 0000000000..4b31cfde42 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_array_spec.rb @@ -0,0 +1,38 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_augeas_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_augeas_spec.rb new file mode 100755 index 0000000000..c695ba2eb7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_augeas_spec.rb @@ -0,0 +1,103 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_bool_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_bool_spec.rb new file mode 100755 index 0000000000..a352d3b550 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_bool_spec.rb @@ -0,0 +1,51 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_cmd_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_cmd_spec.rb new file mode 100755 index 0000000000..a6e68df210 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_cmd_spec.rb @@ -0,0 +1,48 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_hash_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_hash_spec.rb new file mode 100755 index 0000000000..a0c35c2304 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_hash_spec.rb @@ -0,0 +1,43 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv4_address_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv4_address_spec.rb new file mode 100755 index 0000000000..45401a4232 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv4_address_spec.rb @@ -0,0 +1,64 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb new file mode 100755 index 0000000000..a839d902c9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_ipv6_address_spec.rb @@ -0,0 +1,67 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_re_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_re_spec.rb new file mode 100755 index 0000000000..d29988bf00 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_re_spec.rb @@ -0,0 +1,77 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_slength_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_slength_spec.rb new file mode 100755 index 0000000000..851835fa1e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_slength_spec.rb @@ -0,0 +1,67 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_string_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_string_spec.rb new file mode 100755 index 0000000000..3b4fb3e1da --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/validate_string_spec.rb @@ -0,0 +1,60 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_at_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_at_spec.rb new file mode 100755 index 0000000000..08e95a567b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_at_spec.rb @@ -0,0 +1,38 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_spec.rb new file mode 100755 index 0000000000..14ae417638 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/values_spec.rb @@ -0,0 +1,31 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/zip_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/zip_spec.rb new file mode 100755 index 0000000000..f45ab17308 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/functions/zip_spec.rb @@ -0,0 +1,15 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/compiler.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/compiler.rb new file mode 100755 index 0000000000..2f0ae4d797 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/compiler.rb @@ -0,0 +1,47 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/database.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/database.rb new file mode 100755 index 0000000000..f5c2341791 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/database.rb @@ -0,0 +1,30 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/files.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/files.rb new file mode 100755 index 0000000000..71b38ffedf --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/files.rb @@ -0,0 +1,61 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/fixtures.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/fixtures.rb new file mode 100755 index 0000000000..81e9775ff8 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/fixtures.rb @@ -0,0 +1,29 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/matchers.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/matchers.rb new file mode 100755 index 0000000000..093d77c812 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/matchers.rb @@ -0,0 +1,121 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/modules.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/modules.rb new file mode 100755 index 0000000000..910c6d94e4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/modules.rb @@ -0,0 +1,27 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/pops.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/pops.rb new file mode 100755 index 0000000000..e056a52b77 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/pops.rb @@ -0,0 +1,17 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/scope.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/scope.rb new file mode 100755 index 0000000000..3847ede187 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/scope.rb @@ -0,0 +1,15 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/settings.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/settings.rb new file mode 100755 index 0000000000..8ddcb975fb --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/settings.rb @@ -0,0 +1,16 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/verbose.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/verbose.rb new file mode 100755 index 0000000000..b2683df048 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/lib/puppet_spec/verbose.rb @@ -0,0 +1,10 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/alias_should_to_must.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/alias_should_to_must.rb new file mode 100755 index 0000000000..505e240920 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/alias_should_to_must.rb @@ -0,0 +1,9 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/publicize_methods.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/publicize_methods.rb new file mode 100755 index 0000000000..3ae59f978b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/monkey_patches/publicize_methods.rb @@ -0,0 +1,11 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/spec.opts b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/spec.opts new file mode 100644 index 0000000000..91cd6427ed --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/spec.opts @@ -0,0 +1,6 @@ +--format +s +--colour +--loadby +mtime +--backtrace diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper.rb new file mode 100755 index 0000000000..78925fdea3 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper.rb @@ -0,0 +1,39 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper_acceptance.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper_acceptance.rb new file mode 100755 index 0000000000..8e56daa683 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/spec_helper_acceptance.rb @@ -0,0 +1,31 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.last_run.json b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.last_run.json new file mode 100644 index 0000000000..3cb5e70c96 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.last_run.json @@ -0,0 +1,5 @@ +{ + "result": { + "covered_percent": 100.0 + } +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.resultset.json b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.resultset.json new file mode 100644 index 0000000000..bed049341c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/.resultset.json @@ -0,0 +1,7 @@ +{ + "RSpec": { + "coverage": { + }, + "timestamp": 1398200553 + } +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.css b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.css new file mode 100644 index 0000000000..d86560434d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.css @@ -0,0 +1,799 @@ +/* ----------------------------------------------------------------------- + + + 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.js b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.js new file mode 100644 index 0000000000..5e06df5f31 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/application.js @@ -0,0 +1,1559 @@ +/*! + * 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/border.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/border.png new file mode 100644 index 0000000000000000000000000000000000000000..df13bb6daf79307915e7dd1cf29d48730a50c29d GIT binary patch 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 literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/controls.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0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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 literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/loading.gif b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/colorbox/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..b4695d811d4f84ed693eff7b5e6b4d61a3e8c48d GIT binary patch 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^+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J96U* 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 literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_red.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_red.png new file mode 100644 index 0000000000000000000000000000000000000000..fbe093a551114bd5ba92550b83ec04a886238bdb GIT binary patch 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 literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_yellow.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/favicon_yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..e53847ea09aea9a5a16237a2acbebd0bef7f9436 GIT binary patch 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 literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/loading.gif b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..3596a61f3af951db38aeb149eecb37e7142d5c46 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QF6P&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 literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/magnify.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/magnify.png new file mode 100644 index 0000000000000000000000000000000000000000..6073b9530ed197d0431ab30ca79ed262f4b910fa GIT binary patch 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 literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 0000000000000000000000000000000000000000..5b5dab2ab7b1c50dea9cfe73dc5a269a92d2d4b4 GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^8bF-F!3HG1q!d*FscKIb$B>N1x91EQ4=4yQ7#`R^ z$vje}bP0l+XkK DSH>_4 literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 0000000000000000000000000000000000000000..ac8b229af950c29356abf64a6c4aa894575445f0 GIT binary patch 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= literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..ad3d6346e00f246102f72f2e026ed0491988b394 GIT binary patch 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 literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..42ccba269b6e91bef12ad0fa18be651b5ef0ee68 GIT binary patch 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& literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..5a46b47cb16631068aee9e0bd61269fc4e95e5cd GIT binary patch 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 literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 0000000000000000000000000000000000000000..7c9fa6c6edcfcdd3e5b77e6f547b719e6fc66e30 G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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 literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..09d1cdc856c292c4ab6dd818c7543ac0828bd616 GIT binary patch literal 4369 zcmd^?`8O2)_s3@pGmLE*`#M>&Z`mr_kcu#tBo!IbqU=l7VaSrbQrTh%5m}S08Obh0 zGL{*mi8R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>#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 literal 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..59bd45b907c4fd965697774ce8c5fc6b2fd9c105 GIT binary patch literal 4369 zcmd^?`8O2)_s3^p#%>toqJ#RmwV2==ic*rz7lOw=eaq=H~;_ux21)-Jpcgw zdj+hrf&W^f<%Qk9Zpqf#;jH;N^Z%VA?R|9m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 0 HcmV?d00001 diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..2ab019b73ec11a485fa09378f3a0e155194f6a5d GIT binary patch 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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PXp2AsbMUGc*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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/facter_dot_d_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/facter_dot_d_spec.rb new file mode 100755 index 0000000000..2fb72b29ef --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/facter_dot_d_spec.rb @@ -0,0 +1,32 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/pe_version_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/pe_version_spec.rb new file mode 100755 index 0000000000..931c6d4b0a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/pe_version_spec.rb @@ -0,0 +1,76 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/root_home_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/root_home_spec.rb new file mode 100755 index 0000000000..73eb3eada8 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/root_home_spec.rb @@ -0,0 +1,52 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/util/puppet_settings_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/util/puppet_settings_spec.rb new file mode 100755 index 0000000000..e77779bae1 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/facter/util/puppet_settings_spec.rb @@ -0,0 +1,36 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb new file mode 100755 index 0000000000..a016b685c3 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/provider/file_line/ruby_spec.rb @@ -0,0 +1,225 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/anchor_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/anchor_spec.rb new file mode 100755 index 0000000000..f92065f79b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/anchor_spec.rb @@ -0,0 +1,11 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb new file mode 100755 index 0000000000..ab5b81bb96 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb @@ -0,0 +1,70 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/file_line.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/file_line.pp new file mode 100644 index 0000000000..eea693e15e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/file_line.pp @@ -0,0 +1,9 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/has_interface_with.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/has_interface_with.pp new file mode 100644 index 0000000000..e1f1353cdd --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/has_interface_with.pp @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_address.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_address.pp new file mode 100644 index 0000000000..8429a88553 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_address.pp @@ -0,0 +1,3 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_network.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_network.pp new file mode 100644 index 0000000000..a15d8c011b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/has_ip_network.pp @@ -0,0 +1,4 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/init.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/init.pp new file mode 100644 index 0000000000..9675d8374b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/stdlib/tests/init.pp @@ -0,0 +1 @@ +include stdlib diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/.fixtures.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/.fixtures.yml new file mode 100644 index 0000000000..3f18ef2fca --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/.fixtures.yml @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/.nodeset.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/.nodeset.yml new file mode 100644 index 0000000000..c9a6e5a3e2 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/.nodeset.yml @@ -0,0 +1,27 @@ +--- +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/.travis.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/.travis.yml new file mode 100644 index 0000000000..bc96a165e5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/.travis.yml @@ -0,0 +1,31 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/Changelog b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/Changelog new file mode 100644 index 0000000000..ea933f5dbc --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/Changelog @@ -0,0 +1,119 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/Gemfile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/Gemfile new file mode 100644 index 0000000000..ba9a19d533 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/Gemfile @@ -0,0 +1,26 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/Modulefile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/Modulefile new file mode 100644 index 0000000000..80d47f2267 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/Modulefile @@ -0,0 +1,11 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/README.md b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/README.md new file mode 100644 index 0000000000..b454cd9307 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/README.md @@ -0,0 +1,127 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/Rakefile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/Rakefile new file mode 100644 index 0000000000..cd592af48f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/Rakefile @@ -0,0 +1,28 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb new file mode 100644 index 0000000000..6d34d5d547 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/array2csv.rb @@ -0,0 +1,36 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb new file mode 100644 index 0000000000..5371328f2f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/lib/puppet/parser/functions/hash2csv.rb @@ -0,0 +1,40 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/config.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/config.pp new file mode 100644 index 0000000000..93713729e8 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/config.pp @@ -0,0 +1,72 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp new file mode 100644 index 0000000000..fd52d6e4da --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/eventlistener.pp @@ -0,0 +1,118 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp new file mode 100644 index 0000000000..633b024917 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/fcgi_program.pp @@ -0,0 +1,117 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/group.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/group.pp new file mode 100644 index 0000000000..45cb29cf29 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/group.pp @@ -0,0 +1,30 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/init.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/init.pp new file mode 100644 index 0000000000..1d2d55148d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/init.pp @@ -0,0 +1,128 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/install.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/install.pp new file mode 100644 index 0000000000..31a63f3b59 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/install.pp @@ -0,0 +1,10 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/params.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/params.pp new file mode 100644 index 0000000000..f9d82e5804 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/params.pp @@ -0,0 +1,57 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/pip.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/pip.pp new file mode 100644 index 0000000000..71dd3653da --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/pip.pp @@ -0,0 +1,28 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/program.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/program.pp new file mode 100644 index 0000000000..617a68ab20 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/program.pp @@ -0,0 +1,113 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/reload.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/reload.pp new file mode 100644 index 0000000000..e5a4637e43 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/reload.pp @@ -0,0 +1,21 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/service.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/service.pp new file mode 100644 index 0000000000..f02a0d0a08 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/service.pp @@ -0,0 +1,12 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp new file mode 100644 index 0000000000..ec4dbed933 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/manifests/supervisorctl.pp @@ -0,0 +1,29 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml new file mode 100644 index 0000000000..f8d4013a31 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-i386.yml @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml new file mode 100644 index 0000000000..7535c104af --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/centos-65-x64.yml @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml new file mode 100644 index 0000000000..d1233aa83d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-i386.yml @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml new file mode 100644 index 0000000000..5b87870a90 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/debian-73-x64.yml @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml new file mode 100644 index 0000000000..5b87870a90 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/nodesets/default.yml @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb new file mode 100644 index 0000000000..47d052a4ee --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/acceptance/supervisord_spec.rb @@ -0,0 +1,114 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb new file mode 100644 index 0000000000..b845920f6f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/classes/supervisord_spec.rb @@ -0,0 +1,299 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb new file mode 100644 index 0000000000..1083b8a323 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/eventlistener_spec.rb @@ -0,0 +1,86 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb new file mode 100644 index 0000000000..e01311be70 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/fcgi_program_spec.rb @@ -0,0 +1,88 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/group_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/group_spec.rb new file mode 100644 index 0000000000..ba8d70196c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/group_spec.rb @@ -0,0 +1,22 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb new file mode 100644 index 0000000000..e32c24ab2d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/program_spec.rb @@ -0,0 +1,86 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb new file mode 100644 index 0000000000..33cfd75efe --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/defines/supervisorctl.rb @@ -0,0 +1,13 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/functions/array2csv_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/functions/array2csv_spec.rb new file mode 100644 index 0000000000..dd8dffa07e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/functions/array2csv_spec.rb @@ -0,0 +1,8 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/functions/hash2csv_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/functions/hash2csv_spec.rb new file mode 100644 index 0000000000..68f04a6445 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/functions/hash2csv_spec.rb @@ -0,0 +1,8 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper.rb new file mode 100644 index 0000000000..745ad4a549 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper.rb @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb new file mode 100644 index 0000000000..dcae2850d2 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/spec/spec_helper_acceptance.rb @@ -0,0 +1,24 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb new file mode 100644 index 0000000000..9875c8ef5b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/conf/eventlistener.erb @@ -0,0 +1,88 @@ +[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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb new file mode 100644 index 0000000000..98a7fb1cb3 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/conf/fcgi_program.erb @@ -0,0 +1,96 @@ +[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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/conf/group.erb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/conf/group.erb new file mode 100644 index 0000000000..478a02e450 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/conf/group.erb @@ -0,0 +1,5 @@ +[group:<%= @name %>] +programs=<%= @progstring %> +<% if @priority -%> +priority=<%= @priority %> +<% end -%> diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/conf/program.erb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/conf/program.erb new file mode 100644 index 0000000000..78002c87ca --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/conf/program.erb @@ -0,0 +1,89 @@ +[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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/defaults.erb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/defaults.erb new file mode 100644 index 0000000000..232f5356da --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/defaults.erb @@ -0,0 +1,10 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/init.erb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/init.erb new file mode 100644 index 0000000000..bff9857257 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/init/Debian/init.erb @@ -0,0 +1,133 @@ +#! /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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/defaults.erb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/defaults.erb new file mode 100644 index 0000000000..0d7862d023 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/defaults.erb @@ -0,0 +1,8 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/init.erb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/init.erb new file mode 100644 index 0000000000..dabb278451 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/init/RedHat/init.erb @@ -0,0 +1,113 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_inet.erb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_inet.erb new file mode 100644 index 0000000000..9f04cb2477 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_inet.erb @@ -0,0 +1,13 @@ +[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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb new file mode 100644 index 0000000000..8ab8fee51d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_main.erb @@ -0,0 +1,34 @@ +[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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb new file mode 100644 index 0000000000..39e8519991 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/templates/supervisord_unix.erb @@ -0,0 +1,15 @@ +[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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/tests/group.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/tests/group.pp new file mode 100644 index 0000000000..3d340460df --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/tests/group.pp @@ -0,0 +1,4 @@ +supervisord::group { 'mygroup': + priority => 100, + program => ['program1', 'program2', 'program3'] +} \ No newline at end of file diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/tests/init.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/tests/init.pp new file mode 100644 index 0000000000..48bc1f4798 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/tests/init.pp @@ -0,0 +1,5 @@ +class { 'supervisord': + install_pip => true, + install_init => true, + nocleanup => true, +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/tests/program.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/tests/program.pp new file mode 100644 index 0000000000..0d45ebe1b3 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/supervisord/tests/program.pp @@ -0,0 +1,35 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/ChangeLog b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/ChangeLog new file mode 100644 index 0000000000..a91a0e2cf4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/ChangeLog @@ -0,0 +1,29 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/Gemfile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/Gemfile new file mode 100644 index 0000000000..d4c141f5a3 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/Gemfile @@ -0,0 +1,8 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/LICENSE b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/LICENSE new file mode 100644 index 0000000000..49a6e5c401 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/LICENSE @@ -0,0 +1,14 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/Modulefile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/Modulefile new file mode 100644 index 0000000000..2d9f13ff73 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/Modulefile @@ -0,0 +1,8 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/README.md b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/README.md new file mode 100644 index 0000000000..554bcfa0f1 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/README.md @@ -0,0 +1,58 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/Rakefile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/Rakefile new file mode 100644 index 0000000000..184b9b5915 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/Rakefile @@ -0,0 +1,7 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/manifests/base.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/manifests/base.pp new file mode 100644 index 0000000000..f7a9513146 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/manifests/base.pp @@ -0,0 +1,26 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/manifests/init.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/manifests/init.pp new file mode 100644 index 0000000000..379e69136c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/manifests/init.pp @@ -0,0 +1,66 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/metadata.json b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/metadata.json new file mode 100644 index 0000000000..237befce80 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/metadata.json @@ -0,0 +1,32 @@ +{ + "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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/spec/classes/sysctl_base_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/spec/classes/sysctl_base_spec.rb new file mode 100644 index 0000000000..a1d47a21e7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/spec/classes/sysctl_base_spec.rb @@ -0,0 +1,9 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/spec/defines/sysctl_init_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/spec/defines/sysctl_init_spec.rb new file mode 100644 index 0000000000..1f8db67cce --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/spec/defines/sysctl_init_spec.rb @@ -0,0 +1,25 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/spec/spec_helper.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/spec/spec_helper.rb new file mode 100644 index 0000000000..dc7e9f4a0e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/spec/spec_helper.rb @@ -0,0 +1,2 @@ +require 'rubygems' +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/templates/sysctl.d-file.erb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/templates/sysctl.d-file.erb new file mode 100644 index 0000000000..843721435a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/templates/sysctl.d-file.erb @@ -0,0 +1,6 @@ +<% if @comment -%> +<% @comment.each do |line| -%> +# <%= line %> +<% end -%> +<% end -%> +<%= @title %> = <%= @value %> diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/tests/base.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/tests/base.pp new file mode 100644 index 0000000000..a4868712ef --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/tests/base.pp @@ -0,0 +1 @@ +include sysctl::base diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/tests/init.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/tests/init.pp new file mode 100644 index 0000000000..402615bb79 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/sysctl/tests/init.pp @@ -0,0 +1,3 @@ +sysctl { 'net.ipv4.ip_forward': value => '1' } +sysctl { 'net.core.somaxconn': value => '65536' } +sysctl { 'vm.swappiness': ensure => absent } diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/.travis.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/.travis.yml new file mode 100644 index 0000000000..1c5e71b98d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/.travis.yml @@ -0,0 +1,31 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/CHANGELOG b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/CHANGELOG new file mode 100644 index 0000000000..8142f5d6e4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/CHANGELOG @@ -0,0 +1,41 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/Gemfile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/Gemfile new file mode 100644 index 0000000000..5def829220 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/Gemfile @@ -0,0 +1,22 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/LICENSE b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/LICENSE new file mode 100644 index 0000000000..2ee80c8ec8 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/LICENSE @@ -0,0 +1,17 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/Modulefile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/Modulefile new file mode 100644 index 0000000000..d2bbe92959 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/Modulefile @@ -0,0 +1,4 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.BZR.markdown b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.BZR.markdown new file mode 100644 index 0000000000..cc257e9fdf --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.BZR.markdown @@ -0,0 +1,47 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.CVS.markdown b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.CVS.markdown new file mode 100644 index 0000000000..3bdd59da4f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.CVS.markdown @@ -0,0 +1,66 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.GIT.markdown b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.GIT.markdown new file mode 100644 index 0000000000..846bdcc294 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.GIT.markdown @@ -0,0 +1,95 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.HG.markdown b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.HG.markdown new file mode 100644 index 0000000000..55ceef4acc --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.HG.markdown @@ -0,0 +1,73 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.SVN.markdown b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.SVN.markdown new file mode 100644 index 0000000000..f374094c1d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.SVN.markdown @@ -0,0 +1,62 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.markdown b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.markdown new file mode 100644 index 0000000000..848725630a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/README.markdown @@ -0,0 +1,32 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/Rakefile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/Rakefile new file mode 100644 index 0000000000..cd3d379958 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/Rakefile @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/rake_tasks' diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/branch.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/branch.pp new file mode 100644 index 0000000000..0ed0705ee8 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/branch.pp @@ -0,0 +1,6 @@ +vcsrepo { '/tmp/vcstest-bzr-branch': + ensure => present, + provider => bzr, + source => 'lp:do', + revision => '1312', +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/init_repo.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/init_repo.pp new file mode 100644 index 0000000000..1129dd7d05 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/bzr/init_repo.pp @@ -0,0 +1,4 @@ +vcsrepo { '/tmp/vcstest-bzr-init': + ensure => present, + provider => bzr, +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/local.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/local.pp new file mode 100644 index 0000000000..155742e34d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/local.pp @@ -0,0 +1,11 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/remote.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/remote.pp new file mode 100644 index 0000000000..eb9665a92e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/cvs/remote.pp @@ -0,0 +1,5 @@ +vcsrepo { '/tmp/vcstest-cvs-workspace-remote': + ensure => present, + provider => cvs, + source => ':pserver:anonymous@cvs.sv.gnu.org:/sources/leetcvrt', +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/git/bare_init.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/git/bare_init.pp new file mode 100644 index 0000000000..4166f6e696 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/git/bare_init.pp @@ -0,0 +1,4 @@ +vcsrepo { '/tmp/vcstest-git-bare': + ensure => bare, + provider => git, +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/git/clone.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/git/clone.pp new file mode 100644 index 0000000000..b29a4fdbef --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/git/clone.pp @@ -0,0 +1,5 @@ +vcsrepo { '/tmp/vcstest-git-clone': + ensure => present, + provider => git, + source => 'git://github.com/bruce/rtex.git', +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/git/working_copy_init.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/git/working_copy_init.pp new file mode 100644 index 0000000000..e3352eb7c7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/git/working_copy_init.pp @@ -0,0 +1,4 @@ +vcsrepo { '/tmp/vcstest-git-wc': + ensure => present, + provider => git, +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/clone.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/clone.pp new file mode 100644 index 0000000000..be2d955de5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/clone.pp @@ -0,0 +1,6 @@ +vcsrepo { '/tmp/vcstest-hg-clone': + ensure => present, + provider => hg, + source => 'http://hg.basho.com/riak', + revision => 'riak-0.5.3', +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/init_repo.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/init_repo.pp new file mode 100644 index 0000000000..a890804049 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/hg/init_repo.pp @@ -0,0 +1,4 @@ +vcsrepo { '/tmp/vcstest-hg-init': + ensure => present, + provider => hg, +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/checkout.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/checkout.pp new file mode 100644 index 0000000000..f9fc2730f5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/checkout.pp @@ -0,0 +1,5 @@ +vcsrepo { '/tmp/vcstest-svn-checkout': + ensure => present, + provider => svn, + source => 'http://svn.edgewall.org/repos/babel/trunk', +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/server.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/server.pp new file mode 100644 index 0000000000..de7c390f9f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/examples/svn/server.pp @@ -0,0 +1,4 @@ +vcsrepo { '/tmp/vcstest-svn-server': + ensure => present, + provider => svn, +} diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo.rb new file mode 100644 index 0000000000..8793e632cb --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo.rb @@ -0,0 +1,42 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/bzr.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/bzr.rb new file mode 100644 index 0000000000..6688ce87b2 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/bzr.rb @@ -0,0 +1,85 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/cvs.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/cvs.rb new file mode 100644 index 0000000000..206e73295e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/cvs.rb @@ -0,0 +1,137 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/dummy.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/dummy.rb new file mode 100644 index 0000000000..f7b4e54b89 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/dummy.rb @@ -0,0 +1,12 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/git.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/git.rb new file mode 100644 index 0000000000..47e84d29ec --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/git.rb @@ -0,0 +1,323 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/hg.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/hg.rb new file mode 100644 index 0000000000..4886b7a1f8 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/hg.rb @@ -0,0 +1,115 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/svn.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/svn.rb new file mode 100644 index 0000000000..e0d5b2164e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/provider/vcsrepo/svn.rb @@ -0,0 +1,124 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/type/vcsrepo.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/type/vcsrepo.rb new file mode 100644 index 0000000000..ad90cedd83 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/lib/puppet/type/vcsrepo.rb @@ -0,0 +1,198 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/bzr_version_info.txt b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/bzr_version_info.txt new file mode 100644 index 0000000000..88a56a1c80 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/bzr_version_info.txt @@ -0,0 +1,5 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_a.txt b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_a.txt new file mode 100644 index 0000000000..2c99829d48 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_a.txt @@ -0,0 +1,14 @@ + 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_feature_bar.txt b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_feature_bar.txt new file mode 100644 index 0000000000..72d5e2009c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_feature_bar.txt @@ -0,0 +1,14 @@ + 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_none.txt b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_none.txt new file mode 100644 index 0000000000..7207c37929 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/git_branch_none.txt @@ -0,0 +1,15 @@ + 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_parents.txt b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_parents.txt new file mode 100644 index 0000000000..46173df499 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_parents.txt @@ -0,0 +1,6 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_tags.txt b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_tags.txt new file mode 100644 index 0000000000..53792e5ac8 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/hg_tags.txt @@ -0,0 +1,18 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/svn_info.txt b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/svn_info.txt new file mode 100644 index 0000000000..d2a975b238 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/fixtures/svn_info.txt @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/spec.opts b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/spec.opts new file mode 100644 index 0000000000..91cd6427ed --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/spec.opts @@ -0,0 +1,6 @@ +--format +s +--colour +--loadby +mtime +--backtrace diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/spec_helper.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/spec_helper.rb new file mode 100644 index 0000000000..acfae0cb8c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/spec_helper.rb @@ -0,0 +1,13 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/support/filesystem_helpers.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/support/filesystem_helpers.rb new file mode 100644 index 0000000000..15e2ca750a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/support/filesystem_helpers.rb @@ -0,0 +1,18 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/support/fixture_helpers.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/support/fixture_helpers.rb new file mode 100644 index 0000000000..8a0e0a0b4c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/support/fixture_helpers.rb @@ -0,0 +1,7 @@ +module FixtureHelpers + + def fixture(name, ext = '.txt') + File.read(File.join(File.dirname(__FILE__), '..', 'fixtures', name.to_s + ext)) + end + +end diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/bzr_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/bzr_spec.rb new file mode 100644 index 0000000000..488ddc0f90 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/bzr_spec.rb @@ -0,0 +1,109 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb new file mode 100644 index 0000000000..efa4b33b36 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb @@ -0,0 +1,115 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/git_spec.rb new file mode 100644 index 0000000000..15fee53565 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/git_spec.rb @@ -0,0 +1,369 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/hg_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/hg_spec.rb new file mode 100644 index 0000000000..7fd53486a7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/hg_spec.rb @@ -0,0 +1,122 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/svn_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/svn_spec.rb new file mode 100644 index 0000000000..f44e314a56 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/provider/vcsrepo/svn_spec.rb @@ -0,0 +1,105 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/type/README.markdown b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/type/README.markdown new file mode 100644 index 0000000000..1ee19ac840 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/vcsrepo/spec/unit/puppet/type/README.markdown @@ -0,0 +1,4 @@ +Resource Type Specs +=================== + +Define specs for your resource types in this directory. diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/.fixtures.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/.fixtures.yml new file mode 100644 index 0000000000..bb90cc1488 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/.fixtures.yml @@ -0,0 +1,10 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/.gemfile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/.gemfile new file mode 100644 index 0000000000..49ea04a491 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/.gemfile @@ -0,0 +1,7 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/.project b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/.project new file mode 100644 index 0000000000..13cd06f922 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/.project @@ -0,0 +1,23 @@ + + + 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/.travis.yml b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/.travis.yml new file mode 100644 index 0000000000..dffeca9874 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/.travis.yml @@ -0,0 +1,21 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/LICENSE b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/LICENSE new file mode 100644 index 0000000000..f41da01857 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/LICENSE @@ -0,0 +1,17 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/Modulefile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/Modulefile new file mode 100644 index 0000000000..69820b86e0 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/Modulefile @@ -0,0 +1,9 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/README.md b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/README.md new file mode 100644 index 0000000000..cb254401bf --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/README.md @@ -0,0 +1,132 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/Rakefile b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/Rakefile new file mode 100644 index 0000000000..f0d1465cdc --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/Rakefile @@ -0,0 +1,5 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-CentOS-6 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-CentOS-6 new file mode 100644 index 0000000000..bd863d8e21 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-CentOS-6 @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBE4P06MBEACqn48FZgYkG2QrtU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soDee3m4khg9gEm+/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-EPEL b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-EPEL new file mode 100644 index 0000000000..7a2030489d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-EPEL @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 +JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B +M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn +XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbC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8P5+tVdq8 +wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J +l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG +iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR +XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== +=V/6I +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-RBEL b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-RBEL new file mode 100644 index 0000000000..152fd79900 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-RBEL @@ -0,0 +1,36 @@ +-----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+7TTNv44LJpGT7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pacI7CM3aGV1q7NXiCE4oWS/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-beta b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-beta new file mode 100644 index 0000000000..b86da23906 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-beta @@ -0,0 +1,28 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEWfBuERBACrwDH+6QvpyaOgzhXiemsIX+q4HlhX/HDmrmZOUd7i9VmZNogP +6LRRiTygn2+UphaGV3NDA36ZB/1JRpgvgpzbpZNeAoFvsljIbxGIwkH2JgRF6oNo +eGB3QYzDQJvYVIejk79M0ed3oor4w8OiNVcdxLyVIthFrjrrCqwRP3bLZwCgtY9t +Ezf5WL63Ue45vdht7A2GH+0D/iNAnWKsU7FUMFZrcwMaMbyP7YG8z0+zXUOgtgyP +tbgJG5yikNT3vJypb42gbKfcriUUDC5AeiRmkR8QPvYuOm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TEXL0p3K0WE+LfyTr9EVG5 +=mH0S +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-kbsingh b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-kbsingh new file mode 100644 index 0000000000..f8c688e5f4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-kbsingh @@ -0,0 +1,25 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-remi b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-remi new file mode 100644 index 0000000000..3283386064 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-remi @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.7 (GNU/Linux) + +mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 +/JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA +/2a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0cvNmY7rvbyiJydyLsSxh/la6HKw== +=6Rbg +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-rpmforge-dag new file mode 100644 index 0000000000..8ee27f45b9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-rpmforge-dag @@ -0,0 +1,32 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-webtatic-andy b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-webtatic-andy new file mode 100644 index 0000000000..317b802b56 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY-webtatic-andy @@ -0,0 +1,30 @@ +-----BEGIN PGP PU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sRxCDZF8W +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY.atrpms b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY.atrpms new file mode 100644 index 0000000000..860ace4d24 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RPM-GPG-KEY.atrpms @@ -0,0 +1,20 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RubyWorks.GPG.key b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RubyWorks.GPG.key new file mode 100644 index 0000000000..b91a5a8876 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Amazon.3/rpm-gpg/RubyWorks.GPG.key @@ -0,0 +1,30 @@ +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4mNRtRcZz3gYa+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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.4/rpm-gpg/RPM-GPG-KEY-EPEL b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.4/rpm-gpg/RPM-GPG-KEY-EPEL new file mode 100644 index 0000000000..5a13bb4f9f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.4/rpm-gpg/RPM-GPG-KEY-EPEL @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF +l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/ +QB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IE3hx2exEOkDdvq+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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-CentOS-5 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-CentOS-5 new file mode 100644 index 0000000000..2627d31d8f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-CentOS-5 @@ -0,0 +1,28 @@ +-----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 +qKbDBh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C KEY BLOCK----- + diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-EPEL b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-EPEL new file mode 100644 index 0000000000..5a13bb4f9f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-EPEL @@ -0,0 +1,30 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-RBEL b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-RBEL new file mode 100644 index 0000000000..152fd79900 --- /dev/null +++ b/vagrant/v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54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-beta b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-beta new file mode 100644 index 0000000000..b86da23906 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-beta @@ -0,0 +1,28 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-kbsingh b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-kbsingh new file mode 100644 index 0000000000..f8c688e5f4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-kbsingh @@ -0,0 +1,25 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEIu6hwRBACOz2JFa1nW+seAKlVGOu0ykhdFVNI9E4/Abp2+8nsJIZyUwLAp +ei76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xLi3x4HhK/8MTsxniEkEGBECAAkFAkIu6hwC +GwwACgkQMA29nj4Tz1tHSgCcDgKL4swEu7ShvI8nZt2JLmTKB5QAn0qZi2zbexbi +DX+bbalHM+xVnXZN +=rZT6 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-remi b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-remi new file mode 100644 index 0000000000..3283386064 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-remi @@ -0,0 +1,24 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-rpmforge-dag new file mode 100644 index 0000000000..8ee27f45b9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-rpmforge-dag @@ -0,0 +1,32 @@ +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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lPsMV6swADBQP9H42sss6mlqnJEFA97Fl3V9s+7UVJoAIA5uSVXxEOwVoh +Vq7uECQRvWzif6tzOY+vHkUxOBRvD6oIU6tlmuG3WByKyA1d0MTqMr3eWieSYf/L +n5VA9NuD7NwjFA1kLkoDwfSbsF51LppTMkUggzwgvwE46MB6yyuqAVI1kReAWw+I +RgQYEQIABgUCP0kxPwAKCRCiDlIUa4155oktAKDAzm9QYbDpk6SrQhkSFy016BjE +BACeJU1hpElFnUZCL4yKj4EuLnlo8kc= +=mqUt +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-webtatic-andy b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-webtatic-andy new file mode 100644 index 0000000000..317b802b56 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY-webtatic-andy @@ -0,0 +1,30 @@ +-----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 +8U2GBADz6uEeP3YwJAuL7pi77AalxR0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 +Q0sGz0xP+dPiAKDUNJ5rkB9CRoMH9BC35d0fqXXeugCgwl/HYv52dWgatbyEGLet +etv5Qeg= +=nIAo +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.art b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.art new file mode 100644 index 0000000000..825424e1f3 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.art @@ -0,0 +1,24 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.atrpms b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.atrpms new file mode 100644 index 0000000000..860ace4d24 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RPM-GPG-KEY.atrpms @@ -0,0 +1,20 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RubyWorks.GPG.key b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/RubyWorks.GPG.key new file mode 100644 index 0000000000..b91a5a8876 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.5/rpm-gpg/R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9 +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-CentOS-6 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-CentOS-6 new file mode 100644 index 0000000000..bd863d8e21 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-CentOS-6 @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBE4P06MBEACqn48FZgYkG2QrtUAVDV58H6LpDYEcTcv4CIFSkgs6dJ9TavCW +NyPBZRpM2R+Rg5eVqlborp7TmktBP/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bu7IC5Z1wrcj559qcp9C94IwQQO+LxLwg4kHffvZjCaOXDRiya +h8KGsEDuiqwjU9HgGq9fa0Ceo3OyUazUi+WnOxBLVIQ8cUZJJ2Ia5PDnEsz59kCp +JmBZaYPxUEteMtG3yDTa8c8jUnJtMPpkwpSkeMBeNr/rEH4YcBoxuFjppHzQpJ7G +hZRbOfY8w97TgJbfDElwTX0/xX9ypsmBezgGoOvOkzP9iCy9YUBc9q/SNnflRWPO +sMVrjec0vc6ffthu2xBdigBXhL7x2bphWzTXf2T067k+JOdoh5EGney6LhQzcp8m +YCTENStCR+L/5XwrvNgRBnoXe4e0ZHet1CcCuBCBvSmsPHp5ml21ahsephnHx+rl +JNGtzulnNP07RyfzQcpCNFH7W4lXzqM= +=jrWY +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-EPEL b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-EPEL new file mode 100644 index 0000000000..7a2030489d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-EPEL @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 +JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B +M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn +XtxOAvQmAbR9z6Q/h/D+Y/PhoIJp1OV4VNHCbCs9M7HUVBpgC53PDcTUQuwcgeY6 +pQgo9eT1eLNSZVrJ5Bctivl1UcD6P6CIGkk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cvBHYRZA5J +l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG +iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR +XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== +=V/6I +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-PGDG b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-PGDG new file mode 100644 index 0000000000..8722c21cbd --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-PGDG @@ -0,0 +1,31 @@ +-----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 +KXxgtYj0NvuUV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HDzMTtaDAKCaM1m3Cbd+AZ0NGWNg/VvIX9MsPA== +=au6K +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-RBEL b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-RBEL new file mode 100644 index 0000000000..152fd79900 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-RBEL @@ -0,0 +1,36 @@ +-----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 +BBMRAgArAhsDBQkGE0x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xXPNl18W4R8qPqayrAFqdkgMJ +Jn8j2E8rmGYnssSfjck2kLtvNdTEAMjFnhg+oUapUzJAVeterudiWZFNrtn9ewnf +8SUiiYJlxb+nz545zo0gQIhJBBgRAgAJBQJGeqm2AhsMAAoJEI7D10/zRb50PJEA +mwTA+Sp3wvzwDr8sk7W7U4bBfw26AKCVoYw3mfTime+j3mFk1yk1yxjE2Q== +=iyOs +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-beta b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-beta new file mode 100644 index 0000000000..b86da23906 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-beta @@ -0,0 +1,28 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-kbsingh b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-kbsingh new file mode 100644 index 0000000000..f8c688e5f4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-kbsingh @@ -0,0 +1,25 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-remi b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-remi new file mode 100644 index 0000000000..3283386064 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-remi @@ -0,0 +1,24 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag new file mode 100644 index 0000000000..8ee27f45b9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag @@ -0,0 +1,32 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-webtatic-andy b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-webtatic-andy new file mode 100644 index 0000000000..317b802b56 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY-webtatic-andy @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQGiBE1e+1MRBAD8j+KyOIpGNRN39gNy2E/1HG4ZoLFuxIOxI5/1FEuZB/GjYF5m +DvJerZukd0QCqCs72J6J+uWnfD/52t2XWTw4IHPpCWeyr9TWex3uOYmrYzY+0l0l +qsCsrhT0XGkAE0+/20oEP2+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xdd1bjjfza +Pq8GmPp8SSsiTPUCoSlzojxL3Z05RNbvKVzxzxbYdx5h5XOTflI7bAHTY4AzGSDf +WaFljjCucht/d7u5empAd02haldUXWjT9RvY5RwnRZ+hjI47e+wUA0FMLHYtA1/0 +cwEIvpp2xwF/jpH3ODmnIGEeNoLyzAV7X0KAlSN8VRsh7igZRB9TRGI67aTjRgk8 +ayf/QNxAzwEk1MeDv67IFKNYVolxHCt4CtqISQQYEQIACQUCTV77UwIbDAAKCRC3 +Q0sGz0xP+dPiAKDUNJ5rkB9CRoMH9BC35d0fqXXeugCgwl/HYv52dWgatbyEGLet +etv5Qeg= +=nIAo +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.art b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.art new file mode 100644 index 0000000000..825424e1f3 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.art @@ -0,0 +1,24 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.atrpms b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RPM-GPG-KEY.atrpms new file mode 100644 index 0000000000..860ace4d24 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-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=23Fz +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RubyWorks.GPG.key b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RubyWorks.GPG.key new file mode 100644 index 0000000000..b91a5a8876 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/CentOS.6/rpm-gpg/RubyWorks.GPG.key @@ -0,0 +1,30 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-CentOS-5 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-CentOS-5 new file mode 100644 index 0000000000..2627d31d8f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-CentOS-5 @@ -0,0 +1,28 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-EPEL b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-EPEL new file mode 100644 index 0000000000..7a2030489d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-EPEL @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.5 (GNU/Linux) + +mQINBEvSKUIBEADLGnUj24ZVKW7liFN/JA5CgtzlNnKs7sBg7fVbNWryiE3URbn1 +JXvrdwHtkKyY96/ifZ1Ld3lE2gOF61bGZ2CWwJNee76Sp9Z+isP8RQXbG5jwj/4B +M9HK7phktqFVJ8VbY2jfTjcfxRvGM8YBwXF8hx0CDZURAjvf1xRSQJ7iAo58qcHn +XtxOAvQmAbR9z6Q/h/D+Y/P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QXFIOyNiJFAOT2j8P5+tVdq8 +wB0PDSH8yRpn4HdJ9RYquau4OkjluxOWf0uRaS//SUcCZh+1/KBEOmcvBHYRZA5J +l/nakCgxGb2paQOzqqpOcHKvlyLuzO5uybMXaipLExTGJXBlXrbbASfXa/yGYSAG +iVrGz9CE6676dMlm8F+s3XXE13QZrXmjloc6jwOljnfAkjTGXjiB7OULESed96MR +XtfLk0W5Ab9pd7tKDR6QHI7rgHXfCopRnZ2VVQ== +=V/6I +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-RBEL b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-RBEL new file mode 100644 index 0000000000..152fd79900 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-RBEL @@ -0,0 +1,36 @@ +-----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 +hg1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sxXVjPOGNuLiwjIpacI7CM3aGV1q7NXiCE4oWS/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-beta b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-beta new file mode 100644 index 0000000000..b86da23906 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-beta @@ -0,0 +1,28 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEWfBuERBACrwDH+6QvpyaOgzhXiemsIX+q4HlhX/HDmrmZOUd7i9VmZNogP +6LRRiTygn2+UphaGV3NDA36ZB/1JRpgvgpzbpZNeAoFvsljIbxGIwkH2JgRF6oNo +eGB3QYzDQJvYVIejk79M0ed3oor4w8OiNVcdxLyVIthFrjrrCqwRP3bLZwCgtY9t +Ezf5WL63Ue45vdht7A2GH+0D/iNAnWKsU7FUMFZrcwMaMbyP7YG8z0+zXUOgtgyP +tbgJG5yikNT3vJypb42gbKfcriUUDC5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O20ma +D0IAoLRRQLTEXL0p3K0WE+LfyTr9EVG5 +=mH0S +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-dawson b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-dawson new file mode 100644 index 0000000000..c71c504754 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-dawson @@ -0,0 +1,25 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-beta b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-beta new file mode 100644 index 0000000000..7b40671a4c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-beta @@ -0,0 +1,61 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQINBEmkAzABEAC2/c7bP1lHQ3XScxbIk0LQWe1YOiibQBRLwf8Si5PktgtuPibT +kKpZjw8p4D+fM7jD1WUzUE0X7tXg2l/eUlMM4dw6XJAQ1AmEO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u +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former new file mode 100644 index 0000000000..3818b2c926 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former @@ -0,0 +1,37 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release new file mode 100644 index 0000000000..09aded8bec --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release @@ -0,0 +1,24 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx new file mode 100644 index 0000000000..0f875c0e20 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx @@ -0,0 +1,17 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-release b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-release new file mode 100644 index 0000000000..47c6be6700 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-redhat-release @@ -0,0 +1,62 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-remi b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-remi new file mode 100644 index 0000000000..3283386064 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-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2/nvkx+bAcSIcbVm+tShA66ybdZ/gNnkFQKyGD9O8unSXqiELGcP8pcHTHsv +JzdD1k8DhdFNhux/WPRwbo/es6QcpIPa2JPjBCzfOTn9GXVdT4pn5tLG2gHayudK +8Sj1OI2vqGLMQzhxw4hJBBgRAgAJBQJCZ8tdAhsMAAoJEABOb0cA+X9WcSAAn11i +gC5ns/82kSprzBOU0BNwUeXZAJ0cvNmY7rvbyiJydyLsSxh/la6HKw== +=6Rbg +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag new file mode 100644 index 0000000000..8ee27f45b9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-rpmforge-dag @@ -0,0 +1,32 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl new file mode 100644 index 0000000000..70b6bd17ef --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl @@ -0,0 +1,32 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl3 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl3 new file mode 100644 index 0000000000..5d16185468 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl3 @@ -0,0 +1,34 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl4 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl4 new file mode 100644 index 0000000000..14f3096678 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl4 @@ -0,0 +1,34 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl5 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl5 new file mode 100644 index 0000000000..1e1c594ae7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl5 @@ -0,0 +1,34 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl6 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl6 new file mode 100644 index 0000000000..70e93822bc --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY-sl6 @@ -0,0 +1,34 @@ +-----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 +AhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQkV114Jsf01BepACeO7UR33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-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY.atrpms b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY.atrpms new file mode 100644 index 0000000000..860ace4d24 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RPM-GPG-KEY.atrpms @@ -0,0 +1,20 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RubyWorks.GPG.key b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RubyWorks.GPG.key new file mode 100644 index 0000000000..b91a5a8876 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/Scientific.6/rpm-gpg/RubyWorks.GPG.key @@ -0,0 +1,30 @@ +-----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 +tQLIsH8hXvCT2kSAUY6nMGmzPgpgG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9WxLcQEvkA +yOSLb33CweehCrlTnQ== +=scSy +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/empty/.placeholder b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/empty/.placeholder new file mode 100644 index 0000000000..d7c1372506 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/empty/.placeholder @@ -0,0 +1 @@ +# Placeholder for git diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-5 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-5 new file mode 100644 index 0000000000..2627d31d8f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-5 @@ -0,0 +1,28 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-6 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-6 new file mode 100644 index 0000000000..bd863d8e21 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-CentOS-6 @@ -0,0 +1,30 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL new file mode 100644 index 0000000000..5a13bb4f9f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1r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9Gpk822ZpBexQW4y3LGFo9ZSnmu+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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-4 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-4 new file mode 100644 index 0000000000..5a13bb4f9f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-4 @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.6 (GNU/Linux) + +mQGiBEXopTIRBACZDBMOoFOakAjaxw1LXjeSvh/kmE35fU1rXfM7T0AV31NATCLF +l5CQiNDA4oWreDThg2Bf6+LIVTsGQb1V+XXuLak4Em5yTYwMTVB//4/nMxQEbpl/ +QB2XwlJ7EQ0vW+kiPDz/7pHJz1p1jADzd9sQQicMtzysS4qT2i5A23j0VwCg1PB/ +lpYqo0ZhWTrevxKMa1n34FcD/REavj0hSLQFTaKNLHRotRTF8V0BajjSaTkUT4uk +/RTaZ8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fROsAl8fjIq2OzWJ2T +P9sadBe1llUYaow7txYSUxssW+89avct35gIyrBbof5M+CBXyAOUaSWmpM2eub24 +0qbqiSr/Y6Om0t6vSzR8gRk7g+1H6IE0Tt1IJCvCAMimiE8EGBECAA8FAkXopTYC +GwwFCRLMAwAACgkQEZzANiF1IfZQYgCgiZHCv4xb+sTHCn/otc1Ovvi/OgMAnRXY +bbsLFWOfmzAnNIGvFRWy+YHi +=MMNL +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-5 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-5 new file mode 100644 index 0000000000..5a13bb4f9f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-5 @@ -0,0 +1,30 @@ +-----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 +vM6gne3hESyjcqZSmr7yELPPGhI9MNauJ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zAnNIGvFRWy+YHi +=MMNL +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-6 b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-6 new file mode 100644 index 0000000000..7a2030489d --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-EPEL-6 @@ -0,0 +1,29 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-PGDG b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-PGDG new file mode 100644 index 0000000000..8722c21cbd --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/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/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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-RBEL b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-RBEL new file mode 100644 index 0000000000..152fd79900 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-RBEL @@ -0,0 +1,36 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v2.0.14 (GNU/Linux) + +mQGiBEZ6qawRBAC2gDuA1sZioGh1VP/U0l+9Rm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48Hbcn +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-beta b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-beta new file mode 100644 index 0000000000..b86da23906 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/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MMwQikYBIvy +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-elrepo.org b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-elrepo.org new file mode 100644 index 0000000000..fe0c082275 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-elrepo.org @@ -0,0 +1,30 @@ +-----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/gMfKvUBa8xF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fznx +ppuowtBi8bcGB1vJZjTySQcSKWv+IVp5ej06uZ9501BEm6HxUZkuAGPecP65kcQu +5bg7B7LQeI5AWyujqvfuWgAF34xhl9QU/sDWxM3wUog+bw7y8pyWCqnJhp70yx8o +SqzhFygT62eISQQYEQIACQUCSb7/pwIbDAAKCRAwm8MFuq2uUq8PAKC1+E2pSwiS +oHXkKYPYDwApsP1mVACfRe1YnggLYQtG9LMeweVQQC77rK8= +=qyRr +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-kbsingh b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-kbsingh new file mode 100644 index 0000000000..f8c688e5f4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-kbsingh @@ -0,0 +1,25 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-beta b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-beta new file mode 100644 index 0000000000..7b40671a4c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-beta @@ -0,0 +1,61 @@ +-----BEG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P2LBu9N4KvXlZp4voykwuuaJ+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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former new file mode 100644 index 0000000000..3818b2c926 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-former @@ -0,0 +1,37 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release new file mode 100644 index 0000000000..09aded8bec --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-release @@ -0,0 +1,24 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx new file mode 100644 index 0000000000..0f875c0e20 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-legacy-rhx @@ -0,0 +1,17 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-release b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-release new file mode 100644 index 0000000000..47c6be6700 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-redhat-release @@ -0,0 +1,62 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-remi b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-remi new file mode 100644 index 0000000000..3283386064 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-remi @@ -0,0 +1,24 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-rpmforge-dag b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-rpmforge-dag new file mode 100644 index 0000000000..8ee27f45b9 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-rpmforge-dag @@ -0,0 +1,32 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-sl b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-sl new file mode 100644 index 0000000000..70b6bd17ef --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-sl @@ -0,0 +1,32 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-webtatic-andy b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-webtatic-andy new file mode 100644 index 0000000000..317b802b56 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY-webtatic-andy @@ -0,0 +1,30 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.art b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.art new file mode 100644 index 0000000000..825424e1f3 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.art @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.2.1 (GNU/Linux) + +mQGiBEGP+skRBACyZz7muj2OgWc9FxK+Hj7t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eeOewFF10iEYEGBECAAYFAkGP+swACgkQMqlRFF69J0Sq +nQCfa/q9Y/oY4dOTGj6MsdmRIQkKZhYAoIscjinFwTru4FVi2MIEzUUMToDK +=NOIx +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.atrpms b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.atrpms new file mode 100644 index 0000000000..860ace4d24 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RPM-GPG-KEY.atrpms @@ -0,0 +1,20 @@ +-----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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RubyWorks.GPG.key b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RubyWorks.GPG.key new file mode 100644 index 0000000000..b91a5a8876 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/rpm-gpg/RubyWorks.GPG.key @@ -0,0 +1,30 @@ +-----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/4iemhq4D5Jp6r1Kv3aKS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AJBQJGOUEV +AhsMAAoJEHM/KlUQbeB0O7QAn09h4qrKPhWD9eaiyMRS5YeARTYgAJ9WxLcQEvkA +yOSLb33CweehCrlTnQ== +=scSy +-----END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/yum-updatesd.conf b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/yum-updatesd.conf new file mode 100644 index 0000000000..39181c9d6e --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/files/yum-updatesd.conf @@ -0,0 +1,20 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/cron.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/cron.pp new file mode 100644 index 0000000000..5b404a0b18 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/cron.pp @@ -0,0 +1,47 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/defaults.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/defaults.pp new file mode 100644 index 0000000000..5d2a072d05 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/defaults.pp @@ -0,0 +1,49 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/init.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/init.pp new file mode 100644 index 0000000000..c4617f420b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/init.pp @@ -0,0 +1,329 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/managed_yumrepo.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/managed_yumrepo.pp new file mode 100644 index 0000000000..bc74acda90 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/managed_yumrepo.pp @@ -0,0 +1,77 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/params.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/params.pp new file mode 100644 index 0000000000..708793bad0 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/params.pp @@ -0,0 +1,62 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/plugin.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/plugin.pp new file mode 100644 index 0000000000..6e5d372ace --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/plugin.pp @@ -0,0 +1,54 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/prerequisites.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/prerequisites.pp new file mode 100644 index 0000000000..def976ff39 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/prerequisites.pp @@ -0,0 +1,21 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/10gen.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/10gen.pp new file mode 100644 index 0000000000..3f6bbf5d47 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/10gen.pp @@ -0,0 +1,12 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/atomic.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/atomic.pp new file mode 100644 index 0000000000..13a24149dd --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/atomic.pp @@ -0,0 +1,16 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/atrpms.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/atrpms.pp new file mode 100644 index 0000000000..dce3b67d47 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/atrpms.pp @@ -0,0 +1,17 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centalt.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centalt.pp new file mode 100644 index 0000000000..238b1e19c5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centalt.pp @@ -0,0 +1,21 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centos4.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centos4.pp new file mode 100644 index 0000000000..7d0330d906 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centos4.pp @@ -0,0 +1,61 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centos5.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centos5.pp new file mode 100644 index 0000000000..c48cccdefc --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centos5.pp @@ -0,0 +1,124 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centos6.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centos6.pp new file mode 100644 index 0000000000..ddfdaf46fe --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centos6.pp @@ -0,0 +1,108 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centos_testing.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centos_testing.pp new file mode 100644 index 0000000000..a71f311bcb --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/centos_testing.pp @@ -0,0 +1,23 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/ceph.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/ceph.pp new file mode 100644 index 0000000000..33449ecf50 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/ceph.pp @@ -0,0 +1,20 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch10.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch10.pp new file mode 100644 index 0000000000..d55e812073 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch10.pp @@ -0,0 +1,15 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch90.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch90.pp new file mode 100644 index 0000000000..50e312ebab --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/elasticsearch90.pp @@ -0,0 +1,15 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/elrepo.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/elrepo.pp new file mode 100644 index 0000000000..60ae3e0a6c --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/elrepo.pp @@ -0,0 +1,105 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/epel.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/epel.pp new file mode 100644 index 0000000000..4039d81ebd --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/epel.pp @@ -0,0 +1,132 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/foreman.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/foreman.pp new file mode 100644 index 0000000000..b62b4c7747 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/foreman.pp @@ -0,0 +1,18 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/integ_ganeti.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/integ_ganeti.pp new file mode 100644 index 0000000000..f43eb97062 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/integ_ganeti.pp @@ -0,0 +1,69 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage5.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage5.pp new file mode 100644 index 0000000000..3cf0a6c88f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage5.pp @@ -0,0 +1,49 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage6.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage6.pp new file mode 100644 index 0000000000..373006d1a8 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/jpackage6.pp @@ -0,0 +1,17 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/karan.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/karan.pp new file mode 100644 index 0000000000..96059ec375 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/karan.pp @@ -0,0 +1,44 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/logstash13.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/logstash13.pp new file mode 100644 index 0000000000..9e6ca82c70 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/logstash13.pp @@ -0,0 +1,15 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/mongodb.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/mongodb.pp new file mode 100644 index 0000000000..9b2f6968af --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/mongodb.pp @@ -0,0 +1,15 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/monitoringsucks.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/monitoringsucks.pp new file mode 100644 index 0000000000..8ebea58a5f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/monitoringsucks.pp @@ -0,0 +1,16 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/newrelic.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/newrelic.pp new file mode 100644 index 0000000000..3d81ae09a0 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/newrelic.pp @@ -0,0 +1,15 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/nginx.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/nginx.pp new file mode 100644 index 0000000000..c361aa33cd --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/nginx.pp @@ -0,0 +1,16 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/openstack_grizzly.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/openstack_grizzly.pp new file mode 100644 index 0000000000..175916194f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/openstack_grizzly.pp @@ -0,0 +1,15 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/passenger.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/passenger.pp new file mode 100644 index 0000000000..c80d668bbe --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/passenger.pp @@ -0,0 +1,20 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg91.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg91.pp new file mode 100644 index 0000000000..89fe7c9cf4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg91.pp @@ -0,0 +1,18 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg92.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg92.pp new file mode 100644 index 0000000000..fe2dc057e6 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg92.pp @@ -0,0 +1,18 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg93.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg93.pp new file mode 100644 index 0000000000..c3064ba12f --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/pgdg93.pp @@ -0,0 +1,18 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetdevel.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetdevel.pp new file mode 100644 index 0000000000..1e553bedb4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetdevel.pp @@ -0,0 +1,27 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetlabs.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetlabs.pp new file mode 100644 index 0000000000..0b3f5ea996 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/puppetlabs.pp @@ -0,0 +1,36 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/rbel.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/rbel.pp new file mode 100644 index 0000000000..85d22bff89 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/rbel.pp @@ -0,0 +1,20 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/remi.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/remi.pp new file mode 100644 index 0000000000..f27d6c9a29 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/remi.pp @@ -0,0 +1,25 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/remi_php55.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/remi_php55.pp new file mode 100755 index 0000000000..13a9412f5a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/remi_php55.pp @@ -0,0 +1,15 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforge.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforge.pp new file mode 100644 index 0000000000..b43e57dc56 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforge.pp @@ -0,0 +1,18 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforgeextras.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforgeextras.pp new file mode 100644 index 0000000000..5242b5849a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/repoforgeextras.pp @@ -0,0 +1,17 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/rpmforge.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/rpmforge.pp new file mode 100644 index 0000000000..d6c048d2f4 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/rpmforge.pp @@ -0,0 +1,17 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/sl5.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/sl5.pp new file mode 100644 index 0000000000..39f2633641 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/sl5.pp @@ -0,0 +1,77 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/sl6.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/sl6.pp new file mode 100644 index 0000000000..4e2daa4e45 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/sl6.pp @@ -0,0 +1,74 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/tmz.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/tmz.pp new file mode 100644 index 0000000000..f53ba9a0f3 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/tmz.pp @@ -0,0 +1,27 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/varnish.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/varnish.pp new file mode 100644 index 0000000000..75cc458475 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/varnish.pp @@ -0,0 +1,17 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/vfabric.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/vfabric.pp new file mode 100644 index 0000000000..7e7847de31 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/vfabric.pp @@ -0,0 +1,20 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/virtualbox.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/virtualbox.pp new file mode 100644 index 0000000000..171acf2df3 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/virtualbox.pp @@ -0,0 +1,18 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/webtatic.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/webtatic.pp new file mode 100644 index 0000000000..adf9c5d8f1 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/repo/webtatic.pp @@ -0,0 +1,19 @@ +# = 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/updatesd.pp b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/updatesd.pp new file mode 100644 index 0000000000..264541d2a5 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/manifests/updatesd.pp @@ -0,0 +1,50 @@ +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/spec/classes/yum_spec.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/spec/classes/yum_spec.rb new file mode 100644 index 0000000000..62d9f9c65a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/spec/classes/yum_spec.rb @@ -0,0 +1,23 @@ +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/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/spec/spec_helper.rb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/spec/spec_helper.rb new file mode 100644 index 0000000000..2c6f56649a --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/spec/spec_helper.rb @@ -0,0 +1 @@ +require 'puppetlabs_spec_helper/module_spec_helper' diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/templates/yum-cron.erb b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/templates/yum-cron.erb new file mode 100644 index 0000000000..f4f5971a83 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/puppet/modules/yum/templates/yum-cron.erb @@ -0,0 +1,62 @@ +# +# 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/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/execute-files.sh b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/execute-files.sh new file mode 100644 index 0000000000..10949c4814 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/execute-files.sh @@ -0,0 +1,31 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/hostsupdater-notice.txt b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/hostsupdater-notice.txt new file mode 100644 index 0000000000..ce3331b3ce --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/hostsupdater-notice.txt @@ -0,0 +1,4 @@ +=============================================================================== +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/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/important-notices.sh b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/important-notices.sh new file mode 100644 index 0000000000..bd1bb95cab --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/important-notices.sh @@ -0,0 +1,9 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/important-notices.txt b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/important-notices.txt new file mode 100644 index 0000000000..0dc384f1e0 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/important-notices.txt @@ -0,0 +1,57 @@ + _ + / ) + .--.; | _...,-"""-, + .-""-.-""""-. / _`'-._.' /` \ + /' \ \| (/'-._/ ) ; + .-""""-; ( '--' /-' _ | + .' | ; e / a , ; + / \ | __.'`-.__, ; / + / `._ ; .-' `--.,__.\ /` + //| \ \,-' /\_.' + // | `;.___> /,-'. + /`| / |`\ _..---\ | \ + |/ / _,.-----\ | \ /`| | |\ \ + / .; | | | \ / | | | \ ) + | / | \ / |\..' \ \ | \ \..' + jgs \../ \.../ \.../ \.../---' \.../ + +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! + +* A unique private key was generated for you! It is located at + "puphpet/files/dot/ssh/id_rsa". If you are on Windows, a PuTTY-friendly key + was also generated at same location with a ".ppk" extension. +* If you want to use your own private key for future provisions, overwrite the + generated key above with your own. Make sure to follow the naming pattern, + and include a ".pub" public key. +* If you wish to add packages, modules, Apache/Nginx vhosts, or anything else, + open up "puphpet/config.yaml" and make changes within! Some things will + have random strings like "DIdXRs2OI2LJ" - you must create a random string + as well! To do so, please apply face to keyboard and roll. +* If you change "puphpet/config.yaml", simple run "$ vagrant provision" and + your VM will be updated with the changes you requested! + +Did something go wrong? Don't worry! I can (maybe) help! Please go to our +Github issues page at https://github.com/puphpet/puphpet/issues and search for +your problem. If you do not find your problem answered, open a new ticket! + +---------------------------------------------------------------------------- +PLEASE REMEMBER TO INCLUDE THE CONTENTS OF YOUR "puphpet/config.yaml" FILE. +---------------------------------------------------------------------------- + +Make sure to xxx out any potential API keys or passwords that you do not want +others to see! + +Happy programming! + - Juan Treminio + +┈╭━━━━━━━━━━━━┳━━╮┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ + ┃ ╭╯ ┃ ▋┃╭━┓ ____ _ _ _ _ +╭┫ ┃ ┃ ┃┃╭┛ | _ \ ___ __ _ __| | / \ | |__ _____ _____| | +┃┃ ╰━━╯ ┃╰╯┃ | |_) / _ \/ _` |/ _` | / _ \ | '_ \ / _ \ \ / / _ \ | +╯┃ ╰┳━╯ | _ < __/ (_| | (_| | / ___ \| |_) | (_) \ V / __/_| + ┃ ┃ |_| \_\___|\__,_|\__,_| /_/ \_\_.__/ \___/ \_/ \___(_) + ┃ ┏━┳━━━━━━━┓ ┏ ┃ +▔┗━┻━┛▔▔▔▔▔▔▔┗━┻━┛▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/initial-setup.sh b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/initial-setup.sh new file mode 100644 index 0000000000..7821843791 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/initial-setup.sh @@ -0,0 +1,109 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/os-detect.sh b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/os-detect.sh new file mode 100644 index 0000000000..3f679008fe --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/os-detect.sh @@ -0,0 +1,49 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/self-promotion.txt b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/self-promotion.txt new file mode 100644 index 0000000000..8cd11701e7 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/self-promotion.txt @@ -0,0 +1,6 @@ + + ____ ____ _ _ ____ _ generated using + | _ \ _ _| _ \| | | | _ \ ___| |_ ___ ___ _ __ ___ + | |_) | | | | |_) | |_| | |_) / _ \ __| / __/ _ \| '_ ` _ \ + | __/| |_| | __/| _ | __/ __/ |_ | (_| (_) | | | | | | + |_| \__,_|_| |_| |_|_| \___|\__(_)___\___/|_| |_| |_| diff --git a/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/ssh-keygen.sh b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/ssh-keygen.sh new file mode 100644 index 0000000000..ef00495b2b --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/ssh-keygen.sh @@ -0,0 +1,80 @@ +#!/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/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/update-puppet.sh b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/update-puppet.sh new file mode 100644 index 0000000000..f8c1f5d225 --- /dev/null +++ b/vagrant/vms/phraseanet-php54-nginx/puphpet/shell/update-puppet.sh @@ -0,0 +1,43 @@ +#!/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