12
0

Compare commits

...

4 Commits

Author SHA256 Message Date
e5e3707598 Accepting request 1231542 from devel:languages:perl
OBS-URL: https://build.opensuse.org/request/show/1231542
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Mojolicious-Plugin-AssetPack?expand=0&rev=51
2024-12-16 18:18:42 +00:00
b5565e867e Accepting request 1230645 from devel:languages:perl:autoupdate
- Remove mojolicious-deprecate-spurt.patch, sass-trace.patch (fixed upstream)
- updated to 2.150.0 (2.15)
   see /usr/share/doc/packages/perl-Mojolicious-Plugin-AssetPack/Changes
  2.15  2024-12-06
    - Fixed reporting of sass errors.
      Contributor: Jan Baier
    - Use sass trace for easier error detection.
      Contributor: Tina Mueller
    - Updates for latest Mojolicious.
      Contributor: Oliver Kurz

OBS-URL: https://build.opensuse.org/request/show/1230645
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Mojolicious-Plugin-AssetPack?expand=0&rev=115
2024-12-16 15:11:17 +00:00
d137103f9a Accepting request 1181506 from devel:languages:perl
OBS-URL: https://build.opensuse.org/request/show/1181506
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Mojolicious-Plugin-AssetPack?expand=0&rev=50
2024-06-18 20:52:29 +00:00
deb93be9ab Accepting request 1181342 from home:tinita:branches:d:l:p
- Add sass-trace.patch. See https://github.com/mojolicious/mojo-assetpack/pull/150

OBS-URL: https://build.opensuse.org/request/show/1181342
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Mojolicious-Plugin-AssetPack?expand=0&rev=113
2024-06-18 13:21:45 +00:00
6 changed files with 60 additions and 132 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8f058cc88c3599bebf66378aec64bdd6ebcd90c96318bde6d68bfae79d63eaa3
size 1366212

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6297a9001a1b2acf6a2e34ea4d814e2b28ffe40131b48fcfe36391f3d844e70d
size 1372404

View File

@@ -4,15 +4,12 @@
#sources:
# - source1
# - source2
patches:
mojolicious-deprecate-spurt.patch: -p1 PATCH-FIX-UPSTREAM https://github.com/mojolicious/mojo-assetpack/pull/149
#patches:
# bar.patch:
preamble: |-
BuildRequires: perl(Mojolicious) >= 9.34
Requires: perl(Mojolicious) >= 9.34
#preamble: |-
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree

View File

@@ -1,111 +0,0 @@
From 56b27ac3059f07fea0938cbd4bb59ba6e755a3c6 Mon Sep 17 00:00:00 2001
From: Oliver Kurz <okurz@suse.de>
Date: Tue, 19 Sep 2023 12:17:49 +0200
Subject: [PATCH] Adapt to deprecation of spurt in upstream Mojolicious
---
Makefile.PL | 2 +-
lib/Mojolicious/Plugin/AssetPack/Pipe/RollupJs.pm | 2 +-
lib/Mojolicious/Plugin/AssetPack/Store.pm | 4 ++--
t/Helper.pm | 6 +++---
t/recreate.t | 6 +++---
7 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/Makefile.PL b/Makefile.PL
index a7c078ec..b052d136 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -12,7 +12,7 @@ WriteMakefile(
ABSTRACT_FROM => 'lib/Mojolicious/Plugin/AssetPack.pm',
VERSION_FROM => 'lib/Mojolicious/Plugin/AssetPack.pm',
TEST_REQUIRES => {'Test::More' => '0.88'},
- PREREQ_PM => {'File::Which' => '1.21', 'IPC::Run3' => '0.048', 'Mojolicious' => '9.0'},
+ PREREQ_PM => {'File::Which' => '1.21', 'IPC::Run3' => '0.048', 'Mojolicious' => '9.34'},
META_MERGE => {
'dynamic_config' => 0,
'meta-spec' => {version => 2},
diff --git a/lib/Mojolicious/Plugin/AssetPack/Pipe/RollupJs.pm b/lib/Mojolicious/Plugin/AssetPack/Pipe/RollupJs.pm
index d4f72630..a8a62045 100644
--- a/lib/Mojolicious/Plugin/AssetPack/Pipe/RollupJs.pm
+++ b/lib/Mojolicious/Plugin/AssetPack/Pipe/RollupJs.pm
@@ -46,7 +46,7 @@ has _rollupjs => sub {
$self->{_rollupjs_src} = tempfile(SUFFIX => '.js');
}
- $self->{_rollupjs_src}->spurt($bin);
+ $self->{_rollupjs_src}->spew($bin);
return [$self->_find_app([qw(nodejs node)]), $self->{_rollupjs_src}->realpath];
};
diff --git a/lib/Mojolicious/Plugin/AssetPack/Store.pm b/lib/Mojolicious/Plugin/AssetPack/Store.pm
index f591589b..8095f78b 100644
--- a/lib/Mojolicious/Plugin/AssetPack/Store.pm
+++ b/lib/Mojolicious/Plugin/AssetPack/Store.pm
@@ -139,7 +139,7 @@ sub save {
return $self->asset_class->new(%$attrs, content => $$ref) unless -w $dir;
- $path->spurt($$ref);
+ $path->spew($$ref);
$self->_db_set(%$attrs);
return $self->asset_class->new(%$attrs, path => $path);
}
@@ -288,7 +288,7 @@ sub _download {
$path = path($self->paths->[0], $self->_url2path($attrs{url}, $attrs{format}));
$self->_log->info(qq(Caching "$url" to "$path".));
$path->dirname->make_path unless -d $path->dirname;
- $path->spurt($tx->res->body);
+ $path->spew($tx->res->body);
}
$attrs{url} = "$attrs{url}";
diff --git a/t/Helper.pm b/t/Helper.pm
index 55cdc151..ae3f0f84 100644
--- a/t/Helper.pm
+++ b/t/Helper.pm
@@ -17,11 +17,11 @@ END { cleanup() }
my %CREATED_FILES;
unless ($ENV{TEST_KEEP_FILES}) {
- my $spurt = \&Mojo::File::spurt;
+ my $spew = \&Mojo::File::spew;
Mojo::Util::monkey_patch(
- 'Mojo::File' => spurt => sub {
+ 'Mojo::File' => spew => sub {
$CREATED_FILES{$_[0]} = 1 unless -e $_[0];
- goto $spurt;
+ goto $spew;
}
);
}
diff --git a/t/recreate.t b/t/recreate.t
index 20a4e335..3e2415ee 100644
--- a/t/recreate.t
+++ b/t/recreate.t
@@ -14,7 +14,7 @@ my $t = t::Helper->t(pipes => [qw(Css Combine)]);
my @assets = qw(one.css recreate.css);
my $recreate = path(qw(t assets recreate.css));
-$recreate->spurt(".recreate { color: #aaa }\n");
+$recreate->spew(".recreate { color: #aaa }\n");
$t->app->asset->process('app.css' => @assets);
@@ -28,7 +28,7 @@ $t->get_ok('/')->status_is(200);
is $t->tx->res->dom->at('link')->{href}, $link, 'same link href';
# recreate
-$recreate->spurt(".recreate { color: #bbb }\n");
+$recreate->spew(".recreate { color: #bbb }\n");
my $tr = t::Helper->t(pipes => [qw(Css Combine)]);
$tr->app->asset->process('app.css' => @assets);
$tr->get_ok('/')->status_is(200);
@@ -36,7 +36,7 @@ isnt $tr->tx->res->dom->at('link')->{href}, $link, 'changed link href';
$tr->get_ok($tr->tx->res->dom->at('link')->{href})->status_is(200)->content_like(qr{color:\#bbb});
# reset asset
-$recreate->spurt(".recreate { color: #aaa }\n");
+$recreate->spew(".recreate { color: #aaa }\n");
done_testing;
__DATA__

View File

@@ -1,3 +1,27 @@
-------------------------------------------------------------------
Thu Dec 12 16:36:04 UTC 2024 - Tina Müller <tina.mueller@suse.com>
- Remove mojolicious-deprecate-spurt.patch, sass-trace.patch (fixed upstream)
-------------------------------------------------------------------
Thu Dec 12 16:31:38 UTC 2024 - Tina Müller <timueller+perl@suse.de>
- updated to 2.150.0 (2.15)
see /usr/share/doc/packages/perl-Mojolicious-Plugin-AssetPack/Changes
2.15 2024-12-06
- Fixed reporting of sass errors.
Contributor: Jan Baier
- Use sass trace for easier error detection.
Contributor: Tina Mueller
- Updates for latest Mojolicious.
Contributor: Oliver Kurz
-------------------------------------------------------------------
Mon Jun 17 15:38:49 UTC 2024 - Tina Müller <tina.mueller@suse.com>
- Add sass-trace.patch. See https://github.com/mojolicious/mojo-assetpack/pull/150
-------------------------------------------------------------------
Tue Sep 19 15:50:13 UTC 2023 - Tina Müller <tina.mueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package perl-Mojolicious-Plugin-AssetPack
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,30 +18,48 @@
%define cpan_name Mojolicious-Plugin-AssetPack
Name: perl-Mojolicious-Plugin-AssetPack
Version: 2.14
Version: 2.150.0
Release: 0
# 2.15 -> normalize -> 2.150.0
%define cpan_version 2.15
License: Artistic-2.0
Summary: Compress and convert CSS, Less, Sass, JavaScript and CoffeeScript files
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/S/SR/SRI/%{cpan_name}-%{version}.tar.gz
Source0: https://cpan.metacpan.org/authors/id/S/SR/SRI/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
# PATCH-FIX-UPSTREAM https://github.com/mojolicious/mojo-assetpack/pull/149
Patch0: mojolicious-deprecate-spurt.patch
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(File::Which) >= 1.21
BuildRequires: perl(IPC::Run3) >= 0.048
BuildRequires: perl(Mojolicious) >= 9.0
BuildRequires: perl(Mojolicious) >= 9.340
BuildRequires: perl(Test::More) >= 0.88
Requires: perl(File::Which) >= 1.21
Requires: perl(IPC::Run3) >= 0.048
Requires: perl(Mojolicious) >= 9.0
Requires: perl(Mojolicious) >= 9.340
Provides: perl(Mojolicious::Plugin::AssetPack) = %{version}
Provides: perl(Mojolicious::Plugin::AssetPack::Asset)
Provides: perl(Mojolicious::Plugin::AssetPack::Asset::Null)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::CoffeeScript)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::Combine)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::Css)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::Favicon)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::Fetch)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::JavaScript)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::Jpeg)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::Less)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::Png)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::Riotjs)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::RollupJs)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::Sass)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::TypeScript)
Provides: perl(Mojolicious::Plugin::AssetPack::Pipe::Vuejs)
Provides: perl(Mojolicious::Plugin::AssetPack::Store)
Provides: perl(Mojolicious::Plugin::AssetPack::Util)
Provides: perl(Mojolicious::Plugin::AssetPack::Util::_chdir)
%undefine __perllib_provides
%{perl_requires}
# MANUAL BEGIN
BuildRequires: perl(Mojolicious) >= 9.34
Requires: perl(Mojolicious) >= 9.34
# MANUAL END
%description
Mojolicious::Plugin::AssetPack is a Mojolicious plugin for processing
@@ -58,7 +76,7 @@ name). The process of building actual assets from their components is
delegated to "pipe objects".
%prep
%autosetup -n %{cpan_name}-%{version} -p1
%autosetup -n %{cpan_name}-%{cpan_version}
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644