usps-support 0.2.63 → 0.2.65
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/db/hq/members_schema.rb +52 -20
- data/db/hq/websites_schema.rb +25 -8
- data/lib/usps/support/models/hq/members/former_member.rb +2 -2
- data/lib/usps/support/sidekiq_auth.rb +2 -15
- data/lib/usps/support/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1463acb74d2efd5c31800c7158d46d0cedd2f27dfd5ce7d1522cfaa97249d55c
|
|
4
|
+
data.tar.gz: a39a0be86a6c3fa9e6132a34c4554e4e36aa9a1072ed5b800943d4bc8896fde0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eebc7504e070960e6671ea5aee30d0c526fe82c2c288fb6b3b54cbfe18ca4ad2a2d82ec9389d7e2dde7e50eec477b3a1dfd4eeede19c961032e8c1c6ef6e4401
|
|
7
|
+
data.tar.gz: 300f52f53eb338646db221fd9056b9b7809a2893b6198fc7283862b59037e026588e3672ab7785571edd43c5de66e5e3a44e81c17bc866ca0c334777ed4dfa2e
|
data/db/hq/members_schema.rb
CHANGED
|
@@ -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: "
|
|
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,12 @@ 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-
|
|
42
|
+
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
43
|
t.string "jdesc", limit: 100
|
|
41
44
|
t.string "rank", limit: 3, null: false
|
|
42
45
|
t.string "prank", limit: 3, null: false
|
|
@@ -48,16 +51,23 @@ ActiveRecord::Schema[8.1].define do
|
|
|
48
51
|
t.string "Descript", limit: 7, null: false
|
|
49
52
|
end
|
|
50
53
|
|
|
51
|
-
create_table "djftp", id:
|
|
54
|
+
create_table "djftp", id: :integer, charset: "latin1", comment: "dtb - Current District Jobs with acting Cdrs", force: :cascade do |t|
|
|
52
55
|
t.string "certno", limit: 7, null: false
|
|
53
56
|
t.string "first", limit: 15
|
|
54
57
|
t.string "last", limit: 25
|
|
55
58
|
t.string "jobcode", limit: 5
|
|
59
|
+
t.integer "rank", default: 99
|
|
56
60
|
t.string "year", limit: 4
|
|
57
|
-
t.integer "account", null: false
|
|
58
|
-
t.
|
|
61
|
+
t.integer "account", default: 0, null: false
|
|
62
|
+
t.integer "distno", default: 0, null: false
|
|
59
63
|
t.string "acting", limit: 1
|
|
64
|
+
t.string "Lev", limit: 1
|
|
65
|
+
t.string "Descript", limit: 7
|
|
66
|
+
t.string "description", limit: 100
|
|
60
67
|
t.string "source", limit: 1
|
|
68
|
+
t.string "rcert", limit: 7, default: "", null: false
|
|
69
|
+
t.string "crtdate", limit: 8, default: "", null: false
|
|
70
|
+
t.index ["certno", "jobcode", "year", "account"], name: "unique_jobs", unique: true
|
|
61
71
|
end
|
|
62
72
|
|
|
63
73
|
create_table "jhist", id: false, charset: "latin1", comment: "dtb-job history", force: :cascade do |t|
|
|
@@ -71,10 +81,12 @@ ActiveRecord::Schema[8.1].define do
|
|
|
71
81
|
t.integer "rank", default: 99, null: false
|
|
72
82
|
t.integer "prank", default: 99, null: false
|
|
73
83
|
t.string "status", limit: 1
|
|
84
|
+
t.index ["account", "year"], name: "account_year"
|
|
85
|
+
t.index ["certno", "jobcode", "year"], name: "certno_job"
|
|
74
86
|
t.index ["id"], name: "id_index"
|
|
75
87
|
end
|
|
76
88
|
|
|
77
|
-
create_table "mbftp", primary_key: "certno", id: { type: :string, limit: 7 }, charset: "
|
|
89
|
+
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
90
|
t.integer "id", null: false, auto_increment: true
|
|
79
91
|
t.integer "distno"
|
|
80
92
|
t.string "daccount", limit: 4
|
|
@@ -98,11 +110,11 @@ ActiveRecord::Schema[8.1].define do
|
|
|
98
110
|
t.string "area2", limit: 3
|
|
99
111
|
t.string "phone2", limit: 7
|
|
100
112
|
t.string "areac", limit: 3
|
|
101
|
-
t.string "phonec", limit:
|
|
113
|
+
t.string "phonec", limit: 8
|
|
102
114
|
t.string "email", limit: 40
|
|
103
115
|
t.string "estatus", limit: 1
|
|
104
|
-
t.integer "rank"
|
|
105
|
-
t.
|
|
116
|
+
t.integer "rank", default: 99, null: false
|
|
117
|
+
t.integer "pastrank", default: 99, null: false
|
|
106
118
|
t.string "sqdrank", limit: 3
|
|
107
119
|
t.string "grade", limit: 6
|
|
108
120
|
t.string "spcertno", limit: 7
|
|
@@ -131,12 +143,12 @@ ActiveRecord::Schema[8.1].define do
|
|
|
131
143
|
t.string "hq", limit: 8
|
|
132
144
|
t.string "x", limit: 1
|
|
133
145
|
t.string "birth", limit: 8
|
|
134
|
-
t.string "ext", limit:
|
|
146
|
+
t.string "ext", limit: 5
|
|
135
147
|
t.string "ok", limit: 1
|
|
136
148
|
t.string "areaf", limit: 3
|
|
137
149
|
t.string "fax", limit: 7
|
|
138
|
-
t.string "mmsi", limit:
|
|
139
|
-
t.string "callsign", limit:
|
|
150
|
+
t.string "mmsi", limit: 11
|
|
151
|
+
t.string "callsign", limit: 30
|
|
140
152
|
t.string "seascout", limit: 1
|
|
141
153
|
t.integer "pdistno"
|
|
142
154
|
t.integer "psqdcode"
|
|
@@ -153,27 +165,40 @@ ActiveRecord::Schema[8.1].define do
|
|
|
153
165
|
t.string "DBdate", limit: 8
|
|
154
166
|
t.string "btemp", limit: 8
|
|
155
167
|
t.string "iMISid", limit: 8
|
|
168
|
+
t.string "paidto", limit: 8, default: "0", null: false
|
|
156
169
|
t.index ["certno"], name: "certno", unique: true
|
|
157
170
|
t.index ["id"], name: "id_index"
|
|
158
171
|
end
|
|
159
172
|
|
|
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|
|
|
173
|
+
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
174
|
t.string "jdesc", limit: 100
|
|
162
|
-
t.string "admin", limit: 5, null: false
|
|
163
175
|
t.string "rank", limit: 3, null: false
|
|
164
176
|
t.string "prank", limit: 3, null: false
|
|
165
177
|
t.string "type", limit: 1, null: false
|
|
166
178
|
t.string "active", limit: 1, null: false
|
|
179
|
+
t.string "admin", limit: 5, null: false
|
|
167
180
|
t.string "map", limit: 1, null: false
|
|
181
|
+
t.string "Lev", limit: 1, null: false
|
|
182
|
+
t.string "Descript", limit: 7, null: false
|
|
168
183
|
end
|
|
169
184
|
|
|
170
|
-
create_table "njftp", id:
|
|
185
|
+
create_table "njftp", id: :integer, charset: "latin1", comment: "dtb-active nat jobs", force: :cascade do |t|
|
|
171
186
|
t.string "certno", limit: 7, null: false
|
|
172
187
|
t.string "first", limit: 15
|
|
173
188
|
t.string "last", limit: 25
|
|
174
189
|
t.string "jobcode", limit: 7
|
|
190
|
+
t.integer "rank", default: 99
|
|
175
191
|
t.string "year", limit: 4
|
|
176
|
-
t.string "
|
|
192
|
+
t.string "description", limit: 100
|
|
193
|
+
t.integer "account", default: 0, null: false
|
|
194
|
+
t.integer "distno", default: 0, null: false
|
|
195
|
+
t.string "acting", limit: 1, default: "", null: false
|
|
196
|
+
t.string "Lev", limit: 1, default: ""
|
|
197
|
+
t.string "source", limit: 1, default: ""
|
|
198
|
+
t.string "Descript", limit: 7, default: ""
|
|
199
|
+
t.string "rcert", limit: 7, default: "", null: false
|
|
200
|
+
t.string "crtdate", limit: 8, default: "", null: false
|
|
201
|
+
t.index ["certno", "jobcode", "year", "account"], name: "unique_jobs", unique: true
|
|
177
202
|
end
|
|
178
203
|
|
|
179
204
|
create_table "ranks", id: false, charset: "latin1", force: :cascade do |t|
|
|
@@ -182,7 +207,7 @@ ActiveRecord::Schema[8.1].define do
|
|
|
182
207
|
t.string "RankAbbr", limit: 15
|
|
183
208
|
end
|
|
184
209
|
|
|
185
|
-
create_table "sjdesc", primary_key: "jobcode", id: { type: :string, limit: 7 }, charset: "latin1", comment: "dtb-
|
|
210
|
+
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
211
|
t.string "jdesc", limit: 100
|
|
187
212
|
t.string "rank", limit: 3, null: false
|
|
188
213
|
t.string "prank", limit: 3, null: false
|
|
@@ -194,15 +219,22 @@ ActiveRecord::Schema[8.1].define do
|
|
|
194
219
|
t.string "Descript", limit: 7, null: false
|
|
195
220
|
end
|
|
196
221
|
|
|
197
|
-
create_table "sjftp", id:
|
|
222
|
+
create_table "sjftp", id: :integer, charset: "latin1", comment: "dtb-active squadron jobs with acting cdrs", force: :cascade do |t|
|
|
198
223
|
t.string "certno", limit: 7, null: false
|
|
199
224
|
t.string "first", limit: 15
|
|
200
225
|
t.string "last", limit: 25
|
|
201
226
|
t.string "jobcode", limit: 5
|
|
227
|
+
t.integer "rank", default: 99
|
|
202
228
|
t.string "year", limit: 4
|
|
203
|
-
t.integer "account", null: false
|
|
204
|
-
t.
|
|
229
|
+
t.integer "account", default: 0, null: false
|
|
230
|
+
t.integer "distno", default: 0, null: false
|
|
205
231
|
t.string "acting", limit: 1
|
|
232
|
+
t.string "Lev", limit: 1
|
|
233
|
+
t.string "Descript", limit: 7
|
|
234
|
+
t.string "description", limit: 100
|
|
206
235
|
t.string "source", limit: 1
|
|
236
|
+
t.string "rcert", limit: 7, default: "", null: false
|
|
237
|
+
t.string "crtdate", limit: 8, default: "", null: false
|
|
238
|
+
t.index ["certno", "jobcode", "year", "account"], name: "unique_jobs", unique: true
|
|
207
239
|
end
|
|
208
240
|
end
|
data/db/hq/websites_schema.rb
CHANGED
|
@@ -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",
|
|
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",
|
|
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:
|
|
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.
|
|
160
|
-
t.
|
|
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:
|
|
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 = :
|
|
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 :
|
|
26
|
+
alias_attribute :certificate, :certno
|
|
27
27
|
alias_attribute :first, :firstname
|
|
28
28
|
alias_attribute :last, :lastname
|
|
29
29
|
|
|
@@ -32,7 +32,7 @@ module Usps::Support
|
|
|
32
32
|
|
|
33
33
|
@app.call(env)
|
|
34
34
|
rescue JWT::DecodeError
|
|
35
|
-
|
|
35
|
+
request.session[:jwt] = nil
|
|
36
36
|
redirect_to_login(request)
|
|
37
37
|
end
|
|
38
38
|
|
|
@@ -40,7 +40,7 @@ module Usps::Support
|
|
|
40
40
|
|
|
41
41
|
def decode_member(request)
|
|
42
42
|
data = Usps::JwtAuth.decode(
|
|
43
|
-
|
|
43
|
+
request.session[:jwt],
|
|
44
44
|
audience: [Usps::JwtAuth.config.audience],
|
|
45
45
|
issuer: Regexp.union(Usps::JwtAuth.config.issuers)
|
|
46
46
|
)
|
|
@@ -49,19 +49,6 @@ module Usps::Support
|
|
|
49
49
|
nil
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
-
def fetch_jwt(request)
|
|
53
|
-
request.session[:jwt] || request.cookie_jar[:jwt]
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
def clear_jwt(request)
|
|
57
|
-
request.session[:jwt] = nil
|
|
58
|
-
request.cookie_jar.delete(:jwt, domain: cookie_domain)
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
def cookie_domain
|
|
62
|
-
Usps::JwtAuth.config.environment.production? ? '.aws.usps.org' : 'localhost'
|
|
63
|
-
end
|
|
64
|
-
|
|
65
52
|
def redirect_to_login(request)
|
|
66
53
|
url = login_url_base
|
|
67
54
|
url = "#{url}&path=#{CGI.escape(request.fullpath)}"
|
data/lib/usps/support/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.2.65
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Julian Fiander
|
|
@@ -66,7 +66,7 @@ dependencies:
|
|
|
66
66
|
version: '1'
|
|
67
67
|
- - ">="
|
|
68
68
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: 1.
|
|
69
|
+
version: 1.7.0
|
|
70
70
|
type: :runtime
|
|
71
71
|
prerelease: false
|
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -76,7 +76,7 @@ dependencies:
|
|
|
76
76
|
version: '1'
|
|
77
77
|
- - ">="
|
|
78
78
|
- !ruby/object:Gem::Version
|
|
79
|
-
version: 1.
|
|
79
|
+
version: 1.7.0
|
|
80
80
|
description: Shared support for USPS Rails applications
|
|
81
81
|
email:
|
|
82
82
|
- jsfiander@gmail.com
|