From f8e33cc3deb7085d8c31067ceeeb3ac3cbe7e732 Mon Sep 17 00:00:00 2001 From: Diana Zmuda Date: Wed, 29 May 2013 16:26:40 -0700 Subject: [PATCH] Add JSON examples to the contributing guidelines * 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 --- CONTRIBUTING.md | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 948f8f9..548100a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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)