From: Charles McGarvey Date: Wed, 30 Mar 2022 01:40:28 +0000 (-0600) Subject: Version 0.605 X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=886b5544bfb4de038faede9803f01edcc5d604fc;p=chaz%2Fgraphql-client Version 0.605 --- diff --git a/Changes b/Changes index 72f7693..eb94e63 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for GraphQL-Client. +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/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/MANIFEST b/MANIFEST index b03df18..943fb60 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.014. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.024. Changes LICENSE MANIFEST @@ -22,6 +22,7 @@ t/lib/MockTransport.pm t/lib/MockUA.pm xt/author/clean-namespaces.t xt/author/critic.t +xt/author/distmeta.t xt/author/eol.t xt/author/minimum-version.t xt/author/no-tabs.t @@ -30,4 +31,3 @@ xt/author/pod-syntax.t xt/author/portability.t xt/release/consistent-version.t xt/release/cpan-changes.t -xt/release/distmeta.t diff --git a/META.json b/META.json index c19e737..967ae89 100644 --- a/META.json +++ b/META.json @@ -1,10 +1,10 @@ { "abstract" : "Command-line GraphQL client", "author" : [ - "Charles McGarvey " + "Charles McGarvey " ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 6.014, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Zilla version 6.024, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -117,23 +117,23 @@ "provides" : { "GraphQL::Client" : { "file" : "lib/GraphQL/Client.pm", - "version" : "0.604" + "version" : "0.605" }, "GraphQL::Client::CLI" : { "file" : "lib/GraphQL/Client/CLI.pm", - "version" : "0.604" + "version" : "0.605" }, "GraphQL::Client::Error" : { "file" : "lib/GraphQL/Client.pm", - "version" : "0.604" + "version" : "0.605" }, "GraphQL::Client::http" : { "file" : "lib/GraphQL/Client/http.pm", - "version" : "0.604" + "version" : "0.605" }, "GraphQL::Client::https" : { "file" : "lib/GraphQL/Client/https.pm", - "version" : "0.604" + "version" : "0.605" } }, "release_status" : "stable", @@ -148,10 +148,13 @@ "web" : "https://github.com/chazmcgarvey/graphql-client" } }, - "version" : "0.604", + "version" : "0.605", "x_authority" : "cpan:CCM", - "x_generated_by_perl" : "v5.28.0", - "x_serialization_backend" : "Cpanel::JSON::XS version 4.15", + "x_contributors" : [ + "jwright " + ], + "x_generated_by_perl" : "v5.34.1", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.27", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } diff --git a/META.yml b/META.yml index 6353c3f..1b87c76 100644 --- a/META.yml +++ b/META.yml @@ -1,7 +1,7 @@ --- abstract: 'Command-line GraphQL client' author: - - 'Charles McGarvey ' + - 'Charles McGarvey ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' @@ -17,7 +17,7 @@ build_requires: configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'Dist::Zilla version 6.014, CPAN::Meta::Converter version 2.150010' +generated_by: 'Dist::Zilla version 6.024, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -33,19 +33,19 @@ no_index: provides: GraphQL::Client: file: lib/GraphQL/Client.pm - version: '0.604' + version: '0.605' GraphQL::Client::CLI: file: lib/GraphQL/Client/CLI.pm - version: '0.604' + version: '0.605' GraphQL::Client::Error: file: lib/GraphQL/Client.pm - version: '0.604' + version: '0.605' GraphQL::Client::http: file: lib/GraphQL/Client/http.pm - version: '0.604' + version: '0.605' GraphQL::Client::https: file: lib/GraphQL/Client/https.pm - version: '0.604' + version: '0.605' recommends: HTTP::Tiny: '0' Pod::Usage: '0' @@ -69,8 +69,10 @@ resources: bugtracker: https://github.com/chazmcgarvey/graphql-client/issues homepage: https://github.com/chazmcgarvey/graphql-client repository: https://github.com/chazmcgarvey/graphql-client.git -version: '0.604' +version: '0.605' x_authority: cpan:CCM -x_generated_by_perl: v5.28.0 +x_contributors: + - 'jwright ' +x_generated_by_perl: v5.34.1 x_serialization_backend: 'YAML::Tiny version 1.73' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' diff --git a/Makefile.PL b/Makefile.PL index 4199bc6..dfdd55c 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.014. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.024. use strict; use warnings; @@ -8,7 +8,7 @@ use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Command-line GraphQL client", - "AUTHOR" => "Charles McGarvey ", + "AUTHOR" => "Charles McGarvey ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, @@ -48,7 +48,7 @@ my %WriteMakefileArgs = ( "Test::More" => 0, "lib" => 0 }, - "VERSION" => "0.604", + "VERSION" => "0.605", "test" => { "TESTS" => "t/*.t" } diff --git a/README b/README index b6afcd6..1d6ad75 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ NAME VERSION - version 0.604 + version 0.605 SYNOPSIS @@ -286,7 +286,11 @@ BUGS AUTHOR - Charles McGarvey + Charles McGarvey + +CONTRIBUTOR + + jwright COPYRIGHT AND LICENSE diff --git a/bin/graphql b/bin/graphql index db8e7c5..4b523aa 100755 --- a/bin/graphql +++ b/bin/graphql @@ -10,7 +10,7 @@ use strict; use GraphQL::Client::CLI; -our $VERSION = '0.604'; # VERSION +our $VERSION = '0.605'; # VERSION GraphQL::Client::CLI->main(@ARGV); @@ -26,7 +26,7 @@ graphql - Command-line GraphQL client =head1 VERSION -version 0.604 +version 0.605 =head1 SYNOPSIS @@ -346,7 +346,13 @@ feature. =head1 AUTHOR -Charles McGarvey +Charles McGarvey + +=head1 CONTRIBUTOR + +=for stopwords jwright + +jwright =head1 COPYRIGHT AND LICENSE diff --git a/lib/GraphQL/Client.pm b/lib/GraphQL/Client.pm index 8fd2368..1dec7b2 100644 --- a/lib/GraphQL/Client.pm +++ b/lib/GraphQL/Client.pm @@ -8,7 +8,7 @@ use Module::Load qw(load); use Scalar::Util qw(reftype); use namespace::clean; -our $VERSION = '0.604'; # VERSION +our $VERSION = '0.605'; # VERSION sub _croak { require Carp; goto &Carp::croak } sub _throw { GraphQL::Client::Error->throw(@_) } @@ -171,7 +171,7 @@ GraphQL::Client - A GraphQL client =head1 VERSION -version 0.604 +version 0.605 =head1 SYNOPSIS @@ -361,7 +361,7 @@ feature. =head1 AUTHOR -Charles McGarvey +Charles McGarvey =head1 COPYRIGHT AND LICENSE diff --git a/lib/GraphQL/Client/CLI.pm b/lib/GraphQL/Client/CLI.pm index 902fc4c..888b535 100644 --- a/lib/GraphQL/Client/CLI.pm +++ b/lib/GraphQL/Client/CLI.pm @@ -11,7 +11,7 @@ use JSON::MaybeXS; use Text::ParseWords; use namespace::clean; -our $VERSION = '0.604'; # VERSION +our $VERSION = '0.605'; # VERSION my $JSON = JSON::MaybeXS->new(canonical => 1); @@ -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}) }; @@ -368,7 +369,7 @@ GraphQL::Client::CLI - Implementation of the graphql CLI program =head1 VERSION -version 0.604 +version 0.605 =head1 DESCRIPTION @@ -397,7 +398,7 @@ feature. =head1 AUTHOR -Charles McGarvey +Charles McGarvey =head1 COPYRIGHT AND LICENSE diff --git a/lib/GraphQL/Client/http.pm b/lib/GraphQL/Client/http.pm index 79a5f2a..7c5fd7b 100644 --- a/lib/GraphQL/Client/http.pm +++ b/lib/GraphQL/Client/http.pm @@ -9,7 +9,7 @@ use HTTP::AnyUA::Util qw(www_form_urlencode); use HTTP::AnyUA; use namespace::clean; -our $VERSION = '0.604'; # VERSION +our $VERSION = '0.605'; # VERSION sub _croak { require Carp; goto &Carp::croak } @@ -171,7 +171,7 @@ GraphQL::Client::http - GraphQL over HTTP =head1 VERSION -version 0.604 +version 0.605 =head1 SYNOPSIS @@ -316,7 +316,7 @@ feature. =head1 AUTHOR -Charles McGarvey +Charles McGarvey =head1 COPYRIGHT AND LICENSE diff --git a/lib/GraphQL/Client/https.pm b/lib/GraphQL/Client/https.pm index 937f9ad..6a56eb4 100644 --- a/lib/GraphQL/Client/https.pm +++ b/lib/GraphQL/Client/https.pm @@ -6,7 +6,7 @@ use strict; use parent 'GraphQL::Client::http'; -our $VERSION = '0.604'; # VERSION +our $VERSION = '0.605'; # VERSION sub new { my $class = shift; @@ -27,7 +27,7 @@ GraphQL::Client::https - GraphQL over HTTPS =head1 VERSION -version 0.604 +version 0.605 =head1 DESCRIPTION @@ -48,7 +48,7 @@ feature. =head1 AUTHOR -Charles McGarvey +Charles McGarvey =head1 COPYRIGHT AND LICENSE diff --git a/t/00-report-prereqs.t b/t/00-report-prereqs.t index c72183a..c3a94ca 100644 --- a/t/00-report-prereqs.t +++ b/t/00-report-prereqs.t @@ -3,7 +3,7 @@ use strict; use warnings; -# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027 +# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.028 use Test::More tests => 1; @@ -188,6 +188,6 @@ if ( @dep_errors ) { ); } -pass; +pass('Reported prereqs'); # vim: ts=4 sts=4 sw=4 et: 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', diff --git a/xt/release/distmeta.t b/xt/author/distmeta.t similarity index 100% rename from xt/release/distmeta.t rename to xt/author/distmeta.t diff --git a/xt/author/eol.t b/xt/author/eol.t index afb6494..e84dca4 100644 --- a/xt/author/eol.t +++ b/xt/author/eol.t @@ -23,6 +23,7 @@ my @files = ( 't/lib/MockUA.pm', 'xt/author/clean-namespaces.t', 'xt/author/critic.t', + 'xt/author/distmeta.t', 'xt/author/eol.t', 'xt/author/minimum-version.t', 'xt/author/no-tabs.t', @@ -30,8 +31,7 @@ my @files = ( 'xt/author/pod-syntax.t', 'xt/author/portability.t', 'xt/release/consistent-version.t', - 'xt/release/cpan-changes.t', - 'xt/release/distmeta.t' + 'xt/release/cpan-changes.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; diff --git a/xt/author/no-tabs.t b/xt/author/no-tabs.t index 68ac37b..9c4e0af 100644 --- a/xt/author/no-tabs.t +++ b/xt/author/no-tabs.t @@ -23,6 +23,7 @@ my @files = ( 't/lib/MockUA.pm', 'xt/author/clean-namespaces.t', 'xt/author/critic.t', + 'xt/author/distmeta.t', 'xt/author/eol.t', 'xt/author/minimum-version.t', 'xt/author/no-tabs.t', @@ -30,8 +31,7 @@ my @files = ( 'xt/author/pod-syntax.t', 'xt/author/portability.t', 'xt/release/consistent-version.t', - 'xt/release/cpan-changes.t', - 'xt/release/distmeta.t' + 'xt/release/cpan-changes.t' ); notabs_ok($_) foreach @files;