This repository has been archived by the owner on Aug 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
install project & prepare bootstrap code (NB! Commiting /vendor direc…
…tory si not recommended in a real life project, only doing this in case I get connectivity problems)
- Loading branch information
Showing
654 changed files
with
71,767 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/app/cache/* | ||
|
||
# In a real project you would probably want to uncomment this | ||
# I just wanted to avoid potential problems with connectivity | ||
# /vendor/ | ||
# composer.phar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
use Silex\Application; | ||
|
||
class AppKernel extends Application | ||
{ | ||
public function __construct(array $values = array()) | ||
{ | ||
parent::__construct($values); | ||
|
||
$app = $this; | ||
$app['debug'] = true; | ||
|
||
// Twig | ||
$app->register(new Silex\Provider\TwigServiceProvider(), array( | ||
'twig.path' => __DIR__.'/../app/views', | ||
'twig.options' => array('cache' => __DIR__.'/../app/cache'), | ||
)); | ||
|
||
// Routing in templates | ||
$app->register(new Silex\Provider\UrlGeneratorServiceProvider()); | ||
|
||
// Doctrine DBAL | ||
$app->register(new Silex\Provider\DoctrineServiceProvider(), array( | ||
'db.options' => array( | ||
'driver' => 'pdo_mysql', | ||
'host' => 'localhost', | ||
'dbname' => 'devclub', | ||
'user' => 'root', | ||
), | ||
)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
require_once __DIR__.'/../vendor/autoload.php'; | ||
|
||
$app = new AppKernel(); | ||
|
||
// Init basic schema | ||
// In a real project should probably use database migrations library | ||
$sql = "CREATE TABLE IF NOT EXISTS cars (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id))"; | ||
$app['db']->query($sql); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Devclub - BDD</title> | ||
|
||
<link href="/css/bootstrap.min.css" rel="stylesheet"> | ||
<link href="/css/gh-fork-ribbon.css" rel="stylesheet"> | ||
|
||
<link href="/css/main.css" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<div class="github-fork-ribbon-wrapper right"> | ||
<div class="github-fork-ribbon"> | ||
<a href="https://github.com/Inori">Fork me on GitHub</a> | ||
</div> | ||
</div> | ||
|
||
<div class="container-narrow"> | ||
{% block content %}{% endblock %} | ||
</div> | ||
|
||
<script src="http://code.jquery.com/jquery-latest.js"></script> | ||
<script src="/js/bootstrap.min.js"></script> | ||
<script src="/js/scripts.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% extends '_base.html.twig' %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
default: | ||
extensions: | ||
Behat\MinkExtension\Extension: | ||
default_session: 'goutte' | ||
base_url: 'http://devclub.l/' | ||
javascript_session: 'selenium2' | ||
browser_name: firefox | ||
goutte: ~ | ||
selenium2: ~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env sh | ||
SRC_DIR="`pwd`" | ||
cd "`dirname "$0"`" | ||
cd "../vendor/behat/behat/bin" | ||
BIN_TARGET="`pwd`/behat" | ||
cd "$SRC_DIR" | ||
"$BIN_TARGET" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@ECHO OFF | ||
SET BIN_TARGET=%~dp0\"../vendor/behat/behat/bin"\behat | ||
php "%BIN_TARGET%" %* |
Oops, something went wrong.