vite_rails 3.0.16 → 3.0.17

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: bb3f141b086aee8a0b40651b824fc6760d47af516037bca0ae91ef8aa3481c47
4
- data.tar.gz: c19d6cbb3a4062421691501853f26b4b6c344b0ab9a6502be6ed4504a2b0c33d
3
+ metadata.gz: '09ffd4b097008530d82fda12a78c5c8004f022a65e789eac969698d00110b06a'
4
+ data.tar.gz: 7310a8678f4772e3b9eab6186033705e1c871e44873e62de2de68a6aa26f2bb9
5
5
  SHA512:
6
- metadata.gz: d26931a1bbe46f2c11ab59d098a1f59efdacbb0b74999812d2e13858f557d04621d5bb2903f8894ecfea601d281d35e90559254bb10e834f3edfed2c3f41dbcc
7
- data.tar.gz: a6335c2c8d1aab0b9e5eb06eb19c47c7c5f332321319ac8310177a1e0ccbfd319286d89ba02d92568d5ad083ada51ac28711f048b53f113fa870a9c2e207b2d3
6
+ metadata.gz: 7257343e6a237462b31552ef89a72cc77ade0cc639b99ec6d9689fc38ae568e1289882a9e34a092b90d86bfaa0cea03584ee8446f969a32561c62e283533e911
7
+ data.tar.gz: 9edaaf096099ef3ccf762661c4cea9de82ccc2b6a5d02b5abb47c32cc1321f7dd973ca9c0d63b6ce54090507f1a9144cf6855dae2b76300062707cb8523a62e5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [3.0.17](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@3.0.16...vite_rails@3.0.17) (2023-10-05)
2
+
3
+
4
+ ### Features
5
+
6
+ * add vite_picture_tag for Rails 7.1 ([#409](https://github.com/ElMassimo/vite_ruby/issues/409)) ([4e3762a](https://github.com/ElMassimo/vite_ruby/commit/4e3762a978b7879206dbc48137ba525d0d0ad971))
7
+
8
+
9
+
1
10
  ## [3.0.16](https://github.com/ElMassimo/vite_ruby/compare/vite_rails@3.0.15...vite_rails@3.0.16) (2023-09-22)
2
11
 
3
12
 
@@ -79,6 +79,19 @@ module ViteRails::TagHelpers
79
79
  image_tag(vite_asset_path(name), options)
80
80
  end
81
81
 
82
+ # Public: Renders a <picture> tag with one or more Vite asset sources.
83
+ def vite_picture_tag(*sources, &block)
84
+ unless Rails.gem_version >= Gem::Version.new('7.1.0')
85
+ raise NotImplementedError, '`vite_picture_tag` is only available for Rails 7.1 or above.'
86
+ end
87
+
88
+ sources.flatten!
89
+ options = sources.extract_options!
90
+
91
+ vite_sources = sources.map { |src| vite_asset_path(src) }
92
+ picture_tag(*vite_sources, options, &block)
93
+ end
94
+
82
95
  private
83
96
 
84
97
  # Internal: Returns the current manifest loaded by Vite Ruby.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ViteRails
4
- VERSION = '3.0.16'
4
+ VERSION = '3.0.17'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vite_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.16
4
+ version: 3.0.17
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: 2023-09-22 00:00:00.000000000 Z
11
+ date: 2023-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -88,8 +88,8 @@ homepage: https://github.com/ElMassimo/vite_ruby
88
88
  licenses:
89
89
  - MIT
90
90
  metadata:
91
- source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails@3.0.16/vite_rails
92
- changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails@3.0.16/vite_rails/CHANGELOG.md
91
+ source_code_uri: https://github.com/ElMassimo/vite_ruby/tree/vite_rails@3.0.17/vite_rails
92
+ changelog_uri: https://github.com/ElMassimo/vite_ruby/blob/vite_rails@3.0.17/vite_rails/CHANGELOG.md
93
93
  post_install_message:
94
94
  rdoc_options: []
95
95
  require_paths: