From 4a1bb71ea477174d1538641282aa188f3fe548f6 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 17 Feb 2016 17:50:56 +0200 Subject: [PATCH 1/3] Working on Travis, merging from #671 --- .travis.yml | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000000..5c303f42917a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,61 @@ +language: php + +sudo: false + +php: + - 5.5 + - 5.6 + - 7.0 + - hhvm + +addons: + hosts: + - ninja.dev + +cache: + directories: + - vendor + - $HOME/.composer/cache + +env: + global: + - COMPOSER_DISCARD_CHANGES=true + - COMPOSER_NO_INTERACTION=1 + - COMPOSER_DISABLE_XDEBUG_WARN=1 + +before_install: + # set GitHub token and update composer + - if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi; + - composer self-update && composer -V + +install: + # install Composer dependencies + - travis_retry composer update --prefer-dist; + +before_script: + # copy configuration files + - cp tests/_bootstrap.php.default tests/_bootstrap.php + - cp tests/.env.circleci .env + # create the database and user + - mysql -u root -e "create database IF NOT EXISTS ninja;" + - mysql -u root -e "GRANT ALL PRIVILEGES ON ninja.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;" + # migrate and seed the database + - php artisan migrate --no-interaction + - php artisan db:seed --no-interaction # default seed + - php artisan db:seed --no-interaction --class=UserTableSeeder # development seed + # Start webserver on ninja.dev:8000 + - php artisan serve --host=ninja.dev --port=8000 & # '&' allows to run in background + # Start PhantomJS + - phantomjs --webdriver=4444 & # '&' allows to run in background + # Give it some time to start + - sleep 5 + # Make sure the app is up-to-date + - curl -L http://ninja.dev:8000/update + +script: + - php ./vendor/codeception/codeception/codecept run --html --debug + +notifications: + email: + on_success: never + on_failure: change \ No newline at end of file From 4ea6eb04dd64e843043b51f9230c32b4a30111cc Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 19 Feb 2016 08:30:52 +1100 Subject: [PATCH 2/3] merge --- .travis.yml | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9da900cd753f..94a69dc7696b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,14 +30,6 @@ before_install: install: # install Composer dependencies -<<<<<<< HEAD - - travis_retry composer update --prefer-dist; - -before_script: - # copy configuration files - - cp tests/_bootstrap.php.default tests/_bootstrap.php - - cp tests/.env.circleci .env -======= - rm composer.lock # these providers require referencing git commit's which cause Travis to fail - sed -i '/mollie/d' composer.json @@ -53,11 +45,7 @@ before_script: - php artisan key:generate --no-interaction - sed -i 's/APP_ENV=production/APP_ENV=development/g' .env - sed -i 's/APP_DEBUG=false/APP_DEBUG=true/g' .env -<<<<<<< HEAD ->>>>>>> upstream/develop -======= - sed -i 's/REQUIRE_HTTPS=false/NINJA_DEV=true/g' .env ->>>>>>> upstream/develop # create the database and user - mysql -u root -e "create database IF NOT EXISTS ninja;" - mysql -u root -e "GRANT ALL PRIVILEGES ON ninja.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;" @@ -76,25 +64,22 @@ before_script: script: #- php ./vendor/codeception/codeception/codecept run --html --debug - #- php ./vendor/codeception/codeception/codecept run --debug acceptance AllPagesCept.php - #- php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php - #- php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php - #- php ./vendor/codeception/codeception/codecept run --debug acceptance ClientCest.php - #- php ./vendor/codeception/codeception/codecept run --debug acceptance CreditCest.php - #- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceCest.php - #- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceDesignCest.php + - php ./vendor/codeception/codeception/codecept run --debug acceptance AllPagesCept.php + - php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php + - php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php + - php ./vendor/codeception/codeception/codecept run --debug acceptance ClientCest.php + - php ./vendor/codeception/codeception/codecept run --debug acceptance CreditCest.php + - php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceCest.php + - php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceDesignCest.php - php ./vendor/codeception/codeception/codecept run acceptance OnlinePaymentCest.php - #- php ./vendor/codeception/codeception/codecept run --debug acceptance PaymentCest.php - #- php ./vendor/codeception/codeception/codecept run --debug acceptance TaskCest.php - #- php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php + - php ./vendor/codeception/codeception/codecept run --debug acceptance PaymentCest.php + - php ./vendor/codeception/codeception/codecept run --debug acceptance TaskCest.php + - php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php #- php ./vendor/codeception/codeception/codecept run--debug acceptance GoProCest.php -<<<<<<< HEAD -======= after_script: - cat storage/logs/laravel.log ->>>>>>> upstream/develop notifications: email: on_success: never From f323c8e06e9123f515d1ec064deb8e2e08655d60 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 26 Feb 2016 18:48:06 +1100 Subject: [PATCH 3/3] user transformer fields --- app/Ninja/Transformers/UserTransformer.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Ninja/Transformers/UserTransformer.php b/app/Ninja/Transformers/UserTransformer.php index d700c579baca..532c1f6fa4f2 100644 --- a/app/Ninja/Transformers/UserTransformer.php +++ b/app/Ninja/Transformers/UserTransformer.php @@ -21,7 +21,11 @@ class UserTransformer extends EntityTransformer 'registered' => (bool) $user->registered, 'confirmed' => (bool) $user->confirmed, 'oauth_user_id' => $user->oauth_user_id, - 'oauth_provider_id' => $user->oauth_provider_id + 'oauth_provider_id' => $user->oauth_provider_id, + 'notify_sent' => (bool) $user->notify_sent, + 'notify_viewed' => (bool) $user->notify_viewed, + 'notify_paid' => (bool) $user->notify_paid, + 'notify_approved' => (bool) $user->notify_approved, ]; } } \ No newline at end of file