yard-rest 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +3 -3
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/example/app/controllers/examples_controller.rb +17 -2
- data/templates/default/layout/html/layout.erb +4 -4
- metadata +2 -4
data/README.markdown
CHANGED
@@ -11,11 +11,11 @@ A plugin for [Yardoc](http://yardoc.org/) that generates documentation for RESTf
|
|
11
11
|
|
12
12
|
It also requires the Jeweler gem if you plan to use the rake build tasks.
|
13
13
|
|
14
|
-
##
|
14
|
+
## See an API-Example
|
15
15
|
|
16
|
-
|
16
|
+
[Yard-Rest-Plugin](http://spape.github.com/yard-rest-plugin) and get a look to the "Example" resource.
|
17
17
|
|
18
|
-
## Demo
|
18
|
+
## Demo (see the plugin in action)
|
19
19
|
|
20
20
|
Visit [MAdeK-Api-Documetnation](http://medienarchiv.zhdk.ch/api) for a demonstration. Or visit ROR project [MAdeK](http://github.com/zhdk/madek) on github to see how we document our api.
|
21
21
|
|
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ begin
|
|
9
9
|
gem.description = %Q{A customized plugin for Yardoc that produces API documentation for Restful web services}
|
10
10
|
gem.email = ''
|
11
11
|
gem.homepage = "https://github.com/spape/yard-rest-plugin"
|
12
|
-
gem.authors = ['
|
12
|
+
gem.authors = ['Sebastian Pape']
|
13
13
|
gem.add_dependency("yard", '~>0.8.1')
|
14
14
|
gem.files = Dir.glob("{lib,example,templates}/**/*").concat(["Rakefile"])
|
15
15
|
gem.extra_rdoc_files = ['VERSION', 'README.markdown']
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.1
|
@@ -21,7 +21,22 @@ class ExamplesController
|
|
21
21
|
#
|
22
22
|
# @example_request {}
|
23
23
|
# @example_request_description Just requests an index of samples.
|
24
|
-
# @example_response
|
24
|
+
# @example_response
|
25
|
+
# ```json
|
26
|
+
# {
|
27
|
+
# "examples": [{
|
28
|
+
# "id":1,
|
29
|
+
# "title":"Animals",
|
30
|
+
# "text":"Dogs and cats are some.",
|
31
|
+
# "highlight":true
|
32
|
+
# },{
|
33
|
+
# "id":2,
|
34
|
+
# "title":"Computers",
|
35
|
+
# "text":"Windows PC or Apple's Macintosh.",
|
36
|
+
# "highlight":false
|
37
|
+
# }]
|
38
|
+
# }
|
39
|
+
# ```
|
25
40
|
# @example_response_description Responds with the index of examples.
|
26
41
|
#
|
27
42
|
# @example_request {"highlight": true}
|
@@ -90,7 +105,7 @@ class ExamplesController
|
|
90
105
|
# @optional [Boolean] example.highlight The highlight status of the new example. (Default is false)
|
91
106
|
#
|
92
107
|
# @example_request {"example": {"title":"Fish", "text": "Angel- or Butterflyfish"}}
|
93
|
-
# @
|
108
|
+
# @example_request_description Create a new example for fish.
|
94
109
|
# @example_response {}
|
95
110
|
# @example_response_description Responds with an empty hash and status: 201 (Created).
|
96
111
|
#
|
@@ -131,21 +131,21 @@
|
|
131
131
|
border-top-right-radius: 0;
|
132
132
|
}
|
133
133
|
|
134
|
-
pre {
|
134
|
+
pre.code.json {
|
135
135
|
margin: 0;
|
136
136
|
}
|
137
137
|
|
138
|
-
pre code {
|
138
|
+
pre.code.json code {
|
139
139
|
position: relative;
|
140
140
|
border: 1px solid transparent;
|
141
141
|
border-radius: 6px;
|
142
142
|
}
|
143
143
|
|
144
|
-
pre code:hover {
|
144
|
+
pre.code.json code:hover {
|
145
145
|
background: #d4e5fe;
|
146
146
|
}
|
147
147
|
|
148
|
-
pre code:active {
|
148
|
+
pre.code.json code:active {
|
149
149
|
background: #c1d8fb;
|
150
150
|
}
|
151
151
|
</style>
|
metadata
CHANGED
@@ -1,17 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
|
-
- R. Kevin Nelson
|
9
|
-
- Aisha Fenton
|
10
8
|
- Sebastian Pape
|
11
9
|
autorequire:
|
12
10
|
bindir: bin
|
13
11
|
cert_chain: []
|
14
|
-
date: 2012-
|
12
|
+
date: 2012-06-08 00:00:00.000000000 Z
|
15
13
|
dependencies:
|
16
14
|
- !ruby/object:Gem::Dependency
|
17
15
|
name: yard
|