diff options
| -rw-r--r-- | Changelog | 16 | ||||
| -rw-r--r-- | Dockerfile | 4 | ||||
| -rwxr-xr-x | bin/hafas-m | 4 | ||||
| m--------- | ext/transport-apis | 0 | ||||
| -rw-r--r-- | lib/Travel/Status/DE/HAFAS.pm | 14 | ||||
| -rw-r--r-- | lib/Travel/Status/DE/HAFAS/Journey.pm | 6 | ||||
| -rw-r--r-- | lib/Travel/Status/DE/HAFAS/Location.pm | 4 | ||||
| -rw-r--r-- | lib/Travel/Status/DE/HAFAS/Message.pm | 4 | ||||
| -rw-r--r-- | lib/Travel/Status/DE/HAFAS/Polyline.pm | 2 | ||||
| -rw-r--r-- | lib/Travel/Status/DE/HAFAS/Product.pm | 4 | ||||
| -rw-r--r-- | lib/Travel/Status/DE/HAFAS/Services.pm.PL | 3 | ||||
| -rw-r--r-- | lib/Travel/Status/DE/HAFAS/Stop.pm | 4 | ||||
| -rw-r--r-- | lib/Travel/Status/DE/HAFAS/StopFinder.pm | 4 | ||||
| -rwxr-xr-x | scripts/check-hafas-urls | 2 | ||||
| -rwxr-xr-x | scripts/makedeb-docker | 2 |
15 files changed, 46 insertions, 27 deletions
@@ -1,3 +1,19 @@ +Travel::Status::DE::HAFAS 6.24 - Sat Dec 13 2025 + + * station: Fix result->station->{eva} key + +Travel::Status::DE::HAFAS 6.23 - Wed Sep 07 2025 + + * Update URL for NAHSH service + +Travel::Status::DE::HAFAS 6.22 - Wed Jul 16 2025 + + * Add CFL service + +Travel::Status::DE::HAFAS 6.21 - Wed Jun 25 2025 + + * Stop: Handle platform specifiers provided by HAFAS v1 instances + Travel::Status::DE::HAFAS 6.20 - Tue Mar 25 2025 * hafas-m: Change default service to ÖBB @@ -1,4 +1,4 @@ -FROM perl:5.30-slim +FROM perl:5.40-slim COPY bin/ /app/bin/ COPY ext/ /app/ext/ @@ -11,7 +11,7 @@ ARG DEBIAN_FRONTEND=noninteractive ARG APT_LISTCHANGES_FRONTEND=none RUN apt-get update \ - && apt-get -y --no-install-recommends install ca-certificates curl gcc libc6-dev libssl1.1 libssl-dev make zlib1g-dev \ + && apt-get -y --no-install-recommends install ca-certificates curl gcc libc6-dev libssl3 libssl-dev make zlib1g-dev \ && cpanm -n --no-man-pages --installdeps . \ && perl Build.PL \ && perl Build \ diff --git a/bin/hafas-m b/bin/hafas-m index 2b29767..2d458ec 100755 --- a/bin/hafas-m +++ b/bin/hafas-m @@ -3,7 +3,7 @@ use strict; use warnings; use 5.014; -our $VERSION = '6.20'; +our $VERSION = '6.24'; use utf8; use DateTime; @@ -725,7 +725,7 @@ B<hafas-m> [B<-s> I<service>] [B<-l> I<language>] B<!>I<query>|I<journeyID> =head1 VERSION -version 6.20 +version 6.24 =head1 DESCRIPTION diff --git a/ext/transport-apis b/ext/transport-apis -Subproject d6e354679a91485e3f125497882213a41dfb2a2 +Subproject 69c5fb894185640b4e302e8f4ab7e319d6d4d9d diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm index fae1ed0..3cd9bef 100644 --- a/lib/Travel/Status/DE/HAFAS.pm +++ b/lib/Travel/Status/DE/HAFAS.pm @@ -23,7 +23,7 @@ use Travel::Status::DE::HAFAS::Product; use Travel::Status::DE::HAFAS::Services; use Travel::Status::DE::HAFAS::StopFinder; -our $VERSION = '6.20'; +our $VERSION = '6.24'; # {{{ Endpoint Definition @@ -41,6 +41,10 @@ sub new { my $ua = $conf{user_agent}; + if ( defined $service and not exists $hafas_instance->{$service} ) { + confess("The service '$service' is not supported"); + } + if ( not $ua ) { my %lwp_options = %{ $conf{lwp_options} // { timeout => 10 } }; if ( $service and $hafas_instance->{$service}{ua_string} ) { @@ -79,10 +83,6 @@ sub new { confess("You must specify a service"); } - if ( defined $service and not exists $hafas_instance->{$service} ) { - confess("The service '$service' is not supported"); - } - my $now = DateTime->now( time_zone => $hafas_instance->{$service}{time_zone} // 'Europe/Berlin' ); my $self = { @@ -805,7 +805,7 @@ sub station { for my $result ( $self->results ) { $eva_count{ $result->station_eva } += 1; $name_count{ $result->station } += 1; - $eva_by_name{ $result->station_eva } = $result->station; + $eva_by_name{ $result->station } = $result->station_eva; } my @most_frequent_evas = map { $_->[0] } sort { $b->[1] <=> $a->[1] } @@ -913,7 +913,7 @@ monitors =head1 VERSION -version 6.20 +version 6.24 =head1 DESCRIPTION diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm index ad2d67e..cecbfa8 100644 --- a/lib/Travel/Status/DE/HAFAS/Journey.pm +++ b/lib/Travel/Status/DE/HAFAS/Journey.pm @@ -11,13 +11,13 @@ use DateTime::Format::Strptime; use List::Util qw(any uniq); use Travel::Status::DE::HAFAS::Stop; -our $VERSION = '6.20'; +our $VERSION = '6.24'; Travel::Status::DE::HAFAS::Journey->mk_ro_accessors( qw(datetime sched_datetime rt_datetime tz_offset is_additional is_cancelled is_partially_cancelled station station_eva platform sched_platform rt_platform operator - product product_at + product id name type type_long class number line line_no load delay route_end route_start origin destination direction) ); @@ -437,7 +437,7 @@ journey received by Travel::Status::DE::HAFAS =head1 VERSION -version 6.20 +version 6.24 =head1 DESCRIPTION diff --git a/lib/Travel/Status/DE/HAFAS/Location.pm b/lib/Travel/Status/DE/HAFAS/Location.pm index 13837d8..65cdfe2 100644 --- a/lib/Travel/Status/DE/HAFAS/Location.pm +++ b/lib/Travel/Status/DE/HAFAS/Location.pm @@ -6,7 +6,7 @@ use 5.014; use parent 'Class::Accessor'; -our $VERSION = '6.20'; +our $VERSION = '6.24'; Travel::Status::DE::HAFAS::Location->mk_ro_accessors( qw(lid type name eva state lat lon distance_m weight)); @@ -57,7 +57,7 @@ Travel::Status::DE::HAFAS::Location - A single public transit location =head1 VERSION -version 6.20 +version 6.24 =head1 DESCRIPTION diff --git a/lib/Travel/Status/DE/HAFAS/Message.pm b/lib/Travel/Status/DE/HAFAS/Message.pm index a63dfec..c78b0e0 100644 --- a/lib/Travel/Status/DE/HAFAS/Message.pm +++ b/lib/Travel/Status/DE/HAFAS/Message.pm @@ -6,7 +6,7 @@ use 5.014; use parent 'Class::Accessor'; -our $VERSION = '6.20'; +our $VERSION = '6.24'; Travel::Status::DE::HAFAS::Message->mk_ro_accessors( qw(short type text code prio is_him ref_count)); @@ -69,7 +69,7 @@ Travel::Status::DE::HAFAS::Message - An arrival/departure-related message. =head1 VERSION -version 6.20 +version 6.24 =head1 DESCRIPTION diff --git a/lib/Travel/Status/DE/HAFAS/Polyline.pm b/lib/Travel/Status/DE/HAFAS/Polyline.pm index 8338489..cf50eef 100644 --- a/lib/Travel/Status/DE/HAFAS/Polyline.pm +++ b/lib/Travel/Status/DE/HAFAS/Polyline.pm @@ -16,7 +16,7 @@ use 5.014; use parent 'Exporter'; our @EXPORT_OK = qw(decode_polyline); -our $VERSION = '6.20'; +our $VERSION = '6.24'; # Translated this php script # <http://unitstep.net/blog/2008/08/02/decoding-google-maps-encoded-polylines-using-php/> diff --git a/lib/Travel/Status/DE/HAFAS/Product.pm b/lib/Travel/Status/DE/HAFAS/Product.pm index ff3fbfb..e771722 100644 --- a/lib/Travel/Status/DE/HAFAS/Product.pm +++ b/lib/Travel/Status/DE/HAFAS/Product.pm @@ -8,7 +8,7 @@ use 5.014; use parent 'Class::Accessor'; -our $VERSION = '6.20'; +our $VERSION = '6.24'; Travel::Status::DE::HAFAS::Product->mk_ro_accessors( qw(class line_id line_no name number type type_long operator)); @@ -105,7 +105,7 @@ associated with a journey. =head1 VERSION -version 6.20 +version 6.24 =head1 DESCRIPTION diff --git a/lib/Travel/Status/DE/HAFAS/Services.pm.PL b/lib/Travel/Status/DE/HAFAS/Services.pm.PL index 7740d29..d75f9c3 100644 --- a/lib/Travel/Status/DE/HAFAS/Services.pm.PL +++ b/lib/Travel/Status/DE/HAFAS/Services.pm.PL @@ -118,6 +118,7 @@ my %hafas_instance = ( load_instance( 'de/bvg', lang => 'deu' ), stopfinder => 'https://bvg-apps-ext.hafas.de/bin/ajax-getstop.exe', }, + CFL => { load_instance( 'lu/cfl', lang => 'fr', ver => '1.43' ) }, CMTA => { load_instance( 'us/cmta', @@ -242,7 +243,7 @@ use warnings; use 5.014; use utf8; -our $VERSION = '6.20'; +our $VERSION = '6.24'; # Most of these have been adapted from # <https://github.com/public-transport/transport-apis> and diff --git a/lib/Travel/Status/DE/HAFAS/Stop.pm b/lib/Travel/Status/DE/HAFAS/Stop.pm index acee919..bed9fe6 100644 --- a/lib/Travel/Status/DE/HAFAS/Stop.pm +++ b/lib/Travel/Status/DE/HAFAS/Stop.pm @@ -8,7 +8,7 @@ use 5.014; use parent 'Class::Accessor'; -our $VERSION = '6.20'; +our $VERSION = '6.24'; Travel::Status::DE::HAFAS::Stop->mk_ro_accessors( qw(loc @@ -229,7 +229,7 @@ Travel::Status::DE::HAFAS::Stop - Information about a HAFAS stop. =head1 VERSION -version 6.20 +version 6.24 =head1 DESCRIPTION diff --git a/lib/Travel/Status/DE/HAFAS/StopFinder.pm b/lib/Travel/Status/DE/HAFAS/StopFinder.pm index 4085779..0af5344 100644 --- a/lib/Travel/Status/DE/HAFAS/StopFinder.pm +++ b/lib/Travel/Status/DE/HAFAS/StopFinder.pm @@ -10,7 +10,7 @@ use Encode qw(decode); use JSON; use LWP::UserAgent; -our $VERSION = '6.20'; +our $VERSION = '6.24'; # {{{ Constructors @@ -180,7 +180,7 @@ finder services =head1 VERSION -version 6.20 +version 6.24 =head1 DESCRIPTION diff --git a/scripts/check-hafas-urls b/scripts/check-hafas-urls index e955d51..fe6596d 100755 --- a/scripts/check-hafas-urls +++ b/scripts/check-hafas-urls @@ -6,9 +6,11 @@ checks="AVV Ponttor, AC BART San Francisco International Airport BART Station, San Francisco BLS Bern BVG 900003104 +CFL Luxembourg, Gare Rocade CMTA 6397 IE Dublin KVB 900000802 +mobiliteit Luxembourg, Gare Centrale NAHSH Flensburg NASA Wernigerode Hbf NVV Kassel Hauptbahnhof diff --git a/scripts/makedeb-docker b/scripts/makedeb-docker index 6c06971..ceba8f8 100755 --- a/scripts/makedeb-docker +++ b/scripts/makedeb-docker @@ -6,6 +6,6 @@ docker run --rm -v "${PWD}:/orig:ro" -v "${PWD}/scripts:/scripts:ro" \ -v "${PWD}/out:/out" -e USER=$(id -u) -e GROUP=$(id -g) \ -e "DEBEMAIL=${DEBEMAIL}" -e "DEBFULLNAME=${DEBFULLNAME}" \ -e "LOGNAME=${LOGNAME}" -e "VERSION=$(git describe --dirty)-1" \ - debian:buster /scripts/makedeb-docker-helper + debian:bookworm /scripts/makedeb-docker-helper echo "Debian package has been written to $(pwd)/out" |
