apipie-dsl 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +485 -0
- data/app/controllers/apipie_dsl/apipie_dsls_controller.rb +190 -0
- data/app/helpers/apipie_dsl_helper.rb +110 -0
- data/app/public/apipie_dsl/javascripts/apipie_dsl.js +6 -0
- data/app/public/apipie_dsl/javascripts/bundled/bootstrap-collapse.js +138 -0
- data/app/public/apipie_dsl/javascripts/bundled/bootstrap.js +1726 -0
- data/app/public/apipie_dsl/javascripts/bundled/jquery.js +5 -0
- data/app/public/apipie_dsl/javascripts/bundled/prettify.js +28 -0
- data/app/public/apipie_dsl/stylesheets/application.css +7 -0
- data/app/public/apipie_dsl/stylesheets/bundled/bootstrap-responsive.min.css +12 -0
- data/app/public/apipie_dsl/stylesheets/bundled/bootstrap.min.css +689 -0
- data/app/public/apipie_dsl/stylesheets/bundled/prettify.css +30 -0
- data/app/views/apipie_dsl/apipie_dsls/_index_class_meth.erb +11 -0
- data/app/views/apipie_dsl/apipie_dsls/_index_class_prop.erb +13 -0
- data/app/views/apipie_dsl/apipie_dsls/_languages.erb +6 -0
- data/app/views/apipie_dsl/apipie_dsls/_metadata.erb +1 -0
- data/app/views/apipie_dsl/apipie_dsls/_method.erb +34 -0
- data/app/views/apipie_dsl/apipie_dsls/_method_detail.erb +58 -0
- data/app/views/apipie_dsl/apipie_dsls/_params.html.erb +47 -0
- data/app/views/apipie_dsl/apipie_dsls/_params_plain.html.erb +19 -0
- data/app/views/apipie_dsl/apipie_dsls/_property.erb +24 -0
- data/app/views/apipie_dsl/apipie_dsls/_property_detail.erb +35 -0
- data/app/views/apipie_dsl/apipie_dsls/_raises.html.erb +23 -0
- data/app/views/apipie_dsl/apipie_dsls/_returns.html.erb +53 -0
- data/app/views/apipie_dsl/apipie_dsls/apipie_dsl_404.html.erb +17 -0
- data/app/views/apipie_dsl/apipie_dsls/class.html.erb +75 -0
- data/app/views/apipie_dsl/apipie_dsls/custom_help.html.erb +10 -0
- data/app/views/apipie_dsl/apipie_dsls/getting_started.html.erb +4 -0
- data/app/views/apipie_dsl/apipie_dsls/index.html.erb +72 -0
- data/app/views/apipie_dsl/apipie_dsls/method.html.erb +52 -0
- data/app/views/apipie_dsl/apipie_dsls/plain.html.erb +116 -0
- data/app/views/apipie_dsl/apipie_dsls/static.html.erb +158 -0
- data/app/views/layouts/apipie_dsl/apipie_dsl.html.erb +26 -0
- data/lib/apipie-dsl.rb +3 -0
- data/lib/apipie_dsl.rb +28 -0
- data/lib/apipie_dsl/Rakefile +6 -0
- data/lib/apipie_dsl/apipie_dsl_module.rb +51 -0
- data/lib/apipie_dsl/application.rb +321 -0
- data/lib/apipie_dsl/class_description.rb +107 -0
- data/lib/apipie_dsl/configuration.rb +87 -0
- data/lib/apipie_dsl/dsl.rb +596 -0
- data/lib/apipie_dsl/errors.rb +68 -0
- data/lib/apipie_dsl/exception_description.rb +39 -0
- data/lib/apipie_dsl/markup.rb +41 -0
- data/lib/apipie_dsl/method_description.rb +112 -0
- data/lib/apipie_dsl/parameter_description.rb +152 -0
- data/lib/apipie_dsl/railtie.rb +15 -0
- data/lib/apipie_dsl/return_description.rb +71 -0
- data/lib/apipie_dsl/routing.rb +17 -0
- data/lib/apipie_dsl/see_description.rb +35 -0
- data/lib/apipie_dsl/static_dispatcher.rb +70 -0
- data/lib/apipie_dsl/tag_list_description.rb +11 -0
- data/lib/apipie_dsl/tasks/apipie_dsl/cache.rake +43 -0
- data/lib/apipie_dsl/tasks/apipie_dsl/static.rake +43 -0
- data/lib/apipie_dsl/tasks/apipie_dsl/static_json.rake +29 -0
- data/lib/apipie_dsl/tasks_utils.rb +137 -0
- data/lib/apipie_dsl/utils.rb +83 -0
- data/lib/apipie_dsl/validator.rb +479 -0
- data/lib/apipie_dsl/version.rb +5 -0
- data/lib/generators/apipie_dsl/install/install_generator.rb +21 -0
- data/lib/generators/apipie_dsl/install/templates/initializer.rb.erb +9 -0
- data/lib/generators/apipie_dsl/views_generator.rb +14 -0
- data/test/test_helper.rb +6 -0
- metadata +220 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
.com { color: #93a1a1; }
|
2
|
+
.lit { color: #195f91; }
|
3
|
+
.pun, .opn, .clo { color: #93a1a1; }
|
4
|
+
.fun { color: #dc322f; }
|
5
|
+
.str, .atv { color: #D14; }
|
6
|
+
.kwd, .linenums .tag { color: #1e347b; }
|
7
|
+
.typ, .atn, .dec, .var { color: teal; }
|
8
|
+
.pln { color: #48484c; }
|
9
|
+
|
10
|
+
.prettyprint {
|
11
|
+
padding: 8px;
|
12
|
+
background-color: #f7f7f9;
|
13
|
+
border: 1px solid #e1e1e8;
|
14
|
+
}
|
15
|
+
.prettyprint.linenums {
|
16
|
+
-webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
17
|
+
-moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
18
|
+
box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
19
|
+
}
|
20
|
+
|
21
|
+
/* Specify class=linenums on a pre to get line numbering */
|
22
|
+
ol.linenums {
|
23
|
+
margin: 0 0 0 33px; /* IE indents via margin-left */
|
24
|
+
}
|
25
|
+
ol.linenums li {
|
26
|
+
padding-left: 12px;
|
27
|
+
color: #bebec5;
|
28
|
+
line-height: 18px;
|
29
|
+
text-shadow: 0 1px 0 #fff;
|
30
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% if meth[:show] %>
|
2
|
+
<tr>
|
3
|
+
<td>
|
4
|
+
<a href='<%= meth[:doc_url] %><%= link_extension %>'><%= meth[:name] %></a>
|
5
|
+
<% if meth[:deprecated] %>
|
6
|
+
<code>DEPRECATED</code>
|
7
|
+
<% end %>
|
8
|
+
</td>
|
9
|
+
<td width='60%'><%= meth[:short_description] %></td>
|
10
|
+
</tr>
|
11
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% if prop[:show] %>
|
2
|
+
<tr>
|
3
|
+
<td>
|
4
|
+
<a href='<%= doc_url %><%= link_extension %>#link-description-<%= escaped_method_name(prop[:name], '_') %>'>
|
5
|
+
<%= prop[:name] %>
|
6
|
+
</a>
|
7
|
+
<% if prop[:deprecated] %>
|
8
|
+
<code>DEPRECATED</code>
|
9
|
+
<% end %>
|
10
|
+
</td>
|
11
|
+
<td width='60%'><%= prop[:short_description] %></td>
|
12
|
+
</tr>
|
13
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<pre class="prettyprint lang-yaml"><%= meta.to_yaml.gsub(/---\n/, "") %></pre>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<div class='accordion' id='meth-accordion'>
|
2
|
+
<% if meth[:show] %>
|
3
|
+
<tr>
|
4
|
+
<td>
|
5
|
+
<div class='pull-right small'>
|
6
|
+
<a href='<%= meth[:doc_url] %><%= link_extension %>'> >>> </a>
|
7
|
+
</div>
|
8
|
+
<div>
|
9
|
+
<h2>
|
10
|
+
<a href='#description-<%= escaped_method_name(meth[:name], '_') %>'
|
11
|
+
class='accordion-toggle'
|
12
|
+
data-toggle='collapse'
|
13
|
+
data-parent='#meth-accordion'>
|
14
|
+
<%= method_signature(meth) %>
|
15
|
+
</a>
|
16
|
+
<% if meth[:deprecated] %>
|
17
|
+
<code>DEPRECATED</code>
|
18
|
+
<% end %>
|
19
|
+
<br>
|
20
|
+
<small><%= raw meth[:short_description] %></small>
|
21
|
+
</h2>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<% unless meth[:see].empty? %>
|
25
|
+
Also see <%= meth[:see].map { |s| link_to(s[:description], "#{s[:link]}#{link_extension}") }.to_sentence.html_safe %>.
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<div id='description-<%= escaped_method_name(meth[:name], '_') %>' class='collapse accordion-body'>
|
29
|
+
<%= render partial: 'method_detail', locals: { method: meth, h_level: 3 } %>
|
30
|
+
</div>
|
31
|
+
</td>
|
32
|
+
</tr>
|
33
|
+
<% end %>
|
34
|
+
</div>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<% unless method[:aliases].blank? %>
|
2
|
+
<%= heading(t('apipie_dsl.aliases'), h_level) %>
|
3
|
+
<pre class="prettyprint"><%= method[:aliases].join(', ') %></pre>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<%= raw method[:full_description] %>
|
7
|
+
|
8
|
+
<% unless method[:raises].blank? %>
|
9
|
+
<%= heading(t('apipie_dsl.raises'), h_level) %>
|
10
|
+
<%= render(:partial => 'raises', :locals => {:raises => method[:raises]}) %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<% unless method[:metadata].blank? %>
|
14
|
+
<%= heading(t('apipie_dsl.metadata'), h_level) %>
|
15
|
+
<%= render(:partial => 'metadata', :locals => {:meta => method[:metadata]}) %>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<% unless method[:examples].blank? %>
|
19
|
+
<%= heading(t('apipie_dsl.examples'), h_level) %>
|
20
|
+
<% method[:examples].each do |example| %>
|
21
|
+
<% if example[:desc] %>
|
22
|
+
<p><%= example[:desc] %></p>
|
23
|
+
<% end %>
|
24
|
+
<pre class="prettyprint"><%= example[:example] %></pre>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<% unless method[:params].blank? %>
|
29
|
+
<%= heading(t('apipie_dsl.params'), h_level) %>
|
30
|
+
<table class='table'>
|
31
|
+
<thead>
|
32
|
+
<tr>
|
33
|
+
<th><%= t('apipie_dsl.param_name') %></th>
|
34
|
+
<th><%= t('apipie_dsl.description') %></th>
|
35
|
+
</tr>
|
36
|
+
</thead>
|
37
|
+
<tbody>
|
38
|
+
<%= render(:partial => 'params', :locals => {:params => method[:params]}) %>
|
39
|
+
</tbody>
|
40
|
+
</table>
|
41
|
+
<% end %>
|
42
|
+
<% unless method[:returns].blank? %>
|
43
|
+
<%= heading(t('apipie_dsl.returns'), h_level) %>
|
44
|
+
<% if method[:returns][:description] %>
|
45
|
+
<p><%= method[:returns][:description] %></p>
|
46
|
+
<% end %>
|
47
|
+
<table class='table'>
|
48
|
+
<thead>
|
49
|
+
<tr>
|
50
|
+
<th><%= t("apipie_dsl.#{method[:returns][:object][:class]}") %></th>
|
51
|
+
<th><%= t("apipie_dsl.details") %></th>
|
52
|
+
</tr>
|
53
|
+
</thead>
|
54
|
+
<tbody>
|
55
|
+
<%= render(:partial => 'returns', :locals => {:return_object => method[:returns][:object]}) %>
|
56
|
+
</tbody>
|
57
|
+
</table>
|
58
|
+
<% end %>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<% level ||= 0 %>
|
2
|
+
<% col = 255 - level * 5 %>
|
3
|
+
<% params.each do |param| %>
|
4
|
+
<% if !param[:show] %>
|
5
|
+
<%= render(:partial => 'params', :locals => {:level => level, :params => param[:params]}) unless param[:params].blank? %>
|
6
|
+
<% next %>
|
7
|
+
<% end %>
|
8
|
+
<tr style='background-color:rgb(<%= "#{col},#{col},#{col}" %>);'>
|
9
|
+
<td>
|
10
|
+
<strong><%= param[:full_name] %> </strong><br>
|
11
|
+
<small>
|
12
|
+
<%= t("apipie_dsl.#{param[:type]}") %>
|
13
|
+
</small>
|
14
|
+
</td>
|
15
|
+
<td>
|
16
|
+
<%= param[:description].html_safe %>
|
17
|
+
<%- if param[:type] != 'required' %>
|
18
|
+
<p><strong>Default value:</strong></p>
|
19
|
+
<ul>
|
20
|
+
<li><%= resolve_default(param[:default]) %></li>
|
21
|
+
</ul>
|
22
|
+
<%- end %>
|
23
|
+
<%- if param[:validations].present? || param[:validator].present? %>
|
24
|
+
<p><strong>Validations:</strong></p>
|
25
|
+
<ul>
|
26
|
+
<%- if param[:validator].present? %>
|
27
|
+
<li><%= ApipieDSL.markup_to_html(param[:validator]).html_safe %></li>
|
28
|
+
<%- end %>
|
29
|
+
<%- if param[:validations].present? %>
|
30
|
+
<%- param[:validations].each do |item| %>
|
31
|
+
<li><%= item.html_safe %></li>
|
32
|
+
<%- end %>
|
33
|
+
<%- end %>
|
34
|
+
</ul>
|
35
|
+
<%- end %>
|
36
|
+
|
37
|
+
<% unless param[:metadata].blank? %>
|
38
|
+
<br>
|
39
|
+
Metadata:
|
40
|
+
<%= render(:partial => 'metadata', :locals => {:meta => param[:metadata]}) %>
|
41
|
+
<% end %>
|
42
|
+
</td>
|
43
|
+
|
44
|
+
</tr>
|
45
|
+
|
46
|
+
<%= render(:partial => 'params', :locals => {:level => level + 1, :params => param[:params]}) unless param[:params].blank? %>
|
47
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<ul>
|
2
|
+
<% params.each do |param| %>
|
3
|
+
<% if !param[:show] %>
|
4
|
+
<%= render(:partial => 'params_plain', :locals => {:params => param[:params]}) unless param[:params].blank? %>
|
5
|
+
<% next %>
|
6
|
+
<% end %>
|
7
|
+
<li>
|
8
|
+
<strong><%= param[:name] %> </strong>:
|
9
|
+
<small>
|
10
|
+
<%= t("apipie.#{param[:type]}") %>
|
11
|
+
<% if param[:validator] %>
|
12
|
+
[ <%= ApipieDSL.markup_to_html(param[:validator]).html_safe %> ]
|
13
|
+
<% end %>
|
14
|
+
</small>
|
15
|
+
<%= param[:description].html_safe %>
|
16
|
+
</li>
|
17
|
+
<%= render(:partial => 'params_plain', :locals => {:params => param[:params]}) unless param[:params].blank? %>
|
18
|
+
<% end %>
|
19
|
+
</ul>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<div class='accordion' id='prop-accordion'>
|
2
|
+
<% if prop[:show] %>
|
3
|
+
<tr>
|
4
|
+
<td>
|
5
|
+
<div>
|
6
|
+
<h2>
|
7
|
+
<a id='link-description-<%= escaped_method_name(prop[:name], '_') %>' href='#description-<%= escaped_method_name(prop[:name], '_') %>'
|
8
|
+
class='accordion-toggle'
|
9
|
+
data-toggle='collapse'
|
10
|
+
data-parent='#prop-accordion'>
|
11
|
+
<%= prop[:name] %>
|
12
|
+
</a>
|
13
|
+
<br>
|
14
|
+
<small><%= raw prop[:short_description] %></small>
|
15
|
+
</h2>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div id='description-<%= escaped_method_name(prop[:name], '_') %>' class='collapse accordion-body'>
|
19
|
+
<%= render partial: 'property_detail', locals: { property: prop, h_level: 3 } %>
|
20
|
+
</div>
|
21
|
+
</td>
|
22
|
+
</tr>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<% unless property[:metadata].blank? %>
|
2
|
+
<%= heading(t('apipie_dsl.metadata'), h_level) %>
|
3
|
+
<%= render(partial: 'metadata', locals: { meta: property[:metadata] }) %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<% unless property[:params].blank? %>
|
7
|
+
<%= heading(t('apipie_dsl.params'), h_level) %>
|
8
|
+
<table class='table'>
|
9
|
+
<thead>
|
10
|
+
<tr>
|
11
|
+
<th><%= t('apipie_dsl.param_name') %></th>
|
12
|
+
<th><%= t('apipie_dsl.description') %></th>
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
<tbody>
|
16
|
+
<%= render(partial: 'params', locals: { params: property[:params] }) %>
|
17
|
+
</tbody>
|
18
|
+
</table>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<%= heading(t('apipie_dsl.returns'), h_level) %>
|
22
|
+
<% if property[:returns][:description] %>
|
23
|
+
<p><%= property[:returns][:description] %></p>
|
24
|
+
<% end %>
|
25
|
+
<table class='table'>
|
26
|
+
<thead>
|
27
|
+
<tr>
|
28
|
+
<th><%= t("apipie_dsl.#{property[:returns][:object][:class]}") %></th>
|
29
|
+
<th><%= t("apipie_dsl.details") %></th>
|
30
|
+
</tr>
|
31
|
+
</thead>
|
32
|
+
<tbody>
|
33
|
+
<%= render(partial: 'returns', locals: { return_object: property[:returns][:object]}) %>
|
34
|
+
</tbody>
|
35
|
+
</table>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<% show_metadata = raises.reject { |ex| ex[:metadata].blank? }.size > 0 %>
|
2
|
+
|
3
|
+
<table class="table table-bordered">
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<th><%= t('apipie_dsl.exeption', default: 'Exception') %></th>
|
7
|
+
<th><%= t('apipie_dsl.exeption_description', default: [:description, 'Description']) %></th>
|
8
|
+
<% if show_metadata %><th><%= t('apipie_dsl.exeption_metadata', default: [:metadata, 'Metadata']) %></th><% end %>
|
9
|
+
</tr>
|
10
|
+
</thead>
|
11
|
+
|
12
|
+
<tbody>
|
13
|
+
<% raises.each do |ex| %>
|
14
|
+
<tr>
|
15
|
+
<td><span class="label"> <%= ex[:error] %> </span></td>
|
16
|
+
<td><%= ex[:description].html_safe %></td>
|
17
|
+
<% if show_metadata %>
|
18
|
+
<td><%= render(partial: 'metadata', locals: { meta: ex[:metadata] }) unless ex[:metadata].blank? %></td>
|
19
|
+
<% end %>
|
20
|
+
</tr>
|
21
|
+
<% end %>
|
22
|
+
</tbody>
|
23
|
+
</table>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<% level ||= 0 %>
|
2
|
+
<% col = 255 - level * 5 %>
|
3
|
+
<% if return_object[:class] == Hash && return_object[:data] && return_object[:data].is_a?(Enumerable) %>
|
4
|
+
<% return_object[:data].each do |param| %>
|
5
|
+
<% if !param[:show] %>
|
6
|
+
<%= render(:partial => 'params', :locals => {:level => level, :params => param[:params]}) unless param[:params].blank? %>
|
7
|
+
<% next %>
|
8
|
+
<% end %>
|
9
|
+
<tr style='background-color:rgb(<%= "#{col},#{col},#{col}" %>);'>
|
10
|
+
<td>
|
11
|
+
<strong><%= param[:full_name] %> </strong><br>
|
12
|
+
<small>
|
13
|
+
<%= t("apipie_dsl.#{param[:type]}") %>
|
14
|
+
</small>
|
15
|
+
</td>
|
16
|
+
<td>
|
17
|
+
<%= param[:description].html_safe %>
|
18
|
+
<%- if param[:validations].present? || param[:validator].present? %>
|
19
|
+
<p><strong>Validations:</strong></p>
|
20
|
+
<ul>
|
21
|
+
<%- if param[:validator].present? %>
|
22
|
+
<li><%= ApipieDSL.markup_to_html(param[:validator]).html_safe %></li>
|
23
|
+
<%- end %>
|
24
|
+
<%- if param[:validations].present? %>
|
25
|
+
<%- param[:validations].each do |item| %>
|
26
|
+
<li><%= item.html_safe %></li>
|
27
|
+
<%- end %>
|
28
|
+
<%- end %>
|
29
|
+
</ul>
|
30
|
+
<%- end %>
|
31
|
+
|
32
|
+
<% unless param[:metadata].blank? %>
|
33
|
+
<br>
|
34
|
+
Metadata:
|
35
|
+
<%= render(:partial => 'metadata', :locals => {:meta => param[:metadata]}) %>
|
36
|
+
<% end %>
|
37
|
+
</td>
|
38
|
+
|
39
|
+
</tr>
|
40
|
+
|
41
|
+
<%= render(:partial => 'params', :locals => {:level => level + 1, :params => param[:params]}) unless param[:params].blank? %>
|
42
|
+
<% end %>
|
43
|
+
<% else %>
|
44
|
+
<tr style='background-color:rgb(<%= "#{col},#{col},#{col}" %>);'>
|
45
|
+
<td>
|
46
|
+
<strong><%= return_object[:meta] %> </strong><br>
|
47
|
+
</td>
|
48
|
+
<td>
|
49
|
+
<% obj = return_object[:data].blank? ? return_object[:class] : return_object[:data] %>
|
50
|
+
<%= raw(class_references(obj, current_version(@doc[:classes]), @doc[:link_extension])).gsub('"', '').html_safe %>
|
51
|
+
</td>
|
52
|
+
</tr>
|
53
|
+
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<h1 class='page-header'>
|
2
|
+
<%= t('apipie_dsl.oops') %>
|
3
|
+
<small>
|
4
|
+
<% if params[:method].blank? %>
|
5
|
+
<%= t('apipie_dsl.class_not_found_html', klass: "<code>#{h(params[:class])}</code>".html_safe) %>
|
6
|
+
<% else %>
|
7
|
+
<%= t('apipie_dsl.method_not_found_html', klass: "<code>#{h(params[:class])}</code>".html_safe,
|
8
|
+
:method => "<code>#{h(params[:method])}</code>".html_safe) %>
|
9
|
+
<% end %>
|
10
|
+
</small>
|
11
|
+
</h1>
|
12
|
+
|
13
|
+
<% if @doc %>
|
14
|
+
<%= t('apipie_dsl.goto_homepage_html', :href => link_to(
|
15
|
+
t('apipie_dsl.goto_homepage_href', :app_name => @doc[:name]),
|
16
|
+
File.join(@doc[:doc_url], @doc[:link_extension]))) %>
|
17
|
+
<% end %>
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<ul class='breadcrumb'>
|
2
|
+
<% dsl_sections.each do |section| %>
|
3
|
+
<% if section == @section %>
|
4
|
+
<li class='active'><a href='<%= @doc[:doc_url] %><%= section_ext(section) %><%= @doc[:link_extension] %>'><%= t("apipie_dsl.#{@section}") %></a></li>
|
5
|
+
<% else %>
|
6
|
+
<li><a href='<%= @doc[:doc_url] %><%= section_ext(section) %><%= @doc[:link_extension] %>'><%= t("apipie_dsl.#{section}") %></a></li>
|
7
|
+
<% end %>
|
8
|
+
<% end %>
|
9
|
+
<% unless ApipieDSL.configuration.help_layout.nil? %>
|
10
|
+
<li class='pull-right'>
|
11
|
+
<% section = 'help' %>
|
12
|
+
<a href='<%= @doc[:doc_url] %><%= section_ext(section) %><%= @doc[:link_extension] %>'><%= t("apipie_dsl.#{section}") %></a>
|
13
|
+
</li>
|
14
|
+
<% end %>
|
15
|
+
</ul>
|
16
|
+
<ul class='breadcrumb'>
|
17
|
+
<li>
|
18
|
+
<a href='<%= @doc[:doc_url] %><%= section_ext(@section) %><%= @doc[:link_extension] %>'><%= @doc[:name] %> <%= @klass[:version] %></a>
|
19
|
+
<span class='divider'>/</span>
|
20
|
+
</li>
|
21
|
+
<li class='active'>
|
22
|
+
<%= @klass[:name] %>
|
23
|
+
</li>
|
24
|
+
<%= render(:partial => 'languages', :locals => {:doc_url => @klass[:doc_url]}) %>
|
25
|
+
</ul>
|
26
|
+
|
27
|
+
<div class='page-header'>
|
28
|
+
<h1>
|
29
|
+
<%= @klass[:name] %>
|
30
|
+
<% if @klass[:deprecated] %>
|
31
|
+
<code>DEPRECATED</code>
|
32
|
+
<% end %>
|
33
|
+
<br>
|
34
|
+
<small><%= raw @klass[:short_description] %></small>
|
35
|
+
</h1>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<% unless @klass[:full_description].blank? %>
|
39
|
+
<div><%= raw @klass[:full_description] %></div>
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
<% unless @klass[:metadata].blank? %>
|
43
|
+
<h2>Metadata</h2>
|
44
|
+
<%= render(:partial => 'metadata', :locals => {:meta => @klass[:metadata]}) %>
|
45
|
+
<% end %>
|
46
|
+
|
47
|
+
<% unless @klass[:properties].empty? %>
|
48
|
+
<table class='table'>
|
49
|
+
<thead>
|
50
|
+
<tr>
|
51
|
+
<th><%= t('apipie_dsl.property') %></th>
|
52
|
+
</tr>
|
53
|
+
</thead>
|
54
|
+
<tbody>
|
55
|
+
<%= render partial: 'property', collection: @klass[:properties], as: :prop %>
|
56
|
+
</tbody>
|
57
|
+
</table>
|
58
|
+
<% end %>
|
59
|
+
|
60
|
+
<% unless @klass[:methods].empty? %>
|
61
|
+
<table class='table'>
|
62
|
+
<thead>
|
63
|
+
<tr>
|
64
|
+
<th><%= t('apipie_dsl.method') %></th>
|
65
|
+
</tr>
|
66
|
+
</thead>
|
67
|
+
<tbody>
|
68
|
+
<%= render partial: 'method', collection: @klass[:methods], as: :meth, locals: { link_extension: @doc[:link_extension] } %>
|
69
|
+
</tbody>
|
70
|
+
</table>
|
71
|
+
<% end %>
|
72
|
+
|
73
|
+
<% unless content_for(:apipie_dsl_footer) == @doc[:copyright] %>
|
74
|
+
<%= content_for :apipie_dsl_footer, raw(@doc[:copyright]) %>
|
75
|
+
<% end %>
|