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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85bc29dab8d82b422100262117d2dcc0efeab73de514613115f9c93965d82475
4
- data.tar.gz: 07c4cb7947c8748aaffc6a026854fa2f2c4283c03ec87b46d635acedc5f0a677
3
+ metadata.gz: 2ef85a4f776e2b1f85ffd89b8894ccff850c4624bd0003ab3375c98f6241c83e
4
+ data.tar.gz: 63b832190838494990ac78c554260f5fe560898a6c9dcef8deb1452cd8526d2a
5
5
  SHA512:
6
- metadata.gz: 108333b3ce90e15754f1b9c8b2021a2c6e523095811da9496c36a85ec5047556caeab35aa1b646840f551291a42a786da744cb71d6f8be251ef324f04de94a71
7
- data.tar.gz: 524874f69f0e20681a61b30fd1fde44d48d8f48190ef8692370cdb50cf51b195504311464971382ea83fdcf06ea0a2f95c36c375dabc78c4661a8717180e8a43
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.0)
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.2)
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.1)
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.3.1)
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.0)
110
+ public_suffix (3.1.1)
111
111
  rack (2.0.7)
112
112
  rack-protection (2.0.5)
113
113
  rack
@@ -26,6 +26,7 @@ module Nexmo
26
26
  vonage-business-cloud/user
27
27
  vonage-business-cloud/vgis
28
28
  application.v2
29
+ conversion
29
30
  ].freeze
30
31
 
31
32
  def self.match?(definition, code_language = nil)
@@ -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
- &nbsp;<svg class="Vlt-icon Vlt-icon--smaller Vlt-icon--text-bottom Vlt-blue-dark"><use xlink:href="/assets/symbol/volta-icons.svg#Vlt-icon-open"></use></svg>
14
+ &nbsp;<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=\"/assets/symbol/volta-icons.svg#Vlt-icon-link\" /></svg>
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="/assets/symbol/volta-icons.svg#Vlt-icon-check" /></svg>')
8
- input.gsub!('❌', '<svg class="Vlt-red Vlt-icon Vlt-icon--small"><use xlink:href="/assets/symbol/volta-icons.svg#Vlt-icon-cross" /></svg>')
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="/assets/symbol/volta-icons.svg#Vlt-icon-#{$1}" /></svg>
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}&nbsp;
11
- <svg class="Vlt-icon Vlt-icon--smaller Vlt-icon--text-bottom Vlt-blue" aria-hidden="true"><use xlink:href="/assets/symbol/volta-icons.svg#Vlt-icon-help-negative"/></svg>
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
 
@@ -1,7 +1,7 @@
1
1
  module Nexmo
2
2
  module OAS
3
3
  module Renderer
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
6
6
  end
7
7
  end
@@ -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
- <pre class="highlight"><code>No content</code></pre>
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="/assets/symbol/volta-icons.svg#Vlt-icon-code" /></svg>
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="/assets/symbol/volta-icons.svg#Vlt-icon-toggle" /></svg>
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="/assets/symbol/volta-icons.svg#Vlt-icon-mind-map" /></svg>
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="/assets/symbol/volta-icons.svg#Vlt-icon-download" /></svg>
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="/assets/symbol/volta-icons.svg#Vlt-icon-github" />
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.1
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-06-20 00:00:00.000000000 Z
11
+ date: 2019-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra