vite_rails_legacy 3.0.2 → 3.0.3

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: 3f94fbf837fb3e2eed09ac3a9be4c2e8a040ca0905fb1298d092005e7c974804
4
- data.tar.gz: 05bb178559a0ecddf5622cfcb102f2c1f59683440f042e945160dba1a830e815
3
+ metadata.gz: c2e8422c6d212031f8e62a6af629466e57abe65be76dc13f67b8b1bda2a44119
4
+ data.tar.gz: 8b6c78104ff090d81efe9640a8df8da4b27e1c31dd44cd96f8ceacde1190c64e
5
5
  SHA512:
6
- metadata.gz: 741912fdf1576c5d6848db15e44b347dff71e7262a3385a89fb68939898946f250f056b64a305a1035eb7ff7e5d03f1732af87c89cfcbe6b75747dea4997e367
7
- data.tar.gz: 62d2ea796b9e6ef36d55e39f83839b6c7cf57895d7553ae94678de2b5d78557b86e3e2386177a13399faaf463f51a734f8607e9a4a103d06476a3204550dc5f4
6
+ metadata.gz: 49f75b9e07555742235d2489e523d119a917bd9d0113505dad6a1eb66206856313ab5670bcd6021158a103d7d4b7bc850287f2842f19e2531d482009d3962e87
7
+ data.tar.gz: 98a12a027a628c0f211658b87fbd0af1c67976755cd3377ab0ba42219bb8ca67184b3aac6bcbb43509d2518c8acfd3dbf7325894eaa71d28112ff1cbce2d7486
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [3.0.3](https://github.com/ElMassimo/vite_ruby/compare/vite_rails_legacy@3.0.2...vite_rails_legacy@3.0.3) (2021-12-23)
2
+
3
+
4
+
1
5
  ## [3.0.2](https://github.com/ElMassimo/vite_ruby/compare/vite_rails_legacy@3.0.1...vite_rails_legacy@3.0.2) (2021-12-12)
2
6
 
3
7
 
@@ -49,6 +49,17 @@ module ViteRailsLegacy::TagHelpers
49
49
  stylesheet_link_tag(*style_paths, **options)
50
50
  end
51
51
 
52
+ # Public: Renders an <img> tag for the specified Vite asset.
53
+ def vite_image_tag(name, **options)
54
+ if options[:srcset] && !options[:srcset].is_a?(String)
55
+ options[:srcset] = options[:srcset].map do |src_name, size|
56
+ "#{ vite_asset_path(src_name) } #{ size }"
57
+ end.join(', ')
58
+ end
59
+
60
+ image_tag(vite_asset_path(name), options)
61
+ end
62
+
52
63
  private
53
64
 
54
65
  # Internal: Returns the current manifest loaded by Vite Ruby.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ViteRailsLegacy
4
- VERSION = '3.0.2'
4
+ VERSION = '3.0.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vite_rails_legacy
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Máximo Mussini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-12 00:00:00.000000000 Z
11
+ date: 2021-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -61,8 +61,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
61
61
  licenses:
62
62
  - MIT
63
63
  metadata:
64
- source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails_legacy@3.0.2/vite_rails_legacy
65
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails_legacy@3.0.2/vite_rails_legacy/CHANGELOG.md
64
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails_legacy@3.0.3/vite_rails_legacy
65
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails_legacy@3.0.3/vite_rails_legacy/CHANGELOG.md
66
66
  post_install_message:
67
67
  rdoc_options: []
68
68
  require_paths: