Skip to content

Commit

Permalink
Release/v0.17 (#46)
Browse files Browse the repository at this point in the history
* increase version

* init circleci

* add rc

* dist use README, not README.md

* no PodInherit plugin

* trigger [ci][skip dummy]

* trigger [ci][skip dummy]

* remove comment in dist.init because it cannot be parsed

* add Chagnes

* typo

* no need install codecov

* use git push to test permisison

* Release Format-Util 0.17

    - Add tUSDT

* update author
  • Loading branch information
chylli-deriv authored Nov 9, 2022
1 parent d878604 commit f6e89e6
Show file tree
Hide file tree
Showing 10 changed files with 281 additions and 158 deletions.
94 changes: 94 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
alias:
- &install_dzil
run:
command: |
cpm install -g --no-test Dist::Zilla Dist::Zilla::App::Command::cover ExtUtils::MakeMaker
name: Install Dzil
- &install_author_deps
run:
name: Install dzil author dependencies
command: |
cpm install -g \
-w 2 \
--mirror=http://cpan.cpantesters.org/ $(dzil authordeps --missing)
- &install_deps
run:
name: Install dist deps
command: |
# see https://github.com/team-at-cpan/Dist-Zilla-Plugin-PodInherit/issues/1 to check why we not use
# dzil listdeps --missing directly here
cpanm --installdeps .
dzil listdeps --author --missing --cpanm-versions | xargs cpanm -n
jobs:
test:
parameters:
perl-version:
description: The Perl version we want to test with
type: string
default: "5.34"
docker:
- image: perldocker/perl-tester:<< parameters.perl-version >>
steps:
- checkout
- *install_dzil
- *install_author_deps
- *install_deps
- run:
name: Run Tests
command: |
dzil smoke --release --author && dzil cover -test -report codecov && dzil xtest
release:
docker:
- image: perldocker/perl-tester:5.34
steps:
- checkout
- *install_dzil
- *install_author_deps
- *install_deps
- run:
name: setup PAUSE account
command: |
echo -e "user $PAUSE_USER\npassword $PAUSE_PASSWORD\n" >> ~/.pause
- run:
name: setup git
command: |
git config --global user.email "circleci@binary.com"
git config --global user.name "circleci"
# set remote github because dzil will push to github
# https://metacpan.org/release/DERIV/Dist-Zilla-PluginBundle-Author-DERIV-0.003/source/lib/Dist/Zilla/PluginBundle/Author/DERIV.pm#L122
git remote add github $(git remote get-url origin)
- run:
name: Release to PAUSE
command: |
if grep -Pzq '\{\{\$NEXT\}\}\n\s*\n' Changes
then
echo "No changes, no need release"
exit 0
fi
# use git push to test permission
git push github master
echo "y\n" | DZIL_CONFIRMRELEASE_DEFAULT=y dzil release
workflows:
build-workflow:
jobs: &1
- test:
matrix:
parameters:
perl-version:
- "5.24"
- "5.26"
- "5.28"
- "5.30"
- "5.32"
- "5.34"
- release:
context: release-binary
requires:
- test
filters:
branches:
only:
- master
version: 2.1
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

18 changes: 11 additions & 7 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ Revision history for Format-Util

{{$NEXT}}

0.17 2022-10-18 01:38:02+00:00 UTC
- Add tUSDT

0.16 2021-10-21 10:40:10+00:00 UTC
Add AAD (antarctica dollar) currency to precision.yml

Expand All @@ -25,25 +28,26 @@ Revision history for Format-Util
0.09 2017-02-20 03:11:05+00:00 UTC
Switch to dzil

0.08 26/09/2016
0.08 2016-09-26 03:14:08+00:00 UTC
Fixes issue where a trailing zero would be added to integers if only a single parameter was passed to commas().

0.07 23/09/2016
0.07 2016-09-23 03:14:08+00:00 UTC
Fix bug in method commas().

0.05 24/04/2015
0.05 2015-04-24 03:14:08+00:00 UTC
Documentation fix

0.04 13/11/2014
0.04 2014-11-13 03:14:08+00:00 UTC
CPAN test report fails fixes

0.03 09/11/2014
0.03 2014-11-09 03:14:08+00:00 UTC
method virgule is being changed to commas

0.02 09/11/2014
0.02 2014-11-09 03:14:08+00:00 UTC
Make file Improvements

0.01 05/11/2014
0.01 2014-11-05 03:14:08+00:00 UTC

First version, released on an unsuspecting world.


Expand Down
29 changes: 20 additions & 9 deletions Makefile.PL
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.007.
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.024.
use strict;
use warnings;

use 5.014000;
use 5.006;

use ExtUtils::MakeMaker 6.48;
use ExtUtils::MakeMaker 7.64;

use File::ShareDir::Install;
$File::ShareDir::Install::INCLUDE_DOTFILES = 1;
Expand All @@ -14,43 +14,51 @@ install_share dist => "share";

my %WriteMakefileArgs = (
"ABSTRACT" => "Miscellaneous routines to do with manipulating with strings and numbers!",
"AUTHOR" => "binary.com <BINARY\@cpan.org>",
"AUTHOR" => "DERIV <DERIV\@cpan.org>",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.48",
"ExtUtils::MakeMaker" => "7.64",
"File::ShareDir::Install" => "0.06"
},
"DISTNAME" => "Format-Util",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.014000",
"MIN_PERL_VERSION" => "5.006",
"NAME" => "Format::Util",
"PREREQ_PM" => {
"Carp" => 0,
"Encode" => 0,
"Exporter" => 0,
"File::ShareDir" => 0,
"Math::BigFloat" => 0,
"Math::BigInt" => 0,
"POSIX" => 0,
"Scalar::Util" => 0,
"YAML::XS" => 0
"YAML::XS" => 0,
"base" => 0,
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Math::BigInt" => 0,
"Test::CheckDeps" => "0.010",
"Test::Exception" => 0,
"Test::More" => "0.94",
"Test::NoWarnings" => 0
},
"VERSION" => "0.15",
"VERSION" => "0.18",
"test" => {
"TESTS" => "t/*.t"
}
);


my %FallbackPrereqs = (
"Carp" => 0,
"Encode" => 0,
"Exporter" => 0,
"ExtUtils::MakeMaker" => 0,
"File::ShareDir" => 0,
"File::Spec" => 0,
Expand All @@ -64,7 +72,10 @@ my %FallbackPrereqs = (
"Test::Exception" => 0,
"Test::More" => "0.94",
"Test::NoWarnings" => 0,
"YAML::XS" => 0
"YAML::XS" => 0,
"base" => 0,
"strict" => 0,
"warnings" => 0
);


Expand Down
118 changes: 58 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,92 +1,90 @@
**Format::Util** - Miscellaneous routines to do with manipulating on Numbers and Strings
# NAME

[![Build Status](https://travis-ci.org/binary-com/perl-Format-Util.svg?branch=master)](https://travis-ci.org/binary-com/perl-Format-Util)
[![codecov](https://codecov.io/gh/binary-com/perl-Format-Util/branch/master/graph/badge.svg)](https://codecov.io/gh/binary-com/perl-Format-Util)
[![Gitter chat](https://badges.gitter.im/binary-com/perl-Format-Util.png)](https://gitter.im/binary-com/perl-Format-Util)
Format::Util - Miscellaneous routines to do with manipulating with strings and numbers!

# SYNOPSIS

**SYNOPSIS**
Quick summary of what the module does.

use Format::Util::Strings qw( defang defang_lite set_selected_item )
use Format::Util::Numbers qw( commas to_monetary_number_format roundnear )
Perhaps a little code snippet.

**METHODS**
use Format::Util::Numbers;
use Format::Util::Strings;

...

- **defang($string)**
# AUTHOR

Removes potentially dangerous characters from input strings.
binary.com, `<rakesh at binary.com>`

You should probably be using Untaint.
# BUGS

- **defang_lite($string)**
Please report any bugs or feature requests to `bug-format-util at rt.cpan.org`, or through
the web interface at [http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Format-Util](http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Format-Util). I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.

Removes potentially dangerous characters from input strings.
# SUPPORT

You should probably be using Untaint.

defang_lite is a lighter version that is not so restrictive as defang

- **set_selected_item($selecteditem,$optionlist)**

Sets the selected item in an <option> list.

Params :

- $selecteditem : the value of the item (usually taken from %input)

- $optionlist : The option list, as either an HTML string or a hash ref.

Returns : If hash ref given, 1 if selected item is set, false otherwise

If HTML given, the altered HTML

- **commas($number, $decimal_point)**

Produce a more human readbale number with a provided number of decimal points

commas(12345.679, 1) => 12,345.7

- **to_monetary_number_format($number,$remove_decimal_for_ints)**

Produce a nice human readable number which looks like a currency

to_monetary_number_format(123456789) => 123,456,789.00

- **roundnear($target, $input)**
You can find documentation for this module with the perldoc command.

Round a number near the precision of the supplied one.
perldoc Format::Util

roundnear( 0.01, 12345.678) => 12345.68
You can also look for information at:

- RT: CPAN's request tracker (report bugs here)

**AUTHOR**
[http://rt.cpan.org/NoAuth/Bugs.html?Dist=Format-Util](http://rt.cpan.org/NoAuth/Bugs.html?Dist=Format-Util)

binary.com, C<< <rakesh at binary.com> >>
- AnnoCPAN: Annotated CPAN documentation

**SUPPORT**
[http://annocpan.org/dist/Format-Util](http://annocpan.org/dist/Format-Util)

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

perldoc Math::Util::CalculatedValue
[http://cpanratings.perl.org/d/Format-Util](http://cpanratings.perl.org/d/Format-Util)

- Search CPAN

You can also look for information at:
[http://search.cpan.org/dist/Format-Util/](http://search.cpan.org/dist/Format-Util/)

# ACKNOWLEDGEMENTS

RT: CPAN's request tracker (report bugs here)
# LICENSE AND COPYRIGHT

<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Format-Util>
Copyright 2014 binary.com.

AnnoCPAN: Annotated CPAN documentation
This program is free software; you can redistribute it and/or modify it
under the terms of the the Artistic License (2.0). You may obtain a
copy of the full license at:

<http://annocpan.org/dist/Format-Util>
[http://www.perlfoundation.org/artistic\_license\_2\_0](http://www.perlfoundation.org/artistic_license_2_0)

CPAN Ratings
Any use, modification, and distribution of the Standard or Modified
Versions is governed by this Artistic License. By using, modifying or
distributing the Package, you accept this license. Do not use, modify,
or distribute the Package, if you do not accept this license.

<http://cpanratings.perl.org/d/Format-Util>
If your Modified Version has been derived from a Modified Version made
by someone other than you, you are nevertheless required to ensure that
your Modified Version complies with the requirements of this license.

Search CPAN
This license does not grant you the right to use any trademark, service
mark, tradename, or logo of the Copyright Holder.

<http://search.cpan.org/dist/Format-Util/>
This license includes the non-exclusive, worldwide, free-of-charge
patent license to make, have made, use, offer to sell, sell, import and
otherwise transfer the Package with respect to any patent claims
licensable by the Copyright Holder that are necessarily infringed by the
Package. If you institute patent litigation (including a cross-claim or
counterclaim) against any party alleging that the Package constitutes
direct or contributory patent infringement, then this Artistic License
to you shall terminate on the date that such litigation is filed.

Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit f6e89e6

Please sign in to comment.