kstrano 1.0.12 → 1.1.0.alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,35 @@
1
+ <?php
2
+
3
+ use Symfony\Component\HttpFoundation\Request;
4
+
5
+ // If you don't want to setup permissions the proper way, just uncomment the following PHP line
6
+ // read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
7
+ //umask(0000);
8
+
9
+ // This check prevents access to debug front controllers that are deployed by accident to production servers.
10
+ // Feel free to remove this, extend it, or make something more sophisticated.
11
+
12
+
13
+ if (isset($_SERVER['HTTP_CLIENT_IP'])
14
+ || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
15
+ || ( !in_array(@$_SERVER['REMOTE_ADDR'], array(
16
+ '127.0.0.1',
17
+ '::1',
18
+ '172.18.19.223', //ci.kunstmaan.be
19
+ ))
20
+ && strncmp(@$_SERVER['REMOTE_ADDR'], '172.18', strlen('172.18'))
21
+ )
22
+ ) {
23
+ header('HTTP/1.0 403 Forbidden');
24
+ exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
25
+ }
26
+
27
+ $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
28
+ require_once __DIR__.'/../app/AppKernel.php';
29
+
30
+ $kernel = new AppKernel('test', true);
31
+ $kernel->loadClassCache();
32
+ $request = Request::createFromGlobals();
33
+ $response = $kernel->handle($request);
34
+ $response->send();
35
+ $kernel->terminate($request, $response);
@@ -0,0 +1,17 @@
1
+ default:
2
+ extensions:
3
+ Behat\Symfony2Extension\Extension:
4
+ mink_driver: true
5
+ kernel:
6
+ env: test
7
+ debug: true
8
+ Behat\MinkExtension\Extension:
9
+ base_url: 'http://%hostname%/app_test.php/'
10
+ #javascript_session: sahi
11
+ browser_name: chrome
12
+ sahi:
13
+ goutte: ~
14
+ selenium2: ~
15
+ paths:
16
+ features: features
17
+ bootstrap: %behat.paths.features%/Context
@@ -0,0 +1,210 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <project name="" default="build">
4
+
5
+ <!-- depends on ant-contrib -->
6
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
7
+
8
+ <target name="sync" description="Sync files and database from online">
9
+ <exec executable="${basedir}/sync" failonerror="true" />
10
+ </target>
11
+
12
+ <target name="build" depends="prepare,decodeParam,vendors"/>
13
+
14
+ <target name="test" depends="lint,phploc,pdepend,phpmd-ci,phpcs-ci,phpcpd,phpdox,phpunit,phpcb,behat"/>
15
+
16
+ <target name="build-parallel" depends="prepare,decodeParam,vendors,lint,tools-parallel,phpunit,phpcb"/>
17
+
18
+ <target name="tools-parallel" description="Run tools in parallel">
19
+ <parallel threadCount="2">
20
+ <sequential>
21
+ <antcall target="pdepend"/>
22
+ <antcall target="phpmd-ci"/>
23
+ </sequential>
24
+ <antcall target="phpcpd"/>
25
+ <antcall target="phpcs-ci"/>
26
+ <antcall target="phploc"/>
27
+ <antcall target="phpdox"/>
28
+ </parallel>
29
+ </target>
30
+
31
+ <target name="clean" description="Cleanup build artifacts">
32
+ <delete dir="${basedir}/build/api"/>
33
+ <delete dir="${basedir}/build/code-browser"/>
34
+ <delete dir="${basedir}/build/coverage"/>
35
+ <delete dir="${basedir}/build/logs"/>
36
+ <delete dir="${basedir}/build/pdepend"/>
37
+ <delete dir="${basedir}/build/behat"/>
38
+ <delete dir="${basedir}/app/cache"/>
39
+ </target>
40
+
41
+ <target name="prepare" depends="clean" description="Prepare for build">
42
+ <mkdir dir="${basedir}/build/api"/>
43
+ <mkdir dir="${basedir}/build/code-browser"/>
44
+ <mkdir dir="${basedir}/build/coverage"/>
45
+ <mkdir dir="${basedir}/build/logs"/>
46
+ <mkdir dir="${basedir}/build/pdepend"/>
47
+ <mkdir dir="${basedir}/build/phpdox"/>
48
+ <mkdir dir="${basedir}/build/behat"/>
49
+ <mkdir dir="${basedir}/app/cache"/>
50
+ </target>
51
+
52
+ <target name="lint" description="Perform syntax check of sourcecode files">
53
+ <exec executable="bash" failonerror="true">
54
+ <arg value="-c" />
55
+ <arg value="find -L ${basedir}/src ${basedir}/app -name *.php | grep -v '^${basedir}/app/cache' | xargs -n 1 -P 4 php -l" />
56
+ </exec>
57
+ </target>
58
+
59
+ <target name="phploc" description="Measure project size using PHPLOC">
60
+ <exec executable="phploc">
61
+ <arg value="--log-csv" />
62
+ <arg value="${basedir}/build/logs/phploc.csv" />
63
+ <arg path="${basedir}/src" />
64
+ </exec>
65
+ </target>
66
+
67
+ <target name="pdepend" description="Calculate software metrics using PHP_Depend">
68
+ <exec executable="pdepend">
69
+ <arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml"/>
70
+ <arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg"/>
71
+ <arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg"/>
72
+ <arg path="${basedir}/src"/>
73
+ </exec>
74
+ </target>
75
+
76
+ <target name="phpmd" description="Perform project mess detection using PHPMD and print human readable output. Intended for usage on the command line before committing.">
77
+ <exec executable="phpmd">
78
+ <arg path="${basedir}/src" />
79
+ <arg value="text" />
80
+ <arg value="${basedir}/build/phpmd.xml" />
81
+ </exec>
82
+ </target>
83
+
84
+ <target name="phpmd-ci" description="Perform project mess detection using PHPMD creating a log file for the continuous integration server">
85
+ <exec executable="phpmd">
86
+ <arg path="${basedir}/src" />
87
+ <arg value="xml" />
88
+ <arg value="${basedir}/build/phpmd.xml" />
89
+ <arg value="--reportfile" />
90
+ <arg value="${basedir}/build/logs/pmd.xml" />
91
+ </exec>
92
+ </target>
93
+
94
+ <target name="phpcs" description="Find coding standard violations using PHP_CodeSniffer and print human readable output. Intended for usage on the command line before committing.">
95
+ <exec executable="phpcs">
96
+ <arg value="--standard=Symfony2" />
97
+ <arg value="--ignore=autoload.php"/>
98
+ <arg value="--ignore=*.js"/>
99
+ <arg path="${basedir}/src" />
100
+ </exec>
101
+ </target>
102
+
103
+ <target name="phpcs-ci" description="Find coding standard violations using PHP_CodeSniffer creating a log file for the continuous integration server">
104
+ <exec executable="phpcs" output="/dev/null">
105
+ <arg value="--report=checkstyle" />
106
+ <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
107
+ <arg value="--standard=Symfony2" />
108
+ <arg value="--ignore=autoload.php"/>
109
+ <arg value="--ignore=*.js"/>
110
+ <arg path="${basedir}/src" />
111
+ </exec>
112
+ </target>
113
+
114
+ <target name="phpcpd" description="Find duplicate code using PHPCPD">
115
+ <exec executable="phpcpd">
116
+ <arg value="--log-pmd" />
117
+ <arg value="${basedir}/build/logs/pmd-cpd.xml" />
118
+ <arg path="${basedir}/src" />
119
+ </exec>
120
+ </target>
121
+
122
+ <target name="phpdox"
123
+ description="Generate API documentation using phpDox">
124
+ <exec executable="phpdox">
125
+ <arg line="-f"/>
126
+ <arg line="${basedir}/build/phpdox.xml"/>
127
+ </exec>
128
+ </target>
129
+
130
+ <target name="phpunit" description="Run unit tests with PHPUnit">
131
+ <exec executable="phpunit" failonerror="false">
132
+ <arg value="-c"/>
133
+ <arg value="${basedir}/app/"/>
134
+ </exec>
135
+ </target>
136
+
137
+ <target name="phpcb"
138
+ description="Aggregate tool output with PHP_CodeBrowser">
139
+ <exec executable="phpcb">
140
+ <arg value="--log" />
141
+ <arg path="${basedir}/build/logs" />
142
+ <arg value="--source" />
143
+ <arg path="${basedir}/src" />
144
+ <arg value="--output" />
145
+ <arg path="${basedir}/build/code-browser" />
146
+ </exec>
147
+ </target>
148
+
149
+ <target name="vendors" description="Install vendors">
150
+ <exec executable="composer" failonerror="true">
151
+ <arg value="install"/>
152
+ </exec>
153
+ </target>
154
+
155
+ <target name="init" description="init">
156
+ <exec executable="${basedir}/app/console" failonerror="true">
157
+ <arg value="doctrine:schema:drop"/>
158
+ <arg value="--force"/>
159
+ </exec>
160
+ <exec executable="${basedir}/app/console" failonerror="true">
161
+ <arg value="doctrine:schema:create"/>
162
+ </exec>
163
+ <exec executable="${basedir}/app/console" failonerror="true">
164
+ <arg value="doctrine:fixtures:load"/>
165
+ </exec>
166
+ <exec executable="${basedir}/app/console" failonerror="true">
167
+ <arg value="assets:install"/>
168
+ <arg value="web"/>
169
+ </exec>
170
+ <exec executable="${basedir}/app/console" failonerror="true">
171
+ <arg value="assetic:dump"/>
172
+ </exec>
173
+ </target>
174
+
175
+ <target name="decodeParam" description="Extract the parameters.ini">
176
+ <exec executable="${basedir}/param" failonerror="true">
177
+ <arg value="decode"/>
178
+ </exec>
179
+ </target>
180
+
181
+ <target name="migrations" description="Doctrine migrations">
182
+ <exec executable="${basedir}/app/console" failonerror="false">
183
+ <arg value="doctrine:migrations:migrate"/>
184
+ <arg value="--no-interaction"/>
185
+ </exec>
186
+ </target>
187
+
188
+ <target name="behat">
189
+ <foreach target="behat_inner" param="bundle_path" inheritall="true">
190
+ <path>
191
+ <dirset dir="${basedir}">
192
+ <include name="src/Kunstmaan/Bundle/*"/>
193
+ </dirset>
194
+ </path>
195
+ </foreach>
196
+ </target>
197
+
198
+ <target name="behat_inner">
199
+ <delete dir="${basedir}/build/behat" />
200
+ <mkdir dir="${basedir}/build/behat"/>
201
+ <exec dir="${basedir}" executable="bin/behat" failonerror="false">
202
+ <arg line="${bundle_path}"/>
203
+ <arg line="-f"/>
204
+ <arg line="pretty,junit"/>
205
+ <arg line="--out"/>
206
+ <arg line=",build/behat"/>
207
+ </exec>
208
+ </target>
209
+
210
+ </project>
@@ -0,0 +1,13 @@
1
+ set :model_manager, "doctrine"
2
+ set :shared_children, [log_path, web_path + "/uploads"]
3
+
4
+ # When using Symfony 2.0
5
+ # set :use_composer, false
6
+ # set :vendors_mode, "install"
7
+ # set :update_vendors, true
8
+
9
+ # When using Symfony 2.1
10
+ set :use_composer, true
11
+ set :update_vendors, false
12
+
13
+ set :writable_dirs, ["app/cache", "app/logs"]
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0"?>
2
+ <ruleset name="kunstmaan">
3
+ <description>Kunstmaan's coding standard</description>
4
+
5
+ <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
6
+ <rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
7
+ <rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
8
+ <rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
9
+ <rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
10
+ <rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
11
+
12
+ <rule ref="Generic.Commenting.Todo"/>
13
+
14
+ <rule ref="Generic.ControlStructures.InlineControlStructure"/>
15
+
16
+ <rule ref="Generic.Files.LineEndings"/>
17
+
18
+ <rule ref="Generic.Formatting.DisallowMultipleStatements"/>
19
+ <rule ref="Generic.Formatting.MultipleStatementAlignment"/>
20
+ <rule ref="Generic.Formatting.NoSpaceAfterCast"/>
21
+
22
+ <rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
23
+ <rule ref="PEAR.Functions.ValidDefaultValue"/>
24
+
25
+ <rule ref="Generic.NamingConventions.ConstructorName"/>
26
+ <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
27
+ <rule ref="PEAR.NamingConventions.ValidClassName"/>
28
+
29
+ <rule ref="Generic.PHP.DisallowShortOpenTag"/>
30
+ <rule ref="Generic.PHP.NoSilencedErrors"/>
31
+ <rule ref="Generic.PHP.UpperCaseConstant"/>
32
+
33
+ <rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
34
+ <rule ref="Generic.WhiteSpace.ScopeIndent"/>
35
+ <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
36
+ </ruleset>
@@ -0,0 +1,12 @@
1
+ <phpdox xmlns="http://phpdox.de/config">
2
+ <project name="bancontactcoc" source="src" workdir="build/phpdox">
3
+ <collector publiconly="false">
4
+ <include mask="*.php" />
5
+ <exclude mask="*Autoload.php" />
6
+ </collector>
7
+
8
+ <generator output="build">
9
+ <build engine="html" enabled="true" output="api"/>
10
+ </generator>
11
+ </project>
12
+ </phpdox>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0"?>
2
+
3
+ <ruleset name="kunstmaan" xmlns="http://pmd.sf.net/ruleset/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
4
+ <description>Kunstmaan's ruleset</description>
5
+ <rule ref="rulesets/codesize.xml/CyclomaticComplexity" />
6
+ <rule ref="rulesets/codesize.xml/NPathComplexity" />
7
+ <rule ref="rulesets/codesize.xml/ExcessiveClassComplexity" />
8
+ <rule ref="rulesets/codesize.xml/ExcessiveClassLength" />
9
+ <rule ref="rulesets/codesize.xml/ExcessiveMethodLength" />
10
+ <rule ref="rulesets/codesize.xml/ExcessiveParameterList" />
11
+ <rule ref="rulesets/design.xml/EvalExpression" />
12
+ <rule ref="rulesets/design.xml/ExitExpression" />
13
+ <rule ref="rulesets/design.xml/GotoStatement" />
14
+ <rule ref="rulesets/naming.xml/ConstructorWithNameAsEnclosingClass" />
15
+ <rule ref="rulesets/unusedcode.xml/UnusedFormalParameter" />
16
+ <rule ref="rulesets/unusedcode.xml/UnusedLocalVariable" />
17
+ <rule ref="rulesets/unusedcode.xml/UnusedPrivateField" />
18
+ <rule ref="rulesets/unusedcode.xml/UnusedPrivateMethod" />
19
+ </ruleset>
@@ -0,0 +1,57 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html -->
4
+ <phpunit
5
+ backupGlobals = "false"
6
+ backupStaticAttributes = "false"
7
+ colors = "true"
8
+ convertErrorsToExceptions = "true"
9
+ convertNoticesToExceptions = "true"
10
+ convertWarningsToExceptions = "true"
11
+ processIsolation = "false"
12
+ stopOnFailure = "false"
13
+ syntaxCheck = "false"
14
+ bootstrap = "bootstrap.php.cache" >
15
+
16
+ <testsuites>
17
+ <testsuite name="Project Test Suite">
18
+ <directory>../src/*/*Bundle/Tests</directory>
19
+ <directory>../src/*/Bundle/*Bundle/Tests</directory>
20
+ </testsuite>
21
+ </testsuites>
22
+
23
+ <logging>
24
+ <log type="coverage-html" target="../build/coverage" title="kunstmaan"
25
+ charset="UTF-8" yui="true" highlight="true"
26
+ lowUpperBound="35" highLowerBound="70"/>
27
+ <log type="coverage-clover" target="../build/logs/clover.xml"/>
28
+ <log type="junit" target="../build/logs/junit.xml" logIncompleteSkipped="false"/>
29
+ </logging>
30
+
31
+ <!--
32
+ <php>
33
+ <server name="KERNEL_DIR" value="/path/to/your/app/" />
34
+ </php>
35
+ -->
36
+
37
+ <filter>
38
+ <whitelist>
39
+ <directory>../src</directory>
40
+ <exclude>
41
+ <directory>../src/*/*Bundle/Resources</directory>
42
+ <directory>../src/*/*Bundle/Tests</directory>
43
+ <directory>../src/*/Bundle/*Bundle/Resources</directory>
44
+ <directory>../src/*/Bundle/*Bundle/Tests</directory>
45
+ </exclude>
46
+ </whitelist>
47
+ </filter>
48
+
49
+ <!-- <selenium>
50
+ <browser name="Firefox on localhost"
51
+ browser="*chrome"
52
+ host="localhost"
53
+ port="4444"
54
+ timeout="30000"/>
55
+ </selenium> -->
56
+
57
+ </phpunit>
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kstrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
5
- prerelease:
4
+ version: 1.1.0.alpha.1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Kunstmaan
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-20 00:00:00.000000000 Z
12
+ date: 2013-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capifony
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 2.2.8
21
+ version: 2.2.10
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: 2.2.8
29
+ version: 2.2.10
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: capistrano-ext
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -91,6 +91,22 @@ dependencies:
91
91
  - - ! '>='
92
92
  - !ruby/object:Gem::Version
93
93
  version: 3.5.5.38
94
+ - !ruby/object:Gem::Dependency
95
+ name: railsless-deploy
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 1.1.2
102
+ type: :runtime
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 1.1.2
94
110
  description: Deploying symfony2 applications for the kDeploy server setup.
95
111
  email: support@kunstmaan.be
96
112
  executables:
@@ -104,6 +120,25 @@ files:
104
120
  - lib/helpers/jenkins_helper.rb
105
121
  - lib/helpers/kuma_helper.rb
106
122
  - lib/kstrano.rb
123
+ - lib/kstrano_drupal.rb
124
+ - lib/kstrano_magento.rb
125
+ - lib/kstrano_play.rb
126
+ - lib/kstrano_symfony2.rb
127
+ - resources/deploy.rb
128
+ - resources/deploy_production.rb
129
+ - resources/deploy_staging.rb
130
+ - resources/play/deploy.rb
131
+ - resources/play/start.sh
132
+ - resources/play/stop.sh
133
+ - resources/symfony2/apcclear.php
134
+ - resources/symfony2/app_test.php
135
+ - resources/symfony2/behat.yml-dist
136
+ - resources/symfony2/build.xml
137
+ - resources/symfony2/deploy.rb
138
+ - resources/symfony2/phpcs.xml
139
+ - resources/symfony2/phpdox.xml
140
+ - resources/symfony2/phpmd.xml
141
+ - resources/symfony2/phpunit.xml.dist
107
142
  - bin/kumafy
108
143
  homepage: https://github.com/Kunstmaan/kStrano
109
144
  licenses: []
@@ -120,9 +155,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
120
155
  required_rubygems_version: !ruby/object:Gem::Requirement
121
156
  none: false
122
157
  requirements:
123
- - - ! '>='
158
+ - - ! '>'
124
159
  - !ruby/object:Gem::Version
125
- version: '0'
160
+ version: 1.3.1
126
161
  requirements: []
127
162
  rubyforge_project:
128
163
  rubygems_version: 1.8.25