Skip to content

Commit f8f5afb

Browse files
author
eBay Golden Balls
committed
lots of changes
1 parent 7d167a1 commit f8f5afb

File tree

209 files changed

+14607
-2732
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+14607
-2732
lines changed

ECP.iml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,46 @@
33
<component name="NewModuleRootManager" inherit-compiler-output="true">
44
<exclude-output />
55
<content url="file://$MODULE_DIR$" />
6-
<orderEntry type="jdk" jdkName="RVM: ruby-1.9.3-p194" jdkType="RUBY_SDK" />
6+
<orderEntry type="jdk" jdkName="RVM: ruby-1.9.3-p327 (1)" jdkType="RUBY_SDK" />
77
<orderEntry type="sourceFolder" forTests="false" />
8+
<orderEntry type="library" scope="PROVIDED" name="activemodel (v3.2.9, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
9+
<orderEntry type="library" scope="PROVIDED" name="activerecord (v3.2.9, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
10+
<orderEntry type="library" scope="PROVIDED" name="activesupport (v3.2.9, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
11+
<orderEntry type="library" scope="PROVIDED" name="addressable (v2.3.2, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
12+
<orderEntry type="library" scope="PROVIDED" name="arel (v3.0.2, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
13+
<orderEntry type="library" scope="PROVIDED" name="builder (v3.0.4, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
14+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.2.3, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
15+
<orderEntry type="library" scope="PROVIDED" name="capistrano (v2.13.5, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
16+
<orderEntry type="library" scope="PROVIDED" name="capybara (v2.0.1, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
17+
<orderEntry type="library" scope="PROVIDED" name="childprocess (v0.3.6, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
18+
<orderEntry type="library" scope="PROVIDED" name="cucumber (v1.2.1, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
19+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.1.3, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
20+
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.2.0, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
21+
<orderEntry type="library" scope="PROVIDED" name="gherkin (v2.11.5, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
22+
<orderEntry type="library" scope="PROVIDED" name="highline (v1.6.15, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
23+
<orderEntry type="library" scope="PROVIDED" name="i18n (v0.6.1, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
24+
<orderEntry type="library" scope="PROVIDED" name="json (v1.7.5, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
25+
<orderEntry type="library" scope="PROVIDED" name="libwebsocket (v0.1.7.1, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
26+
<orderEntry type="library" scope="PROVIDED" name="mime-types (v1.19, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
27+
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.5.0, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
28+
<orderEntry type="library" scope="PROVIDED" name="mysql2 (v0.3.11, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
29+
<orderEntry type="library" scope="PROVIDED" name="net-scp (v1.0.4, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
30+
<orderEntry type="library" scope="PROVIDED" name="net-sftp (v2.0.5, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
31+
<orderEntry type="library" scope="PROVIDED" name="net-ssh (v2.6.2, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
32+
<orderEntry type="library" scope="PROVIDED" name="net-ssh-gateway (v1.1.0, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
33+
<orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.5.5, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
34+
<orderEntry type="library" scope="PROVIDED" name="rack (v1.4.1, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
35+
<orderEntry type="library" scope="PROVIDED" name="rack-test (v0.6.2, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
36+
<orderEntry type="library" scope="PROVIDED" name="rake (v10.0.3, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
37+
<orderEntry type="library" scope="PROVIDED" name="rspec (v2.12.0, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
38+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v2.12.2, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
39+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v2.12.0, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
40+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v2.12.0, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
41+
<orderEntry type="library" scope="PROVIDED" name="rubyzip (v0.9.9, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
42+
<orderEntry type="library" scope="PROVIDED" name="selenium-webdriver (v2.27.2, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
43+
<orderEntry type="library" scope="PROVIDED" name="tzinfo (v0.3.35, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
44+
<orderEntry type="library" scope="PROVIDED" name="websocket (v1.0.4, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
45+
<orderEntry type="library" scope="PROVIDED" name="xpath (v1.0.0, RVM: ruby-1.9.3-p327 (1)) [gem]" level="application" />
846
</component>
947
</module>
1048

Gemfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
source :rubygems
2+
3+
gem 'rake'
4+
gem 'activerecord'
5+
gem 'capistrano'
6+
gem 'mysql2'
7+
8+
group :development, :test do
9+
gem 'cucumber'
10+
gem 'capybara'
11+
gem 'rspec'
12+
gem 'selenium-webdriver'
13+
end

README

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
PHP MD README
2+
---------------
3+
4+
This document
5+
6+
The build is ready to pass the following
7+
8+
1) functional tests - cucumber
9+
2) php md tests - phpmd
10+
3) phpunit tests - phpunit
11+
12+
All available in the build/config folder, just run execute.php
13+

build/config/cucumber/execute.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
cukeExecutor::execute();
4+
5+
class cukeExecutor {
6+
7+
public static function execute(){
8+
self::setWorkingDirectory();
9+
self::performTests(); }
10+
11+
private function setWorkingDirectory(){
12+
$scriptLocation = dirname(__FILE__).'/../../tests/';
13+
chdir($scriptLocation); }
14+
15+
private function performTests(){
16+
$command = 'cucumber';
17+
self::executeAndOutput($command); }
18+
19+
private static function executeAndOutput($command) {
20+
$outputArray = array();
21+
exec($command, $outputArray);
22+
echo "\nOutput for Command $command:\n";
23+
foreach ($outputArray as $outputValue) {
24+
echo "$outputValue\n"; } }
25+
26+
}
27+
28+
?>

build/config/phpmd/execute.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
phpMDExecutor::execute();
4+
5+
class phpMDExecutor {
6+
7+
public static function execute(){
8+
self::setWorkingDirectory();
9+
self::performTests(); }
10+
11+
private function setWorkingDirectory(){
12+
$scriptLocation = dirname(__FILE__);
13+
chdir($scriptLocation); }
14+
15+
private function performTests(){
16+
$basePath = str_replace('build/config/phpmd', "", dirname(__FILE__));
17+
$command = 'phpmd '.dirname(__FILE__).'/../../../src/ html '.dirname(__FILE__).'/rules/standard.xml ';
18+
$command .= ' --exclude '.$basePath.'src/Core/View.php';
19+
$command .= ' --reportfile '.dirname(__FILE__).'/../../reports/phpmd/index.html';
20+
self::executeAndOutput($command); }
21+
22+
private static function executeAndOutput($command) {
23+
$outputArray = array();
24+
exec($command, $outputArray);
25+
echo "\nOutput for Command $command:\n";
26+
foreach ($outputArray as $outputValue) {
27+
echo "$outputValue\n"; } }
28+
29+
}
30+
31+
?>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0"?>
2+
<ruleset
3+
name="Dave PHP MD Rules"
4+
xmlns="http://pmd.sf.net/ruleset/1.0.0"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
7+
xsi:noNamespaceSchemaLocation=" http://pmd.sf.net/ruleset_xml_schema.xsd">
8+
<description>My PHP MD Rule Set</description>
9+
10+
<!-- Import the entire unused code rule set -->
11+
<rule ref="rulesets/codesize.xml" />
12+
<rule ref="rulesets/unusedcode.xml" />
13+
<rule ref="rulesets/naming.xml" >
14+
<exclude name="ShortVariable" />
15+
</rule>
16+
<rule ref="rulesets/design.xml" />
17+
18+
</ruleset>

build/config/phpunit/execute.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
phpUnitExecutor::execute();
4+
5+
class phpUnitExecutor {
6+
7+
public static function execute(){
8+
self::setWorkingDirectory();
9+
self::performUnitTests(); }
10+
11+
private function setWorkingDirectory(){
12+
$scriptLocation = dirname(__FILE__);
13+
chdir($scriptLocation); }
14+
15+
private function performUnitTests(){
16+
$command = 'phpunit --coverage-html ../../reports/phpunit/ ../../tests/phpunit/';
17+
self::executeAndOutput($command); }
18+
19+
private static function executeAndOutput($command) {
20+
$outputArray = array();
21+
exec($command, $outputArray);
22+
echo "\nOutput for Command $command:\n";
23+
foreach ($outputArray as $outputValue) {
24+
echo "$outputValue\n"; } }
25+
26+
}
27+
28+
?>
450 KB
Loading

build/reports/phpmd/index.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<html><head><title>PHPMD</title></head><body>
2+
<center><h1>PHPMD report</h1></center><center><h2>Problems found</h2></center>
3+
<table align="center" cellspacing="0" cellpadding="3"><tr><th>#</th><th>File</th><th>Line</th><th>Problem</th><tr>
4+
<tr bgcolor="lightgrey">
5+
<td align="center">1</td>
6+
<td>/var/www/ebayFun/ebaycodepractice/src/ECPForm/RegistrationForm.php</td>
7+
<td align="center" width="5%">16</td>
8+
<td><a href="http://phpmd.org/rules/codesize.html#npathcomplexity">The method setPostBindValidators() has an NPath complexity of 625. The configured NPath complexity threshold is 200.</a></td>
9+
</tr>
10+
<tr>
11+
<td align="center">2</td>
12+
<td>/var/www/ebayFun/ebaycodepractice/src/ECPForm/RegistrationForm.php</td>
13+
<td align="center" width="5%">44</td>
14+
<td><a href="http://phpmd.org/rules/unusedcode.html#unusedprivatemethod">Avoid unused private methods such as 'addValidatorForEMail'.</a></td>
15+
</tr>
16+
<tr bgcolor="lightgrey">
17+
<td align="center">3</td>
18+
<td>/var/www/ebayFun/ebaycodepractice/src/ECPForm/RegistrationForm.php</td>
19+
<td align="center" width="5%">53</td>
20+
<td><a href="http://phpmd.org/rules/unusedcode.html#unusedprivatemethod">Avoid unused private methods such as 'addValidatorForUserPass'.</a></td>
21+
</tr>
22+
<tr>
23+
<td align="center">4</td>
24+
<td>/var/www/ebayFun/ebaycodepractice/src/ECPForm/RegistrationForm.php</td>
25+
<td align="center" width="5%">62</td>
26+
<td><a href="http://phpmd.org/rules/unusedcode.html#unusedprivatemethod">Avoid unused private methods such as 'addValidatorForUserPass2'.</a></td>
27+
</tr>
28+
</table></body></html>

tests/reports/tests.dashboard.html renamed to build/reports/phpunit/build.dashboard.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5-
<title>Dashboard for /var/www/ebayFun/ebayCodePractice/tests</title>
5+
<title>Dashboard for /var/www/ebayFun/ebaycodepractice/build</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<link href="css/bootstrap.min.css" rel="stylesheet">
88
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
99
<link href="css/style.css" rel="stylesheet">
1010
<!--[if lt IE 9]>
11-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
11+
<script src="js/html5shiv.js"></script>
1212
<![endif]-->
1313
</head>
1414
<body>
@@ -17,8 +17,8 @@
1717
<div class="row">
1818
<div class="span12">
1919
<ul class="breadcrumb">
20-
<li><a href="index.html">/var/www/ebayFun/ebayCodePractice</a> <span class="divider">/</span></li>
21-
<li><a href="tests.html">tests</a></li>
20+
<li><a href="index.html">/var/www/ebayFun/ebaycodepractice</a> <span class="divider">/</span></li>
21+
<li><a href="build.html">build</a></li>
2222
<li class="active">(Dashboard)</li>
2323

2424
</ul>
@@ -53,7 +53,7 @@ <h2>Least Tested Methods</h2>
5353
</div>
5454
<footer>
5555
<p>
56-
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.2.2</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10-1ubuntu3.4</a> and <a href="http://phpunit.de/">PHPUnit 3.7.1</a> at Sat Dec 1 0:37:20 UTC 2012.</small>
56+
<small>Generated by <a href="http://github.com/sebastianbergmann/php-code-coverage" target="_top">PHP_CodeCoverage 1.2.7</a> using <a href="http://www.php.net/" target="_top">PHP 5.3.10-1ubuntu3.4</a> and <a href="http://phpunit.de/">PHPUnit 3.7.10</a> at Thu Dec 27 16:10:37 UTC 2012.</small>
5757
</p>
5858
</footer>
5959
</div>
@@ -108,7 +108,7 @@ <h2>Least Tested Methods</h2>
108108
}
109109
},
110110
series: [{
111-
data: [[100,1,"<a href=\"tests_bootstrap.php.html#15\">bootStrapForTests<\/a>"]],
111+
data: [[100,2,"<a href=\"build_tests_phpunit_bootstrap.php.html#15\">bootStrapForTests<\/a>"]],
112112
marker: {
113113
symbol: 'diamond'
114114
}

0 commit comments

Comments
 (0)