Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package perl-Net-OBS-Client for
openSUSE:Factory checked in at 2021-04-17 23:24:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Net-OBS-Client (Old)
and /work/SRC/openSUSE:Factory/.perl-Net-OBS-Client.new.12324 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Net-OBS-Client"
Sat Apr 17 23:24:47 2021 rev:3 rq:886081 version:0.0.8
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Net-OBS-Client/perl-Net-OBS-Client.changes
2021-01-15 19:47:41.214152116 +0100
+++
/work/SRC/openSUSE:Factory/.perl-Net-OBS-Client.new.12324/perl-Net-OBS-Client.changes
2021-04-17 23:24:49.925580447 +0200
@@ -1,0 +2,24 @@
+Wed Jan 20 03:10:21 UTC 2021 - Tina M??ller <[email protected]>
+
+- updated to 0.0.8
+ see /usr/share/doc/packages/perl-Net-OBS-Client/Changes
+
+ 0.0.8 2021-01-19
+ * fix conflicts
+ 0.0.7 2021-01-19
+ * added perlcriticrc
+ * test cases based on Test::HTTP::MockServer
+ * fixed problem with use order
+ * improved POD
+ * removed usage of feature 'say' (for older perl versions)
+ * LWP::ConsoleLogger::Easy no longer mandatory if NET_OBS_CLIENT_DEBUG
is set
+ * removed obsolete test modules
+ 0.0.6 2021-01-13
+ * fixed POD for N::O::Client
+ * implemented project/package/buildresults method in N::O::Client
+ * removed spec file
+ * fixed BuildRequires
+ 0.0.5 2021-01-12
+ * changed mail
+
+-------------------------------------------------------------------
Old:
----
Net-OBS-Client-0.0.6.tar.gz
New:
----
Net-OBS-Client-0.0.8.tar.gz
cpanspec.yml
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Net-OBS-Client.spec ++++++
--- /var/tmp/diff_new_pack.Lmf9eA/_old 2021-04-17 23:24:50.333581142 +0200
+++ /var/tmp/diff_new_pack.Lmf9eA/_new 2021-04-17 23:24:50.337581149 +0200
@@ -16,17 +16,16 @@
#
+%define cpan_name Net-OBS-Client
Name: perl-Net-OBS-Client
-Version: 0.0.6
+Version: 0.0.8
Release: 0
-%define cpan_name Net-OBS-Client
Summary: Simple OBS API calls
-License: Artistic-1.0 OR GPL-1.0-or-later
-Group: Development/Libraries/Perl
+License: Artistic-2.0
URL: https://metacpan.org/release/%{cpan_name}
Source0:
https://cpan.metacpan.org/authors/id/F/FS/FSM/%{cpan_name}-%{version}.tar.gz
+Source1: cpanspec.yml
BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Config::INI::Reader)
@@ -37,7 +36,9 @@
BuildRequires: perl(Moose)
BuildRequires: perl(Moose::Role)
BuildRequires: perl(Path::Class)
+BuildRequires: perl(Test::HTTP::MockServer)
BuildRequires: perl(URI::URL)
+BuildRequires: perl(XML::Parser)
BuildRequires: perl(XML::Structured)
Requires: perl(Config::INI::Reader)
Requires: perl(Config::Tiny)
@@ -56,13 +57,11 @@
(https://openbuildservice.org) API calls in perl.
%prep
-%setup -q -n %{cpan_name}
-
-rm -f pm_to_blib
+%autosetup -n %{cpan_name}-%{version}
%build
perl Makefile.PL INSTALLDIRS=vendor
-make %{?_smp_mflags}
+%make_build
%check
make test
@@ -73,7 +72,6 @@
%perl_gen_filelist
%files -f %{name}.files
-%defattr(-,root,root,755)
-%doc Changes ignore.txt KankuFile README
+%doc Changes README
%changelog
++++++ Net-OBS-Client-0.0.6.tar.gz -> Net-OBS-Client-0.0.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/Changes
new/Net-OBS-Client-0.0.8/Changes
--- old/Net-OBS-Client/Changes 2020-12-07 09:54:48.596189814 +0100
+++ new/Net-OBS-Client-0.0.8/Changes 2021-01-19 13:37:32.333406193 +0100
@@ -1,5 +1,30 @@
Revision history for Net-OBS-Client
+0.0.8 2021-01-19
+
+ * fix conflicts
+
+0.0.7 2021-01-19
+
+ * added perlcriticrc
+ * test cases based on Test::HTTP::MockServer
+ * fixed problem with use order
+ * improved POD
+ * removed usage of feature 'say' (for older perl versions)
+ * LWP::ConsoleLogger::Easy no longer mandatory if NET_OBS_CLIENT_DEBUG is
set
+ * removed obsolete test modules
+
+0.0.6 2021-01-13
+
+ * fixed POD for N::O::Client
+ * implemented project/package/buildresults method in N::O::Client
+ * removed spec file
+ * fixed BuildRequires
+
+0.0.5 2021-01-12
+
+ * changed mail
+
0.0.4 2020-12-07
* improved POD documentation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/KankuFile
new/Net-OBS-Client-0.0.8/KankuFile
--- old/Net-OBS-Client/KankuFile 2020-05-12 08:15:18.132198069 +0200
+++ new/Net-OBS-Client-0.0.8/KankuFile 1970-01-01 01:00:00.000000000 +0100
@@ -1,52 +0,0 @@
-#
-Kanku::Util::IPTables:
- start_port: 49001
-
-
-domain_name: net-obs-client
-default_job: kanku-job
-login_user: root
-login_pass: kankudai
-
-qemu:
- user: frank
-
-jobs:
- kanku-job:
- -
- use_module: Kanku::Handler::SetJobContext
- options:
- host_interface: eth0
- -
- use_module: Kanku::Handler::OBSCheck
- options:
- api_url: https://api.opensuse.org/public
- # Please have a look at
- # https://build.opensuse.org/project/show/devel:kanku:images
- # to find more official Images
- project: devel:kanku:images
- repository: images_leap_15_1
- package: openSUSE-Leap-15.1-JeOS
- use_oscrc: 0
- -
- use_module: Kanku::Handler::ImageDownload
- options:
- use_cache: 1
-
- -
- use_module: Kanku::Handler::CreateDomain
- options:
- memory: 2G
- vcpu: 2
- use_9p: 1
- #forward_port_list: tcp:22,tcp:443
- -
- use_module: Kanku::Handler::PrepareSSH
- -
- use_module: Kanku::Handler::ExecuteCommandViaSSH
- options:
- commands:
- - zypper ar obs://devel:kanku:perl devel:kanku:perl
- - zypper -n --gpg-auto-import-keys ref -s
- - zypper -n in perl-Net-OBS-Client make sudo
- - make -C /tmp/kanku install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/MANIFEST
new/Net-OBS-Client-0.0.8/MANIFEST
--- old/Net-OBS-Client/MANIFEST 2019-10-02 09:41:18.709611195 +0200
+++ new/Net-OBS-Client-0.0.8/MANIFEST 2021-01-19 13:39:23.341749779 +0100
@@ -18,3 +18,5 @@
t/manifest.t
t/pod-coverage.t
t/pod.t
+META.yml Module YAML meta-data (added by
MakeMaker)
+META.json Module JSON meta-data (added by
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/MANIFEST.SKIP
new/Net-OBS-Client-0.0.8/MANIFEST.SKIP
--- old/Net-OBS-Client/MANIFEST.SKIP 2019-10-02 09:41:18.709611195 +0200
+++ new/Net-OBS-Client-0.0.8/MANIFEST.SKIP 1970-01-01 01:00:00.000000000
+0100
@@ -1 +0,0 @@
-*.bak
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/META.json
new/Net-OBS-Client-0.0.8/META.json
--- old/Net-OBS-Client/META.json 1970-01-01 01:00:00.000000000 +0100
+++ new/Net-OBS-Client-0.0.8/META.json 2021-01-19 13:39:23.257749518 +0100
@@ -0,0 +1,54 @@
+{
+ "abstract" : "simple OBS API calls",
+ "author" : [
+ "Frank Schreiner <[email protected]>"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter
version 2.150010",
+ "license" : [
+ "artistic_2"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : 2
+ },
+ "name" : "Net-OBS-Client",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "Test::HTTP::MockServer" : "0",
+ "Test::More" : "0",
+ "XML::Parser" : "0"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Config::INI::Reader" : "0",
+ "Config::Tiny" : "0",
+ "HTTP::Cookies" : "0",
+ "HTTP::Request" : "0",
+ "LWP::UserAgent" : "0",
+ "Moose" : "0",
+ "Moose::Role" : "0",
+ "Path::Class" : "0",
+ "URI::URL" : "0",
+ "XML::Structured" : "0",
+ "perl" : "5.006"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "version" : "v0.0.8",
+ "x_serialization_backend" : "JSON::PP version 4.04"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/META.yml
new/Net-OBS-Client-0.0.8/META.yml
--- old/Net-OBS-Client/META.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/Net-OBS-Client-0.0.8/META.yml 2021-01-19 13:39:23.069748937 +0100
@@ -0,0 +1,35 @@
+---
+abstract: 'simple OBS API calls'
+author:
+ - 'Frank Schreiner <[email protected]>'
+build_requires:
+ Test::HTTP::MockServer: '0'
+ Test::More: '0'
+ XML::Parser: '0'
+configure_requires:
+ ExtUtils::MakeMaker: '0'
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version
2.150010'
+license: artistic_2
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: '1.4'
+name: Net-OBS-Client
+no_index:
+ directory:
+ - t
+ - inc
+requires:
+ Config::INI::Reader: '0'
+ Config::Tiny: '0'
+ HTTP::Cookies: '0'
+ HTTP::Request: '0'
+ LWP::UserAgent: '0'
+ Moose: '0'
+ Moose::Role: '0'
+ Path::Class: '0'
+ URI::URL: '0'
+ XML::Structured: '0'
+ perl: '5.006'
+version: v0.0.8
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/Makefile.PL
new/Net-OBS-Client-0.0.8/Makefile.PL
--- old/Net-OBS-Client/Makefile.PL 2021-01-13 08:09:09.909076387 +0100
+++ new/Net-OBS-Client-0.0.8/Makefile.PL 2021-01-19 09:26:56.752755199
+0100
@@ -17,6 +17,7 @@
BUILD_REQUIRES => {
'Test::More' => 0,
'XML::Parser' => 0,
+ 'Test::HTTP::MockServer' => 0,
},
PREREQ_PM => {
'Moose' => 0,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/contrib/buildresults.pl
new/Net-OBS-Client-0.0.8/contrib/buildresults.pl
--- old/Net-OBS-Client/contrib/buildresults.pl 2021-01-13 09:25:50.209946567
+0100
+++ new/Net-OBS-Client-0.0.8/contrib/buildresults.pl 1970-01-01
01:00:00.000000000 +0100
@@ -1,34 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-
-use Data::Dumper;
-
-use FindBin;
-use lib "$FindBin::Bin/../lib";
-
-use Net::OBS::Client;
-
-my $project = 'OBS:Server:Unstable';
-my $package = 'obs-server';
-my $repo = 'openSUSE_Factory';
-my $arch = 'x86_64';
-
-my $c = Net::OBS::Client->new();
-my $obj = $c->buildresults(
- project => $project,
- package => $package,
- repository => $repo,
- arch => $arch,
-);
-
-my $bin = $obj->binarylist;
-
-print Dumper($bin);
-
-my @bla = grep { $_->{filename} =~ /^obs-server.*noarch\.rpm$/ } @$bin;
-my $inf = $obj->fileinfo($bla[0]->{filename});
-print Dumper($inf);
-
-exit 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/contrib/package.pl
new/Net-OBS-Client-0.0.8/contrib/package.pl
--- old/Net-OBS-Client/contrib/package.pl 2021-01-13 09:10:59.659430657
+0100
+++ new/Net-OBS-Client-0.0.8/contrib/package.pl 1970-01-01 01:00:00.000000000
+0100
@@ -1,33 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-
-use Data::Dumper;
-
-use FindBin;
-use lib "$FindBin::Bin/../lib";
-
-use Net::OBS::Client;
-
-my $c = Net::OBS::Client->new(
-);
-
-my $pkg = $c->package(
- project => 'OBS:Server:Unstable',
- name => 'obs-server',
- repository => 'openSUSE_Factory',
- arch => 'x86_64',
-);
-
-my $s = $pkg->fetch_status();
-
-print Dumper($s);
-
-my $repo = 'openSUSE_Factory';
-my $arch = 'x86_64';
-
-print "code: ".$pkg->code($repo, $arch)."\n";
-
-
-exit 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/contrib/project.pl
new/Net-OBS-Client-0.0.8/contrib/project.pl
--- old/Net-OBS-Client/contrib/project.pl 2021-01-13 08:49:58.691880500
+0100
+++ new/Net-OBS-Client-0.0.8/contrib/project.pl 1970-01-01 01:00:00.000000000
+0100
@@ -1,32 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-
-use Data::Dumper;
-
-use FindBin;
-use lib "$FindBin::Bin/../lib";
-
-use Net::OBS::Client::Project;
-
-$::ENV{NET_OBS_DEBUG} = 1;
-
-my $project = 'OBS:Server:Unstable';
-my $package = 'obs-server';
-my $repo = 'openSUSE_Factory';
-my $arch = 'x86_64';
-
-my $c = Net::OBS::Client->new(
- use_oscrc => 0,
-);
-
-my $prj = $c->project(name => $project);
-my $s = $prj->fetch_resultlist(package => $package);
-
-print Dumper($s);
-
-print "code: ".$prj->code($repo, $arch)."\n";
-print "dirty: ".$prj->dirty($repo, $arch)."\n";
-
-exit 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/contrib/wait_for_project.pl
new/Net-OBS-Client-0.0.8/contrib/wait_for_project.pl
--- old/Net-OBS-Client/contrib/wait_for_project.pl 2020-12-07
09:43:02.282256805 +0100
+++ new/Net-OBS-Client-0.0.8/contrib/wait_for_project.pl 1970-01-01
01:00:00.000000000 +0100
@@ -1,43 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-
-use Data::Dumper;
-
-use FindBin;
-use lib "$FindBin::Bin/../lib";
-
-use Net::OBS::Client::Project;
-
-my $project = 'BaseContainer';
-my $package = 'openSUSE-Leap-Container-Base';
-my $repository = 'images';
-my $arch = 'x86_64';
-
-my $p = Net::OBS::Client::Project->new(
- name => $project,
- repository => $repository,
- arch => $arch,
-);
-
-$p->user_agent->timeout(0);
-
-my $s= {result=>[{code=>''}]};
-
-while ($s->{result}->[0]->{code} ne 'published') {
- my $d = {
- package => $package,
- multibuild => 1,
- locallink => 1,
- };
- $d->{oldstate} = $s->{state} if $s->{state};
- $s = $p->fetch_resultlist(%$d);
- print Dumper($p->dirty);
- print Dumper($p->code);
- print Dumper($s);
- sleep 1;
-}
-
-
-exit 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/ignore.txt
new/Net-OBS-Client-0.0.8/ignore.txt
--- old/Net-OBS-Client/ignore.txt 2019-10-02 09:41:18.717611195 +0200
+++ new/Net-OBS-Client-0.0.8/ignore.txt 1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-Makefile
-Makefile.old
-Build
-Build.bat
-META.*
-MYMETA.*
-.build/
-_build/
-cover_db/
-blib/
-inc/
-.lwpcookies
-.last_cover_stats
-nytprof.out
-pod2htm*.tmp
-pm_to_blib
-Net-OBS-Client-*
-Net-OBS-Client-*.tar.gz
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/lib/Net/OBS/Client/BuildResults.pm
new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client/BuildResults.pm
--- old/Net-OBS-Client/lib/Net/OBS/Client/BuildResults.pm 2021-01-12
20:42:51.659291162 +0100
+++ new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client/BuildResults.pm 2021-01-19
10:49:01.522831736 +0100
@@ -22,7 +22,7 @@
use XML::Structured;
use Data::Dumper;
-with "Net::OBS::Client::Roles::Client";
+with 'Net::OBS::Client::Roles::Client';
=head1 NAME
@@ -82,7 +82,7 @@
isa => 'Str',
);
-=head1 METHODS
+=head1 SUBROUTINES/METHODS
=head2 binarylist - fetch list of binary buildresults
@@ -91,23 +91,22 @@
=cut
sub binarylist {
- my $self = shift;
+ my ($self) = @_;
- my $api_path = "/build/"
- . join(
- "/",
+ my $api_path = '/build/'
+ . join
+ q{/},
$self->project,
$self->repository,
$self->arch,
- $self->package
- );
+ $self->package,
+ ;
- my $binarylist = $self->request( GET => $api_path );
+ my $binarylist = $self->request(GET=>$api_path);
my $dtd = Net::OBS::Client::DTD->new()->binarylist();
- return XMLin( $dtd, $binarylist )->{binary};
-
+ return XMLin($dtd, $binarylist)->{binary};
}
=head2 fileinfo - get detailed information about a specific package
@@ -117,28 +116,26 @@
=cut
sub fileinfo {
- my $self = shift;
- my $binary = shift;
+ my ($self, $binary) = @_;
#
/build/OBS:Server:Unstable/images/x86_64/OBS-Appliance-qcow2/obs-server.x86_64-2.5.51-Build6.4.qcow2?view=fileinfo
#
- my $api_path = "/build/"
- . join(
- "/",
+ my $api_path = '/build/'
+ . join
+ q{/},
$self->project,
$self->repository,
$self->arch,
$self->package,
- $binary
- );
+ $binary,
+ ;
$api_path .= '?view=fileinfo';
- my $binarylist = $self->request( GET => $api_path );
+ my $binarylist = $self->request(GET=>$api_path);
my $dtd = Net::OBS::Client::DTD->new()->fileinfo();
- return XMLin( $dtd, $binarylist );
-
+ return XMLin($dtd, $binarylist);
}
__PACKAGE__->meta->make_immutable();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/lib/Net/OBS/Client/DTD.pm
new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client/DTD.pm
--- old/Net-OBS-Client/lib/Net/OBS/Client/DTD.pm 2020-12-07
09:29:18.868003546 +0100
+++ new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client/DTD.pm 2021-01-19
11:03:31.933401983 +0100
@@ -42,8 +42,8 @@
'uri', # obsolete
'arch', # obsolete
- ]
- }
+ ];
+ },
);
@@ -61,7 +61,7 @@
'mtime',
]],
];
- }
+ },
);
has summary => (
@@ -75,7 +75,7 @@
'count',
]],
];
- }
+ },
);
@@ -90,7 +90,7 @@
'lastfinished',
'lastpublished',
];
- }
+ },
);
has result => (
@@ -112,7 +112,7 @@
$_[0]->summary,
$_[0]->schedulerstats,
];
- }
+ },
);
has resultlist => (
@@ -126,7 +126,7 @@
'retryafter',
[ $_[0]->result ],
];
- }
+ },
);
has fileinfo => (
@@ -183,7 +183,7 @@
]],
]],
];
- }
+ },
);
__PACKAGE__->meta->make_immutable();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/lib/Net/OBS/Client/Package.pm
new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client/Package.pm
--- old/Net-OBS-Client/lib/Net/OBS/Client/Package.pm 2021-01-13
09:28:47.258446883 +0100
+++ new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client/Package.pm 2021-01-19
11:01:43.037080347 +0100
@@ -44,8 +44,8 @@
use XML::Structured;
# define roles
-with "Net::OBS::Client::Roles::BuildStatus";
-with "Net::OBS::Client::Roles::Client";
+with 'Net::OBS::Client::Roles::BuildStatus';
+with 'Net::OBS::Client::Roles::Client';
=head1 ATTRIBUTES
@@ -68,10 +68,10 @@
is => 'rw',
isa => 'HashRef',
lazy => 1,
- default => \&fetch_status
+ default => \&fetch_status,
);
-=head1 METHODS
+=head1 SUBROUTINES/METHODS
=head2 fetch_status -
@@ -80,9 +80,9 @@
=cut
sub fetch_status {
- my $self = shift;
+ my ($self, @args) = @_;
- my $api_path =
join('/',"/build",$self->project,$self->repository,$self->arch,$self->name,"_status");
+ my $api_path = join q{/}, '/build', $self->project, $self->repository,
$self->arch, $self->name, '_status';
my $list = $self->request(GET=>$api_path);
@@ -98,7 +98,8 @@
=cut
sub code {
- return $_[0]->_status->{code};
+ my ($self) = @_;
+ return $self->_status->{code};
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/lib/Net/OBS/Client/Project.pm
new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client/Project.pm
--- old/Net-OBS-Client/lib/Net/OBS/Client/Project.pm 2021-01-12
20:49:57.652517104 +0100
+++ new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client/Project.pm 2021-01-19
11:07:58.334192430 +0100
@@ -18,9 +18,10 @@
use Moose;
use XML::Structured;
+use Carp;
-with "Net::OBS::Client::Roles::BuildStatus";
-with "Net::OBS::Client::Roles::Client";
+with 'Net::OBS::Client::Roles::BuildStatus';
+with 'Net::OBS::Client::Roles::Client';
=head1 NAME
@@ -49,10 +50,10 @@
is => 'rw',
isa => 'HashRef',
lazy => 1,
- default => \&fetch_resultlist
+ default => \&fetch_resultlist,
);
-=head1 METHODS
+=head1 SUBROUTINES/METHODS
=head2 fetch_resultlist - fetch build result code and other information for a
project
@@ -62,14 +63,14 @@
sub fetch_resultlist {
my ($self, %opts) = @_;
- my $api_path = "/build/" . $self->name . "/_result";
+ my $api_path = '/build/'.$self->name.'/_result';
my @ext;
while (my ($k,$v) = each %opts) { push @ext, "$k=$v"; }
- $api_path .= "?" . join '&', @ext if @ext;
- my $list = $self->request( GET => $api_path );
- my $data = XMLin( $self->dtd->resultlist, $list );
+ $api_path .= q{?} . join q{&}, @ext if @ext;
+ my $list = $self->request(GET=>$api_path);
+ my $data = XMLin($self->dtd->resultlist, $list);
$self->resultlist($data);
@@ -85,8 +86,8 @@
=cut
sub code {
- my $self = shift;
- my $ra = $self->_get_repo_arch(@_);
+ my ($self, @args) = @_;
+ my $ra = $self->_get_repo_arch(@args);
return $ra->{code};
}
@@ -99,31 +100,29 @@
=cut
sub dirty {
- my $self = shift;
+ my ($self, @args) = @_;
- my $ra = $self->_get_repo_arch(@_);
+ my $ra = $self->_get_repo_arch(@args);
return ( exists $ra->{dirty} && $ra->{dirty} eq 'true' ) ? 1 : 0;
-
}
sub _get_repo_arch {
- my $self = shift;
- my ( $repo, $arch ) = @_;
+ my ($self, $repo, $arch) = @_;
$self->repository($repo) if $repo;
$self->arch($arch) if $arch;
- die "repository and arch needed to get code"
+ croak("repository and arch needed to get code\n")
if ( !$self->repository || !$self->arch );
- foreach my $result ( @{ $self->resultlist->{result} } ) {
+ foreach my $result ( @{$self->resultlist->{result}} ) {
return $result
if ( $result->{repository} eq $self->repository
&& $result->{arch} eq $self->arch );
}
- die "combination of repository and arch not found";
+ croak("combination of repository and arch not found\n");
}
__PACKAGE__->meta->make_immutable();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Net-OBS-Client/lib/Net/OBS/Client/Roles/BuildStatus.pm
new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client/Roles/BuildStatus.pm
--- old/Net-OBS-Client/lib/Net/OBS/Client/Roles/BuildStatus.pm 2021-01-13
08:47:20.575437504 +0100
+++ new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client/Roles/BuildStatus.pm
2021-01-19 09:49:14.828564670 +0100
@@ -17,7 +17,6 @@
package Net::OBS::Client::Roles::BuildStatus;
use Moose::Role;
-use Net::OBS::Client;
use Net::OBS::Client::DTD;
use XML::Structured;
@@ -28,16 +27,6 @@
isa => 'Str',
);
-has repository => (
- is => 'rw',
- isa => 'Str',
-);
-
-has arch => (
- is => 'rw',
- isa => 'Str',
-);
-
has package => (
is => 'rw',
isa => 'Str',
@@ -49,7 +38,7 @@
lazy => 1,
default => sub {
Net::OBS::Client::DTD->new()
- }
+ },
);
has name => (
@@ -57,4 +46,4 @@
isa => 'Str',
);
-1;
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/lib/Net/OBS/Client/Roles/Client.pm
new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client/Roles/Client.pm
--- old/Net-OBS-Client/lib/Net/OBS/Client/Roles/Client.pm 2020-12-07
09:39:25.653664036 +0100
+++ new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client/Roles/Client.pm 2021-01-19
11:10:28.802641366 +0100
@@ -5,7 +5,6 @@
use LWP::UserAgent;
use XML::Structured;
use Config::Tiny;
-use feature 'say';
use HTTP::Request;
use URI::URL;
use Path::Class qw/file/;
@@ -13,7 +12,7 @@
has use_oscrc => (
is => 'rw',
- isa => 'Bool'
+ isa => 'Bool',
);
has apiurl => (
@@ -22,9 +21,9 @@
lazy => 1,
default => sub {
return ($_[0]->use_oscrc)
- ? $_[0]->oscrc->{general}->{apiurl}
+ ? $_[0]->oscrc->{general}->{apiurl}
: 'https://api.opensuse.org/public';
- }
+ },
);
has user => (
@@ -34,8 +33,8 @@
default => sub {
my $self = shift;
return $self->oscrc->{$self->apiurl}->{user} if ($self->use_oscrc);
- return ''
- }
+ return q{};
+ },
);
has pass => (
@@ -45,8 +44,8 @@
default => sub {
my $self = shift;
return $self->oscrc->{$self->apiurl}->{pass} if ($self->use_oscrc);
- return ''
- }
+ return q{};
+ },
);
@@ -58,19 +57,20 @@
my $self = shift;
my $ua = LWP::UserAgent->new;
if ($ENV{NET_OBS_CLIENT_DEBUG}) {
- require LWP::ConsoleLogger::Easy;
- LWP::ConsoleLogger::Easy->import('debug_ua');
- debug_ua($ua);
+ eval {
+ require LWP::ConsoleLogger::Easy;
+ LWP::ConsoleLogger::Easy->import('debug_ua');
+ debug_ua($ua);
+ };
}
$ua->timeout(10);
$ua->env_proxy;
return $ua
- }
-
+ },
);
-has oscrc => (
+has oscrc => (
is => 'rw',
isa => 'Object',
lazy => 1,
@@ -81,21 +81,29 @@
} elsif (-f "$ENV{HOME}/.config/osc/oscrc") {
$rc = "$ENV{HOME}/.config/osc/oscrc";
} else {
- die "No oscrc found";
+ die "No oscrc found\n";
}
my $cf = Config::Tiny->read($rc);
- die "Cannot open .oscrc" if ! $cf;
+ die "Cannot open .oscrc\n" if ! $cf;
return $cf;
- }
+ },
+);
+
+has repository => (
+ is => 'rw',
+ isa => 'Str',
+);
+has arch => (
+ is => 'rw',
+ isa => 'Str',
);
sub debug {
- if ( $ENV{NET_OBS_CLIENT_DEBUG} ){
- foreach my $line (@_) {
- say $line
- }
- }
+ my @lines = @_;
+ return if (! $ENV{NET_OBS_CLIENT_DEBUG} );
+ for (@lines) {print "$_\n"};
+ return;
}
sub request {
@@ -115,11 +123,10 @@
my $response = $ua->request($req);
- if ($response->is_success) {
- return $response->decoded_content; # or whatever
- } else {
- die $response->status_line . " while $method Request on $url\n";
+ if (!$response->is_success) {
+ die $response->status_line . " while $method Request on $url\n";
}
+ return $response->decoded_content; # or whatever
}
1; # End of Net::OBS::Client
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/lib/Net/OBS/Client.pm
new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client.pm
--- old/Net-OBS-Client/lib/Net/OBS/Client.pm 2021-01-13 11:42:55.162028131
+0100
+++ new/Net-OBS-Client-0.0.8/lib/Net/OBS/Client.pm 2021-01-19
13:35:47.029080262 +0100
@@ -6,34 +6,36 @@
use Net::OBS::Client::BuildResults;
-with "Net::OBS::Client::Roles::Client";
+with 'Net::OBS::Client::Roles::Client';
-our $VERSION = '0.0.6';
+our $VERSION = '0.0.8';
sub project {
- my $self = shift;
+ my ($self, @args) = @_;
return Net::OBS::Client::Project->new(
apiurl => $self->apiurl,
use_oscrc => $self->use_oscrc,
- @_
+ repository => $self->repository,
+ arch => $self->arch,
+ @args,
);
}
sub package {
- my $self = shift;
+ my ($self, @args) = @_;
return Net::OBS::Client::Package->new(
apiurl => $self->apiurl,
use_oscrc => $self->use_oscrc,
- @_
+ @args,
);
}
sub buildresults {
- my $self = shift;
+ my ($self, @args) = @_;
return Net::OBS::Client::BuildResults->new(
apiurl => $self->apiurl,
use_oscrc => $self->use_oscrc,
- @_
+ @args,
);
}
@@ -49,23 +51,23 @@
#
use Net::OBS::Client;
- my $c = Net::OBS::Client->new(
+ my $client = Net::OBS::Client->new(
apiurl => $apiurl,
use_oscrc => 0,
);
- my $prj = $c->project(
+ my $prj = $client->project(
name => $project,
);
- my $pkg = $c->package(
+ my $pkg = $client->package(
project => 'OBS:Server:Unstable',
name => 'obs-server',
repository => 'openSUSE_Factory',
arch => 'x86_64',
);
- my $res = $c->buildresults(
+ my $res = $client->buildresults(
project => $project,
package => $package,
repository => $repo,
@@ -100,6 +102,23 @@
Net::OBS::Client aims to simplify usage of OBS (https://openbuildservice.org)
API calls in perl.
+=head1 SUBROUTINES/METHODS
+
+=over 4
+
+=item * $client->project
+
+Returns a L<Net::OBS::Client::Project> object.
+
+=item * $client->package
+
+Returns a L<Net::OBS::Client::Package> object.
+
+=item * $client->buildresults
+
+Returns a L<Net::OBS::Client::BuildResults> object.
+
+=back
=head1 AUTHOR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/t/01-Net_OBS_Client.t
new/Net-OBS-Client-0.0.8/t/01-Net_OBS_Client.t
--- old/Net-OBS-Client/t/01-Net_OBS_Client.t 1970-01-01 01:00:00.000000000
+0100
+++ new/Net-OBS-Client-0.0.8/t/01-Net_OBS_Client.t 2021-01-19
11:43:42.452697298 +0100
@@ -0,0 +1,352 @@
+use strict;
+use warnings;
+
+use FindBin;
+
+BEGIN {
+ unshift @::INC, "$FindBin::Bin/../lib";
+}
+
+use Test::More tests => 14;
+use Data::Dumper;
+
+use Test::HTTP::MockServer;
+
+#osc api /build/OBS:Server:Unstable/images/x86_64/OBS-Appliance:qcow2/_status
+#<status package="OBS-Appliance:qcow2" code="succeeded">
+# <details></details>
+#</status>
+
+my $project = 'devel:languages:perl';
+my $package = 'perl-Net-OBS-Client';
+my $repo = "openSUSE_Leap_15.2";
+my $arch = "x86_64";
+
+my $server = Test::HTTP::MockServer->new();
+
+my $apiurl = $server->url_base();
+
+my $handle_request_phase1 = sub {
+ my ($request, $response) = @_;
+ my $results = {
+
+ #osc api
/build/OBS:Server:Unstable/images/x86_64/OBS-Appliance:qcow2/_status
+ "///build/$project/$repo/$arch/$package/_status"
+ => sub {
+ $response->content('
+<status package="'.$package.'" code="succeeded">
+ <details></details>
+</status>
+');
+ },
+
+ # osc api
"/build/devel:languages:perl/openSUSE_Leap_15.2/x86_64/perl-Net-OBS-Client"
+ "///build/$project/$repo/$arch/$package"
+ => sub {
+ $response->content('
+<binarylist>
+ <binary filename="_buildenv" size="155913" mtime="1610717523"/>
+ <binary filename="_statistics" size="1028" mtime="1610717523"/>
+ <binary filename="perl-Net-OBS-Client-0.0.6-lp152.3.1.noarch.rpm"
size="22500" mtime="1610717523"/>
+ <binary filename="perl-Net-OBS-Client-0.0.6-lp152.3.1.src.rpm" size="19159"
mtime="1610717523"/>
+ <binary filename="rpmlint.log" size="386" mtime="1610717523"/>
+</binarylist>
+');
+ },
+
+ # osc api
"/build/devel:languages:perl/openSUSE_Leap_15.2/x86_64/perl-Net-OBS-Client/perl-Net-OBS-Client-0.0.6-lp152.3.1.noarch.rpm?view=fileinfo"
+
"///build/$project/$repo/$arch/$package/perl-Net-OBS-Client-0.0.6-lp152.3.1.noarch.rpm?view=fileinfo"
+ => sub {
+ $response->content('
+<fileinfo filename="perl-Net-OBS-Client-0.0.6-lp152.3.1.noarch.rpm">
+ <name>perl-Net-OBS-Client</name>
+ <version>0.0.6</version>
+ <release>lp152.3.1</release>
+ <arch>noarch</arch>
+ <source>perl-Net-OBS-Client</source>
+ <summary>Simple OBS API calls</summary>
+ <description>Net::OBS::Client aims to simplify usage of OBS
+(https://openbuildservice.org) API calls in perl.</description>
+ <size>22500</size>
+ <mtime>1610717523</mtime>
+ <provides>perl(Net::OBS::Client) = 0.0.6</provides>
+ <provides>perl(Net::OBS::Client::BuildResults)</provides>
+ <provides>perl(Net::OBS::Client::DTD)</provides>
+ <provides>perl(Net::OBS::Client::Package)</provides>
+ <provides>perl(Net::OBS::Client::Project)</provides>
+ <provides>perl(Net::OBS::Client::Roles::BuildStatus)</provides>
+ <provides>perl(Net::OBS::Client::Roles::Client)</provides>
+ <provides>perl-Net-OBS-Client = 0.0.6-lp152.3.1</provides>
+ <requires>perl(:MODULE_COMPAT_5.26.1)</requires>
+ <requires>perl(Config::INI::Reader)</requires>
+ <requires>perl(Config::Tiny)</requires>
+ <requires>perl(HTTP::Cookies)</requires>
+ <requires>perl(HTTP::Request)</requires>
+ <requires>perl(LWP::UserAgent)</requires>
+ <requires>perl(Moose)</requires>
+ <requires>perl(Moose::Role)</requires>
+ <requires>perl(Path::Class)</requires>
+ <requires>perl(URI::URL)</requires>
+ <requires>perl(XML::Structured)</requires>
+</fileinfo>
+');
+ },
+ # /build/devel:languages:perl/_result?package=perl-Net-OBS-Client
+ "///build/$project/_result?package=$package"
+ => sub {
+ $response->content('
+<resultlist state="14e39e302c4c6c21e72da11bf5e97888">
+ <result project="devel:languages:perl" repository="openSUSE_Leap_15.3"
arch="x86_64" code="published" state="published" dirty="true">
+ <status package="perl-Net-OBS-Client" code="succeeded"/>
+ </result>
+ <result project="devel:languages:perl" repository="openSUSE_Leap_15.2"
arch="x86_64" code="published" state="published" dirty="true">
+ <status package="perl-Net-OBS-Client" code="succeeded"/>
+ </result>
+ <result project="devel:languages:perl" repository="openSUSE_Leap_15.1"
arch="x86_64" code="published" state="published" dirty="true">
+ <status package="perl-Net-OBS-Client" code="succeeded"/>
+ </result>
+ <result project="devel:languages:perl" repository="openSUSE_Leap_15.0"
arch="x86_64" code="published" state="published" dirty="true">
+ <status package="perl-Net-OBS-Client" code="succeeded"/>
+ </result>
+</resultlist>
+');
+ },
+ };
+ if ($results->{$request->uri}) {
+ $results->{$request->uri}->();
+ } else {
+ $response->code(404);
+ $response->message("NOT FOUND");
+ $response->content("Result for ".$request->uri." not defined");
+ }
+
+};
+
+$server->start_mock_server($handle_request_phase1);
+
+my $got;
+my $expected;
+################################################################################
+# TESTS FOR Net::OBS::Client
+use_ok('Net::OBS::Client');
+
+my $obj = Net::OBS::Client->new(
+ apiurl => $apiurl,
+ repository => $repo,
+ arch => $arch,
+ use_oscrc => 0,
+);
+
+my $obj2 = Net::OBS::Client->new(
+ apiurl => $apiurl,
+ repository => 'unknown',
+ arch => 'unknown',
+ use_oscrc => 0,
+);
+
+# END Net::OBS::Client->project tests
+my $prj = $obj->project(name=>$project);
+$expected = {
+ 'state' => '14e39e302c4c6c21e72da11bf5e97888',
+ 'result' => [
+ {
+ 'dirty' => 'true',
+ 'code' => 'published',
+ 'project' => 'devel:languages:perl',
+ 'state' => 'published',
+ 'status' => [
+ {
+ 'code' => 'succeeded',
+ 'package' => 'perl-Net-OBS-Client'
+ }
+ ],
+ 'arch' => 'x86_64',
+ 'repository' => 'openSUSE_Leap_15.3'
+ },
+ {
+ 'state' => 'published',
+ 'project' => 'devel:languages:perl',
+ 'code' => 'published',
+ 'dirty' => 'true',
+ 'repository' => 'openSUSE_Leap_15.2',
+ 'arch' => 'x86_64',
+ 'status' => [
+ {
+ 'package' => 'perl-Net-OBS-Client',
+ 'code' => 'succeeded'
+ }
+ ]
+ },
+ {
+ 'status' => [
+ {
+ 'package' => 'perl-Net-OBS-Client',
+ 'code' => 'succeeded'
+ }
+ ],
+ 'arch' => 'x86_64',
+ 'repository' => 'openSUSE_Leap_15.1',
+ 'dirty' => 'true',
+ 'code' => 'published',
+ 'project' => 'devel:languages:perl',
+ 'state' => 'published'
+ },
+ {
+ 'state' => 'published',
+ 'project' => 'devel:languages:perl',
+ 'code' => 'published',
+ 'dirty' => 'true',
+ 'repository' => 'openSUSE_Leap_15.0',
+ 'arch' => 'x86_64',
+ 'status' => [
+ {
+ 'package' => 'perl-Net-OBS-Client',
+ 'code' => 'succeeded'
+ }
+ ]
+ }
+ ]
+ };
+
+$got = $prj->fetch_resultlist(package => $package);
+is_deeply($got, $expected, "Checking Client->project->fetch_resultlist");
+is($prj->code, 'published', "Checking Client->project->code");
+is($prj->dirty, 1, "Checking Client->project->dirty");
+
+$prj = $obj2->project(name=>$project, repository=>$repo, arch=>$arch);
+$got = $prj->fetch_resultlist(package => $package);
+is_deeply($got, $expected, "Checking Client->project->fetch_resultlist
(obj2)");
+# END Net::OBS::Client->project tests
+# TESTS FOR Net::OBS::Client::Project END
+################################################################################
+
+################################################################################
+# TESTS FOR Net::OBS::Client::Project
+use_ok('Net::OBS::Client::Project');
+
+$prj = Net::OBS::Client::Project->new(
+ apiurl => $apiurl,
+ name => $project,
+);
+
+$got = $prj->fetch_resultlist(package => $package);
+is_deeply($got, $expected, "Checking
Net::OBS::Client::Project->fetch_resultlist");
+is($prj->code($repo, $arch), 'published', "Checking
Net::OBS::Client::Project->code");
+is($prj->dirty($repo, $arch), 1, "Checking Net::OBS::Client::Project->dirty");
+
+# TESTS FOR Net::OBS::Client::Project END
+################################################################################
+
+################################################################################
+# TESTS FOR Net::OBS::Client::Package
+use_ok('Net::OBS::Client::Package');
+
+my $pkg = Net::OBS::Client::Package->new(
+ apiurl => $apiurl,
+ name => $package,
+ project => $project,
+ repository => $repo,
+ arch => $arch,
+ use_oscrc => 0,
+);
+
+$pkg->fetch_status;
+
+is($pkg->code, "succeeded", "Checking package status result 'succeeded'") ;
+
+# TESTS FOR Net::OBS::Client::Package END
+################################################################################
+
+################################################################################
+# TESTS FOR Net::OBS::Client::BuildResults
+use_ok('Net::OBS::Client::BuildResults');
+
+# osc api /build/OBS:Server:Unstable/openSUSE_15.2/x86_64/obs-server
+my $res = Net::OBS::Client::BuildResults->new(
+ apiurl => $apiurl,
+ project => $project,
+ package => $package,
+ repository => $repo,
+ arch => $arch,
+ );
+
+$got = $res->binarylist;
+$expected = [
+ {
+ 'mtime' => '1610717523',
+ 'size' => '155913',
+ 'filename' => '_buildenv'
+ },
+ {
+ 'mtime' => '1610717523',
+ 'filename' => '_statistics',
+ 'size' => '1028'
+ },
+ {
+ 'mtime' => '1610717523',
+ 'size' => '22500',
+ 'filename' => 'perl-Net-OBS-Client-0.0.6-lp152.3.1.noarch.rpm'
+ },
+ {
+ 'size' => '19159',
+ 'filename' => 'perl-Net-OBS-Client-0.0.6-lp152.3.1.src.rpm',
+ 'mtime' => '1610717523'
+ },
+ {
+ 'mtime' => '1610717523',
+ 'filename' => 'rpmlint.log',
+ 'size' => '386'
+ }
+ ];
+
+is_deeply($got, $expected, "Checking method 'binarylist'");
+
+$expected = {
+ 'provides' => [
+ 'perl(Net::OBS::Client) = 0.0.6',
+ 'perl(Net::OBS::Client::BuildResults)',
+ 'perl(Net::OBS::Client::DTD)',
+ 'perl(Net::OBS::Client::Package)',
+ 'perl(Net::OBS::Client::Project)',
+ 'perl(Net::OBS::Client::Roles::BuildStatus)',
+ 'perl(Net::OBS::Client::Roles::Client)',
+ 'perl-Net-OBS-Client = 0.0.6-lp152.3.1'
+ ],
+ 'name' => 'perl-Net-OBS-Client',
+ 'release' => 'lp152.3.1',
+ 'arch' => 'noarch',
+ 'version' => '0.0.6',
+ 'source' => 'perl-Net-OBS-Client',
+ 'filename' => 'perl-Net-OBS-Client-0.0.6-lp152.3.1.noarch.rpm',
+ 'description' => 'Net::OBS::Client aims to simplify usage of OBS
+(https://openbuildservice.org) API calls in perl.',
+ 'size' => '22500',
+ 'mtime' => '1610717523',
+ 'requires' => [
+ 'perl(:MODULE_COMPAT_5.26.1)',
+ 'perl(Config::INI::Reader)',
+ 'perl(Config::Tiny)',
+ 'perl(HTTP::Cookies)',
+ 'perl(HTTP::Request)',
+ 'perl(LWP::UserAgent)',
+ 'perl(Moose)',
+ 'perl(Moose::Role)',
+ 'perl(Path::Class)',
+ 'perl(URI::URL)',
+ 'perl(XML::Structured)'
+ ],
+ 'summary' => 'Simple OBS API calls'
+ };
+
+$got = $res->fileinfo('perl-Net-OBS-Client-0.0.6-lp152.3.1.noarch.rpm');
+is_deeply($got, $expected, "Checking method 'fileinfo'");
+
+# TESTS FOR Net::OBS::Client::BuildResults END
+################################################################################
+
+$server->stop_mock_server();
+
+exit 0;
+
+__END__
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/t/01-Net_OBS_Client.t.disabled
new/Net-OBS-Client-0.0.8/t/01-Net_OBS_Client.t.disabled
--- old/Net-OBS-Client/t/01-Net_OBS_Client.t.disabled 2019-10-02
09:41:18.717611195 +0200
+++ new/Net-OBS-Client-0.0.8/t/01-Net_OBS_Client.t.disabled 1970-01-01
01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 1; # last test to print
-use Data::Dumper;
-
-require_ok('Net::OBS::Client');
-
-my $obs_client = Net::OBS::Client->new();
-
-print Dumper(
- $obs_client->request('GET'=>'/source/openSUSE:Tools')
-);
-
-my $oc2 = Net::OBS::Client->new(use_oscrc=>1);
-
-print Dumper(
- $oc2->request('GET'=>'/source/openSUSE:Tools')
-);
-
-exit 0;
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Net-OBS-Client/t/01-Net_OBS_Client_BuildResults.t.disabled
new/Net-OBS-Client-0.0.8/t/01-Net_OBS_Client_BuildResults.t.disabled
--- old/Net-OBS-Client/t/01-Net_OBS_Client_BuildResults.t.disabled
2019-10-02 09:41:18.717611195 +0200
+++ new/Net-OBS-Client-0.0.8/t/01-Net_OBS_Client_BuildResults.t.disabled
1970-01-01 01:00:00.000000000 +0100
@@ -1,31 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 1; # last test to print
-use Data::Dumper;
-
-require_ok('Net::OBS::Client::BuildResults');
-
-my $build_results = Net::OBS::Client::BuildResults->new(
- project => "OBS:Server:Unstable",
- repository => "images",
- arch => "x86_64",
- package => "OBS-Appliance-qcow2",
- use_oscrc => 1
-);
-
-
-my $bl = $build_results->binarylist();
-print Dumper($bl);
-my $bin = undef;
-foreach my $result (@$bl) {
- if ($result->{filename} =~ /\.qcow2$/ ) {
- $bin = $result->{filename};
- }
-}
-if ($bin) {
- print "bin: $bin\n";
- print Dumper($build_results->fileinfo($bin));
-}
-exit 0;
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Net-OBS-Client/t/02-Net_OBS_Client_Package.t.disabled
new/Net-OBS-Client-0.0.8/t/02-Net_OBS_Client_Package.t.disabled
--- old/Net-OBS-Client/t/02-Net_OBS_Client_Package.t.disabled 2019-10-02
09:41:18.717611195 +0200
+++ new/Net-OBS-Client-0.0.8/t/02-Net_OBS_Client_Package.t.disabled
1970-01-01 01:00:00.000000000 +0100
@@ -1,26 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 1; # last test to print
-use Data::Dumper;
-
-require_ok('Net::OBS::Client::Package');
-
-my $pkg = Net::OBS::Client::Package->new(
- name=> "obs-server",
- project=> "home:M0ses:branches:OBS:Server:Unstable",
- repository => "openSUSE_42.1",
- arch=> "x86_64",
- use_oscrc => 1
-);
-
-#print Dumper($build_results->resultlist());
-
-#print Dumper($build_results->result());
-
-print Dumper($pkg->fetch_status);
-
-print $pkg->code . "\n";
-
-exit 0;
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Net-OBS-Client/t/03-Net_OBS_Client_Project.t.disabled
new/Net-OBS-Client-0.0.8/t/03-Net_OBS_Client_Project.t.disabled
--- old/Net-OBS-Client/t/03-Net_OBS_Client_Project.t.disabled 2019-10-02
09:41:18.717611195 +0200
+++ new/Net-OBS-Client-0.0.8/t/03-Net_OBS_Client_Project.t.disabled
1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More tests => 1; # last test to print
-use Data::Dumper;
-
-require_ok('Net::OBS::Client::Project');
-
-my $prj = Net::OBS::Client::Project->new(
- name => "home:M0ses:branches:OBS:Server:Unstable",
-);
-
-#print Dumper($build_results->resultlist());
-
-#print Dumper($build_results->result());
-
-#print Dumper($prj->resultlist);
-
-print $prj->code("images","x86_64") . "\n";
-print $prj->dirty("images","x86_64") . "\n";
-
-exit 0;
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Net-OBS-Client/xt/boilerplate.t
new/Net-OBS-Client-0.0.8/xt/boilerplate.t
--- old/Net-OBS-Client/xt/boilerplate.t 2019-10-02 09:41:18.717611195 +0200
+++ new/Net-OBS-Client-0.0.8/xt/boilerplate.t 1970-01-01 01:00:00.000000000
+0100
@@ -1,57 +0,0 @@
-#!perl -T
-use 5.006;
-use strict;
-use warnings;
-use Test::More;
-
-plan tests => 3;
-
-sub not_in_file_ok {
- my ($filename, %regex) = @_;
- open( my $fh, '<', $filename )
- or die "couldn't open $filename for reading: $!";
-
- my %violated;
-
- while (my $line = <$fh>) {
- while (my ($desc, $regex) = each %regex) {
- if ($line =~ $regex) {
- push @{$violated{$desc}||=[]}, $.;
- }
- }
- }
-
- if (%violated) {
- fail("$filename contains boilerplate text");
- diag "$_ appears on lines @{$violated{$_}}" for keys %violated;
- } else {
- pass("$filename contains no boilerplate text");
- }
-}
-
-sub module_boilerplate_ok {
- my ($module) = @_;
- not_in_file_ok($module =>
- 'the great new $MODULENAME' => qr/ - The great new /,
- 'boilerplate description' => qr/Quick summary of what the module/,
- 'stub function definition' => qr/function[12]/,
- );
-}
-
-TODO: {
- local $TODO = "Need to replace the boilerplate text";
-
- not_in_file_ok(README =>
- "The README is used..." => qr/The README is used/,
- "'version information here'" => qr/to provide version information/,
- );
-
- not_in_file_ok(Changes =>
- "placeholder date/time" => qr(Date/time)
- );
-
- module_boilerplate_ok('lib/Net/OBS/Client.pm');
-
-
-}
-
++++++ cpanspec.yml ++++++
---
#description_paragraphs: 3
#description: |-
# override description from CPAN
#summary: override summary from CPAN
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
# bar.patch:
# baz.patch: PATCH-FIX-OPENSUSE
#preamble: |-
# BuildRequires: gcc-c++
#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
#post_build: |-
# rm unused.files
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module
#skip_doc: regexp_to_skip_for_doc.*
#add_doc: files to add to docs
#misc: |-
#anything else to be added to spec file
#follows directly after %files section, so it can contain new blocks or also
#changes to %files section