Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: OnlineBuddies/Modyllic
base: 9722da69ba
...
head fork: OnlineBuddies/Modyllic
compare: 6c4efeddeb
Checking mergeability… Don't worry, you can still create the pull request.
  • 18 commits
  • 6 files changed
  • 0 commit comments
  • 3 contributors
View
12 CHANGELOG
@@ -0,0 +1,12 @@
+* Rework our package build process to be more palatable
+* Rename schema classes to be Modyllic_Schema_*
+* Move more documentation into the wiki and update the publishing document (Aria Stewart)
+* Rename SQL generator dialects to be more useful
+* Rename Modyllic_Commandline->Modyllic_CommandLine to match Console_CommandLine
+* Add support for --version to all of the commandline tools
+* Remove unused sqlmeta_exists from changeset support
+* Remove now unused schema level sqlmeta tracking
+* #103 Converting from static to non-static no longer results in deleted rows
+* Fix strict error-- array_shift must take a variable as an argument
+* #85 Recursive scan directories for .sql files
+* Fix #110 - In sqlcolorize, on exit reset colors rather then explicitly setting white
View
6 doc/Prior-Art.md
@@ -18,4 +18,8 @@ A PHP 5.3 project that will generate ALTER statements when comparing between two
### [SchemaCrawler](http://schemacrawler.sourceforge.net/)
-A JDBC tool for showing the differences between schemas.
+A JDBC tool for showing the differences between schemas.
+
+### [SchemaDiff](https://github.com/iamcal/SchemaDiff)
+
+A simple PHP tool for running diff on files containing DDL representations of schema.
View
43 doc/Publishing.md
@@ -1,47 +1,48 @@
Before you begin you'll need to install Pirum:
-1. pear channel-discover pear.pirum-project.org
-2. pear install pirum/Pirum-beta
+1. `pear channel-discover pear.pirum-project.org`
+2. `pear install pirum/Pirum-beta`
And checkout the OLB pear repository:
-1. git clone git@github.com:OnlineBuddies/pear.git
+1. `git clone git@github.com:OnlineBuddies/pear.git`
Merge in the Wiki docs:
-1. git remote add upstream-wiki git://github.com/OnlineBuddies/Modyllic.wiki
-2. git fetch upstream-wiki
-3. git merge -s subtree upstream-wiki/master
+1. `git remote add upstream-wiki git://github.com/OnlineBuddies/Modyllic.wiki`
+2. `git fetch upstream-wiki`
+3. `git merge -s subtree upstream-wiki/master`
To publish a new release, from your Modyllic checkout:
-1. Update the version: ./release-version #.#.# beta
+1. Update the version: `./release-version #.#.# beta`
2. Edit the package.xml to:
a. Add notes
b. Update the date and time
c. Copy the current release section down to the changelog (don't forget to delete the time section from the changelog)
-3. Make sure there are no errors or warnings: pear package-validate package.xml
-4. git add package.xml Modyllic/CommandLine.php
-5. git commit -m'Release Modyllic-#.#.#'
-6. git tag v#.#.#
-7. Build a tarball: pear package package.xml
+3. Make sure there are no errors or warnings:
+ `make package-validate`
+4. `git add package.xml Modyllic/CommandLine.php`
+5. `git commit -m'Release Modyllic-#.#.#'`
+6. `git tag v#.#.#`
+7. Build a tarball: `pear package package.xml`
8. This will give you a Modyllic-#.#.#.tgz
-9. Bump the version for future edits: ./release-version #.#.#+1 alpha
+9. Bump the version for future edits: `./release-version #.#.#+1 alpha`
10. Edit the package.xml to clear the notes section
-11. git add package.xml Modyllic/CommandLine.php
-12. git commit -m'Begin Modyllic-#.#.#+1'
-5. git push
+11. `git add package.xml Modyllic/CommandLine.php`
+12. `git commit -m'Begin Modyllic-#.#.#+1'`
+5. `git push`
Now in go to your previously checked out copy of the OLB pear repository:
-1. ./release /path/to/Modyllic-#.#.#.tgz
-2. git add -A (or add the changed/created files by hand)
-3. git commit -m'Release Modyllic-#.#.#'
-4. git push
+1. `./release /path/to/Modyllic-#.#.#.tgz`
+2. `git add -A` (or add the changed/created files by hand)
+3. `git commit -m'Release Modyllic-#.#.#'`
+4. `git push`
And you're done. It may take a minute or so for your changes to appear at:
http://onlinebuddies.github.com/pear/
Once they do, you can upgrade a Modyllic installation with:
-pear upgrade OnlineBuddies/Modyllic-beta
+`pear upgrade OnlineBuddies/Modyllic-beta`
View
13 testlib/README.md
@@ -40,6 +40,19 @@ This is a PHP implementation of <a href="http://search.cpan.org/perldoc?Test::Mo
pass($test_name);
fail($test_name);
+ todo_begin("New frobaz feature");
+
+ ok( $got, $expected, $test_name );
+ # ...
+
+ todo_end();
+
+ # Or under 5.3
+ todo( "New frobaz feature", function () {
+ ok( $got, $expected, $test_name );
+ # ...
+ } );
+
## Testing the tests
View
31 testlib/test/test.php
@@ -23,7 +23,7 @@ function bar(){}
'woo' => 'yay',
);
- echo "1..32\n";
+ echo "1..36\n";
#
@@ -80,6 +80,20 @@ function bar(){}
is_deeply($struct_1, $struct_1, 'is_deeply()');
check_capture(true);
+ todo_begin("Testing");
+
+ pass("example implemented todo test");
+ check_capture(true);
+
+ todo_end();
+
+ // in 5.3 we would pass an anonymous function
+ function ex_todo_pass() {
+ pass("example todo in subroutine");
+ }
+ todo( "Testing", "ex_todo_pass" );
+ check_capture(true);
+
#
# Expecting these to fail
@@ -133,7 +147,21 @@ function bar(){}
is_deeply($struct_1, $struct_2, 'is_deeply()');
check_capture(false);
+ todo_begin("Testing");
+
+ fail("example unimplemented todo test");
+ check_capture(false);
+
+ todo_end();
+
+ // in 5.3 we would pass an anonymous function
+ function ex_todo_fail() {
+ fail("example fail in subroutine");
+ }
+ todo( "Testing", "ex_todo_fail" );
+ check_capture(false);
+
$GLOBALS['_no_plan'] = false;
$GLOBALS['_num_failures'] = 0;
@@ -182,6 +210,7 @@ function check_capture($pass){
$result = array_pop($results);
$explain = $result[1] ? " - $result[1]" : '';
+ $explain = preg_replace('!#!','\\#',$explain); # Escape comments, eg, TODOs
if ($pass){
if ($result[0]){
echo "ok $num - pass$explain\n";
View
38 testlib/testmore.php
@@ -79,11 +79,34 @@ function plan($plan)
}
}
+function todo($why, $todo_tests) {
+ todo_begin($why);
+ call_user_func($todo_tests);
+ todo_end();
+}
+
+function todo_begin($why="")
+{
+ global $_testmore_todo;
+ if ( ! isset($_testmore_todo) ) {
+ $_testmore_todo = array();
+ }
+ array_push($_testmore_todo,$why);
+}
+
+function todo_end()
+{
+ global $_testmore_todo;
+ assert('is_array($_testmore_todo)');
+ array_pop($_testmore_todo);
+}
+
function ok($pass, $test_name = '')
{
global $_test_num;
global $_num_failures;
global $_num_skips;
+ global $_testmore_todo;
$_test_num++;
@@ -95,6 +118,11 @@ function ok($pass, $test_name = '')
if (!empty($test_name) && $test_name[0] != '#') {
$test_name = "- $test_name";
}
+
+ if ($test_name[0] != '#' and isset($_testmore_todo) and count($_testmore_todo)) {
+ $msg = array_pop( array_values( $_testmore_todo ) );
+ $test_name .= " # TODO $msg";
+ }
if ($pass) {
echo "ok $_test_num $test_name\n";
@@ -266,14 +294,14 @@ function diag($message)
function include_ok($module)
{
$pass = ((include $module) == 1);
- return ok($pass);
+ return ok($pass, "include $module");
}
function require_ok($module)
{
$pass = ((require $module) == 1);
- return ok($pass);
-}
+ return ok($pass, "require $module");
+}
function skip($message, $num)
{
@@ -303,10 +331,6 @@ function is_deeply($got_struct, $expected_struct, $test_name = '')
TODO:
-function todo()
-{
-}
-
function todo_skip()
{
}

No commit comments for this range

Something went wrong with that request. Please try again.