lockstep_rails 0.3.84 → 0.3.85

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: 69111c175a9b6f74d33491d546c7827d36a0f357b0a186ebf43715b2b28ccd7f
4
- data.tar.gz: 3cbc687460559fea1684ece0f631443754a78b97c17dbeb3906a34a17517015a
3
+ metadata.gz: 40252bf8ba597e86d1ad8b3e5eecbcc2dbd18504c01daf0e19eceb9dd2576805
4
+ data.tar.gz: bbd91fed1c9fd4c6063bd9ec722347ae1a6671f0883d6a920331e7ba4a9de791
5
5
  SHA512:
6
- metadata.gz: 02db626c78c9c801216ba146fdc0389c5dfa346efd56ab767e13430c10a3fd85cf0b3554cb78e8d84266485717618ce11f5d42f38009c9494dca9d2e2f7e8a4f
7
- data.tar.gz: f76c6938b8bfe1c2fe43e93b1530290bbbb522c487e1e2c89379f2ee7bcf0b29fe0a5ba9564e920c61bd31b43d67a0921010e3fb8c5c19d83e652a73f5d9253c
6
+ metadata.gz: f77dbc123e87878958faf46528c10aebf2f5dcff242f8066651151ec3b40632db422c61f2be108d8d233ee1bc5ac1c4045fffe7d12779b0722eadf1f29f9ca01
7
+ data.tar.gz: 8884bb8a252d34921f509a4336c7d00a25a6ebecc80931f53d04c2760822bf53eb167ad64ca33e78425bd3feee972320357b77e56571d12b1303388cb7ac7cbb
@@ -5,4 +5,22 @@ class Lockstep::WorkflowStatus < Lockstep::ApiRecord
5
5
  self.id_ref = 'id'
6
6
 
7
7
  load_schema(Schema::WorkflowStatus)
8
+
9
+ def self.retrieve_by_id_with_children(id)
10
+ resp = resource.get("#{id}", params: { include: :children })
11
+ parsed_response = JSON.parse(resp.body)
12
+
13
+ case resp.code.to_s
14
+ when '401'
15
+ raise Lockstep::Exceptions::UnauthorizedError, parsed_response['title']
16
+ when '400'
17
+ raise Lockstep::Exceptions::BadRequestError, parsed_response['title']
18
+ when '404'
19
+ raise Lockstep::Exceptions::RecordNotFound, parsed_response['title']
20
+ when '200'
21
+ parsed_response.deep_transform_keys(&:underscore)
22
+ else
23
+ raise Lockstep::Exceptions::BadRequestError, parsed_response
24
+ end
25
+ end
8
26
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LockstepRails
4
- VERSION = '0.3.84'
4
+ VERSION = '0.3.85'
5
5
  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.84
4
+ version: 0.3.85
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vivek AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-23 00:00:00.000000000 Z
11
+ date: 2024-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails