Skip to content

Commit 3b38893

Browse files
committed
Merge remote-tracking branch 'origin/master' into remove_rack_test
2 parents 2be36b9 + 83a2b3d commit 3b38893

21 files changed

+26
-12
lines changed

example/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ end
2222
group :test, :development do
2323
gem 'rspec-rails'
2424
gem 'rspec_api_documentation', :path => "../"
25+
gem 'raddocs', '0.0.2'
2526
end

example/Gemfile.lock

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ GEM
5858
erubis (2.7.0)
5959
execjs (1.2.12)
6060
multi_json (~> 1.0)
61+
haml (3.1.4)
6162
has_scope (0.5.1)
6263
hike (1.2.1)
6364
i18n (0.6.0)
@@ -84,10 +85,16 @@ GEM
8485
rack (>= 0.4)
8586
rack-mount (0.8.3)
8687
rack (>= 1.0.0)
88+
rack-protection (1.2.0)
89+
rack
8790
rack-ssl (1.3.2)
8891
rack
8992
rack-test (0.6.1)
9093
rack (>= 1.0)
94+
raddocs (0.0.2)
95+
haml
96+
json
97+
sinatra
9198
rails (3.1.3)
9299
actionmailer (= 3.1.3)
93100
actionpack (= 3.1.3)
@@ -126,6 +133,10 @@ GEM
126133
railties (~> 3.1.0)
127134
sass (~> 3.1.10)
128135
tilt (~> 1.3.2)
136+
sinatra (1.3.1)
137+
rack (~> 1.3, >= 1.3.4)
138+
rack-protection (~> 1.1, >= 1.1.2)
139+
tilt (~> 1.3, >= 1.3.3)
129140
sprockets (2.0.3)
130141
hike (~> 1.2)
131142
rack (~> 1.0)
@@ -152,6 +163,7 @@ DEPENDENCIES
152163
inherited_resources
153164
jquery-rails
154165
json_spec
166+
raddocs (= 0.0.2)
155167
rails (= 3.1.3)
156168
rspec-rails
157169
rspec_api_documentation!

example/config/routes.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
Example::Application.routes.draw do
22
resources :orders
3+
4+
match "/docs" => Raddocs, :anchor => false
35
end
File renamed without changes.
File renamed without changes.

example/public/docs/orders/creating_an_order.html renamed to example/docs/orders/creating_an_order.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ <h4>Headers</h4>
9090
X-Ua-Compatible: IE=Edge,chrome=1
9191
E-Tag: &quot;5fffd66f61cdd4ab8881584dbf5e72cf&quot;
9292
Cache-Control: max-age=0, private, must-revalidate
93-
X-Runtime: 0.017610
93+
X-Runtime: 0.008944
9494
Content-Length: 58</pre>
9595
<h4>Status</h4>
9696
<pre class="response status">201 Created</pre>
@@ -121,7 +121,7 @@ <h4>Headers</h4>
121121
X-Ua-Compatible: IE=Edge,chrome=1
122122
E-Tag: &quot;5fffd66f61cdd4ab8881584dbf5e72cf&quot;
123123
Cache-Control: max-age=0, private, must-revalidate
124-
X-Runtime: 0.003642
124+
X-Runtime: 0.003856
125125
Content-Length: 58</pre>
126126
<h4>Status</h4>
127127
<pre class="response status">200 OK</pre>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"resource":"Orders","description":"Creating an order","explanation":null,"parameters":[{"name":"name","description":"Name of order","required":true,"scope":"order"},{"name":"paid","description":"If the order has been paid for","required":true,"scope":"order"},{"name":"email","description":"Email of user that placed the order","scope":"order"}],"requests":[{"request_method":"POST","request_path":"/orders","request_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>{\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>order</span><span style=\"color:#404\">&quot;</span></span>: {\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>name</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">Order 1</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>paid</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"color:#088\">true</span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>email</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">[email protected]</span><span style=\"color:#710\">&quot;</span></span>\n }\n}</pre></div>\n</div>\n","request_headers":"Accept: application/json\nContent-Type: application/json\nHost: example.org\nCookie: ","request_query_parameters":null,"response_status":201,"response_status_text":"Created","response_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>{\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>email</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">[email protected]</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>name</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">Order 1</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>paid</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"color:#088\">true</span>\n}</pre></div>\n</div>\n","response_headers":"Content-Type: application/json; charset=utf-8\nLocation: http://example.org/orders/1\nX-Ua-Compatible: IE=Edge,chrome=1\nE-Tag: \"5fffd66f61cdd4ab8881584dbf5e72cf\"\nCache-Control: max-age=0, private, must-revalidate\nX-Runtime: 0.008944\nContent-Length: 58","curl":"curl http://localhost:3000/orders -d \"{\"order\":{\"name\":\"Order 1\",\"paid\":true,\"email\":\"[email protected]\"}}\" -X POST -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"Host: example.org\" -H \"Cookie: \""},{"request_method":"GET","request_path":"/orders/1","request_body":null,"request_headers":"Accept: application/json\nContent-Type: application/json\nHost: example.org\nCookie: ","request_query_parameters":null,"response_status":200,"response_status_text":"OK","response_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>{\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>email</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">[email protected]</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>name</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">Order 1</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>paid</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"color:#088\">true</span>\n}</pre></div>\n</div>\n","response_headers":"Content-Type: application/json; charset=utf-8\nX-Ua-Compatible: IE=Edge,chrome=1\nE-Tag: \"5fffd66f61cdd4ab8881584dbf5e72cf\"\nCache-Control: max-age=0, private, must-revalidate\nX-Runtime: 0.003856\nContent-Length: 58","curl":"curl http://localhost:3000/orders/1 -X GET -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"Host: example.org\" -H \"Cookie: \""}]}

example/public/docs/orders/deleting_an_order.html renamed to example/docs/orders/deleting_an_order.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ <h4>Headers</h4>
4444
X-Ua-Compatible: IE=Edge,chrome=1
4545
E-Tag: &quot;99914b932bd37a50b983c5e7c90ae93b&quot;
4646
Cache-Control: max-age=0, private, must-revalidate
47-
X-Runtime: 0.003834
47+
X-Runtime: 0.004559
4848
Content-Length: 2</pre>
4949
<h4>Status</h4>
5050
<pre class="response status">200 OK</pre>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"resource":"Orders","description":"Deleting an order","explanation":null,"parameters":[],"requests":[{"request_method":"DELETE","request_path":"/orders/1","request_body":null,"request_headers":"Accept: application/json\nContent-Type: application/json\nHost: example.org\nCookie: ","request_query_parameters":null,"response_status":200,"response_status_text":"OK","response_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>{\n}</pre></div>\n</div>\n","response_headers":"Content-Type: application/json; charset=utf-8\nLocation: http://example.org/orders\nX-Ua-Compatible: IE=Edge,chrome=1\nE-Tag: \"99914b932bd37a50b983c5e7c90ae93b\"\nCache-Control: max-age=0, private, must-revalidate\nX-Runtime: 0.004559\nContent-Length: 2","curl":"curl http://localhost:3000/orders/1 -X DELETE -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"Host: example.org\" -H \"Cookie: \""}]}

example/public/docs/orders/getting_a_list_of_orders.html renamed to example/docs/orders/getting_a_list_of_orders.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ <h4>Headers</h4>
6464
X-Ua-Compatible: IE=Edge,chrome=1
6565
E-Tag: &quot;6cd5831e98b0090b64672b5604d9eb2a&quot;
6666
Cache-Control: max-age=0, private, must-revalidate
67-
X-Runtime: 0.043226
67+
X-Runtime: 0.073916
6868
Content-Length: 121</pre>
6969
<h4>Status</h4>
7070
<pre class="response status">200 OK</pre>

0 commit comments

Comments
 (0)