usps-support 0.2.3 → 0.2.5

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: 5ea7f7d28b31b67d689db72527c8e0348a986a9403dab82cb3df0e318cc26717
4
- data.tar.gz: 7a468aed8ea489ca14704d2a7faff1b1d3fb00e185da4d75e80ab692c1fbc47f
3
+ metadata.gz: 2137607168cbc26b3de7c79dd8807206f03244780e716727192e3d2e49903fc5
4
+ data.tar.gz: 662aae79626c6bea74f008c8bdda7f79438f9c5dfcf262e702caa8156df38a25
5
5
  SHA512:
6
- metadata.gz: 729b9c5fea8854667f0c761dc11d08644bd0c57f29f40b3a667e9d1c5c389981ea105caafed6fa55979e35b0049c0fc4e8dc0e7797a35cf7eec49aea60cd82ed
7
- data.tar.gz: 2459594e053dbf1b491967b1b121a8bce4af341661b69d4f7d060d6efb43351ab715895887a6a3b115ba25fdef0b301683cf3cb08f1751f01973afa39ceae5b7
6
+ metadata.gz: 50636c411e9822e8829e82aca2b7bdb72282ba5c5961f0e8750da4c4eaeb29548642e754aff1f7fb13edee3bcefa83a3e3dd14ddcd6eea8cf29016d88f335cf3
7
+ data.tar.gz: c8ee5b0bbdc2d3030383184c2ce9df613f2691c4b0360736daa092641a858a07d32538b579d6e5fe145075ec78e9720fdc6d966e0f3de4cff113b05a3ee8c77f
@@ -5,7 +5,7 @@ module Usps::Support::Models::Hq::Members
5
5
  #
6
6
  class AssociateMember < BaseRecord
7
7
  self.table_name = :associates
8
- self.inheritance_column = nil # The database has a `type` column, which confuses with Rails STI
8
+ ignore_type_column_sti!
9
9
 
10
10
  belongs_to(
11
11
  :member,
@@ -6,7 +6,7 @@ module Usps::Support::Models::Hq::Members
6
6
  class DistrictJobDescription < BaseRecord
7
7
  self.table_name = :djdesc
8
8
  self.primary_key = :jobcode
9
- self.inheritance_column = nil # The database has a `type` column, which confuses with Rails STI
9
+ ignore_type_column_sti!
10
10
 
11
11
  has_many(
12
12
  :district_jobs,
@@ -6,7 +6,7 @@ module Usps::Support::Models::Hq::Members
6
6
  class FormerMember < BaseRecord
7
7
  self.table_name = :abftp2
8
8
  self.primary_key = :certificate
9
- self.inheritance_column = nil # The database has a `type` column, which confuses with Rails STI
9
+ ignore_type_column_sti!
10
10
 
11
11
  belongs_to(
12
12
  :former_squadron,
@@ -6,7 +6,7 @@ module Usps::Support::Models::Hq::Members
6
6
  class NationalJobDescription < BaseRecord
7
7
  self.table_name = :njdesc
8
8
  self.primary_key = :jobcode
9
- self.inheritance_column = nil # The database has a `type` column, which confuses with Rails STI
9
+ ignore_type_column_sti!
10
10
 
11
11
  has_many(
12
12
  :national_jobs,
@@ -6,7 +6,7 @@ module Usps::Support::Models::Hq::Members
6
6
  class SquadronJobDescription < BaseRecord
7
7
  self.table_name = :sjdesc
8
8
  self.primary_key = :jobcode
9
- self.inheritance_column = nil # The database has a `type` column, which confuses with Rails STI
9
+ ignore_type_column_sti!
10
10
 
11
11
  has_many(
12
12
  :squadron_jobs,
@@ -10,6 +10,13 @@ module Usps::Support::Models::Hq
10
10
  after_initialize :readonly!, unless: -> { Rails.env.test? || self.class.allow_hq_database_edits? }
11
11
 
12
12
  def self.allow_hq_database_edits? = false
13
+
14
+ # The database has a `type` column, which gets confused with Rails STI
15
+ #
16
+ # As long as we don't need to set the column to anything specific, this helper cleans up the
17
+ # repeated use case of ignoring it.
18
+ #
19
+ def self.ignore_type_column_sti! = self.inheritance_column = nil
13
20
  end
14
21
  # rubocop:enable Rails/ApplicationRecord
15
22
  end
@@ -7,7 +7,7 @@ module Usps::Support::Models::Hq::Squadrons
7
7
  self.abstract_class = true
8
8
  self.table_name = :websites
9
9
  self.primary_key = :id
10
- self.inheritance_column = nil # The database has a `type` column, which confuses with Rails STI
10
+ ignore_type_column_sti!
11
11
 
12
12
  # This is a default behavior, that is overwritten by FormerSquadron
13
13
  alias_attribute :account_number, :account
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module Support
5
- VERSION = '0.2.3'
5
+ VERSION = '0.2.5'
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.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander
@@ -29,14 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: 0.11.5
32
+ version: 0.11.14
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 0.11.5
39
+ version: 0.11.14
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: usps-jwt_auth
42
42
  requirement: !ruby/object:Gem::Requirement