Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from davidyell/3.x
Browse files Browse the repository at this point in the history
Upgrade for 3.x
  • Loading branch information
davidyell committed Jul 27, 2015
2 parents 93e4edb + 0b98cc8 commit 2d099dc
Show file tree
Hide file tree
Showing 16 changed files with 1,923 additions and 442 deletions.
6 changes: 3 additions & 3 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
src_dir: Plugin/Seo
coverage_clover: build/logs/clover.xml
json_path: build/logs/coveralls-upload.json
src_dir: src
coverage_clover: build/logs/index.xml
json_path: build/logs/coveralls-upload.json
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
nbproject
.idea
vendor
44 changes: 26 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
#This Travis config template file was taken from https://github.com/FriendsOfCake/travis
language: php

php:
- 5.4
- 5.5
- 5.6

sudo: false

env:
global:
- PLUGIN_NAME=Seo

matrix:
- CAKE_VERSION=2.5
- CAKE_VERSION=2.6
- DEFAULT=1

matrix:
fast_finish: true

include:
- php: 5.5
env:
- CAKE_VERSION=2.6
- COVERALLS=1
- php: 5.4
env:
- PHPCS=1
- php: 5.4
env: PHPCS=1 DEFAULT=0

- php: 5.4
env: COVERALLS=1 DEFAULT=0

install:
- composer self-update
- composer install --prefer-dist --no-interaction --dev

before_script:
- git clone -b master https://github.com/FriendsOfCake/travis.git --depth 1 ../travis
- ../travis/before_script.sh
- sh -c "if [ '$PHPCS' = '1' ]; then composer require cakephp/cakephp-codesniffer:dev-master; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi"

script:
- ../travis/script.sh
- phpenv rehash
- set +H

after_success:
- ../travis/after_success.sh
script:
- sh -c "if [ '$DEFAULT' = '1' ]; then ./vendor/bin/phpunit tests/TestCase --stderr; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then ./vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then ./vendor/bin/phpunit --stderr --coverage-xml build/logs tests/TestCase; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then php vendor/bin/coveralls -c .coveralls.yml -v; fi"

notifications:
email: false
113 changes: 0 additions & 113 deletions Controller/Component/SeoComponent.php

This file was deleted.

31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,32 @@ I always need to add meta tags to my pages for SEO purposes and it was getting t

I found that by containing all the functionality for SEO inside a component it makes it easier to manage.

# Requirements
* CakePHP 3
* PHP 5.4.16+

# Installation
## Git
Clone the repo into your `app/Plugin` folder. `git clone https://github.com/davidyell/CakePHP-Seo.git app/Plugin/Seo`
## Composer
[https://packagist.org/packages/davidyell/seo](https://packagist.org/packages/davidyell/seo)

```bash
composer require 'davidyell/seo:dev-master'
```

# Setup
Firstly you will need to load the plugin in your `app/Config/bootstrap.php`.
`CakePlugin::load('Seo');`
Firstly you will need to load the plugin in your `/config/bootstrap.php`.
```php
Plugin::load('Seo');
```

Then you will need to attach it to the controller you want it to run on. I tend to attach it to my `AppController`.

```php
// app/Controller/AppController.php
public $components = [
'Seo.Seo' => [
'defaults' => [
'title' => 'Dave is epic',
'description' => 'This is an epic plugin for epic people',
'keywords' => 'epic,plugin'
]
// src/Controller/AppController.php initialize() method
$this->loadComponent('Seo.Seo' => [
'defaults' => [
'title' => 'Dave is epic',
'description' => 'This is an epic plugin for epic people',
'keywords' => 'epic,plugin'
]
];
```
Expand Down
22 changes: 0 additions & 22 deletions Test/Case/AllSeoTest.php

This file was deleted.

68 changes: 0 additions & 68 deletions Test/Case/Controller/Component/SeoComponentTest.php

This file was deleted.

Loading

0 comments on commit 2d099dc

Please sign in to comment.