Skip to content

Commit

Permalink
Add JSON examples to the contributing guidelines
Browse files Browse the repository at this point in the history
* Add JSON examples for Resources and Learning Validations
* Add guidelines for contributing books/ebooks for App Store compliance
* Add clarifying comments on ID autogeneration

Minor:
* Add headers to sections
  • Loading branch information
dazmuda authored and Adarsh Pandit committed Jun 29, 2013
1 parent 2267a32 commit f8e33cc
Showing 1 changed file with 44 additions and 3 deletions.
47 changes: 44 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -9,12 +9,53 @@ Contributing
* Use the present tense in commit messages
* Shorten commit messages to 50 characters with bulleted details


> In which format should my contributions be submitted?
* Pull requests should be in JSON format
* Run the validator script (`rake validate`)
* For more detailed output, use [JSONlint.com](http://jsonlint.com).
* Resources should be of the format:

```
{
"title": "Read Learn Objective-C on the Mac",
"uri": "http://amzn.to/learn-objective-c-mac",
"publisher": "http://www.apress.com/9781430218159",
"ibook": "itms-books://itunes.apple.com/us/book/learn-objective-c-on-the-mac/id492011030?mt=11"
}
```
See [example trails](trails/unix.json).


Book Resources (e.g. print and e-books)
---------------------------------------

* Book resources only have to include a "publisher" link if the "uri" is an Amazon link.
* If the book is available in the iBookstore, include the link under "ibooks" and replace the `https` prepended protocol with `itms-books` as in the above example.

Learning Validations
--------------------

* Learning Validations should be of the format:

```
{
"title": "Define a method."
},
{
"title": "Invoke a method."
}
```

Unique ID generation
--------------------

* A resource or validation's id will be generated when `rake` is run. Do not
generate these yourself.

Validating JSON
---------------

* Run the tests, ID generator, and validator with `rake`
* For more detailed debugging, use [JSONlint.com](http://jsonlint.com).
* Considering using [this regex](https://gist.github.com/4068038) for converting Markdown to JSON

Merging Pull Requests (for admins)
Expand Down

0 comments on commit f8e33cc

Please sign in to comment.