Remove documentation, redirect /docs to new docs.

This commit is contained in:
Mathias Meyer 2014-05-05 15:05:44 +02:00
parent 7683279c56
commit 34a7f817b3
6 changed files with 2 additions and 1264 deletions

View File

@ -1,26 +0,0 @@
# Overview
**This documentation is for the v2 API. However, this endpoint also serves the v1 API (undocumented).**
Welcome to the Travis CI API documentation. This is the API used by the official
[Travis CI](https://travis-ci.org) web interface, so everything the web
ui is able to do can also be accomplished via the API.
## Media Types
The API is currently [JSON](http://en.wikipedia.org/wiki/JSON) only.
## Clients and Libraries
Official, maintained by the Travis CI team:
* **[Travis Web](https://github.com/travis-ci/travis-web)**: Web interface and JavaScript library, using [Ember.js](http://emberjs.com/)
* **[travis](https://github.com/travis-ci/travis)**: Command line client and Ruby library
Unofficial:
* **[PHP Travis Client](https://github.com/l3l0/php-travis-client)**: PHP client library
* **[Travis Node.js](https://github.com/pwmckenna/node-travis-ci)**: Node.js client library
* **[travis-api-wrapper](https://github.com/cmaujean/travis-api-wrapper)**: Asynchronous Node.js wrapper
* **[travis-ci](https://github.com/mmalecki/node-travis-ci)**: Thin Node.js wrapper
* **[TravisMiner](https://github.com/smcintosh/travisminer)**: Ruby library for mining the Travis API

View File

@ -1,45 +0,0 @@
# Web Clients
When writing an in-browser client, you have to circumvent the browser's
[same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy).
Generally, we offer two different approaches for this:
[Cross-Origin Resource Sharing](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) (aka CORS)
and [JSONP](http://en.wikipedia.org/wiki/JSONP). If you don't have any good
reason for using JSONP, we recommend you use CORS.
## Cross-Origin Resource Sharing
All API resources set appropriate headers to allow Cross-Origin requests. Be
aware that on Internet Explorer you might have to use a different interface to
send these requests.
// using XMLHttpRequest or XDomainRequest to send an API request
var invocation = window.XDomainRequest ? new XDomainRequest() : new XMLHttpRequest();
if(invocation) {
invocation.open("GET", "https://api.travis-ci.org/", true);
invocation.onreadystatechange = function() { alert("it worked!") };
invocation.send();
}
In contrast to JSONP, CORS does not lead to any execution of untrusted code.
Most JavaScript frameworks, like [jQuery](http://jquery.com), take care of CORS
requests for you under the hood, so you can just do a normal *ajax* request.
// using jQuery
$.get("https://api.travis-ci.org/", function() { alert("it worked!") });
Our current setup allows the headers `Content-Type`, `Authorization`, `Accept` and the HTTP methods `HEAD`, `GET`, `POST`, `PATCH`, `PUT`, `DELETE`.
## JSONP
You can disable the same origin policy by treating the response as JavaScript.
Supply a `callback` parameter to use this.
<script>
function jsonpCallback() { alert("it worked!") };
</script>
<script src="https://api.travis-ci.org/?callback=jsonpCallback"></script>
This has the potential of code injection, use with caution.

View File

@ -1,208 +1,13 @@
require 'travis/api/app'
require 'travis/api/app/endpoint/documentation/resources'
class Travis::Api::App
class Endpoint
# Generated API documentation.
class Documentation < Endpoint
set prefix: '/docs', public_folder: File.expand_path('../documentation', __FILE__), static_cache_control: :public
enable :inline_templates, :static
set prefix: '/docs'
# Don't cache general docs in development
configure(:development) { before { @@general_docs = nil } }
# HTML view for [/endpoints](#/endpoints/).
get '/' do
cache_control :public
content_type :html
endpoints = Endpoints.endpoints
erb :index, {}, endpoints: endpoints.keys.sort.map { |k| endpoints[k] }
end
helpers do
def icon_for(verb)
# GET, POST, PATCH, PUT, DELETE"
case verb
when 'GET' then 'file'
when 'POST' then 'edit'
when 'PATCH' then 'wrench'
when 'PUT' then 'share'
when 'DELETE' then 'trash'
else 'question-sign'
end
end
def slug_for(route)
return route['uri'] if route['verb'] == 'GET'
route['verb'] + " " + route['uri']
end
def docs_for(entry)
with_code_highlighting markdown(entry['doc'])
end
private
def with_code_highlighting(str)
str.
gsub(/json\(:([^)]+)\)/) { "<pre>" + Resources::Helpers.json($1) + "</pre>" }.
gsub('<pre', '<pre class="prettyprint linenums pre-scrollable"').
gsub(/<\/?code>/, '').
gsub(/TODO:?/, '<span class="label label-warning">TODO</span>')
end
def general_docs
@@general_docs ||= doc_files.map do |file|
header, content = File.read(file).split("\n", 2)
content = markdown(content)
subheaders = []
content.gsub!(/<h2>(.*)<\/h2>/) do
subheaders << $1
"<h2 id=\"#{$1}\">#{$1}</h2>"
end
header.gsub! /^#* */, ''
{ id: header, title: header, content: with_code_highlighting(content), subheaders: subheaders }
end
end
def doc_files
pattern = File.expand_path('../../../../../../docs/*.md', __FILE__)
Dir[pattern].sort
end
redirect "http://docs.travis-ci.com/api"
end
end
end
end
__END__
@@ index
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Travis CI API documentation</title>
<link rel="stylesheet" href="<%= url('/css/style.css') %>" media="screen">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,800" rel="stylesheet">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
</head>
<body>
<div id="navigation">
<div class="wrapper">
<a href="http://travis-ci.org/" class="logo-home"><img src="http://docs.travis-ci.com/images/travisci-small.png" alt="Travis Logo"></a>
<ul>
<li><a href="http://blog.travis-ci.com/">Blog</a></li>
<li><a href="http://docs.travis-ci.com/">Documentation</a></li>
</ul>
</div>
</div>
<div id="content">
<div class="wrapper">
<div class="pad">
<div id="main">
<h2 class="title">The Travis CI API</h2>
<% general_docs.each do |doc| %>
<%= erb :entry, locals: doc %>
<% end %>
<% endpoints.each do |endpoint| %>
<%= erb :entry, {},
id: endpoint['name'],
title: endpoint['name'],
content: erb(:endpoint_content, {}, endpoint: endpoint) %>
<% end %>
</div>
<div id="sidebar">
<% general_docs.each do |doc| %>
<h2><a href="#<%= doc[:id] %>"><%= doc[:title] %></a></h2>
<ul>
<% doc[:subheaders].each do |sub| %>
<li><a href="#<%= sub %>"><%= sub %></a></li>
<% end %>
</ul>
<% end %>
<% endpoints.each do |endpoint| %>
<h2><a href="#<%= endpoint['name'] %>"><%= endpoint['name'] %></a></h2>
<ul>
<% endpoint['routes'].each do |route| %>
<li>
<a href="#<%= slug_for(route) %>">
<i class="icon-<%= icon_for route['verb'] %>"></i>
<tt><%= route['uri'] %></tt>
</a>
</li>
<% end %>
</ul>
<% end %>
<h2>External Links</h2>
<ul>
<li><a href="https://travis-ci.org">Travis CI</a></li>
<li><a href="https://github.com/travis-ci/travis-api">Source Code</a></li>
<li><a href="https://github.com/travis-ci/travis-api/issues">API issues</a></li>
<li><a href="https://github.com/travis-ci/travis-web">Example Client</a></li>
</ul>
</div>
</div>
</div>
</div>
<footer>
<div class="wrapper">
<div class="large-6 columns left">
<div id="travis-logo">
<img src="http://docs.travis-ci.com/images/travis-mascot-200px.png" id="travis-mascot">
</div>
<div id="travis-address">
<p>© 2013 Travis CI GmbH,<br>Prinzessinnenstr. 20, 10969 berlin, Germany</p>
</div>
</div>
<div class="large-6 columns right">
<div id="footer-nav">
<ul class="left">
<li><a href="mailto:contact@travis-ci.com">Email</a></li>
<li><a href="http://chat.travis-ci.com">Live Chat</a></li>
<li><a href="http://docs.travis-ci.com">Docs</a></li>
<li><a href="http://status.travis-ci.com">Status</a></li>
</ul>
</div>
<div id="berlin-sticker">
<img src="http://docs.trais-ci.com/images/made-in-berlin-badge.png" id="made-in-berlin">
</div>
</div>
</div>
</footer>
</body>
</html>
@@ endpoint_content
<% unless endpoint['doc'].to_s.empty? %>
<%= docs_for endpoint %>
<% end %>
<% endpoint['routes'].each do |route| %>
<div class="route" id="<%= slug_for(route) %>">
<h3><%= route['verb'] %> <%= route['uri'] %></h3>
<% if route['scope'] %>
<p>
<h5>Required authorization scope: <span class="label"><%= route['scope'] %></span></h5>
</p>
<% end %>
<%= docs_for route %>
</div>
<% end %>
@@ entry
<div id="<%= id %>">
<h2><%= title %> <a class="toc-anchor" href="#<%= id %>">#</a></h2>
<%= content %>
</div>

View File

@ -1,850 +0,0 @@
/* ---( = begin global reset thanks to eric meyer elements )------------------------------- */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin : 0;
padding : 0;
border : 0;
outline : 0;
font-weight : inherit;
font-style : inherit;
font-size : 100%;
font-family : inherit;
vertical-align : baseline;
}
/* remember to define focus styles! */
:focus {
outline : 0;
}
body {
line-height : 1;
color : black;
background : white;
}
ol, ul {
list-style : none;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse : separate;
border-spacing : 0;
}
caption, th, td {
text-align : left;
font-weight : normal;
}
blockquote:before, blockquote:after, q:before, q:after {
content : "";
}
blockquote, q {
quotes : "" "";
}
/* travis-ci styles */
body {
margin : 0 auto;
color : #595959;
background : #fff;
font-family : 'Source Sans Pro', sans-serif; font-weight: 400;
font-size : 15px;
line-height : 1.2em;
}
a {
color : #337389;
outline : none;
text-decoration : underline;
}
a:visited {
color : #337389;
}
a:hover {
color : #a53230;
text-decoration : none;
}
p, ul, blockquote, pre, td, th, label {
margin : 1.4286em 0;
font-size : 1em;
line-height : 1.4286;
}
blockquote {
font-style : italic;
margin-left : 1em;
}
blockquote small.author {
font-style : normal;
margin-top : 10px;
text-align : right;
}
blockquote small.author:after {
content : ":";
}
p small.author {
margin : 0;
}
ul, ol {
margin : 1.4286em 0;
text-align : left;
}
li {
line-height : 1.4286;
}
table {
border-collapse : collapse;
margin-bottom : 1.5em;
}
strong {
font-family : 'Source Sans Pro', sans-serif; font-weight: 600;
color : #337389;
font-weight : bold;
}
em {
font-style : italic;
}
span.help {
font-style : italic;
background-color : #c6c5ab;
font-family : 'Source Sans Pro', sans-serif; font-weight: 600;
}
pre {
margin-top : 1em;
padding : 1em 1.5em;
line-height : 1.5em;
border : 1px solid #ddd;
background : #fafafa;
border-bottom-left-radius : 8px 8px;
border-bottom-right-radius : 8px 8px;
border-top-left-radius : 8px 8px;
border-top-right-radius : 8px 8px;
font-family : monospace;
font-size : 13px;
overflow-x : scroll;
}
p > code, div > code, li > code {
background-color : #fafafa;
border : 1px solid #e0e0e0;
color : #333;
padding : 0px 0.2em;
font-family : monospace;
font-size : 13.3px;
}
.wrapper {
width : 909px;
padding : 0 14px 0 14px;
margin : 0 auto;
text-align : left;
overflow : hidden;
position : relative;
}
div#navigation {
clear : both;
margin : 0 0 0 0;
padding : .8em 0 .4em 0;
overflow : hidden;
background : #40454f;
color : #2f333a;
border-bottom : 0;
}
div#navigation .wrapper {
width : 909px;
}
div#navigation .wrapper a#logo {
color : #fff;
display : block;
float : left;
font-weight : 800;
font-size : 1.1em;
line-height : 1.2em;
margin : 0em 1em 0 0;
padding : 0 1em 0 0;
text-decoration : none;
}
div#navigation .wrapper a#logo span {
color : #bbbaba;
}
div#navigation ul {
margin : 0;
padding : 0;
}
div#navigation ul li {
margin : 0;
font-size : 14px;
color : #ffffff;
padding : 0;
float : left;
line-height : 2.6em;
}
div#navigation ul li.right {
float : right;
border-left : none;
}
div#navigation ul li a,
div#navigation ul li a:visited {
color : #efeaea;
display : block;
padding : 0em 1em 0 1em ;
text-decoration : none;
}
div#navigation ul li a:hover,
div#navigation ul li a:visited {
text-decoration : underline;
}
div#navigation ul li.selected a,
div#navigation ul li.selected a:visited {
text-decoration : none;
color : #efeaea;
}
div#navigation ul li.active a,
div#navigation ul li.selected a:visited {
text-decoration : none;
color : #efeaea;
}
.logo-home img {
max-width : 72px;
display : inline-block;
float : left;
padding-right : 14px;
vertical-align : middle;
}
div#content {
clear : both;
margin : 0 auto 3em auto;
padding : 0 0 0;
text-align : center;
overflow : hidden;
}
div#content div.pad {
margin-left : 20px;
margin-right : 20px;
}
div#main {
float : left;
width : 550px;
overflow : hidden;
padding-top : 2em;
}
#main ul,
#main ul li {
color : #a53f3f;
list-style-type : disc;
}
#main ol,
#main ol li {
list-style-type : decimal;
}
#main li {
margin-left : 1.4286em;
}
#main ol li ul {
font-size : 0.8571em;
margin : 1em 0;
}
#main ol li ul li {
list-style-type : circle;
}
.clear {
clear : both;
}
#main figure {
clear : both !important;
width : 578px;
border : 1px solid #efefef;
text-align : center;
margin : 0px;
border-radius : 4px;
}
#main figure figcaption {
background-color : #efefef;
text-align : left;
font-size : 80%;
padding : 5px 10px;
}
#main figure img {
max-width : 570px;
margin : 4px;
}
#main figure.left {
margin-bottom : 1.4286em;
margin-right : 1.4286em;
float : left;
}
#main figure.right {
margin-bottom : 1.4286em;
margin-left : 1.4286em;
float : right;
}
#main figure.smallest {
width : 138px;
}
#main figure.smallest img {
width : 130px;
}
#main figure.smaller {
width : 208px;
}
#main figure.smaller img {
width : 200px;
}
#main figure.small {
width : 258px;
}
#main figure.small img {
max-width : 250px;
}
div#sidebar {
float : right;
width : 325px;
overflow : hidden;
padding-top : 0;
}
#sidebar ul {
margin : 0 0 1.5em 0;
padding : 0;
}
#sidebar p {
margin : 0;
padding : 0;
}
#sidebar p,
#sidebar ul li p,
#sidebar ul li a,
#sidebar ul li a:visited {
display : block;
text-decoration : none;
padding : 6px 0 6px 20px;
border-top : 1px solid #efefef;
}
#sidebar ul li a:hover,
#sidebar ul li a:visited:hover {
text-decoration : underline;
}
#sidebar ul li.selected a,
#sidebar ul li.selected a:visited {
color : #6c3;
background : #efefef;
margin-left : 0;
padding-left : 20px;
}
#sidebar ul li ul {
border-bottom : 0;
list-style-type : disc;
margin-bottom : 0.5em;
}
#sidebar ul li ul li {
border-bottom : 0;
list-style-type : disc;
margin-left : 1.5em;
}
#sidebar ul li ul li a,
#sidebar ul li ul li a:visited,
#sidebar ul li.selected ul li a,
#sidebar ul li.selected ul li a:visited {
display : block;
text-decoration : none;
padding : 0;
border-top : 0;
font-weight : normal;
color : #2b4b6b;
}
#sidebar ul li ul li.selected a,
#sidebar ul li ul li.selected a:visited {
color : #444;
font-weight : normal;
}
footer {
background : #ebeae8;
padding : 28px 0 28px 0;
}
footer p {
color : #a53230;
}
#travis-logo {
float : left;
margin : 0 20px 0 0;
display : inline-block;
}
#travis-address {
clear : all;
display : inline-block;
}
.left {
float : left;
display : inline-block;
padding : 0;
}
.right {
float : right;
display : inline-block;
padding : 0;
}
footer ul li {
display : inline;
margin-left : 25px;
}
footer ul.left {
list-style-type : none;
display : inline-block;
padding : 10px 0 0 10px;
}
footer a {
color : #4d4d4d;
font-family : 'Source Sans Pro', sans-serif; font-weight: 400;
font-size : 15px;
text-decoration : none;
}
footer a:visited {
color : #4d4d4d;
font-family : 'Source Sans Pro', sans-serif; font-weight: 400;
font-size : 15px;
text-decoration : none;
}
#berlin-sticker {
margin : 0;
float : right;
display : block;
}
#footer-nav {
float : none;
clear : all;
display : block;
}
footer img#travis-mascot {
display : inline-block;
max-height : 80px;
}
footer img#made-in-berlin {
float : right;
display : inline-block;
max-height : 80px;
}
div footer .wrapper {
background : transparent;
width : 950px;
}
h1 {
margin : 0;
padding : 0;
font-weight : bold;
color : #337389;
}
h2, h3, h4, h5, h6 {
margin : 0;
padding : 0;
font-weight : bold;
color : #607a84;
}
h1 {
font-size : 3.2em;
line-height : 1em;
margin-bottom : 0.5em;
clear : both;
}
h2 {
color : #939386;
font-size : 1.75em;
margin-bottom : .6em;
line-height : 1em;
letter-spacing : -0.5px;
clear : both;
}
.meta {
margin-top : -1.7em;
font-size : 80%;
}
#blog .meta {
margin-top : -0.5em;
}
h3 {
font-size : 1.2em;
line-height : 1.1em;
margin-bottom : 0.5em;
}
h4 {
font-size : 0.95em;
margin-bottom : 1.25em;
height : 1.25em;
}
h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {
margin : 0;
}
h1 a,
h1 a:visited,
h2 a,
h2 a:visited,
h3 a,
h3 a:visited,
h4 a,
h4 a:visited,
h5 a,
h5 a:visited {
color : #464755;
text-decoration : none;
}
div#header h1 {
float : left;
width : 350px;
text-indent : -20000em;
background : transparent;
font-size : 1px;
margin : 20px 0 0 20px;
}
div#header h1 a,
div#header h1 a:visited,
div#header h1 a:hover,
div#header h1 a:visited:hover {
display : block;
width : 350px;
height : 75px;
}
div#header h1.riddle {
float : none;
width : 100%;
text-indent : 0;
background : #fff;
color : #40454f;
font-size : 4em;
margin : 20px 0 0 0;
padding : 0;
}
div#header h1.riddle a,
div#header h1.riddle a:visited,
div#header h1.riddle a:hover,
div#header h1.riddle a:visited:hover {
display : block;
width : 100%;
height : auto;
color : #40454f;
text-decoration : none;
}
div#header p {
color : #a53230;
display : block;
font-size : 1.25em;
line-height : 1.67em;
margin : 0.935em 0 1.87em 0;
padding : 0 0 1.25em 0;
border-bottom : 1px solid #ccc;
}
div#sidebar h2 {
color : #939386;
font-size : 1.2em;
letter-spacing : .5px;
text-transform : uppercase;
margin : 40px 20px 5px 20px;
}
.highlight pre {
font-family : 'Bitstream Vera Sans Mono', 'Courier', monospace;
padding : 0 1.5em;
}
.highlight br {
display : none;
}
.highlight {
background-color : #f8f8f8;
border : 1px solid silver;
font-family : 'Courier New', 'Terminal', monospace;
color : #100;
margin : 1.5em 0;
}
div#content div.pad {
margin-left : 0;
margin-right : 0;
}
div#navigation ul li.lang {
float : right;
border-left : none;
font-size : .83em;
line-height : 3em;
}
#dsq-global-toolbar ul li {
list-style-type : none;
}
.toc-anchor {
font-size : 75%;
color : #aaa;
}
hr {
border : 1px solid #ddd;
border-bottom-width : 0;
margin : 2em 0;
}
.button,
.button:active,
.button.active {
position : relative;
overflow : visible;
display : inline-block;
padding : 8px 10px;
border : 0;
margin : 0;
-webkit-border-radius : 4px;
-moz-border-radius : 4px;
-ms-border-radius : 4px;
-o-border-radius : 4px;
border-radius : 4px;
background-color : #bdc7c9;
cursor : pointer;
outline : none;
text-decoration : none;
text-transform : uppercase;
text-align : center;
font : 10px;
color : #FFFFFF;
white-space : nowrap;
height : 30px;
}
.button:hover,
.button:focus,
.button:active,
.button.active {
background-color : #959a9b;
text-decoration : none;
color : white;
}
body form input.st-search-input {
background-color : #f2f2f2;
display : inline-block;
width : 253px;
height : 24px;
padding : 3px 7px 3px 27px;
margin-right : 6px;
border : none 0px;
-moz-border-radius : 5px;
-webkit-border-radius : 5px;
border-radius : 5px;
-webkit-box-shadow : none;
box-shadow : none;
}
input[type=email] {
background-color : #f2f2f2;
display : inline-block;
width : 190px;
height : 24px;
padding : 3px 7px;
margin-right : 6px;
border : none 0px;
-moz-border-radius : 5px;
-webkit-border-radius : 5px;
border-radius : 5px;
}
::-webkit-input-placeholder {
text-transform : uppercase;
color : #819699;
}
::-moz-placeholder { /* Firefox 18- */
text-transform : uppercase;
color : #819699;
}
::-moz-placeholder { /* Firefox 19+ */
text-transform : uppercase;
color : #819699;
}
::-ms-input-placeholder {
text-transform : uppercase;
color : #819699;
}
.blog-post h3 a {
text-decoration : underline;
}
#imprint ul,
#imprint ul li {
list-style-type : none;
margin-left : 0px;
}
.get-started-box {
width : 100%;
margin : 0 auto;
height : 200px;
text-align : center;
background-color : transparent;
padding : 1em;
margin-bottom : 2em;
}
.big-text {
color : #607a84;
font-size : 1.5em;
font-weight : 400;
padding-top : 4em;
margin-bottom : 1.2em;
text-align : center;
}
.get-started-button,
.get-started-button:visited,
.get-started-button:active {
background-color : #a53230;
-moz-border-radius : 5px;
-webkit-border-radius : 5px;
border-radius : 5px;
display : inline-block;
color : #ffffff;
border-width : 0px;
font-weight : 400;
letter-spacing : 1px;
font-size : 2em;
padding : 20px 50px;
text-decoration : none;
}
.get-started-button:hover {
background-color : #d93f3c;
color : #ffffff;
text-decoration : none;
}
.language-docs {
font-size : 1.2em;
text-transform : uppercase;
text-align : center;
width : 500px;
margin : 0 auto;
line-height : 1.8em;
}
.language-docs a,
.language-docs a:visited,
.language-docs a:active {
color : #af6868;
font-weight : 800;
text-decoration : none;
padding-right : 1em;
}
.language-docs a:hover,
.language-docs a:visited:hover {
color : #337389;
}
.large-6 {
position : relative;
float : left;
padding : 0;
width : 50%;
display : inline-block;
clear : all;
}
.column,
.columns {
position : relative;
}

View File

@ -1,141 +0,0 @@
require 'json'
class Travis::Api::App::Endpoint
module Resources
module Helpers
def self.json(key)
JSON.pretty_generate(Resources.const_get(key.to_s.upcase))
end
end
REPOSITORY_KEY = {
'public_key' => '-----BEGIN RSA PUBLIC KEY-----\nMIGJAoGBAOcx131amMqIzm5+FbZz+DhIgSDbFzjKKpzaN5UWVCrLSc57z64xxTV6\nkaOTZmjCWz6WpaPkFZY+czfL7lmuZ/Y6UNm0vupvdZ6t27SytFFGd1/RJlAe89tu\nGcIrC1vtEvQu2frMLvHqFylnGd5Gy64qkQT4KRhMsfZctX4z5VzTAgMBAAE=\n-----END RSA PUBLIC KEY-----\n',
}
REPOSITORY = {
'repo' => {
'id' => 119756,
'slug' => 'travis-ci/travis-api',
'description' => 'The public Travis API',
'last_build_id' => 6347735,
'last_build_number' => '468',
'last_build_state' => 'started',
'last_build_duration' => nil,
'last_build_language' => nil,
'last_build_started_at' => '2013-04-15T09:45:29Z',
'last_build_finished_at' => nil,
}
}
REPOSITORIES = { 'repos' => [ REPOSITORY['repo'] ] }
SHORT_BUILD = {
'id' => 6347735,
'repository_id' => 119756,
'commit_id' => 1873023,
'number' => '468',
'pull_request' => false,
'pull_request_title' => nil,
'pull_request_number' => nil,
'config' => {
'language' => 'ruby',
'rvm' => [
'1.9.3',
'rbx-19mode',
'jruby-19mode',
],
'before_script' => [
'RAILS_ENV=test rake db:create db:schema:load --trace',
],
'notifications' => {
'irc' => 'irc.freenode.org#travis',
},
'matrix' => {
'allow_failures' => [
{
'rvm' => 'rbx-19mode',
},
{
'rvm' => 'jruby-19mode',
},
],
},
'.result' => 'configured',
},
'state' => 'passed',
'started_at' => '2013-04-15T09:45:29Z',
'finished_at' => '2013-04-15T09:49:42Z',
'duration' => 489,
'job_ids' => [
6347736,
6347737,
6347738,
],
}
COMMIT = {
'id' => 1873023,
'sha' => 'a18f211f6f921affd1ecd8c18691b40d9948aae5',
'branch' => 'master',
'message' => "Merge pull request #25 from henrikhodne/add-responses-to-documentation\n\nAdd responses to documentation",
'committed_at' => '2013-04-15T09:44:31Z',
'author_name' => 'Henrik Hodne',
'author_email' => 'me@henrikhodne.com',
'committer_name' => 'Henrik Hodne',
'committer_email' => 'me@henrikhodne.com',
'compare_url' => 'https://github.com/travis-ci/travis-api/compare/0f31ff4fb6aa...a18f211f6f92',
'pull_request_number' => nil,
}
BUILDS = {
'builds' => [
SHORT_BUILD
],
'commits' => [
COMMIT
]
}
JOB = {
'id' => 6347736,
'repository_id' => 119756,
'build_id' => 6347735,
'commit_id' => 1873023,
'log_id' => 1219815,
'state' => 'passed',
'number' => '468.1',
'config' => {
'language' => 'ruby',
'rvm' => '1.9.3',
'before_script' => [
'RAILS_ENV=test rake db:create db:schema:load --trace',
],
'notifications' => {
'irc' => 'irc.freenode.org#travis',
},
'matrix' => {
'allow_failures' => [
{
'rvm' => 'rbx-19mode',
},
{
'rvm' => 'jruby-19mode',
}
]
},
'.result' => 'configured'
},
'started_at' => '2013-04-15T09:45:29Z',
'finished_at' => '2013-04-15T09:48:14Z',
'queue' => 'builds.linux',
'allow_failure' => false,
'tags' => '',
}
BUILD = {
'build' => SHORT_BUILD,
'commit' => COMMIT,
'jobs' => [ JOB ]
}
end
end

View File

@ -1,5 +0,0 @@
require 'spec_helper'
describe Travis::Api::App::Endpoint::Documentation do
it 'has to be tested'
end