From 8519118086d24784504063bbacb4b78570204708 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Sun, 22 Mar 2020 03:56:09 -0600 Subject: [PATCH 1/4] avoid fatpacking JSON::Path::Evaluator --- maint/fatpack.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/maint/fatpack.pl b/maint/fatpack.pl index 66497fa..71d436c 100755 --- a/maint/fatpack.pl +++ b/maint/fatpack.pl @@ -27,11 +27,12 @@ my $core_version = '5.010001'; my $plenv_version = '5.10.1'; my %blacklist_modules = map { $_ => 1 } ( 'perl', - 'Text::Table::ASV', # brought in by Text::Table::Any but not actually required - 'Unicode::GCString', # optional XS module + 'Text::Table::ASV', # brought in by Text::Table::Any but not actually required + 'Unicode::GCString', # optional XS module + 'JSON::Path::Evaluator', # requires perl 5.16 ); my @extra_modules = ( - 'Proc::Find::Parents', # used by Term::Detect::Software on some platforms + 'Proc::Find::Parents', # used by Term::Detect::Software on some platforms ); my $clean = 0; -- 2.43.0 From 78fe43f3b6b2dc9f9b8222a4926cad5dfd9e2a8c Mon Sep 17 00:00:00 2001 From: jwright Date: Tue, 29 Mar 2022 17:15:59 -0400 Subject: [PATCH 2/4] otions.transport not set to expanded var form --- lib/GraphQL/Client/CLI.pm | 1 + t/cli.t | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/lib/GraphQL/Client/CLI.pm b/lib/GraphQL/Client/CLI.pm index c23e07f..8ddc78f 100644 --- a/lib/GraphQL/Client/CLI.pm +++ b/lib/GraphQL/Client/CLI.pm @@ -138,6 +138,7 @@ sub _get_options { my $transport = eval { _expand_vars($options{transport}) }; die "Two or more --transport keys are incompatible.\n" if $@; + $options{transport} = $transport if ref $transport eq 'HASH' && %$transport; if (ref $options{variables}) { $options{variables} = eval { _expand_vars($options{variables}) }; diff --git a/t/cli.t b/t/cli.t index a32af83..142f2e5 100755 --- a/t/cli.t +++ b/t/cli.t @@ -44,6 +44,29 @@ subtest 'get_options' => sub { } }; +subtest 'get_options_transport' => sub { + my $expected = { + format => 'json:pretty', + filter => undef, + help => undef, + manual => undef, + operation_name => undef, + outfile => undef, + query => 'bar', + transport => { headers => {'X-Test' => 'value', 'X-Test-2' => 'val2' } }, + unpack => 0, + url => 'foo', + variables => undef, + version => undef, + }; + + my $r = GraphQL::Client::CLI->_get_options(qw{--url foo --query bar --transport headers.X-Test=value --transport headers.X-Test-2=val2}); + is_deeply($r, $expected, '--url, --query set option and correctly expanded transport options') or diag explain $r; +}; + + + + subtest 'expand_vars' => sub { my $r = GraphQL::Client::CLI::_expand_vars({ 'foo.bar' => 'baz', -- 2.43.0 From 570ff6df4e4b0ea59440aa0db3d4ffaa4d1ac46c Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Tue, 29 Mar 2022 19:26:13 -0600 Subject: [PATCH 3/4] use my CPAN email --- .mailmap | 1 + LICENSE | 12 ++++++------ dist.ini | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 .mailmap diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..4744c4b --- /dev/null +++ b/.mailmap @@ -0,0 +1 @@ +Charles McGarvey diff --git a/LICENSE b/LICENSE index f87adb0..108986c 100644 --- a/LICENSE +++ b/LICENSE @@ -292,21 +292,21 @@ Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through - textual modification. + textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright - Holder. + Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for - the package. + the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the - computing community at large as a market that must bear the fee.) + computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they - received it. + received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you @@ -373,7 +373,7 @@ products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End diff --git a/dist.ini b/dist.ini index 78e688a..d3a62db 100644 --- a/dist.ini +++ b/dist.ini @@ -1,6 +1,6 @@ name = GraphQL-Client main_module = bin/graphql -author = Charles McGarvey +author = Charles McGarvey copyright_holder = Charles McGarvey copyright_year = 2020 license = Perl_5 -- 2.43.0 From bde54f0ae3dc7963f6ccdb162d8fc2e586a66295 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Tue, 29 Mar 2022 19:40:28 -0600 Subject: [PATCH 4/4] Release GraphQL-Client 0.605 * Fix bug preventing use of transport headers with CLI. (thanks jwrightecs) --- Changes | 3 +++ README.md | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 81b6bbd..e777a60 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,9 @@ Revision history for GraphQL-Client. {{$NEXT}} +0.605 2022-03-29 19:39:31-06:00 America/Denver + * Fix bug preventing use of transport headers with CLI. (thanks jwrightecs) + 0.604 2020-03-22 03:44:44-06:00 MST7MDT * Add --filter JSONPATH argument to CLI. diff --git a/README.md b/README.md index caebdfd..fd618b9 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ graphql - Command-line GraphQL client # VERSION -version 0.604 +version 0.605 # SYNOPSIS @@ -264,7 +264,11 @@ feature. # AUTHOR -Charles McGarvey +Charles McGarvey + +# CONTRIBUTOR + +jwright # COPYRIGHT AND LICENSE -- 2.43.0