zaikio-mission_control 0.2.4 → 0.2.5

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: cb6a1f9c6008e91ea7311c3a6a5e04be308a1a92c2f787cd9a46ff4da4b5fa76
4
- data.tar.gz: aa314bd5adef103acffcdf69fdf942a0474d06f2d983a3f483f3ba2ac454a811
3
+ metadata.gz: c23ed91ec7522dbab33446abe3da783b4efaf5a8a431f9312a210638fdf46350
4
+ data.tar.gz: 7d892f656d4120d2d8b9a97c4c01ebb70633683666d84a7ef5dbe14db246c5b2
5
5
  SHA512:
6
- metadata.gz: 393a7b48ffb6f8abe5a5b66b2ec25de27486a9f77b00d4ea27442a5ab90993b9266ce2d76c03286b0d8ddb82f10952e27c80db0988e64795f262ec7a10e037dc
7
- data.tar.gz: 36c04d13589396d63b6377c9fa590ea3695fb6f061625009e6bf08bdcf75af5c095af44f2983c84f4cc2c641bd887381a31cef39b1faf3396c0c202845360f08
6
+ metadata.gz: 3b40a48618309e1502b09aebc31709ba11f9272b8534740522dde897f4e33bbb78e7e2dd268b52314e92cc09242ca48a2a236344cf87fa40a1271644c9d337f9
7
+ data.tar.gz: c20fb03e1250f80761d2016be47082560793670a6fe38560308128c5a103f4335a6e1b551b052cda1df94c4a82c8ddbe2655c356356cd5556840ccac0e534085
@@ -1,9 +1,11 @@
1
1
  module Zaikio
2
2
  module MissionControl
3
3
  class Machine < Base
4
- # Associations
5
- has_many :availabilities, class_name: "Zaikio::MissionControl::Availability",
6
- uri: "machines/:machine_id/availabilities"
4
+ def production_schedule_slots
5
+ @production_schedule_slots ||= get(:production_schedule)["production_schedule_slots"].map do |slot|
6
+ Zaikio::MissionControl::Slot.new(slot)
7
+ end
8
+ end
7
9
  end
8
10
  end
9
11
  end
@@ -0,0 +1,8 @@
1
+ module Zaikio
2
+ module MissionControl
3
+ class Slot < Base
4
+ attributes :started_at, :ended_at, :outdated, :workstep_id, :machine_id, :created_at, :updated_at,
5
+ :production_frame_id, :updated_slot_id, :outdated_slot_id, :slot_candidate_id
6
+ end
7
+ end
8
+ end
@@ -1,5 +1,5 @@
1
1
  module Zaikio
2
2
  module MissionControl
3
- VERSION = "0.2.4".freeze
3
+ VERSION = "0.2.5".freeze
4
4
  end
5
5
  end
@@ -85,8 +85,7 @@ require "zaikio/mission_control/finishing_application"
85
85
  require "zaikio/mission_control/finishing"
86
86
  require "zaikio/mission_control/file_reference"
87
87
  require "zaikio/mission_control/machine"
88
- require "zaikio/mission_control/specialist"
89
- require "zaikio/mission_control/availability"
88
+ require "zaikio/mission_control/slot"
90
89
 
91
90
  module Zaikio
92
91
  module MissionControl
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zaikio-mission_control
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zaikio GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-18 00:00:00.000000000 Z
11
+ date: 2023-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -107,7 +107,6 @@ files:
107
107
  - config/locales/de.yml
108
108
  - config/locales/en.yml
109
109
  - lib/zaikio/mission_control.rb
110
- - lib/zaikio/mission_control/availability.rb
111
110
  - lib/zaikio/mission_control/base.rb
112
111
  - lib/zaikio/mission_control/color.rb
113
112
  - lib/zaikio/mission_control/configuration.rb
@@ -184,7 +183,7 @@ files:
184
183
  - lib/zaikio/mission_control/parts/poster.rb
185
184
  - lib/zaikio/mission_control/parts/self_mailer.rb
186
185
  - lib/zaikio/mission_control/parts/sheet.rb
187
- - lib/zaikio/mission_control/specialist.rb
186
+ - lib/zaikio/mission_control/slot.rb
188
187
  - lib/zaikio/mission_control/version.rb
189
188
  homepage: https://www.zaikio.com/
190
189
  licenses:
@@ -1,23 +0,0 @@
1
- module Zaikio
2
- module MissionControl
3
- class Availability < Base
4
- include_root_in_json :availability
5
-
6
- attributes :machine_id, :mode, :starts_at, :ends_at, :date, :weekday, :reason, :capacity,
7
- :description, :machine_id, :specialist_id, :created_at, :updated_at, :starts_at_hm,
8
- :ends_at_hm
9
-
10
- private
11
-
12
- def attributes=(new_attributes)
13
- # post and patch have a different response structure
14
- # https://docs.zaikio.com/api/mission_control/api.html#/Shop%20floor/post_machines__machine_id__availabilities
15
- if new_attributes.key?("availability")
16
- super(new_attributes["availability"])
17
- else
18
- super(new_attributes)
19
- end
20
- end
21
- end
22
- end
23
- end
@@ -1,9 +0,0 @@
1
- module Zaikio
2
- module MissionControl
3
- class Specialist < Base
4
- # Associations
5
- has_many :availabilities, class_name: "Zaikio::MissionControl::Availability",
6
- uri: "specialists/:machine_id/availabilities"
7
- end
8
- end
9
- end