Skip to content

Commit

Permalink
Added "Vale of Glamorgan"
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed May 16, 2019
1 parent 65de7b8 commit 7b92bfb
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 20 deletions.
37 changes: 30 additions & 7 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
version: 1.0.{build}

image:
- Visual Studio 2015
- Ubuntu
- ubuntu1804

environment:
PERL5LIB: /home/appveyor/perl5/lib/perl5
AUTOMATED_TESTING: 1

platform: x64

branches:
only:
- master

skip_tags: true

install:
- cinst StrawberryPerl
- path C:\strawberry\perl\bin;C:\strawberry\perl\site\bin;C:\strawberry\c\bin;%PATH%
- mkdir %APPVEYOR_BUILD_FOLDER%\tmp
- set TMPDIR=%APPVEYOR_BUILD_FOLDER%\tmp
- cmd: if not exist "C:\strawberry" cinst StrawberryPerl --allow-empty-checksums
- cmd: path C:\strawberry\perl\bin;C:\strawberry\perl\site\bin;C:\strawberry\c\bin;%PATH%
# - cmd: cd C:\projects\%APPVEYOR_PROJECT_NAME%
- sh: sudo apt-get update -q
- sh: sudo apt-get install -y build-essential libssl-dev perl
- sh: export PATH=/home/appveyor/perl5/bin:$PATH
- perl -V
- cmd: mkdir %APPVEYOR_BUILD_FOLDER%\tmp
- cmd: set TMPDIR=%APPVEYOR_BUILD_FOLDER%\tmp
- cpan App::cpanminus
- cpanm -q --showdeps --with-develop --with-suggests . | findstr /v "^perl\>" | cpanm -n
- 'echo End install at: & time /t'
- cmd: cpanm -q --showdeps --with-develop --with-suggests . | findstr /v "^perl\>" | cpanm -n
- cpanm -v --installdeps .
- cmd: 'echo End install at: & time /t'

build_script:
- perl Makefile.PL

test_script:
- gmake test
- cmd: gmake test
- sh: make test
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ os:
# - osx

perl:
- "5.28"
- "5.26"
- "5.24"
- "5.22"
- "5.20"
Expand All @@ -12,8 +14,10 @@ perl:
- "5.14"
- "5.12"

sudo: false

before_install:
cpanm -n Devel::Cover::Report::Coveralls Test::Script Test::Pod::Spelling::CommonMistakes Test::Portability::Files Test::Taint JSON::XS
cpanm -n Devel::Cover::Report::Coveralls Test::Script Test::Pod::Spelling::CommonMistakes Test::Portability::Files

install:
- cpanm -v --installdeps --notest .
Expand Down
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ t/gv.t
t/kwalitee.t
t/manifest.t
t/metrics.t
t/no404s.t
t/noplan.t
t/pod-cm.t
t/pod.t
Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ You can also look for information at:

LICENSE AND COPYRIGHT

Copyright (C) 2012-16 Nigel Horne
Copyright (C) 2012-19 Nigel Horne

This program is released under the following licence: GPL
This program is released under the following licence: GPL2
80 changes: 78 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,81 @@ CGI-Untaint-CountyStateProvince-GB
[![Windows Build status](https://ci.appveyor.com/api/projects/status/xbcdo4fx8onmoohf/branch/master?svg=true)](https://ci.appveyor.com/project/nigelhorne/cgi-untaint-countystateprovince-gb/branch/master)
[![Dependency Status](https://dependencyci.com/github/nigelhorne/CGI-Untaint-CountyStateProvince-GB/badge)](https://dependencyci.com/github/nigelhorne/CGI-Untaint-CountyStateProvince-GB)

Information about the CGI environment
Add British counties to CGI::Untaint::CountyStateProvince tables
# NAME

CGI::Untaint::CountyStateProvince::GB - Add British counties to CGI::Untaint::CountyStateProvince tables

# VERSION

Version 0.11

# SYNOPSIS

Adds a list of British counties to the list of counties/state/provinces
which are known by the CGI::Untaint::CountyStateProvince validator so that
an HTML form sent by CGI contains a valid county.

You must include CGI::Untaint::CountyStateProvince::GB after including
CGI::Untaint, otherwise it won't work.

use CGI::Info;
use CGI::Untaint;
use CGI::Untaint::CountyStateProvince::GB;
my $info = CGI::Info->new();
my $u = CGI::Untaint->new($info->params());
# Succeeds if state = 'Kent', fails if state = 'Queensland';
$u->extract(-as_CountyStateProvince => 'state');
# ...

# SUBSOUTINES/METHODS

## is\_valid

Validates the data. See CGI::Untaint::is\_valid.

## value

Sets the raw data which is to be validated. Called by the superclass, you
are unlikely to want to call it.

# AUTHOR

Nigel Horne, `<njh at bandsman.co.uk>`

# BUGS

Please report any bugs or feature requests to `bug-cgi-untaint-csp-gb at rt.cpan.org`, or through
the web interface at [http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Untaint-CountyStateProvince](http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Untaint-CountyStateProvince). I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.

# SEE ALSO

CGI::Untaint::CountyStateProvince, CGI::Untaint

# SUPPORT

You can find documentation for this module with the perldoc command.

perldoc CGI::Untaint::CountyStateProvince::GB

You can also look for information at:

- RT: CPAN's request tracker

[http://rt.cpan.org/NoAuth/Bugs.html?Dist=CGI-Untaint-CountyStateProvince-GB](http://rt.cpan.org/NoAuth/Bugs.html?Dist=CGI-Untaint-CountyStateProvince-GB)

- CPAN Ratings

[http://cpanratings.perl.org/d/CGI-Untaint-CountyStateProvince-GB](http://cpanratings.perl.org/d/CGI-Untaint-CountyStateProvince-GB)

- Search CPAN

[http://search.cpan.org/dist/CGI-Untaint-CountyStateProvince-GB](http://search.cpan.org/dist/CGI-Untaint-CountyStateProvince-GB)

# ACKNOWLEDGEMENTS

# LICENSE AND COPYRIGHT

Copyright 2012-19 Nigel Horne.

This program is released under the following licence: GPL2
11 changes: 3 additions & 8 deletions lib/CGI/Untaint/CountyStateProvince/GB.pm
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ our %abbreviations = (
's yorkshire' => 'south yorkshire',
's glos' => 'gloucestershire',
'south gloster' => 'gloucestershire',
'vale of glamorgan' => 'glamorgan',
'westmidlands' => 'west midlands',
'west mids' => 'west midlands',
'west yorks' => 'west yorkshire',
Expand Down Expand Up @@ -248,7 +249,6 @@ You can find documentation for this module with the perldoc command.
perldoc CGI::Untaint::CountyStateProvince::GB
You can also look for information at:
=over 4
Expand All @@ -257,10 +257,6 @@ You can also look for information at:
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=CGI-Untaint-CountyStateProvince-GB>
=item * AnnoCPAN: Annotated CPAN documentation
L<http://annocpan.org/dist/CGI-Untaint-CountyStateProvince-GB>
=item * CPAN Ratings
L<http://cpanratings.perl.org/d/CGI-Untaint-CountyStateProvince-GB>
Expand All @@ -277,10 +273,9 @@ L<http://search.cpan.org/dist/CGI-Untaint-CountyStateProvince-GB>
=head1 LICENSE AND COPYRIGHT
Copyright 2012-16 Nigel Horne.
This program is released under the following licence: GPL
Copyright 2012-19 Nigel Horne.
This program is released under the following licence: GPL2
=cut

Expand Down
16 changes: 16 additions & 0 deletions t/no404s.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!perl -wT

use strict;
use warnings;
use Test::Most;

if(not $ENV{AUTHOR_TESTING}) {
plan(skip_all => 'Author tests not required for installation');
}

eval "use Test::Pod::No404s";
if($@) {
plan(skip_all => 'Test::Pod::No404s required for testing POD');
} else {
all_pod_files_ok();
}

0 comments on commit 7b92bfb

Please sign in to comment.