nexmo-oas-renderer 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/Gemfile.lock +16 -7
  4. data/lib/nexmo/oas/renderer/app.rb +2 -4
  5. data/lib/nexmo/oas/renderer/presenters/api_specification.rb +1 -1
  6. data/lib/nexmo/oas/renderer/presenters/open_api_specification.rb +1 -1
  7. data/lib/nexmo/oas/renderer/public/assets/stylesheets/nexmo-oas-renderer.css +1 -1
  8. data/lib/nexmo/oas/renderer/version.rb +1 -1
  9. data/lib/nexmo/oas/renderer/views/open_api/_model.erb +1 -1
  10. data/lib/nexmo/oas/renderer/views/open_api/_parameter_groups.erb +7 -37
  11. data/lib/nexmo/oas/renderer/views/open_api/_tabbed_parameters.erb +53 -0
  12. data/nexmo-oas-renderer.gemspec +1 -0
  13. metadata +17 -53
  14. data/lib/nexmo/oas/renderer/filters/anchor.rb +0 -17
  15. data/lib/nexmo/oas/renderer/filters/audio.rb +0 -21
  16. data/lib/nexmo/oas/renderer/filters/block_escape.rb +0 -24
  17. data/lib/nexmo/oas/renderer/filters/break.rb +0 -13
  18. data/lib/nexmo/oas/renderer/filters/code.rb +0 -64
  19. data/lib/nexmo/oas/renderer/filters/code_snippet.rb +0 -194
  20. data/lib/nexmo/oas/renderer/filters/code_snippet_list.rb +0 -33
  21. data/lib/nexmo/oas/renderer/filters/code_snippets.rb +0 -158
  22. data/lib/nexmo/oas/renderer/filters/collapsible.rb +0 -27
  23. data/lib/nexmo/oas/renderer/filters/columns.rb +0 -50
  24. data/lib/nexmo/oas/renderer/filters/concept_list.rb +0 -33
  25. data/lib/nexmo/oas/renderer/filters/dynamic_content.rb +0 -30
  26. data/lib/nexmo/oas/renderer/filters/external_link.rb +0 -32
  27. data/lib/nexmo/oas/renderer/filters/frontmatter.rb +0 -14
  28. data/lib/nexmo/oas/renderer/filters/heading.rb +0 -61
  29. data/lib/nexmo/oas/renderer/filters/icon.rb +0 -22
  30. data/lib/nexmo/oas/renderer/filters/indent.rb +0 -20
  31. data/lib/nexmo/oas/renderer/filters/inline_escape.rb +0 -17
  32. data/lib/nexmo/oas/renderer/filters/js_sequence_diagram.rb +0 -21
  33. data/lib/nexmo/oas/renderer/filters/label.rb +0 -32
  34. data/lib/nexmo/oas/renderer/filters/language.rb +0 -15
  35. data/lib/nexmo/oas/renderer/filters/markdown.rb +0 -85
  36. data/lib/nexmo/oas/renderer/filters/modal.rb +0 -41
  37. data/lib/nexmo/oas/renderer/filters/partial.rb +0 -28
  38. data/lib/nexmo/oas/renderer/filters/php_inliner.rb +0 -15
  39. data/lib/nexmo/oas/renderer/filters/screenshot.rb +0 -26
  40. data/lib/nexmo/oas/renderer/filters/tab.rb +0 -250
  41. data/lib/nexmo/oas/renderer/filters/techio.rb +0 -24
  42. data/lib/nexmo/oas/renderer/filters/tooltip.rb +0 -22
  43. data/lib/nexmo/oas/renderer/filters/tutorial_link.rb +0 -27
  44. data/lib/nexmo/oas/renderer/filters/tutorials.rb +0 -28
  45. data/lib/nexmo/oas/renderer/filters/unfreeze.rb +0 -20
  46. data/lib/nexmo/oas/renderer/filters/user_personalization.rb +0 -43
  47. data/lib/nexmo/oas/renderer/lib/core_ext/string.rb +0 -14
  48. data/lib/nexmo/oas/renderer/lib/redcarpet.rb +0 -14
  49. data/lib/nexmo/oas/renderer/models/code_snippet.rb +0 -75
  50. data/lib/nexmo/oas/renderer/models/tutorial.rb +0 -83
  51. data/lib/nexmo/oas/renderer/pipelines/markdown_pipeline.rb +0 -52
  52. data/lib/nexmo/oas/renderer/services/code_language_api.rb +0 -98
  53. data/lib/nexmo/oas/renderer/views/code_snippets/_application_messages_dispatch.html.erb +0 -9
  54. data/lib/nexmo/oas/renderer/views/code_snippets/_application_rtc.html.erb +0 -41
  55. data/lib/nexmo/oas/renderer/views/code_snippets/_application_voice.html.erb +0 -24
  56. data/lib/nexmo/oas/renderer/views/code_snippets/_code_only.html.erb +0 -6
  57. data/lib/nexmo/oas/renderer/views/code_snippets/_configure_client.html.erb +0 -20
  58. data/lib/nexmo/oas/renderer/views/code_snippets/_dependencies.html.erb +0 -11
  59. data/lib/nexmo/oas/renderer/views/code_snippets/_write_code.html.erb +0 -13
  60. data/lib/nexmo/oas/renderer/views/code_snippets/list/plain.html.erb +0 -10
  61. data/lib/nexmo/oas/renderer/views/tutorials/_index.html.erb +0 -32
  62. data/lib/nexmo/oas/renderer/views/tutorials/index.html.erb +0 -7
  63. data/lib/nexmo/oas/renderer/views/tutorials/list/plain.html.erb +0 -5
  64. data/lib/nexmo/oas/renderer/views/tutorials/show.html.erb +0 -8
@@ -1,24 +0,0 @@
1
- <div class="Vlt-box Vlt-box--lesspadding Nxd-accordion-emphasis">
2
- <h5 class="Vlt-js-accordion__trigger Vlt-accordion__trigger" data-accordion="acc<%= id %>" tabindex="0">
3
- <%= app['use_existing'] ? 'Use your existing application' : 'Create an application' %>
4
- </h5>
5
-
6
- <div id="acc<%=id %>" class="Vlt-js-accordion__content Vlt-accordion__content Vlt-accordion__content--noborder">
7
- <% if app['use_existing'] %>
8
- <p><%= app['use_existing'] %></p>
9
- <% else %>
10
- <p>A Nexmo application contains the required configuration for your project. You can create an application using the <a href="https://github.com/Nexmo/nexmo-cli">Nexmo CLI</a> (see below) or <a href="https://dashboard.nexmo.com/voice/create-application">via the dashboard</a>. To learn more about applications <a href="/concepts/guides/applications">see our Nexmo concepts guide</a>.</p>
11
- <h4>Install the CLI</h4>
12
- <pre class="highlight bash dependencies"><code>npm install -g nexmo-cli</code></pre>
13
-
14
- <h4>Create an application</h4>
15
- <p>Once you have the CLI installed you can use it to create a Nexmo application. Run the following command and make a note of the application ID that it returns. This is the value to use in <code>NEXMO_APPLICATION_ID</code> in the example below. It will also create <code>private.key</code> in the current directory which you will need in the <em>Initialize your dependencies</em> step</p>
16
-
17
- <% unless app['disable_ngrok'] %>
18
- <p>Nexmo needs to connect to your local machine to access your <code>answer_url</code>. We recommend using <a href="https://www.nexmo.com/blog/2017/07/04/local-development-nexmo-ngrok-tunnel-dr/">ngrok</a> to do this. Make sure to change <code>demo.ngrok.io</code> in the examples below to your own ngrok URL.</p>
19
- <% end %>
20
-
21
- <pre class="highlight bash dependencies"><code>nexmo app:create "<%=app['name'] %>" <%=app['answer_url'] %> <%=app['event_url'] %> --keyfile private.key</code></pre>
22
- <% end %>
23
- </div>
24
- </div>
@@ -1,6 +0,0 @@
1
- <div class="copy-wrapper">
2
- <div class="copy-button" data-lang="<%= lang %>" data-block="<%= config['source'] %>" data-section="code">
3
- <%= octicon "clippy", :class => 'top left' %> <span>Copy to Clipboard</span>
4
- </div>
5
- <pre class="highlight <%= lexer.tag %> main-code"><code><%= highlighted_code_source %></code></pre>
6
- </div>
@@ -1,20 +0,0 @@
1
- <div class="Vlt-box Vlt-box--lesspadding Nxd-accordion-emphasis">
2
- <h5 class="Vlt-js-accordion__trigger Vlt-accordion__trigger" data-accordion="acc<%= id %>" tabindex="0">
3
- Initialize your dependencies
4
- </h5>
5
-
6
- <div id="acc<%=id %>" class="Vlt-js-accordion__content Vlt-accordion__content Vlt-accordion__content--noborder">
7
- <%= create_instructions %>
8
- <div class="copy-wrapper">
9
-
10
- <div class="copy-button" data-lang="<%= lang %>" data-block="<%= config['source'] %>" data-section="configure">
11
- <%= octicon "clippy", :class => 'top left' %> <span>Copy to Clipboard</span>
12
- </div>
13
- <pre class="highlight copy-to-clipboard <%= config['title'] %>"><code><%= highlighted_client_source %></code></pre>
14
- </div>
15
-
16
- <p><a data-section="configure" data-lang="<%= lang %>" data-block="<%= config['source'] %>" href="<%= client_url %>">View full source</a></p>
17
-
18
- </div>
19
- </div>
20
-
@@ -1,11 +0,0 @@
1
- <div class="Vlt-box Vlt-box--lesspadding Nxd-accordion-emphasis">
2
- <h5 class="Vlt-js-accordion__trigger Vlt-accordion__trigger" data-accordion="acc<%= id %>" tabindex="0"><%= title %></h5>
3
-
4
- <div id="acc<%= id %>" class="Vlt-js-accordion__content Vlt-accordion__content Vlt-accordion__content--noborder">
5
- <p><%=deps['text']%></p>
6
- <% if deps['code'] %>
7
- <pre class="highlight <%= deps['type'] || 'bash' %> dependencies"><code><%=deps['code']%></code></pre>
8
- <% end %>
9
- </div>
10
- </div>
11
-
@@ -1,13 +0,0 @@
1
- <h2 class="Vlt-title--margin-top3">Write the code</h2>
2
- <%= add_instructions %>
3
-
4
- <div class="copy-wrapper">
5
- <div class="copy-button" data-lang="<%= lang %>" data-block="<%= config['source'] %>" data-section="code">
6
- <%= octicon "clippy", :class => 'top left' %> <span>Copy to Clipboard</span>
7
- </div>
8
- <pre class="highlight <%= lexer.tag %> main-code"><code><%= highlighted_code_source %></code></pre>
9
-
10
- </div>
11
-
12
- <p><a data-section="code" data-lang="<%= lang %>" data-block="<%= config['source'] %>" href="<%= source_url %>">View full source</a></p>
13
-
@@ -1,10 +0,0 @@
1
- <ul class="Vlt-list Vlt-list--simple">
2
- <% @blocks.each do |block| %>
3
- <li><a href="<%= block.url %>">
4
- <% if block.category %>
5
- <%= block.category %> /
6
- <% end %>
7
- <%= block.title %></a>
8
- </li>
9
- <% end %>
10
- </ul>
@@ -1,32 +0,0 @@
1
- <div class="masonry" data-turbolinks="false">
2
- <% @tutorials.each_with_index do |tutorial, index| %>
3
- <div class="item">
4
- <div class="Vlt-card Vlt-card--image Nxd-card--tutorials">
5
- <div class="Vlt-card__image Vlt-card__image--tech Vlt-card__image--blue">
6
- <a href="/<%= tutorial.products.join("") %>/tutorials/<%= @language %>" class="Vlt-badge Vlt-badge--large Nxd-tutorials__product Nxd-tutorials__product--<%= tutorial.subtitle %>"><%= tutorial.subtitle %></a>
7
- </div>
8
-
9
- <a href="<%= tutorial.path %>">
10
- <div class="Vlt-card__content">
11
- <h2>
12
- <span><%= tutorial.title %></span>
13
- </h2>
14
- <p><%= tutorial.description %></p>
15
- </a>
16
-
17
- <% if tutorial.languages.count > 0 %>
18
- <% tutorial.languages.each do |language| %>
19
- <a href="<%= "#{@base_path}/#{language.downcase}" %>"><small class="Vlt-grey-darker Nxd-tutorials__language Nxd-tutorials__language--<%= language %>"><span>●</span> <%= language == "Objective_C" ? "Objective-C" : language %></small></a>
20
- <% end %>
21
- <% end %>
22
-
23
- <div class="Vlt-card__cta">
24
- <a href="<%= tutorial.path %>" class="Vlt-btn Vlt-btn--secondary">
25
- Read more
26
- </a>
27
- </div>
28
- </div>
29
- </div>
30
- </div>
31
- <% end %>
32
- </div>
@@ -1,7 +0,0 @@
1
- <h1>Tutorials</h1>
2
-
3
- <p>Get started with Nexmo with tutorials that will walk you through building a variety of practical applications</p>
4
-
5
- <br>
6
-
7
- <%= render 'index' %>
@@ -1,5 +0,0 @@
1
- <ul class="Vlt-list Vlt-list--simple">
2
- <% @tutorials.each do |tutorial| %>
3
- <li><a href="<%= tutorial.path %>"><%= tutorial.title %></a></li>
4
- <% end %>
5
- </ul>
@@ -1,8 +0,0 @@
1
- <div class="Vlt-grid ">
2
- <div class="Vlt-col Vlt-col--3of4 Nxd-tutorial">
3
- <%= @content.html_safe %>
4
- </div>
5
- <div class="Vlt-col Vlt-col--1of4 Vlt-sidenav Nxd-tutorial-sidenav">
6
- <%= navigation_from_content(content: @content) %>
7
- </div>
8
- </div>