Skip to content

Commit

Permalink
Merge 89c3e45 into 2cad4e9
Browse files Browse the repository at this point in the history
  • Loading branch information
npauzenga committed Feb 17, 2016
2 parents 2cad4e9 + 89c3e45 commit cbcb1d3
Show file tree
Hide file tree
Showing 48 changed files with 1,050 additions and 3,428 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ gem "figaro"
gem "knock"
gem "active_model_serializers"
gem "rolify"
gem "apitome"

group :developemnt, :test do
gem "pry-byebug"
Expand Down
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
apitome (0.1.0)
kramdown
railties
rspec_api_documentation
arel (6.0.3)
ast (2.1.0)
astrolabe (1.3.1)
Expand Down Expand Up @@ -110,6 +114,7 @@ GEM
bcrypt (~> 3.1)
jwt (~> 1.5)
rails (~> 4.2)
kramdown (1.9.0)
listen (3.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
Expand Down Expand Up @@ -254,6 +259,7 @@ PLATFORMS

DEPENDENCIES
active_model_serializers
apitome
bcrypt (~> 3.1.7)
capybara
committee
Expand Down
42 changes: 42 additions & 0 deletions config/initializers/apitome.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Apitome.setup do |config|
# This determines where the Apitome routes will be mounted. Changing this to '/api/documentation' for instance would
# allow you to browse to http://localhost:3000/api/documentation to see your api documentation. Set to nil and mount
# it yourself if you need to.
config.mount_at = nil

# This defaults to Rails.root if left nil. If you're providing documentation for an engine using a dummy application
# it can be useful to set this to your engines root.. E.g. Application::Engine.root
config.root = nil

# This is where rspec_api_documentation outputs the JSON files. This is configurable within RAD, and so is
# configurable here.
config.doc_path = "doc/api"

# The title of the documentation -- If your project has a name, you'll want to put it here.
config.title = "Meet Meeples API Documentation"

# The main layout view for all documentation pages. By default this is pretty basic, but you may want to use your own
# application layout.
config.layout = "apitome/application"

# We're using highlight.js (https://github.com/isagalaev/highlight.js) for code highlighting, and it comes with some
# great themes. You can check http://softwaremaniacs.org/media/soft/highlight/test.html for themes, and enter the
# theme as lowercase/underscore.
config.code_theme = "default"

# This allows you to override the css manually. You typically want to require `apitome/application` within the
# override, but if you want to override it entirely you can do so.
config.css_override = nil

# This allows you to override the javascript manually. You typically want to require `apitome/application` within the
# override, but if you want to override it entirely you can do so.
config.js_override = nil

# You can provide a 'README' style markdown file for the documentation, which is a useful place to include general
# information. This path is relative to your doc_path configuration.
config.readme = "../api.md"

# Apitome can render the documentation into a single page that uses scrollspy, or it can render the documentation on
# individual pages on demand. This allows you to specify which one you want, as a single page may impact performance.
config.single_page = true
end
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Rails.application.routes.draw do
mount Apitome::Engine => "/docs"
mount Knock::Engine => "/signin"

resource :user, except: [:new, :edit]
Expand Down
4 changes: 2 additions & 2 deletions doc/api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Apitome Documentation
Meet Meeples API Documentation
=====================

This file was automatically generated, and can be found at `doc/api.md`.
A social network for board game geeks.
37 changes: 37 additions & 0 deletions doc/api/gamenight/delete_game_nights:id.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"resource": "GameNight",
"http_method": "DELETE",
"route": "/game_nights/:id",
"description": "DELETE /game_nights/:id",
"explanation": null,
"parameters": [
{
"required": true,
"name": "id",
"description": " The id of the game_night.\n"
}
],
"response_fields": [

],
"requests": [
{
"request_method": "DELETE",
"request_path": "/game_nights/3715",
"request_body": null,
"request_headers": {
"Content-Type": "application/x-www-form-urlencoded"
},
"request_query_parameters": {
},
"request_content_type": "application/x-www-form-urlencoded",
"response_status": 204,
"response_status_text": "No Content",
"response_body": null,
"response_headers": {
},
"response_content_type": null,
"curl": null
}
]
}
33 changes: 33 additions & 0 deletions doc/api/gamenight/get_game_nights.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"resource": "GameNight",
"http_method": "GET",
"route": "/game_nights/",
"description": "GET /game_nights/",
"explanation": null,
"parameters": [

],
"response_fields": [

],
"requests": [
{
"request_method": "GET",
"request_path": "/game_nights/",
"request_body": null,
"request_headers": {
},
"request_query_parameters": {
},
"request_content_type": null,
"response_status": 200,
"response_status_text": "OK",
"response_body": "{\n \"data\": [\n {\n \"id\": \"3718\",\n \"type\": \"game_nights\",\n \"attributes\": {\n \"name\": \"Louisiana griffins\",\n \"time\": \"2016-02-23T00:00:00.000Z\",\n \"location_name\": \"Kozey-Marquardt\",\n \"location_address\": \"Larson Circle\"\n }\n },\n {\n \"id\": \"3719\",\n \"type\": \"game_nights\",\n \"attributes\": {\n \"name\": \"Louisiana griffins\",\n \"time\": \"2016-02-18T00:00:00.000Z\",\n \"location_name\": \"Kozey-Marquardt\",\n \"location_address\": \"Larson Circle\"\n }\n },\n {\n \"id\": \"3720\",\n \"type\": \"game_nights\",\n \"attributes\": {\n \"name\": \"Louisiana griffins\",\n \"time\": \"2016-02-20T00:00:00.000Z\",\n \"location_name\": \"Kozey-Marquardt\",\n \"location_address\": \"Larson Circle\"\n }\n }\n ]\n}",
"response_headers": {
"Content-Type": "application/json; charset=utf-8"
},
"response_content_type": "application/json; charset=utf-8",
"curl": null
}
]
}
37 changes: 37 additions & 0 deletions doc/api/gamenight/get_game_nights:id.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"resource": "GameNight",
"http_method": "GET",
"route": "/game_nights/:id",
"description": "GET /game_nights/:id",
"explanation": null,
"parameters": [
{
"required": true,
"name": "id",
"description": " The id of the game_night.\n"
}
],
"response_fields": [

],
"requests": [
{
"request_method": "GET",
"request_path": "/game_nights/3717",
"request_body": null,
"request_headers": {
},
"request_query_parameters": {
},
"request_content_type": null,
"response_status": 200,
"response_status_text": "OK",
"response_body": "{\n \"data\": {\n \"id\": \"3717\",\n \"type\": \"game_nights\",\n \"attributes\": {\n \"name\": \"Louisiana griffins\",\n \"time\": \"2016-02-23T00:00:00.000Z\",\n \"location_name\": \"Kozey-Marquardt\",\n \"location_address\": \"Larson Circle\"\n }\n }\n}",
"response_headers": {
"Content-Type": "application/json; charset=utf-8"
},
"response_content_type": "application/json; charset=utf-8",
"curl": null
}
]
}
60 changes: 60 additions & 0 deletions doc/api/gamenight/patch_game_nights:id.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"resource": "GameNight",
"http_method": "PATCH",
"route": "/game_nights/:id",
"description": "PATCH /game_nights/:id",
"explanation": null,
"parameters": [
{
"scope": "game_night",
"name": "name",
"description": " The name of the game_night.\n"
},
{
"scope": "game_night",
"required": true,
"name": "time",
"description": " The time of the game_night.\n"
},
{
"scope": "game_night",
"required": true,
"name": "location_name",
"description": " The location of the game_night.\n"
},
{
"scope": "game_night",
"name": "location_address",
"description": " The address of the game_night.\n"
},
{
"required": true,
"name": "id",
"description": " The id of the game_night.\n"
}
],
"response_fields": [

],
"requests": [
{
"request_method": "PATCH",
"request_path": "/game_nights/3721",
"request_body": "game_night[name]=New+Name&game_night[time]=2015-09-12+22%3A49%3A27+%2B0530&game_night[location_name]=Library&game_night[location_address]=999+main+st.+Silver+Spring%2C+MD+20910",
"request_headers": {
"Content-Type": "application/x-www-form-urlencoded"
},
"request_query_parameters": {
},
"request_content_type": "application/x-www-form-urlencoded",
"response_status": 200,
"response_status_text": "OK",
"response_body": "{\n \"data\": {\n \"id\": \"3721\",\n \"type\": \"game_nights\",\n \"attributes\": {\n \"name\": \"New Name\",\n \"time\": \"2015-09-12T17:19:27.000Z\",\n \"location_name\": \"Library\",\n \"location_address\": \"999 main st. Silver Spring, MD 20910\"\n }\n }\n}",
"response_headers": {
"Content-Type": "application/json; charset=utf-8"
},
"response_content_type": "application/json; charset=utf-8",
"curl": null
}
]
}
55 changes: 55 additions & 0 deletions doc/api/gamenight/post_game_nights.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"resource": "GameNight",
"http_method": "POST",
"route": "/game_nights",
"description": "POST /game_nights",
"explanation": null,
"parameters": [
{
"scope": "game_night",
"name": "name",
"description": " The name of the game_night.\n"
},
{
"scope": "game_night",
"required": true,
"name": "time",
"description": " The time of the game_night.\n"
},
{
"scope": "game_night",
"required": true,
"name": "location_name",
"description": " The location of the game_night.\n"
},
{
"scope": "game_night",
"name": "location_address",
"description": " The address of the game_night.\n"
}
],
"response_fields": [

],
"requests": [
{
"request_method": "POST",
"request_path": "/game_nights",
"request_body": "game_night[name]=Waaggh&game_night[time]=2015-09-12+22%3A49%3A27+%2B0530&game_night[location_name]=Library&game_night[location_address]=999+main+st.+Silver+Spring%2C+MD+20910",
"request_headers": {
"Content-Type": "application/x-www-form-urlencoded"
},
"request_query_parameters": {
},
"request_content_type": "application/x-www-form-urlencoded",
"response_status": 201,
"response_status_text": "Created",
"response_body": "{\n \"data\": {\n \"id\": \"3716\",\n \"type\": \"game_nights\",\n \"attributes\": {\n \"name\": \"Waaggh\",\n \"time\": \"2015-09-12T17:19:27.000Z\",\n \"location_name\": \"Library\",\n \"location_address\": \"999 main st. Silver Spring, MD 20910\"\n }\n }\n}",
"response_headers": {
"Content-Type": "application/json; charset=utf-8"
},
"response_content_type": "application/json; charset=utf-8",
"curl": null
}
]
}
Loading

0 comments on commit cbcb1d3

Please sign in to comment.