usps-imis-api 0.11.33 → 0.11.34
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 898b26512f82544ff037e289bfe2466ac375bfa481a0c7ebf77d5d6c2d9ecf96
|
|
4
|
+
data.tar.gz: 1a01816c119999a2ca2e8b01ae75c83df028a9d2cc1542b174b23a2e49f2877e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 89ff926322610bc6eefaf4aa605d7ecc498d1240f577a39e8a3267ab923d744f6364c73da84afeb65eb8672114d315a043c7a5d3d492b10f788c5734f1be13b4
|
|
7
|
+
data.tar.gz: 5858b73de1805cc9ee93527964b9220c2bd3c7b91075913103adff9a36994e018f8ac2c40404e80d8afeda314c3e7d4e6ab6e5ea4ba82c12022d67347c3a6bd3
|
|
@@ -126,7 +126,15 @@ module Usps
|
|
|
126
126
|
return
|
|
127
127
|
end
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
return unless block_given?
|
|
130
|
+
|
|
131
|
+
value = yield
|
|
132
|
+
|
|
133
|
+
if value.is_a?(Array) && @options[:jsonl]
|
|
134
|
+
puts(value.map { JSON.dump(it) })
|
|
135
|
+
else
|
|
136
|
+
puts JSON.dump(value)
|
|
137
|
+
end
|
|
130
138
|
end
|
|
131
139
|
# :nocov:
|
|
132
140
|
|
|
@@ -39,6 +39,7 @@ module Usps
|
|
|
39
39
|
config: ['Path to the JSON/YAML config file to use', { type: :string, short: :C }],
|
|
40
40
|
raw: ['Return raw JSON output, rather than simplified data', { short: :R }],
|
|
41
41
|
include_ids: ["Include any #{'iMIS ID'.yellow} and #{'Ordinal'.yellow} properties in returned data"],
|
|
42
|
+
jsonl: ['Format array output as JSONL', { short: :j }],
|
|
42
43
|
quiet: ["Suppress logging to #{'STDERR'.red}"],
|
|
43
44
|
log: ["Redirect logging to #{'STDOUT'.red}"],
|
|
44
45
|
log_level: ['Set the logging level', { type: :string, default: 'info', short: :L }]
|
data/lib/usps/imis/version.rb
CHANGED