simpacker 1.2.0 → 1.3.0

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: '093b3b132f0eb539351f2e441b6542063c34966c57be970863f131a18881da08'
4
- data.tar.gz: dd4bcb552fb6679e622649ea990d07a56651d9b854e8c85f7257bdf58d919a7b
3
+ metadata.gz: 13577281d92e7c133a1125ee25615810c0f82b8f76405aaa7f17e5502304768a
4
+ data.tar.gz: 560c378942075b5c4d3aee4a79488096a10979960c085cb60f2b74ec18469ead
5
5
  SHA512:
6
- metadata.gz: 05ce8120a614e150d79f849f993c407d68d167e3fd501a219298f2d3c53478a07504f9a6b9edc8f04c09b121482aba36ef7886c03b44e12b54fde41535b46d9b
7
- data.tar.gz: 2fddc269856cc17c2fea0e4b3d95fed81d74e035feefb155682bd236d61866060763f9762c8f949695c4d1f030b0d8b7056bfd5638c1bb1f90ea93d4ea1a33f2
6
+ metadata.gz: 1f13e54d4901813e0e2f11e27f1710344b89fb408a7610e1832b1b901a9f0c6b77167c7878ec9980a83bcbe1fc70535433dac50928232254aec144b9fa489a52
7
+ data.tar.gz: 2e265a305a46cf1abef0d7e28a42dcac2583d785168f03e50aa3bfd3cbb2267ba2a7dc9fdceea832b5dfa419398209fbd7e663fd2993812a5440151587cf6bf8
@@ -0,0 +1 @@
1
+ github: hokaccha
@@ -0,0 +1,23 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ ruby: ["2.7", "3.0", "3.1"]
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ - name: install dependencies
21
+ run: bundle install --jobs 3 --retry 3
22
+ - name: test
23
+ run: bundle exec rake test
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v1.2.1
2
+
3
+ - Support ruby 3.1 #70
4
+
1
5
  ## v1.2.0
2
6
 
3
7
  - Add image_pack_url, favicon_pack_tag to helpers #67
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Simpacker
2
2
 
3
- [![Build Status](https://travis-ci.org/hokaccha/simpacker.svg?branch=master)](https://travis-ci.org/hokaccha/simpacker) [![Gem Version](https://badge.fury.io/rb/simpacker.svg)](https://badge.fury.io/rb/simpacker)
3
+ [![CI](https://github.com/hokaccha/simpacker/actions/workflows/ci.yml/badge.svg)](https://github.com/hokaccha/simpacker/actions/workflows/ci.yml)
4
+ [![Gem Version](https://badge.fury.io/rb/simpacker.svg)](https://badge.fury.io/rb/simpacker)
4
5
 
5
6
  Simpacker provides the feature to integrate modern JavaScript build system with Rails, like a [webpacker](https://github.com/rails/webpacker).
6
7
 
@@ -16,7 +16,11 @@ module Simpacker
16
16
 
17
17
  def load_config_file(root_path, env)
18
18
  config_path = root_path.join("config/simpacker.yml")
19
- yaml = YAML.load(config_path.read)
19
+ yaml = begin
20
+ YAML.load(config_path.read, aliases: true)
21
+ rescue ArgumentError
22
+ YAML.load(config_path.read)
23
+ end
20
24
  config_env = yaml.fetch(env.to_s)
21
25
  {
22
26
  manifest_path: root_path.join(config_env.fetch('manifest_path')),
@@ -30,6 +30,16 @@ module Simpacker
30
30
  asset_url(simpacker_context.manifest.lookup!(name), **options)
31
31
  end
32
32
 
33
+ def picture_pack_tag(*names, &block)
34
+ unless Rails.gem_version >= Gem::Version.new('7.1.0')
35
+ raise NotImplementedError, '`picture_pack_tag` is only available for Rails 7.1 or above.'
36
+ end
37
+ names.flatten!
38
+ options = names.extract_options!
39
+ sources = names.map { |name| asset_path(simpacker_context.manifest.lookup!(name)) }
40
+ picture_tag(*sources, options, &block)
41
+ end
42
+
33
43
  def favicon_pack_tag(name, **options)
34
44
  favicon_link_tag(asset_path(simpacker_context.manifest.lookup!(name)), **options)
35
45
  end
@@ -1,3 +1,3 @@
1
1
  module Simpacker
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simpacker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuhito Hokamura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-17 00:00:00.000000000 Z
11
+ date: 2023-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -87,9 +87,10 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
+ - ".github/FUNDING.yml"
91
+ - ".github/workflows/ci.yml"
90
92
  - ".gitignore"
91
93
  - ".prettierignore"
92
- - ".travis.yml"
93
94
  - CHANGELOG.md
94
95
  - Gemfile
95
96
  - README.md
@@ -132,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
133
  - !ruby/object:Gem::Version
133
134
  version: '0'
134
135
  requirements: []
135
- rubygems_version: 3.2.3
136
+ rubygems_version: 3.3.7
136
137
  signing_key:
137
138
  specification_version: 4
138
139
  summary: Integrate modern JavaScript build system with Rails.
data/.travis.yml DELETED
@@ -1,8 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
-
4
- rvm:
5
- - 2.5
6
- - 2.6
7
- - 2.7
8
- - 3.0