nexmo-oas-renderer 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/lib/nexmo/oas/renderer/constraints/open_api.rb +1 -0
- data/lib/nexmo/oas/renderer/filters/external_link.rb +1 -1
- data/lib/nexmo/oas/renderer/filters/heading.rb +1 -1
- data/lib/nexmo/oas/renderer/filters/icon.rb +3 -3
- data/lib/nexmo/oas/renderer/filters/tooltip.rb +1 -1
- data/lib/nexmo/oas/renderer/version.rb +1 -1
- data/lib/nexmo/oas/renderer/views/open_api/_endpoint.erb +3 -2
- data/lib/nexmo/oas/renderer/views/open_api/_navigation.erb +3 -3
- data/lib/nexmo/oas/renderer/views/open_api/show.erb +2 -2
- 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: 2ef85a4f776e2b1f85ffd89b8894ccff850c4624bd0003ab3375c98f6241c83e
|
4
|
+
data.tar.gz: 63b832190838494990ac78c554260f5fe560898a6c9dcef8deb1452cd8526d2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 269f8cf5678c091bed1edc752c4cf87558546090c7c65f8a0a2f3045caffd3312ff23d24e66f1a10244693dc369eaae714ebfe44a556af44f2a6d6ff5c5f91db
|
7
|
+
data.tar.gz: 59d071880e4fb551817a8c64b0a56a758bcb3241c1c81072df82e411aa23067ff8258e478c35b61691fdeb9c0f3eca501d550eda1da4a8ac799f7e07d4092045
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nexmo-oas-renderer (0.2.
|
4
|
+
nexmo-oas-renderer (0.2.2)
|
5
5
|
activemodel (~> 5.2)
|
6
6
|
activesupport (~> 5.2)
|
7
7
|
banzai (~> 0.1.2)
|
@@ -67,7 +67,7 @@ GEM
|
|
67
67
|
concurrent-ruby (1.1.5)
|
68
68
|
crass (1.0.4)
|
69
69
|
deep_merge (1.2.1)
|
70
|
-
dotenv (2.7.
|
70
|
+
dotenv (2.7.4)
|
71
71
|
erubi (1.8.0)
|
72
72
|
ffi (1.11.1)
|
73
73
|
globalid (0.4.2)
|
@@ -84,7 +84,7 @@ GEM
|
|
84
84
|
mimemagic (~> 0.3.2)
|
85
85
|
method_source (0.9.2)
|
86
86
|
mimemagic (0.3.3)
|
87
|
-
mini_mime (1.0.
|
87
|
+
mini_mime (1.0.2)
|
88
88
|
mini_portile2 (2.4.0)
|
89
89
|
minitest (5.11.3)
|
90
90
|
mustermann (1.0.3)
|
@@ -92,7 +92,7 @@ GEM
|
|
92
92
|
hansi (~> 0.2.0)
|
93
93
|
mustermann (= 1.0.3)
|
94
94
|
neatjson (0.8.4)
|
95
|
-
nio4r (2.
|
95
|
+
nio4r (2.4.0)
|
96
96
|
nokogiri (1.10.3)
|
97
97
|
mini_portile2 (~> 2.4.0)
|
98
98
|
oas_parser (0.18.1)
|
@@ -107,7 +107,7 @@ GEM
|
|
107
107
|
octicons_helper (8.5.0)
|
108
108
|
octicons (= 8.5.0)
|
109
109
|
rails
|
110
|
-
public_suffix (3.1.
|
110
|
+
public_suffix (3.1.1)
|
111
111
|
rack (2.0.7)
|
112
112
|
rack-protection (2.0.5)
|
113
113
|
rack
|
@@ -11,7 +11,7 @@ module Nexmo
|
|
11
11
|
link['target'] = '_blank'
|
12
12
|
if link.css('svg').empty?
|
13
13
|
link.add_child <<~HEREDOC
|
14
|
-
<svg class="Vlt-icon Vlt-icon--smaller Vlt-icon--text-bottom Vlt-blue-dark"><use xlink:href="/
|
14
|
+
<svg class="Vlt-icon Vlt-icon--smaller Vlt-icon--text-bottom Vlt-blue-dark"><use xlink:href="/symbol/volta-icons.svg#Vlt-icon-open"></use></svg>
|
15
15
|
HEREDOC
|
16
16
|
end
|
17
17
|
end
|
@@ -21,7 +21,7 @@ module Nexmo
|
|
21
21
|
|
22
22
|
heading.prepend_child <<~HEREDOC
|
23
23
|
<a href="##{parameterized_heading}" class="heading-permalink">
|
24
|
-
<svg class="Vlt-grey"><use xlink:href=\"/
|
24
|
+
<svg class="Vlt-grey"><use xlink:href=\"/symbol/volta-icons.svg#Vlt-icon-link\" /></svg>
|
25
25
|
</a>
|
26
26
|
HEREDOC
|
27
27
|
end
|
@@ -4,12 +4,12 @@ module Nexmo
|
|
4
4
|
module Filters
|
5
5
|
class Icon < Banzai::Filter
|
6
6
|
def call(input)
|
7
|
-
input.gsub!('✅', '<svg class="Vlt-green Vlt-icon Vlt-icon--small"><use xlink:href="/
|
8
|
-
input.gsub!('❌', '<svg class="Vlt-red Vlt-icon Vlt-icon--small"><use xlink:href="/
|
7
|
+
input.gsub!('✅', '<svg class="Vlt-green Vlt-icon Vlt-icon--small"><use xlink:href="/symbol/volta-icons.svg#Vlt-icon-check" /></svg>')
|
8
|
+
input.gsub!('❌', '<svg class="Vlt-red Vlt-icon Vlt-icon--small"><use xlink:href="/symbol/volta-icons.svg#Vlt-icon-cross" /></svg>')
|
9
9
|
|
10
10
|
input.gsub!(/\[icon="(.+?)"\]/) do
|
11
11
|
<<~HEREDOC
|
12
|
-
<svg class="Vlt-green Vlt-icon Vlt-icon--small"><use xlink:href="/
|
12
|
+
<svg class="Vlt-green Vlt-icon Vlt-icon--small"><use xlink:href="/symbol/volta-icons.svg#Vlt-icon-#{$1}" /></svg>
|
13
13
|
HEREDOC
|
14
14
|
end
|
15
15
|
|
@@ -8,7 +8,7 @@ module Nexmo
|
|
8
8
|
tooltip = <<~HEREDOC
|
9
9
|
<span class="Vlt-tooltip Vlt-tooltip--top" title="#{$2}" tabindex="0">
|
10
10
|
#{$1}
|
11
|
-
<svg class="Vlt-icon Vlt-icon--smaller Vlt-icon--text-bottom Vlt-blue" aria-hidden="true"><use xlink:href="/
|
11
|
+
<svg class="Vlt-icon Vlt-icon--smaller Vlt-icon--text-bottom Vlt-blue" aria-hidden="true"><use xlink:href="/symbol/volta-icons.svg#Vlt-icon-help-negative"/></svg>
|
12
12
|
</span>
|
13
13
|
HEREDOC
|
14
14
|
|
@@ -141,11 +141,12 @@
|
|
141
141
|
<% end %>
|
142
142
|
</div>
|
143
143
|
<% end %>
|
144
|
-
</div>
|
145
144
|
|
146
145
|
<% if response.code == '204' || response.formats.empty? %>
|
147
|
-
|
146
|
+
<% content = response.description ? response.description : 'No content' %>
|
147
|
+
<pre class="highlight"><code><%= content %></code></pre>
|
148
148
|
<% end %>
|
149
|
+
</div>
|
149
150
|
</div>
|
150
151
|
<% end %>
|
151
152
|
</div>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<% endpoints.each do |endpoint| %>
|
23
23
|
<li>
|
24
24
|
<a href="#<%= endpoint.operationId %>" class="Vlt-sidemenu__link">
|
25
|
-
<svg class="Vlt-green"><use xlink:href="/
|
25
|
+
<svg class="Vlt-green"><use xlink:href="/symbol/volta-icons.svg#Vlt-icon-code" /></svg>
|
26
26
|
|
27
27
|
<span class="Vlt-sidemenu__label">
|
28
28
|
<%= normalize_summary_title(endpoint.summary, endpoint.operationId) %>
|
@@ -37,7 +37,7 @@
|
|
37
37
|
<% path.endpoints.each do |endpoint| %>
|
38
38
|
<li class="Nxd-menu__indent">
|
39
39
|
<a href="#<%= endpoint.operationId %>" class="Vlt-sidemenu__link">
|
40
|
-
<svg class="Vlt-blue"><use xlink:href="/
|
40
|
+
<svg class="Vlt-blue"><use xlink:href="/symbol/volta-icons.svg#Vlt-icon-toggle" /></svg>
|
41
41
|
<span class="Vlt-sidemenu__label"><%= endpoint.summary %></span>
|
42
42
|
</a>
|
43
43
|
</li>
|
@@ -55,7 +55,7 @@
|
|
55
55
|
<% path.endpoints.each do |endpoint| %>
|
56
56
|
<li>
|
57
57
|
<a href="#<%= name %>" class="Vlt-sidemenu__link">
|
58
|
-
<svg class="Vlt-orange"><use xlink:href="/
|
58
|
+
<svg class="Vlt-orange"><use xlink:href="/symbol/volta-icons.svg#Vlt-icon-mind-map" /></svg>
|
59
59
|
<span class="Vlt-sidemenu__label"><%= endpoint.summary %></span>
|
60
60
|
</a>
|
61
61
|
</li>
|
@@ -22,14 +22,14 @@
|
|
22
22
|
<div class="Vlt-grid">
|
23
23
|
<div class="Vlt-col">
|
24
24
|
<a href=<%= url("#{request.url}.#{definition.format}", params: request.params) %> class='Vlt-btn Vlt-btn--secondary Vlt-btn--app'>
|
25
|
-
<svg><use xlink:href="/
|
25
|
+
<svg><use xlink:href="/symbol/volta-icons.svg#Vlt-icon-download" /></svg>
|
26
26
|
Download OpenAPI 3 Definition
|
27
27
|
</a>
|
28
28
|
</div>
|
29
29
|
<div class="Vlt-col Vlt-right">
|
30
30
|
<a href="https://github.com/Nexmo/api-specification/blob/master/definitions/<%= @specification.definition_name %>.yml" class='Vlt-btn Vlt-btn--tertiary Vlt-btn--app Vlt-right'>
|
31
31
|
<svg className="Vlt-icon Vlt-black">
|
32
|
-
<use xlink:href="/
|
32
|
+
<use xlink:href="/symbol/volta-icons.svg#Vlt-icon-github" />
|
33
33
|
</svg>
|
34
34
|
Improve this specification
|
35
35
|
</a>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexmo-oas-renderer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabian Rodriguez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|