station 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nexmo_developer/app/controllers/blog/authors_controller.rb +1 -1
- data/lib/nexmo_developer/app/controllers/blog/blogpost_controller.rb +7 -4
- data/lib/nexmo_developer/app/controllers/blog/categories_controller.rb +1 -1
- data/lib/nexmo_developer/app/services/blogpost_parser.rb +5 -1
- data/lib/nexmo_developer/public/assets/{.sprockets-manifest-5d3f7a9ff18fd3ee1e8a4029a376a371.json → .sprockets-manifest-49bd2246ba6a0f2c7f7789cc53eff3b5.json} +1 -1
- data/lib/nexmo_developer/public/assets/application-087234db38816cd2bb2011c7f65f124e8dd2fbe5249064e4050cc32d06e396e0.css.gz +0 -0
- data/lib/nexmo_developer/public/assets/application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js.gz +0 -0
- data/lib/nexmo_developer/public/assets/manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js.gz +0 -0
- data/lib/nexmo_developer/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e935ef6d7f3978dfe86c75fa656e430e48a58c7b0a09e4038bc196783e22c2d5
|
4
|
+
data.tar.gz: 7aac126490bb8ca421dc5f61798f366b6c52072c6311a7883f6bb90d8a3ae981
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6632ae0d3c78f6ad8bd316b0724bee3383ae86f98b5e759a06ec624982b1bb2625944b3cd833e00d740b380ad843cd7f957485a9908ca53040c8cf7aa954830f
|
7
|
+
data.tar.gz: a46c55a0a091804d82ebd19454321935629b139033deb57540519aad485580e8a649fec962f3c87540a00747ecf559add1ee721b915ece757337cb22ccdd713a
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class Blog::AuthorsController < Blog::MainController
|
2
2
|
def show
|
3
|
-
data = BlogpostParser.
|
3
|
+
data = BlogpostParser.fetch_all_published
|
4
4
|
attributes = AuthorParser.fetch_author(params[:name]) || {}
|
5
5
|
|
6
6
|
@author = Blog::Author.new(attributes).build_all_blogposts_from_author(data)
|
@@ -5,8 +5,7 @@ class Blog::BlogpostController < Blog::MainController
|
|
5
5
|
|
6
6
|
def index
|
7
7
|
# Fetch data as Json
|
8
|
-
data = BlogpostParser.
|
9
|
-
.select { |b| b['published'] && !b['outdated'] }
|
8
|
+
data = BlogpostParser.fetch_all_published
|
10
9
|
|
11
10
|
categories = CategoryParser.fetch_all_categories
|
12
11
|
|
@@ -21,9 +20,13 @@ class Blog::BlogpostController < Blog::MainController
|
|
21
20
|
end
|
22
21
|
|
23
22
|
def show
|
24
|
-
data = BlogpostParser.fetch_all
|
25
23
|
@blogpost = Blog::Blogpost.build_blogpost_from_path(params[:blog_path], 'en')
|
26
|
-
|
24
|
+
|
25
|
+
redirect_to blog_path unless @blogpost.published
|
26
|
+
|
27
|
+
data = BlogpostParser.fetch_all_published
|
28
|
+
|
29
|
+
@related_blogposts = data.select { |b| b['category']['slug'] == @blogpost.category.slug && b['title'] != @blogpost.title }
|
27
30
|
.first(RELATED_FOR_PREVIEW)
|
28
31
|
.sort_by { |b| b['updated_at'] }.reverse
|
29
32
|
.map { |attributes| Blog::Blogpost.new attributes }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class Blog::CategoriesController < Blog::MainController
|
2
2
|
def show
|
3
|
-
data = BlogpostParser.
|
3
|
+
data = BlogpostParser.fetch_all_published
|
4
4
|
attributes = CategoryParser.fetch_category(params[:slug])
|
5
5
|
|
6
6
|
@category_with_all_blogposts = Blog::Category.new(attributes).build_n_blogposts_by_category(data)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'json'
|
2
2
|
|
3
3
|
class BlogpostParser
|
4
|
-
PATH_TO_INDEX = "#{
|
4
|
+
PATH_TO_INDEX = "#{ENV['BLOG_PATH']}/blogposts/blogposts_info.json".freeze
|
5
5
|
|
6
6
|
def self.fetch_all
|
7
7
|
# Add Rescue from error
|
@@ -10,6 +10,10 @@ class BlogpostParser
|
|
10
10
|
JSON.parse(file)
|
11
11
|
end
|
12
12
|
|
13
|
+
def self.fetch_all_published
|
14
|
+
fetch_all.select { |b| b['published'] && !b['outdated'] }
|
15
|
+
end
|
16
|
+
|
13
17
|
def self.build
|
14
18
|
all_blogposts = []
|
15
19
|
|
@@ -1 +1 @@
|
|
1
|
-
{"files":{"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js":{"logical_path":"manifest.js","mtime":"2022-08-
|
1
|
+
{"files":{"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js":{"logical_path":"manifest.js","mtime":"2022-08-11T09:08:56+00:00","size":2,"digest":"75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070","integrity":"sha256-daEdpEyAJIa8b2VkCqSKcw8PaExcB6Qro80XNes/sHA="},"application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js":{"logical_path":"application.js","mtime":"2022-08-11T09:08:56+00:00","size":3172,"digest":"67f1fd16f949c2794341a44cf839e5436bbef74436e043ead39890d1c3b2e583","integrity":"sha256-Z/H9FvlJwnlDQaRM+DnlQ2u+90Q24EPq05iQ0cOy5YM="},"application-087234db38816cd2bb2011c7f65f124e8dd2fbe5249064e4050cc32d06e396e0.css":{"logical_path":"application.css","mtime":"2022-08-11T09:08:56+00:00","size":17676,"digest":"b239d3b45545221415ff288efd8398a101263eba4fac7f869a12578f39be602f","integrity":"sha256-sjnTtFVFIhQV/yiO/YOYoQEmPrpPrH+GmhJXjzm+YC8="}},"assets":{"manifest.js":"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js","application.js":"application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js","application.css":"application-087234db38816cd2bb2011c7f65f124e8dd2fbe5249064e4050cc32d06e396e0.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.5.
|
4
|
+
version: 0.5.3
|
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-08-
|
11
|
+
date: 2022-08-11 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-49bd2246ba6a0f2c7f7789cc53eff3b5.json"
|
735
735
|
- "./lib/nexmo_developer/public/assets/application-087234db38816cd2bb2011c7f65f124e8dd2fbe5249064e4050cc32d06e396e0.css"
|
736
736
|
- "./lib/nexmo_developer/public/assets/application-087234db38816cd2bb2011c7f65f124e8dd2fbe5249064e4050cc32d06e396e0.css.gz"
|
737
737
|
- "./lib/nexmo_developer/public/assets/application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js"
|