usps-imis-api 0.11.1 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79ac4896cbc9c4c191719e15d3addb758aa35f16cee662571eff3c751258925e
4
- data.tar.gz: '09ad846e09959909b4e3c719b823c5ced5fdcd0f9682b2c8e235a29087b3218c'
3
+ metadata.gz: 12f51db70652669afdc29f5d0a753f053a4e7228eb7f88a14e570bbcf1de5488
4
+ data.tar.gz: 97035afafa222607b44fd8b015fa88895d575ad73241d2a6d17f7fa4c560a258
5
5
  SHA512:
6
- metadata.gz: be267ec4b89aafe323d457ddf7dcc05c565b1613765b318cbda0c653fc900e49916ae55b8b3a89c9f5ede33faa21b51cbb66c800d7b68017b06ed261c2661b5d
7
- data.tar.gz: 20068ce7e8870804cdf02724958c763f5c6843d53d52f73aca9a0856f56771cfc448c271579dde9cc09ff8b2b97149da473f119c262a0e26e4bd057019a743c3
6
+ metadata.gz: 69aa7c6c29a177db4b8bc06889207def81698678e707362bab433911f17f32f62414e03a4571cfd23ffe2dc009f2deb6c285da87cce0b497ae6a59ad3ce2ccbe
7
+ data.tar.gz: 5beeb62eb417b69dbcf2cc576cd994663464dd61fc6243732322862b60a72c4a57b3fed7de9ca70d009b7f6a2b687164598456415b518600164b41d8d37122f7
@@ -37,24 +37,46 @@ module Usps
37
37
 
38
38
  def self.banner_contents
39
39
  <<~BANNER
40
- Usage:
41
- imis.rb #{'[options]'.gray}
40
+ #{'Usage'.underline}
41
+
42
+ #{'imis.rb'.bold} #{'[options]'.gray}
43
+
44
+
45
+ #{'HTTP Verbs'.underline}
42
46
 
43
47
  The default HTTP verb is #{'GET'.cyan}.
48
+
44
49
  If #{'--data'.green}/#{'-d'.green} is provided, the default HTTP verb is #{'PUT'.cyan}.
45
50
 
46
51
  #{'--data'.green}/#{'-d'.green} is used to provide field(s) data for #{'PUT'.cyan}
47
52
  requests and mapper updates, object data for #{'POST'.cyan},
48
53
  and to provide any query params.
49
54
 
50
- Configuration can be specified with #{'--config'.green}/#{'-C'.green}, or by setting
51
- the following environment variables:
52
- #{'IMIS_ENVIRONMENT'.yellow}
53
- #{'IMIS_USERNAME'.yellow}
54
- #{'IMIS_PASSWORD'.yellow}
55
- #{'IMIS_ID_QUERY_NAME'.yellow}
56
55
 
57
- Options:
56
+ #{'Configuration'.underline}
57
+
58
+ API configuration can be specified in two ways:
59
+
60
+
61
+ With #{'--config'.green}/#{'-C'.green} given the path to a JSON file, e.g.:
62
+
63
+ {
64
+ "imis_id_query_name": "#{'$/IQA_QUERY_NAME'.yellow}",
65
+ "environment": "#{'development'.yellow}",
66
+ "username": "#{'USERNAME'.yellow}",
67
+ "password": "#{'PASSWORD'.yellow}"
68
+ }
69
+
70
+
71
+ By setting the following environment variables:
72
+
73
+ #{'IMIS_ID_QUERY_NAME'.yellow}
74
+ #{'IMIS_ENVIRONMENT'.yellow}
75
+ #{'IMIS_USERNAME'.yellow}
76
+ #{'IMIS_PASSWORD'.yellow}
77
+
78
+
79
+ #{'Options'.underline}
58
80
  BANNER
59
81
  end
60
82
 
@@ -66,7 +88,7 @@ module Usps
66
88
  @options[:data] = read_stdin if stdin?
67
89
  # :nocov:
68
90
 
69
- @options[:data] = JSON.parse(@options[:data])
91
+ @options[:data] = JSON.parse(@options[:data]) if @options[:data]
70
92
  end
71
93
 
72
94
  private
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module Imis
5
- VERSION = '0.11.1'
5
+ VERSION = '0.11.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usps-imis-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander