lockstep_rails 0.3.42 → 0.3.43

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c1e7f7f9fa871a4fee690f2b4e0a704f6b18e1730c5cbe4fad9d8769d19673f
4
- data.tar.gz: f110b33a97400fbc9e631a6ba65f8dfb31fcd6ade37dbff0c50b02867ed3c0f1
3
+ metadata.gz: f0c28af0759ac898b1b25238e030585d9ec73c7b4a2c7ee21ed5ea02aebaae4b
4
+ data.tar.gz: f25d065b0786c2bbd878b5d0f877a9d9448918662a63623b6cbe44139ebf2653
5
5
  SHA512:
6
- metadata.gz: cc11b8b450b104042b760ca8ec55cd95d3ab49451b92df24e6519c931868689eeb18d3f29c2bc919888adbc6ff0dc940b61a69ab6e46bdc3bd97926ceb250cb6
7
- data.tar.gz: 3fbd8e7d507bafe4b9f04f4db08e17e23a1e05bfa25a609cf6fab41ce95a1c57e4183177b2fa248dba5e1532b43203367e0155c30872dc3044d56ea3fc030776
6
+ metadata.gz: df28f00537fed162bff97e1b14005e78e0bf6b68a6ab706962772643b279acd5271ac85d6431608de9e76c97e4e009ea4cc1c28bda3dcc87886906cc782ac9b3
7
+ data.tar.gz: 94f1747651382be71963646894baa9e318d0a6233e719fd951d62130eb6378587186c887aebe4cb23f24e7a3e3e73af3204e0309d1fe9f7d59dd6812fc2ad7c5
@@ -1,19 +1,20 @@
1
1
  class Lockstep::Connection < Lockstep::ApiRecord
2
- self.model_name_uri = "v1/Companies"
3
- self.id_ref = "company_id"
2
+ self.model_name_uri = 'v1/Companies'
3
+ self.id_ref = 'company_id'
4
4
  load_schema(Schema::Company)
5
5
 
6
- enum company_type: %w(Customer Vendor Group)
6
+ enum company_type: %w[Customer Vendor Group Company]
7
7
 
8
- has_many :contacts, class_name: "Lockstep::Contact", included: true
9
- belongs_to :created_user, class_name: "Lockstep::User", foreign_key: :created_user_id, primary_key: :user_id
10
- belongs_to :modified_user, class_name: "Lockstep::User", foreign_key: :modified_user_id, primary_key: :user_id
8
+ has_many :contacts, class_name: 'Lockstep::Contact', included: true
9
+ belongs_to :created_user, class_name: 'Lockstep::User', foreign_key: :created_user_id, primary_key: :user_id
10
+ belongs_to :modified_user, class_name: 'Lockstep::User', foreign_key: :modified_user_id, primary_key: :user_id
11
11
 
12
12
  validates :company_name, presence: true
13
13
 
14
- default_scope { where(company_type: %w(Customer Vendor Group)).or(where(company_type: nil)) }
14
+ default_scope { where(company_type: %w[Customer Vendor Group Company]).or(where(company_type: nil)) }
15
15
 
16
- scope :customers, -> { where(company_type: "Customer") }
17
- scope :vendors, -> { where(company_type: "Vendor") }
16
+ scope :customers, -> { where(company_type: 'Customer') }
17
+ scope :vendors, -> { where(company_type: 'Vendor') }
18
+ scope :internal_connections, -> { where(company_type: 'Company') }
18
19
  scope :company_type_null, -> { where(company_type: nil) }
19
20
  end
@@ -1,9 +1,9 @@
1
1
  class Lockstep::Contact < Lockstep::ApiRecord
2
- self.model_name_uri = "v1/Contacts"
3
- self.id_ref = "contact_id"
2
+ self.model_name_uri = 'v1/Contacts'
3
+ self.id_ref = 'contact_id'
4
4
  load_schema(Schema::Contact)
5
5
 
6
6
  validates :email_address, presence: true
7
7
 
8
- belongs_to :connection, class_name: "Lockstep::Connection", included: false
8
+ belongs_to :connection, class_name: 'Lockstep::Connection', included: true
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module LockstepRails
2
- VERSION = "0.3.42"
2
+ VERSION = '0.3.43'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockstep_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.42
4
+ version: 0.3.43
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vivek AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-09 00:00:00.000000000 Z
11
+ date: 2022-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails