From 780cbbcee20112a3b0f73bd5c88a9f3c17fff531 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 09:20:53 +0200 Subject: [PATCH 01/49] Changed dataviz to red/green --- tests/_support/AcceptanceTester.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/_support/AcceptanceTester.php b/tests/_support/AcceptanceTester.php index fd89ac0d0d..2bc4e1783f 100644 --- a/tests/_support/AcceptanceTester.php +++ b/tests/_support/AcceptanceTester.php @@ -29,6 +29,7 @@ class AcceptanceTester extends \Codeception\Actor //if ($I->loadSessionSnapshot('login')) return; $I->amOnPage('/login'); + $I->see('Login'); $I->fillField(['name' => 'email'], Fixtures::get('username')); $I->fillField(['name' => 'password'], Fixtures::get('password')); $I->click('Login'); From 5b024b23a7a31c16e725d35fc0b626bae3f8ccea Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 09:50:11 +0200 Subject: [PATCH 02/49] Changed dataviz to red/green --- .travis.yml | 5 +++++ resources/lang/en/texts.php | 35 ++++++++--------------------------- 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4bdcc265fb..0899650957 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,11 @@ 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 + # fix for phantomjs + - mkdir travis-phantomjs + - wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 + - tar -xvf $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs + - export PATH=$PWD/travis-phantomjs:$PATH install: # install Composer dependencies diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 63ac704fe8..ace0aba384 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -1,8 +1,6 @@ 'Organization', 'name' => 'Name', 'website' => 'Website', @@ -26,7 +24,6 @@ return array( 'industry_id' => 'Industry', 'private_notes' => 'Private Notes', - // invoice 'invoice' => 'Invoice', 'client' => 'Client', 'invoice_date' => 'Invoice Date', @@ -75,7 +72,6 @@ return array( 'enable_invoice_tax' => 'Enable specifying an invoice tax', 'enable_line_item_tax' => 'Enable specifying line item taxes', - // navigation 'dashboard' => 'Dashboard', 'clients' => 'Clients', 'invoices' => 'Invoices', @@ -101,7 +97,6 @@ return array( 'powered_by' => 'Powered by', 'no_items' => 'No items', - // recurring invoices 'recurring_invoices' => 'Recurring Invoices', 'recurring_help' => '

Automatically send clients the same invoices weekly, bi-monthly, monthly, quarterly or annually.

Use :MONTH, :QUARTER or :YEAR for dynamic dates. Basic math works as well, for example :MONTH-1.

@@ -112,7 +107,6 @@ return array(
  • "Retainer payment for :QUARTER+1" => "Retainer payment for Q2"
  • ', - // dashboard 'in_total_revenue' => 'in total revenue', 'billed_client' => 'billed client', 'billed_clients' => 'billed clients', @@ -122,7 +116,6 @@ return array( 'upcoming_invoices' => 'Upcoming Invoices', 'average_invoice' => 'Average Invoice', - // list pages 'archive' => 'Archive', 'delete' => 'Delete', 'archive_client' => 'Archive Client', @@ -159,7 +152,6 @@ return array( 'edit_client' => 'Edit Client', 'edit_invoice' => 'Edit Invoice', - // client view page 'create_invoice' => 'Create Invoice', 'enter_credit' => 'Enter Credit', 'last_logged_in' => 'Last logged in', @@ -172,11 +164,9 @@ return array( 'adjustment' => 'Adjustment', 'are_you_sure' => 'Are you sure?', - // payment pages 'payment_type_id' => 'Payment Type', 'amount' => 'Amount', - // account/company pages 'work_email' => 'Email', 'language_id' => 'Language', 'timezone_id' => 'Timezone', @@ -207,12 +197,10 @@ return array( 'pdf_email_attachment' => 'Attach PDFs', 'custom_css' => 'Custom CSS', - //import CSV data pages 'import_clients' => 'Import Client Data', 'csv_file' => 'CSV file', 'export_clients' => 'Export Client Data', - // application messages 'created_client' => 'Successfully created client', 'created_clients' => 'Successfully created :count client(s)', 'updated_settings' => 'Successfully updated settings', @@ -263,7 +251,6 @@ return array( 'deleted_vendor' => 'Successfully deleted vendor', 'deleted_vendors' => 'Successfully deleted :count vendors', - // Emails 'confirmation_subject' => 'Invoice Ninja Account Confirmation', 'confirmation_header' => 'Account Confirmation', 'confirmation_message' => 'Please access the link below to confirm your account.', @@ -285,14 +272,12 @@ return array( 'reset_password' => 'You can reset your account password by clicking the following button:', 'reset_password_footer' => 'If you did not request this password reset please email our support: '.CONTACT_EMAIL, - // Payment page 'secure_payment' => 'Secure Payment', 'card_number' => 'Card Number', 'expiration_month' => 'Expiration Month', 'expiration_year' => 'Expiration Year', 'cvv' => 'CVV', - // Security alerts 'security' => [ 'too_many_attempts' => 'Too many attempts. Try again in few minutes.', 'wrong_credentials' => 'Incorrect email or password.', @@ -303,10 +288,9 @@ return array( 'wrong_password_reset' => 'Invalid password. Try again', ], - // Pro Plan 'pro_plan' => [ - 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the Pro Plan', - 'remove_logo_link' => 'Click here', + 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the Pro Plan', + 'remove_logo_link' => 'Click here', ], 'logout' => 'Log Out', @@ -340,7 +324,6 @@ return array( 'set_name' => 'Set your company name', 'view_as_recipient' => 'View as recipient', - // product management 'product_library' => 'Product Library', 'product' => 'Product', 'products' => 'Product Library', @@ -366,7 +349,6 @@ return array( 'ninja_email_footer' => 'Use :site to invoice your clients and get paid online for free!', 'go_pro' => 'Go Pro', - // Quotes 'quote' => 'Quote', 'quotes' => 'Quotes', 'quote_number' => 'Quote Number', @@ -582,7 +564,7 @@ return array( 'forgot_password' => 'Forgot your password?', 'email_address' => 'Email address', 'lets_go' => 'Let\'s go', - //'lets_go' => 'Login', + 'password_recovery' => 'Password Recovery', 'send_email' => 'Send email', 'set_password' => 'Set Password', @@ -1010,7 +992,6 @@ return array( 'white_label_custom_css' => ':link for $'.WHITE_LABEL_PRICE.' to enable custom styling and help support our project.', 'white_label_purchase_link' => 'Purchase a white label license', - // Expense / vendor 'expense' => 'Expense', 'expenses' => 'Expenses', 'new_expense' => 'Enter Expense', @@ -1028,7 +1009,6 @@ return array( 'deleted_expenses' => 'Successfully deleted expenses', 'archived_expenses' => 'Successfully archived expenses', - // Expenses 'expense_amount' => 'Expense Amount', 'expense_balance' => 'Expense Balance', 'expense_date' => 'Expense Date', @@ -1054,14 +1034,12 @@ return array( 'expense_error_invoiced' => 'Expense has already been invoiced', 'convert_currency' => 'Convert currency', - // Payment terms 'num_days' => 'Number of days', 'create_payment_term' => 'Create Payment Term', 'edit_payment_terms' => 'Edit Payment Term', 'edit_payment_term' => 'Edit Payment Term', 'archive_payment_term' => 'Archive Payment Term', - // recurring due dates 'recurring_due_dates' => 'Recurring Invoice Due Dates', 'recurring_due_date_help' => '

    Automatically sets a due date for the invoice.

    Invoices on a monthly or yearly cycle set to be due on or before the day they are created will be due the next month. Invoices set to be due on the 29th or 30th in months that don\'t have that day will be due the last day of the month.

    @@ -1090,7 +1068,6 @@ return array( 'friday' => 'Friday', 'saturday' => 'Saturday', - // Fonts 'header_font_id' => 'Header Font', 'body_font_id' => 'Body Font', 'color_font_help' => 'Note: the primary color and fonts are also used in the client portal and custom email designs.', @@ -1153,3 +1130,7 @@ return array( 'convert_currency' => 'Convert currency', ); + +return $LANG; + +?> \ No newline at end of file From d30eefa461f7f43c95dcfffd9f8a5313e20b36e7 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 09:54:18 +0200 Subject: [PATCH 03/49] Working on TravisCI --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0899650957..6a2ba3858f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,8 +29,8 @@ before_install: - composer self-update && composer -V # fix for phantomjs - mkdir travis-phantomjs - - wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 - - tar -xvf $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs + - wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-1.9.7-ubuntu-12.04.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-1.9.7-ubuntu-12.04.tar.bz2 + - tar -xvf $PWD/travis-phantomjs/phantomjs-1.9.7-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs - export PATH=$PWD/travis-phantomjs:$PATH install: From f0407473a806615a61a620ea7e2ed32c24e7fe68 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 09:58:52 +0200 Subject: [PATCH 04/49] Working on TravisCI --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a2ba3858f..ac1cc61372 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,9 +29,9 @@ before_install: - composer self-update && composer -V # fix for phantomjs - mkdir travis-phantomjs - - wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-1.9.7-ubuntu-12.04.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-1.9.7-ubuntu-12.04.tar.bz2 - - tar -xvf $PWD/travis-phantomjs/phantomjs-1.9.7-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs - - export PATH=$PWD/travis-phantomjs:$PATH + - wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 + - tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs + - export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH install: # install Composer dependencies From b8417d5d365924d0be8cec607565bcfffac69d96 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 10:02:24 +0200 Subject: [PATCH 05/49] Working on TravisCI --- .travis.yml | 5 ----- tests/acceptance.suite.yml | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ac1cc61372..4bdcc265fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,11 +27,6 @@ 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 - # fix for phantomjs - - mkdir travis-phantomjs - - wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 - - tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs - - export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH install: # install Composer dependencies diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index 4a152dce6e..56b0928116 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -12,7 +12,7 @@ modules: host: 127.0.0.1 window_size: 1024x768 wait: 5 - browser: phantomjs + browser: firefox capabilities: unexpectedAlertBehaviour: 'accept' webStorageEnabled: true From 078736e9d2392aed0a2e00d69f99fa11a106904f Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 10:06:06 +0200 Subject: [PATCH 06/49] Working on TravisCI --- tests/acceptance.suite.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index 56b0928116..e49f045e53 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -10,6 +10,7 @@ modules: - WebDriver: url: 'http://ninja.dev:8000' host: 127.0.0.1 + http_proxy: direct window_size: 1024x768 wait: 5 browser: firefox From c3ba842273352ba6ec6809d64cf7a981973f4a45 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 10:10:46 +0200 Subject: [PATCH 07/49] Working on TravisCI --- .travis.yml | 4 +++- tests/acceptance.suite.yml | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4bdcc265fb..5ff07dd0e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,7 @@ 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 + - sudo apt-get install -y phantomjs screen install: # install Composer dependencies @@ -53,7 +54,8 @@ before_script: # 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 + #- phantomjs --webdriver=4444 & # '&' allows to run in background + - screen -S server -d -m phantomjs --webdriver=4444 # Give it some time to start - sleep 5 # Make sure the app is up-to-date diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index e49f045e53..4a152dce6e 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -10,10 +10,9 @@ modules: - WebDriver: url: 'http://ninja.dev:8000' host: 127.0.0.1 - http_proxy: direct window_size: 1024x768 wait: 5 - browser: firefox + browser: phantomjs capabilities: unexpectedAlertBehaviour: 'accept' webStorageEnabled: true From c1f260217961ecfc2e35973c71420f17fd8ec72e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 10:12:53 +0200 Subject: [PATCH 08/49] Working on TravisCI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5ff07dd0e3..297db08db6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: php -sudo: false +sudo: required php: - 5.5 From f29d7678002a1aac818b409eb3b62616ae8d57df Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 10:25:12 +0200 Subject: [PATCH 09/49] Working on TravisCI --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 297db08db6..a1cbcca8b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,14 +52,14 @@ before_script: - 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 + #- php artisan serve --host=ninja.dev --port=8000 & # '&' allows to run in background # Start PhantomJS #- phantomjs --webdriver=4444 & # '&' allows to run in background - screen -S server -d -m phantomjs --webdriver=4444 # Give it some time to start - sleep 5 # Make sure the app is up-to-date - - curl -L http://ninja.dev:8000/update + #- curl -L http://ninja.dev:8000/update script: - php ./vendor/codeception/codeception/codecept run --html --debug From f8d5993337cf1b03e7201a7be67799ce581a2128 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 10:43:29 +0200 Subject: [PATCH 10/49] Working on TravisCI --- .travis.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index a1cbcca8b7..494d94d0a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: php -sudo: required +sudo: false php: - 5.5 @@ -27,7 +27,6 @@ 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 - - sudo apt-get install -y phantomjs screen install: # install Composer dependencies @@ -52,10 +51,9 @@ before_script: - 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 + - php artisan serve --host=ninja.dev --port=8000 & # '&' allows to run in background # Start PhantomJS - #- phantomjs --webdriver=4444 & # '&' allows to run in background - - screen -S server -d -m phantomjs --webdriver=4444 + - phantomjs --webdriver=4444 & # '&' allows to run in background # Give it some time to start - sleep 5 # Make sure the app is up-to-date From 44c638ea54598f6c052cd2376f7f1e92b4718dc2 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 10:50:35 +0200 Subject: [PATCH 11/49] Working on TravisCI --- .travis.yml | 2 -- tests/acceptance.suite.yml | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 494d94d0a2..07aa6d10b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,8 +56,6 @@ before_script: - 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 diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index 4a152dce6e..a6c8033296 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -12,7 +12,8 @@ modules: host: 127.0.0.1 window_size: 1024x768 wait: 5 - browser: phantomjs + browser: firefox + http_proxy: direct capabilities: unexpectedAlertBehaviour: 'accept' webStorageEnabled: true From 2eda30023c8bda291531f3df6f998f8c9c40e766 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 11:03:46 +0200 Subject: [PATCH 12/49] Working on TravisCI --- .travis.yml | 6 +++--- tests/acceptance.suite.yml | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 07aa6d10b7..360ffb8429 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ language: php -sudo: false +sudo: true php: - - 5.5 -# - 5.6 +# - 5.5 + - 5.6 # - 7.0 # - hhvm diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index a6c8033296..4a152dce6e 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -12,8 +12,7 @@ modules: host: 127.0.0.1 window_size: 1024x768 wait: 5 - browser: firefox - http_proxy: direct + browser: phantomjs capabilities: unexpectedAlertBehaviour: 'accept' webStorageEnabled: true From 096e11cff57f1458f132569f9fe15914587ad7ff Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 11:13:35 +0200 Subject: [PATCH 13/49] Working on TravisCI --- .travis.yml | 6 +++--- codeception.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 360ffb8429..07aa6d10b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ language: php -sudo: true +sudo: false php: -# - 5.5 - - 5.6 + - 5.5 +# - 5.6 # - 7.0 # - hhvm diff --git a/codeception.yml b/codeception.yml index 87ecbd1fc8..d7a27890f6 100644 --- a/codeception.yml +++ b/codeception.yml @@ -11,8 +11,8 @@ settings: memory_limit: 1024M extensions: enabled: - - Codeception\Extension\RunFailed - - Codeception\Extension\Recorder +# - Codeception\Extension\RunFailed +# - Codeception\Extension\Recorder config: Codeception\Extension\Recorder: delete_successful: false From 50d949cb7eccc3f92e6a57f204018eb093127403 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 11:17:03 +0200 Subject: [PATCH 14/49] Working on TravisCI --- .travis.yml | 1 + codeception.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 07aa6d10b7..b77b2df708 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,7 @@ env: before_install: # set GitHub token and update composer + - phantomjs --version - if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi; - composer self-update && composer -V diff --git a/codeception.yml b/codeception.yml index d7a27890f6..8349a46e0b 100644 --- a/codeception.yml +++ b/codeception.yml @@ -10,7 +10,7 @@ settings: colors: true memory_limit: 1024M extensions: - enabled: +# enabled: # - Codeception\Extension\RunFailed # - Codeception\Extension\Recorder config: From edda5eb2fc076ce313a57b0ea059349f7d9c28a7 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 11:21:23 +0200 Subject: [PATCH 15/49] Working on TravisCI --- .travis.yml | 3 ++- codeception.yml | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index b77b2df708..4bdcc265fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,6 @@ env: before_install: # set GitHub token and update composer - - phantomjs --version - if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi; - composer self-update && composer -V @@ -57,6 +56,8 @@ before_script: - 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 diff --git a/codeception.yml b/codeception.yml index 8349a46e0b..87ecbd1fc8 100644 --- a/codeception.yml +++ b/codeception.yml @@ -10,9 +10,9 @@ settings: colors: true memory_limit: 1024M extensions: -# enabled: -# - Codeception\Extension\RunFailed -# - Codeception\Extension\Recorder + enabled: + - Codeception\Extension\RunFailed + - Codeception\Extension\Recorder config: Codeception\Extension\Recorder: delete_successful: false From cbbe56c38fa4ce7f35dc4f87f3883daba61c923a Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 11:30:29 +0200 Subject: [PATCH 16/49] Working on TravisCI --- .travis.yml | 2 +- tests/acceptance.suite.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4bdcc265fb..20a66e5b56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,7 +53,7 @@ before_script: # 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 + #- phantomjs --webdriver=4444 & # '&' allows to run in background # Give it some time to start - sleep 5 # Make sure the app is up-to-date diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index 4a152dce6e..56b0928116 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -12,7 +12,7 @@ modules: host: 127.0.0.1 window_size: 1024x768 wait: 5 - browser: phantomjs + browser: firefox capabilities: unexpectedAlertBehaviour: 'accept' webStorageEnabled: true From 836523bad68fc779d9d130f91c3eb18cccb11da7 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 11:39:09 +0200 Subject: [PATCH 17/49] Working on TravisCI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 20a66e5b56..4bdcc265fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,7 +53,7 @@ before_script: # 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 + - phantomjs --webdriver=4444 & # '&' allows to run in background # Give it some time to start - sleep 5 # Make sure the app is up-to-date From 65557fc0bd266ccb0211c01df1a10881690d6489 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 11:49:07 +0200 Subject: [PATCH 18/49] Working on TravisCI --- composer.json | 2 +- composer.lock | 94 +++++++++++++++++++------------------- tests/acceptance.suite.yml | 2 +- 3 files changed, 49 insertions(+), 49 deletions(-) diff --git a/composer.json b/composer.json index 740e501771..68d48cd648 100644 --- a/composer.json +++ b/composer.json @@ -69,7 +69,7 @@ "require-dev": { "phpunit/phpunit": "~4.0", "phpspec/phpspec": "~2.1", - "codeception/codeception": "2.1.2", + "codeception/codeception": "*", "codeception/c3": "~2.0", "fzaninotto/faker": "^1.5" }, diff --git a/composer.lock b/composer.lock index 7157dd5118..5957493167 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "cfae9eb02e70e68bef3b7a573b771cd1", - "content-hash": "9725ebe501b47a2dd80af2554009e32a", + "hash": "fceb9a043eac244cb01d8e8378e6d66a", + "content-hash": "f717dc8e67caa65002f0f0689d4a5478", "packages": [ { "name": "agmscode/omnipay-agms", @@ -6272,25 +6272,25 @@ }, { "name": "symfony/css-selector", - "version": "v2.8.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "ac06d8173bd80790536c0a4a634a7d705b91f54f" + "reference": "6605602690578496091ac20ec7a5cbd160d4dff4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/ac06d8173bd80790536c0a4a634a7d705b91f54f", - "reference": "ac06d8173bd80790536c0a4a634a7d705b91f54f", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/6605602690578496091ac20ec7a5cbd160d4dff4", + "reference": "6605602690578496091ac20ec7a5cbd160d4dff4", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -6321,7 +6321,7 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2016-01-03 15:33:41" + "time": "2016-01-27 05:14:46" }, { "name": "symfony/debug", @@ -7565,33 +7565,33 @@ }, { "name": "codeception/codeception", - "version": "2.1.2", + "version": "2.1.6", "source": { "type": "git", "url": "https://github.com/Codeception/Codeception.git", - "reference": "521adbb2ee34e9debdd8508a2c41ab2b5c2f042b" + "reference": "b199941f5e59d1e7fd32d78296c8ab98db873d89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/521adbb2ee34e9debdd8508a2c41ab2b5c2f042b", - "reference": "521adbb2ee34e9debdd8508a2c41ab2b5c2f042b", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/b199941f5e59d1e7fd32d78296c8ab98db873d89", + "reference": "b199941f5e59d1e7fd32d78296c8ab98db873d89", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", "facebook/webdriver": ">=1.0.1", - "guzzlehttp/guzzle": ">=4.0|<7.0", + "guzzlehttp/guzzle": ">=4.1.4 <7.0", "guzzlehttp/psr7": "~1.0", "php": ">=5.4.0", "phpunit/phpunit": "~4.8.0", - "symfony/browser-kit": "~2.4", - "symfony/console": "~2.4", - "symfony/css-selector": "~2.4", - "symfony/dom-crawler": "~2.4,!=2.4.5", - "symfony/event-dispatcher": "~2.4", - "symfony/finder": "~2.4", - "symfony/yaml": "~2.4" + "symfony/browser-kit": ">=2.4|<3.1", + "symfony/console": ">=2.4|<3.1", + "symfony/css-selector": ">=2.4|<3.1", + "symfony/dom-crawler": ">=2.4|<3.1", + "symfony/event-dispatcher": ">=2.4|<3.1", + "symfony/finder": ">=2.4|<3.1", + "symfony/yaml": ">=2.4|<3.1" }, "require-dev": { "codeception/specify": "~0.3", @@ -7641,7 +7641,7 @@ "functional testing", "unit testing" ], - "time": "2015-08-09 13:48:55" + "time": "2016-02-09 22:27:48" }, { "name": "doctrine/instantiator", @@ -8707,25 +8707,25 @@ }, { "name": "symfony/browser-kit", - "version": "v2.8.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "a93dffaf763182acad12a4c42c7efc372899891e" + "reference": "dde849a0485b70a24b36f826ed3fb95b904d80c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/a93dffaf763182acad12a4c42c7efc372899891e", - "reference": "a93dffaf763182acad12a4c42c7efc372899891e", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/dde849a0485b70a24b36f826ed3fb95b904d80c3", + "reference": "dde849a0485b70a24b36f826ed3fb95b904d80c3", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0" + "php": ">=5.5.9", + "symfony/dom-crawler": "~2.8|~3.0" }, "require-dev": { - "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", - "symfony/process": "~2.3.34|~2.7,>=2.7.6|~3.0.0" + "symfony/css-selector": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" }, "suggest": { "symfony/process": "" @@ -8733,7 +8733,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -8760,28 +8760,28 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2016-01-12 17:46:01" + "time": "2016-01-27 11:34:55" }, { "name": "symfony/dom-crawler", - "version": "v2.8.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "650d37aacb1fa0dcc24cced483169852b3a0594e" + "reference": "b693a9650aa004576b593ff2e91ae749dc90123d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/650d37aacb1fa0dcc24cced483169852b3a0594e", - "reference": "650d37aacb1fa0dcc24cced483169852b3a0594e", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/b693a9650aa004576b593ff2e91ae749dc90123d", + "reference": "b693a9650aa004576b593ff2e91ae749dc90123d", "shasum": "" }, "require": { - "php": ">=5.3.9", + "php": ">=5.5.9", "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { - "symfony/css-selector": "~2.8|~3.0.0" + "symfony/css-selector": "~2.8|~3.0" }, "suggest": { "symfony/css-selector": "" @@ -8789,7 +8789,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -8816,7 +8816,7 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2016-01-03 15:33:41" + "time": "2016-01-25 09:56:57" }, { "name": "symfony/polyfill-mbstring", @@ -8879,25 +8879,25 @@ }, { "name": "symfony/yaml", - "version": "v2.8.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "34c8a4b51e751e7ea869b8262f883d008a2b81b8" + "reference": "3cf0709d7fe936e97bee9e954382e449003f1d9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/34c8a4b51e751e7ea869b8262f883d008a2b81b8", - "reference": "34c8a4b51e751e7ea869b8262f883d008a2b81b8", + "url": "https://api.github.com/repos/symfony/yaml/zipball/3cf0709d7fe936e97bee9e954382e449003f1d9a", + "reference": "3cf0709d7fe936e97bee9e954382e449003f1d9a", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -8924,7 +8924,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-01-13 10:28:07" + "time": "2016-02-02 13:44:19" } ], "aliases": [], diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index 56b0928116..4a152dce6e 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -12,7 +12,7 @@ modules: host: 127.0.0.1 window_size: 1024x768 wait: 5 - browser: firefox + browser: phantomjs capabilities: unexpectedAlertBehaviour: 'accept' webStorageEnabled: true From 869febc1d32bd4fa70d71e5192f2b5a73d0431d5 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 12:02:30 +0200 Subject: [PATCH 19/49] Fix for Date in Expenses #731 --- app/Http/Controllers/ExpenseController.php | 2 +- app/Models/Expense.php | 2 +- resources/views/expenses/edit.blade.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/ExpenseController.php b/app/Http/Controllers/ExpenseController.php index 6f2a6e884a..5535b863e8 100644 --- a/app/Http/Controllers/ExpenseController.php +++ b/app/Http/Controllers/ExpenseController.php @@ -96,7 +96,7 @@ class ExpenseController extends BaseController { $expense = Expense::scope($publicId)->firstOrFail(); $expense->expense_date = Utils::fromSqlDate($expense->expense_date); - + $actions = []; if ($expense->invoice) { $actions[] = ['url' => URL::to("invoices/{$expense->invoice->public_id}/edit"), 'label' => trans("texts.view_invoice")]; diff --git a/app/Models/Expense.php b/app/Models/Expense.php index 2749607c87..2d1b8041d7 100644 --- a/app/Models/Expense.php +++ b/app/Models/Expense.php @@ -12,7 +12,7 @@ class Expense extends EntityModel use SoftDeletes; use PresentableTrait; - protected $dates = ['deleted_at','expense_date']; + protected $dates = ['deleted_at']; protected $presenter = 'App\Ninja\Presenters\ExpensePresenter'; protected $fillable = [ diff --git a/resources/views/expenses/edit.blade.php b/resources/views/expenses/edit.blade.php index c2e00ab6af..589c8d8cda 100644 --- a/resources/views/expenses/edit.blade.php +++ b/resources/views/expenses/edit.blade.php @@ -160,7 +160,7 @@ } $vendorSelect.combobox(); - $('#expense_date').datepicker('update', new Date()); + $('#expense_date').datepicker('update', '{{ $expense ? $expense->expense_date : 'new Date()' }}'); $('.expense_date .input-group-addon').click(function() { toggleDatePicker('expense_date'); From f060798721a155760c5c5939c780dc5d95541da0 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 12:11:09 +0200 Subject: [PATCH 20/49] Working on TravisCI --- .env.example | 2 +- .travis.yml | 8 ++------ tests/_bootstrap.php.default | 2 +- tests/acceptance.suite.yml | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.env.example b/.env.example index 20c977c663..9061ffc8d1 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,6 @@ APP_ENV=production APP_DEBUG=false -APP_URL=http://ninja.dev +APP_URL=http://127.0.0.1 APP_CIPHER=rijndael-128 APP_KEY=SomeRandomString diff --git a/.travis.yml b/.travis.yml index 4bdcc265fb..77b175fadb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,6 @@ php: # - 7.0 # - hhvm -addons: - hosts: - - ninja.dev - cache: directories: - vendor @@ -51,13 +47,13 @@ before_script: - 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 + - php artisan serve --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 + - curl -L http://127.0.0.1:8000/update script: - php ./vendor/codeception/codeception/codecept run --html --debug diff --git a/tests/_bootstrap.php.default b/tests/_bootstrap.php.default index 19fc7eba0d..b27f5f6112 100644 --- a/tests/_bootstrap.php.default +++ b/tests/_bootstrap.php.default @@ -2,7 +2,7 @@ // This is global bootstrap for autoloading use Codeception\Util\Fixtures; -Fixtures::add('url', 'http://ninja.dev:8000'); +Fixtures::add('url', 'http://127.0.0.1:8000'); Fixtures::add('username', 'user@example.com'); Fixtures::add('password', 'password'); diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index 4a152dce6e..8b830869aa 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -8,7 +8,7 @@ class_name: AcceptanceTester modules: enabled: - WebDriver: - url: 'http://ninja.dev:8000' + url: 'http://127.0.0.1:8000' host: 127.0.0.1 window_size: 1024x768 wait: 5 From d3dce0f3a50e6c323f10b3d22c15e1b21ddf175b Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 12:20:43 +0200 Subject: [PATCH 21/49] Working on TravisCI --- .travis.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 77b175fadb..be95a1a04d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,10 @@ php: # - 7.0 # - hhvm +addons: + hosts: + - localhost + cache: directories: - vendor @@ -47,13 +51,13 @@ before_script: - 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 --port=8000 & # '&' allows to run in background + - php artisan serve --host=localhost --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://127.0.0.1:8000/update + - curl -L http://localhost:8000/update script: - php ./vendor/codeception/codeception/codecept run --html --debug From c834baa1b8bc58bdd0eea0359cfa71c1a4fb86c6 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 12:26:21 +0200 Subject: [PATCH 22/49] Working on TravisCI --- .env.example | 2 +- .travis.yml | 6 +++--- tests/_bootstrap.php.default | 2 +- tests/acceptance.suite.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.env.example b/.env.example index 9061ffc8d1..20c977c663 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,6 @@ APP_ENV=production APP_DEBUG=false -APP_URL=http://127.0.0.1 +APP_URL=http://ninja.dev APP_CIPHER=rijndael-128 APP_KEY=SomeRandomString diff --git a/.travis.yml b/.travis.yml index be95a1a04d..4bdcc265fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ php: addons: hosts: - - localhost + - ninja.dev cache: directories: @@ -51,13 +51,13 @@ before_script: - 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=localhost --port=8000 & # '&' allows to run in background + - 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://localhost:8000/update + - curl -L http://ninja.dev:8000/update script: - php ./vendor/codeception/codeception/codecept run --html --debug diff --git a/tests/_bootstrap.php.default b/tests/_bootstrap.php.default index b27f5f6112..19fc7eba0d 100644 --- a/tests/_bootstrap.php.default +++ b/tests/_bootstrap.php.default @@ -2,7 +2,7 @@ // This is global bootstrap for autoloading use Codeception\Util\Fixtures; -Fixtures::add('url', 'http://127.0.0.1:8000'); +Fixtures::add('url', 'http://ninja.dev:8000'); Fixtures::add('username', 'user@example.com'); Fixtures::add('password', 'password'); diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index 8b830869aa..4a152dce6e 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -8,7 +8,7 @@ class_name: AcceptanceTester modules: enabled: - WebDriver: - url: 'http://127.0.0.1:8000' + url: 'http://ninja.dev:8000' host: 127.0.0.1 window_size: 1024x768 wait: 5 From 73312502ccba4f635787d2708ccd524175196c7c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 12:29:00 +0200 Subject: [PATCH 23/49] Working on TravisCI --- tests/acceptance.suite.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index 4a152dce6e..34317d1455 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -9,7 +9,6 @@ modules: enabled: - WebDriver: url: 'http://ninja.dev:8000' - host: 127.0.0.1 window_size: 1024x768 wait: 5 browser: phantomjs From a7176a0c628053ed7774d9409d23c17e71364cf3 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 12:37:23 +0200 Subject: [PATCH 24/49] Working on TravisCI --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4bdcc265fb..d6fbe76440 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,6 +63,8 @@ script: - php ./vendor/codeception/codeception/codecept run --html --debug after_script: + - cat /var/log/apache2/access.log + - cat /var/log/apache2/error.log - cat storage/logs/laravel.log From efada670329f32105f834ad014bb8b1d87dd40e0 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 12:39:06 +0200 Subject: [PATCH 25/49] Working on TravisCI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d6fbe76440..f38eaaf24b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,7 +53,7 @@ before_script: # 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 + - phantomjs --webdriver=4444 --ignore-ssl-errors=true & # '&' allows to run in background # Give it some time to start - sleep 5 # Make sure the app is up-to-date From 6e3b5194e864ffea50a4658986d60d29d0980e89 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 12:53:25 +0200 Subject: [PATCH 26/49] Working on TravisCI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f38eaaf24b..211c405a84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,7 +53,7 @@ before_script: # Start webserver on ninja.dev:8000 - php artisan serve --host=ninja.dev --port=8000 & # '&' allows to run in background # Start PhantomJS - - phantomjs --webdriver=4444 --ignore-ssl-errors=true & # '&' allows to run in background + - phantomjs --webdriver=4444 --ssl-protocol=any & # '&' allows to run in background # Give it some time to start - sleep 5 # Make sure the app is up-to-date From ec6922cca03a23f6fb184fb30cabd1e222d9c459 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 12:56:32 +0200 Subject: [PATCH 27/49] Working on TravisCI --- tests/acceptance.suite.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index 34317d1455..5f3486a3c0 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -8,7 +8,7 @@ class_name: AcceptanceTester modules: enabled: - WebDriver: - url: 'http://ninja.dev:8000' + url: 'http://ninja.dev:8000/' window_size: 1024x768 wait: 5 browser: phantomjs From 19a4978fe53513f051f36655ad436f0a6c6b10df Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 13:03:06 +0200 Subject: [PATCH 28/49] Working on TravisCI --- .travis.yml | 1 + tests/acceptance.suite.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 211c405a84..e5f5298c80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,6 +63,7 @@ script: - php ./vendor/codeception/codeception/codecept run --html --debug after_script: + - cat tests/_output/* - cat /var/log/apache2/access.log - cat /var/log/apache2/error.log - cat storage/logs/laravel.log diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index 5f3486a3c0..34317d1455 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -8,7 +8,7 @@ class_name: AcceptanceTester modules: enabled: - WebDriver: - url: 'http://ninja.dev:8000/' + url: 'http://ninja.dev:8000' window_size: 1024x768 wait: 5 browser: phantomjs From 7764d336f682f4f5b8d77b5a77e57c4862c08bb3 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 13:21:19 +0200 Subject: [PATCH 29/49] Working on TravisCI --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e5f5298c80..21ab6b6b12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,7 @@ 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 + - apt-get -y install phantomjs screen install: # install Composer dependencies @@ -53,7 +54,8 @@ before_script: # Start webserver on ninja.dev:8000 - php artisan serve --host=ninja.dev --port=8000 & # '&' allows to run in background # Start PhantomJS - - phantomjs --webdriver=4444 --ssl-protocol=any & # '&' allows to run in background + #- phantomjs --webdriver=4444 & # '&' allows to run in background + - screen -S server -d m phantomjs --webdriver=4444 & # Give it some time to start - sleep 5 # Make sure the app is up-to-date From 983c4305248f8089dadfc7cbaf942b6b416b3f80 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 13:24:14 +0200 Subject: [PATCH 30/49] Working on TravisCI --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 21ab6b6b12..eabd58f6fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: php -sudo: false +sudo: true php: - 5.5 @@ -27,7 +27,7 @@ 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 - - apt-get -y install phantomjs screen + - sudo apt-get -y install phantomjs screen install: # install Composer dependencies From f8066492e63cb3bc58d18e08c7dafdb68504d6b2 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 13:36:47 +0200 Subject: [PATCH 31/49] Working on TravisCI --- .travis.yml | 12 +++++------- tests/acceptance.suite.yml | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index eabd58f6fa..3a0e5caa62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: php -sudo: true +sudo: false php: - 5.5 @@ -27,7 +27,6 @@ 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 - - sudo apt-get -y install phantomjs screen install: # install Composer dependencies @@ -54,8 +53,7 @@ before_script: # 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 - - screen -S server -d m phantomjs --webdriver=4444 & + - phantomjs --webdriver=4444 & # '&' allows to run in background # Give it some time to start - sleep 5 # Make sure the app is up-to-date @@ -65,9 +63,9 @@ script: - php ./vendor/codeception/codeception/codecept run --html --debug after_script: - - cat tests/_output/* - - cat /var/log/apache2/access.log - - cat /var/log/apache2/error.log + #- cat tests/_output/* + #- cat /var/log/apache2/access.log + #- cat /var/log/apache2/error.log - cat storage/logs/laravel.log diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml index 34317d1455..05dcbc71ec 100644 --- a/tests/acceptance.suite.yml +++ b/tests/acceptance.suite.yml @@ -8,10 +8,10 @@ class_name: AcceptanceTester modules: enabled: - WebDriver: - url: 'http://ninja.dev:8000' + url: 'http://ninja.dev:8000/' window_size: 1024x768 wait: 5 - browser: phantomjs + browser: firefox capabilities: unexpectedAlertBehaviour: 'accept' webStorageEnabled: true From 40f7004a18e6a8b1348967933b05240e624445ad Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 13:42:07 +0200 Subject: [PATCH 32/49] Working on TravisCI --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3a0e5caa62..157e2da126 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: php -sudo: false +sudo: true php: - 5.5 @@ -64,8 +64,8 @@ script: after_script: #- cat tests/_output/* - #- cat /var/log/apache2/access.log - #- cat /var/log/apache2/error.log + - cat /var/log/apache2/access.log + - cat /var/log/apache2/error.log - cat storage/logs/laravel.log From 3e7928034477a7ffdbfb29854b514d1fc1af3998 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 14:15:35 +0200 Subject: [PATCH 33/49] Working on TravisCI --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 157e2da126..146e8c0e31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,6 +58,7 @@ before_script: - sleep 5 # Make sure the app is up-to-date - curl -L http://ninja.dev:8000/update + #- curl -L http://ninja.dev:8000/login script: - php ./vendor/codeception/codeception/codecept run --html --debug From d94b78fe6c5857cfe13ae1b238013e6d95faf133 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 14:34:52 +0200 Subject: [PATCH 34/49] Working on TravisCI --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 146e8c0e31..bee3bd2a2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,10 @@ before_script: #- curl -L http://ninja.dev:8000/login script: - - php ./vendor/codeception/codeception/codecept run --html --debug + #- php ./vendor/codeception/codeception/codecept run --html --debug + - php ./vendor/codeception/codeception/codecept run --html --debug acceptance AllPagesCept.php + - php ./vendor/codeception/codeception/codecept run --html --debug acceptance APICest.php + - php ./vendor/codeception/codeception/codecept run --html --debug acceptance CheckBalanceCest.php after_script: #- cat tests/_output/* From dffe4a1b55e75f212c1bc7f5e2312ac9985fdd64 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 14:48:24 +0200 Subject: [PATCH 35/49] Working on TravisCI --- tests/acceptance/CheckBalanceCest.php | 1 - tests/acceptance/ClientCest.php | 1 - tests/acceptance/CreditCest.php | 1 - tests/acceptance/GoProCest.php | 1 - tests/acceptance/InvoiceCest.php | 1 - tests/acceptance/InvoiceDesignCest.php | 1 - tests/acceptance/OnlinePaymentCest.php | 1 - tests/acceptance/PaymentCest.php | 1 - tests/acceptance/TaskCest.php | 1 - tests/acceptance/TaxRatesCest.php | 1 - 10 files changed, 10 deletions(-) diff --git a/tests/acceptance/CheckBalanceCest.php b/tests/acceptance/CheckBalanceCest.php index 6bac648864..0ffe27f62a 100644 --- a/tests/acceptance/CheckBalanceCest.php +++ b/tests/acceptance/CheckBalanceCest.php @@ -1,7 +1,6 @@ Date: Thu, 18 Feb 2016 14:53:27 +0200 Subject: [PATCH 36/49] Working on TravisCI --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index d9f7f05a2b..8803e480ec 100644 --- a/readme.md +++ b/readme.md @@ -5,6 +5,7 @@ # Invoice Ninja ### [https://www.invoiceninja.com](https://www.invoiceninja.com) +[![Build Status](https://travis-ci.org/invoiceninja/invoiceninja.svg?branch=develop)](https://travis-ci.org/invoiceninja/invoiceninja) [![Join the chat at https://gitter.im/hillelcoren/invoice-ninja](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/hillelcoren/invoice-ninja?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ### Referral Program From 8968ec2f5fe29954e4cd05afc4f6947f5d1d8d27 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 15:05:17 +0200 Subject: [PATCH 37/49] Working on TravisCI --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index bee3bd2a2f..e178903e86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,6 +65,15 @@ script: - php ./vendor/codeception/codeception/codecept run --html --debug acceptance AllPagesCept.php - php ./vendor/codeception/codeception/codecept run --html --debug acceptance APICest.php - php ./vendor/codeception/codeception/codecept run --html --debug acceptance CheckBalanceCest.php + - php ./vendor/codeception/codeception/codecept run --html --debug acceptance ClientCest.php + - php ./vendor/codeception/codeception/codecept run --html --debug acceptance CreditCest.php + - php ./vendor/codeception/codeception/codecept run --html --debug acceptance InvoiceCest.php + - php ./vendor/codeception/codeception/codecept run --html --debug acceptance InvoiceDesignCest.php + - php ./vendor/codeception/codeception/codecept run --html --debug acceptance OnlinePaymentCest.php + - php ./vendor/codeception/codeception/codecept run --html --debug acceptance PaymentCest.php + - php ./vendor/codeception/codeception/codecept run --html --debug acceptance TaskCest.php + - php ./vendor/codeception/codeception/codecept run --html --debug acceptance TaxRatesCest.php + #- php ./vendor/codeception/codeception/codecept run --html --debug acceptance GoProCest.php after_script: #- cat tests/_output/* From b7fd805fbabeba293cdd19fd1676ddd7f3ea3b80 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 15:46:21 +0200 Subject: [PATCH 38/49] Increased MySQL wait time --- .travis.yml | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index e178903e86..10d7092e23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,7 @@ install: - travis_retry composer install --prefer-dist; before_script: + - mysql -e 'SET @@GLOBAL.wait_timeout=28800' # copy configuration files - cp .env.example .env - cp tests/_bootstrap.php.default tests/_bootstrap.php @@ -58,29 +59,24 @@ before_script: - sleep 5 # Make sure the app is up-to-date - curl -L http://ninja.dev:8000/update - #- curl -L http://ninja.dev:8000/login script: #- php ./vendor/codeception/codeception/codecept run --html --debug - - php ./vendor/codeception/codeception/codecept run --html --debug acceptance AllPagesCept.php - - php ./vendor/codeception/codeception/codecept run --html --debug acceptance APICest.php - - php ./vendor/codeception/codeception/codecept run --html --debug acceptance CheckBalanceCest.php - - php ./vendor/codeception/codeception/codecept run --html --debug acceptance ClientCest.php - - php ./vendor/codeception/codeception/codecept run --html --debug acceptance CreditCest.php - - php ./vendor/codeception/codeception/codecept run --html --debug acceptance InvoiceCest.php - - php ./vendor/codeception/codeception/codecept run --html --debug acceptance InvoiceDesignCest.php - - php ./vendor/codeception/codeception/codecept run --html --debug acceptance OnlinePaymentCest.php - - php ./vendor/codeception/codeception/codecept run --html --debug acceptance PaymentCest.php - - php ./vendor/codeception/codeception/codecept run --html --debug acceptance TaskCest.php - - php ./vendor/codeception/codeception/codecept run --html --debug acceptance TaxRatesCest.php - #- php ./vendor/codeception/codeception/codecept run --html --debug acceptance GoProCest.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 --debug 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 GoProCest.php after_script: - #- cat tests/_output/* - - cat /var/log/apache2/access.log - - cat /var/log/apache2/error.log - - cat storage/logs/laravel.log - + - cat storage/logs/laravel.log notifications: email: From f797497a8a44cf156bf448f9b0938822500011a0 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 15:46:44 +0200 Subject: [PATCH 39/49] Fix for invitations in the API --- app/Http/Controllers/InvoiceApiController.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/InvoiceApiController.php b/app/Http/Controllers/InvoiceApiController.php index 2ba39cd776..f99e12a4d7 100644 --- a/app/Http/Controllers/InvoiceApiController.php +++ b/app/Http/Controllers/InvoiceApiController.php @@ -20,18 +20,20 @@ use App\Http\Controllers\BaseAPIController; use App\Ninja\Transformers\InvoiceTransformer; use App\Http\Requests\CreateInvoiceRequest; use App\Http\Requests\UpdateInvoiceRequest; +use App\Services\InvoiceService; class InvoiceApiController extends BaseAPIController { protected $invoiceRepo; - public function __construct(InvoiceRepository $invoiceRepo, ClientRepository $clientRepo, PaymentRepository $paymentRepo, Mailer $mailer) + public function __construct(InvoiceService $invoiceService, InvoiceRepository $invoiceRepo, ClientRepository $clientRepo, PaymentRepository $paymentRepo, Mailer $mailer) { parent::__construct(); $this->invoiceRepo = $invoiceRepo; $this->clientRepo = $clientRepo; $this->paymentRepo = $paymentRepo; + $this->invoiceService = $invoiceService; $this->mailer = $mailer; } @@ -187,7 +189,7 @@ class InvoiceApiController extends BaseAPIController $data = self::prepareData($data, $client); $data['client_id'] = $client->id; - $invoice = $this->invoiceRepo->save($data); + $invoice = $this->invoiceService->save($data); $payment = false; // Optionally create payment with invoice @@ -199,14 +201,6 @@ class InvoiceApiController extends BaseAPIController ]); } - if (!isset($data['id'])) { - $invitation = Invitation::createNew(); - $invitation->invoice_id = $invoice->id; - $invitation->contact_id = $client->contacts[0]->id; - $invitation->invitation_key = str_random(RANDOM_KEY_LENGTH); - $invitation->save(); - } - if (isset($data['email_invoice']) && $data['email_invoice']) { if ($payment) { $this->mailer->sendPaymentConfirmation($payment); @@ -387,7 +381,7 @@ class InvoiceApiController extends BaseAPIController $data = $request->input(); $data['public_id'] = $publicId; - $this->invoiceRepo->save($data); + $this->invoiceService->save($data); $invoice = Invoice::scope($publicId)->with('client', 'invoice_items', 'invitations')->firstOrFail(); $transformer = new InvoiceTransformer(\Auth::user()->account, Input::get('serializer')); From fcc1d62d9be96bfc31f962473bc798919f63f32c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 16:59:50 +0200 Subject: [PATCH 40/49] Fixing test payment in Travis --- .travis.yml | 22 +++++++++++----------- tests/_bootstrap.php.default | 4 ++-- tests/acceptance/OnlinePaymentCest.php | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 10d7092e23..e059572897 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ install: - travis_retry composer install --prefer-dist; before_script: - - mysql -e 'SET @@GLOBAL.wait_timeout=28800' + - mysql -u root -e 'SET @@GLOBAL.wait_timeout=28800;' # copy configuration files - cp .env.example .env - cp tests/_bootstrap.php.default tests/_bootstrap.php @@ -62,17 +62,17 @@ 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 --debug 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 after_script: diff --git a/tests/_bootstrap.php.default b/tests/_bootstrap.php.default index 19fc7eba0d..33ecdcb607 100644 --- a/tests/_bootstrap.php.default +++ b/tests/_bootstrap.php.default @@ -7,5 +7,5 @@ Fixtures::add('username', 'user@example.com'); Fixtures::add('password', 'password'); Fixtures::add('api_secret', 'password'); -Fixtures::add('secret_key', ''); -Fixtures::add('publishable_key', ''); \ No newline at end of file +Fixtures::add('stripe_secret_key', ''); +Fixtures::add('stripe_publishable_key', ''); \ No newline at end of file diff --git a/tests/acceptance/OnlinePaymentCest.php b/tests/acceptance/OnlinePaymentCest.php index be21ce3a95..c0dccf6188 100644 --- a/tests/acceptance/OnlinePaymentCest.php +++ b/tests/acceptance/OnlinePaymentCest.php @@ -26,7 +26,7 @@ class OnlinePaymentCest $I->amOnPage('/settings/online_payments'); if (strpos($I->grabFromCurrentUrl(), 'create') !== false) { - $I->fillField(['name' =>'23_apiKey'], Fixtures::get('secret_key')); + $I->fillField(['name' =>'23_apiKey'], env('stripe_secret_key') ?: Fixtures::get('stripe_secret_key')); // Fails to load StripeJS causing "ReferenceError: Can't find variable: Stripe" //$I->fillField(['name' =>'publishable_key'], Fixtures::get('publishable_key')); $I->selectOption('#token_billing_type_id', 4); From 5ddef6f12b56c0fbc7848336fbf16556f9144883 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 17:16:14 +0200 Subject: [PATCH 41/49] Fixing test payment in Travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index e059572897..ada691db9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,6 +40,7 @@ before_script: - mysql -u root -e 'SET @@GLOBAL.wait_timeout=28800;' # copy configuration files - cp .env.example .env + - sed -i 's/REQUIRE_HTTPS=false/NINJA_DEV=true/g' .env - cp tests/_bootstrap.php.default tests/_bootstrap.php - php artisan key:generate --no-interaction - sed -i 's/APP_ENV=production/APP_ENV=development/g' .env From 5b743355feffaedd03b011ad7bc4f9c8c13525dd Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 17:35:21 +0200 Subject: [PATCH 42/49] Fixing test payment in Travis --- app/Http/Controllers/AccountGatewayController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/AccountGatewayController.php b/app/Http/Controllers/AccountGatewayController.php index dfbd2b3861..1fbeaa2375 100644 --- a/app/Http/Controllers/AccountGatewayController.php +++ b/app/Http/Controllers/AccountGatewayController.php @@ -203,7 +203,7 @@ class AccountGatewayController extends BaseController if (Utils::isNinjaDev() && Input::get('23_apiKey') == env('TEST_API_KEY')) { // do nothing - we're unable to acceptance test with StripeJS } else { - $rules['publishable_key'] = 'required'; + //$rules['publishable_key'] = 'required'; } } From 7e6d13750498e7c7d944c9e2c037e16ffb68a3bc Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 19:00:21 +0200 Subject: [PATCH 43/49] Fixing test payment in Travis --- .travis.yml | 2 +- app/Http/Controllers/AccountGatewayController.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ada691db9a..8f973c8119 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,11 +40,11 @@ before_script: - mysql -u root -e 'SET @@GLOBAL.wait_timeout=28800;' # copy configuration files - cp .env.example .env - - sed -i 's/REQUIRE_HTTPS=false/NINJA_DEV=true/g' .env - cp tests/_bootstrap.php.default tests/_bootstrap.php - 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 + - sed -i 's/REQUIRE_HTTPS=false/NINJA_DEV=true/g' .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;" diff --git a/app/Http/Controllers/AccountGatewayController.php b/app/Http/Controllers/AccountGatewayController.php index 1fbeaa2375..58b831503b 100644 --- a/app/Http/Controllers/AccountGatewayController.php +++ b/app/Http/Controllers/AccountGatewayController.php @@ -200,10 +200,10 @@ class AccountGatewayController extends BaseController if ($gatewayId == GATEWAY_DWOLLA) { $optional = array_merge($optional, ['key', 'secret']); } elseif ($gatewayId == GATEWAY_STRIPE) { - if (Utils::isNinjaDev() && Input::get('23_apiKey') == env('TEST_API_KEY')) { + if (Utils::isNinjaDev()) { // do nothing - we're unable to acceptance test with StripeJS } else { - //$rules['publishable_key'] = 'required'; + $rules['publishable_key'] = 'required'; } } From 82318ade5cab945c8b81f97c2e5b18a64ef41eed Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 19:03:24 +0200 Subject: [PATCH 44/49] Fixing test payment in Travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8f973c8119..81d522bfbb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,7 +70,7 @@ script: #- 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 OnlinePaymentCest.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 From bb817f8afe82775a5ead89bdf6ef51bf0dbf9c66 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 19:14:51 +0200 Subject: [PATCH 45/49] Working on Travis --- .travis.yml | 6 +- resources/lang/en/texts.php | 173 ++++++++---------------------------- 2 files changed, 39 insertions(+), 140 deletions(-) diff --git a/.travis.yml b/.travis.yml index 81d522bfbb..f39a3a6142 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,9 @@ sudo: true php: - 5.5 -# - 5.6 -# - 7.0 -# - hhvm + - 5.6 + - 7.0 + - hhvm addons: hosts: diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index ace0aba384..0c9bfac165 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -23,7 +23,6 @@ $LANG = array( 'size_id' => 'Company Size', 'industry_id' => 'Industry', 'private_notes' => 'Private Notes', - 'invoice' => 'Invoice', 'client' => 'Client', 'invoice_date' => 'Invoice Date', @@ -47,7 +46,6 @@ $LANG = array( 'invoice_design_id' => 'Design', 'terms' => 'Terms', 'your_invoice' => 'Your Invoice', - 'remove_contact' => 'Remove contact', 'add_contact' => 'Add contact', 'create_new_client' => 'Create new client', @@ -71,7 +69,6 @@ $LANG = array( 'settings' => 'Settings', 'enable_invoice_tax' => 'Enable specifying an invoice tax', 'enable_line_item_tax' => 'Enable specifying line item taxes', - 'dashboard' => 'Dashboard', 'clients' => 'Clients', 'invoices' => 'Invoices', @@ -96,7 +93,6 @@ $LANG = array( 'provide_email' => 'Please provide a valid email address', 'powered_by' => 'Powered by', 'no_items' => 'No items', - 'recurring_invoices' => 'Recurring Invoices', 'recurring_help' => '

    Automatically send clients the same invoices weekly, bi-monthly, monthly, quarterly or annually.

    Use :MONTH, :QUARTER or :YEAR for dynamic dates. Basic math works as well, for example :MONTH-1.

    @@ -106,7 +102,6 @@ $LANG = array(
  • ":YEAR+1 yearly subscription" => "2015 Yearly Subscription"
  • "Retainer payment for :QUARTER+1" => "Retainer payment for Q2"
  • ', - 'in_total_revenue' => 'in total revenue', 'billed_client' => 'billed client', 'billed_clients' => 'billed clients', @@ -115,7 +110,6 @@ $LANG = array( 'invoices_past_due' => 'Invoices Past Due', 'upcoming_invoices' => 'Upcoming Invoices', 'average_invoice' => 'Average Invoice', - 'archive' => 'Archive', 'delete' => 'Delete', 'archive_client' => 'Archive Client', @@ -151,7 +145,6 @@ $LANG = array( 'select' => 'Select', 'edit_client' => 'Edit Client', 'edit_invoice' => 'Edit Invoice', - 'create_invoice' => 'Create Invoice', 'enter_credit' => 'Enter Credit', 'last_logged_in' => 'Last logged in', @@ -163,10 +156,8 @@ $LANG = array( 'message' => 'Message', 'adjustment' => 'Adjustment', 'are_you_sure' => 'Are you sure?', - 'payment_type_id' => 'Payment Type', 'amount' => 'Amount', - 'work_email' => 'Email', 'language_id' => 'Language', 'timezone_id' => 'Timezone', @@ -196,11 +187,9 @@ $LANG = array( 'client_view_styling' => 'Client View Styling', 'pdf_email_attachment' => 'Attach PDFs', 'custom_css' => 'Custom CSS', - 'import_clients' => 'Import Client Data', 'csv_file' => 'CSV file', 'export_clients' => 'Export Client Data', - 'created_client' => 'Successfully created client', 'created_clients' => 'Successfully created :count client(s)', 'updated_settings' => 'Successfully updated settings', @@ -211,14 +200,12 @@ $LANG = array( 'payment_error' => 'There was an error processing your payment. Please try again later.', 'registration_required' => 'Please sign up to email an invoice', 'confirmation_required' => 'Please confirm your email address', - 'updated_client' => 'Successfully updated client', 'created_client' => 'Successfully created client', 'archived_client' => 'Successfully archived client', 'archived_clients' => 'Successfully archived :count clients', 'deleted_client' => 'Successfully deleted client', 'deleted_clients' => 'Successfully deleted :count clients', - 'updated_invoice' => 'Successfully updated invoice', 'created_invoice' => 'Successfully created invoice', 'cloned_invoice' => 'Successfully cloned invoice', @@ -228,7 +215,6 @@ $LANG = array( 'archived_invoices' => 'Successfully archived :count invoices', 'deleted_invoice' => 'Successfully deleted invoice', 'deleted_invoices' => 'Successfully deleted :count invoices', - 'created_payment' => 'Successfully created payment', 'created_payments' => 'Successfully created :count payment(s)', 'archived_payment' => 'Successfully archived payment', @@ -236,21 +222,18 @@ $LANG = array( 'deleted_payment' => 'Successfully deleted payment', 'deleted_payments' => 'Successfully deleted :count payments', 'applied_payment' => 'Successfully applied payment', - 'created_credit' => 'Successfully created credit', 'archived_credit' => 'Successfully archived credit', 'archived_credits' => 'Successfully archived :count credits', 'deleted_credit' => 'Successfully deleted credit', 'deleted_credits' => 'Successfully deleted :count credits', 'imported_file' => 'Successfully imported file', - 'updated_vendor' => 'Successfully updated vendor', 'created_vendor' => 'Successfully created vendor', 'archived_vendor' => 'Successfully archived vendor', 'archived_vendors' => 'Successfully archived :count vendors', 'deleted_vendor' => 'Successfully deleted vendor', 'deleted_vendors' => 'Successfully deleted :count vendors', - 'confirmation_subject' => 'Invoice Ninja Account Confirmation', 'confirmation_header' => 'Account Confirmation', 'confirmation_message' => 'Please access the link below to confirm your account.', @@ -261,7 +244,6 @@ $LANG = array( 'email_salutation' => 'Dear :name,', 'email_signature' => 'Regards,', 'email_from' => 'The Invoice Ninja Team', - 'user_email_footer' => 'To adjust your email notification settings please visit '.SITE_URL.'/settings/notifications', 'invoice_link_message' => 'To view the invoice click the link below:', 'notification_invoice_paid_subject' => 'Invoice :invoice was paid by :client', 'notification_invoice_sent_subject' => 'Invoice :invoice was sent to :client', @@ -270,29 +252,11 @@ $LANG = array( 'notification_invoice_sent' => 'The following client :client was emailed Invoice :invoice for :amount.', 'notification_invoice_viewed' => 'The following client :client viewed Invoice :invoice for :amount.', 'reset_password' => 'You can reset your account password by clicking the following button:', - 'reset_password_footer' => 'If you did not request this password reset please email our support: '.CONTACT_EMAIL, - 'secure_payment' => 'Secure Payment', 'card_number' => 'Card Number', 'expiration_month' => 'Expiration Month', 'expiration_year' => 'Expiration Year', 'cvv' => 'CVV', - - 'security' => [ - 'too_many_attempts' => 'Too many attempts. Try again in few minutes.', - 'wrong_credentials' => 'Incorrect email or password.', - 'confirmation' => 'Your account has been confirmed!', - 'wrong_confirmation' => 'Wrong confirmation code.', - 'password_forgot' => 'The information regarding password reset was sent to your email.', - 'password_reset' => 'Your password has been changed successfully.', - 'wrong_password_reset' => 'Invalid password. Try again', - ], - - 'pro_plan' => [ - 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the Pro Plan', - 'remove_logo_link' => 'Click here', - ], - 'logout' => 'Log Out', 'sign_up_to_save' => 'Sign up to save your work', 'agree_to_terms' => 'I agree to the Invoice Ninja :terms', @@ -303,7 +267,6 @@ $LANG = array( 'success_message' => 'You have successfully registered! Please visit the link in the account confirmation email to verify your email address.', 'erase_data' => 'This will permanently erase your data.', 'password' => 'Password', - 'pro_plan_product' => 'Pro Plan', 'pro_plan_description' => 'One year enrollment in the Invoice Ninja Pro Plan.', 'pro_plan_success' => 'Thanks for choosing Invoice Ninja\'s Pro plan!

     
    @@ -313,7 +276,6 @@ $LANG = array( for a year of Pro-level invoicing.

    Can\'t find the invoice? Need further assistance? We\'re happy to help -- email us at contact@invoiceninja.com', - 'unsaved_changes' => 'You have unsaved changes', 'custom_fields' => 'Custom Fields', 'company_fields' => 'Company Fields', @@ -323,7 +285,6 @@ $LANG = array( 'edit' => 'Edit', 'set_name' => 'Set your company name', 'view_as_recipient' => 'View as recipient', - 'product_library' => 'Product Library', 'product' => 'Product', 'products' => 'Product Library', @@ -338,17 +299,14 @@ $LANG = array( 'created_product' => 'Successfully created product', 'archived_product' => 'Successfully archived product', 'pro_plan_custom_fields' => ':link to enable custom fields by joining the Pro Plan', - 'advanced_settings' => 'Advanced Settings', 'pro_plan_advanced_settings' => ':link to enable the advanced settings by joining the Pro Plan', 'invoice_design' => 'Invoice Design', 'specify_colors' => 'Specify colors', 'specify_colors_label' => 'Select the colors used in the invoice', - 'chart_builder' => 'Chart Builder', 'ninja_email_footer' => 'Use :site to invoice your clients and get paid online for free!', 'go_pro' => 'Go Pro', - 'quote' => 'Quote', 'quotes' => 'Quotes', 'quote_number' => 'Quote Number', @@ -358,7 +316,6 @@ $LANG = array( 'your_quote' => 'Your Quote', 'total' => 'Total', 'clone' => 'Clone', - 'new_quote' => 'New Quote', 'create_quote' => 'Create Quote', 'edit_quote' => 'Edit Quote', @@ -371,7 +328,6 @@ $LANG = array( 'view_invoice' => 'View Invoice', 'view_client' => 'View Client', 'view_quote' => 'View Quote', - 'updated_quote' => 'Successfully updated quote', 'created_quote' => 'Successfully created quote', 'cloned_quote' => 'Successfully cloned quote', @@ -381,7 +337,6 @@ $LANG = array( 'deleted_quote' => 'Successfully deleted quote', 'deleted_quotes' => 'Successfully deleted :count quotes', 'converted_to_invoice' => 'Successfully converted quote to invoice', - 'quote_subject' => 'New quote $quote from :account', 'quote_message' => 'To view your quote for :amount, click the link below.', 'quote_link_message' => 'To view your client quote click the link below:', @@ -389,16 +344,13 @@ $LANG = array( 'notification_quote_viewed_subject' => 'Quote :invoice was viewed by :client', 'notification_quote_sent' => 'The following client :client was emailed Quote :invoice for :amount.', 'notification_quote_viewed' => 'The following client :client viewed Quote :invoice for :amount.', - 'session_expired' => 'Your session has expired.', - 'invoice_fields' => 'Invoice Fields', 'invoice_options' => 'Invoice Options', 'hide_quantity' => 'Hide Quantity', 'hide_quantity_help' => 'If your line items quantities are always 1, then you can declutter invoices by no longer displaying this field.', 'hide_paid_to_date' => 'Hide Paid to Date', 'hide_paid_to_date_help' => 'Only display the "Paid to Date" area on your invoices once a payment has been received.', - 'charge_taxes' => 'Charge taxes', 'user_management' => 'User Management', 'add_user' => 'Add User', @@ -413,21 +365,16 @@ $LANG = array( 'active' => 'Active', 'pending' => 'Pending', 'deleted_user' => 'Successfully deleted user', - 'limit_users' => 'Sorry, this will exceed the limit of '.MAX_NUM_USERS.' users', - 'confirm_email_invoice' => 'Are you sure you want to email this invoice?', 'confirm_email_quote' => 'Are you sure you want to email this quote?', 'confirm_recurring_email_invoice' => 'Are you sure you want this invoice emailed?', - 'cancel_account' => 'Cancel Account', 'cancel_account_message' => 'Warning: This will permanently erase all of your data, there is no undo.', 'go_back' => 'Go Back', - 'data_visualizations' => 'Data Visualizations', 'sample_data' => 'Sample data shown', 'hide' => 'Hide', 'new_version_available' => 'A new version of :releases_link is available. You\'re running v:user_version, the latest is v:latest_version', - 'invoice_settings' => 'Invoice Settings', 'invoice_number_prefix' => 'Invoice Number Prefix', 'invoice_number_counter' => 'Invoice Number Counter', @@ -437,59 +384,48 @@ $LANG = array( 'invoice_issued_to' => 'Invoice issued to', 'invalid_counter' => 'To prevent a possible conflict please set either an invoice or quote number prefix', 'mark_sent' => 'Mark Sent', - 'gateway_help_1' => ':link to sign up for Authorize.net.', 'gateway_help_2' => ':link to sign up for Authorize.net.', 'gateway_help_17' => ':link to get your PayPal API signature.', 'gateway_help_27' => ':link to sign up for TwoCheckout.', - 'more_designs' => 'More designs', 'more_designs_title' => 'Additional Invoice Designs', 'more_designs_cloud_header' => 'Go Pro for more invoice designs', 'more_designs_cloud_text' => '', - 'more_designs_self_host_header' => 'Get 6 more invoice designs for just $'.INVOICE_DESIGNS_PRICE, 'more_designs_self_host_text' => '', 'buy' => 'Buy', 'bought_designs' => 'Successfully added additional invoice designs', 'sent' => 'sent', - 'vat_number' => 'VAT Number', 'timesheets' => 'Timesheets', - 'payment_title' => 'Enter Your Billing Address and Credit Card information', 'payment_cvv' => '*This is the 3-4 digit number onthe back of your card', 'payment_footer1' => '*Billing address must match address associated with credit card.', 'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - 'id_number' => 'ID Number', 'white_label_link' => 'White label', 'white_label_header' => 'White Label', 'bought_white_label' => 'Successfully enabled white label license', 'white_labeled' => 'White labeled', - 'restore' => 'Restore', 'restore_invoice' => 'Restore Invoice', 'restore_quote' => 'Restore Quote', 'restore_client' => 'Restore Client', 'restore_credit' => 'Restore Credit', 'restore_payment' => 'Restore Payment', - 'restored_invoice' => 'Successfully restored invoice', 'restored_quote' => 'Successfully restored quote', 'restored_client' => 'Successfully restored client', 'restored_payment' => 'Successfully restored payment', 'restored_credit' => 'Successfully restored credit', - 'reason_for_canceling' => 'Help us improve our site by telling us why you\'re leaving.', 'discount_percent' => 'Percent', 'discount_amount' => 'Amount', - 'invoice_history' => 'Invoice History', 'quote_history' => 'Quote History', 'current_version' => 'Current version', 'select_versiony' => 'Select version', 'view_history' => 'View History', - 'edit_payment' => 'Edit Payment', 'updated_payment' => 'Successfully updated payment', 'deleted' => 'Deleted', @@ -502,7 +438,6 @@ $LANG = array( 'quote_email' => 'Quote Email', 'reset_all' => 'Reset All', 'approve' => 'Approve', - 'token_billing_type_id' => 'Token Billing', 'token_billing_help' => 'Enables you to store credit cards with your gateway, and charge them at a later date.', 'token_billing_1' => 'Disabled', @@ -515,7 +450,6 @@ $LANG = array( 'edit_payment_details' => 'Edit payment details', 'token_billing' => 'Save card details', 'token_billing_secure' => 'The data is stored securely by :stripe_link', - 'support' => 'Support', 'contact_information' => 'Contact Information', '256_encryption' => '256-Bit Encryption', @@ -525,10 +459,8 @@ $LANG = array( 'order_overview' => 'Order overview', 'match_address' => '*Address must match address associated with credit card.', 'click_once' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', - 'invoice_footer' => 'Invoice Footer', 'save_as_default_footer' => 'Save as default footer', - 'token_management' => 'Token Management', 'tokens' => 'Tokens', 'add_token' => 'Add Token', @@ -539,7 +471,6 @@ $LANG = array( 'edit_token' => 'Edit Token', 'delete_token' => 'Delete Token', 'token' => 'Token', - 'add_gateway' => 'Add Gateway', 'delete_gateway' => 'Delete Gateway', 'edit_gateway' => 'Edit Gateway', @@ -548,7 +479,6 @@ $LANG = array( 'deleted_gateway' => 'Successfully deleted gateway', 'pay_with_paypal' => 'PayPal', 'pay_with_card' => 'Credit Card', - 'change_password' => 'Change password', 'current_password' => 'Current password', 'new_password' => 'New password', @@ -556,7 +486,6 @@ $LANG = array( 'password_error_incorrect' => 'The current password is incorrect.', 'password_error_invalid' => 'The new password is invalid.', 'updated_password' => 'Successfully updated password', - 'api_tokens' => 'API Tokens', 'users_and_tokens' => 'Users & Tokens', 'account_login' => 'Account Login', @@ -564,18 +493,15 @@ $LANG = array( 'forgot_password' => 'Forgot your password?', 'email_address' => 'Email address', 'lets_go' => 'Let\'s go', - 'password_recovery' => 'Password Recovery', 'send_email' => 'Send email', 'set_password' => 'Set Password', 'converted' => 'Converted', - 'email_approved' => 'Email me when a quote is approved', 'notification_quote_approved_subject' => 'Quote :invoice was approved by :client', 'notification_quote_approved' => 'The following client :client approved Quote :invoice for :amount.', 'resend_confirmation' => 'Resend confirmation email', 'confirmation_resent' => 'The confirmation email was resent', - 'gateway_help_42' => ':link to sign up for BitPay.
    Note: use a Legacy API Key, not an API token.', 'payment_type_credit_card' => 'Credit Card', 'payment_type_paypal' => 'PayPal', @@ -583,7 +509,6 @@ $LANG = array( 'knowledge_base' => 'Knowledge Base', 'partial' => 'Partial', 'partial_remaining' => ':partial of :balance', - 'more_fields' => 'More Fields', 'less_fields' => 'Less Fields', 'client_name' => 'Client Name', @@ -594,7 +519,6 @@ $LANG = array( 'view_documentation' => 'View Documentation', 'app_title' => 'Free Open-Source Online Invoicing', 'app_description' => 'Invoice Ninja is a free, open-source solution for invoicing and billing customers. With Invoice Ninja, you can easily build and send beautiful invoices from any device that has access to the web. Your clients can print your invoices, download them as pdf files, and even pay you online from within the system.', - 'rows' => 'rows', 'www' => 'www', 'logo' => 'Logo', @@ -614,7 +538,6 @@ $LANG = array( 'zapier' => 'Zapier', 'recurring' => 'Recurring', 'last_invoice_sent' => 'Last invoice sent :date', - 'processed_updates' => 'Successfully completed update', 'tasks' => 'Tasks', 'new_task' => 'New Task', @@ -660,12 +583,10 @@ $LANG = array( 'invoice_labels' => 'Invoice Labels', 'prefix' => 'Prefix', 'counter' => 'Counter', - 'payment_type_dwolla' => 'Dwolla', 'gateway_help_43' => ':link to sign up for Dwolla', 'partial_value' => 'Must be greater than zero and less than the total', 'more_actions' => 'More Actions', - 'pro_plan_title' => 'NINJA PRO', 'pro_plan_call_to_action' => 'Upgrade Now!', 'pro_plan_feature1' => 'Create Unlimited Clients', @@ -676,14 +597,12 @@ $LANG = array( 'pro_plan_feature6' => 'Create Quotes & Pro-forma Invoices', 'pro_plan_feature7' => 'Customize Invoice Field Titles & Numbering', 'pro_plan_feature8' => 'Option to Attach PDFs to Client Emails', - 'resume' => 'Resume', 'break_duration' => 'Break', 'edit_details' => 'Edit Details', 'work' => 'Work', 'timezone_unset' => 'Please :link to set your timezone', 'click_here' => 'click here', - 'email_receipt' => 'Email payment receipt to the client', 'created_payment_emailed_client' => 'Successfully created payment and emailed client', 'add_company' => 'Add Company', @@ -693,10 +612,8 @@ $LANG = array( 'unlinked_account' => 'Successfully unlinked accounts', 'login' => 'Login', 'or' => 'or', - 'email_error' => 'There was a problem sending the email', 'confirm_recurring_timing' => 'Note: emails are sent at the start of the hour.', - 'old_browser' => 'Please use a newer browser', 'payment_terms_help' => 'Sets the default invoice due date', 'unlink_account' => 'Unlink Account', 'unlink' => 'Unlink', @@ -717,7 +634,6 @@ $LANG = array( 'primary_color' => 'Primary Color', 'secondary_color' => 'Secondary Color', 'customize_design' => 'Customize Design', - 'content' => 'Content', 'styles' => 'Styles', 'defaults' => 'Defaults', @@ -731,7 +647,6 @@ $LANG = array( 'outstanding' => 'Outstanding', 'manage_companies' => 'Manage Companies', 'total_revenue' => 'Total Revenue', - 'current_user' => 'Current User', 'new_recurring_invoice' => 'New Recurring Invoice', 'recurring_invoice' => 'Recurring Invoice', @@ -743,7 +658,6 @@ $LANG = array(

    You can access any invoice field by adding Value to the end. For example $invoiceNumberValue displays the invoice number.

    To access a child property using dot notation. For example to show the client name you could use $client.nameValue.

    If you need help figuring something out post a question to our support forum.

    ', - 'invoice_due_date' => 'Due Date', 'quote_due_date' => 'Valid Until', 'valid_until' => 'Valid Until', @@ -756,15 +670,12 @@ $LANG = array( 'status_partial' => 'Partial', 'status_paid' => 'Paid', 'show_line_item_tax' => 'Display line item taxes inline', - 'iframe_url' => 'Website', 'iframe_url_help1' => 'Copy the following code to a page on your site.', 'iframe_url_help2' => 'You can test the feature by clicking \'View as recipient\' for an invoice.', - 'auto_bill' => 'Auto Bill', 'military_time' => '24 Hour Time', 'last_sent' => 'Last Sent', - 'reminder_emails' => 'Reminder Emails', 'templates_and_reminders' => 'Templates & Reminders', 'subject' => 'Subject', @@ -776,15 +687,12 @@ $LANG = array( 'reminder_subject' => 'Reminder: Invoice :invoice from :account', 'reset' => 'Reset', 'invoice_not_found' => 'The requested invoice is not available', - 'referral_program' => 'Referral Program', 'referral_code' => 'Referral URL', 'last_sent_on' => 'Sent Last: :date', - 'page_expire' => 'This page will expire soon, :click_here to keep working', 'upcoming_quotes' => 'Upcoming Quotes', 'expired_quotes' => 'Expired Quotes', - 'sign_up_using' => 'Sign up using', 'invalid_credentials' => 'These credentials do not match our records', 'show_all_options' => 'Show all options', @@ -793,18 +701,10 @@ $LANG = array( 'disable' => 'Disable', 'invoice_quote_number' => 'Invoice and Quote Numbers', 'invoice_charges' => 'Invoice Charges', - - 'invitation_status' => [ - 'sent' => 'Email Sent', - 'opened' => 'Email Openend', - 'viewed' => 'Invoice Viewed', - ], - 'notification_invoice_bounced' => 'We were unable to deliver Invoice :invoice to :contact.', 'notification_invoice_bounced_subject' => 'Unable to deliver Invoice :invoice', 'notification_quote_bounced' => 'We were unable to deliver Quote :invoice to :contact.', 'notification_quote_bounced_subject' => 'Unable to deliver Quote :invoice', - 'custom_invoice_link' => 'Custom Invoice Link', 'total_invoiced' => 'Total Invoiced', 'open_balance' => 'Open Balance', @@ -812,15 +712,12 @@ $LANG = array( 'basic_settings' => 'Basic Settings', 'pro' => 'Pro', 'gateways' => 'Payment Gateways', - 'next_send_on' => 'Send Next: :date', 'no_longer_running' => 'This invoice is not scheduled to run', 'general_settings' => 'General Settings', 'customize' => 'Customize', - 'oneclick_login_help' => 'Connect an account to login without a password', 'referral_code_help' => 'Earn money by sharing our app online', - 'enable_with_stripe' => 'Enable | Requires Stripe', 'tax_settings' => 'Tax Settings', 'create_tax_rate' => 'Add Tax Rate', @@ -841,7 +738,6 @@ $LANG = array( 'invoice_counter' => 'Invoice Counter', 'quote_counter' => 'Quote Counter', 'type' => 'Type', - 'activity_1' => ':user created client :client', 'activity_2' => ':user archived client :client', 'activity_3' => ':user deleted client :client', @@ -879,7 +775,6 @@ $LANG = array( 'activity_35' => ':user created :vendor', 'activity_36' => ':user created :vendor', 'activity_37' => ':user created :vendor', - 'payment' => 'Payment', 'system' => 'System', 'signature' => 'Email Signature', @@ -890,7 +785,6 @@ $LANG = array( 'default_invoice_footer' => 'Default Invoice Footer', 'quote_footer' => 'Quote Footer', 'free' => 'Free', - 'quote_is_approved' => 'This quote is approved', 'apply_credit' => 'Apply Credit', 'system_settings' => 'System Settings', @@ -908,7 +802,6 @@ $LANG = array( 'restored_recurring_invoice' => 'Successfully restored recurring invoice', 'archived' => 'Archived', 'untitled_account' => 'Untitled Company', - 'before' => 'Before', 'after' => 'After', 'reset_terms_help' => 'Reset to the default account terms', @@ -917,7 +810,6 @@ $LANG = array( 'user' => 'User', 'country' => 'Country', 'include' => 'Include', - 'logo_too_large' => 'Your logo is :size, for better PDF performance we suggest uploading an image file less than 200KB', 'import_freshbooks' => 'Import From FreshBooks', 'import_data' => 'Import Data', @@ -928,16 +820,6 @@ $LANG = array( 'task_file' => 'Task File', 'no_mapper' => 'No valid mapping for file', 'invalid_csv_header' => 'Invalid CSV Header', - - 'email_errors' => [ - 'inactive_client' => 'Emails can not be sent to inactive clients', - 'inactive_contact' => 'Emails can not be sent to inactive contacts', - 'inactive_invoice' => 'Emails can not be sent to inactive invoices', - 'user_unregistered' => 'Please register your account to send emails', - 'user_unconfirmed' => 'Please confirm your account to send emails', - 'invalid_contact_email' => 'Invalid contact email', - ], - 'client_portal' => 'Client Portal', 'admin' => 'Admin', 'disabled' => 'Disabled', @@ -946,11 +828,9 @@ $LANG = array( 'invoice_will_create' => 'client will be created', 'invoices_will_create' => 'invoices will be created', 'failed_to_import' => 'The following records failed to import', - 'publishable_key' => 'Publishable Key', 'secret_key' => 'Secret Key', 'missing_publishable_key' => 'Set your Stripe publishable key for an improved checkout process', - 'email_design' => 'Email Design', 'due_by' => 'Due by :date', 'enable_email_markup' => 'Enable Markup', @@ -962,7 +842,6 @@ $LANG = array( 'plain' => 'Plain', 'light' => 'Light', 'dark' => 'Dark', - 'industry_help' => 'Used to provide comparisons against the averages of companies of similar size and industry.', 'subdomain_help' => 'Customize the invoice link subdomain or display the invoice on your own website.', 'invoice_number_help' => 'Specify a prefix or use a custom pattern to dynamically set the invoice number.', @@ -971,7 +850,6 @@ $LANG = array( 'custom_account_fields_helps' => 'Add a label and value to the company details section of the PDF.', 'custom_invoice_fields_helps' => 'Add a text input to the invoice create/edit page and display the label and value on the PDF.', 'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.', - 'token_expired' => 'Validation token was expired. Please try again.', 'invoice_link' => 'Invoice Link', 'button_confirmation_message' => 'Click to confirm your email address.', @@ -980,7 +858,6 @@ $LANG = array( 'created_invoices' => 'Successfully created :count invoice(s)', 'next_invoice_number' => 'The next invoice number is :number.', 'next_quote_number' => 'The next quote number is :number.', - 'days_before' => 'days before', 'days_after' => 'days after', 'field_due_date' => 'due date', @@ -988,10 +865,7 @@ $LANG = array( 'schedule' => 'Schedule', 'email_designs' => 'Email Designs', 'assigned_when_sent' => 'Assigned when sent', - - 'white_label_custom_css' => ':link for $'.WHITE_LABEL_PRICE.' to enable custom styling and help support our project.', 'white_label_purchase_link' => 'Purchase a white label license', - 'expense' => 'Expense', 'expenses' => 'Expenses', 'new_expense' => 'Enter Expense', @@ -1008,7 +882,6 @@ $LANG = array( 'archived_expense' => 'Successfully archived expense', 'deleted_expenses' => 'Successfully deleted expenses', 'archived_expenses' => 'Successfully archived expenses', - 'expense_amount' => 'Expense Amount', 'expense_balance' => 'Expense Balance', 'expense_date' => 'Expense Date', @@ -1033,13 +906,11 @@ $LANG = array( 'expense_error_multiple_clients' => 'The expenses can\'t belong to different clients', 'expense_error_invoiced' => 'Expense has already been invoiced', 'convert_currency' => 'Convert currency', - 'num_days' => 'Number of days', 'create_payment_term' => 'Create Payment Term', 'edit_payment_terms' => 'Edit Payment Term', 'edit_payment_term' => 'Edit Payment Term', 'archive_payment_term' => 'Archive Payment Term', - 'recurring_due_dates' => 'Recurring Invoice Due Dates', 'recurring_due_date_help' => '

    Automatically sets a due date for the invoice.

    Invoices on a monthly or yearly cycle set to be due on or before the day they are created will be due the next month. Invoices set to be due on the 29th or 30th in months that don\'t have that day will be due the last day of the month.

    @@ -1067,14 +938,11 @@ $LANG = array( 'thursday' => 'Thursday', 'friday' => 'Friday', 'saturday' => 'Saturday', - 'header_font_id' => 'Header Font', 'body_font_id' => 'Body Font', 'color_font_help' => 'Note: the primary color and fonts are also used in the client portal and custom email designs.', - 'live_preview' => 'Live Preview', 'invalid_mail_config' => 'Unable to send email, please check that the mail settings are correct.', - 'invoice_message_button' => 'To view your invoice for :amount, click the button below.', 'quote_message_button' => 'To view your quote for :amount, click the button below.', 'payment_message_button' => 'Thank you for your payment of :amount.', @@ -1091,7 +959,6 @@ $LANG = array( 'archived_bank_account' => 'Successfully archived bank account', 'created_bank_account' => 'Successfully created bank account', 'validate_bank_account' => 'Validate Bank Account', - 'bank_accounts_help' => 'Connect a bank account to automatically import expenses and create vendors. Supports American Express and 400+ US banks.', 'bank_password_help' => 'Note: your password is transmitted securely and never stored on our servers.', 'bank_password_warning' => 'Warning: your password may be transmitted in plain text, consider enabling HTTPS.', 'username' => 'Username', @@ -1105,7 +972,6 @@ $LANG = array( 'validate' => 'Validate', 'info' => 'Info', 'imported_expenses' => 'Successfully created :count_vendors vendor(s) and :count_expenses expense(s)', - 'iframe_url_help3' => 'Note: if you plan on accepting credit cards details we strongly recommend enabling HTTPS on your site.', 'expense_error_multiple_currencies' => 'The expenses can\'t have different currencies.', 'expense_error_mismatch_currencies' => 'The client\'s currency does not match the expense currency.', @@ -1126,11 +992,44 @@ $LANG = array( 'trial_call_to_action' => 'Start Free Trial', 'trial_success' => 'Successfully enabled two week free pro plan trial', 'overdue' => 'Overdue', - 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', - 'convert_currency' => 'Convert currency', + + 'white_label_text' => 'Purchase a ONE YEAR white label license for $'.WHITE_LABEL_PRICE.' to remove the Invoice Ninja branding from the client portal and help support our project.', + 'user_email_footer' => 'To adjust your email notification settings please visit '.SITE_URL.'/settings/notifications', + 'reset_password_footer' => 'If you did not request this password reset please email our support: '.CONTACT_EMAIL, + 'limit_users' => 'Sorry, this will exceed the limit of '.MAX_NUM_USERS.' users', + 'more_designs_self_host_header' => 'Get 6 more invoice designs for just $'.INVOICE_DESIGNS_PRICE, + 'old_browser' => 'Please use a newer browser', + 'white_label_custom_css' => ':link for $'.WHITE_LABEL_PRICE.' to enable custom styling and help support our project.', + 'bank_accounts_help' => 'Connect a bank account to automatically import expenses and create vendors. Supports American Express and 400+ US banks.', + 'security' => [ + 'too_many_attempts' => 'Too many attempts. Try again in few minutes.', + 'wrong_credentials' => 'Incorrect email or password.', + 'confirmation' => 'Your account has been confirmed!', + 'wrong_confirmation' => 'Wrong confirmation code.', + 'password_forgot' => 'The information regarding password reset was sent to your email.', + 'password_reset' => 'Your password has been changed successfully.', + 'wrong_password_reset' => 'Invalid password. Try again', + ], + 'pro_plan' => [ + 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the Pro Plan', + 'remove_logo_link' => 'Click here', + ], + 'invitation_status' => [ + 'sent' => 'Email Sent', + 'opened' => 'Email Openend', + 'viewed' => 'Invoice Viewed', + ], + 'email_errors' => [ + 'inactive_client' => 'Emails can not be sent to inactive clients', + 'inactive_contact' => 'Emails can not be sent to inactive contacts', + 'inactive_invoice' => 'Emails can not be sent to inactive invoices', + 'user_unregistered' => 'Please register your account to send emails', + 'user_unconfirmed' => 'Please confirm your account to send emails', + 'invalid_contact_email' => 'Invalid contact email', + ], ); return $LANG; -?> \ No newline at end of file +?>. \ No newline at end of file From 06fa2e5dc48b3e83602f9bac2844f93f02ebd3fd Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 19:31:22 +0200 Subject: [PATCH 46/49] Working on Travis --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f39a3a6142..81d522bfbb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,9 @@ sudo: true php: - 5.5 - - 5.6 - - 7.0 - - hhvm +# - 5.6 +# - 7.0 +# - hhvm addons: hosts: From 6b64910c9daddd87ffa89ee6ea0e1bed745ea6ec Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 20:14:48 +0200 Subject: [PATCH 47/49] Prevent reloading page when showing/hiding archived --- app/Http/Controllers/AccountController.php | 8 +------- resources/views/accounts/api_tokens.blade.php | 8 ++++++-- resources/views/accounts/user_management.blade.php | 6 +++++- resources/views/datatable.blade.php | 6 +++++- resources/views/list.blade.php | 6 +++++- 5 files changed, 22 insertions(+), 12 deletions(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 4b12b6802e..6c0f59a3ba 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -117,13 +117,7 @@ class AccountController extends BaseController { Session::put("show_trash:{$entityType}", $visible == 'true'); - if ($entityType == 'user') { - return Redirect::to('settings/'.ACCOUNT_USER_MANAGEMENT); - } elseif ($entityType == 'token') { - return Redirect::to('settings/'.ACCOUNT_API_TOKENS); - } else { - return Redirect::to("{$entityType}s"); - } + return RESULT_SUCCESS; } public function getSearchData() diff --git a/resources/views/accounts/api_tokens.blade.php b/resources/views/accounts/api_tokens.blade.php index efbd41e283..4612b1cbfe 100644 --- a/resources/views/accounts/api_tokens.blade.php +++ b/resources/views/accounts/api_tokens.blade.php @@ -42,9 +42,13 @@ function setTrashVisible() { var checked = $('#trashed').is(':checked'); - window.location = '{!! URL::to('view_archive/token') !!}' + (checked ? '/true' : '/false'); + var url = '{{ URL::to('view_archive/token') }}' + (checked ? '/true' : '/false'); + + $.get(url, function(data) { + refreshDatatable(); + }) } - + @stop diff --git a/resources/views/accounts/user_management.blade.php b/resources/views/accounts/user_management.blade.php index 0fc17a7a3f..a7f70f925b 100644 --- a/resources/views/accounts/user_management.blade.php +++ b/resources/views/accounts/user_management.blade.php @@ -39,7 +39,11 @@ function setTrashVisible() { var checked = $('#trashed').is(':checked'); - window.location = '{!! URL::to('view_archive/user') !!}' + (checked ? '/true' : '/false'); + var url = '{{ URL::to('view_archive/user') }}' + (checked ? '/true' : '/false'); + + $.get(url, function(data) { + refreshDatatable(); + }) } diff --git a/resources/views/datatable.blade.php b/resources/views/datatable.blade.php index 2d0b78d9fa..4c73a7d248 100644 --- a/resources/views/datatable.blade.php +++ b/resources/views/datatable.blade.php @@ -42,8 +42,12 @@ }); @endif + function refreshDatatable() { + window.dataTable.api().ajax.reload(); + } + function load_{{ $class }}() { - jQuery('.{{ $class }}').dataTable({ + window.dataTable = jQuery('.{{ $class }}').dataTable({ "fnRowCallback": function(row, data) { if (data[0].indexOf('ENTITY_DELETED') > 0) { $(row).addClass('entityDeleted'); diff --git a/resources/views/list.blade.php b/resources/views/list.blade.php index 93aebcebb2..6e567bf3de 100644 --- a/resources/views/list.blade.php +++ b/resources/views/list.blade.php @@ -101,7 +101,11 @@ function setTrashVisible() { var checked = $('#trashed').is(':checked'); - window.location = '{{ URL::to('view_archive/' . $entityType) }}' + (checked ? '/true' : '/false'); + var url = '{{ URL::to('view_archive/' . $entityType) }}' + (checked ? '/true' : '/false'); + + $.get(url, function(data) { + refreshDatatable(); + }) } $(function() { From 4973246aedec2b6a08a68d02f11851de1b7be99e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 20:46:28 +0200 Subject: [PATCH 48/49] Working on Travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 81d522bfbb..5c8eeb3092 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,7 @@ install: - travis_retry composer install --prefer-dist; before_script: + # prevent MySQL went away error - mysql -u root -e 'SET @@GLOBAL.wait_timeout=28800;' # copy configuration files - cp .env.example .env @@ -45,6 +46,7 @@ before_script: - sed -i 's/APP_ENV=production/APP_ENV=development/g' .env - sed -i 's/APP_DEBUG=false/APP_DEBUG=true/g' .env - sed -i 's/REQUIRE_HTTPS=false/NINJA_DEV=true/g' .env + - cat .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;" From fed9078c42c4c80d77c2be56415f4eec3c31660e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 23:05:30 +0200 Subject: [PATCH 49/49] Travis... --- .travis.yml | 1 - app/Libraries/Utils.php | 4 ++-- tests/acceptance/OnlinePaymentCest.php | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5c8eeb3092..d13457af1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,6 @@ before_script: - sed -i 's/APP_ENV=production/APP_ENV=development/g' .env - sed -i 's/APP_DEBUG=false/APP_DEBUG=true/g' .env - sed -i 's/REQUIRE_HTTPS=false/NINJA_DEV=true/g' .env - - cat .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;" diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index 53a586f804..340cfdfeba 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -62,12 +62,12 @@ class Utils return true; } - return isset($_ENV['NINJA_PROD']) && $_ENV['NINJA_PROD'] == 'true'; + return env('NINJA_PROD') == 'true'; } public static function isNinjaDev() { - return isset($_ENV['NINJA_DEV']) && $_ENV['NINJA_DEV'] == 'true'; + return env('NINJA_DEV') == 'true'; } public static function requireHTTPS() diff --git a/tests/acceptance/OnlinePaymentCest.php b/tests/acceptance/OnlinePaymentCest.php index c0dccf6188..ad4b155175 100644 --- a/tests/acceptance/OnlinePaymentCest.php +++ b/tests/acceptance/OnlinePaymentCest.php @@ -28,7 +28,7 @@ class OnlinePaymentCest if (strpos($I->grabFromCurrentUrl(), 'create') !== false) { $I->fillField(['name' =>'23_apiKey'], env('stripe_secret_key') ?: Fixtures::get('stripe_secret_key')); // Fails to load StripeJS causing "ReferenceError: Can't find variable: Stripe" - //$I->fillField(['name' =>'publishable_key'], Fixtures::get('publishable_key')); + //$I->fillField(['name' =>'stripe_publishable_key'], env('stripe_secret_key') ?: Fixtures::get('stripe_publishable_key')); $I->selectOption('#token_billing_type_id', 4); $I->click('Save'); $I->see('Successfully created gateway');