diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c359b56 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +composer.lock +vendor/* +koharness_bootstrap.php + diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1313e37 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - hhvm + +before_script: + - composer install --prefer-dist + - vendor/bin/koharness + +script: + - cd /tmp/koharness && ./vendor/bin/phpunit --bootstrap=modules/unittest/bootstrap.php modules/unittest/tests.php + +notifications: + email: false diff --git a/README.md b/README.md new file mode 100644 index 0000000..fd6bc83 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# Kohana - ORM module + +| ver | Stable | Develop | +|-------|----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------| +| 3.3.x | [![Build Status - 3.3/master](https://travis-ci.org/kohana/orm.svg?branch=3.3%2Fmaster)](https://travis-ci.org/kohana/orm) | [![Build Status - 3.3/develop](https://travis-ci.org/kohana/orm.svg?branch=3.3%2Fdevelop)](https://travis-ci.org/kohana/orm) | +| 3.4.x | [![Build Status - 3.4/master](https://travis-ci.org/kohana/orm.svg?branch=3.4%2Fmaster)](https://travis-ci.org/kohana/orm) | [![Build Status - 3.4/develop](https://travis-ci.org/kohana/orm.svg?branch=3.4%2Fdevelop)](https://travis-ci.org/kohana/orm) | diff --git a/classes/Kohana/ORM.php b/classes/Kohana/ORM.php index 50067c4..bda79f2 100644 --- a/classes/Kohana/ORM.php +++ b/classes/Kohana/ORM.php @@ -1627,7 +1627,7 @@ public function count_all() if ($method['name'] == 'select') { // Ignore any selected columns for now - $selects[] = $method; + $selects[$key] = $method; unset($this->_db_pending[$key]); } } diff --git a/composer.json b/composer.json index faa776f..41f4928 100644 --- a/composer.json +++ b/composer.json @@ -25,10 +25,19 @@ "kohana/database": ">=3.3", "php": ">=5.3.3" }, + "require-dev": { + "kohana/core": "3.3.*@dev", + "kohana/database": "3.3.*@dev", + "kohana/unittest": "3.3.*@dev", + "kohana/koharness": "*@dev" + }, "extra": { "branch-alias": { "dev-3.3/develop": "3.3.x-dev", "dev-3.4/develop": "3.4.x-dev" - } + }, + "installer-paths": { + "vendor/{$vendor}/{$name}": ["type:kohana-module"] + } } } diff --git a/koharness.php b/koharness.php new file mode 100644 index 0000000..e2c0b77 --- /dev/null +++ b/koharness.php @@ -0,0 +1,8 @@ + array( + 'orm' => __DIR__, + 'unittest' => __DIR__ . '/vendor/kohana/unittest' + ), +);