apipie-dsl 2.2.9 → 2.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/apipie_dsl_helper.rb +4 -4
- data/app/public/apipie_dsl/stylesheets/application.css +11 -0
- data/app/views/apipie_dsl/apipie_dsls/_property_detail.html.erb +10 -0
- data/app/views/apipie_dsl/apipie_dsls/plain.html.erb +8 -2
- data/app/views/apipie_dsl/apipie_dsls/static.html.erb +8 -2
- data/lib/apipie_dsl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 990ebec629f1450a927333b32acec610e62378a52dd4d04247de392fa15376ad
|
4
|
+
data.tar.gz: 15a19b903fa3a51096eda59a022ffcfaaaf1bbe82d9253a25b7696a6c04321bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b0a2d9ea7df944cb6b1585db1bc18bc98220ffab60e612e832e9eddbd0e19668067da1b950b342b906a36e922c4f539d35ccf4a9d70977593a5931195d16e94
|
7
|
+
data.tar.gz: ab9e8070fed5ce6cb24c5da93ec3c4b297cb792fa704b5e3fcc2f74c40927deaf608e0401de6dc5eef46fc784e9a89300b9317768398a44f78805c2ccb766333
|
@@ -22,13 +22,13 @@ module ApipieDslHelper
|
|
22
22
|
content_tag(:ul, class: 'breadcrumb') do
|
23
23
|
content = dsl_sections.map do |section|
|
24
24
|
content_tag(:li, class: section == @section ? 'active' : '') do
|
25
|
-
link_to(
|
25
|
+
link_to(_(section.titleize), @doc[:doc_url] + section_ext(section) + @doc[:link_extension])
|
26
26
|
end
|
27
27
|
end.join(' | ').html_safe
|
28
28
|
|
29
29
|
unless ApipieDSL.configuration.help_layout.nil?
|
30
30
|
content += content_tag(:li, class: "pull-right #{'active' if @section == 'help'}") do
|
31
|
-
link_to(
|
31
|
+
link_to(_('Help'), @doc[:doc_url] + section_ext('help') + @doc[:link_extension])
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -36,11 +36,11 @@ module ApipieDslHelper
|
|
36
36
|
|
37
37
|
def apipie_dsl_example(source, output = nil)
|
38
38
|
text = content_tag(:p, _('Example input:')) +
|
39
|
-
content_tag(:pre, source)
|
39
|
+
content_tag(:pre, source, class: 'wiki')
|
40
40
|
|
41
41
|
if output.present?
|
42
42
|
text += content_tag(:p, _('Example output:')) +
|
43
|
-
content_tag(:pre, output)
|
43
|
+
content_tag(:pre, output, class: 'wiki')
|
44
44
|
end
|
45
45
|
|
46
46
|
text.html_safe
|
@@ -5,3 +5,14 @@ body {
|
|
5
5
|
.sidebar-nav {
|
6
6
|
padding: 9px 0;
|
7
7
|
}
|
8
|
+
|
9
|
+
pre:not(.prettyprint):not(.wiki) {
|
10
|
+
margin: 0 0 9px;
|
11
|
+
padding: 0;
|
12
|
+
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
|
13
|
+
font-size: 13px;
|
14
|
+
line-height: 18px;
|
15
|
+
color: #333333;
|
16
|
+
background-color: inherit;
|
17
|
+
border: none;
|
18
|
+
}
|
@@ -3,6 +3,16 @@
|
|
3
3
|
<%= render(partial: 'metadata', locals: { meta: property[:metadata] }) %>
|
4
4
|
<% end %>
|
5
5
|
|
6
|
+
<% unless property[:examples].blank? %>
|
7
|
+
<%= heading(t('apipie_dsl.examples'), h_level) %>
|
8
|
+
<% property[:examples].each do |example| %>
|
9
|
+
<% if example[:desc] %>
|
10
|
+
<p><%= example[:desc] %></p>
|
11
|
+
<% end %>
|
12
|
+
<pre class="prettyprint"><%= example[:example] %></pre>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
15
|
+
|
6
16
|
<% unless property[:params].blank? %>
|
7
17
|
<%= heading(t('apipie_dsl.params'), h_level) %>
|
8
18
|
<table class='table'>
|
@@ -42,7 +42,10 @@
|
|
42
42
|
<% unless prop[:examples].blank? %>
|
43
43
|
<h4><%= t('apipie_dsl.examples') %></h4>
|
44
44
|
<% prop[:examples].each do |example| %>
|
45
|
-
|
45
|
+
<% if example[:desc] %>
|
46
|
+
<p><%= example[:desc] %></p>
|
47
|
+
<% end %>
|
48
|
+
<pre class="wiki"><%= example[:example] %></pre>
|
46
49
|
<% end %>
|
47
50
|
<% end %>
|
48
51
|
|
@@ -79,7 +82,10 @@
|
|
79
82
|
<% unless method[:examples].blank? %>
|
80
83
|
<h4><%= t('apipie_dsl.examples') %></h4>
|
81
84
|
<% method[:examples].each do |example| %>
|
82
|
-
|
85
|
+
<% if example[:desc] %>
|
86
|
+
<p><%= example[:desc] %></p>
|
87
|
+
<% end %>
|
88
|
+
<pre class="wiki"><%= example[:example] %></pre>
|
83
89
|
<% end %>
|
84
90
|
<% end %>
|
85
91
|
|
@@ -59,7 +59,10 @@
|
|
59
59
|
<% unless prop[:examples].blank? %>
|
60
60
|
<h2><%= t('apipie_dsl.examples') %></h2>
|
61
61
|
<% prop[:examples].each do |example| %>
|
62
|
-
|
62
|
+
<% if example[:desc] %>
|
63
|
+
<p><%= example[:desc] %></p>
|
64
|
+
<% end %>
|
65
|
+
<pre><%= example[:example] %></pre>
|
63
66
|
<% end %>
|
64
67
|
<% end %>
|
65
68
|
|
@@ -107,7 +110,10 @@
|
|
107
110
|
<% unless method[:examples].blank? %>
|
108
111
|
<h2><%= t('apipie_dsl.examples') %></h2>
|
109
112
|
<% method[:examples].each do |example| %>
|
110
|
-
|
113
|
+
<% if example[:desc] %>
|
114
|
+
<p><%= example[:desc] %></p>
|
115
|
+
<% end %>
|
116
|
+
<pre class="prettyprint"><%= example[:example] %></pre>
|
111
117
|
<% end %>
|
112
118
|
<% end %>
|
113
119
|
|
data/lib/apipie_dsl/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apipie-dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleh Fedorenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|