Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gen v1 api by versionist #2

Merged
merged 1 commit into from
Sep 17, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/controllers/v1/base_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class V1::BaseController < ApplicationController
end
2 changes: 2 additions & 0 deletions app/presenters/v1/base_presenter.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class V1::BasePresenter
end
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Rails.application.routes.draw do

api_version(:module => "V1", :path => {:value => "v1"}) do
end
end
17 changes: 17 additions & 0 deletions public/docs/v1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Documentation for v1</title>
<link href="v1/style.css" media="screen" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<div id="operations">
<h3>API Operations</h3>
</div>
<div id="content">
<h1>Documentation for v1</h1>
</div>
</div>
</body>
</html>
5 changes: 5 additions & 0 deletions public/docs/v1/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
body {margin: 0; background-color: #fff; color: #000; font-family: Arial,sans-serif;}
content {margin-left: 200px;}
content h1 {text-align: center;}
operations {float: left; width: 200px; border-right: 1px solid #ccc;}
operations h3 {text-align: center;}
8 changes: 8 additions & 0 deletions test/functional/v1/base_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require 'test_helper'

class V1::BaseControllerTest < ActionController::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
8 changes: 8 additions & 0 deletions test/integration/v1/base_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require 'test_helper'

class V1::BaseControllerTest < ActionDispatch::IntegrationTest
# Replace this with your real tests.
test "the truth" do
assert true
end
end
8 changes: 8 additions & 0 deletions test/presenters/v1/base_presenter_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require 'test_helper'

class V1::BasePresenterTest < Test::Unit::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end