jekyll-cloudinary 1.2.5 → 1.2.6

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
  SHA1:
3
- metadata.gz: c60fd293b73146ba500b9fbcfac1ffbdad96964a
4
- data.tar.gz: 217750bdf721a23b49efdaabba2daca7b3c43ee0
3
+ metadata.gz: a3308a42b1dad8497bd451c773ea01b223f00b41
4
+ data.tar.gz: cc962117a3eae7d9f0fc0c8f9237f874043201ba
5
5
  SHA512:
6
- metadata.gz: 84cd8523887fc4f88d46e296b2461c4c3f8ccd40b36be851248b642a73a96376db7f3638a1bd02d8b440cacb8112622644debae5bdc6582ace9f3d86d018cc2d
7
- data.tar.gz: 3173e5efe5dc0b4c768fbe3a96e83c3a2d775b3eee49fd4524fb2e491029510ccac467c8f46055da6ef133c62084b737fe5870eaf1961cf1f5d95f17b25addfd
6
+ metadata.gz: beb1f8eee495ca26a301307c948dd4820bef808263f54ad61ef3a1a059b036254db2a77e519d1c54cb100c6f7bf2cd7c725ed330deb10404f4bc44b94ea0fa98
7
+ data.tar.gz: 8bf9848b57654765c8f8587cb3a13800827da9baaa45f79077e8947e85679928f2b683d406c4d947aa269c9ec49bca34c8b2fdce744050c30082d8439652dab4
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Cloudinary
3
- VERSION = "1.2.5"
3
+ VERSION = "1.2.6"
4
4
  end
5
5
  end
@@ -42,7 +42,9 @@ module Jekyll
42
42
 
43
43
  # Extract tag segments
44
44
  markup = /^(?:(?<preset>[^\s.:\/]+)\s+)?(?<image_src>[^\s]+\.[a-zA-Z0-9]{3,4})\s*(?<html_attr>[\s\S]+)?$/.match(rendered_markup)
45
- raise "Cloudinary can't read this tag: #{@markup}. Try {% cloudinary [preset] path/to/img.jpg [attr=\"value\"] %}." unless markup
45
+ if !markup
46
+ Jekyll.logger.abort_with('Cloudinary', "Cloudinary can't read this tag: #{@markup}. Try {% cloudinary [preset] path/to/img.jpg [attr=\"value\"] %}.")
47
+ end
46
48
 
47
49
  image_src = markup[:image_src]
48
50
 
@@ -63,7 +65,7 @@ module Jekyll
63
65
  else
64
66
  natural_width = 100000
65
67
  if settings['verbose']
66
- puts "\n[Cloudinary] Couldn't find this image to check its width: #{image_path}"
68
+ Jekyll.logger.warn('Cloudinary', "[Cloudinary] Couldn't find this image to check its width: #{image_path}")
67
69
  end
68
70
  end
69
71
 
@@ -72,7 +74,7 @@ module Jekyll
72
74
  preset = preset.merge(settings['presets'][markup[:preset]])
73
75
  else
74
76
  if settings['verbose']
75
- puts "\n[Cloudinary] '#{markup[:preset]}' preset for the Cloudinary plugin doesn't exist in _config.yml, using the default one"
77
+ Jekyll.logger.warn('Cloudinary', "[Cloudinary] '#{markup[:preset]}' preset for the Cloudinary plugin doesn't exist in _config.yml, using the default one")
76
78
  end
77
79
  end
78
80
  end
@@ -127,7 +129,7 @@ module Jekyll
127
129
 
128
130
  if natural_width < min_width
129
131
  if settings['verbose']
130
- puts "[Cloudinary] Natural width of source image '#{File.basename(image_src)}' (#{natural_width}px) in #{context['page'].path} not enough for creating any srcset version"
132
+ Jekyll.logger.warn('Cloudinary', "[Cloudinary] Natural width of source image '#{File.basename(image_src)}' (#{natural_width}px) in #{context['page'].path} not enough for creating any srcset version")
131
133
  end
132
134
  srcset << "https://res.cloudinary.com/#{settings['cloud_name']}/image/fetch/q_auto,f_auto/#{image_url} #{natural_width}w"
133
135
  else
@@ -137,7 +139,7 @@ module Jekyll
137
139
  srcset << "https://res.cloudinary.com/#{settings['cloud_name']}/image/fetch/c_scale,w_#{width},q_auto,f_auto/#{image_url} #{width}w"
138
140
  else
139
141
  if settings['verbose']
140
- puts "[Cloudinary] Natural width of source image '#{File.basename(image_src)}' (#{natural_width}px) in #{context['page'].path} not enough for creating #{width}px version"
142
+ Jekyll.logger.warn('Cloudinary', "[Cloudinary] Natural width of source image '#{File.basename(image_src)}' (#{natural_width}px) in #{context['page'].path} not enough for creating #{width}px version")
141
143
  end
142
144
  end
143
145
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-cloudinary
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Hoizey