usps-imis-api 0.9.9 → 0.9.10
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 +4 -4
- data/lib/usps/imis/api.rb +1 -2
- data/lib/usps/imis/business_object.rb +0 -3
- data/lib/usps/imis/config.rb +1 -1
- data/lib/usps/imis/query.rb +0 -3
- data/lib/usps/imis/requests.rb +5 -1
- data/lib/usps/imis/version.rb +1 -1
- metadata +1 -70
- data/.github/workflows/main.yml +0 -57
- data/.gitignore +0 -5
- data/.rspec +0 -2
- data/.rubocop.yml +0 -89
- data/.ruby-version +0 -1
- data/.simplecov +0 -8
- data/Gemfile +0 -16
- data/Gemfile.lock +0 -147
- data/Rakefile +0 -12
- data/bin/console +0 -21
- data/bin/setup +0 -8
- data/spec/fixtures/vcr_cassettes/.keep +0 -0
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_authorize/automatically_refreshes_an_expired_token.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_imis_id_for/gets_the_iMIS_ID.yml +0 -131
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_imis_id_for/with_a_query_error/wraps_errors.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_inspect/does_not_show_the_token_instance_variable.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_inspect/is_configured_to_exclude_the_token_instance_variable.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_on/chains_with_on_to_a_single_block.yml +0 -256
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_on/nests_on_and_with.yml +0 -256
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_on/returns_a_BusinessObject_without_a_block.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_on/sends_an_update_from_put.yml +0 -256
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_put/sends_an_update.yml +0 -256
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_put/when_receiving_a_response_error/wraps_the_error.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_query/collects_all_query_results.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_with/blocks_calling_imis_id_.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_with/blocks_calling_imis_id_for.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_with/sends_an_update_from_put.yml +0 -256
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_with/sends_an_update_from_update.yml +0 -256
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/_with/uses_a_panel_correctly.yml +0 -145
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Api/stores_the_initial_imis_id.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/_put_field/submits_the_correct_update_request.yml +0 -627
- data/spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/with_stubbed_data/_filter_fields/formats_fields_correctly.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/with_stubbed_data/_get/delegation_to_get_fields/delegates_to_get_fields.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/with_stubbed_data/_get/returns_multiple_values.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/with_stubbed_data/_get_field/returns_a_string_value.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/with_stubbed_data/_get_field/returns_an_integer_value.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/with_stubbed_data/_get_fields/returns_multiple_values.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/_fetch/fetches_a_mapped_field.yml +0 -158
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/_fetch/raises_for_unmapped_updates.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/_fetch/supports_Hash_access_syntax.yml +0 -158
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/_fetch/supports_Hash_access_syntax_on_the_Api_directly.yml +0 -158
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/_update/raises_for_unmapped_updates.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/_update/sends_a_mapped_update.yml +0 -256
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/initialize_with_imis_id/stores_the_initial_imis_id.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Panels_BasePanel/requires_business_object_to_be_defined.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Panels_BasePanel/requires_payload_data_to_be_defined.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Education/api_example/_get/loads_a_specific_object.yml +0 -146
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Education/api_example/_get/returns_specific_fields.yml +0 -146
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Education/api_example/_get_field/returns_a_specific_field.yml +0 -146
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Education/api_example/_get_fields/returns_specific_fields.yml +0 -146
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Education/api_example/interacts_with_records_correctly.yml +0 -495
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Education/initialization_with_ID/can_initialize_with_an_iMIS_ID.yml +0 -67
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Vsc/_get/loads_a_specific_object.yml +0 -145
- data/spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Vsc/handles_new_records_correctly.yml +0 -319
- data/spec/lib/usps/imis/api_spec.rb +0 -161
- data/spec/lib/usps/imis/business_object_spec.rb +0 -87
- data/spec/lib/usps/imis/config_spec.rb +0 -59
- data/spec/lib/usps/imis/data_spec.rb +0 -75
- data/spec/lib/usps/imis/error_spec.rb +0 -17
- data/spec/lib/usps/imis/errors/response_error_spec.rb +0 -107
- data/spec/lib/usps/imis/mapper_spec.rb +0 -55
- data/spec/lib/usps/imis/mocks/business_object_spec.rb +0 -65
- data/spec/lib/usps/imis/panels/base_panel_spec.rb +0 -33
- data/spec/lib/usps/imis/panels/education_spec.rb +0 -70
- data/spec/lib/usps/imis/panels/vsc_spec.rb +0 -37
- data/spec/lib/usps/imis/properties_spec.rb +0 -19
- data/spec/lib/usps/imis_spec.rb +0 -11
- data/spec/spec_helper.rb +0 -78
- data/usps-imis-api.gemspec +0 -20
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e7d8f711e189075d39920c42cda5cb43f933fc650afc397e40fe7ada92834fa3
|
|
4
|
+
data.tar.gz: '09a9947903c7906987847a46c658778a8a75932de481d944ec172a1da4733578'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8360979d32674bb26403207fa4e539a97c925f32c9dd4dbfe8a43c57614f3383f1de1b5cc184c26f5552acb4de158faf232524836dc1cf71ac2e106d492c5233
|
|
7
|
+
data.tar.gz: cb50db92b18b3f182f563f0718a42f1943e173ee46802e9a66251890b0cc59c1c154a497cac643ce7e3553d0d64540e359c1e4c7b56d309465512db7aedba5e4
|
data/lib/usps/imis/api.rb
CHANGED
|
@@ -39,7 +39,6 @@ module Usps
|
|
|
39
39
|
# @param imis_id [Integer, String] iMIS ID to select immediately on initialization
|
|
40
40
|
#
|
|
41
41
|
def initialize(imis_id: nil)
|
|
42
|
-
authenticate
|
|
43
42
|
self.imis_id = imis_id if imis_id
|
|
44
43
|
end
|
|
45
44
|
|
|
@@ -169,7 +168,7 @@ module Usps
|
|
|
169
168
|
json = JSON.parse(result.body)
|
|
170
169
|
|
|
171
170
|
@token = json['access_token']
|
|
172
|
-
@token_expiration = Time.
|
|
171
|
+
@token_expiration = Time.now - json['expires_in'] - 60
|
|
173
172
|
end
|
|
174
173
|
|
|
175
174
|
# URI for the authentication endpoint
|
data/lib/usps/imis/config.rb
CHANGED
|
@@ -44,7 +44,7 @@ module Usps
|
|
|
44
44
|
|
|
45
45
|
# Ruby 3.5 instance variable filter
|
|
46
46
|
#
|
|
47
|
-
def instance_variables_to_inspect = %i[@
|
|
47
|
+
def instance_variables_to_inspect = instance_variables - %i[@password @logger]
|
|
48
48
|
|
|
49
49
|
# Parameters to filter out of logging
|
|
50
50
|
#
|
data/lib/usps/imis/query.rb
CHANGED
|
@@ -104,9 +104,6 @@ module Usps
|
|
|
104
104
|
|
|
105
105
|
private
|
|
106
106
|
|
|
107
|
-
def token = api.token
|
|
108
|
-
def token_expiration = api.token_expiration
|
|
109
|
-
|
|
110
107
|
def path_params = query_params.merge(QueryName: query_name).merge({ Offset: offset, Limit: page_size }.compact)
|
|
111
108
|
def path = "#{QUERY_PATH}?#{path_params.to_query}"
|
|
112
109
|
def uri = URI(File.join(Imis.configuration.hostname, path))
|
data/lib/usps/imis/requests.rb
CHANGED
|
@@ -9,6 +9,10 @@ module Usps
|
|
|
9
9
|
|
|
10
10
|
def logger = Imis.logger
|
|
11
11
|
|
|
12
|
+
def token = api.token
|
|
13
|
+
def token_expiration = api.token_expiration
|
|
14
|
+
def authenticate = api.send(:authenticate)
|
|
15
|
+
|
|
12
16
|
def http_get = Net::HTTP::Get.new(uri)
|
|
13
17
|
def http_put = Net::HTTP::Put.new(uri)
|
|
14
18
|
def http_post = Net::HTTP::Post.new(uri(id: ''))
|
|
@@ -26,7 +30,7 @@ module Usps
|
|
|
26
30
|
# If the current token is missing/expired, request a new one
|
|
27
31
|
#
|
|
28
32
|
def authorize(request)
|
|
29
|
-
if token_expiration < Time.now
|
|
33
|
+
if token_expiration.nil? || token_expiration < Time.now
|
|
30
34
|
logger.debug 'Token expired: re-authenticating with iMIS'
|
|
31
35
|
authenticate
|
|
32
36
|
end
|
data/lib/usps/imis/version.rb
CHANGED
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.9.
|
|
4
|
+
version: 0.9.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Julian Fiander
|
|
@@ -29,18 +29,7 @@ executables: []
|
|
|
29
29
|
extensions: []
|
|
30
30
|
extra_rdoc_files: []
|
|
31
31
|
files:
|
|
32
|
-
- ".github/workflows/main.yml"
|
|
33
|
-
- ".gitignore"
|
|
34
|
-
- ".rspec"
|
|
35
|
-
- ".rubocop.yml"
|
|
36
|
-
- ".ruby-version"
|
|
37
|
-
- ".simplecov"
|
|
38
|
-
- Gemfile
|
|
39
|
-
- Gemfile.lock
|
|
40
|
-
- Rakefile
|
|
41
32
|
- Readme.md
|
|
42
|
-
- bin/console
|
|
43
|
-
- bin/setup
|
|
44
33
|
- lib/usps/imis.rb
|
|
45
34
|
- lib/usps/imis/api.rb
|
|
46
35
|
- lib/usps/imis/business_object.rb
|
|
@@ -66,64 +55,6 @@ files:
|
|
|
66
55
|
- lib/usps/imis/query.rb
|
|
67
56
|
- lib/usps/imis/requests.rb
|
|
68
57
|
- lib/usps/imis/version.rb
|
|
69
|
-
- spec/fixtures/vcr_cassettes/.keep
|
|
70
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_authorize/automatically_refreshes_an_expired_token.yml
|
|
71
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_imis_id_for/gets_the_iMIS_ID.yml
|
|
72
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_imis_id_for/with_a_query_error/wraps_errors.yml
|
|
73
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_inspect/does_not_show_the_token_instance_variable.yml
|
|
74
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_inspect/is_configured_to_exclude_the_token_instance_variable.yml
|
|
75
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_on/chains_with_on_to_a_single_block.yml
|
|
76
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_on/nests_on_and_with.yml
|
|
77
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_on/returns_a_BusinessObject_without_a_block.yml
|
|
78
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_on/sends_an_update_from_put.yml
|
|
79
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_put/sends_an_update.yml
|
|
80
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_put/when_receiving_a_response_error/wraps_the_error.yml
|
|
81
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_query/collects_all_query_results.yml
|
|
82
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_with/blocks_calling_imis_id_.yml
|
|
83
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_with/blocks_calling_imis_id_for.yml
|
|
84
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_with/sends_an_update_from_put.yml
|
|
85
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_with/sends_an_update_from_update.yml
|
|
86
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/_with/uses_a_panel_correctly.yml
|
|
87
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Api/stores_the_initial_imis_id.yml
|
|
88
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/_put_field/submits_the_correct_update_request.yml
|
|
89
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/with_stubbed_data/_filter_fields/formats_fields_correctly.yml
|
|
90
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/with_stubbed_data/_get/delegation_to_get_fields/delegates_to_get_fields.yml
|
|
91
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/with_stubbed_data/_get/returns_multiple_values.yml
|
|
92
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/with_stubbed_data/_get_field/returns_a_string_value.yml
|
|
93
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/with_stubbed_data/_get_field/returns_an_integer_value.yml
|
|
94
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_BusinessObject/with_stubbed_data/_get_fields/returns_multiple_values.yml
|
|
95
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/_fetch/fetches_a_mapped_field.yml
|
|
96
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/_fetch/raises_for_unmapped_updates.yml
|
|
97
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/_fetch/supports_Hash_access_syntax.yml
|
|
98
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/_fetch/supports_Hash_access_syntax_on_the_Api_directly.yml
|
|
99
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/_update/raises_for_unmapped_updates.yml
|
|
100
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/_update/sends_a_mapped_update.yml
|
|
101
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Mapper/initialize_with_imis_id/stores_the_initial_imis_id.yml
|
|
102
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Panels_BasePanel/requires_business_object_to_be_defined.yml
|
|
103
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Panels_BasePanel/requires_payload_data_to_be_defined.yml
|
|
104
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Education/api_example/_get/loads_a_specific_object.yml
|
|
105
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Education/api_example/_get/returns_specific_fields.yml
|
|
106
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Education/api_example/_get_field/returns_a_specific_field.yml
|
|
107
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Education/api_example/_get_fields/returns_specific_fields.yml
|
|
108
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Education/api_example/interacts_with_records_correctly.yml
|
|
109
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Education/initialization_with_ID/can_initialize_with_an_iMIS_ID.yml
|
|
110
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Vsc/_get/loads_a_specific_object.yml
|
|
111
|
-
- spec/fixtures/vcr_cassettes/Usps_Imis_Panels_Vsc/handles_new_records_correctly.yml
|
|
112
|
-
- spec/lib/usps/imis/api_spec.rb
|
|
113
|
-
- spec/lib/usps/imis/business_object_spec.rb
|
|
114
|
-
- spec/lib/usps/imis/config_spec.rb
|
|
115
|
-
- spec/lib/usps/imis/data_spec.rb
|
|
116
|
-
- spec/lib/usps/imis/error_spec.rb
|
|
117
|
-
- spec/lib/usps/imis/errors/response_error_spec.rb
|
|
118
|
-
- spec/lib/usps/imis/mapper_spec.rb
|
|
119
|
-
- spec/lib/usps/imis/mocks/business_object_spec.rb
|
|
120
|
-
- spec/lib/usps/imis/panels/base_panel_spec.rb
|
|
121
|
-
- spec/lib/usps/imis/panels/education_spec.rb
|
|
122
|
-
- spec/lib/usps/imis/panels/vsc_spec.rb
|
|
123
|
-
- spec/lib/usps/imis/properties_spec.rb
|
|
124
|
-
- spec/lib/usps/imis_spec.rb
|
|
125
|
-
- spec/spec_helper.rb
|
|
126
|
-
- usps-imis-api.gemspec
|
|
127
58
|
homepage: https://github.com/unitedstatespowersquadrons/imis-api-ruby
|
|
128
59
|
licenses: []
|
|
129
60
|
metadata:
|
data/.github/workflows/main.yml
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
name: 'USPS iMIS API - Ruby'
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
paths:
|
|
5
|
-
- '**.rb'
|
|
6
|
-
- '**.yml'
|
|
7
|
-
- '**.json'
|
|
8
|
-
- 'Gemfile'
|
|
9
|
-
- '.simplecov'
|
|
10
|
-
branches:
|
|
11
|
-
- 'main'
|
|
12
|
-
- '**'
|
|
13
|
-
workflow_dispatch:
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
rubocop:
|
|
17
|
-
runs-on: ubuntu-24.04
|
|
18
|
-
environment: "USPS iMIS API - Ruby"
|
|
19
|
-
strategy:
|
|
20
|
-
matrix:
|
|
21
|
-
ruby: ['3.4', head]
|
|
22
|
-
steps:
|
|
23
|
-
- name: Checkout Code
|
|
24
|
-
uses: actions/checkout@v4
|
|
25
|
-
- name: Setup Ruby
|
|
26
|
-
uses: ruby/setup-ruby@v1
|
|
27
|
-
with:
|
|
28
|
-
ruby-version: ${{ matrix.ruby }}
|
|
29
|
-
bundler-cache: true
|
|
30
|
-
- name: Run Rubocop
|
|
31
|
-
run: bundle exec rubocop
|
|
32
|
-
rspec:
|
|
33
|
-
runs-on: ubuntu-24.04
|
|
34
|
-
environment: "USPS iMIS API - Ruby"
|
|
35
|
-
strategy:
|
|
36
|
-
matrix:
|
|
37
|
-
ruby: ['3.4', head]
|
|
38
|
-
env:
|
|
39
|
-
IMIS_USERNAME: ${{ secrets.IMIS_USERNAME }}
|
|
40
|
-
IMIS_PASSWORD: ${{ secrets.IMIS_PASSWORD }}
|
|
41
|
-
IMIS_ID_QUERY_NAME: ${{ secrets.IMIS_ID_QUERY_NAME }}
|
|
42
|
-
steps:
|
|
43
|
-
- name: Checkout Code
|
|
44
|
-
uses: actions/checkout@v4
|
|
45
|
-
- name: Setup Ruby
|
|
46
|
-
uses: ruby/setup-ruby@v1
|
|
47
|
-
with:
|
|
48
|
-
ruby-version: ${{ matrix.ruby }}
|
|
49
|
-
bundler-cache: true
|
|
50
|
-
- name: Run Rspec
|
|
51
|
-
run: bundle exec rspec --format documentation --order rand --color --tty
|
|
52
|
-
- name: Store Coverage
|
|
53
|
-
uses: actions/upload-artifact@v4
|
|
54
|
-
with:
|
|
55
|
-
name: coverage-rspec-${{ matrix.ruby }}
|
|
56
|
-
include-hidden-files: true
|
|
57
|
-
path: coverage/
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
plugins:
|
|
2
|
-
- rubocop-rspec
|
|
3
|
-
|
|
4
|
-
AllCops:
|
|
5
|
-
TargetRubyVersion: 3.4
|
|
6
|
-
Exclude:
|
|
7
|
-
- bin/**/*
|
|
8
|
-
- config/**/*
|
|
9
|
-
- db/**/*
|
|
10
|
-
- vendor/**/*
|
|
11
|
-
- tmp/**/*
|
|
12
|
-
NewCops: enable
|
|
13
|
-
SuggestExtensions: false
|
|
14
|
-
|
|
15
|
-
Layout/FirstHashElementIndentation:
|
|
16
|
-
EnforcedStyle: consistent
|
|
17
|
-
Layout/AccessModifierIndentation:
|
|
18
|
-
EnforcedStyle: outdent
|
|
19
|
-
Layout/EmptyLinesAroundAccessModifier:
|
|
20
|
-
Enabled: true
|
|
21
|
-
Layout/ArrayAlignment:
|
|
22
|
-
Enabled: true
|
|
23
|
-
Layout/HashAlignment:
|
|
24
|
-
Enabled: true
|
|
25
|
-
Layout/EmptyLineAfterGuardClause:
|
|
26
|
-
Enabled: true
|
|
27
|
-
Layout/SpaceInsideBlockBraces:
|
|
28
|
-
EnforcedStyle: space
|
|
29
|
-
EnforcedStyleForEmptyBraces: no_space
|
|
30
|
-
Layout/SpaceInsideHashLiteralBraces:
|
|
31
|
-
EnforcedStyle: space
|
|
32
|
-
EnforcedStyleForEmptyBraces: no_space
|
|
33
|
-
Layout/SpaceInsideArrayLiteralBrackets:
|
|
34
|
-
EnforcedStyle: no_space
|
|
35
|
-
|
|
36
|
-
Lint/UnusedMethodArgument:
|
|
37
|
-
Enabled: true
|
|
38
|
-
Lint/UselessAssignment:
|
|
39
|
-
Enabled: true
|
|
40
|
-
|
|
41
|
-
Metrics/MethodLength:
|
|
42
|
-
Enabled: true
|
|
43
|
-
Max: 15
|
|
44
|
-
Metrics/ClassLength:
|
|
45
|
-
Enabled: true
|
|
46
|
-
Max: 150
|
|
47
|
-
Metrics/ModuleLength:
|
|
48
|
-
Max: 150
|
|
49
|
-
Metrics/ParameterLists:
|
|
50
|
-
Enabled: true
|
|
51
|
-
Metrics/CyclomaticComplexity:
|
|
52
|
-
Enabled: true
|
|
53
|
-
Metrics/AbcSize:
|
|
54
|
-
Enabled: true
|
|
55
|
-
Max: 30
|
|
56
|
-
|
|
57
|
-
Naming/MemoizedInstanceVariableName:
|
|
58
|
-
Enabled: false
|
|
59
|
-
Naming/MethodParameterName:
|
|
60
|
-
Enabled: false
|
|
61
|
-
Naming/FileName:
|
|
62
|
-
Enabled: false
|
|
63
|
-
|
|
64
|
-
Style/Documentation:
|
|
65
|
-
Enabled: false
|
|
66
|
-
Style/FrozenStringLiteralComment:
|
|
67
|
-
Enabled: true
|
|
68
|
-
Style/NumericLiterals:
|
|
69
|
-
Enabled: false
|
|
70
|
-
Style/StringLiterals:
|
|
71
|
-
EnforcedStyle: single_quotes
|
|
72
|
-
Style/AndOr:
|
|
73
|
-
Enabled: true
|
|
74
|
-
Style/ClassCheck:
|
|
75
|
-
Enabled: true
|
|
76
|
-
Style/GuardClause:
|
|
77
|
-
Enabled: true
|
|
78
|
-
Style/OptionalBooleanParameter:
|
|
79
|
-
Enabled: false
|
|
80
|
-
|
|
81
|
-
Security/Eval:
|
|
82
|
-
Enabled: true
|
|
83
|
-
Security/JSONLoad:
|
|
84
|
-
Enabled: true
|
|
85
|
-
Security/YAMLLoad:
|
|
86
|
-
Enabled: true
|
|
87
|
-
|
|
88
|
-
RSpec/NestedGroups:
|
|
89
|
-
Max: 4
|
data/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.5-dev
|
data/.simplecov
DELETED
data/Gemfile
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
source 'https://rubygems.org'
|
|
4
|
-
gemspec
|
|
5
|
-
|
|
6
|
-
gem 'dotenv', '>= 3.1.4'
|
|
7
|
-
gem 'irb', '>= 1.15.2'
|
|
8
|
-
gem 'rake', '>= 13.2.1'
|
|
9
|
-
gem 'rspec', '>= 3.13.0'
|
|
10
|
-
gem 'rubocop', '>= 1.66.1'
|
|
11
|
-
gem 'rubocop-rspec', '>= 3.1.0'
|
|
12
|
-
gem 'simplecov', '>= 0.22.0'
|
|
13
|
-
|
|
14
|
-
gem 'cgi', '>= 0.5.0' # Required to resolve a loading issue for VCR
|
|
15
|
-
gem 'vcr', '>= 6.3.1'
|
|
16
|
-
gem 'webmock', '>= 3.25.2'
|
data/Gemfile.lock
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
usps-imis-api (0.9.9)
|
|
5
|
-
activesupport (~> 8.0)
|
|
6
|
-
|
|
7
|
-
GEM
|
|
8
|
-
remote: https://rubygems.org/
|
|
9
|
-
specs:
|
|
10
|
-
activesupport (8.1.0)
|
|
11
|
-
base64
|
|
12
|
-
bigdecimal
|
|
13
|
-
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
14
|
-
connection_pool (>= 2.2.5)
|
|
15
|
-
drb
|
|
16
|
-
i18n (>= 1.6, < 2)
|
|
17
|
-
json
|
|
18
|
-
logger (>= 1.4.2)
|
|
19
|
-
minitest (>= 5.1)
|
|
20
|
-
securerandom (>= 0.3)
|
|
21
|
-
tzinfo (~> 2.0, >= 2.0.5)
|
|
22
|
-
uri (>= 0.13.1)
|
|
23
|
-
addressable (2.8.7)
|
|
24
|
-
public_suffix (>= 2.0.2, < 7.0)
|
|
25
|
-
ast (2.4.3)
|
|
26
|
-
base64 (0.3.0)
|
|
27
|
-
bigdecimal (3.3.1)
|
|
28
|
-
cgi (0.5.0)
|
|
29
|
-
concurrent-ruby (1.3.5)
|
|
30
|
-
connection_pool (2.5.4)
|
|
31
|
-
crack (1.0.1)
|
|
32
|
-
bigdecimal
|
|
33
|
-
rexml
|
|
34
|
-
date (3.4.1)
|
|
35
|
-
diff-lcs (1.6.2)
|
|
36
|
-
docile (1.4.1)
|
|
37
|
-
dotenv (3.1.8)
|
|
38
|
-
drb (2.2.3)
|
|
39
|
-
erb (5.1.1)
|
|
40
|
-
hashdiff (1.2.1)
|
|
41
|
-
i18n (1.14.7)
|
|
42
|
-
concurrent-ruby (~> 1.0)
|
|
43
|
-
io-console (0.8.1)
|
|
44
|
-
irb (1.15.2)
|
|
45
|
-
pp (>= 0.6.0)
|
|
46
|
-
rdoc (>= 4.0.0)
|
|
47
|
-
reline (>= 0.4.2)
|
|
48
|
-
json (2.15.2)
|
|
49
|
-
language_server-protocol (3.17.0.5)
|
|
50
|
-
lint_roller (1.1.0)
|
|
51
|
-
logger (1.7.0)
|
|
52
|
-
minitest (5.26.0)
|
|
53
|
-
parallel (1.27.0)
|
|
54
|
-
parser (3.3.9.0)
|
|
55
|
-
ast (~> 2.4.1)
|
|
56
|
-
racc
|
|
57
|
-
pp (0.6.3)
|
|
58
|
-
prettyprint
|
|
59
|
-
prettyprint (0.2.0)
|
|
60
|
-
prism (1.6.0)
|
|
61
|
-
psych (5.2.6)
|
|
62
|
-
date
|
|
63
|
-
stringio
|
|
64
|
-
public_suffix (6.0.2)
|
|
65
|
-
racc (1.8.1)
|
|
66
|
-
rainbow (3.1.1)
|
|
67
|
-
rake (13.3.0)
|
|
68
|
-
rdoc (6.15.0)
|
|
69
|
-
erb
|
|
70
|
-
psych (>= 4.0.0)
|
|
71
|
-
tsort
|
|
72
|
-
regexp_parser (2.11.3)
|
|
73
|
-
reline (0.6.2)
|
|
74
|
-
io-console (~> 0.5)
|
|
75
|
-
rexml (3.4.4)
|
|
76
|
-
rspec (3.13.2)
|
|
77
|
-
rspec-core (~> 3.13.0)
|
|
78
|
-
rspec-expectations (~> 3.13.0)
|
|
79
|
-
rspec-mocks (~> 3.13.0)
|
|
80
|
-
rspec-core (3.13.6)
|
|
81
|
-
rspec-support (~> 3.13.0)
|
|
82
|
-
rspec-expectations (3.13.5)
|
|
83
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
84
|
-
rspec-support (~> 3.13.0)
|
|
85
|
-
rspec-mocks (3.13.6)
|
|
86
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
87
|
-
rspec-support (~> 3.13.0)
|
|
88
|
-
rspec-support (3.13.6)
|
|
89
|
-
rubocop (1.81.6)
|
|
90
|
-
json (~> 2.3)
|
|
91
|
-
language_server-protocol (~> 3.17.0.2)
|
|
92
|
-
lint_roller (~> 1.1.0)
|
|
93
|
-
parallel (~> 1.10)
|
|
94
|
-
parser (>= 3.3.0.2)
|
|
95
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
96
|
-
regexp_parser (>= 2.9.3, < 3.0)
|
|
97
|
-
rubocop-ast (>= 1.47.1, < 2.0)
|
|
98
|
-
ruby-progressbar (~> 1.7)
|
|
99
|
-
unicode-display_width (>= 2.4.0, < 4.0)
|
|
100
|
-
rubocop-ast (1.47.1)
|
|
101
|
-
parser (>= 3.3.7.2)
|
|
102
|
-
prism (~> 1.4)
|
|
103
|
-
rubocop-rspec (3.7.0)
|
|
104
|
-
lint_roller (~> 1.1)
|
|
105
|
-
rubocop (~> 1.72, >= 1.72.1)
|
|
106
|
-
ruby-progressbar (1.13.0)
|
|
107
|
-
securerandom (0.4.1)
|
|
108
|
-
simplecov (0.22.0)
|
|
109
|
-
docile (~> 1.1)
|
|
110
|
-
simplecov-html (~> 0.11)
|
|
111
|
-
simplecov_json_formatter (~> 0.1)
|
|
112
|
-
simplecov-html (0.13.2)
|
|
113
|
-
simplecov_json_formatter (0.1.4)
|
|
114
|
-
stringio (3.1.7)
|
|
115
|
-
tsort (0.2.0)
|
|
116
|
-
tzinfo (2.0.6)
|
|
117
|
-
concurrent-ruby (~> 1.0)
|
|
118
|
-
unicode-display_width (3.2.0)
|
|
119
|
-
unicode-emoji (~> 4.1)
|
|
120
|
-
unicode-emoji (4.1.0)
|
|
121
|
-
uri (1.0.4)
|
|
122
|
-
vcr (6.3.1)
|
|
123
|
-
base64
|
|
124
|
-
webmock (3.25.2)
|
|
125
|
-
addressable (>= 2.8.0)
|
|
126
|
-
crack (>= 0.3.2)
|
|
127
|
-
hashdiff (>= 0.4.0, < 2.0.0)
|
|
128
|
-
|
|
129
|
-
PLATFORMS
|
|
130
|
-
arm64-darwin-23
|
|
131
|
-
ruby
|
|
132
|
-
|
|
133
|
-
DEPENDENCIES
|
|
134
|
-
cgi (>= 0.5.0)
|
|
135
|
-
dotenv (>= 3.1.4)
|
|
136
|
-
irb (>= 1.15.2)
|
|
137
|
-
rake (>= 13.2.1)
|
|
138
|
-
rspec (>= 3.13.0)
|
|
139
|
-
rubocop (>= 1.66.1)
|
|
140
|
-
rubocop-rspec (>= 3.1.0)
|
|
141
|
-
simplecov (>= 0.22.0)
|
|
142
|
-
usps-imis-api!
|
|
143
|
-
vcr (>= 6.3.1)
|
|
144
|
-
webmock (>= 3.25.2)
|
|
145
|
-
|
|
146
|
-
BUNDLED WITH
|
|
147
|
-
2.5.6
|
data/Rakefile
DELETED
data/bin/console
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
require 'bundler/setup'
|
|
5
|
-
require 'usps/imis'
|
|
6
|
-
|
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
9
|
-
|
|
10
|
-
# Configure from the environment automatically
|
|
11
|
-
require 'dotenv/load'
|
|
12
|
-
Usps::Imis.configure do |config|
|
|
13
|
-
config.environment = :development
|
|
14
|
-
config.imis_id_query_name = ENV['IMIS_ID_QUERY_NAME']
|
|
15
|
-
|
|
16
|
-
config.username = ENV['IMIS_USERNAME']
|
|
17
|
-
config.password = ENV['IMIS_PASSWORD']
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
require "irb"
|
|
21
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
|
File without changes
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
http_interactions:
|
|
3
|
-
- request:
|
|
4
|
-
method: post
|
|
5
|
-
uri: https://abcdev.imiscloud.com/Token
|
|
6
|
-
body:
|
|
7
|
-
encoding: US-ASCII
|
|
8
|
-
string: grant_type=password&username=<USERNAME>&password=<PASSWORD>
|
|
9
|
-
headers:
|
|
10
|
-
Accept-Encoding:
|
|
11
|
-
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
|
12
|
-
Accept:
|
|
13
|
-
- "*/*"
|
|
14
|
-
User-Agent:
|
|
15
|
-
- Ruby
|
|
16
|
-
Host:
|
|
17
|
-
- abcdev.imiscloud.com
|
|
18
|
-
response:
|
|
19
|
-
status:
|
|
20
|
-
code: 200
|
|
21
|
-
message: OK
|
|
22
|
-
headers:
|
|
23
|
-
Date:
|
|
24
|
-
- Sun, 26 Oct 2025 01:24:38 GMT
|
|
25
|
-
Content-Type:
|
|
26
|
-
- application/json; charset=UTF-8
|
|
27
|
-
Transfer-Encoding:
|
|
28
|
-
- chunked
|
|
29
|
-
Connection:
|
|
30
|
-
- keep-alive
|
|
31
|
-
Server:
|
|
32
|
-
- cloudflare
|
|
33
|
-
Cf-Ray:
|
|
34
|
-
- 994627bdc9e8e822-ORD
|
|
35
|
-
Cf-Cache-Status:
|
|
36
|
-
- DYNAMIC
|
|
37
|
-
Access-Control-Allow-Origin:
|
|
38
|
-
- "*"
|
|
39
|
-
Cache-Control:
|
|
40
|
-
- no-cache
|
|
41
|
-
Expires:
|
|
42
|
-
- "-1"
|
|
43
|
-
Strict-Transport-Security:
|
|
44
|
-
- max-age=31536000
|
|
45
|
-
Vary:
|
|
46
|
-
- Accept-Encoding,Accept-Encoding
|
|
47
|
-
Pragma:
|
|
48
|
-
- no-cache
|
|
49
|
-
Access-Control-Expose-Headers:
|
|
50
|
-
- Request-Context
|
|
51
|
-
Request-Context:
|
|
52
|
-
- appId=cid-v1:9c05b5dd-9acf-4a59-aabb-1775785c005f
|
|
53
|
-
X-Aspnet-Version:
|
|
54
|
-
- 4.0.30319
|
|
55
|
-
X-Content-Type-Options:
|
|
56
|
-
- nosniff
|
|
57
|
-
- nosniff
|
|
58
|
-
Set-Cookie:
|
|
59
|
-
- __cf_bm=WthwCIYBGJjeQcPIuJteHBCsffR9_YnIswA1GxBsAY0-1761441878-1.0.1.1-PDKN99A_uKww6R0a3o7xNsGHGxn2nOOhCXcaMzV_6LgrHJ1GEYNmKklmEtAghMWUP4IGpM9INbgu7tFJP1_AlEsAbYw0VOZD80N9_B0VvwU;
|
|
60
|
-
path=/; expires=Sun, 26-Oct-25 01:54:38 GMT; domain=.abcdev.imiscloud.com;
|
|
61
|
-
HttpOnly; Secure; SameSite=None
|
|
62
|
-
body:
|
|
63
|
-
encoding: ASCII-8BIT
|
|
64
|
-
string: '{"access_token":"<ACCESS_TOKEN>","token_type":"bearer","expires_in":3599,"userName":"J.S.FIANDER@GMAIL.COM",".issued":"Sun,
|
|
65
|
-
26 Oct 2025 01:24:38 GMT",".expires":"Sun, 26 Oct 2025 02:24:38 GMT"}'
|
|
66
|
-
recorded_at: Sun, 26 Oct 2025 01:24:38 GMT
|
|
67
|
-
recorded_with: VCR 6.3.1
|