diff --git a/lib/travis/api/app/endpoint/artifacts.rb b/lib/travis/api/app/endpoint/artifacts.rb index 4f465f97..cd35a570 100644 --- a/lib/travis/api/app/endpoint/artifacts.rb +++ b/lib/travis/api/app/endpoint/artifacts.rb @@ -5,7 +5,7 @@ class Travis::Api::App # Artifacts are generated by builds. Currently we only expose logs as # artifacts # - # DEPRECATED will be removed as soon as the client uses /logs/:id + # **DEPRECATED** will be removed as soon as the client uses /logs/:id class Artifacts < Endpoint # Fetches an artifact by it's *id*. get '/:id' do |id| diff --git a/lib/travis/api/app/endpoint/documentation.rb b/lib/travis/api/app/endpoint/documentation.rb index 18653990..e46a504f 100644 --- a/lib/travis/api/app/endpoint/documentation.rb +++ b/lib/travis/api/app/endpoint/documentation.rb @@ -81,151 +81,113 @@ __END__ - + Travis API documentation - - - - - - - + + + + + + - - - Fork me on GitHub - - -
-
-
-

The Travis API

-

All the routes, just waiting for you to build something awesome.

-
+ -
+ - - -
- - <% 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 %> - -
+
+
+
+ + @@ endpoint_content <% unless endpoint['doc'].to_s.empty? %> <%= docs_for endpoint %> -
<% end %> <% endpoint['routes'].each do |route| %>
-

<%= route['verb'] %> <%= route['uri'] %>

+

<%= route['verb'] %> <%= route['uri'] %>

<% if route['scope'] %>

Required autorization scope: <%= route['scope'] %>
@@ -237,11 +199,7 @@ __END__ @@ entry
- +

<%= title %> #

<%= content %>
diff --git a/lib/travis/api/app/endpoint/documentation/css/style.css b/lib/travis/api/app/endpoint/documentation/css/style.css new file mode 100644 index 00000000..ee4513a8 --- /dev/null +++ b/lib/travis/api/app/endpoint/documentation/css/style.css @@ -0,0 +1,594 @@ +/* ---( = 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 0 1em 0; + font-size: 14px; + line-height: 1.4286; + color: #555; + background: #fff; + font-family: "Helvetica Neue", Arial, Verdana, sans-serif; +} + +a { + color: #3366cc; + outline: none; + text-decoration: underline; +} + +a:visited { + color: #666; + +} + +a:hover { + color: #66cc33; + 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: Helvetica, Arial; + color: #8e7a2b; + font-weight: bold; +} + +em { + font-style: italic; +} +span.help { + font-style: italic; + background-color: #ffff99; + font-family: Georgia, Times, Serif; +} + +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: 960px; + margin: 0 auto; + text-align: left; + overflow: hidden; + position: relative; +} + +div#navigation { + clear: both; + margin: 0 0 0 0; + padding: .8em 0 .6em 0; + overflow: hidden; + background: #efefef; + color: #888; + border-bottom: 1px solid #ccc; +} + +div#header { + clear: both; + margin: 1em auto 0 auto; + padding-top: 10px; + text-align: center; + overflow: hidden; +} + +div#navigation .wrapper { + width: 940px; +} + +div#navigation .wrapper a#logo { + color: #828282; + display:block; + float: left; + font-weight: bold; + font-size: 1.1em; + line-height: 1.2em; + margin: 0.15em 1em 0 0; + padding: 0 1em 0 0; + text-decoration: none; +} + +div#navigation .wrapper a#logo span { + color: #bbbaba; + font-size: .85em; +} + +div#navigation ul { + margin:0; + padding:0; +} + +div#navigation ul li { + margin: 0; + padding: 0; + float: left; + border-left: 1px solid #ccc; +} + +div#navigation ul li.right { + float: right; + border-left: none; + font-size: .83em; +} + +div#navigation ul li a, +div#navigation ul li a:visited { + color: #999; + 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: #6c3; +} + +div#navigation ul li.active a, +div#navigation ul li.selected a:visited { + text-decoration: none; + color: #444; +} + +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: 580px; + overflow: hidden; + padding-top: 2em; +} + +#main ul, +#main ul li { + list-style-type: disc; +} + +#main ol, +#main ol li { + list-style-type: decimal; +} + +#main li { + margin-left: 1.4286em; +} + +.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:4px 0 3px 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: #195190; +} + +#sidebar ul li ul li.selected a, +#sidebar ul li ul li.selected a:visited { + color: #444; + font-weight: normal; +} + +div#footer { + clear: both; + margin: 0 auto; + padding-top: 10px; + text-align: center; + overflow: hidden; + background: #efefef; + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd +} + +div#footer .wrapper { + background: transparent; + width: 920px; +} + +div#footer div.box { + float: left; + width: 280px; + margin-right: 30px; + color: #888; +} + +div#footer div.last { + margin-right: 0; + margin-left: 15px; +} + +div#footer div.box ul li a, +div#footer div.box ul li a:visited { + color: #7d8997; +} + +h1, h2, h3, h4, h5, h6 { + margin: 0; + padding: 0; + font-weight: bold; + color: #40454F; +} + +h1 { + font-size: 3em; + line-height: 1em; + margin-bottom: 0.5em; + clear: both; +} + +h2 { + font-size: 1.6em; + margin-bottom: 1em; + line-height: 1em; + letter-spacing: -0.5px; + clear: both; +} + +.meta { + margin-top: -1.7em; + font-size: 80%; +} + +h3 { + font-size: 1.15em; + line-height: 1em; + margin-bottom: 0.5em; +} + +h4 { + font-size: 0.95em; + line-height: 1.25; + 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; +} + +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: #000; + 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: #000; + text-decoration: none; +} + +div#header p { + color: #777; + display: block; + font: italic 1.25em Georgia, Times, Serif; + 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 { + font-size: .9em; + 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; +} + +#dsq-global-toolbar ul li { + list-style-type: none; +}