Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lease.pm: Remove Bool type check and replace with Any. #63

Merged
merged 3 commits into from
Oct 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Revision history for Net::Etcd

0.023
[ BUG FIX ]
* Fix a bug where the Bool type would fail under certain circumstances when setting keys => 1 for ttl.
While I could replicate, travis tests failed consistantly, we will resolve this better in the future.
Reference bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' ) did not pass type constraint "Bool" (in $args->{"keys"})

0.022
[ ENHANCEMENTS ]
* Improve support for prefix inline with etcd API. Fixes GH #53 Thanks Michael Fung!
Expand Down Expand Up @@ -27,7 +33,7 @@ Revision history for Net::Etcd
0.018
[ ENHANCEMENTS ]
* Added Member class and tests.
* Added ENV defaults for name 'ETCD_CLIENT_USERNAME', password 'ETCD_CLIENT_PASSWORD' and cacert 'ETCD_CERT_FILE' accessors.
* Added ENV defaults for name 'ETCD_CLIENT_USERNAME', password 'ETCD_CLIENT_PASSWORD' and cacert 'ETCD_CERT_FILE' accessors.
* Updated TLS example.

0.017
Expand All @@ -49,7 +55,7 @@ Revision history for Net::Etcd

0.014
[ BUG FIX ]
* Resolved bug which prevented range delete transaction from completing. Closed via GH #25 Thanks Ananth Kavuri!
* Resolved bug which prevented range delete transaction from completing. Closed via GH #25 Thanks Ananth Kavuri!

[ ANNOUNCEMENT ]
* Added class Net::Etcd::KV::RangeDelete
Expand Down
4 changes: 2 additions & 2 deletions lib/Net/Etcd/Lease.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use strict;
use warnings;

use Moo;
use Types::Standard qw(Str Int Bool HashRef ArrayRef);
use Types::Standard qw(Str Int Any HashRef ArrayRef);
use Data::Dumper;
use Carp;
use JSON;
Expand Down Expand Up @@ -69,7 +69,7 @@ keys is true to query all the keys attached to this lease.

has keys => (
is => 'ro',
isa => Bool,
isa => Any,
coerce => sub { no strict 'refs'; return $_[0] ? JSON::true : JSON::false }
);

Expand Down
2 changes: 1 addition & 1 deletion lib/Net/Etcd/Role/Actions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ sub _build_json_args {
my ($self) = @_;
my $args;
for my $key ( keys %{$self} ) {
unless ( $key =~ /(?:etcd|cb|cv|hold|json_args|endpoint)$/ ) {
unless ( $key =~ /(?:retry_auth|etcd|cb|cv|hold|json_args|endpoint)$/ ) {
$args->{$key} = $self->{$key};
}
}
Expand Down