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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0c28af0759ac898b1b25238e030585d9ec73c7b4a2c7ee21ed5ea02aebaae4b
|
4
|
+
data.tar.gz: f25d065b0786c2bbd878b5d0f877a9d9448918662a63623b6cbe44139ebf2653
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
717
|
+
Lockstep::Error.new(error_response['code'], error_response['error'])
|
718
718
|
else
|
719
|
-
|
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 =
|
3
|
-
self.id_ref =
|
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
|
6
|
+
enum company_type: %w[Customer Vendor Group Company]
|
7
7
|
|
8
|
-
has_many :contacts, class_name:
|
9
|
-
belongs_to :created_user, class_name:
|
10
|
-
belongs_to :modified_user, class_name:
|
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
|
14
|
+
default_scope { where(company_type: %w[Customer Vendor Group Company]).or(where(company_type: nil)) }
|
15
15
|
|
16
|
-
scope :customers, -> { where(company_type:
|
17
|
-
scope :vendors, -> { where(company_type:
|
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 =
|
3
|
-
self.id_ref =
|
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:
|
8
|
+
belongs_to :connection, class_name: 'Lockstep::Connection', included: true
|
9
9
|
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.
|
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-
|
11
|
+
date: 2022-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|