zaikio-warehouse 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/lib/zaikio/warehouse/version.rb +1 -1
- data/lib/zaikio/warehouse/workstep.rb +14 -10
- 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: 2c62c0970c1b081c6700f3314338a4ae3ee4f568924b8c7dc73617e05cad3507
|
4
|
+
data.tar.gz: bac0a0541969b5ecf8f57d25092c5a58937652e339ce8721734f2bb3caf4a160
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 350f090f78a86b594365c69b1913cc9011aea013cb8ea89956caa76be6211a7e78001f19a70288b14b4dd6ed2f1a1b3d7466264db354d5fdb8b3bced37b6445d
|
7
|
+
data.tar.gz: 3a297ec8bfb7fd0e9f9168f63d5794697c822c00c2fde3c0ea06421ff4b2dfbd6ca83e2ea5e50855c7f04b8d62cd8753ae92f83f1b9a47ffbc1fa999eabaf68a
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.5.1] - 2023-11-09
|
11
|
+
|
12
|
+
- Improve workstep transitions to return updated workstep
|
13
|
+
|
10
14
|
## [0.5.0] - 2023-11-06
|
11
15
|
|
12
16
|
- Add support for worksteps and material requirements API
|
@@ -55,7 +59,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
55
59
|
- Update and reuse `zaikio-client-helpers` logic to support `Zaikio::Client.with_token`
|
56
60
|
- Initial release
|
57
61
|
|
58
|
-
[Unreleased]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.5.
|
62
|
+
[Unreleased]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.5.1..HEAD
|
63
|
+
[0.5.1]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.5.0..v0.5.1
|
64
|
+
[0.5.0]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.4.0..v0.5.0
|
59
65
|
[0.4.0]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.4.0..v0.5.0
|
60
66
|
[0.4.0]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.3.0..v0.4.0
|
61
67
|
[0.3.0]: https://github.com/zaikio/zaikio-warehouse-ruby/compare/v0.2.5..v0.3.0
|
@@ -17,24 +17,28 @@ module Zaikio
|
|
17
17
|
has_many :material_requirements, uri: nil, class_name: "Zaikio::Warehouse::MaterialRequirement"
|
18
18
|
|
19
19
|
def prepare(params = {})
|
20
|
-
|
21
|
-
puts "response prepare: #{response.inspect}"
|
22
|
-
|
23
|
-
raise InvalidTransition, response.body if (200..201).exclude?(response.status)
|
20
|
+
transition("prepare", params)
|
24
21
|
end
|
25
22
|
|
26
23
|
def start(params = {})
|
27
|
-
|
28
|
-
puts "response start: #{response.inspect}"
|
29
|
-
|
30
|
-
raise InvalidTransition, response.body if (200..201).exclude?(response.status)
|
24
|
+
transition("start", params)
|
31
25
|
end
|
32
26
|
|
33
27
|
def complete(params = {})
|
34
|
-
|
35
|
-
|
28
|
+
transition("complete", params)
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def transition(transition, params = {})
|
34
|
+
response = self.class.send(:send_request, :post, "worksteps/#{id}/#{transition}", params)
|
36
35
|
|
37
36
|
raise InvalidTransition, response.body if (200..201).exclude?(response.status)
|
37
|
+
|
38
|
+
result = Spyke::Result.new_from_response(response)
|
39
|
+
self.attributes = result.data["workstep"].merge(
|
40
|
+
"material_requirements" => result.data["material_requirements"]
|
41
|
+
)
|
38
42
|
end
|
39
43
|
end
|
40
44
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zaikio-warehouse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zaikio GmbH
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-11-
|
12
|
+
date: 2023-11-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|