Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
druid628 committed Dec 28, 2011
0 parents commit 2c35d1f
Show file tree
Hide file tree
Showing 29 changed files with 467 additions and 0 deletions.
17 changes: 17 additions & 0 deletions LICENSE
@@ -0,0 +1,17 @@
Copyright (c) 2011, Micah Breedlove
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

<> Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
<> Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# BSD LICENSE - 2011 Blue Shamrock Development
Empty file added README.md
Empty file.
21 changes: 21 additions & 0 deletions config/bsdImporterPluginConfiguration.class.php
@@ -0,0 +1,21 @@
<?php

/**
* bsdImporterPlugin configuration.
*
* @package bsdImporterPlugin
* @subpackage config
* @author druid628
* @version SVN: $Id: PluginConfiguration.class.php 17207 2009-04-10 15:36:26Z Kris.Wallsmith $
*/
class bsdImporterPluginConfiguration extends sfPluginConfiguration
{
const VERSION = '1.0.0-DEV';

/**
* @see sfPluginConfiguration
*/
public function initialize()
{
}
}
46 changes: 46 additions & 0 deletions package.xml.tmpl
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="##ENCODING##"?>
<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.4.1" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>bsdImporterPlugin</name>
<channel>plugins.symfony-project.org</channel>
<summary>##SUMMARY##</summary>
<description>##SUMMARY##</description>
<lead>
<name>##LEAD_NAME##</name>
<user>##LEAD_USERNAME##</user>
<email>##LEAD_EMAIL##</email>
<active>yes</active>
</lead>
<date>##CURRENT_DATE##</date>
<version>
<release>##PLUGIN_VERSION##</release>
<api>##API_VERSION##</api>
</version>
<stability>
<release>##STABILITY##</release>
<api>##STABILITY##</api>
</stability>
<license uri="http://www.symfony-project.org/license">MIT license</license>
<notes>-</notes>
<contents>
##CONTENTS##
</contents>
<dependencies>
<required>
<php>
<min>5.2.4</min>
</php>
<pearinstaller>
<min>1.4.1</min>
</pearinstaller>
<package>
<name>symfony</name>
<channel>pear.symfony-project.com</channel>
<min>1.3.0</min>
<max>2.0.0</max>
<exclude>2.0.0</exclude>
</package>
</required>
</dependencies>
<phprelease></phprelease>
<changelog></changelog>
</package>
8 changes: 8 additions & 0 deletions test/bin/prove.php
@@ -0,0 +1,8 @@
<?php

include dirname(__FILE__).'/../bootstrap/unit.php';

$h = new lime_harness(new lime_output_color());
$h->register(sfFinder::type('file')->name('*Test.php')->in(dirname(__FILE__).'/..'));

exit($h->run() ? 0 : 1);
21 changes: 21 additions & 0 deletions test/bootstrap/functional.php
@@ -0,0 +1,21 @@
<?php

if (!isset($app))
{
$app = 'frontend';
}

require_once $_SERVER['SYMFONY'].'/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();

function bsdImporterPlugin_cleanup()
{
sfToolkit::clearDirectory(dirname(__FILE__).'/../fixtures/project/cache');
sfToolkit::clearDirectory(dirname(__FILE__).'/../fixtures/project/log');
}
bsdImporterPlugin_cleanup();
register_shutdown_function('bsdImporterPlugin_cleanup');

require_once dirname(__FILE__).'/../fixtures/project/config/ProjectConfiguration.class.php';
$configuration = ProjectConfiguration::getApplicationConfiguration($app, 'test', isset($debug) ? $debug : true);
sfContext::createInstance($configuration);
30 changes: 30 additions & 0 deletions test/bootstrap/unit.php
@@ -0,0 +1,30 @@
<?php

if (!isset($_SERVER['SYMFONY']))
{
throw new RuntimeException('Could not find symfony core libraries.');
}

require_once $_SERVER['SYMFONY'].'/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();

$configuration = new sfProjectConfiguration(dirname(__FILE__).'/../fixtures/project');
require_once $configuration->getSymfonyLibDir().'/vendor/lime/lime.php';

function bsdImporterPlugin_autoload_again($class)
{
$autoload = sfSimpleAutoload::getInstance();
$autoload->reload();
return $autoload->autoload($class);
}
spl_autoload_register('bsdImporterPlugin_autoload_again');

if (file_exists($config = dirname(__FILE__).'/../../config/bsdImporterPluginConfiguration.class.php'))
{
require_once $config;
$plugin_configuration = new bsdImporterPluginConfiguration($configuration, dirname(__FILE__).'/../..', 'bsdImporterPlugin');
}
else
{
$plugin_configuration = new sfPluginConfigurationGeneric($configuration, dirname(__FILE__).'/../..', 'bsdImporterPlugin');
}
5 changes: 5 additions & 0 deletions test/fixtures/project/apps/frontend/config/app.yml
@@ -0,0 +1,5 @@
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/11-App

# default values
#all:
7 changes: 7 additions & 0 deletions test/fixtures/project/apps/frontend/config/cache.yml
@@ -0,0 +1,7 @@
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/09-Cache

default:
enabled: false
with_layout: false
lifetime: 86400
42 changes: 42 additions & 0 deletions test/fixtures/project/apps/frontend/config/factories.yml
@@ -0,0 +1,42 @@
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/05-Factories

prod:
logger:
class: sfNoLogger
param:
level: err
loggers: ~

test:
storage:
class: sfSessionTestStorage
param:
session_path: %SF_TEST_CACHE_DIR%/sessions

response:
class: sfWebResponse
param:
send_http_headers: false

mailer:
param:
delivery_strategy: none

dev:
mailer:
param:
delivery_strategy: none

all:
routing:
class: sfPatternRouting
param:
generate_shortest_url: true
extra_parameters_as_query_string: true

view_cache_manager:
class: sfViewCacheManager
param:
cache_key_use_vary_headers: true
cache_key_use_host_name: true
10 changes: 10 additions & 0 deletions test/fixtures/project/apps/frontend/config/filters.yml
@@ -0,0 +1,10 @@
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/12-Filters

rendering: ~
security: ~

# insert your own filters here

cache: ~
execution: ~
@@ -0,0 +1,8 @@
<?php

class frontendConfiguration extends sfApplicationConfiguration
{
public function configure()
{
}
}
16 changes: 16 additions & 0 deletions test/fixtures/project/apps/frontend/config/routing.yml
@@ -0,0 +1,16 @@
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/10-Routing

# default rules
homepage:
url: /
param: { module: default, action: index }

# generic rules
# please, remove them by adding more specific rules
default_index:
url: /:module
param: { action: index }

default:
url: /:module/:action/*
5 changes: 5 additions & 0 deletions test/fixtures/project/apps/frontend/config/security.yml
@@ -0,0 +1,5 @@
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/08-Security

default:
is_secure: false
35 changes: 35 additions & 0 deletions test/fixtures/project/apps/frontend/config/settings.yml
@@ -0,0 +1,35 @@
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/04-Settings

prod:
.settings:
no_script_name: off
logging_enabled: false

dev:
.settings:
error_reporting: <?php echo (E_ALL | E_STRICT)."\n" ?>
web_debug: true
cache: false
no_script_name: false
etag: false

test:
.settings:
error_reporting: <?php echo ((E_ALL | E_STRICT) ^ E_NOTICE)."\n" ?>
cache: false
web_debug: false
no_script_name: false
etag: false

all:
.settings:
# Form security secret (CSRF protection)
csrf_secret: bsdImporterPlugin

# Output escaping settings
escaping_strategy: on
escaping_method: ESC_SPECIALCHARS

# Enable the database manager
use_database: ##USE_DATABASE##
20 changes: 20 additions & 0 deletions test/fixtures/project/apps/frontend/config/view.yml
@@ -0,0 +1,20 @@
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/13-View

default:
http_metas:
content-type: text/html

metas:
#title: symfony project
#description: symfony project
#keywords: symfony, project
#language: en
#robots: index, follow

stylesheets: [main.css]

javascripts: []

has_layout: true
layout: layout
5 changes: 5 additions & 0 deletions test/fixtures/project/apps/frontend/lib/myUser.class.php
@@ -0,0 +1,5 @@
<?php

class myUser extends sfBasicSecurityUser
{
}
14 changes: 14 additions & 0 deletions test/fixtures/project/apps/frontend/templates/layout.php
@@ -0,0 +1,14 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php include_http_metas() ?>
<?php include_metas() ?>
<?php include_title() ?>
<link rel="shortcut icon" href="/favicon.ico" />
<?php include_stylesheets() ?>
<?php include_javascripts() ?>
</head>
<body>
<?php echo $sf_content ?>
</body>
</html>
18 changes: 18 additions & 0 deletions test/fixtures/project/config/ProjectConfiguration.class.php
@@ -0,0 +1,18 @@
<?php

if (!isset($_SERVER['SYMFONY']))
{
throw new RuntimeException('Could not find symfony core libraries.');
}

require_once $_SERVER['SYMFONY'].'/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->setPlugins(array('bsdImporterPlugin'));
$this->setPluginPath('bsdImporterPlugin', dirname(__FILE__).'/../../../..');
}
}
4 changes: 4 additions & 0 deletions test/fixtures/project/config/properties.ini
@@ -0,0 +1,4 @@
[symfony]
name=##PROJECT_NAME##
author=##AUTHOR_NAME##
orm=##ORM##
15 changes: 15 additions & 0 deletions test/fixtures/project/config/rsync_exclude.txt
@@ -0,0 +1,15 @@
# Project files
/cache/*
/log/*
/web/*_dev.php
/web/uploads/*

# SCM files
.arch-params
.bzr
_darcs
.git
.hg
.monotone
.svn
CVS
17 changes: 17 additions & 0 deletions test/fixtures/project/data/fixtures/fixtures.yml
@@ -0,0 +1,17 @@
# # Populate this file with data to be loaded by your ORM's *:data-load task.
# # You can create multiple files in this directory (i.e. 010_users.yml,
# # 020_articles.yml, etc) which will be loaded in alphabetical order.
# #
# # See documentation for your ORM's *:data-load task for more information.
#
# User:
# fabien:
# username: fabien
# password: changeme
# name: Fabien Potencier
# email: fabien.potencier@symfony-project.com
# kris:
# username: Kris.Wallsmith
# password: changeme
# name: Kris Wallsmith
# email: kris.wallsmith@symfony-project.com
13 changes: 13 additions & 0 deletions test/fixtures/project/lib/form/BaseForm.class.php
@@ -0,0 +1,13 @@
<?php

/**
* Base project form.
*
* @package ##PROJECT_NAME##
* @subpackage form
* @author ##AUTHOR_NAME##
* @version SVN: $Id: BaseForm.class.php 20147 2009-07-13 11:46:57Z FabianLange $
*/
class BaseForm extends sfFormSymfony
{
}

0 comments on commit 2c35d1f

Please sign in to comment.