usps-support 0.2.56 → 0.2.57

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: 62e9af5356bcd1225e25c991b17f12adfe1aba9966c46fab7c0c579369da84dd
4
- data.tar.gz: 40296e55d69d18fdef651c805ff126d39e6ba00d9eabaf88dafddc2f8390f2a9
3
+ metadata.gz: 17bdbad3251366c6e28c37a093df5b2bf92a83b8ad409370f373d36581d61b15
4
+ data.tar.gz: 68a09ef63cb14ca1d2e274e7b1bec23b4167f8f234ff8a021c106306c2bdda38
5
5
  SHA512:
6
- metadata.gz: 33e56e8f63917e3fc353ff5f45d6517696e04e427def8bed96035f263a1e5530d666e6e97ad82930bf2716ab91d89bc76e99ae1c5cfb29ba695098e4617b58d8
7
- data.tar.gz: 3c53c7c5d9e0a021b30b660d1663c1fa5b7722360f1ea89f04dbfbd6bd1cc09cadb30da31916b8ab9b629b76bc56c1ade9f8aeb2a5c8909c3a9b372a038e4d2a
6
+ metadata.gz: 9335f980733d1671ca6b52e2628f3adbb740d0cfb2d141209d263033e22c1c4f03fe2446affc8b98661208fd60842aa6cc216e25956973d4b73168bb4891ed9f
7
+ data.tar.gz: 5c6cc031143a7274529f8ff7d77c9214f69e202b1d290f214c99c67c7c086fc138b41984689184ee82429af4c0b495f351a723dd176f9bf296a4382d8261e6c1
@@ -60,6 +60,20 @@ ActiveRecord::Schema[8.1].define do
60
60
  t.string "source", limit: 1
61
61
  end
62
62
 
63
+ create_table "jhist", id: false, charset: "latin1", comment: "dtb-job history", force: :cascade do |t|
64
+ t.integer "id", null: false, auto_increment: true
65
+ t.string "certno", limit: 7
66
+ t.string "jobcode", limit: 5
67
+ t.string "year", limit: 4
68
+ t.integer "account", default: 0, null: false
69
+ t.integer "distno", default: 0, null: false
70
+ t.string "type", limit: 1
71
+ t.integer "rank", default: 99, null: false
72
+ t.integer "prank", default: 99, null: false
73
+ t.string "status", limit: 1
74
+ t.index ["id"], name: "id_index"
75
+ end
76
+
63
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|
64
78
  t.integer "id", null: false, auto_increment: true
65
79
  t.integer "distno"
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Usps::Support::Models::Hq::Members
4
+ # Historical job assignment: one row per year per jobcode.
5
+ class JobHistory < BaseRecord
6
+ self.table_name = :jhist
7
+ self.primary_key = :id
8
+ ignore_type_column_sti!
9
+
10
+ # The HQ job tools blank the status while a job is held and set 'X' once it ends; past rank is
11
+ # derived from the ended rows.
12
+ enum :status, { held: '', ended: 'X' }, default: :held
13
+
14
+ belongs_to(
15
+ :member,
16
+ class_name: '::Members::Member',
17
+ foreign_key: :certno, primary_key: :certno, inverse_of: :job_histories, optional: true
18
+ )
19
+
20
+ scope :at_rank, ->(rank) { where(rank:) }
21
+ end
22
+ end
@@ -40,6 +40,11 @@ module Usps::Support::Models::Hq::Members
40
40
  class_name: '::Members::AssociateMember',
41
41
  foreign_key: 'certno', primary_key: 'certno', inverse_of: :member
42
42
  )
43
+ has_many(
44
+ :job_histories,
45
+ class_name: '::Members::JobHistory',
46
+ foreign_key: 'certno', primary_key: 'certno', inverse_of: :member
47
+ )
43
48
 
44
49
  enum :mbrtype, {
45
50
  active: 'AC',
@@ -9,6 +9,7 @@ require_relative 'members/associate_member'
9
9
  require_relative 'members/district_job_description'
10
10
  require_relative 'members/district_job'
11
11
  require_relative 'members/former_member'
12
+ require_relative 'members/job_history'
12
13
  require_relative 'members/member'
13
14
  require_relative 'members/national_job_description'
14
15
  require_relative 'members/national_job'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module Support
5
- VERSION = '0.2.56'
5
+ VERSION = '0.2.57'
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.56
4
+ version: 0.2.57
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander
@@ -95,8 +95,6 @@ files:
95
95
  - db/hq/websites_schema.rb
96
96
  - lib/usps/all.rb
97
97
  - lib/usps/support.rb
98
- - lib/usps/support/db/members_schema.rb
99
- - lib/usps/support/db/websites_schema.rb
100
98
  - lib/usps/support/engine.rb
101
99
  - lib/usps/support/health_diagnostics.rb
102
100
  - lib/usps/support/health_monitor.rb
@@ -121,6 +119,7 @@ files:
121
119
  - lib/usps/support/models/hq/members/district_job.rb
122
120
  - lib/usps/support/models/hq/members/district_job_description.rb
123
121
  - lib/usps/support/models/hq/members/former_member.rb
122
+ - lib/usps/support/models/hq/members/job_history.rb
124
123
  - lib/usps/support/models/hq/members/member.rb
125
124
  - lib/usps/support/models/hq/members/national_job.rb
126
125
  - lib/usps/support/models/hq/members/national_job_description.rb
@@ -1,198 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema[7.2].define(version: 2025_11_01_000000) 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|
15
- t.integer "district", default: 0, null: false
16
- t.integer "sqdno", default: 0, null: false
17
- t.string "account", limit: 5, null: false
18
- t.string "password", limit: 10, null: false
19
- t.string "sqdname", limit: 30, null: false
20
- t.integer "month", default: 0, null: false
21
- t.string "firstname", limit: 15
22
- t.string "lastname", limit: 25
23
- t.string "areacode", limit: 3
24
- t.string "telephone", limit: 10
25
- t.string "status", limit: 30, null: false, collation: "latin1_bin"
26
- t.string "type", limit: 5, null: false
27
- t.string "invoice", limit: 9, null: false
28
- t.string "abemail", limit: 40, null: false
29
- t.string "abestatus", limit: 1, null: false
30
- t.string "mbrdate", limit: 8
31
- t.string "cduesyr", limit: 4
32
- t.string "pduesyr", limit: 4
33
- t.string "nrendate", limit: 8
34
- t.string "dob", limit: 8
35
- t.string "family", limit: 7
36
- t.string "died", limit: 8
37
- end
38
-
39
- create_table "djdesc", primary_key: "jobcode", id: { type: :string, limit: 5 }, charset: "latin1", comment: "dtb-created daily has active dist Job descritpions", force: :cascade do |t|
40
- t.string "jdesc", limit: 100
41
- t.string "rank", limit: 3, null: false
42
- t.string "prank", limit: 3, null: false
43
- t.string "OD1", limit: 1, null: false
44
- t.string "OD2", limit: 1, null: false
45
- t.string "ED1", limit: 1, null: false
46
- t.string "Lev", limit: 1, null: false
47
- t.string "EGA", limit: 1, null: false
48
- t.string "Descript", limit: 7, null: false
49
- t.string "OP", limit: 1
50
- t.string "Sp", limit: 1
51
- end
52
-
53
- create_table "djftp", id: false, charset: "latin1", comment: "dtb - Current District Jobs loaded from HQ data", force: :cascade do |t|
54
- t.string "certno", limit: 7, null: false
55
- t.string "first", limit: 15
56
- t.string "last", limit: 25
57
- t.string "jobcode", limit: 5
58
- t.string "year", limit: 4
59
- t.integer "account", null: false
60
- t.string "distno", limit: 2
61
- t.string "acting", limit: 1
62
- t.string "source", limit: 1
63
- end
64
-
65
- 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|
66
- t.integer "id", null: false, auto_increment: true
67
- t.integer "distno"
68
- t.string "daccount", limit: 4
69
- t.integer "sqdcode"
70
- t.string "account", limit: 4
71
- t.string "first", limit: 15
72
- t.string "last", limit: 25
73
- t.string "nick", limit: 15
74
- t.string "nickpref", limit: 1
75
- t.string "sex", limit: 1
76
- t.string "address1", limit: 30
77
- t.string "address2", limit: 30
78
- t.string "city", limit: 30
79
- t.string "state", limit: 2
80
- t.string "zip5", limit: 5
81
- t.string "zip4", limit: 4
82
- t.string "mbrtype", limit: 2
83
- t.string "mbrstatus", limit: 3
84
- t.string "area", limit: 3
85
- t.string "phone", limit: 7
86
- t.string "area2", limit: 3
87
- t.string "phone2", limit: 7
88
- t.string "areac", limit: 3
89
- t.string "phonec", limit: 7
90
- t.string "email", limit: 40
91
- t.string "estatus", limit: 1
92
- t.integer "rank"
93
- t.string "pastrank", limit: 3
94
- t.string "sqdrank", limit: 3
95
- t.string "grade", limit: 6
96
- t.string "spcertno", limit: 7
97
- t.string "spouse", limit: 30
98
- t.string "ssex", limit: 1
99
- t.string "edpro", limit: 8
100
- t.string "edach", limit: 8
101
- t.string "chap", limit: 8
102
- t.string "years", limit: 2
103
- t.string "mm", limit: 2
104
- t.string "senior", limit: 4
105
- t.string "life", limit: 4
106
- t.string "vsc", limit: 8
107
- t.string "idexpr", limit: 8
108
- t.string "ot", limit: 8
109
- t.string "ldao", limit: 8
110
- t.string "ldxo", limit: 8
111
- t.string "ldcdr", limit: 8
112
- t.string "actcertno", limit: 7
113
- t.string "mbrdate", limit: 8
114
- t.string "trdate", limit: 8
115
- t.string "pin", limit: 8
116
- t.string "question", limit: 2
117
- t.string "answer", limit: 25
118
- t.string "bdu", limit: 8
119
- t.string "hq", limit: 8
120
- t.string "x", limit: 1
121
- t.string "birth", limit: 8
122
- t.string "ext", limit: 4
123
- t.string "ok", limit: 1
124
- t.string "areaf", limit: 3
125
- t.string "fax", limit: 7
126
- t.string "mmsi", limit: 9
127
- t.string "callsign", limit: 7
128
- t.string "seascout", limit: 1
129
- t.integer "pdistno"
130
- t.integer "psqdcode"
131
- t.integer "odistno"
132
- t.integer "osqdcode"
133
- t.string "optout", limit: 1
134
- t.string "jcode", limit: 1
135
- t.string "lastmm", limit: 4
136
- t.string "btype", limit: 30
137
- t.string "bname", limit: 30
138
- t.string "port", limit: 30
139
- t.string "sptype", limit: 1
140
- t.string "DB", limit: 1
141
- t.string "DBdate", limit: 8
142
- t.string "btemp", limit: 8
143
- t.string "iMISid", limit: 8
144
- t.index ["certno"], name: "certno", unique: true
145
- t.index ["id"], name: "id_index"
146
- end
147
-
148
- 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|
149
- t.string "jdesc", limit: 100
150
- t.string "admin", limit: 5, null: false
151
- t.string "rank", limit: 3, null: false
152
- t.string "prank", limit: 3, null: false
153
- t.string "type", limit: 1, null: false
154
- t.string "active", limit: 1, null: false
155
- t.string "map", limit: 1, null: false
156
- end
157
-
158
- create_table "njftp", id: false, charset: "latin1", comment: "dtb-created daily from HQ active nat jobs", force: :cascade do |t|
159
- t.string "certno", limit: 7, null: false
160
- t.string "first", limit: 15
161
- t.string "last", limit: 25
162
- t.string "jobcode", limit: 7
163
- t.string "year", limit: 4
164
- t.string "distno", limit: 2
165
- end
166
-
167
- create_table "ranks", id: false, charset: "latin1", force: :cascade do |t|
168
- t.string "RankCode", limit: 3
169
- t.string "RankDesc", limit: 40
170
- t.string "RankAbbr", limit: 15
171
- end
172
-
173
- create_table "sjdesc", primary_key: "jobcode", id: { type: :string, limit: 5 }, charset: "latin1", comment: "dtb-created daily has active squad Job descritpions", force: :cascade do |t|
174
- t.string "jdesc", limit: 100
175
- t.string "rank", limit: 3, null: false
176
- t.string "prank", limit: 3, null: false
177
- t.string "OD1", limit: 1, null: false
178
- t.string "OD2", limit: 1, null: false
179
- t.string "ED1", limit: 1, null: false
180
- t.string "Lev", limit: 1, null: false
181
- t.string "EGA", limit: 1, null: false
182
- t.string "Descript", limit: 7, null: false
183
- t.string "OP", limit: 1
184
- t.string "Sp", limit: 1
185
- end
186
-
187
- create_table "sjftp", id: false, charset: "latin1", comment: "dtb-created daily from HQ active squadron jobs", force: :cascade do |t|
188
- t.string "certno", limit: 7, null: false
189
- t.string "first", limit: 15
190
- t.string "last", limit: 25
191
- t.string "jobcode", limit: 5
192
- t.string "year", limit: 4
193
- t.integer "account", null: false
194
- t.string "distno", limit: 2
195
- t.string "acting", limit: 1
196
- t.string "source", limit: 1
197
- end
198
- end
@@ -1,205 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # This file is the source Rails uses to define your schema when running `bin/rails
6
- # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
- # be faster and is potentially less error prone than running all of your
8
- # migrations from scratch. Old migrations may fail to apply correctly if those
9
- # migrations use external dependencies or application code.
10
- #
11
- # It's strongly recommended that you check this file into your version control system.
12
-
13
- ActiveRecord::Schema[7.2].define(version: 2025_11_01_000000) do
14
- create_table "mbrclasses", id: :integer, charset: "latin1", comment: "dtb-Active member classes", options: "ENGINE=InnoDB", force: :cascade do |t|
15
- t.string "sqnumber", limit: 4
16
- t.string "account", limit: 4
17
- t.string "crsid", limit: 17
18
- t.string "place", limit: 60
19
- t.string "adr", limit: 60
20
- t.string "city", limit: 35
21
- t.string "state", limit: 2
22
- t.string "tzone", limit: 1, default: ""
23
- t.integer "dirid"
24
- t.date "date"
25
- t.time "time"
26
- t.date "rdate"
27
- t.time "rtime"
28
- t.string "edate", limit: 11
29
- t.string "etime", limit: 4, default: ""
30
- t.date "cdate"
31
- t.string "total", limit: 3
32
- t.string "passed", limit: 3
33
- t.string "failed", limit: 3
34
- t.string "number", limit: 13
35
- t.string "name", limit: 35
36
- t.string "ccertno", limit: 7
37
- t.string "email", limit: 50
38
- t.string "estatus", limit: 1
39
- t.string "type", limit: 7
40
- t.string "year", limit: 2
41
- t.string "Sp", limit: 1
42
- t.string "owt", limit: 1
43
- t.string "zip", limit: 5
44
- t.date "modified"
45
- t.string "lat", limit: 10
46
- t.string "lon", limit: 10
47
- t.string "oreg", limit: 1
48
- t.string "accept", limit: 1
49
- t.string "cost", limit: 5
50
- t.string "mcost", limit: 5
51
- t.string "maxnum", limit: 3
52
- t.string "nopub", limit: 1
53
- t.string "web", limit: 1
54
- t.string "webid", limit: 19
55
- t.string "vclass", limit: 1
56
- t.string "oexam", limit: 1
57
- t.integer "oexid", default: 0
58
- t.string "format", limit: 1
59
- t.string "media", limit: 15
60
- t.string "status", limit: 1
61
- t.text "notes"
62
- t.string "schedule", limit: 50
63
- t.string "certifier", limit: 7
64
- t.string "certifier2", limit: 7
65
- t.string "certifier3", limit: 7
66
- t.string "certifier4", limit: 7
67
- t.string "certifier5", limit: 7
68
- t.string "certifier6", limit: 7
69
- t.string "whoby", limit: 20
70
- t.string "source", limit: 1
71
- t.string "osource", limit: 1
72
- t.string "orderno", limit: 5
73
- t.string "invoice", limit: 7
74
- t.index ["sqnumber"], name: "csq_index"
75
- end
76
-
77
- create_table "students", id: :integer, charset: "latin1", comment: "dtb-Active eddept HQ800 students", options: "ENGINE=MyISAM", force: :cascade do |t|
78
- t.string "csl", limit: 1
79
- t.string "crsid", limit: 17
80
- t.string "start", limit: 6
81
- t.string "seq", limit: 1
82
- t.string "ctype", limit: 7
83
- t.string "hours", limit: 2
84
- t.string "Sp", limit: 1
85
- t.string "owt", limit: 1
86
- t.string "squadno", limit: 4
87
- t.string "distno", limit: 2
88
- t.string "certno", limit: 7
89
- t.string "status", limit: 1
90
- t.string "accept", limit: 1
91
- t.string "grade", limit: 3
92
- t.string "f_name", limit: 15
93
- t.string "mi", limit: 5
94
- t.string "l_name", limit: 25
95
- t.string "nick", limit: 15
96
- t.string "nickpref", limit: 1
97
- t.string "address", limit: 30
98
- t.string "address2", limit: 30
99
- t.string "city", limit: 30
100
- t.string "state", limit: 2
101
- t.string "county", limit: 30
102
- t.string "zip", limit: 5
103
- t.string "zippl", limit: 4
104
- t.string "phone", limit: 14
105
- t.string "text", limit: 1, default: ""
106
- t.string "email", limit: 40
107
- t.string "estatus", limit: 1
108
- t.string "birth_date", limit: 8
109
- t.string "u18", limit: 1, default: ""
110
- t.string "sex", limit: 1
111
- t.string "SS4", limit: 4
112
- t.string "eye_color", limit: 3
113
- t.string "hair_color", limit: 3
114
- t.string "ht_ft", limit: 1
115
- t.string "ht_in", limit: 2
116
- t.string "entered", limit: 6
117
- t.string "ED26", limit: 6
118
- t.integer "ed26id"
119
- t.string "ED27", limit: 6
120
- t.string "learned", limit: 30
121
- t.string "boatsz", limit: 8
122
- t.string "boattyp", limit: 8
123
- t.string "boathp", limit: 8
124
- t.string "trailer", limit: 1
125
- t.string "boatyrs", limit: 2
126
- t.string "optout", limit: 1
127
- t.string "validate", limit: 7
128
- t.string "certifier", limit: 7
129
- t.string "certifier2", limit: 7
130
- t.string "certifier3", limit: 7
131
- t.string "source", limit: 1
132
- t.string "osource", limit: 1
133
- t.string "sstate", limit: 2
134
- t.string "X01", limit: 1, default: ""
135
- t.string "X02", limit: 1, default: ""
136
- t.string "X03", limit: 1, default: ""
137
- t.string "X04", limit: 1, default: ""
138
- t.string "X05", limit: 1, default: ""
139
- t.string "X06", limit: 1, default: ""
140
- t.string "X07", limit: 1, default: ""
141
- t.string "X08", limit: 1, default: ""
142
- t.string "X09", limit: 1, default: ""
143
- t.string "X10", limit: 1, default: ""
144
- t.string "crdtype", limit: 1
145
- end
146
-
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
- t.string "type", limit: 1, default: "", null: false
149
- t.string "Name", limit: 35, default: "", null: false
150
- t.string "DBA", limit: 50
151
- t.string "url", limit: 75, default: "", null: false
152
- t.string "newsletter", limit: 40
153
- t.string "email", limit: 50, default: "", null: false
154
- t.string "contact", limit: 30, default: "", null: false
155
- t.string "tel", limit: 15, default: "", null: false
156
- t.string "ceforce", limit: 1
157
- t.string "region", limit: 60, default: "", null: false
158
- t.string "burgee", limit: 200
159
- t.string "dist", limit: 3, default: "", null: false
160
- t.string "daccount", limit: 4
161
- t.string "state", limit: 2, default: "", null: false
162
- t.string "tzone", limit: 1
163
- t.string "sqnumber", limit: 5, default: "", null: false
164
- t.integer "account", null: false
165
- t.string "initials", limit: 3
166
- t.string "modified", limit: 8
167
- t.string "who", limit: 8
168
- t.string "prov", limit: 1
169
- t.string "sail", limit: 1
170
- t.string "pcontact", limit: 30
171
- t.string "ptel", limit: 15
172
- t.string "pemail", limit: 50
173
- t.string "peforce", limit: 1
174
- t.string "pceforce", limit: 1
175
- t.string "pzip", limit: 5
176
- t.string "plat", limit: 10
177
- t.string "plon", limit: 10
178
- t.string "zoom", limit: 2
179
- t.string "nonconform", limit: 1
180
- t.string "chartered", limit: 4
181
- t.string "bylaws", limit: 50
182
- t.string "roster", limit: 30
183
- t.string "ncreason"
184
- t.string "roptions", limit: 30
185
- t.string "cauth", limit: 50
186
- t.string "dauth", limit: 50
187
- t.string "pauth", limit: 50
188
- t.string "history", limit: 35
189
- t.string "retired", limit: 1
190
- t.string "ccert", limit: 7
191
- t.string "oldccert", limit: 7
192
- t.string "pcert", limit: 7
193
- t.string "oldpcert", limit: 7
194
- t.string "rcert", limit: 7
195
- t.string "oldrcert", limit: 7
196
- t.string "rceforce", limit: 1
197
- t.string "county", limit: 15
198
- t.string "tax", limit: 4
199
- t.string "facebook"
200
- t.string "ExPicLib", limit: 75
201
- t.index ["Name"], name: "Name_index"
202
- t.index ["dist"], name: "dist_index"
203
- t.index ["sqnumber"], name: "wsq_index"
204
- end
205
- end