Skip to content

Commit

Permalink
Merge pull request #68 from Codeinwp/testing_new_schema
Browse files Browse the repository at this point in the history
feat: adds new service schema
  • Loading branch information
selul authored Jan 7, 2019
2 parents e4a3529 + cf91479 commit 330fba0
Show file tree
Hide file tree
Showing 42 changed files with 6,325 additions and 1,622 deletions.
4 changes: 4 additions & 0 deletions .check-author.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mapping:
"Marius Cristea <[email protected]>":
- "selu91 <[email protected]>"
- "selul <[email protected]>"
41 changes: 41 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: "2" # required to adjust maintainability checks
plugins:
duplication:
enabled: true
config:
languages:
php:
mass_threshold: 95
phpcodesniffer:
enabled: false
phpmd:
enabled: false
sonar-php:
enabled: false
checks:
argument-count:
config:
threshold: 5
complex-logic:
config:
threshold: 4
file-lines:
config:
threshold: 500
method-complexity:
config:
threshold: 25
method-count:
config:
threshold: 20
method-lines:
config:
threshold: 50
nested-control-flow:
config:
threshold: 4
return-statements:
config:
threshold: 5
exclude_patterns:
- "inc/old_replacer.php"
1 change: 1 addition & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.travis.yml
.jshintrc
Gruntfile.js
code_quality
grunt
phpcs.xml
node_modules
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ artifact
vendor
bin
composer.lock
package-lock.json
package-lock.json
code_quality
build
cc-test-reporter
97 changes: 55 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,70 @@
language: php
php:
- '7.0'
- '7.2'
- '7.1'
- '7.0'
- '5.6'
- '5.5'
- '5.4'
sudo: false
branches:
except:
- "/^*-v[0-9]/"
- "/^*-v[0-9]/"
env:
matrix:
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=latest WP_MULTISITE=0
global:
- MASTER_BRANCH=master UPSTREAM_REPO=Codeinwp/optimole-wp DEPLOY_BUILD=7.0
- MASTER_BRANCH=master UPSTREAM_REPO=Codeinwp/optimole-wp DEPLOY_BUILD=7.0
- CC_TEST_REPORTER_ID=b6145e78ee9b35206e3eec359227b1645923db67fe0459b437cfe1589b5ab2b8
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
before_install:
- mkdir -p bin && cd bin
- wget "$PIRATE_FLEET"load.sh
- cd .. && chmod +x bin/load.sh
- ". ./bin/load.sh"
- mkdir -p bin && cd bin
- wget "$PIRATE_FLEET"load.sh
- cd .. && chmod +x bin/load.sh
- ". ./bin/load.sh"
install:
- chmod +x bin/install-dependencies.sh
- ". ./bin/install-dependencies.sh"
- chmod +x bin/install-dependencies.sh
- ". ./bin/install-dependencies.sh"
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- if [ $(phpenv version-name) = "7.1" ]; then ./cc-test-reporter before-build; fi
script:
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then grunt travis; fi;
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then grunt travis; fi;
after_script:
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
before_deploy:
- chmod +x bin/prepare-deploy.sh
- ". ./bin/prepare-deploy.sh"
- 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 = $DEPLOY_BUILD"
- 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 = $DEPLOY_BUILD"
- 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 = $DEPLOY_BUILD"
- 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 = $DEPLOY_BUILD"
after_deploy:
- chmod +x bin/deploy.sh
- ". ./bin/deploy.sh"
- chmod +x bin/deploy.sh
- ". ./bin/deploy.sh"
after_failure:
- cat logs/phpcs.log
- cat logs/phpcs.log
3,131 changes: 2,925 additions & 206 deletions assets/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/bundle.min.js

Large diffs are not rendered by default.

18 changes: 10 additions & 8 deletions assets/vue/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ Vue.use( VueResize );


window.onload = function () {
new Vue ( {
el: '#optimole-app',
store,
components: {
App
},
} );
};
new Vue(
{
el: '#optimole-app',
store,
components: {
App
},
}
);
};
11 changes: 11 additions & 0 deletions assets/vue/components/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
<span class="is-size-6-mobile">{{strings.settings_menu_item}}</span>
</a>
</li>
<li :class="tab === 'watermarks' ? 'is-active' : ''" >
<a @click="changeTab('watermarks')" class="is-size-6-mobile">
<span class="icon is-size-6-mobile dashicons dashicons-admin-settings"></span>
<span class="is-size-6-mobile">{{strings.watermarks_menu_item}}</span>
</a>
</li>
</ul>
</div>

Expand All @@ -34,6 +40,9 @@
<div class="is-tab" v-if=" tab === 'settings'">
<options></options>
</div>
<div class="is-tab" v-if=" tab === 'watermarks'" >
<watermarks></watermarks>
</div>
</div>
</transition>
</div>
Expand All @@ -57,6 +66,7 @@
import LastImages from './last-images.vue';
import ApiKeyForm from "./api-key-form.vue";
import Options from "./options.vue";
import Watermarks from "./watermarks.vue";
module.exports = {
name: 'app',
Expand All @@ -72,6 +82,7 @@
components: {
AppHeader,
Options,
Watermarks,
ConnectLayout,
ApiKeyForm,
CdnDetails,
Expand Down
Loading

0 comments on commit 330fba0

Please sign in to comment.