usps-imis-api 0.11.23.pre.5 → 0.11.23

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: 0ff5cc6b3fffdbe890fd9798970406cb25f24c86701bea9e9c0f5db0c52f2589
4
- data.tar.gz: 5101c13613feaf5ba7c4636154e9e8bee097e22f485c5e00c4205f69cee48d7e
3
+ metadata.gz: 9f2842977f938199479a756b99cdf0a9849fa4b006940debfb08a576b92e389e
4
+ data.tar.gz: 485c9ed5663f2f538896e563d15991f59a1f8d810728d99b9465078321ecc657
5
5
  SHA512:
6
- metadata.gz: aa67cb37519dc9048c6307d816ba97b7e9818a31a963e6a41781b00484b70c7dab36f9166cbf0023555d4ef14940224e7768aaa93fa71687e917d6557f15f873
7
- data.tar.gz: 5e705606bcd8721197fcb69705692f4f2dc50e08f58ca0e45a95b2102cf410e256ccd191daf1e37f1a5ecd4e7d73969c553bf7035d6f6fd7e1483249664b89a0
6
+ metadata.gz: 0ad85e740f53e024400bb491c9d818d48185d6dd2bd8dfdbc2a6befc09096034d57d580d96461cd552f5967b5c4b861db733ea352316c29ef8124cb14a7fa5d5
7
+ data.tar.gz: 0cbc1a0d52f8dd83bd1a7e2ec04db2963446b804c717cdcd6fbb820ad1bb1e02cb21de49bbfcae05bdd66eb789604213f482e66dd14fa91966d8f79895e7aaf0
@@ -25,7 +25,8 @@ module Usps
25
25
 
26
26
  def initialize(**)
27
27
  @options = input_options.merge(**)
28
- validate_options!
28
+ options[:version] = true if default_options?
29
+
29
30
  configure! if options[:config]
30
31
  logging!
31
32
  @logger ||= Imis.logger('CommandLine')
@@ -118,7 +119,7 @@ module Usps
118
119
 
119
120
  in certificate: then api.imis_id
120
121
 
121
- in version: true then Imis::VERSION
122
+ in version: true then "#{Interface::NAME} (v#{Imis::VERSION})"
122
123
  end
123
124
  rescue NoMatchingPatternError => e
124
125
  raise Errors::CommandLineError, "Unable to match pattern from options: #{e.message}"
@@ -196,11 +197,7 @@ module Usps
196
197
  end
197
198
  end
198
199
 
199
- def validate_options!
200
- return unless options[:log_level] == 'info' && options.except(:log_level, :quiet).values.none?
201
-
202
- options[:version] = true
203
- end
200
+ def default_options? = options[:log_level] == 'info' && options.except(:log_level).values.none?
204
201
  end
205
202
  end
206
203
  end
@@ -99,7 +99,7 @@ module Usps
99
99
  @options = parse_options.compact
100
100
  @arguments = ARGV # Not currently used
101
101
 
102
- Optimist.educate if ARGV.empty? && defaults?
102
+ Optimist.educate if ARGV.empty? && defaults? # DEV: This shadows setting the --version flag by default
103
103
 
104
104
  # :nocov:
105
105
  @options[:data] = read_stdin if stdin?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module Imis
5
- VERSION = '0.11.23-5'
5
+ VERSION = '0.11.23'
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.23.pre.5
4
+ version: 0.11.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander