builder_quill_content 1.2.0 → 1.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2526f9efaf6443135a7b094de1946b440873fa78c32090b89bfbfed95318eaf9
4
- data.tar.gz: 7df88bad7d6f0e5199985f028d659ce0ac20ad5cf0f590d299ee19831e296fb5
3
+ metadata.gz: d69e69b06a06aeafa2bc2f53750a5eba9636ab4cfbeeb93ffb11aafebf16cc1d
4
+ data.tar.gz: bf3bea2def8c509934b210386bacdb32ffbcc1b011d019dc9d2270440e7551fe
5
5
  SHA512:
6
- metadata.gz: adc3f8c32b9a324978866582820f5321dec0fbf76339a23fdccec80ff8d2749f98329fae730d653ea6c5084f85a0ec4e2a599fb83a7ca8753072760bf6adc539
7
- data.tar.gz: bbc989cf463c3cd74861f3d536c8d308bb8352872d261ac8921924360768fcdd834ba8637d0f8b44bec1623216c005bf4d0adf8aa7ccfa164ed09bc7800c276a
6
+ metadata.gz: 62dfd4769ac786e5dbfca6290b8bdd0fbb896433c7cffbf2358061c7b29fe3a6f54b7c9d0897e77f77625bd772cd6e5fe28baad7388fe1a78a71c3aa80e754e8
7
+ data.tar.gz: baac23da0c5c0c7ac2a8decea56286785636391d0ba40367fa868675bf65f756f25908626590bdacb745f6048a99f29c0de3c11ce4181091964885798901282c
@@ -1,14 +1,14 @@
1
1
  require_relative 'lib/builder_quill_content/version'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
- spec.name = "builder_quill_content"
4
+ spec.name = 'builder_quill_content'
5
5
  spec.version = BuilderQuillContent::VERSION
6
- spec.authors = ["Michael Tran"]
7
- spec.email = ["mictran205@gmail.com"]
6
+ spec.authors = ['Michael Tran']
7
+ spec.email = ['mictran205@gmail.com']
8
8
 
9
- spec.summary = "Convert quill content to html for wakuwaku"
10
- spec.homepage = "https://github.com/1PACVietnam/wakuwaku-builder_quill_content"
11
- spec.license = "MIT"
9
+ spec.summary = 'Convert quill content to html for wakuwaku'
10
+ spec.homepage = 'https://github.com/1PACVietnam/wakuwaku-builder_quill_content'
11
+ spec.license = 'MIT'
12
12
  # spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
13
 
14
14
  # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
23
23
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
24
  end
25
- spec.bindir = "exe"
25
+ spec.bindir = 'exe'
26
26
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
- spec.require_paths = ["lib"]
27
+ spec.require_paths = ['lib']
28
28
  end
@@ -1,3 +1,3 @@
1
1
  class BuilderQuillContent
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'.freeze
3
3
  end
@@ -58,9 +58,10 @@ class ConvertInline
58
58
  end
59
59
 
60
60
  def image
61
- img_src = @insert['wk-image']['src'] || @attributes['src'] || @insert['wk-image']
62
- img_cap = @insert['wk-image']['caption'].strip.empty? ? '' : @insert['wk-image']['caption']
63
- img_alt = @insert['wk-image']['caption'].strip.empty? ? args[:title] : @insert['wk-image']['caption']
61
+ invalid_cap = @insert['wk-image']['caption'].nil? || @insert['wk-image']['caption'].strip.empty?
62
+ img_src = @insert['wk-image']['src'] || @attributes['src'] || @insert['wk-image']
63
+ img_cap = invalid_cap ? '' : @insert['wk-image']['caption']
64
+ img_alt = invalid_cap ? args[:title] : @insert['wk-image']['caption']
64
65
  return '' if img_src.nil?
65
66
 
66
67
  data = '<figure class="post-content-image-container">'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: builder_quill_content
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Tran
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-13 00:00:00.000000000 Z
11
+ date: 2020-11-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -26,6 +26,7 @@ files:
26
26
  - Rakefile
27
27
  - bin/console
28
28
  - bin/setup
29
+ - builder_quill_content-1.2.0.gem
29
30
  - builder_quill_content.gemspec
30
31
  - lib/builder_quill_content.rb
31
32
  - lib/builder_quill_content/version.rb