Skip to content

Release 2.0.0 #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 84 commits into from
Apr 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
d559194
check compatibilty #39
contactashish13 Jan 27, 2017
ebd3011
Merge pull request #129 from contactashish13/development
selul Feb 6, 2017
02142f4
Implement accordation for chart page #40
contactashish13 Feb 17, 2017
744d467
Chart source options #41
contactashish13 Feb 23, 2017
fcb0551
added phpunit
selul Feb 23, 2017
784088c
Merge remote-tracking branch 'origin/development' into development
selul Feb 23, 2017
65cda88
Merge pull request #132 from contactashish13/issue-40
selul Feb 23, 2017
e15a4a5
improved library layout
selul Feb 23, 2017
4b24aeb
Merge branch 'issue-40' into development
selul Feb 23, 2017
d704de7
Merge remote-tracking branch 'origin/development' into development
selul Feb 23, 2017
8c03477
Implement dropdown cells for 2nd row ( type cells ) #42
contactashish13 Feb 23, 2017
12535e3
Panel changes
bogdanpopa90 Feb 27, 2017
19403de
Merge pull request #135 from bogdanpopa90/development
selul Feb 28, 2017
dd1236e
design changes
selul Mar 1, 2017
bb92d3c
Panel changes 2
bogdanpopa90 Mar 2, 2017
b34a9cb
Merge pull request #136 from bogdanpopa90/development
selul Mar 6, 2017
f31ae29
design changes
selul Mar 6, 2017
8555c19
design changes
selul Mar 9, 2017
35a2798
Redesign panel, added upsells
bogdanpopa90 Mar 10, 2017
9735e28
Merge pull request #138 from bogdanpopa90/development
selul Mar 12, 2017
db49045
added new ui
selul Mar 12, 2017
eb6d6dc
added top border line back
selul Mar 12, 2017
172f56e
updated version
selul Mar 12, 2017
eaf7811
updated version
selul Mar 12, 2017
eadb7d7
updated version
selul Mar 12, 2017
aeeed2d
added phpunit
selul Mar 12, 2017
87efcf8
updated travis for phpunit
selul Mar 12, 2017
083f8fe
updated travis
selul Mar 13, 2017
9b4cadd
updated travis
selul Mar 13, 2017
5a1d70e
fixed phpcs
selul Mar 13, 2017
539ab55
fixed phpcs
selul Mar 13, 2017
f1b50a4
added doc for test
selul Mar 13, 2017
d6568c4
updated distignore
selul Mar 13, 2017
97b48b0
Merge branch 'development' into issue-40
selul Mar 14, 2017
2c6fce4
Merge pull request #133 from contactashish13/issue-40
selul Mar 14, 2017
c0c59b3
test import from url #141
contactashish13 Mar 15, 2017
cbd4382
test import from file #140
contactashish13 Mar 15, 2017
3ceab83
test import from file #140
contactashish13 Mar 15, 2017
0511105
phpunit more tests #142
contactashish13 Mar 16, 2017
2236d8e
make sure edit data is working as before #48
contactashish13 Mar 16, 2017
12299a8
make sure import from chart is working fine #47
contactashish13 Mar 17, 2017
52fabde
make sure import from chart is working fine #47
contactashish13 Mar 17, 2017
9c7d33e
Merge pull request #146 from contactashish13/issue-142
selul Mar 29, 2017
ec1eaca
Merge pull request #147 from contactashish13/issue-48
selul Mar 29, 2017
1cb2994
Merge pull request #148 from contactashish13/issue-47
selul Mar 29, 2017
2bf8356
phpunit more tests #142
contactashish13 Mar 30, 2017
996bc5b
phpunit more tests #142
contactashish13 Mar 30, 2017
acbf74b
phpunit more tests #142
contactashish13 Mar 30, 2017
b515456
phpunit more tests #142
contactashish13 Mar 30, 2017
cd761ac
fixed phpcs changes
selul Mar 30, 2017
de5f0e7
fixed phpcs changes
selul Mar 30, 2017
6403ea8
fixed phpcs changes
selul Mar 30, 2017
d866530
added new travis structure
selul Mar 30, 2017
07a37a9
fixed phpunit url
selul Mar 30, 2017
3eeb3cb
Merge pull request #151 from contactashish13/issue-142
selul Mar 30, 2017
e35f269
added deploy grunt task and composer compat
selul Mar 30, 2017
ae00274
added sidebar
selul Mar 30, 2017
a712b5c
added sidebar and enable tracking.
selul Mar 30, 2017
a8e7d42
chart 2nd step not workin #152
contactashish13 Mar 31, 2017
3b93cf1
Merge pull request #153 from contactashish13/#152
selul Mar 31, 2017
e835861
added tracking for visualzier.
selul Mar 31, 2017
0f860a7
fixed tracking btn.
selul Mar 31, 2017
32a34c3
chart 2nd step not workin #152
contactashish13 Apr 1, 2017
3b29704
Merge pull request #154 from contactashish13/#152
selul Apr 4, 2017
ec8f560
Fixed comment for visualizer_enable_track.
selul Apr 4, 2017
adad8a1
fixed group description alignament.
selul Apr 4, 2017
41d5da1
Update readme.txt
ineagu Apr 5, 2017
ec7e151
fixed travis and improved design of the sidebar
selul Apr 6, 2017
b119bac
fixed design and composer info.
selul Apr 7, 2017
6ebd922
added SVN deploy
selul Apr 7, 2017
7615571
fixed schedule import
selul Apr 11, 2017
f840222
test new version #54
contactashish13 Apr 12, 2017
0c696f3
test new version #54
contactashish13 Apr 12, 2017
03f9e65
test new version #54
contactashish13 Apr 12, 2017
2aaa95e
Merge pull request #156 from contactashish13/#54
selul Apr 12, 2017
2c0d915
schedule import #46
contactashish13 Apr 13, 2017
1a1c35e
schedule import #46
contactashish13 Apr 13, 2017
0f00bbb
Merge branch 'development' into #46
contactashish13 Apr 13, 2017
e90f6e0
fixed readme versions.
selul Apr 13, 2017
89a6d70
Merge pull request #157 from contactashish13/#46
selul Apr 13, 2017
98e2ddf
fixed upsell plan details for bussines.
selul Apr 13, 2017
7409bbc
Fixed phpcs error reporting.
selul Apr 13, 2017
a7c06af
fixed issue with plans.
selul Apr 13, 2017
6381363
added readme.
selul Apr 13, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@ phpcs.xml
node_modules
logs
package.json
npm-debug.log
bin
tests
phpunit.xml
npm-debug.log
dist
artifact
composer
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.idea
node_modules
logs

dist
artifact
vendor
composer.lock
85 changes: 52 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
language: php

## PHP versions to test against
php:
- "7.0"
- "5.6"
Expand All @@ -9,37 +7,58 @@ php:
- "5.3"
- "5.2"
sudo: false
branches:
except:
- "/^*-v[0-9]/"
env:
- WP_VERSION=master WP_MULTISITE=0
matrix:
- WP_VERSION=latest WP_MULTISITE=0
global:
- MASTER_BRANCH=production UPSTREAM_REPO=Codeinwp/visualizer STORE_URL=https://themeisle.com
install:
- . $HOME/.nvm/nvm.sh
- nvm install stable
- nvm use stable
- npm install
- npm install grunt-cli -g
before_script:
## Install the wordpress latest version
- export WP_DEVELOP_DIR=/tmp/wordpress/
- mkdir -p $WP_DEVELOP_DIR
- git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
- plugin_slug=$(basename $(pwd))
- plugin_dir=$WP_DEVELOP_DIR/src/wp-content/plugins/$plugin_slug
- cd ..
- mv $plugin_slug $plugin_dir
- cd $WP_DEVELOP_DIR
- cp wp-tests-config-sample.php wp-tests-config.php
- sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
- sed -i "s/yourusernamehere/root/" wp-tests-config.php
- sed -i "s/yourpasswordhere//" wp-tests-config.php
- mysql -e 'CREATE DATABASE wordpress_test;' -uroot

## install PHPCS and Wordpress standards
- pear install pear/PHP_CodeSniffer
- mkdir wordpress-coding-standards && curl -L https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/master.tar.gz | tar xz --strip-components=1 -C wordpress-coding-standards
- phpenv rehash
- phpcs --config-set installed_paths $WP_DEVELOP_DIR/wordpress-coding-standards
- phpenv rehash
- cd $plugin_dir

- chmod +x bin/install-dependencies.sh
- ". ./bin/install-dependencies.sh"
script:
grunt travis
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then grunt travis; fi;
before_deploy:
- chmod +x bin/prepare-deploy.sh
- ". ./bin/prepare-deploy.sh"
deploy:
- provider: s3
access_key_id: "$AWS_ACCESS_KEY"
secret_access_key: "$AWS_SECRET_KEY"
bucket: "$AWS_BUCKET"
skip_cleanup: true
acl: public_read
overwrite: true
local-dir: artifact/
upload-dir: "$AWS_PRODUCTS_FOLDER/$THEMEISLE_REPO/latest"
on:
branch: "$MASTER_BRANCH"
repo: "$UPSTREAM_REPO"
condition: $TRAVIS_PHP_VERSION = "7.0"
- provider: s3
access_key_id: "$AWS_ACCESS_KEY"
secret_access_key: "$AWS_SECRET_KEY"
bucket: "$AWS_BUCKET"
skip_cleanup: true
acl: public_read
overwrite: true
local-dir: artifact/
upload-dir: "$AWS_PRODUCTS_FOLDER/$THEMEISLE_REPO/$THEMEISLE_VERSION"
on:
repo: "$UPSTREAM_REPO"
branch: "$MASTER_BRANCH"
condition: $TRAVIS_PHP_VERSION = "7.0"
- provider: releases
api_key: "$GITHUB_TOKEN"
file: artifact/$THEMEISLE_REPO.zip
skip_cleanup: true
on:
tags: false
repo: "$UPSTREAM_REPO"
branch: "$MASTER_BRANCH"
condition: $TRAVIS_PHP_VERSION = "7.0"
after_deploy:
- chmod +x bin/deploy.sh
- ". ./bin/deploy.sh"
65 changes: 65 additions & 0 deletions bin/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash

# We run this just one time, for a first job from the buid and just at once after_deploy hook.
if ! [ $AFTER_DEPLOY_RUN ] && [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then

# Flag the run in order to not be trigged again on the next after_deploy.
export AFTER_DEPLOY_RUN=1;
echo " Started deploy script. ";

# Setup git username and email.

git config user.name "selul"
git config user.email ${GITHUB_EMAIL}

# Send changelog changes to git.
git checkout $MASTER_BRANCH
git add -v .

# We use [skip ci] in message to prevent this commit to trigger the build.
git commit -a -m "[AUTO][skip ci] Updating changelog for v"$THEMEISLE_VERSION
git push --quiet "https://${GITHUB_TOKEN}@github.com/$UPSTREAM_REPO.git" HEAD:$MASTER_BRANCH

# Tag the new release.
git tag -a "v$THEMEISLE_VERSION" -m "[AUTO] Release of $THEMEISLE_VERSION ";
git push --quiet "https://${GITHUB_TOKEN}@github.com/$UPSTREAM_REPO.git" --tags ;
sleep 5;

# Sends the api call for creating the release.
# We use this as the travis release provider does not offer any way
# to set the body of the release.
API_JSON='{"tag_name": "v'$THEMEISLE_VERSION'","target_commitish": "'$MASTER_BRANCH'","name": "v'$THEMEISLE_VERSION'","body": "'$CHANGES'","draft": false,"prerelease": false}';
curl -s --data "$API_JSON" "https://api.github.com/repos/$UPSTREAM_REPO/releases?access_token="$GITHUB_TOKEN > /dev/null;

# Send update to the store
STORE_JSON='{"version": "'$THEMEISLE_VERSION'","id": "'$THEMEISLE_ID'","body": "'$CHANGES'"}';
curl -s -H "Content-Type: application/json" -H "x-themeisle-auth: $THEMEISLE_AUTH" --data "$STORE_JSON" "$STORE_URL/wp-json/ti-endpoint/v1/update_changelog_new/" > /dev/null

# Send data to demo server.
grunt sftp

# Upload to Wordpress SVN
if [ ! -z "$WP_ORG_PASSWORD" ]; then

svn co -q "http://svn.wp-plugins.org/$THEMEISLE_REPO" svn

# Copy new content to svn trunk.
rsync -r -p dist/* svn/trunk

# Create new SVN tag.
mkdir -p svn/tags/$THEMEISLE_VERSION
rsync -r -p dist/* svn/tags/$THEMEISLE_VERSION

# Add new files to SVN
svn stat svn | grep '^?' | awk '{print $2}' | xargs -I x svn add x@
# Remove deleted files from SVN
svn stat svn | grep '^!' | awk '{print $2}' | xargs -I x svn rm --force x@

svn stat svn

# Commit to SVN
svn ci --no-auth-cache --username $WPORG_USER --password $WPORG_PASS svn -m "Release v$THEMEISLE_VERSION"

fi

fi;
40 changes: 40 additions & 0 deletions bin/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

# We run this on PR or on push to MASTER_BRANCH.
if [ "$TRAVIS_PULL_REQUEST" != "false" ] || ( [ "$TRAVIS_EVENT_TYPE" == "push" ] && [ "$TRAVIS_REPO_SLUG" == "$UPSTREAM_REPO" ] && [ "$TRAVIS_BRANCH" == "$MASTER_BRANCH" ] ) ; then

. $HOME/.nvm/nvm.sh
nvm install stable
nvm use stable

npm install
npm install grunt-cli -g

phpenv local 5.6

composer selfupdate 1.0.0 --no-interaction
composer install --no-interaction
phpenv local --unset

fi;
# We dont install PHPCS if is not a PR.
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then

# Install PHPCS.
pear install pear/PHP_CodeSniffer

# Install WPCS standards.
git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git $HOME/wordpress-coding-standards
phpenv rehash
phpcs --config-set installed_paths $HOME/wordpress-coding-standards
phpenv rehash

# Install wordpress for testing.
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
export PATH="$HOME/.composer/vendor/bin:$PATH"

# Use phpunit 5.7 as WP dont support 6.
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
composer global require "phpunit/phpunit=5.7.*" ;
fi;
fi;
127 changes: 127 additions & 0 deletions bin/install-wp-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#!/usr/bin/env bash


if [ $# -lt 3 ]; then
echo "usage: $0 <db-name> <db-user> <db-pass> [db-host] [wp-version] [force download]"
exit 1
fi

DB_NAME=$1
DB_USER=$2
DB_PASS=$3
DB_HOST=${4-localhost}
WP_VERSION=${5-latest}
FORCE=${6-false}

WP_TESTS_DIR=${WP_TESTS_DIR-/tmp/wordpress-tests-lib}
WP_CORE_DIR=${WP_CORE_DIR-/tmp/wordpress/}

download() {
if [ `which curl` ]; then
curl -s "$1" > "$2";
elif [ `which wget` ]; then
wget -nv -O "$2" "$1"
fi
}

if [[ $WP_VERSION =~ [0-9]+\.[0-9]+(\.[0-9]+)? ]]; then
WP_TESTS_TAG="tags/$WP_VERSION"
else
# http serves a single offer, whereas https serves multiple. we only want one
download http://api.wordpress.org/core/version-check/1.7/ /tmp/wp-latest.json
grep '[0-9]+\.[0-9]+(\.[0-9]+)?' /tmp/wp-latest.json
LATEST_VERSION=$(grep -o '"version":"[^"]*' /tmp/wp-latest.json | sed 's/"version":"//')
if [[ -z "$LATEST_VERSION" ]]; then
echo "Latest WordPress version could not be found"
exit 1
fi
WP_TESTS_TAG="tags/$LATEST_VERSION"
fi

if [[ $WP_TESTS_TAG == *"beta"* ]]
then
WP_TESTS_TAG="trunk"
fi

set -ex

install_wp() {
if [ $FORCE == 'true' ]; then
rm -Rf $WP_CORE_DIR
fi

if [ -d $WP_CORE_DIR ]; then
return;
fi

mkdir -p $WP_CORE_DIR

if [ $WP_VERSION == 'latest' ]; then
local ARCHIVE_NAME='latest'
else
local ARCHIVE_NAME="wordpress-$WP_VERSION"
fi

download https://wordpress.org/${ARCHIVE_NAME}.tar.gz /tmp/wordpress.tar.gz
tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C $WP_CORE_DIR

download https://raw.github.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php
}

install_test_suite() {
if [ $FORCE == 'true' ]; then
rm -Rf $WP_TESTS_DIR
fi

# portable in-place argument for both GNU sed and Mac OSX sed
if [[ $(uname -s) == 'Darwin' ]]; then
local ioption='-i .bak'
else
local ioption='-i'
fi

# set up testing suite if it doesn't yet exist
if [ ! -d $WP_TESTS_DIR ]; then
# set up testing suite
mkdir -p $WP_TESTS_DIR
svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes
svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data
fi

cd $WP_TESTS_DIR

if [ ! -f wp-tests-config.php ]; then
download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR':" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php
fi

}

install_db() {
# parse DB_HOST for port or socket references
local PARTS=(${DB_HOST//\:/ })
local DB_HOSTNAME=${PARTS[0]};
local DB_SOCK_OR_PORT=${PARTS[1]};
local EXTRA=""

if ! [ -z $DB_HOSTNAME ] ; then
if [ $(echo $DB_SOCK_OR_PORT | grep -e '^[0-9]\{1,\}$') ]; then
EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp"
elif ! [ -z $DB_SOCK_OR_PORT ] ; then
EXTRA=" --socket=$DB_SOCK_OR_PORT"
elif ! [ -z $DB_HOSTNAME ] ; then
EXTRA=" --host=$DB_HOSTNAME --protocol=tcp"
fi
fi

# create database
mysqladmin create $DB_NAME --user="$DB_USER" --password="$DB_PASS"$EXTRA
}

install_wp
install_test_suite
install_db
Loading