lockstep_rails 0.3.41 → 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: 6e65c6ad7031ef59bab67ddc732c5f45897eff15bbfdd09c049924fdbdb827ad
4
- data.tar.gz: 1bce4651a840e05e86bae6ff81dbdfdda9a6865c5744932d646f91832bf581ca
3
+ metadata.gz: f0c28af0759ac898b1b25238e030585d9ec73c7b4a2c7ee21ed5ea02aebaae4b
4
+ data.tar.gz: f25d065b0786c2bbd878b5d0f877a9d9448918662a63623b6cbe44139ebf2653
5
5
  SHA512:
6
- metadata.gz: f4daa23908e58992340c31888f34a877930358762b2f22070ee22abd8066fa1764363957433cf44516798d4a08a1d71f154bf1220f9e25b9dfbb1076d5a543ae
7
- data.tar.gz: beff60594deadcc08ed9b34587ddf644c3d9d8b968069c9dac3f5f57a0946086b630f6ee6b408e4ecd951db5991e419aaf0f87882d99d0728b407b3499107e1c
6
+ metadata.gz: df28f00537fed162bff97e1b14005e78e0bf6b68a6ab706962772643b279acd5271ac85d6431608de9e76c97e4e009ea4cc1c28bda3dcc87886906cc782ac9b3
7
+ data.tar.gz: 94f1747651382be71963646894baa9e318d0a6233e719fd951d62130eb6378587186c887aebe4cb23f24e7a3e3e73af3204e0309d1fe9f7d59dd6812fc2ad7c5
@@ -714,9 +714,9 @@ module Lockstep
714
714
  else
715
715
  error_response = JSON.parse(resp.body)
716
716
  pe = if error_response['error']
717
- LockstepError.new(error_response['code'], error_response['error'])
717
+ Lockstep::Error.new(error_response['code'], error_response['error'])
718
718
  else
719
- LockstepError.new(resp.code.to_s)
719
+ Lockstep::Error.new(resp.code.to_s)
720
720
  end
721
721
  self.errors.add(pe.code.to_s.to_sym, pe.msg)
722
722
  error_instances << pe
@@ -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.41"
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.41
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-06 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