jekyll-images 0.4.6 → 0.4.7

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: f11044a4db72b9c74f936c6fc0ba0f42e06bc397f0ad29c7d2a9c2b824036672
4
- data.tar.gz: 0aed82cf05838262eaf1a44e081530121f9b84b4fd1cd5bf3f70a354e8570799
3
+ metadata.gz: 2952761bff8f6b73605856b37cec55d29815dffa4e27d23f9ac8d5a76e0f0e8b
4
+ data.tar.gz: 11cb41efcde66b9f99d02b34b481022b31c3a3a0a3331b1a40611534d687c4b0
5
5
  SHA512:
6
- metadata.gz: da04dff846d5ae316dfcc4cc9d0bdb8e8622810095ca26f623ce238b05ec4f1ae53878e99b788866311cd3239bb79238b42b9d8ce42270163dd1998fad85da31
7
- data.tar.gz: 2aaf220e457d3f9da9dc033ab915e402e693e858b511e2bbceeb1ac8200a6f5abfe8019bfa121fcc0d56f974abb37fec76881d01b9402a961156ec3a3bd8b1d7
6
+ metadata.gz: 39dc59ad60dd74d50ca32285e9745f06472080398e34b162902192fbf3cde37daa69d16d468ca1920b758259ec16c41a785fd75444e4331b7d15b625b1dc833b
7
+ data.tar.gz: b0a812f12d2d3c47d5a44579899ff7e4bf82ad5a9755e3c109619ef29b4eb327ad7725fbbcafec114739d766bdd4dd1ddd10e348984d747bc0161841e05428e5
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- ]�.K^U ����ph|��ٻd+# �g|p;�/_%�&��Np�@�(E��Zu���*eC�q�ǁ��uaq?��e¥��/xjD���U�� (x��e�|�f ��KF����A����֩9j`����\Q=
2
- Y�a�a��]���B�üE z� �8�O)�&�2��#gE$�Jү�| KCEv״�b9��l�L��u�2�j�Q�k�@��k��z&�-D$]J���K$e����y��Ix���o�S^��ٿ}K)|}��X ��<� �Ӭ`%y R|��Q��tU���,(4�ǡ�7"%zxG���2�(�;�LHh�{�UE�-&Iܯ��*֦�4��b�r�97
1
+ M�yj��afIP��e��,:��T��=��!���&dVn['JHL䣤-<I!L���+#ǕZ؍6R~tr���F���pՂ)LJl���pC�U�L\�~��S�Y�@$�R�0hU��Z��
2
+ /� '��*N0/��Ͷ��ڶh4��@�~%%�I�>D׎q��dmE��Q��ҁ�\ �ޙ���s��b̊
3
+ ���"[Ǫ�w����k����-�VG(�B�}��'�Y��vc�N�<��^���R�I�
@@ -21,7 +21,14 @@ module Jekyll
21
21
  path = jekyll_site.in_source_dir(input)
22
22
 
23
23
  unless ::File.exist?(path)
24
- Jekyll.logger.warn "File doesn't exist #{input}"
24
+ Jekyll.logger.warn 'Dzsave:', "#{input} doesn't exist"
25
+ return input
26
+ end
27
+
28
+ image = Vips::Image.new_from_file(path, access: :sequential)
29
+
30
+ if [image.width, image.height].min < tile_size
31
+ Jekyll.logger.warn 'Dzsave:', "#{input} is smaller than tile size"
25
32
  return input
26
33
  end
27
34
 
@@ -32,7 +39,6 @@ module Jekyll
32
39
  previous_tiles = Dir.glob(::File.join(dir, '*', '**', '*.jpg'))
33
40
  end
34
41
 
35
- image = Vips::Image.new_from_file(path, access: :sequential)
36
42
  image.dzsave(dir, layout: layout, tile_size: tile_size)
37
43
 
38
44
  Dir.chdir(jekyll_site.source) do
@@ -43,7 +49,7 @@ module Jekyll
43
49
 
44
50
  "#{dir}/{z}/{y}/{x}.jpg"
45
51
  rescue Vips::Error => e
46
- Jekyll.logger.warn "Failed to process #{input}: #{e.message}"
52
+ Jekyll.logger.warn 'Dzsave:', "Failed to process #{input}: #{e.message}"
47
53
  input
48
54
  end
49
55
  end
@@ -18,13 +18,13 @@ module Jekyll
18
18
  path = jekyll_site.in_source_dir input
19
19
 
20
20
  unless ::File.exist? path
21
- Jekyll.logger.warn "File doesn't exist #{input}"
21
+ Jekyll.logger.warn 'Height:', "#{input} doesn't exist"
22
22
  return input
23
23
  end
24
24
 
25
25
  Jekyll::Images::Cache.cached_image(path).height
26
26
  rescue Vips::Error => e
27
- Jekyll.logger.warn "Failed to process #{input}: #{e.message}"
27
+ Jekyll.logger.warn 'Height:', "Failed to process #{input}: #{e.message}"
28
28
  nil
29
29
  end
30
30
  end
@@ -21,7 +21,7 @@ module Jekyll
21
21
  path = jekyll_site.in_source_dir input
22
22
 
23
23
  unless ::File.exist? path
24
- Jekyll.logger.warn "File doesn't exist #{input}"
24
+ Jekyll.logger.warn 'Thumbnail:', "#{input} doesn't exist"
25
25
  return input
26
26
  end
27
27
 
@@ -35,7 +35,7 @@ module Jekyll
35
35
 
36
36
  thumb.url
37
37
  rescue Vips::Error => e
38
- Jekyll.logger.warn "Failed to process #{input}: #{e.message}"
38
+ Jekyll.logger.warn 'Thumbnail:', "Failed to process #{input}: #{e.message}"
39
39
  input
40
40
  end
41
41
  end
@@ -17,13 +17,13 @@ module Jekyll
17
17
  path = jekyll_site.in_source_dir input
18
18
 
19
19
  unless ::File.exist? path
20
- Jekyll.logger.warn "File doesn't exist #{input}"
20
+ Jekyll.logger.warn 'Width:', "#{input} doesn't exist"
21
21
  return input
22
22
  end
23
23
 
24
24
  Jekyll::Images::Cache.cached_image(path).width
25
25
  rescue Vips::Error => e
26
- Jekyll.logger.warn "Failed to process #{input}: #{e.message}"
26
+ Jekyll.logger.warn 'Width:', "Failed to process #{input}: #{e.message}"
27
27
  nil
28
28
  end
29
29
  end
@@ -87,10 +87,10 @@ module Jekyll
87
87
  return unless write?
88
88
 
89
89
  if thumbnail?
90
- Jekyll.logger.info "Thumbnailing #{filename} => #{dest}"
90
+ Jekyll.logger.info 'Thumbnail:', "#{filename} => #{dest}"
91
91
  thumbnail.write_to_file(dest)
92
92
  else
93
- Jekyll.logger.info "Copying #{filename} => #{dest}"
93
+ Jekyll.logger.info 'Copying:', "#{filename} => #{dest}"
94
94
  FileUtils.cp(filename, dest)
95
95
  end
96
96
 
@@ -110,7 +110,7 @@ module Jekyll
110
110
 
111
111
  pct = ((after.to_f / before) * -100 + 100).round(2)
112
112
 
113
- Jekyll.logger.info "Reduced #{dest} from #{before} to #{after} bytes (%#{pct})"
113
+ Jekyll.logger.info 'Optimization:', "Reduced #{dest} from #{before} to #{after} bytes (%#{pct})"
114
114
  end
115
115
 
116
116
  def relative_path
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-images
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
@@ -35,7 +35,7 @@ cert_chain:
35
35
  cpurTQHNJfL/ah+9dYbgDXdG5HAAjRMAsWSvERw95YdN9XzQZCdUk5wUs+A6cNtO
36
36
  AZZUMTVYNx8JqUeemxlXBRjsD/s=
37
37
  -----END CERTIFICATE-----
38
- date: 2025-04-17 00:00:00.000000000 Z
38
+ date: 2025-06-24 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: jekyll
metadata.gz.sig CHANGED
Binary file