Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ebanx/woocommerce-gateway-ebanx
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.0
Choose a base ref
...
head repository: ebanx/woocommerce-gateway-ebanx
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 517 changed files with 33,114 additions and 12,398 deletions.
13 changes: 11 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -4,15 +4,24 @@
# Wordpress Coding Standards

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.php]
indent_style = tab
indent_size = 4
tab_width = 4

[*.{js,html,css}]
indent_style = space
indent_size = 2

[*.txt]
trim_trailing_whitespace = false

[*.{md,json,yml}]
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
WOOCOMMERCE_URL=localhost
WOOCOMMERCE_EXTERNAL_PORT=80
MYSQL_EXTERNAL_PORT=3306
5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

16 changes: 15 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
.idea/
wordpress/
woocommerce-gateway-ebanx/travis/vendor/
vendor/
.DS_Store
*.log
*.gz
*.gz.*
cypress/videos
cypress/screenshots
node_modules
.vscode
apidocs/phpdoc-cache-*
.data
.phpintel
phpcs.json
diff.txt
.env

# Tests
/report/
/clover.xml
5 changes: 5 additions & 0 deletions .scripts/before_deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

mv vendor _vendor
composer install --no-dev
composer dump-autoload -o
16 changes: 16 additions & 0 deletions .scripts/phpcs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

php $(pwd)/vendor/squizlabs/php_codesniffer/bin/phpcs --extensions=php,phtml -v -n --parallel=5 .

# # we need this script to fail if any command fails
# # when a command fails the variable `err` will turn 1
# err=0
# trap 'err=1' ERR

# # get all the style errors
# # `|| true` makes sure it returns 0 even when phpcs fails
# ./vendor/bin/phpcs ./ || true

# # 0 if no command failed
# # 1 if a command failed
# exit ${err}
92 changes: 92 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
dist: trusty
sudo: required

language: php

php:
- 7.3

services:
- docker

cache:
apt: true
directories:
- $TRAVIS_BUILD_DIR/vendor
- $TRAVIS_BUILD_DIR/tests/node_modules
- $HOME/.composer/cache
- ~/.npm
- ~/.cache

env:
matrix:
- TEST_COUNTRY=argentina
- TEST_COUNTRY=brazil
- TEST_COUNTRY=chile
- TEST_COUNTRY=colombia
- TEST_COUNTRY=ecuador
- TEST_COUNTRY=mexico
- TEST_COUNTRY=peru
- TEST_COUNTRY=bolivia

before_install:
- nvm install stable
- nvm use stable

install:
- composer self-update --1
- composer update
- cd $TRAVIS_BUILD_DIR/tests && npm ci
- cd $TRAVIS_BUILD_DIR

script:
- bash ./tests/bin/test.sh

stages:
- unit
- admin_tests
- test
- release
- deploy

jobs:
include:
- stage: unit
env:
- TEST_COUNTRY=
script:
- ./vendor/bin/phpunit
- stage: admin_tests
env:
- TEST_COUNTRY=
script:
- bash ./tests/bin/admin-test.sh
- stage: release
script:
- bash <(curl -s https://codecov.io/bash)
- bash .scripts/before_deploy.sh
- cd $TRAVIS_BUILD_DIR
- zip -r /tmp/ebanx-payment-gateway-for-woocommerce ./* -x "*.git*" "*tests*" "*_vendor*"
env:
- TEST_COUNTRY=
deploy:
- provider: releases
api_key:
secure: Uqy38CcSLLpRN53FwIQN9v0SyLRvV6Q47B27dBoMDG9p6qR9W4Nx6xAxi9NJCwDQR15j+WcgkR3iL8R8EXjFNJOpqBvCoWzgQZSNQY8NIOlchNGpVSULgR0r/UE526zoAAnYPu1QeQNTSdDkOCJdggZTYDo+GKqlFw0pd0J6JevktgovZwwy5sMLummfGQVj6VuT38ZIqZQI2ZJaY9iLAJYtLfGpud2xs7PmrccmRH/sYinUJRl+IZxT00oxLMgkk9wryj4ShMcuabHOR9J/3imsYohCpcoxHioedHItfRlVIQoF5Ss73cD2E8XR4kfJIJtuezTnl7bAyRGj5VUUy0EBavi7IizyhrS2vAPq7VastJn0wsxFI7vo9QMF2N0kxCtNo8a3Z5NX3bHBVAISiGFr9ruw9j/Lp9Hi0z+jfc4STUb7FXL+kvB46M9PALghp6KtoYUsOaa7m9XDzzMm7Cb1A7Gd8zcAtEalL2sRBnIEcN4V+K9S76ENSf0N0L6PJjiYG+s1/EtmFJCZfHvOEjoNz0q16jebCmPvAsAHrbvHZ5oUaPt9mTxpjIjQpursZc0GhBCNWbx7A2KfONtlxKUP7XXPFuF89Qg4av15AMPX+LSBKsUN89a3Hoxv+nuyQR+WjPYTdqxeUFa1e2THGceey/0n/FwwPB4awM1Ohs0=
file: /tmp/ebanx-payment-gateway-for-woocommerce.zip
skip_cleanup: true
on:
tags: true
all_branches: true
- stage: deploy
script:
- bash .scripts/before_deploy.sh
env:
- TEST_COUNTRY=
deploy:
- provider: script
skip_cleanup: true
script: ./deploy.sh
on:
tags: true
all_branches: true
Loading