]> Dogcows Code - chaz/graphql-client/commitdiff
Release GraphQL-Client 0.605 master v0.605
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 30 Mar 2022 01:40:28 +0000 (19:40 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 30 Mar 2022 01:40:28 +0000 (19:40 -0600)
  * Fix bug preventing use of transport headers with CLI. (thanks jwrightecs)

.mailmap [new file with mode: 0644]
Changes
LICENSE
README.md
dist.ini
lib/GraphQL/Client/CLI.pm
maint/fatpack.pl
t/cli.t

diff --git a/.mailmap b/.mailmap
new file mode 100644 (file)
index 0000000..4744c4b
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1 @@
+Charles McGarvey <ccm@cpan.org> <chazmcgarvey@brokenzipper.com>
diff --git a/Changes b/Changes
index 81b6bbd049b0e7de6795248fc3ec3b217da26de0..e777a6022e288b043977cf6134675ac40ba9bd90 100644 (file)
--- 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/LICENSE b/LICENSE
index f87adb0747a64037b1f4e2f5ba7297ef12504969..108986c5925e9f0af7367e3e37cc8cc3c9452c7c 100644 (file)
--- 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
 
index caebdfd8947135e54e652cb4197413654ecbf295..fd618b963673c32c838b12b24046f87c653e4a95 100644 (file)
--- 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 <chazmcgarvey@brokenzipper.com>
+Charles McGarvey <ccm@cpan.org>
+
+# CONTRIBUTOR
+
+jwright <jwright@ecstuning.com>
 
 # COPYRIGHT AND LICENSE
 
index 78e688a07e71d39a6fc10e379d228fad18e0212b..d3a62db5aafbbf2cefd772bedd696966b7ccac29 100644 (file)
--- a/dist.ini
+++ b/dist.ini
@@ -1,6 +1,6 @@
 name                = GraphQL-Client
 main_module         = bin/graphql
-author              = Charles McGarvey <chazmcgarvey@brokenzipper.com>
+author              = Charles McGarvey <ccm@cpan.org>
 copyright_holder    = Charles McGarvey
 copyright_year      = 2020
 license             = Perl_5
index c23e07fe4af9aeb5115218a0daf07ee051a726f1..8ddc78f4f4333a63246eb658706d3a8c9b99b3fe 100644 (file)
@@ -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}) };
index 66497fa281971e51603c81d596f0c462e538e8fa..71d436c6615e86c2e056c8763632d6b5f2902e84 100755 (executable)
@@ -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;
diff --git a/t/cli.t b/t/cli.t
index a32af83b333f6189b694c70185f0d36b0e2a0cc6..142f2e5ad37979fcb045da8bb728c4d6adc48c8f 100755 (executable)
--- 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',
This page took 0.029181 seconds and 4 git commands to generate.