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 +4 -4
- data/app/models/lockstep/workflow_status.rb +18 -0
- data/lib/lockstep_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40252bf8ba597e86d1ad8b3e5eecbcc2dbd18504c01daf0e19eceb9dd2576805
|
4
|
+
data.tar.gz: bbd91fed1c9fd4c6063bd9ec722347ae1a6671f0883d6a920331e7ba4a9de791
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.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-
|
11
|
+
date: 2024-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|