station 0.1.1 → 0.1.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: 4e293eda7d511f61d0e9cafe09bf9e4ef8d2c6b9f516442a37e9829eb1f0401d
4
- data.tar.gz: 6dff87f1b659eb69de4b7ce315e18ce4d88e6333a0a77ebfb34c0eaaa85757bf
3
+ metadata.gz: 4aa7f381ed577bb5a771c39affda76306346522c66c3efafe0e19d853f8f76b4
4
+ data.tar.gz: 569d403735d797de5719b8a4db5586dcbc5a619a5779ab2d1f4e0d3c03c57d93
5
5
  SHA512:
6
- metadata.gz: 949cc68e6584bc37f0296de5929ae736c439733a3dad635bb947f8e0e71eb40ff75ef461ddb31a1f0c0d38b0d090a99a01eaab0f04cf5e9214828db7f0fc2a22
7
- data.tar.gz: e9acda57290b15d06dab51e6be44d022643477470a64ba5034eeff476e6eaf7f6e7b00f41f33e816cca9c737202a3c072290e08bf0b47677b6d36967ff26cd9d
6
+ metadata.gz: 9657e7ebbfb24dc19dc888ccceed8cb55f43323a7cd0819ad76131fa1f673aa5f6b8b0704b17548cd1d826b83e63f20a56d6255a204b52c36db1009ab805c73c
7
+ data.tar.gz: d3a733e5c9cb4ab333c5e3fed0e478109f60165c6bdabebb9cd37eba7d4080d0136e90c02a50eda5f41c139559ef6dc5d04daca608b8a62b40ff5b4c42b2287e
@@ -96,7 +96,7 @@ gem 'bootsnap', require: false
96
96
  gem 'diffy', require: false
97
97
 
98
98
  # Provides estimated reading times (for our Blog)
99
- gem 'readingtime'
99
+ gem 'readingtime', '0.4.0'
100
100
 
101
101
  gem 'addressable', '~> 2.8', require: false
102
102
 
@@ -667,7 +667,7 @@ DEPENDENCIES
667
667
  rails (~> 6.1.4)
668
668
  rails-controller-testing
669
669
  rawler!
670
- readingtime
670
+ readingtime (= 0.4.0)
671
671
  recaptcha
672
672
  redis
673
673
  rest-client
@@ -1,7 +1,9 @@
1
1
  module BlogHelper
2
- def readind_time_without_code_tags(content)
2
+ def reading_time_without_code_tags(content)
3
3
  regexp = Regexp.new(%r{<pre class=.*main-code(.*?)</code></pre>}m)
4
4
 
5
5
  "#{content.gsub(regexp, '').reading_time format: :approx} read"
6
+ rescue StandardError
7
+ ''
6
8
  end
7
9
  end
@@ -7,10 +7,13 @@
7
7
  <div style="display:flex;justify-content: space-between;">
8
8
  <div style="width:20%"></div>
9
9
  <div style="width:58%">
10
+
10
11
  <!-- Reading time -->
12
+ <% reading = reading_time_without_code_tags(@blogpost.content) %>
13
+ <% if reading.present? %>
11
14
  <div style="display:flex;justify-content: flex-end;">
12
15
  <p style="text-opacity: 1; color: rgba(107,114,128,.8); text-align: right;">
13
- <%= readind_time_without_code_tags(@blogpost.content)%>&nbsp;
16
+ <%= reading %>&nbsp;
14
17
  </p>
15
18
  <p>
16
19
  <svg class="Vlt-icon Vlt-icon--smaller Vlt-grey-darker" style="opacity: .6;">
@@ -18,6 +21,8 @@
18
21
  </svg>
19
22
  </p>
20
23
  </div>
24
+ <% end %> <!-- Reading time -->
25
+
21
26
  </div>
22
27
  <div style="width:20%"></div>
23
28
  </div>
@@ -1 +1 @@
1
- {"files":{"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js":{"logical_path":"manifest.js","mtime":"2022-02-25T12:33:35+00:00","size":2,"digest":"75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070","integrity":"sha256-daEdpEyAJIa8b2VkCqSKcw8PaExcB6Qro80XNes/sHA="},"application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js":{"logical_path":"application.js","mtime":"2022-02-25T12:33:35+00:00","size":3172,"digest":"67f1fd16f949c2794341a44cf839e5436bbef74436e043ead39890d1c3b2e583","integrity":"sha256-Z/H9FvlJwnlDQaRM+DnlQ2u+90Q24EPq05iQ0cOy5YM="},"application-d9ea3be5cba4feaa1cbe4f50a2d73a7cd19cbc1658778180d3cd3890a0dd6ed0.css":{"logical_path":"application.css","mtime":"2022-02-25T12:33:35+00:00","size":15382,"digest":"c998cd580f4117849dbb45c94dc191e3204847585806d7ecc4e514c0b0b934ec","integrity":"sha256-yZjNWA9BF4Sdu0XJTcGR4yBIR1hYBtfsxOUUwLC5NOw="}},"assets":{"manifest.js":"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js","application.js":"application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js","application.css":"application-d9ea3be5cba4feaa1cbe4f50a2d73a7cd19cbc1658778180d3cd3890a0dd6ed0.css"}}
1
+ {"files":{"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js":{"logical_path":"manifest.js","mtime":"2022-02-25T16:40:32+00:00","size":2,"digest":"75a11da44c802486bc6f65640aa48a730f0f684c5c07a42ba3cd1735eb3fb070","integrity":"sha256-daEdpEyAJIa8b2VkCqSKcw8PaExcB6Qro80XNes/sHA="},"application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js":{"logical_path":"application.js","mtime":"2022-02-25T16:40:32+00:00","size":3172,"digest":"67f1fd16f949c2794341a44cf839e5436bbef74436e043ead39890d1c3b2e583","integrity":"sha256-Z/H9FvlJwnlDQaRM+DnlQ2u+90Q24EPq05iQ0cOy5YM="},"application-d9ea3be5cba4feaa1cbe4f50a2d73a7cd19cbc1658778180d3cd3890a0dd6ed0.css":{"logical_path":"application.css","mtime":"2022-02-25T16:40:32+00:00","size":15382,"digest":"c998cd580f4117849dbb45c94dc191e3204847585806d7ecc4e514c0b0b934ec","integrity":"sha256-yZjNWA9BF4Sdu0XJTcGR4yBIR1hYBtfsxOUUwLC5NOw="}},"assets":{"manifest.js":"manifest-b4bf6e57a53c2bdb55b8998cc94cd00883793c1c37c5e5aea3ef6749b4f6d92b.js","application.js":"application-aa88b3c7bd34ec529f43849541752fda7c9c202aa9fff905be578ef88d103b46.js","application.css":"application-d9ea3be5cba4feaa1cbe4f50a2d73a7cd19cbc1658778180d3cd3890a0dd6ed0.css"}}
@@ -1,3 +1,3 @@
1
1
  module NexmoDeveloper
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
data/station.gemspec CHANGED
@@ -83,7 +83,7 @@ Gem::Specification.new do |spec|
83
83
  spec.add_runtime_dependency('sassc-rails', '2.1.2')
84
84
  spec.add_runtime_dependency('gmaps4rails', '2.1.2')
85
85
  spec.add_runtime_dependency('chartkick', '4.0.5')
86
- spec.add_runtime_dependency('readingtime', '0.3.1')
86
+ spec.add_runtime_dependency('readingtime', '0.4.0')
87
87
 
88
88
  spec.add_development_dependency('rubocop', '~> 1.16.0')
89
89
  spec.add_development_dependency('rubocop-rails', '~> 2.6')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: station
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vonage DevRel
@@ -680,14 +680,14 @@ dependencies:
680
680
  requirements:
681
681
  - - '='
682
682
  - !ruby/object:Gem::Version
683
- version: 0.3.1
683
+ version: 0.4.0
684
684
  type: :runtime
685
685
  prerelease: false
686
686
  version_requirements: !ruby/object:Gem::Requirement
687
687
  requirements:
688
688
  - - '='
689
689
  - !ruby/object:Gem::Version
690
- version: 0.3.1
690
+ version: 0.4.0
691
691
  - !ruby/object:Gem::Dependency
692
692
  name: rubocop
693
693
  requirement: !ruby/object:Gem::Requirement
@@ -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-876d7c92563eb6cfe4325523914a161b.json"
734
+ - "./lib/nexmo_developer/public/assets/.sprockets-manifest-6736a86273a9c799729e4bf383721217.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-d9ea3be5cba4feaa1cbe4f50a2d73a7cd19cbc1658778180d3cd3890a0dd6ed0.css"