usps-support 0.2.65 → 0.2.67
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6ad988404fb8acfa5eb813cb28b5bd713b35ebad66fdb53adba4b32b1128439f
|
|
4
|
+
data.tar.gz: f0187bd578ecdbb68ca7778ae0a45f056816dfa4f1e1d8dcbe508a6731588917
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b074fafea1a8586b18c95cd3f8f7fe28503fad5e52b397ef4a524867073542fccd9e80ed12141c1ac93430709d6fbd2145db5e57bb8420f5c352c030d329906f
|
|
7
|
+
data.tar.gz: 7b3478b1c301cb42fe364bc7291eef417785283d068815d38ffe5fdc9f46a0d03c39fbe77c86e3672406a8069dc38760a5aeee28a3c7a0424a0a95e0311342ca
|
data/db/hq/members_schema.rb
CHANGED
|
@@ -39,6 +39,19 @@ ActiveRecord::Schema[8.1].define do
|
|
|
39
39
|
t.string "grade", limit: 2
|
|
40
40
|
end
|
|
41
41
|
|
|
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
|
+
|
|
42
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|
|
|
43
56
|
t.string "jdesc", limit: 100
|
|
44
57
|
t.string "rank", limit: 3, null: false
|
|
@@ -170,6 +183,26 @@ ActiveRecord::Schema[8.1].define do
|
|
|
170
183
|
t.index ["id"], name: "id_index"
|
|
171
184
|
end
|
|
172
185
|
|
|
186
|
+
create_table "mbrall", primary_key: "certno", id: { type: :string, limit: 7 }, charset: "utf8mb4", comment: "dtb-all certificate numbers", force: :cascade do |t|
|
|
187
|
+
t.string "first", limit: 15
|
|
188
|
+
t.string "last", limit: 25
|
|
189
|
+
t.string "rank", limit: 3
|
|
190
|
+
t.string "pastrank", limit: 3
|
|
191
|
+
t.string "grade", limit: 6
|
|
192
|
+
t.string "squad", limit: 4
|
|
193
|
+
t.string "mbrtype", limit: 2
|
|
194
|
+
t.string "mbrstatus", limit: 3
|
|
195
|
+
t.string "mbrdate", limit: 8
|
|
196
|
+
t.string "city", limit: 30
|
|
197
|
+
t.string "st", limit: 2
|
|
198
|
+
t.string "died", limit: 8
|
|
199
|
+
t.string "lastbdu", limit: 8
|
|
200
|
+
t.string "lasthq", limit: 8
|
|
201
|
+
t.string "mm", limit: 2
|
|
202
|
+
t.string "lastmm", limit: 4
|
|
203
|
+
t.index ["certno"], name: "certno", unique: true
|
|
204
|
+
end
|
|
205
|
+
|
|
173
206
|
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|
|
|
174
207
|
t.string "jdesc", limit: 100
|
|
175
208
|
t.string "rank", limit: 3, null: false
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Usps::Support::Models::Hq::Members
|
|
4
|
+
# Every certificate HQ has issued, current or not. `mbftp` (Member) holds current members only,
|
|
5
|
+
# so a certificate found here and not there belongs to someone whose membership has lapsed.
|
|
6
|
+
#
|
|
7
|
+
# `mbrtype` carries two values `mbftp` never does: `XX` for a member who has died, and `SX` for a
|
|
8
|
+
# certificate that was deactivated.
|
|
9
|
+
#
|
|
10
|
+
class AllMember < BaseRecord
|
|
11
|
+
self.table_name = :mbrall
|
|
12
|
+
self.primary_key = :certno
|
|
13
|
+
|
|
14
|
+
alias_attribute :certificate, :certno
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
module Usps::Support::Models::Hq::Members; end
|
|
6
6
|
|
|
7
7
|
require_relative 'members/base_record'
|
|
8
|
+
require_relative 'members/all_member'
|
|
8
9
|
require_relative 'members/associate_member'
|
|
9
10
|
require_relative 'members/district_job_description'
|
|
10
11
|
require_relative 'members/district_job'
|
|
@@ -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)
|
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.67
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Julian Fiander
|
|
@@ -115,6 +115,7 @@ files:
|
|
|
115
115
|
- lib/usps/support/models/git_hub.rb
|
|
116
116
|
- lib/usps/support/models/hq.rb
|
|
117
117
|
- lib/usps/support/models/hq/members.rb
|
|
118
|
+
- lib/usps/support/models/hq/members/all_member.rb
|
|
118
119
|
- lib/usps/support/models/hq/members/associate_member.rb
|
|
119
120
|
- lib/usps/support/models/hq/members/base_record.rb
|
|
120
121
|
- lib/usps/support/models/hq/members/district_job.rb
|
|
@@ -158,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
158
159
|
- !ruby/object:Gem::Version
|
|
159
160
|
version: '0'
|
|
160
161
|
requirements: []
|
|
161
|
-
rubygems_version: 3.
|
|
162
|
+
rubygems_version: 3.6.9
|
|
162
163
|
specification_version: 4
|
|
163
164
|
summary: USPS Rails Support
|
|
164
165
|
test_files: []
|