Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
Updated docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shogun committed Aug 18, 2016
1 parent 4898d54 commit c2744c4
Show file tree
Hide file tree
Showing 37 changed files with 54 additions and 51 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@ script: bundle exec rake spec:ci
gemfile: .travis-gemfile
notifications:
email: false
addons:
code_climate:
repo_token:
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
[![Gem Version](https://badge.fury.io/rb/apes.png)](http://badge.fury.io/rb/apes)
[![Dependency Status](https://gemnasium.com/ShogunPanda/apes.png?travis)](https://gemnasium.com/ShogunPanda/apes)
[![Build Status](https://secure.travis-ci.org/ShogunPanda/apes.png?branch=master)](http://travis-ci.org/ShogunPanda/apes)
[![Coverage Status](https://coveralls.io/repos/ShogunPanda/apes/badge.png)](https://coveralls.io/r/ShogunPanda/apes)
[![Coverage Status](https://coveralls.io/repos/github/ShogunPanda/apes/badge.svg?branch=master)](https://coveralls.io/github/ShogunPanda/apes?branch=master)

A tiny JSON API framework for Ruby on Rails.

https://sw.cowtech.it/apes

https://github.com/ShogunPanda/apes

# Introduction

Apes makes it easy to deal with [JSON API](http://jsonapi.org/) by abstracting all the oddities of the specification.
Expand Down Expand Up @@ -76,7 +74,7 @@ end

By definining the `ATTRIBUTES` and `RELATIONSHIPS` in your model, you can ensure no invalid attributes are provided.

```
```ruby
class Appointment < ApplicationRecord
ATTRIBUTES = [:user, :assignee, :date, :reason].freeze
RELATIONSHIPS = {user: nil, assignee: User}.freeze
Expand Down Expand Up @@ -146,7 +144,7 @@ json.relationships do
json.links({related: user_url(object.assignee)})
response_included(object.assignee) unless included
end

json.user do
json.data({type: "user", id: object.user.to_param})
json.links({related: user_url(object.user)})
Expand All @@ -161,6 +159,10 @@ end
json.meta(meta) if local_assigns.key?(:meta)
```

## API Documentation

The API documentation can be found [here](https://sw.cowtech.it/apes/docs).

## Contributing to apes

* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h2>Overview</h2><div class="docstring">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:03 2016 by
Generated on Thu Aug 18 15:36:09 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Concerns.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h2>Overview</h2><div class="docstring">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:09 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Concerns/Errors.html
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ <h3 class="signature " id="fail_request!-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Concerns/Pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ <h3 class="signature " id="pagination_url-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Concerns/Request.html
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ <h3 class="signature " id="request_validate-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Concerns/Response.html
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ <h3 class="signature " id="response_timestamp-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Controller.html
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ <h3 class="signature " id="render_error-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Errors.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h2>Overview</h2><div class="docstring">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:09 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Errors/AuthenticationError.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h2>Overview</h2><div class="docstring">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Errors/BadRequestError.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Errors/BaseError.html
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ <h3 class="signature first" id="details-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Errors/InvalidDataError.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Errors/MissingDataError.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h2>Constructor Details</h2>
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Model.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ <h3 class="signature " id="run_validations!-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:09 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/PaginationCursor.html
Original file line number Diff line number Diff line change
Expand Up @@ -2129,7 +2129,7 @@ <h3 class="signature " id="save-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:05 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/RuntimeConfiguration.html
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ <h3 class="signature " id="timestamp_formats-class_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:05 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Serializers.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h2>Overview</h2><div class="docstring">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:09 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Serializers/JSON.html
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ <h3 class="signature " id="load-class_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Serializers/JWT.html
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ <h3 class="signature " id="load-class_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Serializers/List.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ <h3 class="signature " id="load-class_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/UrlsParser.html
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ <h3 class="signature " id="url?-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Validators.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h2>Overview</h2><div class="docstring">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:09 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Validators/BaseValidator.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ <h3 class="signature first" id="validate_each-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Validators/BooleanValidator.html
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ <h3 class="signature first" id="check_valid?-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Validators/EmailValidator.html
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ <h3 class="signature first" id="check_valid?-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Validators/PhoneValidator.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ <h3 class="signature first" id="check_valid?-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Validators/ReferenceValidator.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ <h3 class="signature first" id="validate_each-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Validators/TimestampValidator.html
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ <h3 class="signature first" id="check_valid?-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Validators/UuidValidator.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ <h3 class="signature first" id="check_valid?-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Validators/ZipCodeValidator.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ <h3 class="signature first" id="check_valid?-instance_method">
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:10 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/Apes/Version.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ <h2>Constant Summary</h2>
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:04 2016 by
Generated on Thu Aug 18 15:36:09 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ <h2>Namespace Listing A-Z</h2>
</div>

<div id="footer">
Generated on Tue Jun 14 10:21:03 2016 by
Generated on Thu Aug 18 15:36:09 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
12 changes: 7 additions & 5 deletions doc/file.README.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,12 @@
<p><a href="http://badge.fury.io/rb/apes"><img src="https://badge.fury.io/rb/apes.png" alt="Gem Version" /></a>
<a href="https://gemnasium.com/ShogunPanda/apes"><img src="https://gemnasium.com/ShogunPanda/apes.png?travis" alt="Dependency Status" /></a>
<a href="http://travis-ci.org/ShogunPanda/apes"><img src="https://secure.travis-ci.org/ShogunPanda/apes.png?branch=master" alt="Build Status" /></a>
<a href="https://coveralls.io/r/ShogunPanda/apes"><img src="https://coveralls.io/repos/ShogunPanda/apes/badge.png" alt="Coverage Status" /></a></p>
<a href="https://coveralls.io/github/ShogunPanda/apes?branch=master"><img src="https://coveralls.io/repos/github/ShogunPanda/apes/badge.svg?branch=master" alt="Coverage Status" /></a></p>

<p>A tiny JSON API framework for Ruby on Rails.</p>

<p>https://sw.cowtech.it/apes</p>

<p>https://github.com/ShogunPanda/apes</p>

<h1 id="introduction">Introduction</h1>

<p>Apes makes it easy to deal with <a href="http://jsonapi.org/">JSON API</a> by abstracting all the oddities of the specification.</p>
Expand Down Expand Up @@ -139,7 +137,7 @@ <h2 id="controller">Controller</h2>

<p>By definining the <code>ATTRIBUTES</code> and <code>RELATIONSHIPS</code> in your model, you can ensure no invalid attributes are provided.</p>

<p><code>
<p><code>ruby
class Appointment &lt; ApplicationRecord
ATTRIBUTES = [:user, :assignee, :date, :reason].freeze
RELATIONSHIPS = {user: nil, assignee: User}.freeze
Expand Down Expand Up @@ -224,6 +222,10 @@ <h2 id="view">View</h2>
<p>json.meta(meta) if local_assigns.key?(:meta)
```</p>

<h2 id="api-documentation">API Documentation</h2>

<p>The API documentation can be found <a href="https://sw.cowtech.it/apes/docs">here</a>.</p>

<h2 id="contributing-to-apes">Contributing to apes</h2>

<ul>
Expand All @@ -243,7 +245,7 @@ <h2 id="copyright">Copyright</h2>
</div></div>

<div id="footer">
Generated on Tue Jun 14 10:21:03 2016 by
Generated on Thu Aug 18 15:36:09 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.3.0).
</div>
Expand Down
Loading

0 comments on commit c2744c4

Please sign in to comment.