不要怂,就是干,撸起袖子干!

Commit e96bd475 by Gabriel Falcao

adding more detailed information on how to contribute. I stepped on my own feet …

…while running the tests, so I wanted to make it clear and easier for the next developers that want to contribute
1 parent 6b781f8f
Showing with 63 additions and 4 deletions
...@@ -27,10 +27,69 @@ Also make sure to take a look at the examples in the repository. The website wil ...@@ -27,10 +27,69 @@ Also make sure to take a look at the examples in the repository. The website wil
I'm glad to get pull request if any functionality is missing or something is buggy. But _please_ ... run the tests before you send me the pull request. I'm glad to get pull request if any functionality is missing or something is buggy. But _please_ ... run the tests before you send me the pull request.
## Tests ## Now if you want to contribute but don't really know where to begin
don't worry, the steps below will guide you to have a sequelize
contributor's environment running in a couple minutes.
In order to run the tests, just do ```npm install```, which will install jasmine. Please add tests to your pull requests. This is how you start the tests: ### 1. Prepare the environment ###
node_modules/.bin/jasmine-node spec/ All the following steps consider you already have [npm](http://npmjs.org/) installed in your [node.js version 0.4.6 or higher](https://github.com/sdepold/sequelize/blob/master/package.json#L30)
Current build status on travis-ci: [![Build Status](https://secure.travis-ci.org/sdepold/sequelize.png)](http://travis-ci.org/sdepold/sequelize) #### 1.1 MySQL and other external dependencies ####
Contributing to sequelize requires you to have
[MySQL](http://www.mysql.com/) up and running in your local
environment, the reason for that is that we have test cases that runs
against an actual MySQL server and make sure everything is always
working.
That is also one of the reasons your features must come with tests:
let's make sure sequelize will stay awesome as more features are added
as well as that fized bugs will never come back.
Well, after installing **MySQL** you also need to create the sequelize test database:
```console
$ echo "CREATE DATABASE sequelize_test;" | mysql -uroot
```
**CLEVER NOTE:** your local MySQL install must be with username `root`
without password. If you want to customize that just hack in the
tests, but make sure to don't commit your credentials, we don't want
to expose your personal data in sequelize codebase ;)
### 2. Install the dependencies ###
Just "cd" into sequelize directory and run `npm install`, see an example below:
```console
$ cd path/to/sequelize
$ npm install
```
### 3. Run the tests ###
In order to run the tests you got to run `jasmine-node` against the `spec` directory.
By the way, [there](https://github.com/Yipit/sequelize/tree/master/spec) is where
you will write new tests if that's the case.
All you need is to run `./node_modules/.bin/jasmine-node spec/`,
although this is kinda long and boring, so we configures a NPM task
and made that less laborious to you :)
```console
$ npm test
```
### 4. That's all ###
Just commit and send pull requests.
Happy hacking and thank you for contributing
# Build status
The automated tests we talk about just so much are running on
[Travis public CI](http://travis-ci.org), here is its status:
[![Build Status](https://secure.travis-ci.org/sdepold/sequelize.png)](http://travis-ci.org/sdepold/sequelize)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!