yard-rest-plugin 0.1.0

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.
Files changed (41) hide show
  1. data/README.markdown +0 -0
  2. data/Rakefile +31 -0
  3. data/VERSION +1 -0
  4. data/example/README.markdown +11 -0
  5. data/example/SampleController.rb +84 -0
  6. data/lib/yard_rest_plugin.rb +14 -0
  7. data/lib/yard_rest_plugin/base_helper.rb +18 -0
  8. data/templates/rest/.DS_Store +0 -0
  9. data/templates/rest/class/html/setup.rb +1 -0
  10. data/templates/rest/docstring/html/setup.rb +4 -0
  11. data/templates/rest/docstring/html/text.erb +1 -0
  12. data/templates/rest/fulldoc/.DS_Store +0 -0
  13. data/templates/rest/fulldoc/html/.DS_Store +0 -0
  14. data/templates/rest/fulldoc/html/css/common.css +1 -0
  15. data/templates/rest/fulldoc/html/css/full_list.css +78 -0
  16. data/templates/rest/fulldoc/html/css/style.css +225 -0
  17. data/templates/rest/fulldoc/html/full_list.erb +29 -0
  18. data/templates/rest/fulldoc/html/full_list_files.erb +5 -0
  19. data/templates/rest/fulldoc/html/full_list_service.erb +6 -0
  20. data/templates/rest/fulldoc/html/js/app.js +39 -0
  21. data/templates/rest/fulldoc/html/js/full_list.js +55 -0
  22. data/templates/rest/fulldoc/html/js/jquery.js +19 -0
  23. data/templates/rest/fulldoc/html/setup.rb +87 -0
  24. data/templates/rest/layout/html/footer.erb +3 -0
  25. data/templates/rest/layout/html/headers.erb +13 -0
  26. data/templates/rest/layout/html/index.erb +40 -0
  27. data/templates/rest/layout/html/layout.erb +22 -0
  28. data/templates/rest/layout/html/search.erb +4 -0
  29. data/templates/rest/layout/html/setup.rb +58 -0
  30. data/templates/rest/method_details/html/header.erb +3 -0
  31. data/templates/rest/method_details/html/method_signature.erb +7 -0
  32. data/templates/rest/method_details/html/setup.rb +7 -0
  33. data/templates/rest/module/html/header.erb +4 -0
  34. data/templates/rest/module/html/method_details_list.erb +6 -0
  35. data/templates/rest/module/setup.rb +9 -0
  36. data/templates/rest/tags/html/example_response.erb +9 -0
  37. data/templates/rest/tags/html/generic_tag.erb +17 -0
  38. data/templates/rest/tags/html/index.erb +3 -0
  39. data/templates/rest/tags/setup.rb +22 -0
  40. data/yard-rest-plugin.gemspec +76 -0
  41. metadata +101 -0
@@ -0,0 +1,9 @@
1
+ <% if object.has_tag?(:example_response) %>
2
+ <div class="examples">
3
+ <h3>Example Respones:</h3>
4
+ <% object.tags(:example_response).each do |tag| %>
5
+ <h4><%= htmlify_line(tag.name) %></h4>
6
+ <pre class="example code"><%= html_syntax_highlight(tag.text, :plain) %></pre>
7
+ <% end %>
8
+ </div>
9
+ <% end %>
@@ -0,0 +1,17 @@
1
+ <h3><%= @label ? @label : YARD::Tags::Library.labels[@name] %>:</h3>
2
+ <ul class="<%= @name %>">
3
+ <% object.tags(@name).each do |tag| %>
4
+ <li>
5
+ <% unless @no_types %>
6
+ <span class='type'><%= format_types(tag.types) %></span>
7
+ <% end %>
8
+ <% unless @no_names %>
9
+ <span class='name'><%= h tag.name %></span>
10
+ <% end %>
11
+ <% if tag.text && !tag.text.empty? %>
12
+ <% unless (@no_types || tag.types.nil? || tag.types.empty?) && @no_names %>&mdash;<% end %>
13
+ <%= htmlify_line(tag.text) %>
14
+ <% end %>
15
+ </li>
16
+ <% end %>
17
+ </ul>
@@ -0,0 +1,3 @@
1
+ <div class="tags">
2
+ <%= yieldall %>
3
+ </div>
@@ -0,0 +1,22 @@
1
+ def init
2
+ sections :index, [:argument, :example_response, :response_field]
3
+ end
4
+
5
+ def response_field
6
+ generic_tag :response_field
7
+ end
8
+
9
+ def argument
10
+ generic_tag :argument, :no_types => false
11
+ end
12
+
13
+ def generic_tag(name, opts = {})
14
+ return unless object.has_tag?(name)
15
+ @no_names = true if opts[:no_names]
16
+ @no_types = true if opts[:no_types]
17
+ @name = name
18
+ out = erb('generic_tag')
19
+ @no_names, @no_types = nil, nil
20
+ out
21
+ end
22
+
@@ -0,0 +1,76 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{yard-rest-plugin}
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Aisha Fenton"]
12
+ s.date = %q{2010-04-26}
13
+ s.description = %q{A plugin for Yardoc that produces API documentation for Restful web services}
14
+ s.email = %q{aisha.fenton@visfleet.com}
15
+ s.extra_rdoc_files = [
16
+ "README.markdown"
17
+ ]
18
+ s.files = [
19
+ "README.markdown",
20
+ "Rakefile",
21
+ "VERSION",
22
+ "example/README.markdown",
23
+ "example/SampleController.rb",
24
+ "lib/yard_rest_plugin.rb",
25
+ "lib/yard_rest_plugin/base_helper.rb",
26
+ "templates/rest/.DS_Store",
27
+ "templates/rest/class/html/setup.rb",
28
+ "templates/rest/docstring/html/setup.rb",
29
+ "templates/rest/docstring/html/text.erb",
30
+ "templates/rest/fulldoc/.DS_Store",
31
+ "templates/rest/fulldoc/html/.DS_Store",
32
+ "templates/rest/fulldoc/html/css/common.css",
33
+ "templates/rest/fulldoc/html/css/full_list.css",
34
+ "templates/rest/fulldoc/html/css/style.css",
35
+ "templates/rest/fulldoc/html/full_list.erb",
36
+ "templates/rest/fulldoc/html/full_list_files.erb",
37
+ "templates/rest/fulldoc/html/full_list_service.erb",
38
+ "templates/rest/fulldoc/html/js/app.js",
39
+ "templates/rest/fulldoc/html/js/full_list.js",
40
+ "templates/rest/fulldoc/html/js/jquery.js",
41
+ "templates/rest/fulldoc/html/setup.rb",
42
+ "templates/rest/layout/html/footer.erb",
43
+ "templates/rest/layout/html/headers.erb",
44
+ "templates/rest/layout/html/index.erb",
45
+ "templates/rest/layout/html/layout.erb",
46
+ "templates/rest/layout/html/search.erb",
47
+ "templates/rest/layout/html/setup.rb",
48
+ "templates/rest/method_details/html/header.erb",
49
+ "templates/rest/method_details/html/method_signature.erb",
50
+ "templates/rest/method_details/html/setup.rb",
51
+ "templates/rest/module/html/header.erb",
52
+ "templates/rest/module/html/method_details_list.erb",
53
+ "templates/rest/module/setup.rb",
54
+ "templates/rest/tags/html/example_response.erb",
55
+ "templates/rest/tags/html/generic_tag.erb",
56
+ "templates/rest/tags/html/index.erb",
57
+ "templates/rest/tags/setup.rb",
58
+ "yard-rest-plugin.gemspec"
59
+ ]
60
+ s.homepage = %q{http://github.com/visfleet/yard-rest-plugin}
61
+ s.rdoc_options = ["--charset=UTF-8"]
62
+ s.require_paths = ["lib"]
63
+ s.rubygems_version = %q{1.3.6}
64
+ s.summary = %q{A plugin for Yardoc that produces API documentation for Restful web services}
65
+
66
+ if s.respond_to? :specification_version then
67
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
68
+ s.specification_version = 3
69
+
70
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
71
+ else
72
+ end
73
+ else
74
+ end
75
+ end
76
+
metadata ADDED
@@ -0,0 +1,101 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: yard-rest-plugin
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 0
9
+ version: 0.1.0
10
+ platform: ruby
11
+ authors:
12
+ - Aisha Fenton
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-04-26 00:00:00 +12:00
18
+ default_executable:
19
+ dependencies: []
20
+
21
+ description: A plugin for Yardoc that produces API documentation for Restful web services
22
+ email: aisha.fenton@visfleet.com
23
+ executables: []
24
+
25
+ extensions: []
26
+
27
+ extra_rdoc_files:
28
+ - README.markdown
29
+ files:
30
+ - README.markdown
31
+ - Rakefile
32
+ - VERSION
33
+ - example/README.markdown
34
+ - example/SampleController.rb
35
+ - lib/yard_rest_plugin.rb
36
+ - lib/yard_rest_plugin/base_helper.rb
37
+ - templates/rest/.DS_Store
38
+ - templates/rest/class/html/setup.rb
39
+ - templates/rest/docstring/html/setup.rb
40
+ - templates/rest/docstring/html/text.erb
41
+ - templates/rest/fulldoc/.DS_Store
42
+ - templates/rest/fulldoc/html/.DS_Store
43
+ - templates/rest/fulldoc/html/css/common.css
44
+ - templates/rest/fulldoc/html/css/full_list.css
45
+ - templates/rest/fulldoc/html/css/style.css
46
+ - templates/rest/fulldoc/html/full_list.erb
47
+ - templates/rest/fulldoc/html/full_list_files.erb
48
+ - templates/rest/fulldoc/html/full_list_service.erb
49
+ - templates/rest/fulldoc/html/js/app.js
50
+ - templates/rest/fulldoc/html/js/full_list.js
51
+ - templates/rest/fulldoc/html/js/jquery.js
52
+ - templates/rest/fulldoc/html/setup.rb
53
+ - templates/rest/layout/html/footer.erb
54
+ - templates/rest/layout/html/headers.erb
55
+ - templates/rest/layout/html/index.erb
56
+ - templates/rest/layout/html/layout.erb
57
+ - templates/rest/layout/html/search.erb
58
+ - templates/rest/layout/html/setup.rb
59
+ - templates/rest/method_details/html/header.erb
60
+ - templates/rest/method_details/html/method_signature.erb
61
+ - templates/rest/method_details/html/setup.rb
62
+ - templates/rest/module/html/header.erb
63
+ - templates/rest/module/html/method_details_list.erb
64
+ - templates/rest/module/setup.rb
65
+ - templates/rest/tags/html/example_response.erb
66
+ - templates/rest/tags/html/generic_tag.erb
67
+ - templates/rest/tags/html/index.erb
68
+ - templates/rest/tags/setup.rb
69
+ - yard-rest-plugin.gemspec
70
+ has_rdoc: true
71
+ homepage: http://github.com/visfleet/yard-rest-plugin
72
+ licenses: []
73
+
74
+ post_install_message:
75
+ rdoc_options:
76
+ - --charset=UTF-8
77
+ require_paths:
78
+ - lib
79
+ required_ruby_version: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ segments:
84
+ - 0
85
+ version: "0"
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ segments:
91
+ - 0
92
+ version: "0"
93
+ requirements: []
94
+
95
+ rubyforge_project:
96
+ rubygems_version: 1.3.6
97
+ signing_key:
98
+ specification_version: 3
99
+ summary: A plugin for Yardoc that produces API documentation for Restful web services
100
+ test_files: []
101
+