usps-imis-api 0.3.1.pre.8 → 0.3.1

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: de5448a27ff10181a75b5deb4d6a25bf7ad8349360a1ddea7fa64cc79b64925c
4
- data.tar.gz: 59f78c0058d9f6dae4e39e58b4a2305229ad95eec9bff4c52ef77309034db1ea
3
+ metadata.gz: 363b03cdc0a93fdde0cf8409874723a07501191f271a23994a2a657ef82ccb2f
4
+ data.tar.gz: 1daa873de5c75094cc755cd9dec593b899388edf337036cb9e53949c4f15c191
5
5
  SHA512:
6
- metadata.gz: 0a98a3af09accbcb029f0ebe37c6b83aa008890b611efb0177359276c3e019e44552b127e08354153f103a9da62504435fdd828868e17e7d75e0eeafaf79b9e1
7
- data.tar.gz: 7e0ae652d4ee8dbc0c2adb6fee5a5383510769c2a14bddbb8d577eeda95fc7eef197e5259b5ad27b0bd932494ef37dff8e96abf7544b50b5fe1edec6088d681a
6
+ metadata.gz: f795e80baefffaa7a7dad8f18945c1b388b311419ab5bff7bc4de138647b9cdbe2c893ae82675248c36b8c76662394a2feb51312d0321e0b26ebd0d145b7d28d
7
+ data.tar.gz: 742ec65ee15fb91082173f398b9fac89859f78ec32b041ca7332ab5e0fa5a44dd325d91af4e8cecfc04f64f3dc6617de22d078583e9c53e61dc527ebeb1969b9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usps-imis-api (0.3.1.pre.6)
4
+ usps-imis-api (0.3.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -83,17 +83,17 @@ module Usps
83
83
  {
84
84
  "$type" => "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
85
85
  "Name" => "ABC_Educ_Transaction_Date",
86
- "Value" => Time.zone.now.strftime('%Y-%m-%dT%H:%I:%S')
86
+ "Value" => Time.now.strftime('%Y-%m-%dT%H:%I:%S')
87
87
  },
88
88
  {
89
89
  "$type" => "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
90
90
  "Name" => "ABC_Other_Code",
91
- "Value" => date[:code]
91
+ "Value" => data[:code]
92
92
  },
93
93
  {
94
94
  "$type" => "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
95
95
  "Name" => "ABC_Product_Code",
96
- "Value" => date[:type_code]
96
+ "Value" => data[:type_code]
97
97
  },
98
98
  {
99
99
  "$type" => "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module Imis
5
- VERSION = '0.3.1-8'
5
+ VERSION = '0.3.1'
6
6
  end
7
7
  end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Usps::Imis::Panel::Education do
6
+ let(:education) { described_class.new }
7
+
8
+ let(:details) do
9
+ {
10
+ certificate: 'E136924',
11
+ description: 'Marine Navigation',
12
+ effective_date: Time.now.strftime('%Y-%m-%dT00:00:00'),
13
+ source: 'Online Exams System',
14
+ code: 'MN',
15
+ type_code: 'CRS'
16
+
17
+ }
18
+ end
19
+
20
+ before { education.api.imis_id = 6374 }
21
+
22
+ describe '#get' do
23
+ it 'loads a specific object' do
24
+ expect(education.get(90737)).to be_a(Hash)
25
+ end
26
+ end
27
+
28
+ # rubocop:disable RSpec/ExampleLength
29
+ it 'handles new records correctly', :aggregate_failures do
30
+ new_record = education.create(details)
31
+ expect(new_record).to be_a(Hash)
32
+
33
+ ordinal = new_record['Properties']['$values'][1]['Value']['$value']
34
+
35
+ update_result = education.update(details.merge(source: 'Online Exams System - Modified', ordinal: ordinal))
36
+ updated = update_result['Properties']['$values'].find { |v| v['Name'] == 'ABC_Educ_Source_System' }
37
+ expect(updated['Value']).to eq('Online Exams System - Modified')
38
+
39
+ expect(education.destroy(ordinal)).to eq('')
40
+ end
41
+ # rubocop:enable RSpec/ExampleLength
42
+ 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.3.1.pre.8
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander
@@ -39,6 +39,7 @@ files:
39
39
  - lib/usps/imis/version.rb
40
40
  - spec/lib/usps/imis/api_spec.rb
41
41
  - spec/lib/usps/imis/mapper_spec.rb
42
+ - spec/lib/usps/imis/panel/education_spec.rb
42
43
  - spec/lib/usps/imis/panel/vsc_spec.rb
43
44
  - spec/spec_helper.rb
44
45
  - usps-imis-api.gemspec