usps-support 0.2.64 → 0.2.66

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: 1601da6aa9e5c242e29888573554e4954efa8f8ed5dd9f78c5b9b2275d64b0a7
4
- data.tar.gz: 89da1c339cbc7775a2f1463fad65a6574259f3245e072d100601bdfd0fb20a40
3
+ metadata.gz: fe5075012e0988ba212db3443f7e168933e1477def45cfcecab1dfe20926d823
4
+ data.tar.gz: 93316be136f7099ee57549e282c8f46df57e2cf7111163f91688a962d3b6f20b
5
5
  SHA512:
6
- metadata.gz: c816e65f0dfcdbdaa93d9641f4f9d0bcf7dc0fa623af2aca94ca62a9d757c48459fad78d3089856e8f0a4fd8c73313a1f327442f6fbde1bfa857acc6606e9275
7
- data.tar.gz: ccf7186a3b2c8dae8a7ba59a50767d5c3d50784075f89f3c47c68fdb18f626cc51827c7d553e6aa511d0181b2283cc6da5cfa955b1faa8f3de67b554790152a8
6
+ metadata.gz: aa3cec6e37810a31590322d78d3a67fbe6e4fc284561616dc7023274eaaf3061db96222e1d1a8c3f8a532af5b3b95f2b2752f5cef25ef5c54e7ffbc7cef2b3c7
7
+ data.tar.gz: '09ebdb0cffb6cdedea903c65e9f3fa8fc2f2512823aad557733b121ca5a241f503e0caf16372d323071e63e2eae3f7aeb1c4cdac8c4ad83ee8e2fde8f326f847'
@@ -11,7 +11,7 @@
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
13
  ActiveRecord::Schema[8.1].define do
14
- create_table "abftp2", primary_key: "certificate", id: { type: :string, limit: 7 }, charset: "latin1", comment: "dtb-for PM created daily from HQ-has X members", force: :cascade do |t|
14
+ create_table "abftp2", primary_key: "certno", id: { type: :string, limit: 7 }, charset: "latin1", comment: "dtb-has billed through date from iMIS rest questionable", force: :cascade do |t|
15
15
  t.integer "district", default: 0, null: false
16
16
  t.integer "sqdno", default: 0, null: false
17
17
  t.string "account", limit: 5, null: false
@@ -34,9 +34,25 @@ ActiveRecord::Schema[8.1].define do
34
34
  t.string "dob", limit: 8
35
35
  t.string "family", limit: 7
36
36
  t.string "died", limit: 8
37
+ t.string "reinst", limit: 8
38
+ t.string "rank", limit: 3
39
+ t.string "grade", limit: 2
37
40
  end
38
41
 
39
- create_table "djdesc", primary_key: "jobcode", id: { type: :string, limit: 7 }, charset: "latin1", comment: "dtb-created daily has active dist Job descritpions", force: :cascade do |t|
42
+ create_table "associates", primary_key: ["squadno", "certno"], charset: "latin1", comment: "dtb-Associate and Honorary Members", force: :cascade do |t|
43
+ t.integer "id", null: false, auto_increment: true
44
+ t.integer "squadno", default: 0, null: false
45
+ t.integer "dist", default: 0, null: false
46
+ t.string "certno", limit: 7, default: "", null: false
47
+ t.string "first", limit: 15
48
+ t.string "last", limit: 25
49
+ t.string "type", limit: 1
50
+ t.string "notes"
51
+ t.string "modified", limit: 6
52
+ t.index ["id"], name: "id_index"
53
+ end
54
+
55
+ create_table "djdesc", primary_key: "jobcode", id: { type: :string, limit: 7 }, charset: "latin1", comment: "dtb-depreciated use jobcodes or djftp", force: :cascade do |t|
40
56
  t.string "jdesc", limit: 100
41
57
  t.string "rank", limit: 3, null: false
42
58
  t.string "prank", limit: 3, null: false
@@ -48,16 +64,23 @@ ActiveRecord::Schema[8.1].define do
48
64
  t.string "Descript", limit: 7, null: false
49
65
  end
50
66
 
51
- create_table "djftp", id: false, charset: "latin1", comment: "dtb - Current District Jobs loaded from HQ data", force: :cascade do |t|
67
+ create_table "djftp", id: :integer, charset: "latin1", comment: "dtb - Current District Jobs with acting Cdrs", force: :cascade do |t|
52
68
  t.string "certno", limit: 7, null: false
53
69
  t.string "first", limit: 15
54
70
  t.string "last", limit: 25
55
71
  t.string "jobcode", limit: 5
72
+ t.integer "rank", default: 99
56
73
  t.string "year", limit: 4
57
- t.integer "account", null: false
58
- t.string "distno", limit: 2
74
+ t.integer "account", default: 0, null: false
75
+ t.integer "distno", default: 0, null: false
59
76
  t.string "acting", limit: 1
77
+ t.string "Lev", limit: 1
78
+ t.string "Descript", limit: 7
79
+ t.string "description", limit: 100
60
80
  t.string "source", limit: 1
81
+ t.string "rcert", limit: 7, default: "", null: false
82
+ t.string "crtdate", limit: 8, default: "", null: false
83
+ t.index ["certno", "jobcode", "year", "account"], name: "unique_jobs", unique: true
61
84
  end
62
85
 
63
86
  create_table "jhist", id: false, charset: "latin1", comment: "dtb-job history", force: :cascade do |t|
@@ -71,10 +94,12 @@ ActiveRecord::Schema[8.1].define do
71
94
  t.integer "rank", default: 99, null: false
72
95
  t.integer "prank", default: 99, null: false
73
96
  t.string "status", limit: 1
97
+ t.index ["account", "year"], name: "account_year"
98
+ t.index ["certno", "jobcode", "year"], name: "certno_job"
74
99
  t.index ["id"], name: "id_index"
75
100
  end
76
101
 
77
- create_table "mbftp", primary_key: "certno", id: { type: :string, limit: 7 }, charset: "latin1", comment: "dtb-active membership created daily from HQ", force: :cascade do |t|
102
+ create_table "mbftp", primary_key: "certno", id: { type: :string, limit: 7 }, charset: "utf8mb3", comment: "dtb-active membership updated daily from HQ/iMIS", force: :cascade do |t|
78
103
  t.integer "id", null: false, auto_increment: true
79
104
  t.integer "distno"
80
105
  t.string "daccount", limit: 4
@@ -98,11 +123,11 @@ ActiveRecord::Schema[8.1].define do
98
123
  t.string "area2", limit: 3
99
124
  t.string "phone2", limit: 7
100
125
  t.string "areac", limit: 3
101
- t.string "phonec", limit: 7
126
+ t.string "phonec", limit: 8
102
127
  t.string "email", limit: 40
103
128
  t.string "estatus", limit: 1
104
- t.integer "rank"
105
- t.string "pastrank", limit: 3
129
+ t.integer "rank", default: 99, null: false
130
+ t.integer "pastrank", default: 99, null: false
106
131
  t.string "sqdrank", limit: 3
107
132
  t.string "grade", limit: 6
108
133
  t.string "spcertno", limit: 7
@@ -131,12 +156,12 @@ ActiveRecord::Schema[8.1].define do
131
156
  t.string "hq", limit: 8
132
157
  t.string "x", limit: 1
133
158
  t.string "birth", limit: 8
134
- t.string "ext", limit: 4
159
+ t.string "ext", limit: 5
135
160
  t.string "ok", limit: 1
136
161
  t.string "areaf", limit: 3
137
162
  t.string "fax", limit: 7
138
- t.string "mmsi", limit: 9
139
- t.string "callsign", limit: 7
163
+ t.string "mmsi", limit: 11
164
+ t.string "callsign", limit: 30
140
165
  t.string "seascout", limit: 1
141
166
  t.integer "pdistno"
142
167
  t.integer "psqdcode"
@@ -153,27 +178,40 @@ ActiveRecord::Schema[8.1].define do
153
178
  t.string "DBdate", limit: 8
154
179
  t.string "btemp", limit: 8
155
180
  t.string "iMISid", limit: 8
181
+ t.string "paidto", limit: 8, default: "0", null: false
156
182
  t.index ["certno"], name: "certno", unique: true
157
183
  t.index ["id"], name: "id_index"
158
184
  end
159
185
 
160
- create_table "njdesc", primary_key: "jobcode", id: { type: :string, limit: 7 }, charset: "latin1", comment: "dtb-created daily active nat job desc", force: :cascade do |t|
186
+ create_table "njdesc", primary_key: "jobcode", id: { type: :string, limit: 7 }, charset: "latin1", comment: "dtb-created daily assigned active nat job desc", force: :cascade do |t|
161
187
  t.string "jdesc", limit: 100
162
- t.string "admin", limit: 5, null: false
163
188
  t.string "rank", limit: 3, null: false
164
189
  t.string "prank", limit: 3, null: false
165
190
  t.string "type", limit: 1, null: false
166
191
  t.string "active", limit: 1, null: false
192
+ t.string "admin", limit: 5, null: false
167
193
  t.string "map", limit: 1, null: false
194
+ t.string "Lev", limit: 1, null: false
195
+ t.string "Descript", limit: 7, null: false
168
196
  end
169
197
 
170
- create_table "njftp", id: false, charset: "latin1", comment: "dtb-created daily from HQ active nat jobs", force: :cascade do |t|
198
+ create_table "njftp", id: :integer, charset: "latin1", comment: "dtb-active nat jobs", force: :cascade do |t|
171
199
  t.string "certno", limit: 7, null: false
172
200
  t.string "first", limit: 15
173
201
  t.string "last", limit: 25
174
202
  t.string "jobcode", limit: 7
203
+ t.integer "rank", default: 99
175
204
  t.string "year", limit: 4
176
- t.string "distno", limit: 2
205
+ t.string "description", limit: 100
206
+ t.integer "account", default: 0, null: false
207
+ t.integer "distno", default: 0, null: false
208
+ t.string "acting", limit: 1, default: "", null: false
209
+ t.string "Lev", limit: 1, default: ""
210
+ t.string "source", limit: 1, default: ""
211
+ t.string "Descript", limit: 7, default: ""
212
+ t.string "rcert", limit: 7, default: "", null: false
213
+ t.string "crtdate", limit: 8, default: "", null: false
214
+ t.index ["certno", "jobcode", "year", "account"], name: "unique_jobs", unique: true
177
215
  end
178
216
 
179
217
  create_table "ranks", id: false, charset: "latin1", force: :cascade do |t|
@@ -182,7 +220,7 @@ ActiveRecord::Schema[8.1].define do
182
220
  t.string "RankAbbr", limit: 15
183
221
  end
184
222
 
185
- create_table "sjdesc", primary_key: "jobcode", id: { type: :string, limit: 7 }, charset: "latin1", comment: "dtb-created daily has active squad Job descritpions", force: :cascade do |t|
223
+ create_table "sjdesc", primary_key: "jobcode", id: { type: :string, limit: 7 }, charset: "latin1", comment: "dtb-squadron job desc use jobcodes or sjftp instead", force: :cascade do |t|
186
224
  t.string "jdesc", limit: 100
187
225
  t.string "rank", limit: 3, null: false
188
226
  t.string "prank", limit: 3, null: false
@@ -194,15 +232,22 @@ ActiveRecord::Schema[8.1].define do
194
232
  t.string "Descript", limit: 7, null: false
195
233
  end
196
234
 
197
- create_table "sjftp", id: false, charset: "latin1", comment: "dtb-created daily from HQ active squadron jobs", force: :cascade do |t|
235
+ create_table "sjftp", id: :integer, charset: "latin1", comment: "dtb-active squadron jobs with acting cdrs", force: :cascade do |t|
198
236
  t.string "certno", limit: 7, null: false
199
237
  t.string "first", limit: 15
200
238
  t.string "last", limit: 25
201
239
  t.string "jobcode", limit: 5
240
+ t.integer "rank", default: 99
202
241
  t.string "year", limit: 4
203
- t.integer "account", null: false
204
- t.string "distno", limit: 2
242
+ t.integer "account", default: 0, null: false
243
+ t.integer "distno", default: 0, null: false
205
244
  t.string "acting", limit: 1
245
+ t.string "Lev", limit: 1
246
+ t.string "Descript", limit: 7
247
+ t.string "description", limit: 100
206
248
  t.string "source", limit: 1
249
+ t.string "rcert", limit: 7, default: "", null: false
250
+ t.string "crtdate", limit: 8, default: "", null: false
251
+ t.index ["certno", "jobcode", "year", "account"], name: "unique_jobs", unique: true
207
252
  end
208
253
  end
@@ -11,7 +11,7 @@
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
13
  ActiveRecord::Schema[8.1].define do
14
- create_table "mbrclasses", id: :integer, charset: "latin1", comment: "dtb-Active member classes", options: "ENGINE=InnoDB", force: :cascade do |t|
14
+ create_table "mbrclasses", id: :integer, charset: "latin1", comment: "dtb-Active member classes", force: :cascade do |t|
15
15
  t.string "sqnumber", limit: 4
16
16
  t.string "account", limit: 4
17
17
  t.string "crsid", limit: 17
@@ -74,7 +74,7 @@ ActiveRecord::Schema[8.1].define do
74
74
  t.index ["sqnumber"], name: "csq_index"
75
75
  end
76
76
 
77
- create_table "students", id: :integer, charset: "latin1", comment: "dtb-Active eddept HQ800 students", options: "ENGINE=InnoDB", force: :cascade do |t|
77
+ create_table "students", id: :integer, charset: "latin1", comment: "dtb-Active eddept HQ800 students", force: :cascade do |t|
78
78
  t.string "csl", limit: 1
79
79
  t.string "crsid", limit: 17
80
80
  t.string "start", limit: 6
@@ -147,7 +147,8 @@ ActiveRecord::Schema[8.1].define do
147
147
  create_table "websites", id: :integer, charset: "latin1", comment: "dtb-Accounts profiles (squadrons, districts, BOC regins,etc)", options: "ENGINE=InnoDB PACK_KEYS=1", force: :cascade do |t|
148
148
  t.string "type", limit: 1, default: "", null: false
149
149
  t.string "Name", limit: 35, default: "", null: false
150
- t.string "DBA", limit: 50
150
+ t.string "DBA", limit: 100, default: ""
151
+ t.string "ABCName", limit: 50, default: ""
151
152
  t.string "url", limit: 75, default: "", null: false
152
153
  t.string "newsletter", limit: 40
153
154
  t.string "email", limit: 50, default: "", null: false
@@ -156,15 +157,15 @@ ActiveRecord::Schema[8.1].define do
156
157
  t.string "ceforce", limit: 1
157
158
  t.string "region", limit: 60, default: "", null: false
158
159
  t.string "burgee", limit: 200
159
- t.string "dist", limit: 3, default: "", null: false
160
- t.string "daccount", limit: 4
160
+ t.integer "dist", default: 0, null: false
161
+ t.integer "daccount", default: 0, null: false
161
162
  t.string "state", limit: 2, default: "", null: false
162
163
  t.string "tzone", limit: 1
163
164
  t.string "sqnumber", limit: 5, default: "", null: false
164
- t.integer "account", null: false
165
+ t.integer "account", default: 0, null: false
165
166
  t.string "initials", limit: 3
166
167
  t.string "modified", limit: 8
167
- t.string "who", limit: 8
168
+ t.string "who", limit: 16
168
169
  t.string "prov", limit: 1
169
170
  t.string "sail", limit: 1
170
171
  t.string "pcontact", limit: 30
@@ -198,8 +199,24 @@ ActiveRecord::Schema[8.1].define do
198
199
  t.string "tax", limit: 4
199
200
  t.string "facebook"
200
201
  t.string "ExPicLib", limit: 75
202
+ t.string "Of0", limit: 1, default: "Y"
203
+ t.string "Of1", limit: 1, default: "Y"
204
+ t.string "Of2", limit: 1, default: "Y"
205
+ t.string "Of3", limit: 1, default: "Y"
206
+ t.string "Of4", limit: 1, default: "Y"
207
+ t.string "Of5", limit: 1, default: "Y"
208
+ t.string "Of6", limit: 1, default: "Y"
209
+ t.string "Of7", limit: 1, default: "N"
210
+ t.string "Of8", limit: 1, default: "N"
211
+ t.string "Of9", limit: 1, default: "N"
212
+ t.integer "decals", limit: 2, default: 0, unsigned: true
213
+ t.string "cowdate", limit: 6, default: ""
214
+ t.string "cyear", limit: 4, default: ""
215
+ t.string "cnote", limit: 1, default: ""
216
+ t.string "watchdate", limit: 6, default: ""
217
+ t.string "wyear", limit: 4, default: ""
218
+ t.string "wnote", limit: 1, default: ""
201
219
  t.index ["Name"], name: "Name_index"
202
- t.index ["dist"], name: "dist_index"
203
220
  t.index ["sqnumber"], name: "wsq_index"
204
221
  end
205
222
  end
@@ -5,7 +5,7 @@ module Usps::Support::Models::Hq::Members
5
5
  #
6
6
  class FormerMember < BaseRecord
7
7
  self.table_name = :abftp2
8
- self.primary_key = :certificate
8
+ self.primary_key = :certno
9
9
  ignore_type_column_sti!
10
10
 
11
11
  belongs_to(
@@ -23,7 +23,7 @@ module Usps::Support::Models::Hq::Members
23
23
 
24
24
  # Method aliases to support the expected Members::Member API
25
25
  alias squadron former_squadron
26
- alias_attribute :certno, :certificate
26
+ alias_attribute :certificate, :certno
27
27
  alias_attribute :first, :firstname
28
28
  alias_attribute :last, :lastname
29
29
 
@@ -9,6 +9,9 @@ module Usps::Support::Models::Hq
9
9
  module Schemas
10
10
  SCHEMA_DIR = File.join(Usps::Support::ROOT, 'db/hq')
11
11
 
12
+ # How a host app's schema file delegates here.
13
+ DELEGATION = /\bSchemas\.load_schemas?\b/
14
+
12
15
  class << self
13
16
  # Load one or more HQ schemas into the currently-active connection.
14
17
  # Typically called from a host app's `db/<name>_schema.rb` shim so
@@ -20,6 +23,28 @@ module Usps::Support::Models::Hq
20
23
  def load_schema(name)
21
24
  load File.join(SCHEMA_DIR, "#{name}_schema.rb")
22
25
  end
26
+
27
+ # Every schema this version of the gem ships, as one string.
28
+ def shipped_source = Dir[File.join(SCHEMA_DIR, '*_schema.rb')].map { File.read(it) }.join
29
+ end
30
+
31
+ # Rails reloads a test database's schema only when the schema file's SHA1
32
+ # differs from the one recorded at its last load. A host app's file only
33
+ # delegates here, so it never changes when a gem update ships a different
34
+ # schema, and the test database would keep the old one until reloaded by
35
+ # hand. Folding the shipped schemas into a delegating file's digest makes
36
+ # `maintain_test_schema!` reload it after any such update.
37
+ module SchemaDigest
38
+ private
39
+
40
+ def schema_sha1(file)
41
+ source = File.read(file)
42
+ return super unless source.match?(DELEGATION)
43
+
44
+ OpenSSL::Digest::SHA1.hexdigest(source + Schemas.shipped_source)
45
+ end
23
46
  end
24
47
  end
25
48
  end
49
+
50
+ ActiveRecord::Tasks::DatabaseTasks.singleton_class.prepend(Usps::Support::Models::Hq::Schemas::SchemaDigest)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module Support
5
- VERSION = '0.2.64'
5
+ VERSION = '0.2.66'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usps-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.64
4
+ version: 0.2.66
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander