Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Sep 20, 2013
1 parent 9741e90 commit a3fa012
Show file tree
Hide file tree
Showing 7 changed files with 203 additions and 41 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org

root = false

[*]
indent_style = tab
indent_size = 2
charset = "utf-8"
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
indent_style = space
indent_size = 2
5 changes: 5 additions & 0 deletions .semver
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
:major: 1
:minor: 0
:patch: 0
:special: ''
55 changes: 22 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,37 @@ language: php
php:
- 5.3
- 5.4
- 5.5

env:
- CAKE_VERSION=master DB=mysql
global:
- REPO_NAME="cakephp-csvview"
- PLUGIN_NAME=CsvView
matrix:
- DB=mysql CAKE_VERSION=master
- DB=mysql CAKE_VERSION=2.5

matrix:
include:
- php: 5.3
- php: 5.4
env:
- PHPCS=1
- DB=mysql CAKE_VERSION=master COVERALLS=1
- php: 5.4
env:
- PHPCS=1
- DB=mysql CAKE_VERSION=master PHPCS=1

before_script:
- sh -c "if [ '$PHPCS' = '1' ]; then pear channel-discover pear.cakephp.org; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then pear install --alldeps cakephp/CakePHP_CodeSniffer; fi"
- phpenv rehash
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
- git clone --depth 1 git://github.com/cakephp/cakephp ../cakephp && cd ../cakephp && git checkout $CAKE_VERSION
- cp -R ../CsvView app/Plugin/CsvView
- echo "<?php
class DATABASE_CONFIG {
public \$default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => '0.0.0.0',
'login' => 'root',
'password' => '',
'database' => 'cakephp_test',
'prefix' => ''
);
public \$test = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => '0.0.0.0',
'login' => 'root',
'password' => '',
'database' => 'cakephp_test',
'prefix' => '',
'encoding' => 'utf8'
);
}" > ./app/Config/database.php
- cd ..
- git clone git://github.com/cakephp/cakephp.git --branch $CAKE_VERSION --depth 1
- cd cakephp/app
- git clone https://github.com/FriendsOfCake/travis.git
- ./travis/before_script.sh

script:
- sh -c "if [ '$PHPCS' != '1' ]; then ./app/Console/cake test CsvView AllCsvView --stderr; else phpcs -p --extensions=php --standard=CakePHP ./app/Plugin/CsvView; fi"
- ./travis/script.sh

after_success:
- ./travis/after_success.sh

notifications:
email: false
69 changes: 69 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# How to contribute

CsvView loves to welcome your contributions. There are several ways to help out:
* Create a ticket in GitHub, if you have found a bug
* Write testcases for open bug tickets
* Write patches for open bug/feature tickets, preferably with testcases included
* Contribute to the [documentation](https://github.com/josegonzalez/cakephp-csvview/tree/gh-pages)

There are a few guidelines that we need contributors to follow so that we have a
chance of keeping on top of things.

## Getting Started

* Make sure you have a [GitHub account](https://github.com/signup/free)
* Submit a ticket for your issue, assuming one does not already exist.
* Clearly describe the issue including steps to reproduce when it is a bug.
* Make sure you fill in the earliest version that you know has the issue.
* Fork the repository on GitHub.

## Making Changes

* Create a topic branch from where you want to base your work.
* This is usually the develop branch
* To quickly create a topic branch based on master; `git branch
master/my_contribution master` then checkout the new branch with `git
checkout master/my_contribution`. Better avoid working directly on the
`master` branch, to avoid conflicts if you pull in updates from origin.
* Make commits of logical units.
* Check for unnecessary whitespace with `git diff --check` before committing.
* Use descriptive commit messages and reference the #ticket number
* Core testcases should continue to pass. You can run tests locally or enable
[travis-ci](https://travis-ci.org/) for your fork, so all tests and codesniffs
will be executed.
* Your work should apply the CakePHP coding standards.

## Which branch to base the work

* Bugfix branches will be based on develop branch.
* New features that are backwards compatible will be based on develop branch
* New features or other non-BC changes will go in the next major release branch.

## Submitting Changes

* Push your changes to a topic branch in your fork of the repository.
* Submit a pull request to the repository with the correct target branch.

## Testcases and codesniffer

CsvView tests requires [PHPUnit](http://www.phpunit.de/manual/current/en/installation.html)
3.5 or higher. To run the testcases locally use the following command:

./lib/Cake/Console/cake test CsvView AllCsvView

To run the sniffs for CakePHP coding standards

phpcs -p --extensions=php --standard=CakePHP ./app/Plugin/CsvView

Check the [cakephp-codesniffer](https://github.com/cakephp/cakephp-codesniffer)
repository to setup the CakePHP standard. The README contains installation info
for the sniff and phpcs.


# Additional Resources

* [CakePHP coding standards](http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html)
* [Bug tracker](https://github.com/josegonzalez/cakephp-csvview/issues)
* [General GitHub documentation](https://help.github.com/)
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
* #cakephp IRC channel on freenode.org
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2012 Jose Diaz-Gonzalez

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
23 changes: 19 additions & 4 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# CsvView Plugin [![Build Status](https://travis-ci.org/josegonzalez/CsvView.png?branch=master)](https://travis-ci.org/josegonzalez/CsvView)
# CsvView Plugin [![Build Status](https://travis-ci.org/josegonzalez/cakephp-csvview.png?branch=master)](https://travis-ci.org/josegonzalez/cakephp-csvview) [![Coverage Status](https://coveralls.io/repos/josegonzalez/cakephp-csvview/badge.png?branch=master)](https://coveralls.io/r/josegonzalez/cakephp-csvview?branch=master) [![Total Downloads](https://poser.pugx.org/josegonzalez/cakephp-csvview/d/total.png)](https://packagist.org/packages/josegonzalez/cakephp-csvview) [![Latest Stable Version](https://poser.pugx.org/josegonzalez/cakephp-csvview/v/stable.png)](https://packagist.org/packages/josegonzalez/cakephp-csvview)


Quickly enable CSV output of your model data

Expand All @@ -14,9 +15,21 @@ I needed to quickly export CSVs of stuff in the database. Using a view class to

## Installation

_[Using [Composer](http://getcomposer.org/)]_

Add the plugin to your project's `composer.json` - something like this:

{
"require": {
"josegonzalez/cakephp-csvview": "dev-master"
}
}

Because this plugin has the type `cakephp-plugin` set in it's own `composer.json`, composer knows to install it inside your `/Plugins` directory, rather than in the usual vendors file. It is recommended that you add `/Plugins/Upload` to your .gitignore file. (Why? [read this](http://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md).)

_[Manual]_

* Download this: [http://github.com/josegonzalez/CsvView/zipball/master](http://github.com/josegonzalez/CsvView/zipball/master)
* Download this: [http://github.com/josegonzalez/cakephp-csvview/zipball/master](http://github.com/josegonzalez/cakephp-csvview/zipball/master)
* Unzip that download.
* Copy the resulting folder to `app/Plugin`
* Rename the folder you just copied to `CsvView`
Expand All @@ -25,15 +38,15 @@ _[GIT Submodule]_

In your app directory type:

git submodule add -b master git://github.com/josegonzalez/CsvView.git Plugin/CsvView
git submodule add -b master git://github.com/josegonzalez/cakephp-csvview.git Plugin/CsvView
git submodule init
git submodule update

_[GIT Clone]_

In your `Plugin` directory type:

git clone -b master git://github.com/josegonzalez/CsvView.git CsvView
git clone -b master git://github.com/josegonzalez/cakephp-csvview.git CsvView

### Enable plugin

Expand Down Expand Up @@ -277,6 +290,8 @@ $this->set(compact('results' ,'_serialize', '_header', '_extract'));

## License

The MIT License (MIT)

Copyright (c) 2012 Jose Diaz-Gonzalez

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
55 changes: 51 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,58 @@
{
"name": "josegonzalez/CsvView",
"name": "josegonzalez/cakephp-csvview",
"version": "1.0.0",
"description": "A CSV View class for CakePHP 2.x",
"type": "cakephp-plugin",
"description": "A CSV View class for CakePHP 2.x",
"homepage": "http://github.com/josegonzalez/CsvView",
"keywords": [
"cakephp",
"csv",
"view",
"export"
],
"homepage": "http://github.com/josegonzalez/cakephp-csvview",
"license": "MIT",
"authors": [
{
"name": "Jose Gonzalez",
"email": "[email protected]",
"homepage": "http://josediazgonzalez.com",
"role": "Maintainer"
},
{
"name":"ADmad",
"role":"Contributor",
"homepage":"https://github.com/admad"
},
{
"name":"Mark Scherer",
"role":"Contributor",
"homepage":"https://github.com/dereuromark"
},
{
"name":"Joshua Paling",
"role":"Contributor",
"homepage":"https://github.com/joshuapaling"
},
{
"name":"Gaurish Sharma",
"role":"Contributor",
"homepage":"https://github.com/gaurish"
},
{
"name":"Gregory Gaskill",
"role":"Contributor",
"homepage":"https://github.com/chronon"
}
],
"require": {
"php": ">=5.3.0",
"composer/installers": "*"
},
"support": {
"email": "[email protected]",
"issues": "https://github.com/josegonzalez/cakephp-csvview/issues",
"source": "https://github.com/josegonzalez/cakephp-csvview"
},
"extra": {
"installer-name": "CsvView"
}
}

0 comments on commit a3fa012

Please sign in to comment.