yard-api 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/yard-api/code_objects/api_object.rb +6 -8
- data/lib/yard-api/code_objects/class_object.rb +19 -0
- data/lib/yard-api/serializer.rb +21 -31
- data/lib/yard-api/tags.rb +1 -2
- data/lib/yard-api/templates/helpers/base_helper.rb +18 -96
- data/lib/yard-api/templates/helpers/html_helper.rb +30 -32
- data/lib/yard-api/templates/helpers/route_helper.rb +29 -18
- data/lib/yard-api/verifier.rb +21 -10
- data/lib/yard-api/version.rb +1 -1
- data/lib/yard-api.rb +3 -0
- data/templates/api/fulldoc/html/css/common.css +2 -1
- data/templates/api/fulldoc/html/js/app.js +0 -16
- data/templates/api/fulldoc/html/setup.rb +78 -67
- data/templates/api/layout/html/layout.erb +3 -0
- data/templates/api/layout/html/sidebar.erb +21 -4
- data/templates/api/method_details/html/header.erb +3 -7
- data/templates/api/method_details/html/setup.rb +2 -9
- data/templates/api/tags/html/_example_code_block.erb +37 -31
- data/templates/api/tags/html/returns.erb +4 -4
- data/templates/api/tags/html/throws.erb +29 -25
- data/templates/api/tags/setup.rb +0 -4
- data/templates/api/topic/html/endpoints.erb +21 -0
- data/templates/api/topic/html/header.erb +6 -2
- data/templates/api/topic/html/method_details_list.erb +1 -1
- data/templates/api/topic/html/object_synopses.erb +26 -0
- data/templates/api/topic/html/setup.rb +4 -8
- data/templates/api/topic/html/topic_doc.erb +18 -59
- metadata +5 -3
- data/templates/api/layout/json/layout.erb +0 -1
@@ -1,62 +1,21 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<% c
|
7
|
-
|
8
|
-
<
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<section>
|
14
|
-
<h2>Interfaces</h2>
|
15
|
-
|
16
|
-
<% if @meths.empty? %>
|
17
|
-
<p>
|
18
|
-
<em class="type-mute">This API currently has no endpoints available.</em>
|
19
|
-
</p>
|
1
|
+
<div class="api-resource">
|
2
|
+
<article>
|
3
|
+
<%= htmlify(@docstring) %>
|
4
|
+
</article>
|
5
|
+
|
6
|
+
<% c = options[:controllers].detect { |c| c.has_tag?(:note) } %>
|
7
|
+
<% c && c.tags(:note).each do |tag| %>
|
8
|
+
<blockquote class="note">
|
9
|
+
<p><strong>Note</strong></p>
|
10
|
+
<%= htmlify tag.text %>
|
11
|
+
</blockquote>
|
20
12
|
<% end %>
|
21
13
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<% if @json_objects.any? %>
|
26
|
-
<section>
|
27
|
-
<h2>Object Synopses</h2>
|
28
|
-
|
29
|
-
<% @json_objects.each do |name, json| %>
|
30
|
-
<% if false %>
|
31
|
-
<% properties = render_properties(json) %>
|
32
|
-
<div class='object-synopsis'>
|
33
|
-
<h3>
|
34
|
-
<a name="<%= name %>"></a><%= name %> object synopsis:
|
35
|
-
</h3>
|
36
|
-
<pre class="example code"><%= html_syntax_highlight(properties ? properties : json, :plain) %></pre>
|
37
|
-
</div>
|
38
|
-
<% end %>
|
39
|
-
|
40
|
-
<div class="object-synopsis">
|
41
|
-
<h3 class="object-synopsis__header" id="<%= name %>-api">
|
42
|
-
<span class="object-synopsis__header-text"><%= name %></span>
|
43
|
-
<button class="object-synopsis__toggler"></button>
|
44
|
-
</h3>
|
45
|
-
|
46
|
-
<div class="object-synopsis__content">
|
47
|
-
<div class="object-synopsis__content-description">
|
48
|
-
<% if schema_is_model?(json) && !json['description'].empty? %>
|
49
|
-
<%= htmlify json['description'] %>
|
50
|
-
<% end %>
|
51
|
-
</div>
|
14
|
+
<% unless options.all_resources %>
|
15
|
+
<%= erb "endpoints" %>
|
16
|
+
<% end %>
|
52
17
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
%>
|
58
|
-
</div>
|
59
|
-
</div>
|
60
|
-
<% end %>
|
61
|
-
</section>
|
62
|
-
<% end %>
|
18
|
+
<% if @json_objects.any? %>
|
19
|
+
<%= erb "object_synopses" %>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ahmad Amireh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yard
|
@@ -93,6 +93,7 @@ files:
|
|
93
93
|
- config/yard_api.yml
|
94
94
|
- lib/yard-api.rb
|
95
95
|
- lib/yard-api/code_objects/api_object.rb
|
96
|
+
- lib/yard-api/code_objects/class_object.rb
|
96
97
|
- lib/yard-api/markup/redcarpet.rb
|
97
98
|
- lib/yard-api/options.rb
|
98
99
|
- lib/yard-api/railtie.rb
|
@@ -183,7 +184,6 @@ files:
|
|
183
184
|
- templates/api/layout/html/layout.erb
|
184
185
|
- templates/api/layout/html/setup.rb
|
185
186
|
- templates/api/layout/html/sidebar.erb
|
186
|
-
- templates/api/layout/json/layout.erb
|
187
187
|
- templates/api/layout/json/setup.rb
|
188
188
|
- templates/api/method_details/html/header.erb
|
189
189
|
- templates/api/method_details/html/method_signature.erb
|
@@ -207,8 +207,10 @@ files:
|
|
207
207
|
- templates/api/tags/html/throws.erb
|
208
208
|
- templates/api/tags/html/warning.erb
|
209
209
|
- templates/api/tags/setup.rb
|
210
|
+
- templates/api/topic/html/endpoints.erb
|
210
211
|
- templates/api/topic/html/header.erb
|
211
212
|
- templates/api/topic/html/method_details_list.erb
|
213
|
+
- templates/api/topic/html/object_synopses.erb
|
212
214
|
- templates/api/topic/html/setup.rb
|
213
215
|
- templates/api/topic/html/topic_doc.erb
|
214
216
|
- yard-api.gemspec
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= yieldall %>
|