chook 1.1.5 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +6 -0
  3. data/LICENSE.txt +5 -3
  4. data/bin/chook-server +7 -25
  5. data/data/chook.conf.example +24 -0
  6. data/data/sample_handlers/RestAPIOperation-executable +6 -24
  7. data/data/sample_handlers/RestAPIOperation.rb +6 -24
  8. data/data/sample_handlers/SmartGroupComputerMembershipChange-executable +6 -23
  9. data/data/sample_handlers/SmartGroupComputerMembershipChange.rb +6 -24
  10. data/lib/chook/configuration.rb +14 -26
  11. data/lib/chook/event/handled_event/handlers.rb +3 -21
  12. data/lib/chook/event/handled_event.rb +7 -24
  13. data/lib/chook/event/handled_event_logger.rb +6 -24
  14. data/lib/chook/event/test_event.rb +21 -30
  15. data/lib/chook/event.rb +6 -25
  16. data/lib/chook/event_handling.rb +6 -24
  17. data/lib/chook/event_testing.rb +6 -24
  18. data/lib/chook/foundation.rb +6 -24
  19. data/lib/chook/handled_events.rb +6 -24
  20. data/lib/chook/handled_subjects.rb +6 -24
  21. data/lib/chook/procs.rb +19 -27
  22. data/lib/chook/server/auth.rb +19 -26
  23. data/lib/chook/server/log.rb +11 -25
  24. data/lib/chook/server/public/css/chook.css +10 -0
  25. data/lib/chook/server/routes/handle_by_name.rb +7 -25
  26. data/lib/chook/server/routes/handle_webhook_event.rb +7 -25
  27. data/lib/chook/server/routes/handlers.rb +6 -24
  28. data/lib/chook/server/routes/home.rb +7 -27
  29. data/lib/chook/server/routes/log.rb +6 -24
  30. data/lib/chook/server/routes/login_logout.rb +6 -25
  31. data/lib/chook/server/routes.rb +11 -29
  32. data/lib/chook/server/views/layout.haml +32 -7
  33. data/lib/chook/server.rb +8 -24
  34. data/lib/chook/subject/computer.rb +14 -32
  35. data/lib/chook/subject/dep_device.rb +13 -31
  36. data/lib/chook/subject/handled_subject.rb +6 -24
  37. data/lib/chook/subject/jss.rb +10 -28
  38. data/lib/chook/subject/mobile_device.rb +12 -30
  39. data/lib/chook/subject/patch_software_title_update.rb +6 -24
  40. data/lib/chook/subject/policy_finished.rb +6 -24
  41. data/lib/chook/subject/push.rb +8 -26
  42. data/lib/chook/subject/rest_api_operation.rb +11 -29
  43. data/lib/chook/subject/scep_challenge.rb +6 -24
  44. data/lib/chook/subject/smart_group.rb +7 -25
  45. data/lib/chook/subject/test_subject.rb +23 -39
  46. data/lib/chook/subject.rb +6 -24
  47. data/lib/chook/test_events.rb +6 -24
  48. data/lib/chook/test_subjects.rb +6 -24
  49. data/lib/chook/version.rb +8 -27
  50. data/lib/chook.rb +6 -24
  51. metadata +11 -12
  52. data/lib/chook/server/public/imgs/ChookLogoAlMcWhiggin.png +0 -0
@@ -1,27 +1,9 @@
1
- ### Copyright 2017 Pixar
2
-
3
- ###
4
- ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- ### with the following modification; you may not use this file except in
6
- ### compliance with the Apache License and the following modification to it:
7
- ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
9
- ### 6. Trademarks. This License does not grant permission to use the trade
10
- ### names, trademarks, service marks, or product names of the Licensor
11
- ### and its affiliates, except as required to comply with Section 4(c) of
12
- ### the License and to reproduce the content of the NOTICE file.
13
- ###
14
- ### You may obtain a copy of the Apache License at
15
- ###
16
- ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
18
- ### Unless required by applicable law or agreed to in writing, software
19
- ### distributed under the Apache License with the above modification is
20
- ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- ### KIND, either express or implied. See the Apache License for the specific
22
- ### language governing permissions and limitations under the Apache License.
23
- ###
24
- ###
1
+ # Copyright 2025 Pixar
2
+ #
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
5
+ #
6
+ #
25
7
 
26
8
  module Chook
27
9
 
@@ -30,11 +12,11 @@ module Chook
30
12
 
31
13
  HANDLE_EVENT_ROUTE = '/handle_webhook_event'.freeze
32
14
 
33
- # before do
34
- # break if request.path_info == Chook::Server::HANDLE_EVENT_ROUTE
35
- # # break if request.path_info == '/' && session[:authed_admin]
36
- # # redirect '/' unless session[:authed_admin]
37
- # end
15
+ # before do
16
+ # break if request.path_info == Chook::Server::HANDLE_EVENT_ROUTE
17
+ # # break if request.path_info == '/' && session[:authed_admin]
18
+ # # redirect '/' unless session[:authed_admin]
19
+ # end
38
20
 
39
21
  # log errors in production (in dev, they go to stdout and the browser)
40
22
  error do
@@ -21,9 +21,8 @@
21
21
  %tr
22
22
  %td{ valign: 'bottom', width: '120' }
23
23
  #header_logo
24
- %img{ alt: '', height: '120', src: '/imgs/ChookLogoAlMcWhiggin.png', width: '120' }
25
- #header_version
26
- v#{Chook::VERSION}
24
+ %img{ alt: '', height: '120', src: Chook::Server::CHOOK_LOGO_URL , width: '120' }
25
+
27
26
  %td
28
27
  #definition
29
28
  %span.chook_title Chook
@@ -34,10 +33,36 @@
34
33
  %span.def_dialect Australian/NZ informal
35
34
  %br/
36
35
  %span.def_definition a chicken or fowl
37
- %td#serverstats{ valign: 'bottom' }
38
- Server started: #{Chook::Server.starttime.strftime '%Y-%m-%d %H:%M:%S'}
39
- %br/
40
- (#{Chook::Server.uptime})
36
+ %td#serverstats{ valign: :bottom, align: :right }
37
+ %table
38
+ %tr
39
+ %td.label_cell
40
+ Chook version:
41
+ %td.value_cell
42
+ #{Chook::VERSION}
43
+ %tr
44
+ %td.label_cell
45
+ Sinatra version:
46
+ %td.value_cell
47
+ #{Sinatra::VERSION}
48
+ %tr
49
+ %td.label_cell
50
+ Thin version:
51
+ %td.value_cell
52
+ #{Thin::VERSION::STRING}
53
+ %tr
54
+ %td.label_cell
55
+ Ruby version:
56
+ %td.value_cell
57
+ #{RUBY_VERSION} @ #{Gem.ruby}
58
+ %tr
59
+ %td.label_cell
60
+ Server started:
61
+ %td.value_cell
62
+ #{Chook::Server.starttime.strftime '%Y-%m-%d %H:%M:%S'}
63
+ (#{Chook::Server.uptime})
64
+
65
+
41
66
 
42
67
  %hr/
43
68
  - if Chook.config.admin_user
data/lib/chook/server.rb CHANGED
@@ -1,27 +1,9 @@
1
- ### Copyright 2017 Pixar
2
-
3
- ###
4
- ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- ### with the following modification; you may not use this file except in
6
- ### compliance with the Apache License and the following modification to it:
7
- ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
9
- ### 6. Trademarks. This License does not grant permission to use the trade
10
- ### names, trademarks, service marks, or product names of the Licensor
11
- ### and its affiliates, except as required to comply with Section 4(c) of
12
- ### the License and to reproduce the content of the NOTICE file.
13
- ###
14
- ### You may obtain a copy of the Apache License at
15
- ###
16
- ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
18
- ### Unless required by applicable law or agreed to in writing, software
19
- ### distributed under the Apache License with the above modification is
20
- ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- ### KIND, either express or implied. See the Apache License for the specific
22
- ### language governing permissions and limitations under the Apache License.
23
- ###
24
- ###
1
+ # Copyright 2025 Pixar
2
+ #
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
5
+ #
6
+ #
25
7
 
26
8
  require 'sinatra/base'
27
9
  require 'sinatra/custom_logger'
@@ -43,6 +25,8 @@ module Chook
43
25
  DEFAULT_CONCURRENCY = true
44
26
  DEFAULT_SESSION_EXPIRE = 24 * 60 * 60 # one day
45
27
 
28
+ CHOOK_LOGO_URL = 'https://pixaranimationstudios.github.io/chook/images/Chook_Al_McWhiggin_Logo_Web.png'.freeze
29
+
46
30
  # set defaults in config
47
31
  Chook.config.port ||= Chook.config.use_ssl ? DEFAULT_SSL_PORT : DEFAULT_PORT
48
32
  Chook.config.admin_session_expires ||= DEFAULT_SESSION_EXPIRE
@@ -1,27 +1,9 @@
1
- ### Copyright 2017 Pixar
2
-
3
- ###
4
- ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- ### with the following modification; you may not use this file except in
6
- ### compliance with the Apache License and the following modification to it:
7
- ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
9
- ### 6. Trademarks. This License does not grant permission to use the trade
10
- ### names, trademarks, service marks, or product names of the Licensor
11
- ### and its affiliates, except as required to comply with Section 4(c) of
12
- ### the License and to reproduce the content of the NOTICE file.
13
- ###
14
- ### You may obtain a copy of the Apache License at
15
- ###
16
- ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
18
- ### Unless required by applicable law or agreed to in writing, software
19
- ### distributed under the Apache License with the above modification is
20
- ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- ### KIND, either express or implied. See the Apache License for the specific
22
- ### language governing permissions and limitations under the Apache License.
23
- ###
24
- ###
1
+ # Copyright 2025 Pixar
2
+ #
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
5
+ #
6
+ #
25
7
 
26
8
  # Add the attrbutes of a Computer subject to the Chook::Subject.attributes
27
9
  # hash, to be used in defining Chook::TestSubjects::Computer and
@@ -41,32 +23,32 @@ Chook::Subject.classes[Chook::Subject::COMPUTER] = {
41
23
  model: {
42
24
  validation: String,
43
25
  randomizer: :computer_model,
44
- api_object_attribute: [:hardware, :model]
26
+ api_object_attribute: %i[hardware model]
45
27
  },
46
28
  macAddress: {
47
- validation: String, #:validate_mac_address,
29
+ validation: String, # :validate_mac_address,
48
30
  randomizer: :mac_address,
49
31
  api_object_attribute: :mac_address
50
32
  },
51
33
  alternateMacAddress: {
52
- validation: String, #:validate_mac_address, # TODO: sometimes this value is nil !
34
+ validation: String, # :validate_mac_address, # TODO: sometimes this value is nil !
53
35
  randomizer: :mac_address,
54
36
  api_object_attribute: :alt_mac_address
55
37
  },
56
38
  serialNumber: {
57
- validation: String, #:validate_serial_number,
39
+ validation: String, # :validate_serial_number,
58
40
  randomizer: :computer_serial_number,
59
41
  api_object_attribute: :serial_number
60
42
  },
61
43
  osVersion: {
62
44
  validation: String,
63
45
  randomizer: :computer_os_version,
64
- api_object_attribute: [:hardware, :os_version]
46
+ api_object_attribute: %i[hardware os_version]
65
47
  },
66
48
  osBuild: {
67
49
  validation: String,
68
50
  randomizer: :os_build,
69
- api_object_attribute: [:hardware, :os_build]
51
+ api_object_attribute: %i[hardware os_build]
70
52
  },
71
53
  userDirectoryID: {
72
54
  validation: String,
@@ -84,12 +66,12 @@ Chook::Subject.classes[Chook::Subject::COMPUTER] = {
84
66
  api_object_attribute: :real_name
85
67
  },
86
68
  emailAddress: {
87
- validation: String, #:validate_email,
69
+ validation: String, # :validate_email,
88
70
  randomizer: :email_address,
89
71
  api_object_attribute: :email_address
90
72
  },
91
73
  phone: {
92
- validation: String, #:validate_phone_number,
74
+ validation: String, # :validate_phone_number,
93
75
  randomizer: :phone,
94
76
  api_object_attribute: :phone
95
77
  },
@@ -1,61 +1,43 @@
1
- ### Copyright 2020 Pixar
2
-
3
- ###
4
- ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- ### with the following modification; you may not use this file except in
6
- ### compliance with the Apache License and the following modification to it:
7
- ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
9
- ### 6. Trademarks. This License does not grant permission to use the trade
10
- ### names, trademarks, service marks, or product names of the Licensor
11
- ### and its affiliates, except as required to comply with Section 4(c) of
12
- ### the License and to reproduce the content of the NOTICE file.
13
- ###
14
- ### You may obtain a copy of the Apache License at
15
- ###
16
- ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
18
- ### Unless required by applicable law or agreed to in writing, software
19
- ### distributed under the Apache License with the above modification is
20
- ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- ### KIND, either express or implied. See the Apache License for the specific
22
- ### language governing permissions and limitations under the Apache License.
23
- ###
24
- ###
1
+ # Copyright 2025 Pixar
2
+ #
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
5
+ #
6
+ #
25
7
  Chook::Subject.classes[Chook::Subject::DEP_DEVICE] = {
26
8
  assetTag: {
27
- validation: String,
9
+ validation: String
28
10
  # randomizer: ,
29
11
  # sampler: ,
30
12
  # api_object_attribute:
31
13
  },
32
14
  description: {
33
15
  validation: String,
34
- randomizer: :word,
16
+ randomizer: :word
35
17
  # sampler: ,
36
18
  # api_object_attribute:
37
19
  },
38
20
  deviceAssignedDate: {
39
21
  to_json: :to_jss_epoch,
40
22
  validation: Time,
41
- randomizer: :time,
23
+ randomizer: :time
42
24
  # sampler: ,
43
25
  # api_object_attribute:
44
26
  },
45
27
  deviceEnrollmentProgramInstanceId: {
46
28
  validation: Integer,
47
- randomizer: :int,
29
+ randomizer: :int
48
30
  # sampler: ,
49
31
  # api_object_attribute:
50
32
  },
51
33
  model: {
52
34
  validation: String,
53
- randomizer: [:computer_model, :mobile_model], # /:
35
+ randomizer: %i[computer_model mobile_model], # /:
54
36
  # sampler: ,
55
- api_object_attribute: [:hardware, :model]
37
+ api_object_attribute: %i[hardware model]
56
38
  },
57
39
  serialNumber: {
58
- validation: String, #:validate_serial_number,
40
+ validation: String, # :validate_serial_number,
59
41
  # randomizer: :computer_serial_number,
60
42
  # sampler: ,
61
43
  api_object_attribute: :serial_number
@@ -1,27 +1,9 @@
1
- ### Copyright 2017 Pixar
2
-
3
- ###
4
- ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- ### with the following modification; you may not use this file except in
6
- ### compliance with the Apache License and the following modification to it:
7
- ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
9
- ### 6. Trademarks. This License does not grant permission to use the trade
10
- ### names, trademarks, service marks, or product names of the Licensor
11
- ### and its affiliates, except as required to comply with Section 4(c) of
12
- ### the License and to reproduce the content of the NOTICE file.
13
- ###
14
- ### You may obtain a copy of the Apache License at
15
- ###
16
- ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
18
- ### Unless required by applicable law or agreed to in writing, software
19
- ### distributed under the Apache License with the above modification is
20
- ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- ### KIND, either express or implied. See the Apache License for the specific
22
- ### language governing permissions and limitations under the Apache License.
23
- ###
24
- ###
1
+ # Copyright 2025 Pixar
2
+ #
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
5
+ #
6
+ #
25
7
 
26
8
  module Chook
27
9
 
@@ -1,42 +1,24 @@
1
- ### Copyright 2017 Pixar
2
-
3
- ###
4
- ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- ### with the following modification; you may not use this file except in
6
- ### compliance with the Apache License and the following modification to it:
7
- ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
9
- ### 6. Trademarks. This License does not grant permission to use the trade
10
- ### names, trademarks, service marks, or product names of the Licensor
11
- ### and its affiliates, except as required to comply with Section 4(c) of
12
- ### the License and to reproduce the content of the NOTICE file.
13
- ###
14
- ### You may obtain a copy of the Apache License at
15
- ###
16
- ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
18
- ### Unless required by applicable law or agreed to in writing, software
19
- ### distributed under the Apache License with the above modification is
20
- ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- ### KIND, either express or implied. See the Apache License for the specific
22
- ### language governing permissions and limitations under the Apache License.
23
- ###
24
- ###
1
+ # Copyright 2025 Pixar
2
+ #
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
5
+ #
6
+ #
25
7
  Chook::Subject.classes[Chook::Subject::JAMF_SOFTWARE_SERVER] = {
26
8
  institution: {
27
9
  validation: String,
28
- randomizer: :word,
10
+ randomizer: :word
29
11
  # sampler: :institution,
30
12
  # api_object_attribute: :institution
31
13
  },
32
14
  hostAddress: {
33
15
  validation: String,
34
- randomizer: :host,
16
+ randomizer: :host
35
17
  # sampler: ,
36
18
  # api_object_attribute: :hostAddress
37
19
  },
38
20
  webApplicationPath: {
39
- validation: String,
21
+ validation: String
40
22
  # randomizer: ,
41
23
  # sampler: ,
42
24
  # api_object_attribute: :webApplicationPath
@@ -49,7 +31,7 @@ Chook::Subject.classes[Chook::Subject::JAMF_SOFTWARE_SERVER] = {
49
31
  },
50
32
  jssUrl: {
51
33
  validation: :url,
52
- randomizer: :url,
34
+ randomizer: :url
53
35
  # sampler: ,
54
36
  # api_object_attribute: :jssUrl
55
37
  }
@@ -1,27 +1,9 @@
1
- ### Copyright 2017 Pixar
2
-
3
- ###
4
- ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- ### with the following modification; you may not use this file except in
6
- ### compliance with the Apache License and the following modification to it:
7
- ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
9
- ### 6. Trademarks. This License does not grant permission to use the trade
10
- ### names, trademarks, service marks, or product names of the Licensor
11
- ### and its affiliates, except as required to comply with Section 4(c) of
12
- ### the License and to reproduce the content of the NOTICE file.
13
- ###
14
- ### You may obtain a copy of the Apache License at
15
- ###
16
- ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
18
- ### Unless required by applicable law or agreed to in writing, software
19
- ### distributed under the Apache License with the above modification is
20
- ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- ### KIND, either express or implied. See the Apache License for the specific
22
- ### language governing permissions and limitations under the Apache License.
23
- ###
24
- ###
1
+ # Copyright 2025 Pixar
2
+ #
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
5
+ #
6
+ #
25
7
 
26
8
  Chook::Subject.classes[Chook::Subject::MOBILE_DEVICE] = {
27
9
  udid: {
@@ -37,7 +19,7 @@ Chook::Subject.classes[Chook::Subject::MOBILE_DEVICE] = {
37
19
  version: {
38
20
  validation: String,
39
21
  randomizer: :version,
40
- api_object_attribute: [:network, :carrier_settings_version]
22
+ api_object_attribute: %i[network carrier_settings_version]
41
23
  },
42
24
  model: {
43
25
  validation: String,
@@ -45,24 +27,24 @@ Chook::Subject.classes[Chook::Subject::MOBILE_DEVICE] = {
45
27
  api_object_attribute: :model
46
28
  },
47
29
  bluetoothMacAddress: {
48
- validation: String, #:validate_mac_address,
30
+ validation: String, # :validate_mac_address,
49
31
  randomizer: :mac_address,
50
32
  api_object_attribute: :bluetooth_mac_address
51
33
  },
52
34
  wifiMacAddress: {
53
- validation: String, #:validate_mac_address,
35
+ validation: String, # :validate_mac_address,
54
36
  randomizer: :mac_address,
55
37
  api_object_attribute: :wifi_mac_address
56
38
  },
57
39
  imei: {
58
40
  validation: :imei,
59
41
  randomizer: :imei,
60
- api_object_attribute: [:network, :imei]
42
+ api_object_attribute: %i[network imei]
61
43
  },
62
44
  icciID: {
63
- validation: String, #:iccid,
45
+ validation: String, # :iccid,
64
46
  randomizer: :iccid,
65
- api_object_attribute: [:network, :iccid]
47
+ api_object_attribute: %i[network iccid]
66
48
  },
67
49
  product: {
68
50
  # Product is null in the sample JSONs... And there isn't anything labeled "product" in JSS::API.get_rsrc("mobiledevices/id/#{id}")
@@ -1,27 +1,9 @@
1
- ### Copyright 2017 Pixar
2
-
3
- ###
4
- ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- ### with the following modification; you may not use this file except in
6
- ### compliance with the Apache License and the following modification to it:
7
- ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
9
- ### 6. Trademarks. This License does not grant permission to use the trade
10
- ### names, trademarks, service marks, or product names of the Licensor
11
- ### and its affiliates, except as required to comply with Section 4(c) of
12
- ### the License and to reproduce the content of the NOTICE file.
13
- ###
14
- ### You may obtain a copy of the Apache License at
15
- ###
16
- ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
18
- ### Unless required by applicable law or agreed to in writing, software
19
- ### distributed under the Apache License with the above modification is
20
- ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- ### KIND, either express or implied. See the Apache License for the specific
22
- ### language governing permissions and limitations under the Apache License.
23
- ###
24
- ###
1
+ # Copyright 2025 Pixar
2
+ #
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
5
+ #
6
+ #
25
7
  Chook::Subject.classes[Chook::Subject::PATCH_SW_UPDATE] = {
26
8
  name: {
27
9
  validation: :patch,
@@ -1,27 +1,9 @@
1
- ### Copyright 2017 Pixar
2
-
3
- ###
4
- ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- ### with the following modification; you may not use this file except in
6
- ### compliance with the Apache License and the following modification to it:
7
- ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
9
- ### 6. Trademarks. This License does not grant permission to use the trade
10
- ### names, trademarks, service marks, or product names of the Licensor
11
- ### and its affiliates, except as required to comply with Section 4(c) of
12
- ### the License and to reproduce the content of the NOTICE file.
13
- ###
14
- ### You may obtain a copy of the Apache License at
15
- ###
16
- ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
18
- ### Unless required by applicable law or agreed to in writing, software
19
- ### distributed under the Apache License with the above modification is
20
- ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- ### KIND, either express or implied. See the Apache License for the specific
22
- ### language governing permissions and limitations under the Apache License.
23
- ###
24
- ###
1
+ # Copyright 2025 Pixar
2
+ #
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
5
+ #
6
+ #
25
7
 
26
8
  # Add the attrbutes of a Computer subject to the Chook::Subject.attributes
27
9
  # hash, to be used in defining Chook::TestSubjects::Computer and
@@ -1,37 +1,19 @@
1
- ### Copyright 2017 Pixar
2
-
3
- ###
4
- ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- ### with the following modification; you may not use this file except in
6
- ### compliance with the Apache License and the following modification to it:
7
- ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
9
- ### 6. Trademarks. This License does not grant permission to use the trade
10
- ### names, trademarks, service marks, or product names of the Licensor
11
- ### and its affiliates, except as required to comply with Section 4(c) of
12
- ### the License and to reproduce the content of the NOTICE file.
13
- ###
14
- ### You may obtain a copy of the Apache License at
15
- ###
16
- ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
18
- ### Unless required by applicable law or agreed to in writing, software
19
- ### distributed under the Apache License with the above modification is
20
- ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- ### KIND, either express or implied. See the Apache License for the specific
22
- ### language governing permissions and limitations under the Apache License.
23
- ###
24
- ###
1
+ # Copyright 2025 Pixar
2
+ #
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
5
+ #
6
+ #
25
7
  Chook::Subject.classes[Chook::Subject::PUSH] = {
26
8
  type: { # TODO: "PushSent" for a Computer or "MobileDevicePushSent" for a Mobile Device
27
9
  validation: String,
28
- randomizer: :push,
10
+ randomizer: :push
29
11
  # sampler:,
30
12
  # api_object_attribute: :type
31
13
  },
32
14
  jssID: {
33
15
  validation: Integer,
34
- randomizer: :int,
16
+ randomizer: :int
35
17
  # sampler: :jssid, # TODO: This should be computer_jssid or mobile_jssid based on the type, see above
36
18
  # api_object_attribute: :id
37
19
  }
@@ -1,27 +1,9 @@
1
- ### Copyright 2017 Pixar
2
-
3
- ###
4
- ### Licensed under the Apache License, Version 2.0 (the "Apache License")
5
- ### with the following modification; you may not use this file except in
6
- ### compliance with the Apache License and the following modification to it:
7
- ### Section 6. Trademarks. is deleted and replaced with:
8
- ###
9
- ### 6. Trademarks. This License does not grant permission to use the trade
10
- ### names, trademarks, service marks, or product names of the Licensor
11
- ### and its affiliates, except as required to comply with Section 4(c) of
12
- ### the License and to reproduce the content of the NOTICE file.
13
- ###
14
- ### You may obtain a copy of the Apache License at
15
- ###
16
- ### http://www.apache.org/licenses/LICENSE-2.0
17
- ###
18
- ### Unless required by applicable law or agreed to in writing, software
19
- ### distributed under the Apache License with the above modification is
20
- ### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- ### KIND, either express or implied. See the Apache License for the specific
22
- ### language governing permissions and limitations under the Apache License.
23
- ###
24
- ###
1
+ # Copyright 2025 Pixar
2
+ #
3
+ # Licensed under the terms set forth in the LICENSE.txt file available at
4
+ # at the root of this project.
5
+ #
6
+ #
25
7
  Chook::Subject.classes[Chook::Subject::REST_API_OPERATION] = {
26
8
  operationSuccessful: {
27
9
  validation: :boolean,
@@ -31,31 +13,31 @@ Chook::Subject.classes[Chook::Subject::REST_API_OPERATION] = {
31
13
  },
32
14
  objectID: {
33
15
  validation: Integer,
34
- randomizer: :int,
16
+ randomizer: :int
35
17
  # sampler: ,
36
18
  # api_object_attribute: :objectID
37
19
  },
38
20
  objectName: { # This can be "" if the object doesn't have a name attribute.
39
21
  validation: String,
40
- randomizer: :word,
22
+ randomizer: :word
41
23
  # sampler: ,
42
24
  # api_object_attribute: :objectName
43
25
  },
44
26
  objectTypeName: {
45
27
  validation: String,
46
- randomizer: :word,
28
+ randomizer: :word
47
29
  # sampler: ,
48
30
  # api_object_attribute: :objectTypeName
49
31
  },
50
32
  authorizedUsername: {
51
33
  validation: String,
52
- randomizer: :word,
34
+ randomizer: :word
53
35
  # sampler: :username,
54
36
  # api_object_attribute: :authorizedUsername
55
37
  },
56
38
  restAPIOperationType: {
57
39
  validation: String,
58
- randomizer: :rest_operation,
40
+ randomizer: :rest_operation
59
41
  # sampler: ,
60
42
  # api_object_attribute: :restAPIOperationType
61
43
  }