station 0.1.6 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/nexmo_developer/app/controllers/changelogs_controller.rb +33 -0
- data/lib/nexmo_developer/app/helpers/changelogs_helper.rb +13 -0
- data/lib/nexmo_developer/app/models/blog/blogpost.rb +8 -2
- data/lib/nexmo_developer/app/views/blog/blogpost/index.html.erb +3 -1
- data/lib/nexmo_developer/app/views/changelogs/index.html.erb +33 -0
- data/lib/nexmo_developer/app/views/changelogs/show.html.erb +1 -0
- data/lib/nexmo_developer/app/views/layouts/partials/_header.html.erb +9 -5
- data/lib/nexmo_developer/app/views/static/default_landing/partials/_contact_community.html.erb +1 -1
- data/lib/nexmo_developer/config/routes.rb +3 -0
- data/lib/nexmo_developer/public/assets/{.sprockets-manifest-34443b12ffa582bac7386426c54b9386.json → .sprockets-manifest-cff214b66591bfa22956a065f82dde71.json} +1 -1
- data/lib/nexmo_developer/public/assets/application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js.gz +0 -0
- data/lib/nexmo_developer/public/assets/application-e3c324ace3db5c0bf10139460f7f1efb017f04bbeb729bd8d34b308de0852c20.css.gz +0 -0
- data/lib/nexmo_developer/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js.gz +0 -0
- data/lib/nexmo_developer/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b1de1eb12c8a2d0c7bbe1b958ada3d21d7241c0485e2bca6bb3ae7084341553
|
4
|
+
data.tar.gz: a49fd7cf17a9bd6fdf3d3b1824e6566c1d245f69944da8414b35261c985d36d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e28267ce08cf0c42ec34386441524b123e1d19c0c9bf545758f45faf0e2c3d101ae74a3a38d85b3265af292bbed7275cf76a67e960ab4bc0e816154710a38da0
|
7
|
+
data.tar.gz: eaa5c8c814c1d7be88e548d53512e4cfeee18c7a158f68509f0242899efb519b69cd1351bda5d86cf9f380df403cc32abf1144803f925ffc595b42ab121bc045
|
@@ -0,0 +1,33 @@
|
|
1
|
+
class ChangelogsController < ApplicationController
|
2
|
+
def index
|
3
|
+
return if ENV['CHANGELOGS_PATH'].blank?
|
4
|
+
|
5
|
+
@titles = Dir.glob("#{ENV['CHANGELOGS_PATH']}/**")
|
6
|
+
.select { |e| File.directory? e }
|
7
|
+
.map do |folder_path|
|
8
|
+
{
|
9
|
+
title: File.basename(folder_path),
|
10
|
+
files: Dir.glob("#{folder_path}/*.md").map do |md_file|
|
11
|
+
{
|
12
|
+
file_title: File.basename(md_file, '.md'),
|
13
|
+
frontmatter: File.read(md_file).match(/\A(---.+?---)/mo) ? YAML.safe_load(File.read(md_file)) : {},
|
14
|
+
}
|
15
|
+
end,
|
16
|
+
}
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def show
|
21
|
+
page_title = params[:name]
|
22
|
+
folder_name = params[:folder]
|
23
|
+
|
24
|
+
if File.exist?("#{ENV['CHANGELOGS_PATH']}/#{folder_name}/#{page_title}.md")
|
25
|
+
page = Dir.glob("#{ENV['CHANGELOGS_PATH']}/#{folder_name}/#{page_title}.md").first
|
26
|
+
document = File.read(page).gsub(/\A(---.+?---)/mo, '')
|
27
|
+
else
|
28
|
+
document = "<h3>Sorry, this file doesn't exist!</h3><code><strong>/_changelogs/#{folder_name}/#{page_title}.md</strong></code>"
|
29
|
+
end
|
30
|
+
|
31
|
+
@content = Nexmo::Markdown::Renderer.new({}).call(document)
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module ChangelogsHelper
|
2
|
+
def build_volta_icon(element)
|
3
|
+
return '' unless element
|
4
|
+
|
5
|
+
if element.scan(/vonage-(\w+)-sdk/).present?
|
6
|
+
element.scan(/vonage-(\w+)-sdk/).flatten.first.downcase
|
7
|
+
elsif element.scan(/(\w+) SDK/).present?
|
8
|
+
element.scan(/(\w+) SDK/).flatten.first.downcase
|
9
|
+
elsif element.scan(/(\w+)-cli/).present?
|
10
|
+
element.scan(/(\w+)-cli/).flatten.first.downcase
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -36,10 +36,17 @@ class Blog::Blogpost
|
|
36
36
|
|
37
37
|
default_not_found_page(path) unless File.exist?(path)
|
38
38
|
|
39
|
-
|
39
|
+
# gsub Netlify - img urls to S3 Bucket
|
40
|
+
document = File.read(path).gsub('/content/blog/') do |match|
|
40
41
|
"#{Blog::Blogpost::CLOUDFRONT_BLOG_URL}blogposts/#{match.gsub('/content/blog/', '')}"
|
41
42
|
end
|
42
43
|
|
44
|
+
# gsub Netlify - embedded YOUTUBE Video
|
45
|
+
document = document.gsub(%r{<youtube id="(\w+)"></youtube>}) do |match|
|
46
|
+
youtube_id = match[/(?<=").*(?=")/]
|
47
|
+
"<center class='video'><br><iframe width='448' height='252' src='https://www.youtube-nocookie.com/embed/#{youtube_id}' frameborder='0' allow='accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture' allowfullscreen></iframe><br><br></center>"
|
48
|
+
end
|
49
|
+
|
43
50
|
blogpost = new(BlogpostParser.build_show_with_locale(path, locale))
|
44
51
|
blogpost.content = Nexmo::Markdown::Renderer.new({}).call(document)
|
45
52
|
|
@@ -57,7 +64,6 @@ class Blog::Blogpost
|
|
57
64
|
end
|
58
65
|
|
59
66
|
url = Addressable::URI.parse(@thumbnail)
|
60
|
-
|
61
67
|
Net::HTTP.start(url.host, url.port, use_ssl: true) do |http|
|
62
68
|
if http.head(url.request_uri)['Content-Type'].start_with? 'image'
|
63
69
|
@thumbnail
|
@@ -24,7 +24,9 @@
|
|
24
24
|
<% @categories_with_blogposts.each do |category| %>
|
25
25
|
|
26
26
|
<div class="header-separator hr--tall Vlt-text-separator Vlt-text-separator--big">
|
27
|
-
<
|
27
|
+
<a href="<%= blog_category_path(category.slug)%>">
|
28
|
+
<span>< <%= category.plural.upcase %> /></span>
|
29
|
+
</a>
|
28
30
|
</div>
|
29
31
|
|
30
32
|
<div class="my-3col-grid">
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<h1>Changelogs</h1>
|
2
|
+
|
3
|
+
<% @titles.each do |title| %>
|
4
|
+
<div class="header-separator hr--tall Vlt-text-separator Vlt-text-separator--big">
|
5
|
+
<span>< <%= title[:title].upcase %> /></span>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<div class="my-3col-grid">
|
9
|
+
<% title[:files].each do |file| %>
|
10
|
+
<%= link_to changelog_path(folder: title[:title], name: file[:file_title]), class: 'Vlt-card Vlt-card--clickable' do%>
|
11
|
+
|
12
|
+
<div class="Vlt-card__header">
|
13
|
+
|
14
|
+
<svg class="Vlt-icon Vlt-grey">
|
15
|
+
<use xlink:href="/symbol/volta-brand-icons.svg#Brand-icon-<%= build_volta_icon(file[:file_title]) %>-color" />
|
16
|
+
</svg>
|
17
|
+
|
18
|
+
<h3><%= file[:file_title] %></h3>
|
19
|
+
|
20
|
+
<% if ["version", "release"].all? {|k| file[:frontmatter].key?(k)} %>
|
21
|
+
<p style="position: relative; top: 20px;">
|
22
|
+
<code><%= "v#{file[:frontmatter]["version"]}" %></code> released on <%= "#{file[:frontmatter]["release"]}" %>
|
23
|
+
</p>
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<% end %>
|
29
|
+
<% end %>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
|
33
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<div class="raw_blopost_content"><%= raw @content %></div>
|
@@ -32,11 +32,8 @@
|
|
32
32
|
<b><%= t(".#{header.sign_in_text}") %></b>
|
33
33
|
</a>
|
34
34
|
|
35
|
-
<a href=<%= header.sign_up_path %> target="_blank" rel="noopener" class="Vlt-btn--white Vlt-btn--app Vlt-btn--outline Vlt-btn--small" id="signup" data-ab="try_button_v2"
|
36
|
-
|
37
|
-
<%= s %>
|
38
|
-
<% end %>
|
39
|
-
</b>
|
35
|
+
<a href=<%= header.sign_up_path %> target="_blank" rel="noopener" class="Vlt-btn--white Vlt-btn--app Vlt-btn--outline Vlt-btn--small" id="signup" data-ab="try_button_v2">
|
36
|
+
<b>< Sign-up for free /></b>
|
40
37
|
</a>
|
41
38
|
</nav>
|
42
39
|
</header>
|
@@ -70,6 +67,9 @@
|
|
70
67
|
<div class="Vlt-topmenu__item">
|
71
68
|
<a href="/extend"><p><b class="Vlt-white">Integrations</b></p></a>
|
72
69
|
</div>
|
70
|
+
<div class="Vlt-topmenu__item">
|
71
|
+
<a href="/changelogs"><p><b class="Vlt-white">Changelogs</b></p></a>
|
72
|
+
</div>
|
73
73
|
</div>
|
74
74
|
</div>
|
75
75
|
</li>
|
@@ -99,6 +99,10 @@
|
|
99
99
|
</div>
|
100
100
|
</div>
|
101
101
|
</li>
|
102
|
+
|
103
|
+
<li class="Vlt-tabs__link">
|
104
|
+
<a href="/blog"><p><b class="Vlt-white">Blog</b></p></a>
|
105
|
+
</li>
|
102
106
|
</ul>
|
103
107
|
|
104
108
|
<svg class="Vlt-icon Vlt-icon--large Vlt-grey Vlt-S-only Adp-header__hamburger">
|
data/lib/nexmo_developer/app/views/static/default_landing/partials/_contact_community.html.erb
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
<br><br>
|
11
11
|
|
12
|
-
Your data will be treated in accordance with our <a href="https://www.
|
12
|
+
Your data will be treated in accordance with our <a href="https://www.vonage.com/privacy-policy">Privacy Policy</a>, which sets out
|
13
13
|
the rights you have in respect of your data.
|
14
14
|
</p>
|
15
15
|
</div>
|
@@ -108,6 +108,9 @@ Rails.application.routes.draw do
|
|
108
108
|
get '/tags/:slug', to: 'tags#show', as: 'tag'
|
109
109
|
end
|
110
110
|
|
111
|
+
get '/changelogs', to: 'changelogs#index'
|
112
|
+
get '/changelogs/:folder/:name', to: 'changelogs#show', as: 'changelog'
|
113
|
+
|
111
114
|
get '*unmatched_route', to: 'application#not_found'
|
112
115
|
|
113
116
|
root 'static#landing'
|
@@ -1 +1 @@
|
|
1
|
-
{"files":{"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js":{"logical_path":"manifest.js","mtime":"2022-
|
1
|
+
{"files":{"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js":{"logical_path":"manifest.js","mtime":"2022-04-06T14:31:50+00:00","size":2,"digest":"75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070","integrity":"sha256-daEdpEyAJIa8b2VkCqSKcw8PaExcB6Qro80XNes/sHA="},"application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js":{"logical_path":"application.js","mtime":"2022-04-06T14:31:50+00:00","size":3172,"digest":"67f1fd16f949c2794341a44cf839e5436bbef74436e043ead39890d1c3b2e583","integrity":"sha256-Z/H9FvlJwnlDQaRM+DnlQ2u+90Q24EPq05iQ0cOy5YM="},"application-e3c324ace3db5c0bf10139460f7f1efb017f04bbeb729bd8d34b308de0852c20.css":{"logical_path":"application.css","mtime":"2022-04-06T14:31:50+00:00","size":16653,"digest":"7bba29977bdaa394d9d33788c5c59026cebf41f7290009d61391a0a645e2272b","integrity":"sha256-e7opl3vao5TZ0zeIxcWQJs6/QfcpAAnWE5GgpkXiJys="}},"assets":{"manifest.js":"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js","application.js":"application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js","application.css":"application-e3c324ace3db5c0bf10139460f7f1efb017f04bbeb729bd8d34b308de0852c20.css"}}
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: station
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vonage DevRel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeadmin
|
@@ -731,7 +731,7 @@ files:
|
|
731
731
|
- "./lib/nexmo_developer/public/android-chrome-512x512.png"
|
732
732
|
- "./lib/nexmo_developer/public/apple-touch-icon-precomposed.png"
|
733
733
|
- "./lib/nexmo_developer/public/apple-touch-icon.png"
|
734
|
-
- "./lib/nexmo_developer/public/assets/.sprockets-manifest-
|
734
|
+
- "./lib/nexmo_developer/public/assets/.sprockets-manifest-cff214b66591bfa22956a065f82dde71.json"
|
735
735
|
- "./lib/nexmo_developer/public/assets/application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js"
|
736
736
|
- "./lib/nexmo_developer/public/assets/application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js.gz"
|
737
737
|
- "./lib/nexmo_developer/public/assets/application-e3c324ace3db5c0bf10139460f7f1efb017f04bbeb729bd8d34b308de0852c20.css"
|
@@ -1160,6 +1160,7 @@ files:
|
|
1160
1160
|
- lib/nexmo_developer/app/controllers/blog/main_controller.rb
|
1161
1161
|
- lib/nexmo_developer/app/controllers/blog/tags_controller.rb
|
1162
1162
|
- lib/nexmo_developer/app/controllers/careers_controller.rb
|
1163
|
+
- lib/nexmo_developer/app/controllers/changelogs_controller.rb
|
1163
1164
|
- lib/nexmo_developer/app/controllers/concerns/.keep
|
1164
1165
|
- lib/nexmo_developer/app/controllers/dashboard_controller.rb
|
1165
1166
|
- lib/nexmo_developer/app/controllers/extend_controller.rb
|
@@ -1178,6 +1179,7 @@ files:
|
|
1178
1179
|
- lib/nexmo_developer/app/extensions/nokogiri/html/document.rb
|
1179
1180
|
- lib/nexmo_developer/app/helpers/application_helper.rb
|
1180
1181
|
- lib/nexmo_developer/app/helpers/blog_helper.rb
|
1182
|
+
- lib/nexmo_developer/app/helpers/changelogs_helper.rb
|
1181
1183
|
- lib/nexmo_developer/app/helpers/date_range_helper.rb
|
1182
1184
|
- lib/nexmo_developer/app/helpers/navigation_helper.rb
|
1183
1185
|
- lib/nexmo_developer/app/helpers/parameter_values_helper.rb
|
@@ -1282,6 +1284,8 @@ files:
|
|
1282
1284
|
- lib/nexmo_developer/app/views/blog/categories/show.html.erb
|
1283
1285
|
- lib/nexmo_developer/app/views/blog/tags/show.html.erb
|
1284
1286
|
- lib/nexmo_developer/app/views/careers/index.html.erb
|
1287
|
+
- lib/nexmo_developer/app/views/changelogs/index.html.erb
|
1288
|
+
- lib/nexmo_developer/app/views/changelogs/show.html.erb
|
1285
1289
|
- lib/nexmo_developer/app/views/code_languages/_icon.html.erb
|
1286
1290
|
- lib/nexmo_developer/app/views/contribute/administration/page-links.md
|
1287
1291
|
- lib/nexmo_developer/app/views/contribute/code-snippets/how-to-update-code-snippets.md
|