Skip to content

Commit

Permalink
Huge refactor... Basically, renamed Task to Job, and Call to Task.
Browse files Browse the repository at this point in the history
Starting the renaming process, creating interface
Removing unused code, and refactoring core block
Moving abstract task to CoreBlock, finishing refactor of Execute Block
Converting Filesystem Block
Refactoring Miscellaneous block
Updating composer, and refactoring notify block
Attempting to finish watch task.... Little wierd. Hoping it still works
Fixing tests
Removing output.... Created more issues than it solved. Adding functional tests
changing continueOnError 'Error' to a 'Warning'
Disabling coveralls logging
debugging travis
Fixing tests.... Weirdness with symfony application autoexiting
Adding more asserts
Renaming BuildCommand to RunCommand
Adding frontend and remote blocks to the core

Adding non-validate check

Fixing 7.0
  • Loading branch information
cryptiklemur committed Oct 13, 2014
1 parent 8564fac commit e23dd08
Show file tree
Hide file tree
Showing 99 changed files with 3,505 additions and 3,681 deletions.
2 changes: 1 addition & 1 deletion .bldr.yml.dist
@@ -1,6 +1,6 @@
imports:
- { resource: .bldr/profiles.yml }
- { resource: .bldr/tasks.yml }
- { resource: .bldr/jobs.yml }

bldr:
name: bldr-io/bldr
Expand Down
127 changes: 52 additions & 75 deletions .bldr/tasks.yml → .bldr/jobs.yml
@@ -1,81 +1,21 @@
bldr:
tasks:
misc:
calls:
-
type: notify
message: "Sleeping for 1 Second"
-
type: sleep
seconds: 1
-
type: notify
message: "Done sleeping for 1 Second"
-
type: notify
message: "Stopping and Starting redis service"
-
type: service
manager: launchctl # Using OS X
service: homebrew.mxcl.redis
method: stop
-
type: service
manager: launchctl # Using OS X
service: homebrew.mxcl.redis
method: start

mysql:
calls:
-
type: mysql:user
username: root
password: root
new_username: testUser
new_password: testPass
allowed_host: %
privileges: [ALL]
table: '*.*'

server:
calls:
- { type: notify, message: Starting Web Server]}
-
type: background
executable: php
arguments:
- -S
- 127.0.0.1:8080
- { type: notify, message: Started Web Server]}
-
type: exec
executable: sleep
arguments: [30]
- { type: notify, message: Killing Web Server]}
-
type: background
executable: php
kill: true
arguments:
- -S
- 127.0.0.1
- { type: notify, message: Killed Web Server]}
jobs:
watch:
calls:
tasks:
-
type: watch
task: testDev
src:
- { path: [src, tests], files: *.php, recursive: true }
- { path: [src, tests], files: ["*.php"], recursive: true }
prepare:
description: 'Cleans up old builds and prepares the new one'
calls:
tasks:
-
type: sleep
seconds: 1
-
type: filesystem:remove
failOnError: false
continueOnError: true
files: [build/coverage, build/logs]
-
type: filesystem:mkdir
Expand All @@ -92,18 +32,36 @@ bldr:
message: Prepare Task Finished
lint:
description: 'Lints the files of the project'
calls:
tasks:
-
type: apply
src:
- { path: [src, tests], files: *.php, recursive: true }
- { path: [src, tests], files: ["*.php"], recursive: true }
output: /dev/null
executable: php
arguments: [-l]

-
type: notify
message: Lint Task Finished
fsTest:
description: "Filesystem Block Tests"
tasks:
-
type: filesystem:remove
continueOnError: true
files: [tmp/]
-
type: filesystem:mkdir
files: [tmp/, tmp/test/deep]
-
type: filesystem:touch
files: [tmp/test.tmp, tmp/test/deep/test.tmp]
-
type: notify
message: Filesystem Task Finished
phpcs:
description: 'Runs the PHP Code Sniffer'
calls:
tasks:
-
type: exec
executable: php
Expand All @@ -123,34 +81,50 @@ bldr:
- --report=checkstyle
- --report-file=build/logs/checkstyle.xml
- src/
-
type: notify
message: PHPCS Task Finished
test:
description: 'Runs the PHPUnit Tests'
calls:
tasks:
-
type: exec
executable: php
arguments:
- bin/phpunit
- --coverage-text=php://stdout
- -v
-
type: exec
executable: test
arguments: ['-f', 'build/logs/clover.xml']
-
type: notify
message: Test Task Finished
testDev:
description: 'Runs the PHPUnit Tests'
calls:
tasks:
-
type: exec
failOnError: false
continueOnError: true
executable: php
arguments: [bin/phpunit]
-
type: notify
message: TestDev Task Finished
buildPhar:
description: Builds the Box
calls:
tasks:
-
type: exec
executable: script/buildPhar
arguments:
- $RELEASE_VERSION$
-
type: notify
message: Phar Created
release:
description: Creates a tag, and pushes
calls:
tasks:
-
type: exec
executable: git
Expand All @@ -166,3 +140,6 @@ bldr:
- push
- origin
- --tags
-
type: notify
message: Tagged and Released
27 changes: 10 additions & 17 deletions .bldr/profiles.yml
Expand Up @@ -2,42 +2,35 @@ bldr:
profiles:
default:
description: 'Development Profile'
tasks:
jobs:
- prepare
- lint
- phpcs
- test
test:
description: "Test Profile"
tasks:
jobs:
- testDev
watch:
description: "Watch Profile"
uses:
before:
- test
tasks:
jobs:
- watch
server:
description: Starts a server and waits for a bit. Then kills it.
tasks:
- server
mysql:
description: Tests the MysqlExtension calls
tasks:
- mysql
misc:
description: Tests the MiscellaneousExtension calls
tasks:
- misc
buildPhar:
description: Builds the phar
tasks:
jobs:
- buildPhar
release:
description: Releases Bldr
uses:
after:
- buildPhar
tasks:
jobs:
- release
functionalTest:
description: used for running a functional test on bldr
jobs:
- fsTest
- lint
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -15,7 +15,7 @@ before_script:
- composer require satooshi/php-coveralls:dev-master --no-progress --prefer-source

script:
- ./bin/bldr build default
- ./bin/bldr run default

after_script:
- php bin/coveralls -v
- php bin/coveralls
6 changes: 5 additions & 1 deletion composer.json
Expand Up @@ -12,7 +12,11 @@
"symfony/dependency-injection": "~2.5.0",
"symfony/event-dispatcher": "~2.5.0",
"symfony/process": "~2.5.0",
"zendframework/zend-json": "~2.3.0"
"zendframework/zend-json": "~2.3.0",
"swiftmailer/swiftmailer": "~5.3.0",
"bldr-io/frontend-block": "~2.0.0@dev",
"richthegeek/phpsass": "dev-master",
"bldr-io/remote-block": "~2.0.0"
},
"suggest": {
"bldr-io/frontend-block": "Allows for managing front end compiling and minification"
Expand Down

0 comments on commit e23dd08

Please sign in to comment.