yard-rest-plugin 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -0,0 +1,76 @@
1
+ Yardoc RESTful Web Service Plugin
2
+ =================================
3
+ by VisFleet
4
+
5
+ A plugin for [Yardoc](http://yardoc.org/) that generates documentation for RESTful web services.
6
+
7
+ Install
8
+ -------
9
+ sudo gem install yardoc
10
+
11
+ Generating Docs
12
+ ---------------
13
+ When using yardoc you ask it to use the "rest" template (the -t option). For example:
14
+
15
+ yardoc '*.rb' -t rest --title "Our App's API"
16
+
17
+ Writing Comments
18
+ ----------------
19
+ In addition to starting your comment with the normal RDoc description. The following tags are provided:
20
+
21
+ - @url url. Specifies the URL that the service is accessed from. This tag is compulsory, only classes and methods
22
+ that include this in their comments are included
23
+
24
+ - @argument [type] name description. Specifies an argument that is passed to the service. You can specify as
25
+ many of these as required
26
+
27
+ - @example_response example. An example of the response that is returned from the service
28
+
29
+ - @response_field name description. Further specifies the fields that are returned within the response
30
+
31
+ For example:
32
+
33
+ ##
34
+ # Retuns all samples, as XML, for the current user that match the given parameters.
35
+ #
36
+ # @url
37
+ # [GET] /samples/index.[format]?[arguments]
38
+ #
39
+ # @argument [String] format Only "xml" is support at this time.
40
+ # @argument [String] name The name of the sample
41
+ # @argument [String] reource The resource that sample belongs to
42
+ # @argument ["@assigned"|"@complete"|"!@complete"] search Return jobs that are assigned, complete, or
43
+ # uncomplete.
44
+ #
45
+ # @example_response
46
+ # <samples type="array">
47
+ # <sample>
48
+ # <id>961</id>
49
+ # <name>My Sample</name>
50
+ # <state>complete</state>
51
+ # <last_unassigned_user_id type="integer"></last_unassigned_user_id>
52
+ # <resource_id type="integer">127</resource_id>
53
+ # <notes></notes>
54
+ # <updated_at type="datetime">2010-03-09T20:43:29Z</updated_at>
55
+ # <created_at type="datetime">2010-03-09T20:43:16Z</created_at>
56
+ # </interval>
57
+ # <intervals>
58
+ #
59
+ # @response_field id A unique ID identifying the Sample
60
+ # @response_field name The name of the sample
61
+ # @response_field state The current status of the Sample. Can be complete, uncomplete, etc.
62
+ # @response_field notes Any notes given for the sample
63
+ # @response_field updated_at The Date/Time (in ISO8601) that the Sample was last updated
64
+ # @response_field created_at The Date/Time (in ISO8601) that the Sample was created
65
+ #
66
+ def index
67
+ end
68
+
69
+ Development
70
+ -----------
71
+ You can run the template locally over the included sample code by using the following rake tasks:
72
+
73
+ rake ex:clean
74
+ rake ex:generate
75
+
76
+
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ begin
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "yard-rest-plugin"
8
8
  gem.summary = %Q{A plugin for Yardoc that produces API documentation for Restful web services}
9
- gem.description = %Q{A plugin for Yardoc that produces API documentation for Restful web services}
9
+ gem.description = %Q{A plugin for Yardoc that produces API documentation for Restful web services. See README.markdown for more details}
10
10
  gem.email = "aisha.fenton@visfleet.com"
11
11
  gem.homepage = "http://github.com/visfleet/yard-rest-plugin"
12
12
  gem.authors = ["Aisha Fenton"]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{yard-rest-plugin}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Aisha Fenton"]
12
12
  s.date = %q{2010-04-26}
13
- s.description = %q{A plugin for Yardoc that produces API documentation for Restful web services}
13
+ s.description = %q{A plugin for Yardoc that produces API documentation for Restful web services. See README.markdown for more details}
14
14
  s.email = %q{aisha.fenton@visfleet.com}
15
15
  s.extra_rdoc_files = [
16
16
  "README.markdown"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Aisha Fenton
@@ -18,7 +18,7 @@ date: 2010-04-26 00:00:00 +12:00
18
18
  default_executable:
19
19
  dependencies: []
20
20
 
21
- description: A plugin for Yardoc that produces API documentation for Restful web services
21
+ description: A plugin for Yardoc that produces API documentation for Restful web services. See README.markdown for more details
22
22
  email: aisha.fenton@visfleet.com
23
23
  executables: []
24
24